@apify/docs-theme 1.0.102 → 1.0.104
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 +2 -1
- package/src/roa-loader/index.js +2 -1
- package/src/theme/DocBreadcrumbs/Items/Home/index.js +3 -2
- package/src/theme/DocBreadcrumbs/index.js +4 -4
- package/src/theme/Footer/LinkItem/index.js +3 -3
- package/src/theme/Footer/index.module.css +1 -1
- package/src/theme/Logo/index.js +2 -2
- package/src/theme/MDXComponents/A.js +5 -2
- package/src/theme/MDXComponents/Code.js +1 -1
- package/src/theme/MDXComponents/Details.js +1 -1
- package/src/theme/MDXComponents/Head.js +1 -1
- package/src/theme/MDXComponents/Heading.js +1 -1
- package/src/theme/MDXComponents/Img/index.js +2 -2
- package/src/theme/MDXComponents/Pre.js +1 -1
- package/src/theme/MDXComponents/Ul/index.js +2 -2
- package/src/theme/MDXComponents/index.js +7 -6
- package/src/theme/SearchBar/index.js +3 -5
- package/src/theme/SearchMetadata/index.js +2 -2
- package/src/theme/custom.css +12 -3
- package/src/theme.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/docs-theme",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.104",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"prism-react-renderer": "^2.0.6"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
+
"clsx": "*",
|
|
32
33
|
"react": "*",
|
|
33
34
|
"react-dom": "*"
|
|
34
35
|
}
|
package/src/roa-loader/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
const { urlToRequest } = require('loader-utils');
|
|
2
1
|
const { inspect } = require('util');
|
|
3
2
|
|
|
3
|
+
const { urlToRequest } = require('loader-utils');
|
|
4
|
+
|
|
4
5
|
const signingUrl = new URL('https://api.apify.com/v2/tools/encode-and-sign');
|
|
5
6
|
signingUrl.searchParams.set('token', process.env.APIFY_SIGNING_TOKEN);
|
|
6
7
|
const queue = [];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import Link from '@docusaurus/Link';
|
|
3
|
-
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
4
2
|
import { useLocation } from '@docusaurus/router';
|
|
5
3
|
import { translate } from '@docusaurus/Translate';
|
|
4
|
+
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
6
5
|
import IconHome from '@theme/Icon/Home';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
7
8
|
import styles from './styles.module.css';
|
|
8
9
|
|
|
9
10
|
export default function HomeBreadcrumbItem() {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
3
|
-
import clsx from 'clsx';
|
|
1
|
+
import Link from '@docusaurus/Link';
|
|
4
2
|
import { ThemeClassNames } from '@docusaurus/theme-common';
|
|
5
3
|
import {
|
|
6
4
|
useSidebarBreadcrumbs,
|
|
7
5
|
useHomePageRoute,
|
|
8
6
|
} from '@docusaurus/theme-common/internal';
|
|
9
|
-
import Link from '@docusaurus/Link';
|
|
10
7
|
import { translate } from '@docusaurus/Translate';
|
|
11
8
|
import HomeBreadcrumbItem from '@theme/DocBreadcrumbs/Items/Home';
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
|
|
12
12
|
import styles from './styles.module.css';
|
|
13
13
|
|
|
14
14
|
// TODO move to design system folder
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import isInternalUrl_ from '@docusaurus/isInternalUrl';
|
|
2
2
|
import Link from '@docusaurus/Link';
|
|
3
3
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
4
|
-
import isInternalUrl_ from '@docusaurus/isInternalUrl';
|
|
5
|
-
import IconExternalLink from '@theme/Icon/ExternalLink';
|
|
6
4
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
5
|
+
import IconExternalLink from '@theme/Icon/ExternalLink';
|
|
6
|
+
import React from 'react';
|
|
7
7
|
|
|
8
8
|
export default function FooterLinkItem({ item }) {
|
|
9
9
|
const {
|
package/src/theme/Logo/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import Link from '@docusaurus/Link';
|
|
2
|
+
import { useThemeConfig } from '@docusaurus/theme-common';
|
|
3
3
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
4
4
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
5
|
-
import { useThemeConfig } from '@docusaurus/theme-common';
|
|
6
5
|
import ThemedImage from '@theme/ThemedImage';
|
|
6
|
+
import React from 'react';
|
|
7
7
|
|
|
8
8
|
function LogoThemedImage({ logo, alt, imageClassName }) {
|
|
9
9
|
const sources = {
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
3
1
|
import Link from '@docusaurus/Link';
|
|
2
|
+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
4
5
|
import { isDifferentInstance } from '../../utils';
|
|
5
6
|
|
|
6
7
|
export default function MDXA(props) {
|
|
7
8
|
const { siteConfig } = useDocusaurusContext();
|
|
8
9
|
|
|
10
|
+
// absolute links in README, e.g. in the SDK or API Client docs, need to be converted to local `to` links
|
|
9
11
|
if (props.href?.startsWith(siteConfig.url) && isDifferentInstance(siteConfig.baseUrl)) {
|
|
10
12
|
const { href, ...rest } = props;
|
|
11
13
|
rest.to = props.href.replace(siteConfig.url + siteConfig.baseUrl, '/');
|
|
12
14
|
props = rest;
|
|
13
15
|
}
|
|
14
16
|
|
|
17
|
+
// links to a different docusaurus instance cannot go through the client side navigation, we need a hard redirect
|
|
15
18
|
if (props.href && isDifferentInstance(props.href)) {
|
|
16
19
|
return <a {...props} onClick={((e) => {
|
|
17
20
|
e.preventDefault();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import Head from '@docusaurus/Head';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
// MDX elements are wrapped through the MDX pragma. In some cases (notably usage
|
|
4
4
|
// with Head/Helmet) we need to unwrap those elements.
|
|
5
5
|
function unwrapMDXElement(element) {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import MDXHead from '@theme/MDXComponents/Head';
|
|
3
|
-
import MDXCode from '@theme/MDXComponents/Code';
|
|
1
|
+
import Admonition from '@theme/Admonition';
|
|
4
2
|
import MDXA from '@theme/MDXComponents/A';
|
|
5
|
-
import
|
|
3
|
+
import MDXCode from '@theme/MDXComponents/Code';
|
|
6
4
|
import MDXDetails from '@theme/MDXComponents/Details';
|
|
5
|
+
import MDXHead from '@theme/MDXComponents/Head';
|
|
7
6
|
import MDXHeading from '@theme/MDXComponents/Heading';
|
|
8
|
-
import MDXUl from '@theme/MDXComponents/Ul';
|
|
9
7
|
import MDXImg from '@theme/MDXComponents/Img';
|
|
10
|
-
import
|
|
8
|
+
import MDXPre from '@theme/MDXComponents/Pre';
|
|
9
|
+
import MDXUl from '@theme/MDXComponents/Ul';
|
|
11
10
|
import Mermaid from '@theme/Mermaid';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
|
|
12
13
|
import RunnableCodeBlock from '../RunnableCodeBlock/RunnableCodeBlock';
|
|
13
14
|
|
|
14
15
|
const MDXComponents = {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
2
|
-
|
|
3
1
|
import { ApifySearch } from '@apify/docs-search-modal';
|
|
4
|
-
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
5
|
-
import { useLocation, useHistory } from '@docusaurus/router';
|
|
6
2
|
import BrowserOnly from '@docusaurus/BrowserOnly';
|
|
7
|
-
|
|
8
3
|
import RouterLink from '@docusaurus/Link';
|
|
4
|
+
import { useLocation, useHistory } from '@docusaurus/router';
|
|
5
|
+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
6
|
+
import React, { useCallback } from 'react';
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
9
|
* Tests whether the given href is pointing to the current docusaurus instance (so we can use the router link).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import Head from '@docusaurus/Head';
|
|
3
|
-
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
4
2
|
import { useThemeConfig } from '@docusaurus/theme-common';
|
|
3
|
+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
4
|
+
import React from 'react';
|
|
5
5
|
|
|
6
6
|
export default function SearchMetadata({ locale, version, tag }) {
|
|
7
7
|
const { siteConfig } = useDocusaurusContext();
|
package/src/theme/custom.css
CHANGED
|
@@ -18,6 +18,10 @@ html[data-theme='dark'] {
|
|
|
18
18
|
--ifm-navbar-height: 68px;
|
|
19
19
|
--ifm-line-height-base: 1.65;
|
|
20
20
|
|
|
21
|
+
--ifm-code-background: var(--ifm-pre-background) !important;
|
|
22
|
+
--ifm-footer-title-color: #f2f3fb;
|
|
23
|
+
--ifm-footer-link-color: #8d92af;
|
|
24
|
+
|
|
21
25
|
--docusaurus-highlighted-code-line-bg: rgba(255, 255, 255, 0.1);
|
|
22
26
|
--docsearch-text-color: #8d92af;
|
|
23
27
|
|
|
@@ -136,7 +140,6 @@ html[data-theme='dark'] {
|
|
|
136
140
|
--ifm-heading-margin-top: var(--ifm-heading-margin-bottom);
|
|
137
141
|
--ifm-hero-background-color: transparent;
|
|
138
142
|
|
|
139
|
-
--ifm-code-background: var(--ifm-pre-background) !important;
|
|
140
143
|
--ifm-code-padding-horizontal: 6.4px;
|
|
141
144
|
--ifm-code-padding-vertical: 3.2px;
|
|
142
145
|
|
|
@@ -155,10 +158,12 @@ html[data-theme='dark'] {
|
|
|
155
158
|
--ifm-link-hover-decoration: none;
|
|
156
159
|
|
|
157
160
|
--ifm-footer-background-color: #272c3d;
|
|
158
|
-
--ifm-footer-title-color: #
|
|
159
|
-
--ifm-footer-link-color: #
|
|
161
|
+
--ifm-footer-title-color: #60626e;
|
|
162
|
+
--ifm-footer-link-color: #6b6e80;
|
|
160
163
|
--max-layout-width: 1440px;
|
|
161
164
|
|
|
165
|
+
--ifm-code-background: #f6f8fa;
|
|
166
|
+
|
|
162
167
|
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
|
163
168
|
|
|
164
169
|
--ifm-heading-color: #242736;
|
|
@@ -574,6 +579,10 @@ header.hero div[class^=heroButtons] {
|
|
|
574
579
|
padding: var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal);
|
|
575
580
|
}
|
|
576
581
|
|
|
582
|
+
html[data-theme='dark'] .markdown code {
|
|
583
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
584
|
+
}
|
|
585
|
+
|
|
577
586
|
article .card h2 {
|
|
578
587
|
margin-top: 0;
|
|
579
588
|
}
|
package/src/theme.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
const postcssPreset = require('postcss-preset-env');
|
|
2
|
-
const path = require('path');
|
|
3
1
|
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
4
|
const axios = require('axios');
|
|
5
|
+
const postcssPreset = require('postcss-preset-env');
|
|
6
|
+
|
|
5
7
|
const { updateChangelog } = require('./markdown');
|
|
6
8
|
|
|
7
9
|
function findPathInParent(endPath) {
|