@myst-theme/site 0.18.0 → 1.0.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myst-theme/site",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
"src"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/jupyter-book/myst-theme.git"
|
|
14
|
+
},
|
|
11
15
|
"sideEffects": false,
|
|
12
16
|
"scripts": {
|
|
13
17
|
"clean": "rimraf dist",
|
|
@@ -21,11 +25,11 @@
|
|
|
21
25
|
"dependencies": {
|
|
22
26
|
"@headlessui/react": "^1.7.15",
|
|
23
27
|
"@heroicons/react": "^2.0.18",
|
|
24
|
-
"@myst-theme/common": "^0.
|
|
25
|
-
"@myst-theme/diagrams": "^0.
|
|
26
|
-
"@myst-theme/frontmatter": "^0.
|
|
27
|
-
"@myst-theme/providers": "^0.
|
|
28
|
-
"@myst-theme/search": "^0.
|
|
28
|
+
"@myst-theme/common": "^1.0.1",
|
|
29
|
+
"@myst-theme/diagrams": "^1.0.1",
|
|
30
|
+
"@myst-theme/frontmatter": "^1.0.1",
|
|
31
|
+
"@myst-theme/providers": "^1.0.1",
|
|
32
|
+
"@myst-theme/search": "^1.0.1",
|
|
29
33
|
"@radix-ui/react-collapsible": "^1.0.3",
|
|
30
34
|
"@radix-ui/react-dialog": "^1.0.3",
|
|
31
35
|
"@radix-ui/react-visually-hidden": "^1.1.0",
|
|
@@ -33,9 +37,9 @@
|
|
|
33
37
|
"lodash.throttle": "^4.1.1",
|
|
34
38
|
"myst-common": "^1.8.1",
|
|
35
39
|
"myst-config": "^1.7.9",
|
|
36
|
-
"myst-demo": "^0.
|
|
40
|
+
"myst-demo": "^1.0.1",
|
|
37
41
|
"myst-spec-ext": "^1.8.1",
|
|
38
|
-
"myst-to-react": "^0.
|
|
42
|
+
"myst-to-react": "^1.0.1",
|
|
39
43
|
"nbtx": "^0.2.3",
|
|
40
44
|
"node-cache": "^5.1.2",
|
|
41
45
|
"node-fetch": "^2.6.11",
|
|
@@ -25,8 +25,8 @@ export function HomeLink({
|
|
|
25
25
|
>
|
|
26
26
|
{logo && (
|
|
27
27
|
<div
|
|
28
|
-
className={classNames('myst-home-link-logo
|
|
29
|
-
'dark:bg-white dark:rounded': !logoDark,
|
|
28
|
+
className={classNames('myst-home-link-logo mr-3 flex items-center', {
|
|
29
|
+
'dark:bg-white dark:rounded px-1': !logoDark,
|
|
30
30
|
})}
|
|
31
31
|
>
|
|
32
32
|
<img
|
|
@@ -3,7 +3,7 @@ import { MoonIcon } from '@heroicons/react/24/solid';
|
|
|
3
3
|
import { SunIcon } from '@heroicons/react/24/outline';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
|
|
6
|
-
export function ThemeButton({ className = 'w-
|
|
6
|
+
export function ThemeButton({ className = 'w-10 h-10 mx-3' }: { className?: string }) {
|
|
7
7
|
const { nextTheme } = useThemeSwitcher();
|
|
8
8
|
return (
|
|
9
9
|
<button
|
|
@@ -64,35 +64,38 @@ export function NavItem({ item }: { item: SiteNavItem }) {
|
|
|
64
64
|
leaveTo="transform opacity-0 scale-95"
|
|
65
65
|
>
|
|
66
66
|
<Menu.Items className="myst-top-nav-dropdown-items absolute w-48 py-1 mt-2 origin-top-left bg-white rounded-sm shadow-lg left-4 ring-1 ring-black ring-opacity-5 focus:outline-none">
|
|
67
|
-
{item.children?.map((action) =>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
{action.url
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
'text-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
67
|
+
{item.children?.map((action) => {
|
|
68
|
+
const url = withBaseurl(action.url, baseurl) || '';
|
|
69
|
+
return (
|
|
70
|
+
<Menu.Item key={action.url}>
|
|
71
|
+
{/* This is really ugly, BUT, the action needs to be defined HERE or the click away doesn't work for some reason */}
|
|
72
|
+
{action.url?.startsWith('http') ? (
|
|
73
|
+
<a
|
|
74
|
+
href={url}
|
|
75
|
+
className="myst-top-nav-dropdown-item block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-black"
|
|
76
|
+
target="_blank"
|
|
77
|
+
rel="noopener noreferrer"
|
|
78
|
+
>
|
|
79
|
+
{action.title}
|
|
80
|
+
</a>
|
|
81
|
+
) : (
|
|
82
|
+
<NavLink
|
|
83
|
+
to={url}
|
|
84
|
+
className={({ isActive }) =>
|
|
85
|
+
classNames(
|
|
86
|
+
'myst-top-nav-dropdown-item block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-black',
|
|
87
|
+
{
|
|
88
|
+
'text-black font-bold': isActive,
|
|
89
|
+
},
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
>
|
|
93
|
+
{action.title}
|
|
94
|
+
</NavLink>
|
|
95
|
+
)}
|
|
96
|
+
</Menu.Item>
|
|
97
|
+
);
|
|
98
|
+
})}
|
|
96
99
|
</Menu.Items>
|
|
97
100
|
</Transition>
|
|
98
101
|
</Menu>
|
|
@@ -127,12 +130,12 @@ export function TopNav({ hideToc, hideSearch }: { hideToc?: boolean; hideSearch?
|
|
|
127
130
|
})}
|
|
128
131
|
>
|
|
129
132
|
<button
|
|
130
|
-
className="myst-top-nav-menu-button flex items-center border-stone-400 text-stone-800 hover:text-stone-900 dark:text-stone-200 hover:dark:text-stone-100"
|
|
133
|
+
className="myst-top-nav-menu-button flex items-center justify-center border-stone-400 text-stone-800 hover:text-stone-900 dark:text-stone-200 hover:dark:text-stone-100 w-10 h-10"
|
|
131
134
|
onClick={() => {
|
|
132
135
|
setOpen(!open);
|
|
133
136
|
}}
|
|
134
137
|
>
|
|
135
|
-
<MenuIcon width="
|
|
138
|
+
<MenuIcon width="1.5rem" height="1.5rem" />
|
|
136
139
|
<span className="sr-only">Open Menu</span>
|
|
137
140
|
</button>
|
|
138
141
|
</div>
|