@myst-theme/site 1.2.2 → 1.3.0
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": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@headlessui/react": "^1.7.15",
|
|
27
27
|
"@heroicons/react": "^2.0.18",
|
|
28
|
-
"@myst-theme/common": "^1.
|
|
29
|
-
"@myst-theme/diagrams": "^1.
|
|
30
|
-
"@myst-theme/frontmatter": "^1.
|
|
31
|
-
"@myst-theme/providers": "^1.
|
|
32
|
-
"@myst-theme/search": "^1.
|
|
28
|
+
"@myst-theme/common": "^1.3.0",
|
|
29
|
+
"@myst-theme/diagrams": "^1.3.0",
|
|
30
|
+
"@myst-theme/frontmatter": "^1.3.0",
|
|
31
|
+
"@myst-theme/providers": "^1.3.0",
|
|
32
|
+
"@myst-theme/search": "^1.3.0",
|
|
33
33
|
"@radix-ui/react-collapsible": "^1.0.3",
|
|
34
34
|
"@radix-ui/react-dialog": "^1.0.3",
|
|
35
35
|
"@radix-ui/react-visually-hidden": "^1.1.0",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"lodash.throttle": "^4.1.1",
|
|
38
38
|
"myst-common": "^1.8.1",
|
|
39
39
|
"myst-config": "^1.7.9",
|
|
40
|
-
"myst-demo": "^1.
|
|
40
|
+
"myst-demo": "^1.3.0",
|
|
41
41
|
"myst-spec-ext": "^1.8.1",
|
|
42
|
-
"myst-to-react": "^1.
|
|
42
|
+
"myst-to-react": "^1.3.0",
|
|
43
43
|
"nbtx": "^0.2.3",
|
|
44
44
|
"node-cache": "^5.1.2",
|
|
45
45
|
"node-fetch": "^2.6.11",
|
|
@@ -12,7 +12,7 @@ export function Keywords({
|
|
|
12
12
|
}) {
|
|
13
13
|
if (hideKeywords || !keywords || keywords.length === 0) return null;
|
|
14
14
|
return (
|
|
15
|
-
<div className={classNames('myst-keywords mb-10 group', className)}>
|
|
15
|
+
<div id="myst-keywords" className={classNames('myst-keywords mb-10 group', className)}>
|
|
16
16
|
<span className="myst-keywords-label mr-2 font-semibold">Keywords:</span>
|
|
17
17
|
<span className="myst-keywords-list">
|
|
18
18
|
{keywords.map((k, i) => (
|
|
@@ -26,7 +26,7 @@ export function Keywords({
|
|
|
26
26
|
</span>
|
|
27
27
|
))}
|
|
28
28
|
</span>
|
|
29
|
-
<HashLink id="keywords" title="Link to Keywords" hover className="ml-2" />
|
|
29
|
+
<HashLink id="myst-keywords" title="Link to Keywords" hover className="ml-2" />
|
|
30
30
|
</div>
|
|
31
31
|
);
|
|
32
32
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useThemeSwitcher } from '@myst-theme/providers';
|
|
2
|
-
import { MoonIcon } from '@heroicons/react/24/solid';
|
|
3
|
-
import { SunIcon } from '@heroicons/react/24/outline';
|
|
2
|
+
import { MoonIcon, SunIcon } from '@heroicons/react/24/solid';
|
|
4
3
|
import classNames from 'classnames';
|
|
5
4
|
|
|
6
5
|
export function ThemeButton({ className = 'w-10 h-10 mx-3' }: { className?: string }) {
|
|
@@ -8,15 +7,15 @@ export function ThemeButton({ className = 'w-10 h-10 mx-3' }: { className?: stri
|
|
|
8
7
|
return (
|
|
9
8
|
<button
|
|
10
9
|
className={classNames(
|
|
11
|
-
'myst-theme-button theme rounded-full
|
|
10
|
+
'myst-theme-button theme shrink-0 rounded-full border border-stone-700 dark:border-white hover:bg-neutral-100 border-solid overflow-hidden text-stone-700 dark:text-white hover:text-stone-500 dark:hover:text-neutral-800',
|
|
12
11
|
className,
|
|
13
12
|
)}
|
|
14
13
|
title={`Toggle theme between light and dark mode`}
|
|
15
14
|
aria-label={`Toggle theme between light and dark mode`}
|
|
16
15
|
onClick={nextTheme}
|
|
17
16
|
>
|
|
18
|
-
<MoonIcon className="myst-theme-moon-icon h-full w-full p-
|
|
19
|
-
<SunIcon className="myst-theme-sun-icon h-full w-full p-
|
|
17
|
+
<MoonIcon className="myst-theme-moon-icon h-full w-full p-[18%] hidden dark:block" />
|
|
18
|
+
<SunIcon className="myst-theme-sun-icon h-full w-full p-[18%] dark:hidden" />
|
|
20
19
|
</button>
|
|
21
20
|
);
|
|
22
21
|
}
|
|
@@ -128,8 +128,12 @@ export function TopNav({
|
|
|
128
128
|
const config = useSiteManifest();
|
|
129
129
|
const { title, nav, actions } = config ?? {};
|
|
130
130
|
const { logo, logo_dark, logo_text, logo_url, logo_alt } = config?.options ?? {};
|
|
131
|
+
// TODO: when the nav wraps to multiple lines the header grows past 60px, but
|
|
132
|
+
// there are downstream consumers of DEFAULT_NAV_HEIGHT and this will
|
|
133
|
+
// cause a mismatch if the navbar grows. Here we set it to `min-h` to let
|
|
134
|
+
// it grow, but we'll need to revisit downstream height consumers eventually.
|
|
131
135
|
return (
|
|
132
|
-
<div className="myst-top-nav bg-white/80 backdrop-blur dark:bg-stone-900/80 shadow dark:shadow-stone-700 p-3 md:px-8 sticky w-full top-0 z-30 h-[60px]">
|
|
136
|
+
<div className="myst-top-nav bg-white/80 backdrop-blur dark:bg-stone-900/80 shadow dark:shadow-stone-700 p-3 md:px-8 sticky w-full top-0 z-30 min-h-[60px]">
|
|
133
137
|
<nav className="myst-top-nav-bar flex items-center justify-between flex-nowrap max-w-[1440px] mx-auto">
|
|
134
138
|
<div className="flex flex-row xl:min-w-[19.5rem] mr-2 sm:mr-7 justify-start items-center shrink-0">
|
|
135
139
|
{
|
|
@@ -165,7 +169,7 @@ export function TopNav({
|
|
|
165
169
|
{/* Search bar */}
|
|
166
170
|
{!hideSearch && <Search />}
|
|
167
171
|
{/* Light/Dark theme button */}
|
|
168
|
-
<ThemeButton className="w-
|
|
172
|
+
<ThemeButton className="w-8 h-8 ml-3" />
|
|
169
173
|
{/* Custom part at end of navbar. It is `hidden` up until xl size since it will be in the sidebar drawer up to that point */}
|
|
170
174
|
{navbarEnd && (
|
|
171
175
|
<div className="article myst-navbar-end hidden xl:flex items-center ml-3 [&>*]:m-0">
|