@apify/docs-theme 1.0.244 → 1.0.245

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.
Files changed (50) hide show
  1. package/LICENSE +201 -0
  2. package/package.json +48 -48
  3. package/src/config.js +1 -3
  4. package/src/markdown.js +8 -6
  5. package/src/roa-loader/index.js +16 -14
  6. package/src/theme/ColorModeToggle/index.jsx +14 -27
  7. package/src/theme/DocBreadcrumbs/Items/Home/index.js +2 -1
  8. package/src/theme/DocBreadcrumbs/index.js +10 -20
  9. package/src/theme/DocItemContent/index.js +42 -43
  10. package/src/theme/DocItemContent/styles.module.css +1 -3
  11. package/src/theme/DocSidebarItem/Category/index.js +36 -54
  12. package/src/theme/DocSidebarItem/Link/index.jsx +9 -23
  13. package/src/theme/DocSidebarItem/Link/styles.module.css +1 -1
  14. package/src/theme/Footer/LinkItem/index.js +7 -12
  15. package/src/theme/Footer/index.jsx +2 -3
  16. package/src/theme/Heading/index.jsx +3 -4
  17. package/src/theme/Heading/styles.module.css +23 -23
  18. package/src/theme/Icon/DarkMode/index.jsx +7 -1
  19. package/src/theme/Icon/LightMode/index.jsx +28 -10
  20. package/src/theme/LLMButtons/index.jsx +7 -37
  21. package/src/theme/Layout/index.jsx +10 -9
  22. package/src/theme/Logo/index.js +3 -16
  23. package/src/theme/MDXComponents/A.js +11 -6
  24. package/src/theme/MDXComponents/Code.js +3 -2
  25. package/src/theme/MDXComponents/Details.js +1 -3
  26. package/src/theme/MDXComponents/Head.js +2 -1
  27. package/src/theme/MDXComponents/Img/index.js +1 -7
  28. package/src/theme/MDXComponents/Img/styles.module.css +1 -1
  29. package/src/theme/MDXComponents/Ul/index.js +1 -1
  30. package/src/theme/MDXComponents/Ul/styles.module.css +2 -2
  31. package/src/theme/Navbar/CTA/index.jsx +3 -1
  32. package/src/theme/Navbar/CTA/styles.module.css +45 -45
  33. package/src/theme/Navbar/Content/index.jsx +29 -28
  34. package/src/theme/Navbar/MobileSidebar/Header/index.jsx +3 -1
  35. package/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.jsx +15 -29
  36. package/src/theme/NavbarItem/ComponentTypes.jsx +3 -22
  37. package/src/theme/NavbarItem/NavbarNavLink.jsx +28 -24
  38. package/src/theme/NotFound.jsx +2 -6
  39. package/src/theme/RunnableCodeBlock/RunnableCodeBlock.jsx +43 -9
  40. package/src/theme/SearchBar/index.js +21 -21
  41. package/src/theme/SearchBar/styles.css +84 -83
  42. package/src/theme/SearchMetadata/index.js +8 -8
  43. package/src/theme/SearchPage/index.js +173 -230
  44. package/src/theme/SearchPage/styles.module.css +59 -59
  45. package/src/theme/TOCItems/Tree.jsx +2 -12
  46. package/src/theme/TOCItems/index.jsx +2 -12
  47. package/src/theme/custom.css +73 -75
  48. package/src/theme.js +15 -19
  49. package/src/utils.js +1 -5
  50. package/static/js/custom.js +7 -5
@@ -8,11 +8,5 @@ function transformImgClassName(className) {
8
8
  }
9
9
 
10
10
  export default function MDXImg(props) {
11
- return (
12
- <img
13
- loading="lazy"
14
- {...props}
15
- className={transformImgClassName(props.className)}
16
- />
17
- );
11
+ return <img loading="lazy" {...props} className={transformImgClassName(props.className)} />;
18
12
  }
@@ -1,3 +1,3 @@
1
1
  .img {
2
- height: auto;
2
+ height: auto;
3
3
  }
@@ -14,5 +14,5 @@ function transformUlClassName(className) {
14
14
  }
15
15
 
16
16
  export default function MDXUl(props) {
17
- return <ul {...props} className={transformUlClassName(props.className)}/>;
17
+ return <ul {...props} className={transformUlClassName(props.className)} />;
18
18
  }
@@ -1,7 +1,7 @@
1
1
  .containsTaskList {
2
- list-style: none;
2
+ list-style: none;
3
3
  }
4
4
 
5
5
  :not(.containsTaskList > li) > .containsTaskList {
6
- padding-left: 0;
6
+ padding-left: 0;
7
7
  }
@@ -15,6 +15,8 @@ function clickHandler() {
15
15
 
16
16
  export default function NavbarCTA() {
17
17
  return (
18
- <a href="https://console.apify.com" onClick={clickHandler} className={styles.getStarted}>{buttonText}</a>
18
+ <a href="https://console.apify.com" onClick={clickHandler} className={styles.getStarted}>
19
+ {buttonText}
20
+ </a>
19
21
  );
20
22
  }
@@ -1,59 +1,59 @@
1
1
  .getStarted {
2
- height: 4rem;
3
- padding: 0.8rem 1.6rem !important;
4
- background-color: var(--color-primary-black-action);
5
- border-radius: 8px;
6
- color: var(--color-neutral-text-on-primary);
7
- font-size: 1.6rem;
8
- font-weight: 500;
9
- line-height: 2.4rem;
10
- border: none;
11
- box-shadow: none;
12
- outline: none;
13
- box-sizing: border-box;
14
- cursor: pointer;
15
- display: block;
16
- position: relative;
17
- text-align: center;
18
- transition: all var(--ifm-transition-fast) var(--ifm-transition-timing-default);
19
-
20
- &::before {
21
- content: '';
22
- position: absolute;
23
- top: 0;
24
- right: 0;
25
- bottom: 0;
26
- left: 0;
27
- background: var(--button-gradient);
28
- opacity: 0.4;
29
- border-radius: inherit;
30
- transition: all var(--ifm-transition-fast) var(--ifm-transition-timing-default);
31
- }
32
-
33
- &:hover {
34
- background-color: var(--color-primary-black-action-hover);
2
+ height: 4rem;
3
+ padding: 0.8rem 1.6rem !important;
4
+ background-color: var(--color-primary-black-action);
5
+ border-radius: 8px;
35
6
  color: var(--color-neutral-text-on-primary);
7
+ font-size: 1.6rem;
8
+ font-weight: 500;
9
+ line-height: 2.4rem;
10
+ border: none;
11
+ box-shadow: none;
12
+ outline: none;
13
+ box-sizing: border-box;
14
+ cursor: pointer;
15
+ display: block;
16
+ position: relative;
17
+ text-align: center;
18
+ transition: all var(--ifm-transition-fast) var(--ifm-transition-timing-default);
36
19
 
37
20
  &::before {
38
- opacity: 1;
21
+ content: '';
22
+ position: absolute;
23
+ top: 0;
24
+ right: 0;
25
+ bottom: 0;
26
+ left: 0;
27
+ background: var(--button-gradient);
28
+ opacity: 0.4;
29
+ border-radius: inherit;
30
+ transition: all var(--ifm-transition-fast) var(--ifm-transition-timing-default);
31
+ }
32
+
33
+ &:hover {
34
+ background-color: var(--color-primary-black-action-hover);
35
+ color: var(--color-neutral-text-on-primary);
36
+
37
+ &::before {
38
+ opacity: 1;
39
+ }
39
40
  }
40
- }
41
41
  }
42
42
 
43
43
  :global(.navbar-sidebar) .getStarted {
44
- display: none;
44
+ display: none;
45
45
  }
46
46
 
47
47
  @media (max-width: 768px) {
48
- .getStarted {
49
- width: 100%;
50
- }
48
+ .getStarted {
49
+ width: 100%;
50
+ }
51
51
 
52
- :global(.navbar__inner) .getStarted {
53
- display: none;
54
- }
52
+ :global(.navbar__inner) .getStarted {
53
+ display: none;
54
+ }
55
55
 
56
- :global(.navbar-sidebar) .getStarted {
57
- display: block;
58
- }
56
+ :global(.navbar-sidebar) .getStarted {
57
+ display: block;
58
+ }
59
59
  }
@@ -1,8 +1,6 @@
1
1
  import { useLocation } from '@docusaurus/router';
2
2
  import { isRegexpStringMatch, useThemeConfig } from '@docusaurus/theme-common';
3
- import {
4
- splitNavbarItems,
5
- } from '@docusaurus/theme-common/internal';
3
+ import { splitNavbarItems } from '@docusaurus/theme-common/internal';
6
4
  import { usePluginData } from '@docusaurus/useGlobalData';
7
5
  import NavbarLogo from '@theme/Navbar/Logo';
8
6
  import NavbarMobileSidebarToggle from '@theme/Navbar/MobileSidebar/Toggle';
@@ -17,15 +15,14 @@ import NavbarCTA from '../CTA';
17
15
  function NavbarItems({ items }) {
18
16
  return (
19
17
  <>
20
- {items.map((item, i) => <NavbarItem {...item} key={i} />)}
18
+ {items.map((item, i) => (
19
+ <NavbarItem {...item} key={i} />
20
+ ))}
21
21
  </>
22
22
  );
23
23
  }
24
24
 
25
- function NavbarContentLayout({
26
- left,
27
- right,
28
- }) {
25
+ function NavbarContentLayout({ left, right }) {
29
26
  return (
30
27
  <div className="navbar__inner">
31
28
  <div className="navbar__container">
@@ -37,39 +34,43 @@ function NavbarContentLayout({
37
34
  }
38
35
 
39
36
  function SubNavbarTitle({ titleIcon, title }) {
40
- return titleIcon
41
- ? <div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
37
+ return titleIcon ? (
38
+ <div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
42
39
  <img src={`img/${titleIcon}`} width={24} height={24} /> {title}
43
40
  </div>
44
- : title;
41
+ ) : (
42
+ title
43
+ );
45
44
  }
46
45
 
47
46
  function SubNavbar() {
48
- const { options: { subNavbar } } = usePluginData('@apify/docs-theme');
47
+ const {
48
+ options: { subNavbar },
49
+ } = usePluginData('@apify/docs-theme');
49
50
  const location = useLocation();
50
51
 
51
- return (
52
- subNavbar && (!subNavbar?.pathRegex || isRegexpStringMatch(subNavbar.pathRegex, location.pathname)) ? (
53
- <div className="navbar__inner navbar__sub">
54
- <div className="navbar__container">
55
- <div className="navbar__items">
56
- <div className="navbar__sub--title">
57
- <NavbarItem
58
- label={<SubNavbarTitle title={subNavbar.title} titleIcon={subNavbar.titleIcon} />}
59
- to={subNavbar.to ?? '/'}
60
- activeBaseRegex='(?!)'
61
- />
62
- </div>
63
- <NavbarItems items={subNavbar.items} />
52
+ return subNavbar && (!subNavbar?.pathRegex || isRegexpStringMatch(subNavbar.pathRegex, location.pathname)) ? (
53
+ <div className="navbar__inner navbar__sub">
54
+ <div className="navbar__container">
55
+ <div className="navbar__items">
56
+ <div className="navbar__sub--title">
57
+ <NavbarItem
58
+ label={<SubNavbarTitle title={subNavbar.title} titleIcon={subNavbar.titleIcon} />}
59
+ to={subNavbar.to ?? '/'}
60
+ activeBaseRegex="(?!)"
61
+ />
64
62
  </div>
63
+ <NavbarItems items={subNavbar.items} />
65
64
  </div>
66
65
  </div>
67
- ) : null
68
- );
66
+ </div>
67
+ ) : null;
69
68
  }
70
69
 
71
70
  export default function NavbarContent() {
72
- const { navbar: { items } } = useThemeConfig();
71
+ const {
72
+ navbar: { items },
73
+ } = useThemeConfig();
73
74
  const [leftItems, rightItems] = splitNavbarItems(items);
74
75
  const searchBarItem = items.find((item) => item.type === 'search');
75
76
 
@@ -10,7 +10,9 @@ import NavbarCTA from '../../CTA';
10
10
  export default function NavbarMobileSidebarHeader() {
11
11
  const mobileSidebar = useNavbarMobileSidebar();
12
12
 
13
- const { navbar: { items } } = useThemeConfig();
13
+ const {
14
+ navbar: { items },
15
+ } = useThemeConfig();
14
16
  const searchBarItem = items.find((item) => item.type === 'search');
15
17
 
16
18
  function onSearchClick(event) {
@@ -15,42 +15,28 @@ export default function NavbarMobilePrimaryMenu() {
15
15
  // Should we allow providing a different list of items?
16
16
  const items = useNavbarItems();
17
17
  const baseUrl = useBaseUrl('/');
18
- const { options: { subNavbar } } = usePluginData('@apify/docs-theme');
18
+ const {
19
+ options: { subNavbar },
20
+ } = usePluginData('@apify/docs-theme');
19
21
  return (
20
22
  <>
21
- {
22
- subNavbar ? <>
23
- <ul className="menu__list" style={{ marginBottom: '16px', borderBottom: '1px solid #e0e0e0', paddingBottom: '16px' }}>
24
- <NavbarItem
25
- key={'title'}
26
- mobile
27
- href={baseUrl}
28
- label={subNavbar.title}
29
- />
23
+ {subNavbar ? (
24
+ <>
25
+ <ul
26
+ className="menu__list"
27
+ style={{ marginBottom: '16px', borderBottom: '1px solid #e0e0e0', paddingBottom: '16px' }}
28
+ >
29
+ <NavbarItem key={'title'} mobile href={baseUrl} label={subNavbar.title} />
30
30
  {subNavbar.items.map((item, i) => (
31
- <NavbarItem
32
- style={{ paddingLeft: '16px' }}
33
- key={i}
34
- mobile
35
- {...item}
36
- />
31
+ <NavbarItem style={{ paddingLeft: '16px' }} key={i} mobile {...item} />
37
32
  ))}
38
33
  </ul>
39
- </> : null
40
- }
34
+ </>
35
+ ) : null}
41
36
  <ul className="menu__list">
42
- <NavbarItem
43
- key={'title2'}
44
- mobile
45
- label='Apify documentation'
46
- />
37
+ <NavbarItem key={'title2'} mobile label="Apify documentation" />
47
38
  {items.map((item, i) => (
48
- <NavbarItem
49
- mobile
50
- style={{ paddingLeft: '16px' }}
51
- {...item}
52
- key={i}
53
- />
39
+ <NavbarItem mobile style={{ paddingLeft: '16px' }} {...item} key={i} />
54
40
  ))}
55
41
  </ul>
56
42
  </>
@@ -15,25 +15,13 @@ import React from 'react';
15
15
  // const stable = versions[0];
16
16
  const stable = '1';
17
17
 
18
- function DocNavbarItem({
19
- docId,
20
- label: staticLabel,
21
- docsPluginId,
22
- ...props
23
- }) {
18
+ function DocNavbarItem({ docId, label: staticLabel, docsPluginId, ...props }) {
24
19
  const doc = useLayoutDoc(docId, docsPluginId);
25
20
  // Draft items are not displayed in the navbar.
26
21
  if (doc === null) {
27
22
  return null;
28
23
  }
29
- return (
30
- <DefaultNavbarItem
31
- exact
32
- {...props}
33
- label={staticLabel ?? doc.id}
34
- to={doc.path}
35
- />
36
- );
24
+ return <DefaultNavbarItem exact {...props} label={staticLabel ?? doc.id} to={doc.path} />;
37
25
  }
38
26
 
39
27
  function ApiNavbarItem(ctx) {
@@ -48,14 +36,7 @@ function ApiNavbarItem(ctx) {
48
36
  const { siteConfig } = useDocusaurusContext();
49
37
 
50
38
  if (siteConfig.presets[0][1].docs.disableVersioning || version.version === stable) {
51
- return (
52
- <DefaultNavbarItem
53
- exact
54
- {...ctx}
55
- label={ctx.label}
56
- to={`reference/${ctx.to}`}
57
- />
58
- );
39
+ return <DefaultNavbarItem exact {...ctx} label={ctx.label} to={`reference/${ctx.to}`} />;
59
40
  }
60
41
 
61
42
  // skip changelog button for older versions
@@ -19,8 +19,12 @@ export default function NavbarNavLink({
19
19
  prependBaseUrlToHref,
20
20
  ...props
21
21
  }) {
22
- const { navbar: { items = [] } } = useThemeConfig();
23
- const { options: { subNavbar } } = usePluginData('@apify/docs-theme');
22
+ const {
23
+ navbar: { items = [] },
24
+ } = useThemeConfig();
25
+ const {
26
+ options: { subNavbar },
27
+ } = usePluginData('@apify/docs-theme');
24
28
  const allItems = [...items, ...(subNavbar?.items || [])];
25
29
  const location = useLocation();
26
30
  // TODO all this seems hacky
@@ -41,24 +45,22 @@ export default function NavbarNavLink({
41
45
  const linkContentProps = html
42
46
  ? { dangerouslySetInnerHTML: { __html: html } }
43
47
  : {
44
- children: (
45
- <>
46
- {label}
47
- {isExternalLink && (
48
- <IconExternalLink
49
- {...(isDropdownLink && { width: 12, height: 12 })}
50
- />
51
- )}
52
- </>
53
- ),
54
- };
48
+ children: (
49
+ <>
50
+ {label}
51
+ {isExternalLink && <IconExternalLink {...(isDropdownLink && { width: 12, height: 12 })} />}
52
+ </>
53
+ ),
54
+ };
55
55
 
56
56
  // If the item is a dropdown, look for any of its children that match the current path
57
- const dropDownHasActiveItem = location.pathname !== '/' && allItems
58
- .filter((item) => item.type === 'dropdown')
59
- .filter((item) => item.label === label)
60
- .reduce((nestedItems, item) => [...nestedItems, ...item.items], [])
61
- .some((item) => (item.to || item.href).endsWith(location.pathname));
57
+ const dropDownHasActiveItem =
58
+ location.pathname !== '/' &&
59
+ allItems
60
+ .filter((item) => item.type === 'dropdown')
61
+ .filter((item) => item.label === label)
62
+ .reduce((nestedItems, item) => [...nestedItems, ...item.items], [])
63
+ .some((item) => (item.to || item.href).endsWith(location.pathname));
62
64
 
63
65
  if (href) {
64
66
  return (
@@ -66,9 +68,10 @@ export default function NavbarNavLink({
66
68
  href={prependBaseUrlToHref ? normalizedHref : href}
67
69
  {...props}
68
70
  {...(activeBaseUrl && {
69
- className: location.pathname.startsWith(`/${activeBasePath}`) || dropDownHasActiveItem
70
- ? 'navbar__item navbar__link navbar__link--active'
71
- : 'navbar__item navbar__link',
71
+ className:
72
+ location.pathname.startsWith(`/${activeBasePath}`) || dropDownHasActiveItem
73
+ ? 'navbar__item navbar__link navbar__link--active'
74
+ : 'navbar__item navbar__link',
72
75
  })}
73
76
  {...linkContentProps}
74
77
  />
@@ -81,9 +84,10 @@ export default function NavbarNavLink({
81
84
  isNavLink
82
85
  {...((activeBasePath || activeBaseRegex) && {
83
86
  // eslint-disable-next-line no-shadow
84
- isActive: (_match, location) => (activeBaseRegex
85
- ? isRegexpStringMatch(activeBaseRegex, location.pathname) || dropDownHasActiveItem
86
- : location.pathname.startsWith(`/${activeBasePath}`)),
87
+ isActive: (_match, location) =>
88
+ activeBaseRegex
89
+ ? isRegexpStringMatch(activeBaseRegex, location.pathname) || dropDownHasActiveItem
90
+ : location.pathname.startsWith(`/${activeBasePath}`),
87
91
  activeClassName: 'navbar__link--active',
88
92
  })}
89
93
  {...props}
@@ -10,12 +10,8 @@ export default function NotFound() {
10
10
  <main className="container margin-vert--xl">
11
11
  <div className="row">
12
12
  <div className="col col--6 col--offset-3">
13
- <h1 className="hero__title">
14
- Page Not Found
15
- </h1>
16
- <p>
17
- We could not find what you were looking for 😢
18
- </p>
13
+ <h1 className="hero__title">Page Not Found</h1>
14
+ <p>We could not find what you were looking for 😢</p>
19
15
  </div>
20
16
  </div>
21
17
  </main>
@@ -20,11 +20,7 @@ Make sure you are importing the code block contents with the roa-loader.`);
20
20
  }
21
21
 
22
22
  if (!hash) {
23
- return (
24
- <CodeBlock {...props}>
25
- { children.code }
26
- </CodeBlock>
27
- );
23
+ return <CodeBlock {...props}>{children.code}</CodeBlock>;
28
24
  }
29
25
 
30
26
  const href = `https://console.apify.com/actors/${actor ?? EXAMPLE_RUNNERS[type ?? 'playwright']}?runConfig=${hash}&asrc=run_on_apify`;
@@ -33,13 +29,51 @@ Make sure you are importing the code block contents with the roa-loader.`);
33
29
  <div className={clsx(styles.container, 'runnable-code-block')}>
34
30
  <Link href={href} className={styles.button} rel="follow">
35
31
  Run on
36
- <svg width="91" height="25" viewBox="0 0 91 25" fill="none" xmlns="http://www.w3.org/2000/svg" className="apify-logo-light alignMiddle_src-theme-Footer-index-module">
32
+ <svg
33
+ width="91"
34
+ height="25"
35
+ viewBox="0 0 91 25"
36
+ fill="none"
37
+ xmlns="http://www.w3.org/2000/svg"
38
+ className="apify-logo-light alignMiddle_src-theme-Footer-index-module"
39
+ >
37
40
  {/* eslint-disable-next-line max-len */}
38
- <path fill="#246DFF" d="M13.785 0h9.889c.201 0 .364.163.364.363v15.074c0 .361-.47.501-.669.2L13.48.561A.363.363 0 0 1 13.785 0Z"/><path fill="#20A34E" d="M10.253 0H.364A.364.364 0 0 0 0 .363v15.074c0 .361.47.501.669.2L10.558.561A.363.363 0 0 0 10.253 0Z"/><path fill="#F86606" d="M11.85 12.069.616 23.358a.363.363 0 0 0 .259.62h22.298a.363.363 0 0 0 .26-.618L12.37 12.07a.365.365 0 0 0-.52-.001Z"/><path className="apify-logo" fill="#000" d="M77.267 3.298H73.06c-1.317 0-1.881.657-1.881 1.853V6.3h6.13l3.503 8.066L84.315 6.3h3.056l-7.335 16.859h-3.009l2.257-5.206-4.195-9.12h-3.91v9.331H68.17V8.832h-3.268V6.3h3.268V4.565c0-2.298 1.27-3.658 3.973-3.658h5.124v2.391Z"/><path className="apify-logo" fill="#000" fill-rule="evenodd" d="M53.32 6.042c3.102 0 5.641 2.321 5.641 6.19 0 3.893-2.538 6.19-5.641 6.19-2.586 0-3.88-1.594-4.114-2.063v6.776h-2.962V6.3h2.985v1.876c.212-.446 1.505-2.134 4.09-2.134Zm-.776 2.626c-2.045 0-3.362 1.524-3.362 3.564 0 2.017 1.316 3.564 3.362 3.564 2.068 0 3.385-1.547 3.385-3.564 0-2.04-1.317-3.564-3.385-3.564ZM38.44 5.995c3.69 0 5.735 1.923 5.735 4.736v4.01c0 .704.259 1.032.94 1.079v2.415h-.94c-1.48-.024-2.445-.587-2.774-1.642-.587.844-1.81 1.83-3.855 1.83-2.797 0-4.913-1.595-4.913-4.01 0-2.392 1.81-3.682 4.748-3.682h3.903c0-1.43-1.105-2.344-2.845-2.344-1.645 0-2.303.89-2.468 1.195h-3.033c.236-1.266 1.764-3.587 5.501-3.587Zm-.565 6.776c-1.387 0-2.28.516-2.28 1.595 0 1.149 1.081 1.829 2.586 1.829 1.692 0 3.103-.844 3.103-2.415V12.77h-3.409Z" clip-rule="evenodd"/><path className="apify-logo" fill="#000" d="M63.47 18.164h-3.009V6.3h3.01v11.864ZM63.518 4.4H60.39V.837h3.127v3.565Z"/>
41
+ <path
42
+ fill="#246DFF"
43
+ d="M13.785 0h9.889c.201 0 .364.163.364.363v15.074c0 .361-.47.501-.669.2L13.48.561A.363.363 0 0 1 13.785 0Z"
44
+ />
45
+ <path
46
+ fill="#20A34E"
47
+ d="M10.253 0H.364A.364.364 0 0 0 0 .363v15.074c0 .361.47.501.669.2L10.558.561A.363.363 0 0 0 10.253 0Z"
48
+ />
49
+ <path
50
+ fill="#F86606"
51
+ d="M11.85 12.069.616 23.358a.363.363 0 0 0 .259.62h22.298a.363.363 0 0 0 .26-.618L12.37 12.07a.365.365 0 0 0-.52-.001Z"
52
+ />
53
+ <path
54
+ className="apify-logo"
55
+ fill="#000"
56
+ d="M77.267 3.298H73.06c-1.317 0-1.881.657-1.881 1.853V6.3h6.13l3.503 8.066L84.315 6.3h3.056l-7.335 16.859h-3.009l2.257-5.206-4.195-9.12h-3.91v9.331H68.17V8.832h-3.268V6.3h3.268V4.565c0-2.298 1.27-3.658 3.973-3.658h5.124v2.391Z"
57
+ />
58
+ <path
59
+ className="apify-logo"
60
+ fill="#000"
61
+ fill-rule="evenodd"
62
+ d="M53.32 6.042c3.102 0 5.641 2.321 5.641 6.19 0 3.893-2.538 6.19-5.641 6.19-2.586 0-3.88-1.594-4.114-2.063v6.776h-2.962V6.3h2.985v1.876c.212-.446 1.505-2.134 4.09-2.134Zm-.776 2.626c-2.045 0-3.362 1.524-3.362 3.564 0 2.017 1.316 3.564 3.362 3.564 2.068 0 3.385-1.547 3.385-3.564 0-2.04-1.317-3.564-3.385-3.564ZM38.44 5.995c3.69 0 5.735 1.923 5.735 4.736v4.01c0 .704.259 1.032.94 1.079v2.415h-.94c-1.48-.024-2.445-.587-2.774-1.642-.587.844-1.81 1.83-3.855 1.83-2.797 0-4.913-1.595-4.913-4.01 0-2.392 1.81-3.682 4.748-3.682h3.903c0-1.43-1.105-2.344-2.845-2.344-1.645 0-2.303.89-2.468 1.195h-3.033c.236-1.266 1.764-3.587 5.501-3.587Zm-.565 6.776c-1.387 0-2.28.516-2.28 1.595 0 1.149 1.081 1.829 2.586 1.829 1.692 0 3.103-.844 3.103-2.415V12.77h-3.409Z"
63
+ clip-rule="evenodd"
64
+ />
65
+ <path
66
+ className="apify-logo"
67
+ fill="#000"
68
+ d="M63.47 18.164h-3.009V6.3h3.01v11.864ZM63.518 4.4H60.39V.837h3.127v3.565Z"
69
+ />
39
70
  </svg>
40
71
  </Link>
41
- <CodeBlock {...props} className={clsx(styles.codeBlock, 'code-block', props.title != null ? 'has-title' : 'no-title')}>
42
- { children.code }
72
+ <CodeBlock
73
+ {...props}
74
+ className={clsx(styles.codeBlock, 'code-block', props.title != null ? 'has-title' : 'no-title')}
75
+ >
76
+ {children.code}
43
77
  </CodeBlock>
44
78
  </div>
45
79
  );
@@ -32,9 +32,7 @@ export function Link(props) {
32
32
  const { siteConfig } = useDocusaurusContext();
33
33
 
34
34
  if (matchesCurrentInstance(props.href, siteConfig.baseUrl)) {
35
- return <RouterLink {...props}>
36
- {props.children}
37
- </RouterLink>;
35
+ return <RouterLink {...props}>{props.children}</RouterLink>;
38
36
  }
39
37
 
40
38
  return <a {...props}>{props.children}</a>;
@@ -45,14 +43,17 @@ export default function SearchBar({ onClick }) {
45
43
  const location = useLocation();
46
44
  const history = useHistory();
47
45
 
48
- const navigate = useCallback((href) => {
49
- const shortHref = href.substring('https://docs.apify.com'.length);
46
+ const navigate = useCallback(
47
+ (href) => {
48
+ const shortHref = href.substring('https://docs.apify.com'.length);
50
49
 
51
- if (matchesCurrentInstance(shortHref, siteConfig.baseUrl)) {
52
- return history.push(shortHref);
53
- }
54
- return window.location.assign(href);
55
- }, [history, siteConfig.baseUrl]);
50
+ if (matchesCurrentInstance(shortHref, siteConfig.baseUrl)) {
51
+ return history.push(shortHref);
52
+ }
53
+ return window.location.assign(href);
54
+ },
55
+ [history, siteConfig.baseUrl],
56
+ );
56
57
 
57
58
  const getVersion = useCallback(() => {
58
59
  const match = location.pathname.match(/\/(\d+\.\d+|next)/);
@@ -64,17 +65,16 @@ export default function SearchBar({ onClick }) {
64
65
  <BrowserOnly>
65
66
  {() => (
66
67
  <div className="SearchButton-Container">
67
-
68
- <div onClick={onClick} className="AlgoliaContainer" style={{ marginRight: '12px' }}>
69
- <ApifySearch
70
- algoliaAppId={siteConfig.themeConfig.algolia.appId}
71
- algoliaIndexName='apify_sdk_v2'
72
- algoliaKey={siteConfig.themeConfig.algolia.apiKey}
73
- filters={`version:${getVersion()}`}
74
- navigate={navigate}
75
- />
76
- </div>
77
- <KapaAIButton />
68
+ <div onClick={onClick} className="AlgoliaContainer" style={{ marginRight: '12px' }}>
69
+ <ApifySearch
70
+ algoliaAppId={siteConfig.themeConfig.algolia.appId}
71
+ algoliaIndexName="apify_sdk_v2"
72
+ algoliaKey={siteConfig.themeConfig.algolia.apiKey}
73
+ filters={`version:${getVersion()}`}
74
+ navigate={navigate}
75
+ />
76
+ </div>
77
+ <KapaAIButton />
78
78
  </div>
79
79
  )}
80
80
  </BrowserOnly>