nish-ui 1.8.0 → 1.9.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/dist/index.d.ts CHANGED
@@ -172,6 +172,9 @@ interface MountScrollspyOptions {
172
172
  /** Pixels from the top of the viewport where a section counts as current. Default: the
173
173
  * `--nish-header-h` variable plus the nav's own height plus 8. */
174
174
  offset?: number;
175
+ /** Publish the nav's height as `--nish-sticky-extra`. Default true; a non-sticky nav passes
176
+ * false so it does not touch a value another sticky nav publishes. */
177
+ height?: boolean;
175
178
  }
176
179
  /** Scrollspy for a `.nish-subnav`: each `a[href^="#"]` maps to the element with that id.
177
180
  * The link whose section is current gets `aria-current="true"` (the last section whose top
package/dist/index.js CHANGED
@@ -977,7 +977,7 @@ function mountScrollspy(nav, o = {}) {
977
977
  return null;
978
978
  }
979
979
  };
980
- const unheight = mountHeightVar(nav, "--nish-sticky-extra");
980
+ const unheight = o.height === false ? () => void 0 : mountHeightVar(nav, "--nish-sticky-extra");
981
981
  let current = null;
982
982
  const edges = () => {
983
983
  const max = nav.scrollWidth - nav.clientWidth;