@apify/docs-theme 1.0.159 → 1.0.160

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": "@apify/docs-theme",
3
- "version": "1.0.159",
3
+ "version": "1.0.160",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -7,6 +7,10 @@ import { isDifferentInstance } from '../../utils';
7
7
  export default function MDXA(props) {
8
8
  const { siteConfig } = useDocusaurusContext();
9
9
 
10
+ if (props.href?.startsWith(siteConfig.url)) {
11
+ props.target = '_self';
12
+ }
13
+
10
14
  // absolute links in README, e.g. in the SDK or API Client docs, need to be converted to local `to` links
11
15
  if (props.href?.startsWith(siteConfig.url) && isDifferentInstance(siteConfig.baseUrl)) {
12
16
  const { href, ...rest } = props;
@@ -1021,6 +1021,10 @@ aside li.section-header > .menu__list {
1021
1021
  background: inherit !important;
1022
1022
  }
1023
1023
 
1024
+ .theme-doc-sidebar-menu > li.section-header > ul > li.theme-doc-sidebar-item-category-level-2 {
1025
+ margin-bottom: 1rem;
1026
+ }
1027
+
1024
1028
  .beta-chip {
1025
1029
  display: inline-block;
1026
1030
  border: 1px solid #ccc;
@@ -63,13 +63,13 @@ function scrollSidebarItemIntoView() {
63
63
 
64
64
  // handles automatic scrolling of the API reference sidebar (openapi-docs)
65
65
  function scrollOpenApiSidebarItemIntoView() {
66
- const $li = document.querySelector(`ul.theme-doc-sidebar-menu a.menu__link--active[href]`);
66
+ const $li = document.querySelectorAll(`ul.theme-doc-sidebar-menu a.menu__link--active[href]`);
67
67
 
68
- if (!$li) {
68
+ if ($li.length === 0) {
69
69
  return;
70
70
  }
71
71
 
72
- $li.scrollIntoView({
72
+ $li[$li.length - 1].scrollIntoView({
73
73
  block: 'nearest',
74
74
  inline: 'center',
75
75
  });