@apify/docs-theme 1.0.1 → 1.0.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/img/footer-apify-logo.svg +6 -0
- package/img/footer-open-source.svg +8 -0
- package/index.d.ts +9 -0
- package/index.js +20 -0
- package/package.json +2 -2
- package/theme/ColorModeToggle/index.d.ts +8 -0
- package/theme/ColorModeToggle/index.js +38 -0
- package/theme/ColorModeToggle/styles.module.css +53 -0
- package/theme/Footer/index.d.ts +4 -0
- package/theme/Footer/index.js +49 -0
- package/theme/Footer/index.module.css +46 -0
- package/theme/Icon/DarkMode/index.d.ts +4 -0
- package/theme/Icon/DarkMode/index.js +11 -0
- package/theme/Icon/LightMode/index.d.ts +4 -0
- package/theme/Icon/LightMode/index.js +23 -0
- package/theme/Navbar/Content/index.d.ts +1 -0
- package/theme/Navbar/Content/index.js +60 -0
- package/theme/Navbar/Content/styles.module.css +8 -0
- package/theme/NavbarItem/ComponentTypes.d.ts +20 -0
- package/theme/NavbarItem/ComponentTypes.js +64 -0
- package/theme/NavbarItem/NavbarNavLink.d.ts +11 -0
- package/theme/NavbarItem/NavbarNavLink.js +42 -0
- package/theme/NotFound.d.ts +1 -0
- package/theme/NotFound.js +69 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="91" height="25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M3.135 2.85A3.409 3.409 0 0 0 .227 6.699l2.016 14.398 8.483-19.304-7.59 1.059Z" fill="#97D700"/>
|
|
3
|
+
<path d="M23.604 14.847 22.811 3.78a3.414 3.414 0 0 0-3.64-3.154c-.077 0-.153.014-.228.025l-3.274.452 7.192 16.124a3.4 3.4 0 0 0 .743-2.379Z" fill="#71C5E8"/>
|
|
4
|
+
<path d="M5.336 24.595a3.39 3.39 0 0 0 1.706-.248l12.35-5.211L13.514 5.97 5.336 24.595Z" fill="#FF9013"/>
|
|
5
|
+
<path d="M33.83 5.304h3.903l5.448 14.623h-3.494l-1.022-2.994h-5.877l-1.025 2.994h-3.384L33.83 5.304Zm-.177 9.032h4.14l-2-5.994h-.086l-2.054 5.994Zm25.189-9.032h3.302v14.623h-3.302V5.304Zm5.792 0h10.71v2.7h-7.4v4.101h5.962v2.632h-5.963v5.186h-3.309V5.303Zm17.482 9.076-5.498-9.076h3.748l3.428 6.016h.085l3.599-6.016H91l-5.56 9.054v5.569h-3.324v-5.548ZM51.75 5.304h-7.292v14.623h3.3v-4.634h3.993a4.995 4.995 0 1 0 0-9.99Zm-.364 7.417h-3.628V7.875h3.627a2.423 2.423 0 0 1 0 4.846Z" fill="#fff"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
d="M23.85 21.4261L22.07 18.5161C22.0223 18.4379 21.998 18.3477 22 18.2561V14.1261C22 12.3461 20.29 11.0561 18.48 9.67613C18.4235 9.63333 18.3765 9.5792 18.342 9.51722C18.3076 9.45523 18.2865 9.38675 18.28 9.31613C18.2746 9.24341 18.2842 9.17036 18.3083 9.10153C18.3324 9.0327 18.3704 8.96959 18.42 8.91613C19.2176 8.18843 19.7543 7.21901 19.9476 6.15676C20.1409 5.09451 19.9801 3.99817 19.49 3.03613C19.1249 2.3284 18.5986 1.7164 17.9535 1.24953C17.3084 0.782657 16.5625 0.473992 15.7761 0.348443C14.9897 0.222895 14.1849 0.28398 13.4264 0.526769C12.668 0.769557 11.9773 1.18725 11.41 1.74613L10.35 2.74613C10.2604 2.83348 10.1402 2.88237 10.015 2.88237C9.88984 2.88237 9.76963 2.83348 9.68 2.74613L8.62 1.74613C8.05176 1.18725 7.36022 0.769615 6.60107 0.526864C5.84192 0.284114 5.03637 0.223031 4.24929 0.348535C3.46221 0.474039 2.71561 0.782623 2.0696 1.24944C1.42359 1.71625 0.896234 2.32824 0.529996 3.03613C0.0712553 3.97975 -0.0790193 5.04376 0.100451 6.07751C0.279922 7.11126 0.780043 8.06236 1.53 8.79613L9.29 16.7961C9.39004 16.8988 9.50986 16.98 9.64221 17.035C9.77456 17.09 9.91668 17.1176 10.06 17.1161C10.2048 17.1178 10.3485 17.0904 10.4825 17.0354C10.6165 16.9804 10.7381 16.899 10.84 16.7961C10.9225 16.7101 10.9793 16.6027 11.004 16.4861C11.0288 16.3695 11.0204 16.2483 10.98 16.1361C10.8286 15.6925 10.7607 15.2245 10.78 14.7561C10.8094 14.1798 10.9714 13.6181 11.2535 13.1146C11.5355 12.6112 11.9299 12.1796 12.406 11.8535C12.8821 11.5274 13.427 11.3156 13.9983 11.2345C14.5697 11.1535 15.152 11.2053 15.7 11.3861C15.7886 11.4152 15.8836 11.4184 15.9739 11.3954C16.0643 11.3724 16.1462 11.3241 16.21 11.2561L16.36 11.1061C16.445 11.0188 16.559 10.9655 16.6805 10.9563C16.8021 10.9471 16.9228 10.9826 17.02 11.0561L17.32 11.2861C18.54 12.2061 20.05 13.3561 20.05 14.1361V18.6861C20.0494 18.8734 20.1014 19.057 20.2 19.2161L22.2 22.4761C22.2519 22.6119 22.3328 22.7347 22.437 22.8361C22.5412 22.9374 22.6663 23.0148 22.8034 23.0628C22.9406 23.1109 23.0866 23.1285 23.2313 23.1143C23.376 23.1002 23.5158 23.0547 23.6411 22.981C23.7664 22.9073 23.8741 22.8072 23.9567 22.6876C24.0394 22.568 24.095 22.4319 24.1196 22.2886C24.1442 22.1454 24.1374 21.9985 24.0994 21.8581C24.0615 21.7178 23.9935 21.5875 23.9 21.4761L23.85 21.4261Z"
|
|
4
|
+
fill="#B3B8D2"/>
|
|
5
|
+
<path
|
|
6
|
+
d="M16.09 13.1961C15.6537 12.7991 15.0849 12.5791 14.495 12.5791C13.9051 12.5791 13.3363 12.7991 12.9 13.1961C12.6632 13.4054 12.4704 13.6597 12.333 13.9442C12.1955 14.2288 12.1161 14.5378 12.0993 14.8534C12.0826 15.169 12.1288 15.4847 12.2354 15.7822C12.3419 16.0797 12.5067 16.353 12.72 16.5861L14.35 18.3561C14.4307 18.4514 14.4765 18.5713 14.48 18.6961V19.6961C14.48 20.9961 16 22.2861 16.48 22.6461C16.6349 22.7659 16.8242 22.8325 17.02 22.8361C17.2022 22.8349 17.3795 22.7771 17.5275 22.6707C17.6754 22.5644 17.7867 22.4147 17.846 22.2424C17.9053 22.0701 17.9096 21.8836 17.8584 21.7087C17.8071 21.5339 17.7029 21.3792 17.56 21.2661C16.9911 20.869 16.5388 20.3269 16.25 19.6961V18.1261C16.2512 17.9074 16.1689 17.6964 16.02 17.5361L14.02 15.3561C13.9611 15.2977 13.9155 15.2272 13.8861 15.1496C13.8568 15.072 13.8445 14.9889 13.85 14.9061C13.8613 14.738 13.9364 14.5806 14.06 14.4661C14.1771 14.3621 14.3283 14.3047 14.485 14.3047C14.6416 14.3047 14.7929 14.3621 14.91 14.4661L16.91 16.3261C17.0797 16.4839 17.3052 16.5679 17.5368 16.5594C17.7684 16.551 17.9872 16.4509 18.145 16.2811C18.3028 16.1114 18.3867 15.8859 18.3783 15.6543C18.3698 15.4227 18.2697 15.2039 18.1 15.0461L16.09 13.1961Z"
|
|
7
|
+
fill="#B3B8D2"/>
|
|
8
|
+
</svg>
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function theme(context, opts) {
|
|
4
|
+
return {
|
|
5
|
+
name: "@apify/docs-theme",
|
|
6
|
+
getThemePath() {
|
|
7
|
+
return '../dist/theme';
|
|
8
|
+
},
|
|
9
|
+
getTypeScriptThemePath() {
|
|
10
|
+
return '../src/theme';
|
|
11
|
+
},
|
|
12
|
+
async contentLoaded({ content, actions }) {
|
|
13
|
+
const { setGlobalData } = actions;
|
|
14
|
+
setGlobalData({
|
|
15
|
+
opts,
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
exports.default = theme;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/docs-theme",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "./
|
|
5
|
+
"main": "./index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
8
|
"build": "rimraf ./dist && tsc && npm run copyStyles && npm run copyImages",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const _default: React.MemoExoticComponent<typeof ColorModeToggle>;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare function ColorModeToggle({ className, value, onChange }: {
|
|
4
|
+
className: any;
|
|
5
|
+
value: any;
|
|
6
|
+
onChange: any;
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
import React from "react";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
8
|
+
const useIsBrowser_1 = __importDefault(require("@docusaurus/useIsBrowser"));
|
|
9
|
+
const Translate_1 = require("@docusaurus/Translate");
|
|
10
|
+
const LightMode_1 = __importDefault(require("../Icon/LightMode"));
|
|
11
|
+
const DarkMode_1 = __importDefault(require("../Icon/DarkMode"));
|
|
12
|
+
const styles_module_css_1 = __importDefault(require("./styles.module.css"));
|
|
13
|
+
function ColorModeToggle({ className, value, onChange }) {
|
|
14
|
+
const isBrowser = (0, useIsBrowser_1.default)();
|
|
15
|
+
const title = (0, Translate_1.translate)({
|
|
16
|
+
message: 'Switch between dark and light mode (currently {mode})',
|
|
17
|
+
id: 'theme.colorToggle.ariaLabel',
|
|
18
|
+
description: 'The ARIA label for the navbar color mode toggle',
|
|
19
|
+
}, {
|
|
20
|
+
mode: value === 'dark'
|
|
21
|
+
? (0, Translate_1.translate)({
|
|
22
|
+
message: 'dark mode',
|
|
23
|
+
id: 'theme.colorToggle.ariaLabel.mode.dark',
|
|
24
|
+
description: 'The name for the dark color mode',
|
|
25
|
+
})
|
|
26
|
+
: (0, Translate_1.translate)({
|
|
27
|
+
message: 'light mode',
|
|
28
|
+
id: 'theme.colorToggle.ariaLabel.mode.light',
|
|
29
|
+
description: 'The name for the light color mode',
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
32
|
+
return (react_1.default.createElement("div", { className: (0, clsx_1.default)(styles_module_css_1.default.toggle, className) },
|
|
33
|
+
react_1.default.createElement("button", { className: (0, clsx_1.default)('clean-btn', styles_module_css_1.default.toggleButton, !isBrowser && styles_module_css_1.default.toggleButtonDisabled), type: "button", onClick: () => onChange(value === 'dark' ? 'light' : 'dark'), disabled: !isBrowser, title: title, "aria-label": title },
|
|
34
|
+
react_1.default.createElement("span", null,
|
|
35
|
+
react_1.default.createElement(LightMode_1.default, { className: (0, clsx_1.default)(styles_module_css_1.default.toggleIcon, styles_module_css_1.default.lightToggleIcon), width: 14, height: 14 }),
|
|
36
|
+
react_1.default.createElement(DarkMode_1.default, { className: (0, clsx_1.default)(styles_module_css_1.default.toggleIcon, styles_module_css_1.default.darkToggleIcon), width: 14, height: 14 })))));
|
|
37
|
+
}
|
|
38
|
+
exports.default = react_1.default.memo(ColorModeToggle);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.toggle {
|
|
2
|
+
padding: 3px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.toggleButton {
|
|
6
|
+
width: 52px;
|
|
7
|
+
height: 26px;
|
|
8
|
+
background: #cfd4eb;
|
|
9
|
+
border-radius: 160px;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
transition: all var(--ifm-transition-fast);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[data-theme='dark'] .toggleButton {
|
|
16
|
+
background: #585e76;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.toggleButton span {
|
|
20
|
+
-webkit-tap-highlight-color: transparent;
|
|
21
|
+
align-items: center;
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
width: 20px;
|
|
25
|
+
height: 20px;
|
|
26
|
+
border-radius: 50%;
|
|
27
|
+
background: #fff;
|
|
28
|
+
vertical-align: middle;
|
|
29
|
+
margin: 3px;
|
|
30
|
+
position: relative;
|
|
31
|
+
transition: all var(--ifm-transition-fast);
|
|
32
|
+
left: 0;
|
|
33
|
+
color: #585e76;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-theme='dark'] .toggleButton span {
|
|
37
|
+
background: #1a1b23;
|
|
38
|
+
color: #b3b8d2;
|
|
39
|
+
left: 25px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.toggleButton:hover span {
|
|
43
|
+
background: var(--ifm-color-emphasis-200);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[data-theme='light'] .darkToggleIcon,
|
|
47
|
+
[data-theme='dark'] .lightToggleIcon {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.toggleButtonDisabled {
|
|
52
|
+
cursor: not-allowed;
|
|
53
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
8
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
9
|
+
const theme_common_1 = require("@docusaurus/theme-common");
|
|
10
|
+
const LinkItem_1 = __importDefault(require("@theme/Footer/LinkItem"));
|
|
11
|
+
const index_module_css_1 = __importDefault(require("./index.module.css"));
|
|
12
|
+
function FooterLinksColumn({ column }) {
|
|
13
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
14
|
+
react_1.default.createElement("div", { className: index_module_css_1.default.footerTitle }, column.title),
|
|
15
|
+
react_1.default.createElement("ul", { className: (0, clsx_1.default)(index_module_css_1.default.footerItem, 'clean-list') }, column.items.map((item, i) => (react_1.default.createElement("li", { key: i, className: "footer__item" },
|
|
16
|
+
react_1.default.createElement(LinkItem_1.default, { item: item })))))));
|
|
17
|
+
}
|
|
18
|
+
function Footer() {
|
|
19
|
+
const { footer } = (0, theme_common_1.useThemeConfig)();
|
|
20
|
+
if (!footer) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const { links, style } = footer;
|
|
24
|
+
const OpenSourceIcon = require('../../img/footer-open-source.svg').default;
|
|
25
|
+
const ApifyLogo = require('../../img/footer-apify-logo.svg').default;
|
|
26
|
+
return (react_1.default.createElement("footer", { className: (0, clsx_1.default)(index_module_css_1.default.footer, style) },
|
|
27
|
+
react_1.default.createElement("div", { className: "container padding-horiz--lg" },
|
|
28
|
+
react_1.default.createElement("div", { className: "row" },
|
|
29
|
+
react_1.default.createElement("div", { className: "col col--5" },
|
|
30
|
+
react_1.default.createElement("div", { className: "row" },
|
|
31
|
+
react_1.default.createElement("div", { className: "col col--6" },
|
|
32
|
+
react_1.default.createElement(FooterLinksColumn, { column: links[0] })),
|
|
33
|
+
react_1.default.createElement("div", { className: "col col--6" },
|
|
34
|
+
react_1.default.createElement(FooterLinksColumn, { column: links[1] })))),
|
|
35
|
+
react_1.default.createElement("div", { className: "col col--7" },
|
|
36
|
+
react_1.default.createElement("div", { className: "row" },
|
|
37
|
+
react_1.default.createElement("div", { className: "col col--3 col--offset-9" },
|
|
38
|
+
react_1.default.createElement(FooterLinksColumn, { column: links[2] }))))),
|
|
39
|
+
react_1.default.createElement("div", { className: "row padding-vert--md padding-top--lg" },
|
|
40
|
+
react_1.default.createElement("div", { className: "col padding-vert--md col--6" },
|
|
41
|
+
react_1.default.createElement("div", { className: index_module_css_1.default.freeAndOpenSource },
|
|
42
|
+
react_1.default.createElement(OpenSourceIcon, { className: index_module_css_1.default.alignMiddle }),
|
|
43
|
+
react_1.default.createElement("span", { className: index_module_css_1.default.alignMiddle }, "Blablabla, bla bla bla. This component is from the common theme!"))),
|
|
44
|
+
react_1.default.createElement("div", { className: "col padding-vert--md col--6 text--right" },
|
|
45
|
+
react_1.default.createElement("span", { className: index_module_css_1.default.builtBy },
|
|
46
|
+
react_1.default.createElement("span", { className: index_module_css_1.default.alignMiddle }, "Built by"),
|
|
47
|
+
react_1.default.createElement(ApifyLogo, { className: index_module_css_1.default.alignMiddle })))))));
|
|
48
|
+
}
|
|
49
|
+
exports.default = react_1.default.memo(Footer);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.footer {
|
|
2
|
+
background: #272c3d;
|
|
3
|
+
padding-top: 64px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.builtBy {
|
|
7
|
+
color: #b3b8d2;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.builtBy svg {
|
|
11
|
+
margin-left: 10px;
|
|
12
|
+
width: 90px;
|
|
13
|
+
height: 24px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.freeAndOpenSource {
|
|
17
|
+
color: #b3b8d2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.alignMiddle {
|
|
21
|
+
vertical-align: middle;
|
|
22
|
+
display: inline-block;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.freeAndOpenSource svg {
|
|
26
|
+
margin-right: 10px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.freeAndOpenSource svg path {
|
|
30
|
+
fill: #b3b8d2 !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.footer .footer__item svg path {
|
|
34
|
+
fill: #6f7490;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.footerTitle {
|
|
38
|
+
font-family: 'Lota Grotesque', sans-serif;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
line-height: 20px;
|
|
42
|
+
letter-spacing: 0.1em;
|
|
43
|
+
text-transform: uppercase;
|
|
44
|
+
color: #8d92af;
|
|
45
|
+
margin-bottom: 20px;
|
|
46
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
function IconDarkMode(props) {
|
|
8
|
+
return (react_1.default.createElement("svg", { viewBox: "0 0 13 12", width: 14, height: 14, ...props },
|
|
9
|
+
react_1.default.createElement("path", { d: "M10.7001 6.39501C10.6215 7.24611 10.3021 8.05721 9.77927 8.7334C9.25646 9.40959 8.55189 9.92291 7.748 10.2133C6.9441 10.5036 6.07414 10.5591 5.2399 10.3731C4.40565 10.187 3.64164 9.76728 3.03726 9.1629C2.43287 8.55851 2.01312 7.7945 1.8271 6.96026C1.64108 6.12602 1.6965 5.25605 1.98688 4.45216C2.27725 3.64826 2.79056 2.94369 3.46675 2.42088C4.14294 1.89808 4.95404 1.57866 5.80515 1.50001C5.30685 2.17414 5.06707 3.00473 5.12941 3.84071C5.19175 4.6767 5.55208 5.46254 6.14485 6.05531C6.73762 6.64808 7.52346 7.0084 8.35944 7.07074C9.19542 7.13308 10.026 6.8933 10.7001 6.39501Z", stroke: "currentColor", fill: "transparent", strokeLinecap: "round", strokeLinejoin: "round" })));
|
|
10
|
+
}
|
|
11
|
+
exports.default = react_1.default.memo(IconDarkMode);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
function IconLightMode(props) {
|
|
8
|
+
return (react_1.default.createElement("svg", { viewBox: "0 0 13 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", width: 14, height: 14, ...props },
|
|
9
|
+
react_1.default.createElement("g", { clipPath: "url(#clip0_833_8168)" },
|
|
10
|
+
react_1.default.createElement("path", { d: "M6.59998 8.49999C7.98069 8.49999 9.09998 7.3807 9.09998 5.99999C9.09998 4.61928 7.98069 3.49999 6.59998 3.49999C5.21926 3.49999 4.09998 4.61928 4.09998 5.99999C4.09998 7.3807 5.21926 8.49999 6.59998 8.49999Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
11
|
+
react_1.default.createElement("path", { d: "M6.59985 0.5V1.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M6.59985 10.5V11.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
13
|
+
react_1.default.createElement("path", { d: "M2.7099 2.11L3.4199 2.82", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
14
|
+
react_1.default.createElement("path", { d: "M9.77991 9.17999L10.4899 9.88999", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
15
|
+
react_1.default.createElement("path", { d: "M1.09998 6H2.09998", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
16
|
+
react_1.default.createElement("path", { d: "M11.0999 6H12.0999", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
17
|
+
react_1.default.createElement("path", { d: "M2.7099 9.88999L3.4199 9.17999", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
18
|
+
react_1.default.createElement("path", { d: "M9.77991 2.82L10.4899 2.11", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })),
|
|
19
|
+
react_1.default.createElement("defs", null,
|
|
20
|
+
react_1.default.createElement("clipPath", { id: "clip0_833_8168" },
|
|
21
|
+
react_1.default.createElement("rect", { width: "12", height: "12", fill: "white", transform: "translate(0.599976)" })))));
|
|
22
|
+
}
|
|
23
|
+
exports.default = react_1.default.memo(IconLightMode);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function NavbarContent(): JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const theme_common_1 = require("@docusaurus/theme-common");
|
|
8
|
+
const useGlobalData_1 = require("@docusaurus/useGlobalData");
|
|
9
|
+
const useDocusaurusContext_1 = __importDefault(require("@docusaurus/useDocusaurusContext"));
|
|
10
|
+
const internal_1 = require("@docusaurus/theme-common/internal");
|
|
11
|
+
const styles_module_css_1 = __importDefault(require("./styles.module.css"));
|
|
12
|
+
const Logo_1 = __importDefault(require("@theme/Navbar/Logo"));
|
|
13
|
+
const NavbarItem_1 = __importDefault(require("@theme/NavbarItem"));
|
|
14
|
+
const ColorModeToggle_1 = __importDefault(require("@theme/Navbar/ColorModeToggle"));
|
|
15
|
+
const Search_1 = __importDefault(require("@theme/Navbar/Search"));
|
|
16
|
+
const SearchBar_1 = __importDefault(require("@theme/SearchBar"));
|
|
17
|
+
const Toggle_1 = __importDefault(require("@theme/Navbar/MobileSidebar/Toggle"));
|
|
18
|
+
function NavbarItems({ items }) {
|
|
19
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, items.map((item, i) => (react_1.default.createElement(NavbarItem_1.default, { ...item, key: i })))));
|
|
20
|
+
}
|
|
21
|
+
function NavbarContentLayout({ left, right }) {
|
|
22
|
+
return (react_1.default.createElement("div", { className: "navbar__inner" },
|
|
23
|
+
react_1.default.createElement("div", { className: "navbar__items" }, left),
|
|
24
|
+
react_1.default.createElement("div", { className: "navbar__items navbar__items--right" }, right)));
|
|
25
|
+
}
|
|
26
|
+
function SubNavbar() {
|
|
27
|
+
const { subNavbar } = (0, useGlobalData_1.usePluginData)('@apify/docs-theme').opts;
|
|
28
|
+
const pageTitle = (0, useDocusaurusContext_1.default)().siteConfig.title;
|
|
29
|
+
return (subNavbar ? (react_1.default.createElement("div", { className: "navbar__inner" },
|
|
30
|
+
react_1.default.createElement("div", { className: "navbar__items" },
|
|
31
|
+
react_1.default.createElement(NavbarItems, { items: [
|
|
32
|
+
{
|
|
33
|
+
label: pageTitle,
|
|
34
|
+
to: '/',
|
|
35
|
+
},
|
|
36
|
+
...subNavbar,
|
|
37
|
+
] })))) : null);
|
|
38
|
+
}
|
|
39
|
+
function NavbarContent() {
|
|
40
|
+
const items = (0, theme_common_1.useThemeConfig)().navbar.items;
|
|
41
|
+
const [leftItems, rightItems] = (0, internal_1.splitNavbarItems)(items);
|
|
42
|
+
const searchBarItem = items.find((item) => item.type === 'search');
|
|
43
|
+
return (react_1.default.createElement("div", { style: {
|
|
44
|
+
width: "100%",
|
|
45
|
+
height: "100%",
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
display: "flex",
|
|
48
|
+
flexDirection: "column",
|
|
49
|
+
} },
|
|
50
|
+
react_1.default.createElement(NavbarContentLayout, { left: react_1.default.createElement(react_1.default.Fragment, null,
|
|
51
|
+
react_1.default.createElement(Toggle_1.default, null),
|
|
52
|
+
react_1.default.createElement(Logo_1.default, null),
|
|
53
|
+
react_1.default.createElement(NavbarItems, { items: leftItems })), right: react_1.default.createElement(react_1.default.Fragment, null,
|
|
54
|
+
react_1.default.createElement(ColorModeToggle_1.default, { className: styles_module_css_1.default.colorModeToggle }),
|
|
55
|
+
react_1.default.createElement(NavbarItems, { items: rightItems }),
|
|
56
|
+
!searchBarItem && (react_1.default.createElement(Search_1.default, null,
|
|
57
|
+
react_1.default.createElement(SearchBar_1.default, null)))) }),
|
|
58
|
+
react_1.default.createElement(SubNavbar, null)));
|
|
59
|
+
}
|
|
60
|
+
exports.default = NavbarContent;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default ComponentTypes;
|
|
2
|
+
declare const ComponentTypes: {
|
|
3
|
+
default: any;
|
|
4
|
+
localeDropdown: any;
|
|
5
|
+
search: any;
|
|
6
|
+
dropdown: any;
|
|
7
|
+
html: any;
|
|
8
|
+
'custom-api': typeof ApiNavbarItem;
|
|
9
|
+
doc: typeof DocNavbarItem;
|
|
10
|
+
docSidebar: any;
|
|
11
|
+
docsVersion: any;
|
|
12
|
+
docsVersionDropdown: any;
|
|
13
|
+
};
|
|
14
|
+
declare function ApiNavbarItem(ctx: any): JSX.Element;
|
|
15
|
+
declare function DocNavbarItem({ docId, label: staticLabel, docsPluginId, ...props }: {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
docId: any;
|
|
18
|
+
label: any;
|
|
19
|
+
docsPluginId: any;
|
|
20
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const DefaultNavbarItem_1 = __importDefault(require("@theme/NavbarItem/DefaultNavbarItem"));
|
|
7
|
+
const DropdownNavbarItem_1 = __importDefault(require("@theme/NavbarItem/DropdownNavbarItem"));
|
|
8
|
+
const LocaleDropdownNavbarItem_1 = __importDefault(require("@theme/NavbarItem/LocaleDropdownNavbarItem"));
|
|
9
|
+
const SearchNavbarItem_1 = __importDefault(require("@theme/NavbarItem/SearchNavbarItem"));
|
|
10
|
+
const HtmlNavbarItem_1 = __importDefault(require("@theme/NavbarItem/HtmlNavbarItem"));
|
|
11
|
+
const DocSidebarNavbarItem_1 = __importDefault(require("@theme/NavbarItem/DocSidebarNavbarItem"));
|
|
12
|
+
const DocsVersionNavbarItem_1 = __importDefault(require("@theme/NavbarItem/DocsVersionNavbarItem"));
|
|
13
|
+
const DocsVersionDropdownNavbarItem_1 = __importDefault(require("@theme/NavbarItem/DocsVersionDropdownNavbarItem"));
|
|
14
|
+
const internal_1 = require("@docusaurus/theme-common/internal");
|
|
15
|
+
const useDocusaurusContext_1 = __importDefault(require("@docusaurus/useDocusaurusContext"));
|
|
16
|
+
const react_1 = __importDefault(require("react"));
|
|
17
|
+
// const versions = require('../../../versions.json');
|
|
18
|
+
//
|
|
19
|
+
// const stable = versions[0];
|
|
20
|
+
const stable = '1';
|
|
21
|
+
function DocNavbarItem({ docId, label: staticLabel, docsPluginId, ...props }) {
|
|
22
|
+
const doc = (0, internal_1.useLayoutDoc)(docId, docsPluginId);
|
|
23
|
+
// Draft items are not displayed in the navbar.
|
|
24
|
+
if (doc === null) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return (react_1.default.createElement(DefaultNavbarItem_1.default, { exact: true, ...props, label: staticLabel ?? doc.id, to: doc.path }));
|
|
28
|
+
}
|
|
29
|
+
function ApiNavbarItem(ctx) {
|
|
30
|
+
let version = {};
|
|
31
|
+
try {
|
|
32
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
33
|
+
version = (0, internal_1.useDocsVersion)();
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
version.version = stable;
|
|
37
|
+
}
|
|
38
|
+
const { siteConfig } = (0, useDocusaurusContext_1.default)();
|
|
39
|
+
if (siteConfig.presets[0][1].docs.disableVersioning || version.version === stable) {
|
|
40
|
+
return (react_1.default.createElement(DefaultNavbarItem_1.default, { exact: true, ...ctx, label: ctx.label, to: `api/${ctx.to}` }));
|
|
41
|
+
}
|
|
42
|
+
// skip changelog button for older versions
|
|
43
|
+
if (+version.version < 3 && ctx.className === 'changelog') {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
// link directly to the old API docs under /docs/x.x/api
|
|
47
|
+
if (+version.version < 3) {
|
|
48
|
+
return (react_1.default.createElement(DefaultNavbarItem_1.default, { exact: true, ...ctx, label: ctx.label, to: `docs/${version.version === 'current' ? 'next' : version.version}/api/${ctx.to}` }));
|
|
49
|
+
}
|
|
50
|
+
return (react_1.default.createElement(DefaultNavbarItem_1.default, { exact: true, ...ctx, label: ctx.label, to: `api/${version.version === 'current' ? 'next' : version.version}/${ctx.to}` }));
|
|
51
|
+
}
|
|
52
|
+
const ComponentTypes = {
|
|
53
|
+
'default': DefaultNavbarItem_1.default,
|
|
54
|
+
'localeDropdown': LocaleDropdownNavbarItem_1.default,
|
|
55
|
+
'search': SearchNavbarItem_1.default,
|
|
56
|
+
'dropdown': DropdownNavbarItem_1.default,
|
|
57
|
+
'html': HtmlNavbarItem_1.default,
|
|
58
|
+
'custom-api': ApiNavbarItem,
|
|
59
|
+
'doc': DocNavbarItem,
|
|
60
|
+
'docSidebar': DocSidebarNavbarItem_1.default,
|
|
61
|
+
'docsVersion': DocsVersionNavbarItem_1.default,
|
|
62
|
+
'docsVersionDropdown': DocsVersionDropdownNavbarItem_1.default,
|
|
63
|
+
};
|
|
64
|
+
exports.default = ComponentTypes;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default function NavbarNavLink({ activeBasePath, activeBaseRegex, to, href, label, html, isDropdownLink, prependBaseUrlToHref, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
activeBasePath: any;
|
|
4
|
+
activeBaseRegex: any;
|
|
5
|
+
to: any;
|
|
6
|
+
href: any;
|
|
7
|
+
label: any;
|
|
8
|
+
html: any;
|
|
9
|
+
isDropdownLink: any;
|
|
10
|
+
prependBaseUrlToHref: any;
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const Link_1 = __importDefault(require("@docusaurus/Link"));
|
|
8
|
+
const useBaseUrl_1 = __importDefault(require("@docusaurus/useBaseUrl"));
|
|
9
|
+
const isInternalUrl_1 = __importDefault(require("@docusaurus/isInternalUrl"));
|
|
10
|
+
const router_1 = require("@docusaurus/router");
|
|
11
|
+
const theme_common_1 = require("@docusaurus/theme-common");
|
|
12
|
+
function NavbarNavLink({ activeBasePath, activeBaseRegex, to, href, label, html, isDropdownLink, prependBaseUrlToHref, ...props }) {
|
|
13
|
+
const location = (0, router_1.useLocation)();
|
|
14
|
+
// TODO all this seems hacky
|
|
15
|
+
// {to: 'version'} should probably be forbidden, in favor of {to: '/version'}
|
|
16
|
+
const toUrl = (0, useBaseUrl_1.default)(to);
|
|
17
|
+
const activeBaseUrl = (0, useBaseUrl_1.default)(activeBasePath);
|
|
18
|
+
const normalizedHref = (0, useBaseUrl_1.default)(href, { forcePrependBaseUrl: true });
|
|
19
|
+
// const isExternalLink = label && href && !isInternalUrl(href);
|
|
20
|
+
const isExternalLink = false;
|
|
21
|
+
// Link content is set through html XOR label
|
|
22
|
+
const linkContentProps = html
|
|
23
|
+
? { dangerouslySetInnerHTML: { __html: html } }
|
|
24
|
+
: {
|
|
25
|
+
children: (react_1.default.createElement(react_1.default.Fragment, null,
|
|
26
|
+
label,
|
|
27
|
+
isExternalLink && (react_1.default.createElement(IconExternalLink, { ...(isDropdownLink && { width: 12, height: 12 }) })))),
|
|
28
|
+
};
|
|
29
|
+
if (href) {
|
|
30
|
+
return (react_1.default.createElement(Link_1.default, { href: prependBaseUrlToHref ? normalizedHref : href, ...props, ...(activeBaseUrl && {
|
|
31
|
+
className: location.pathname.startsWith(`/${activeBasePath}`)
|
|
32
|
+
? 'navbar__item navbar__link navbar__link--active'
|
|
33
|
+
: 'navbar__item navbar__link',
|
|
34
|
+
}), ...linkContentProps }));
|
|
35
|
+
}
|
|
36
|
+
return (react_1.default.createElement(Link_1.default, { to: toUrl, isNavLink: true, ...((activeBasePath || activeBaseRegex) && {
|
|
37
|
+
isActive: (_match, location) => (activeBaseRegex
|
|
38
|
+
? (0, theme_common_1.isRegexpStringMatch)(activeBaseRegex, location.pathname)
|
|
39
|
+
: location.pathname.startsWith(activeBaseUrl)),
|
|
40
|
+
}), ...props, ...linkContentProps }));
|
|
41
|
+
}
|
|
42
|
+
exports.default = NavbarNavLink;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function NotFound(): JSX.Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const useBaseUrl_1 = __importDefault(require("@docusaurus/useBaseUrl"));
|
|
8
|
+
const useIsBrowser_1 = __importDefault(require("@docusaurus/useIsBrowser"));
|
|
9
|
+
const theme_common_1 = require("@docusaurus/theme-common");
|
|
10
|
+
const Link_1 = __importDefault(require("@docusaurus/Link"));
|
|
11
|
+
const Layout_1 = __importDefault(require("@theme/Layout"));
|
|
12
|
+
function NotFound() {
|
|
13
|
+
const redirectedV2Url = (0, useBaseUrl_1.default)('/docs/api');
|
|
14
|
+
const redirectedV1Url = (0, useBaseUrl_1.default)('/docs/1.3.1/api');
|
|
15
|
+
const baseUrlForV2Redirect = (0, useBaseUrl_1.default)(`/docs/2.3/api/`);
|
|
16
|
+
const baseUrlForV1Redirect = (0, useBaseUrl_1.default)(`/docs/1.3/api/`);
|
|
17
|
+
const isBrowser = (0, useIsBrowser_1.default)();
|
|
18
|
+
if (isBrowser) {
|
|
19
|
+
const path = window.location.pathname;
|
|
20
|
+
let href = '';
|
|
21
|
+
let redirect = false;
|
|
22
|
+
if (path.startsWith(redirectedV2Url)) {
|
|
23
|
+
href = baseUrlForV2Redirect + path.substring(redirectedV2Url.length + 1);
|
|
24
|
+
redirect = true;
|
|
25
|
+
}
|
|
26
|
+
if (path.match(/\/docs\/2\.\d+\.\d+\/api/)) {
|
|
27
|
+
href = baseUrlForV2Redirect + path.substring(redirectedV1Url.length + 1);
|
|
28
|
+
redirect = true;
|
|
29
|
+
}
|
|
30
|
+
if (path.match(/\/api\/[12]\.\d+\/\w+/)) {
|
|
31
|
+
const [, v, id] = path.match(/\/api\/([12])\.\d+\/(.*)/);
|
|
32
|
+
href = (v === '1' ? baseUrlForV1Redirect : baseUrlForV2Redirect) + id;
|
|
33
|
+
redirect = true;
|
|
34
|
+
}
|
|
35
|
+
if (path.match(/\/docs\/[01]\.\d+\.\d+\/api\/(.*)/)) {
|
|
36
|
+
const id = path.match(/\/docs\/[01]\.\d+\.\d+\/api\/(.*)/)[1];
|
|
37
|
+
href = baseUrlForV1Redirect + id;
|
|
38
|
+
redirect = true;
|
|
39
|
+
}
|
|
40
|
+
if (redirect && window.location.href !== href) {
|
|
41
|
+
window.location.href = href;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
45
|
+
react_1.default.createElement(theme_common_1.PageMetadata, { title: 'Page Not Found' }),
|
|
46
|
+
react_1.default.createElement(Layout_1.default, null,
|
|
47
|
+
react_1.default.createElement("main", { className: "container margin-vert--xl" },
|
|
48
|
+
react_1.default.createElement("div", { className: "row" },
|
|
49
|
+
react_1.default.createElement("div", { className: "col col--6 col--offset-3" },
|
|
50
|
+
react_1.default.createElement("h1", { className: "hero__title" }, "Page Not Found"),
|
|
51
|
+
react_1.default.createElement("p", null, "We could not find what you were looking for \uD83D\uDE22"),
|
|
52
|
+
react_1.default.createElement("p", null,
|
|
53
|
+
"Recently we ",
|
|
54
|
+
react_1.default.createElement("b", null, "released Apify SDK v3 "),
|
|
55
|
+
"and we significantly upgraded the documentation."),
|
|
56
|
+
react_1.default.createElement("p", null,
|
|
57
|
+
"If you're looking for documentation of ",
|
|
58
|
+
react_1.default.createElement("b", null, "Apify SDK v2"),
|
|
59
|
+
",",
|
|
60
|
+
react_1.default.createElement(Link_1.default, { to: '/docs/2.3/guides/apify-platform' }, " you can find it here"),
|
|
61
|
+
"."),
|
|
62
|
+
react_1.default.createElement("p", null,
|
|
63
|
+
"For ",
|
|
64
|
+
react_1.default.createElement("b", null, "Apify SDK v3 docs"),
|
|
65
|
+
", go to the ",
|
|
66
|
+
react_1.default.createElement(Link_1.default, { to: '/' }, "homepage"),
|
|
67
|
+
".")))))));
|
|
68
|
+
}
|
|
69
|
+
exports.default = NotFound;
|