mintlify 1.1.12 → 1.3.0
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/bin/index.js +0 -2
- package/bin/index.js.map +1 -1
- package/bin/scraping/site-scrapers/scrapeDocusaurusPage.js +1 -1
- package/bin/scraping/site-scrapers/scrapeDocusaurusPage.js.map +1 -1
- package/bin/scraping/site-scrapers/scrapeGitBookPage.js +1 -1
- package/bin/scraping/site-scrapers/scrapeGitBookPage.js.map +1 -1
- package/bin/scraping/site-scrapers/scrapeReadMePage.js +1 -1
- package/bin/scraping/site-scrapers/scrapeReadMePage.js.map +1 -1
- package/bin/util.js +40 -1
- package/bin/util.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +0 -2
- package/src/scraping/site-scrapers/scrapeDocusaurusPage.ts +1 -1
- package/src/scraping/site-scrapers/scrapeGitBookPage.ts +1 -1
- package/src/scraping/site-scrapers/scrapeReadMePage.ts +1 -1
- package/src/util.ts +54 -1
- package/bin/local-preview/categorizeFiles.js +0 -56
- package/bin/local-preview/categorizeFiles.js.map +0 -1
- package/bin/local-preview/getOpenApiContext.js +0 -46
- package/bin/local-preview/getOpenApiContext.js.map +0 -1
- package/bin/local-preview/helper-commands/clearCommand.js +0 -27
- package/bin/local-preview/helper-commands/clearCommand.js.map +0 -1
- package/bin/local-preview/injectFavicons.js +0 -72
- package/bin/local-preview/injectFavicons.js.map +0 -1
- package/bin/local-preview/injectNav.js +0 -94
- package/bin/local-preview/injectNav.js.map +0 -1
- package/bin/local-preview/listener.js +0 -112
- package/bin/local-preview/listener.js.map +0 -1
- package/bin/local-preview/metadata.js +0 -121
- package/bin/local-preview/metadata.js.map +0 -1
- package/bin/local-preview/mintConfigFile.js +0 -43
- package/bin/local-preview/mintConfigFile.js.map +0 -1
- package/bin/local-preview/openApiCheck.js +0 -16
- package/bin/local-preview/openApiCheck.js.map +0 -1
- package/bin/local-preview/slugToTitle.js +0 -8
- package/bin/local-preview/slugToTitle.js.map +0 -1
- package/bin/mint/client/.babel-plugin-macrosrc.json +0 -5
- package/bin/mint/client/.babelrc +0 -4
- package/bin/mint/client/.editorconfig +0 -12
- package/bin/mint/client/.eslintrc.json +0 -7
- package/bin/mint/client/.prettierignore +0 -4
- package/bin/mint/client/.prettierrc +0 -14
- package/bin/mint/client/.vscode/launch.json +0 -28
- package/bin/mint/client/README.md +0 -44
- package/bin/mint/client/jest.config.ts +0 -195
- package/bin/mint/client/next-env.d.ts +0 -4
- package/bin/mint/client/next.config.js +0 -152
- package/bin/mint/client/package.json +0 -139
- package/bin/mint/client/postcss.config.cjs +0 -9
- package/bin/mint/client/prebuild/faviconConfig.js +0 -35
- package/bin/mint/client/prebuild/getOpenApiContext.js +0 -53
- package/bin/mint/client/prebuild/index.js +0 -117
- package/bin/mint/client/prebuild/injectNav.js +0 -115
- package/bin/mint/client/prebuild/slugToTitle.js +0 -7
- package/bin/mint/client/rehype/withApiComponents.js +0 -60
- package/bin/mint/client/rehype/withCodeBlocks.js +0 -54
- package/bin/mint/client/rehype/withLayouts.js +0 -113
- package/bin/mint/client/rehype/withLinkRoles.js +0 -13
- package/bin/mint/client/rehype/withRawComponents.js +0 -13
- package/bin/mint/client/rehype/withStaticProps.js +0 -25
- package/bin/mint/client/rehype/withSyntaxHighlighting.js +0 -60
- package/bin/mint/client/remark/utils.js +0 -369
- package/bin/mint/client/remark/withFrames.js +0 -55
- package/bin/mint/client/remark/withImportsInjected.js +0 -36
- package/bin/mint/client/remark/withNextLinks.js +0 -37
- package/bin/mint/client/remark/withTableOfContents.js +0 -71
- package/bin/mint/client/scripts/local.js +0 -177
- package/bin/mint/client/sentry.client.config.js +0 -15
- package/bin/mint/client/sentry.properties +0 -4
- package/bin/mint/client/sentry.server.config.js +0 -15
- package/bin/mint/client/src/analytics/AbstractAnalyticsImplementation.ts +0 -50
- package/bin/mint/client/src/analytics/AnalyticsContext.ts +0 -5
- package/bin/mint/client/src/analytics/AnalyticsMediator.ts +0 -101
- package/bin/mint/client/src/analytics/FakeAnalyticsMediator.ts +0 -9
- package/bin/mint/client/src/analytics/GA4Script.tsx +0 -33
- package/bin/mint/client/src/analytics/implementations/amplitude.ts +0 -26
- package/bin/mint/client/src/analytics/implementations/fathom.ts +0 -38
- package/bin/mint/client/src/analytics/implementations/ga4.ts +0 -33
- package/bin/mint/client/src/analytics/implementations/hotjar.ts +0 -53
- package/bin/mint/client/src/analytics/implementations/mixpanel-browser.d.ts +0 -1
- package/bin/mint/client/src/analytics/implementations/mixpanel.ts +0 -52
- package/bin/mint/client/src/analytics/implementations/posthog.ts +0 -37
- package/bin/mint/client/src/components/Accordion/Accordion.tsx +0 -43
- package/bin/mint/client/src/components/Accordion/index.ts +0 -4
- package/bin/mint/client/src/components/ApiExample.tsx +0 -9
- package/bin/mint/client/src/components/Card.tsx +0 -51
- package/bin/mint/client/src/components/CodeGroup.tsx +0 -132
- package/bin/mint/client/src/components/Editor.tsx +0 -12
- package/bin/mint/client/src/components/Expandable.tsx +0 -40
- package/bin/mint/client/src/components/Heading.tsx +0 -84
- package/bin/mint/client/src/components/Param.tsx +0 -56
- package/bin/mint/client/src/components/Request.tsx +0 -19
- package/bin/mint/client/src/components/ResponseField.tsx +0 -33
- package/bin/mint/client/src/components/TabBar.tsx +0 -61
- package/bin/mint/client/src/config.ts +0 -115
- package/bin/mint/client/src/css/bar-of-progress.css +0 -10
- package/bin/mint/client/src/css/base.css +0 -29
- package/bin/mint/client/src/css/font-awesome.css +0 -7
- package/bin/mint/client/src/css/fonts.css +0 -44
- package/bin/mint/client/src/css/main.css +0 -11
- package/bin/mint/client/src/css/prism.css +0 -270
- package/bin/mint/client/src/css/utilities.css +0 -43
- package/bin/mint/client/src/enums/components.ts +0 -8
- package/bin/mint/client/src/fonts/FiraCode-VF.woff +0 -0
- package/bin/mint/client/src/fonts/FiraCode-VF.woff2 +0 -0
- package/bin/mint/client/src/fonts/IBMPlexMono-Regular.ttf +0 -0
- package/bin/mint/client/src/fonts/IBMPlexMono-SemiBold.ttf +0 -0
- package/bin/mint/client/src/fonts/Inter-italic-latin.var.woff2 +0 -0
- package/bin/mint/client/src/fonts/Inter-roman-latin.var.woff2 +0 -0
- package/bin/mint/client/src/fonts/Pally-Variable.ttf +0 -0
- package/bin/mint/client/src/fonts/SourceSansPro-Regular.otf +0 -0
- package/bin/mint/client/src/fonts/SourceSerifPro-Regular.ttf +0 -0
- package/bin/mint/client/src/fonts/Synonym-Variable.ttf +0 -0
- package/bin/mint/client/src/fonts/Ubuntu-Mono-bold.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-Regular.module.css +0 -11
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/IBMPlexMono-SemiBold.module.css +0 -11
- package/bin/mint/client/src/fonts/generated/Pally-Variable-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/Pally-Variable-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/Pally-Variable.module.css +0 -11
- package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/SourceSerifPro-Regular.module.css +0 -11
- package/bin/mint/client/src/fonts/generated/Synonym-Variable-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/Synonym-Variable-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/Synonym-Variable.module.css +0 -11
- package/bin/mint/client/src/fonts/generated/TenorSans-Regular-subset.woff2 +0 -0
- package/bin/mint/client/src/fonts/generated/TenorSans-Regular-subset.zopfli.woff +0 -0
- package/bin/mint/client/src/fonts/generated/TenorSans-Regular.module.css +0 -11
- package/bin/mint/client/src/hooks/useActionKey.ts +0 -20
- package/bin/mint/client/src/hooks/useIsomorphicLayoutEffect.ts +0 -3
- package/bin/mint/client/src/hooks/useMedia.ts +0 -27
- package/bin/mint/client/src/hooks/usePrevNext.ts +0 -34
- package/bin/mint/client/src/hooks/useTop.ts +0 -15
- package/bin/mint/client/src/icons/CopyToClipboard.tsx +0 -33
- package/bin/mint/client/src/index.d.ts +0 -1
- package/bin/mint/client/src/layouts/ApiSupplemental.tsx +0 -173
- package/bin/mint/client/src/layouts/ContentsLayout.tsx +0 -256
- package/bin/mint/client/src/layouts/DocumentationLayout.tsx +0 -44
- package/bin/mint/client/src/layouts/OpenApiContent.tsx +0 -301
- package/bin/mint/client/src/layouts/SidebarLayout.tsx +0 -412
- package/bin/mint/client/src/layouts/UserFeedback.tsx +0 -73
- package/bin/mint/client/src/layouts/getGroupsInDivision.ts +0 -25
- package/bin/mint/client/src/layouts/isPathInGroupPages.ts +0 -10
- package/bin/mint/client/src/metadata.ts +0 -58
- package/bin/mint/client/src/nav.json +0 -219
- package/bin/mint/client/src/openapi.ts +0 -3
- package/bin/mint/client/src/pages/404.tsx +0 -73
- package/bin/mint/client/src/pages/_app.tsx +0 -138
- package/bin/mint/client/src/pages/_document.tsx +0 -57
- package/bin/mint/client/src/pages/api/issue.ts +0 -10
- package/bin/mint/client/src/pages/api/name.ts +0 -8
- package/bin/mint/client/src/pages/api/request.ts +0 -31
- package/bin/mint/client/src/pages/api/suggest.ts +0 -10
- package/bin/mint/client/src/pages/api/syntax-highlighted-json.ts +0 -13
- package/bin/mint/client/src/pages/api/utils.ts +0 -6
- package/bin/mint/client/src/pages/index.tsx +0 -31
- package/bin/mint/client/src/ui/Api.tsx +0 -359
- package/bin/mint/client/src/ui/Footer.tsx +0 -124
- package/bin/mint/client/src/ui/Header.tsx +0 -370
- package/bin/mint/client/src/ui/Logo.tsx +0 -55
- package/bin/mint/client/src/ui/PageHeader.tsx +0 -51
- package/bin/mint/client/src/ui/Search.tsx +0 -386
- package/bin/mint/client/src/ui/ThemeToggle.tsx +0 -285
- package/bin/mint/client/src/ui/Title.tsx +0 -22
- package/bin/mint/client/src/ui/TopLevelLink.tsx +0 -122
- package/bin/mint/client/src/utils/api.ts +0 -252
- package/bin/mint/client/src/utils/brands.ts +0 -217
- package/bin/mint/client/src/utils/castArray.ts +0 -3
- package/bin/mint/client/src/utils/childrenArray.ts +0 -3
- package/bin/mint/client/src/utils/fit.ts +0 -27
- package/bin/mint/client/src/utils/fontAwesome.ts +0 -577
- package/bin/mint/client/src/utils/getAnalyticsConfig.ts +0 -14
- package/bin/mint/client/src/utils/getLogoHref.ts +0 -9
- package/bin/mint/client/src/utils/getOpenApiContext.ts +0 -26
- package/bin/mint/client/src/utils/importAll.ts +0 -6
- package/bin/mint/client/src/utils/isObject.ts +0 -3
- package/bin/mint/client/src/utils/kebabToTitleCase.ts +0 -3
- package/bin/mint/client/src/utils/loadImage.ts +0 -8
- package/bin/mint/client/src/utils/slugToTitle.ts +0 -7
- package/bin/mint/client/src/utils/wait.ts +0 -5
- package/bin/mint/client/tailwind.config.cjs +0 -323
- package/bin/mint/client/test/test.test.ts +0 -5
- package/bin/mint/client/tsconfig.json +0 -36
- package/bin/mint/client/yarn.lock +0 -9702
- package/bin/scraping/site-scrapers/getLinksRecursively.js +0 -38
- package/bin/scraping/site-scrapers/getLinksRecursively.js.map +0 -1
- package/src/init-command/index.ts +0 -59
- package/src/init-command/templates.ts +0 -52
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// Used by Docusaurus, GitBook, and ReadMe section scrapers
|
|
2
|
-
export default function getLinksRecursively(linkSections, $) {
|
|
3
|
-
if (linkSections == null || linkSections.length === 0) {
|
|
4
|
-
return [];
|
|
5
|
-
}
|
|
6
|
-
return linkSections
|
|
7
|
-
.map((i, s) => {
|
|
8
|
-
const subsection = $(s);
|
|
9
|
-
let link = subsection.children().first();
|
|
10
|
-
if (!link.attr("href")) {
|
|
11
|
-
// Docusaurus nests the <a> inside a <div>
|
|
12
|
-
link = link.find("a[href]").first();
|
|
13
|
-
}
|
|
14
|
-
const linkHref = link.attr("href");
|
|
15
|
-
// Skip missing links. For example, GitBook uses
|
|
16
|
-
// empty divs are used for styling a line beside the nav.
|
|
17
|
-
// Skip external links until Mintlify supports them
|
|
18
|
-
if (!linkHref ||
|
|
19
|
-
linkHref === "#" ||
|
|
20
|
-
linkHref.startsWith("https://") ||
|
|
21
|
-
linkHref.startsWith("http://")) {
|
|
22
|
-
return undefined;
|
|
23
|
-
}
|
|
24
|
-
const childLinks = subsection.children().eq(1).children();
|
|
25
|
-
if (childLinks.length > 0) {
|
|
26
|
-
// Put the section link in the list of pages.
|
|
27
|
-
// When we support the section itself being a link we should update this
|
|
28
|
-
return {
|
|
29
|
-
group: link.text(),
|
|
30
|
-
pages: [linkHref, ...getLinksRecursively(childLinks, $)],
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
return linkHref;
|
|
34
|
-
})
|
|
35
|
-
.toArray()
|
|
36
|
-
.filter(Boolean);
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=getLinksRecursively.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getLinksRecursively.js","sourceRoot":"","sources":["../../../src/scraping/site-scrapers/getLinksRecursively.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,YAAiB,EAAE,CAAM;IACnE,IAAI,YAAY,IAAI,IAAI,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;QACrD,OAAO,EAAE,CAAC;KACX;IAED,OAAO,YAAY;SAChB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACZ,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,IAAI,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC;QAEzC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACtB,0CAA0C;YAC1C,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;SACrC;QACD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEnC,gDAAgD;QAChD,yDAAyD;QACzD,mDAAmD;QACnD,IACE,CAAC,QAAQ;YACT,QAAQ,KAAK,GAAG;YAChB,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC;YAC/B,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,EAC9B;YACA,OAAO,SAAS,CAAC;SAClB;QAED,MAAM,UAAU,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;QAE1D,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YACzB,6CAA6C;YAC7C,wEAAwE;YACxE,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE;gBAClB,KAAK,EAAE,CAAC,QAAQ,EAAE,GAAG,mBAAmB,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;aACzD,CAAC;SACH;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;SACD,OAAO,EAAE;SACT,MAAM,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import inquirer from "inquirer";
|
|
2
|
-
import { writeFileSync } from "fs";
|
|
3
|
-
import { MintConfig } from "./templates.js";
|
|
4
|
-
import { createPage, toFilename } from "../util.js";
|
|
5
|
-
|
|
6
|
-
const initCommand = () => {
|
|
7
|
-
inquirer
|
|
8
|
-
.prompt([
|
|
9
|
-
{
|
|
10
|
-
type: "input",
|
|
11
|
-
name: "name",
|
|
12
|
-
message: "What is the name of the organization?",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
type: "input",
|
|
16
|
-
name: "color",
|
|
17
|
-
message: "What is the primary color of the brand?",
|
|
18
|
-
default: "#3b83f4",
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
type: "input",
|
|
22
|
-
name: "ctaName",
|
|
23
|
-
message: "What is the name of the call to action button?",
|
|
24
|
-
default: "Get Started",
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
type: "input",
|
|
28
|
-
name: "ctaUrl",
|
|
29
|
-
message: "What is the URL destination of the call to action button?",
|
|
30
|
-
default: "/",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
type: "input",
|
|
34
|
-
name: "title",
|
|
35
|
-
message: "What is the title of the first page?",
|
|
36
|
-
default: "Introduction",
|
|
37
|
-
},
|
|
38
|
-
])
|
|
39
|
-
.then((answers) => {
|
|
40
|
-
const { name, color, ctaName, ctaUrl, title } = answers;
|
|
41
|
-
writeFileSync(
|
|
42
|
-
"mint.json",
|
|
43
|
-
JSON.stringify(
|
|
44
|
-
MintConfig(name, color, ctaName, ctaUrl, toFilename(title)),
|
|
45
|
-
null,
|
|
46
|
-
"\t"
|
|
47
|
-
)
|
|
48
|
-
);
|
|
49
|
-
createPage(title);
|
|
50
|
-
console.log("🌱 Created initial files for Mintlify docs");
|
|
51
|
-
process.exit(0);
|
|
52
|
-
})
|
|
53
|
-
.catch((error) => {
|
|
54
|
-
console.error(error);
|
|
55
|
-
process.exit(1);
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export default initCommand;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
export const MintConfig = (
|
|
2
|
-
name: string,
|
|
3
|
-
color: string,
|
|
4
|
-
ctaName: string,
|
|
5
|
-
ctaUrl: string,
|
|
6
|
-
filename: string
|
|
7
|
-
) => {
|
|
8
|
-
return {
|
|
9
|
-
name,
|
|
10
|
-
logo: "",
|
|
11
|
-
favicon: "",
|
|
12
|
-
colors: {
|
|
13
|
-
primary: color,
|
|
14
|
-
},
|
|
15
|
-
topbarLinks: [],
|
|
16
|
-
topbarCtaButton: {
|
|
17
|
-
name: ctaName,
|
|
18
|
-
url: ctaUrl,
|
|
19
|
-
},
|
|
20
|
-
anchors: [],
|
|
21
|
-
navigation: [
|
|
22
|
-
{
|
|
23
|
-
group: "Home",
|
|
24
|
-
pages: [filename],
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
// footerSocials: {}, // support object type for footer tyoes
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const Page = (
|
|
32
|
-
title: string,
|
|
33
|
-
description?: string,
|
|
34
|
-
markdown?: string
|
|
35
|
-
) => {
|
|
36
|
-
// If we are an empty String we want to add two quotes,
|
|
37
|
-
// if we added as we went we would detect the first quote
|
|
38
|
-
// as the closing quote.
|
|
39
|
-
const startsWithQuote = title.startsWith('"');
|
|
40
|
-
const endsWithQuote = title.startsWith('"');
|
|
41
|
-
if (!startsWithQuote) {
|
|
42
|
-
title = '"' + title;
|
|
43
|
-
}
|
|
44
|
-
if (!endsWithQuote) {
|
|
45
|
-
title = title + '"';
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const optionalDescription = description
|
|
49
|
-
? `\ndescription: "${description}"`
|
|
50
|
-
: "";
|
|
51
|
-
return `---\ntitle: ${title}${optionalDescription}\n---\n\n${markdown}`;
|
|
52
|
-
};
|