fumadocs-core 15.8.4 → 15.8.5
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/breadcrumb.js +3 -3
- package/dist/hide-if-empty.js +24 -5
- package/dist/mdx-plugins/index.js +4 -4
- package/package.json +3 -3
package/dist/breadcrumb.js
CHANGED
package/dist/hide-if-empty.js
CHANGED
|
@@ -32,6 +32,23 @@ function isEmpty(node) {
|
|
|
32
32
|
}
|
|
33
33
|
return true;
|
|
34
34
|
}
|
|
35
|
+
function disableAnimation() {
|
|
36
|
+
const css = document.createElement("style");
|
|
37
|
+
const nonce = document.currentScript?.nonce;
|
|
38
|
+
if (nonce) css.setAttribute("nonce", nonce);
|
|
39
|
+
css.appendChild(
|
|
40
|
+
document.createTextNode(
|
|
41
|
+
`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`
|
|
42
|
+
)
|
|
43
|
+
);
|
|
44
|
+
document.head.appendChild(css);
|
|
45
|
+
return () => {
|
|
46
|
+
(() => window.getComputedStyle(document.body))();
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
document.head.removeChild(css);
|
|
49
|
+
}, 1);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
35
52
|
function HideIfEmpty({
|
|
36
53
|
as: Comp,
|
|
37
54
|
...props
|
|
@@ -52,9 +69,10 @@ function HideIfEmpty({
|
|
|
52
69
|
}, [id]);
|
|
53
70
|
const init = (id2) => {
|
|
54
71
|
const element = getElement(id2);
|
|
55
|
-
if (element)
|
|
56
|
-
|
|
57
|
-
|
|
72
|
+
if (element) {
|
|
73
|
+
disableAnimation();
|
|
74
|
+
element.hidden = isEmpty(element);
|
|
75
|
+
}
|
|
58
76
|
};
|
|
59
77
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
78
|
/* @__PURE__ */ jsx(
|
|
@@ -65,12 +83,13 @@ function HideIfEmpty({
|
|
|
65
83
|
hidden: empty ?? false
|
|
66
84
|
}
|
|
67
85
|
),
|
|
68
|
-
|
|
86
|
+
/* @__PURE__ */ jsx(
|
|
69
87
|
"script",
|
|
70
88
|
{
|
|
89
|
+
suppressHydrationWarning: true,
|
|
71
90
|
nonce,
|
|
72
91
|
dangerouslySetInnerHTML: {
|
|
73
|
-
__html: `{${getElement};${isEmpty};(${init})("${id}")}`
|
|
92
|
+
__html: `{${getElement};${isEmpty};${disableAnimation};(${init})("${id}")}`
|
|
74
93
|
}
|
|
75
94
|
}
|
|
76
95
|
)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defaultThemes,
|
|
3
|
-
getHighlighter
|
|
4
|
-
} from "../chunk-HN2NUUD2.js";
|
|
5
1
|
import {
|
|
6
2
|
flattenNode,
|
|
7
3
|
remarkHeading
|
|
8
4
|
} from "../chunk-QMATWJ5F.js";
|
|
5
|
+
import {
|
|
6
|
+
defaultThemes,
|
|
7
|
+
getHighlighter
|
|
8
|
+
} from "../chunk-HN2NUUD2.js";
|
|
9
9
|
import "../chunk-U67V476Y.js";
|
|
10
10
|
|
|
11
11
|
// src/mdx-plugins/index.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-core",
|
|
3
|
-
"version": "15.8.
|
|
3
|
+
"version": "15.8.5",
|
|
4
4
|
"description": "The library for building a documentation website in any React.js framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Fumadocs",
|
|
@@ -153,8 +153,8 @@
|
|
|
153
153
|
"unified": "^11.0.5",
|
|
154
154
|
"vfile": "^6.0.3",
|
|
155
155
|
"waku": "^0.26.1",
|
|
156
|
-
"
|
|
157
|
-
"
|
|
156
|
+
"tsconfig": "0.0.0",
|
|
157
|
+
"eslint-config-custom": "0.0.0"
|
|
158
158
|
},
|
|
159
159
|
"peerDependencies": {
|
|
160
160
|
"@mixedbread/sdk": "^0.19.0",
|