@salesforcedevs/docs-components 1.20.0-rnb-scroll → 1.20.0-rnb-scroll-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": "@salesforcedevs/docs-components",
3
- "version": "1.20.0-rnb-scroll",
3
+ "version": "1.20.0-rnb-scroll-2",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -9,7 +9,7 @@
9
9
  "yarn": "1.22.19"
10
10
  },
11
11
  "volta": {
12
- "node": "20.19.0",
12
+ "node": "20.18.2",
13
13
  "yarn": "1.22.19"
14
14
  },
15
15
  "publishConfig": {
@@ -274,10 +274,6 @@ export default class ContentLayout extends LightningElement {
274
274
  const docPhaseElHeight = docPhaseEl
275
275
  ? docPhaseEl.getBoundingClientRect().height
276
276
  : 0;
277
- const toc = rightNavBarEl.querySelector("dx-toc");
278
- const listContainer = toc?.shadowRoot?.querySelector(
279
- ".toc"
280
- ) as HTMLElement;
281
277
  const viewportHeight = window.innerHeight;
282
278
  const maxHeight =
283
279
  viewportHeight -
@@ -286,7 +282,15 @@ export default class ContentLayout extends LightningElement {
286
282
  rightNavBarEl.style.top = `${
287
283
  totalHeaderHeight + docPhaseElHeight
288
284
  }px`;
289
- listContainer.style.maxHeight = `${maxHeight}px`;
285
+
286
+ const toc = rightNavBarEl.querySelector("dx-toc");
287
+ const listContainer = toc?.shadowRoot?.querySelector(
288
+ ".toc"
289
+ ) as HTMLElement;
290
+
291
+ if (listContainer) {
292
+ listContainer.style.maxHeight = `${maxHeight}px`;
293
+ }
290
294
  }
291
295
 
292
296
  // If doc phase element exists, we need to account for its sticky position. Mobile should include the sidebar height (since it becomes sticky aswell).