@rspress-theme-anatole/theme-default 0.2.3 → 0.2.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/LICENSE +21 -19
- package/dist/bundle.js +34 -16
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
of the Software, and to permit persons to whom the Software is
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present Bytedance, Inc. and its affiliates.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/bundle.js
CHANGED
|
@@ -3128,9 +3128,10 @@ function NavMenuSingleItem(item) {
|
|
|
3128
3128
|
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("i", {
|
|
3129
3129
|
className: item.rightIcon,
|
|
3130
3130
|
style: {
|
|
3131
|
-
marginLeft: '8px',
|
|
3131
|
+
marginLeft: item.text && item.rightIcon ? '8px' : '0',
|
|
3132
3132
|
fontSize: '12px',
|
|
3133
|
-
verticalAlign: 'middle'
|
|
3133
|
+
verticalAlign: 'middle',
|
|
3134
|
+
marginTop: '2.5px'
|
|
3134
3135
|
}
|
|
3135
3136
|
})
|
|
3136
3137
|
]
|
|
@@ -3847,22 +3848,39 @@ function Nav(props) {
|
|
|
3847
3848
|
}, []);
|
|
3848
3849
|
const NavMenu = ({ menuItems }) => (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
3849
3850
|
className: "rspress-nav-menu menu h-14",
|
|
3850
|
-
children:
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3851
|
+
children: [
|
|
3852
|
+
((pathname !== '/index.html' && pathname !== '/') ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(NavMenuSingleItem, {
|
|
3853
|
+
link: pathname,
|
|
3854
|
+
onClick: () => {
|
|
3855
|
+
document.querySelector('.rspress-nav-search-button').click();
|
|
3856
|
+
},
|
|
3857
|
+
activeMatch: '/search',
|
|
3858
|
+
rightIcon: 'fa-solid fa-magnifying-glass',
|
|
3854
3859
|
base: base,
|
|
3855
3860
|
pathname: pathname,
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3861
|
+
compact: menuItems.length > 5,
|
|
3862
|
+
}, "rspress-nav-search") : null),
|
|
3863
|
+
menuItems.map((item) =>
|
|
3864
|
+
'items' in item || Array.isArray(item) ?
|
|
3865
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
3866
|
+
className: "mx-3 last:mr-0",
|
|
3867
|
+
children: (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(NavMenuGroup, {
|
|
3868
|
+
...item,
|
|
3869
|
+
base: base,
|
|
3870
|
+
pathname: pathname,
|
|
3871
|
+
langs: langs,
|
|
3872
|
+
items: 'items' in item ? item.items : item
|
|
3873
|
+
})
|
|
3874
|
+
}, item.text)
|
|
3875
|
+
:
|
|
3876
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(NavMenuSingleItem, {
|
|
3877
|
+
pathname: pathname,
|
|
3878
|
+
langs: langs,
|
|
3879
|
+
base: base,
|
|
3880
|
+
compact: menuItems.length > 5,
|
|
3881
|
+
...item
|
|
3882
|
+
}, item.link))
|
|
3883
|
+
]
|
|
3866
3884
|
});
|
|
3867
3885
|
const menuItems = useNavData();
|
|
3868
3886
|
const getPosition = (menuItem) => menuItem.position ?? DEFAULT_NAV_POSITION;
|
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.2.
|
|
4
|
+
"version": "0.2.5",
|
|
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.2.
|
|
24
|
+
"@rspress-theme-anatole/shared": "0.2.5",
|
|
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.2.
|
|
38
|
+
"@rspress-theme-anatole/rspress-plugin-mermaid": "0.2.5"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@microsoft/api-extractor": "^7.49.2",
|