@theguild/components 7.2.0-alpha-20241101220642-0b6682d9cf4196529799e8ad0e38b83426590e93 → 8.0.0-alpha-20241103132221-f9d255adde945cffb98f9f7c914ac29896a15819

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/chunk-ME7V4BHY.js +10 -0
  2. package/dist/cn.d.mts +5 -0
  3. package/dist/cn.js +8 -0
  4. package/dist/components/anchor.d.mts +11 -0
  5. package/dist/components/anchor.js +30 -0
  6. package/dist/components/button.d.mts +13 -0
  7. package/dist/components/button.js +25 -0
  8. package/dist/components/call-to-action.d.mts +38 -0
  9. package/dist/components/call-to-action.js +42 -0
  10. package/dist/components/cards-colorful.d.mts +19 -0
  11. package/dist/components/cards-colorful.js +20 -0
  12. package/dist/components/cookies-consent.d.mts +7 -0
  13. package/dist/components/cookies-consent.js +48 -0
  14. package/dist/components/decorations/index.d.mts +11 -0
  15. package/dist/components/decorations/index.js +72 -0
  16. package/dist/components/feature-list.d.mts +9 -0
  17. package/dist/components/feature-list.js +41 -0
  18. package/dist/components/footer.d.mts +9 -0
  19. package/dist/components/footer.js +116 -0
  20. package/dist/components/get-your-api-game-right-section.d.mts +7 -0
  21. package/dist/components/get-your-api-game-right-section.js +122 -0
  22. package/dist/components/giscus.d.mts +6 -0
  23. package/dist/components/giscus.js +14 -0
  24. package/dist/components/guild-navbar-logo.d.mts +19 -0
  25. package/dist/components/guild-navbar-logo.js +62 -0
  26. package/dist/components/heading.d.mts +10 -0
  27. package/dist/components/heading.js +36 -0
  28. package/dist/components/hero-gradient.d.mts +9 -0
  29. package/dist/components/hero-gradient.js +82 -0
  30. package/dist/components/hero-illustration.d.mts +9 -0
  31. package/dist/components/hero-illustration.js +31 -0
  32. package/dist/components/hero-marketplace.d.mts +9 -0
  33. package/dist/components/hero-marketplace.js +78 -0
  34. package/dist/components/hero-video.d.mts +9 -0
  35. package/dist/components/hero-video.js +73 -0
  36. package/dist/components/hive-footer.d.mts +11 -0
  37. package/dist/components/hive-footer.js +252 -0
  38. package/dist/components/hive-navigation/graphql-conf-card.d.mts +9 -0
  39. package/dist/components/hive-navigation/graphql-conf-card.js +26 -0
  40. package/dist/components/hive-navigation/index.d.mts +55 -0
  41. package/dist/components/hive-navigation/index.js +392 -0
  42. package/dist/components/hive-navigation/navigation-menu.d.mts +23 -0
  43. package/dist/components/hive-navigation/navigation-menu.js +179 -0
  44. package/dist/components/icons/index.d.mts +6 -0
  45. package/dist/{chunk-XKCA3AB7.js → components/icons/index.js} +29 -266
  46. package/dist/components/image.d.mts +6 -0
  47. package/dist/components/image.js +8 -0
  48. package/dist/components/index.d.mts +44 -0
  49. package/dist/components/index.js +52 -0
  50. package/dist/components/info-card.d.mts +11 -0
  51. package/dist/components/info-card.js +20 -0
  52. package/dist/components/info-list.d.mts +9 -0
  53. package/dist/components/info-list.js +27 -0
  54. package/dist/components/legacy-package-cmd.d.mts +13 -0
  55. package/dist/components/legacy-package-cmd.js +54 -0
  56. package/dist/components/marketplace-list.d.mts +9 -0
  57. package/dist/components/marketplace-list.js +118 -0
  58. package/dist/components/marketplace-search.d.mts +9 -0
  59. package/dist/components/marketplace-search.js +111 -0
  60. package/dist/components/npm-badge.d.mts +7 -0
  61. package/dist/components/npm-badge.js +16 -0
  62. package/dist/components/schema-type.d.mts +9 -0
  63. package/dist/components/schema-type.js +80 -0
  64. package/dist/components/stud.d.mts +7 -0
  65. package/dist/components/stud.js +17 -0
  66. package/dist/components/tag.d.mts +13 -0
  67. package/dist/components/tag.js +26 -0
  68. package/dist/components/theme-switcher.d.mts +7 -0
  69. package/dist/components/theme-switcher.js +17 -0
  70. package/dist/components/tools-and-libraries-cards.d.mts +7 -0
  71. package/dist/components/tools-and-libraries-cards.js +442 -0
  72. package/dist/constants.d.mts +7 -0
  73. package/dist/constants.js +7 -0
  74. package/dist/helpers/render-slot.d.mts +3 -0
  75. package/dist/helpers/render-slot.js +21 -0
  76. package/dist/index.d.mts +64 -339
  77. package/dist/index.js +21 -3115
  78. package/dist/logos/index.d.mts +26 -0
  79. package/dist/{chunk-EWF5AT2G.js → logos/index.js} +68 -53
  80. package/dist/mdx-components.d.mts +5 -0
  81. package/dist/mdx-components.js +50 -0
  82. package/dist/products.d.mts +10 -5
  83. package/dist/products.js +230 -5
  84. package/dist/server/index.d.mts +5 -0
  85. package/dist/server/index.js +12 -0
  86. package/dist/server/next.config.d.mts +10 -0
  87. package/dist/server/next.config.js +107 -0
  88. package/dist/server/npm.d.mts +21 -0
  89. package/dist/server/npm.js +75 -0
  90. package/dist/server/package.json +1 -0
  91. package/dist/server/pages.d.mts +1 -0
  92. package/dist/server/pages.js +5 -0
  93. package/dist/server/underscore-redirects.d.mts +3 -0
  94. package/dist/server/underscore-redirects.js +40 -0
  95. package/dist/static/illustrations/marketplace-cube-bl.d.mts +2 -0
  96. package/dist/static/illustrations/marketplace-cube-br.d.mts +2 -0
  97. package/dist/static/illustrations/marketplace-cube-tl.d.mts +2 -0
  98. package/dist/static/illustrations/marketplace-cube-tr.d.mts +2 -0
  99. package/dist/static/illustrations/marketplace-desktop.d.mts +2 -0
  100. package/dist/static/illustrations/marketplace-mobile.d.mts +2 -0
  101. package/dist/theme-layout.d.mts +39 -0
  102. package/dist/theme-layout.js +144 -0
  103. package/dist/types/components.d.mts +121 -0
  104. package/dist/types/components.js +0 -0
  105. package/package.json +19 -36
  106. package/style.css +10 -8
  107. package/dist/compile.mjs +0 -11
  108. package/dist/index.css +0 -133
  109. package/dist/logos.d.mts +0 -32
  110. package/dist/logos.js +0 -54
  111. package/dist/next.config.mjs +0 -135
  112. /package/dist/{marketplace-cube-bl-42X7Y3KO.png → static/illustrations/marketplace-cube-bl.png} +0 -0
  113. /package/dist/{marketplace-cube-br-Y5MZRDIL.png → static/illustrations/marketplace-cube-br.png} +0 -0
  114. /package/dist/{marketplace-cube-tl-PEJKW6RX.png → static/illustrations/marketplace-cube-tl.png} +0 -0
  115. /package/dist/{marketplace-cube-tr-O5XQ6Q4N.png → static/illustrations/marketplace-cube-tr.png} +0 -0
  116. /package/dist/{marketplace-desktop-7XUR54PR.png → static/illustrations/marketplace-desktop.png} +0 -0
  117. /package/dist/{marketplace-mobile-DI462WKF.png → static/illustrations/marketplace-mobile.png} +0 -0
@@ -0,0 +1,26 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { HTMLAttributes } from 'react';
3
+ export { CaretSlimIcon as AngularLogo, CaretSlimIcon as CodeGeneratorLogo, CaretSlimIcon as ConductorLogo, CaretSlimIcon as ConfigLogo, CaretSlimIcon as FetsLogo, CaretSlimIcon as GraphQLFoundationLogo, CaretSlimIcon as GuildLogo, CaretSlimIcon as HeltinLogo, CaretSlimIcon as HiveCombinationMark, CaretSlimIcon as KitQLLogo, CaretSlimIcon as MeshLogo, CaretSlimIcon as ModulesLogo, CaretSlimIcon as NextraLogo, CaretSlimIcon as SSELogo, CaretSlimIcon as StitchingLogo, CaretSlimIcon as TheGuild, CaretSlimIcon as ToolsLogo, CaretSlimIcon as WSLogo, CaretSlimIcon as WhatsAppLogo, CaretSlimIcon as YogaLogo } from '../components/icons/index.mjs';
4
+ import 'nextra/icons';
5
+
6
+ interface LettermarkLogoProps extends HTMLAttributes<HTMLElement> {
7
+ }
8
+ declare const InspectorLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
9
+ declare const SofaLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
10
+ declare const GraphQLESlintLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
11
+ declare const EnvelopLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
12
+ declare const ScalarsLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
13
+ declare const ConductorLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
14
+ declare const StitchingLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
15
+ declare const ToolsLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
16
+ declare const ModulesLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
17
+ declare const ConfigLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
18
+ declare const FetsLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
19
+ declare const AngularLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
20
+ declare const KitQLLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
21
+ declare const WSLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
22
+ declare const SSELettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
23
+ declare const HeltinLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
24
+ declare const WhatsAppLettermark: (props: LettermarkLogoProps) => react_jsx_runtime.JSX.Element;
25
+
26
+ export { AngularLettermark, ConductorLettermark, ConfigLettermark, EnvelopLettermark, FetsLettermark, GraphQLESlintLettermark, HeltinLettermark, InspectorLettermark, KitQLLettermark, type LettermarkLogoProps, ModulesLettermark, SSELettermark, ScalarsLettermark, SofaLettermark, StitchingLettermark, ToolsLettermark, WSLettermark, WhatsAppLettermark };
@@ -1,9 +1,6 @@
1
- // src/cn.ts
2
- import { clsx } from "clsx";
3
- import { twMerge } from "tailwind-merge";
4
- function cn(...inputs) {
5
- return twMerge(clsx(inputs));
6
- }
1
+ import {
2
+ cn
3
+ } from "../chunk-ME7V4BHY.js";
7
4
 
8
5
  // src/logos/angular.svg
9
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -185,55 +182,73 @@ var SvgGraphqlFoundation = (props) => /* @__PURE__ */ jsxs16("svg", { width: 118
185
182
 
186
183
  // src/logos/index.tsx
187
184
  import { jsx as jsx21 } from "react/jsx-runtime";
188
- var createLettermarkLogo = (text) => {
189
- function LettermarkLogo(props) {
190
- return /* @__PURE__ */ jsx21(
191
- "span",
192
- {
193
- role: "img",
194
- ...props,
195
- className: cn(
196
- "inline-flex items-center justify-center text-sm font-medium uppercase leading-5",
197
- props.className
198
- ),
199
- children: text
200
- }
201
- );
202
- }
203
- LettermarkLogo.displayName = "LettermarkLogo";
204
- return LettermarkLogo;
185
+ var HOCLettermarkLogo = (text) => function LettermarkLogo(props) {
186
+ return /* @__PURE__ */ jsx21(
187
+ "span",
188
+ {
189
+ role: "img",
190
+ ...props,
191
+ className: cn(
192
+ "inline-flex items-center justify-center text-sm font-medium leading-5",
193
+ props.className
194
+ ),
195
+ children: text
196
+ }
197
+ );
205
198
  };
206
- var InspectorLettermark = createLettermarkLogo("I");
207
- var SofaLettermark = createLettermarkLogo("So");
208
- var GraphQLESlintLettermark = createLettermarkLogo("Esl");
209
- var EnvelopLettermark = createLettermarkLogo("E");
210
- var ScalarsLettermark = createLettermarkLogo("S");
211
-
199
+ var InspectorLettermark = HOCLettermarkLogo("INS");
200
+ var SofaLettermark = HOCLettermarkLogo("SOF");
201
+ var GraphQLESlintLettermark = HOCLettermarkLogo("ESL");
202
+ var EnvelopLettermark = HOCLettermarkLogo("ENV");
203
+ var ScalarsLettermark = HOCLettermarkLogo("SCL");
204
+ var ConductorLettermark = HOCLettermarkLogo("CON");
205
+ var StitchingLettermark = HOCLettermarkLogo("STI");
206
+ var ToolsLettermark = HOCLettermarkLogo("TLS");
207
+ var ModulesLettermark = HOCLettermarkLogo("MOD");
208
+ var ConfigLettermark = HOCLettermarkLogo("CFG");
209
+ var FetsLettermark = HOCLettermarkLogo("FTS");
210
+ var AngularLettermark = HOCLettermarkLogo("ANG");
211
+ var KitQLLettermark = HOCLettermarkLogo("KQL");
212
+ var WSLettermark = HOCLettermarkLogo("WS");
213
+ var SSELettermark = HOCLettermarkLogo("SSE");
214
+ var HeltinLettermark = HOCLettermarkLogo("HLT");
215
+ var WhatsAppLettermark = HOCLettermarkLogo("WAP");
212
216
  export {
213
- cn,
214
- SvgAngular,
215
- SvgCodeGenerator,
216
- SvgConductor,
217
- SvgConfig,
218
- SvgFets,
219
- SvgGuild,
220
- SvgHeltin,
221
- SvgKitql,
222
- SvgMesh,
223
- SvgModules,
224
- SvgNextra,
225
- SvgSse,
226
- SvgStitching,
227
- SvgTheGuild,
228
- SvgTools,
229
- SvgWhatsapp,
230
- SvgWs,
231
- SvgYoga,
232
- SvgHiveCombinationMark,
233
- SvgGraphqlFoundation,
217
+ AngularLettermark,
218
+ SvgAngular as AngularLogo,
219
+ SvgCodeGenerator as CodeGeneratorLogo,
220
+ ConductorLettermark,
221
+ SvgConductor as ConductorLogo,
222
+ ConfigLettermark,
223
+ SvgConfig as ConfigLogo,
224
+ EnvelopLettermark,
225
+ FetsLettermark,
226
+ SvgFets as FetsLogo,
227
+ GraphQLESlintLettermark,
228
+ SvgGraphqlFoundation as GraphQLFoundationLogo,
229
+ SvgGuild as GuildLogo,
230
+ HeltinLettermark,
231
+ SvgHeltin as HeltinLogo,
232
+ SvgHiveCombinationMark as HiveCombinationMark,
234
233
  InspectorLettermark,
234
+ KitQLLettermark,
235
+ SvgKitql as KitQLLogo,
236
+ SvgMesh as MeshLogo,
237
+ ModulesLettermark,
238
+ SvgModules as ModulesLogo,
239
+ SvgNextra as NextraLogo,
240
+ SSELettermark,
241
+ SvgSse as SSELogo,
242
+ ScalarsLettermark,
235
243
  SofaLettermark,
236
- GraphQLESlintLettermark,
237
- EnvelopLettermark,
238
- ScalarsLettermark
244
+ StitchingLettermark,
245
+ SvgStitching as StitchingLogo,
246
+ SvgTheGuild as TheGuild,
247
+ ToolsLettermark,
248
+ SvgTools as ToolsLogo,
249
+ WSLettermark,
250
+ SvgWs as WSLogo,
251
+ WhatsAppLettermark,
252
+ SvgWhatsapp as WhatsAppLogo,
253
+ SvgYoga as YogaLogo
239
254
  };
@@ -0,0 +1,5 @@
1
+ import { useMDXComponents as useMDXComponents$1 } from 'nextra-theme-docs';
2
+
3
+ declare const useMDXComponents: typeof useMDXComponents$1;
4
+
5
+ export { useMDXComponents };
@@ -0,0 +1,50 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import fs from "fs/promises";
3
+ import path from "path";
4
+ import clsx from "clsx";
5
+ import { useMDXComponents as getDocsMDXComponents } from "nextra-theme-docs";
6
+ const docsComponents = getDocsMDXComponents({
7
+ async source({ src, type, ...props }) {
8
+ if (!src) {
9
+ throw new Error("Must provide `src` prop");
10
+ }
11
+ if (src.startsWith("/")) {
12
+ const filePath = path.join(process.cwd(), "public", src);
13
+ try {
14
+ await fs.access(filePath);
15
+ } catch (error) {
16
+ const relativePath = path.relative(process.cwd(), filePath);
17
+ if (error.code === "ENOENT") {
18
+ throw new Error(`File doesn't exist: ${relativePath}`);
19
+ }
20
+ throw new Error(`Error checking file: ${relativePath}`);
21
+ }
22
+ }
23
+ let ext = path.extname(src).slice(1);
24
+ if (ext === "mov") {
25
+ ext = "quicktime";
26
+ }
27
+ return /* @__PURE__ */ jsx("source", { ...props, src, type: type || `video/${ext}` });
28
+ },
29
+ video: ({ className, children, ...props }) => /* @__PURE__ */ jsxs("video", { className: clsx("mt-6 w-full", className), autoPlay: true, loop: true, muted: true, ...props, children: [
30
+ children,
31
+ "Your browser does not support HTML video."
32
+ ] }),
33
+ iframe: ({ className, ...props }) => /* @__PURE__ */ jsx(
34
+ "iframe",
35
+ {
36
+ className: clsx("mt-6 aspect-video w-full", className),
37
+ title: "YouTube Video Player",
38
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
39
+ allowFullScreen: true,
40
+ ...props
41
+ }
42
+ )
43
+ });
44
+ const useMDXComponents = (components) => ({
45
+ ...docsComponents,
46
+ ...components
47
+ });
48
+ export {
49
+ useMDXComponents
50
+ };
@@ -2,16 +2,21 @@ import { FC, SVGProps, HTMLProps } from 'react';
2
2
  import { MenuItem } from 'nextra/normalize-pages';
3
3
 
4
4
  type ProductType = 'HIVE' | 'CONDUCTOR' | 'YOGA' | 'ENVELOP' | 'INSPECTOR' | 'CODEGEN' | 'MESH' | 'TOOLS' | 'MODULES' | 'ESLINT' | 'CONFIG' | 'SCALARS' | 'SOFA' | 'STITCHING' | 'ANGULAR' | 'WHATSAPP' | 'KITQL' | 'SSE' | 'WS' | 'FETS' | 'HELTIN' | 'NEXTRA';
5
- interface ProductInfo {
5
+ declare const PRODUCTS: Record<ProductType, {
6
6
  name: string;
7
7
  title: string;
8
8
  href: `https://${string}`;
9
9
  logo: FC<SVGProps<SVGElement>> | FC<HTMLProps<HTMLElement>>;
10
10
  primaryColor: `#${string}`;
11
- }
12
- declare const PRODUCTS: Record<ProductType, ProductInfo>;
13
- declare const SIX_HIGHLIGHTED_PRODUCTS: ProductInfo[];
11
+ }>;
12
+ declare const SIX_HIGHLIGHTED_PRODUCTS: {
13
+ name: string;
14
+ title: string;
15
+ href: `https://${string}`;
16
+ logo: FC<SVGProps<SVGElement>> | FC<HTMLProps<HTMLElement>>;
17
+ primaryColor: `#${string}`;
18
+ }[];
14
19
  /** List of products displayed in hamburger menu. */
15
20
  declare const PRODUCTS_MENU_LIST: MenuItem['items'];
16
21
 
17
- export { PRODUCTS, PRODUCTS_MENU_LIST, type ProductInfo, type ProductType, SIX_HIGHLIGHTED_PRODUCTS };
22
+ export { PRODUCTS, PRODUCTS_MENU_LIST, type ProductType, SIX_HIGHLIGHTED_PRODUCTS };
package/dist/products.js CHANGED
@@ -1,9 +1,234 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "./cn";
3
+ import { CodegenIcon, HiveIcon, MeshIcon, YogaIcon } from "./components/icons";
1
4
  import {
2
- PRODUCTS,
3
- PRODUCTS_MENU_LIST,
4
- SIX_HIGHLIGHTED_PRODUCTS
5
- } from "./chunk-XKCA3AB7.js";
6
- import "./chunk-EWF5AT2G.js";
5
+ AngularLettermark,
6
+ ConductorLettermark,
7
+ ConfigLettermark,
8
+ EnvelopLettermark,
9
+ FetsLettermark,
10
+ GraphQLESlintLettermark,
11
+ HeltinLettermark,
12
+ InspectorLettermark,
13
+ KitQLLettermark,
14
+ ModulesLettermark,
15
+ NextraLogo,
16
+ ScalarsLettermark,
17
+ SofaLettermark,
18
+ SSELettermark,
19
+ StitchingLettermark,
20
+ ToolsLettermark,
21
+ WhatsAppLettermark,
22
+ WSLettermark
23
+ } from "./logos";
24
+ const PRODUCTS = {
25
+ HIVE: {
26
+ name: "Hive",
27
+ title: "Schema registry for your GraphQL workflows",
28
+ href: "https://the-guild.dev/graphql/hive",
29
+ logo: HiveIcon,
30
+ primaryColor: "#ffb21d"
31
+ },
32
+ MESH: {
33
+ name: "Mesh",
34
+ title: "A fully-featured GraphQL gateway framework",
35
+ href: "https://the-guild.dev/graphql/mesh",
36
+ logo: MeshIcon,
37
+ primaryColor: "#1bcbe2"
38
+ },
39
+ YOGA: {
40
+ name: "Yoga",
41
+ title: "A fully-featured, simple to set up, performant and extendable server",
42
+ href: "https://the-guild.dev/graphql/yoga-server",
43
+ logo: YogaIcon,
44
+ primaryColor: "#c026d3"
45
+ },
46
+ CODEGEN: {
47
+ name: "Codegen",
48
+ title: "Generation of typed queries, mutations, subscriptions and typed GraphQL resolvers",
49
+ href: "https://the-guild.dev/graphql/codegen",
50
+ logo: CodegenIcon,
51
+ primaryColor: "#0284c7"
52
+ },
53
+ NEXTRA: {
54
+ name: "Nextra",
55
+ title: "Simple, powerful and flexible site generation framework with everything you love from Next.js",
56
+ href: "https://nextra.site",
57
+ logo: NextraLogo,
58
+ primaryColor: "#000"
59
+ },
60
+ CONDUCTOR: {
61
+ name: "Conductor",
62
+ title: "All-in-one GraphQL Gateway",
63
+ href: "https://the-guild.dev/graphql/gateway",
64
+ logo: ConductorLettermark,
65
+ primaryColor: "#0f766e"
66
+ },
67
+ ENVELOP: {
68
+ name: "Envelop",
69
+ title: "Develop and share plugins that are usable with any GraphQL server framework or schema",
70
+ href: "https://the-guild.dev/graphql/envelop",
71
+ logo: EnvelopLettermark,
72
+ primaryColor: "#ff00e5"
73
+ },
74
+ STITCHING: {
75
+ name: "Stitching",
76
+ title: "Automatically stitch multiple schemas together into one larger API in a simple, fast and powerful way",
77
+ href: "https://the-guild.dev/graphql/stitching",
78
+ logo: StitchingLettermark,
79
+ primaryColor: "#f95428"
80
+ },
81
+ INSPECTOR: {
82
+ name: "Inspector",
83
+ title: "Schema management tool",
84
+ href: "https://the-guild.dev/graphql/inspector",
85
+ logo: InspectorLettermark,
86
+ primaryColor: "#59f79d"
87
+ },
88
+ TOOLS: {
89
+ name: "Tools",
90
+ title: "A set of utilities for faster GraphQL development",
91
+ href: "https://the-guild.dev/graphql/tools",
92
+ logo: ToolsLettermark,
93
+ primaryColor: "#184ae8"
94
+ },
95
+ MODULES: {
96
+ name: "Modules",
97
+ title: "Enterprise grade tooling for your GraphQL server",
98
+ href: "https://the-guild.dev/graphql/modules",
99
+ logo: ModulesLettermark,
100
+ primaryColor: "#e535ab"
101
+ },
102
+ ESLINT: {
103
+ name: "ESLint",
104
+ title: "Customisable ESLint parser, plugin and set rules for GraphQL",
105
+ href: "https://the-guild.dev/graphql/eslint",
106
+ logo: GraphQLESlintLettermark,
107
+ primaryColor: "#5639ca"
108
+ },
109
+ CONFIG: {
110
+ name: "Config",
111
+ title: "One configuration for all your GraphQL projects",
112
+ href: "https://the-guild.dev/graphql/config",
113
+ logo: ConfigLettermark,
114
+ primaryColor: "#6d7a99"
115
+ },
116
+ FETS: {
117
+ name: "feTS",
118
+ title: "Build and consume REST APIs with the e2e type safety using TypeScript and OpenAPI",
119
+ href: "https://the-guild.dev/fets",
120
+ logo: FetsLettermark,
121
+ primaryColor: "#3178c6"
122
+ },
123
+ SCALARS: {
124
+ name: "Scalars",
125
+ title: "Common custom GraphQL Scalars for precise type-safe GraphQL schemas",
126
+ href: "https://the-guild.dev/graphql/scalars",
127
+ logo: ScalarsLettermark,
128
+ primaryColor: "#f38"
129
+ },
130
+ SOFA: {
131
+ name: "SOFA",
132
+ title: "Generate RESTful APIs from your GraphQL server",
133
+ href: "https://the-guild.dev/graphql/sofa-api",
134
+ logo: SofaLettermark,
135
+ primaryColor: "#e873ff"
136
+ },
137
+ ANGULAR: {
138
+ name: "Angular",
139
+ title: "A fully-featured GraphQL client for Angular",
140
+ href: "https://the-guild.dev/graphql/apollo-angular",
141
+ logo: AngularLettermark,
142
+ primaryColor: "#ff1035"
143
+ },
144
+ WHATSAPP: {
145
+ name: "WhatsApp",
146
+ title: "Full stack, open source tutorial",
147
+ href: "https://github.com/Urigo/WhatsApp-Clone-Tutorial",
148
+ logo: WhatsAppLettermark,
149
+ primaryColor: "#31eb14"
150
+ },
151
+ KITQL: {
152
+ name: "KitQL",
153
+ title: "A set of tools, helping you building efficient apps in a fast way",
154
+ href: "https://kitql.dev",
155
+ logo: KitQLLettermark,
156
+ primaryColor: "#ff3e00"
157
+ },
158
+ WS: {
159
+ name: "WS",
160
+ title: "Reference implementation of the GraphQL over WS spec",
161
+ href: "https://the-guild.dev/graphql/ws",
162
+ logo: WSLettermark,
163
+ primaryColor: "#0bf2e7"
164
+ },
165
+ SSE: {
166
+ name: "SSE",
167
+ title: "Reference implementation of the GraphQL over SSE spec",
168
+ href: "https://the-guild.dev/graphql/sse",
169
+ logo: SSELettermark,
170
+ primaryColor: "#08e045"
171
+ },
172
+ HELTIN: {
173
+ name: "heltin",
174
+ title: "Mental healthcare registry",
175
+ href: "https://the-guild.dev/heltin",
176
+ logo: HeltinLettermark,
177
+ primaryColor: "#1d90ff"
178
+ }
179
+ };
180
+ const SIX_HIGHLIGHTED_PRODUCTS = [
181
+ PRODUCTS.INSPECTOR,
182
+ PRODUCTS.ENVELOP,
183
+ PRODUCTS.SOFA,
184
+ PRODUCTS.SCALARS,
185
+ PRODUCTS.ESLINT,
186
+ PRODUCTS.NEXTRA
187
+ ];
188
+ const PRODUCTS_MENU_LIST = Object.fromEntries(
189
+ [
190
+ "The GraphQL Stack",
191
+ PRODUCTS.MESH,
192
+ PRODUCTS.YOGA,
193
+ PRODUCTS.CODEGEN,
194
+ "Libraries",
195
+ ...SIX_HIGHLIGHTED_PRODUCTS
196
+ ].map((item, i) => {
197
+ if (typeof item === "string") {
198
+ return [
199
+ i,
200
+ {
201
+ type: "separator",
202
+ title: /* @__PURE__ */ jsxs(Fragment, { children: [
203
+ /* @__PURE__ */ jsx("style", { className: "label-separator", children: "li:has(.label-separator) { margin: 0.75rem 0 0.25rem 0 !important; padding: 0 !important; }" }),
204
+ /* @__PURE__ */ jsx("span", { className: "ml-2 font-medium text-gray-500 dark:text-neutral-400", children: item })
205
+ ] })
206
+ }
207
+ ];
208
+ }
209
+ const Logo = item.logo;
210
+ return [
211
+ i,
212
+ {
213
+ type: "page",
214
+ href: item.href,
215
+ newWindow: true,
216
+ title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
217
+ /* @__PURE__ */ jsx(
218
+ Logo,
219
+ {
220
+ className: cn(
221
+ "size-4 translate-y-[0.25px]",
222
+ i > 3 && "rounded-sm bg-gray-500 text-[8px] text-white dark:bg-white/10"
223
+ )
224
+ }
225
+ ),
226
+ item.name
227
+ ] })
228
+ }
229
+ ];
230
+ })
231
+ );
7
232
  export {
8
233
  PRODUCTS,
9
234
  PRODUCTS_MENU_LIST,
@@ -0,0 +1,5 @@
1
+ export { fetchFilePathsFromGitHub } from 'nextra/fetch-filepaths-from-github';
2
+ export { compileMdx } from 'nextra/compile';
3
+ export { getPageMap } from 'nextra/page-map';
4
+ export { fetchPackageInfo } from './npm.mjs';
5
+ export { MDXRemote } from 'nextra/mdx-remote';
@@ -0,0 +1,12 @@
1
+ import { fetchFilePathsFromGitHub } from "nextra/fetch-filepaths-from-github";
2
+ import { compileMdx } from "nextra/compile";
3
+ import { getPageMap } from "nextra/page-map";
4
+ import { fetchPackageInfo } from "./npm.js";
5
+ import { MDXRemote } from "nextra/mdx-remote";
6
+ export {
7
+ MDXRemote,
8
+ compileMdx,
9
+ fetchFilePathsFromGitHub,
10
+ fetchPackageInfo,
11
+ getPageMap
12
+ };
@@ -0,0 +1,10 @@
1
+ import { NextConfig } from 'next';
2
+ import { NextraConfig } from 'nextra';
3
+
4
+ declare const defaultNextraOptions: NextraConfig;
5
+ interface WithGuildDocsOptions extends NextConfig {
6
+ nextraConfig?: NextraConfig;
7
+ }
8
+ declare function withGuildDocs({ nextraConfig, ...nextConfig }?: WithGuildDocsOptions): NextConfig;
9
+
10
+ export { type WithGuildDocsOptions, defaultNextraOptions, withGuildDocs };
@@ -0,0 +1,107 @@
1
+ import { createRequire } from "module";
2
+ import path from "path";
3
+ import nextra from "nextra";
4
+ import nextBundleAnalyzer from "@next/bundle-analyzer";
5
+ import { applyUnderscoreRedirects } from "./underscore-redirects.js";
6
+ const warnings = /* @__PURE__ */ new Set();
7
+ const require2 = createRequire(import.meta.url);
8
+ const rehypeCheckFrontMatter = () => (_ast, file) => {
9
+ const [filePath] = file.history;
10
+ if (!filePath) return;
11
+ const { description } = file.data.frontMatter;
12
+ const relativePath = path.relative(process.cwd(), filePath);
13
+ const fileName = path.parse(relativePath).name;
14
+ const isPage = relativePath.startsWith("app/") && fileName === "page" || relativePath.startsWith("/content/");
15
+ if (!isPage) return;
16
+ function warnOnce(message) {
17
+ const msg = `[@theguild/components] SEO issue in "${relativePath}": ${message}`;
18
+ if (!warnings.has(msg)) {
19
+ warnings.add(msg);
20
+ console.warn(msg);
21
+ }
22
+ }
23
+ if (!description) {
24
+ warnOnce("The description is missing");
25
+ } else if (description.length > 160) {
26
+ warnOnce(
27
+ `The description "${description}" is too long, should be less than 160 characters, not ${description.length}`
28
+ );
29
+ } else if (description.length < 50) {
30
+ warnOnce(
31
+ `The description "${description}" is too short, should be more than 50 characters, not ${description.length}`
32
+ );
33
+ }
34
+ };
35
+ const defaultNextraOptions = {
36
+ defaultShowCopyCode: true,
37
+ whiteListTagsStyling: ["iframe", "video", "source"],
38
+ search: {
39
+ codeblocks: true
40
+ },
41
+ mdxOptions: {
42
+ // Check front matter only in production (when Webpack is used)
43
+ // Should be rehype since frontMatter is attached in remark plugins
44
+ rehypePlugins: process.env.NODE_ENV === "production" ? [rehypeCheckFrontMatter] : []
45
+ }
46
+ };
47
+ function withGuildDocs({ nextraConfig, ...nextConfig } = {}) {
48
+ if (nextConfig.webpack?.toString().includes("applyUnderscoreRedirects")) {
49
+ throw new Error(
50
+ "`applyUnderscoreRedirects` in `nextConfig.webpack` was already configured, remove it from your config"
51
+ );
52
+ }
53
+ const withBundleAnalyzer = nextBundleAnalyzer({
54
+ enabled: process.env.ANALYZE === "true"
55
+ });
56
+ const withNextra = nextra({ ...defaultNextraOptions, ...nextraConfig });
57
+ const nextraClientPath = path.relative(
58
+ process.cwd(),
59
+ path.join(require2.resolve("nextra/package.json"), "..", "dist", "client")
60
+ );
61
+ return withBundleAnalyzer(
62
+ withNextra({
63
+ reactStrictMode: true,
64
+ poweredByHeader: false,
65
+ basePath: process.env.NEXT_BASE_PATH,
66
+ ...nextConfig,
67
+ env: {
68
+ SITE_URL: process.env.SITE_URL || "",
69
+ ...nextConfig.env
70
+ },
71
+ webpack(config, meta) {
72
+ applyUnderscoreRedirects(config, meta);
73
+ return nextConfig.webpack?.(config, meta) || config;
74
+ },
75
+ experimental: {
76
+ // TODO: Provoke white flash ⚪️💥 on initial loading with dark theme
77
+ // optimizeCss: true,
78
+ ...nextConfig.experimental,
79
+ turbo: {
80
+ resolveAlias: {
81
+ // Fixes when Turbopack is enabled: Module not found: Can't resolve '@theguild/remark-mermaid/mermaid'
82
+ "@theguild/remark-mermaid/mermaid": path.relative(
83
+ process.cwd(),
84
+ path.join(
85
+ require2.resolve("@theguild/remark-mermaid/package.json"),
86
+ "..",
87
+ "dist",
88
+ "mermaid.js"
89
+ )
90
+ ),
91
+ "nextra/components": path.join(nextraClientPath, "components", "index.js"),
92
+ "nextra/setup-page": path.join(nextraClientPath, "setup-page.js")
93
+ }
94
+ }
95
+ },
96
+ images: {
97
+ unoptimized: true,
98
+ // doesn't work with `next export`,
99
+ ...nextConfig.images
100
+ }
101
+ })
102
+ );
103
+ }
104
+ export {
105
+ defaultNextraOptions,
106
+ withGuildDocs
107
+ };
@@ -0,0 +1,21 @@
1
+ import 'nextra/fetch-filepaths-from-github';
2
+ import 'nextra/compile';
3
+ import 'nextra/page-map';
4
+ import 'nextra/mdx-remote';
5
+
6
+ type Package = {
7
+ readme: string;
8
+ createdAt: string;
9
+ updatedAt: string;
10
+ description: string;
11
+ weeklyNPMDownloads: number;
12
+ };
13
+ declare function withoutStartingSlash(v: string): string;
14
+ declare function withoutTrailingSlash(v: string): string;
15
+ declare function withStartingSlash(v: string): string;
16
+ declare const fetchPackageInfo: (packageName: string, githubReadme?: {
17
+ repo: string;
18
+ path: string;
19
+ }) => Promise<Package>;
20
+
21
+ export { fetchPackageInfo, withStartingSlash, withoutStartingSlash, withoutTrailingSlash };