vitepress 2.0.0-alpha.2 → 2.0.0-alpha.21

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.
Files changed (286) hide show
  1. package/README.md +34 -2
  2. package/THIRD-PARTY-NOTICES.md +1736 -0
  3. package/bin/vitepress.js +14 -0
  4. package/client.d.ts +9 -0
  5. package/dist/client/app/components/ClientOnly.d.ts +5 -0
  6. package/dist/client/app/components/ClientOnly.js +11 -10
  7. package/dist/client/app/components/Content.d.ts +17 -0
  8. package/dist/client/app/components/Content.js +25 -22
  9. package/dist/client/app/composables/codeGroups.d.ts +3 -0
  10. package/dist/client/app/composables/codeGroups.js +36 -39
  11. package/dist/client/app/composables/copyCode.d.ts +3 -0
  12. package/dist/client/app/composables/copyCode.js +59 -70
  13. package/dist/client/app/composables/head.d.ts +5 -0
  14. package/dist/client/app/composables/head.js +56 -74
  15. package/dist/client/app/composables/icon.d.ts +12 -0
  16. package/dist/client/app/composables/icon.js +56 -0
  17. package/dist/client/app/composables/preFetch.d.ts +3 -0
  18. package/dist/client/app/composables/preFetch.js +64 -96
  19. package/dist/client/app/data.d.ts +9 -0
  20. package/dist/client/app/data.js +34 -59
  21. package/dist/client/app/devtools.d.ts +7 -0
  22. package/dist/client/app/devtools.js +29 -28
  23. package/dist/client/app/index.d.ts +11 -0
  24. package/dist/client/app/index.js +106 -131
  25. package/dist/client/app/router.d.ts +49 -0
  26. package/dist/client/app/router.js +198 -239
  27. package/dist/client/app/ssr.d.ts +4 -0
  28. package/dist/client/app/ssr.js +14 -9
  29. package/dist/client/app/theme.d.ts +24 -0
  30. package/dist/client/app/theme.js +0 -1
  31. package/dist/client/app/utils.d.ts +35 -0
  32. package/dist/client/app/utils.js +77 -110
  33. package/dist/client/index.d.ts +21 -137
  34. package/dist/client/index.js +8 -9
  35. package/dist/client/shared.d.ts +88 -0
  36. package/dist/client/shared.js +265 -141
  37. package/dist/client/theme-default/Layout.d.vue.ts +79 -0
  38. package/dist/client/theme-default/Layout.vue +33 -36
  39. package/dist/client/theme-default/NotFound.d.vue.ts +3 -0
  40. package/dist/client/theme-default/NotFound.vue +33 -35
  41. package/dist/client/theme-default/components/VPAlgoliaSearchBox.d.vue.ts +11 -0
  42. package/dist/client/theme-default/components/VPAlgoliaSearchBox.vue +202 -70
  43. package/dist/client/theme-default/components/VPBackdrop.d.vue.ts +6 -0
  44. package/dist/client/theme-default/components/VPBackdrop.vue +8 -12
  45. package/dist/client/theme-default/components/VPBadge.d.vue.ts +19 -0
  46. package/dist/client/theme-default/components/VPBadge.vue +49 -26
  47. package/dist/client/theme-default/components/VPButton.d.vue.ts +25 -0
  48. package/dist/client/theme-default/components/VPButton.vue +53 -36
  49. package/dist/client/theme-default/components/VPCarbonAds.d.vue.ts +7 -0
  50. package/dist/client/theme-default/components/VPCarbonAds.vue +51 -52
  51. package/dist/client/theme-default/components/VPContent.d.vue.ts +59 -0
  52. package/dist/client/theme-default/components/VPContent.vue +27 -26
  53. package/dist/client/theme-default/components/VPDoc.d.vue.ts +33 -0
  54. package/dist/client/theme-default/components/VPDoc.vue +52 -48
  55. package/dist/client/theme-default/components/VPDocAside.d.vue.ts +23 -0
  56. package/dist/client/theme-default/components/VPDocAside.vue +7 -8
  57. package/dist/client/theme-default/components/VPDocAsideCarbonAds.d.vue.ts +7 -0
  58. package/dist/client/theme-default/components/VPDocAsideCarbonAds.vue +7 -11
  59. package/dist/client/theme-default/components/VPDocAsideOutline.d.vue.ts +3 -0
  60. package/dist/client/theme-default/components/VPDocAsideOutline.vue +22 -38
  61. package/dist/client/theme-default/components/VPDocAsideSponsors.d.vue.ts +10 -0
  62. package/dist/client/theme-default/components/VPDocAsideSponsors.vue +17 -11
  63. package/dist/client/theme-default/components/VPDocFooter.d.vue.ts +13 -0
  64. package/dist/client/theme-default/components/VPDocFooter.vue +38 -45
  65. package/dist/client/theme-default/components/VPDocFooterLastUpdated.d.vue.ts +3 -0
  66. package/dist/client/theme-default/components/VPDocFooterLastUpdated.vue +30 -29
  67. package/dist/client/theme-default/components/VPDocOutlineItem.d.vue.ts +8 -0
  68. package/dist/client/theme-default/components/VPDocOutlineItem.vue +20 -19
  69. package/dist/client/theme-default/components/VPFeature.d.vue.ts +13 -0
  70. package/dist/client/theme-default/components/VPFeature.vue +62 -36
  71. package/dist/client/theme-default/components/VPFeatures.d.vue.ts +16 -0
  72. package/dist/client/theme-default/components/VPFeatures.vue +35 -48
  73. package/dist/client/theme-default/components/VPFlyout.d.vue.ts +26 -0
  74. package/dist/client/theme-default/components/VPFlyout.vue +111 -47
  75. package/dist/client/theme-default/components/VPFooter.d.vue.ts +3 -0
  76. package/dist/client/theme-default/components/VPFooter.vue +22 -15
  77. package/dist/client/theme-default/components/VPHero.d.vue.ts +38 -0
  78. package/dist/client/theme-default/components/VPHero.vue +109 -99
  79. package/dist/client/theme-default/components/VPHome.d.vue.ts +31 -0
  80. package/dist/client/theme-default/components/VPHome.vue +15 -15
  81. package/dist/client/theme-default/components/VPHomeContent.d.vue.ts +13 -0
  82. package/dist/client/theme-default/components/VPHomeContent.vue +9 -27
  83. package/dist/client/theme-default/components/VPHomeFeatures.d.vue.ts +3 -0
  84. package/dist/client/theme-default/components/VPHomeFeatures.vue +4 -5
  85. package/dist/client/theme-default/components/VPHomeHero.d.vue.ts +23 -0
  86. package/dist/client/theme-default/components/VPHomeHero.vue +5 -5
  87. package/dist/client/theme-default/components/VPHomeSponsors.d.vue.ts +21 -0
  88. package/dist/client/theme-default/components/VPHomeSponsors.vue +42 -43
  89. package/dist/client/theme-default/components/VPIcon.d.vue.ts +8 -0
  90. package/dist/client/theme-default/components/VPIcon.vue +29 -0
  91. package/dist/client/theme-default/components/VPImage.d.vue.ts +8 -0
  92. package/dist/client/theme-default/components/VPImage.vue +20 -14
  93. package/dist/client/theme-default/components/VPLink.d.vue.ts +23 -0
  94. package/dist/client/theme-default/components/VPLink.vue +42 -23
  95. package/dist/client/theme-default/components/VPLocalNav.d.vue.ts +10 -0
  96. package/dist/client/theme-default/components/VPLocalNav.vue +69 -86
  97. package/dist/client/theme-default/components/VPLocalNavOutlineDropdown.d.vue.ts +8 -0
  98. package/dist/client/theme-default/components/VPLocalNavOutlineDropdown.vue +98 -96
  99. package/dist/client/theme-default/components/VPLocalSearchBox.d.vue.ts +7 -0
  100. package/dist/client/theme-default/components/VPLocalSearchBox.vue +391 -454
  101. package/dist/client/theme-default/components/VPMenu.d.vue.ts +23 -0
  102. package/dist/client/theme-default/components/VPMenu.vue +19 -31
  103. package/dist/client/theme-default/components/VPMenuGroup.d.vue.ts +22 -0
  104. package/dist/client/theme-default/components/VPMenuGroup.vue +72 -18
  105. package/dist/client/theme-default/components/VPMenuLink.d.vue.ts +22 -0
  106. package/dist/client/theme-default/components/VPMenuLink.vue +65 -31
  107. package/dist/client/theme-default/components/VPNav.d.vue.ts +23 -0
  108. package/dist/client/theme-default/components/VPNav.vue +18 -24
  109. package/dist/client/theme-default/components/VPNavAppearance.d.vue.ts +9 -0
  110. package/dist/client/theme-default/components/VPNavAppearance.vue +88 -0
  111. package/dist/client/theme-default/components/VPNavBar.d.vue.ts +26 -0
  112. package/dist/client/theme-default/components/VPNavBar.vue +170 -142
  113. package/dist/client/theme-default/components/VPNavBarAskAiButton.d.vue.ts +3 -0
  114. package/dist/client/theme-default/components/VPNavBarAskAiButton.vue +31 -0
  115. package/dist/client/theme-default/components/VPNavBarExtra.d.vue.ts +3 -0
  116. package/dist/client/theme-default/components/VPNavBarExtra.vue +51 -73
  117. package/dist/client/theme-default/components/VPNavBarHamburger.d.vue.ts +10 -0
  118. package/dist/client/theme-default/components/VPNavBarHamburger.vue +38 -28
  119. package/dist/client/theme-default/components/VPNavBarSearch.d.vue.ts +3 -0
  120. package/dist/client/theme-default/components/VPNavBarSearch.vue +129 -160
  121. package/dist/client/theme-default/components/VPNavBarSearchButton.d.vue.ts +6 -0
  122. package/dist/client/theme-default/components/VPNavBarSearchButton.vue +48 -182
  123. package/dist/client/theme-default/components/VPNavBarTitle.d.vue.ts +15 -0
  124. package/dist/client/theme-default/components/VPNavBarTitle.vue +39 -38
  125. package/dist/client/theme-default/components/VPNavMenu.d.vue.ts +6 -0
  126. package/dist/client/theme-default/components/VPNavMenu.vue +76 -0
  127. package/dist/client/theme-default/components/VPNavMenuGroup.d.vue.ts +11 -0
  128. package/dist/client/theme-default/components/VPNavMenuGroup.vue +140 -0
  129. package/dist/client/theme-default/components/VPNavMenuLink.d.vue.ts +8 -0
  130. package/dist/client/theme-default/components/VPNavMenuLink.vue +69 -0
  131. package/dist/client/theme-default/components/VPNavScreen.d.vue.ts +18 -0
  132. package/dist/client/theme-default/components/VPNavScreen.vue +36 -34
  133. package/dist/client/theme-default/components/VPNavSocialLinks.d.vue.ts +6 -0
  134. package/dist/client/theme-default/components/VPNavSocialLinks.vue +36 -0
  135. package/dist/client/theme-default/components/VPNavTranslations.d.vue.ts +9 -0
  136. package/dist/client/theme-default/components/VPNavTranslations.vue +170 -0
  137. package/dist/client/theme-default/components/VPPage.d.vue.ts +15 -0
  138. package/dist/client/theme-default/components/VPSidebar.d.vue.ts +18 -0
  139. package/dist/client/theme-default/components/VPSidebar.vue +40 -53
  140. package/dist/client/theme-default/components/VPSidebarGroup.d.vue.ts +7 -0
  141. package/dist/client/theme-default/components/VPSidebarGroup.vue +24 -29
  142. package/dist/client/theme-default/components/VPSidebarItem.d.vue.ts +8 -0
  143. package/dist/client/theme-default/components/VPSidebarItem.vue +60 -93
  144. package/dist/client/theme-default/components/VPSkipLink.d.vue.ts +6 -0
  145. package/dist/client/theme-default/components/VPSkipLink.vue +23 -42
  146. package/dist/client/theme-default/components/VPSocialLink.d.vue.ts +11 -0
  147. package/dist/client/theme-default/components/VPSocialLink.vue +42 -49
  148. package/dist/client/theme-default/components/VPSocialLinks.d.vue.ts +10 -0
  149. package/dist/client/theme-default/components/VPSocialLinks.vue +26 -16
  150. package/dist/client/theme-default/components/VPSponsors.d.vue.ts +18 -0
  151. package/dist/client/theme-default/components/VPSponsors.vue +34 -33
  152. package/dist/client/theme-default/components/VPSponsorsGrid.d.vue.ts +15 -0
  153. package/dist/client/theme-default/components/VPSponsorsGrid.vue +23 -26
  154. package/dist/client/theme-default/components/VPSwitch.d.vue.ts +13 -0
  155. package/dist/client/theme-default/components/VPSwitch.vue +12 -13
  156. package/dist/client/theme-default/components/VPSwitchAppearance.d.vue.ts +3 -0
  157. package/dist/client/theme-default/components/VPSwitchAppearance.vue +16 -21
  158. package/dist/client/theme-default/components/VPTeamMembers.d.vue.ts +10 -0
  159. package/dist/client/theme-default/components/VPTeamMembers.vue +59 -32
  160. package/dist/client/theme-default/components/VPTeamMembersItem.d.vue.ts +10 -0
  161. package/dist/client/theme-default/components/VPTeamMembersItem.vue +62 -58
  162. package/dist/client/theme-default/components/VPTeamPage.d.vue.ts +13 -0
  163. package/dist/client/theme-default/components/VPTeamPage.vue +14 -14
  164. package/dist/client/theme-default/components/VPTeamPageSection.d.vue.ts +17 -0
  165. package/dist/client/theme-default/components/VPTeamPageSection.vue +20 -19
  166. package/dist/client/theme-default/components/VPTeamPageTitle.d.vue.ts +15 -0
  167. package/dist/client/theme-default/components/VPTeamPageTitle.vue +22 -22
  168. package/dist/client/theme-default/composables/data.d.ts +5 -0
  169. package/dist/client/theme-default/composables/data.js +5 -2
  170. package/dist/client/theme-default/composables/edit-link.d.ts +6 -0
  171. package/dist/client/theme-default/composables/edit-link.js +17 -15
  172. package/dist/client/theme-default/composables/flyout.d.ts +10 -0
  173. package/dist/client/theme-default/composables/flyout.js +33 -32
  174. package/dist/client/theme-default/composables/langs.d.ts +44 -0
  175. package/dist/client/theme-default/composables/langs.js +48 -24
  176. package/dist/client/theme-default/composables/layout.d.ts +13 -0
  177. package/dist/client/theme-default/composables/layout.js +68 -0
  178. package/dist/client/theme-default/composables/nav-overflow.d.ts +54 -0
  179. package/dist/client/theme-default/composables/nav-overflow.js +179 -0
  180. package/dist/client/theme-default/composables/nav.d.ts +25 -0
  181. package/dist/client/theme-default/composables/nav.js +58 -29
  182. package/dist/client/theme-default/composables/outline.d.ts +8 -0
  183. package/dist/client/theme-default/composables/outline.js +144 -166
  184. package/dist/client/theme-default/composables/prev-next.d.ts +16 -0
  185. package/dist/client/theme-default/composables/prev-next.js +34 -56
  186. package/dist/client/theme-default/composables/scroll-lock.d.ts +4 -0
  187. package/dist/client/theme-default/composables/scroll-lock.js +95 -0
  188. package/dist/client/theme-default/composables/sidebar.d.ts +25 -0
  189. package/dist/client/theme-default/composables/sidebar.js +96 -133
  190. package/dist/client/theme-default/composables/sponsor-grid.d.ts +10 -0
  191. package/dist/client/theme-default/composables/sponsor-grid.js +69 -76
  192. package/dist/client/theme-default/fonts/inter-italic-cyrillic-ext.woff2 +0 -0
  193. package/dist/client/theme-default/fonts/inter-italic-cyrillic.woff2 +0 -0
  194. package/dist/client/theme-default/fonts/inter-italic-greek-ext.woff2 +0 -0
  195. package/dist/client/theme-default/fonts/inter-italic-greek.woff2 +0 -0
  196. package/dist/client/theme-default/fonts/inter-italic-latin-ext.woff2 +0 -0
  197. package/dist/client/theme-default/fonts/inter-italic-latin.woff2 +0 -0
  198. package/dist/client/theme-default/fonts/inter-italic-symbols.woff2 +0 -0
  199. package/dist/client/theme-default/fonts/inter-italic-vietnamese.woff2 +0 -0
  200. package/dist/client/theme-default/fonts/inter-roman-cyrillic-ext.woff2 +0 -0
  201. package/dist/client/theme-default/fonts/inter-roman-cyrillic.woff2 +0 -0
  202. package/dist/client/theme-default/fonts/inter-roman-greek-ext.woff2 +0 -0
  203. package/dist/client/theme-default/fonts/inter-roman-greek.woff2 +0 -0
  204. package/dist/client/theme-default/fonts/inter-roman-latin-ext.woff2 +0 -0
  205. package/dist/client/theme-default/fonts/inter-roman-latin.woff2 +0 -0
  206. package/dist/client/theme-default/fonts/inter-roman-symbols.woff2 +0 -0
  207. package/dist/client/theme-default/fonts/inter-roman-vietnamese.woff2 +0 -0
  208. package/dist/client/theme-default/index.d.ts +3 -0
  209. package/dist/client/theme-default/index.js +4 -3
  210. package/dist/client/theme-default/styles/base.css +279 -211
  211. package/dist/client/theme-default/styles/components/custom-block.css +12 -7
  212. package/dist/client/theme-default/styles/components/vp-code-group.css +13 -16
  213. package/dist/client/theme-default/styles/components/vp-code.css +10 -2
  214. package/dist/client/theme-default/styles/components/vp-doc.css +188 -142
  215. package/dist/client/theme-default/styles/components/vp-sponsor.css +48 -37
  216. package/dist/client/theme-default/styles/docsearch.css +138 -0
  217. package/dist/client/theme-default/styles/fonts.css +216 -55
  218. package/dist/client/theme-default/styles/icons.css +42 -22
  219. package/dist/client/theme-default/styles/vars.css +111 -46
  220. package/dist/client/theme-default/support/docsearch.d.ts +57 -0
  221. package/dist/client/theme-default/support/docsearch.js +145 -0
  222. package/dist/client/theme-default/support/local-search.d.ts +9 -0
  223. package/dist/client/theme-default/support/local-search.js +31 -0
  224. package/dist/client/theme-default/support/lru.d.ts +11 -0
  225. package/dist/client/theme-default/support/lru.js +30 -33
  226. package/dist/client/theme-default/support/reactivity.d.ts +4 -0
  227. package/dist/client/theme-default/support/reactivity.js +10 -0
  228. package/dist/client/theme-default/support/sidebar.d.ts +27 -0
  229. package/dist/client/theme-default/support/sidebar.js +69 -80
  230. package/dist/client/theme-default/support/translation.d.ts +6 -0
  231. package/dist/client/theme-default/support/translation.js +33 -47
  232. package/dist/client/theme-default/support/utils.d.ts +7 -0
  233. package/dist/client/theme-default/support/utils.js +39 -30
  234. package/dist/client/theme-default/without-fonts.d.ts +25 -0
  235. package/dist/client/theme-default/without-fonts.js +37 -36
  236. package/dist/node/chunk-BjrVv9r8.js +28627 -0
  237. package/dist/node/cli.d.ts +1 -0
  238. package/dist/node/cli.js +160 -423
  239. package/dist/node/index.d.ts +1761 -2476
  240. package/dist/node/index.js +1 -121
  241. package/dist/web-types.json +75 -0
  242. package/package.json +89 -98
  243. package/template/.vitepress/config.js +3 -1
  244. package/template/.vitepress/theme/style.css +3 -11
  245. package/theme.d.ts +30 -23
  246. package/types/default-theme.d.ts +109 -113
  247. package/types/docsearch.d.ts +61 -142
  248. package/types/shared.d.ts +469 -50
  249. package/dist/client/theme-default/components/VPNavBarAppearance.vue +0 -32
  250. package/dist/client/theme-default/components/VPNavBarMenu.vue +0 -40
  251. package/dist/client/theme-default/components/VPNavBarMenuGroup.vue +0 -42
  252. package/dist/client/theme-default/components/VPNavBarMenuLink.vue +0 -53
  253. package/dist/client/theme-default/components/VPNavBarSocialLinks.vue +0 -27
  254. package/dist/client/theme-default/components/VPNavBarTranslations.vue +0 -47
  255. package/dist/client/theme-default/components/VPNavScreenAppearance.vue +0 -40
  256. package/dist/client/theme-default/components/VPNavScreenMenu.vue +0 -26
  257. package/dist/client/theme-default/components/VPNavScreenMenuGroup.vue +0 -112
  258. package/dist/client/theme-default/components/VPNavScreenMenuGroupLink.vue +0 -40
  259. package/dist/client/theme-default/components/VPNavScreenMenuGroupSection.vue +0 -34
  260. package/dist/client/theme-default/components/VPNavScreenMenuLink.vue +0 -43
  261. package/dist/client/theme-default/components/VPNavScreenSocialLinks.vue +0 -14
  262. package/dist/client/theme-default/components/VPNavScreenTranslations.vue +0 -73
  263. package/dist/client/theme-default/components/icons/VPIconAlignJustify.vue +0 -8
  264. package/dist/client/theme-default/components/icons/VPIconAlignLeft.vue +0 -8
  265. package/dist/client/theme-default/components/icons/VPIconAlignRight.vue +0 -8
  266. package/dist/client/theme-default/components/icons/VPIconArrowLeft.vue +0 -7
  267. package/dist/client/theme-default/components/icons/VPIconArrowRight.vue +0 -7
  268. package/dist/client/theme-default/components/icons/VPIconChevronDown.vue +0 -5
  269. package/dist/client/theme-default/components/icons/VPIconChevronLeft.vue +0 -5
  270. package/dist/client/theme-default/components/icons/VPIconChevronRight.vue +0 -5
  271. package/dist/client/theme-default/components/icons/VPIconChevronUp.vue +0 -5
  272. package/dist/client/theme-default/components/icons/VPIconEdit.vue +0 -6
  273. package/dist/client/theme-default/components/icons/VPIconHeart.vue +0 -5
  274. package/dist/client/theme-default/components/icons/VPIconLanguages.vue +0 -9
  275. package/dist/client/theme-default/components/icons/VPIconMinus.vue +0 -5
  276. package/dist/client/theme-default/components/icons/VPIconMinusSquare.vue +0 -6
  277. package/dist/client/theme-default/components/icons/VPIconMoon.vue +0 -5
  278. package/dist/client/theme-default/components/icons/VPIconMoreHorizontal.vue +0 -7
  279. package/dist/client/theme-default/components/icons/VPIconPlus.vue +0 -5
  280. package/dist/client/theme-default/components/icons/VPIconPlusSquare.vue +0 -6
  281. package/dist/client/theme-default/components/icons/VPIconSun.vue +0 -13
  282. package/dist/client/theme-default/composables/aside.js +0 -17
  283. package/dist/client/theme-default/composables/local-nav.js +0 -18
  284. package/dist/node/chunk-C-d2RJOW.js +0 -470
  285. package/dist/node/chunk-CxQfvv8o.js +0 -49065
  286. package/dist/node/worker_shikiResolveLang.js +0 -13
@@ -1,18 +1,92 @@
1
- /// <reference types="node" />
2
- import * as vite from 'vite';
3
- import { Logger, UserConfig as UserConfig$1, ConfigEnv, BuildOptions, ServerOptions } from 'vite';
4
- export { Plugin, loadEnv } from 'vite';
5
- import { Awaitable, SiteData, PageData, HeadConfig, LocaleSpecificConfig, LocaleConfig, SSGContext, DefaultTheme } from '../../types/shared.js';
6
- export { DefaultTheme, HeadConfig, Header, SiteData } from '../../types/shared.js';
7
- import { Options as Options$4 } from '@vitejs/plugin-vue';
8
- import { UseDarkOptions } from '@vueuse/core';
9
- import { TransformOptions } from 'stream';
10
- import { ThemeRegistrationAny, LanguageInput, ShikiTransformer } from '@shikijs/types';
11
- import { BuiltinTheme, BuiltinLanguage, Highlighter } from 'shiki';
12
- import { Root } from 'postcss';
13
- import { IncomingMessage, ServerResponse } from 'http';
14
- import { Server, ListenOptions } from 'net';
15
-
1
+ import { BuildOptions, ConfigEnv, Logger, Plugin, ServerOptions, UserConfig as UserConfig$1, loadEnv } from "vite";
2
+ import { URL as URL$1 } from "node:url";
3
+ import { Transform, TransformOptions } from "node:stream";
4
+ import { BuiltinLanguage, BuiltinTheme, CodeToHastOptions, Highlighter, LanguageInput, ShikiTransformer, ThemeRegistrationAny } from "shiki";
5
+ import MarkdownIt, { Options, PluginSimple, PluginWithOptions, PluginWithParams, PresetName } from "markdown-it";
6
+ import { DefaultTheme } from "../../types/default-theme.js";
7
+ import { PageSplitSection } from "../../types/local-search.js";
8
+ import { AdditionalConfig, AdditionalConfigDict, AdditionalConfigLoader, Awaitable, CodeCopyButtonOptions, ContainerOptions, HeadConfig, HeadConfig as HeadConfig$1, Header, LocaleConfig, LocaleSpecificConfig, MarkdownEnv, MarkdownLocaleOptions, MarkdownLocaleOptions as MarkdownLocaleOptions$1, PageData, SSGContext, SiteData, SiteData as SiteData$1, SiteData as SiteData$2 } from "../../types/shared.js";
9
+ import { Options as Options$1 } from "@vitejs/plugin-vue";
10
+ import { UseDarkOptions } from "@vueuse/core";
11
+ import "markdown-it/lib/parser_block.mjs";
12
+ import "markdown-it/lib/parser_inline.mjs";
13
+ import StateCore from "markdown-it/lib/rules_core/state_core.mjs";
14
+ import Token from "markdown-it/lib/token.mjs";
15
+ import { Plugin as Plugin$1 } from "postcss";
16
+ import { IncomingMessage, ServerResponse } from "http";
17
+ import { ListenOptions, Server } from "net";
18
+ //#region node_modules/.pnpm/markdown-it-async@2.2.0/node_modules/markdown-it-async/dist/index.d.mts
19
+ type PluginSimple$1 = ((md: MarkdownItAsync) => void);
20
+ type PluginWithOptions$1<T = any> = ((md: MarkdownItAsync, options?: T) => void);
21
+ type PluginWithParams$1 = ((md: MarkdownItAsync, ...params: any[]) => void);
22
+ interface MarkdownItAsyncOptions extends Omit<Options, 'highlight'> {
23
+ /**
24
+ * Highlighter function for fenced code blocks.
25
+ * Highlighter `function (str, lang, attrs)` should return escaped HTML. It can
26
+ * also return empty string if the source was not changed and should be escaped
27
+ * externally. If result starts with <pre... internal wrapper is skipped.
28
+ * @default null
29
+ */
30
+ highlight?: ((str: string, lang: string, attrs: string) => string | Promise<string>) | null | undefined;
31
+ /**
32
+ * Emit warning when calling `md.render` instead of `md.renderAsync`.
33
+ *
34
+ * @default false
35
+ */
36
+ warnOnSyncRender?: boolean;
37
+ }
38
+ type MarkdownItAsyncPlaceholderMap = Map<string, [promise: Promise<string>, str: string, lang: string, attrs: string]>;
39
+ declare class MarkdownItAsync extends MarkdownIt {
40
+ // @ts-ignore
41
+ options: MarkdownItAsyncOptions;
42
+ placeholderMap: MarkdownItAsyncPlaceholderMap;
43
+ private disableWarn;
44
+ constructor(presetName: PresetName, options?: MarkdownItAsyncOptions);
45
+ constructor(options?: MarkdownItAsyncOptions);
46
+ use(plugin: PluginSimple$1): this;
47
+ use(plugin: PluginSimple): this;
48
+ use<T = any>(plugin: PluginWithOptions$1<T>, options?: T): this;
49
+ use<T = any>(plugin: PluginWithOptions<T>, options?: T): this;
50
+ use(plugin: PluginWithParams$1, ...params: any[]): this;
51
+ use(plugin: PluginWithParams, ...params: any[]): this;
52
+ render(src: string, env?: any): string;
53
+ renderAsync(src: string, env?: any): Promise<string>;
54
+ }
55
+ //#endregion
56
+ //#region src/node/shared.d.ts
57
+ /**
58
+ * Resolves the site data for a route, layering the matched locale and
59
+ * additional configs over the root config.
60
+ */
61
+ export declare function resolveSiteDataByRoute(siteData: SiteData$1, relativePath: string, filePath?: string): SiteData$1;
62
+ //#endregion
63
+ //#region src/node/defaultTheme.d.ts
64
+ declare module '../../types/default-theme.js' {
65
+ namespace DefaultTheme {
66
+ interface LocalSearchOptions {
67
+ /**
68
+ * Allows transformation of content before indexing (node only)
69
+ * Return empty string to skip indexing
70
+ */
71
+ _render?: (src: string, env: MarkdownEnv, md: MarkdownItAsync) => Awaitable<string>;
72
+ }
73
+ interface MiniSearchOptions {
74
+ /**
75
+ * Overrides the default regex based page splitter.
76
+ * Supports async generator, making it possible to run in true parallel
77
+ * (when used along with `node:child_process` or `worker_threads`)
78
+ * ---
79
+ * This should be especially useful for scalability reasons.
80
+ * ---
81
+ * @param {string} path - absolute path to the markdown source file
82
+ * @param {string} html - document page rendered as html
83
+ */
84
+ _splitIntoSections?: (path: string, html: string) => AsyncGenerator<PageSplitSection> | Generator<PageSplitSection> | Awaitable<PageSplitSection[]>;
85
+ }
86
+ }
87
+ }
88
+ //#endregion
89
+ //#region node_modules/.pnpm/sitemap@9.0.1/node_modules/sitemap/dist/esm/lib/types.d.ts
16
90
  /**
17
91
  * How frequently the page is likely to change. This value provides general
18
92
  * information to search engines and may not correlate exactly to how often they crawl the page. Please note that the
@@ -21,2596 +95,1807 @@ import { Server, ListenOptions } from 'net';
21
95
  * values
22
96
  */
23
97
  declare enum EnumChangefreq {
24
- DAILY = "daily",
25
- MONTHLY = "monthly",
26
- ALWAYS = "always",
27
- HOURLY = "hourly",
28
- WEEKLY = "weekly",
29
- YEARLY = "yearly",
30
- NEVER = "never"
98
+ DAILY = "daily",
99
+ MONTHLY = "monthly",
100
+ ALWAYS = "always",
101
+ HOURLY = "hourly",
102
+ WEEKLY = "weekly",
103
+ YEARLY = "yearly",
104
+ NEVER = "never"
31
105
  }
32
106
  /**
33
107
  * https://support.google.com/webmasters/answer/74288?hl=en&ref_topic=4581190
34
108
  */
35
109
  interface NewsItem {
36
- access?: 'Registration' | 'Subscription';
37
- publication: {
38
- name: string;
39
- /**
40
- * The `<language>` is the language of your publication. Use an ISO 639
41
- * language code (2 or 3 letters).
42
- */
43
- language: string;
44
- };
45
- /**
46
- * @example 'PressRelease, Blog'
47
- */
48
- genres?: string;
49
- /**
50
- * Article publication date in W3C format, using either the "complete date" (YYYY-MM-DD) format or the "complete date
51
- * plus hours, minutes, and seconds"
52
- */
53
- publication_date: string;
110
+ access?: 'Registration' | 'Subscription';
111
+ publication: {
112
+ name: string;
54
113
  /**
55
- * The title of the news article
56
- * @example 'Companies A, B in Merger Talks'
114
+ * The `<language>` is the language of your publication. Use an ISO 639
115
+ * language code (2 or 3 letters).
57
116
  */
58
- title: string;
59
- /**
60
- * @example 'business, merger, acquisition'
61
- */
62
- keywords?: string;
63
- /**
64
- * @example 'NASDAQ:A, NASDAQ:B'
65
- */
66
- stock_tickers?: string;
117
+ language: string;
118
+ };
119
+ /**
120
+ * @example 'PressRelease, Blog'
121
+ */
122
+ genres?: string;
123
+ /**
124
+ * Article publication date in W3C format, using either the "complete date" (YYYY-MM-DD) format or the "complete date
125
+ * plus hours, minutes, and seconds"
126
+ */
127
+ publication_date: string;
128
+ /**
129
+ * The title of the news article
130
+ * @example 'Companies A, B in Merger Talks'
131
+ */
132
+ title: string;
133
+ /**
134
+ * @example 'business, merger, acquisition'
135
+ */
136
+ keywords?: string;
137
+ /**
138
+ * @example 'NASDAQ:A, NASDAQ:B'
139
+ */
140
+ stock_tickers?: string;
67
141
  }
68
142
  /**
69
143
  * Sitemap Image
70
144
  * https://support.google.com/webmasters/answer/178636?hl=en&ref_topic=4581190
71
145
  */
72
146
  interface Img {
73
- /**
74
- * The URL of the image
75
- * @example 'https://example.com/image.jpg'
76
- */
77
- url: string;
78
- /**
79
- * The caption of the image
80
- * @example 'Thanksgiving dinner'
81
- */
82
- caption?: string;
83
- /**
84
- * The title of the image
85
- * @example 'Star Wars EP IV'
86
- */
87
- title?: string;
88
- /**
89
- * The geographic location of the image.
90
- * @example 'Limerick, Ireland'
91
- */
92
- geoLocation?: string;
93
- /**
94
- * A URL to the license of the image.
95
- * @example 'https://example.com/license.txt'
96
- */
97
- license?: string;
147
+ /**
148
+ * The URL of the image
149
+ * @example 'https://example.com/image.jpg'
150
+ */
151
+ url: string;
152
+ /**
153
+ * The caption of the image
154
+ * @example 'Thanksgiving dinner'
155
+ */
156
+ caption?: string;
157
+ /**
158
+ * The title of the image
159
+ * @example 'Star Wars EP IV'
160
+ */
161
+ title?: string;
162
+ /**
163
+ * The geographic location of the image.
164
+ * @example 'Limerick, Ireland'
165
+ */
166
+ geoLocation?: string;
167
+ /**
168
+ * A URL to the license of the image.
169
+ * @example 'https://example.com/license.txt'
170
+ */
171
+ license?: string;
98
172
  }
99
173
  /**
100
174
  * https://support.google.com/webmasters/answer/189077
101
175
  */
102
176
  interface LinkItem {
103
- /**
104
- * @example 'en'
105
- */
106
- lang: string;
107
- /**
108
- * @example 'en-us'
109
- */
110
- hreflang?: string;
111
- url: string;
177
+ /**
178
+ * @example 'en'
179
+ */
180
+ lang: string;
181
+ /**
182
+ * @example 'en-us'
183
+ */
184
+ hreflang?: string;
185
+ url: string;
112
186
  }
113
187
  /**
114
188
  * How to handle errors in passed in urls
115
189
  */
116
190
  declare enum ErrorLevel {
117
- /**
118
- * Validation will be skipped and nothing logged or thrown.
119
- */
120
- SILENT = "silent",
121
- /**
122
- * If an invalid value is encountered, a console.warn will be called with details
123
- */
124
- WARN = "warn",
125
- /**
126
- * An Error will be thrown on encountering invalid data.
127
- */
128
- THROW = "throw"
191
+ /**
192
+ * Validation will be skipped and nothing logged or thrown.
193
+ */
194
+ SILENT = "silent",
195
+ /**
196
+ * If an invalid value is encountered, a console.warn will be called with details
197
+ */
198
+ WARN = "warn",
199
+ /**
200
+ * An Error will be thrown on encountering invalid data.
201
+ */
202
+ THROW = "throw"
129
203
  }
130
- declare type ErrorHandler$1 = (error: Error, level: ErrorLevel) => void;
131
-
204
+ type ErrorHandler$1 = (error: Error, level: ErrorLevel) => void;
205
+ //#endregion
206
+ //#region node_modules/.pnpm/sitemap@9.0.1/node_modules/sitemap/dist/esm/lib/sitemap-stream.d.ts
132
207
  interface NSArgs {
133
- news: boolean;
134
- video: boolean;
135
- xhtml: boolean;
136
- image: boolean;
137
- custom?: string[];
208
+ news: boolean;
209
+ video: boolean;
210
+ xhtml: boolean;
211
+ image: boolean;
212
+ custom?: string[];
138
213
  }
139
214
  interface SitemapStreamOptions extends TransformOptions {
140
- hostname?: string;
141
- level?: ErrorLevel;
142
- lastmodDateOnly?: boolean;
143
- xmlns?: NSArgs;
144
- xslUrl?: string;
145
- errorHandler?: ErrorHandler$1;
215
+ hostname?: string;
216
+ level?: ErrorLevel;
217
+ lastmodDateOnly?: boolean;
218
+ xmlns?: NSArgs;
219
+ xslUrl?: string;
220
+ errorHandler?: ErrorHandler$1;
221
+ }
222
+ //#endregion
223
+ //#region src/node/plugin.d.ts
224
+ declare module 'vite' {
225
+ interface UserConfig {
226
+ vitepress?: SiteConfig;
227
+ }
146
228
  }
147
-
229
+ //#endregion
230
+ //#region src/node/build/generateSitemap.d.ts
148
231
  interface SitemapItem {
149
- lastmod?: string | number | Date;
150
- changefreq?: `${EnumChangefreq}`;
151
- fullPrecisionPriority?: boolean;
152
- priority?: number;
153
- news?: NewsItem;
154
- expires?: string;
155
- androidLink?: string;
156
- ampLink?: string;
157
- url: string;
158
- video?: any;
159
- img?: string | Img | (string | Img)[];
160
- links?: LinkItem[];
161
- lastmodfile?: string | Buffer | URL;
162
- lastmodISO?: string;
163
- lastmodrealtime?: boolean;
164
- }
165
-
166
- type Validate = (text: string, pos: number, self: LinkifyIt) => number | boolean;
167
-
168
- interface FullRule {
169
- validate: string | RegExp | Validate;
170
- normalize?: ((match: Match) => void) | undefined;
232
+ lastmod?: string | number | Date;
233
+ changefreq?: `${EnumChangefreq}`;
234
+ fullPrecisionPriority?: boolean;
235
+ priority?: number;
236
+ news?: NewsItem;
237
+ expires?: string;
238
+ androidLink?: string;
239
+ ampLink?: string;
240
+ url: string;
241
+ video?: any;
242
+ img?: string | Img | (string | Img)[];
243
+ links?: LinkItem[];
244
+ lastmodfile?: string | Buffer | URL;
245
+ lastmodISO?: string;
246
+ lastmodrealtime?: boolean;
247
+ }
248
+ //#endregion
249
+ //#region node_modules/.pnpm/@mdit-vue+plugin-component@3.0.2/node_modules/@mdit-vue/plugin-component/dist/index.d.ts
250
+ //#region src/types.d.ts
251
+ /**
252
+ * Options of @mdit-vue/plugin-component
253
+ */
254
+ interface ComponentPluginOptions {
255
+ /**
256
+ * Extra tags to be treated as block tags.
257
+ *
258
+ * @default []
259
+ */
260
+ blockTags?: string[];
261
+ /**
262
+ * Extra tags to be treated as inline tags.
263
+ *
264
+ * @default []
265
+ */
266
+ inlineTags?: string[];
171
267
  }
172
-
173
- type Rule = string | FullRule;
174
-
268
+ //#endregion
269
+ //#region node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/gray-matter.d.ts
175
270
  /**
176
- * An object, where each key/value describes protocol/rule:
271
+ * Takes a string or object with `content` property, extracts
272
+ * and parses front-matter from the string, then returns an object
273
+ * with `data`, `content` and other [useful properties](#returned-object).
177
274
  *
178
- * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`
179
- * for example). `linkify-it` makes sure that prefix is not preceded with
180
- * alphanumeric char and symbols. Only whitespaces and punctuation allowed.
181
- * - __value__ - rule to check tail after link prefix
182
- * - _String_ - just alias to existing rule
183
- * - _Object_
184
- * - _validate_ - validator function (should return matched length on success),
185
- * or `RegExp`.
186
- * - _normalize_ - optional function to normalize text & url of matched result
187
- * (for example, for `@twitter` mentions).
275
+ * ```js
276
+ * var matter = require('gray-matter');
277
+ * console.log(matter('---\ntitle: Home\n---\nOther stuff'));
278
+ * //=> { data: { title: 'Home'}, content: 'Other stuff' }
279
+ * ```
280
+ * @param {Object|String} `input` String, or object with `content` string
281
+ * @param {Object} `options`
282
+ * @return {Object}
283
+ * @api public
188
284
  */
189
- interface SchemaRules {
190
- [schema: string]: Rule;
191
- }
192
-
193
- interface Options$3 {
194
- /**
195
- * recognize URL-s without `http(s):` prefix. Default `true`.
196
- */
197
- fuzzyLink?: boolean | undefined;
198
- /**
199
- * allow IPs in fuzzy links above. Can conflict with some texts
200
- * like version numbers. Default `false`.
201
- */
202
- fuzzyIP?: boolean | undefined;
203
- /**
204
- * recognize emails without `mailto:` prefix. Default `true`.
205
- */
206
- fuzzyEmail?: boolean | undefined;
285
+ declare function matter<I extends matter.Input, O extends matter.GrayMatterOption<I, O>>(input: I | {
286
+ content: I;
287
+ }, options?: O): matter.GrayMatterFile<I>;
288
+ declare namespace matter {
289
+ type Input = string | Buffer;
290
+ interface GrayMatterOption<I extends Input, O extends GrayMatterOption<I, O>> {
291
+ parser?: () => void;
292
+ eval?: boolean;
293
+ excerpt?: boolean | ((input: I, options: O) => string);
294
+ excerpt_separator?: string;
295
+ engines?: {
296
+ [index: string]: ((input: string) => object) | {
297
+ parse: (input: string) => object;
298
+ stringify?: (data: object) => string;
299
+ };
300
+ };
301
+ language?: string;
302
+ delimiters?: string | [string, string];
303
+ }
304
+ interface GrayMatterFile<I extends Input> {
305
+ data: {
306
+ [key: string]: any;
307
+ };
308
+ content: string;
309
+ excerpt?: string;
310
+ orig: Buffer | I;
311
+ language: string;
312
+ matter: string;
313
+ stringify(lang: string): string;
314
+ }
315
+ /**
316
+ * Stringify an object to YAML or the specified language, and
317
+ * append it to the given string. By default, only YAML and JSON
318
+ * can be stringified. See the [engines](#engines) section to learn
319
+ * how to stringify other languages.
320
+ *
321
+ * ```js
322
+ * console.log(matter.stringify('foo bar baz', {title: 'Home'}));
323
+ * // results in:
324
+ * // ---
325
+ * // title: Home
326
+ * // ---
327
+ * // foo bar baz
328
+ * ```
329
+ * @param {String|Object} `file` The content string to append to stringified front-matter, or a file object with `file.content` string.
330
+ * @param {Object} `data` Front matter to stringify.
331
+ * @param {Object} `options` [Options](#options) to pass to gray-matter and [js-yaml].
332
+ * @return {String} Returns a string created by wrapping stringified yaml with delimiters, and appending that to the given string.
333
+ */
334
+ export function stringify<O extends GrayMatterOption<string, O>>(file: string | {
335
+ content: string;
336
+ }, data: object, options?: GrayMatterOption<string, O>): string;
337
+ /**
338
+ * Synchronously read a file from the file system and parse
339
+ * front matter. Returns the same object as the [main function](#matter).
340
+ *
341
+ * ```js
342
+ * var file = matter.read('./content/blog-post.md');
343
+ * ```
344
+ * @param {String} `filepath` file path of the file to read.
345
+ * @param {Object} `options` [Options](#options) to pass to gray-matter.
346
+ * @return {Object} Returns [an object](#returned-object) with `data` and `content`
347
+ */
348
+ export function read<O extends GrayMatterOption<string, O>>(fp: string, options?: GrayMatterOption<string, O>): matter.GrayMatterFile<string>;
349
+ /**
350
+ * Returns true if the given `string` has front matter.
351
+ * @param {String} `string`
352
+ * @param {Object} `options`
353
+ * @return {Boolean} True if front matter exists.
354
+ */
355
+ export function test<O extends matter.GrayMatterOption<string, O>>(str: string, options?: GrayMatterOption<string, O>): boolean;
356
+ /**
357
+ * Detect the language to use, if one is defined after the
358
+ * first front-matter delimiter.
359
+ * @param {String} `string`
360
+ * @param {Object} `options`
361
+ * @return {Object} Object with `raw` (actual language string), and `name`, the language with whitespace trimmed
362
+ */
363
+ export function language<O extends matter.GrayMatterOption<string, O>>(str: string, options?: GrayMatterOption<string, O>): {
364
+ name: string;
365
+ raw: string;
366
+ };
207
367
  }
208
-
368
+ //#endregion
369
+ //#region node_modules/.pnpm/@mdit-vue+plugin-frontmatter@3.0.2/node_modules/@mdit-vue/plugin-frontmatter/dist/index.d.ts
370
+ //#region src/types.d.ts
371
+ type GrayMatterOptions = matter.GrayMatterOption<string, GrayMatterOptions>;
209
372
  /**
210
- * Match result. Single element of array, returned by {@link LinkifyIt#match}.
373
+ * Options of @mdit-vue/plugin-frontmatter
211
374
  */
212
- declare class Match {
213
- constructor(self: LinkifyIt, shift: number);
214
-
215
- /**
216
- * First position of matched string.
217
- */
218
- index: number;
219
- /**
220
- * Next position after matched string.
221
- */
222
- lastIndex: number;
223
- /**
224
- * Matched string.
225
- */
226
- raw: string;
227
- /**
228
- * Prefix (protocol) for matched string.
229
- */
230
- schema: string;
231
- /**
232
- * Normalized text of matched string.
233
- */
234
- text: string;
235
- /**
236
- * Normalized url of matched string.
237
- */
238
- url: string;
375
+ interface FrontmatterPluginOptions {
376
+ /**
377
+ * Options of gray-matter
378
+ *
379
+ * @see https://github.com/jonschlinkert/gray-matter#options
380
+ */
381
+ grayMatterOptions?: GrayMatterOptions;
382
+ /**
383
+ * Render the excerpt or not
384
+ *
385
+ * @default true
386
+ */
387
+ renderExcerpt?: boolean;
239
388
  }
240
-
241
-
242
- declare class LinkifyIt {
243
- /**
244
- * new LinkifyIt(schemas, options)
245
- * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)
246
- * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
247
- *
248
- * Creates new linkifier instance with optional additional schemas.
249
- * Can be called without `new` keyword for convenience.
250
- *
251
- * By default understands:
252
- *
253
- * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links
254
- * - "fuzzy" links and emails (example.com, foo@bar.com).
255
- */
256
- constructor(schemas?: SchemaRules | Options$3, options?: Options$3);
257
-
258
- // Use overloads to provide contextual typing to `FullRule.normalize`, which is ambiguous with string.normalize
259
- /**
260
- * Add new rule definition. See constructor description for details.
261
- *
262
- * @param schema rule name (fixed pattern prefix)
263
- * @param definition schema definition
264
- */
265
- add(schema: string, definition: string): this;
266
- add(schema: string, definition: FullRule | null): this;
267
-
268
- /**
269
- * Set recognition options for links without schema.
270
- */
271
- set(options: Options$3): this;
272
-
273
- /**
274
- * Searches linkifiable pattern and returns `true` on success or `false` on fail.
275
- */
276
- test(text: string): boolean;
277
-
278
- /**
279
- * Very quick check, that can give false positives. Returns true if link MAY BE
280
- * can exists. Can be used for speed optimization, when you need to check that
281
- * link NOT exists.
282
- */
283
- pretest(text: string): boolean;
284
-
285
- /**
286
- * Similar to {@link LinkifyIt#test} but checks only specific protocol tail exactly
287
- * at given position. Returns length of found pattern (0 on fail).
288
- *
289
- * @param text text to scan
290
- * @param schema rule (schema) name
291
- * @param pos text offset to check from
292
- */
293
- testSchemaAt(text: string, schema: string, pos: number): number;
294
-
295
- /**
296
- * Returns array of found link descriptions or `null` on fail. We strongly
297
- * recommend to use {@link LinkifyIt#test} first, for best speed.
298
- */
299
- match(text: string): Match[] | null;
300
-
389
+ declare module '@mdit-vue/types' {
390
+ interface MarkdownItEnv {
301
391
  /**
302
- * Returns fully-formed (not fuzzy) link if it starts at the beginning
303
- * of the string, and null otherwise.
392
+ * The raw Markdown content without frontmatter
304
393
  */
305
- matchAtStart(text: string): Match | null;
306
-
394
+ content?: string;
307
395
  /**
308
- * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)
309
- * to avoid false positives. By default this algorythm used:
396
+ * The excerpt that extracted by `@mdit-vue/plugin-frontmatter`
310
397
  *
311
- * - hostname with any 2-letter root zones are ok.
312
- * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф
313
- * are ok.
314
- * - encoded (`xn--...`) root zones are ok.
315
- *
316
- * If list is replaced, then exact match for 2-chars root zones will be checked.
317
- *
318
- * @param list list of tlds
319
- * @param keepOld merge with current list if `true` (`false` by default)
320
- */
321
- tlds(list: string | string[], keepOld?: boolean): this;
322
-
323
- /**
324
- * Default normalizer (if schema does not define it's own).
398
+ * - Would be the rendered HTML when `renderExcerpt` is enabled
399
+ * - Would be the raw Markdown when `renderExcerpt` is disabled
325
400
  */
326
- normalize(match: Match): void;
327
-
401
+ excerpt?: string;
328
402
  /**
329
- * Override to modify basic RegExp-s.
403
+ * The frontmatter that extracted by `@mdit-vue/plugin-frontmatter`
330
404
  */
331
- onCompile(): void;
332
-
333
- re: {
334
- [key: string]: RegExp;
335
- };
405
+ frontmatter?: Record<string, unknown>;
406
+ }
336
407
  }
337
-
338
- declare const decode: {
339
- defaultChars: string;
340
- componentChars: string;
341
- /**
342
- * Decode percent-encoded string.
343
- */
344
- (str: string, exclude?: string): string;
345
- };
346
-
347
- declare const encode: {
348
- defaultChars: string;
349
- componentChars: string;
408
+ //#endregion
409
+ //#region node_modules/.pnpm/@mdit-vue+types@3.0.2/node_modules/@mdit-vue/types/dist/index.d.ts
410
+ interface MarkdownItHeader {
411
+ /**
412
+ * The level of the header
413
+ *
414
+ * `1` to `6` for `<h1>` to `<h6>`
415
+ */
416
+ level: number;
417
+ /**
418
+ * The title of the header
419
+ */
420
+ title: string;
421
+ /**
422
+ * The slug of the header
423
+ *
424
+ * Typically the `id` attr of the header anchor
425
+ */
426
+ slug: string;
427
+ /**
428
+ * Link of the header
429
+ *
430
+ * Typically using `#${slug}` as the anchor hash
431
+ */
432
+ link: string;
433
+ /**
434
+ * The children of the header
435
+ */
436
+ children: MarkdownItHeader[];
437
+ }
438
+ //#endregion
439
+ //#region node_modules/.pnpm/@mdit-vue+plugin-headers@3.0.2/node_modules/@mdit-vue/plugin-headers/dist/index.d.ts
440
+ //#region src/types.d.ts
441
+ /**
442
+ * Options of @mdit-vue/plugin-headers
443
+ */
444
+ interface HeadersPluginOptions {
445
+ /**
446
+ * A custom slugification function
447
+ *
448
+ * Should use the same slugify function with markdown-it-anchor
449
+ * to ensure the link is matched
450
+ */
451
+ slugify?: (str: string) => string;
452
+ /**
453
+ * A function for formatting header title
454
+ */
455
+ format?: (str: string) => string;
456
+ /**
457
+ * Heading level that going to be extracted
458
+ *
459
+ * Should be a subset of markdown-it-anchor's `level` option
460
+ * to ensure the slug is existed
461
+ *
462
+ * @default [2,3]
463
+ */
464
+ level?: number[];
465
+ /**
466
+ * Should allow headers inside nested blocks or not
467
+ *
468
+ * If set to `true`, headers inside blockquote, list, etc. would also be extracted.
469
+ *
470
+ * @default false
471
+ */
472
+ shouldAllowNested?: boolean;
473
+ }
474
+ declare module '@mdit-vue/types' {
475
+ interface MarkdownItEnv {
350
476
  /**
351
- * Encode unsafe characters with percent-encoding, skipping already
352
- * encoded sequences.
353
- *
354
- * @param str string to encode
355
- * @param exclude list of characters to ignore (in addition to a-zA-Z0-9)
356
- * @param keepEscaped don't encode '%' in a correct escape sequence (default: true)
477
+ * The headers that extracted by `@mdit-vue/plugin-headers`
357
478
  */
358
- (str: string, exclude?: string, keepEscaped?: boolean): string;
359
- };
360
-
361
- declare class _Url {
362
- protocol: string;
363
- slashes: string;
364
- auth: string;
365
- port: string;
366
- hostname: string;
367
- hash: string;
368
- search: string;
369
- pathname: string;
370
-
371
- constructor();
372
-
373
- parse(url: string, slashesDenoteHost?: boolean): this;
374
- parseHost(host: string): void;
375
- }
376
-
377
- type Url = _Url;
378
-
379
- declare function parse(url: string | Url, slashesDenoteHost?: boolean): Url;
380
-
381
- declare function format(url: Omit<Url, "parse" | "parseHost">): string;
382
-
383
- type mdurl_Url = Url;
384
- declare const mdurl_decode: typeof decode;
385
- declare const mdurl_encode: typeof encode;
386
- declare const mdurl_format: typeof format;
387
- declare const mdurl_parse: typeof parse;
388
- declare namespace mdurl {
389
- export { type mdurl_Url as Url, mdurl_decode as decode, mdurl_encode as encode, mdurl_format as format, mdurl_parse as parse };
479
+ headers?: MarkdownItHeader[];
480
+ }
390
481
  }
391
-
392
- // import * as ucmicro from "uc.micro";
393
-
394
- declare const lib: {
395
- mdurl: typeof mdurl;
396
- ucmicro: any;
397
- };
398
-
482
+ //#endregion
483
+ //#region node_modules/.pnpm/@mdit-vue+plugin-sfc@3.0.2/node_modules/@mdit-vue/plugin-sfc/dist/index.d.ts
484
+ //#endregion
485
+ //#region src/types.d.ts
399
486
  /**
400
- * Merge objects
487
+ * Options of @mdit-vue/plugin-sfc
401
488
  */
402
- declare function assign(obj: any, ...from: any[]): any;
403
-
404
- declare function isString(obj: any): obj is string;
405
-
406
- declare function has(obj: any, key: keyof any): boolean;
407
-
408
- declare function unescapeMd(str: string): string;
409
-
410
- declare function unescapeAll(str: string): string;
411
-
412
- declare function isValidEntityCode(c: number): boolean;
413
-
414
- declare function fromCodePoint(c: number): string;
415
-
416
- declare function escapeHtml(str: string): string;
417
-
489
+ interface SfcPluginOptions {
490
+ /**
491
+ * Custom blocks to be extracted
492
+ *
493
+ * @default []
494
+ */
495
+ customBlocks?: string[];
496
+ }
418
497
  /**
419
- * Remove element from array and put another array at those position.
420
- * Useful for some operations with tokens
498
+ * SFC block that extracted from markdown
421
499
  */
422
- declare function arrayReplaceAt<T>(src: T[], pos: number, newElements: T[]): T[];
423
-
424
- declare function isSpace(code: number): boolean;
425
-
500
+ interface SfcBlock {
501
+ /**
502
+ * The type of the block
503
+ */
504
+ type: string;
505
+ /**
506
+ * The content, including open-tag and close-tag
507
+ */
508
+ content: string;
509
+ /**
510
+ * The content that stripped open-tag and close-tag off
511
+ */
512
+ contentStripped: string;
513
+ /**
514
+ * The open-tag
515
+ */
516
+ tagOpen: string;
517
+ /**
518
+ * The close-tag
519
+ */
520
+ tagClose: string;
521
+ }
522
+ interface MarkdownSfcBlocks {
523
+ /**
524
+ * The `<template>` block
525
+ */
526
+ template: SfcBlock | null;
527
+ /**
528
+ * The common `<script>` block
529
+ */
530
+ script: SfcBlock | null;
531
+ /**
532
+ * The `<script setup>` block
533
+ */
534
+ scriptSetup: SfcBlock | null;
535
+ /**
536
+ * All `<script>` blocks.
537
+ *
538
+ * By default, SFC only allows one `<script>` block and one `<script setup>` block.
539
+ * However, some tools may support different types of `<script>`s, so we keep all of them here.
540
+ */
541
+ scripts: SfcBlock[];
542
+ /**
543
+ * All `<style>` blocks.
544
+ */
545
+ styles: SfcBlock[];
546
+ /**
547
+ * All custom blocks.
548
+ */
549
+ customBlocks: SfcBlock[];
550
+ }
551
+ declare module '@mdit-vue/types' {
552
+ interface MarkdownItEnv {
553
+ /**
554
+ * SFC blocks that extracted by `@mdit-vue/plugin-sfc`
555
+ */
556
+ sfcBlocks?: MarkdownSfcBlocks;
557
+ }
558
+ }
559
+ //#endregion
560
+ //#region node_modules/.pnpm/@mdit-vue+plugin-toc@3.0.2/node_modules/@mdit-vue/plugin-toc/dist/index.d.ts
561
+ //#region src/types.d.ts
426
562
  /**
427
- * Zs (unicode class) || [\t\f\v\r\n]
563
+ * Options of @mdit-vue/plugin-toc
428
564
  */
429
- declare function isWhiteSpace(code: number): boolean;
430
-
565
+ interface TocPluginOptions {
566
+ /**
567
+ * The pattern serving as the TOC placeholder in your markdown
568
+ *
569
+ * @default /^\[\[toc\]\]$/i
570
+ */
571
+ pattern?: RegExp;
572
+ /**
573
+ * A custom slugification function
574
+ *
575
+ * Should use the same slugify function with markdown-it-anchor
576
+ * to ensure the link is matched
577
+ */
578
+ slugify?: (str: string) => string;
579
+ /**
580
+ * A function for formatting headings
581
+ */
582
+ format?: (str: string) => string;
583
+ /**
584
+ * Heading level that going to be included in the TOC
585
+ *
586
+ * Should be a subset of markdown-it-anchor's `level` option
587
+ * to ensure the link is existed
588
+ *
589
+ * @default [2,3]
590
+ */
591
+ level?: number[];
592
+ /**
593
+ * Should allow headers inside nested blocks or not
594
+ *
595
+ * If set to `true`, headers inside blockquote, list, etc. would also be included.
596
+ *
597
+ * @default false
598
+ */
599
+ shouldAllowNested?: boolean;
600
+ /**
601
+ * HTML tag of the TOC container
602
+ *
603
+ * @default 'nav'
604
+ */
605
+ containerTag?: string;
606
+ /**
607
+ * The class for the TOC container
608
+ *
609
+ * @default 'table-of-contents'
610
+ */
611
+ containerClass?: string;
612
+ /**
613
+ * HTML tag of the TOC list
614
+ *
615
+ * @default 'ul'
616
+ */
617
+ listTag?: 'ol' | 'ul';
618
+ /**
619
+ * The class for the TOC list
620
+ *
621
+ * @default ''
622
+ */
623
+ listClass?: string;
624
+ /**
625
+ * The class for the `<li>` tag
626
+ *
627
+ * @default ''
628
+ */
629
+ itemClass?: string;
630
+ /**
631
+ * The tag of the link inside `<li>` tag
632
+ *
633
+ * @default 'a'
634
+ */
635
+ linkTag?: 'a' | 'router-link';
636
+ /**
637
+ * The class for the link inside the `<li>` tag
638
+ *
639
+ * @default ''
640
+ */
641
+ linkClass?: string;
642
+ }
643
+ //#endregion
644
+ //#region node_modules/.pnpm/@mdit+plugin-anchor@1.1.3_markdown-it@14.3.2/node_modules/@mdit/plugin-anchor/dist/index.d.ts
431
645
  /**
432
- * Markdown ASCII punctuation characters.
646
+ * Permalink generator function
433
647
  *
434
- * !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
435
- *
436
- * Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
437
- *
438
- * @see http://spec.commonmark.org/0.15/#ascii-punctuation-character
648
+ * 永久链接生成器函数
439
649
  */
440
- declare function isMdAsciiPunct(code: number): boolean;
441
-
650
+ type PermalinkGenerator = (slug: string, options: ResolvedAnchorOptions, state: StateCore, index: number) => void;
651
+ //#endregion
652
+ //#region src/options.d.ts
442
653
  /**
443
- * Currently without astral characters support.
654
+ * Information about a heading anchor
655
+ *
656
+ * 标题锚点信息
444
657
  */
445
- declare function isPunctChar(ch: string): boolean;
446
-
447
- declare function escapeRE(str: string): string;
448
-
658
+ interface AnchorInfo {
659
+ /**
660
+ * Generated slug
661
+ *
662
+ * 生成的 slug
663
+ */
664
+ slug: string;
665
+ /**
666
+ * Original heading title
667
+ *
668
+ * 原始标题文本
669
+ */
670
+ title: string;
671
+ }
449
672
  /**
450
- * Helper to unify [reference labels].
673
+ * Options for the anchor plugin
674
+ *
675
+ * 锚点插件选项
451
676
  */
452
- declare function normalizeReference(str: string): string;
453
-
454
- declare const utils_arrayReplaceAt: typeof arrayReplaceAt;
455
- declare const utils_assign: typeof assign;
456
- declare const utils_escapeHtml: typeof escapeHtml;
457
- declare const utils_escapeRE: typeof escapeRE;
458
- declare const utils_fromCodePoint: typeof fromCodePoint;
459
- declare const utils_has: typeof has;
460
- declare const utils_isMdAsciiPunct: typeof isMdAsciiPunct;
461
- declare const utils_isPunctChar: typeof isPunctChar;
462
- declare const utils_isSpace: typeof isSpace;
463
- declare const utils_isString: typeof isString;
464
- declare const utils_isValidEntityCode: typeof isValidEntityCode;
465
- declare const utils_isWhiteSpace: typeof isWhiteSpace;
466
- declare const utils_lib: typeof lib;
467
- declare const utils_normalizeReference: typeof normalizeReference;
468
- declare const utils_unescapeAll: typeof unescapeAll;
469
- declare const utils_unescapeMd: typeof unescapeMd;
470
- declare namespace utils {
471
- export { utils_arrayReplaceAt as arrayReplaceAt, utils_assign as assign, utils_escapeHtml as escapeHtml, utils_escapeRE as escapeRE, utils_fromCodePoint as fromCodePoint, utils_has as has, utils_isMdAsciiPunct as isMdAsciiPunct, utils_isPunctChar as isPunctChar, utils_isSpace as isSpace, utils_isString as isString, utils_isValidEntityCode as isValidEntityCode, utils_isWhiteSpace as isWhiteSpace, utils_lib as lib, utils_normalizeReference as normalizeReference, utils_unescapeAll as unescapeAll, utils_unescapeMd as unescapeMd };
472
- }
473
-
474
- interface ParseLinkDestinationResult {
475
- ok: boolean;
476
- pos: number;
477
- str: string;
478
- }
479
-
480
- declare function parseLinkDestination(str: string, start: number, max: number): ParseLinkDestinationResult;
481
-
482
- type Nesting = 1 | 0 | -1;
483
-
484
- declare class Token {
485
- /**
486
- * Create new token and fill passed properties.
487
- */
488
- constructor(type: string, tag: string, nesting: Nesting);
489
-
490
- /**
491
- * Type of the token, e.g. "paragraph_open"
492
- */
493
- type: string;
494
-
495
- /**
496
- * HTML tag name, e.g. "p"
497
- */
498
- tag: string;
499
-
500
- /**
501
- * HTML attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`
502
- */
503
- attrs: Array<[string, string]> | null;
504
-
505
- /**
506
- * Source map info. Format: `[ line_begin, line_end ]`
507
- */
508
- map: [number, number] | null;
509
-
510
- /**
511
- * Level change (number in {-1, 0, 1} set), where:
512
- *
513
- * - `1` means the tag is opening
514
- * - `0` means the tag is self-closing
515
- * - `-1` means the tag is closing
516
- */
517
- nesting: Nesting;
518
-
519
- /**
520
- * Nesting level, the same as `state.level`
521
- */
522
- level: number;
523
-
524
- /**
525
- * An array of child nodes (inline and img tokens)
526
- */
527
- children: Token[] | null;
528
-
529
- /**
530
- * In a case of self-closing tag (code, html, fence, etc.),
531
- * it has contents of this tag.
532
- */
533
- content: string;
534
-
535
- /**
536
- * '*' or '_' for emphasis, fence string for fence, etc.
537
- */
538
- markup: string;
539
-
540
- /**
541
- * - Info string for "fence" tokens
542
- * - The value "auto" for autolink "link_open" and "link_close" tokens
543
- * - The string value of the item marker for ordered-list "list_item_open" tokens
544
- */
545
- info: string;
546
-
547
- /**
548
- * A place for plugins to store an arbitrary data
549
- */
550
- meta: any;
551
-
552
- /**
553
- * True for block-level tokens, false for inline tokens.
554
- * Used in renderer to calculate line breaks
555
- */
556
- block: boolean;
557
-
558
- /**
559
- * If it's true, ignore this element when rendering. Used for tight lists
560
- * to hide paragraphs.
561
- */
562
- hidden: boolean;
563
-
564
- /**
565
- * Search attribute index by name.
566
- */
567
- attrIndex(name: string): number;
568
-
569
- /**
570
- * Add `[ name, value ]` attribute to list. Init attrs if necessary
571
- */
572
- attrPush(attrData: [string, string]): void;
573
-
574
- /**
575
- * Set `name` attribute to `value`. Override old value if exists.
576
- */
577
- attrSet(name: string, value: string): void;
578
-
579
- /**
580
- * Get the value of attribute `name`, or null if it does not exist.
581
- */
582
- attrGet(name: string): string | null;
583
-
584
- /**
585
- * Join value to existing attribute via space. Or create new attribute if not
586
- * exists. Useful to operate with token classes.
587
- */
588
- attrJoin(name: string, value: string): void;
589
- }
590
-
591
- interface Scanned {
592
- can_open: boolean;
593
- can_close: boolean;
594
- length: number;
677
+ interface AnchorOptions {
678
+ /**
679
+ * Heading levels to add anchors to (array or minimum level)
680
+ *
681
+ * 要添加锚点的标题级别(数组或最低级别)
682
+ *
683
+ * @default 1
684
+ */
685
+ level?: number | number[];
686
+ /**
687
+ * Function to generate slugs from heading text
688
+ *
689
+ * 从标题文本生成 slug 的函数
690
+ */
691
+ slugify?: (str: string) => string;
692
+ /**
693
+ * Function to generate slugs with access to state
694
+ *
695
+ * 可访问 state 的生成 slug 函数
696
+ */
697
+ slugifyWithState?: (str: string, state: StateCore) => string;
698
+ /**
699
+ * Function to extract text from tokens
700
+ *
701
+ * 从 token 中提取文本的函数
702
+ */
703
+ getTokensText?: (tokens: Token[]) => string;
704
+ /**
705
+ * Starting index for unique slug numbering
706
+ *
707
+ * 唯一 slug 编号的起始索引
708
+ *
709
+ * @default 1
710
+ */
711
+ uniqueSlugStartIndex?: number;
712
+ /**
713
+ * Permalink generator function
714
+ *
715
+ * 永久链接生成器函数
716
+ */
717
+ permalink?: PermalinkGenerator;
718
+ /**
719
+ * Callback invoked for each heading with anchor info
720
+ *
721
+ * 每个标题添加锚点后调用的回调
722
+ */
723
+ callback?: (token: Token, anchorInfo: AnchorInfo) => void;
724
+ /**
725
+ * Value of the `tabindex` attribute on headings, set to `false` to disable
726
+ *
727
+ * 标题上 `tabindex` 属性的值,设为 `false` 禁用
728
+ *
729
+ * @default "-1"
730
+ */
731
+ tabIndex?: string | number | false;
595
732
  }
596
-
597
- interface Delimiter {
598
- marker: number;
599
- length: number;
600
- token: number;
601
- end: number;
602
- open: boolean;
603
- close: boolean;
733
+ /**
734
+ * Anchor options with defaults applied, as received by permalink generators
735
+ *
736
+ * 应用默认值后的锚点选项,即永久链接生成器接收到的选项
737
+ */
738
+ type ResolvedAnchorOptions = AnchorOptions & Required<Pick<AnchorOptions, "getTokensText" | "level" | "slugify" | "tabIndex" | "uniqueSlugStartIndex">>;
739
+ //#endregion
740
+ //#region node_modules/.pnpm/@mdit+plugin-attrs@1.1.1_markdown-it@14.3.2/node_modules/@mdit/plugin-attrs/dist/index.d.ts
741
+ //#region src/helper/types.d.ts
742
+ interface AllowedAttrEntry {
743
+ /**
744
+ * Attribute name, supports string or RegExp
745
+ *
746
+ * 属性名,支持字符串或正则
747
+ */
748
+ name: string | RegExp;
749
+ /**
750
+ * Allowed attribute values, supports string or RegExp array
751
+ *
752
+ * Empty or omitted means allowing any value
753
+ *
754
+ * 允许的属性值,支持字符串或正则数组
755
+ *
756
+ * 空数组或省略表示允许任意值
757
+ */
758
+ value?: (string | RegExp)[];
604
759
  }
605
-
606
- interface TokenMeta {
607
- delimiters: Delimiter[];
760
+ type AllowedAttrs = (string | RegExp)[] | AllowedAttrEntry[];
761
+ /**
762
+ * Normalized attribute filter for fast matching
763
+ *
764
+ * 正则化后的属性过滤器,用于快速匹配
765
+ */
766
+ type AttrFilter = (name: string, value: string) => boolean;
767
+ interface DelimiterConfig {
768
+ /**
769
+ * Left delimiter
770
+ *
771
+ * 左分隔符
772
+ *
773
+ * @default "{"
774
+ */
775
+ left: string;
776
+ /**
777
+ * Right delimiter
778
+ *
779
+ * 右分隔符
780
+ *
781
+ * @default "}"
782
+ */
783
+ right: string;
784
+ /**
785
+ * Allowed attributes (raw config)
786
+ *
787
+ * 允许的属性(原始配置)
788
+ *
789
+ * @default [ ]
790
+ */
791
+ allowed: AllowedAttrs;
792
+ /**
793
+ * Normalized attribute filter
794
+ *
795
+ * 正则化后的属性过滤器
796
+ */
797
+ filter: AttrFilter | null;
798
+ }
799
+ //#endregion
800
+ //#region src/options.d.ts
801
+ type MarkdownItAttrRuleName = "fence" | "inline" | "table" | "list" | "heading" | "hr" | "softbreak" | "blockInfo" | "blockEnd" |
802
+ /** Legacy alias of `blockEnd` */
803
+ "block" |
804
+ /** Opt-in task list label support - excluded from `"all"` */
805
+ "tasklist" |
806
+ /** Opt-in definition list support - excluded from `"all"` */
807
+ "dl";
808
+ interface MarkdownItAttrsOptions extends Partial<DelimiterConfig> {
809
+ /**
810
+ * Rules to enable
811
+ *
812
+ * 启用的规则
813
+ *
814
+ * @default "all"
815
+ */
816
+ rule?: "all" | boolean | MarkdownItAttrRuleName[];
817
+ /**
818
+ * Place fence attributes on `<pre>` instead of `<code>`
819
+ *
820
+ * 将代码块属性放在 `<pre>` 上而非 `<code>` 上
821
+ *
822
+ * @default true
823
+ */
824
+ fenceAttrsOnPre?: boolean;
608
825
  }
609
-
610
- declare class StateInline {
611
- constructor(src: string, md: MarkdownIt, env: any, outTokens: Token[]);
612
-
613
- src: string;
614
- env: any;
615
- md: MarkdownIt;
616
- tokens: Token[];
617
- tokens_meta: Array<TokenMeta | null>;
618
-
619
- pos: number;
620
- posMax: number;
621
- level: number;
622
- pending: string;
623
- pendingLevel: number;
624
-
625
- /**
626
- * Stores { start: end } pairs. Useful for backtrack
627
- * optimization of pairs parse (emphasis, strikes).
628
- */
629
- cache: any;
630
-
631
- /**
632
- * List of emphasis-like delimiters for current tag
633
- */
634
- delimiters: Delimiter[];
635
-
636
- // Stack of delimiter lists for upper level tags
637
- // _prev_delimiters: StateInline.Delimiter[][];
638
-
639
- /**
640
- * Flush pending text
641
- */
642
- pushPending(): Token;
643
-
644
- /**
645
- * Push new token to "stream".
646
- * If pending text exists - flush it as text token
647
- */
648
- push(type: string, tag: string, nesting: Nesting): Token;
649
-
650
- /**
651
- * Scan a sequence of emphasis-like markers, and determine whether
652
- * it can start an emphasis sequence or end an emphasis sequence.
653
- *
654
- * @param start position to scan from (it should point at a valid marker)
655
- * @param canSplitWord determine if these markers can be found inside a word
656
- */
657
- scanDelims(start: number, canSplitWord: boolean): Scanned;
658
-
659
- Token: typeof Token;
826
+ //#endregion
827
+ //#region node_modules/.pnpm/@mdit+plugin-emoji@1.1.1_markdown-it@14.3.2/node_modules/@mdit/plugin-emoji/dist/index.d.ts
828
+ //#region src/options.d.ts
829
+ interface EmojiPluginOptions$1 {
830
+ /**
831
+ * Emoji definitions
832
+ *
833
+ * 表情定义
834
+ *
835
+ * The key is the emoji name, and the value is the URL of the emoji character. 键是表情名称,值是表情字符。
836
+ */
837
+ definitions?: Record<string, string>;
838
+ /**
839
+ * Enabled emojis
840
+ *
841
+ * 启用的表情
842
+ *
843
+ * If specified, only emojis in this list will be rendered. Otherwise, all emojis in the
844
+ * definitions will be rendered. 如果指定了这个选项,只有在这个列表中的表情才会被渲染。否则,定义中的所有表情都会被渲染。
845
+ *
846
+ * @default [ ]
847
+ */
848
+ enabled?: string[];
849
+ /**
850
+ * Shortcut definitions
851
+ *
852
+ * 快捷键定义
853
+ *
854
+ * The key is the emoji name, and the value is the shortcut(s) for the emoji. 键是表情名称,值是表情的快捷短语。
855
+ *
856
+ * @default {}
857
+ */
858
+ shortcuts?: Record<string, string | string[]>;
859
+ }
860
+ //#endregion
861
+ //#region src/full.d.ts
862
+ declare const fullEmoji: PluginWithOptions<EmojiPluginOptions$1>;
863
+ //#endregion
864
+ //#region node_modules/.pnpm/@mdit+plugin-tasklist@1.0.2_markdown-it@14.3.2/node_modules/@mdit/plugin-tasklist/dist/index.d.ts
865
+ //#region src/options.d.ts
866
+ interface MarkdownItTaskListOptions {
867
+ /**
868
+ * Whether disable checkbox
869
+ *
870
+ * 是否禁用 checkbox
871
+ *
872
+ * @default true
873
+ */
874
+ disabled?: boolean;
875
+ /**
876
+ * Whether use `<label>` to wrap text
877
+ *
878
+ * 是否使用 `<label>` 来包裹文字
879
+ *
880
+ * @default true
881
+ */
882
+ label?: boolean;
883
+ /**
884
+ * Class for tasklist container
885
+ *
886
+ * Tasklist 容器的 class
887
+ *
888
+ * @default "task-list-container"
889
+ */
890
+ containerClass?: string;
891
+ /**
892
+ * Class for tasklist item
893
+ *
894
+ * Tasklist item 的 class
895
+ *
896
+ * @default "task-list-item"
897
+ */
898
+ itemClass?: string;
899
+ /**
900
+ * Class for tasklist item label
901
+ *
902
+ * Tasklist item label 的 class
903
+ *
904
+ * @default "task-list-item-label"
905
+ */
906
+ labelClass?: string;
907
+ /**
908
+ * Class for tasklist item checkbox
909
+ *
910
+ * Tasklist item checkbox 的 class
911
+ *
912
+ * @default "task-list-item-checkbox"
913
+ */
914
+ checkboxClass?: string;
660
915
  }
661
-
662
- declare function parseLinkLabel(state: StateInline, start: number, disableNested?: boolean): number;
663
-
664
- interface ParseLinkTitleResult {
665
- /**
666
- * if `true`, this is a valid link title
667
- */
668
- ok: boolean;
669
- /**
670
- * if `true`, this link can be continued on the next line
671
- */
672
- can_continue: boolean;
673
- /**
674
- * if `ok`, it's the position of the first character after the closing marker
675
- */
676
- pos: number;
677
- /**
678
- * if `ok`, it's the unescaped title
679
- */
680
- str: string;
681
- /**
682
- * expected closing marker character code
683
- */
684
- marker: number;
916
+ //#endregion
917
+ //#region src/node/markdown/plugins/image.d.ts
918
+ interface Options$5 {
919
+ /**
920
+ * Support native lazy loading for the `<img>` tag.
921
+ * @default false
922
+ */
923
+ lazyLoad?: boolean;
685
924
  }
686
-
687
- declare function parseLinkTitle(
688
- str: string,
689
- start: number,
690
- max: number,
691
- prev_state?: ParseLinkTitleResult,
692
- ): ParseLinkTitleResult;
693
-
694
- declare const helpers_parseLinkDestination: typeof parseLinkDestination;
695
- declare const helpers_parseLinkLabel: typeof parseLinkLabel;
696
- declare const helpers_parseLinkTitle: typeof parseLinkTitle;
697
- declare namespace helpers {
698
- export { helpers_parseLinkDestination as parseLinkDestination, helpers_parseLinkLabel as parseLinkLabel, helpers_parseLinkTitle as parseLinkTitle };
925
+ //#endregion
926
+ //#region src/node/markdown/plugins/include.d.ts
927
+ interface Options$4 {
928
+ /**
929
+ * Log a warning and expand to nothing when the included file, region,
930
+ * heading or range is missing, instead of throwing.
931
+ * @default false
932
+ */
933
+ silent?: boolean;
934
+ /**
935
+ * Rewrite relative image and link urls inside included markdown files so
936
+ * they resolve from the included file's location instead of the page
937
+ * including it.
938
+ * @default true
939
+ */
940
+ rebaseRelativeUrls?: boolean;
699
941
  }
700
-
701
- interface RuleOptions {
702
- /**
703
- * array with names of "alternate" chains.
704
- */
705
- alt: string[];
706
- }
707
-
708
- /**
709
- * Helper class, used by {@link MarkdownIt#core}, {@link MarkdownIt#block} and
710
- * {@link MarkdownIt#inline} to manage sequences of functions (rules):
711
- *
712
- * - keep rules in defined order
713
- * - assign the name to each rule
714
- * - enable/disable rules
715
- * - add/replace rules
716
- * - allow assign rules to additional named chains (in the same)
717
- * - caching lists of active rules
718
- *
719
- * You will not need use this class directly until write plugins. For simple
720
- * rules control use {@link MarkdownIt.disable}, {@link MarkdownIt.enable} and
721
- * {@link MarkdownIt.use}.
722
- */
723
- declare class Ruler<T> {
724
- constructor();
725
-
726
- /**
727
- * Replace rule by name with new function & options. Throws error if name not
728
- * found.
729
- *
730
- * ##### Example
731
- *
732
- * Replace existing typographer replacement rule with new one:
733
- *
734
- * ```javascript
735
- * var md = require('markdown-it')();
736
- *
737
- * md.core.ruler.at('replacements', function replace(state) {
738
- * //...
739
- * });
740
- * ```
741
- *
742
- * @param name rule name to replace.
743
- * @param fn new rule function.
744
- * @param options new rule options (not mandatory).
745
- */
746
- at(name: string, fn: T, options?: RuleOptions): void;
747
-
748
- /**
749
- * Add new rule to chain before one with given name.
750
- *
751
- * ##### Example
752
- *
753
- * ```javascript
754
- * var md = require('markdown-it')();
755
- *
756
- * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {
757
- * //...
758
- * });
759
- * ```
760
- *
761
- * @see {@link Ruler.after}, {@link Ruler.push}
762
- *
763
- * @param beforeName new rule will be added before this one.
764
- * @param ruleName name of added rule.
765
- * @param fn rule function.
766
- * @param options rule options (not mandatory).
767
- */
768
- before(beforeName: string, ruleName: string, fn: T, options?: RuleOptions): void;
769
-
770
- /**
771
- * Add new rule to chain after one with given name.
772
- *
773
- * ##### Example
774
- *
775
- * ```javascript
776
- * var md = require('markdown-it')();
777
- *
778
- * md.inline.ruler.after('text', 'my_rule', function replace(state) {
779
- * //...
780
- * });
781
- * ```
782
- *
783
- * @see {@link Ruler.before}, {@link Ruler.push}
784
- *
785
- * @param afterName new rule will be added after this one.
786
- * @param ruleName name of added rule.
787
- * @param fn rule function.
788
- * @param options rule options (not mandatory).
789
- */
790
- after(afterName: string, ruleName: string, fn: T, options?: RuleOptions): void;
791
-
792
- /**
793
- * Push new rule to the end of chain.
794
- *
795
- * ##### Example
796
- *
797
- * ```javascript
798
- * var md = require('markdown-it')();
799
- *
800
- * md.core.ruler.push('my_rule', function replace(state) {
801
- * //...
802
- * });
803
- * ```
804
- *
805
- * @see {@link Ruler.before}, {@link Ruler.after}
806
- *
807
- * @param ruleName name of added rule.
808
- * @param fn rule function.
809
- * @param options rule options (not mandatory).
810
- */
811
- push(ruleName: string, fn: T, options?: RuleOptions): void;
812
-
813
- /**
814
- * Enable rules with given names. If any rule name not found - throw Error.
815
- * Errors can be disabled by second param.
816
- *
817
- * Returns list of found rule names (if no exception happened).
818
- *
819
- * @see {@link Ruler.disable}, {@link Ruler.enableOnly}
820
- *
821
- * @param list list of rule names to enable.
822
- * @param ignoreInvalid set `true` to ignore errors when rule not found.
823
- */
824
- enable(list: string | string[], ignoreInvalid?: boolean): string[];
825
-
826
- /**
827
- * Enable rules with given names, and disable everything else. If any rule name
828
- * not found - throw Error. Errors can be disabled by second param.
829
- *
830
- * @see {@link Ruler.disable}, {@link Ruler.enable}
831
- *
832
- * @param list list of rule names to enable (whitelist).
833
- * @param ignoreInvalid set `true` to ignore errors when rule not found.
834
- */
835
- enableOnly(list: string | string[], ignoreInvalid?: boolean): void;
836
-
837
- /**
838
- * Disable rules with given names. If any rule name not found - throw Error.
839
- * Errors can be disabled by second param.
840
- *
841
- * Returns list of found rule names (if no exception happened).
842
- *
843
- * @see {@link Ruler.enable}, {@link Ruler.enableOnly}
844
- *
845
- * @param list list of rule names to disable.
846
- * @param ignoreInvalid set `true` to ignore errors when rule not found.
847
- */
848
- disable(list: string | string[], ignoreInvalid?: boolean): string[];
849
-
850
- /**
851
- * Return array of active functions (rules) for given chain name. It analyzes
852
- * rules configuration, compiles caches if not exists and returns result.
853
- *
854
- * Default chain name is `''` (empty string). It can't be skipped. That's
855
- * done intentionally, to keep signature monomorphic for high speed.
856
- */
857
- getRules(chainName: string): T[];
858
- }
859
-
860
- type ParentType = "blockquote" | "list" | "root" | "paragraph" | "reference";
861
-
862
- declare class StateBlock {
863
- constructor(src: string, md: MarkdownIt, env: any, tokens: Token[]);
864
-
865
- src: string;
866
-
867
- /**
868
- * link to parser instance
869
- */
870
- md: MarkdownIt;
871
-
872
- env: any;
873
-
874
- //
875
- // Internal state vartiables
876
- //
877
-
878
- tokens: Token[];
879
-
880
- /**
881
- * line begin offsets for fast jumps
882
- */
883
- bMarks: number[];
884
- /**
885
- * line end offsets for fast jumps
886
- */
887
- eMarks: number[];
888
- /**
889
- * offsets of the first non-space characters (tabs not expanded)
890
- */
891
- tShift: number[];
892
- /**
893
- * indents for each line (tabs expanded)
894
- */
895
- sCount: number[];
896
-
897
- /**
898
- * An amount of virtual spaces (tabs expanded) between beginning
899
- * of each line (bMarks) and real beginning of that line.
900
- *
901
- * It exists only as a hack because blockquotes override bMarks
902
- * losing information in the process.
903
- *
904
- * It's used only when expanding tabs, you can think about it as
905
- * an initial tab length, e.g. bsCount=21 applied to string `\t123`
906
- * means first tab should be expanded to 4-21%4 === 3 spaces.
907
- */
908
- bsCount: number[];
909
-
910
- // block parser variables
911
-
912
- /**
913
- * required block content indent (for example, if we are
914
- * inside a list, it would be positioned after list marker)
915
- */
916
- blkIndent: number;
917
- /**
918
- * line index in src
919
- */
920
- line: number;
921
- /**
922
- * lines count
923
- */
924
- lineMax: number;
925
- /**
926
- * loose/tight mode for lists
927
- */
928
- tight: boolean;
929
- /**
930
- * indent of the current dd block (-1 if there isn't any)
931
- */
932
- ddIndent: number;
933
- /**
934
- * indent of the current list block (-1 if there isn't any)
935
- */
936
- listIndent: number;
937
-
938
- /**
939
- * used in lists to determine if they interrupt a paragraph
940
- */
941
- parentType: ParentType;
942
-
943
- level: number;
944
-
945
- /**
946
- * Push new token to "stream".
947
- */
948
- push(type: string, tag: string, nesting: Nesting): Token;
949
-
950
- isEmpty(line: number): boolean;
951
-
952
- skipEmptyLines(from: number): number;
953
-
954
- /**
955
- * Skip spaces from given position.
956
- */
957
- skipSpaces(pos: number): number;
958
-
959
- /**
960
- * Skip spaces from given position in reverse.
961
- */
962
- skipSpacesBack(pos: number, min: number): number;
963
-
964
- /**
965
- * Skip char codes from given position
966
- */
967
- skipChars(pos: number, code: number): number;
968
-
969
- /**
970
- * Skip char codes reverse from given position - 1
971
- */
972
- skipCharsBack(pos: number, code: number, min: number): number;
973
-
974
- /**
975
- * cut lines range from source.
976
- */
977
- getLines(begin: number, end: number, indent: number, keepLastLF: boolean): string;
978
-
979
- Token: typeof Token;
980
- }
981
-
982
- type RuleBlock = (state: StateBlock, startLine: number, endLine: number, silent: boolean) => boolean;
983
-
984
- declare class ParserBlock {
985
- /**
986
- * {@link Ruler} instance. Keep configuration of block rules.
987
- */
988
- ruler: Ruler<RuleBlock>;
989
-
990
- /**
991
- * Generate tokens for input range
992
- */
993
- tokenize(state: StateBlock, startLine: number, endLine: number): void;
994
-
995
- /**
996
- * Process input string and push block tokens into `outTokens`
997
- */
998
- parse(str: string, md: MarkdownIt, env: any, outTokens: Token[]): void;
999
-
1000
- State: typeof StateBlock;
1001
- }
1002
-
1003
- declare class StateCore {
1004
- constructor(src: string, md: MarkdownIt, env: any);
1005
-
1006
- src: string;
1007
- env: any;
1008
- tokens: Token[];
1009
- inlineMode: boolean;
1010
-
1011
- /**
1012
- * link to parser instance
1013
- */
1014
- md: MarkdownIt;
1015
-
1016
- Token: typeof Token;
1017
- }
1018
-
1019
- type RuleCore = (state: StateCore) => void;
1020
-
1021
- declare class Core {
1022
- /**
1023
- * {@link Ruler} instance. Keep configuration of core rules.
1024
- */
1025
- ruler: Ruler<RuleCore>;
1026
-
1027
- /**
1028
- * Executes core chain rules.
1029
- */
1030
- process(state: StateCore): void;
1031
-
1032
- State: typeof StateCore;
1033
- }
1034
-
1035
- type RuleInline = (state: StateInline, silent: boolean) => boolean;
1036
- type RuleInline2 = (state: StateInline) => boolean;
1037
-
1038
- declare class ParserInline {
1039
- /**
1040
- * {@link Ruler} instance. Keep configuration of inline rules.
1041
- */
1042
- ruler: Ruler<RuleInline>;
1043
-
1044
- /**
1045
- * {@link Ruler} instance. Second ruler used for post-processing
1046
- * (e.g. in emphasis-like rules).
1047
- */
1048
- ruler2: Ruler<RuleInline2>;
1049
-
1050
- /**
1051
- * Skip single token by running all rules in validation mode;
1052
- * returns `true` if any rule reported success
1053
- */
1054
- skipToken(state: StateInline): void;
1055
-
1056
- /**
1057
- * Generate tokens for input range
1058
- */
1059
- tokenize(state: StateInline): void;
1060
-
1061
- /**
1062
- * Process input string and push inline tokens into `outTokens`
1063
- */
1064
- parse(str: string, md: MarkdownIt, env: any, outTokens: Token[]): void;
1065
-
1066
- State: typeof StateInline;
1067
- }
1068
-
1069
- type RenderRule = (tokens: Token[], idx: number, options: Options$2, env: any, self: Renderer) => string;
1070
-
1071
- interface RenderRuleRecord {
1072
- [type: string]: RenderRule | undefined;
1073
- code_inline?: RenderRule | undefined;
1074
- code_block?: RenderRule | undefined;
1075
- fence?: RenderRule | undefined;
1076
- image?: RenderRule | undefined;
1077
- hardbreak?: RenderRule | undefined;
1078
- softbreak?: RenderRule | undefined;
1079
- text?: RenderRule | undefined;
1080
- html_block?: RenderRule | undefined;
1081
- html_inline?: RenderRule | undefined;
1082
- }
1083
-
1084
- declare class Renderer {
1085
- /**
1086
- * Creates new {@link Renderer} instance and fill {@link Renderer#rules} with defaults.
1087
- */
1088
- constructor();
1089
-
1090
- /**
1091
- * Contains render rules for tokens. Can be updated and extended.
1092
- *
1093
- * ##### Example
1094
- *
1095
- * ```javascript
1096
- * var md = require('markdown-it')();
1097
- *
1098
- * md.renderer.rules.strong_open = function () { return '<b>'; };
1099
- * md.renderer.rules.strong_close = function () { return '</b>'; };
1100
- *
1101
- * var result = md.renderInline(...);
1102
- * ```
1103
- *
1104
- * Each rule is called as independent static function with fixed signature:
1105
- *
1106
- * ```javascript
1107
- * function my_token_render(tokens, idx, options, env, renderer) {
1108
- * // ...
1109
- * return renderedHTML;
1110
- * }
1111
- * ```
1112
- *
1113
- * @see https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs
1114
- */
1115
- rules: RenderRuleRecord;
1116
-
1117
- /**
1118
- * Render token attributes to string.
1119
- */
1120
- renderAttrs(token: Token): string;
1121
-
1122
- /**
1123
- * Default token renderer. Can be overriden by custom function
1124
- * in {@link Renderer#rules}.
1125
- *
1126
- * @param tokens list of tokens
1127
- * @param idx token index to render
1128
- * @param options params of parser instance
1129
- */
1130
- renderToken(tokens: Token[], idx: number, options: Options$2): string;
1131
-
1132
- /**
1133
- * The same as {@link Renderer.render}, but for single token of `inline` type.
1134
- *
1135
- * @param tokens list of block tokens to render
1136
- * @param options params of parser instance
1137
- * @param env additional data from parsed input (references, for example)
1138
- */
1139
- renderInline(tokens: Token[], options: Options$2, env: any): string;
1140
-
1141
- /**
1142
- * Special kludge for image `alt` attributes to conform CommonMark spec.
1143
- * Don't try to use it! Spec requires to show `alt` content with stripped markup,
1144
- * instead of simple escaping.
1145
- *
1146
- * @param tokens list of block tokens to render
1147
- * @param options params of parser instance
1148
- * @param env additional data from parsed input (references, for example)
1149
- */
1150
- renderInlineAsText(tokens: Token[], options: Options$2, env: any): string;
1151
-
1152
- /**
1153
- * Takes token stream and generates HTML. Probably, you will never need to call
1154
- * this method directly.
1155
- *
1156
- * @param tokens list of block tokens to render
1157
- * @param options params of parser instance
1158
- * @param env additional data from parsed input (references, for example)
1159
- */
1160
- render(tokens: Token[], options: Options$2, env: any): string;
1161
- }
1162
-
1163
- /**
1164
- * MarkdownIt provides named presets as a convenience to quickly
1165
- * enable/disable active syntax rules and options for common use cases.
1166
- *
1167
- * - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -
1168
- * configures parser to strict [CommonMark](http://commonmark.org/) mode.
1169
- * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -
1170
- * similar to GFM, used when no preset name given. Enables all available rules,
1171
- * but still without html, typographer & autolinker.
1172
- * - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -
1173
- * all rules disabled. Useful to quickly setup your config via `.enable()`.
1174
- * For example, when you need only `bold` and `italic` markup and nothing else.
1175
- */
1176
- type PresetName = "default" | "zero" | "commonmark";
1177
-
1178
- interface Options$2 {
1179
- /**
1180
- * Set `true` to enable HTML tags in source. Be careful!
1181
- * That's not safe! You may need external sanitizer to protect output from XSS.
1182
- * It's better to extend features via plugins, instead of enabling HTML.
1183
- * @default false
1184
- */
1185
- html?: boolean | undefined;
1186
-
1187
- /**
1188
- * Set `true` to add '/' when closing single tags
1189
- * (`<br />`). This is needed only for full CommonMark compatibility. In real
1190
- * world you will need HTML output.
1191
- * @default false
1192
- */
1193
- xhtmlOut?: boolean | undefined;
1194
-
1195
- /**
1196
- * Set `true` to convert `\n` in paragraphs into `<br>`.
1197
- * @default false
1198
- */
1199
- breaks?: boolean | undefined;
1200
-
1201
- /**
1202
- * CSS language class prefix for fenced blocks.
1203
- * Can be useful for external highlighters.
1204
- * @default 'language-'
1205
- */
1206
- langPrefix?: string | undefined;
1207
-
1208
- /**
1209
- * Set `true` to autoconvert URL-like text to links.
1210
- * @default false
1211
- */
1212
- linkify?: boolean | undefined;
1213
-
1214
- /**
1215
- * Set `true` to enable [some language-neutral replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +
1216
- * quotes beautification (smartquotes).
1217
- * @default false
1218
- */
1219
- typographer?: boolean | undefined;
1220
-
1221
- /**
1222
- * Double + single quotes replacement
1223
- * pairs, when typographer enabled and smartquotes on. For example, you can
1224
- * use `'«»„“'` for Russian, `'„“‚‘'` for German, and
1225
- * `['«\xA0', '\xA0»', '‹\xA0', '\xA0›']` for French (including nbsp).
1226
- * @default '“”‘’'
1227
- */
1228
- quotes?: string | string[];
1229
-
1230
- /**
1231
- * Highlighter function for fenced code blocks.
1232
- * Highlighter `function (str, lang, attrs)` should return escaped HTML. It can
1233
- * also return empty string if the source was not changed and should be escaped
1234
- * externally. If result starts with <pre... internal wrapper is skipped.
1235
- * @default null
1236
- */
1237
- highlight?: ((str: string, lang: string, attrs: string) => string) | null | undefined;
1238
- }
1239
-
1240
- type PluginSimple = (md: MarkdownIt) => void;
1241
- type PluginWithOptions<T = any> = (md: MarkdownIt, options?: T) => void;
1242
- type PluginWithParams = (md: MarkdownIt, ...params: any[]) => void;
1243
-
1244
- interface MarkdownItConstructor {
1245
- new(): MarkdownIt;
1246
- new(presetName: PresetName, options?: Options$2): MarkdownIt;
1247
- new(options: Options$2): MarkdownIt;
1248
- (): MarkdownIt;
1249
- (presetName: PresetName, options?: Options$2): MarkdownIt;
1250
- (options: Options$2): MarkdownIt;
1251
- }
1252
-
1253
- interface MarkdownIt {
1254
- /**
1255
- * Instance of {@link ParserInline}. You may need it to add new rules when
1256
- * writing plugins. For simple rules control use {@link MarkdownIt.disable} and
1257
- * {@link MarkdownIt.enable}.
1258
- */
1259
- readonly inline: ParserInline;
1260
-
1261
- /**
1262
- * Instance of {@link ParserBlock}. You may need it to add new rules when
1263
- * writing plugins. For simple rules control use {@link MarkdownIt.disable} and
1264
- * {@link MarkdownIt.enable}.
1265
- */
1266
- readonly block: ParserBlock;
1267
-
1268
- /**
1269
- * Instance of {@link Core} chain executor. You may need it to add new rules when
1270
- * writing plugins. For simple rules control use {@link MarkdownIt.disable} and
1271
- * {@link MarkdownIt.enable}.
1272
- */
1273
- readonly core: Core;
1274
-
1275
- /**
1276
- * Instance of {@link Renderer}. Use it to modify output look. Or to add rendering
1277
- * rules for new token types, generated by plugins.
1278
- *
1279
- * ##### Example
1280
- *
1281
- * ```javascript
1282
- * var md = require('markdown-it')();
1283
- *
1284
- * function myToken(tokens, idx, options, env, self) {
1285
- * //...
1286
- * return result;
1287
- * };
1288
- *
1289
- * md.renderer.rules['my_token'] = myToken
1290
- * ```
1291
- *
1292
- * See {@link Renderer} docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).
1293
- */
1294
- readonly renderer: Renderer;
1295
-
1296
- /**
1297
- * [linkify-it](https://github.com/markdown-it/linkify-it) instance.
1298
- * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)
1299
- * rule.
1300
- */
1301
- readonly linkify: LinkifyIt;
1302
-
1303
- /**
1304
- * Link validation function. CommonMark allows too much in links. By default
1305
- * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
1306
- * except some embedded image types.
1307
- *
1308
- * You can change this behaviour:
1309
- *
1310
- * ```javascript
1311
- * var md = require('markdown-it')();
1312
- * // enable everything
1313
- * md.validateLink = function () { return true; }
1314
- * ```
1315
- */
1316
- validateLink(url: string): boolean;
1317
-
1318
- /**
1319
- * Function used to encode link url to a machine-readable format,
1320
- * which includes url-encoding, punycode, etc.
1321
- */
1322
- normalizeLink(url: string): string;
1323
-
1324
- /**
1325
- * Function used to decode link url to a human-readable format`
1326
- */
1327
- normalizeLinkText(url: string): string;
1328
-
1329
- readonly utils: typeof utils;
1330
-
1331
- readonly helpers: typeof helpers;
1332
-
1333
- readonly options: Options$2;
1334
-
1335
- /**
1336
- * *chainable*
1337
- *
1338
- * Set parser options (in the same format as in constructor). Probably, you
1339
- * will never need it, but you can change options after constructor call.
1340
- *
1341
- * ##### Example
1342
- *
1343
- * ```javascript
1344
- * var md = require('markdown-it')()
1345
- * .set({ html: true, breaks: true })
1346
- * .set({ typographer: true });
1347
- * ```
1348
- *
1349
- * __Note:__ To achieve the best possible performance, don't modify a
1350
- * `markdown-it` instance options on the fly. If you need multiple configurations
1351
- * it's best to create multiple instances and initialize each with separate
1352
- * config.
1353
- */
1354
- set(options: Options$2): this;
1355
-
1356
- /**
1357
- * *chainable*, *internal*
1358
- *
1359
- * Batch load of all options and compenent settings. This is internal method,
1360
- * and you probably will not need it. But if you with - see available presets
1361
- * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
1362
- *
1363
- * We strongly recommend to use presets instead of direct config loads. That
1364
- * will give better compatibility with next versions.
1365
- */
1366
- configure(presets: PresetName): this;
1367
-
1368
- /**
1369
- * *chainable*
1370
- *
1371
- * Enable list or rules. It will automatically find appropriate components,
1372
- * containing rules with given names. If rule not found, and `ignoreInvalid`
1373
- * not set - throws exception.
1374
- *
1375
- * ##### Example
1376
- *
1377
- * ```javascript
1378
- * var md = require('markdown-it')()
1379
- * .enable(['sub', 'sup'])
1380
- * .disable('smartquotes');
1381
- * ```
1382
- *
1383
- * @param list rule name or list of rule names to enable
1384
- * @param ignoreInvalid set `true` to ignore errors when rule not found.
1385
- */
1386
- enable(list: string | string[], ignoreInvalid?: boolean): this;
1387
-
1388
- /**
1389
- * *chainable*
1390
- *
1391
- * The same as {@link MarkdownIt.enable}, but turn specified rules off.
1392
- *
1393
- * @param list rule name or list of rule names to disable.
1394
- * @param ignoreInvalid set `true` to ignore errors when rule not found.
1395
- */
1396
- disable(list: string | string[], ignoreInvalid?: boolean): this;
1397
-
1398
- /**
1399
- * *chainable*
1400
- *
1401
- * Load specified plugin with given params into current parser instance.
1402
- * It's just a sugar to call `plugin(md, params)` with curring.
1403
- *
1404
- * ##### Example
1405
- *
1406
- * ```javascript
1407
- * var iterator = require('markdown-it-for-inline');
1408
- * var md = require('markdown-it')()
1409
- * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
1410
- * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
1411
- * });
1412
- * ```
1413
- */
1414
- use(plugin: PluginSimple): this;
1415
- use<T = any>(plugin: PluginWithOptions<T>, options?: T): this;
1416
- use(plugin: PluginWithParams, ...params: any[]): this;
1417
-
1418
- /**
1419
- * *internal*
1420
- *
1421
- * Parse input string and returns list of block tokens (special token type
1422
- * "inline" will contain list of inline tokens). You should not call this
1423
- * method directly, until you write custom renderer (for example, to produce
1424
- * AST).
1425
- *
1426
- * `env` is used to pass data between "distributed" rules and return additional
1427
- * metadata like reference info, needed for the renderer. It also can be used to
1428
- * inject data in specific cases. Usually, you will be ok to pass `{}`,
1429
- * and then pass updated object to renderer.
1430
- *
1431
- * @param src source string
1432
- * @param env environment sandbox
1433
- */
1434
- parse(src: string, env: any): Token[];
1435
-
1436
- /**
1437
- * Render markdown string into html. It does all magic for you :).
1438
- *
1439
- * `env` can be used to inject additional metadata (`{}` by default).
1440
- * But you will not need it with high probability. See also comment
1441
- * in {@link MarkdownIt.parse}.
1442
- *
1443
- * @param src source string
1444
- * @param env environment sandbox
1445
- */
1446
- render(src: string, env?: any): string;
1447
-
1448
- /**
1449
- * *internal*
1450
- *
1451
- * The same as {@link MarkdownIt.parse} but skip all block rules. It returns the
1452
- * block tokens list with the single `inline` element, containing parsed inline
1453
- * tokens in `children` property. Also updates `env` object.
1454
- *
1455
- * @param src source string
1456
- * @param env environment sandbox
1457
- */
1458
- parseInline(src: string, env: any): Token[];
1459
-
1460
- /**
1461
- * Similar to {@link MarkdownIt.render} but for single paragraph content. Result
1462
- * will NOT be wrapped into `<p>` tags.
1463
- *
1464
- * @param src source string
1465
- * @param env environment sandbox
1466
- */
1467
- renderInline(src: string, env?: any): string;
1468
- }
1469
-
1470
- /**
1471
- * Main parser/renderer class.
1472
- *
1473
- * ##### Usage
1474
- *
1475
- * ```javascript
1476
- * // node.js, "classic" way:
1477
- * var MarkdownIt = require('markdown-it'),
1478
- * md = new MarkdownIt();
1479
- * var result = md.render('# markdown-it rulezz!');
1480
- *
1481
- * // node.js, the same, but with sugar:
1482
- * var md = require('markdown-it')();
1483
- * var result = md.render('# markdown-it rulezz!');
1484
- *
1485
- * // browser without AMD, added to "window" on script load
1486
- * // Note, there are no dash.
1487
- * var md = window.markdownit();
1488
- * var result = md.render('# markdown-it rulezz!');
1489
- * ```
1490
- *
1491
- * Single line rendering, without paragraph wrap:
1492
- *
1493
- * ```javascript
1494
- * var md = require('markdown-it')();
1495
- * var result = md.renderInline('__markdown-it__ rulezz!');
1496
- * ```
1497
- *
1498
- * ##### Example
1499
- *
1500
- * ```javascript
1501
- * // commonmark mode
1502
- * var md = require('markdown-it')('commonmark');
1503
- *
1504
- * // default mode
1505
- * var md = require('markdown-it')();
1506
- *
1507
- * // enable everything
1508
- * var md = require('markdown-it')({
1509
- * html: true,
1510
- * linkify: true,
1511
- * typographer: true
1512
- * });
1513
- * ```
1514
- *
1515
- * ##### Syntax highlighting
1516
- *
1517
- * ```js
1518
- * var hljs = require('highlight.js') // https://highlightjs.org/
1519
- *
1520
- * var md = require('markdown-it')({
1521
- * highlight: function (str, lang) {
1522
- * if (lang && hljs.getLanguage(lang)) {
1523
- * try {
1524
- * return hljs.highlight(lang, str, true).value;
1525
- * } catch (__) {}
1526
- * }
1527
- *
1528
- * return ''; // use external default escaping
1529
- * }
1530
- * });
1531
- * ```
1532
- *
1533
- * Or with full wrapper override (if you need assign class to `<pre>`):
1534
- *
1535
- * ```javascript
1536
- * var hljs = require('highlight.js') // https://highlightjs.org/
1537
- *
1538
- * // Actual default values
1539
- * var md = require('markdown-it')({
1540
- * highlight: function (str, lang) {
1541
- * if (lang && hljs.getLanguage(lang)) {
1542
- * try {
1543
- * return '<pre class="hljs"><code>' +
1544
- * hljs.highlight(lang, str, true).value +
1545
- * '</code></pre>';
1546
- * } catch (__) {}
1547
- * }
1548
- *
1549
- * return '<pre class="hljs"><code>' + md.utils.escapeHtml(str) + '</code></pre>';
1550
- * }
1551
- * });
1552
- * ```
1553
- */
1554
- declare const MarkdownIt: MarkdownItConstructor;
1555
-
1556
- /**
1557
- * Options of @mdit-vue/plugin-component
1558
- */
1559
- interface ComponentPluginOptions {
1560
- /**
1561
- * Extra tags to be treated as block tags.
1562
- *
1563
- * @default []
1564
- */
1565
- blockTags?: string[];
1566
- /**
1567
- * Extra tags to be treated as inline tags.
1568
- *
1569
- * @default []
1570
- */
1571
- inlineTags?: string[];
1572
- }
1573
-
1574
- /**
1575
- * Takes a string or object with `content` property, extracts
1576
- * and parses front-matter from the string, then returns an object
1577
- * with `data`, `content` and other [useful properties](#returned-object).
1578
- *
1579
- * ```js
1580
- * var matter = require('gray-matter');
1581
- * console.log(matter('---\ntitle: Home\n---\nOther stuff'));
1582
- * //=> { data: { title: 'Home'}, content: 'Other stuff' }
1583
- * ```
1584
- * @param {Object|String} `input` String, or object with `content` string
1585
- * @param {Object} `options`
1586
- * @return {Object}
1587
- * @api public
1588
- */
1589
- declare function matter<
1590
- I extends matter.Input,
1591
- O extends matter.GrayMatterOption<I, O>
1592
- >(input: I | { content: I }, options?: O): matter.GrayMatterFile<I>
1593
-
1594
- declare namespace matter {
1595
- type Input = string | Buffer
1596
- interface GrayMatterOption<
1597
- I extends Input,
1598
- O extends GrayMatterOption<I, O>
1599
- > {
1600
- parser?: () => void
1601
- eval?: boolean
1602
- excerpt?: boolean | ((input: I, options: O) => string)
1603
- excerpt_separator?: string
1604
- engines?: {
1605
- [index: string]:
1606
- | ((input: string) => object)
1607
- | { parse: (input: string) => object; stringify?: (data: object) => string }
1608
- }
1609
- language?: string
1610
- delimiters?: string | [string, string]
1611
- }
1612
- interface GrayMatterFile<I extends Input> {
1613
- data: { [key: string]: any }
1614
- content: string
1615
- excerpt?: string
1616
- orig: Buffer | I
1617
- language: string
1618
- matter: string
1619
- stringify(lang: string): string
1620
- }
1621
-
942
+ //#endregion
943
+ //#region src/node/markdown/plugins/snippet.d.ts
944
+ interface Options$3 {
1622
945
  /**
1623
- * Stringify an object to YAML or the specified language, and
1624
- * append it to the given string. By default, only YAML and JSON
1625
- * can be stringified. See the [engines](#engines) section to learn
1626
- * how to stringify other languages.
946
+ * Log a warning and render nothing when the snippet file or region is
947
+ * missing, instead of throwing.
948
+ * @default false
949
+ */
950
+ silent?: boolean;
951
+ /**
952
+ * Which region marker lines to remove from snippet output: `true` removes
953
+ * only markers of the style(s) that matched the requested region, so
954
+ * whole-file imports keep theirs, `'all'` removes markers of every style
955
+ * and name, and `false` keeps all of them.
956
+ * @default true
957
+ */
958
+ stripRegionMarkers?: boolean | 'all';
959
+ }
960
+ //#endregion
961
+ //#region src/node/markdown/markdown.d.ts
962
+ type EmojiPluginOptions = NonNullable<Parameters<typeof fullEmoji>[1]>;
963
+ export type ThemeOptions = ThemeRegistrationAny | BuiltinTheme | {
964
+ light: ThemeRegistrationAny | BuiltinTheme;
965
+ dark: ThemeRegistrationAny | BuiltinTheme;
966
+ };
967
+ export type MarkdownRenderer = MarkdownItAsync & {
968
+ options: {
969
+ highlight?: any;
970
+ };
971
+ };
972
+ export interface MarkdownOptions extends MarkdownItAsyncOptions {
973
+ /**
974
+ * Configure the markdown-it instance before any plugins are applied.
975
+ */
976
+ preConfig?: (md: MarkdownRenderer) => Awaitable<void>;
977
+ /**
978
+ * Configure the markdown-it instance after all built-in plugins are applied.
979
+ */
980
+ config?: (md: MarkdownRenderer) => Awaitable<void>;
981
+ /**
982
+ * Disable cache (experimental)
983
+ */
984
+ cache?: boolean;
985
+ /**
986
+ * HTML attributes applied to external links.
987
+ * @default { target: '_blank', rel: 'noreferrer' }
988
+ */
989
+ externalLinks?: Record<string, string>;
990
+ /**
991
+ * Per-locale overrides for build-time markdown strings (container titles
992
+ * and the code copy button title), keyed by locale index. Populated
993
+ * automatically from `locales.<index>.markdown` in the site config - pass
994
+ * directly only when using `createMarkdownRenderer` standalone.
995
+ */
996
+ locales?: Record<string, MarkdownLocaleOptions$1>;
997
+ /**
998
+ * Custom theme for syntax highlighting.
1627
999
  *
1000
+ * You can also pass an object with `light` and `dark` themes to support
1001
+ * dual themes.
1002
+ *
1003
+ * @example { theme: 'github-dark' }
1004
+ * @example { theme: { light: 'github-light', dark: 'github-dark' } }
1005
+ *
1006
+ * You can use an existing theme.
1007
+ * @see https://shiki.style/themes
1008
+ * Or add your own theme.
1009
+ * @see https://shiki.style/guide/load-theme
1010
+ */
1011
+ theme?: ThemeOptions;
1012
+ /**
1013
+ * Custom languages for syntax highlighting or pre-load built-in languages.
1014
+ * @see https://shiki.style/languages
1015
+ */
1016
+ languages?: (LanguageInput | BuiltinLanguage)[];
1017
+ /**
1018
+ * Custom language aliases for syntax highlighting.
1019
+ * Maps custom language names to existing languages.
1020
+ * Alias lookup is case-insensitive and underscores in language names are
1021
+ * displayed as spaces.
1022
+ *
1023
+ * @example
1024
+ *
1025
+ * Maps `my_lang` to use Python syntax highlighting.
1628
1026
  * ```js
1629
- * console.log(matter.stringify('foo bar baz', {title: 'Home'}));
1630
- * // results in:
1631
- * // ---
1632
- * // title: Home
1633
- * // ---
1634
- * // foo bar baz
1027
+ * { 'my_lang': 'python' }
1635
1028
  * ```
1636
- * @param {String|Object} `file` The content string to append to stringified front-matter, or a file object with `file.content` string.
1637
- * @param {Object} `data` Front matter to stringify.
1638
- * @param {Object} `options` [Options](#options) to pass to gray-matter and [js-yaml].
1639
- * @return {String} Returns a string created by wrapping stringified yaml with delimiters, and appending that to the given string.
1029
+ *
1030
+ * Usage in markdown:
1031
+ * ````md
1032
+ * ```My_Lang
1033
+ * # This will be highlighted as Python code
1034
+ * # and will show "My Lang" as the language label
1035
+ * print("Hello, World!")
1036
+ * ```
1037
+ * ````
1038
+ *
1039
+ * @see https://shiki.style/guide/load-lang#custom-language-aliases
1040
+ */
1041
+ languageAlias?: Record<string, string>;
1042
+ /**
1043
+ * Fallback language used when the specified language is not available.
1044
+ */
1045
+ defaultHighlightLang?: string;
1046
+ /**
1047
+ * Transformers applied to code blocks.
1048
+ * @see https://shiki.style/guide/transformers
1049
+ */
1050
+ codeTransformers?: ShikiTransformer[];
1051
+ /**
1052
+ * Color replacements applied during syntax highlighting.
1053
+ * Accepts either a flat color map or per-theme replacements.
1054
+ * @see https://shiki.style/guide/theme-colors#color-replacements
1055
+ */
1056
+ colorReplacements?: CodeToHastOptions['colorReplacements'];
1057
+ /**
1058
+ * Configure the Shiki instance.
1059
+ */
1060
+ shikiSetup?: (shiki: Highlighter) => void | Promise<void>;
1061
+ /**
1062
+ * Wrap code blocks in a container carrying the language label and the
1063
+ * copy button. The default theme's code block styling relies on this
1064
+ * markup. Disabling it also disables `lineNumbers`.
1065
+ * @default true
1066
+ */
1067
+ preWrapper?: boolean;
1068
+ /**
1069
+ * Strings for the copy button in code blocks: `tooltipText` is the
1070
+ * button's tooltip and `copiedText` is shown next to it after copying.
1071
+ * @default { tooltipText: 'Copy code', copiedText: 'Copied' }
1072
+ */
1073
+ codeCopyButton?: CodeCopyButtonOptions;
1074
+ /**
1075
+ * Custom language labels for display.
1076
+ * Overrides the default language label shown in code blocks.
1077
+ * Keys are case-insensitive.
1078
+ *
1079
+ * @example { 'vue': 'Vue SFC' }
1080
+ */
1081
+ languageLabel?: Record<string, string>;
1082
+ /**
1083
+ * Show line numbers in code blocks. Requires the `preWrapper` plugin.
1084
+ * @default false
1085
+ */
1086
+ lineNumbers?: boolean;
1087
+ /**
1088
+ * Options for importing code snippets from files with `<<<`. Set to
1089
+ * `false` to disable.
1090
+ * @see https://vitepress.dev/guide/markdown#import-code-snippets
1091
+ */
1092
+ snippet?: Options$3 | boolean;
1093
+ /**
1094
+ * Options for including markdown files with `<!-- @include: path -->`.
1095
+ * Set to `false` to disable.
1096
+ * @see https://vitepress.dev/guide/markdown#markdown-file-inclusion
1097
+ */
1098
+ include?: Options$4 | boolean;
1099
+ /**
1100
+ * Options for `@mdit/plugin-attrs`. Set to `false` to disable. The `fence`
1101
+ * rule is off by default so that curly attributes never consume code block
1102
+ * meta (e.g. line highlighting) - add classes to code blocks using shiki
1103
+ * transformers instead.
1104
+ * @see https://mdit-plugins.github.io/attrs.html
1640
1105
  */
1641
- export function stringify<O extends GrayMatterOption<string, O>>(
1642
- file: string | { content: string },
1643
- data: object,
1644
- options?: GrayMatterOption<string, O>
1645
- ): string
1646
-
1106
+ attrs?: MarkdownItAttrsOptions | boolean;
1647
1107
  /**
1648
- * Synchronously read a file from the file system and parse
1649
- * front matter. Returns the same object as the [main function](#matter).
1108
+ * Options for `@mdit/plugin-emoji`. Set to `false` to disable.
1109
+ * @see https://mdit-plugins.github.io/emoji.html
1110
+ */
1111
+ emoji?: EmojiPluginOptions | boolean;
1112
+ /**
1113
+ * Options for `@mdit/plugin-tasklist` (GitHub-style task lists,
1114
+ * `- [ ] task`). Set to `false` to disable.
1115
+ * @see https://mdit-plugins.github.io/tasklist.html
1116
+ */
1117
+ tasklist?: MarkdownItTaskListOptions | boolean;
1118
+ /**
1119
+ * Whether to enable footnotes (`[^1]` references with definitions, plus
1120
+ * inline `^[note]` syntax).
1121
+ * @default true
1122
+ * @see https://mdit-plugins.github.io/footnote.html
1123
+ */
1124
+ footnote?: boolean;
1125
+ /**
1126
+ * Improves emphasis (`**bold**`) handling in Japanese, Chinese, and
1127
+ * Korean text.
1128
+ * @default true
1129
+ * @see https://github.com/tats-u/markdown-cjk-friendly
1130
+ */
1131
+ cjkFriendlyEmphasis?: boolean;
1132
+ /**
1133
+ * Options for `@mdit/plugin-anchor`. Set to `false` to disable adding ids
1134
+ * and anchor links to headings. Note that the default theme's outline and
1135
+ * heading hash links rely on these ids.
1136
+ * @see https://mdit-plugins.github.io/anchor.html
1137
+ */
1138
+ anchor?: AnchorOptions | boolean;
1139
+ /**
1140
+ * Options for `@mdit-vue/plugin-headers`. Set to `true` or pass options
1141
+ * to collect page headers into page data.
1142
+ * @default false
1143
+ * @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-headers
1144
+ */
1145
+ headers?: HeadersPluginOptions | boolean;
1146
+ /**
1147
+ * Options for `@mdit-vue/plugin-toc`. Set to `false` to disable the
1148
+ * `[[toc]]` syntax.
1149
+ * @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-toc
1150
+ */
1151
+ toc?: TocPluginOptions | boolean;
1152
+ /**
1153
+ * Math support.
1650
1154
  *
1651
- * ```js
1652
- * var file = matter.read('./content/blog-post.md');
1653
- * ```
1654
- * @param {String} `filepath` file path of the file to read.
1655
- * @param {Object} `options` [Options](#options) to pass to gray-matter.
1656
- * @return {Object} Returns [an object](#returned-object) with `data` and `content`
1155
+ * You need to install `markdown-it-mathjax3` and set `math` to `true` to
1156
+ * enable it. You can also pass options to `markdown-it-mathjax3` here.
1157
+ * @default false
1158
+ * @see https://vitepress.dev/guide/markdown#math-equations
1657
1159
  */
1658
- export function read<O extends GrayMatterOption<string, O>>(
1659
- fp: string,
1660
- options?: GrayMatterOption<string, O>
1661
- ): matter.GrayMatterFile<string>
1662
-
1160
+ math?: any | boolean;
1663
1161
  /**
1664
- * Returns true if the given `string` has front matter.
1665
- * @param {String} `string`
1666
- * @param {Object} `options`
1667
- * @return {Boolean} True if front matter exists.
1162
+ * Custom labels for the built-in containers (`::: tip` etc.) and
1163
+ * additional user-defined containers. Labels are also used as the
1164
+ * default titles of GitHub-flavored alerts.
1165
+ * @see https://vitepress.dev/guide/markdown#custom-containers
1668
1166
  */
1669
- export function test<O extends matter.GrayMatterOption<string, O>>(
1670
- str: string,
1671
- options?: GrayMatterOption<string, O>
1672
- ): boolean
1673
-
1167
+ container?: ContainerOptions | boolean;
1674
1168
  /**
1675
- * Detect the language to use, if one is defined after the
1676
- * first front-matter delimiter.
1677
- * @param {String} `string`
1678
- * @param {Object} `options`
1679
- * @return {Object} Object with `raw` (actual language string), and `name`, the language with whitespace trimmed
1169
+ * Whether to enable GitHub-flavored alerts (`> [!NOTE]`).
1170
+ * @default true
1171
+ * @see https://vitepress.dev/guide/markdown#github-flavored-alerts
1680
1172
  */
1681
- export function language<O extends matter.GrayMatterOption<string, O>>(
1682
- str: string,
1683
- options?: GrayMatterOption<string, O>
1684
- ): { name: string; raw: string }
1685
- }
1686
-
1687
- type GrayMatterOptions = matter.GrayMatterOption<string, GrayMatterOptions>;
1688
- /**
1689
- * Options of @mdit-vue/plugin-frontmatter
1690
- */
1691
- interface FrontmatterPluginOptions {
1692
- /**
1693
- * Options of gray-matter
1694
- *
1695
- * @see https://github.com/jonschlinkert/gray-matter#options
1696
- */
1697
- grayMatterOptions?: GrayMatterOptions;
1698
- /**
1699
- * Render the excerpt or not
1700
- *
1701
- * @default true
1702
- */
1703
- renderExcerpt?: boolean;
1704
- }
1705
- declare module '@mdit-vue/types' {
1706
- interface MarkdownItEnv {
1707
- /**
1708
- * The raw Markdown content without frontmatter
1709
- */
1710
- content?: string;
1711
- /**
1712
- * The excerpt that extracted by `@mdit-vue/plugin-frontmatter`
1713
- *
1714
- * - Would be the rendered HTML when `renderExcerpt` is enabled
1715
- * - Would be the raw Markdown when `renderExcerpt` is disabled
1716
- */
1717
- excerpt?: string;
1718
- /**
1719
- * The frontmatter that extracted by `@mdit-vue/plugin-frontmatter`
1720
- */
1721
- frontmatter?: Record<string, unknown>;
1722
- }
1723
- }
1724
-
1725
- interface MarkdownItHeader {
1726
- /**
1727
- * The level of the header
1728
- *
1729
- * `1` to `6` for `<h1>` to `<h6>`
1730
- */
1731
- level: number;
1732
- /**
1733
- * The title of the header
1734
- */
1735
- title: string;
1736
- /**
1737
- * The slug of the header
1738
- *
1739
- * Typically the `id` attr of the header anchor
1740
- */
1741
- slug: string;
1742
- /**
1743
- * Link of the header
1744
- *
1745
- * Typically using `#${slug}` as the anchor hash
1746
- */
1747
- link: string;
1748
- /**
1749
- * The children of the header
1750
- */
1751
- children: MarkdownItHeader[];
1752
- }
1753
-
1754
- /**
1755
- * Options of @mdit-vue/plugin-headers
1756
- */
1757
- interface HeadersPluginOptions {
1758
- /**
1759
- * A custom slugification function
1760
- *
1761
- * Should use the same slugify function with markdown-it-anchor
1762
- * to ensure the link is matched
1763
- */
1764
- slugify?: (str: string) => string;
1765
- /**
1766
- * A function for formatting header title
1767
- */
1768
- format?: (str: string) => string;
1769
- /**
1770
- * Heading level that going to be extracted
1771
- *
1772
- * Should be a subset of markdown-it-anchor's `level` option
1773
- * to ensure the slug is existed
1774
- *
1775
- * @default [2,3]
1776
- */
1777
- level?: number[];
1778
- /**
1779
- * Should allow headers inside nested blocks or not
1780
- *
1781
- * If set to `true`, headers inside blockquote, list, etc. would also be extracted.
1782
- *
1783
- * @default false
1784
- */
1785
- shouldAllowNested?: boolean;
1786
- }
1787
- declare module '@mdit-vue/types' {
1788
- interface MarkdownItEnv {
1789
- /**
1790
- * The headers that extracted by `@mdit-vue/plugin-headers`
1791
- */
1792
- headers?: MarkdownItHeader[];
1793
- }
1794
- }
1795
-
1796
- /**
1797
- * Options of @mdit-vue/plugin-sfc
1798
- */
1799
- interface SfcPluginOptions {
1800
- /**
1801
- * Custom blocks to be extracted
1802
- *
1803
- * @default []
1804
- */
1805
- customBlocks?: string[];
1806
- }
1807
- /**
1808
- * SFC block that extracted from markdown
1809
- */
1810
- interface SfcBlock {
1811
- /**
1812
- * The type of the block
1813
- */
1814
- type: string;
1815
- /**
1816
- * The content, including open-tag and close-tag
1817
- */
1818
- content: string;
1819
- /**
1820
- * The content that stripped open-tag and close-tag off
1821
- */
1822
- contentStripped: string;
1823
- /**
1824
- * The open-tag
1825
- */
1826
- tagOpen: string;
1827
- /**
1828
- * The close-tag
1829
- */
1830
- tagClose: string;
1831
- }
1832
- interface MarkdownSfcBlocks {
1833
- /**
1834
- * The `<template>` block
1835
- */
1836
- template: SfcBlock | null;
1837
- /**
1838
- * The common `<script>` block
1839
- */
1840
- script: SfcBlock | null;
1841
- /**
1842
- * The `<script setup>` block
1843
- */
1844
- scriptSetup: SfcBlock | null;
1845
- /**
1846
- * All `<script>` blocks.
1847
- *
1848
- * By default, SFC only allows one `<script>` block and one `<script setup>` block.
1849
- * However, some tools may support different types of `<script>`s, so we keep all of them here.
1850
- */
1851
- scripts: SfcBlock[];
1852
- /**
1853
- * All `<style>` blocks.
1854
- */
1855
- styles: SfcBlock[];
1856
- /**
1857
- * All custom blocks.
1858
- */
1859
- customBlocks: SfcBlock[];
1860
- }
1861
- declare module '@mdit-vue/types' {
1862
- interface MarkdownItEnv {
1863
- /**
1864
- * SFC blocks that extracted by `@mdit-vue/plugin-sfc`
1865
- */
1866
- sfcBlocks?: MarkdownSfcBlocks;
1867
- }
1173
+ gfmAlerts?: boolean;
1174
+ /**
1175
+ * Add `tabindex="0"` to tables so keyboard users can focus and scroll
1176
+ * them.
1177
+ * @default true
1178
+ */
1179
+ tableTabIndex?: boolean;
1180
+ /**
1181
+ * Options for the image plugin (resolves image sources against the public
1182
+ * directory, adds dimensions, and supports lazy loading). Set to `false`
1183
+ * to disable.
1184
+ * @see https://vitepress.dev/guide/markdown#image-lazy-loading
1185
+ */
1186
+ image?: Options$5 | boolean;
1187
+ /**
1188
+ * Options for `@mdit-vue/plugin-component`. Set to `false` to disable.
1189
+ * @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-component
1190
+ */
1191
+ component?: ComponentPluginOptions | boolean;
1192
+ /**
1193
+ * Options for `@mdit-vue/plugin-frontmatter`.
1194
+ * @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-frontmatter
1195
+ */
1196
+ frontmatter?: FrontmatterPluginOptions;
1197
+ /**
1198
+ * Resolve `{{ $frontmatter.<path> }}` interpolations to their values while
1199
+ * rendering markdown, so the value also reaches consumers that never run
1200
+ * Vue - heading anchors and titles, the local search index, content loader
1201
+ * output, link destinations - and the compiled Vue template gets static
1202
+ * text instead of a runtime expression. Only bare property paths resolving
1203
+ * to simple primitive values in the page's own frontmatter are inlined -
1204
+ * anything else (complex expressions, missing keys, non-primitive values,
1205
+ * `v-pre` scopes) keeps its runtime interpolation. Set to `false` to leave
1206
+ * all interpolation to the Vue runtime - for example when
1207
+ * `transformPageData` rewrites frontmatter values that pages interpolate,
1208
+ * which would otherwise render the pre-transform value (a warning is
1209
+ * logged when that happens).
1210
+ *
1211
+ * @experimental
1212
+ * @default true
1213
+ */
1214
+ eagerFrontmatterInterpolation?: boolean;
1215
+ /**
1216
+ * Options for `@mdit-vue/plugin-sfc`.
1217
+ * @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-sfc
1218
+ */
1219
+ sfc?: SfcPluginOptions;
1868
1220
  }
1869
-
1221
+ export declare function mergeMarkdownLocales(options?: MarkdownOptions, locales?: LocaleConfig): MarkdownOptions;
1222
+ export declare function disposeMdItInstance(): void;
1870
1223
  /**
1871
- * Options of @mdit-vue/plugin-toc
1224
+ * @experimental
1872
1225
  */
1873
- interface TocPluginOptions {
1874
- /**
1875
- * The pattern serving as the TOC placeholder in your markdown
1876
- *
1877
- * @default /^\[\[toc\]\]$/i
1878
- */
1879
- pattern?: RegExp;
1880
- /**
1881
- * A custom slugification function
1882
- *
1883
- * Should use the same slugify function with markdown-it-anchor
1884
- * to ensure the link is matched
1885
- */
1886
- slugify?: (str: string) => string;
1887
- /**
1888
- * A function for formatting headings
1889
- */
1890
- format?: (str: string) => string;
1891
- /**
1892
- * Heading level that going to be included in the TOC
1893
- *
1894
- * Should be a subset of markdown-it-anchor's `level` option
1895
- * to ensure the link is existed
1896
- *
1897
- * @default [2,3]
1898
- */
1899
- level?: number[];
1900
- /**
1901
- * Should allow headers inside nested blocks or not
1902
- *
1903
- * If set to `true`, headers inside blockquote, list, etc. would also be included.
1904
- *
1905
- * @default false
1906
- */
1907
- shouldAllowNested?: boolean;
1908
- /**
1909
- * HTML tag of the TOC container
1910
- *
1911
- * @default 'nav'
1912
- */
1913
- containerTag?: string;
1914
- /**
1915
- * The class for the TOC container
1916
- *
1917
- * @default 'table-of-contents'
1918
- */
1919
- containerClass?: string;
1920
- /**
1921
- * HTML tag of the TOC list
1922
- *
1923
- * @default 'ul'
1924
- */
1925
- listTag?: 'ol' | 'ul';
1926
- /**
1927
- * The class for the TOC list
1928
- *
1929
- * @default ''
1930
- */
1931
- listClass?: string;
1932
- /**
1933
- * The class for the `<li>` tag
1934
- *
1935
- * @default ''
1936
- */
1937
- itemClass?: string;
1938
- /**
1939
- * The tag of the link inside `<li>` tag
1940
- *
1941
- * @default 'a'
1942
- */
1943
- linkTag?: 'a' | 'router-link';
1944
- /**
1945
- * The class for the link inside the `<li>` tag
1946
- *
1947
- * @default ''
1948
- */
1949
- linkClass?: string;
1950
- }
1951
-
1952
- declare namespace anchor {
1953
- export type Token = Token
1954
- export type State = StateCore
1955
- export type RenderHref = (slug: string, state: State) => string;
1956
- export type RenderAttrs = (slug: string, state: State) => Record<string, string | number>;
1957
-
1958
- export interface PermalinkOptions {
1959
- class?: string,
1960
- symbol?: string,
1961
- renderHref?: RenderHref,
1962
- renderAttrs?: RenderAttrs
1963
- }
1964
-
1965
- export interface HeaderLinkPermalinkOptions extends PermalinkOptions {
1966
- safariReaderFix?: boolean;
1967
- }
1968
-
1969
- export interface LinkAfterHeaderPermalinkOptions extends PermalinkOptions {
1970
- style?: 'visually-hidden' | 'aria-label' | 'aria-describedby' | 'aria-labelledby',
1971
- assistiveText?: (title: string) => string,
1972
- visuallyHiddenClass?: string,
1973
- space?: boolean | string,
1974
- placement?: 'before' | 'after'
1975
- wrapper?: [string, string] | null
1976
- }
1977
-
1978
- export interface LinkInsideHeaderPermalinkOptions extends PermalinkOptions {
1979
- space?: boolean | string,
1980
- placement?: 'before' | 'after',
1981
- ariaHidden?: boolean
1982
- }
1983
-
1984
- export interface AriaHiddenPermalinkOptions extends PermalinkOptions {
1985
- space?: boolean | string,
1986
- placement?: 'before' | 'after'
1987
- }
1988
-
1989
- export type PermalinkGenerator = (slug: string, opts: PermalinkOptions, state: State, index: number) => void;
1990
-
1991
- export interface AnchorInfo {
1992
- slug: string;
1993
- title: string;
1994
- }
1995
-
1996
- export interface AnchorOptions {
1997
- level?: number | number[];
1998
-
1999
- slugify?(str: string): string;
2000
- slugifyWithState?(str: string, state: State): string;
2001
- getTokensText?(tokens: Token[]): string;
2002
-
2003
- uniqueSlugStartIndex?: number;
2004
- permalink?: PermalinkGenerator;
2005
-
2006
- callback?(token: Token, anchor_info: AnchorInfo): void;
2007
-
2008
- tabIndex?: number | false;
2009
- }
2010
-
2011
- export const permalink: {
2012
- headerLink: (opts?: HeaderLinkPermalinkOptions) => PermalinkGenerator
2013
- linkAfterHeader: (opts?: LinkAfterHeaderPermalinkOptions) => PermalinkGenerator
2014
- linkInsideHeader: (opts?: LinkInsideHeaderPermalinkOptions) => PermalinkGenerator
2015
- ariaHidden: (opts?: AriaHiddenPermalinkOptions) => PermalinkGenerator
2016
- };
2017
- }
2018
-
2019
- declare function anchor(md: MarkdownIt, opts?: anchor.AnchorOptions): void;
2020
-
2021
- interface ContainerOptions {
2022
- infoLabel?: string;
2023
- noteLabel?: string;
2024
- tipLabel?: string;
2025
- warningLabel?: string;
2026
- dangerLabel?: string;
2027
- detailsLabel?: string;
2028
- importantLabel?: string;
2029
- cautionLabel?: string;
2030
- }
2031
-
2032
- interface Options$1 {
2033
- /**
2034
- * Support native lazy loading for the `<img>` tag.
2035
- * @default false
2036
- */
2037
- lazyLoading?: boolean;
1226
+ export declare function createMarkdownRenderer(srcDir: string, options?: MarkdownOptions, base?: string, logger?: Pick<Logger, 'warn'>, publicDir?: string): Promise<MarkdownRenderer>;
1227
+ //#endregion
1228
+ //#region src/node/utils/glob.d.ts
1229
+ interface GlobOptions {
1230
+ absolute?: boolean;
1231
+ cwd?: string;
1232
+ ignore?: string | string[];
1233
+ dot?: boolean;
1234
+ debug?: boolean;
1235
+ }
1236
+ //#endregion
1237
+ //#region src/node/plugins/dynamicRoutesPlugin.d.ts
1238
+ interface UserRouteConfig {
1239
+ params: Record<string, string>;
1240
+ content?: string;
2038
1241
  }
2039
-
2040
- type ThemeOptions = ThemeRegistrationAny | BuiltinTheme | {
2041
- light: ThemeRegistrationAny | BuiltinTheme;
2042
- dark: ThemeRegistrationAny | BuiltinTheme;
1242
+ type ResolvedRouteConfig = UserRouteConfig & {
1243
+ /**
1244
+ * the raw route (relative to src root), e.g. foo/[bar].md
1245
+ */
1246
+ route: string;
1247
+ /**
1248
+ * the actual path with params resolved (relative to src root), e.g. foo/1.md
1249
+ */
1250
+ path: string;
1251
+ /**
1252
+ * absolute fs path
1253
+ */
1254
+ fullPath: string;
1255
+ /**
1256
+ * the path to the paths loader module
1257
+ */
1258
+ loaderPath: string;
2043
1259
  };
2044
- interface MarkdownOptions extends Options$2 {
2045
- /**
2046
- * Setup markdown-it instance before applying plugins
2047
- */
2048
- preConfig?: (md: MarkdownIt) => Awaited<void>;
2049
- /**
2050
- * Setup markdown-it instance
2051
- */
2052
- config?: (md: MarkdownIt) => Awaited<void>;
2053
- /**
2054
- * Disable cache (experimental)
2055
- */
2056
- cache?: boolean;
2057
- externalLinks?: Record<string, string>;
2058
- /**
2059
- * Custom theme for syntax highlighting.
2060
- *
2061
- * You can also pass an object with `light` and `dark` themes to support dual themes.
2062
- *
2063
- * @example { theme: 'github-dark' }
2064
- * @example { theme: { light: 'github-light', dark: 'github-dark' } }
2065
- *
2066
- * You can use an existing theme.
2067
- * @see https://shiki.style/themes
2068
- * Or add your own theme.
2069
- * @see https://shiki.style/guide/load-theme
2070
- */
2071
- theme?: ThemeOptions;
2072
- /**
2073
- * Custom languages for syntax highlighting or pre-load built-in languages.
2074
- * @see https://shiki.style/languages
2075
- */
2076
- languages?: (LanguageInput | BuiltinLanguage)[];
2077
- /**
2078
- * Custom language aliases.
2079
- *
2080
- * @example { 'my-lang': 'js' }
2081
- * @see https://shiki.style/guide/load-lang#custom-language-aliases
2082
- */
2083
- languageAlias?: Record<string, string>;
2084
- /**
2085
- * Show line numbers in code blocks
2086
- * @default false
2087
- */
2088
- lineNumbers?: boolean;
2089
- /**
2090
- * Fallback language when the specified language is not available.
2091
- */
2092
- defaultHighlightLang?: string;
2093
- /**
2094
- * Transformers applied to code blocks
2095
- * @see https://shiki.style/guide/transformers
2096
- */
2097
- codeTransformers?: ShikiTransformer[];
2098
- /**
2099
- * Setup Shiki instance
2100
- */
2101
- shikiSetup?: (shiki: Highlighter) => void | Promise<void>;
2102
- /**
2103
- * The tooltip text for the copy button in code blocks
2104
- * @default 'Copy Code'
2105
- */
2106
- codeCopyButtonTitle?: string;
2107
- /**
2108
- * Options for `markdown-it-anchor`
2109
- * @see https://github.com/valeriangalliat/markdown-it-anchor
2110
- */
2111
- anchor?: anchor.AnchorOptions;
2112
- /**
2113
- * Options for `markdown-it-attrs`
2114
- * @see https://github.com/arve0/markdown-it-attrs
2115
- */
2116
- attrs?: {
2117
- leftDelimiter?: string;
2118
- rightDelimiter?: string;
2119
- allowedAttributes?: Array<string | RegExp>;
2120
- disable?: boolean;
2121
- };
2122
- /**
2123
- * Options for `markdown-it-emoji`
2124
- * @see https://github.com/markdown-it/markdown-it-emoji
2125
- */
2126
- emoji?: {
2127
- defs?: Record<string, string>;
2128
- enabled?: string[];
2129
- shortcuts?: Record<string, string | string[]>;
2130
- };
2131
- /**
2132
- * Options for `@mdit-vue/plugin-frontmatter`
2133
- * @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-frontmatter
2134
- */
2135
- frontmatter?: FrontmatterPluginOptions;
2136
- /**
2137
- * Options for `@mdit-vue/plugin-headers`
2138
- * @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-headers
2139
- */
2140
- headers?: HeadersPluginOptions | boolean;
2141
- /**
2142
- * Options for `@mdit-vue/plugin-sfc`
2143
- * @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-sfc
2144
- */
2145
- sfc?: SfcPluginOptions;
2146
- /**
2147
- * Options for `@mdit-vue/plugin-toc`
2148
- * @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-toc
2149
- */
2150
- toc?: TocPluginOptions;
2151
- /**
2152
- * Options for `@mdit-vue/plugin-component`
2153
- * @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-component
2154
- */
2155
- component?: ComponentPluginOptions;
2156
- /**
2157
- * Options for `markdown-it-container`
2158
- * @see https://github.com/markdown-it/markdown-it-container
2159
- */
2160
- container?: ContainerOptions;
2161
- /**
2162
- * Math support
2163
- *
2164
- * You need to install `markdown-it-mathjax3` and set `math` to `true` to enable it.
2165
- * You can also pass options to `markdown-it-mathjax3` here.
2166
- * @default false
2167
- * @see https://vitepress.dev/guide/markdown#math-equations
2168
- */
2169
- math?: boolean | any;
2170
- image?: Options$1;
2171
- /**
2172
- * Allows disabling the github alerts plugin
2173
- * @default true
2174
- * @see https://vitepress.dev/guide/markdown#github-flavored-alerts
2175
- */
2176
- gfmAlerts?: boolean;
1260
+ interface RouteModule {
1261
+ watch?: string[] | string;
1262
+ paths: UserRouteConfig[] | ((watchedFiles: string[]) => Awaitable<UserRouteConfig[]>);
1263
+ transformPageData?: UserConfig['transformPageData'];
1264
+ options?: {
1265
+ globOptions?: GlobOptions;
1266
+ };
2177
1267
  }
2178
- type MarkdownRenderer = MarkdownIt;
2179
- declare function disposeMdItInstance(): void;
2180
1268
  /**
2181
- * @experimental
1269
+ * Helper for defining routes with type inference
2182
1270
  */
2183
- declare function createMarkdownRenderer(srcDir: string, options?: MarkdownOptions, base?: string, logger?: Pick<Logger, 'warn'>): Promise<MarkdownRenderer>;
2184
-
2185
- type RawConfigExports<ThemeConfig = any> = Awaitable<UserConfig<ThemeConfig>> | (() => Awaitable<UserConfig<ThemeConfig>>);
2186
- interface TransformContext {
2187
- page: string;
2188
- siteConfig: SiteConfig;
2189
- siteData: SiteData;
2190
- pageData: PageData;
2191
- title: string;
2192
- description: string;
2193
- head: HeadConfig[];
2194
- content: string;
2195
- assets: string[];
2196
- }
2197
- interface UserRouteConfig {
2198
- params: Record<string, string>;
2199
- content?: string;
1271
+ export declare function defineRoutes(loader: RouteModule): RouteModule;
1272
+ type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
1273
+ export declare function resolvePages(siteConfig: Optional<SiteConfig, 'pages' | 'dynamicRoutes' | 'rewrites'>, rebuildCache?: boolean): Promise<void>;
1274
+ //#endregion
1275
+ //#region src/node/siteConfig.d.ts
1276
+ /**
1277
+ * A config object, or a function returning one. Both can be async.
1278
+ */
1279
+ export type RawConfigExports<ThemeConfig = any> = Awaitable<UserConfig<ThemeConfig>> | (() => Awaitable<UserConfig<ThemeConfig>>);
1280
+ /**
1281
+ * Context passed to the `transformHead` and `transformHtml` build hooks.
1282
+ */
1283
+ export interface TransformContext<ThemeConfig = any> {
1284
+ /**
1285
+ * Name of the output HTML file, relative to the output directory.
1286
+ */
1287
+ page: string;
1288
+ /**
1289
+ * The resolved site config.
1290
+ */
1291
+ siteConfig: SiteConfig<ThemeConfig>;
1292
+ /**
1293
+ * The resolved site data.
1294
+ */
1295
+ siteData: SiteData$2;
1296
+ /**
1297
+ * Data of the page being rendered.
1298
+ */
1299
+ pageData: PageData;
1300
+ /**
1301
+ * Full title of the page, including the site title suffix.
1302
+ */
1303
+ title: string;
1304
+ /**
1305
+ * Description of the page.
1306
+ */
1307
+ description: string;
1308
+ /**
1309
+ * Head entries that are going to be written to the page.
1310
+ */
1311
+ head: HeadConfig$1[];
1312
+ /**
1313
+ * Rendered HTML of the page content.
1314
+ */
1315
+ content: string;
1316
+ /**
1317
+ * Assets referenced by the page.
1318
+ */
1319
+ assets: string[];
2200
1320
  }
2201
- type ResolvedRouteConfig = UserRouteConfig & {
2202
- /**
2203
- * the raw route (relative to src root), e.g. foo/[bar].md
2204
- */
2205
- route: string;
2206
- /**
2207
- * the actual path with params resolved (relative to src root), e.g. foo/1.md
2208
- */
2209
- path: string;
2210
- /**
2211
- * absolute fs path
2212
- */
2213
- fullPath: string;
2214
- };
2215
- interface TransformPageContext {
2216
- siteConfig: SiteConfig;
1321
+ /**
1322
+ * Context passed to the `transformPageData` hook.
1323
+ */
1324
+ export interface TransformPageContext<ThemeConfig = any> {
1325
+ /**
1326
+ * The resolved site config.
1327
+ */
1328
+ siteConfig: SiteConfig<ThemeConfig>;
2217
1329
  }
2218
- interface UserConfig<ThemeConfig = any> extends LocaleSpecificConfig<ThemeConfig> {
2219
- extends?: RawConfigExports<ThemeConfig>;
2220
- base?: string;
2221
- srcDir?: string;
2222
- srcExclude?: string[];
2223
- outDir?: string;
2224
- assetsDir?: string;
2225
- cacheDir?: string;
2226
- shouldPreload?: (link: string, page: string) => boolean;
2227
- locales?: LocaleConfig<ThemeConfig>;
2228
- router?: {
2229
- prefetchLinks?: boolean;
2230
- };
2231
- appearance?: boolean | 'dark' | 'force-dark' | 'force-auto' | (Omit<UseDarkOptions, 'initialValue'> & {
2232
- initialValue?: 'dark';
2233
- });
2234
- lastUpdated?: boolean;
2235
- contentProps?: Record<string, any>;
2236
- /**
2237
- * MarkdownIt options
2238
- */
2239
- markdown?: MarkdownOptions;
2240
- /**
2241
- * Options to pass on to `@vitejs/plugin-vue`
2242
- */
2243
- vue?: Options$4;
2244
- /**
2245
- * Vite config
2246
- */
2247
- vite?: UserConfig$1 & {
2248
- configFile?: string | false;
2249
- };
2250
- /**
2251
- * Configure the scroll offset when the theme has a sticky header.
2252
- * Can be a number or a selector element to get the offset from.
2253
- * Can also be an array of selectors in case some elements will be
2254
- * invisible due to responsive layout. VitePress will fallback to the next
2255
- * selector if a selector fails to match, or the matched element is not
2256
- * currently visible in viewport.
2257
- */
2258
- scrollOffset?: number | string | string[] | {
2259
- selector: string | string[];
2260
- padding: number;
2261
- };
2262
- /**
2263
- * Enable MPA / zero-JS mode.
2264
- * @experimental
2265
- */
2266
- mpa?: boolean;
2267
- /**
2268
- * Extracts metadata to a separate chunk.
2269
- * @experimental
2270
- */
2271
- metaChunk?: boolean;
2272
- /**
2273
- * Don't fail builds due to dead links.
2274
- *
2275
- * @default false
2276
- */
2277
- ignoreDeadLinks?: boolean | 'localhostLinks' | (string | RegExp | ((link: string) => boolean))[];
2278
- /**
2279
- * Don't force `.html` on URLs.
2280
- *
2281
- * @default false
2282
- */
2283
- cleanUrls?: boolean;
2284
- /**
2285
- * Use web fonts instead of emitting font files to dist.
2286
- * The used theme should import a file named `fonts.(s)css` for this to work.
2287
- * If you are a theme author, to support this, place your web font import
2288
- * between `webfont-marker-begin` and `webfont-marker-end` comments.
2289
- *
2290
- * @default true in webcontainers, else false
2291
- */
2292
- useWebFonts?: boolean;
2293
- /**
2294
- * This option allows you to configure the concurrency of the build.
2295
- * A lower number will reduce the memory usage but will increase the build time.
2296
- *
2297
- * @experimental
2298
- * @default 64
2299
- */
2300
- buildConcurrency?: number;
2301
- /**
2302
- * @experimental
2303
- *
2304
- * source -> destination
2305
- */
2306
- rewrites?: Record<string, string> | ((id: string) => string);
2307
- /**
2308
- * @experimental
2309
- */
2310
- sitemap?: SitemapStreamOptions & {
2311
- hostname: string;
2312
- transformItems?: (items: SitemapItem[]) => Awaitable<SitemapItem[]>;
2313
- };
2314
- /**
2315
- * Build end hook: called when SSG finish.
2316
- * @param siteConfig The resolved configuration.
2317
- */
2318
- buildEnd?: (siteConfig: SiteConfig) => Awaitable<void>;
2319
- /**
2320
- * Render end hook: called when SSR rendering is done.
2321
- */
2322
- postRender?: (context: SSGContext) => Awaitable<SSGContext | void>;
2323
- /**
2324
- * Head transform hook: runs before writing HTML to dist.
2325
- *
2326
- * This build hook will allow you to modify the head adding new entries that cannot be statically added.
2327
- */
2328
- transformHead?: (context: TransformContext) => Awaitable<HeadConfig[] | void>;
1330
+ /**
1331
+ * VitePress config, usually defined in `.vitepress/config.[ext]`.
1332
+ */
1333
+ export interface UserConfig<ThemeConfig = any> extends LocaleSpecificConfig<ThemeConfig> {
1334
+ /**
1335
+ * Config to inherit from. Its values are recursively merged with (and
1336
+ * overridden by) this config. Commonly used to extend a base config
1337
+ * shared by a theme.
1338
+ */
1339
+ extends?: RawConfigExports<ThemeConfig>;
1340
+ /**
1341
+ * The base URL the site is deployed at. Usually starts and ends with a
1342
+ * slash. Use `'./'` to make page references relative to their own depth,
1343
+ * so the output works at any subpath.
1344
+ * @default '/'
1345
+ */
1346
+ base?: string;
1347
+ /**
1348
+ * Directory containing the markdown source files, relative to the
1349
+ * project root.
1350
+ * @default '.'
1351
+ */
1352
+ srcDir?: string;
1353
+ /**
1354
+ * Glob patterns for source files to exclude from the site.
1355
+ * @example ['**\/README.md', '**\/TODO.md']
1356
+ */
1357
+ srcExclude?: string[];
1358
+ /**
1359
+ * Build output location, relative to the project root.
1360
+ * @default './.vitepress/dist'
1361
+ */
1362
+ outDir?: string;
1363
+ /**
1364
+ * Directory for assets within the build output. Must not be outside
1365
+ * of `outDir`.
1366
+ * @default 'assets'
1367
+ */
1368
+ assetsDir?: string;
1369
+ /**
1370
+ * URL prefix for built assets (everything under `assetsDir`), e.g. a CDN.
1371
+ *
1372
+ * Must be one of:
1373
+ * - an absolute URL
1374
+ * - a protocol-relative URL
1375
+ * - a root-absolute path
1376
+ *
1377
+ * The prefix must mirror `outDir` layout: each asset URL = this prefix +
1378
+ * file output-relative path.
1379
+ *
1380
+ * These still use `base`:
1381
+ * - pages
1382
+ * - `withBase` links
1383
+ * - `public/` files
1384
+ * - `hashmap.json`
1385
+ *
1386
+ * If the prefix is cross-origin, it must serve CORS headers, because
1387
+ * generated tags are marked `crossorigin`.
1388
+ *
1389
+ * Applies to builds and preview (not dev).
1390
+ *
1391
+ * @example 'https://cdn.example.com/'
1392
+ */
1393
+ assetsBase?: string;
1394
+ /**
1395
+ * Number of subdirectories to spread the generated assets over
1396
+ * (`assetsDir/0` ... `assetsDir/N-1`) for hosts that cap the files per
1397
+ * directory. Page chunks and imported assets are distributed by a hash of
1398
+ * their name; shared chunks stay in `assetsDir/chunks`.
1399
+ *
1400
+ * @experimental
1401
+ * @example 4
1402
+ */
1403
+ assetsShards?: number;
1404
+ /**
1405
+ * Options for the generated icon stylesheet (`vp-icons.*.css`).
1406
+ */
1407
+ icons?: {
2329
1408
  /**
2330
- * HTML transform hook: runs before writing HTML to dist.
1409
+ * Fully qualified `collection:name` icons to include in addition to
1410
+ * the ones collected during SSR — for icons that only render
1411
+ * client-side (e.g. inside `<ClientOnly>`).
1412
+ * @example ['mdi:home', 'simple-icons:discord']
2331
1413
  */
2332
- transformHtml?: (code: string, id: string, ctx: TransformContext) => Awaitable<string | void>;
1414
+ include?: string[];
1415
+ };
1416
+ /**
1417
+ * Directory for cache files, relative to the project root.
1418
+ * @default './.vitepress/cache'
1419
+ */
1420
+ cacheDir?: string;
1421
+ /**
1422
+ * Decides whether a page emits a preload link for an async chunk.
1423
+ * All chunks are preloaded by default.
1424
+ */
1425
+ shouldPreload?: (link: string, page: string) => boolean;
1426
+ /**
1427
+ * Locale-specific configs, keyed by the locale's path prefix (with
1428
+ * `root` denoting the default locale).
1429
+ * @see https://vitepress.dev/guide/i18n
1430
+ */
1431
+ locales?: LocaleConfig<ThemeConfig>;
1432
+ /**
1433
+ * Client router options.
1434
+ */
1435
+ router?: {
2333
1436
  /**
2334
- * PageData transform hook: runs when rendering markdown to vue
1437
+ * Prefetch the chunks of in-viewport links in idle time.
1438
+ * @default true
2335
1439
  */
2336
- transformPageData?: (pageData: PageData, ctx: TransformPageContext) => Awaitable<Partial<PageData> | {
2337
- [key: string]: any;
2338
- } | void>;
2339
- }
2340
- interface SiteConfig<ThemeConfig = any> extends Pick<UserConfig, 'markdown' | 'vue' | 'vite' | 'shouldPreload' | 'router' | 'mpa' | 'metaChunk' | 'lastUpdated' | 'ignoreDeadLinks' | 'cleanUrls' | 'useWebFonts' | 'postRender' | 'buildEnd' | 'transformHead' | 'transformHtml' | 'transformPageData' | 'sitemap'> {
2341
- root: string;
2342
- srcDir: string;
2343
- site: SiteData<ThemeConfig>;
2344
- configPath: string | undefined;
2345
- configDeps: string[];
2346
- themeDir: string;
2347
- outDir: string;
2348
- assetsDir: string;
2349
- cacheDir: string;
2350
- tempDir: string;
2351
- pages: string[];
2352
- dynamicRoutes: {
2353
- routes: ResolvedRouteConfig[];
2354
- fileToModulesMap: Record<string, Set<string>>;
2355
- };
2356
- rewrites: {
2357
- map: Record<string, string | undefined>;
2358
- inv: Record<string, string | undefined>;
2359
- };
2360
- logger: Logger;
2361
- userConfig: UserConfig;
2362
- buildConcurrency: number;
1440
+ prefetchLinks?: boolean;
1441
+ };
1442
+ /**
1443
+ * Dark mode handling:
1444
+ * - `true`: light by default, with a user toggle
1445
+ * - `'dark'`: dark by default, with a user toggle
1446
+ * - `false`: no dark mode
1447
+ * - `'force-dark'`: always dark
1448
+ * - `'force-auto'`: always follow the system preference
1449
+ * - options for `@vueuse/core`'s `useDark`
1450
+ * @default true
1451
+ */
1452
+ appearance?: boolean | 'dark' | 'force-dark' | 'force-auto' | (Omit<UseDarkOptions, 'initialValue'> & {
1453
+ initialValue?: 'dark';
1454
+ });
1455
+ /**
1456
+ * Show the timestamp of each page's last git commit.
1457
+ * @default false
1458
+ */
1459
+ lastUpdated?: boolean;
1460
+ /**
1461
+ * Custom props passed to the `<Content />` component.
1462
+ */
1463
+ contentProps?: Record<string, any>;
1464
+ /**
1465
+ * Markdown rendering options.
1466
+ */
1467
+ markdown?: MarkdownOptions;
1468
+ /**
1469
+ * Options passed to `@vitejs/plugin-vue`.
1470
+ */
1471
+ vue?: Options$1;
1472
+ /**
1473
+ * Vite config to merge with the default one. `configFile` can point
1474
+ * to an additional vite config file to load, or be `false` to load
1475
+ * none.
1476
+ */
1477
+ vite?: UserConfig$1 & {
1478
+ configFile?: string | false;
1479
+ };
1480
+ /**
1481
+ * Enable MPA / zero-JS mode: pages ship without a client-side
1482
+ * JavaScript payload and navigation does full page loads.
1483
+ * @experimental
1484
+ * @default false
1485
+ * @see https://vitepress.dev/guide/mpa-mode
1486
+ */
1487
+ mpa?: boolean;
1488
+ /**
1489
+ * Don't fail builds due to dead links. Accepts `true` (ignore all),
1490
+ * `'localhostLinks'` (only ignore localhost links), or an array of
1491
+ * exact strings, regexes, and custom filter functions.
1492
+ * @default false
1493
+ */
1494
+ ignoreDeadLinks?: boolean | 'localhostLinks' | (string | RegExp | ((link: string, source: string) => boolean))[];
1495
+ /**
1496
+ * Generate `/foo` instead of `/foo.html` for pages and internal
1497
+ * links. Requires matching support from the hosting platform.
1498
+ * @default false
1499
+ * @see https://vitepress.dev/guide/routing#generating-clean-url
1500
+ */
1501
+ cleanUrls?: boolean;
1502
+ /**
1503
+ * Use web fonts instead of emitting font files to dist. Requires the
1504
+ * active theme to import a file named `fonts.(s)css`, with its web font
1505
+ * imports placed between `webfont-marker-begin` and `webfont-marker-end`
1506
+ * comments.
1507
+ * @experimental
1508
+ * @default true in webcontainers, else false
1509
+ */
1510
+ useWebFonts?: boolean;
1511
+ /**
1512
+ * Number of pages rendered concurrently during the build. Lower
1513
+ * values reduce the memory usage at the cost of build time.
1514
+ * @default 64
1515
+ */
1516
+ buildConcurrency?: number;
1517
+ /**
1518
+ * Source-to-destination page path mappings, or a function returning
1519
+ * the destination path for a source path. Used to serve pages at
1520
+ * URLs different from their directory structure.
1521
+ * @see https://vitepress.dev/guide/routing#route-rewrites
1522
+ */
1523
+ rewrites?: Record<string, string> | ((id: string) => string);
1524
+ /**
1525
+ * Generate a `sitemap.xml` during build. `transformItems` can adjust
1526
+ * the entries before they are written.
1527
+ * @see https://vitepress.dev/guide/sitemap-generation
1528
+ */
1529
+ sitemap?: SitemapStreamOptions & {
1530
+ hostname: string;
1531
+ transformItems?: (items: SitemapItem[]) => Awaitable<SitemapItem[]>;
1532
+ };
1533
+ /**
1534
+ * Build hook, called once after the site is fully built - e.g. to
1535
+ * generate an RSS feed.
1536
+ */
1537
+ buildEnd?: (siteConfig: SiteConfig<ThemeConfig>) => Awaitable<void>;
1538
+ /**
1539
+ * Build hook, called after each page's SSG render - e.g. to handle
1540
+ * teleported content.
1541
+ */
1542
+ postRender?: (context: SSGContext) => Awaitable<SSGContext | void>;
1543
+ /**
1544
+ * Build hook for adding head entries that cannot be statically
1545
+ * declared, called before a page's HTML is written to disk. Returned
1546
+ * entries are merged with the existing ones.
1547
+ */
1548
+ transformHead?: (ctx: TransformContext<ThemeConfig>) => Awaitable<HeadConfig$1[] | void>;
1549
+ /**
1550
+ * Build hook for transforming a page's final HTML, called before it
1551
+ * is written to disk.
1552
+ */
1553
+ transformHtml?: (code: string, id: string, ctx: TransformContext<ThemeConfig>) => Awaitable<string | void>;
1554
+ /**
1555
+ * Hook for augmenting the data of each page, applied when rendering
1556
+ * markdown to vue in both dev and build. Returned values are merged
1557
+ * into the page data.
1558
+ */
1559
+ transformPageData?: (pageData: PageData, ctx: TransformPageContext<ThemeConfig>) => Awaitable<Partial<PageData> | {
1560
+ [key: string]: any;
1561
+ } | void>;
1562
+ /**
1563
+ * Multi-layer configuration overloading: additional configs that
1564
+ * apply to the pages in their directory and below, either as a dict
1565
+ * keyed by path or as a loader function.
1566
+ * Auto-resolves to `docs/.../config.{js,mjs,ts,mts}` when unspecified.
1567
+ *
1568
+ * Set to `{}` to opt-out.
1569
+ * @experimental
1570
+ */
1571
+ additionalConfig?: AdditionalConfigDict<ThemeConfig> | AdditionalConfigLoader<ThemeConfig>;
2363
1572
  }
2364
-
2365
- declare function resolvePages(srcDir: string, userConfig: UserConfig, logger: Logger): Promise<{
2366
- pages: string[];
2367
- dynamicRoutes: {
2368
- routes: ResolvedRouteConfig[];
2369
- fileToModulesMap: Record<string, Set<string>>;
2370
- };
2371
- rewrites: {
2372
- map: Record<string, string>;
2373
- inv: Record<string, string>;
2374
- };
2375
- }>;
2376
-
2377
- type UserConfigFn<ThemeConfig> = (env: ConfigEnv) => UserConfig<ThemeConfig> | Promise<UserConfig<ThemeConfig>>;
2378
- type UserConfigExport<ThemeConfig> = UserConfig<ThemeConfig> | Promise<UserConfig<ThemeConfig>> | UserConfigFn<ThemeConfig>;
1573
+ /**
1574
+ * The resolved config, as exposed to build hooks and plugins.
1575
+ */
1576
+ export interface SiteConfig<ThemeConfig = any> extends Pick<UserConfig<ThemeConfig>, 'markdown' | 'vue' | 'vite' | 'shouldPreload' | 'router' | 'mpa' | 'lastUpdated' | 'ignoreDeadLinks' | 'cleanUrls' | 'useWebFonts' | 'postRender' | 'buildEnd' | 'transformHead' | 'transformHtml' | 'transformPageData' | 'sitemap' | 'icons'> {
1577
+ /**
1578
+ * Absolute path of the project root (the directory containing
1579
+ * `.vitepress`).
1580
+ */
1581
+ root: string;
1582
+ /**
1583
+ * Absolute path of the directory containing the markdown sources.
1584
+ */
1585
+ srcDir: string;
1586
+ /**
1587
+ * Absolute path of the public assets directory. Empty string when
1588
+ * disabled through vite's `publicDir` option.
1589
+ */
1590
+ publicDir: string;
1591
+ /**
1592
+ * The resolved site data.
1593
+ */
1594
+ site: SiteData$2<ThemeConfig>;
1595
+ /**
1596
+ * Absolute path of the loaded config file, if any.
1597
+ */
1598
+ configPath: string | undefined;
1599
+ /**
1600
+ * Absolute paths of the files the config depends on, watched to
1601
+ * restart the dev server.
1602
+ */
1603
+ configDeps: string[];
1604
+ /**
1605
+ * Absolute path of the active theme's directory.
1606
+ */
1607
+ themeDir: string;
1608
+ /**
1609
+ * Absolute path of the build output directory.
1610
+ */
1611
+ outDir: string;
1612
+ /**
1613
+ * Directory for assets within the build output.
1614
+ */
1615
+ assetsDir: string;
1616
+ /**
1617
+ * URL prefix for built assets, normalized to end with a slash.
1618
+ */
1619
+ assetsBase?: string;
1620
+ /**
1621
+ * Number of subdirectories the generated assets are spread over.
1622
+ */
1623
+ assetsShards?: number;
1624
+ /**
1625
+ * Absolute path of the cache directory.
1626
+ */
1627
+ cacheDir: string;
1628
+ /**
1629
+ * Absolute path of the temp directory used during the build.
1630
+ */
1631
+ tempDir: string;
1632
+ /**
1633
+ * Markdown source paths, relative to `srcDir`.
1634
+ */
1635
+ pages: string[];
1636
+ /**
1637
+ * The resolved dynamic routes.
1638
+ */
1639
+ dynamicRoutes: ResolvedRouteConfig[];
1640
+ /**
1641
+ * The resolved page rewrites: `map` goes from source path to
1642
+ * rewritten path, `inv` the other way around.
1643
+ */
1644
+ rewrites: {
1645
+ map: Record<string, string | undefined>;
1646
+ inv: Record<string, string | undefined>;
1647
+ };
1648
+ /**
1649
+ * The logger used by vite.
1650
+ */
1651
+ logger: Logger;
1652
+ /**
1653
+ * The raw user config this config was resolved from.
1654
+ */
1655
+ userConfig: UserConfig<ThemeConfig>;
1656
+ /**
1657
+ * Number of pages rendered concurrently during the build.
1658
+ */
1659
+ buildConcurrency: number;
1660
+ }
1661
+ //#endregion
1662
+ //#region src/node/config.d.ts
1663
+ export declare function normalizeSiteBase(base?: string): string;
1664
+ export declare function normalizeAssetsBase(assetsBase: string): string;
1665
+ export type UserConfigFn<ThemeConfig> = (env: ConfigEnv) => Awaitable<UserConfig<ThemeConfig>>;
1666
+ export type UserConfigExport<ThemeConfig> = Awaitable<UserConfig<ThemeConfig>> | UserConfigFn<ThemeConfig>;
2379
1667
  /**
2380
1668
  * Type config helper
2381
1669
  */
2382
- declare function defineConfig(config: UserConfig<DefaultTheme.Config>): UserConfig<DefaultTheme.Config>;
1670
+ export declare function defineConfig<ThemeConfig = DefaultTheme.Config>(config: UserConfig<NoInfer<ThemeConfig>>): UserConfig<NoInfer<ThemeConfig>>;
1671
+ export type AdditionalConfigFn<ThemeConfig> = (env: ConfigEnv) => Awaitable<AdditionalConfig<ThemeConfig>>;
1672
+ export type AdditionalConfigExport<ThemeConfig> = Awaitable<AdditionalConfig<ThemeConfig>> | AdditionalConfigFn<ThemeConfig>;
1673
+ /**
1674
+ * Type config helper for additional/locale-specific config
1675
+ */
1676
+ export declare function defineAdditionalConfig<ThemeConfig = DefaultTheme.Config>(config: AdditionalConfig<NoInfer<ThemeConfig>>): AdditionalConfig<NoInfer<ThemeConfig>>;
2383
1677
  /**
2384
1678
  * Type config helper for custom theme config
1679
+ *
1680
+ * @deprecated use `defineConfig` instead
2385
1681
  */
2386
- declare function defineConfigWithTheme<ThemeConfig>(config: UserConfig<ThemeConfig>): UserConfig<ThemeConfig>;
2387
- declare function resolveConfig(root?: string, command?: 'serve' | 'build', mode?: string): Promise<SiteConfig>;
2388
- declare function resolveUserConfig(root: string, command: 'serve' | 'build', mode: string): Promise<[UserConfig, string | undefined, string[]]>;
2389
- declare function mergeConfig(a: UserConfig, b: UserConfig, isRoot?: boolean): Record<string, any>;
2390
- declare function resolveSiteData(root: string, userConfig?: UserConfig, command?: 'serve' | 'build', mode?: string): Promise<SiteData>;
2391
-
2392
- declare function build(root?: string, buildOptions?: BuildOptions & {
2393
- base?: string;
2394
- mpa?: string;
2395
- onAfterConfigResolve?: (siteConfig: SiteConfig) => Awaitable<void>;
1682
+ export declare function defineConfigWithTheme<ThemeConfig>(config: UserConfig<ThemeConfig>): UserConfig<ThemeConfig>;
1683
+ export declare function resolveConfig(root?: string, command?: 'serve' | 'build', mode?: string): Promise<SiteConfig>;
1684
+ export declare function isAdditionalConfigFile(path: string): boolean;
1685
+ export declare function resolveUserConfig(root: string, command: 'serve' | 'build', mode: string): Promise<[UserConfig, configPath: string | undefined, configDeps: string[]]>;
1686
+ export declare function mergeConfig<A extends object, B extends object>(a: A, b: B, isRoot?: boolean): A & B;
1687
+ export declare function resolveSiteData(root: string, userConfig?: UserConfig, command?: 'serve' | 'build', mode?: string): Promise<SiteData$2>;
1688
+ //#endregion
1689
+ //#region src/node/build/build.d.ts
1690
+ export declare function build(root?: string, buildOptions?: BuildOptions & {
1691
+ base?: string;
1692
+ assetsBase?: string;
1693
+ mpa?: string;
1694
+ onAfterConfigResolve?: (siteConfig: SiteConfig) => Awaitable<void>;
2396
1695
  }): Promise<void>;
2397
-
2398
- interface GlobOptions {
2399
- absolute?: boolean;
2400
- cwd?: string;
2401
- patterns?: string | string[];
2402
- ignore?: string | string[];
2403
- dot?: boolean;
2404
- deep?: number;
2405
- followSymbolicLinks?: boolean;
2406
- caseSensitiveMatch?: boolean;
2407
- expandDirectories?: boolean;
2408
- onlyDirectories?: boolean;
2409
- onlyFiles?: boolean;
2410
- }
2411
-
2412
- interface ContentOptions<T = ContentData[]> {
2413
- /**
2414
- * Include src?
2415
- * @default false
2416
- */
2417
- includeSrc?: boolean;
2418
- /**
2419
- * Render src to HTML and include in data?
2420
- * @default false
2421
- */
2422
- render?: boolean;
2423
- /**
2424
- * If `boolean`, whether to parse and include excerpt? (rendered as HTML)
2425
- *
2426
- * If `function`, control how the excerpt is extracted from the content.
2427
- *
2428
- * If `string`, define a custom separator to be used for extracting the
2429
- * excerpt. Default separator is `---` if `excerpt` is `true`.
2430
- *
2431
- * @see https://github.com/jonschlinkert/gray-matter#optionsexcerpt
2432
- * @see https://github.com/jonschlinkert/gray-matter#optionsexcerpt_separator
2433
- *
2434
- * @default false
2435
- */
2436
- excerpt?: boolean | ((file: {
2437
- data: {
2438
- [key: string]: any;
2439
- };
2440
- content: string;
2441
- excerpt?: string;
2442
- }, options?: any) => void) | string;
2443
- /**
2444
- * Transform the data. Note the data will be inlined as JSON in the client
2445
- * bundle if imported from components or markdown files.
2446
- */
2447
- transform?: (data: ContentData[]) => T | Promise<T>;
2448
- /**
2449
- * Options to pass to `tinyglobby`.
2450
- * You'll need to manually specify `node_modules` and `dist` in
2451
- * `globOptions.ignore` if you've overridden it.
2452
- */
2453
- globOptions?: GlobOptions;
1696
+ //#endregion
1697
+ //#region src/node/contentLoader.d.ts
1698
+ export interface ContentOptions<T = ContentData[]> {
1699
+ /**
1700
+ * Include src?
1701
+ * @default false
1702
+ */
1703
+ includeSrc?: boolean;
1704
+ /**
1705
+ * Render src to HTML and include in data?
1706
+ * @default false
1707
+ */
1708
+ render?: boolean;
1709
+ /**
1710
+ * If `boolean`, whether to parse and include excerpt? (rendered as HTML)
1711
+ *
1712
+ * If `function`, control how the excerpt is extracted from the content.
1713
+ *
1714
+ * If `string`, define a custom separator to be used for extracting the
1715
+ * excerpt. Default separator is `---` if `excerpt` is `true`.
1716
+ *
1717
+ * @see https://github.com/jonschlinkert/gray-matter#optionsexcerpt
1718
+ * @see https://github.com/jonschlinkert/gray-matter#optionsexcerpt_separator
1719
+ *
1720
+ * @default false
1721
+ */
1722
+ excerpt?: boolean | ((file: {
1723
+ data: {
1724
+ [key: string]: any;
1725
+ };
1726
+ content: string;
1727
+ excerpt?: string;
1728
+ }, options?: any) => void) | string;
1729
+ /**
1730
+ * Transform the data. Note the data will be inlined as JSON in the client
1731
+ * bundle if imported from components or markdown files.
1732
+ */
1733
+ transform?: (data: ContentData[]) => Awaitable<T>;
1734
+ /**
1735
+ * Options to pass to `tinyglobby` and `picomatch` for globbing.
1736
+ */
1737
+ globOptions?: GlobOptions;
2454
1738
  }
2455
- interface ContentData {
2456
- url: string;
2457
- src: string | undefined;
2458
- html: string | undefined;
2459
- frontmatter: Record<string, any>;
2460
- excerpt: string | undefined;
1739
+ export interface ContentData {
1740
+ url: string;
1741
+ src: string | undefined;
1742
+ html: string | undefined;
1743
+ frontmatter: Record<string, any>;
1744
+ excerpt: string | undefined;
2461
1745
  }
2462
1746
  /**
2463
1747
  * Create a loader object that can be directly used as the default export
2464
1748
  * of a data loader file.
2465
1749
  */
2466
- declare function createContentLoader<T = ContentData[]>(
1750
+ export declare function createContentLoader<T = ContentData[]>(
2467
1751
  /**
2468
1752
  * files to glob / watch - relative to srcDir
2469
1753
  */
2470
- pattern: string | string[], { includeSrc, render, excerpt: renderExcerpt, transform, globOptions }?: ContentOptions<T>): {
2471
- watch: string | string[];
2472
- load: () => Promise<T>;
1754
+ watch: string | string[], options?: ContentOptions<T>): {
1755
+ watch: string[];
1756
+ options: {
1757
+ globOptions: GlobOptions | undefined;
1758
+ };
1759
+ load(files?: string[]): Promise<T>;
2473
1760
  };
2474
-
2475
- declare enum ScaffoldThemeType {
2476
- Default = "default theme",
2477
- DefaultCustom = "default theme + customization",
2478
- Custom = "custom theme"
2479
- }
2480
- interface ScaffoldOptions {
2481
- root: string;
2482
- title?: string;
2483
- description?: string;
2484
- theme: ScaffoldThemeType;
2485
- useTs: boolean;
2486
- injectNpmScripts: boolean;
2487
- }
2488
- declare function init(root: string | undefined): Promise<void>;
2489
- declare function scaffold({ root, title, description, theme, useTs, injectNpmScripts }: ScaffoldOptions): string;
2490
-
2491
- interface LoaderModule {
2492
- watch?: string[] | string;
2493
- load: (watchedFiles: string[]) => any;
1761
+ //#endregion
1762
+ //#region src/node/init/init.d.ts
1763
+ export declare const ScaffoldThemeType: {
1764
+ readonly Default: "default theme";
1765
+ readonly DefaultCustom: "default theme + customization";
1766
+ readonly Custom: "custom theme";
1767
+ };
1768
+ export type ScaffoldThemeType = (typeof ScaffoldThemeType)[keyof typeof ScaffoldThemeType];
1769
+ export interface ScaffoldOptions {
1770
+ root?: string;
1771
+ srcDir?: string;
1772
+ title?: string;
1773
+ description?: string;
1774
+ theme?: ScaffoldThemeType;
1775
+ useTs?: boolean;
1776
+ injectNpmScripts?: boolean;
1777
+ addNpmScriptsPrefix?: boolean;
1778
+ npmScriptsPrefix?: string;
1779
+ }
1780
+ export declare function init(root?: string): Promise<void>;
1781
+ export declare function scaffold({ root: root_, srcDir: srcDir_, title, description, theme, useTs, injectNpmScripts, addNpmScriptsPrefix, npmScriptsPrefix }: ScaffoldOptions): Promise<string>;
1782
+ //#endregion
1783
+ //#region src/node/plugins/staticDataPlugin.d.ts
1784
+ interface LoaderModule<T = any> {
1785
+ watch?: string[] | string;
1786
+ load: (watchedFiles: string[]) => Awaitable<T>;
1787
+ options?: {
1788
+ globOptions?: GlobOptions;
1789
+ };
2494
1790
  }
2495
1791
  /**
2496
1792
  * Helper for defining loaders with type inference
2497
1793
  */
2498
- declare function defineLoader(loader: LoaderModule): LoaderModule;
2499
-
2500
- interface Options {
2501
- prefix?: string | undefined;
2502
- exclude?: ReadonlyArray<string | RegExp> | undefined;
2503
- ignoreFiles?: ReadonlyArray<string | RegExp> | undefined;
2504
- includeFiles?: ReadonlyArray<string | RegExp> | undefined;
2505
- transform?:
2506
- | ((
2507
- prefix: Readonly<string>,
2508
- selector: Readonly<string>,
2509
- prefixedSelector: Readonly<string>,
2510
- file: Readonly<string>,
2511
- ) => string)
2512
- | undefined;
2513
- }
2514
-
2515
- declare function postcssPrefixSelector(options: Readonly<Options>): (root: Root) => void;
2516
-
2517
- declare function postcssIsolateStyles(options?: Parameters<typeof postcssPrefixSelector>[0]): ReturnType<typeof postcssPrefixSelector>;
2518
-
1794
+ export declare function defineLoader<T>(loader: LoaderModule<T>): LoaderModule<T>;
1795
+ //#endregion
1796
+ //#region src/node/postcss/isolateStyles.d.ts
1797
+ type Options$2 = {
1798
+ includeFiles?: RegExp[];
1799
+ ignoreFiles?: RegExp[];
1800
+ prefix?: string;
1801
+ };
1802
+ export declare function postcssIsolateStyles({ includeFiles, ignoreFiles, prefix }?: Options$2): Plugin$1;
1803
+ //#endregion
1804
+ //#region node_modules/.pnpm/@polka+url@1.0.0-next.29/node_modules/@polka/url/index.d.ts
2519
1805
  interface ParsedURL {
2520
- pathname: string;
2521
- search: string;
2522
- query: Record<string, string | string[]> | void;
2523
- raw: string;
2524
- }
2525
-
1806
+ pathname: string;
1807
+ search: string;
1808
+ query: Record<string, string | string[]> | undefined;
1809
+ hash: string | undefined;
1810
+ raw: string;
1811
+ }
1812
+ //#endregion
1813
+ //#region node_modules/.pnpm/trouter@4.0.0/node_modules/trouter/index.d.ts
2526
1814
  // Thank you: @fwilkerson, @stahlstift
2527
1815
  // ---
2528
-
2529
1816
  /** @type {import('http').METHODS} */
2530
- type Methods = 'ACL' | 'BIND' | 'CHECKOUT' | 'CONNECT' | 'COPY' | 'DELETE' | 'GET' | 'HEAD' | 'LINK' | 'LOCK' |'M-SEARCH' | 'MERGE' | 'MKACTIVITY' |'MKCALENDAR' | 'MKCOL' | 'MOVE' |'NOTIFY' | 'OPTIONS' | 'PATCH' | 'POST' | 'PRI' | 'PROPFIND' | 'PROPPATCH' | 'PURGE' | 'PUT' | 'REBIND' | 'REPORT' | 'SEARCH' | 'SOURCE' | 'SUBSCRIBE' | 'TRACE' | 'UNBIND' | 'UNLINK' | 'UNLOCK' | 'UNSUBSCRIBE';
2531
-
1817
+ type Methods = 'ACL' | 'BIND' | 'CHECKOUT' | 'CONNECT' | 'COPY' | 'DELETE' | 'GET' | 'HEAD' | 'LINK' | 'LOCK' | 'M-SEARCH' | 'MERGE' | 'MKACTIVITY' | 'MKCALENDAR' | 'MKCOL' | 'MOVE' | 'NOTIFY' | 'OPTIONS' | 'PATCH' | 'POST' | 'PRI' | 'PROPFIND' | 'PROPPATCH' | 'PURGE' | 'PUT' | 'REBIND' | 'REPORT' | 'SEARCH' | 'SOURCE' | 'SUBSCRIBE' | 'TRACE' | 'UNBIND' | 'UNLINK' | 'UNLOCK' | 'UNSUBSCRIBE';
2532
1818
  type Pattern = RegExp | string;
2533
-
2534
1819
  declare class Trouter<T = Function> {
2535
- find(method: Methods, url: string): {
2536
- params: Record<string, string>;
2537
- handlers: T[];
2538
- };
2539
- add(method: Methods, pattern: Pattern, ...handlers: T[]): this;
2540
- use(pattern: Pattern, ...handlers: T[]): this;
2541
- all(pattern: Pattern, ...handlers: T[]): this;
2542
- get(pattern: Pattern, ...handlers: T[]): this;
2543
- head(pattern: Pattern, ...handlers: T[]): this;
2544
- patch(pattern: Pattern, ...handlers: T[]): this;
2545
- options(pattern: Pattern, ...handlers: T[]): this;
2546
- connect(pattern: Pattern, ...handlers: T[]): this;
2547
- delete(pattern: Pattern, ...handlers: T[]): this;
2548
- trace(pattern: Pattern, ...handlers: T[]): this;
2549
- post(pattern: Pattern, ...handlers: T[]): this;
2550
- put(pattern: Pattern, ...handlers: T[]): this;
2551
- }
2552
-
1820
+ find(method: Methods, url: string): {
1821
+ params: Record<string, string>;
1822
+ handlers: T[];
1823
+ };
1824
+ add(method: Methods, pattern: Pattern, ...handlers: T[]): this;
1825
+ use(pattern: Pattern, ...handlers: T[]): this;
1826
+ all(pattern: Pattern, ...handlers: T[]): this;
1827
+ get(pattern: Pattern, ...handlers: T[]): this;
1828
+ head(pattern: Pattern, ...handlers: T[]): this;
1829
+ patch(pattern: Pattern, ...handlers: T[]): this;
1830
+ options(pattern: Pattern, ...handlers: T[]): this;
1831
+ connect(pattern: Pattern, ...handlers: T[]): this;
1832
+ delete(pattern: Pattern, ...handlers: T[]): this;
1833
+ trace(pattern: Pattern, ...handlers: T[]): this;
1834
+ post(pattern: Pattern, ...handlers: T[]): this;
1835
+ put(pattern: Pattern, ...handlers: T[]): this;
1836
+ }
1837
+ //#endregion
1838
+ //#region node_modules/.pnpm/polka@1.0.0-next.28/node_modules/polka/index.d.mts
2553
1839
  type Promisable<T> = Promise<T> | T;
2554
1840
  type ListenCallback = () => Promisable<void>;
2555
-
2556
1841
  interface IError extends Error {
2557
- code?: number;
2558
- status?: number;
2559
- details?: any;
1842
+ code?: number;
1843
+ status?: number;
1844
+ details?: any;
2560
1845
  }
2561
-
2562
1846
  type NextHandler = (err?: string | IError) => Promisable<void>;
2563
1847
  type ErrorHandler<T extends Request = Request> = (err: string | IError, req: T, res: Response, next: NextHandler) => Promisable<void>;
2564
1848
  type Middleware<T extends IncomingMessage = Request> = (req: T & Request, res: Response, next: NextHandler) => Promisable<void>;
2565
-
2566
1849
  type Response = ServerResponse;
2567
-
2568
1850
  interface Request extends IncomingMessage {
2569
- url: string;
2570
- method: string;
2571
- originalUrl: string;
2572
- params: Record<string, string>;
2573
- path: string;
2574
- search: string;
2575
- query: Record<string,string>;
2576
- body?: any;
2577
- _decoded?: true;
2578
- _parsedUrl: ParsedURL;
1851
+ url: string;
1852
+ method: string;
1853
+ originalUrl: string;
1854
+ params: Record<string, string>;
1855
+ path: string;
1856
+ search: string;
1857
+ query: Record<string, string>;
1858
+ body?: any;
1859
+ _decoded?: true;
1860
+ _parsedUrl: ParsedURL;
2579
1861
  }
2580
-
2581
1862
  interface Polka<T extends Request = Request> extends Trouter<Middleware<T>> {
2582
- readonly server: Server;
2583
- readonly wares: Middleware<T>[];
2584
-
2585
- readonly onError: ErrorHandler<T>;
2586
- readonly onNoMatch: Middleware<T>;
2587
-
2588
- readonly handler: Middleware<T>;
2589
- parse: (req: IncomingMessage) => ParsedURL;
2590
-
2591
- use(pattern: RegExp|string, ...handlers: (Polka<T> | Middleware<T>)[]): this;
2592
- use(...handlers: (Polka<T> | Middleware<T>)[]): this;
2593
-
2594
- listen(port?: number, hostname?: string, backlog?: number, callback?: ListenCallback): this;
2595
- listen(port?: number, hostname?: string, callback?: ListenCallback): this;
2596
- listen(port?: number, backlog?: number, callback?: ListenCallback): this;
2597
- listen(port?: number, callback?: ListenCallback): this;
2598
- listen(path: string, backlog?: number, callback?: ListenCallback): this;
2599
- listen(path: string, callback?: ListenCallback): this;
2600
- listen(options: ListenOptions, callback?: ListenCallback): this;
2601
- listen(handle: any, backlog?: number, callback?: ListenCallback): this;
2602
- listen(handle: any, callback?: ListenCallback): this;
2603
- }
2604
-
2605
- interface ServeOptions {
2606
- base?: string;
2607
- root?: string;
2608
- port?: number;
2609
- }
2610
- declare function serve(options?: ServeOptions): Promise<Polka<Request>>;
2611
-
2612
- declare function createServer(root?: string, serverOptions?: ServerOptions & {
2613
- base?: string;
2614
- }, recreateServer?: () => Promise<void>): Promise<vite.ViteDevServer>;
2615
-
2616
- export { type ContentData, type ContentOptions, type LoaderModule, type MarkdownOptions, type MarkdownRenderer, type RawConfigExports, type ResolvedRouteConfig, type ScaffoldOptions, ScaffoldThemeType, type ServeOptions, type SiteConfig, type ThemeOptions, type TransformContext, type TransformPageContext, type UserConfig, type UserConfigExport, type UserConfigFn, build, createContentLoader, createMarkdownRenderer, createServer, defineConfig, defineConfigWithTheme, defineLoader, disposeMdItInstance, init, mergeConfig, postcssIsolateStyles, resolveConfig, resolvePages, resolveSiteData, resolveUserConfig, scaffold, serve };
1863
+ readonly server: Server;
1864
+ readonly wares: Middleware<T>[];
1865
+ readonly onError: ErrorHandler<T>;
1866
+ readonly onNoMatch: Middleware<T>;
1867
+ readonly handler: Middleware<T>;
1868
+ parse: (req: IncomingMessage) => ParsedURL;
1869
+ use(pattern: RegExp | string, ...handlers: (Polka<T> | Middleware<T>)[]): this;
1870
+ use(...handlers: (Polka<T> | Middleware<T>)[]): this;
1871
+ listen(port?: number, hostname?: string, backlog?: number, callback?: ListenCallback): this;
1872
+ listen(port?: number, hostname?: string, callback?: ListenCallback): this;
1873
+ listen(port?: number, backlog?: number, callback?: ListenCallback): this;
1874
+ listen(port?: number, callback?: ListenCallback): this;
1875
+ listen(path: string, backlog?: number, callback?: ListenCallback): this;
1876
+ listen(path: string, callback?: ListenCallback): this;
1877
+ listen(options: ListenOptions, callback?: ListenCallback): this;
1878
+ listen(handle: any, backlog?: number, callback?: ListenCallback): this;
1879
+ listen(handle: any, callback?: ListenCallback): this;
1880
+ }
1881
+ //#endregion
1882
+ //#region src/node/serve/serve.d.ts
1883
+ export interface ServeOptions {
1884
+ base?: string;
1885
+ assetsBase?: string;
1886
+ root?: string;
1887
+ port?: number;
1888
+ }
1889
+ export declare function serve(options?: ServeOptions): Promise<Polka<Request>>;
1890
+ //#endregion
1891
+ //#region src/node/server.d.ts
1892
+ export declare function createServer(root?: string // for backwards compatibility
1893
+ , serverOptions?: ServerOptions & {
1894
+ base?: string;
1895
+ }, restartServer?: () => Promise<void>, config?: SiteConfig): Promise<import("vite").ViteDevServer>;
1896
+ //#endregion
1897
+ //#region src/node/utils/getGitTimestamp.d.ts
1898
+ export declare function cacheAllGitTimestamps(root: string, pathspec?: string[]): Promise<void>;
1899
+ export declare function getGitTimestamp(file: string): Promise<number>;
1900
+ //#endregion
1901
+ export { type ConfigEnv, type DefaultTheme, type HeadConfig, type Header, type LoaderModule, type MarkdownLocaleOptions, type Plugin, type ResolvedRouteConfig, type RouteModule, type SiteData, loadEnv };