|
| 1 | +diff --git a/node_modules/nextra-theme-docs/dist/index.js b/node_modules/nextra-theme-docs/dist/index.js |
| 2 | +index ce17c56..e659acc 100644 |
| 3 | +--- a/node_modules/nextra-theme-docs/dist/index.js |
| 4 | ++++ b/node_modules/nextra-theme-docs/dist/index.js |
| 5 | +@@ -52,7 +52,7 @@ var __async = (__this, __arguments, generator) => { |
| 6 | + |
| 7 | + // src/index.tsx |
| 8 | + import React41, { useEffect as useEffect8, useMemo as useMemo5, useRef as useRef7 } from "react"; |
| 9 | +-import { useRouter as useRouter9 } from "next/router"; |
| 10 | ++import { useRouter as useRouter9 } from "next/router.js"; |
| 11 | + import "focus-visible"; |
| 12 | + import scrollIntoView3 from "scroll-into-view-if-needed"; |
| 13 | + import { SkipNavContent } from "@reach/skip-nav"; |
| 14 | +@@ -61,11 +61,11 @@ import { MDXProvider } from "@mdx-js/react"; |
| 15 | + |
| 16 | + // src/constants.tsx |
| 17 | + import React38, { isValidElement } from "react"; |
| 18 | +-import { useRouter as useRouter8 } from "next/router"; |
| 19 | ++import { useRouter as useRouter8 } from "next/router.js"; |
| 20 | + |
| 21 | + // src/components/anchor.tsx |
| 22 | + import React3, { forwardRef } from "react"; |
| 23 | +-import NextLink from "next/link"; |
| 24 | ++import NextLink from "next/link.js"; |
| 25 | + |
| 26 | + // src/contexts/active-anchor.tsx |
| 27 | + import React, { |
| 28 | +@@ -189,8 +189,9 @@ var Anchor = forwardRef(function(_a, forwardedRef) { |
| 29 | + if (config.newNextLinkBehavior) { |
| 30 | + return /* @__PURE__ */ React3.createElement(NextLink, __spreadValues({ |
| 31 | + ref: forwardedRef, |
| 32 | +- href |
| 33 | +- }, props), children); |
| 34 | ++ href, |
| 35 | ++ legacyBehavior: false |
| 36 | ++ }, props), React.createElement(Fragment, null, children)); |
| 37 | + } |
| 38 | + return /* @__PURE__ */ React3.createElement(NextLink, { |
| 39 | + href, |
| 40 | +@@ -466,7 +467,7 @@ var getFSRoute = (asPath, locale) => { |
| 41 | + import parseGitUrl from "parse-git-url"; |
| 42 | + var getGitEditUrl = (filePath) => { |
| 43 | + const config = useConfig(); |
| 44 | +- const repo = parseGitUrl(config.docsRepositoryBase || ""); |
| 45 | ++ const repo = parseGitUrl.default(config.docsRepositoryBase || ""); |
| 46 | + if (!repo) |
| 47 | + throw new Error("Invalid `docsRepositoryBase` URL!"); |
| 48 | + const subdir = repo.subdir ? `${repo.subdir}/` : ""; |
| 49 | +@@ -487,7 +488,7 @@ var getGitIssueUrl = ({ |
| 50 | + title, |
| 51 | + labels |
| 52 | + }) => { |
| 53 | +- const repo = parseGitUrl2(repository); |
| 54 | ++ const repo = parseGitUrl2.default(repository); |
| 55 | + if (!repo) |
| 56 | + throw new Error("Invalid `docsRepositoryBase` URL!"); |
| 57 | + switch (repo.type) { |
| 58 | +@@ -952,7 +953,7 @@ function Collapse({ |
| 59 | + |
| 60 | + // src/components/flexsearch.tsx |
| 61 | + import React23, { useState as useState5, useCallback as useCallback3 } from "react"; |
| 62 | +-import { useRouter as useRouter2 } from "next/router"; |
| 63 | ++import { useRouter as useRouter2 } from "next/router.js"; |
| 64 | + import FlexSearch from "flexsearch"; |
| 65 | + import cn8 from "clsx"; |
| 66 | + |
| 67 | +@@ -992,7 +993,7 @@ var Input = forwardRef2((_a, forwardedRef) => { |
| 68 | + }); |
| 69 | + |
| 70 | + // src/components/search.tsx |
| 71 | +-import { useRouter } from "next/router"; |
| 72 | ++import { useRouter } from "next/router.js"; |
| 73 | + var INPUTS = ["input", "select", "button", "textarea"]; |
| 74 | + function Search({ |
| 75 | + className, |
| 76 | +@@ -1369,7 +1370,7 @@ import cn10 from "clsx"; |
| 77 | + |
| 78 | + // src/components/locale-switch.tsx |
| 79 | + import React25 from "react"; |
| 80 | +-import { useRouter as useRouter3 } from "next/router"; |
| 81 | ++import { useRouter as useRouter3 } from "next/router.js"; |
| 82 | + |
| 83 | + // src/components/select.tsx |
| 84 | + import React24 from "react"; |
| 85 | +@@ -1509,7 +1510,7 @@ function Footer({ menu }) { |
| 86 | + |
| 87 | + // src/components/head.tsx |
| 88 | + import React28 from "react"; |
| 89 | +-import NextHead from "next/head"; |
| 90 | ++import NextHead from "next/head.js"; |
| 91 | + import { useTheme as useTheme2 } from "next-themes"; |
| 92 | + function Head() { |
| 93 | + const config = useConfig(); |
| 94 | +@@ -1588,7 +1589,7 @@ var NavLinks = ({ |
| 95 | + // src/components/navbar.tsx |
| 96 | + import React30 from "react"; |
| 97 | + import cn12 from "clsx"; |
| 98 | +-import { useRouter as useRouter4 } from "next/router"; |
| 99 | ++import { useRouter as useRouter4 } from "next/router.js"; |
| 100 | + import { Menu, Transition as Transition3 } from "@headlessui/react"; |
| 101 | + var classes2 = { |
| 102 | + link: "text-sm contrast-more:text-gray-700 contrast-more:dark:text-gray-100", |
| 103 | +@@ -1686,7 +1687,7 @@ function Navbar({ flatDirectories, items }) { |
| 104 | + |
| 105 | + // src/components/not-found.tsx |
| 106 | + import React31 from "react"; |
| 107 | +-import { useRouter as useRouter5 } from "next/router"; |
| 108 | ++import { useRouter as useRouter5 } from "next/router.js"; |
| 109 | + function NotFoundPage() { |
| 110 | + const config = useConfig(); |
| 111 | + const mounted = useMounted(); |
| 112 | +@@ -1710,7 +1711,7 @@ function NotFoundPage() { |
| 113 | + |
| 114 | + // src/components/server-side-error.tsx |
| 115 | + import React33 from "react"; |
| 116 | +-import { useRouter as useRouter6 } from "next/router"; |
| 117 | ++import { useRouter as useRouter6 } from "next/router.js"; |
| 118 | + function ServerSideErrorPage() { |
| 119 | + const config = useConfig(); |
| 120 | + const mounted = useMounted(); |
| 121 | +@@ -1742,7 +1743,7 @@ import React34, { |
| 122 | + } from "react"; |
| 123 | + import cn13 from "clsx"; |
| 124 | + import Slugger from "github-slugger"; |
| 125 | +-import { useRouter as useRouter7 } from "next/router"; |
| 126 | ++import { useRouter as useRouter7 } from "next/router.js"; |
| 127 | + import scrollIntoView from "scroll-into-view-if-needed"; |
| 128 | + var TreeState = /* @__PURE__ */ Object.create(null); |
| 129 | + var Folder = memo2(FolderImpl); |
| 130 | +diff --git a/node_modules/nextra-theme-docs/package.json b/node_modules/nextra-theme-docs/package.json |
| 131 | +index 0a8a39f..c536a6e 100644 |
| 132 | +--- a/node_modules/nextra-theme-docs/package.json |
| 133 | ++++ b/node_modules/nextra-theme-docs/package.json |
| 134 | +@@ -5,6 +5,7 @@ |
| 135 | + "repository": "https://github.com/shuding/nextra", |
| 136 | + "author": "Shu Ding < [email protected]>", |
| 137 | + "license": "MIT", |
| 138 | ++ "type": "module", |
| 139 | + "files": [ |
| 140 | + "dist", |
| 141 | + "style.css" |
0 commit comments