@conduction/docusaurus-preset 1.4.1 → 1.4.2

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": "@conduction/docusaurus-preset",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "scripts": {
5
5
  "prepack": "node scripts/prepack-bundle-css.js"
6
6
  },
@@ -99,7 +99,13 @@ export default function Navbar() {
99
99
  const rightItems = items.filter(i => i.position === 'right' || i.type === 'localeDropdown');
100
100
 
101
101
  return (
102
- <nav className={styles.nav} role="navigation" aria-label="Main">
102
+ /* `navbar` (Docusaurus's framework class) is added alongside the
103
+ brand styles.nav so the internal scroll-anchor offset query
104
+ `document.querySelector('.navbar').clientHeight` resolves. The
105
+ previous JS-only class swizzle made every doc page crash with
106
+ "Cannot read properties of null (reading 'clientHeight')" the
107
+ moment Docusaurus ran its anchor logic on a heading scroll. */
108
+ <nav className={`navbar ${styles.nav}`} role="navigation" aria-label="Main">
103
109
  <div className={styles.left}>
104
110
  <Link to={homeHref} className={styles.wordmark}>
105
111
  {wordmark}