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,6 +1,9 @@
1
1
  [class^='vpi-'],
2
2
  [class*=' vpi-'],
3
3
  .vp-icon {
4
+ /* an unresolved icon masks to nothing instead of a currentColor box */
5
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'/%3E");
6
+ display: inline-block;
4
7
  width: 1em;
5
8
  height: 1em;
6
9
  }
@@ -22,72 +25,89 @@
22
25
  }
23
26
 
24
27
  /* internal icons - used under ISC from https://lucide.dev/ */
25
- .vpi-align-left {
26
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E");
28
+ .vpi-text-align-start {
29
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 5H3m12 7H3m14 7H3'/%3E%3C/svg%3E");
27
30
  }
28
31
  .vpi-arrow-right,
29
32
  .vpi-arrow-down,
30
33
  .vpi-arrow-left,
31
34
  .vpi-arrow-up {
32
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
35
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 12h14m-7-7l7 7l-7 7'/%3E%3C/svg%3E");
33
36
  }
34
37
  .vpi-chevron-right,
35
38
  .vpi-chevron-down,
36
39
  .vpi-chevron-left,
37
40
  .vpi-chevron-up {
38
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
41
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m9 18l6-6l-6-6'/%3E%3C/svg%3E");
39
42
  }
40
43
  .vpi-chevron-down,
41
44
  .vpi-arrow-down {
42
- /*rtl:ignore*/
43
45
  transform: rotate(90deg);
44
46
  }
45
47
  .vpi-chevron-left,
46
48
  .vpi-arrow-left {
47
- /*rtl:ignore*/
48
49
  transform: rotate(180deg);
49
50
  }
50
51
  .vpi-chevron-up,
51
52
  .vpi-arrow-up {
52
- /*rtl:ignore*/
53
53
  transform: rotate(-90deg);
54
54
  }
55
+ /* these point along the reading direction ("right" means forward), so they
56
+ mirror in rtl; the vertical variants and the key glyphs stay put */
57
+ .vpi-text-align-start,
58
+ .vpi-arrow-left,
59
+ .vpi-arrow-right,
60
+ .vpi-chevron-left,
61
+ .vpi-chevron-right {
62
+ scale: var(--vp-direction-multiplier) 1;
63
+ }
55
64
  .vpi-square-pen {
56
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E");
65
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z'/%3E%3C/g%3E%3C/svg%3E");
57
66
  }
58
67
  .vpi-plus {
59
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E");
68
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 12h14m-7-7v14'/%3E%3C/svg%3E");
60
69
  }
61
70
  .vpi-sun {
62
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E");
71
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/g%3E%3C/svg%3E");
63
72
  }
64
73
  .vpi-moon {
65
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E");
74
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401'/%3E%3C/svg%3E");
66
75
  }
67
- .vpi-more-horizontal {
68
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E");
76
+ .vpi-ellipsis {
77
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/g%3E%3C/svg%3E");
69
78
  }
70
79
  .vpi-languages {
71
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E");
80
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m5 8l6 6m-7 0l6-6l2-3M2 5h12M7 2h1m14 20l-5-10l-5 10m2-4h6'/%3E%3C/svg%3E");
72
81
  }
73
82
  .vpi-heart {
74
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E");
83
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 9.5a5.5 5.5 0 0 1 9.591-3.676a.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5'/%3E%3C/svg%3E");
75
84
  }
76
85
  .vpi-search {
77
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
86
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='m21 21l-4.34-4.34'/%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3C/g%3E%3C/svg%3E");
87
+ }
88
+ .vpi-sparkles {
89
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8'%3E%3Cpath d='M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594zM20 2v4m2-2h-4'/%3E%3Ccircle cx='4' cy='20' r='2'/%3E%3C/g%3E%3C/svg%3E");
78
90
  }
79
91
  .vpi-layout-list {
80
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E");
92
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7m-7 5h7m-7 6h7m-7 5h7'/%3E%3C/g%3E%3C/svg%3E");
81
93
  }
82
94
  .vpi-delete {
83
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E");
95
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm2 4l6 6m0-6l-6 6'/%3E%3C/svg%3E");
84
96
  }
85
97
  .vpi-corner-down-left {
86
- --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E");
98
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3Cpath d='m9 10l-5 5l5 5'/%3E%3C/g%3E%3C/svg%3E");
87
99
  }
88
100
  :root {
89
101
  /* clipboard */
90
- --vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");
91
- /* clipboard-copy */
92
- --vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E");
102
+ --vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/g%3E%3C/svg%3E");
103
+ /* clipboard-check */
104
+ --vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14l2 2l4-4'/%3E%3C/g%3E%3C/svg%3E");
105
+ }
106
+
107
+ :root,
108
+ [dir='ltr'] {
109
+ --vp-icon-external-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5h10v10M19 5 5 19'/%3E%3C/svg%3E");
110
+ }
111
+ [dir='rtl'] {
112
+ --vp-icon-external-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 15V5h10M5 5l14 14'/%3E%3C/svg%3E");
93
113
  }
@@ -69,6 +69,11 @@
69
69
  --vp-c-yellow-3: #9f6a00;
70
70
  --vp-c-yellow-soft: rgba(234, 179, 8, 0.14);
71
71
 
72
+ --vp-c-orange-1: #9a4224;
73
+ --vp-c-orange-2: #b95a00;
74
+ --vp-c-orange-3: #c16200;
75
+ --vp-c-orange-soft: rgba(249, 115, 22, 0.14);
76
+
72
77
  --vp-c-red-1: #b8272c;
73
78
  --vp-c-red-2: #d5393e;
74
79
  --vp-c-red-3: #e0575b;
@@ -103,6 +108,11 @@
103
108
  --vp-c-yellow-3: #a46a0a;
104
109
  --vp-c-yellow-soft: rgba(234, 179, 8, 0.16);
105
110
 
111
+ --vp-c-orange-1: #fb8c00;
112
+ --vp-c-orange-2: #e46a02;
113
+ --vp-c-orange-3: #b45309;
114
+ --vp-c-orange-soft: rgba(249, 115, 22, 0.16);
115
+
106
116
  --vp-c-red-1: #f66f81;
107
117
  --vp-c-red-2: #f14158;
108
118
  --vp-c-red-3: #b62a3c;
@@ -256,22 +266,42 @@
256
266
  --vp-c-caution-soft: var(--vp-c-red-soft);
257
267
  }
258
268
 
269
+ :root:where(:has(.vp-graded-containers)) {
270
+ --vp-c-warning-1: var(--vp-c-orange-1);
271
+ --vp-c-warning-2: var(--vp-c-orange-2);
272
+ --vp-c-warning-3: var(--vp-c-orange-3);
273
+ --vp-c-warning-soft: var(--vp-c-orange-soft);
274
+
275
+ --vp-c-caution-1: var(--vp-c-yellow-1);
276
+ --vp-c-caution-2: var(--vp-c-yellow-2);
277
+ --vp-c-caution-3: var(--vp-c-yellow-3);
278
+ --vp-c-caution-soft: var(--vp-c-yellow-soft);
279
+ }
280
+
259
281
  /**
260
282
  * Typography
261
283
  * -------------------------------------------------------------------------- */
262
284
 
263
285
  :root {
264
- --vp-font-family-base: 'Inter', ui-sans-serif, system-ui, sans-serif,
265
- 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
266
- --vp-font-family-mono: ui-monospace, 'Menlo', 'Monaco', 'Consolas',
267
- 'Liberation Mono', 'Courier New', monospace;
268
- font-optical-sizing: auto;
269
- }
270
-
271
- :root:where(:lang(zh)) {
272
- --vp-font-family-base: 'Punctuation SC', 'Inter', ui-sans-serif, system-ui,
273
- sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
274
- 'Noto Color Emoji';
286
+ --vp-font-family-base:
287
+ -apple-system, BlinkMacSystemFont, sans-serif, 'Apple Color Emoji',
288
+ 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
289
+ --vp-font-family-mono:
290
+ ui-monospace, 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono',
291
+ 'Courier New', monospace;
292
+ }
293
+
294
+ [lang]:where(:lang(zh), :lang(ja), :lang(ko)) {
295
+ h1,
296
+ h2,
297
+ h3,
298
+ h4,
299
+ h5,
300
+ h6,
301
+ li,
302
+ p {
303
+ line-break: strict;
304
+ }
275
305
  }
276
306
 
277
307
  /**
@@ -283,7 +313,8 @@
283
313
  --vp-shadow-2: 0 3px 12px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.07);
284
314
  --vp-shadow-3: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.08);
285
315
  --vp-shadow-4: 0 14px 44px rgba(0, 0, 0, 0.12), 0 3px 9px rgba(0, 0, 0, 0.12);
286
- --vp-shadow-5: 0 18px 56px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.16);
316
+ --vp-shadow-5:
317
+ 0 18px 56px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.16);
287
318
  }
288
319
 
289
320
  /**
@@ -299,18 +330,33 @@
299
330
  --vp-z-index-sidebar: 60;
300
331
  }
301
332
 
302
- @media (min-width: 960px) {
333
+ @media (min-width: 60rem) {
303
334
  :root {
304
335
  --vp-z-index-sidebar: 25;
305
336
  }
306
337
  }
307
338
 
339
+ /**
340
+ * Direction
341
+ * -------------------------------------------------------------------------- */
342
+
343
+ :root,
344
+ [dir='ltr'] {
345
+ --vp-direction-multiplier: 1;
346
+ --vp-direction-mark: '\200E';
347
+ }
348
+
349
+ [dir='rtl'] {
350
+ --vp-direction-multiplier: -1;
351
+ --vp-direction-mark: '\200F';
352
+ }
353
+
308
354
  /**
309
355
  * Layouts
310
356
  * -------------------------------------------------------------------------- */
311
357
 
312
358
  :root {
313
- --vp-layout-max-width: 1440px;
359
+ --vp-layout-max-width: 90rem;
314
360
  }
315
361
 
316
362
  /**
@@ -337,10 +383,10 @@
337
383
  --vp-code-block-bg: var(--vp-c-bg-alt);
338
384
  --vp-code-block-divider-color: var(--vp-c-gutter);
339
385
 
340
- --vp-code-lang-color: var(--vp-c-text-3);
386
+ --vp-code-lang-color: var(--vp-c-text-2);
341
387
 
342
388
  --vp-code-line-highlight-color: var(--vp-c-default-soft);
343
- --vp-code-line-number-color: var(--vp-c-text-3);
389
+ --vp-code-line-number-color: var(--vp-c-text-2);
344
390
 
345
391
  --vp-code-line-diff-add-color: var(--vp-c-success-soft);
346
392
  --vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);
@@ -356,7 +402,6 @@
356
402
  --vp-code-copy-code-hover-border-color: var(--vp-c-divider);
357
403
  --vp-code-copy-code-hover-bg: var(--vp-c-bg);
358
404
  --vp-code-copy-code-active-text: var(--vp-c-text-2);
359
- --vp-code-copy-copied-text-content: 'Copied';
360
405
 
361
406
  --vp-code-tab-divider: var(--vp-code-block-divider-color);
362
407
  --vp-code-tab-text-color: var(--vp-c-text-2);
@@ -366,23 +411,6 @@
366
411
  --vp-code-tab-active-bar-color: var(--vp-c-brand-1);
367
412
  }
368
413
 
369
- :lang(es),
370
- :lang(pt) {
371
- --vp-code-copy-copied-text-content: 'Copiado';
372
- }
373
- :lang(fa) {
374
- --vp-code-copy-copied-text-content: 'کپی شد';
375
- }
376
- :lang(ko) {
377
- --vp-code-copy-copied-text-content: '복사됨';
378
- }
379
- :lang(ru) {
380
- --vp-code-copy-copied-text-content: 'Скопировано';
381
- }
382
- :lang(zh) {
383
- --vp-code-copy-copied-text-content: '已复制';
384
- }
385
-
386
414
  /**
387
415
  * Component: Button
388
416
  * -------------------------------------------------------------------------- */
@@ -424,8 +452,8 @@
424
452
  * -------------------------------------------------------------------------- */
425
453
 
426
454
  :root {
427
- --vp-custom-block-font-size: 14px;
428
- --vp-custom-block-code-font-size: 13px;
455
+ --vp-custom-block-font-size: 0.875rem;
456
+ --vp-custom-block-code-font-size: 0.8125rem;
429
457
 
430
458
  --vp-custom-block-info-border: transparent;
431
459
  --vp-custom-block-info-text: var(--vp-c-text-1);
@@ -447,6 +475,11 @@
447
475
  --vp-custom-block-important-bg: var(--vp-c-important-soft);
448
476
  --vp-custom-block-important-code-bg: var(--vp-c-important-soft);
449
477
 
478
+ --vp-custom-block-caution-border: transparent;
479
+ --vp-custom-block-caution-text: var(--vp-c-text-1);
480
+ --vp-custom-block-caution-bg: var(--vp-c-caution-soft);
481
+ --vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);
482
+
450
483
  --vp-custom-block-warning-border: transparent;
451
484
  --vp-custom-block-warning-text: var(--vp-c-text-1);
452
485
  --vp-custom-block-warning-bg: var(--vp-c-warning-soft);
@@ -457,11 +490,6 @@
457
490
  --vp-custom-block-danger-bg: var(--vp-c-danger-soft);
458
491
  --vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);
459
492
 
460
- --vp-custom-block-caution-border: transparent;
461
- --vp-custom-block-caution-text: var(--vp-c-text-1);
462
- --vp-custom-block-caution-bg: var(--vp-c-caution-soft);
463
- --vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);
464
-
465
493
  --vp-custom-block-details-border: var(--vp-custom-block-info-border);
466
494
  --vp-custom-block-details-text: var(--vp-custom-block-info-text);
467
495
  --vp-custom-block-details-bg: var(--vp-custom-block-info-bg);
@@ -484,10 +512,24 @@
484
512
  * -------------------------------------------------------------------------- */
485
513
 
486
514
  :root {
487
- --vp-nav-height: 64px;
515
+ --vp-nav-height: 4rem;
488
516
  --vp-nav-bg-color: var(--vp-c-bg);
517
+
518
+ /**
519
+ * Background while on top of the home page (unscrolled). Set it to
520
+ * var(--vp-nav-bg-color) to opt out of the transparent treatment.
521
+ */
522
+ --vp-nav-home-bg-color: transparent;
523
+
524
+ /**
525
+ * Applied to the navbar surface, e.g. `saturate(180%) blur(8px)` combined
526
+ * with a translucent --vp-nav-bg-color for a frosted-glass bar.
527
+ */
528
+ --vp-nav-backdrop-filter: none;
529
+
530
+ --vp-nav-divider-color: var(--vp-c-gutter);
489
531
  --vp-nav-screen-bg-color: var(--vp-c-bg);
490
- --vp-nav-logo-height: 24px;
532
+ --vp-nav-logo-height: 1.5rem;
491
533
  }
492
534
 
493
535
  .hide-nav {
@@ -495,7 +537,7 @@
495
537
  }
496
538
 
497
539
  .hide-nav .VPSidebar {
498
- --vp-nav-height: 22px;
540
+ --vp-nav-height: 1.375rem;
499
541
  }
500
542
 
501
543
  /**
@@ -503,7 +545,18 @@
503
545
  * -------------------------------------------------------------------------- */
504
546
 
505
547
  :root {
506
- --vp-local-nav-bg-color: var(--vp-c-bg);
548
+ /**
549
+ * Follows the navbar surface by default, so a translucent
550
+ * --vp-nav-bg-color with --vp-nav-backdrop-filter extends the
551
+ * frosted-glass treatment to the local nav as well.
552
+ */
553
+ --vp-local-nav-bg-color: var(--vp-nav-bg-color);
554
+
555
+ /**
556
+ * The local nav's bottom rule. Follows the navbar's divider color by
557
+ * default.
558
+ */
559
+ --vp-local-nav-divider-color: var(--vp-nav-divider-color);
507
560
  }
508
561
 
509
562
  /**
@@ -511,7 +564,7 @@
511
564
  * -------------------------------------------------------------------------- */
512
565
 
513
566
  :root {
514
- --vp-sidebar-width: 272px;
567
+ --vp-sidebar-width: 17rem;
515
568
  --vp-sidebar-bg-color: var(--vp-c-bg-alt);
516
569
  }
517
570
 
@@ -544,10 +597,22 @@
544
597
  --vp-badge-info-text: var(--vp-c-text-2);
545
598
  --vp-badge-info-bg: var(--vp-c-default-soft);
546
599
 
600
+ --vp-badge-note-border: transparent;
601
+ --vp-badge-note-text: var(--vp-c-note-1);
602
+ --vp-badge-note-bg: var(--vp-c-note-soft);
603
+
547
604
  --vp-badge-tip-border: transparent;
548
605
  --vp-badge-tip-text: var(--vp-c-tip-1);
549
606
  --vp-badge-tip-bg: var(--vp-c-tip-soft);
550
607
 
608
+ --vp-badge-important-border: transparent;
609
+ --vp-badge-important-text: var(--vp-c-important-1);
610
+ --vp-badge-important-bg: var(--vp-c-important-soft);
611
+
612
+ --vp-badge-caution-border: transparent;
613
+ --vp-badge-caution-text: var(--vp-c-caution-1);
614
+ --vp-badge-caution-bg: var(--vp-c-caution-soft);
615
+
551
616
  --vp-badge-warning-border: transparent;
552
617
  --vp-badge-warning-text: var(--vp-c-warning-1);
553
618
  --vp-badge-warning-bg: var(--vp-c-warning-soft);
@@ -0,0 +1,57 @@
1
+ import { DefaultTheme } from "vitepress/theme";
2
+ import { SidepanelProps } from "@docsearch/sidepanel-js";
3
+ import { DocSearchAskAi } from "../../../../types/docsearch.js";
4
+ //#region src/client/theme-default/support/docsearch.d.ts
5
+ export type FacetFilter = string | string[] | FacetFilter[];
6
+ export interface ValidatedCredentials {
7
+ valid: boolean;
8
+ appId?: string;
9
+ apiKey?: string;
10
+ indexName?: string;
11
+ }
12
+ export type DocSearchMode = 'auto' | 'sidePanel' | 'hybrid' | 'modal';
13
+ export interface ResolvedMode {
14
+ mode: DocSearchMode;
15
+ showKeywordSearch: boolean;
16
+ useSidePanel: boolean;
17
+ }
18
+ export type ResolvedSidePanelProps = SidepanelProps & {
19
+ agentStudio?: boolean;
20
+ searchParameters?: DocSearchAskAi['searchParameters'];
21
+ suggestedQuestions?: boolean;
22
+ useStagingEnv?: boolean;
23
+ };
24
+ /**
25
+ * Resolves the effective mode based on config and available features.
26
+ *
27
+ * - 'auto': infer hybrid vs sidePanel-only from provided config
28
+ * - 'sidePanel': force sidePanel-only even if keyword search is configured
29
+ * - 'hybrid': force hybrid (error if keyword search is not configured)
30
+ * - 'modal': force modal even if sidePanel is configured
31
+ */
32
+ export declare function resolveMode(options: Pick<DefaultTheme.AlgoliaSearchOptions, 'appId' | 'apiKey' | 'indexName' | 'askAi' | 'mode'>): ResolvedMode;
33
+ export declare function hasKeywordSearch(options: Pick<DefaultTheme.AlgoliaSearchOptions, 'appId' | 'apiKey' | 'indexName'>): boolean;
34
+ export declare function hasAskAi(askAi: DefaultTheme.AlgoliaSearchOptions['askAi']): boolean;
35
+ /**
36
+ * Removes existing `lang:` filters and appends `lang:${lang}`.
37
+ * Handles both flat arrays and nested arrays (for OR conditions).
38
+ */
39
+ export declare function mergeLangFacetFilters(rawFacetFilters: FacetFilter | FacetFilter[] | undefined, lang: string): FacetFilter[];
40
+ /**
41
+ * Validates that required Algolia credentials are present.
42
+ */
43
+ export declare function validateCredentials(options: Pick<DefaultTheme.AlgoliaSearchOptions, 'appId' | 'apiKey' | 'indexName'>): ValidatedCredentials;
44
+ /**
45
+ * Builds Ask AI configuration from various input formats.
46
+ */
47
+ export declare function buildAskAiConfig(askAiProp: NonNullable<DefaultTheme.AlgoliaSearchOptions['askAi']>, options: DefaultTheme.AlgoliaSearchOptions, lang: string): DocSearchAskAi;
48
+ /**
49
+ * Builds the DocSearch side panel config from the resolved Ask AI options.
50
+ */
51
+ export declare function buildSidePanelProps(askAi: DocSearchAskAi, options: DefaultTheme.AlgoliaSearchOptions): ResolvedSidePanelProps;
52
+ /**
53
+ * Resolves Algolia search options for the given language,
54
+ * merging in locale-specific overrides and language facet filters.
55
+ */
56
+ export declare function resolveOptionsForLanguage(options: DefaultTheme.AlgoliaSearchOptions, localeIndex: string, lang: string): DefaultTheme.AlgoliaSearchOptions;
57
+ //#endregion
@@ -0,0 +1,145 @@
1
+ import { isObject } from "../../shared.js";
2
+ //#region src/client/theme-default/support/docsearch.ts
3
+ /**
4
+ * Resolves the effective mode based on config and available features.
5
+ *
6
+ * - 'auto': infer hybrid vs sidePanel-only from provided config
7
+ * - 'sidePanel': force sidePanel-only even if keyword search is configured
8
+ * - 'hybrid': force hybrid (error if keyword search is not configured)
9
+ * - 'modal': force modal even if sidePanel is configured
10
+ */
11
+ function resolveMode(options) {
12
+ const mode = options.mode ?? "auto";
13
+ const hasKeyword = hasKeywordSearch(options);
14
+ const askAi = options.askAi;
15
+ const hasSidePanelConfig = Boolean(askAi && typeof askAi === "object" && askAi.sidePanel);
16
+ switch (mode) {
17
+ case "sidePanel": return {
18
+ mode,
19
+ showKeywordSearch: false,
20
+ useSidePanel: true
21
+ };
22
+ case "hybrid":
23
+ if (!hasKeyword) console.error("[vitepress] mode: \"hybrid\" requires keyword search credentials (appId, apiKey, indexName).");
24
+ return {
25
+ mode,
26
+ showKeywordSearch: hasKeyword,
27
+ useSidePanel: true
28
+ };
29
+ case "modal": return {
30
+ mode,
31
+ showKeywordSearch: hasKeyword,
32
+ useSidePanel: false
33
+ };
34
+ default: return {
35
+ mode: "auto",
36
+ showKeywordSearch: hasKeyword,
37
+ useSidePanel: hasSidePanelConfig
38
+ };
39
+ }
40
+ }
41
+ function hasKeywordSearch(options) {
42
+ return Boolean(options.appId && options.apiKey && options.indexName);
43
+ }
44
+ function hasAskAi(askAi) {
45
+ if (!askAi) return false;
46
+ if (typeof askAi === "string") return askAi.length > 0;
47
+ return Boolean(askAi.assistantId);
48
+ }
49
+ /**
50
+ * Removes existing `lang:` filters and appends `lang:${lang}`.
51
+ * Handles both flat arrays and nested arrays (for OR conditions).
52
+ */
53
+ function mergeLangFacetFilters(rawFacetFilters, lang) {
54
+ return [...(Array.isArray(rawFacetFilters) ? rawFacetFilters : rawFacetFilters ? [rawFacetFilters] : []).map((filter) => {
55
+ if (Array.isArray(filter)) return filter.filter((f) => typeof f === "string" && !f.startsWith("lang:"));
56
+ return filter;
57
+ }).filter((filter) => {
58
+ if (typeof filter === "string") return !filter.startsWith("lang:");
59
+ return Array.isArray(filter) && filter.length > 0;
60
+ }), `lang:${lang}`];
61
+ }
62
+ /**
63
+ * Validates that required Algolia credentials are present.
64
+ */
65
+ function validateCredentials(options) {
66
+ const appId = options.appId;
67
+ const apiKey = options.apiKey;
68
+ const indexName = options.indexName;
69
+ return {
70
+ valid: Boolean(appId && apiKey && indexName),
71
+ appId,
72
+ apiKey,
73
+ indexName
74
+ };
75
+ }
76
+ /**
77
+ * Builds Ask AI configuration from various input formats.
78
+ */
79
+ function buildAskAiConfig(askAiProp, options, lang) {
80
+ const isAskAiString = typeof askAiProp === "string";
81
+ const askAiSearchParameters = !isAskAiString && askAiProp.searchParameters ? { ...askAiProp.searchParameters } : void 0;
82
+ const isAgentStudio = !isAskAiString && askAiProp.agentStudio === true;
83
+ const askAiFacetFilters = mergeLangFacetFilters(askAiSearchParameters?.facetFilters ?? options.searchParameters?.facetFilters, lang);
84
+ const mergedAskAiSearchParameters = isAgentStudio ? askAiSearchParameters : {
85
+ ...askAiSearchParameters,
86
+ facetFilters: askAiFacetFilters.length ? askAiFacetFilters : void 0
87
+ };
88
+ const result = {
89
+ ...isAskAiString ? {} : askAiProp,
90
+ indexName: isAskAiString ? options.indexName : askAiProp.indexName,
91
+ apiKey: isAskAiString ? options.apiKey : askAiProp.apiKey,
92
+ appId: isAskAiString ? options.appId : askAiProp.appId,
93
+ assistantId: isAskAiString ? askAiProp : askAiProp.assistantId
94
+ };
95
+ if (mergedAskAiSearchParameters && Object.values(mergedAskAiSearchParameters).some((v) => v != null)) result.searchParameters = mergedAskAiSearchParameters;
96
+ return result;
97
+ }
98
+ /**
99
+ * Builds the DocSearch side panel config from the resolved Ask AI options.
100
+ */
101
+ function buildSidePanelProps(askAi, options) {
102
+ const { sidePanel, ...askAiRest } = JSON.parse(JSON.stringify(askAi));
103
+ return {
104
+ container: "#vp-docsearch-sidepanel",
105
+ indexName: options.indexName,
106
+ appId: options.appId,
107
+ apiKey: options.apiKey,
108
+ ...askAiRest,
109
+ ...sidePanel && sidePanel !== true ? sidePanel : {}
110
+ };
111
+ }
112
+ /**
113
+ * Resolves Algolia search options for the given language,
114
+ * merging in locale-specific overrides and language facet filters.
115
+ */
116
+ function resolveOptionsForLanguage(options, localeIndex, lang) {
117
+ options = deepMerge(options, options.locales?.[localeIndex] || {});
118
+ const facetFilters = mergeLangFacetFilters(options.searchParameters?.facetFilters, lang);
119
+ const askAi = options.askAi ? buildAskAiConfig(options.askAi, options, lang) : void 0;
120
+ return {
121
+ ...options,
122
+ searchParameters: {
123
+ ...options.searchParameters,
124
+ facetFilters
125
+ },
126
+ askAi
127
+ };
128
+ }
129
+ function deepMerge(target, source) {
130
+ const result = { ...target };
131
+ for (const key in source) {
132
+ const value = source[key];
133
+ if (value === void 0) continue;
134
+ if (key === "searchParameters") {
135
+ result[key] = value;
136
+ continue;
137
+ }
138
+ if (isObject(value) && isObject(result[key])) result[key] = deepMerge(result[key], value);
139
+ else result[key] = value;
140
+ }
141
+ delete result.locales;
142
+ return result;
143
+ }
144
+ //#endregion
145
+ export { buildAskAiConfig, buildSidePanelProps, hasAskAi, hasKeywordSearch, mergeLangFacetFilters, resolveMode, resolveOptionsForLanguage, validateCredentials };
@@ -0,0 +1,9 @@
1
+ import MiniSearch from "minisearch";
2
+ import { DefaultTheme } from "vitepress/theme";
3
+ //#region src/client/theme-default/support/local-search.d.ts
4
+ /**
5
+ * Loads a serialized local search index with the same options that were used
6
+ * to build it (functions are not serialized) plus the default search options.
7
+ */
8
+ export declare function loadLocalSearchIndex<T = Record<string, any>>(json: string, miniSearch?: DefaultTheme.MiniSearchOptions): MiniSearch<T>;
9
+ //#endregion