@vuepress/theme-default 2.0.0-rc.130 → 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/components/VPNavbar.vue +1 -0
- package/dist/client/components/VPSidebarItem.vue +1 -1
- package/dist/client/composables/index.d.ts +12 -11
- package/dist/client/composables/index.js +1 -1
- package/dist/client/composables/useDarkMode.d.ts +1 -1
- package/dist/client/composables/useDarkMode.js +1 -2
- package/dist/client/composables/useData.d.ts +1 -1
- package/dist/client/composables/useData.js +1 -2
- package/dist/client/composables/useEditLink.d.ts +1 -1
- package/dist/client/composables/useEditLink.js +1 -2
- package/dist/client/composables/useHeaders.d.ts +0 -1
- package/dist/client/composables/useNavbarConfig.d.ts +1 -1
- package/dist/client/composables/useNavbarConfig.js +1 -2
- package/dist/client/composables/useNavbarRepo.d.ts +1 -1
- package/dist/client/composables/useNavbarRepo.js +1 -2
- package/dist/client/composables/useNavbarSelectLanguage.d.ts +1 -1
- package/dist/client/composables/useNavbarSelectLanguage.js +1 -2
- package/dist/client/composables/useNavigate.d.ts +1 -1
- package/dist/client/composables/useNavigate.js +1 -2
- package/dist/client/composables/useRelatedLinks.d.ts +1 -1
- package/dist/client/composables/useRelatedLinks.js +1 -2
- package/dist/client/composables/useScrollPromise.d.ts +1 -1
- package/dist/client/composables/useScrollPromise.js +1 -2
- package/dist/client/composables/useSidebarItems.d.ts +1 -1
- package/dist/client/composables/useSidebarItems.js +1 -2
- package/dist/client/composables/useUpdateDeviceStatus.d.ts +1 -1
- package/dist/client/composables/useUpdateDeviceStatus.js +1 -2
- package/dist/client/config.d.ts +4 -2
- package/dist/client/config.js.map +1 -1
- package/dist/client/index.d.ts +21 -19
- package/dist/client/index.js +1 -1
- package/dist/client/utils/index.d.ts +6 -5
- package/dist/client/utils/index.js +1 -1
- package/dist/client/utils/isActiveSidebarItem.d.ts +1 -1
- package/dist/client/utils/isActiveSidebarItem.js +1 -2
- package/dist/client/utils/resolveAutoLink.d.ts +1 -1
- package/dist/client/utils/resolveAutoLink.js +1 -2
- package/dist/client/utils/resolveEditLink.d.ts +1 -1
- package/dist/client/utils/resolveEditLink.js +1 -2
- package/dist/client/utils/resolvePrefix.d.ts +1 -1
- package/dist/client/utils/resolvePrefix.js +1 -2
- package/dist/client/utils/resolveRepoType.d.ts +1 -1
- package/dist/client/utils/resolveRepoType.js +1 -2
- package/dist/composables-CAISgiXf.js +1 -0
- package/dist/index-BIWlrErN.d.ts +3 -0
- package/dist/index-DgnmBYGr.d.ts +8 -0
- package/dist/{index-BNjRb2Mr.d.ts → index-DkAtp85h.d.ts} +1 -2
- package/dist/isActiveSidebarItem-BQHhsM53.js +2 -0
- package/dist/isActiveSidebarItem-BQHhsM53.js.map +1 -0
- package/dist/{isActiveSidebarItem-DE0Ymo1m.d.ts → isActiveSidebarItem-DdHcB4fJ.d.ts} +2 -3
- package/dist/node/index.d.ts +3 -8
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/{resolveAutoLink-bQLxrWMd.d.ts → resolveAutoLink-LfZfSGFX.d.ts} +2 -3
- package/dist/resolveAutoLink-XUJwl3Kb.js +2 -0
- package/dist/resolveAutoLink-XUJwl3Kb.js.map +1 -0
- package/dist/{resolveEditLink-DRtLIWXz.d.ts → resolveEditLink-VYO59JxD.d.ts} +2 -9
- package/dist/resolveEditLink-lteF0-Mv.js +2 -0
- package/dist/resolveEditLink-lteF0-Mv.js.map +1 -0
- package/dist/{resolvePrefix-DEl0CDB0.d.ts → resolvePrefix-BXZhEIJn.d.ts} +1 -1
- package/dist/resolvePrefix-CQnTmTk4.js +2 -0
- package/dist/resolvePrefix-CQnTmTk4.js.map +1 -0
- package/dist/resolveRepoType-BfcHRhpi.js +2 -0
- package/dist/resolveRepoType-BfcHRhpi.js.map +1 -0
- package/dist/{resolveRepoType-DefRTDOt.d.ts → resolveRepoType-DEy0Gvc4.d.ts} +1 -1
- package/dist/{typings-D-rXvaET.d.ts → typings-Dsy2lPQS.d.ts} +2 -3
- package/dist/useDarkMode-BfKvIN6K.js +2 -0
- package/dist/useDarkMode-BfKvIN6K.js.map +1 -0
- package/dist/{useDarkMode-Zrmg4e6i.d.ts → useDarkMode-DmWka_eQ.d.ts} +1 -2
- package/dist/{useData-BFB4h32K.d.ts → useData-B20ETmVf.d.ts} +2 -3
- package/dist/useData-nv4hwlgW.js +2 -0
- package/dist/useData-nv4hwlgW.js.map +1 -0
- package/dist/useEditLink-BmoW42FE.js +2 -0
- package/dist/useEditLink-BmoW42FE.js.map +1 -0
- package/dist/{useEditLink-m723nvlZ.d.ts → useEditLink-DXlW5QzK.d.ts} +1 -2
- package/dist/{useNavbarConfig-BnkOLDyM.d.ts → useNavbarConfig-CXdLjfSJ.d.ts} +2 -3
- package/dist/useNavbarConfig-CxVplYul.js +2 -0
- package/dist/useNavbarConfig-CxVplYul.js.map +1 -0
- package/dist/{useNavbarRepo-BT8z2mBp.d.ts → useNavbarRepo-BQ2wiq-1.d.ts} +2 -3
- package/dist/useNavbarRepo-BScd94be.js +2 -0
- package/dist/useNavbarRepo-BScd94be.js.map +1 -0
- package/dist/{useNavbarSelectLanguage-DMcyeLfA.d.ts → useNavbarSelectLanguage-Cd32nqUA.d.ts} +2 -3
- package/dist/useNavbarSelectLanguage-FHyzHFEW.js +2 -0
- package/dist/useNavbarSelectLanguage-FHyzHFEW.js.map +1 -0
- package/dist/useNavigate-mlFey3ew.js +2 -0
- package/dist/useNavigate-mlFey3ew.js.map +1 -0
- package/dist/{useNavigate-D__eeZa2.d.ts → useNavigate-zqYnxkd_.d.ts} +1 -1
- package/dist/{useRelatedLinks-CoqxjiuJ.d.ts → useRelatedLinks-B5Hq7BUl.d.ts} +2 -3
- package/dist/useRelatedLinks-BwsPumn1.js +2 -0
- package/dist/useRelatedLinks-BwsPumn1.js.map +1 -0
- package/dist/useScrollPromise-CB6ZLciv.js +2 -0
- package/dist/useScrollPromise-CB6ZLciv.js.map +1 -0
- package/dist/{useScrollPromise-DtXkT3fi.d.ts → useScrollPromise-TwtWBE3d.d.ts} +2 -2
- package/dist/useSidebarItems-D1vD1QQp.js +2 -0
- package/dist/useSidebarItems-D1vD1QQp.js.map +1 -0
- package/dist/{useSidebarItems-nMm3AAZ3.d.ts → useSidebarItems-xWOsGwcx.d.ts} +3 -4
- package/dist/{useUpdateDeviceStatus-B3bXVdPs.d.ts → useUpdateDeviceStatus-CsrJ_Qqv.d.ts} +1 -1
- package/dist/useUpdateDeviceStatus-DMKiVB3W.js +2 -0
- package/dist/useUpdateDeviceStatus-DMKiVB3W.js.map +1 -0
- package/dist/utils-CAISgiXf.js +1 -0
- package/package.json +21 -21
- package/dist/client/composables/useDarkMode.js.map +0 -1
- package/dist/client/composables/useData.js.map +0 -1
- package/dist/client/composables/useEditLink.js.map +0 -1
- package/dist/client/composables/useNavbarConfig.js.map +0 -1
- package/dist/client/composables/useNavbarRepo.js.map +0 -1
- package/dist/client/composables/useNavbarSelectLanguage.js.map +0 -1
- package/dist/client/composables/useNavigate.js.map +0 -1
- package/dist/client/composables/useRelatedLinks.js.map +0 -1
- package/dist/client/composables/useScrollPromise.js.map +0 -1
- package/dist/client/composables/useSidebarItems.js.map +0 -1
- package/dist/client/composables/useUpdateDeviceStatus.js.map +0 -1
- package/dist/client/utils/isActiveSidebarItem.js.map +0 -1
- package/dist/client/utils/resolveAutoLink.js.map +0 -1
- package/dist/client/utils/resolveEditLink.js.map +0 -1
- package/dist/client/utils/resolvePrefix.js.map +0 -1
- package/dist/client/utils/resolveRepoType.js.map +0 -1
|
@@ -43,6 +43,7 @@ const getCssValue = (el: HTMLElement | null, property: string): number => {
|
|
|
43
43
|
property as keyof CSSStyleDeclaration
|
|
44
44
|
]
|
|
45
45
|
|
|
46
|
+
// oxlint-disable-next-line unicorn/prefer-number-coercion
|
|
46
47
|
const num = Number.parseInt(val as string, 10)
|
|
47
48
|
|
|
48
49
|
return Number.isNaN(num) ? 0 : num
|
|
@@ -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-
|
|
4
|
-
import { t as useNavigate } from "../../useNavigate-
|
|
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-
|
|
9
|
-
import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-
|
|
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-
|
|
11
|
-
import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-
|
|
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
|
+
import { t as useNavigate } from "../../useNavigate-zqYnxkd_.js";
|
|
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
|
+
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-xWOsGwcx.js";
|
|
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{
|
|
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 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=useDarkMode.js.map
|
|
1
|
+
import{n as e,t}from"../../useDarkMode-BfKvIN6K.js";export{t as setupDarkMode,e as 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 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=useData.js.map
|
|
1
|
+
import{t as e}from"../../useData-nv4hwlgW.js";export{e as 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 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=useEditLink.js.map
|
|
1
|
+
import{t as e}from"../../useEditLink-BmoW42FE.js";export{e as 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 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=useNavbarConfig.js.map
|
|
1
|
+
import{t as e}from"../../useNavbarConfig-CxVplYul.js";export{e as 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 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=useNavbarRepo.js.map
|
|
1
|
+
import{t as e}from"../../useNavbarRepo-BScd94be.js";export{e as 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 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=useNavbarSelectLanguage.js.map
|
|
1
|
+
import{t as e}from"../../useNavbarSelectLanguage-FHyzHFEW.js";export{e as useNavbarSelectLanguage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as useNavigate } from "../../useNavigate-
|
|
1
|
+
import { t as useNavigate } from "../../useNavigate-zqYnxkd_.js";
|
|
2
2
|
export { useNavigate };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=useNavigate.js.map
|
|
1
|
+
import{t as e}from"../../useNavigate-mlFey3ew.js";export{e as useNavigate};
|
|
@@ -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 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=useRelatedLinks.js.map
|
|
1
|
+
import{t as e}from"../../useRelatedLinks-BwsPumn1.js";export{e as useRelatedLinks};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-
|
|
1
|
+
import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-TwtWBE3d.js";
|
|
2
2
|
export { ScrollPromise, useScrollPromise };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=useScrollPromise.js.map
|
|
1
|
+
import{t as e}from"../../useScrollPromise-CB6ZLciv.js";export{e as useScrollPromise};
|
|
@@ -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,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=useSidebarItems.js.map
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-
|
|
1
|
+
import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-CsrJ_Qqv.js";
|
|
2
2
|
export { DeviceType, useUpdateDeviceStatus };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=useUpdateDeviceStatus.js.map
|
|
1
|
+
import{n as e,t}from"../../useUpdateDeviceStatus-DMKiVB3W.js";export{t as DeviceType,e as useUpdateDeviceStatus};
|
package/dist/client/config.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@vuepress/helper/colors.css";
|
|
2
|
+
import "@vuepress/helper/normalize.css";
|
|
3
|
+
import "./styles/index.scss";
|
|
2
4
|
//#region src/client/config.d.ts
|
|
3
|
-
declare const _default:
|
|
5
|
+
declare const _default: import("vuepress/client").ClientConfig;
|
|
4
6
|
//#endregion
|
|
5
7
|
export { _default as default };
|
|
6
8
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","names":[],"sources":["../../src/client/config.ts"],"sourcesContent":["import { hasGlobalComponent } from '@vuepress/helper/client'\nimport { defineClientConfig } from 'vuepress/client'\n\nimport { setupDarkMode } from '@theme/useDarkMode'\nimport { setupHeaders } from '@theme/useHeaders'\nimport { useScrollPromise } from '@theme/useScrollPromise'\nimport { setupSidebarItems } from '@theme/useSidebarItems'\n\nimport { Badge } from './components/global/index.js'\nimport Layout from './layouts/Layout.vue'\nimport NotFound from './layouts/NotFound.vue'\n\nimport '@vuepress/helper/colors.css'\nimport '@vuepress/helper/normalize.css'\nimport './styles/index.scss'\n\nexport default defineClientConfig({\n enhance({ app, router }) {\n if (!hasGlobalComponent('Badge')) app.component('Badge', Badge)\n\n // handle scrollBehavior with transition\n const scrollBehavior = router.options.scrollBehavior!\n\n // scrollBehavior is a bit hard to typed here\n // oxlint-disable-next-line typescript/explicit-function-return-type\n router.options.scrollBehavior = async (...args) => {\n await useScrollPromise().wait()\n return scrollBehavior(...args)\n }\n },\n\n setup() {\n setupDarkMode()\n setupHeaders()\n setupSidebarItems()\n },\n\n layouts: {\n Layout,\n NotFound,\n },\n})\n"],"mappings":"0iBAgBA,IAAA,EAAe,EAAmB,CAChC,QAAQ,CAAE,MAAK,UAAU,CAClB,EAAmB,OAAO,GAAG,EAAI,UAAU,QAAS,CAAK,EAG9D,IAAM,EAAiB,EAAO,QAAQ,eAItC,EAAO,QAAQ,eAAiB,MAAO,GAAG,KACxC,MAAM,EAAiB,
|
|
1
|
+
{"version":3,"file":"config.js","names":[],"sources":["../../src/client/config.ts"],"sourcesContent":["import { hasGlobalComponent } from '@vuepress/helper/client'\nimport { defineClientConfig } from 'vuepress/client'\n\nimport { setupDarkMode } from '@theme/useDarkMode'\nimport { setupHeaders } from '@theme/useHeaders'\nimport { useScrollPromise } from '@theme/useScrollPromise'\nimport { setupSidebarItems } from '@theme/useSidebarItems'\n\nimport { Badge } from './components/global/index.js'\nimport Layout from './layouts/Layout.vue'\nimport NotFound from './layouts/NotFound.vue'\n\nimport '@vuepress/helper/colors.css'\nimport '@vuepress/helper/normalize.css'\nimport './styles/index.scss'\n\nexport default defineClientConfig({\n enhance({ app, router }) {\n if (!hasGlobalComponent('Badge')) app.component('Badge', Badge)\n\n // handle scrollBehavior with transition\n const scrollBehavior = router.options.scrollBehavior!\n\n // scrollBehavior is a bit hard to typed here\n // oxlint-disable-next-line typescript/explicit-function-return-type\n router.options.scrollBehavior = async (...args) => {\n await useScrollPromise().wait()\n return scrollBehavior(...args)\n }\n },\n\n setup() {\n setupDarkMode()\n setupHeaders()\n setupSidebarItems()\n },\n\n layouts: {\n Layout,\n NotFound,\n },\n})\n"],"mappings":"0iBAgBA,IAAA,EAAe,EAAmB,CAChC,QAAQ,CAAE,MAAK,UAAU,CAClB,EAAmB,OAAO,GAAG,EAAI,UAAU,QAAS,CAAK,EAG9D,IAAM,EAAiB,EAAO,QAAQ,eAItC,EAAO,QAAQ,eAAiB,MAAO,GAAG,KACxC,MAAM,EAAiB,CAAC,CAAC,KAAK,EACvB,EAAe,GAAG,CAAI,EAEjC,EAEA,OAAQ,CACN,EAAc,EACd,EAAa,EACb,EAAkB,CACpB,EAEA,QAAS,CACP,SACA,UACF,CACF,CAAC"}
|
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-
|
|
5
|
-
import { t as useNavigate } from "../useNavigate-
|
|
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-
|
|
11
|
-
import { n as useScrollPromise, t as ScrollPromise } from "../useScrollPromise-
|
|
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-
|
|
13
|
-
import { n as useUpdateDeviceStatus, t as DeviceType } from "../useUpdateDeviceStatus-
|
|
14
|
-
import
|
|
15
|
-
import { t as
|
|
16
|
-
import {
|
|
17
|
-
import { t as
|
|
18
|
-
import {
|
|
19
|
-
|
|
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
|
+
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-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
|
+
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-xWOsGwcx.js";
|
|
13
|
+
import { n as useUpdateDeviceStatus, t as DeviceType } from "../useUpdateDeviceStatus-CsrJ_Qqv.js";
|
|
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";
|
|
18
|
+
import { t as resolvePrefix } from "../resolvePrefix-BXZhEIJn.js";
|
|
19
|
+
import { n as resolveRepoType, t as RepoType } from "../resolveRepoType-DEy0Gvc4.js";
|
|
20
|
+
import "../index-BIWlrErN.js";
|
|
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{
|
|
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-
|
|
4
|
-
import { t as resolvePrefix } from "../../resolvePrefix-
|
|
5
|
-
import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-
|
|
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
|
+
import { t as resolvePrefix } from "../../resolvePrefix-BXZhEIJn.js";
|
|
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 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"../../isActiveSidebarItem-BQHhsM53.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,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 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=isActiveSidebarItem.js.map
|
|
1
|
+
import{t as e}from"../../isActiveSidebarItem-BQHhsM53.js";export{e as 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 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=resolveAutoLink.js.map
|
|
1
|
+
import{t as e}from"../../resolveAutoLink-XUJwl3Kb.js";export{e as 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 };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=resolveEditLink.js.map
|
|
1
|
+
import{n as e,t}from"../../resolveEditLink-lteF0-Mv.js";export{t as EDIT_LINK_PATTERNS,e as resolveEditLink};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolvePrefix } from "../../resolvePrefix-
|
|
1
|
+
import { t as resolvePrefix } from "../../resolvePrefix-BXZhEIJn.js";
|
|
2
2
|
export { resolvePrefix };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=resolvePrefix.js.map
|
|
1
|
+
import{t as e}from"../../resolvePrefix-CQnTmTk4.js";export{e as resolvePrefix};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-
|
|
1
|
+
import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-DEy0Gvc4.js";
|
|
2
2
|
export { RepoType, resolveRepoType };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=resolveRepoType.js.map
|
|
1
|
+
import{t as e}from"../../resolveRepoType-BfcHRhpi.js";export{e as resolveRepoType};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{normalizePath as e}from"@vuepress/helper/client";const t=(t,n)=>n.hash===t?!0: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)):!1;export{n as t};
|
|
2
|
+
//# sourceMappingURL=isActiveSidebarItem-BQHhsM53.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isActiveSidebarItem-BQHhsM53.js","names":[],"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":"wDAKA,MAAM,GACJ,EACA,IAEI,EAAM,OAAS,EAAa,GAEZ,EAAc,UAAU,EAAM,IAAI,EAAG,EAExC,IADE,EAAc,UAAU,CAAI,EAAG,EAClB,EAGrB,GACX,EACA,IAEI,EAAK,MAAQ,EAAa,EAAK,KAAM,CAAK,EAAU,GAEpD,aAAc,EACT,EAAK,SAAS,KAAM,GAAU,EAAoB,EAAO,CAAK,CAAC,EAEjE"}
|
|
@@ -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;
|
|
@@ -73,5 +68,5 @@ declare const assignDefaultLocaleOptions: (localeOptions: DefaultThemeLocaleOpti
|
|
|
73
68
|
*/
|
|
74
69
|
declare const resolveMarkdownHintLocales: (localeOptions: DefaultThemeData) => LocaleConfig<MarkdownHintPluginLocaleData>;
|
|
75
70
|
//#endregion
|
|
76
|
-
export { AutoLinkOptions, DEFAULT_LOCALE_DATA, DEFAULT_LOCALE_OPTIONS, DefaultThemeData, DefaultThemeHomePageFrontmatter, DefaultThemeLocaleData, DefaultThemeLocaleOptions, DefaultThemeNormalPageFrontmatter, DefaultThemeOptions, DefaultThemePageData, DefaultThemePageFrontmatter, DefaultThemePluginsOptions, NavGroup, NavItemOptions, NavbarGroupOptions, NavbarLinkOptions, NavbarOptions, SidebarArrayOptions, SidebarGroupOptions, SidebarItemOptions, SidebarLinkOptions, SidebarObjectOptions, SidebarOptions, assignDefaultLocaleOptions, defaultTheme, resolveMarkdownHintLocales };
|
|
71
|
+
export { type AutoLinkOptions, DEFAULT_LOCALE_DATA, DEFAULT_LOCALE_OPTIONS, type DefaultThemeData, type DefaultThemeHomePageFrontmatter, type DefaultThemeLocaleData, type DefaultThemeLocaleOptions, type DefaultThemeNormalPageFrontmatter, DefaultThemeOptions, type DefaultThemePageData, type DefaultThemePageFrontmatter, type DefaultThemePluginsOptions, type NavGroup, type NavItemOptions, type NavbarGroupOptions, type NavbarLinkOptions, type NavbarOptions, type SidebarArrayOptions, type SidebarGroupOptions, type SidebarItemOptions, type SidebarLinkOptions, type SidebarObjectOptions, type SidebarOptions, assignDefaultLocaleOptions, defaultTheme, resolveMarkdownHintLocales };
|
|
77
72
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{addViteOptimizeDepsExclude as e}from"@vuepress/helper";import{activeHeaderLinksPlugin as t}from"@vuepress/plugin-active-header-links";import{backToTopPlugin as n}from"@vuepress/plugin-back-to-top";import{copyCodePlugin as r}from"@vuepress/plugin-copy-code";import{gitPlugin as i}from"@vuepress/plugin-git";import{linksCheckPlugin as a}from"@vuepress/plugin-links-check";import{markdownHintPlugin as o}from"@vuepress/plugin-markdown-hint";import{markdownTabPlugin as s}from"@vuepress/plugin-markdown-tab";import{mediumZoomPlugin as c}from"@vuepress/plugin-medium-zoom";import{nprogressPlugin as l}from"@vuepress/plugin-nprogress";import{palettePlugin as u}from"@vuepress/plugin-palette";import{prismjsPlugin as d}from"@vuepress/plugin-prismjs";import{seoPlugin as f}from"@vuepress/plugin-seo";import{sitemapPlugin as p}from"@vuepress/plugin-sitemap";import{themeDataPlugin as m}from"@vuepress/plugin-theme-data";import{isPlainObject as h}from"vuepress/shared";import{fs as g,getDirname as _,path as v}from"vuepress/utils";const y={colorMode:`auto`,colorModeSwitch:!0,navbar:[],logo:null,repo:null,selectLanguageText:`Languages`,selectLanguageAriaLabel:`Select language`,sidebar:`heading`,sidebarDepth:2,editLink:!0,editLinkText:`Edit this page`,lastUpdated:!0,contributors:!0,contributorsText:`Contributors`,notFound:[`There's nothing here.`,`How did we get here?`,`That's a Four-Oh-Four.`,`Looks like we've got some broken links.`],backToHome:`Take me home`,openInNewWindow:`open in new window`,toggleColorMode:`toggle color mode`,toggleSidebar:`toggle sidebar`},b={selectLanguageName:`English`},x=e=>{e.locales??={},Object.assign(e,{...y,...e}),e.locales[`/`]??={},Object.assign(e.locales[`/`],{...b,...e.locales[`/`]})},S=e=>Object.entries(e.locales??{}).reduce((e,[t,n])=>(e[t]={},n.tip&&(e[t].tip=n.tip),n.warning&&(e[t].warning=n.warning),n.danger&&(e[t].caution=n.danger),n.important&&(e[t].important=n.important),n.note&&(e[t].note=n.note),e),{}),C=import.meta.dirname||_(import.meta.url),w=({hostname:
|
|
1
|
+
import{addViteOptimizeDepsExclude as e}from"@vuepress/helper";import{activeHeaderLinksPlugin as t}from"@vuepress/plugin-active-header-links";import{backToTopPlugin as n}from"@vuepress/plugin-back-to-top";import{copyCodePlugin as r}from"@vuepress/plugin-copy-code";import{gitPlugin as i}from"@vuepress/plugin-git";import{linksCheckPlugin as a}from"@vuepress/plugin-links-check";import{markdownHintPlugin as o}from"@vuepress/plugin-markdown-hint";import{markdownTabPlugin as s}from"@vuepress/plugin-markdown-tab";import{mediumZoomPlugin as c}from"@vuepress/plugin-medium-zoom";import{nprogressPlugin as l}from"@vuepress/plugin-nprogress";import{palettePlugin as u}from"@vuepress/plugin-palette";import{prismjsPlugin as d}from"@vuepress/plugin-prismjs";import{seoPlugin as f}from"@vuepress/plugin-seo";import{sitemapPlugin as p}from"@vuepress/plugin-sitemap";import{themeDataPlugin as m}from"@vuepress/plugin-theme-data";import{isPlainObject as h}from"vuepress/shared";import{fs as g,getDirname as _,path as v}from"vuepress/utils";const y={colorMode:`auto`,colorModeSwitch:!0,navbar:[],logo:null,repo:null,selectLanguageText:`Languages`,selectLanguageAriaLabel:`Select language`,sidebar:`heading`,sidebarDepth:2,editLink:!0,editLinkText:`Edit this page`,lastUpdated:!0,contributors:!0,contributorsText:`Contributors`,notFound:[`There's nothing here.`,`How did we get here?`,`That's a Four-Oh-Four.`,`Looks like we've got some broken links.`],backToHome:`Take me home`,openInNewWindow:`open in new window`,toggleColorMode:`toggle color mode`,toggleSidebar:`toggle sidebar`},b={selectLanguageName:`English`},x=e=>{e.locales??={},Object.assign(e,{...y,...e}),e.locales[`/`]??={},Object.assign(e.locales[`/`],{...b,...e.locales[`/`]})},S=e=>Object.entries(e.locales??{}).reduce((e,[t,n])=>(e[t]={},n.tip&&(e[t].tip=n.tip),n.warning&&(e[t].warning=n.warning),n.danger&&(e[t].caution=n.danger),n.important&&(e[t].important=n.important),n.note&&(e[t].note=n.note),e),{}),C=import.meta.dirname||_(import.meta.url),[w,T,E]=await Promise.all([g.readdir(v.resolve(C,`../client/components`)),g.readdir(v.resolve(C,`../client/composables`)),g.readdir(v.resolve(C,`../client/utils`))]),D=({hostname:g,themePlugins:_={},...y}={})=>(x(y),{name:`@vuepress/theme-default`,userStyle:`.vuepress/styles/index.scss`,templateBuild:v.resolve(C,`../../templates/build.html`),alias:{...Object.fromEntries(w.filter(e=>e.endsWith(`.vue`)).map(e=>[`@theme/${e}`,v.resolve(C,`../client/components`,e)])),...Object.fromEntries(T.filter(e=>e.endsWith(`.js`)).map(e=>[`@theme/${e.slice(0,-3)}`,v.resolve(C,`../client/composables`,e)])),...Object.fromEntries(E.filter(e=>e.endsWith(`.js`)).map(e=>[`@theme/${e.slice(0,-3)}`,v.resolve(C,`../client/utils`,e)]))},clientConfigFile:v.resolve(C,`../client/config.js`),extendsBundlerOptions:(t,n)=>{e(t,n,`@theme`)},extendsPage:e=>{e.data.filePathRelative=e.filePathRelative,e.routeMeta.title=e.title},plugins:[_.activeHeaderLinks??!0?t({delay:300}):[],_.backToTop??!0?n(h(_.backToTop)?_.backToTop:{}):[],_.copyCode??!0?r({...h(_.copyCode)?_.copyCode:{}}):[],_.hint??!0?o({locales:S(y),...h(_.hint)?_.hint:{}}):[],_.git??!0?i({createdTime:!1,updatedTime:y.lastUpdated??!0,changelog:{repoUrl:y.repo||``},...h(_.git)?_.git:{}}):[],_.linksCheck??!0?a(h(_.linksCheck)?_.linksCheck:{}):[],_.mediumZoom??!0?c():[],_.nprogress??!0?l():[],u({preset:`sass`}),_.prismjs??!0?d(h(_.prismjs)?_.prismjs:{}):[],g&&(_.seo??!0)?f({hostname:g,...h(_.seo)?_.seo:{}}):[],g&&(_.sitemap??!0)?p({hostname:g,...h(_.sitemap)?_.sitemap:{}}):[],_.tab??!0?s(h(_.tab)?_.tab:{codeTabs:!0,tabs:!0}):[],m({themeData:y})]});export{b as DEFAULT_LOCALE_DATA,y as DEFAULT_LOCALE_OPTIONS,x as assignDefaultLocaleOptions,D as defaultTheme,S as resolveMarkdownHintLocales};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/node/utils/assignDefaultLocaleOptions.ts","../../src/node/utils/resolveMarkdownHintLocales.ts","../../src/node/defaultTheme.ts"],"sourcesContent":["import type {\n DefaultThemeLocaleData,\n DefaultThemeLocaleOptions,\n} from '../../shared/index.js'\n\nexport const DEFAULT_LOCALE_OPTIONS: DefaultThemeLocaleOptions = {\n // color mode\n colorMode: 'auto',\n colorModeSwitch: true,\n\n // navbar\n navbar: [],\n logo: null,\n repo: null,\n selectLanguageText: 'Languages',\n selectLanguageAriaLabel: 'Select language',\n\n // sidebar\n sidebar: 'heading',\n sidebarDepth: 2,\n\n // page meta\n editLink: true,\n editLinkText: 'Edit this page',\n lastUpdated: true,\n contributors: true,\n contributorsText: 'Contributors',\n\n // 404 page messages\n notFound: [\n `There's nothing here.`,\n `How did we get here?`,\n `That's a Four-Oh-Four.`,\n `Looks like we've got some broken links.`,\n ],\n backToHome: 'Take me home',\n\n // a11y\n openInNewWindow: 'open in new window',\n toggleColorMode: 'toggle color mode',\n toggleSidebar: 'toggle sidebar',\n}\n\nexport const DEFAULT_LOCALE_DATA: DefaultThemeLocaleData = {\n // navbar\n selectLanguageName: 'English',\n}\n\n/**\n * Assign default options\n *\n * @param localeOptions - Locale options to assign default options\n */\nexport const assignDefaultLocaleOptions = (\n localeOptions: DefaultThemeLocaleOptions,\n): void => {\n localeOptions.locales ??= {}\n Object.assign(localeOptions, {\n ...DEFAULT_LOCALE_OPTIONS,\n ...localeOptions,\n })\n localeOptions.locales['/'] ??= {}\n Object.assign(localeOptions.locales['/'], {\n ...DEFAULT_LOCALE_DATA,\n ...localeOptions.locales['/'],\n })\n}\n","import type { MarkdownHintPluginLocaleData } from '@vuepress/plugin-markdown-hint'\nimport type { LocaleConfig } from 'vuepress/shared'\n\nimport type { DefaultThemeData } from '../../shared/index.js'\n\n/**\n * Resolve options for `@vuepress/plugin-markdown-container`\n *\n * For custom containers default title\n *\n * @param localeOptions - Locales config from theme options\n * @returns Locales config for `@vuepress/plugin-markdown-container`\n */\nexport const resolveMarkdownHintLocales = (\n localeOptions: DefaultThemeData,\n): LocaleConfig<MarkdownHintPluginLocaleData> =>\n Object.entries(localeOptions.locales ?? {}).reduce<\n LocaleConfig<MarkdownHintPluginLocaleData>\n >((result, [key, value]) => {\n result[key] = {}\n\n if (value.tip) result[key].tip = value.tip\n if (value.warning) result[key].warning = value.warning\n if (value.danger) result[key].caution = value.danger\n if (value.important) result[key].important = value.important\n if (value.note) result[key].note = value.note\n\n return result\n }, {})\n","import { addViteOptimizeDepsExclude } from '@vuepress/helper'\nimport { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links'\nimport { backToTopPlugin } from '@vuepress/plugin-back-to-top'\nimport { copyCodePlugin } from '@vuepress/plugin-copy-code'\nimport { gitPlugin } from '@vuepress/plugin-git'\nimport { linksCheckPlugin } from '@vuepress/plugin-links-check'\nimport { markdownHintPlugin } from '@vuepress/plugin-markdown-hint'\nimport { markdownTabPlugin } from '@vuepress/plugin-markdown-tab'\nimport { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom'\nimport { nprogressPlugin } from '@vuepress/plugin-nprogress'\nimport { palettePlugin } from '@vuepress/plugin-palette'\nimport { prismjsPlugin } from '@vuepress/plugin-prismjs'\nimport { seoPlugin } from '@vuepress/plugin-seo'\nimport { sitemapPlugin } from '@vuepress/plugin-sitemap'\nimport { themeDataPlugin } from '@vuepress/plugin-theme-data'\nimport type { Page, Theme } from 'vuepress/core'\nimport { isPlainObject } from 'vuepress/shared'\nimport { fs, getDirname, path } from 'vuepress/utils'\n\nimport type { DefaultThemeLocaleOptions } from '../shared/index.js'\nimport type { DefaultThemePluginsOptions } from './typings.js'\nimport {\n assignDefaultLocaleOptions,\n resolveMarkdownHintLocales,\n} from './utils/index.js'\n\nconst __dirname = import.meta.dirname || getDirname(import.meta.url)\n\nexport interface DefaultThemeOptions extends DefaultThemeLocaleOptions {\n /** Deployed hostname */\n hostname?: string\n\n /** To avoid confusion with the root `plugins` option, we use `themePlugins` */\n themePlugins?: DefaultThemePluginsOptions\n}\n\nexport const defaultTheme = ({\n hostname,\n themePlugins = {},\n ...localeOptions\n}: DefaultThemeOptions = {}): Theme => {\n assignDefaultLocaleOptions(localeOptions)\n\n return {\n name: '@vuepress/theme-default',\n\n userStyle: '.vuepress/styles/index.scss',\n\n templateBuild: path.resolve(__dirname, '../../templates/build.html'),\n\n alias: {\n // use alias to make all components replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/components'))\n .filter((file) => file.endsWith('.vue'))\n .map((file) => [\n `@theme/${file}`,\n path.resolve(__dirname, '../client/components', file),\n ]),\n ),\n // use alias to make all composables replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/composables'))\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/composables', file),\n ]),\n ),\n // use alias to make all utils replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/utils'))\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/utils', file),\n ]),\n ),\n },\n\n clientConfigFile: path.resolve(__dirname, '../client/config.js'),\n\n extendsBundlerOptions: (bundlerOptions, app) => {\n // ensure theme alias is not optimized by Vite\n addViteOptimizeDepsExclude(bundlerOptions, app, '@theme')\n },\n\n extendsPage: (page: Page) => {\n // save relative file path into page data to generate edit link\n page.data.filePathRelative = page.filePathRelative\n // save title into route meta to generate navbar and sidebar\n page.routeMeta.title = page.title\n },\n\n plugins: [\n // @vuepress/plugin-active-header-link\n (themePlugins.activeHeaderLinks ?? true)\n ? activeHeaderLinksPlugin({\n // should greater than page transition duration\n delay: 300,\n })\n : [],\n\n // @vuepress/plugin-back-to-top\n (themePlugins.backToTop ?? true)\n ? backToTopPlugin(\n isPlainObject(themePlugins.backToTop) ? themePlugins.backToTop : {},\n )\n : [],\n\n // @vuepress/plugin-copy-code\n (themePlugins.copyCode ?? true)\n ? copyCodePlugin({\n ...(isPlainObject(themePlugins.copyCode)\n ? themePlugins.copyCode\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-container\n (themePlugins.hint ?? true)\n ? markdownHintPlugin({\n locales: resolveMarkdownHintLocales(localeOptions),\n ...(isPlainObject(themePlugins.hint) ? themePlugins.hint : {}),\n })\n : [],\n\n // @vuepress/plugin-git\n (themePlugins.git ?? true)\n ? gitPlugin({\n createdTime: false,\n updatedTime: localeOptions.lastUpdated ?? true,\n changelog: { repoUrl: localeOptions.repo || '' },\n ...(isPlainObject(themePlugins.git) ? themePlugins.git : {}),\n })\n : [],\n\n // @vuepress/plugin-links-check\n (themePlugins.linksCheck ?? true)\n ? linksCheckPlugin(\n isPlainObject(themePlugins.linksCheck)\n ? themePlugins.linksCheck\n : {},\n )\n : [],\n\n // @vuepress/plugin-medium-zoom\n (themePlugins.mediumZoom ?? true) ? mediumZoomPlugin() : [],\n\n // @vuepress/plugin-nprogress\n (themePlugins.nprogress ?? true) ? nprogressPlugin() : [],\n\n // @vuepress/plugin-palette\n palettePlugin({ preset: 'sass' }),\n\n // @vuepress/plugin-prismjs\n (themePlugins.prismjs ?? true)\n ? prismjsPlugin(\n isPlainObject(themePlugins.prismjs) ? themePlugins.prismjs : {},\n )\n : [],\n\n // @vuepress/plugin-seo\n hostname && (themePlugins.seo ?? true)\n ? seoPlugin({\n hostname,\n ...(isPlainObject(themePlugins.seo) ? themePlugins.seo : {}),\n })\n : [],\n\n // @vuepress/plugin-sitemap\n hostname && (themePlugins.sitemap ?? true)\n ? sitemapPlugin({\n hostname,\n ...(isPlainObject(themePlugins.sitemap)\n ? themePlugins.sitemap\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-tab\n (themePlugins.tab ?? true)\n ? markdownTabPlugin(\n isPlainObject(themePlugins.tab)\n ? themePlugins.tab\n : { codeTabs: true, tabs: true },\n )\n : [],\n\n // @vuepress/plugin-theme-data\n themeDataPlugin({ themeData: localeOptions }),\n ],\n }\n}\n"],"mappings":"ogCAKA,MAAa,EAAoD,CAE/D,UAAW,OACX,gBAAiB,GAGjB,OAAQ,CAAC,EACT,KAAM,KACN,KAAM,KACN,mBAAoB,YACpB,wBAAyB,kBAGzB,QAAS,UACT,aAAc,EAGd,SAAU,GACV,aAAc,iBACd,YAAa,GACb,aAAc,GACd,iBAAkB,eAGlB,SAAU,CACR,wBACA,uBACA,yBACA,yCACF,EACA,WAAY,eAGZ,gBAAiB,qBACjB,gBAAiB,oBACjB,cAAe,gBACjB,EAEa,EAA8C,CAEzD,mBAAoB,SACtB,EAOa,EACX,GACS,CACT,EAAc,UAAY,CAAC,EAC3B,OAAO,OAAO,EAAe,CAC3B,GAAG,EACH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AAC,EAGL,IAAa,EAAa,KAAO,IAC7B,EAAU,CACR,WACA,GAAI,EAAc,EAAa,GAAG,EAAI,EAAa,IAAM,CAAC,CAC5D,CAAC,EACD,CAAC,EAGL,IAAa,EAAa,SAAW,IACjC,EAAc,CACZ,WACA,GAAI,EAAc,EAAa,OAAO,EAClC,EAAa,QACb,CAAC,CACP,CAAC,EACD,CAAC,EAGJ,EAAa,KAAO,GACjB,EACE,EAAc,EAAa,GAAG,EAC1B,EAAa,IACb,CAAE,SAAU,GAAM,KAAM,EAAK,CACnC,EACA,CAAC,EAGL,EAAgB,CAAE,UAAW,CAAc,CAAC,CAC9C,CACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/node/utils/assignDefaultLocaleOptions.ts","../../src/node/utils/resolveMarkdownHintLocales.ts","../../src/node/defaultTheme.ts"],"sourcesContent":["import type {\n DefaultThemeLocaleData,\n DefaultThemeLocaleOptions,\n} from '../../shared/index.js'\n\nexport const DEFAULT_LOCALE_OPTIONS: DefaultThemeLocaleOptions = {\n // color mode\n colorMode: 'auto',\n colorModeSwitch: true,\n\n // navbar\n navbar: [],\n logo: null,\n repo: null,\n selectLanguageText: 'Languages',\n selectLanguageAriaLabel: 'Select language',\n\n // sidebar\n sidebar: 'heading',\n sidebarDepth: 2,\n\n // page meta\n editLink: true,\n editLinkText: 'Edit this page',\n lastUpdated: true,\n contributors: true,\n contributorsText: 'Contributors',\n\n // 404 page messages\n notFound: [\n `There's nothing here.`,\n `How did we get here?`,\n `That's a Four-Oh-Four.`,\n `Looks like we've got some broken links.`,\n ],\n backToHome: 'Take me home',\n\n // a11y\n openInNewWindow: 'open in new window',\n toggleColorMode: 'toggle color mode',\n toggleSidebar: 'toggle sidebar',\n}\n\nexport const DEFAULT_LOCALE_DATA: DefaultThemeLocaleData = {\n // navbar\n selectLanguageName: 'English',\n}\n\n/**\n * Assign default options\n *\n * @param localeOptions - Locale options to assign default options\n */\nexport const assignDefaultLocaleOptions = (\n localeOptions: DefaultThemeLocaleOptions,\n): void => {\n localeOptions.locales ??= {}\n Object.assign(localeOptions, {\n ...DEFAULT_LOCALE_OPTIONS,\n ...localeOptions,\n })\n localeOptions.locales['/'] ??= {}\n Object.assign(localeOptions.locales['/'], {\n ...DEFAULT_LOCALE_DATA,\n ...localeOptions.locales['/'],\n })\n}\n","import type { MarkdownHintPluginLocaleData } from '@vuepress/plugin-markdown-hint'\nimport type { LocaleConfig } from 'vuepress/shared'\n\nimport type { DefaultThemeData } from '../../shared/index.js'\n\n/**\n * Resolve options for `@vuepress/plugin-markdown-container`\n *\n * For custom containers default title\n *\n * @param localeOptions - Locales config from theme options\n * @returns Locales config for `@vuepress/plugin-markdown-container`\n */\nexport const resolveMarkdownHintLocales = (\n localeOptions: DefaultThemeData,\n): LocaleConfig<MarkdownHintPluginLocaleData> =>\n Object.entries(localeOptions.locales ?? {}).reduce<\n LocaleConfig<MarkdownHintPluginLocaleData>\n >((result, [key, value]) => {\n result[key] = {}\n\n if (value.tip) result[key].tip = value.tip\n if (value.warning) result[key].warning = value.warning\n if (value.danger) result[key].caution = value.danger\n if (value.important) result[key].important = value.important\n if (value.note) result[key].note = value.note\n\n return result\n }, {})\n","import { addViteOptimizeDepsExclude } from '@vuepress/helper'\nimport { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links'\nimport { backToTopPlugin } from '@vuepress/plugin-back-to-top'\nimport { copyCodePlugin } from '@vuepress/plugin-copy-code'\nimport { gitPlugin } from '@vuepress/plugin-git'\nimport { linksCheckPlugin } from '@vuepress/plugin-links-check'\nimport { markdownHintPlugin } from '@vuepress/plugin-markdown-hint'\nimport { markdownTabPlugin } from '@vuepress/plugin-markdown-tab'\nimport { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom'\nimport { nprogressPlugin } from '@vuepress/plugin-nprogress'\nimport { palettePlugin } from '@vuepress/plugin-palette'\nimport { prismjsPlugin } from '@vuepress/plugin-prismjs'\nimport { seoPlugin } from '@vuepress/plugin-seo'\nimport { sitemapPlugin } from '@vuepress/plugin-sitemap'\nimport { themeDataPlugin } from '@vuepress/plugin-theme-data'\nimport type { Page, Theme } from 'vuepress/core'\nimport { isPlainObject } from 'vuepress/shared'\nimport { fs, getDirname, path } from 'vuepress/utils'\n\nimport type { DefaultThemeLocaleOptions } from '../shared/index.js'\nimport type { DefaultThemePluginsOptions } from './typings.js'\nimport {\n assignDefaultLocaleOptions,\n resolveMarkdownHintLocales,\n} from './utils/index.js'\n\nconst __dirname = import.meta.dirname || getDirname(import.meta.url)\n\nconst [componentFiles, composableFiles, utilFiles] = await Promise.all([\n fs.readdir(path.resolve(__dirname, '../client/components')),\n fs.readdir(path.resolve(__dirname, '../client/composables')),\n fs.readdir(path.resolve(__dirname, '../client/utils')),\n])\n\nexport interface DefaultThemeOptions extends DefaultThemeLocaleOptions {\n /** Deployed hostname */\n hostname?: string\n\n /** To avoid confusion with the root `plugins` option, we use `themePlugins` */\n themePlugins?: DefaultThemePluginsOptions\n}\n\nexport const defaultTheme = ({\n hostname,\n themePlugins = {},\n ...localeOptions\n}: DefaultThemeOptions = {}): Theme => {\n assignDefaultLocaleOptions(localeOptions)\n\n return {\n name: '@vuepress/theme-default',\n\n userStyle: '.vuepress/styles/index.scss',\n\n templateBuild: path.resolve(__dirname, '../../templates/build.html'),\n\n alias: {\n // use alias to make all components replaceable\n ...Object.fromEntries(\n componentFiles\n .filter((file) => file.endsWith('.vue'))\n .map((file) => [\n `@theme/${file}`,\n path.resolve(__dirname, '../client/components', file),\n ]),\n ),\n // use alias to make all composables replaceable\n ...Object.fromEntries(\n composableFiles\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/composables', file),\n ]),\n ),\n // use alias to make all utils replaceable\n ...Object.fromEntries(\n utilFiles\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/utils', file),\n ]),\n ),\n },\n\n clientConfigFile: path.resolve(__dirname, '../client/config.js'),\n\n extendsBundlerOptions: (bundlerOptions, app) => {\n // ensure theme alias is not optimized by Vite\n addViteOptimizeDepsExclude(bundlerOptions, app, '@theme')\n },\n\n extendsPage: (page: Page) => {\n // save relative file path into page data to generate edit link\n page.data.filePathRelative = page.filePathRelative\n // save title into route meta to generate navbar and sidebar\n page.routeMeta.title = page.title\n },\n\n plugins: [\n // @vuepress/plugin-active-header-link\n (themePlugins.activeHeaderLinks ?? true)\n ? activeHeaderLinksPlugin({\n // should greater than page transition duration\n delay: 300,\n })\n : [],\n\n // @vuepress/plugin-back-to-top\n (themePlugins.backToTop ?? true)\n ? backToTopPlugin(\n isPlainObject(themePlugins.backToTop) ? themePlugins.backToTop : {},\n )\n : [],\n\n // @vuepress/plugin-copy-code\n (themePlugins.copyCode ?? true)\n ? copyCodePlugin({\n ...(isPlainObject(themePlugins.copyCode)\n ? themePlugins.copyCode\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-container\n (themePlugins.hint ?? true)\n ? markdownHintPlugin({\n locales: resolveMarkdownHintLocales(localeOptions),\n ...(isPlainObject(themePlugins.hint) ? themePlugins.hint : {}),\n })\n : [],\n\n // @vuepress/plugin-git\n (themePlugins.git ?? true)\n ? gitPlugin({\n createdTime: false,\n updatedTime: localeOptions.lastUpdated ?? true,\n changelog: { repoUrl: localeOptions.repo || '' },\n ...(isPlainObject(themePlugins.git) ? themePlugins.git : {}),\n })\n : [],\n\n // @vuepress/plugin-links-check\n (themePlugins.linksCheck ?? true)\n ? linksCheckPlugin(\n isPlainObject(themePlugins.linksCheck)\n ? themePlugins.linksCheck\n : {},\n )\n : [],\n\n // @vuepress/plugin-medium-zoom\n (themePlugins.mediumZoom ?? true) ? mediumZoomPlugin() : [],\n\n // @vuepress/plugin-nprogress\n (themePlugins.nprogress ?? true) ? nprogressPlugin() : [],\n\n // @vuepress/plugin-palette\n palettePlugin({ preset: 'sass' }),\n\n // @vuepress/plugin-prismjs\n (themePlugins.prismjs ?? true)\n ? prismjsPlugin(\n isPlainObject(themePlugins.prismjs) ? themePlugins.prismjs : {},\n )\n : [],\n\n // @vuepress/plugin-seo\n hostname && (themePlugins.seo ?? true)\n ? seoPlugin({\n hostname,\n ...(isPlainObject(themePlugins.seo) ? themePlugins.seo : {}),\n })\n : [],\n\n // @vuepress/plugin-sitemap\n hostname && (themePlugins.sitemap ?? true)\n ? sitemapPlugin({\n hostname,\n ...(isPlainObject(themePlugins.sitemap)\n ? themePlugins.sitemap\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-tab\n (themePlugins.tab ?? true)\n ? markdownTabPlugin(\n isPlainObject(themePlugins.tab)\n ? themePlugins.tab\n : { codeTabs: true, tabs: true },\n )\n : [],\n\n // @vuepress/plugin-theme-data\n themeDataPlugin({ themeData: localeOptions }),\n ],\n }\n}\n"],"mappings":"ogCAKA,MAAa,EAAoD,CAE/D,UAAW,OACX,gBAAiB,GAGjB,OAAQ,CAAC,EACT,KAAM,KACN,KAAM,KACN,mBAAoB,YACpB,wBAAyB,kBAGzB,QAAS,UACT,aAAc,EAGd,SAAU,GACV,aAAc,iBACd,YAAa,GACb,aAAc,GACd,iBAAkB,eAGlB,SAAU,CACR,wBACA,uBACA,yBACA,yCACF,EACA,WAAY,eAGZ,gBAAiB,qBACjB,gBAAiB,oBACjB,cAAe,gBACjB,EAEa,EAA8C,CAEzD,mBAAoB,SACtB,EAOa,EACX,GACS,CACT,EAAc,UAAY,CAAC,EAC3B,OAAO,OAAO,EAAe,CAC3B,GAAG,EACH,GAAG,CACL,CAAC,EACD,EAAc,QAAQ,OAAS,CAAC,EAChC,OAAO,OAAO,EAAc,QAAQ,KAAM,CACxC,GAAG,EACH,GAAG,EAAc,QAAQ,IAC3B,CAAC,CACH,ECrDa,EACX,GAEA,OAAO,QAAQ,EAAc,SAAW,CAAC,CAAC,CAAC,CAAC,QAEzC,EAAQ,CAAC,EAAK,MACf,EAAO,GAAO,CAAC,EAEX,EAAM,MAAK,E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EAAa,SAAW,IACjC,EAAc,CACZ,WACA,GAAI,EAAc,EAAa,OAAO,EAClC,EAAa,QACb,CAAC,CACP,CAAC,EACD,CAAC,EAGJ,EAAa,KAAO,GACjB,EACE,EAAc,EAAa,GAAG,EAC1B,EAAa,IACb,CAAE,SAAU,GAAM,KAAM,EAAK,CACnC,EACA,CAAC,EAGL,EAAgB,CAAE,UAAW,CAAc,CAAC,CAC9C,CACF"}
|
|
@@ -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-BNjRb2Mr.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
|