@rspress/core 1.0.2 → 1.1.1-beta.0
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/index.js +62 -16
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +1 -0
- package/dist/loader.js +24 -105
- package/dist/loader.js.map +1 -1
- package/dist/theme/bundle.css +291 -293
- package/dist/theme/bundle.d.ts +1 -1
- package/dist/theme/bundle.js +567 -511
- package/dist/theme/bundle.js.map +1 -1
- package/package.json +14 -14
- package/src/theme-default/components/HomeHero/index.tsx +5 -4
- package/src/theme-default/components/Nav/NavBarTitle.tsx +2 -1
- package/src/theme-default/components/Nav/NavMenuGroup.tsx +1 -14
- package/src/theme-default/components/Nav/NavTranslations.tsx +16 -0
- package/src/theme-default/components/Nav/NavVersions.tsx +16 -0
- package/src/theme-default/components/Nav/index.tsx +12 -50
- package/src/theme-default/components/Nav/menuDataHooks.tsx +75 -0
- package/src/theme-default/components/{NavScreenMenuGroup → NavScreen}/NavScreenMenuGroup.tsx +1 -1
- package/src/theme-default/components/NavScreen/index.module.scss +42 -0
- package/src/theme-default/components/NavScreen/index.tsx +26 -54
- package/src/theme-default/components/Overview/index.module.scss +4 -5
- package/src/theme-default/components/Overview/index.tsx +7 -2
- package/src/theme-default/components/Search/index.module.scss +2 -0
- package/src/theme-default/components/Search/index.tsx +11 -3
- package/src/theme-default/components/Sidebar/index.tsx +1 -1
- package/src/theme-default/components/SocialLinks/HiddenLinks.tsx +1 -1
- package/src/theme-default/components/SocialLinks/ShownLinks.tsx +1 -1
- package/src/theme-default/layout/DocLayout/docComponents/code.tsx +4 -27
- package/src/theme-default/layout/DocLayout/index.module.scss +1 -0
- package/src/theme-default/layout/DocLayout/index.tsx +15 -5
- package/src/theme-default/layout/Layout/index.tsx +25 -1
- package/src/theme-default/logic/useHiddenNav.ts +4 -1
- package/src/theme-default/components/NavScreenMenuGroup/index.module.scss +0 -41
package/dist/theme/bundle.js
CHANGED
|
@@ -269,7 +269,9 @@ function useDisableNav() {
|
|
|
269
269
|
siteData: { themeConfig },
|
|
270
270
|
page: { frontmatter = {} }
|
|
271
271
|
} = usePageData4();
|
|
272
|
-
|
|
272
|
+
const initialState = !((_a = frontmatter == null ? void 0 : frontmatter.navbar) != null ? _a : true) || (themeConfig == null ? void 0 : themeConfig.hideNavbar) === "always";
|
|
273
|
+
const [disableNav, setDisableNav] = useState2(initialState);
|
|
274
|
+
return [disableNav, setDisableNav];
|
|
273
275
|
}
|
|
274
276
|
function useHiddenNav() {
|
|
275
277
|
var _a;
|
|
@@ -577,7 +579,7 @@ function Aside(props) {
|
|
|
577
579
|
}
|
|
578
580
|
|
|
579
581
|
// src/theme-default/components/EditLink/index.module.scss
|
|
580
|
-
var index_module_default = { "editLink": "
|
|
582
|
+
var index_module_default = { "editLink": "editLink_d8024" };
|
|
581
583
|
|
|
582
584
|
// src/theme-default/components/EditLink/index.tsx
|
|
583
585
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
@@ -596,7 +598,7 @@ import nprogress from "nprogress";
|
|
|
596
598
|
import { routes } from "virtual-routes";
|
|
597
599
|
|
|
598
600
|
// src/theme-default/components/Link/index.module.scss
|
|
599
|
-
var index_module_default2 = { "link": "
|
|
601
|
+
var index_module_default2 = { "link": "link_2625c" };
|
|
600
602
|
|
|
601
603
|
// src/theme-default/components/Link/index.tsx
|
|
602
604
|
import {
|
|
@@ -670,7 +672,7 @@ function Link(props) {
|
|
|
670
672
|
}
|
|
671
673
|
|
|
672
674
|
// src/theme-default/components/DocFooter/index.module.scss
|
|
673
|
-
var index_module_default3 = { "pager": "
|
|
675
|
+
var index_module_default3 = { "pager": "pager_cd2c7", "has-next": "has-next_cd2c7", "hasNext": "has-next_cd2c7", "prev": "prev_cd2c7", "next": "next_cd2c7", "pager-link": "pager-link_cd2c7", "pagerLink": "pager-link_cd2c7", "title": "title_cd2c7", "desc": "desc_cd2c7" };
|
|
674
676
|
|
|
675
677
|
// src/theme-default/components/DocFooter/index.tsx
|
|
676
678
|
import {
|
|
@@ -743,7 +745,7 @@ import { routes as routes2 } from "virtual-routes";
|
|
|
743
745
|
import { useContext, useEffect as useEffect4, useState as useState3 } from "react";
|
|
744
746
|
|
|
745
747
|
// src/theme-default/components/Nav/index.module.scss
|
|
746
|
-
var index_module_default4 = { "hidden": "
|
|
748
|
+
var index_module_default4 = { "hidden": "hidden_1719c", "container": "container_1719c", "navContainer": "navContainer_1719c", "leftNav": "leftNav_1719c", "rightNav": "rightNav_1719c", "activeItem": "activeItem_1719c", "singleItem": "singleItem_1719c", "social-links-icon": "social-links-icon_1719c", "socialLinksIcon": "social-links-icon_1719c", "menu-item": "menu-item_1719c", "menuItem": "menu-item_1719c", "mobileNavMenu": "mobileNavMenu_1719c", "mask": "mask_1719c", "docPage": "docPage_1719c" };
|
|
747
749
|
|
|
748
750
|
// src/theme-default/components/Nav/NavBarTitle.tsx
|
|
749
751
|
import {
|
|
@@ -775,7 +777,8 @@ var NavBarTitle = () => {
|
|
|
775
777
|
src: normalizeImagePath(logo),
|
|
776
778
|
alt: "logo",
|
|
777
779
|
id: "logo",
|
|
778
|
-
className: "
|
|
780
|
+
className: "mr-4 rspress-logo",
|
|
781
|
+
style: { height: "1.6rem" }
|
|
779
782
|
}
|
|
780
783
|
) : /* @__PURE__ */ jsx6("span", { children: title })
|
|
781
784
|
}
|
|
@@ -783,7 +786,7 @@ var NavBarTitle = () => {
|
|
|
783
786
|
};
|
|
784
787
|
|
|
785
788
|
// src/theme-default/components/Sidebar/index.module.scss
|
|
786
|
-
var index_module_default5 = { "navTitleMask": "
|
|
789
|
+
var index_module_default5 = { "navTitleMask": "navTitleMask_82695", "sidebar": "sidebar_82695", "sidebarContent": "sidebarContent_82695", "open": "open_82695", "menuLink": "menuLink_82695", "menuItem": "menuItem_82695", "collapseContainer": "collapseContainer_82695", "menuItemStatic": "menuItemStatic_82695", "menuItemActive": "menuItemActive_82695", "menuGroupActive": "menuGroupActive_82695" };
|
|
787
790
|
|
|
788
791
|
// src/theme-default/components/Sidebar/SidebarItem.tsx
|
|
789
792
|
import { useEffect as useEffect6, useRef as useRef3 } from "react";
|
|
@@ -1054,7 +1057,7 @@ function SideBar(props) {
|
|
|
1054
1057
|
const localesData = useLocaleSiteData();
|
|
1055
1058
|
const { pathname: rawPathname } = useLocation5();
|
|
1056
1059
|
const langRoutePrefix = normalizeSlash(localesData.langRoutePrefix || "");
|
|
1057
|
-
const hideNavbar = useDisableNav();
|
|
1060
|
+
const [hideNavbar] = useDisableNav();
|
|
1058
1061
|
const [sidebarData, setSidebarData] = useState4(rawSidebarData.filter(Boolean).flat());
|
|
1059
1062
|
const pathname = decodeURIComponent(rawPathname);
|
|
1060
1063
|
useEffect7(() => {
|
|
@@ -1181,10 +1184,15 @@ function SideMenu() {
|
|
|
1181
1184
|
import { useMemo } from "react";
|
|
1182
1185
|
|
|
1183
1186
|
// src/theme-default/components/Overview/index.module.scss
|
|
1184
|
-
var index_module_default6 = { "header-anchor": "header-
|
|
1187
|
+
var index_module_default6 = { "header-anchor": "header-anchor_aab16", "headerAnchor": "header-anchor_aab16", "overview-groups": "overview-groups_aab16", "overviewGroups": "overview-groups_aab16", "overview-group-li": "overview-group-li_aab16", "overviewGroupLi": "overview-group-li_aab16", "level-2": "level-2_aab16", "level2": "level-2_aab16", "overview-group": "overview-group_aab16", "overviewGroup": "overview-group_aab16", "header": "header_aab16" };
|
|
1185
1188
|
|
|
1186
1189
|
// src/theme-default/components/Overview/index.tsx
|
|
1187
|
-
import {
|
|
1190
|
+
import {
|
|
1191
|
+
usePageData as usePageData8,
|
|
1192
|
+
normalizeHrefInRuntime as normalizeHref6,
|
|
1193
|
+
withBase as withBase7,
|
|
1194
|
+
isEqualPath as isEqualPath4
|
|
1195
|
+
} from "@/runtime";
|
|
1188
1196
|
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1189
1197
|
var DEFAULT_GROUP = "Others";
|
|
1190
1198
|
function Overview() {
|
|
@@ -1236,7 +1244,7 @@ function Overview() {
|
|
|
1236
1244
|
];
|
|
1237
1245
|
}, [overviewSidebarGroups]);
|
|
1238
1246
|
return /* @__PURE__ */ jsxs8("div", { className: "overview-index mx-auto px-8", children: [
|
|
1239
|
-
/* @__PURE__ */ jsx14("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsx14("h1", { children: "Overview" }) }),
|
|
1247
|
+
/* @__PURE__ */ jsx14("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsx14("h1", { className: "text-3xl leading-10 tracking-tight", children: "Overview" }) }),
|
|
1240
1248
|
groups.map((group) => /* @__PURE__ */ jsxs8("div", { className: "mb-16", children: [
|
|
1241
1249
|
group.name === DEFAULT_GROUP && groups.length === 1 ? /* @__PURE__ */ jsx14("h2", { style: { paddingTop: 0 } }) : /* @__PURE__ */ jsx14("h2", { children: group.name }),
|
|
1242
1250
|
/* @__PURE__ */ jsx14("div", { className: index_module_default6.overviewGroups, children: group.items.map((item) => {
|
|
@@ -1264,10 +1272,10 @@ var TabDataContext = createContext(
|
|
|
1264
1272
|
);
|
|
1265
1273
|
|
|
1266
1274
|
// src/theme-default/layout/DocLayout/index.module.scss
|
|
1267
|
-
var index_module_default7 = { "aside-container": "aside-
|
|
1275
|
+
var index_module_default7 = { "aside-container": "aside-container_c7b5e", "asideContainer": "aside-container_c7b5e", "fade-out": "fade-out_c7b5e", "fadeOut": "fade-out_c7b5e", "fade-in": "fade-in_c7b5e", "fadeIn": "fade-in_c7b5e", "docLayout": "docLayout_c7b5e", "content": "content_c7b5e" };
|
|
1268
1276
|
|
|
1269
1277
|
// src/theme-default/layout/DocLayout/index.tsx
|
|
1270
|
-
import { Content, usePageData as usePageData9 } from "@/runtime";
|
|
1278
|
+
import { Content, useLocation as useLocation7, usePageData as usePageData9 } from "@/runtime";
|
|
1271
1279
|
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1272
1280
|
function DocLayout(props) {
|
|
1273
1281
|
var _a, _b;
|
|
@@ -1279,11 +1287,12 @@ function DocLayout(props) {
|
|
|
1279
1287
|
const { themeConfig } = siteData2;
|
|
1280
1288
|
const localesData = useLocaleSiteData();
|
|
1281
1289
|
const sidebar = localesData.sidebar || {};
|
|
1282
|
-
const disableNavbar = useDisableNav();
|
|
1290
|
+
const [disableNavbar] = useDisableNav();
|
|
1283
1291
|
const hasSidebar = (frontmatter == null ? void 0 : frontmatter.sidebar) !== false && Object.keys(sidebar).length > 0;
|
|
1284
1292
|
const outlineTitle = (localesData == null ? void 0 : localesData.outlineTitle) || (themeConfig == null ? void 0 : themeConfig.outlineTitle) || "ON THIS PAGE";
|
|
1285
1293
|
const isOverviewPage = (_a = frontmatter == null ? void 0 : frontmatter.overview) != null ? _a : false;
|
|
1286
|
-
const hasFooter = (_b = frontmatter == null ? void 0 : frontmatter.footer) != null ? _b : true;
|
|
1294
|
+
const [hasFooter, setHasFooter] = useState6((_b = frontmatter == null ? void 0 : frontmatter.footer) != null ? _b : true);
|
|
1295
|
+
const location2 = useLocation7();
|
|
1287
1296
|
const getHasAside = () => {
|
|
1288
1297
|
var _a2, _b2;
|
|
1289
1298
|
const defaultHasAside = typeof window === "undefined" ? true : window.top === window.self;
|
|
@@ -1293,6 +1302,13 @@ function DocLayout(props) {
|
|
|
1293
1302
|
useEffect9(() => {
|
|
1294
1303
|
setHasAside(getHasAside());
|
|
1295
1304
|
}, [page, siteData2]);
|
|
1305
|
+
useEffect9(() => {
|
|
1306
|
+
const query2 = new URLSearchParams(location2.search);
|
|
1307
|
+
const footer = query2.get("footer");
|
|
1308
|
+
if (footer === "0" /* Hide */) {
|
|
1309
|
+
setHasFooter(false);
|
|
1310
|
+
}
|
|
1311
|
+
}, []);
|
|
1296
1312
|
return /* @__PURE__ */ jsxs9(
|
|
1297
1313
|
"div",
|
|
1298
1314
|
{
|
|
@@ -1304,7 +1320,7 @@ function DocLayout(props) {
|
|
|
1304
1320
|
/* @__PURE__ */ jsxs9(
|
|
1305
1321
|
"div",
|
|
1306
1322
|
{
|
|
1307
|
-
className: `${index_module_default7.content} rspress-doc-container flex flex-shrink-0`,
|
|
1323
|
+
className: `${index_module_default7.content} rspress-doc-container flex flex-shrink-0 m-auto`,
|
|
1308
1324
|
children: [
|
|
1309
1325
|
/* @__PURE__ */ jsx15("div", { className: "w-full", children: isOverviewPage ? /* @__PURE__ */ jsx15(Overview, {}) : /* @__PURE__ */ jsxs9("div", { children: [
|
|
1310
1326
|
/* @__PURE__ */ jsx15("div", { className: "rspress-doc", children: /* @__PURE__ */ jsx15(TabDataContext.Provider, { value: { tabData, setTabData }, children: /* @__PURE__ */ jsx15(MDXProvider, { components: getCustomMDXComponent(), children: /* @__PURE__ */ jsx15(Content, {}) }) }) }),
|
|
@@ -1381,7 +1397,7 @@ var Layout = (props) => {
|
|
|
1381
1397
|
} = page;
|
|
1382
1398
|
const localesData = useLocaleSiteData();
|
|
1383
1399
|
const defaultLang = siteData2.lang || "";
|
|
1384
|
-
const hideNavbar = useDisableNav();
|
|
1400
|
+
const [hideNavbar, setHideNavbar] = useDisableNav();
|
|
1385
1401
|
let title = (_a = frontmatter == null ? void 0 : frontmatter.title) != null ? _a : articleTitle;
|
|
1386
1402
|
const mainTitle = siteData2.title || localesData.title;
|
|
1387
1403
|
const localeLanguages = Object.values(siteData2.themeConfig.locales || {});
|
|
@@ -1436,6 +1452,21 @@ var Layout = (props) => {
|
|
|
1436
1452
|
}
|
|
1437
1453
|
}
|
|
1438
1454
|
}, []);
|
|
1455
|
+
useEffect10(() => {
|
|
1456
|
+
const query2 = new URLSearchParams(location.search);
|
|
1457
|
+
const navbar = query2.get("navbar");
|
|
1458
|
+
const sidebar = query2.get("sidebar");
|
|
1459
|
+
const aside = query2.get("outline");
|
|
1460
|
+
if (navbar === "0" /* Hide */) {
|
|
1461
|
+
setHideNavbar(true);
|
|
1462
|
+
}
|
|
1463
|
+
if (sidebar === "0" /* Hide */) {
|
|
1464
|
+
document.documentElement.style.setProperty("--rp-sidebar-width", "0");
|
|
1465
|
+
}
|
|
1466
|
+
if (aside === "0" /* Hide */) {
|
|
1467
|
+
document.documentElement.style.setProperty("--rp-aside-width", "0");
|
|
1468
|
+
}
|
|
1469
|
+
}, []);
|
|
1439
1470
|
return /* @__PURE__ */ jsxs10("div", { children: [
|
|
1440
1471
|
/* @__PURE__ */ jsxs10(Helmet, { children: [
|
|
1441
1472
|
title ? /* @__PURE__ */ jsx16("title", { children: title }) : null,
|
|
@@ -1462,7 +1493,7 @@ import { HomeFooter } from "@theme";
|
|
|
1462
1493
|
import React6 from "react";
|
|
1463
1494
|
|
|
1464
1495
|
// src/theme-default/components/Button/index.module.scss
|
|
1465
|
-
var index_module_default8 = { "button": "
|
|
1496
|
+
var index_module_default8 = { "button": "button_f51d9", "medium": "medium_f51d9", "big": "big_f51d9", "brand": "brand_f51d9", "alt": "alt_f51d9" };
|
|
1466
1497
|
|
|
1467
1498
|
// src/theme-default/components/Button/index.tsx
|
|
1468
1499
|
function Button(props) {
|
|
@@ -1490,7 +1521,7 @@ function Button(props) {
|
|
|
1490
1521
|
}
|
|
1491
1522
|
|
|
1492
1523
|
// src/theme-default/components/HomeHero/index.module.scss
|
|
1493
|
-
var index_module_default9 = { "clip": "
|
|
1524
|
+
var index_module_default9 = { "clip": "clip_0666a", "mask": "mask_0666a" };
|
|
1494
1525
|
|
|
1495
1526
|
// src/theme-default/components/HomeHero/index.tsx
|
|
1496
1527
|
import {
|
|
@@ -1509,6 +1540,7 @@ function HomeHero({ frontmatter }) {
|
|
|
1509
1540
|
var _a, _b, _c;
|
|
1510
1541
|
const hero = (frontmatter == null ? void 0 : frontmatter.hero) || DEFAULT_HERO;
|
|
1511
1542
|
const hasImage = hero.image !== void 0;
|
|
1543
|
+
const textMaxWidth = hasImage ? "sm:max-w-xl" : "sm:max-w-4xl";
|
|
1512
1544
|
return /* @__PURE__ */ jsxs11("div", { className: "m-auto pt-0 px-6 pb-12 sm:pt-10 sm:px-16 md:pt-16 md:px-16 md:pb-16", children: [
|
|
1513
1545
|
/* @__PURE__ */ jsx17(
|
|
1514
1546
|
"div",
|
|
@@ -1525,12 +1557,18 @@ function HomeHero({ frontmatter }) {
|
|
|
1525
1557
|
((_a = hero.text) == null ? void 0 : _a.length) && /* @__PURE__ */ jsx17(
|
|
1526
1558
|
"p",
|
|
1527
1559
|
{
|
|
1528
|
-
className: `mx-auto md:m-0 text-3xl sm:text-5xl md:text-6xl pb-2 font-bold z-10
|
|
1560
|
+
className: `mx-auto md:m-0 text-3xl sm:text-5xl md:text-6xl pb-2 font-bold z-10 ${textMaxWidth}`,
|
|
1529
1561
|
style: { lineHeight: "1.2" },
|
|
1530
1562
|
children: hero.text
|
|
1531
1563
|
}
|
|
1532
1564
|
),
|
|
1533
|
-
/* @__PURE__ */ jsx17(
|
|
1565
|
+
/* @__PURE__ */ jsx17(
|
|
1566
|
+
"p",
|
|
1567
|
+
{
|
|
1568
|
+
className: `whitespace-pre-wrap pt-4 m-auto md:m-0 text-sm sm:tex-xl md:text-2xl text-text-2 font-medium z-10 ${textMaxWidth}`,
|
|
1569
|
+
children: hero.tagline
|
|
1570
|
+
}
|
|
1571
|
+
),
|
|
1534
1572
|
/* @__PURE__ */ jsx17("div", { className: "flex flex-wrap justify-center gap-3 m--1.5 pt-8 z-10", children: hero.actions.map((action) => /* @__PURE__ */ jsx17("div", { className: "flex flex-shrink-0 p-1", children: /* @__PURE__ */ jsx17(
|
|
1535
1573
|
Button,
|
|
1536
1574
|
{
|
|
@@ -1553,7 +1591,7 @@ function HomeHero({ frontmatter }) {
|
|
|
1553
1591
|
}
|
|
1554
1592
|
|
|
1555
1593
|
// src/theme-default/components/HomeFeatures/index.module.scss
|
|
1556
|
-
var index_module_default10 = { "grid-2": "grid-
|
|
1594
|
+
var index_module_default10 = { "grid-2": "grid-2_9c01c", "grid2": "grid-2_9c01c", "grid-4": "grid-4_9c01c", "grid4": "grid-4_9c01c", "grid-6": "grid-6_9c01c", "grid6": "grid-6_9c01c", "grid-3": "grid-3_9c01c", "grid3": "grid-3_9c01c", "featureCard": "featureCard_9c01c" };
|
|
1557
1595
|
|
|
1558
1596
|
// src/theme-default/components/HomeFeatures/index.tsx
|
|
1559
1597
|
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
@@ -1637,8 +1675,7 @@ function HomeLayout(props) {
|
|
|
1637
1675
|
}
|
|
1638
1676
|
|
|
1639
1677
|
// src/theme-default/components/Nav/index.tsx
|
|
1640
|
-
import {
|
|
1641
|
-
import { useLocation as useLocation7 } from "react-router-dom";
|
|
1678
|
+
import { useLocation as useLocation9 } from "react-router-dom";
|
|
1642
1679
|
import { Search } from "@theme";
|
|
1643
1680
|
import { useEffect as useEffect13, useState as useState12 } from "react";
|
|
1644
1681
|
|
|
@@ -1648,88 +1685,24 @@ import { Fragment as Fragment4 } from "react";
|
|
|
1648
1685
|
// src/theme-default/components/NavScreen/index.tsx
|
|
1649
1686
|
import { useEffect as useEffect12, useRef as useRef4 } from "react";
|
|
1650
1687
|
import { disableBodyScroll, clearAllBodyScrollLocks } from "body-scroll-lock";
|
|
1651
|
-
import {
|
|
1652
|
-
replaceLang
|
|
1653
|
-
} from "@rspress/shared";
|
|
1654
|
-
|
|
1655
|
-
// src/theme-default/components/NavScreenMenuGroup/NavScreenMenuGroup.tsx
|
|
1656
|
-
import { useState as useState7 } from "react";
|
|
1657
|
-
|
|
1658
|
-
// src/theme-default/assets/down.svg
|
|
1659
|
-
import * as React7 from "react";
|
|
1660
|
-
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1661
|
-
var SvgDown = (props) => /* @__PURE__ */ jsx20("svg", __spreadProps(__spreadValues({ width: "1em", height: "1em", viewBox: "0 0 32 32" }, props), { children: /* @__PURE__ */ jsx20("path", { fill: "currentColor", d: "M16 22 6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z" }) }));
|
|
1662
|
-
var down_default = SvgDown;
|
|
1663
|
-
|
|
1664
|
-
// src/theme-default/components/NavScreenMenuGroup/index.module.scss
|
|
1665
|
-
var index_module_default11 = { "navScreenMenuGroup": "navScreenMenuGroup_de8a5", "open": "open_de8a5", "button": "button_de8a5", "buttonSpan": "buttonSpan_de8a5", "items": "items_de8a5", "down": "down_de8a5" };
|
|
1666
|
-
|
|
1667
|
-
// src/theme-default/components/NavScreenMenuGroup/NavScreenMenuGroup.tsx
|
|
1668
|
-
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1669
|
-
function NavScreenMenuGroup(item) {
|
|
1670
|
-
const { activeValue } = item;
|
|
1671
|
-
const [isOpen, setIsOpen] = useState7(false);
|
|
1672
|
-
function ActiveGroupItem2({ item: item2 }) {
|
|
1673
|
-
return /* @__PURE__ */ jsx21("div", { className: "p-1", children: /* @__PURE__ */ jsx21("span", { className: "text-brand", children: item2.text }) });
|
|
1674
|
-
}
|
|
1675
|
-
function NormalGroupItem2({ item: item2 }) {
|
|
1676
|
-
return /* @__PURE__ */ jsx21("div", { className: "py-1 font-medium", children: /* @__PURE__ */ jsx21(Link, { href: item2.link, children: /* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsx21("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx21("span", { children: item2.text }) }) }) }) });
|
|
1677
|
-
}
|
|
1678
|
-
const renderLinkItem = (item2) => {
|
|
1679
|
-
if (activeValue === item2.text) {
|
|
1680
|
-
return /* @__PURE__ */ jsx21(ActiveGroupItem2, { item: item2 }, item2.link);
|
|
1681
|
-
}
|
|
1682
|
-
return /* @__PURE__ */ jsx21(NormalGroupItem2, { item: item2 }, item2.link);
|
|
1683
|
-
};
|
|
1684
|
-
const renderGroup = (item2) => {
|
|
1685
|
-
return /* @__PURE__ */ jsxs14("div", { children: [
|
|
1686
|
-
"link" in item2 ? renderLinkItem(item2) : /* @__PURE__ */ jsx21("p", { className: "font-bold text-gray-400 my-1 not:first:border", children: item2.text }),
|
|
1687
|
-
item2.items.map(renderLinkItem)
|
|
1688
|
-
] });
|
|
1689
|
-
};
|
|
1690
|
-
return /* @__PURE__ */ jsxs14(
|
|
1691
|
-
"div",
|
|
1692
|
-
{
|
|
1693
|
-
className: `${isOpen ? index_module_default11.open : ""} ${index_module_default11.navScreenMenuGroup} relative`,
|
|
1694
|
-
children: [
|
|
1695
|
-
/* @__PURE__ */ jsxs14(
|
|
1696
|
-
"button",
|
|
1697
|
-
{
|
|
1698
|
-
className: index_module_default11.button,
|
|
1699
|
-
onClick: () => {
|
|
1700
|
-
setIsOpen(!isOpen);
|
|
1701
|
-
},
|
|
1702
|
-
children: [
|
|
1703
|
-
/* @__PURE__ */ jsx21("span", { className: index_module_default11.buttonSpan, children: item.text }),
|
|
1704
|
-
/* @__PURE__ */ jsx21(down_default, { className: `${isOpen ? index_module_default11.open : ""} ${index_module_default11.down} ` })
|
|
1705
|
-
]
|
|
1706
|
-
}
|
|
1707
|
-
),
|
|
1708
|
-
/* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsx21("div", { className: index_module_default11.items, children: item.items.map((item2) => {
|
|
1709
|
-
return /* @__PURE__ */ jsx21("div", { children: "items" in item2 ? renderGroup(item2) : renderLinkItem(item2) }, item2.text);
|
|
1710
|
-
}) }) })
|
|
1711
|
-
]
|
|
1712
|
-
}
|
|
1713
|
-
);
|
|
1714
|
-
}
|
|
1715
1688
|
|
|
1716
1689
|
// src/theme-default/components/Nav/NavMenuSingleItem.tsx
|
|
1717
1690
|
import {
|
|
1718
1691
|
withoutBase
|
|
1719
1692
|
} from "@rspress/shared";
|
|
1720
1693
|
import { normalizeHrefInRuntime as normalizeHref8 } from "@/runtime";
|
|
1721
|
-
import { jsx as
|
|
1694
|
+
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1722
1695
|
function NavMenuSingleItem(item) {
|
|
1723
1696
|
const { pathname, base } = item;
|
|
1724
1697
|
const isActive2 = new RegExp(item.activeMatch || item.link).test(
|
|
1725
1698
|
withoutBase(pathname, base)
|
|
1726
1699
|
);
|
|
1727
|
-
return /* @__PURE__ */
|
|
1700
|
+
return /* @__PURE__ */ jsx20(Link, { href: normalizeHref8(item.link), children: /* @__PURE__ */ jsxs14(
|
|
1728
1701
|
"div",
|
|
1729
1702
|
{
|
|
1730
1703
|
className: `${index_module_default4.singleItem} ${isActive2 ? index_module_default4.activeItem : ""} text-sm font-medium mx-1.5 px-3 py-2 flex items-center`,
|
|
1731
1704
|
children: [
|
|
1732
|
-
/* @__PURE__ */
|
|
1705
|
+
/* @__PURE__ */ jsx20(Tag, { tag: item.tag }),
|
|
1733
1706
|
item.text,
|
|
1734
1707
|
item.rightIcon
|
|
1735
1708
|
]
|
|
@@ -1742,15 +1715,15 @@ function NavMenuSingleItem(item) {
|
|
|
1742
1715
|
import { useContext as useContext2, useEffect as useEffect11 } from "react";
|
|
1743
1716
|
|
|
1744
1717
|
// src/theme-default/assets/sun.svg
|
|
1745
|
-
import * as
|
|
1746
|
-
import { jsx as
|
|
1747
|
-
var SvgSun = (props) => /* @__PURE__ */
|
|
1718
|
+
import * as React7 from "react";
|
|
1719
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1720
|
+
var SvgSun = (props) => /* @__PURE__ */ jsx21("svg", __spreadProps(__spreadValues({ xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", viewBox: "0 0 24 24" }, props), { children: /* @__PURE__ */ jsx21("path", { d: "M12 18c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6zm0-10c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zM12 4c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1s1 .4 1 1v2c0 .6-.4 1-1 1zM12 24c-.6 0-1-.4-1-1v-2c0-.6.4-1 1-1s1 .4 1 1v2c0 .6-.4 1-1 1zM5.6 6.6c-.3 0-.5-.1-.7-.3L3.5 4.9c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l1.4 1.4c.4.4.4 1 0 1.4-.1.2-.4.3-.7.3zM19.8 20.8c-.3 0-.5-.1-.7-.3l-1.4-1.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l1.4 1.4c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zM3 13H1c-.6 0-1-.4-1-1s.4-1 1-1h2c.6 0 1 .4 1 1s-.4 1-1 1zM23 13h-2c-.6 0-1-.4-1-1s.4-1 1-1h2c.6 0 1 .4 1 1s-.4 1-1 1zM4.2 20.8c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l1.4-1.4c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-1.4 1.4c-.2.2-.4.3-.7.3zM18.4 6.6c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l1.4-1.4c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-1.4 1.4c-.2.2-.5.3-.7.3z" }) }));
|
|
1748
1721
|
var sun_default = SvgSun;
|
|
1749
1722
|
|
|
1750
1723
|
// src/theme-default/assets/moon.svg
|
|
1751
|
-
import * as
|
|
1752
|
-
import { jsx as
|
|
1753
|
-
var SvgMoon = (props) => /* @__PURE__ */
|
|
1724
|
+
import * as React8 from "react";
|
|
1725
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1726
|
+
var SvgMoon = (props) => /* @__PURE__ */ jsx22("svg", __spreadProps(__spreadValues({ xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", viewBox: "0 0 24 24" }, props), { children: /* @__PURE__ */ jsx22("path", { d: "M12.1 22h-.9c-5.5-.5-9.5-5.4-9-10.9.4-4.8 4.2-8.6 9-9 .4 0 .8.2 1 .5.2.3.2.8-.1 1.1-2 2.7-1.4 6.4 1.3 8.4 2.1 1.6 5 1.6 7.1 0 .3-.2.7-.3 1.1-.1.3.2.5.6.5 1-.2 2.7-1.5 5.1-3.6 6.8-1.9 1.4-4.1 2.2-6.4 2.2zM9.3 4.4c-2.9 1-5 3.6-5.2 6.8-.4 4.4 2.8 8.3 7.2 8.7 2.1.2 4.2-.4 5.8-1.8 1.1-.9 1.9-2.1 2.4-3.4-2.5.9-5.3.5-7.5-1.1-2.8-2.2-3.9-5.9-2.7-9.2z" }) }));
|
|
1754
1727
|
var moon_default = SvgMoon;
|
|
1755
1728
|
|
|
1756
1729
|
// src/theme-default/logic/useAppearance.ts
|
|
@@ -1798,7 +1771,7 @@ var getToggle = () => {
|
|
|
1798
1771
|
|
|
1799
1772
|
// src/theme-default/components/SwitchAppearance/index.tsx
|
|
1800
1773
|
import { ThemeContext as ThemeContext2 } from "@/runtime";
|
|
1801
|
-
import { jsx as
|
|
1774
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1802
1775
|
function SwitchAppearance({ onClick }) {
|
|
1803
1776
|
const { theme, setTheme } = useContext2(ThemeContext2);
|
|
1804
1777
|
const toggleAppearance = getToggle();
|
|
@@ -1807,7 +1780,7 @@ function SwitchAppearance({ onClick }) {
|
|
|
1807
1780
|
setTheme("dark");
|
|
1808
1781
|
}
|
|
1809
1782
|
}, []);
|
|
1810
|
-
return /* @__PURE__ */
|
|
1783
|
+
return /* @__PURE__ */ jsx23(
|
|
1811
1784
|
"div",
|
|
1812
1785
|
{
|
|
1813
1786
|
onClick: () => {
|
|
@@ -1816,50 +1789,44 @@ function SwitchAppearance({ onClick }) {
|
|
|
1816
1789
|
onClick == null ? void 0 : onClick();
|
|
1817
1790
|
},
|
|
1818
1791
|
className: "md:mr-2 rspress-nav-appearance",
|
|
1819
|
-
children: /* @__PURE__ */
|
|
1792
|
+
children: /* @__PURE__ */ jsx23("div", { className: "p-1 border border-solid border-gray-300 text-gray-400 cursor-pointer rounded-md hover:border-gray-600 hover:text-gray-600 dark:hover:border-gray-200 dark:hover:text-gray-200 transition-all duration-300", children: theme === "light" ? /* @__PURE__ */ jsx23(sun_default, { width: "18", height: "18", fill: "currentColor" }) : /* @__PURE__ */ jsx23(moon_default, { width: "18", height: "18", fill: "currentColor" }) })
|
|
1820
1793
|
}
|
|
1821
1794
|
);
|
|
1822
1795
|
}
|
|
1823
1796
|
|
|
1824
|
-
// src/theme-default/assets/translator.svg
|
|
1825
|
-
import * as React10 from "react";
|
|
1826
|
-
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1827
|
-
var SvgTranslator = (props) => /* @__PURE__ */ jsx26("svg", __spreadProps(__spreadValues({ width: 18, height: 18, viewBox: "0 0 32 32" }, props), { children: /* @__PURE__ */ jsx26("path", { fill: "currentColor", d: "M27.85 29H30l-6-15h-2.35l-6 15h2.15l1.6-4h6.85zm-7.65-6 2.62-6.56L25.45 23zM18 7V5h-7V2H9v3H2v2h10.74a14.71 14.71 0 0 1-3.19 6.18A13.5 13.5 0 0 1 7.26 9h-2.1a16.47 16.47 0 0 0 3 5.58A16.84 16.84 0 0 1 3 18l.75 1.86A18.47 18.47 0 0 0 9.53 16a16.92 16.92 0 0 0 5.76 3.84L16 18a14.48 14.48 0 0 1-5.12-3.37A17.64 17.64 0 0 0 14.8 7z" }) }));
|
|
1828
|
-
var translator_default = SvgTranslator;
|
|
1829
|
-
|
|
1830
1797
|
// src/theme-default/components/SocialLinks/index.tsx
|
|
1831
|
-
import { useState as
|
|
1798
|
+
import { useState as useState8 } from "react";
|
|
1832
1799
|
|
|
1833
1800
|
// src/theme-default/assets/arrow-down.svg
|
|
1834
|
-
import * as
|
|
1835
|
-
import { jsx as
|
|
1836
|
-
var SvgArrowDown = (props) => /* @__PURE__ */
|
|
1801
|
+
import * as React9 from "react";
|
|
1802
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1803
|
+
var SvgArrowDown = (props) => /* @__PURE__ */ jsx24("svg", __spreadProps(__spreadValues({ width: "1em", height: "1em", viewBox: "0 0 32 32" }, props), { children: /* @__PURE__ */ jsx24("path", { fill: "currentColor", d: "M16 22 6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z" }) }));
|
|
1837
1804
|
var arrow_down_default = SvgArrowDown;
|
|
1838
1805
|
|
|
1839
1806
|
// src/theme-default/components/SocialLinks/LinkContent.tsx
|
|
1840
|
-
import { useState as
|
|
1807
|
+
import { useState as useState7 } from "react";
|
|
1841
1808
|
|
|
1842
1809
|
// src/theme-default/components/SocialLinks/index.module.scss
|
|
1843
|
-
var
|
|
1810
|
+
var index_module_default11 = { "social-links-icon": "social-links-icon_c942e", "socialLinksIcon": "social-links-icon_c942e", "menu-item": "menu-item_c942e", "menuItem": "menu-item_c942e" };
|
|
1844
1811
|
|
|
1845
1812
|
// src/theme-default/components/SocialLinks/presetIcons.tsx
|
|
1846
|
-
import { jsx as
|
|
1813
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1847
1814
|
var presetIcons_default = {
|
|
1848
|
-
discord: /* @__PURE__ */
|
|
1849
|
-
/* @__PURE__ */
|
|
1850
|
-
/* @__PURE__ */
|
|
1815
|
+
discord: /* @__PURE__ */ jsxs15("svg", { role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1816
|
+
/* @__PURE__ */ jsx25("title", { children: "Discord" }),
|
|
1817
|
+
/* @__PURE__ */ jsx25("path", { d: "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" })
|
|
1851
1818
|
] }),
|
|
1852
|
-
facebook: /* @__PURE__ */
|
|
1853
|
-
/* @__PURE__ */
|
|
1854
|
-
/* @__PURE__ */
|
|
1819
|
+
facebook: /* @__PURE__ */ jsxs15("svg", { role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1820
|
+
/* @__PURE__ */ jsx25("title", { children: "Facebook" }),
|
|
1821
|
+
/* @__PURE__ */ jsx25("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" })
|
|
1855
1822
|
] }),
|
|
1856
|
-
github: /* @__PURE__ */
|
|
1857
|
-
/* @__PURE__ */
|
|
1858
|
-
/* @__PURE__ */
|
|
1823
|
+
github: /* @__PURE__ */ jsxs15("svg", { role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1824
|
+
/* @__PURE__ */ jsx25("title", { children: "GitHub" }),
|
|
1825
|
+
/* @__PURE__ */ jsx25("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" })
|
|
1859
1826
|
] }),
|
|
1860
|
-
gitlab: /* @__PURE__ */
|
|
1861
|
-
/* @__PURE__ */
|
|
1862
|
-
/* @__PURE__ */
|
|
1827
|
+
gitlab: /* @__PURE__ */ jsxs15("svg", { role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1828
|
+
/* @__PURE__ */ jsx25("title", { children: "GitLab" }),
|
|
1829
|
+
/* @__PURE__ */ jsx25(
|
|
1863
1830
|
"path",
|
|
1864
1831
|
{
|
|
1865
1832
|
fill: "currentColor",
|
|
@@ -1867,27 +1834,27 @@ var presetIcons_default = {
|
|
|
1867
1834
|
}
|
|
1868
1835
|
)
|
|
1869
1836
|
] }),
|
|
1870
|
-
instagram: /* @__PURE__ */
|
|
1871
|
-
/* @__PURE__ */
|
|
1872
|
-
/* @__PURE__ */
|
|
1837
|
+
instagram: /* @__PURE__ */ jsxs15("svg", { role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1838
|
+
/* @__PURE__ */ jsx25("title", { children: "Instagram" }),
|
|
1839
|
+
/* @__PURE__ */ jsx25("path", { d: "M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z" })
|
|
1873
1840
|
] }),
|
|
1874
|
-
linkedin: /* @__PURE__ */
|
|
1875
|
-
/* @__PURE__ */
|
|
1876
|
-
/* @__PURE__ */
|
|
1841
|
+
linkedin: /* @__PURE__ */ jsxs15("svg", { role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1842
|
+
/* @__PURE__ */ jsx25("title", { children: "LinkedIn" }),
|
|
1843
|
+
/* @__PURE__ */ jsx25("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" })
|
|
1877
1844
|
] }),
|
|
1878
|
-
slack: /* @__PURE__ */
|
|
1879
|
-
/* @__PURE__ */
|
|
1880
|
-
/* @__PURE__ */
|
|
1845
|
+
slack: /* @__PURE__ */ jsxs15("svg", { role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1846
|
+
/* @__PURE__ */ jsx25("title", { children: "Slack" }),
|
|
1847
|
+
/* @__PURE__ */ jsx25("path", { d: "M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z" })
|
|
1881
1848
|
] }),
|
|
1882
|
-
twitter: /* @__PURE__ */
|
|
1883
|
-
/* @__PURE__ */
|
|
1884
|
-
/* @__PURE__ */
|
|
1849
|
+
twitter: /* @__PURE__ */ jsxs15("svg", { role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1850
|
+
/* @__PURE__ */ jsx25("title", { children: "Twitter" }),
|
|
1851
|
+
/* @__PURE__ */ jsx25("path", { d: "M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z" })
|
|
1885
1852
|
] }),
|
|
1886
|
-
youtube: /* @__PURE__ */
|
|
1887
|
-
/* @__PURE__ */
|
|
1888
|
-
/* @__PURE__ */
|
|
1853
|
+
youtube: /* @__PURE__ */ jsxs15("svg", { role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1854
|
+
/* @__PURE__ */ jsx25("title", { children: "YouTube" }),
|
|
1855
|
+
/* @__PURE__ */ jsx25("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" })
|
|
1889
1856
|
] }),
|
|
1890
|
-
juejin: /* @__PURE__ */
|
|
1857
|
+
juejin: /* @__PURE__ */ jsxs15(
|
|
1891
1858
|
"svg",
|
|
1892
1859
|
{
|
|
1893
1860
|
className: "icon",
|
|
@@ -1896,14 +1863,14 @@ var presetIcons_default = {
|
|
|
1896
1863
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1897
1864
|
"data-spm-anchor-id": "a313x.7781069.0.i5",
|
|
1898
1865
|
children: [
|
|
1899
|
-
/* @__PURE__ */
|
|
1866
|
+
/* @__PURE__ */ jsx25(
|
|
1900
1867
|
"path",
|
|
1901
1868
|
{
|
|
1902
1869
|
d: "M465.189 161.792c-22.967 18.14-44.325 35.109-47.397 37.742l-5.851 4.68 10.971 8.632c5.998 4.827 11.85 9.508 13.02 10.532 1.17 1.024 17.993 14.336 37.156 29.696l34.962 27.795 5.267-3.95c2.925-2.194 23.259-18.432 45.348-35.986 21.943-17.555 41.253-32.768 42.716-33.646 1.609-1.024 2.779-2.194 2.779-2.78 0-0.438-9.655-8.63-21.504-17.846-11.995-9.363-22.674-17.847-23.845-18.871-15.945-13.02-49.737-39.059-50.76-39.059-0.586 0.147-19.896 14.922-42.862 33.061z m233.325 180.37C507.465 493.275 508.928 492.105 505.417 489.911c-3.072-1.902-11.556-8.485-64.073-50.03-9.07-7.168-18.578-14.775-21.358-16.823-2.78-2.194-8.777-6.875-13.312-10.532-4.68-3.657-10.679-8.339-13.312-10.533-13.165-10.24-71.095-56.027-102.107-80.457-5.852-4.681-11.41-8.485-12.142-8.485-0.731 0-10.971 7.754-22.674 17.116-11.703 9.508-22.674 18.286-24.284 19.456-1.755 1.17-5.12 3.95-7.46 6.144-2.34 2.34-4.828 4.096-5.413 4.096-3.072 0-0.731 3.072 6.437 8.777 4.096 3.218 8.777 6.875 10.094 8.046 1.316 1.024 10.24 8.045 19.748 15.506s23.26 18.286 30.428 23.99c19.31 15.215 31.89 25.308 127.853 101.084 47.836 37.742 88.796 69.779 90.844 71.095 3.657 2.487 3.95 2.487 7.46-0.292a1041.42 1041.42 0 0 0 16.092-12.727c6.875-5.413 14.775-11.703 17.554-13.897 30.135-23.699 80.018-63.05 81.774-64.512 1.17-1.024 12.434-9.802 24.868-19.603s37.888-29.696 56.32-44.324c18.579-14.629 46.227-36.425 61.733-48.567 15.506-12.142 27.794-22.528 27.502-23.26-0.878-1.17-57.637-47.104-59.978-48.274-0.731-0.439-18.578 12.727-39.497 29.257z",
|
|
1903
1870
|
"data-spm-anchor-id": "a313x.7781069.0.i2"
|
|
1904
1871
|
}
|
|
1905
1872
|
),
|
|
1906
|
-
/* @__PURE__ */
|
|
1873
|
+
/* @__PURE__ */ jsx25(
|
|
1907
1874
|
"path",
|
|
1908
1875
|
{
|
|
1909
1876
|
d: "M57.93 489.326c-15.215 12.288-28.527 23.405-29.697 24.576-2.34 2.194-5.412-0.44 80.018 66.852 33.207 26.185 32.622 25.747 57.637 45.495 10.386 8.192 36.279 28.672 57.783 45.495 38.18 30.135 44.91 35.401 52.663 41.545 2.048 1.756 22.967 18.14 46.372 36.572 23.26 18.432 74.167 58.514 112.933 89.088 38.912 30.573 71.095 55.734 71.826 56.027 0.732 0.293 7.46-4.389 14.921-10.386 21.797-16.97 90.259-70.949 101.523-79.872 5.705-4.535 12.873-10.24 15.945-12.58 3.072-2.488 6.436-5.12 7.314-5.852 0.878-0.878 11.85-9.509 24.283-19.31 20.773-16.091 59.1-46.226 64.366-50.615 1.17-1.024 5.12-4.096 8.777-6.875 3.657-2.78 7.9-6.29 9.509-7.607 1.609-1.317 14.775-11.703 29.257-23.113 29.11-22.82 42.277-33.207 88.503-69.632 17.262-13.605 32.475-25.454 33.646-26.478 2.486-2.048 31.451-24.869 44.617-35.255 4.827-3.657 9.07-7.168 9.508-7.607 0.44-0.585 5.998-4.827 12.435-9.8 6.436-4.828 13.165-10.24 15.067-11.85l3.365-2.926-9.948-7.753c-5.412-4.388-10.24-8.192-10.679-8.63-1.17-1.317-22.381-18.433-30.135-24.284-3.95-3.072-7.314-5.998-7.606-6.73-1.317-3.071-6.73 0.147-29.258 17.994-13.458 10.532-25.746 20.187-27.355 21.504-1.61 1.463-10.533 8.338-19.749 15.652-9.216 7.168-17.115 13.459-17.554 13.898-0.439 0.438-6.583 5.412-13.897 10.971-7.168 5.559-15.214 11.703-17.7 13.75-4.974 4.097-5.413 4.39-20.334 16.239-5.56 4.388-11.264 8.777-12.435 9.8-1.17 1.025-20.333 16.092-42.422 33.354-22.09 17.408-41.546 32.768-43.155 34.084-1.609 1.463-14.482 11.557-28.525 22.528s-40.814 32.037-59.539 46.812c-18.578 14.775-42.276 33.353-52.516 41.399s-23.26 18.285-28.965 22.82l-10.386 8.339-4.389-3.072c-2.34-1.756-4.68-3.511-5.12-3.95-0.439-0.439-4.973-4.096-10.24-8.046-11.849-9.216-14.482-11.264-16.676-13.166-0.878-0.877-4.243-3.51-7.46-5.851-3.22-2.487-6.145-4.681-6.584-5.12-0.439-0.439-6.875-5.705-14.482-11.703-7.607-5.851-14.921-11.556-16.091-12.58-1.317-1.17-17.116-13.605-35.255-27.795-17.993-14.19-35.109-27.648-38.035-29.842-5.705-4.681-33.499-26.624-125.074-98.743-34.523-27.209-72.704-57.344-84.846-66.852-49.737-39.498-55.15-43.594-56.905-43.447-0.877 0-14.043 10.24-29.257 22.528z",
|
|
@@ -1913,7 +1880,7 @@ var presetIcons_default = {
|
|
|
1913
1880
|
]
|
|
1914
1881
|
}
|
|
1915
1882
|
),
|
|
1916
|
-
qq: /* @__PURE__ */
|
|
1883
|
+
qq: /* @__PURE__ */ jsx25(
|
|
1917
1884
|
"svg",
|
|
1918
1885
|
{
|
|
1919
1886
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1922,7 +1889,7 @@ var presetIcons_default = {
|
|
|
1922
1889
|
className: "iconify iconify--ri",
|
|
1923
1890
|
preserveAspectRatio: "xMidYMid meet",
|
|
1924
1891
|
viewBox: "0 0 24 24",
|
|
1925
|
-
children: /* @__PURE__ */
|
|
1892
|
+
children: /* @__PURE__ */ jsx25(
|
|
1926
1893
|
"path",
|
|
1927
1894
|
{
|
|
1928
1895
|
fill: "currentColor",
|
|
@@ -1931,7 +1898,7 @@ var presetIcons_default = {
|
|
|
1931
1898
|
)
|
|
1932
1899
|
}
|
|
1933
1900
|
),
|
|
1934
|
-
wechat: /* @__PURE__ */
|
|
1901
|
+
wechat: /* @__PURE__ */ jsx25(
|
|
1935
1902
|
"svg",
|
|
1936
1903
|
{
|
|
1937
1904
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1940,7 +1907,7 @@ var presetIcons_default = {
|
|
|
1940
1907
|
className: "iconify iconify--ri",
|
|
1941
1908
|
preserveAspectRatio: "xMidYMid meet",
|
|
1942
1909
|
viewBox: "0 0 24 24",
|
|
1943
|
-
children: /* @__PURE__ */
|
|
1910
|
+
children: /* @__PURE__ */ jsx25(
|
|
1944
1911
|
"path",
|
|
1945
1912
|
{
|
|
1946
1913
|
fill: "currentColor",
|
|
@@ -1949,7 +1916,7 @@ var presetIcons_default = {
|
|
|
1949
1916
|
)
|
|
1950
1917
|
}
|
|
1951
1918
|
),
|
|
1952
|
-
weibo: /* @__PURE__ */
|
|
1919
|
+
weibo: /* @__PURE__ */ jsx25(
|
|
1953
1920
|
"svg",
|
|
1954
1921
|
{
|
|
1955
1922
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1958,7 +1925,7 @@ var presetIcons_default = {
|
|
|
1958
1925
|
className: "iconify iconify--ri",
|
|
1959
1926
|
preserveAspectRatio: "xMidYMid meet",
|
|
1960
1927
|
viewBox: "0 0 24 24",
|
|
1961
|
-
children: /* @__PURE__ */
|
|
1928
|
+
children: /* @__PURE__ */ jsx25(
|
|
1962
1929
|
"path",
|
|
1963
1930
|
{
|
|
1964
1931
|
fill: "currentColor",
|
|
@@ -1967,7 +1934,7 @@ var presetIcons_default = {
|
|
|
1967
1934
|
)
|
|
1968
1935
|
}
|
|
1969
1936
|
),
|
|
1970
|
-
zhihu: /* @__PURE__ */
|
|
1937
|
+
zhihu: /* @__PURE__ */ jsx25(
|
|
1971
1938
|
"svg",
|
|
1972
1939
|
{
|
|
1973
1940
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1976,7 +1943,7 @@ var presetIcons_default = {
|
|
|
1976
1943
|
className: "iconify iconify--ri",
|
|
1977
1944
|
preserveAspectRatio: "xMidYMid meet",
|
|
1978
1945
|
viewBox: "0 0 24 24",
|
|
1979
|
-
children: /* @__PURE__ */
|
|
1946
|
+
children: /* @__PURE__ */ jsx25(
|
|
1980
1947
|
"path",
|
|
1981
1948
|
{
|
|
1982
1949
|
fill: "currentColor",
|
|
@@ -1985,7 +1952,7 @@ var presetIcons_default = {
|
|
|
1985
1952
|
)
|
|
1986
1953
|
}
|
|
1987
1954
|
),
|
|
1988
|
-
bilibili: /* @__PURE__ */
|
|
1955
|
+
bilibili: /* @__PURE__ */ jsx25(
|
|
1989
1956
|
"svg",
|
|
1990
1957
|
{
|
|
1991
1958
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1994,7 +1961,7 @@ var presetIcons_default = {
|
|
|
1994
1961
|
className: "iconify iconify--ri",
|
|
1995
1962
|
preserveAspectRatio: "xMidYMid meet",
|
|
1996
1963
|
viewBox: "0 0 24 24",
|
|
1997
|
-
children: /* @__PURE__ */
|
|
1964
|
+
children: /* @__PURE__ */ jsx25(
|
|
1998
1965
|
"path",
|
|
1999
1966
|
{
|
|
2000
1967
|
fill: "currentColor",
|
|
@@ -2003,31 +1970,31 @@ var presetIcons_default = {
|
|
|
2003
1970
|
)
|
|
2004
1971
|
}
|
|
2005
1972
|
),
|
|
2006
|
-
lark: /* @__PURE__ */
|
|
1973
|
+
lark: /* @__PURE__ */ jsx25(
|
|
2007
1974
|
"svg",
|
|
2008
1975
|
{
|
|
2009
1976
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2010
1977
|
width: "48",
|
|
2011
1978
|
height: "48",
|
|
2012
1979
|
viewBox: "0 0 48 48",
|
|
2013
|
-
children: /* @__PURE__ */
|
|
2014
|
-
/* @__PURE__ */
|
|
2015
|
-
/* @__PURE__ */
|
|
1980
|
+
children: /* @__PURE__ */ jsxs15("g", { fillRule: "evenodd", clipRule: "evenodd", children: [
|
|
1981
|
+
/* @__PURE__ */ jsx25("path", { d: "M41.0716 5.99409L3.31071 16.5187L12.3856 25.8126L20.7998 25.9594L30.4827 16.5187C30.2266 15.9943 30.0985 15.5552 30.0985 15.2013C30.0985 14.4074 30.4104 13.7786 30.8947 13.333C31.7241 12.57 32.7222 12.4558 33.8889 12.9905L41.0716 5.99409Z" }),
|
|
1982
|
+
/* @__PURE__ */ jsx25("path", { d: "M42.1021 6.72842L31.5775 44.4893L22.2836 35.4144L22.1367 27.0002L31.5115 17.4816C32.0195 17.8454 32.5743 18.0105 33.1759 17.9769C34.0784 17.9264 34.6614 17.3813 34.9349 17.0602C35.2083 16.7392 35.5293 16.2051 35.5025 15.4113C35.4847 14.8821 35.3109 14.3941 34.9812 13.9472L42.1021 6.72842Z" })
|
|
2016
1983
|
] })
|
|
2017
1984
|
}
|
|
2018
1985
|
)
|
|
2019
1986
|
};
|
|
2020
1987
|
|
|
2021
1988
|
// src/theme-default/components/SocialLinks/LinkContent.tsx
|
|
2022
|
-
import { jsx as
|
|
1989
|
+
import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2023
1990
|
var LinkContent = (props) => {
|
|
2024
1991
|
const { link, popperStyle = {} } = props;
|
|
2025
1992
|
const { icon, mode = "link", content } = link;
|
|
2026
1993
|
const IconComp = typeof icon === "object" ? (
|
|
2027
1994
|
// eslint-disable-next-line react/no-danger
|
|
2028
|
-
/* @__PURE__ */
|
|
1995
|
+
/* @__PURE__ */ jsx26("div", { dangerouslySetInnerHTML: { __html: icon.svg } })
|
|
2029
1996
|
) : presetIcons_default[icon];
|
|
2030
|
-
const [contentVisible, setContentVisible] =
|
|
1997
|
+
const [contentVisible, setContentVisible] = useState7(false);
|
|
2031
1998
|
const mouseEnterIcon = () => {
|
|
2032
1999
|
setContentVisible(true);
|
|
2033
2000
|
};
|
|
@@ -2035,28 +2002,28 @@ var LinkContent = (props) => {
|
|
|
2035
2002
|
setContentVisible(false);
|
|
2036
2003
|
};
|
|
2037
2004
|
if (mode === "link") {
|
|
2038
|
-
return /* @__PURE__ */
|
|
2005
|
+
return /* @__PURE__ */ jsx26(
|
|
2039
2006
|
"a",
|
|
2040
2007
|
{
|
|
2041
2008
|
href: content,
|
|
2042
2009
|
target: "_blank",
|
|
2043
2010
|
rel: "noopener noreferrer",
|
|
2044
2011
|
className: "social-links",
|
|
2045
|
-
children: /* @__PURE__ */
|
|
2012
|
+
children: /* @__PURE__ */ jsx26("div", { className: `${index_module_default11.socialLinksIcon}`, children: IconComp })
|
|
2046
2013
|
},
|
|
2047
2014
|
content
|
|
2048
2015
|
);
|
|
2049
2016
|
}
|
|
2050
2017
|
if (mode === "text") {
|
|
2051
|
-
return /* @__PURE__ */
|
|
2018
|
+
return /* @__PURE__ */ jsxs16(
|
|
2052
2019
|
"div",
|
|
2053
2020
|
{
|
|
2054
|
-
className: `${
|
|
2021
|
+
className: `${index_module_default11.socialLinksIcon} cursor-pointer relative mx-3`,
|
|
2055
2022
|
onMouseEnter: mouseEnterIcon,
|
|
2056
2023
|
onMouseLeave: mouseLeavePopper,
|
|
2057
2024
|
children: [
|
|
2058
2025
|
IconComp,
|
|
2059
|
-
contentVisible ? /* @__PURE__ */
|
|
2026
|
+
contentVisible ? /* @__PURE__ */ jsx26(
|
|
2060
2027
|
"div",
|
|
2061
2028
|
{
|
|
2062
2029
|
style: __spreadValues({
|
|
@@ -2064,7 +2031,7 @@ var LinkContent = (props) => {
|
|
|
2064
2031
|
border: "1px solid var(--rp-c-divider-light)"
|
|
2065
2032
|
}, popperStyle),
|
|
2066
2033
|
className: "z-1 p-3 w-50 absolute right-0 bg-white dark:bg-dark",
|
|
2067
|
-
children: /* @__PURE__ */
|
|
2034
|
+
children: /* @__PURE__ */ jsx26("div", { className: "text-md", children: content })
|
|
2068
2035
|
}
|
|
2069
2036
|
) : null
|
|
2070
2037
|
]
|
|
@@ -2072,37 +2039,37 @@ var LinkContent = (props) => {
|
|
|
2072
2039
|
);
|
|
2073
2040
|
}
|
|
2074
2041
|
if (mode === "img") {
|
|
2075
|
-
return /* @__PURE__ */
|
|
2042
|
+
return /* @__PURE__ */ jsxs16(
|
|
2076
2043
|
"div",
|
|
2077
2044
|
{
|
|
2078
|
-
className: `${
|
|
2045
|
+
className: `${index_module_default11.socialLinksIcon} cursor-pointer relative`,
|
|
2079
2046
|
onMouseEnter: mouseEnterIcon,
|
|
2080
2047
|
onMouseLeave: mouseLeavePopper,
|
|
2081
2048
|
children: [
|
|
2082
2049
|
IconComp,
|
|
2083
|
-
contentVisible ? /* @__PURE__ */
|
|
2050
|
+
contentVisible ? /* @__PURE__ */ jsx26(
|
|
2084
2051
|
"div",
|
|
2085
2052
|
{
|
|
2086
2053
|
className: "break-all z-1 p-3 w-50 absolute right-0 rounded-xl",
|
|
2087
2054
|
style: __spreadValues({
|
|
2088
2055
|
boxShadow: "var(--rp-shadow-3)"
|
|
2089
2056
|
}, popperStyle),
|
|
2090
|
-
children: /* @__PURE__ */
|
|
2057
|
+
children: /* @__PURE__ */ jsx26("img", { src: content, alt: "img" })
|
|
2091
2058
|
}
|
|
2092
2059
|
) : null
|
|
2093
2060
|
]
|
|
2094
2061
|
}
|
|
2095
2062
|
);
|
|
2096
2063
|
}
|
|
2097
|
-
return /* @__PURE__ */
|
|
2064
|
+
return /* @__PURE__ */ jsx26("div", {});
|
|
2098
2065
|
};
|
|
2099
2066
|
|
|
2100
2067
|
// src/theme-default/components/SocialLinks/ShownLinks.tsx
|
|
2101
|
-
import { Fragment as Fragment3, jsx as
|
|
2068
|
+
import { Fragment as Fragment3, jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2102
2069
|
var ShownLinks = (props) => {
|
|
2103
2070
|
const { links, moreIconVisible = false, mouseEnter } = props;
|
|
2104
|
-
return /* @__PURE__ */
|
|
2105
|
-
/* @__PURE__ */
|
|
2071
|
+
return /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
2072
|
+
/* @__PURE__ */ jsx27("div", { className: "flex-center h-full gap-x-4 transition-colors duration-300 md:mr-2", children: links.map((item, index) => /* @__PURE__ */ jsx27(
|
|
2106
2073
|
LinkContent,
|
|
2107
2074
|
{
|
|
2108
2075
|
link: item,
|
|
@@ -2110,15 +2077,15 @@ var ShownLinks = (props) => {
|
|
|
2110
2077
|
},
|
|
2111
2078
|
index
|
|
2112
2079
|
)) }),
|
|
2113
|
-
moreIconVisible ? /* @__PURE__ */
|
|
2080
|
+
moreIconVisible ? /* @__PURE__ */ jsx27("div", { className: "md:ml-1 p-2", onMouseEnter: mouseEnter, children: /* @__PURE__ */ jsx27(arrow_down_default, {}) }) : null
|
|
2114
2081
|
] });
|
|
2115
2082
|
};
|
|
2116
2083
|
|
|
2117
2084
|
// src/theme-default/components/SocialLinks/HiddenLinks.tsx
|
|
2118
|
-
import { jsx as
|
|
2085
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2119
2086
|
var HiddenLinks = (props) => {
|
|
2120
2087
|
const { links } = props;
|
|
2121
|
-
return /* @__PURE__ */
|
|
2088
|
+
return /* @__PURE__ */ jsx28(
|
|
2122
2089
|
"div",
|
|
2123
2090
|
{
|
|
2124
2091
|
style: {
|
|
@@ -2126,8 +2093,8 @@ var HiddenLinks = (props) => {
|
|
|
2126
2093
|
marginRight: "-2px",
|
|
2127
2094
|
border: "1px solid var(--rp-c-divider-light)"
|
|
2128
2095
|
},
|
|
2129
|
-
className: "absolute top-
|
|
2130
|
-
children: links.map((item) => /* @__PURE__ */
|
|
2096
|
+
className: "absolute top-8 right-0 z-1 p-3 w-32 rounded-2xl bg-white flex flex-wrap gap-4",
|
|
2097
|
+
children: links.map((item) => /* @__PURE__ */ jsx28(
|
|
2131
2098
|
LinkContent,
|
|
2132
2099
|
{
|
|
2133
2100
|
link: item,
|
|
@@ -2140,7 +2107,7 @@ var HiddenLinks = (props) => {
|
|
|
2140
2107
|
};
|
|
2141
2108
|
|
|
2142
2109
|
// src/theme-default/components/SocialLinks/index.tsx
|
|
2143
|
-
import { jsx as
|
|
2110
|
+
import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2144
2111
|
var SocialLinks = ({ socialLinks }) => {
|
|
2145
2112
|
const moreThanThree = socialLinks.length > 3;
|
|
2146
2113
|
const shownLinks = [];
|
|
@@ -2152,14 +2119,14 @@ var SocialLinks = ({ socialLinks }) => {
|
|
|
2152
2119
|
hiddenLinks.push(item);
|
|
2153
2120
|
}
|
|
2154
2121
|
});
|
|
2155
|
-
const [moreLinksVisible, setMoreLinksVisible] =
|
|
2156
|
-
return /* @__PURE__ */
|
|
2122
|
+
const [moreLinksVisible, setMoreLinksVisible] = useState8(false);
|
|
2123
|
+
return /* @__PURE__ */ jsxs18(
|
|
2157
2124
|
"div",
|
|
2158
2125
|
{
|
|
2159
|
-
className: `social-links ${
|
|
2126
|
+
className: `social-links ${index_module_default11.menuItem} flex-center relative`,
|
|
2160
2127
|
onMouseLeave: () => setMoreLinksVisible(false),
|
|
2161
2128
|
children: [
|
|
2162
|
-
/* @__PURE__ */
|
|
2129
|
+
/* @__PURE__ */ jsx29(
|
|
2163
2130
|
ShownLinks,
|
|
2164
2131
|
{
|
|
2165
2132
|
links: shownLinks,
|
|
@@ -2167,46 +2134,39 @@ var SocialLinks = ({ socialLinks }) => {
|
|
|
2167
2134
|
mouseEnter: () => setMoreLinksVisible(true)
|
|
2168
2135
|
}
|
|
2169
2136
|
),
|
|
2170
|
-
moreLinksVisible ? /* @__PURE__ */
|
|
2137
|
+
moreLinksVisible ? /* @__PURE__ */ jsx29(HiddenLinks, { links: hiddenLinks }) : null
|
|
2171
2138
|
]
|
|
2172
2139
|
}
|
|
2173
2140
|
);
|
|
2174
2141
|
};
|
|
2175
2142
|
|
|
2176
|
-
// src/theme-default/components/
|
|
2177
|
-
|
|
2143
|
+
// src/theme-default/components/Nav/menuDataHooks.tsx
|
|
2144
|
+
import { replaceLang, replaceVersion } from "@rspress/shared";
|
|
2178
2145
|
|
|
2179
|
-
// src/theme-default/
|
|
2180
|
-
import
|
|
2181
|
-
import { jsx as
|
|
2182
|
-
var
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
);
|
|
2192
|
-
};
|
|
2193
|
-
function NavScreen(props) {
|
|
2194
|
-
var _a, _b;
|
|
2195
|
-
const { isScreenOpen, localeData, siteData: siteData2, pathname } = props;
|
|
2146
|
+
// src/theme-default/assets/translator.svg
|
|
2147
|
+
import * as React10 from "react";
|
|
2148
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2149
|
+
var SvgTranslator = (props) => /* @__PURE__ */ jsx30("svg", __spreadProps(__spreadValues({ width: 18, height: 18, viewBox: "0 0 32 32" }, props), { children: /* @__PURE__ */ jsx30("path", { fill: "currentColor", d: "M27.85 29H30l-6-15h-2.35l-6 15h2.15l1.6-4h6.85zm-7.65-6 2.62-6.56L25.45 23zM18 7V5h-7V2H9v3H2v2h10.74a14.71 14.71 0 0 1-3.19 6.18A13.5 13.5 0 0 1 7.26 9h-2.1a16.47 16.47 0 0 0 3 5.58A16.84 16.84 0 0 1 3 18l.75 1.86A18.47 18.47 0 0 0 9.53 16a16.92 16.92 0 0 0 5.76 3.84L16 18a14.48 14.48 0 0 1-5.12-3.37A17.64 17.64 0 0 0 14.8 7z" }) }));
|
|
2150
|
+
var translator_default = SvgTranslator;
|
|
2151
|
+
|
|
2152
|
+
// src/theme-default/components/Nav/menuDataHooks.tsx
|
|
2153
|
+
import { useLocation as useLocation8, usePageData as usePageData12, useVersion as useVersion2 } from "@/runtime";
|
|
2154
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2155
|
+
function useTranslationMenuData() {
|
|
2156
|
+
var _a;
|
|
2157
|
+
const { siteData: siteData2, page } = usePageData12();
|
|
2196
2158
|
const currentVersion = useVersion2();
|
|
2197
|
-
const
|
|
2198
|
-
const
|
|
2199
|
-
const
|
|
2200
|
-
const
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
const
|
|
2204
|
-
const
|
|
2205
|
-
const
|
|
2206
|
-
const { base, lang: defaultLang, multiVersion } = siteData2;
|
|
2207
|
-
const { default: defaultVersion } = multiVersion;
|
|
2159
|
+
const { pathname } = useLocation8();
|
|
2160
|
+
const defaultLang = siteData2.lang || "";
|
|
2161
|
+
const defaultVersion = siteData2.multiVersion.default || "";
|
|
2162
|
+
const localeLanguages = Object.values(
|
|
2163
|
+
siteData2.locales || siteData2.themeConfig.locales || {}
|
|
2164
|
+
);
|
|
2165
|
+
const hasMultiLanguage = localeLanguages.length > 1;
|
|
2166
|
+
const { lang: currentLang } = page;
|
|
2167
|
+
const { base } = siteData2;
|
|
2208
2168
|
const translationMenuData = hasMultiLanguage ? {
|
|
2209
|
-
text: /* @__PURE__ */
|
|
2169
|
+
text: /* @__PURE__ */ jsx31(
|
|
2210
2170
|
translator_default,
|
|
2211
2171
|
{
|
|
2212
2172
|
style: {
|
|
@@ -2215,7 +2175,7 @@ function NavScreen(props) {
|
|
|
2215
2175
|
}
|
|
2216
2176
|
}
|
|
2217
2177
|
),
|
|
2218
|
-
items:
|
|
2178
|
+
items: localeLanguages.map((item) => ({
|
|
2219
2179
|
text: item == null ? void 0 : item.label,
|
|
2220
2180
|
link: replaceLang(
|
|
2221
2181
|
pathname,
|
|
@@ -2231,14 +2191,139 @@ function NavScreen(props) {
|
|
|
2231
2191
|
base
|
|
2232
2192
|
)
|
|
2233
2193
|
})),
|
|
2234
|
-
activeValue: (
|
|
2194
|
+
activeValue: (_a = localeLanguages.find((item) => currentLang === item.lang)) == null ? void 0 : _a.label
|
|
2235
2195
|
} : null;
|
|
2196
|
+
return translationMenuData;
|
|
2197
|
+
}
|
|
2198
|
+
function useVersionMenuData() {
|
|
2199
|
+
const { siteData: siteData2 } = usePageData12();
|
|
2200
|
+
const currentVersion = useVersion2();
|
|
2201
|
+
const { pathname } = useLocation8();
|
|
2202
|
+
const defaultVersion = siteData2.multiVersion.default || "";
|
|
2203
|
+
const versions = siteData2.multiVersion.versions || [];
|
|
2204
|
+
const { base } = siteData2;
|
|
2205
|
+
const versionsMenuData = {
|
|
2206
|
+
items: versions.map((version) => ({
|
|
2207
|
+
text: version,
|
|
2208
|
+
link: replaceVersion(
|
|
2209
|
+
pathname,
|
|
2210
|
+
{
|
|
2211
|
+
current: currentVersion,
|
|
2212
|
+
target: version,
|
|
2213
|
+
default: defaultVersion
|
|
2214
|
+
},
|
|
2215
|
+
base
|
|
2216
|
+
)
|
|
2217
|
+
})),
|
|
2218
|
+
text: currentVersion,
|
|
2219
|
+
activeValue: currentVersion
|
|
2220
|
+
};
|
|
2221
|
+
return versionsMenuData;
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
// src/theme-default/components/NavScreen/NavScreenMenuGroup.tsx
|
|
2225
|
+
import { useState as useState9 } from "react";
|
|
2226
|
+
|
|
2227
|
+
// src/theme-default/assets/down.svg
|
|
2228
|
+
import * as React11 from "react";
|
|
2229
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2230
|
+
var SvgDown = (props) => /* @__PURE__ */ jsx32("svg", __spreadProps(__spreadValues({ width: "1em", height: "1em", viewBox: "0 0 32 32" }, props), { children: /* @__PURE__ */ jsx32("path", { fill: "currentColor", d: "M16 22 6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z" }) }));
|
|
2231
|
+
var down_default = SvgDown;
|
|
2232
|
+
|
|
2233
|
+
// src/theme-default/components/NavScreen/index.module.scss
|
|
2234
|
+
var index_module_default12 = { "navScreen": "navScreen_798af", "active": "active_798af", "container": "container_798af", "navMenu": "navMenu_798af", "navMenuItem": "navMenuItem_798af", "navAppearance": "navAppearance_798af", "socialAndAppearance": "socialAndAppearance_798af", "navScreenMenuGroup": "navScreenMenuGroup_798af", "open": "open_798af", "button": "button_798af", "buttonSpan": "buttonSpan_798af", "items": "items_798af", "down": "down_798af" };
|
|
2235
|
+
|
|
2236
|
+
// src/theme-default/components/NavScreen/NavScreenMenuGroup.tsx
|
|
2237
|
+
import { jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2238
|
+
function NavScreenMenuGroup(item) {
|
|
2239
|
+
const { activeValue } = item;
|
|
2240
|
+
const [isOpen, setIsOpen] = useState9(false);
|
|
2241
|
+
function ActiveGroupItem2({ item: item2 }) {
|
|
2242
|
+
return /* @__PURE__ */ jsx33("div", { className: "p-1 text-center", children: /* @__PURE__ */ jsx33("span", { className: "text-brand", children: item2.text }) });
|
|
2243
|
+
}
|
|
2244
|
+
function NormalGroupItem2({ item: item2 }) {
|
|
2245
|
+
return /* @__PURE__ */ jsx33("div", { className: "py-1 font-medium", children: /* @__PURE__ */ jsx33(Link, { href: item2.link, children: /* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx33("span", { children: item2.text }) }) }) }) });
|
|
2246
|
+
}
|
|
2247
|
+
const renderLinkItem = (item2) => {
|
|
2248
|
+
if (activeValue === item2.text) {
|
|
2249
|
+
return /* @__PURE__ */ jsx33(ActiveGroupItem2, { item: item2 }, item2.link);
|
|
2250
|
+
}
|
|
2251
|
+
return /* @__PURE__ */ jsx33(NormalGroupItem2, { item: item2 }, item2.link);
|
|
2252
|
+
};
|
|
2253
|
+
const renderGroup = (item2) => {
|
|
2254
|
+
return /* @__PURE__ */ jsxs19("div", { children: [
|
|
2255
|
+
"link" in item2 ? renderLinkItem(item2) : /* @__PURE__ */ jsx33("p", { className: "font-bold text-gray-400 my-1 not:first:border", children: item2.text }),
|
|
2256
|
+
item2.items.map(renderLinkItem)
|
|
2257
|
+
] });
|
|
2258
|
+
};
|
|
2259
|
+
return /* @__PURE__ */ jsxs19(
|
|
2260
|
+
"div",
|
|
2261
|
+
{
|
|
2262
|
+
className: `${isOpen ? index_module_default12.open : ""} ${index_module_default12.navScreenMenuGroup} relative`,
|
|
2263
|
+
children: [
|
|
2264
|
+
/* @__PURE__ */ jsxs19(
|
|
2265
|
+
"button",
|
|
2266
|
+
{
|
|
2267
|
+
className: index_module_default12.button,
|
|
2268
|
+
onClick: () => {
|
|
2269
|
+
setIsOpen(!isOpen);
|
|
2270
|
+
},
|
|
2271
|
+
children: [
|
|
2272
|
+
/* @__PURE__ */ jsx33("span", { className: index_module_default12.buttonSpan, children: item.text }),
|
|
2273
|
+
/* @__PURE__ */ jsx33(down_default, { className: `${isOpen ? index_module_default12.open : ""} ${index_module_default12.down} ` })
|
|
2274
|
+
]
|
|
2275
|
+
}
|
|
2276
|
+
),
|
|
2277
|
+
/* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33("div", { className: index_module_default12.items, children: item.items.map((item2) => {
|
|
2278
|
+
return /* @__PURE__ */ jsx33("div", { children: "items" in item2 ? renderGroup(item2) : renderLinkItem(item2) }, item2.text);
|
|
2279
|
+
}) }) })
|
|
2280
|
+
]
|
|
2281
|
+
}
|
|
2282
|
+
);
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
// src/theme-default/components/NavScreen/index.tsx
|
|
2286
|
+
import { NoSSR } from "@/runtime";
|
|
2287
|
+
import { jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2288
|
+
var NavScreenTranslations = () => {
|
|
2289
|
+
const translationMenuData = useTranslationMenuData();
|
|
2290
|
+
return /* @__PURE__ */ jsx34(
|
|
2291
|
+
"div",
|
|
2292
|
+
{
|
|
2293
|
+
className: `${index_module_default12.navTranslations} flex text-sm font-bold justify-center`,
|
|
2294
|
+
children: /* @__PURE__ */ jsx34("div", { className: "mx-1.5 my-1", children: /* @__PURE__ */ jsx34(NavScreenMenuGroup, __spreadValues({}, translationMenuData)) })
|
|
2295
|
+
}
|
|
2296
|
+
);
|
|
2297
|
+
};
|
|
2298
|
+
var NavScreenVersions = () => {
|
|
2299
|
+
const versionMenuData = useVersionMenuData();
|
|
2300
|
+
return /* @__PURE__ */ jsx34(
|
|
2301
|
+
"div",
|
|
2302
|
+
{
|
|
2303
|
+
className: `${index_module_default12.navTranslations} flex text-sm font-bold justify-center`,
|
|
2304
|
+
children: /* @__PURE__ */ jsx34("div", { className: "mx-1.5 my-1", children: /* @__PURE__ */ jsx34(NavScreenMenuGroup, __spreadValues({}, versionMenuData)) })
|
|
2305
|
+
}
|
|
2306
|
+
);
|
|
2307
|
+
};
|
|
2308
|
+
function NavScreen(props) {
|
|
2309
|
+
var _a;
|
|
2310
|
+
const { isScreenOpen, localeData, siteData: siteData2, pathname } = props;
|
|
2311
|
+
const screen = useRef4(null);
|
|
2312
|
+
const localesData = siteData2.themeConfig.locales || [];
|
|
2313
|
+
const hasMultiLanguage = localesData.length > 1;
|
|
2314
|
+
const hasMultiVersion = siteData2.multiVersion.versions.length > 1;
|
|
2315
|
+
const menuItems = localeData.nav || [];
|
|
2316
|
+
const hasAppearanceSwitch = siteData2.themeConfig.darkMode !== false;
|
|
2317
|
+
const socialLinks = ((_a = siteData2 == null ? void 0 : siteData2.themeConfig) == null ? void 0 : _a.socialLinks) || [];
|
|
2318
|
+
const hasSocialLinks = socialLinks.length > 0;
|
|
2319
|
+
const langs = localesData.map((item) => item.lang || "zh") || [];
|
|
2320
|
+
const { base } = siteData2;
|
|
2236
2321
|
const NavScreenAppearance = () => {
|
|
2237
|
-
return /* @__PURE__ */
|
|
2322
|
+
return /* @__PURE__ */ jsx34("div", { className: `mt-2 ${index_module_default12.navAppearance} flex justify-center`, children: /* @__PURE__ */ jsx34(NoSSR, { children: /* @__PURE__ */ jsx34(SwitchAppearance, {}) }) });
|
|
2238
2323
|
};
|
|
2239
2324
|
const NavScreenMenu = ({ menuItems: menuItems2 }) => {
|
|
2240
|
-
return /* @__PURE__ */
|
|
2241
|
-
return /* @__PURE__ */
|
|
2325
|
+
return /* @__PURE__ */ jsx34("div", { className: index_module_default12.navMenu, children: menuItems2.map((item) => {
|
|
2326
|
+
return /* @__PURE__ */ jsx34("div", { className: `${index_module_default12.navMenuItem} w-full`, children: "link" in item ? /* @__PURE__ */ jsx34(
|
|
2242
2327
|
NavMenuSingleItem,
|
|
2243
2328
|
__spreadValues({
|
|
2244
2329
|
pathname,
|
|
@@ -2246,7 +2331,7 @@ function NavScreen(props) {
|
|
|
2246
2331
|
langs
|
|
2247
2332
|
}, item),
|
|
2248
2333
|
item.text
|
|
2249
|
-
) : /* @__PURE__ */
|
|
2334
|
+
) : /* @__PURE__ */ jsx34("div", { className: "mx-3 last:mr-0", children: /* @__PURE__ */ jsx34(
|
|
2250
2335
|
NavScreenMenuGroup,
|
|
2251
2336
|
__spreadProps(__spreadValues({}, item), {
|
|
2252
2337
|
items: "items" in item ? item.items : item
|
|
@@ -2260,18 +2345,19 @@ function NavScreen(props) {
|
|
|
2260
2345
|
clearAllBodyScrollLocks();
|
|
2261
2346
|
};
|
|
2262
2347
|
}, [isScreenOpen]);
|
|
2263
|
-
return /* @__PURE__ */
|
|
2348
|
+
return /* @__PURE__ */ jsx34(
|
|
2264
2349
|
"div",
|
|
2265
2350
|
{
|
|
2266
|
-
className: `${
|
|
2351
|
+
className: `${index_module_default12.navScreen} ${isScreenOpen ? index_module_default12.active : ""}`,
|
|
2267
2352
|
ref: screen,
|
|
2268
2353
|
id: "navScreen",
|
|
2269
|
-
children: /* @__PURE__ */ jsxs20("div", { className:
|
|
2270
|
-
/* @__PURE__ */
|
|
2354
|
+
children: /* @__PURE__ */ jsxs20("div", { className: index_module_default12.container, children: [
|
|
2355
|
+
/* @__PURE__ */ jsx34(NavScreenMenu, { menuItems }),
|
|
2271
2356
|
/* @__PURE__ */ jsxs20("div", { className: "flex-center flex-col gap-2", children: [
|
|
2272
|
-
hasAppearanceSwitch && /* @__PURE__ */
|
|
2273
|
-
hasMultiLanguage && /* @__PURE__ */
|
|
2274
|
-
|
|
2357
|
+
hasAppearanceSwitch && /* @__PURE__ */ jsx34(NavScreenAppearance, {}),
|
|
2358
|
+
hasMultiLanguage && /* @__PURE__ */ jsx34(NavScreenTranslations, {}),
|
|
2359
|
+
hasMultiVersion && /* @__PURE__ */ jsx34(NavScreenVersions, {}),
|
|
2360
|
+
hasSocialLinks && /* @__PURE__ */ jsx34(SocialLinks, { socialLinks })
|
|
2275
2361
|
] })
|
|
2276
2362
|
] })
|
|
2277
2363
|
}
|
|
@@ -2310,24 +2396,24 @@ function useNav() {
|
|
|
2310
2396
|
|
|
2311
2397
|
// src/theme-default/assets/small-menu.svg
|
|
2312
2398
|
import * as React12 from "react";
|
|
2313
|
-
import { jsx as
|
|
2399
|
+
import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2314
2400
|
var SvgSmallMenu = (props) => /* @__PURE__ */ jsxs21("svg", __spreadProps(__spreadValues({ xmlns: "http://www.w3.org/2000/svg", width: 32, height: 32 }, props), { children: [
|
|
2315
|
-
/* @__PURE__ */
|
|
2316
|
-
/* @__PURE__ */
|
|
2317
|
-
/* @__PURE__ */
|
|
2401
|
+
/* @__PURE__ */ jsx35("circle", { cx: 8, cy: 16, r: 2, fill: "currentColor" }),
|
|
2402
|
+
/* @__PURE__ */ jsx35("circle", { cx: 16, cy: 16, r: 2, fill: "currentColor" }),
|
|
2403
|
+
/* @__PURE__ */ jsx35("circle", { cx: 24, cy: 16, r: 2, fill: "currentColor" })
|
|
2318
2404
|
] }));
|
|
2319
2405
|
var small_menu_default = SvgSmallMenu;
|
|
2320
2406
|
|
|
2321
2407
|
// src/theme-default/components/NavHambmger/index.module.scss
|
|
2322
|
-
var
|
|
2408
|
+
var index_module_default13 = { "navHamburger": "navHamburger_19e92", "container": "container_19e92", "top": "top_19e92", "middle": "middle_19e92", "bottom": "bottom_19e92", "active": "active_19e92" };
|
|
2323
2409
|
|
|
2324
2410
|
// src/theme-default/components/NavHambmger/index.tsx
|
|
2325
|
-
import { jsx as
|
|
2411
|
+
import { jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2326
2412
|
function NavHamburger(props) {
|
|
2327
2413
|
const { localeData, siteData: siteData2, pathname } = props;
|
|
2328
2414
|
const { isScreenOpen, toggleScreen } = useNav();
|
|
2329
2415
|
return /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
2330
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ jsx36(
|
|
2331
2417
|
NavScreen,
|
|
2332
2418
|
{
|
|
2333
2419
|
isScreenOpen,
|
|
@@ -2336,12 +2422,12 @@ function NavHamburger(props) {
|
|
|
2336
2422
|
pathname
|
|
2337
2423
|
}
|
|
2338
2424
|
),
|
|
2339
|
-
/* @__PURE__ */
|
|
2425
|
+
/* @__PURE__ */ jsx36(
|
|
2340
2426
|
"button",
|
|
2341
2427
|
{
|
|
2342
2428
|
onClick: toggleScreen,
|
|
2343
|
-
className: `${isScreenOpen ?
|
|
2344
|
-
children: /* @__PURE__ */
|
|
2429
|
+
className: `${isScreenOpen ? index_module_default13.active : ""} ${index_module_default13.navHamburger} text-gray-500`,
|
|
2430
|
+
children: /* @__PURE__ */ jsx36(small_menu_default, { fill: "currentColor" })
|
|
2345
2431
|
}
|
|
2346
2432
|
)
|
|
2347
2433
|
] });
|
|
@@ -2352,7 +2438,7 @@ import { useState as useState11 } from "react";
|
|
|
2352
2438
|
import {
|
|
2353
2439
|
withoutBase as withoutBase2
|
|
2354
2440
|
} from "@rspress/shared";
|
|
2355
|
-
import { Fragment as Fragment5, jsx as
|
|
2441
|
+
import { Fragment as Fragment5, jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2356
2442
|
function ActiveGroupItem({ item }) {
|
|
2357
2443
|
return /* @__PURE__ */ jsxs23(
|
|
2358
2444
|
"div",
|
|
@@ -2362,15 +2448,15 @@ function ActiveGroupItem({ item }) {
|
|
|
2362
2448
|
padding: "0.4rem 1.5rem 0.4rem 0.75rem"
|
|
2363
2449
|
},
|
|
2364
2450
|
children: [
|
|
2365
|
-
item.tag && /* @__PURE__ */
|
|
2366
|
-
/* @__PURE__ */
|
|
2451
|
+
item.tag && /* @__PURE__ */ jsx37(Tag, { tag: item.tag }),
|
|
2452
|
+
/* @__PURE__ */ jsx37("span", { className: "text-brand", children: item.text })
|
|
2367
2453
|
]
|
|
2368
2454
|
},
|
|
2369
2455
|
item.link
|
|
2370
2456
|
);
|
|
2371
2457
|
}
|
|
2372
2458
|
function NormalGroupItem({ item }) {
|
|
2373
|
-
return /* @__PURE__ */
|
|
2459
|
+
return /* @__PURE__ */ jsx37("div", { className: "font-medium my-1", children: /* @__PURE__ */ jsx37(Link, { href: item.link, children: /* @__PURE__ */ jsx37(
|
|
2374
2460
|
"div",
|
|
2375
2461
|
{
|
|
2376
2462
|
className: "rounded-2xl hover:bg-mute",
|
|
@@ -2378,8 +2464,8 @@ function NormalGroupItem({ item }) {
|
|
|
2378
2464
|
padding: "0.4rem 1.5rem 0.4rem 0.75rem"
|
|
2379
2465
|
},
|
|
2380
2466
|
children: /* @__PURE__ */ jsxs23("div", { className: "flex", children: [
|
|
2381
|
-
item.tag && /* @__PURE__ */
|
|
2382
|
-
/* @__PURE__ */
|
|
2467
|
+
item.tag && /* @__PURE__ */ jsx37(Tag, { tag: item.tag }),
|
|
2468
|
+
/* @__PURE__ */ jsx37("span", { children: item.text })
|
|
2383
2469
|
] })
|
|
2384
2470
|
}
|
|
2385
2471
|
) }) }, item.link);
|
|
@@ -2387,7 +2473,6 @@ function NormalGroupItem({ item }) {
|
|
|
2387
2473
|
function NavMenuGroup(item) {
|
|
2388
2474
|
const {
|
|
2389
2475
|
activeValue,
|
|
2390
|
-
isTranslation,
|
|
2391
2476
|
items: groupItems,
|
|
2392
2477
|
base = "",
|
|
2393
2478
|
link = "",
|
|
@@ -2399,13 +2484,13 @@ function NavMenuGroup(item) {
|
|
|
2399
2484
|
withoutBase2(pathname, base)
|
|
2400
2485
|
);
|
|
2401
2486
|
if (activeValue === item2.text || !activeValue && isLinkActive) {
|
|
2402
|
-
return /* @__PURE__ */
|
|
2487
|
+
return /* @__PURE__ */ jsx37(ActiveGroupItem, { item: item2 }, item2.link);
|
|
2403
2488
|
}
|
|
2404
|
-
return /* @__PURE__ */
|
|
2489
|
+
return /* @__PURE__ */ jsx37(NormalGroupItem, { item: item2 }, item2.link);
|
|
2405
2490
|
};
|
|
2406
2491
|
const renderGroup = (item2) => {
|
|
2407
2492
|
return /* @__PURE__ */ jsxs23("div", { children: [
|
|
2408
|
-
"link" in item2 ? renderLinkItem(item2) : /* @__PURE__ */
|
|
2493
|
+
"link" in item2 ? renderLinkItem(item2) : /* @__PURE__ */ jsx37("p", { className: "font-bold text-gray-400 my-1 not:first:border", children: item2.text }),
|
|
2409
2494
|
item2.items.map(renderLinkItem)
|
|
2410
2495
|
] });
|
|
2411
2496
|
};
|
|
@@ -2415,14 +2500,14 @@ function NavMenuGroup(item) {
|
|
|
2415
2500
|
className: "relative flex-center h-14",
|
|
2416
2501
|
onMouseLeave: () => setIsOpen(false),
|
|
2417
2502
|
children: [
|
|
2418
|
-
/* @__PURE__ */
|
|
2503
|
+
/* @__PURE__ */ jsx37(
|
|
2419
2504
|
"button",
|
|
2420
2505
|
{
|
|
2421
2506
|
onMouseEnter: () => setIsOpen(true),
|
|
2422
2507
|
className: "nav-menu-group-button flex-center items-center font-medium text-sm text-text-1 hover:text-text-2 transition-colors duration-200",
|
|
2423
2508
|
children: link ? (
|
|
2424
2509
|
// @ts-expect-error item.text may be ReactElement
|
|
2425
|
-
/* @__PURE__ */
|
|
2510
|
+
/* @__PURE__ */ jsx37(NavMenuSingleItem, __spreadProps(__spreadValues({}, item), { rightIcon: /* @__PURE__ */ jsx37(down_default, {}) }))
|
|
2426
2511
|
) : /* @__PURE__ */ jsxs23(Fragment5, { children: [
|
|
2427
2512
|
/* @__PURE__ */ jsxs23(
|
|
2428
2513
|
"span",
|
|
@@ -2432,24 +2517,16 @@ function NavMenuGroup(item) {
|
|
|
2432
2517
|
marginRight: "2px"
|
|
2433
2518
|
},
|
|
2434
2519
|
children: [
|
|
2435
|
-
/* @__PURE__ */
|
|
2436
|
-
|
|
2437
|
-
translator_default,
|
|
2438
|
-
{
|
|
2439
|
-
style: {
|
|
2440
|
-
with: "18px",
|
|
2441
|
-
height: "18px"
|
|
2442
|
-
}
|
|
2443
|
-
}
|
|
2444
|
-
) : item.text
|
|
2520
|
+
/* @__PURE__ */ jsx37(Tag, { tag: item.tag }),
|
|
2521
|
+
item.text
|
|
2445
2522
|
]
|
|
2446
2523
|
}
|
|
2447
2524
|
),
|
|
2448
|
-
/* @__PURE__ */
|
|
2525
|
+
/* @__PURE__ */ jsx37(down_default, {})
|
|
2449
2526
|
] })
|
|
2450
2527
|
}
|
|
2451
2528
|
),
|
|
2452
|
-
/* @__PURE__ */
|
|
2529
|
+
/* @__PURE__ */ jsx37(
|
|
2453
2530
|
"div",
|
|
2454
2531
|
{
|
|
2455
2532
|
className: "nav-menu-group-content absolute mx-0.8 transition-opacity duration-300",
|
|
@@ -2459,7 +2536,7 @@ function NavMenuGroup(item) {
|
|
|
2459
2536
|
right: 0,
|
|
2460
2537
|
top: "52px"
|
|
2461
2538
|
},
|
|
2462
|
-
children: /* @__PURE__ */
|
|
2539
|
+
children: /* @__PURE__ */ jsx37(
|
|
2463
2540
|
"div",
|
|
2464
2541
|
{
|
|
2465
2542
|
className: "p-3 pr-2 w-full h-full max-h-100vh whitespace-nowrap",
|
|
@@ -2471,7 +2548,7 @@ function NavMenuGroup(item) {
|
|
|
2471
2548
|
background: "var(--rp-c-bg)"
|
|
2472
2549
|
},
|
|
2473
2550
|
children: groupItems.map((item2) => {
|
|
2474
|
-
return /* @__PURE__ */
|
|
2551
|
+
return /* @__PURE__ */ jsx37("div", { children: "items" in item2 ? renderGroup(item2) : renderLinkItem(item2) }, item2.text);
|
|
2475
2552
|
})
|
|
2476
2553
|
}
|
|
2477
2554
|
)
|
|
@@ -2482,64 +2559,59 @@ function NavMenuGroup(item) {
|
|
|
2482
2559
|
);
|
|
2483
2560
|
}
|
|
2484
2561
|
|
|
2485
|
-
// src/theme-default/components/Nav/
|
|
2486
|
-
import {
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
translationMenuData
|
|
2491
|
-
}) => {
|
|
2492
|
-
return /* @__PURE__ */ jsx37(
|
|
2562
|
+
// src/theme-default/components/Nav/NavTranslations.tsx
|
|
2563
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2564
|
+
function NavTranslations() {
|
|
2565
|
+
const translationMenuData = useTranslationMenuData();
|
|
2566
|
+
return /* @__PURE__ */ jsx38(
|
|
2493
2567
|
"div",
|
|
2494
2568
|
{
|
|
2495
2569
|
className: `translation ${index_module_default4.menuItem} flex text-sm font-bold items-center px-3 py-2`,
|
|
2496
|
-
children: /* @__PURE__ */
|
|
2570
|
+
children: /* @__PURE__ */ jsx38("div", { children: /* @__PURE__ */ jsx38(NavMenuGroup, __spreadValues({}, translationMenuData)) })
|
|
2497
2571
|
}
|
|
2498
2572
|
);
|
|
2499
|
-
}
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
// src/theme-default/components/Nav/NavVersions.tsx
|
|
2576
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2577
|
+
function NavVersions() {
|
|
2578
|
+
const versionsMenuData = useVersionMenuData();
|
|
2579
|
+
return /* @__PURE__ */ jsx39(
|
|
2580
|
+
"div",
|
|
2581
|
+
{
|
|
2582
|
+
className: `translation ${index_module_default4.menuItem} flex text-sm font-bold items-center px-3 py-2`,
|
|
2583
|
+
children: /* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsx39(NavMenuGroup, __spreadValues({}, versionsMenuData)) })
|
|
2584
|
+
}
|
|
2585
|
+
);
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
// src/theme-default/components/Nav/index.tsx
|
|
2589
|
+
import { usePageData as usePageData13 } from "@/runtime";
|
|
2590
|
+
import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2591
|
+
var DEFAULT_NAV_POSTION = "right";
|
|
2500
2592
|
function Nav2(props) {
|
|
2501
|
-
var _a
|
|
2593
|
+
var _a;
|
|
2502
2594
|
const { beforeNavTitle, afterNavTitle, beforeNav } = props;
|
|
2503
|
-
const { siteData: siteData2
|
|
2595
|
+
const { siteData: siteData2 } = usePageData13();
|
|
2504
2596
|
const { base } = siteData2;
|
|
2505
|
-
const { pathname } =
|
|
2597
|
+
const { pathname } = useLocation9();
|
|
2506
2598
|
const localeData = useLocaleSiteData();
|
|
2507
|
-
const currentVersion = useVersion3();
|
|
2508
2599
|
const [isMobile, setIsMobile] = useState12(false);
|
|
2509
2600
|
const hiddenNav = useHiddenNav();
|
|
2510
|
-
const localeLanguages = Object.values(
|
|
2601
|
+
const localeLanguages = Object.values(
|
|
2602
|
+
siteData2.locales || siteData2.themeConfig.locales || {}
|
|
2603
|
+
);
|
|
2511
2604
|
const hasMultiLanguage = localeLanguages.length > 1;
|
|
2605
|
+
const hasMutilVersion = siteData2.multiVersion.versions.length > 1;
|
|
2512
2606
|
const socialLinks = siteData2.themeConfig.socialLinks || [];
|
|
2513
2607
|
const hasSocialLinks = socialLinks.length > 0;
|
|
2514
|
-
const defaultLang = siteData2.lang || "";
|
|
2515
|
-
const defaultVersion = siteData2.multiVersion.default || "";
|
|
2516
|
-
const { lang } = page;
|
|
2517
2608
|
const langs = localeLanguages.map((item) => item.lang || "") || [];
|
|
2518
|
-
const translationMenuData = hasMultiLanguage ? {
|
|
2519
|
-
items: localeLanguages.map((item) => ({
|
|
2520
|
-
text: item == null ? void 0 : item.label,
|
|
2521
|
-
link: replaceLang2(
|
|
2522
|
-
pathname,
|
|
2523
|
-
{
|
|
2524
|
-
current: lang,
|
|
2525
|
-
target: item.lang,
|
|
2526
|
-
default: defaultLang
|
|
2527
|
-
},
|
|
2528
|
-
{
|
|
2529
|
-
current: currentVersion,
|
|
2530
|
-
default: defaultVersion
|
|
2531
|
-
},
|
|
2532
|
-
base
|
|
2533
|
-
)
|
|
2534
|
-
})),
|
|
2535
|
-
activeValue: (_a = localeLanguages.find((item) => lang === item.lang)) == null ? void 0 : _a.label
|
|
2536
|
-
} : null;
|
|
2537
2609
|
useEffect13(() => {
|
|
2538
2610
|
setIsMobile(isMobileDevice());
|
|
2539
2611
|
}, []);
|
|
2540
2612
|
const NavMenu = ({ menuItems: menuItems2 }) => {
|
|
2541
|
-
return /* @__PURE__ */
|
|
2542
|
-
return "items" in item || Array.isArray(item) ? /* @__PURE__ */
|
|
2613
|
+
return /* @__PURE__ */ jsx40("div", { className: "rspress-nav-menu menu h-14", children: menuItems2.map((item) => {
|
|
2614
|
+
return "items" in item || Array.isArray(item) ? /* @__PURE__ */ jsx40("div", { className: "mx-3 last:mr-0", children: /* @__PURE__ */ jsx40(
|
|
2543
2615
|
NavMenuGroup,
|
|
2544
2616
|
__spreadProps(__spreadValues({}, item), {
|
|
2545
2617
|
base,
|
|
@@ -2547,7 +2619,7 @@ function Nav2(props) {
|
|
|
2547
2619
|
langs,
|
|
2548
2620
|
items: "items" in item ? item.items : item
|
|
2549
2621
|
})
|
|
2550
|
-
) }, item.text) : /* @__PURE__ */
|
|
2622
|
+
) }, item.text) : /* @__PURE__ */ jsx40(
|
|
2551
2623
|
NavMenuSingleItem,
|
|
2552
2624
|
__spreadValues({
|
|
2553
2625
|
pathname,
|
|
@@ -2567,25 +2639,26 @@ function Nav2(props) {
|
|
|
2567
2639
|
const rightMenuItems = menuItems.filter(
|
|
2568
2640
|
(item) => getPosition(item) === "right"
|
|
2569
2641
|
);
|
|
2570
|
-
const hasSearch = ((
|
|
2642
|
+
const hasSearch = ((_a = siteData2 == null ? void 0 : siteData2.themeConfig) == null ? void 0 : _a.search) !== false;
|
|
2571
2643
|
const hasAppearanceSwitch = siteData2.themeConfig.darkMode !== false;
|
|
2572
2644
|
const leftNav = () => {
|
|
2573
|
-
return leftMenuItems.length > 0 ? /* @__PURE__ */
|
|
2645
|
+
return leftMenuItems.length > 0 ? /* @__PURE__ */ jsx40("div", { className: index_module_default4.leftNav, children: /* @__PURE__ */ jsx40(NavMenu, { menuItems: leftMenuItems }) }) : null;
|
|
2574
2646
|
};
|
|
2575
2647
|
const rightNav = () => {
|
|
2576
2648
|
return /* @__PURE__ */ jsxs24("div", { className: index_module_default4.rightNav, children: [
|
|
2577
|
-
hasSearch && /* @__PURE__ */
|
|
2578
|
-
/* @__PURE__ */
|
|
2649
|
+
hasSearch && /* @__PURE__ */ jsx40("div", { className: "flex sm:flex-1 items-center sm:pl-4 sm:pr-2", children: /* @__PURE__ */ jsx40(Search, {}) }),
|
|
2650
|
+
/* @__PURE__ */ jsx40(NavMenu, { menuItems: rightMenuItems }),
|
|
2579
2651
|
/* @__PURE__ */ jsxs24("div", { className: "flex-center flex-row", children: [
|
|
2580
|
-
hasMultiLanguage && /* @__PURE__ */
|
|
2581
|
-
|
|
2582
|
-
|
|
2652
|
+
hasMultiLanguage && /* @__PURE__ */ jsx40(NavTranslations, {}),
|
|
2653
|
+
hasMutilVersion && /* @__PURE__ */ jsx40(NavVersions, {}),
|
|
2654
|
+
hasAppearanceSwitch && /* @__PURE__ */ jsx40("div", { className: "mx-2", children: /* @__PURE__ */ jsx40(SwitchAppearance, {}) }),
|
|
2655
|
+
hasSocialLinks && /* @__PURE__ */ jsx40(SocialLinks, { socialLinks })
|
|
2583
2656
|
] })
|
|
2584
2657
|
] });
|
|
2585
2658
|
};
|
|
2586
2659
|
return /* @__PURE__ */ jsxs24(Fragment6, { children: [
|
|
2587
2660
|
beforeNav,
|
|
2588
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ jsx40(
|
|
2589
2662
|
"div",
|
|
2590
2663
|
{
|
|
2591
2664
|
className: `${index_module_default4.navContainer} sticky rspress-nav px-6 ${hiddenNav ? index_module_default4.hidden : ""}`,
|
|
@@ -2595,7 +2668,7 @@ function Nav2(props) {
|
|
|
2595
2668
|
className: `${index_module_default4.container} flex justify-between items-center h-full`,
|
|
2596
2669
|
children: [
|
|
2597
2670
|
beforeNavTitle,
|
|
2598
|
-
/* @__PURE__ */
|
|
2671
|
+
/* @__PURE__ */ jsx40(NavBarTitle, {}),
|
|
2599
2672
|
afterNavTitle,
|
|
2600
2673
|
/* @__PURE__ */ jsxs24(
|
|
2601
2674
|
"div",
|
|
@@ -2605,8 +2678,8 @@ function Nav2(props) {
|
|
|
2605
2678
|
leftNav(),
|
|
2606
2679
|
rightNav(),
|
|
2607
2680
|
/* @__PURE__ */ jsxs24("div", { className: index_module_default4.mobileNavMenu, children: [
|
|
2608
|
-
isMobile && /* @__PURE__ */
|
|
2609
|
-
/* @__PURE__ */
|
|
2681
|
+
isMobile && /* @__PURE__ */ jsx40(Search, {}),
|
|
2682
|
+
/* @__PURE__ */ jsx40(
|
|
2610
2683
|
NavHamburger,
|
|
2611
2684
|
{
|
|
2612
2685
|
localeData,
|
|
@@ -2627,16 +2700,16 @@ function Nav2(props) {
|
|
|
2627
2700
|
}
|
|
2628
2701
|
|
|
2629
2702
|
// src/theme-default/components/Search/index.tsx
|
|
2630
|
-
import { useState as useState15 } from "react";
|
|
2703
|
+
import { useEffect as useEffect15, useState as useState15 } from "react";
|
|
2631
2704
|
|
|
2632
2705
|
// src/theme-default/components/Search/assets/search.svg
|
|
2633
2706
|
import * as React13 from "react";
|
|
2634
|
-
import { jsx as
|
|
2635
|
-
var SvgSearch = (props) => /* @__PURE__ */
|
|
2707
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2708
|
+
var SvgSearch = (props) => /* @__PURE__ */ jsx41("svg", __spreadProps(__spreadValues({ width: 24, height: 24, viewBox: "0 0 32 32" }, props), { children: /* @__PURE__ */ jsx41("path", { fill: "var(--rp-c-gray)", d: "m29 27.586-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29ZM4 13a9 9 0 1 1 9 9 9.01 9.01 0 0 1-9-9Z" }) }));
|
|
2636
2709
|
var search_default = SvgSearch;
|
|
2637
2710
|
|
|
2638
2711
|
// src/theme-default/components/Search/index.module.scss
|
|
2639
|
-
var
|
|
2712
|
+
var index_module_default14 = { "mask": "mask_b68d7", "modal": "modal_b68d7", "inputForm": "inputForm_b68d7", "input": "input_b68d7", "close": "close_b68d7", "searchHits": "searchHits_b68d7", "groupTitle": "groupTitle_b68d7", "navSearchButton": "navSearchButton_b68d7", "searchWord": "searchWord_b68d7", "suggestItem": "suggestItem_b68d7", "suggestItemContainer": "suggestItemContainer_b68d7", "contentWrapper": "contentWrapper_b68d7", "mark": "mark_b68d7", "titleForContent": "titleForContent_b68d7", "actionIcon": "actionIcon_b68d7", "current": "current_b68d7", "tabClassName": "tabClassName_b68d7", "mobileNavSearchButton": "mobileNavSearchButton_b68d7" };
|
|
2640
2713
|
|
|
2641
2714
|
// src/theme-default/components/Search/SearchPanel.tsx
|
|
2642
2715
|
import { createPortal } from "react-dom";
|
|
@@ -2651,10 +2724,10 @@ import {
|
|
|
2651
2724
|
} from "react";
|
|
2652
2725
|
|
|
2653
2726
|
// src/theme-default/components/Tabs/index.module.scss
|
|
2654
|
-
var
|
|
2727
|
+
var index_module_default15 = { "container": "container_196a2", "tab-list": "tab-list_196a2", "tabList": "tab-list_196a2", "tab": "tab_196a2", "not-selected": "not-selected_196a2", "notSelected": "not-selected_196a2", "selected": "selected_196a2" };
|
|
2655
2728
|
|
|
2656
2729
|
// src/theme-default/components/Tabs/index.tsx
|
|
2657
|
-
import { jsx as
|
|
2730
|
+
import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2658
2731
|
function isTabItem(item) {
|
|
2659
2732
|
if (item && typeof item === "object" && "label" in item) {
|
|
2660
2733
|
return true;
|
|
@@ -2703,19 +2776,19 @@ function Tabs(props) {
|
|
|
2703
2776
|
});
|
|
2704
2777
|
}
|
|
2705
2778
|
const [activeIndex, setActiveIndex] = useState13(defaultIndex);
|
|
2706
|
-
return /* @__PURE__ */ jsxs25("div", { className:
|
|
2707
|
-
/* @__PURE__ */
|
|
2779
|
+
return /* @__PURE__ */ jsxs25("div", { className: index_module_default15.container, children: [
|
|
2780
|
+
/* @__PURE__ */ jsx42("div", { className: tabContainerClassName, children: tabValues.length ? /* @__PURE__ */ jsx42(
|
|
2708
2781
|
"div",
|
|
2709
2782
|
{
|
|
2710
|
-
className:
|
|
2783
|
+
className: index_module_default15.tabList,
|
|
2711
2784
|
style: {
|
|
2712
2785
|
justifyContent: tabPosition === "center" ? "center" : "flex-start"
|
|
2713
2786
|
},
|
|
2714
2787
|
children: tabValues.map((item, index) => {
|
|
2715
|
-
return /* @__PURE__ */
|
|
2788
|
+
return /* @__PURE__ */ jsx42(
|
|
2716
2789
|
"div",
|
|
2717
2790
|
{
|
|
2718
|
-
className: `${
|
|
2791
|
+
className: `${index_module_default15.tab} ${activeIndex === index ? index_module_default15.selected : index_module_default15.notSelected}`,
|
|
2719
2792
|
onClick: () => {
|
|
2720
2793
|
onChange == null ? void 0 : onChange(index);
|
|
2721
2794
|
setActiveIndex(index);
|
|
@@ -2730,7 +2803,7 @@ function Tabs(props) {
|
|
|
2730
2803
|
})
|
|
2731
2804
|
}
|
|
2732
2805
|
) : null }),
|
|
2733
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ jsx42("div", { children: children[activeIndex] })
|
|
2734
2807
|
] });
|
|
2735
2808
|
}
|
|
2736
2809
|
function Tab(_a) {
|
|
@@ -2739,25 +2812,25 @@ function Tab(_a) {
|
|
|
2739
2812
|
} = _b, props = __objRest(_b, [
|
|
2740
2813
|
"children"
|
|
2741
2814
|
]);
|
|
2742
|
-
return /* @__PURE__ */
|
|
2815
|
+
return /* @__PURE__ */ jsx42("div", __spreadProps(__spreadValues({}, props), { className: "rounded px-2", children }));
|
|
2743
2816
|
}
|
|
2744
2817
|
|
|
2745
2818
|
// src/theme-default/components/Search/assets/loading.svg
|
|
2746
2819
|
import * as React14 from "react";
|
|
2747
|
-
import { jsx as
|
|
2748
|
-
var SvgLoading = (props) => /* @__PURE__ */
|
|
2749
|
-
/* @__PURE__ */
|
|
2820
|
+
import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2821
|
+
var SvgLoading = (props) => /* @__PURE__ */ jsx43("svg", __spreadProps(__spreadValues({ width: 32, height: 32, viewBox: "0 0 24 24" }, props), { children: /* @__PURE__ */ jsxs26("g", { fill: "none", stroke: "var(--rp-c-brand)", strokeLinecap: "round", strokeWidth: 2, children: [
|
|
2822
|
+
/* @__PURE__ */ jsx43("path", { strokeDasharray: 60, strokeDashoffset: 60, strokeOpacity: 0.3, d: "M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18Z", children: /* @__PURE__ */ jsx43("animate", { fill: "freeze", attributeName: "stroke-dashoffset", dur: "1.3s", values: "60;0" }) }),
|
|
2750
2823
|
/* @__PURE__ */ jsxs26("path", { strokeDasharray: 15, strokeDashoffset: 15, d: "M12 3a9 9 0 0 1 9 9", children: [
|
|
2751
|
-
/* @__PURE__ */
|
|
2752
|
-
/* @__PURE__ */
|
|
2824
|
+
/* @__PURE__ */ jsx43("animate", { fill: "freeze", attributeName: "stroke-dashoffset", dur: "0.3s", values: "15;0" }),
|
|
2825
|
+
/* @__PURE__ */ jsx43("animateTransform", { attributeName: "transform", dur: "1.5s", repeatCount: "indefinite", type: "rotate", values: "0 12 12;360 12 12" })
|
|
2753
2826
|
] })
|
|
2754
2827
|
] }) }));
|
|
2755
2828
|
var loading_default = SvgLoading;
|
|
2756
2829
|
|
|
2757
2830
|
// src/theme-default/components/Search/assets/close.svg
|
|
2758
2831
|
import * as React15 from "react";
|
|
2759
|
-
import { jsx as
|
|
2760
|
-
var SvgClose = (props) => /* @__PURE__ */
|
|
2832
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2833
|
+
var SvgClose = (props) => /* @__PURE__ */ jsx44("svg", __spreadProps(__spreadValues({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 32 32" }, props), { children: /* @__PURE__ */ jsx44("path", { fill: "currentColor", d: "M24 9.4 22.6 8 16 14.6 9.4 8 8 9.4l6.6 6.6L8 22.6 9.4 24l6.6-6.6 6.6 6.6 1.4-1.4-6.6-6.6L24 9.4z" }) }));
|
|
2761
2834
|
var close_default = SvgClose;
|
|
2762
2835
|
|
|
2763
2836
|
// src/theme-default/components/Search/logic/Provider.ts
|
|
@@ -3214,36 +3287,36 @@ isCurrentIndex_fn = function(index) {
|
|
|
3214
3287
|
|
|
3215
3288
|
// src/theme-default/components/Search/assets/file.svg
|
|
3216
3289
|
import * as React16 from "react";
|
|
3217
|
-
import { jsx as
|
|
3290
|
+
import { jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3218
3291
|
var SvgFile = (props) => /* @__PURE__ */ jsxs27("svg", __spreadProps(__spreadValues({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 32 32" }, props), { children: [
|
|
3219
|
-
/* @__PURE__ */
|
|
3220
|
-
/* @__PURE__ */
|
|
3221
|
-
/* @__PURE__ */
|
|
3222
|
-
/* @__PURE__ */
|
|
3292
|
+
/* @__PURE__ */ jsx45("circle", { cx: 22, cy: 24, r: 2, fill: "currentColor" }),
|
|
3293
|
+
/* @__PURE__ */ jsx45("path", { fill: "none", d: "M22 28a4 4 0 1 1 4-4 4.004 4.004 0 0 1-4 4Zm0-6a2 2 0 1 0 2 2 2.003 2.003 0 0 0-2-2Z" }),
|
|
3294
|
+
/* @__PURE__ */ jsx45("path", { fill: "currentColor", d: "M29.777 23.479A8.64 8.64 0 0 0 22 18a8.64 8.64 0 0 0-7.777 5.479L14 24l.223.521A8.64 8.64 0 0 0 22 30a8.64 8.64 0 0 0 7.777-5.479L30 24ZM22 28a4 4 0 1 1 4-4 4.005 4.005 0 0 1-4 4Z" }),
|
|
3295
|
+
/* @__PURE__ */ jsx45("path", { fill: "currentColor", d: "M12 28H8V4h8v6a2.006 2.006 0 0 0 2 2h6v4h2v-6a.91.91 0 0 0-.3-.7l-7-7A.909.909 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v24a2.006 2.006 0 0 0 2 2h4Zm6-23.6 5.6 5.6H18Z" })
|
|
3223
3296
|
] }));
|
|
3224
3297
|
var file_default = SvgFile;
|
|
3225
3298
|
|
|
3226
3299
|
// src/theme-default/components/Search/assets/jump.svg
|
|
3227
3300
|
import * as React17 from "react";
|
|
3228
|
-
import { jsx as
|
|
3229
|
-
var SvgJump = (props) => /* @__PURE__ */
|
|
3301
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3302
|
+
var SvgJump = (props) => /* @__PURE__ */ jsx46("svg", __spreadProps(__spreadValues({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 32 32" }, props), { children: /* @__PURE__ */ jsx46("path", { fill: "currentColor", d: "M13.414 17.586 18 22.172V8H8V6h10a2.002 2.002 0 0 1 2 2v14.172l4.586-4.586L26 19l-7 7-7-7Z" }) }));
|
|
3230
3303
|
var jump_default = SvgJump;
|
|
3231
3304
|
|
|
3232
3305
|
// src/theme-default/components/Search/assets/header.svg
|
|
3233
3306
|
import * as React18 from "react";
|
|
3234
|
-
import { jsx as
|
|
3235
|
-
var SvgHeader = (props) => /* @__PURE__ */
|
|
3307
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
3308
|
+
var SvgHeader = (props) => /* @__PURE__ */ jsx47("svg", __spreadProps(__spreadValues({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 32 32" }, props), { children: /* @__PURE__ */ jsx47("path", { fill: "currentColor", d: "M28 12v-2h-6V4h-2v6h-8V4h-2v6H4v2h6v8H4v2h6v6h2v-6h8v6h2v-6h6v-2h-6v-8Zm-8 8h-8v-8h8Z" }) }));
|
|
3236
3309
|
var header_default = SvgHeader;
|
|
3237
3310
|
|
|
3238
3311
|
// src/theme-default/components/Search/assets/title.svg
|
|
3239
3312
|
import * as React19 from "react";
|
|
3240
|
-
import { jsx as
|
|
3241
|
-
var SvgTitle = (props) => /* @__PURE__ */
|
|
3313
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
3314
|
+
var SvgTitle = (props) => /* @__PURE__ */ jsx48("svg", __spreadProps(__spreadValues({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, props), { children: /* @__PURE__ */ jsx48("path", { fill: "currentColor", d: "M4 4a2 2 0 0 1 2-2h8a1 1 0 0 1 .707.293l5 5A1 1 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4zm13.586 4L14 4.414V8h3.586zM12 4H6v16h12V10h-5a1 1 0 0 1-1-1V4z" }) }));
|
|
3242
3315
|
var title_default = SvgTitle;
|
|
3243
3316
|
|
|
3244
3317
|
// src/theme-default/components/Search/SuggestItem.tsx
|
|
3245
3318
|
import { isProduction } from "@/runtime";
|
|
3246
|
-
import { Fragment as Fragment7, jsx as
|
|
3319
|
+
import { Fragment as Fragment7, jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3247
3320
|
var ICON_MAP = {
|
|
3248
3321
|
title: title_default,
|
|
3249
3322
|
header: header_default,
|
|
@@ -3267,7 +3340,7 @@ function SuggestItem({
|
|
|
3267
3340
|
const queryStr = getSlicedStrByByteLength(rawText, start, length);
|
|
3268
3341
|
framegmentList.push(prefix);
|
|
3269
3342
|
framegmentList.push(
|
|
3270
|
-
/* @__PURE__ */
|
|
3343
|
+
/* @__PURE__ */ jsx49("span", { className: index_module_default14.mark, children: queryStr }, start)
|
|
3271
3344
|
);
|
|
3272
3345
|
lastIndex = start + queryStr.length;
|
|
3273
3346
|
}
|
|
@@ -3279,17 +3352,17 @@ function SuggestItem({
|
|
|
3279
3352
|
const renderHeaderMatch = () => {
|
|
3280
3353
|
if (suggestion.type === "header" || suggestion.type === "title") {
|
|
3281
3354
|
const { header, highlightInfoList } = suggestion;
|
|
3282
|
-
return /* @__PURE__ */
|
|
3355
|
+
return /* @__PURE__ */ jsx49("div", { className: "font-medium", children: getHighlightedFragments(header, highlightInfoList) });
|
|
3283
3356
|
} else {
|
|
3284
|
-
return /* @__PURE__ */
|
|
3357
|
+
return /* @__PURE__ */ jsx49("div", { className: "font-medium", children: suggestion.header });
|
|
3285
3358
|
}
|
|
3286
3359
|
};
|
|
3287
3360
|
const renderStatementMatch = () => {
|
|
3288
3361
|
if (suggestion.type !== "content") {
|
|
3289
|
-
return /* @__PURE__ */
|
|
3362
|
+
return /* @__PURE__ */ jsx49("div", {});
|
|
3290
3363
|
}
|
|
3291
3364
|
const { statement, highlightInfoList } = suggestion;
|
|
3292
|
-
return /* @__PURE__ */
|
|
3365
|
+
return /* @__PURE__ */ jsx49("div", { className: "text-sm text-gray-light w-full", children: getHighlightedFragments(statement, highlightInfoList) });
|
|
3293
3366
|
};
|
|
3294
3367
|
let hitContent = null;
|
|
3295
3368
|
switch (suggestion.type) {
|
|
@@ -3300,18 +3373,18 @@ function SuggestItem({
|
|
|
3300
3373
|
case "content":
|
|
3301
3374
|
hitContent = /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
3302
3375
|
renderStatementMatch(),
|
|
3303
|
-
/* @__PURE__ */
|
|
3376
|
+
/* @__PURE__ */ jsx49("p", { className: index_module_default14.titleForContent, children: suggestion.title })
|
|
3304
3377
|
] });
|
|
3305
3378
|
break;
|
|
3306
3379
|
default:
|
|
3307
3380
|
break;
|
|
3308
3381
|
}
|
|
3309
|
-
return /* @__PURE__ */
|
|
3382
|
+
return /* @__PURE__ */ jsx49(
|
|
3310
3383
|
"li",
|
|
3311
3384
|
{
|
|
3312
|
-
className: `${
|
|
3385
|
+
className: `${index_module_default14.suggestItem} ${isCurrent ? index_module_default14.current : ""}`,
|
|
3313
3386
|
onMouseEnter: setCurrentSuggestionIndex,
|
|
3314
|
-
children: /* @__PURE__ */
|
|
3387
|
+
children: /* @__PURE__ */ jsx49(
|
|
3315
3388
|
"a",
|
|
3316
3389
|
{
|
|
3317
3390
|
href: link,
|
|
@@ -3320,10 +3393,10 @@ function SuggestItem({
|
|
|
3320
3393
|
e.stopPropagation();
|
|
3321
3394
|
},
|
|
3322
3395
|
target: inCurrentDocIndex ? "_self" : "_blank",
|
|
3323
|
-
children: /* @__PURE__ */ jsxs28("div", { className:
|
|
3324
|
-
/* @__PURE__ */
|
|
3325
|
-
/* @__PURE__ */
|
|
3326
|
-
/* @__PURE__ */
|
|
3396
|
+
children: /* @__PURE__ */ jsxs28("div", { className: index_module_default14.suggestItemContainer, children: [
|
|
3397
|
+
/* @__PURE__ */ jsx49("div", { className: index_module_default14.hitIcon, children: /* @__PURE__ */ jsx49(HitIcon, {}) }),
|
|
3398
|
+
/* @__PURE__ */ jsx49("div", { className: index_module_default14.contentWrapper, children: /* @__PURE__ */ jsx49("span", { children: hitContent }) }),
|
|
3399
|
+
/* @__PURE__ */ jsx49("div", { className: index_module_default14.actionIcon, children: /* @__PURE__ */ jsx49(jump_default, {}) })
|
|
3327
3400
|
] })
|
|
3328
3401
|
}
|
|
3329
3402
|
)
|
|
@@ -3334,18 +3407,18 @@ function SuggestItem({
|
|
|
3334
3407
|
|
|
3335
3408
|
// src/theme-default/components/Search/empty.svg
|
|
3336
3409
|
import * as React20 from "react";
|
|
3337
|
-
import { jsx as
|
|
3410
|
+
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3338
3411
|
var SvgEmpty = (props) => /* @__PURE__ */ jsxs29("svg", __spreadProps(__spreadValues({ xmlns: "http://www.w3.org/2000/svg", width: 48, height: 48, fill: "none" }, props), { children: [
|
|
3339
|
-
/* @__PURE__ */
|
|
3340
|
-
/* @__PURE__ */
|
|
3412
|
+
/* @__PURE__ */ jsx50("path", { stroke: "currentColor", strokeWidth: 4, d: "M24 5v6m7 1 4-4m-18 4-4-4m27 33H8a2 2 0 0 1-2-2v-8.46a2 2 0 0 1 .272-1.007l6.15-10.54A2 2 0 0 1 14.148 18H33.85a2 2 0 0 1 1.728.992l6.149 10.541A2 2 0 0 1 42 30.541V39a2 2 0 0 1-2 2Z" }),
|
|
3413
|
+
/* @__PURE__ */ jsx50("path", { stroke: "currentColor", strokeWidth: 4, d: "M41.5 30H28s-1 3-4 3-4-3-4-3H6.5" })
|
|
3341
3414
|
] }));
|
|
3342
3415
|
var empty_default = SvgEmpty;
|
|
3343
3416
|
|
|
3344
3417
|
// src/theme-default/components/Search/NoSearchResult.tsx
|
|
3345
|
-
import { jsx as
|
|
3418
|
+
import { jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3346
3419
|
function NoSearchResult({ query: query2 }) {
|
|
3347
3420
|
return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col items-center pt-8 pb-2", children: [
|
|
3348
|
-
/* @__PURE__ */
|
|
3421
|
+
/* @__PURE__ */ jsx51(empty_default, { className: "mb-4 opacity-80" }),
|
|
3349
3422
|
/* @__PURE__ */ jsxs30("p", { className: "mb-2", children: [
|
|
3350
3423
|
"No results for ",
|
|
3351
3424
|
/* @__PURE__ */ jsxs30("b", { children: [
|
|
@@ -3355,13 +3428,13 @@ function NoSearchResult({ query: query2 }) {
|
|
|
3355
3428
|
] }),
|
|
3356
3429
|
"."
|
|
3357
3430
|
] }),
|
|
3358
|
-
/* @__PURE__ */
|
|
3431
|
+
/* @__PURE__ */ jsx51("p", { children: "Please try again with a different keyword." })
|
|
3359
3432
|
] });
|
|
3360
3433
|
}
|
|
3361
3434
|
|
|
3362
3435
|
// src/theme-default/components/Search/SearchPanel.tsx
|
|
3363
|
-
import { isProduction as isProduction2, usePageData as
|
|
3364
|
-
import { Fragment as Fragment8, jsx as
|
|
3436
|
+
import { isProduction as isProduction2, usePageData as usePageData14 } from "@/runtime";
|
|
3437
|
+
import { Fragment as Fragment8, jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3365
3438
|
var KEY_CODE = {
|
|
3366
3439
|
ARROW_UP: "ArrowUp",
|
|
3367
3440
|
ARROW_DOWN: "ArrowDown",
|
|
@@ -3386,7 +3459,7 @@ function SearchPanel({ focused, setFocused }) {
|
|
|
3386
3459
|
const {
|
|
3387
3460
|
siteData: siteData2,
|
|
3388
3461
|
page: { lang }
|
|
3389
|
-
} =
|
|
3462
|
+
} = usePageData14();
|
|
3390
3463
|
const { sidebar } = useLocaleSiteData();
|
|
3391
3464
|
const { search } = siteData2;
|
|
3392
3465
|
const suggestions = [
|
|
@@ -3493,7 +3566,7 @@ function SearchPanel({ focused, setFocused }) {
|
|
|
3493
3566
|
let accumulateIndex = -1;
|
|
3494
3567
|
const renderSearchResult = (result, searchOptions) => {
|
|
3495
3568
|
if (!suggestions.length && !initing) {
|
|
3496
|
-
return /* @__PURE__ */
|
|
3569
|
+
return /* @__PURE__ */ jsx52(NoSearchResult, { query: query2 });
|
|
3497
3570
|
}
|
|
3498
3571
|
const hasOtherResult = searchResult.others.map((item) => item.items).flat().length > 0;
|
|
3499
3572
|
const tabValues = result.others.map((item) => {
|
|
@@ -3507,13 +3580,13 @@ function SearchPanel({ focused, setFocused }) {
|
|
|
3507
3580
|
});
|
|
3508
3581
|
return /* @__PURE__ */ jsxs31("div", { children: [
|
|
3509
3582
|
renderSearchResultItem(result.current),
|
|
3510
|
-
hasOtherResult && /* @__PURE__ */
|
|
3511
|
-
/* @__PURE__ */
|
|
3583
|
+
hasOtherResult && /* @__PURE__ */ jsx52("h2", { className: index_module_default14.groupTitle, children: RECOMMEND_WORD[lang] }),
|
|
3584
|
+
/* @__PURE__ */ jsx52("div", { style: { marginTop: "-12px" }, children: /* @__PURE__ */ jsx52(Tabs, { values: tabValues, tabContainerClassName: index_module_default14.tabClassName, children: result.others.map((item) => /* @__PURE__ */ jsx52(Tab, { children: renderSearchResultItem(item.items, false) }, item.index)) }) })
|
|
3512
3585
|
] });
|
|
3513
3586
|
};
|
|
3514
3587
|
const renderSearchResultItem = (suggestionList, isCurrent = true) => {
|
|
3515
3588
|
if (suggestionList.length === 0 && !initing) {
|
|
3516
|
-
return /* @__PURE__ */
|
|
3589
|
+
return /* @__PURE__ */ jsx52("div", { className: "mt-4 flex-center", children: /* @__PURE__ */ jsx52(
|
|
3517
3590
|
"div",
|
|
3518
3591
|
{
|
|
3519
3592
|
className: "p-2 font-bold text-md",
|
|
@@ -3525,14 +3598,14 @@ function SearchPanel({ focused, setFocused }) {
|
|
|
3525
3598
|
) });
|
|
3526
3599
|
}
|
|
3527
3600
|
const normalizedSuggestions = normalizeSuggestions(suggestionList);
|
|
3528
|
-
return /* @__PURE__ */
|
|
3601
|
+
return /* @__PURE__ */ jsx52("ul", { className: index_module_default14.suggestList, children: Object.keys(normalizedSuggestions).map((group) => {
|
|
3529
3602
|
const groupSuggestions = normalizedSuggestions[group] || [];
|
|
3530
3603
|
return /* @__PURE__ */ jsxs31("li", { children: [
|
|
3531
|
-
isCurrent && /* @__PURE__ */
|
|
3532
|
-
/* @__PURE__ */
|
|
3604
|
+
isCurrent && /* @__PURE__ */ jsx52("h2", { className: index_module_default14.groupTitle, children: group }),
|
|
3605
|
+
/* @__PURE__ */ jsx52("ul", { className: "pb-2", children: groupSuggestions.map((suggestion) => {
|
|
3533
3606
|
accumulateIndex++;
|
|
3534
3607
|
const suggestionIndex = accumulateIndex;
|
|
3535
|
-
return /* @__PURE__ */
|
|
3608
|
+
return /* @__PURE__ */ jsx52(
|
|
3536
3609
|
SuggestItem,
|
|
3537
3610
|
{
|
|
3538
3611
|
suggestion,
|
|
@@ -3549,23 +3622,23 @@ function SearchPanel({ focused, setFocused }) {
|
|
|
3549
3622
|
] }, group);
|
|
3550
3623
|
}) });
|
|
3551
3624
|
};
|
|
3552
|
-
return /* @__PURE__ */
|
|
3553
|
-
/* @__PURE__ */
|
|
3625
|
+
return /* @__PURE__ */ jsx52(Fragment8, { children: focused && createPortal(
|
|
3626
|
+
/* @__PURE__ */ jsx52("div", { className: index_module_default14.mask, onClick: () => setFocused(false), children: /* @__PURE__ */ jsxs31(
|
|
3554
3627
|
"div",
|
|
3555
3628
|
{
|
|
3556
|
-
className: `${
|
|
3629
|
+
className: `${index_module_default14.modal}`,
|
|
3557
3630
|
onClick: (e) => {
|
|
3558
3631
|
setFocused(true);
|
|
3559
3632
|
e.stopPropagation();
|
|
3560
3633
|
},
|
|
3561
3634
|
children: [
|
|
3562
3635
|
/* @__PURE__ */ jsxs31("div", { className: "flex items-center", children: [
|
|
3563
|
-
/* @__PURE__ */ jsxs31("div", { className:
|
|
3564
|
-
/* @__PURE__ */
|
|
3565
|
-
/* @__PURE__ */
|
|
3636
|
+
/* @__PURE__ */ jsxs31("div", { className: index_module_default14.inputForm, children: [
|
|
3637
|
+
/* @__PURE__ */ jsx52("label", { children: /* @__PURE__ */ jsx52(search_default, {}) }),
|
|
3638
|
+
/* @__PURE__ */ jsx52(
|
|
3566
3639
|
"input",
|
|
3567
3640
|
{
|
|
3568
|
-
className:
|
|
3641
|
+
className: index_module_default14.input,
|
|
3569
3642
|
ref: searchInputRef,
|
|
3570
3643
|
placeholder: "Search Docs",
|
|
3571
3644
|
"aria-label": "Search",
|
|
@@ -3574,10 +3647,10 @@ function SearchPanel({ focused, setFocused }) {
|
|
|
3574
3647
|
onChange: debounce(onQueryChanged, 150)
|
|
3575
3648
|
}
|
|
3576
3649
|
),
|
|
3577
|
-
/* @__PURE__ */
|
|
3650
|
+
/* @__PURE__ */ jsx52("label", { children: /* @__PURE__ */ jsx52(
|
|
3578
3651
|
close_default,
|
|
3579
3652
|
{
|
|
3580
|
-
className:
|
|
3653
|
+
className: index_module_default14.close,
|
|
3581
3654
|
onClick: (e) => {
|
|
3582
3655
|
if (searchInputRef.current) {
|
|
3583
3656
|
e.stopPropagation();
|
|
@@ -3592,7 +3665,7 @@ function SearchPanel({ focused, setFocused }) {
|
|
|
3592
3665
|
}
|
|
3593
3666
|
) })
|
|
3594
3667
|
] }),
|
|
3595
|
-
/* @__PURE__ */
|
|
3668
|
+
/* @__PURE__ */ jsx52(
|
|
3596
3669
|
"h2",
|
|
3597
3670
|
{
|
|
3598
3671
|
className: "text-brand ml-2 sm:hidden cursor-pointer",
|
|
@@ -3604,8 +3677,8 @@ function SearchPanel({ focused, setFocused }) {
|
|
|
3604
3677
|
}
|
|
3605
3678
|
)
|
|
3606
3679
|
] }),
|
|
3607
|
-
query2 ? /* @__PURE__ */
|
|
3608
|
-
initing && /* @__PURE__ */
|
|
3680
|
+
query2 ? /* @__PURE__ */ jsx52("div", { className: `${index_module_default14.searchHits} rspress-scrollbar`, children: renderSearchResult(searchResult, search) }) : null,
|
|
3681
|
+
initing && /* @__PURE__ */ jsx52("div", { className: "flex-center", children: /* @__PURE__ */ jsx52("div", { className: "p-2 text-sm", children: /* @__PURE__ */ jsx52(loading_default, {}) }) })
|
|
3609
3682
|
]
|
|
3610
3683
|
}
|
|
3611
3684
|
) }),
|
|
@@ -3614,44 +3687,50 @@ function SearchPanel({ focused, setFocused }) {
|
|
|
3614
3687
|
}
|
|
3615
3688
|
|
|
3616
3689
|
// src/theme-default/components/Search/index.tsx
|
|
3617
|
-
import { Fragment as Fragment9, jsx as
|
|
3690
|
+
import { Fragment as Fragment9, jsx as jsx53, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3618
3691
|
function Search2() {
|
|
3619
3692
|
const [focused, setFocused] = useState15(false);
|
|
3693
|
+
const [metaKey, setMetaKey] = useState15(null);
|
|
3694
|
+
useEffect15(() => {
|
|
3695
|
+
setMetaKey(
|
|
3696
|
+
/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl"
|
|
3697
|
+
);
|
|
3698
|
+
}, []);
|
|
3620
3699
|
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
3621
|
-
/* @__PURE__ */
|
|
3622
|
-
/* @__PURE__ */
|
|
3623
|
-
/* @__PURE__ */
|
|
3624
|
-
/* @__PURE__ */ jsxs32("div", { children: [
|
|
3625
|
-
/* @__PURE__ */
|
|
3626
|
-
/* @__PURE__ */
|
|
3700
|
+
/* @__PURE__ */ jsx53("div", { className: index_module_default14.navSearchButton, onClick: () => setFocused(true), children: /* @__PURE__ */ jsxs32("button", { children: [
|
|
3701
|
+
/* @__PURE__ */ jsx53(search_default, { width: "18", hight: "18" }),
|
|
3702
|
+
/* @__PURE__ */ jsx53("p", { className: index_module_default14.searchWord, children: "Search Docs" }),
|
|
3703
|
+
/* @__PURE__ */ jsxs32("div", { style: { opacity: metaKey ? 1 : 0 }, children: [
|
|
3704
|
+
/* @__PURE__ */ jsx53("span", { children: metaKey }),
|
|
3705
|
+
/* @__PURE__ */ jsx53("span", { children: "K" })
|
|
3627
3706
|
] })
|
|
3628
3707
|
] }) }),
|
|
3629
|
-
/* @__PURE__ */
|
|
3708
|
+
/* @__PURE__ */ jsx53(
|
|
3630
3709
|
"div",
|
|
3631
3710
|
{
|
|
3632
|
-
className:
|
|
3711
|
+
className: index_module_default14.mobileNavSearchButton,
|
|
3633
3712
|
onClick: () => setFocused(true),
|
|
3634
|
-
children: /* @__PURE__ */
|
|
3713
|
+
children: /* @__PURE__ */ jsx53(search_default, {})
|
|
3635
3714
|
}
|
|
3636
3715
|
),
|
|
3637
|
-
/* @__PURE__ */
|
|
3716
|
+
/* @__PURE__ */ jsx53(SearchPanel, { focused, setFocused })
|
|
3638
3717
|
] });
|
|
3639
3718
|
}
|
|
3640
3719
|
|
|
3641
3720
|
// src/theme-default/components/HomeFooter/index.tsx
|
|
3642
|
-
import { usePageData as
|
|
3643
|
-
import { jsx as
|
|
3721
|
+
import { usePageData as usePageData15 } from "@/runtime";
|
|
3722
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3644
3723
|
function HomeFooter2() {
|
|
3645
|
-
const { siteData: siteData2 } =
|
|
3724
|
+
const { siteData: siteData2 } = usePageData15();
|
|
3646
3725
|
const { message } = siteData2.themeConfig.footer || {};
|
|
3647
|
-
return /* @__PURE__ */
|
|
3726
|
+
return /* @__PURE__ */ jsx54("footer", { className: "absolute bottom-0 mt-12 py-8 px-6 sm:p-8 w-full border-t border-solid border-divider-light", children: /* @__PURE__ */ jsx54("div", { className: "m-auto w-full text-center", children: message && /* @__PURE__ */ jsx54("div", { className: "font-meduim text-sm text-text-2", children: message }) }) });
|
|
3648
3727
|
}
|
|
3649
3728
|
|
|
3650
3729
|
// src/theme-default/components/Toc/index.tsx
|
|
3651
|
-
import { usePageData as
|
|
3652
|
-
import { jsx as
|
|
3730
|
+
import { usePageData as usePageData16 } from "@/runtime";
|
|
3731
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
3653
3732
|
var TocItem = (header) => {
|
|
3654
|
-
return /* @__PURE__ */
|
|
3733
|
+
return /* @__PURE__ */ jsx55("li", { className: "py-1", children: /* @__PURE__ */ jsx55(
|
|
3655
3734
|
"a",
|
|
3656
3735
|
{
|
|
3657
3736
|
href: `#${header.id}`,
|
|
@@ -3667,17 +3746,17 @@ var TocItem = (header) => {
|
|
|
3667
3746
|
scrollToTarget(target, false);
|
|
3668
3747
|
}
|
|
3669
3748
|
},
|
|
3670
|
-
children: /* @__PURE__ */
|
|
3749
|
+
children: /* @__PURE__ */ jsx55("span", { className: "toc-link-text block", children: header.text })
|
|
3671
3750
|
}
|
|
3672
3751
|
) }, header.id);
|
|
3673
3752
|
};
|
|
3674
3753
|
function Toc() {
|
|
3675
|
-
const { page } =
|
|
3676
|
-
return /* @__PURE__ */
|
|
3754
|
+
const { page } = usePageData16();
|
|
3755
|
+
return /* @__PURE__ */ jsx55("ul", { children: page.toc.map((item) => /* @__PURE__ */ jsx55(TocItem, __spreadValues({}, item), item.id)) });
|
|
3677
3756
|
}
|
|
3678
3757
|
|
|
3679
3758
|
// src/theme-default/layout/DocLayout/docComponents/pre.tsx
|
|
3680
|
-
import { jsx as
|
|
3759
|
+
import { jsx as jsx56, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3681
3760
|
var DEFAULT_LANGUAGE_CLASS = "language-bash";
|
|
3682
3761
|
function parseTitleFromMeta(meta) {
|
|
3683
3762
|
var _a, _b;
|
|
@@ -3697,31 +3776,19 @@ function Pre({
|
|
|
3697
3776
|
children
|
|
3698
3777
|
}) {
|
|
3699
3778
|
if (Array.isArray(children)) {
|
|
3700
|
-
return /* @__PURE__ */
|
|
3779
|
+
return /* @__PURE__ */ jsx56("pre", { children });
|
|
3701
3780
|
}
|
|
3702
3781
|
const { className, meta } = children.props;
|
|
3703
3782
|
const codeTitle = parseTitleFromMeta(meta);
|
|
3704
3783
|
return /* @__PURE__ */ jsxs33("div", { className: className || DEFAULT_LANGUAGE_CLASS, children: [
|
|
3705
|
-
codeTitle && /* @__PURE__ */
|
|
3706
|
-
/* @__PURE__ */
|
|
3784
|
+
codeTitle && /* @__PURE__ */ jsx56("div", { className: "rspress-code-title", children: codeTitle }),
|
|
3785
|
+
/* @__PURE__ */ jsx56("div", { className: "rspress-code-content rspress-scrollbar", children })
|
|
3707
3786
|
] });
|
|
3708
3787
|
}
|
|
3709
3788
|
|
|
3710
3789
|
// src/theme-default/layout/DocLayout/docComponents/code.tsx
|
|
3711
3790
|
import { PrismLight as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
3712
|
-
import
|
|
3713
|
-
import js from "react-syntax-highlighter/dist/esm/languages/prism/javascript";
|
|
3714
|
-
import ts from "react-syntax-highlighter/dist/esm/languages/prism/typescript";
|
|
3715
|
-
import tsx from "react-syntax-highlighter/dist/esm/languages/prism/tsx";
|
|
3716
|
-
import json from "react-syntax-highlighter/dist/esm/languages/prism/json";
|
|
3717
|
-
import css from "react-syntax-highlighter/dist/esm/languages/prism/css";
|
|
3718
|
-
import scss from "react-syntax-highlighter/dist/esm/languages/prism/scss";
|
|
3719
|
-
import less from "react-syntax-highlighter/dist/esm/languages/prism/less";
|
|
3720
|
-
import xml from "react-syntax-highlighter/dist/esm/languages/prism/xml-doc";
|
|
3721
|
-
import yaml from "react-syntax-highlighter/dist/esm/languages/prism/yaml";
|
|
3722
|
-
import diff from "react-syntax-highlighter/dist/esm/languages/prism/diff";
|
|
3723
|
-
import bash from "react-syntax-highlighter/dist/esm/languages/prism/bash";
|
|
3724
|
-
import markdown from "react-syntax-highlighter/dist/esm/languages/prism/markdown";
|
|
3791
|
+
import languagesInfo from "virtual-prism-languages";
|
|
3725
3792
|
import copy from "copy-to-clipboard";
|
|
3726
3793
|
import { useRef as useRef6 } from "react";
|
|
3727
3794
|
|
|
@@ -3801,31 +3868,20 @@ var prisim_theme_default = {
|
|
|
3801
3868
|
};
|
|
3802
3869
|
|
|
3803
3870
|
// src/theme-default/layout/DocLayout/docComponents/code.tsx
|
|
3804
|
-
import { usePageData as
|
|
3805
|
-
import { Fragment as Fragment10, jsx as
|
|
3871
|
+
import { usePageData as usePageData17 } from "@/runtime";
|
|
3872
|
+
import { Fragment as Fragment10, jsx as jsx57, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3806
3873
|
var registered = false;
|
|
3807
3874
|
var timeoutIdMap = /* @__PURE__ */ new Map();
|
|
3808
3875
|
function registerLanguages() {
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
SyntaxHighlighter.registerLanguage("js", js);
|
|
3813
|
-
SyntaxHighlighter.registerLanguage("ts", ts);
|
|
3814
|
-
SyntaxHighlighter.registerLanguage("json", json);
|
|
3815
|
-
SyntaxHighlighter.registerLanguage("css", css);
|
|
3816
|
-
SyntaxHighlighter.registerLanguage("scss", scss);
|
|
3817
|
-
SyntaxHighlighter.registerLanguage("less", less);
|
|
3818
|
-
SyntaxHighlighter.registerLanguage("xml", xml);
|
|
3819
|
-
SyntaxHighlighter.registerLanguage("yaml", yaml);
|
|
3820
|
-
SyntaxHighlighter.registerLanguage("diff", diff);
|
|
3821
|
-
SyntaxHighlighter.registerLanguage("bash", bash);
|
|
3822
|
-
SyntaxHighlighter.registerLanguage("markdown", markdown);
|
|
3876
|
+
Object.keys(languagesInfo).forEach((key) => {
|
|
3877
|
+
SyntaxHighlighter.registerLanguage(key, languagesInfo[key]);
|
|
3878
|
+
});
|
|
3823
3879
|
registered = true;
|
|
3824
3880
|
}
|
|
3825
3881
|
function Code(props) {
|
|
3826
3882
|
var _a;
|
|
3827
3883
|
const copyButtonRef = useRef6(null);
|
|
3828
|
-
const { siteData: siteData2 } =
|
|
3884
|
+
const { siteData: siteData2 } = usePageData17();
|
|
3829
3885
|
const { showLineNumbers } = siteData2.markdown;
|
|
3830
3886
|
if (!registered) {
|
|
3831
3887
|
registerLanguages();
|
|
@@ -3833,7 +3889,7 @@ function Code(props) {
|
|
|
3833
3889
|
const { className, meta } = props;
|
|
3834
3890
|
const language = className == null ? void 0 : className.replace(/language-/, "");
|
|
3835
3891
|
if (!language) {
|
|
3836
|
-
return /* @__PURE__ */
|
|
3892
|
+
return /* @__PURE__ */ jsx57("code", __spreadValues({}, props));
|
|
3837
3893
|
}
|
|
3838
3894
|
let children;
|
|
3839
3895
|
if (typeof props.children === "string") {
|
|
@@ -3876,7 +3932,7 @@ function Code(props) {
|
|
|
3876
3932
|
}
|
|
3877
3933
|
};
|
|
3878
3934
|
return /* @__PURE__ */ jsxs34(Fragment10, { children: [
|
|
3879
|
-
/* @__PURE__ */
|
|
3935
|
+
/* @__PURE__ */ jsx57(
|
|
3880
3936
|
SyntaxHighlighter,
|
|
3881
3937
|
{
|
|
3882
3938
|
language,
|
|
@@ -3899,12 +3955,12 @@ function Code(props) {
|
|
|
3899
3955
|
children
|
|
3900
3956
|
}
|
|
3901
3957
|
),
|
|
3902
|
-
/* @__PURE__ */
|
|
3958
|
+
/* @__PURE__ */ jsx57("button", { className: "copy", onClick: copyCode, ref: copyButtonRef })
|
|
3903
3959
|
] });
|
|
3904
3960
|
}
|
|
3905
3961
|
|
|
3906
3962
|
// src/theme-default/components/PackageManagerTabs/icons/Npm.tsx
|
|
3907
|
-
import { jsx as
|
|
3963
|
+
import { jsx as jsx58, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3908
3964
|
function Npm(props) {
|
|
3909
3965
|
return /* @__PURE__ */ jsxs35(
|
|
3910
3966
|
"svg",
|
|
@@ -3915,17 +3971,17 @@ function Npm(props) {
|
|
|
3915
3971
|
viewBox: "0 0 256 256"
|
|
3916
3972
|
}, props), {
|
|
3917
3973
|
children: [
|
|
3918
|
-
/* @__PURE__ */
|
|
3919
|
-
/* @__PURE__ */
|
|
3974
|
+
/* @__PURE__ */ jsx58("path", { fill: "#C12127", d: "M0 256V0h256v256z" }),
|
|
3975
|
+
/* @__PURE__ */ jsx58("path", { fill: "#FFF", d: "M48 48h160v160h-32V80h-48v128H48z" })
|
|
3920
3976
|
]
|
|
3921
3977
|
})
|
|
3922
3978
|
);
|
|
3923
3979
|
}
|
|
3924
3980
|
|
|
3925
3981
|
// src/theme-default/components/PackageManagerTabs/icons/Yarn.tsx
|
|
3926
|
-
import { jsx as
|
|
3982
|
+
import { jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3927
3983
|
function Yarn(props) {
|
|
3928
|
-
return /* @__PURE__ */
|
|
3984
|
+
return /* @__PURE__ */ jsx59(
|
|
3929
3985
|
"svg",
|
|
3930
3986
|
__spreadProps(__spreadValues({
|
|
3931
3987
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3934,15 +3990,15 @@ function Yarn(props) {
|
|
|
3934
3990
|
viewBox: "0 0 128 128"
|
|
3935
3991
|
}, props), {
|
|
3936
3992
|
children: /* @__PURE__ */ jsxs36("g", { fill: "#2c8ebb", children: [
|
|
3937
|
-
/* @__PURE__ */
|
|
3938
|
-
/* @__PURE__ */
|
|
3993
|
+
/* @__PURE__ */ jsx59("path", { d: "M99.24 80.71C94.9 80.76 91.1 83 87.89 85c-6 3.71-9 3.47-9 3.47l-.1-.17c-.41-.67 1.92-6.68-.69-13.84c-2.82-7.83-7.3-9.72-6.94-10.32c1.53-2.59 5.36-6.7 6.89-14.36c.91-4.64.67-12.28-1.39-16.28c-.38-.74-3.78 1.24-3.78 1.24s-3.18-7.09-4.07-7.66c-2.87-1.84-6 7.61-6 7.61a14 14 0 0 0-11.71 4.5a9.64 9.64 0 0 1-3.85 2.27c-.41.14-.91.12-2.15 3.47c-1.9 5.07 3.24 10.81 3.24 10.81s-6.13 4.33-8.4 9.72a24.78 24.78 0 0 0-1.75 11.68s-4.36 3.78-4.64 7.68a12.87 12.87 0 0 0 1.77 7.83a1.94 1.94 0 0 0 2.63.91s-2.9 3.38-.19 4.81c2.47 1.29 6.63 2 8.83-.19c1.6-1.6 1.92-5.17 2.51-6.63c.14-.34.62.57 1.08 1a10 10 0 0 0 1.36 1s-3.9 1.68-2.3 5.51c.53 1.27 2.42 2.08 5.51 2.06c1.15 0 13.76-.72 17.12-1.53a4.33 4.33 0 0 0 2.61-1.46a63 63 0 0 0 15.49-7c4.74-3.09 6.68-3.93 10.51-4.84c3.16-.75 2.95-5.65-1.24-5.58z" }),
|
|
3994
|
+
/* @__PURE__ */ jsx59("path", { d: "M64 2a62 62 0 1 0 62 62A62 62 0 0 0 64 2zm37.3 87.83c-3.35.81-4.91 1.44-9.41 4.36a67 67 0 0 1-15.56 7.18a8.71 8.71 0 0 1-3.64 1.77c-3.81.93-16.88 1.63-17.91 1.63h-.24c-4 0-6.27-1.24-7.49-2.54c-3.4 1.7-7.8 1-11-.69a5.55 5.55 0 0 1-3-3.9a6 6 0 0 1 0-2.06a6.66 6.66 0 0 1-.79-1A16.38 16.38 0 0 1 30 84.52c.29-3.73 2.87-7.06 4.55-8.83A28.56 28.56 0 0 1 36.61 64a26.82 26.82 0 0 1 6.82-9c-1.65-2.78-3.33-7.06-1.7-11.42c1.17-3.11 2.13-4.84 4.24-5.58a6.84 6.84 0 0 0 2.51-1.34A17.65 17.65 0 0 1 60.34 31c.19-.48.41-1 .65-1.46c1.6-3.4 3.3-5.31 5.29-6a4.88 4.88 0 0 1 4.4.5c.65.43 1.48 1 3.9 6a4.69 4.69 0 0 1 2.85-.1a3.81 3.81 0 0 1 2.39 1.94c2.47 4.74 2.8 13.19 1.72 18.62a33.8 33.8 0 0 1-5.84 13.31a25.73 25.73 0 0 1 5.77 9.43a25.42 25.42 0 0 1 1.41 10.41A28.7 28.7 0 0 0 86 81.91c3.06-1.89 7.68-4.74 13.19-4.81a6.62 6.62 0 0 1 7 5.7a6.35 6.35 0 0 1-4.89 7.03z" })
|
|
3939
3995
|
] })
|
|
3940
3996
|
})
|
|
3941
3997
|
);
|
|
3942
3998
|
}
|
|
3943
3999
|
|
|
3944
4000
|
// src/theme-default/components/PackageManagerTabs/icons/Pnpm.tsx
|
|
3945
|
-
import { jsx as
|
|
4001
|
+
import { jsx as jsx60, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3946
4002
|
function Pnpm(props) {
|
|
3947
4003
|
return /* @__PURE__ */ jsxs37(
|
|
3948
4004
|
"svg",
|
|
@@ -3953,14 +4009,14 @@ function Pnpm(props) {
|
|
|
3953
4009
|
viewBox: "0 0 128 128"
|
|
3954
4010
|
}, props), {
|
|
3955
4011
|
children: [
|
|
3956
|
-
/* @__PURE__ */
|
|
4012
|
+
/* @__PURE__ */ jsx60(
|
|
3957
4013
|
"path",
|
|
3958
4014
|
{
|
|
3959
4015
|
fill: "#f8ab00",
|
|
3960
4016
|
d: "M0 .004V40h39.996V.004Zm43.996 0V40h40V.004Zm44.008 0V40H128V.004Zm0 43.996v39.996H128V44Z"
|
|
3961
4017
|
}
|
|
3962
4018
|
),
|
|
3963
|
-
/* @__PURE__ */
|
|
4019
|
+
/* @__PURE__ */ jsx60(
|
|
3964
4020
|
"path",
|
|
3965
4021
|
{
|
|
3966
4022
|
fill: "#4c4c4c",
|
|
@@ -3973,10 +4029,10 @@ function Pnpm(props) {
|
|
|
3973
4029
|
}
|
|
3974
4030
|
|
|
3975
4031
|
// src/theme-default/components/PackageManagerTabs/icons/Bun.tsx
|
|
3976
|
-
import { jsx as
|
|
4032
|
+
import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3977
4033
|
function Bun(props) {
|
|
3978
4034
|
return /* @__PURE__ */ jsxs38("svg", __spreadProps(__spreadValues({ id: "Bun", width: "1.2em", height: "1.2em", viewBox: "0 0 80 70" }, props), { children: [
|
|
3979
|
-
/* @__PURE__ */
|
|
4035
|
+
/* @__PURE__ */ jsx61(
|
|
3980
4036
|
"path",
|
|
3981
4037
|
{
|
|
3982
4038
|
id: "Shadow",
|
|
@@ -3984,7 +4040,7 @@ function Bun(props) {
|
|
|
3984
4040
|
}
|
|
3985
4041
|
),
|
|
3986
4042
|
/* @__PURE__ */ jsxs38("g", { id: "Body", children: [
|
|
3987
|
-
/* @__PURE__ */
|
|
4043
|
+
/* @__PURE__ */ jsx61(
|
|
3988
4044
|
"path",
|
|
3989
4045
|
{
|
|
3990
4046
|
id: "Background",
|
|
@@ -3992,7 +4048,7 @@ function Bun(props) {
|
|
|
3992
4048
|
style: { fill: "#fbf0df" }
|
|
3993
4049
|
}
|
|
3994
4050
|
),
|
|
3995
|
-
/* @__PURE__ */
|
|
4051
|
+
/* @__PURE__ */ jsx61(
|
|
3996
4052
|
"path",
|
|
3997
4053
|
{
|
|
3998
4054
|
id: "Bottom_Shadow",
|
|
@@ -4001,7 +4057,7 @@ function Bun(props) {
|
|
|
4001
4057
|
style: { fill: "#f6dece" }
|
|
4002
4058
|
}
|
|
4003
4059
|
),
|
|
4004
|
-
/* @__PURE__ */
|
|
4060
|
+
/* @__PURE__ */ jsx61(
|
|
4005
4061
|
"path",
|
|
4006
4062
|
{
|
|
4007
4063
|
id: "Light_Shine",
|
|
@@ -4010,7 +4066,7 @@ function Bun(props) {
|
|
|
4010
4066
|
style: { fill: "#fffefc" }
|
|
4011
4067
|
}
|
|
4012
4068
|
),
|
|
4013
|
-
/* @__PURE__ */
|
|
4069
|
+
/* @__PURE__ */ jsx61(
|
|
4014
4070
|
"path",
|
|
4015
4071
|
{
|
|
4016
4072
|
id: "Top",
|
|
@@ -4018,7 +4074,7 @@ function Bun(props) {
|
|
|
4018
4074
|
style: { fill: "#ccbea7", fillRule: "evenodd" }
|
|
4019
4075
|
}
|
|
4020
4076
|
),
|
|
4021
|
-
/* @__PURE__ */
|
|
4077
|
+
/* @__PURE__ */ jsx61(
|
|
4022
4078
|
"path",
|
|
4023
4079
|
{
|
|
4024
4080
|
id: "Outline",
|
|
@@ -4027,7 +4083,7 @@ function Bun(props) {
|
|
|
4027
4083
|
)
|
|
4028
4084
|
] }),
|
|
4029
4085
|
/* @__PURE__ */ jsxs38("g", { id: "Mouth", children: [
|
|
4030
|
-
/* @__PURE__ */
|
|
4086
|
+
/* @__PURE__ */ jsx61("g", { id: "Background-2", "data-name": "Background", children: /* @__PURE__ */ jsx61(
|
|
4031
4087
|
"path",
|
|
4032
4088
|
{
|
|
4033
4089
|
d: "M45.05,43a8.93,8.93,0,0,1-2.92,4.71,6.81,6.81,0,0,1-4,1.88A6.84,6.84,0,0,1,34,47.71,8.93,8.93,0,0,1,31.12,43a.72.72,0,0,1,.8-.81H44.26A.72.72,0,0,1,45.05,43Z",
|
|
@@ -4035,7 +4091,7 @@ function Bun(props) {
|
|
|
4035
4091
|
}
|
|
4036
4092
|
) }),
|
|
4037
4093
|
/* @__PURE__ */ jsxs38("g", { id: "Tongue", children: [
|
|
4038
|
-
/* @__PURE__ */
|
|
4094
|
+
/* @__PURE__ */ jsx61(
|
|
4039
4095
|
"path",
|
|
4040
4096
|
{
|
|
4041
4097
|
id: "Background-3",
|
|
@@ -4044,7 +4100,7 @@ function Bun(props) {
|
|
|
4044
4100
|
style: { fill: "#ff6164" }
|
|
4045
4101
|
}
|
|
4046
4102
|
),
|
|
4047
|
-
/* @__PURE__ */
|
|
4103
|
+
/* @__PURE__ */ jsx61(
|
|
4048
4104
|
"path",
|
|
4049
4105
|
{
|
|
4050
4106
|
id: "Outline-2",
|
|
@@ -4053,7 +4109,7 @@ function Bun(props) {
|
|
|
4053
4109
|
}
|
|
4054
4110
|
)
|
|
4055
4111
|
] }),
|
|
4056
|
-
/* @__PURE__ */
|
|
4112
|
+
/* @__PURE__ */ jsx61(
|
|
4057
4113
|
"path",
|
|
4058
4114
|
{
|
|
4059
4115
|
id: "Outline-3",
|
|
@@ -4063,7 +4119,7 @@ function Bun(props) {
|
|
|
4063
4119
|
)
|
|
4064
4120
|
] }),
|
|
4065
4121
|
/* @__PURE__ */ jsxs38("g", { id: "Face", children: [
|
|
4066
|
-
/* @__PURE__ */
|
|
4122
|
+
/* @__PURE__ */ jsx61(
|
|
4067
4123
|
"ellipse",
|
|
4068
4124
|
{
|
|
4069
4125
|
id: "Right_Blush",
|
|
@@ -4077,7 +4133,7 @@ function Bun(props) {
|
|
|
4077
4133
|
}
|
|
4078
4134
|
}
|
|
4079
4135
|
),
|
|
4080
|
-
/* @__PURE__ */
|
|
4136
|
+
/* @__PURE__ */ jsx61(
|
|
4081
4137
|
"ellipse",
|
|
4082
4138
|
{
|
|
4083
4139
|
id: "Left_Bluch",
|
|
@@ -4089,7 +4145,7 @@ function Bun(props) {
|
|
|
4089
4145
|
style: { fill: "#febbd0" }
|
|
4090
4146
|
}
|
|
4091
4147
|
),
|
|
4092
|
-
/* @__PURE__ */
|
|
4148
|
+
/* @__PURE__ */ jsx61(
|
|
4093
4149
|
"path",
|
|
4094
4150
|
{
|
|
4095
4151
|
id: "Eyes",
|
|
@@ -4097,7 +4153,7 @@ function Bun(props) {
|
|
|
4097
4153
|
style: { fillRule: "evenodd" }
|
|
4098
4154
|
}
|
|
4099
4155
|
),
|
|
4100
|
-
/* @__PURE__ */
|
|
4156
|
+
/* @__PURE__ */ jsx61(
|
|
4101
4157
|
"path",
|
|
4102
4158
|
{
|
|
4103
4159
|
id: "Iris",
|
|
@@ -4114,7 +4170,7 @@ function Bun(props) {
|
|
|
4114
4170
|
|
|
4115
4171
|
// src/theme-default/components/PackageManagerTabs/index.tsx
|
|
4116
4172
|
import { Tab as Tab2 } from "@theme";
|
|
4117
|
-
import { jsx as
|
|
4173
|
+
import { jsx as jsx62, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4118
4174
|
function normalizeCommand(command) {
|
|
4119
4175
|
if (!command.includes("install")) {
|
|
4120
4176
|
return command;
|
|
@@ -4132,10 +4188,10 @@ function PackageManagerTabs({
|
|
|
4132
4188
|
}) {
|
|
4133
4189
|
let commandInfo;
|
|
4134
4190
|
const packageMangerToIcon = {
|
|
4135
|
-
npm: /* @__PURE__ */
|
|
4136
|
-
yarn: /* @__PURE__ */
|
|
4137
|
-
pnpm: /* @__PURE__ */
|
|
4138
|
-
bun: /* @__PURE__ */
|
|
4191
|
+
npm: /* @__PURE__ */ jsx62(Npm, {}),
|
|
4192
|
+
yarn: /* @__PURE__ */ jsx62(Yarn, {}),
|
|
4193
|
+
pnpm: /* @__PURE__ */ jsx62(Pnpm, {}),
|
|
4194
|
+
bun: /* @__PURE__ */ jsx62(Bun, {})
|
|
4139
4195
|
};
|
|
4140
4196
|
additionalTabs.forEach((tab) => {
|
|
4141
4197
|
packageMangerToIcon[tab.tool] = tab.icon;
|
|
@@ -4155,7 +4211,7 @@ function PackageManagerTabs({
|
|
|
4155
4211
|
}
|
|
4156
4212
|
commandInfo.yarn = normalizeCommand(commandInfo.yarn);
|
|
4157
4213
|
commandInfo.bun = normalizeCommand(commandInfo.bun);
|
|
4158
|
-
return /* @__PURE__ */
|
|
4214
|
+
return /* @__PURE__ */ jsx62(
|
|
4159
4215
|
Tabs,
|
|
4160
4216
|
{
|
|
4161
4217
|
values: Object.entries(commandInfo).map(([key]) => /* @__PURE__ */ jsxs39(
|
|
@@ -4168,66 +4224,66 @@ function PackageManagerTabs({
|
|
|
4168
4224
|
},
|
|
4169
4225
|
children: [
|
|
4170
4226
|
packageMangerToIcon[key],
|
|
4171
|
-
/* @__PURE__ */
|
|
4227
|
+
/* @__PURE__ */ jsx62("span", { style: { marginLeft: 6, marginBottom: 2 }, children: key })
|
|
4172
4228
|
]
|
|
4173
4229
|
},
|
|
4174
4230
|
key
|
|
4175
4231
|
)),
|
|
4176
|
-
children: Object.entries(commandInfo).map(([key, value]) => /* @__PURE__ */
|
|
4232
|
+
children: Object.entries(commandInfo).map(([key, value]) => /* @__PURE__ */ jsx62(Tab, { children: /* @__PURE__ */ jsx62(Pre, { children: /* @__PURE__ */ jsx62(Code, { className: "language-js", children: value }) }) }, key))
|
|
4177
4233
|
}
|
|
4178
4234
|
);
|
|
4179
4235
|
}
|
|
4180
4236
|
|
|
4181
4237
|
// src/theme-default/layout/DocLayout/docComponents/index.module.scss
|
|
4182
|
-
var
|
|
4238
|
+
var index_module_default16 = { "title": "title_e0087", "blockquote": "blockquote_e0087", "link": "link_e0087", "inline-link": "inline-link_e0087", "inlineLink": "inline-link_e0087" };
|
|
4183
4239
|
|
|
4184
4240
|
// src/theme-default/layout/DocLayout/docComponents/title.tsx
|
|
4185
|
-
import { jsx as
|
|
4241
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
4186
4242
|
var H1 = (props) => {
|
|
4187
|
-
return /* @__PURE__ */
|
|
4243
|
+
return /* @__PURE__ */ jsx63(
|
|
4188
4244
|
"h1",
|
|
4189
4245
|
__spreadProps(__spreadValues({}, props), {
|
|
4190
|
-
className: `text-3xl mb-10 leading-10 tracking-tight ${
|
|
4246
|
+
className: `text-3xl mb-10 leading-10 tracking-tight ${index_module_default16.title}`
|
|
4191
4247
|
})
|
|
4192
4248
|
);
|
|
4193
4249
|
};
|
|
4194
4250
|
var H2 = (props) => {
|
|
4195
|
-
return /* @__PURE__ */
|
|
4251
|
+
return /* @__PURE__ */ jsx63(
|
|
4196
4252
|
"h2",
|
|
4197
4253
|
__spreadProps(__spreadValues({}, props), {
|
|
4198
|
-
className: `mt-14 mb-6 text-2xl tracking-tight ${
|
|
4254
|
+
className: `mt-14 mb-6 text-2xl tracking-tight ${index_module_default16.title}`
|
|
4199
4255
|
})
|
|
4200
4256
|
);
|
|
4201
4257
|
};
|
|
4202
4258
|
var H3 = (props) => {
|
|
4203
|
-
return /* @__PURE__ */
|
|
4259
|
+
return /* @__PURE__ */ jsx63("h3", __spreadProps(__spreadValues({}, props), { className: `mt-10 mb-2 leading-7 text-xl ${index_module_default16.title}` }));
|
|
4204
4260
|
};
|
|
4205
4261
|
var H4 = (props) => {
|
|
4206
|
-
return /* @__PURE__ */
|
|
4262
|
+
return /* @__PURE__ */ jsx63("h4", __spreadProps(__spreadValues({}, props), { className: `mt-8 leading-6 text-base ${index_module_default16.title}` }));
|
|
4207
4263
|
};
|
|
4208
4264
|
var H5 = (props) => {
|
|
4209
|
-
return /* @__PURE__ */
|
|
4265
|
+
return /* @__PURE__ */ jsx63("h5", __spreadProps(__spreadValues({}, props), { className: index_module_default16.title }));
|
|
4210
4266
|
};
|
|
4211
4267
|
var H6 = (props) => {
|
|
4212
|
-
return /* @__PURE__ */
|
|
4268
|
+
return /* @__PURE__ */ jsx63("h6", __spreadProps(__spreadValues({}, props), { className: index_module_default16.title }));
|
|
4213
4269
|
};
|
|
4214
4270
|
|
|
4215
4271
|
// src/theme-default/layout/DocLayout/docComponents/list.tsx
|
|
4216
|
-
import { jsx as
|
|
4272
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
4217
4273
|
var Ol = (props) => {
|
|
4218
|
-
return /* @__PURE__ */
|
|
4274
|
+
return /* @__PURE__ */ jsx64("ol", __spreadProps(__spreadValues({}, props), { className: "list-decimal pl-5 my-4 leading-7" }));
|
|
4219
4275
|
};
|
|
4220
4276
|
var Ul = (props) => {
|
|
4221
|
-
return /* @__PURE__ */
|
|
4277
|
+
return /* @__PURE__ */ jsx64("ul", __spreadProps(__spreadValues({}, props), { className: "list-disc pl-5 my-4 leading-7" }));
|
|
4222
4278
|
};
|
|
4223
4279
|
var Li = (props) => {
|
|
4224
|
-
return /* @__PURE__ */
|
|
4280
|
+
return /* @__PURE__ */ jsx64("li", __spreadProps(__spreadValues({}, props), { className: "[&:not(:first-child)]:mt-2" }));
|
|
4225
4281
|
};
|
|
4226
4282
|
|
|
4227
4283
|
// src/theme-default/layout/DocLayout/docComponents/table.tsx
|
|
4228
|
-
import { jsx as
|
|
4284
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
4229
4285
|
var Table = (props) => {
|
|
4230
|
-
return /* @__PURE__ */
|
|
4286
|
+
return /* @__PURE__ */ jsx65(
|
|
4231
4287
|
"table",
|
|
4232
4288
|
__spreadProps(__spreadValues({}, props), {
|
|
4233
4289
|
className: "table border-collapse text-base my-5 overflow-x-auto leading-7 border-gray-light-2"
|
|
@@ -4235,7 +4291,7 @@ var Table = (props) => {
|
|
|
4235
4291
|
);
|
|
4236
4292
|
};
|
|
4237
4293
|
var Tr = (props) => {
|
|
4238
|
-
return /* @__PURE__ */
|
|
4294
|
+
return /* @__PURE__ */ jsx65(
|
|
4239
4295
|
"tr",
|
|
4240
4296
|
__spreadProps(__spreadValues({}, props), {
|
|
4241
4297
|
className: "border border-solid transition-colors duration-500 even:bg-soft border-gray-light-2"
|
|
@@ -4243,7 +4299,7 @@ var Tr = (props) => {
|
|
|
4243
4299
|
);
|
|
4244
4300
|
};
|
|
4245
4301
|
var Td = (props) => {
|
|
4246
|
-
return /* @__PURE__ */
|
|
4302
|
+
return /* @__PURE__ */ jsx65(
|
|
4247
4303
|
"td",
|
|
4248
4304
|
__spreadProps(__spreadValues({}, props), {
|
|
4249
4305
|
className: "border border-solid px-4 py-2 border-gray-light-2"
|
|
@@ -4251,7 +4307,7 @@ var Td = (props) => {
|
|
|
4251
4307
|
);
|
|
4252
4308
|
};
|
|
4253
4309
|
var Th = (props) => {
|
|
4254
|
-
return /* @__PURE__ */
|
|
4310
|
+
return /* @__PURE__ */ jsx65(
|
|
4255
4311
|
"th",
|
|
4256
4312
|
__spreadProps(__spreadValues({}, props), {
|
|
4257
4313
|
className: "border border-solid px-4 py-2 text-text-1 text-base font-semibold border-gray-light-2"
|
|
@@ -4260,9 +4316,9 @@ var Th = (props) => {
|
|
|
4260
4316
|
};
|
|
4261
4317
|
|
|
4262
4318
|
// src/theme-default/layout/DocLayout/docComponents/hr.tsx
|
|
4263
|
-
import { jsx as
|
|
4319
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
4264
4320
|
var Hr = (props) => {
|
|
4265
|
-
return /* @__PURE__ */
|
|
4321
|
+
return /* @__PURE__ */ jsx66(
|
|
4266
4322
|
"hr",
|
|
4267
4323
|
__spreadProps(__spreadValues({}, props), {
|
|
4268
4324
|
className: "my-12 border-t bordder-solid border-divider-light"
|
|
@@ -4271,18 +4327,18 @@ var Hr = (props) => {
|
|
|
4271
4327
|
};
|
|
4272
4328
|
|
|
4273
4329
|
// src/theme-default/layout/DocLayout/docComponents/link.tsx
|
|
4274
|
-
import { jsx as
|
|
4330
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
4275
4331
|
var A = (props) => {
|
|
4276
4332
|
const { href = "", className = "" } = props;
|
|
4277
4333
|
const { normalizeLinkHref } = usePathUtils();
|
|
4278
4334
|
const hasHeaderAnchor = className.includes("header-anchor");
|
|
4279
4335
|
if (hasHeaderAnchor || href.startsWith("#")) {
|
|
4280
|
-
return /* @__PURE__ */
|
|
4336
|
+
return /* @__PURE__ */ jsx67("a", __spreadProps(__spreadValues({}, props), { className: `${index_module_default16.link} ${className}` }));
|
|
4281
4337
|
} else {
|
|
4282
|
-
return /* @__PURE__ */
|
|
4338
|
+
return /* @__PURE__ */ jsx67(
|
|
4283
4339
|
Link,
|
|
4284
4340
|
__spreadProps(__spreadValues({}, props), {
|
|
4285
|
-
className: `${className} ${
|
|
4341
|
+
className: `${className} ${index_module_default16.link} ${index_module_default16["inline-link"]}`,
|
|
4286
4342
|
href: normalizeLinkHref(href)
|
|
4287
4343
|
})
|
|
4288
4344
|
);
|
|
@@ -4290,20 +4346,20 @@ var A = (props) => {
|
|
|
4290
4346
|
};
|
|
4291
4347
|
|
|
4292
4348
|
// src/theme-default/layout/DocLayout/docComponents/paragraph.tsx
|
|
4293
|
-
import { jsx as
|
|
4349
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
4294
4350
|
var P = (props) => {
|
|
4295
|
-
return /* @__PURE__ */
|
|
4351
|
+
return /* @__PURE__ */ jsx68("p", __spreadProps(__spreadValues({}, props), { className: "my-4 leading-7" }));
|
|
4296
4352
|
};
|
|
4297
4353
|
var Blockquote = (props) => {
|
|
4298
|
-
return /* @__PURE__ */
|
|
4354
|
+
return /* @__PURE__ */ jsx68(
|
|
4299
4355
|
"blockquote",
|
|
4300
4356
|
__spreadProps(__spreadValues({}, props), {
|
|
4301
|
-
className: `border-l-2 border-solid border-divider pl-4 my-6 transition-colors duration-500 ${
|
|
4357
|
+
className: `border-l-2 border-solid border-divider pl-4 my-6 transition-colors duration-500 ${index_module_default16.blockquote}`
|
|
4302
4358
|
})
|
|
4303
4359
|
);
|
|
4304
4360
|
};
|
|
4305
4361
|
var Strong = (props) => {
|
|
4306
|
-
return /* @__PURE__ */
|
|
4362
|
+
return /* @__PURE__ */ jsx68("strong", __spreadProps(__spreadValues({}, props), { className: "font-semibold" }));
|
|
4307
4363
|
};
|
|
4308
4364
|
|
|
4309
4365
|
// src/theme-default/layout/DocLayout/docComponents/index.tsx
|