@vuepress/theme-default 2.0.0-rc.131 → 2.0.0-rc.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/composables/index.d.ts +9 -8
- package/dist/client/composables/index.js +1 -1
- package/dist/client/composables/useDarkMode.d.ts +1 -1
- package/dist/client/composables/useData.d.ts +1 -1
- package/dist/client/composables/useEditLink.d.ts +1 -1
- package/dist/client/composables/useHeaders.d.ts +0 -1
- package/dist/client/composables/useNavbarConfig.d.ts +1 -1
- package/dist/client/composables/useNavbarRepo.d.ts +1 -1
- package/dist/client/composables/useNavbarSelectLanguage.d.ts +1 -1
- package/dist/client/composables/useRelatedLinks.d.ts +1 -1
- package/dist/client/composables/useSidebarItems.d.ts +1 -1
- package/dist/client/composables/useSidebarItems.js +1 -1
- package/dist/client/config.d.ts +3 -0
- package/dist/client/index.d.ts +15 -13
- package/dist/client/index.js +1 -1
- package/dist/client/utils/index.d.ts +4 -3
- package/dist/client/utils/isActiveSidebarItem.d.ts +1 -1
- package/dist/client/utils/resolveAutoLink.d.ts +1 -1
- package/dist/client/utils/resolveEditLink.d.ts +1 -1
- package/dist/index-BIWlrErN.d.ts +3 -0
- package/dist/index-DgnmBYGr.d.ts +8 -0
- package/dist/{index-ur5YvkCJ.d.ts → index-DkAtp85h.d.ts} +1 -2
- package/dist/{isActiveSidebarItem-K6rOnBw4.d.ts → isActiveSidebarItem-DdHcB4fJ.d.ts} +2 -3
- package/dist/node/index.d.ts +2 -7
- package/dist/{resolveAutoLink-DBXc0Cd3.d.ts → resolveAutoLink-LfZfSGFX.d.ts} +2 -3
- package/dist/{resolveEditLink-BRZu2eno.d.ts → resolveEditLink-VYO59JxD.d.ts} +2 -9
- package/dist/{typings-CiGFIZqG.d.ts → typings-Dsy2lPQS.d.ts} +2 -3
- package/dist/{useDarkMode-uRSRwA8U.d.ts → useDarkMode-DmWka_eQ.d.ts} +1 -2
- package/dist/{useData-DwmcO8iz.d.ts → useData-B20ETmVf.d.ts} +2 -3
- package/dist/{useEditLink-COgJktiW.d.ts → useEditLink-DXlW5QzK.d.ts} +1 -2
- package/dist/{useNavbarConfig-fLxvBobP.d.ts → useNavbarConfig-CXdLjfSJ.d.ts} +2 -3
- package/dist/{useNavbarRepo-DndxHxeK.d.ts → useNavbarRepo-BQ2wiq-1.d.ts} +2 -3
- package/dist/{useNavbarSelectLanguage-a9ZpUKwM.d.ts → useNavbarSelectLanguage-Cd32nqUA.d.ts} +2 -3
- package/dist/{useRelatedLinks-DxkE-gdP.d.ts → useRelatedLinks-B5Hq7BUl.d.ts} +2 -3
- package/dist/{useSidebarItems-CL0nJ7E8.js → useSidebarItems-D1vD1QQp.js} +2 -2
- package/dist/{useSidebarItems-CL0nJ7E8.js.map → useSidebarItems-D1vD1QQp.js.map} +1 -1
- package/dist/{useSidebarItems-aGO1YtUp.d.ts → useSidebarItems-xWOsGwcx.d.ts} +3 -4
- package/package.json +8 -8
- package/dist/index-BKZ67WMa.d.ts +0 -1
- package/dist/index-BVVgDSdq.d.ts +0 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../../useDarkMode-
|
|
2
|
-
import { n as useData, t as Data } from "../../useData-
|
|
3
|
-
import { t as useEditLink } from "../../useEditLink-
|
|
1
|
+
import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../../useDarkMode-DmWka_eQ.js";
|
|
2
|
+
import { n as useData, t as Data } from "../../useData-B20ETmVf.js";
|
|
3
|
+
import { t as useEditLink } from "../../useEditLink-DXlW5QzK.js";
|
|
4
4
|
import { t as useNavigate } from "../../useNavigate-zqYnxkd_.js";
|
|
5
|
-
import { t as useNavbarConfig } from "../../useNavbarConfig-
|
|
6
|
-
import { t as useNavbarRepo } from "../../useNavbarRepo-
|
|
7
|
-
import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-
|
|
8
|
-
import { t as useRelatedLinks } from "../../useRelatedLinks-
|
|
5
|
+
import { t as useNavbarConfig } from "../../useNavbarConfig-CXdLjfSJ.js";
|
|
6
|
+
import { t as useNavbarRepo } from "../../useNavbarRepo-BQ2wiq-1.js";
|
|
7
|
+
import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-Cd32nqUA.js";
|
|
8
|
+
import { t as useRelatedLinks } from "../../useRelatedLinks-B5Hq7BUl.js";
|
|
9
9
|
import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-TwtWBE3d.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-
|
|
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-xWOsGwcx.js";
|
|
11
11
|
import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-CsrJ_Qqv.js";
|
|
12
|
+
import "../../index-DgnmBYGr.js";
|
|
12
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-
|
|
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-DMKiVB3W.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-
|
|
1
|
+
import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../../useDarkMode-DmWka_eQ.js";
|
|
2
2
|
export { DarkModeRef, setupDarkMode, useDarkMode };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as useData, t as Data } from "../../useData-
|
|
1
|
+
import { n as useData, t as Data } from "../../useData-B20ETmVf.js";
|
|
2
2
|
export { Data, useData };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as useEditLink } from "../../useEditLink-
|
|
1
|
+
import { t as useEditLink } from "../../useEditLink-DXlW5QzK.js";
|
|
2
2
|
export { useEditLink };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as useNavbarConfig } from "../../useNavbarConfig-
|
|
1
|
+
import { t as useNavbarConfig } from "../../useNavbarConfig-CXdLjfSJ.js";
|
|
2
2
|
export { useNavbarConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as useNavbarRepo } from "../../useNavbarRepo-
|
|
1
|
+
import { t as useNavbarRepo } from "../../useNavbarRepo-BQ2wiq-1.js";
|
|
2
2
|
export { useNavbarRepo };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-
|
|
1
|
+
import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-Cd32nqUA.js";
|
|
2
2
|
export { useNavbarSelectLanguage };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as useRelatedLinks } from "../../useRelatedLinks-
|
|
1
|
+
import { t as useRelatedLinks } from "../../useRelatedLinks-B5Hq7BUl.js";
|
|
2
2
|
export { useRelatedLinks };
|
|
@@ -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-
|
|
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-xWOsGwcx.js";
|
|
2
2
|
export { SidebarItemsRef, resolveArraySidebarItems, resolveMultiSidebarItems, resolveSidebarHeadingItem, resolveSidebarItems, resolveSidebarPageHeader, resolveSidebarPageHeaders, setupSidebarItems, sidebarItemsSymbol, useSidebarItems };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"../../useSidebarItems-
|
|
1
|
+
import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"../../useSidebarItems-D1vD1QQp.js";export{c as resolveArraySidebarItems,i as resolveMultiSidebarItems,o as resolveSidebarHeadingItem,n as resolveSidebarItems,e as resolveSidebarPageHeader,a as resolveSidebarPageHeaders,s as setupSidebarItems,t as sidebarItemsSymbol,r as useSidebarItems};
|
package/dist/client/config.d.ts
CHANGED
package/dist/client/index.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../useDarkMode-
|
|
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-
|
|
3
|
-
import { n as useData, t as Data } from "../useData-
|
|
4
|
-
import { t as useEditLink } from "../useEditLink-
|
|
1
|
+
import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../useDarkMode-DmWka_eQ.js";
|
|
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-DkAtp85h.js";
|
|
3
|
+
import { n as useData, t as Data } from "../useData-B20ETmVf.js";
|
|
4
|
+
import { t as useEditLink } from "../useEditLink-DXlW5QzK.js";
|
|
5
5
|
import { t as useNavigate } from "../useNavigate-zqYnxkd_.js";
|
|
6
|
-
import { a as SidebarLinkItem, i as SidebarItem, n as SidebarGroupItem, r as SidebarHeaderItem, t as NavbarItem } from "../typings-
|
|
7
|
-
import { t as useNavbarConfig } from "../useNavbarConfig-
|
|
8
|
-
import { t as useNavbarRepo } from "../useNavbarRepo-
|
|
9
|
-
import { t as useNavbarSelectLanguage } from "../useNavbarSelectLanguage-
|
|
10
|
-
import { t as useRelatedLinks } from "../useRelatedLinks-
|
|
6
|
+
import { a as SidebarLinkItem, i as SidebarItem, n as SidebarGroupItem, r as SidebarHeaderItem, t as NavbarItem } from "../typings-Dsy2lPQS.js";
|
|
7
|
+
import { t as useNavbarConfig } from "../useNavbarConfig-CXdLjfSJ.js";
|
|
8
|
+
import { t as useNavbarRepo } from "../useNavbarRepo-BQ2wiq-1.js";
|
|
9
|
+
import { t as useNavbarSelectLanguage } from "../useNavbarSelectLanguage-Cd32nqUA.js";
|
|
10
|
+
import { t as useRelatedLinks } from "../useRelatedLinks-B5Hq7BUl.js";
|
|
11
11
|
import { n as useScrollPromise, t as ScrollPromise } from "../useScrollPromise-TwtWBE3d.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-
|
|
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-xWOsGwcx.js";
|
|
13
13
|
import { n as useUpdateDeviceStatus, t as DeviceType } from "../useUpdateDeviceStatus-CsrJ_Qqv.js";
|
|
14
|
-
import
|
|
15
|
-
import { t as
|
|
16
|
-
import {
|
|
14
|
+
import "../index-DgnmBYGr.js";
|
|
15
|
+
import { t as isActiveSidebarItem } from "../isActiveSidebarItem-DdHcB4fJ.js";
|
|
16
|
+
import { t as resolveAutoLink } from "../resolveAutoLink-LfZfSGFX.js";
|
|
17
|
+
import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../resolveEditLink-VYO59JxD.js";
|
|
17
18
|
import { t as resolvePrefix } from "../resolvePrefix-BXZhEIJn.js";
|
|
18
19
|
import { n as resolveRepoType, t as RepoType } from "../resolveRepoType-DEy0Gvc4.js";
|
|
20
|
+
import "../index-BIWlrErN.js";
|
|
19
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 };
|
package/dist/client/index.js
CHANGED
|
@@ -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-
|
|
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-DMKiVB3W.js";import{t as x}from"../isActiveSidebarItem-BQHhsM53.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,6 +1,7 @@
|
|
|
1
|
-
import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-
|
|
2
|
-
import { t as resolveAutoLink } from "../../resolveAutoLink-
|
|
3
|
-
import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-
|
|
1
|
+
import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-DdHcB4fJ.js";
|
|
2
|
+
import { t as resolveAutoLink } from "../../resolveAutoLink-LfZfSGFX.js";
|
|
3
|
+
import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-VYO59JxD.js";
|
|
4
4
|
import { t as resolvePrefix } from "../../resolvePrefix-BXZhEIJn.js";
|
|
5
5
|
import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-DEy0Gvc4.js";
|
|
6
|
+
import "../../index-BIWlrErN.js";
|
|
6
7
|
export { EDIT_LINK_PATTERNS, RepoType, isActiveSidebarItem, resolveAutoLink, resolveEditLink, resolvePrefix, resolveRepoType };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-
|
|
1
|
+
import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-DdHcB4fJ.js";
|
|
2
2
|
export { isActiveSidebarItem };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolveAutoLink } from "../../resolveAutoLink-
|
|
1
|
+
import { t as resolveAutoLink } from "../../resolveAutoLink-LfZfSGFX.js";
|
|
2
2
|
export { resolveAutoLink };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-
|
|
1
|
+
import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-VYO59JxD.js";
|
|
2
2
|
export { EDIT_LINK_PATTERNS, resolveEditLink };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./useDarkMode-DmWka_eQ.js";
|
|
2
|
+
import "./useData-B20ETmVf.js";
|
|
3
|
+
import "./useEditLink-DXlW5QzK.js";
|
|
4
|
+
import "./useNavbarConfig-CXdLjfSJ.js";
|
|
5
|
+
import "./useNavbarRepo-BQ2wiq-1.js";
|
|
6
|
+
import "./useNavbarSelectLanguage-Cd32nqUA.js";
|
|
7
|
+
import "./useRelatedLinks-B5Hq7BUl.js";
|
|
8
|
+
import "./useSidebarItems-xWOsGwcx.js";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { GitPluginPageData } from "@vuepress/plugin-git";
|
|
2
2
|
import { ThemeData } from "@vuepress/plugin-theme-data";
|
|
3
3
|
import { LocaleData, PageFrontmatter } from "vuepress/shared";
|
|
4
|
-
|
|
5
4
|
//#region src/shared/nav.d.ts
|
|
6
5
|
/** Base nav item, displayed as text */
|
|
7
6
|
interface NavItemOptions {
|
|
@@ -328,4 +327,4 @@ interface DefaultThemeNormalPageFrontmatter extends DefaultThemePageFrontmatter
|
|
|
328
327
|
}
|
|
329
328
|
//#endregion
|
|
330
329
|
export { NavbarOptions as _, DefaultThemeData as a, SidebarArrayOptions as c, SidebarLinkOptions as d, SidebarObjectOptions as f, NavbarLinkOptions as g, NavbarGroupOptions as h, DefaultThemePageFrontmatter as i, SidebarGroupOptions as l, NavGroup as m, DefaultThemeNormalPageFrontmatter as n, DefaultThemeLocaleData as o, SidebarOptions as p, DefaultThemePageData as r, DefaultThemeLocaleOptions as s, DefaultThemeHomePageFrontmatter as t, SidebarItemOptions as u, AutoLinkOptions as v, NavItemOptions as y };
|
|
331
|
-
//# sourceMappingURL=index-
|
|
330
|
+
//# sourceMappingURL=index-DkAtp85h.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { i as SidebarItem } from "./typings-
|
|
1
|
+
import { i as SidebarItem } from "./typings-Dsy2lPQS.js";
|
|
2
2
|
import { RouteLocationNormalizedLoaded } from "vuepress/client";
|
|
3
|
-
|
|
4
3
|
//#region src/client/utils/isActiveSidebarItem.d.ts
|
|
5
4
|
declare const isActiveSidebarItem: (item: SidebarItem, route: RouteLocationNormalizedLoaded) => boolean;
|
|
6
5
|
//#endregion
|
|
7
6
|
export { isActiveSidebarItem as t };
|
|
8
|
-
//# sourceMappingURL=isActiveSidebarItem-
|
|
7
|
+
//# sourceMappingURL=isActiveSidebarItem-DdHcB4fJ.d.ts.map
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-DkAtp85h.js";
|
|
2
2
|
import { BackToTopPluginOptions } from "@vuepress/plugin-back-to-top";
|
|
3
3
|
import { CopyCodePluginOptions } from "@vuepress/plugin-copy-code";
|
|
4
4
|
import { GitPluginOptions } from "@vuepress/plugin-git";
|
|
@@ -10,7 +10,6 @@ import { SeoPluginOptions } from "@vuepress/plugin-seo";
|
|
|
10
10
|
import { SitemapPluginOptions } from "@vuepress/plugin-sitemap";
|
|
11
11
|
import { LocaleConfig } from "vuepress/shared";
|
|
12
12
|
import { Theme } from "vuepress/core";
|
|
13
|
-
|
|
14
13
|
//#region src/node/typings.d.ts
|
|
15
14
|
interface DefaultThemePluginsOptions {
|
|
16
15
|
/** Enable `@vuepress/plugin-active-header-links` or not */
|
|
@@ -46,11 +45,7 @@ interface DefaultThemeOptions extends DefaultThemeLocaleOptions {
|
|
|
46
45
|
/** To avoid confusion with the root `plugins` option, we use `themePlugins` */
|
|
47
46
|
themePlugins?: DefaultThemePluginsOptions;
|
|
48
47
|
}
|
|
49
|
-
declare const defaultTheme: ({
|
|
50
|
-
hostname,
|
|
51
|
-
themePlugins,
|
|
52
|
-
...localeOptions
|
|
53
|
-
}?: DefaultThemeOptions) => Theme;
|
|
48
|
+
declare const defaultTheme: ({ hostname, themePlugins, ...localeOptions }?: DefaultThemeOptions) => Theme;
|
|
54
49
|
//#endregion
|
|
55
50
|
//#region src/node/utils/assignDefaultLocaleOptions.d.ts
|
|
56
51
|
declare const DEFAULT_LOCALE_OPTIONS: DefaultThemeLocaleOptions;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { v as AutoLinkOptions } from "./index-
|
|
2
|
-
|
|
1
|
+
import { v as AutoLinkOptions } from "./index-DkAtp85h.js";
|
|
3
2
|
//#region src/client/utils/resolveAutoLink.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Resolve AutoLink props from string
|
|
@@ -17,4 +16,4 @@ import { v as AutoLinkOptions } from "./index-ur5YvkCJ.js";
|
|
|
17
16
|
declare const resolveAutoLink: (config: string, currentPath?: string) => AutoLinkOptions;
|
|
18
17
|
//#endregion
|
|
19
18
|
export { resolveAutoLink as t };
|
|
20
|
-
//# sourceMappingURL=resolveAutoLink-
|
|
19
|
+
//# sourceMappingURL=resolveAutoLink-LfZfSGFX.d.ts.map
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { RepoType } from "@theme/resolveRepoType";
|
|
2
|
-
|
|
3
2
|
//#region src/client/utils/resolveEditLink.d.ts
|
|
4
3
|
declare const EDIT_LINK_PATTERNS: Record<Exclude<RepoType, null>, string>;
|
|
5
|
-
declare const resolveEditLink: ({
|
|
6
|
-
docsRepo,
|
|
7
|
-
docsBranch,
|
|
8
|
-
docsDir,
|
|
9
|
-
filePathRelative,
|
|
10
|
-
editLinkPattern
|
|
11
|
-
}: {
|
|
4
|
+
declare const resolveEditLink: ({ docsRepo, docsBranch, docsDir, filePathRelative, editLinkPattern }: {
|
|
12
5
|
docsRepo: string;
|
|
13
6
|
docsBranch: string;
|
|
14
7
|
docsDir: string;
|
|
@@ -17,4 +10,4 @@ declare const resolveEditLink: ({
|
|
|
17
10
|
}) => string | null;
|
|
18
11
|
//#endregion
|
|
19
12
|
export { resolveEditLink as n, EDIT_LINK_PATTERNS as t };
|
|
20
|
-
//# sourceMappingURL=resolveEditLink-
|
|
13
|
+
//# sourceMappingURL=resolveEditLink-VYO59JxD.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { d as SidebarLinkOptions, l as SidebarGroupOptions, m as NavGroup, v as AutoLinkOptions } from "./index-
|
|
2
|
-
|
|
1
|
+
import { d as SidebarLinkOptions, l as SidebarGroupOptions, m as NavGroup, v as AutoLinkOptions } from "./index-DkAtp85h.js";
|
|
3
2
|
//#region src/client/typings.d.ts
|
|
4
3
|
type NavbarItem = AutoLinkOptions | NavGroup<NavbarItem>;
|
|
5
4
|
type SidebarLinkItem = SidebarLinkOptions;
|
|
@@ -15,4 +14,4 @@ interface SidebarGroupItem extends SidebarGroupOptions {
|
|
|
15
14
|
type SidebarItem = SidebarGroupItem | SidebarLinkItem;
|
|
16
15
|
//#endregion
|
|
17
16
|
export { SidebarLinkItem as a, SidebarItem as i, SidebarGroupItem as n, SidebarHeaderItem as r, NavbarItem as t };
|
|
18
|
-
//# sourceMappingURL=typings-
|
|
17
|
+
//# sourceMappingURL=typings-Dsy2lPQS.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { WritableComputedRef } from "vue";
|
|
2
|
-
|
|
3
2
|
//#region src/client/composables/useDarkMode.d.ts
|
|
4
3
|
type DarkModeRef = WritableComputedRef<boolean>;
|
|
5
4
|
/**
|
|
@@ -14,4 +13,4 @@ declare const useDarkMode: () => DarkModeRef;
|
|
|
14
13
|
declare const setupDarkMode: () => void;
|
|
15
14
|
//#endregion
|
|
16
15
|
export { setupDarkMode as n, useDarkMode as r, DarkModeRef as t };
|
|
17
|
-
//# sourceMappingURL=useDarkMode-
|
|
16
|
+
//# sourceMappingURL=useDarkMode-DmWka_eQ.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { a as DefaultThemeData, n as DefaultThemeNormalPageFrontmatter, r as DefaultThemePageData } from "./index-
|
|
1
|
+
import { a as DefaultThemeData, n as DefaultThemeNormalPageFrontmatter, r as DefaultThemePageData } from "./index-DkAtp85h.js";
|
|
2
2
|
import { ClientData } from "vuepress/client";
|
|
3
3
|
import { ThemeDataRef, ThemeLocaleDataRef } from "@vuepress/plugin-theme-data/client";
|
|
4
|
-
|
|
5
4
|
//#region src/client/composables/useData.d.ts
|
|
6
5
|
interface Data<PageFrontmatter extends Record<string, unknown> = DefaultThemeNormalPageFrontmatter, PageData extends Record<string, unknown> = DefaultThemePageData> extends Pick<ClientData<PageFrontmatter, PageData>, 'frontmatter' | 'head' | 'headTitle' | 'lang' | 'layouts' | 'page' | 'pageComponent' | 'pageLayout' | 'redirects' | 'routeLocale' | 'routePath' | 'routes' | 'site' | 'siteLocale'> {
|
|
7
6
|
theme: ThemeDataRef<DefaultThemeData>;
|
|
@@ -10,4 +9,4 @@ interface Data<PageFrontmatter extends Record<string, unknown> = DefaultThemeNor
|
|
|
10
9
|
declare const useData$1: <PageFrontmatter extends Record<string, unknown> = DefaultThemeNormalPageFrontmatter, PageData extends Record<string, unknown> = DefaultThemePageData>() => Data<PageFrontmatter, PageData>;
|
|
11
10
|
//#endregion
|
|
12
11
|
export { useData$1 as n, Data as t };
|
|
13
|
-
//# sourceMappingURL=useData-
|
|
12
|
+
//# sourceMappingURL=useData-B20ETmVf.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { AutoLinkConfig } from "vuepress/client";
|
|
2
2
|
import { ComputedRef } from "vue";
|
|
3
|
-
|
|
4
3
|
//#region src/client/composables/useEditLink.d.ts
|
|
5
4
|
declare const useEditLink: () => ComputedRef<AutoLinkConfig | null>;
|
|
6
5
|
//#endregion
|
|
7
6
|
export { useEditLink as t };
|
|
8
|
-
//# sourceMappingURL=useEditLink-
|
|
7
|
+
//# sourceMappingURL=useEditLink-DXlW5QzK.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as NavbarItem } from "./typings-
|
|
1
|
+
import { t as NavbarItem } from "./typings-Dsy2lPQS.js";
|
|
2
2
|
import { ComputedRef } from "vue";
|
|
3
|
-
|
|
4
3
|
//#region src/client/composables/useNavbarConfig.d.ts
|
|
5
4
|
declare const useNavbarConfig: () => ComputedRef<NavbarItem[]>;
|
|
6
5
|
//#endregion
|
|
7
6
|
export { useNavbarConfig as t };
|
|
8
|
-
//# sourceMappingURL=useNavbarConfig-
|
|
7
|
+
//# sourceMappingURL=useNavbarConfig-CXdLjfSJ.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as NavbarItem } from "./typings-
|
|
1
|
+
import { t as NavbarItem } from "./typings-Dsy2lPQS.js";
|
|
2
2
|
import { ComputedRef } from "vue";
|
|
3
|
-
|
|
4
3
|
//#region src/client/composables/useNavbarRepo.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Repository link in navbar
|
|
@@ -10,4 +9,4 @@ import { ComputedRef } from "vue";
|
|
|
10
9
|
declare const useNavbarRepo: () => ComputedRef<NavbarItem[]>;
|
|
11
10
|
//#endregion
|
|
12
11
|
export { useNavbarRepo as t };
|
|
13
|
-
//# sourceMappingURL=useNavbarRepo-
|
|
12
|
+
//# sourceMappingURL=useNavbarRepo-BQ2wiq-1.d.ts.map
|
package/dist/{useNavbarSelectLanguage-a9ZpUKwM.d.ts → useNavbarSelectLanguage-Cd32nqUA.d.ts}
RENAMED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as NavbarItem } from "./typings-
|
|
1
|
+
import { t as NavbarItem } from "./typings-Dsy2lPQS.js";
|
|
2
2
|
import { ComputedRef } from "vue";
|
|
3
|
-
|
|
4
3
|
//#region src/client/composables/useNavbarSelectLanguage.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Get navbar config of select language dropdown
|
|
@@ -10,4 +9,4 @@ import { ComputedRef } from "vue";
|
|
|
10
9
|
declare const useNavbarSelectLanguage: () => ComputedRef<NavbarItem[]>;
|
|
11
10
|
//#endregion
|
|
12
11
|
export { useNavbarSelectLanguage as t };
|
|
13
|
-
//# sourceMappingURL=useNavbarSelectLanguage-
|
|
12
|
+
//# sourceMappingURL=useNavbarSelectLanguage-Cd32nqUA.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { v as AutoLinkOptions } from "./index-
|
|
1
|
+
import { v as AutoLinkOptions } from "./index-DkAtp85h.js";
|
|
2
2
|
import { ComputedRef } from "vue";
|
|
3
|
-
|
|
4
3
|
//#region src/client/composables/useRelatedLinks.d.ts
|
|
5
4
|
interface RelatedLinks {
|
|
6
5
|
prevLink: ComputedRef<AutoLinkOptions | null>;
|
|
@@ -9,4 +8,4 @@ interface RelatedLinks {
|
|
|
9
8
|
declare const useRelatedLinks: () => RelatedLinks;
|
|
10
9
|
//#endregion
|
|
11
10
|
export { useRelatedLinks as t };
|
|
12
|
-
//# sourceMappingURL=useRelatedLinks-
|
|
11
|
+
//# sourceMappingURL=useRelatedLinks-B5Hq7BUl.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{isPlainObject as e,isString as t}from"vuepress/shared";import{isLinkRelative as n,keys as r,startsWith as i}from"@vuepress/helper/client";import{useRoutePath as a}from"vuepress/client";import{useHeaders as o}from"@theme/useHeaders";import{computed as s,inject as c,provide as l}from"vue";import{useData as u}from"@theme/useData";import{resolveAutoLink as d}from"@theme/resolveAutoLink";import{resolvePrefix as f}from"@theme/resolvePrefix";const p=e=>({text:e.title,link:e.link,children:m(e.children)}),m=e=>e?e.map(e=>p(e)):[],h=(e,t)=>[{text:e.title,children:m(t)}],g=(e,r,i,a=``)=>{let o=(e,a)=>{let s=t(e)?d(f(a,e)):t(e.link)?{...e,link:n(e.link)?d(f(a,e.link)).link:e.link}:e;if(`children`in s)return{...s,children:s.children.map(e=>o(e,f(a,s.prefix)))};if(s.link===i){let e=r[0]?.level===1?r[0].children:r;return{...s,children:m(e)}}return s};return e.map(e=>o(e,a))},_=(e,t,n,a)=>{let o=r(e).sort((e,t)=>t.length-e.length);for(let r of o)if(i(decodeURI(a),r)){let i=e[r];return i===!1?[]:i===`heading`?h(t,n):g(i,n,a,r)}return console.warn(`${decodeURI(a)} is missing sidebar config.`),[]},v=Symbol(`sidebarItems`),y=()=>{let e=c(v);if(!e)throw Error(`useSidebarItems() is called without provider.`);return e},b=(t,n,r,i,a)=>t===!1?[]:t===`heading`?h(n,a):Array.isArray(t)?g(t,a,r,i):e(t)?_(t,n,a,r):[],x=()=>{let{frontmatter:e,page:t,routeLocale:n,themeLocale:r}=u(),i=o(),c=a(),d=s(()=>!e.value.home&&(e.value.sidebar??r.value.sidebar??`heading`))
|
|
2
|
-
//# sourceMappingURL=useSidebarItems-
|
|
1
|
+
import{isPlainObject as e,isString as t}from"vuepress/shared";import{isLinkRelative as n,keys as r,startsWith as i}from"@vuepress/helper/client";import{useRoutePath as a}from"vuepress/client";import{useHeaders as o}from"@theme/useHeaders";import{computed as s,inject as c,provide as l}from"vue";import{useData as u}from"@theme/useData";import{resolveAutoLink as d}from"@theme/resolveAutoLink";import{resolvePrefix as f}from"@theme/resolvePrefix";const p=e=>({text:e.title,link:e.link,children:m(e.children)}),m=e=>e?e.map(e=>p(e)):[],h=(e,t)=>[{text:e.title,children:m(t)}],g=(e,r,i,a=``)=>{let o=(e,a)=>{let s=t(e)?d(f(a,e)):t(e.link)?{...e,link:n(e.link)?d(f(a,e.link)).link:e.link}:e;if(`children`in s)return{...s,children:s.children.map(e=>o(e,f(a,s.prefix)))};if(s.link===i){let e=r[0]?.level===1?r[0].children:r;return{...s,children:m(e)}}return s};return e.map(e=>o(e,a))},_=(e,t,n,a)=>{let o=r(e).sort((e,t)=>t.length-e.length);for(let r of o)if(i(decodeURI(a),r)){let i=e[r];return i===!1?[]:i===`heading`?h(t,n):g(i,n,a,r)}return console.warn(`${decodeURI(a)} is missing sidebar config.`),[]},v=Symbol(`sidebarItems`),y=()=>{let e=c(v);if(!e)throw Error(`useSidebarItems() is called without provider.`);return e},b=(t,n,r,i,a)=>t===!1?[]:t===`heading`?h(n,a):Array.isArray(t)?g(t,a,r,i):e(t)?_(t,n,a,r):[],x=()=>{let{frontmatter:e,page:t,routeLocale:n,themeLocale:r}=u(),i=o(),c=a(),d=s(()=>!e.value.home&&(e.value.sidebar??r.value.sidebar??`heading`)),f=s(()=>b(d.value,t.value,c.value,n.value,i.value));l(v,f)};export{p as a,v as c,b as i,y as l,_ as n,m as o,h as r,x as s,g as t};
|
|
2
|
+
//# sourceMappingURL=useSidebarItems-D1vD1QQp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSidebarItems-
|
|
1
|
+
{"version":3,"file":"useSidebarItems-D1vD1QQp.js","names":["useData"],"sources":["../src/client/composables/useSidebarItems.ts"],"sourcesContent":["import { isLinkRelative, keys, startsWith } from '@vuepress/helper/client'\nimport type { ComputedRef, InjectionKey } from 'vue'\nimport { computed, inject, provide } from 'vue'\nimport type { PageData, PageHeader } from 'vuepress/client'\nimport { useRoutePath } from 'vuepress/client'\nimport { isPlainObject, isString } from 'vuepress/shared'\n\nimport { resolveAutoLink } from '@theme/resolveAutoLink'\nimport { resolvePrefix } from '@theme/resolvePrefix'\nimport { useData } from '@theme/useData'\nimport { useHeaders } from '@theme/useHeaders'\n\nimport type {\n DefaultThemeHomePageFrontmatter,\n DefaultThemeNormalPageFrontmatter,\n SidebarArrayOptions,\n SidebarItemOptions,\n SidebarObjectOptions,\n SidebarOptions,\n} from '../../shared/index.js'\nimport type { SidebarHeaderItem, SidebarItem } from '../typings.js'\n\n/**\n * Util to transform page header to sidebar item\n *\n * @param header Page header\n * @returns Sidebar item from header\n */\nexport const resolveSidebarPageHeader = (\n header: PageHeader,\n): SidebarHeaderItem => ({\n text: header.title,\n link: header.link,\n // oxlint-disable-next-line no-use-before-define\n children: resolveSidebarPageHeaders(header.children),\n})\n\n/**\n * Get sidebar header items from page headers\n *\n * @param headers Page headers\n * @returns Sidebar header items\n */\nexport const resolveSidebarPageHeaders = (\n headers?: PageHeader[],\n): SidebarHeaderItem[] =>\n headers ? headers.map((header) => resolveSidebarPageHeader(header)) : []\n\n/**\n * Resolve current page and its header to sidebar items if the config is\n * `heading`\n *\n * @param page Current page data\n * @param headers Current page headers\n * @returns Sidebar items\n */\nexport const resolveSidebarHeadingItem = (\n page: PageData,\n headers: PageHeader[],\n): SidebarItem[] => [\n {\n text: page.title,\n children: resolveSidebarPageHeaders(headers),\n },\n]\n\n/**\n * Resolve sidebar items if the config is an array\n *\n * @param sidebarConfig Sidebar config array\n * @param headers Current page headers\n * @param path Current page path\n * @param prefix Path prefix\n * @returns Resolved sidebar items\n */\nexport const resolveArraySidebarItems = (\n sidebarConfig: SidebarArrayOptions,\n headers: PageHeader[],\n path: string,\n prefix = '',\n): SidebarItem[] => {\n const handleChildItem = (\n item: SidebarItemOptions,\n pathPrefix: string,\n ): SidebarItem => {\n const childItem: SidebarItemOptions = isString(item)\n ? resolveAutoLink(resolvePrefix(pathPrefix, item))\n : isString(item.link)\n ? {\n ...item,\n link: isLinkRelative(item.link)\n ? resolveAutoLink(resolvePrefix(pathPrefix, item.link)).link\n : item.link,\n }\n : item\n\n if ('children' in childItem) {\n return {\n ...childItem,\n children: childItem.children.map((child) =>\n handleChildItem(child, resolvePrefix(pathPrefix, childItem.prefix)),\n ),\n }\n }\n\n // if the sidebar item is current page and children is not set\n // use headers of current page as children\n if (childItem.link === path) {\n // skip h1 header\n const currentHeaders =\n headers[0]?.level === 1 ? headers[0].children : headers\n\n return {\n ...childItem,\n children: resolveSidebarPageHeaders(currentHeaders),\n }\n }\n\n return childItem\n }\n\n return sidebarConfig.map((item) => handleChildItem(item, prefix))\n}\n\n/**\n * Resolve sidebar items if the config is a key -> value (path-prefix -> array)\n * object\n *\n * @param sidebarConfig Sidebar config object\n * @param page Current page data\n * @param headers Current page headers\n * @param path Current page path\n * @returns Resolved sidebar items\n */\nexport const resolveMultiSidebarItems = (\n sidebarConfig: SidebarObjectOptions,\n page: PageData,\n headers: PageHeader[],\n path: string,\n): SidebarItem[] => {\n const sidebarRoutes = keys(sidebarConfig).sort((a, b) => b.length - a.length)\n\n // Find matching config\n for (const base of sidebarRoutes) {\n if (startsWith(decodeURI(path), base)) {\n const matched = sidebarConfig[base]\n\n return matched === false\n ? []\n : matched === 'heading'\n ? resolveSidebarHeadingItem(page, headers)\n : resolveArraySidebarItems(matched, headers, path, base)\n }\n }\n\n // oxlint-disable-next-line no-console\n console.warn(`${decodeURI(path)} is missing sidebar config.`)\n\n return []\n}\n\nexport type SidebarItemsRef = ComputedRef<SidebarItem[]>\n\nexport const sidebarItemsSymbol: InjectionKey<SidebarItemsRef> =\n Symbol('sidebarItems')\n\n/**\n * Inject sidebar items global computed\n *\n * @returns Sidebar items global computed\n */\nexport const useSidebarItems = (): SidebarItemsRef => {\n const sidebarItems = inject(sidebarItemsSymbol)\n if (!sidebarItems)\n throw new Error('useSidebarItems() is called without provider.')\n\n return sidebarItems\n}\n\n/**\n * Resolve sidebar items global computed\n *\n * It should only be resolved and provided once\n *\n * @param sidebarConfig Sidebar config\n * @param page Current page data\n * @param path Current page path\n * @param routeLocale Current route locale\n * @param headers Current page headers\n * @returns Resolved sidebar items\n */\n\nexport const resolveSidebarItems = (\n sidebarConfig: SidebarOptions | false,\n page: PageData,\n path: string,\n routeLocale: string,\n headers: PageHeader[],\n): SidebarItem[] => {\n // resolve sidebar items according to the config\n if (sidebarConfig === false) return []\n\n if (sidebarConfig === 'heading')\n return resolveSidebarHeadingItem(page, headers)\n\n if (Array.isArray(sidebarConfig))\n return resolveArraySidebarItems(sidebarConfig, headers, path, routeLocale)\n\n if (isPlainObject(sidebarConfig))\n return resolveMultiSidebarItems(sidebarConfig, page, headers, path)\n\n return []\n}\n\n/** Create sidebar items ref and provide as global computed in setup */\nexport const setupSidebarItems = (): void => {\n const { frontmatter, page, routeLocale, themeLocale } = useData<\n DefaultThemeHomePageFrontmatter | DefaultThemeNormalPageFrontmatter\n >()\n const headers = useHeaders()\n const routePath = useRoutePath()\n\n const sidebarConfig = computed<SidebarOptions | false>(\n () =>\n !frontmatter.value.home &&\n ((frontmatter.value as DefaultThemeNormalPageFrontmatter).sidebar ??\n themeLocale.value.sidebar ??\n 'heading'),\n )\n\n const sidebarItems = computed(() =>\n resolveSidebarItems(\n sidebarConfig.value,\n page.value,\n routePath.value,\n routeLocale.value,\n headers.value,\n ),\n )\n provide(sidebarItemsSymbol, sidebarItems)\n}\n"],"mappings":"8bA4BA,MAAa,EACX,IACuB,CACvB,KAAM,EAAO,MACb,KAAM,EAAO,KAEb,SAAU,EAA0B,EAAO,QAAQ,CACrD,GAQa,EACX,GAEA,EAAU,EAAQ,IAAK,GAAW,EAAyB,CAAM,CAAC,EAAI,CAAC,EAU5D,GACX,EACA,IACkB,CAClB,CACE,KAAM,EAAK,MACX,SAAU,EAA0B,CAAO,CAC7C,CACF,EAWa,GACX,EACA,EACA,EACA,EAAS,KACS,CAClB,IAAM,GACJ,EACA,IACgB,CAChB,IAAM,EAAgC,EAAS,CAAI,EAC/C,EAAgB,EAAc,EAAY,CAAI,CAAC,EAC/C,EAAS,EAAK,IAAI,EAChB,CACE,GAAG,EACH,KAAM,EAAe,EAAK,IAAI,EAC1B,EAAgB,EAAc,EAAY,EAAK,IAAI,CAAC,CAAC,CAAC,KACtD,EAAK,IACX,EACA,EAEN,GAAI,aAAc,EAChB,MAAO,CACL,GAAG,EACH,SAAU,EAAU,SAAS,IAAK,GAChC,EAAgB,EAAO,EAAc,EAAY,EAAU,MAAM,CAAC,CACpE,CACF,EAKF,GAAI,EAAU,OAAS,EAAM,CAE3B,IAAM,EACJ,EAAQ,EAAE,EAAE,QAAU,EAAI,EAAQ,EAAE,CAAC,SAAW,EAElD,MAAO,CACL,GAAG,EACH,SAAU,EAA0B,CAAc,CACpD,CACF,CAEA,OAAO,CACT,EAEA,OAAO,EAAc,IAAK,GAAS,EAAgB,EAAM,CAAM,CAAC,CAClE,EAYa,GACX,EACA,EACA,EACA,IACkB,CAClB,IAAM,EAAgB,EAAK,CAAa,CAAC,CAAC,MAAM,EAAG,IAAM,EAAE,OAAS,EAAE,MAAM,EAG5E,IAAK,IAAM,KAAQ,EACjB,GAAI,EAAW,UAAU,CAAI,EAAG,CAAI,EAAG,CACrC,IAAM,EAAU,EAAc,GAE9B,OAAO,IAAY,GACf,CAAC,EACD,IAAY,UACV,EAA0B,EAAM,CAAO,EACvC,EAAyB,EAAS,EAAS,EAAM,CAAI,CAC7D,CAMF,OAFA,QAAQ,KAAK,GAAG,UAAU,CAAI,EAAE,4BAA4B,EAErD,CAAC,CACV,EAIa,EACX,OAAO,cAAc,EAOV,MAAyC,CACpD,IAAM,EAAe,EAAO,CAAkB,EAC9C,GAAI,CAAC,EACH,MAAU,MAAM,+CAA+C,EAEjE,OAAO,CACT,EAea,GACX,EACA,EACA,EACA,EACA,IAGI,IAAkB,GAAc,CAAC,EAEjC,IAAkB,UACb,EAA0B,EAAM,CAAO,EAE5C,MAAM,QAAQ,CAAa,EACtB,EAAyB,EAAe,EAAS,EAAM,CAAW,EAEvE,EAAc,CAAa,EACtB,EAAyB,EAAe,EAAM,EAAS,CAAI,EAE7D,CAAC,EAIG,MAAgC,CAC3C,GAAM,CAAE,cAAa,OAAM,cAAa,eAAgBA,EAEtD,EACI,EAAU,EAAW,EACrB,EAAY,EAAa,EAEzB,EAAgB,MAElB,CAAC,EAAY,MAAM,OACjB,EAAY,MAA4C,SACxD,EAAY,MAAM,SAClB,UACN,EAEM,EAAe,MACnB,EACE,EAAc,MACd,EAAK,MACL,EAAU,MACV,EAAY,MACZ,EAAQ,KACV,CACF,EACA,EAAQ,EAAoB,CAAY,CAC1C"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { c as SidebarArrayOptions, f as SidebarObjectOptions, p as SidebarOptions } from "./index-
|
|
2
|
-
import { i as SidebarItem, r as SidebarHeaderItem } from "./typings-
|
|
1
|
+
import { c as SidebarArrayOptions, f as SidebarObjectOptions, p as SidebarOptions } from "./index-DkAtp85h.js";
|
|
2
|
+
import { i as SidebarItem, r as SidebarHeaderItem } from "./typings-Dsy2lPQS.js";
|
|
3
3
|
import { PageData, PageHeader } from "vuepress/client";
|
|
4
4
|
import { ComputedRef, InjectionKey } from "vue";
|
|
5
|
-
|
|
6
5
|
//#region src/client/composables/useSidebarItems.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Util to transform page header to sidebar item
|
|
@@ -73,4 +72,4 @@ declare const resolveSidebarItems: (sidebarConfig: SidebarOptions | false, page:
|
|
|
73
72
|
declare const setupSidebarItems: () => void;
|
|
74
73
|
//#endregion
|
|
75
74
|
export { resolveSidebarItems as a, setupSidebarItems as c, resolveSidebarHeadingItem as i, sidebarItemsSymbol as l, resolveArraySidebarItems as n, resolveSidebarPageHeader as o, resolveMultiSidebarItems as r, resolveSidebarPageHeaders as s, SidebarItemsRef as t, useSidebarItems as u };
|
|
76
|
-
//# sourceMappingURL=useSidebarItems-
|
|
75
|
+
//# sourceMappingURL=useSidebarItems-xWOsGwcx.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/theme-default",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.132",
|
|
4
4
|
"description": "Default theme of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"default",
|
|
@@ -58,16 +58,16 @@
|
|
|
58
58
|
"@vuepress/plugin-active-header-links": "2.0.0-rc.131",
|
|
59
59
|
"@vuepress/plugin-back-to-top": "2.0.0-rc.131",
|
|
60
60
|
"@vuepress/plugin-copy-code": "2.0.0-rc.131",
|
|
61
|
-
"@vuepress/plugin-git": "2.0.0-rc.
|
|
61
|
+
"@vuepress/plugin-git": "2.0.0-rc.132",
|
|
62
62
|
"@vuepress/plugin-links-check": "2.0.0-rc.131",
|
|
63
|
-
"@vuepress/plugin-markdown-hint": "2.0.0-rc.
|
|
64
|
-
"@vuepress/plugin-markdown-tab": "2.0.0-rc.
|
|
63
|
+
"@vuepress/plugin-markdown-hint": "2.0.0-rc.132",
|
|
64
|
+
"@vuepress/plugin-markdown-tab": "2.0.0-rc.132",
|
|
65
65
|
"@vuepress/plugin-medium-zoom": "2.0.0-rc.131",
|
|
66
66
|
"@vuepress/plugin-nprogress": "2.0.0-rc.131",
|
|
67
67
|
"@vuepress/plugin-palette": "2.0.0-rc.131",
|
|
68
|
-
"@vuepress/plugin-prismjs": "2.0.0-rc.
|
|
69
|
-
"@vuepress/plugin-seo": "2.0.0-rc.
|
|
70
|
-
"@vuepress/plugin-sitemap": "2.0.0-rc.
|
|
68
|
+
"@vuepress/plugin-prismjs": "2.0.0-rc.132",
|
|
69
|
+
"@vuepress/plugin-seo": "2.0.0-rc.132",
|
|
70
|
+
"@vuepress/plugin-sitemap": "2.0.0-rc.132",
|
|
71
71
|
"@vuepress/plugin-theme-data": "2.0.0-rc.131",
|
|
72
72
|
"@vueuse/core": "^14.3.0",
|
|
73
73
|
"vue": "^3.5.39"
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"optional": true
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "700c97e4337ea7a488ef5a0c1fd5f4f41b4ded00"
|
|
93
93
|
}
|
package/dist/index-BKZ67WMa.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/index-BVVgDSdq.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|