@rspress-theme-anatole/theme-default 0.5.5 → 0.5.7
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/bundle.js +4 -4
- package/dist/client.js +7 -0
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -1212,13 +1212,13 @@ function DocLayout(props) {
|
|
|
1212
1212
|
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__theme_75e53063__.Overview, {
|
|
1213
1213
|
content: docContent
|
|
1214
1214
|
}),
|
|
1215
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
1215
|
+
frontmatter.comment ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
1216
1216
|
id: 'giscus-comments',
|
|
1217
1217
|
style: {
|
|
1218
1218
|
padding: '64px 62px 0 64px',
|
|
1219
1219
|
},
|
|
1220
1220
|
children: loadGiscus()
|
|
1221
|
-
}),
|
|
1221
|
+
}) : null,
|
|
1222
1222
|
afterDocContent
|
|
1223
1223
|
]
|
|
1224
1224
|
}) : (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
@@ -1270,13 +1270,13 @@ function DocLayout(props) {
|
|
|
1270
1270
|
afterDocFooter
|
|
1271
1271
|
]
|
|
1272
1272
|
}),
|
|
1273
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
1273
|
+
frontmatter.comment ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
1274
1274
|
id: 'giscus-comments',
|
|
1275
1275
|
style: {
|
|
1276
1276
|
padding: '64px 62px 0 64px',
|
|
1277
1277
|
},
|
|
1278
1278
|
children: loadGiscus()
|
|
1279
|
-
}),
|
|
1279
|
+
}) : null,
|
|
1280
1280
|
]
|
|
1281
1281
|
})
|
|
1282
1282
|
}),
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
(function(){function h(a){return'[giscus] An error occurred. Error message: "'.concat(a,'".')}function l(a,f){void 0===f&&(f=!1);f=f?"meta[property='og:".concat(a,"'],"):"";return(a=document.querySelector(f+"meta[name='".concat(a,"']")))?a.content:""}function p(){delete c.session;var a="".concat(k).concat(q,"/widget?").concat(new URLSearchParams(c));e.src=a}var m=document.currentScript,k=(new URL(m.src)).origin,b=new URL(location.href),d=b.searchParams.get("giscus")||"",n=localStorage.getItem("giscus-session");
|
|
2
|
+
b.searchParams.delete("giscus");b.hash="";var g=b.toString();if(d)localStorage.setItem("giscus-session",JSON.stringify(d)),history.replaceState(void 0,document.title,g);else if(n)try{d=JSON.parse(n)}catch(a){localStorage.removeItem("giscus-session"),console.warn("".concat(h(null===a||void 0===a?void 0:a.message)," Session has been cleared."))}b=m.dataset;var c={};c.origin=g;c.session=d;c.theme=b.theme;c.reactionsEnabled=b.reactionsEnabled||"1";c.emitMetadata=b.emitMetadata||"0";c.inputPosition=b.inputPosition||
|
|
3
|
+
"bottom";c.repo=b.repo;c.repoId=b.repoId;c.category=b.category||"";c.categoryId=b.categoryId;c.strict=b.strict||"0";c.description=l("description",!0);c.backLink=l("giscus:backlink")||g;switch(b.mapping){case "url":c.term=g;break;case "title":c.term=document.title;break;case "og:title":c.term=l("title",!0);break;case "specific":c.term=b.term;break;case "number":c.number=b.term;break;default:c.term=2>location.pathname.length?"index":location.pathname.substring(1).replace(/\.\w+$/,"")}var r=(d=document.querySelector(".giscus"))&&
|
|
4
|
+
d.id;r&&(c.origin="".concat(g,"#").concat(r));var q=b.lang?"/".concat(b.lang):"";g="".concat(k).concat(q,"/widget?").concat(new URLSearchParams(c));b="lazy"===b.loading?"lazy":void 0;var e=document.createElement("iframe");Object.entries({class:"giscus-frame giscus-frame--loading",title:"Comments",scrolling:"no",allow:"clipboard-write",src:g,loading:b}).forEach(function(a){var f=a[0];return(a=a[1])&&e.setAttribute(f,a)});e.style.opacity="0";e.addEventListener("load",function(){e.style.removeProperty("opacity");
|
|
5
|
+
e.classList.remove("giscus-frame--loading")});b=document.getElementById("giscus-css")||document.createElement("link");b.id="giscus-css";b.rel="stylesheet";b.href="".concat(k,"/default.css");document.head.prepend(b);if(d){for(;d.firstChild;)d.firstChild.remove();d.appendChild(e)}else d=document.createElement("div"),d.setAttribute("class","giscus"),d.appendChild(e),m.insertAdjacentElement("afterend",d);window.addEventListener("message",function(a){a.origin===k&&(a=a.data,"object"===typeof a&&a.giscus&&
|
|
6
|
+
(a.giscus.resizeHeight&&(e.style.height="".concat(a.giscus.resizeHeight,"px")),a.giscus.signOut?(localStorage.removeItem("giscus-session"),console.log("[giscus] User has logged out. Session has been cleared."),p()):a.giscus.error&&(a=a.giscus.error,a.includes("Bad credentials")||a.includes("Invalid state value")||a.includes("State has expired")?null!==localStorage.getItem("giscus-session")?(localStorage.removeItem("giscus-session"),console.warn("".concat(h(a)," Session has been cleared.")),p()):n||
|
|
7
|
+
console.error("".concat(h(a)," No session is stored initially. ").concat("Please consider reporting this error at https://github.com/giscus/giscus/issues/new.")):a.includes("Discussion not found")?console.warn("[giscus] ".concat(a,". A new discussion will be created if a comment/reaction is submitted.")):a.includes("API rate limit exceeded")?console.warn(h(a)):console.error("".concat(h(a)," ").concat("Please consider reporting this error at https://github.com/giscus/giscus/issues/new.")))))})})();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspress-theme-anatole/theme-default",
|
|
3
3
|
"author": "Anatole Tong",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.css",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"types": "./dist/bundle.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@mdx-js/react": "2.3.0",
|
|
24
|
-
"@rspress-theme-anatole/shared": "0.5.
|
|
24
|
+
"@rspress-theme-anatole/shared": "0.5.6",
|
|
25
25
|
"@rspress/runtime": "1.43.8",
|
|
26
26
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
27
27
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-helmet-async": "^1.3.0",
|
|
36
36
|
"react-router-dom": "6.29.0",
|
|
37
37
|
"react-syntax-highlighter": "^15.6.1",
|
|
38
|
-
"@rspress-theme-anatole/rspress-plugin-mermaid": "0.5.
|
|
38
|
+
"@rspress-theme-anatole/rspress-plugin-mermaid": "0.5.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@microsoft/api-extractor": "^7.49.2",
|