@theguild/components 7.2.0-alpha-20241101220642-0b6682d9cf4196529799e8ad0e38b83426590e93 → 8.0.0-alpha-20241103181355-82c3ab0bf3c837c17af89f22915ef2beef8f305b
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/dist/chunk-ME7V4BHY.js +10 -0
- package/dist/cn.d.mts +5 -0
- package/dist/cn.js +8 -0
- package/dist/components/anchor.d.mts +11 -0
- package/dist/components/anchor.js +30 -0
- package/dist/components/button.d.mts +13 -0
- package/dist/components/button.js +25 -0
- package/dist/components/call-to-action.d.mts +38 -0
- package/dist/components/call-to-action.js +42 -0
- package/dist/components/cards-colorful.d.mts +19 -0
- package/dist/components/cards-colorful.js +20 -0
- package/dist/components/cookies-consent.d.mts +7 -0
- package/dist/components/cookies-consent.js +48 -0
- package/dist/components/decorations/index.d.mts +11 -0
- package/dist/components/decorations/index.js +72 -0
- package/dist/components/feature-list.d.mts +9 -0
- package/dist/components/feature-list.js +41 -0
- package/dist/components/footer.d.mts +9 -0
- package/dist/components/footer.js +116 -0
- package/dist/components/get-your-api-game-right-section.d.mts +7 -0
- package/dist/components/get-your-api-game-right-section.js +122 -0
- package/dist/components/giscus.d.mts +6 -0
- package/dist/components/giscus.js +14 -0
- package/dist/components/guild-navbar-logo.d.mts +19 -0
- package/dist/components/guild-navbar-logo.js +62 -0
- package/dist/components/heading.d.mts +10 -0
- package/dist/components/heading.js +36 -0
- package/dist/components/hero-gradient.d.mts +9 -0
- package/dist/components/hero-gradient.js +82 -0
- package/dist/components/hero-illustration.d.mts +9 -0
- package/dist/components/hero-illustration.js +31 -0
- package/dist/components/hero-marketplace.d.mts +9 -0
- package/dist/components/hero-marketplace.js +78 -0
- package/dist/components/hero-video.d.mts +9 -0
- package/dist/components/hero-video.js +73 -0
- package/dist/components/hive-footer.d.mts +11 -0
- package/dist/components/hive-footer.js +252 -0
- package/dist/components/hive-navigation/graphql-conf-card.d.mts +9 -0
- package/dist/components/hive-navigation/graphql-conf-card.js +26 -0
- package/dist/components/hive-navigation/index.d.mts +55 -0
- package/dist/components/hive-navigation/index.js +392 -0
- package/dist/components/hive-navigation/navigation-menu.d.mts +23 -0
- package/dist/components/hive-navigation/navigation-menu.js +179 -0
- package/dist/components/icons/index.d.mts +6 -0
- package/dist/{chunk-XKCA3AB7.js → components/icons/index.js} +29 -266
- package/dist/components/image.d.mts +6 -0
- package/dist/components/image.js +8 -0
- package/dist/components/index.d.mts +44 -0
- package/dist/components/index.js +52 -0
- package/dist/components/info-card.d.mts +11 -0
- package/dist/components/info-card.js +20 -0
- package/dist/components/info-list.d.mts +9 -0
- package/dist/components/info-list.js +27 -0
- package/dist/components/legacy-package-cmd.d.mts +13 -0
- package/dist/components/legacy-package-cmd.js +54 -0
- package/dist/components/marketplace-list.d.mts +9 -0
- package/dist/components/marketplace-list.js +118 -0
- package/dist/components/marketplace-search.d.mts +9 -0
- package/dist/components/marketplace-search.js +111 -0
- package/dist/components/npm-badge.d.mts +7 -0
- package/dist/components/npm-badge.js +16 -0
- package/dist/components/schema-type.d.mts +9 -0
- package/dist/components/schema-type.js +80 -0
- package/dist/components/stud.d.mts +7 -0
- package/dist/components/stud.js +17 -0
- package/dist/components/tag.d.mts +13 -0
- package/dist/components/tag.js +26 -0
- package/dist/components/theme-switcher.d.mts +7 -0
- package/dist/components/theme-switcher.js +17 -0
- package/dist/components/tools-and-libraries-cards.d.mts +7 -0
- package/dist/components/tools-and-libraries-cards.js +442 -0
- package/dist/constants.d.mts +7 -0
- package/dist/constants.js +7 -0
- package/dist/helpers/render-slot.d.mts +3 -0
- package/dist/helpers/render-slot.js +21 -0
- package/dist/index.d.mts +64 -339
- package/dist/index.js +21 -3115
- package/dist/logos/index.d.mts +26 -0
- package/dist/{chunk-EWF5AT2G.js → logos/index.js} +68 -53
- package/dist/mdx-components.d.mts +5 -0
- package/dist/mdx-components.js +50 -0
- package/dist/products.d.mts +10 -5
- package/dist/products.js +230 -5
- package/dist/server/index.d.mts +5 -0
- package/dist/server/index.js +12 -0
- package/dist/server/next.config.d.mts +10 -0
- package/dist/server/next.config.js +107 -0
- package/dist/server/npm.d.mts +21 -0
- package/dist/server/npm.js +75 -0
- package/dist/server/package.json +1 -0
- package/dist/server/pages.d.mts +1 -0
- package/dist/server/pages.js +5 -0
- package/dist/server/underscore-redirects.d.mts +3 -0
- package/dist/server/underscore-redirects.js +40 -0
- package/dist/static/illustrations/marketplace-cube-bl.d.mts +2 -0
- package/dist/static/illustrations/marketplace-cube-br.d.mts +2 -0
- package/dist/static/illustrations/marketplace-cube-tl.d.mts +2 -0
- package/dist/static/illustrations/marketplace-cube-tr.d.mts +2 -0
- package/dist/static/illustrations/marketplace-desktop.d.mts +2 -0
- package/dist/static/illustrations/marketplace-mobile.d.mts +2 -0
- package/dist/theme-layout.d.mts +39 -0
- package/dist/theme-layout.js +145 -0
- package/dist/types/components.d.mts +121 -0
- package/dist/types/components.js +0 -0
- package/package.json +19 -36
- package/style.css +10 -8
- package/dist/compile.mjs +0 -11
- package/dist/index.css +0 -133
- package/dist/logos.d.mts +0 -32
- package/dist/logos.js +0 -54
- package/dist/next.config.mjs +0 -135
- /package/dist/{marketplace-cube-bl-42X7Y3KO.png → static/illustrations/marketplace-cube-bl.png} +0 -0
- /package/dist/{marketplace-cube-br-Y5MZRDIL.png → static/illustrations/marketplace-cube-br.png} +0 -0
- /package/dist/{marketplace-cube-tl-PEJKW6RX.png → static/illustrations/marketplace-cube-tl.png} +0 -0
- /package/dist/{marketplace-cube-tr-O5XQ6Q4N.png → static/illustrations/marketplace-cube-tr.png} +0 -0
- /package/dist/{marketplace-desktop-7XUR54PR.png → static/illustrations/marketplace-desktop.png} +0 -0
- /package/dist/{marketplace-mobile-DI462WKF.png → static/illustrations/marketplace-mobile.png} +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import semver from "semver";
|
|
2
|
+
const cache = {};
|
|
3
|
+
function withoutStartingSlash(v) {
|
|
4
|
+
if (v === "/") return v;
|
|
5
|
+
if (v.startsWith("/")) return v.slice(1, v.length);
|
|
6
|
+
return v;
|
|
7
|
+
}
|
|
8
|
+
function withoutTrailingSlash(v) {
|
|
9
|
+
if (v === "/") return v;
|
|
10
|
+
if (v.endsWith("/")) return v.slice(0, v.length - 1);
|
|
11
|
+
return v;
|
|
12
|
+
}
|
|
13
|
+
function withStartingSlash(v) {
|
|
14
|
+
if (v.startsWith("/")) return v;
|
|
15
|
+
return `/${v}`;
|
|
16
|
+
}
|
|
17
|
+
async function tryRemoteReadme(repo, path) {
|
|
18
|
+
const fetchPath = `https://raw.githubusercontent.com/${withoutStartingSlash(
|
|
19
|
+
withoutTrailingSlash(repo)
|
|
20
|
+
)}/HEAD${withStartingSlash(path)}`;
|
|
21
|
+
try {
|
|
22
|
+
const response = await fetch(fetchPath, {
|
|
23
|
+
method: "GET"
|
|
24
|
+
});
|
|
25
|
+
if (response.status === 404) {
|
|
26
|
+
console.error(`ERROR | ${fetchPath} Not Found`);
|
|
27
|
+
}
|
|
28
|
+
return await response.text();
|
|
29
|
+
} catch (err) {
|
|
30
|
+
console.error(
|
|
31
|
+
`[@theguild/components] ERROR | Error while trying to get README from GitHub ${fetchPath}`
|
|
32
|
+
);
|
|
33
|
+
console.error(err);
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const NO_NPM_README_PLACEHOLDER = "ERROR: No README data found!";
|
|
38
|
+
const fetchPackageInfo = async (packageName, githubReadme) => {
|
|
39
|
+
const cacheKey = githubReadme ? `${githubReadme.repo}${githubReadme.path}` : packageName;
|
|
40
|
+
const cachedData = cache[cacheKey];
|
|
41
|
+
if (cachedData) {
|
|
42
|
+
return cachedData;
|
|
43
|
+
}
|
|
44
|
+
const encodedName = encodeURIComponent(packageName);
|
|
45
|
+
console.debug(`Loading NPM package info: ${packageName}`);
|
|
46
|
+
const [packageInfo, { downloads }] = await Promise.all([
|
|
47
|
+
fetch(`https://registry.npmjs.org/${encodedName}`).then((response) => response.json()),
|
|
48
|
+
fetch(`https://api.npmjs.org/downloads/point/last-week/${encodedName}`).then(
|
|
49
|
+
(response) => response.json()
|
|
50
|
+
)
|
|
51
|
+
]);
|
|
52
|
+
const { readme, time, description } = packageInfo;
|
|
53
|
+
const latestVersion = packageInfo["dist-tags"].latest;
|
|
54
|
+
const readmeContent = githubReadme && await tryRemoteReadme(githubReadme.repo, githubReadme.path);
|
|
55
|
+
cache[cacheKey] = {
|
|
56
|
+
readme: readmeContent || readme !== NO_NPM_README_PLACEHOLDER && readme || // for some reason top level "readme" can be empty string, so we get the latest version readme
|
|
57
|
+
Object.values(packageInfo.versions).reverse().find((curr) => {
|
|
58
|
+
const isReadmeExist = curr.readme && curr.readme !== NO_NPM_README_PLACEHOLDER;
|
|
59
|
+
if (isReadmeExist) {
|
|
60
|
+
return semver.lte(curr.version, latestVersion);
|
|
61
|
+
}
|
|
62
|
+
})?.readme || "",
|
|
63
|
+
createdAt: time.created,
|
|
64
|
+
updatedAt: time.modified,
|
|
65
|
+
description,
|
|
66
|
+
weeklyNPMDownloads: downloads
|
|
67
|
+
};
|
|
68
|
+
return cache[cacheKey];
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
fetchPackageInfo,
|
|
72
|
+
withStartingSlash,
|
|
73
|
+
withoutStartingSlash,
|
|
74
|
+
withoutTrailingSlash
|
|
75
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module","sideEffects":false}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { generateStaticParamsFor, importPage } from 'nextra/pages';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { writeFile } from "fs/promises";
|
|
2
|
+
import { join } from "path";
|
|
3
|
+
class RunPromiseWebpackPlugin {
|
|
4
|
+
constructor(asyncHook) {
|
|
5
|
+
this.asyncHook = asyncHook;
|
|
6
|
+
}
|
|
7
|
+
apply(compiler) {
|
|
8
|
+
compiler.hooks.beforeCompile.tapPromise("RunPromiseWebpackPlugin", this.asyncHook);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
let isWarningPrinted = false;
|
|
12
|
+
function applyUnderscoreRedirects(config, meta) {
|
|
13
|
+
config.plugins.push(
|
|
14
|
+
new RunPromiseWebpackPlugin(async () => {
|
|
15
|
+
const outDir = meta.dir;
|
|
16
|
+
const outFile = join(outDir, "./public/_redirects");
|
|
17
|
+
try {
|
|
18
|
+
const redirects = meta.config.redirects ? Array.isArray(meta.config.redirects) ? meta.config.redirects : await meta.config.redirects() : [];
|
|
19
|
+
if (redirects.length === 0) {
|
|
20
|
+
if (!isWarningPrinted) {
|
|
21
|
+
console.warn(
|
|
22
|
+
'[@theguild/components] No redirects defined, no "_redirect" file is created!'
|
|
23
|
+
);
|
|
24
|
+
isWarningPrinted = true;
|
|
25
|
+
}
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const redirectsTxt = redirects.map((r) => `${r.source} ${r.destination} ${r.permanent ? 301 : 302}`).join("\n");
|
|
29
|
+
await writeFile(outFile, redirectsTxt);
|
|
30
|
+
} catch (error) {
|
|
31
|
+
throw new Error(
|
|
32
|
+
`Failed to generate "_redirects" file during build: ${error.message}`
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
applyUnderscoreRedirects
|
|
40
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FC, ReactNode, ComponentProps } from 'react';
|
|
2
|
+
import { Metadata } from 'next';
|
|
3
|
+
import { Navbar, Layout } from 'nextra-theme-docs';
|
|
4
|
+
import { Head } from 'nextra/components';
|
|
5
|
+
|
|
6
|
+
type LP = ComponentProps<typeof Layout>;
|
|
7
|
+
type LayoutProps = Omit<LP, 'navbar' | 'footer' | 'children' | 'docsRepositoryBase' | 'pageMap'> & Partial<Pick<LP, 'navbar' | 'footer' | 'pageMap'>> & Required<Pick<LP, 'docsRepositoryBase'>>;
|
|
8
|
+
declare const GuildLayout: FC<{
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
websiteName: string;
|
|
11
|
+
description: string;
|
|
12
|
+
/**
|
|
13
|
+
* In case you want to pass the html props, like overriding default `class`
|
|
14
|
+
*/
|
|
15
|
+
htmlProps?: ComponentProps<'html'>;
|
|
16
|
+
/**
|
|
17
|
+
* Nextra's `<Head>` component props
|
|
18
|
+
*/
|
|
19
|
+
headProps?: ComponentProps<typeof Head>;
|
|
20
|
+
/**
|
|
21
|
+
* Navbar logo, `null` is used in The Guild Blog
|
|
22
|
+
*/
|
|
23
|
+
logo: ComponentProps<typeof Navbar>['logo'] | null;
|
|
24
|
+
/**
|
|
25
|
+
* Nextra's Docs Theme `<Layout>` component props
|
|
26
|
+
*/
|
|
27
|
+
layoutProps: LayoutProps;
|
|
28
|
+
/**
|
|
29
|
+
* Nextra's Docs Theme `<Navbar>` component props
|
|
30
|
+
*/
|
|
31
|
+
navbarProps?: LayoutProps;
|
|
32
|
+
}>;
|
|
33
|
+
declare function getDefaultMetadata({ websiteName, description, productName, ...additionalMetadata }: {
|
|
34
|
+
description?: string;
|
|
35
|
+
websiteName: string;
|
|
36
|
+
productName: string;
|
|
37
|
+
} & Metadata): Metadata;
|
|
38
|
+
|
|
39
|
+
export { GuildLayout, getDefaultMetadata };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Layout, Navbar } from "nextra-theme-docs";
|
|
3
|
+
import { Head } from "nextra/components";
|
|
4
|
+
import { getPageMap } from "nextra/page-map";
|
|
5
|
+
import { Footer } from "./components/footer";
|
|
6
|
+
import { getNavbarLogo } from "./components/guild-navbar-logo";
|
|
7
|
+
import { MoonIcon } from "./components/icons";
|
|
8
|
+
import { ThemeSwitcherButton } from "./components/theme-switcher";
|
|
9
|
+
import { siteOrigin, siteUrl } from "./constants";
|
|
10
|
+
import { PRODUCTS } from "./products";
|
|
11
|
+
const companyItem = {
|
|
12
|
+
type: "menu",
|
|
13
|
+
title: "Company",
|
|
14
|
+
items: {
|
|
15
|
+
about: { title: "About", href: `${siteOrigin}/about-us` },
|
|
16
|
+
blog: { title: "Blog", href: `${siteOrigin}/blog` },
|
|
17
|
+
contact: { title: "Contact", href: `${siteOrigin}/#get-in-touch` }
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const productsItems = {
|
|
21
|
+
type: "menu",
|
|
22
|
+
title: "Products",
|
|
23
|
+
items: Object.fromEntries(
|
|
24
|
+
Object.values(PRODUCTS).map((product) => [
|
|
25
|
+
product.name,
|
|
26
|
+
{
|
|
27
|
+
title: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", title: product.title, children: [
|
|
28
|
+
/* @__PURE__ */ jsx(product.logo, { className: "size-7 shrink-0" }),
|
|
29
|
+
product.name
|
|
30
|
+
] }),
|
|
31
|
+
href: product.href
|
|
32
|
+
}
|
|
33
|
+
])
|
|
34
|
+
)
|
|
35
|
+
};
|
|
36
|
+
const GuildLayout = async ({
|
|
37
|
+
children,
|
|
38
|
+
websiteName,
|
|
39
|
+
description,
|
|
40
|
+
htmlProps,
|
|
41
|
+
headProps,
|
|
42
|
+
logo,
|
|
43
|
+
layoutProps,
|
|
44
|
+
navbarProps
|
|
45
|
+
}) => {
|
|
46
|
+
const url = new URL(layoutProps.docsRepositoryBase);
|
|
47
|
+
const [, org, repoName] = url.pathname.split("/");
|
|
48
|
+
const [meta, ...pageMap] = await getPageMap();
|
|
49
|
+
const pageMapWithCompanyMenu = [
|
|
50
|
+
{
|
|
51
|
+
data: {
|
|
52
|
+
// Add for every website except The Guild Blog
|
|
53
|
+
...siteOrigin && { company: companyItem },
|
|
54
|
+
products: productsItems,
|
|
55
|
+
...meta.data
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
// Add for every website except The Guild Blog
|
|
59
|
+
...siteOrigin ? [{ name: "company", route: "#", ...companyItem }] : [],
|
|
60
|
+
{ name: "products", route: "#", ...productsItems },
|
|
61
|
+
...pageMap
|
|
62
|
+
];
|
|
63
|
+
return /* @__PURE__ */ jsxs(
|
|
64
|
+
"html",
|
|
65
|
+
{
|
|
66
|
+
lang: "en",
|
|
67
|
+
dir: "ltr",
|
|
68
|
+
suppressHydrationWarning: true,
|
|
69
|
+
...htmlProps,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx(Head, { ...headProps }),
|
|
72
|
+
/* @__PURE__ */ jsx("body", { children: /* @__PURE__ */ jsx(
|
|
73
|
+
Layout,
|
|
74
|
+
{
|
|
75
|
+
footer: /* @__PURE__ */ jsx(Footer, {}),
|
|
76
|
+
navbar: /* @__PURE__ */ jsx(
|
|
77
|
+
Navbar,
|
|
78
|
+
{
|
|
79
|
+
logo: getNavbarLogo({ logo, websiteName, description }),
|
|
80
|
+
logoLink: false,
|
|
81
|
+
projectLink: `${url.origin}/${org}/${repoName}`,
|
|
82
|
+
...navbarProps,
|
|
83
|
+
children: /* @__PURE__ */ jsx(ThemeSwitcherButton, { children: /* @__PURE__ */ jsx(MoonIcon, { className: "fill-transparent stroke-gray-500 dark:fill-gray-100 dark:stroke-gray-100" }) })
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
editLink: "Edit this page on GitHub",
|
|
87
|
+
...layoutProps,
|
|
88
|
+
pageMap: pageMapWithCompanyMenu,
|
|
89
|
+
feedback: {
|
|
90
|
+
labels: "kind/docs",
|
|
91
|
+
...layoutProps.feedback
|
|
92
|
+
},
|
|
93
|
+
sidebar: {
|
|
94
|
+
defaultMenuCollapseLevel: 1,
|
|
95
|
+
...layoutProps.sidebar
|
|
96
|
+
},
|
|
97
|
+
children
|
|
98
|
+
}
|
|
99
|
+
) })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
function getDefaultMetadata({
|
|
105
|
+
websiteName,
|
|
106
|
+
description = `${websiteName} Documentation`,
|
|
107
|
+
productName,
|
|
108
|
+
...additionalMetadata
|
|
109
|
+
}) {
|
|
110
|
+
return {
|
|
111
|
+
description,
|
|
112
|
+
title: {
|
|
113
|
+
// Use `absolute` title if `metadata.title` was not provided in the page
|
|
114
|
+
absolute: websiteName,
|
|
115
|
+
template: `%s | ${websiteName}`
|
|
116
|
+
},
|
|
117
|
+
twitter: {
|
|
118
|
+
card: "summary_large_image",
|
|
119
|
+
site: "https://the-guild.dev",
|
|
120
|
+
creator: "@TheGuildDev"
|
|
121
|
+
},
|
|
122
|
+
openGraph: {
|
|
123
|
+
siteName: websiteName,
|
|
124
|
+
type: "website",
|
|
125
|
+
images: `https://og-image.the-guild.dev/?product=${productName}`,
|
|
126
|
+
url: siteUrl
|
|
127
|
+
},
|
|
128
|
+
applicationName: websiteName,
|
|
129
|
+
appleWebApp: {
|
|
130
|
+
title: websiteName
|
|
131
|
+
},
|
|
132
|
+
robots: {
|
|
133
|
+
index: true,
|
|
134
|
+
follow: true
|
|
135
|
+
},
|
|
136
|
+
alternates: {
|
|
137
|
+
canonical: siteUrl
|
|
138
|
+
},
|
|
139
|
+
...additionalMetadata
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
export {
|
|
143
|
+
GuildLayout,
|
|
144
|
+
getDefaultMetadata
|
|
145
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode, ReactElement } from 'react';
|
|
2
|
+
import { ImageProps } from 'next/image';
|
|
3
|
+
import { LinkProps } from 'next/link';
|
|
4
|
+
import { ReactPlayerProps } from 'react-player';
|
|
5
|
+
|
|
6
|
+
interface IVideo {
|
|
7
|
+
src: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
}
|
|
10
|
+
type ILink = LinkProps & Pick<ComponentProps<'a'>, 'target' | 'rel' | 'title' | 'className' | 'style'> & {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
newWindow?: boolean;
|
|
13
|
+
};
|
|
14
|
+
interface IFooterExtendedProps {
|
|
15
|
+
className?: string;
|
|
16
|
+
resources?: ILink[];
|
|
17
|
+
logo?: ILink;
|
|
18
|
+
}
|
|
19
|
+
interface IFeatureListProps {
|
|
20
|
+
className?: string;
|
|
21
|
+
title?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
items: {
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
image: ImageProps;
|
|
27
|
+
link?: ILink;
|
|
28
|
+
}[];
|
|
29
|
+
link?: ILink;
|
|
30
|
+
}
|
|
31
|
+
interface IInfoListProps {
|
|
32
|
+
className?: string;
|
|
33
|
+
title?: string | ReactNode;
|
|
34
|
+
items: {
|
|
35
|
+
title: string | ReactNode;
|
|
36
|
+
description: string | ReactNode;
|
|
37
|
+
link?: ILink;
|
|
38
|
+
}[];
|
|
39
|
+
}
|
|
40
|
+
interface IHeroVideoProps {
|
|
41
|
+
className?: string;
|
|
42
|
+
title: string | ReactNode;
|
|
43
|
+
description: string | ReactNode;
|
|
44
|
+
flipped?: boolean;
|
|
45
|
+
link?: ILink;
|
|
46
|
+
video: IVideo;
|
|
47
|
+
videoProps?: ReactPlayerProps;
|
|
48
|
+
}
|
|
49
|
+
interface IHeroIllustrationProps {
|
|
50
|
+
className?: string;
|
|
51
|
+
title: string | ReactNode;
|
|
52
|
+
description: string | ReactNode;
|
|
53
|
+
flipped?: boolean;
|
|
54
|
+
link?: ILink;
|
|
55
|
+
image: ImageProps;
|
|
56
|
+
}
|
|
57
|
+
interface IHeroGradientProps {
|
|
58
|
+
className?: string;
|
|
59
|
+
title: string | ReactNode;
|
|
60
|
+
description: string | ReactNode;
|
|
61
|
+
colors?: string[];
|
|
62
|
+
version?: string | ReactNode;
|
|
63
|
+
link?: ILink | ILink[];
|
|
64
|
+
image?: ImageProps;
|
|
65
|
+
}
|
|
66
|
+
interface IHeroMarketplaceProps {
|
|
67
|
+
className?: string;
|
|
68
|
+
title: string | ReactNode;
|
|
69
|
+
description: string | ReactNode;
|
|
70
|
+
link: ILink;
|
|
71
|
+
image?: ImageProps;
|
|
72
|
+
}
|
|
73
|
+
interface IMarketplaceItemProps {
|
|
74
|
+
title: string;
|
|
75
|
+
description: string | ReactNode;
|
|
76
|
+
tags?: string[];
|
|
77
|
+
modal?: {
|
|
78
|
+
header: {
|
|
79
|
+
image?: ImageProps;
|
|
80
|
+
description?: string | ILink;
|
|
81
|
+
};
|
|
82
|
+
content: string | (() => ReactNode) | ReactNode;
|
|
83
|
+
};
|
|
84
|
+
update: string;
|
|
85
|
+
image: ImageProps;
|
|
86
|
+
link: Omit<ILink, 'children'>;
|
|
87
|
+
}
|
|
88
|
+
interface IMarketplaceItemsProps {
|
|
89
|
+
items: IMarketplaceItemProps[];
|
|
90
|
+
}
|
|
91
|
+
interface IMarketplaceListProps {
|
|
92
|
+
className?: string;
|
|
93
|
+
title?: string;
|
|
94
|
+
placeholder: string | ReactElement;
|
|
95
|
+
pagination: number;
|
|
96
|
+
items: IMarketplaceItemProps[];
|
|
97
|
+
}
|
|
98
|
+
interface IMarketplaceSearchProps {
|
|
99
|
+
className?: string;
|
|
100
|
+
title: string | ReactNode;
|
|
101
|
+
placeholder: string;
|
|
102
|
+
primaryList: IMarketplaceListProps;
|
|
103
|
+
secondaryList?: IMarketplaceListProps;
|
|
104
|
+
queryList?: IMarketplaceListProps;
|
|
105
|
+
tagsFilter?: string[] | ReadonlyArray<string>;
|
|
106
|
+
}
|
|
107
|
+
interface ISchemaPageProps {
|
|
108
|
+
schemaName: string;
|
|
109
|
+
tags?: string[];
|
|
110
|
+
editorData: Omit<IEditorProps, 'icon' | 'children'>[];
|
|
111
|
+
}
|
|
112
|
+
interface IEditorProps {
|
|
113
|
+
children: ReactNode;
|
|
114
|
+
title: string;
|
|
115
|
+
frameworks?: string[];
|
|
116
|
+
schema?: string;
|
|
117
|
+
image?: string;
|
|
118
|
+
operations?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type { IEditorProps, IFeatureListProps, IFooterExtendedProps, IHeroGradientProps, IHeroIllustrationProps, IHeroMarketplaceProps, IHeroVideoProps, IInfoListProps, ILink, IMarketplaceItemProps, IMarketplaceItemsProps, IMarketplaceListProps, IMarketplaceSearchProps, ISchemaPageProps };
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theguild/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-alpha-20241103181355-82c3ab0bf3c837c17af89f22915ef2beef8f305b",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://github.com/the-guild-org/docs",
|
|
6
6
|
"directory": "packages/components"
|
|
@@ -11,48 +11,33 @@
|
|
|
11
11
|
"./style.css": "./style.css",
|
|
12
12
|
"./package.json": "./package.json",
|
|
13
13
|
".": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
16
|
},
|
|
17
17
|
"./next.config": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"types": "./dist/server/next.config.d.mts",
|
|
19
|
+
"import": "./dist/server/next.config.js",
|
|
20
|
+
"require": "./dist/server/next.config.js"
|
|
20
21
|
},
|
|
21
|
-
"./
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"./server": {
|
|
23
|
+
"types": "./dist/server/index.d.mts",
|
|
24
|
+
"import": "./dist/server/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./pages": {
|
|
27
|
+
"types": "./dist/server/pages.d.mts",
|
|
28
|
+
"import": "./dist/server/pages.js"
|
|
24
29
|
},
|
|
25
30
|
"./*": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
31
|
+
"types": "./dist/*.d.mts",
|
|
32
|
+
"import": "./dist/*.js"
|
|
28
33
|
}
|
|
29
34
|
},
|
|
30
35
|
"types": "./dist/index.d.mts",
|
|
31
|
-
"typesVersions": {
|
|
32
|
-
"*": {
|
|
33
|
-
".": [
|
|
34
|
-
"./dist/index.d.mts"
|
|
35
|
-
],
|
|
36
|
-
"logos": [
|
|
37
|
-
"./dist/logos.d.mts"
|
|
38
|
-
],
|
|
39
|
-
"products": [
|
|
40
|
-
"./dist/products.d.mts"
|
|
41
|
-
],
|
|
42
|
-
"next.config": [
|
|
43
|
-
"./dist/next.config.d.mts"
|
|
44
|
-
],
|
|
45
|
-
"compile": [
|
|
46
|
-
"./dist/compile.d.mts"
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
36
|
"files": [
|
|
51
37
|
"dist",
|
|
52
38
|
"style.css"
|
|
53
39
|
],
|
|
54
40
|
"peerDependencies": {
|
|
55
|
-
"@tailwindcss/container-queries": "^0.1.1",
|
|
56
41
|
"next": "^13 || ^14 || ^15.0.0",
|
|
57
42
|
"react": "^18.2.0",
|
|
58
43
|
"react-dom": "^18.2.0"
|
|
@@ -61,20 +46,18 @@
|
|
|
61
46
|
"@giscus/react": "3.0.0",
|
|
62
47
|
"@next/bundle-analyzer": "15.0.1",
|
|
63
48
|
"@radix-ui/react-navigation-menu": "^1.2.0",
|
|
64
|
-
"@theguild/tailwind-config": "0.5.0",
|
|
65
49
|
"clsx": "2.1.1",
|
|
66
50
|
"fuzzy": "0.1.3",
|
|
67
|
-
"
|
|
68
|
-
"nextra": "
|
|
69
|
-
"nextra-theme-docs": "3.2.0",
|
|
51
|
+
"nextra": "4.0.0-app-router.21",
|
|
52
|
+
"nextra-theme-docs": "4.0.0-app-router.21",
|
|
70
53
|
"react-paginate": "8.2.0",
|
|
71
54
|
"react-player": "2.16.0",
|
|
72
|
-
"remark-mdx-disable-explicit-jsx": "0.1.0",
|
|
73
55
|
"semver": "^7.3.8",
|
|
74
56
|
"tailwind-merge": "^2.5.2"
|
|
75
57
|
},
|
|
76
58
|
"devDependencies": {
|
|
77
59
|
"@svgr/babel-plugin-remove-jsx-attribute": "^8.0.0",
|
|
60
|
+
"@theguild/tailwind-config": "0.6.0-alpha-20241103180104-02d300b711e62e3067174b50b58060a490dc9e42",
|
|
78
61
|
"@types/dedent": "0.7.2",
|
|
79
62
|
"@types/react": "18.3.12",
|
|
80
63
|
"@types/react-dom": "18.3.1",
|
|
@@ -82,7 +65,7 @@
|
|
|
82
65
|
"dedent": "1.5.3",
|
|
83
66
|
"esbuild-plugin-svgr": "^3.0.0",
|
|
84
67
|
"graphql": "16.9.0",
|
|
85
|
-
"next": "15.0.
|
|
68
|
+
"next": "15.0.2",
|
|
86
69
|
"react": "18.3.1",
|
|
87
70
|
"react-dom": "18.3.1",
|
|
88
71
|
"unified": "^11.0.3",
|
package/style.css
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
@layer l-base, l-nextra, l-components;
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/*@import 'tailwindcss/base' layer(l-base);*/
|
|
4
4
|
@import 'nextra-theme-docs/dist/style.css' layer(l-nextra);
|
|
5
5
|
@import 'tailwindcss/components' layer(l-components);
|
|
6
6
|
@import 'tailwindcss/utilities';
|
|
7
7
|
|
|
8
|
-
@import './dist/index.css';
|
|
9
|
-
|
|
10
8
|
.nextra-banner-container._bg-neutral-900._flex {
|
|
11
9
|
@apply bg-[#48224e] bg-none;
|
|
12
10
|
}
|
|
11
|
+
|
|
13
12
|
:root {
|
|
14
13
|
--nextra-navbar-height: 72px;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
@layer l-nextra {
|
|
17
|
+
#headlessui-portal-root [role='menu']:has(a[href='https://the-guild.dev/graphql/hive'])
|
|
18
|
+
{
|
|
19
|
+
@apply grid !max-h-[unset] w-[700px] grid-cols-5 gap-y-2 p-2;
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
a:nth-child(-n + 5) {
|
|
22
|
+
@apply rounded-b-none border-b border-black/20 pb-3 dark:border-white/20;
|
|
23
|
+
}
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
&:focus {
|
|
81
82
|
outline: none;
|
|
82
83
|
}
|
|
84
|
+
|
|
83
85
|
&:focus-visible {
|
|
84
86
|
@apply ring ring-[hsl(var(--nextra-primary-hue)_var(--nextra-primary-saturation)_86%)] ring-offset-1 ring-offset-[hsl(var(--nextra-primary-hue)_var(--nextra-primary-saturation)_77%)] dark:ring-[hsl(var(--nextra-primary-hue)_var(--nextra-primary-saturation)_32%)] dark:ring-offset-[hsl(var(--nextra-primary-hue)_var(--nextra-primary-saturation)_39%)];
|
|
85
87
|
}
|
package/dist/compile.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// src/compile.ts
|
|
2
|
-
export * from "nextra/compile";
|
|
3
|
-
import { remarkLinkRewrite } from "nextra/remark-plugins";
|
|
4
|
-
import { buildDynamicMDX, buildDynamicMeta } from "nextra/remote";
|
|
5
|
-
import { fetchFilePathsFromGitHub } from "nextra/fetch-filepaths-from-github";
|
|
6
|
-
export {
|
|
7
|
-
buildDynamicMDX,
|
|
8
|
-
buildDynamicMeta,
|
|
9
|
-
fetchFilePathsFromGitHub,
|
|
10
|
-
remarkLinkRewrite
|
|
11
|
-
};
|