@vuepress/theme-default 2.0.0-rc.138 → 2.0.0-rc.139

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 (105) hide show
  1. package/dist/client/components/VPAutoLink.vue +29 -2
  2. package/dist/client/components/VPNavbarDropdown.vue +8 -2
  3. package/dist/client/components/VPSidebarItem.vue +35 -20
  4. package/dist/client/composables/index.d.ts +12 -12
  5. package/dist/client/composables/index.js +1 -1
  6. package/dist/client/composables/useDarkMode.d.ts +1 -1
  7. package/dist/client/composables/useDarkMode.js +1 -1
  8. package/dist/client/composables/useData.d.ts +1 -1
  9. package/dist/client/composables/useData.js +1 -1
  10. package/dist/client/composables/useEditLink.d.ts +1 -1
  11. package/dist/client/composables/useEditLink.js +1 -1
  12. package/dist/client/composables/useHeaders.js +1 -1
  13. package/dist/client/composables/useHeaders.js.map +1 -1
  14. package/dist/client/composables/useNavbarConfig.d.ts +1 -1
  15. package/dist/client/composables/useNavbarConfig.js +1 -1
  16. package/dist/client/composables/useNavbarRepo.d.ts +1 -1
  17. package/dist/client/composables/useNavbarRepo.js +1 -1
  18. package/dist/client/composables/useNavbarSelectLanguage.d.ts +1 -1
  19. package/dist/client/composables/useNavbarSelectLanguage.js +1 -1
  20. package/dist/client/composables/useNavigate.d.ts +1 -1
  21. package/dist/client/composables/useNavigate.js +1 -1
  22. package/dist/client/composables/useRelatedLinks.d.ts +1 -1
  23. package/dist/client/composables/useRelatedLinks.js +1 -1
  24. package/dist/client/composables/useScrollPromise.d.ts +1 -1
  25. package/dist/client/composables/useScrollPromise.js +1 -1
  26. package/dist/client/composables/useSidebarItems.d.ts +1 -1
  27. package/dist/client/composables/useSidebarItems.js +1 -1
  28. package/dist/client/composables/useUpdateDeviceStatus.d.ts +1 -1
  29. package/dist/client/composables/useUpdateDeviceStatus.js +1 -1
  30. package/dist/client/index.d.ts +20 -20
  31. package/dist/client/index.js +1 -1
  32. package/dist/client/utils/index.d.ts +6 -6
  33. package/dist/client/utils/index.js +1 -1
  34. package/dist/client/utils/isActiveSidebarItem.d.ts +1 -1
  35. package/dist/client/utils/isActiveSidebarItem.js +1 -1
  36. package/dist/client/utils/resolveAutoLink.d.ts +1 -1
  37. package/dist/client/utils/resolveAutoLink.js +1 -1
  38. package/dist/client/utils/resolveEditLink.d.ts +1 -1
  39. package/dist/client/utils/resolveEditLink.js +1 -1
  40. package/dist/client/utils/resolvePrefix.d.ts +1 -1
  41. package/dist/client/utils/resolvePrefix.js +1 -1
  42. package/dist/client/utils/resolveRepoType.d.ts +1 -1
  43. package/dist/client/utils/resolveRepoType.js +1 -1
  44. package/dist/{index-DM_-Gf3x.d.ts → index-B-NfQxLQ.d.ts} +1 -1
  45. package/dist/index-CzfpBrYE.d.ts +3 -0
  46. package/dist/index-gVluNoQB.d.ts +8 -0
  47. package/dist/{isActiveSidebarItem-CInJFY7t.d.ts → isActiveSidebarItem-s6FewkTf.d.ts} +1 -1
  48. package/dist/{isActiveSidebarItem-CdmUcp0l.js → isActiveSidebarItem-vL4aXoeX.js} +1 -1
  49. package/dist/{isActiveSidebarItem-CdmUcp0l.js.map → isActiveSidebarItem-vL4aXoeX.js.map} +1 -1
  50. package/dist/node/index.d.ts +2 -2
  51. package/dist/{resolveAutoLink-CgIw9MWM.d.ts → resolveAutoLink-Cw8JZzG1.d.ts} +1 -1
  52. package/dist/{resolveAutoLink-XUJwl3Kb.js → resolveAutoLink-DKGp9cn4.js} +1 -1
  53. package/dist/{resolveAutoLink-XUJwl3Kb.js.map → resolveAutoLink-DKGp9cn4.js.map} +1 -1
  54. package/dist/{resolveEditLink-lteF0-Mv.js → resolveEditLink-Ds33XEh4.js} +1 -1
  55. package/dist/{resolveEditLink-lteF0-Mv.js.map → resolveEditLink-Ds33XEh4.js.map} +1 -1
  56. package/dist/{resolvePrefix-CQnTmTk4.js → resolvePrefix-Co9SoF5M.js} +1 -1
  57. package/dist/{resolvePrefix-CQnTmTk4.js.map → resolvePrefix-Co9SoF5M.js.map} +1 -1
  58. package/dist/{resolveRepoType-BfcHRhpi.js → resolveRepoType-DYzLb2Xi.js} +1 -1
  59. package/dist/{resolveRepoType-BfcHRhpi.js.map → resolveRepoType-DYzLb2Xi.js.map} +1 -1
  60. package/dist/{typings-DV97y_41.d.ts → typings-nCS-rgzp.d.ts} +1 -1
  61. package/dist/{useDarkMode-BfKvIN6K.js → useDarkMode-C8li1LOU.js} +1 -1
  62. package/dist/{useDarkMode-BfKvIN6K.js.map → useDarkMode-C8li1LOU.js.map} +1 -1
  63. package/dist/{useData-DMP1s8dN.d.ts → useData-CHJ4YQxm.d.ts} +2 -2
  64. package/dist/useData-EgwoIcp1.js +2 -0
  65. package/dist/{useData-nv4hwlgW.js.map → useData-EgwoIcp1.js.map} +1 -1
  66. package/dist/useEditLink-CCShB2Bn.js +2 -0
  67. package/dist/{useEditLink-BmoW42FE.js.map → useEditLink-CCShB2Bn.js.map} +1 -1
  68. package/dist/{useEditLink-B8XOetrs.d.ts → useEditLink-DxrHQSBQ.d.ts} +1 -1
  69. package/dist/useNavbarConfig--ON58eTy.js +2 -0
  70. package/dist/{useNavbarConfig-CxVplYul.js.map → useNavbarConfig--ON58eTy.js.map} +1 -1
  71. package/dist/{useNavbarConfig-BWLU4cpg.d.ts → useNavbarConfig-D-9JdR3e.d.ts} +1 -1
  72. package/dist/{useNavbarRepo-gcoAtjQO.d.ts → useNavbarRepo-DpDvdhVG.d.ts} +1 -1
  73. package/dist/useNavbarRepo-DzLa0J7F.js +2 -0
  74. package/dist/{useNavbarRepo-BScd94be.js.map → useNavbarRepo-DzLa0J7F.js.map} +1 -1
  75. package/dist/{useNavbarSelectLanguage-DzNEB1HX.d.ts → useNavbarSelectLanguage-CE-_yvom.d.ts} +1 -1
  76. package/dist/{useNavbarSelectLanguage-FHyzHFEW.js → useNavbarSelectLanguage-D1veoHvn.js} +2 -2
  77. package/dist/{useNavbarSelectLanguage-FHyzHFEW.js.map → useNavbarSelectLanguage-D1veoHvn.js.map} +1 -1
  78. package/dist/{useNavigate-mlFey3ew.js → useNavigate-D65vYI7T.js} +1 -1
  79. package/dist/{useNavigate-mlFey3ew.js.map → useNavigate-D65vYI7T.js.map} +1 -1
  80. package/dist/useRelatedLinks-Bq7S8W2Y.js +2 -0
  81. package/dist/{useRelatedLinks-BwsPumn1.js.map → useRelatedLinks-Bq7S8W2Y.js.map} +1 -1
  82. package/dist/{useRelatedLinks-mvQ28g6C.d.ts → useRelatedLinks-LUir1Pbq.d.ts} +1 -1
  83. package/dist/{useScrollPromise-CB6ZLciv.js → useScrollPromise-L_hUHm0Z.js} +1 -1
  84. package/dist/{useScrollPromise-CB6ZLciv.js.map → useScrollPromise-L_hUHm0Z.js.map} +1 -1
  85. package/dist/useSidebarItems-BdjWkZ-U.js +2 -0
  86. package/dist/{useSidebarItems-D1vD1QQp.js.map → useSidebarItems-BdjWkZ-U.js.map} +1 -1
  87. package/dist/{useSidebarItems-ByhBOO09.d.ts → useSidebarItems-ed5-CCJI.d.ts} +3 -3
  88. package/dist/{useUpdateDeviceStatus-CNEsUwNK.js → useUpdateDeviceStatus-BHudnBnG.js} +1 -1
  89. package/dist/{useUpdateDeviceStatus-CNEsUwNK.js.map → useUpdateDeviceStatus-BHudnBnG.js.map} +1 -1
  90. package/package.json +15 -15
  91. package/dist/index--4Q8BmVV.d.ts +0 -3
  92. package/dist/index-BJbWgGUf.d.ts +0 -8
  93. package/dist/useData-nv4hwlgW.js +0 -2
  94. package/dist/useEditLink-BmoW42FE.js +0 -2
  95. package/dist/useNavbarConfig-CxVplYul.js +0 -2
  96. package/dist/useNavbarRepo-BScd94be.js +0 -2
  97. package/dist/useRelatedLinks-BwsPumn1.js +0 -2
  98. package/dist/useSidebarItems-D1vD1QQp.js +0 -2
  99. /package/dist/{resolveEditLink-DzBrOebC.d.ts → resolveEditLink-CnoRqTqe.d.ts} +0 -0
  100. /package/dist/{resolvePrefix-DvC1-afu.d.ts → resolvePrefix-DwAjhGDe.d.ts} +0 -0
  101. /package/dist/{resolveRepoType-DlYSUv-A.d.ts → resolveRepoType-BjvddHET.d.ts} +0 -0
  102. /package/dist/{useDarkMode-DWdqlXpq.d.ts → useDarkMode-CAUx2JA_.d.ts} +0 -0
  103. /package/dist/{useNavigate-ELe41hTY.d.ts → useNavigate-BqFABdRH.d.ts} +0 -0
  104. /package/dist/{useScrollPromise-C9SNUmX_.d.ts → useScrollPromise-Bo6RkwWO.d.ts} +0 -0
  105. /package/dist/{useUpdateDeviceStatus-DD8W3spZ.d.ts → useUpdateDeviceStatus-BmTgRI9A.d.ts} +0 -0
@@ -1,13 +1,40 @@
1
1
  <script setup lang="ts">
2
2
  import type { RequiredSlot, Slot } from '@vuepress/helper/client'
3
+ import { computed } from 'vue'
3
4
  import type { AutoLinkConfig } from 'vuepress/client'
4
- import { AutoLink } from 'vuepress/client'
5
+ import { AutoLink, resolveRoutePath, useRoute } from 'vuepress/client'
6
+ import { isLinkWithProtocol, splitPath } from 'vuepress/shared'
5
7
 
6
8
  const { config } = defineProps<{
7
9
  /** The auto link config */
8
10
  config: AutoLinkConfig
9
11
  }>()
10
12
 
13
+ const route = useRoute()
14
+
15
+ /**
16
+ * Whether the link points to a page of the current site
17
+ *
18
+ * It uses the same rule as `AutoLink`, which renders an internal link as a
19
+ * `RouteLink` and an external one as an `<a>` element.
20
+ */
21
+ const isInternalLink = computed(
22
+ () => !isLinkWithProtocol(config.link) && config.target !== '_blank',
23
+ )
24
+
25
+ /**
26
+ * Whether the link points to the current page
27
+ *
28
+ * The hash and the query are ignored, so that a link to an anchor of the
29
+ * current page is also marked as the current page.
30
+ */
31
+ const isCurrentPage = computed(
32
+ () =>
33
+ isInternalLink.value &&
34
+ resolveRoutePath(splitPath(config.link).pathname, route.path) ===
35
+ route.path,
36
+ )
37
+
11
38
  defineSlots<{
12
39
  default?: RequiredSlot<AutoLinkConfig>
13
40
  before?: Slot<AutoLinkConfig>
@@ -16,7 +43,7 @@ defineSlots<{
16
43
  </script>
17
44
 
18
45
  <template>
19
- <AutoLink :config="config">
46
+ <AutoLink :config="config" :aria-current="isCurrentPage ? 'page' : undefined">
20
47
  <template v-if="$slots.default" #default>
21
48
  <slot v-bind="config" />
22
49
  </template>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { FadeInExpandTransition } from '@vuepress/helper/client'
3
3
  import { useToggle } from '@vueuse/core'
4
- import { computed } from 'vue'
4
+ import { computed, useId } from 'vue'
5
5
  import { onContentUpdated } from 'vuepress/client'
6
6
 
7
7
  import VPAutoLink from '@theme/VPAutoLink.vue'
@@ -17,6 +17,8 @@ const { config } = defineProps<{
17
17
 
18
18
  const [open, toggleOpen] = useToggle()
19
19
 
20
+ const menuId = `vp-navbar-dropdown-${useId()}`
21
+
20
22
  const dropdownAriaLabel = computed(() => config.ariaLabel || config.text)
21
23
 
22
24
  const isLastItemOfArray = (arrayItem: unknown, array: unknown[]): boolean =>
@@ -46,6 +48,8 @@ onContentUpdated(() => {
46
48
  <button
47
49
  class="vp-navbar-dropdown-title"
48
50
  type="button"
51
+ :aria-expanded="open"
52
+ :aria-controls="menuId"
49
53
  :aria-label="dropdownAriaLabel"
50
54
  @click="handleDropdown"
51
55
  >
@@ -56,6 +60,8 @@ onContentUpdated(() => {
56
60
  <button
57
61
  class="vp-navbar-dropdown-title-mobile"
58
62
  type="button"
63
+ :aria-expanded="open"
64
+ :aria-controls="menuId"
59
65
  :aria-label="dropdownAriaLabel"
60
66
  @click="() => toggleOpen()"
61
67
  >
@@ -64,7 +70,7 @@ onContentUpdated(() => {
64
70
  </button>
65
71
 
66
72
  <FadeInExpandTransition>
67
- <ul v-show="open" class="vp-navbar-dropdown">
73
+ <ul :id="menuId" v-show="open" class="vp-navbar-dropdown">
68
74
  <li
69
75
  v-for="child in config.children"
70
76
  :key="child.text"
@@ -20,12 +20,21 @@ const route = useRoute()
20
20
  const router = useRouter()
21
21
 
22
22
  const collapsible = computed(() => (item as SidebarGroupItem).collapsible)
23
+ const hasChildren = computed(
24
+ () => 'children' in item && item.children.length > 0,
25
+ )
26
+ /** Whether the item is rendered as a button to toggle its children */
27
+ const isDisclosure = computed(
28
+ () => collapsible.value && !item.link && hasChildren.value,
29
+ )
23
30
  const isActive = computed(() => isActiveSidebarItem(item, route))
24
31
  const itemClass = computed(() => ({
25
32
  'vp-sidebar-item': true,
26
33
  'vp-sidebar-heading': depth === 0,
27
34
  'active': isActive.value,
28
- 'collapsible': collapsible.value,
35
+ // Only items that can be clicked (a link or a disclosure button) show a
36
+ // pointer cursor.
37
+ 'collapsible': collapsible.value && (Boolean(item.link) || hasChildren.value),
29
38
  }))
30
39
 
31
40
  const isOpenDefault = computed(() =>
@@ -33,13 +42,6 @@ const isOpenDefault = computed(() =>
33
42
  )
34
43
 
35
44
  const [isOpen, toggleIsOpen] = useToggle(isOpenDefault.value)
36
- const onClick = (event: Event): void => {
37
- if (collapsible.value) {
38
- event.preventDefault()
39
- // toggle open status on click
40
- toggleIsOpen()
41
- }
42
- }
43
45
 
44
46
  // reset open status after navigation
45
47
  const unregisterRouterHook = router.afterEach(() => {
@@ -63,22 +65,21 @@ onBeforeUnmount(() => {
63
65
  />
64
66
  </template>
65
67
  </VPAutoLink>
66
- <p
67
- v-else
68
- tabindex="0"
68
+ <button
69
+ v-else-if="isDisclosure"
70
+ type="button"
69
71
  :class="itemClass"
70
- @click="onClick"
71
- @keydown.enter="onClick"
72
+ :aria-expanded="isOpen"
73
+ @click="toggleIsOpen()"
72
74
  >
73
75
  {{ item.text }}
74
- <span
75
- v-if="collapsible"
76
- class="arrow"
77
- :class="isOpen ? 'down' : 'right'"
78
- />
76
+ <span class="arrow" :class="isOpen ? 'down' : 'right'" />
77
+ </button>
78
+ <p v-else :class="itemClass">
79
+ {{ item.text }}
79
80
  </p>
80
81
 
81
- <VPDropdownTransition v-if="'children' in item && item.children.length">
82
+ <VPDropdownTransition v-if="hasChildren">
82
83
  <ul v-show="isOpen" class="vp-sidebar-children">
83
84
  <VPSidebarItem
84
85
  v-for="child in item.children"
@@ -105,6 +106,20 @@ onBeforeUnmount(() => {
105
106
  outline-offset: -1px;
106
107
  }
107
108
 
109
+ &:is(button) {
110
+ border-block: 0;
111
+ border-inline-end: 0;
112
+ border-radius: 0;
113
+
114
+ background: none;
115
+
116
+ font-family: inherit;
117
+ line-height: inherit;
118
+ text-align: start;
119
+
120
+ appearance: none;
121
+ }
122
+
108
123
  &.vp-sidebar-heading {
109
124
  box-sizing: border-box;
110
125
  width: 100%;
@@ -161,7 +176,7 @@ onBeforeUnmount(() => {
161
176
  }
162
177
  }
163
178
 
164
- &.active:not(p.vp-sidebar-heading) {
179
+ &.active:not(:is(p, button).vp-sidebar-heading) {
165
180
  border-inline-start-color: var(--vp-c-accent);
166
181
  color: var(--vp-c-accent);
167
182
  font-weight: 600;
@@ -1,13 +1,13 @@
1
- import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../../useDarkMode-DWdqlXpq.js";
2
- import { n as useData, t as Data } from "../../useData-DMP1s8dN.js";
3
- import { t as useEditLink } from "../../useEditLink-B8XOetrs.js";
4
- import { t as useNavigate } from "../../useNavigate-ELe41hTY.js";
5
- import { t as useNavbarConfig } from "../../useNavbarConfig-BWLU4cpg.js";
6
- import { t as useNavbarRepo } from "../../useNavbarRepo-gcoAtjQO.js";
7
- import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-DzNEB1HX.js";
8
- import { t as useRelatedLinks } from "../../useRelatedLinks-mvQ28g6C.js";
9
- import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-C9SNUmX_.js";
10
- import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../../useSidebarItems-ByhBOO09.js";
11
- import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-DD8W3spZ.js";
12
- import "../../index-BJbWgGUf.js";
1
+ import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../../useDarkMode-CAUx2JA_.js";
2
+ import { n as useData, t as Data } from "../../useData-CHJ4YQxm.js";
3
+ import { t as useEditLink } from "../../useEditLink-DxrHQSBQ.js";
4
+ import { t as useNavigate } from "../../useNavigate-BqFABdRH.js";
5
+ import { t as useNavbarConfig } from "../../useNavbarConfig-D-9JdR3e.js";
6
+ import { t as useNavbarRepo } from "../../useNavbarRepo-DpDvdhVG.js";
7
+ import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-CE-_yvom.js";
8
+ import { t as useRelatedLinks } from "../../useRelatedLinks-LUir1Pbq.js";
9
+ import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-Bo6RkwWO.js";
10
+ import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../../useSidebarItems-ed5-CCJI.js";
11
+ import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-BmTgRI9A.js";
12
+ import "../../index-gVluNoQB.js";
13
13
  export { DarkModeRef, Data, DeviceType, ScrollPromise, SidebarItemsRef, resolveArraySidebarItems, resolveMultiSidebarItems, resolveSidebarHeadingItem, resolveSidebarItems, resolveSidebarPageHeader, resolveSidebarPageHeaders, setupDarkMode, setupSidebarItems, sidebarItemsSymbol, useDarkMode, useData, useEditLink, useNavbarConfig, useNavbarRepo, useNavbarSelectLanguage, useNavigate, useRelatedLinks, useScrollPromise, useSidebarItems, useUpdateDeviceStatus };
@@ -1 +1 @@
1
- import{n as e,t}from"../../useDarkMode-BfKvIN6K.js";import{t as n}from"../../useData-nv4hwlgW.js";import{t as r}from"../../useEditLink-BmoW42FE.js";import{t as i}from"../../useNavigate-mlFey3ew.js";import{t as a}from"../../useNavbarConfig-CxVplYul.js";import{t as o}from"../../useNavbarRepo-BScd94be.js";import{t as s}from"../../useNavbarSelectLanguage-FHyzHFEW.js";import{t as c}from"../../useRelatedLinks-BwsPumn1.js";import{t as l}from"../../useScrollPromise-CB6ZLciv.js";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"../../useSidebarItems-D1vD1QQp.js";import{n as y,t as b}from"../../useUpdateDeviceStatus-CNEsUwNK.js";import"../../composables-CAISgiXf.js";export{b as DeviceType,v as resolveArraySidebarItems,m as resolveMultiSidebarItems,g as resolveSidebarHeadingItem,f as resolveSidebarItems,u as resolveSidebarPageHeader,h as resolveSidebarPageHeaders,t as setupDarkMode,_ as setupSidebarItems,d as sidebarItemsSymbol,e as useDarkMode,n as useData,r as useEditLink,a as useNavbarConfig,o as useNavbarRepo,s as useNavbarSelectLanguage,i as useNavigate,c as useRelatedLinks,l as useScrollPromise,p as useSidebarItems,y as useUpdateDeviceStatus};
1
+ import{n as e,t}from"../../useDarkMode-C8li1LOU.js";import{t as n}from"../../useData-EgwoIcp1.js";import{t as r}from"../../useEditLink-CCShB2Bn.js";import{t as i}from"../../useNavigate-D65vYI7T.js";import{t as a}from"../../useNavbarConfig--ON58eTy.js";import{t as o}from"../../useNavbarRepo-DzLa0J7F.js";import{t as s}from"../../useNavbarSelectLanguage-D1veoHvn.js";import{t as c}from"../../useRelatedLinks-Bq7S8W2Y.js";import{t as l}from"../../useScrollPromise-L_hUHm0Z.js";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"../../useSidebarItems-BdjWkZ-U.js";import{n as y,t as b}from"../../useUpdateDeviceStatus-BHudnBnG.js";import"../../composables-CAISgiXf.js";export{b as DeviceType,v as resolveArraySidebarItems,m as resolveMultiSidebarItems,g as resolveSidebarHeadingItem,f as resolveSidebarItems,u as resolveSidebarPageHeader,h as resolveSidebarPageHeaders,t as setupDarkMode,_ as setupSidebarItems,d as sidebarItemsSymbol,e as useDarkMode,n as useData,r as useEditLink,a as useNavbarConfig,o as useNavbarRepo,s as useNavbarSelectLanguage,i as useNavigate,c as useRelatedLinks,l as useScrollPromise,p as useSidebarItems,y as useUpdateDeviceStatus};
@@ -1,2 +1,2 @@
1
- import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../../useDarkMode-DWdqlXpq.js";
1
+ import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../../useDarkMode-CAUx2JA_.js";
2
2
  export { DarkModeRef, setupDarkMode, useDarkMode };
@@ -1 +1 @@
1
- export{t as setupDarkMode,n as useDarkMode}from"../../useDarkMode-BfKvIN6K.js";
1
+ export{t as setupDarkMode,n as useDarkMode}from"../../useDarkMode-C8li1LOU.js";
@@ -1,2 +1,2 @@
1
- import { n as useData, t as Data } from "../../useData-DMP1s8dN.js";
1
+ import { n as useData, t as Data } from "../../useData-CHJ4YQxm.js";
2
2
  export { Data, useData };
@@ -1 +1 @@
1
- export{t as useData}from"../../useData-nv4hwlgW.js";
1
+ export{t as useData}from"../../useData-EgwoIcp1.js";
@@ -1,2 +1,2 @@
1
- import { t as useEditLink } from "../../useEditLink-B8XOetrs.js";
1
+ import { t as useEditLink } from "../../useEditLink-DxrHQSBQ.js";
2
2
  export { useEditLink };
@@ -1 +1 @@
1
- export{t as useEditLink}from"../../useEditLink-BmoW42FE.js";
1
+ export{t as useEditLink}from"../../useEditLink-CCShB2Bn.js";
@@ -1,2 +1,2 @@
1
- import{getHeaders as e}from"@vuepress/helper/client";import{onContentUpdated as t}from"vuepress/client";import{injectLocal as n,provideLocal as r}from"@vueuse/core";import{computed as i,ref as a}from"vue";import{useData as o}from"@theme/useData";const s=Symbol(`headers`),c=()=>{let e=n(s);if(!e)throw Error(`useHeaders() is called without provider.`);return e},l=()=>{let{frontmatter:n,themeLocale:c}=o(),l=a([]),u=i(()=>n.value.sidebarDepth??c.value.sidebarDepth??2),d=()=>{u.value<=0?l.value=[]:l.value=e({levels:[2,u.value+1],ignore:[`.vp-badge`]})};r(s,l),t(e=>{e===`beforeUnmount`?l.value=[]:d()})};export{s as headersSymbol,l as setupHeaders,c as useHeaders};
1
+ import{getHeaders as e}from"@vuepress/helper/client";import{injectLocal as t,provideLocal as n}from"@vueuse/core";import{computed as r,ref as i}from"vue";import{onContentUpdated as a}from"vuepress/client";import{useData as o}from"@theme/useData";const s=Symbol(`headers`),c=()=>{let e=t(s);if(!e)throw Error(`useHeaders() is called without provider.`);return e},l=()=>{let{frontmatter:t,themeLocale:c}=o(),l=i([]),u=r(()=>t.value.sidebarDepth??c.value.sidebarDepth??2),d=()=>{u.value<=0?l.value=[]:l.value=e({levels:[2,u.value+1],ignore:[`.vp-badge`]})};n(s,l),a(e=>{e===`beforeUnmount`?l.value=[]:d()})};export{s as headersSymbol,l as setupHeaders,c as useHeaders};
2
2
  //# sourceMappingURL=useHeaders.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useHeaders.js","names":["useData","getHeaders","onContentUpdated","injectLocal","provideLocal","computed","ref","useData$1","headersSymbol","useHeaders","headers","setupHeaders","frontmatter","themeLocale","headersRef","levels","updateHeaders","reason"],"sources":["../../../src/client/composables/useHeaders.ts"],"sourcesContent":["import type { HeaderItem } from '@vuepress/helper/client'\nimport { getHeaders } from '@vuepress/helper/client'\nimport { injectLocal, provideLocal } from '@vueuse/core'\nimport type { InjectionKey, Ref } from 'vue'\nimport { computed, ref } from 'vue'\nimport { onContentUpdated } from 'vuepress/client'\n\nimport { useData } from '@theme/useData'\n\nexport type HeadersRef = Ref<HeaderItem[]>\n\nexport const headersSymbol: InjectionKey<HeadersRef> = Symbol('headers')\n\n/**\n * Inject headers\n *\n * 注入标题\n *\n * @returns Headers ref / 标题引用\n */\nexport const useHeaders = (): HeadersRef => {\n const headers = injectLocal(headersSymbol)\n\n if (!headers) throw new Error('useHeaders() is called without provider.')\n\n return headers\n}\n\nexport const setupHeaders = (): void => {\n const { frontmatter, themeLocale } = useData()\n\n const headersRef: HeadersRef = ref([])\n const levels = computed(\n () => frontmatter.value.sidebarDepth ?? themeLocale.value.sidebarDepth ?? 2,\n )\n\n const updateHeaders = (): void => {\n if (levels.value <= 0) {\n headersRef.value = []\n return\n }\n\n headersRef.value = getHeaders({\n levels: [2, levels.value + 1],\n ignore: ['.vp-badge'],\n })\n }\n\n provideLocal(headersSymbol, headersRef)\n\n onContentUpdated((reason) => {\n if (reason === 'beforeUnmount') headersRef.value = []\n else updateHeaders()\n })\n}\n"],"mappings":"A,sPAWA,MAAaQ,EAA0C,OAAO,SAAS,EAS1DC,MAA+B,CAC1C,IAAMC,EAAUP,EAAYK,CAAa,EAEzC,GAAI,CAACE,EAAS,MAAU,MAAM,0CAA0C,EAExE,OAAOA,CACT,EAEaC,MAA2B,CACtC,GAAM,CAAEC,cAAaC,eAAgBb,EAAQ,EAEvCc,EAAyBR,EAAI,CAAC,CAAC,EAC/BS,EAASV,MACPO,EAAY,MAAM,cAAgBC,EAAY,MAAM,cAAgB,CAC5E,EAEMG,MAA4B,CAC5BD,EAAO,OAAS,EAClBD,EAAW,MAAQ,CAAC,EAItBA,EAAW,MAAQb,EAAW,CAC5B,OAAQ,CAAC,EAAGc,EAAO,MAAQ,CAAC,EAC5B,OAAQ,CAAC,WAAW,CACtB,CAAC,CACH,EAEAX,EAAaI,EAAeM,CAAU,EAEtCZ,EAAkBe,GAAW,CACvBA,IAAW,gBAAiBH,EAAW,MAAQ,CAAC,EAC/CE,EAAc,CACrB,CAAC,CACH,E"}
1
+ {"version":3,"file":"useHeaders.js","names":["useData","getHeaders","injectLocal","provideLocal","computed","ref","onContentUpdated","useData$1","headersSymbol","useHeaders","headers","setupHeaders","frontmatter","themeLocale","headersRef","levels","updateHeaders","reason"],"sources":["../../../src/client/composables/useHeaders.ts"],"sourcesContent":["import type { HeaderItem } from '@vuepress/helper/client'\nimport { getHeaders } from '@vuepress/helper/client'\nimport { injectLocal, provideLocal } from '@vueuse/core'\nimport type { InjectionKey, Ref } from 'vue'\nimport { computed, ref } from 'vue'\nimport { onContentUpdated } from 'vuepress/client'\n\nimport { useData } from '@theme/useData'\n\nexport type HeadersRef = Ref<HeaderItem[]>\n\nexport const headersSymbol: InjectionKey<HeadersRef> = Symbol('headers')\n\n/**\n * Inject headers\n *\n * 注入标题\n *\n * @returns Headers ref / 标题引用\n */\nexport const useHeaders = (): HeadersRef => {\n const headers = injectLocal(headersSymbol)\n\n if (!headers) throw new Error('useHeaders() is called without provider.')\n\n return headers\n}\n\nexport const setupHeaders = (): void => {\n const { frontmatter, themeLocale } = useData()\n\n const headersRef: HeadersRef = ref([])\n const levels = computed(\n () => frontmatter.value.sidebarDepth ?? themeLocale.value.sidebarDepth ?? 2,\n )\n\n const updateHeaders = (): void => {\n if (levels.value <= 0) {\n headersRef.value = []\n return\n }\n\n headersRef.value = getHeaders({\n levels: [2, levels.value + 1],\n ignore: ['.vp-badge'],\n })\n }\n\n provideLocal(headersSymbol, headersRef)\n\n onContentUpdated((reason) => {\n if (reason === 'beforeUnmount') headersRef.value = []\n else updateHeaders()\n })\n}\n"],"mappings":"A,sPAWA,MAAaQ,EAA0C,OAAO,SAAS,EAS1DC,MAA+B,CAC1C,IAAMC,EAAUR,EAAYM,CAAa,EAEzC,GAAI,CAACE,EAAS,MAAU,MAAM,0CAA0C,EAExE,OAAOA,CACT,EAEaC,MAA2B,CACtC,GAAM,CAAEC,cAAaC,eAAgBb,EAAQ,EAEvCc,EAAyBT,EAAI,CAAC,CAAC,EAC/BU,EAASX,MACPQ,EAAY,MAAM,cAAgBC,EAAY,MAAM,cAAgB,CAC5E,EAEMG,MAA4B,CAC5BD,EAAO,OAAS,EAClBD,EAAW,MAAQ,CAAC,EAItBA,EAAW,MAAQb,EAAW,CAC5B,OAAQ,CAAC,EAAGc,EAAO,MAAQ,CAAC,EAC5B,OAAQ,CAAC,WAAW,CACtB,CAAC,CACH,EAEAZ,EAAaK,EAAeM,CAAU,EAEtCR,EAAkBW,GAAW,CACvBA,IAAW,gBAAiBH,EAAW,MAAQ,CAAC,EAC/CE,EAAc,CACrB,CAAC,CACH,E"}
@@ -1,2 +1,2 @@
1
- import { t as useNavbarConfig } from "../../useNavbarConfig-BWLU4cpg.js";
1
+ import { t as useNavbarConfig } from "../../useNavbarConfig-D-9JdR3e.js";
2
2
  export { useNavbarConfig };
@@ -1 +1 @@
1
- export{t as useNavbarConfig}from"../../useNavbarConfig-CxVplYul.js";
1
+ export{t as useNavbarConfig}from"../../useNavbarConfig--ON58eTy.js";
@@ -1,2 +1,2 @@
1
- import { t as useNavbarRepo } from "../../useNavbarRepo-gcoAtjQO.js";
1
+ import { t as useNavbarRepo } from "../../useNavbarRepo-DpDvdhVG.js";
2
2
  export { useNavbarRepo };
@@ -1 +1 @@
1
- export{t as useNavbarRepo}from"../../useNavbarRepo-BScd94be.js";
1
+ export{t as useNavbarRepo}from"../../useNavbarRepo-DzLa0J7F.js";
@@ -1,2 +1,2 @@
1
- import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-DzNEB1HX.js";
1
+ import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-CE-_yvom.js";
2
2
  export { useNavbarSelectLanguage };
@@ -1 +1 @@
1
- export{t as useNavbarSelectLanguage}from"../../useNavbarSelectLanguage-FHyzHFEW.js";
1
+ export{t as useNavbarSelectLanguage}from"../../useNavbarSelectLanguage-D1veoHvn.js";
@@ -1,2 +1,2 @@
1
- import { t as useNavigate } from "../../useNavigate-ELe41hTY.js";
1
+ import { t as useNavigate } from "../../useNavigate-BqFABdRH.js";
2
2
  export { useNavigate };
@@ -1 +1 @@
1
- export{t as useNavigate}from"../../useNavigate-mlFey3ew.js";
1
+ export{t as useNavigate}from"../../useNavigate-D65vYI7T.js";
@@ -1,2 +1,2 @@
1
- import { t as useRelatedLinks } from "../../useRelatedLinks-mvQ28g6C.js";
1
+ import { t as useRelatedLinks } from "../../useRelatedLinks-LUir1Pbq.js";
2
2
  export { useRelatedLinks };
@@ -1 +1 @@
1
- export{t as useRelatedLinks}from"../../useRelatedLinks-BwsPumn1.js";
1
+ export{t as useRelatedLinks}from"../../useRelatedLinks-Bq7S8W2Y.js";
@@ -1,2 +1,2 @@
1
- import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-C9SNUmX_.js";
1
+ import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-Bo6RkwWO.js";
2
2
  export { ScrollPromise, useScrollPromise };
@@ -1 +1 @@
1
- export{t as useScrollPromise}from"../../useScrollPromise-CB6ZLciv.js";
1
+ export{t as useScrollPromise}from"../../useScrollPromise-L_hUHm0Z.js";
@@ -1,2 +1,2 @@
1
- import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../../useSidebarItems-ByhBOO09.js";
1
+ import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../../useSidebarItems-ed5-CCJI.js";
2
2
  export { SidebarItemsRef, resolveArraySidebarItems, resolveMultiSidebarItems, resolveSidebarHeadingItem, resolveSidebarItems, resolveSidebarPageHeader, resolveSidebarPageHeaders, setupSidebarItems, sidebarItemsSymbol, useSidebarItems };
@@ -1 +1 @@
1
- export{t as resolveArraySidebarItems,n as resolveMultiSidebarItems,r as resolveSidebarHeadingItem,i as resolveSidebarItems,a as resolveSidebarPageHeader,o as resolveSidebarPageHeaders,s as setupSidebarItems,c as sidebarItemsSymbol,l as useSidebarItems}from"../../useSidebarItems-D1vD1QQp.js";
1
+ export{t as resolveArraySidebarItems,n as resolveMultiSidebarItems,r as resolveSidebarHeadingItem,i as resolveSidebarItems,a as resolveSidebarPageHeader,o as resolveSidebarPageHeaders,s as setupSidebarItems,c as sidebarItemsSymbol,l as useSidebarItems}from"../../useSidebarItems-BdjWkZ-U.js";
@@ -1,2 +1,2 @@
1
- import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-DD8W3spZ.js";
1
+ import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-BmTgRI9A.js";
2
2
  export { DeviceType, useUpdateDeviceStatus };
@@ -1 +1 @@
1
- export{t as DeviceType,n as useUpdateDeviceStatus}from"../../useUpdateDeviceStatus-CNEsUwNK.js";
1
+ export{t as DeviceType,n as useUpdateDeviceStatus}from"../../useUpdateDeviceStatus-BHudnBnG.js";
@@ -1,21 +1,21 @@
1
- import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../useDarkMode-DWdqlXpq.js";
2
- import "../index-BJbWgGUf.js";
3
- import { n as useData, t as Data } from "../useData-DMP1s8dN.js";
4
- import { t as useEditLink } from "../useEditLink-B8XOetrs.js";
5
- import { t as useNavigate } from "../useNavigate-ELe41hTY.js";
6
- import { a as SidebarLinkItem, i as SidebarItem, n as SidebarGroupItem, r as SidebarHeaderItem, t as NavbarItem } from "../typings-DV97y_41.js";
7
- import { t as useNavbarConfig } from "../useNavbarConfig-BWLU4cpg.js";
8
- import { t as useNavbarRepo } from "../useNavbarRepo-gcoAtjQO.js";
9
- import { t as useNavbarSelectLanguage } from "../useNavbarSelectLanguage-DzNEB1HX.js";
10
- import { t as useRelatedLinks } from "../useRelatedLinks-mvQ28g6C.js";
11
- import { n as useScrollPromise, t as ScrollPromise } from "../useScrollPromise-C9SNUmX_.js";
12
- import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../useSidebarItems-ByhBOO09.js";
13
- import { n as useUpdateDeviceStatus, t as DeviceType } from "../useUpdateDeviceStatus-DD8W3spZ.js";
14
- import "../index--4Q8BmVV.js";
15
- import { t as isActiveSidebarItem } from "../isActiveSidebarItem-CInJFY7t.js";
16
- import { t as resolveAutoLink } from "../resolveAutoLink-CgIw9MWM.js";
17
- import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../resolveEditLink-DzBrOebC.js";
18
- import { t as resolvePrefix } from "../resolvePrefix-DvC1-afu.js";
19
- import { n as resolveRepoType, t as RepoType } from "../resolveRepoType-DlYSUv-A.js";
20
- import { _ as NavbarOptions, a as DefaultThemeData, c as SidebarArrayOptions, d as SidebarLinkOptions, f as SidebarObjectOptions, g as NavbarLinkOptions, h as NavbarGroupOptions, i as DefaultThemePageFrontmatter, l as SidebarGroupOptions, m as NavGroup, n as DefaultThemeNormalPageFrontmatter, o as DefaultThemeLocaleData, p as SidebarOptions, r as DefaultThemePageData, s as DefaultThemeLocaleOptions, t as DefaultThemeHomePageFrontmatter, u as SidebarItemOptions, v as AutoLinkOptions, y as NavItemOptions } from "../index-DM_-Gf3x.js";
1
+ import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../useDarkMode-CAUx2JA_.js";
2
+ import "../index-gVluNoQB.js";
3
+ import { n as useData, t as Data } from "../useData-CHJ4YQxm.js";
4
+ import { t as useEditLink } from "../useEditLink-DxrHQSBQ.js";
5
+ import { t as useNavigate } from "../useNavigate-BqFABdRH.js";
6
+ import { a as SidebarLinkItem, i as SidebarItem, n as SidebarGroupItem, r as SidebarHeaderItem, t as NavbarItem } from "../typings-nCS-rgzp.js";
7
+ import { t as useNavbarConfig } from "../useNavbarConfig-D-9JdR3e.js";
8
+ import { t as useNavbarRepo } from "../useNavbarRepo-DpDvdhVG.js";
9
+ import { t as useNavbarSelectLanguage } from "../useNavbarSelectLanguage-CE-_yvom.js";
10
+ import { t as useRelatedLinks } from "../useRelatedLinks-LUir1Pbq.js";
11
+ import { n as useScrollPromise, t as ScrollPromise } from "../useScrollPromise-Bo6RkwWO.js";
12
+ import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../useSidebarItems-ed5-CCJI.js";
13
+ import { n as useUpdateDeviceStatus, t as DeviceType } from "../useUpdateDeviceStatus-BmTgRI9A.js";
14
+ import "../index-CzfpBrYE.js";
15
+ import { t as isActiveSidebarItem } from "../isActiveSidebarItem-s6FewkTf.js";
16
+ import { t as resolveAutoLink } from "../resolveAutoLink-Cw8JZzG1.js";
17
+ import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../resolveEditLink-CnoRqTqe.js";
18
+ import { t as resolvePrefix } from "../resolvePrefix-DwAjhGDe.js";
19
+ import { n as resolveRepoType, t as RepoType } from "../resolveRepoType-BjvddHET.js";
20
+ import { _ as NavbarOptions, a as DefaultThemeData, c as SidebarArrayOptions, d as SidebarLinkOptions, f as SidebarObjectOptions, g as NavbarLinkOptions, h as NavbarGroupOptions, i as DefaultThemePageFrontmatter, l as SidebarGroupOptions, m as NavGroup, n as DefaultThemeNormalPageFrontmatter, o as DefaultThemeLocaleData, p as SidebarOptions, r as DefaultThemePageData, s as DefaultThemeLocaleOptions, t as DefaultThemeHomePageFrontmatter, u as SidebarItemOptions, v as AutoLinkOptions, y as NavItemOptions } from "../index-B-NfQxLQ.js";
21
21
  export { type AutoLinkOptions, DarkModeRef, Data, type DefaultThemeData, type DefaultThemeHomePageFrontmatter, type DefaultThemeLocaleData, type DefaultThemeLocaleOptions, type DefaultThemeNormalPageFrontmatter, type DefaultThemePageData, type DefaultThemePageFrontmatter, DeviceType, EDIT_LINK_PATTERNS, type NavGroup, type NavItemOptions, type NavbarGroupOptions, type NavbarItem, type NavbarLinkOptions, type NavbarOptions, RepoType, ScrollPromise, type SidebarArrayOptions, type SidebarGroupItem, type SidebarGroupOptions, type SidebarHeaderItem, type SidebarItem, type SidebarItemOptions, SidebarItemsRef, type SidebarLinkItem, type SidebarLinkOptions, type SidebarObjectOptions, type SidebarOptions, isActiveSidebarItem, resolveArraySidebarItems, resolveAutoLink, resolveEditLink, resolveMultiSidebarItems, resolvePrefix, resolveRepoType, resolveSidebarHeadingItem, resolveSidebarItems, resolveSidebarPageHeader, resolveSidebarPageHeaders, setupDarkMode, setupSidebarItems, sidebarItemsSymbol, useDarkMode, useData, useEditLink, useNavbarConfig, useNavbarRepo, useNavbarSelectLanguage, useNavigate, useRelatedLinks, useScrollPromise, useSidebarItems, useUpdateDeviceStatus };
@@ -1 +1 @@
1
- import{n as e,t}from"../useDarkMode-BfKvIN6K.js";import{t as n}from"../useData-nv4hwlgW.js";import{t as r}from"../useEditLink-BmoW42FE.js";import{t as i}from"../useNavigate-mlFey3ew.js";import{t as a}from"../useNavbarConfig-CxVplYul.js";import{t as o}from"../useNavbarRepo-BScd94be.js";import{t as s}from"../useNavbarSelectLanguage-FHyzHFEW.js";import{t as c}from"../useRelatedLinks-BwsPumn1.js";import{t as l}from"../useScrollPromise-CB6ZLciv.js";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"../useSidebarItems-D1vD1QQp.js";import{n as y,t as b}from"../useUpdateDeviceStatus-CNEsUwNK.js";import{t as x}from"../isActiveSidebarItem-CdmUcp0l.js";import{t as S}from"../resolveAutoLink-XUJwl3Kb.js";import{n as C,t as w}from"../resolveEditLink-lteF0-Mv.js";import{t as T}from"../resolvePrefix-CQnTmTk4.js";import{t as E}from"../resolveRepoType-BfcHRhpi.js";export{b as DeviceType,w as EDIT_LINK_PATTERNS,x as isActiveSidebarItem,v as resolveArraySidebarItems,S as resolveAutoLink,C as resolveEditLink,m as resolveMultiSidebarItems,T as resolvePrefix,E as resolveRepoType,g as resolveSidebarHeadingItem,f as resolveSidebarItems,u as resolveSidebarPageHeader,h as resolveSidebarPageHeaders,t as setupDarkMode,_ as setupSidebarItems,d as sidebarItemsSymbol,e as useDarkMode,n as useData,r as useEditLink,a as useNavbarConfig,o as useNavbarRepo,s as useNavbarSelectLanguage,i as useNavigate,c as useRelatedLinks,l as useScrollPromise,p as useSidebarItems,y as useUpdateDeviceStatus};
1
+ import{n as e,t}from"../useDarkMode-C8li1LOU.js";import{t as n}from"../useData-EgwoIcp1.js";import{t as r}from"../useEditLink-CCShB2Bn.js";import{t as i}from"../useNavigate-D65vYI7T.js";import{t as a}from"../useNavbarConfig--ON58eTy.js";import{t as o}from"../useNavbarRepo-DzLa0J7F.js";import{t as s}from"../useNavbarSelectLanguage-D1veoHvn.js";import{t as c}from"../useRelatedLinks-Bq7S8W2Y.js";import{t as l}from"../useScrollPromise-L_hUHm0Z.js";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"../useSidebarItems-BdjWkZ-U.js";import{n as y,t as b}from"../useUpdateDeviceStatus-BHudnBnG.js";import{t as x}from"../isActiveSidebarItem-vL4aXoeX.js";import{t as S}from"../resolveAutoLink-DKGp9cn4.js";import{n as C,t as w}from"../resolveEditLink-Ds33XEh4.js";import{t as T}from"../resolvePrefix-Co9SoF5M.js";import{t as E}from"../resolveRepoType-DYzLb2Xi.js";export{b as DeviceType,w as EDIT_LINK_PATTERNS,x as isActiveSidebarItem,v as resolveArraySidebarItems,S as resolveAutoLink,C as resolveEditLink,m as resolveMultiSidebarItems,T as resolvePrefix,E as resolveRepoType,g as resolveSidebarHeadingItem,f as resolveSidebarItems,u as resolveSidebarPageHeader,h as resolveSidebarPageHeaders,t as setupDarkMode,_ as setupSidebarItems,d as sidebarItemsSymbol,e as useDarkMode,n as useData,r as useEditLink,a as useNavbarConfig,o as useNavbarRepo,s as useNavbarSelectLanguage,i as useNavigate,c as useRelatedLinks,l as useScrollPromise,p as useSidebarItems,y as useUpdateDeviceStatus};
@@ -1,7 +1,7 @@
1
- import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-CInJFY7t.js";
2
- import { t as resolveAutoLink } from "../../resolveAutoLink-CgIw9MWM.js";
3
- import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-DzBrOebC.js";
4
- import { t as resolvePrefix } from "../../resolvePrefix-DvC1-afu.js";
5
- import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-DlYSUv-A.js";
6
- import "../../index--4Q8BmVV.js";
1
+ import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-s6FewkTf.js";
2
+ import { t as resolveAutoLink } from "../../resolveAutoLink-Cw8JZzG1.js";
3
+ import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-CnoRqTqe.js";
4
+ import { t as resolvePrefix } from "../../resolvePrefix-DwAjhGDe.js";
5
+ import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-BjvddHET.js";
6
+ import "../../index-CzfpBrYE.js";
7
7
  export { EDIT_LINK_PATTERNS, RepoType, isActiveSidebarItem, resolveAutoLink, resolveEditLink, resolvePrefix, resolveRepoType };
@@ -1 +1 @@
1
- import{t as e}from"../../isActiveSidebarItem-CdmUcp0l.js";import{t}from"../../resolveAutoLink-XUJwl3Kb.js";import{n,t as r}from"../../resolveEditLink-lteF0-Mv.js";import{t as i}from"../../resolvePrefix-CQnTmTk4.js";import{t as a}from"../../resolveRepoType-BfcHRhpi.js";import"../../utils-CAISgiXf.js";export{r as EDIT_LINK_PATTERNS,e as isActiveSidebarItem,t as resolveAutoLink,n as resolveEditLink,i as resolvePrefix,a as resolveRepoType};
1
+ import{t as e}from"../../isActiveSidebarItem-vL4aXoeX.js";import{t}from"../../resolveAutoLink-DKGp9cn4.js";import{n,t as r}from"../../resolveEditLink-Ds33XEh4.js";import{t as i}from"../../resolvePrefix-Co9SoF5M.js";import{t as a}from"../../resolveRepoType-DYzLb2Xi.js";import"../../utils-CAISgiXf.js";export{r as EDIT_LINK_PATTERNS,e as isActiveSidebarItem,t as resolveAutoLink,n as resolveEditLink,i as resolvePrefix,a as resolveRepoType};
@@ -1,2 +1,2 @@
1
- import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-CInJFY7t.js";
1
+ import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-s6FewkTf.js";
2
2
  export { isActiveSidebarItem };
@@ -1 +1 @@
1
- export{t as isActiveSidebarItem}from"../../isActiveSidebarItem-CdmUcp0l.js";
1
+ export{t as isActiveSidebarItem}from"../../isActiveSidebarItem-vL4aXoeX.js";
@@ -1,2 +1,2 @@
1
- import { t as resolveAutoLink } from "../../resolveAutoLink-CgIw9MWM.js";
1
+ import { t as resolveAutoLink } from "../../resolveAutoLink-Cw8JZzG1.js";
2
2
  export { resolveAutoLink };
@@ -1 +1 @@
1
- export{t as resolveAutoLink}from"../../resolveAutoLink-XUJwl3Kb.js";
1
+ export{t as resolveAutoLink}from"../../resolveAutoLink-DKGp9cn4.js";
@@ -1,2 +1,2 @@
1
- import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-DzBrOebC.js";
1
+ import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-CnoRqTqe.js";
2
2
  export { EDIT_LINK_PATTERNS, resolveEditLink };
@@ -1 +1 @@
1
- export{t as EDIT_LINK_PATTERNS,n as resolveEditLink}from"../../resolveEditLink-lteF0-Mv.js";
1
+ export{t as EDIT_LINK_PATTERNS,n as resolveEditLink}from"../../resolveEditLink-Ds33XEh4.js";
@@ -1,2 +1,2 @@
1
- import { t as resolvePrefix } from "../../resolvePrefix-DvC1-afu.js";
1
+ import { t as resolvePrefix } from "../../resolvePrefix-DwAjhGDe.js";
2
2
  export { resolvePrefix };
@@ -1 +1 @@
1
- export{t as resolvePrefix}from"../../resolvePrefix-CQnTmTk4.js";
1
+ export{t as resolvePrefix}from"../../resolvePrefix-Co9SoF5M.js";
@@ -1,2 +1,2 @@
1
- import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-DlYSUv-A.js";
1
+ import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-BjvddHET.js";
2
2
  export { RepoType, resolveRepoType };
@@ -1 +1 @@
1
- export{t as resolveRepoType}from"../../resolveRepoType-BfcHRhpi.js";
1
+ export{t as resolveRepoType}from"../../resolveRepoType-DYzLb2Xi.js";
@@ -1,6 +1,6 @@
1
- import { GitPluginPageData } from "@vuepress/plugin-git";
2
1
  import { ThemeData } from "@vuepress/plugin-theme-data";
3
2
  import { LocaleData, PageFrontmatter } from "vuepress/shared";
3
+ import { GitPluginPageData } from "@vuepress/plugin-git";
4
4
  /** Base nav item, displayed as text */
5
5
  interface NavItemOptions {
6
6
  text: string;
@@ -0,0 +1,3 @@
1
+ import "./isActiveSidebarItem-s6FewkTf.js";
2
+ import "./resolveAutoLink-Cw8JZzG1.js";
3
+ import "./resolveEditLink-CnoRqTqe.js";
@@ -0,0 +1,8 @@
1
+ import "./useDarkMode-CAUx2JA_.js";
2
+ import "./useData-CHJ4YQxm.js";
3
+ import "./useEditLink-DxrHQSBQ.js";
4
+ import "./useNavbarConfig-D-9JdR3e.js";
5
+ import "./useNavbarRepo-DpDvdhVG.js";
6
+ import "./useNavbarSelectLanguage-CE-_yvom.js";
7
+ import "./useRelatedLinks-LUir1Pbq.js";
8
+ import "./useSidebarItems-ed5-CCJI.js";
@@ -1,4 +1,4 @@
1
- import { i as SidebarItem } from "./typings-DV97y_41.js";
2
1
  import { RouteLocationNormalizedLoaded } from "vuepress/client";
2
+ import { i as SidebarItem } from "./typings-nCS-rgzp.js";
3
3
  declare const isActiveSidebarItem: (item: SidebarItem, route: RouteLocationNormalizedLoaded) => boolean;
4
4
  export { isActiveSidebarItem as t };
@@ -1,2 +1,2 @@
1
1
  import{normalizePath as e}from"@vuepress/helper/client";const t=(t,n)=>n.hash===t||e(decodeURI(n.path),!0)===e(decodeURI(t),!0),n=(e,r)=>e.link&&t(e.link,r)?!0:`children`in e&&e.children.some(e=>n(e,r));export{n as t};
2
- //# sourceMappingURL=isActiveSidebarItem-CdmUcp0l.js.map
2
+ //# sourceMappingURL=isActiveSidebarItem-vL4aXoeX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isActiveSidebarItem-CdmUcp0l.js","names":["normalizePath","isActiveLink","link","route","isActiveSidebarItem","item","child"],"sources":["../src/client/utils/isActiveSidebarItem.ts"],"sourcesContent":["import { normalizePath } from '@vuepress/helper/client'\nimport type { RouteLocationNormalizedLoaded } from 'vuepress/client'\n\nimport type { SidebarItem } from '../typings.js'\n\nconst isActiveLink = (\n link: string,\n route: RouteLocationNormalizedLoaded,\n): boolean => {\n if (route.hash === link) return true\n\n const currentPath = normalizePath(decodeURI(route.path), true)\n const targetPath = normalizePath(decodeURI(link), true)\n return currentPath === targetPath\n}\n\nexport const isActiveSidebarItem = (\n item: SidebarItem,\n route: RouteLocationNormalizedLoaded,\n): boolean => {\n if (item.link && isActiveLink(item.link, route)) return true\n\n if ('children' in item)\n return item.children.some((child) => isActiveSidebarItem(child, route))\n\n return false\n}\n"],"mappings":"A,wDAKA,MAAMC,GACJC,EACAC,IAEIA,EAAM,OAASD,GAECF,EAAc,UAAUG,EAAM,IAAI,EAAG,EAExC,IADEH,EAAc,UAAUE,CAAI,EAAG,EAClB,EAGrBE,GACXC,EACAF,IAEIE,EAAK,MAAQJ,EAAaI,EAAK,KAAMF,CAAK,EAAU,GAEpD,aAAcE,GACTA,EAAK,SAAS,KAAMC,GAAUF,EAAoBE,EAAOH,CAAK,CAAC,E"}
1
+ {"version":3,"file":"isActiveSidebarItem-vL4aXoeX.js","names":["normalizePath","isActiveLink","link","route","isActiveSidebarItem","item","child"],"sources":["../src/client/utils/isActiveSidebarItem.ts"],"sourcesContent":["import { normalizePath } from '@vuepress/helper/client'\nimport type { RouteLocationNormalizedLoaded } from 'vuepress/client'\n\nimport type { SidebarItem } from '../typings.js'\n\nconst isActiveLink = (\n link: string,\n route: RouteLocationNormalizedLoaded,\n): boolean => {\n if (route.hash === link) return true\n\n const currentPath = normalizePath(decodeURI(route.path), true)\n const targetPath = normalizePath(decodeURI(link), true)\n return currentPath === targetPath\n}\n\nexport const isActiveSidebarItem = (\n item: SidebarItem,\n route: RouteLocationNormalizedLoaded,\n): boolean => {\n if (item.link && isActiveLink(item.link, route)) return true\n\n if ('children' in item)\n return item.children.some((child) => isActiveSidebarItem(child, route))\n\n return false\n}\n"],"mappings":"A,wDAKA,MAAMC,GACJC,EACAC,IAEIA,EAAM,OAASD,GAECF,EAAc,UAAUG,EAAM,IAAI,EAAG,EAExC,IADEH,EAAc,UAAUE,CAAI,EAAG,EAClB,EAGrBE,GACXC,EACAF,IAEIE,EAAK,MAAQJ,EAAaI,EAAK,KAAMF,CAAK,EAAU,GAEpD,aAAcE,GACTA,EAAK,SAAS,KAAMC,GAAUF,EAAoBE,EAAOH,CAAK,CAAC,E"}
@@ -1,4 +1,5 @@
1
- import { _ as NavbarOptions, a as DefaultThemeData, c as SidebarArrayOptions, d as SidebarLinkOptions, f as SidebarObjectOptions, g as NavbarLinkOptions, h as NavbarGroupOptions, i as DefaultThemePageFrontmatter, l as SidebarGroupOptions, m as NavGroup, n as DefaultThemeNormalPageFrontmatter, o as DefaultThemeLocaleData, p as SidebarOptions, r as DefaultThemePageData, s as DefaultThemeLocaleOptions, t as DefaultThemeHomePageFrontmatter, u as SidebarItemOptions, v as AutoLinkOptions, y as NavItemOptions } from "../index-DM_-Gf3x.js";
1
+ import { Theme } from "vuepress/core";
2
+ import { _ as NavbarOptions, a as DefaultThemeData, c as SidebarArrayOptions, d as SidebarLinkOptions, f as SidebarObjectOptions, g as NavbarLinkOptions, h as NavbarGroupOptions, i as DefaultThemePageFrontmatter, l as SidebarGroupOptions, m as NavGroup, n as DefaultThemeNormalPageFrontmatter, o as DefaultThemeLocaleData, p as SidebarOptions, r as DefaultThemePageData, s as DefaultThemeLocaleOptions, t as DefaultThemeHomePageFrontmatter, u as SidebarItemOptions, v as AutoLinkOptions, y as NavItemOptions } from "../index-B-NfQxLQ.js";
2
3
  import { BackToTopPluginOptions } from "@vuepress/plugin-back-to-top";
3
4
  import { CopyCodePluginOptions } from "@vuepress/plugin-copy-code";
4
5
  import { GitPluginOptions } from "@vuepress/plugin-git";
@@ -9,7 +10,6 @@ import { PrismjsPluginOptions } from "@vuepress/plugin-prismjs";
9
10
  import { SeoPluginOptions } from "@vuepress/plugin-seo";
10
11
  import { SitemapPluginOptions } from "@vuepress/plugin-sitemap";
11
12
  import { LocaleConfig } from "vuepress/shared";
12
- import { Theme } from "vuepress/core";
13
13
  interface DefaultThemePluginsOptions {
14
14
  /** Enable `@vuepress/plugin-active-header-links` or not */
15
15
  activeHeaderLinks?: boolean;
@@ -1,4 +1,4 @@
1
- import { v as AutoLinkOptions } from "./index-DM_-Gf3x.js";
1
+ import { v as AutoLinkOptions } from "./index-B-NfQxLQ.js";
2
2
  /**
3
3
  * Resolve AutoLink props from string
4
4
  *
@@ -1,2 +1,2 @@
1
1
  import{resolveRoute as e}from"vuepress/client";const t=(t,n)=>{let{notFound:r,meta:i,path:a}=e(t,n);return r?{text:a,link:a}:{text:i.title||a,link:a}};export{t};
2
- //# sourceMappingURL=resolveAutoLink-XUJwl3Kb.js.map
2
+ //# sourceMappingURL=resolveAutoLink-DKGp9cn4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveAutoLink-XUJwl3Kb.js","names":["resolveRoute","resolveAutoLink","config","currentPath","notFound","meta","path"],"sources":["../src/client/utils/resolveAutoLink.ts"],"sourcesContent":["import { resolveRoute } from 'vuepress/client'\n\nimport type { AutoLinkOptions } from '../../shared/index.js'\n\n/**\n * Resolve AutoLink props from string\n *\n * 从字符串解析 AutoLink 属性\n *\n * @example\n * - Input: '/README.md'\n * - Output: { text: 'Home', link: '/' }\n *\n * @param config - The string to resolve / 要解析的字符串\n * @param currentPath - The current route path / 当前路由路径\n * @returns Resolved AutoLink options / 解析后的 AutoLink 选项\n */\nexport const resolveAutoLink = (\n config: string,\n currentPath?: string,\n): AutoLinkOptions => {\n const { notFound, meta, path } = resolveRoute<{\n title?: string\n }>(config, currentPath)\n\n return notFound\n ? { text: path, link: path }\n : {\n text: meta.title || path,\n link: path,\n }\n}\n"],"mappings":"A,+CAiBA,MAAaC,GACXC,EACAC,IACoB,CACpB,GAAM,CAAEC,WAAUC,OAAMC,QAASN,EAE9BE,EAAQC,CAAW,EAEtB,OAAOC,EACH,CAAE,KAAME,EAAM,KAAMA,CAAK,EACzB,CACE,KAAMD,EAAK,OAASC,EACpB,KAAMA,CACR,CACN,E"}
1
+ {"version":3,"file":"resolveAutoLink-DKGp9cn4.js","names":["resolveRoute","resolveAutoLink","config","currentPath","notFound","meta","path"],"sources":["../src/client/utils/resolveAutoLink.ts"],"sourcesContent":["import { resolveRoute } from 'vuepress/client'\n\nimport type { AutoLinkOptions } from '../../shared/index.js'\n\n/**\n * Resolve AutoLink props from string\n *\n * 从字符串解析 AutoLink 属性\n *\n * @example\n * - Input: '/README.md'\n * - Output: { text: 'Home', link: '/' }\n *\n * @param config - The string to resolve / 要解析的字符串\n * @param currentPath - The current route path / 当前路由路径\n * @returns Resolved AutoLink options / 解析后的 AutoLink 选项\n */\nexport const resolveAutoLink = (\n config: string,\n currentPath?: string,\n): AutoLinkOptions => {\n const { notFound, meta, path } = resolveRoute<{\n title?: string\n }>(config, currentPath)\n\n return notFound\n ? { text: path, link: path }\n : {\n text: meta.title || path,\n link: path,\n }\n}\n"],"mappings":"A,+CAiBA,MAAaC,GACXC,EACAC,IACoB,CACpB,GAAM,CAAEC,WAAUC,OAAMC,QAASN,EAE9BE,EAAQC,CAAW,EAEtB,OAAOC,EACH,CAAE,KAAME,EAAM,KAAMA,CAAK,EACzB,CACE,KAAMD,EAAK,OAASC,EACpB,KAAMA,CACR,CACN,E"}
@@ -1,2 +1,2 @@
1
1
  import{isLinkHttp as e,removeEndingSlash as t,removeLeadingSlash as n}from"vuepress/shared";import{resolveRepoType as r}from"@theme/resolveRepoType";const i={GitHub:`:repo/edit/:branch/:path`,GitLab:`:repo/-/edit/:branch/:path`,Gitee:`:repo/edit/:branch/:path`,Bitbucket:`:repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default`},a=({docsRepo:e,editLinkPattern:t})=>{if(t)return t;let n=r(e);return n==null?null:i[n]},o=({docsRepo:r,docsBranch:i,docsDir:o,filePathRelative:s,editLinkPattern:c})=>{if(!s)return null;let l=a({docsRepo:r,editLinkPattern:c});return l?l.replace(/:repo/u,e(r)?r:`https://github.com/${r}`).replace(/:branch/u,i).replace(/:path/u,n(`${t(o)}/${s}`)):null};export{o as n,i as t};
2
- //# sourceMappingURL=resolveEditLink-lteF0-Mv.js.map
2
+ //# sourceMappingURL=resolveEditLink-Ds33XEh4.js.map