@theguild/components 8.0.0-alpha-20241205150715-1c38acac57eaf933887bfbbb59a87a939b658817 → 8.0.0-alpha-20241205181447-87125d0b44dc0d1a7ce638de956987d05110bb5e

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 (55) hide show
  1. package/dist/components/contact-us.d.mts +18 -0
  2. package/dist/components/contact-us.js +32 -0
  3. package/dist/components/cookies-consent.d.mts +2 -1
  4. package/dist/components/cookies-consent.js +25 -9
  5. package/dist/components/explore-main-product-cards.js +1 -1
  6. package/dist/components/get-your-api-game-right-section.js +4 -16
  7. package/dist/components/heading.js +1 -0
  8. package/dist/components/{hive-footer.d.mts → hive-footer/index.d.mts} +8 -5
  9. package/dist/components/{hive-footer.js → hive-footer/index.js} +18 -26
  10. package/dist/components/hive-navigation/graphql-conf-card.js +1 -1
  11. package/dist/components/hive-navigation/index.d.mts +11 -18
  12. package/dist/components/hive-navigation/index.js +40 -72
  13. package/dist/components/icons/index.d.mts +1 -1
  14. package/dist/components/icons/index.js +28 -28
  15. package/dist/components/icons/stellate.js +12 -0
  16. package/dist/components/index.d.mts +6 -5
  17. package/dist/components/index.js +4 -12
  18. package/dist/components/{tools-and-libraries-cards → product-card}/hive-decoration.js +1 -1
  19. package/dist/components/{tools-and-libraries-cards → product-card}/hive-gateway-decoration.js +1 -1
  20. package/dist/components/product-card/index.d.mts +13 -0
  21. package/dist/components/product-card/index.js +101 -0
  22. package/dist/components/{tools-and-libraries-cards → product-card}/mesh-decoration.js +1 -1
  23. package/dist/components/product-card/yoga-decoration.d.mts +3 -0
  24. package/dist/components/{tools-and-libraries-cards → product-card}/yoga-decoration.js +1 -1
  25. package/dist/components/schema-type.js +1 -1
  26. package/dist/components/stud.d.mts +2 -1
  27. package/dist/components/tools-and-libraries-cards/index.d.mts +3 -12
  28. package/dist/components/tools-and-libraries-cards/index.js +12 -87
  29. package/dist/index.d.mts +8 -8
  30. package/dist/index.js +3 -1
  31. package/dist/logos/guild.js +1 -1
  32. package/dist/logos/index.d.mts +20 -21
  33. package/dist/logos/index.js +16 -13
  34. package/dist/products.d.mts +9 -6
  35. package/dist/products.js +20 -13
  36. package/dist/server/index.d.mts +5 -4
  37. package/dist/server/index.js +2 -1
  38. package/dist/server/mdx-components.d.mts +183 -204
  39. package/dist/server/mdx-components.js +2 -1
  40. package/dist/server/next.config.js +16 -2
  41. package/dist/server/theme-layout.d.mts +7 -1
  42. package/dist/server/theme-layout.js +29 -13
  43. package/dist/types/components.d.mts +1 -9
  44. package/package.json +3 -3
  45. package/style.css +16 -43
  46. package/dist/components/footer.d.mts +0 -9
  47. package/dist/components/footer.js +0 -116
  48. package/dist/components/guild-navbar-logo.d.mts +0 -19
  49. package/dist/components/guild-navbar-logo.js +0 -62
  50. package/dist/helpers/render-slot.d.mts +0 -3
  51. package/dist/helpers/render-slot.js +0 -21
  52. /package/dist/components/{tools-and-libraries-cards/hive-decoration.d.mts → icons/stellate.d.mts} +0 -0
  53. /package/dist/components/{tools-and-libraries-cards/hive-gateway-decoration.d.mts → product-card/hive-decoration.d.mts} +0 -0
  54. /package/dist/components/{tools-and-libraries-cards/mesh-decoration.d.mts → product-card/hive-gateway-decoration.d.mts} +0 -0
  55. /package/dist/components/{tools-and-libraries-cards/yoga-decoration.d.mts → product-card/mesh-decoration.d.mts} +0 -0
@@ -1,11 +1,10 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Layout, Navbar } from "nextra-theme-docs";
2
+ import { Layout } from "nextra-theme-docs";
3
3
  import { Head } from "nextra/components";
4
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";
5
+ import { Anchor } from "../components";
6
+ import { HiveFooter } from "../components/hive-footer";
7
+ import { HiveNavigation } from "../components/hive-navigation";
9
8
  import { siteOrigin, siteUrl } from "../constants";
10
9
  import { PRODUCTS } from "../products";
11
10
  const companyItem = {
@@ -43,8 +42,6 @@ const GuildLayout = async ({
43
42
  layoutProps,
44
43
  navbarProps
45
44
  }) => {
46
- const url = new URL(layoutProps.docsRepositoryBase);
47
- const [, org, repoName] = url.pathname.split("/");
48
45
  const [meta, ...pageMap] = await getPageMap();
49
46
  const pageMapWithCompanyMenu = [
50
47
  {
@@ -73,15 +70,34 @@ const GuildLayout = async ({
73
70
  /* @__PURE__ */ jsx("body", { children: /* @__PURE__ */ jsx(
74
71
  Layout,
75
72
  {
76
- footer: /* @__PURE__ */ jsx(Footer, {}),
73
+ footer: /* @__PURE__ */ jsx(
74
+ HiveFooter,
75
+ {
76
+ logo: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
77
+ logo,
78
+ /* @__PURE__ */ jsx("span", { className: "text-2xl/[1.2] font-medium tracking-[-0.16px]", children: websiteName })
79
+ ] }),
80
+ description
81
+ }
82
+ ),
77
83
  navbar: /* @__PURE__ */ jsx(
78
- Navbar,
84
+ HiveNavigation,
79
85
  {
80
- logo: getNavbarLogo({ logo, websiteName, description }),
81
- logoLink: false,
82
- projectLink: `${url.origin}/${org}/${repoName}`,
86
+ className: "max-w-[90rem]",
87
+ productName: websiteName,
88
+ navLinks: [],
83
89
  ...navbarProps,
84
- children: /* @__PURE__ */ jsx(ThemeSwitcherButton, { children: /* @__PURE__ */ jsx(MoonIcon, { className: "fill-transparent stroke-gray-500 dark:fill-gray-100 dark:stroke-gray-100" }) })
90
+ logo: /* @__PURE__ */ jsxs(
91
+ Anchor,
92
+ {
93
+ href: "/",
94
+ className: "hive-focus -m-2 flex shrink-0 items-center gap-3 rounded-md p-2",
95
+ children: [
96
+ logo,
97
+ /* @__PURE__ */ jsx("span", { className: "text-2xl font-medium tracking-[-0.16px]", children: websiteName })
98
+ ]
99
+ }
100
+ )
85
101
  }
86
102
  ),
87
103
  editLink: "Edit this page on GitHub",
@@ -11,14 +11,6 @@ type ILink = LinkProps & Pick<ComponentProps<'a'>, 'target' | 'rel' | 'title' |
11
11
  children: ReactNode;
12
12
  newWindow?: boolean;
13
13
  };
14
- interface IFooterExtendedProps {
15
- className?: string;
16
- /**
17
- * @deprecated use `items` instead
18
- */
19
- resources?: ILink[];
20
- logo?: ILink;
21
- }
22
14
  interface IFeatureListProps {
23
15
  className?: string;
24
16
  title?: string;
@@ -124,4 +116,4 @@ interface IEditorProps {
124
116
  operations?: string;
125
117
  }
126
118
 
127
- export type { IEditorProps, IFeatureListProps, IFooterExtendedProps, IHeroGradientProps, IHeroIllustrationProps, IHeroMarketplaceProps, IHeroVideoProps, IInfoListProps, ILink, IMarketplaceItemProps, IMarketplaceItemsProps, IMarketplaceListProps, IMarketplaceSearchProps, ISchemaPageProps };
119
+ export type { IEditorProps, IFeatureListProps, IHeroGradientProps, IHeroIllustrationProps, IHeroMarketplaceProps, IHeroVideoProps, IInfoListProps, ILink, IMarketplaceItemProps, IMarketplaceItemsProps, IMarketplaceListProps, IMarketplaceSearchProps, ISchemaPageProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theguild/components",
3
- "version": "8.0.0-alpha-20241205150715-1c38acac57eaf933887bfbbb59a87a939b658817",
3
+ "version": "8.0.0-alpha-20241205181447-87125d0b44dc0d1a7ce638de956987d05110bb5e",
4
4
  "repository": {
5
5
  "url": "https://github.com/the-guild-org/docs",
6
6
  "directory": "packages/components"
@@ -49,8 +49,8 @@
49
49
  "@radix-ui/react-navigation-menu": "^1.2.0",
50
50
  "clsx": "2.1.1",
51
51
  "fuzzy": "0.1.3",
52
- "nextra": "4.0.0-app-router.28",
53
- "nextra-theme-docs": "4.0.0-app-router.21",
52
+ "nextra": "4.0.0-app-router.34",
53
+ "nextra-theme-docs": "4.0.0-app-router.34",
54
54
  "react-paginate": "8.2.0",
55
55
  "react-player": "2.16.0",
56
56
  "semver": "^7.3.8",
package/style.css CHANGED
@@ -1,58 +1,38 @@
1
- @layer l-base, l-nextra, l-components;
1
+ @layer l-nextra;
2
2
 
3
- /*@import 'tailwindcss/base' layer(l-base);*/
4
- @import 'nextra-theme-docs/dist/style.css' layer(l-nextra);
5
- @import 'tailwindcss/components' layer(l-components);
3
+ /**
4
+ * We don't need Tailwind CSS preflight styles `@import 'tailwindcss/base'`
5
+ * because `style.css` from `nextra-theme-docs` already include them
6
+ **/
7
+ @import 'nextra-theme-docs/dist/style-prefixed.css' layer(l-nextra);
6
8
  @import 'tailwindcss/utilities';
7
-
8
- .nextra-banner-container._bg-neutral-900._flex {
9
- @apply bg-[#48224e] bg-none;
10
- }
11
-
12
- :root {
13
- --nextra-navbar-height: 72px;
14
- }
15
-
16
- html {
17
- /* font from tailwindcss/base is overwritten by Nextra styles */
18
- font-family: var(--font-sans, ui-sans-serif), system-ui, sans-serif, 'Apple Color Emoji',
19
- 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
20
- }
21
-
22
- .nextra-nav-container [role='menu']:has(a[href='https://the-guild.dev/graphql/hive'])
23
- {
24
- @apply grid max-h-[unset] w-[470px] grid-cols-3 gap-y-2 p-2;
25
-
26
- a:nth-child(-n + 3) {
27
- @apply rounded-b-none border-b border-black/20 pb-3 dark:border-white/20;
28
- }
29
- }
9
+ @import 'tailwindcss/components';
30
10
 
31
11
  /* #region hamburger mobile menu */
32
12
 
33
- .light .nextra-sidebar-container input {
13
+ .light .nextra-mobile-nav input {
34
14
  color: rgb(0, 52, 44);
35
15
  background-color: rgb(248, 247, 246) !important;
36
16
  border: 1px solid rgb(241, 238, 228);
37
17
  }
38
18
 
39
- .light .nextra-sidebar-container input::placeholder {
19
+ .light .nextra-mobile-nav input::placeholder {
40
20
  color: rgba(36, 88, 80, 0.9) !important;
41
21
  }
42
22
 
43
- .light .nextra-sidebar-container .nextra-sidebar-footer:is(html[class] *) {
23
+ .light .nextra-mobile-nav .nextra-sidebar-footer:is(html[class] *) {
44
24
  border-color: #e5e7eb;
45
25
  }
46
26
 
47
- .light .nextra-sidebar-container kbd {
27
+ .light .nextra-mobile-nav kbd {
48
28
  @apply !border-gray-200 !bg-white;
49
29
  }
50
30
 
51
- .light .nextra-sidebar-container li > :is(a, button) {
31
+ .light .nextra-mobile-nav li > :is(a, button) {
52
32
  @apply text-gray-500 hover:bg-gray-100 hover:text-gray-900;
53
33
  }
54
34
 
55
- .light .nextra-sidebar-container ul::before {
35
+ .light .nextra-mobile-nav ul::before {
56
36
  @apply !bg-gray-200;
57
37
  }
58
38
 
@@ -80,7 +60,7 @@ html {
80
60
 
81
61
  /* #endregion search results */
82
62
 
83
- @layer l-components {
63
+ @layer components {
84
64
  .hive-focus {
85
65
  &:focus {
86
66
  outline: none;
@@ -123,21 +103,14 @@ html {
123
103
  }
124
104
 
125
105
  /* wrong with neue montreal */
126
- ._subpixel-antialiased {
106
+ .n\:subpixel-antialiased {
127
107
  -webkit-font-smoothing: unset;
128
108
  -moz-osx-font-smoothing: unset;
129
109
  }
130
110
 
131
111
  /* fix for nextra navbar for HiveNavigation */
132
112
  :root {
133
- --nextra-navbar-height: 90px;
134
- }
135
-
136
- @media (min-width: 768px) {
137
- .nextra-sidebar-container,
138
- .nextra-toc > .nextra-scrollbar {
139
- top: var(--nextra-navbar-height);
140
- }
113
+ --nextra-navbar-height: 82px;
141
114
  }
142
115
 
143
116
  @media (max-width: 767px) {
@@ -1,9 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { IFooterExtendedProps } from '../types/components.mjs';
3
- import 'next/image';
4
- import 'next/link';
5
- import 'react-player';
6
-
7
- declare function Footer({ className, resources, logo }: IFooterExtendedProps): ReactElement;
8
-
9
- export { Footer };
@@ -1,116 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { clsx } from "clsx";
3
- import { siteOrigin } from "../constants";
4
- import { GuildLogo, TheGuild } from "../logos";
5
- import { PRODUCTS } from "../products";
6
- import { Anchor } from "./anchor";
7
- import {
8
- CSAStarLevelOneIcon,
9
- DiscordIcon,
10
- GitHubIcon,
11
- LinkedInIcon,
12
- TwitterIcon,
13
- YouTubeIcon
14
- } from "./icons";
15
- const COMPANY = [
16
- {
17
- children: "About",
18
- title: "Learn more about us",
19
- href: `${siteOrigin}/about-us`
20
- },
21
- {
22
- children: "Blog",
23
- title: "Read our blog",
24
- href: `${siteOrigin}/blog`
25
- },
26
- {
27
- children: "Newsletter",
28
- title: "Newsletter",
29
- href: `${siteOrigin}/newsletter`
30
- }
31
- ];
32
- const COMMUNITY = [
33
- {
34
- icon: TwitterIcon,
35
- title: "Visit our Twitter",
36
- href: "https://twitter.com/TheGuildDev"
37
- },
38
- {
39
- icon: LinkedInIcon,
40
- title: "Visit our LinkedIn",
41
- href: "https://linkedin.com/company/the-guild-software"
42
- },
43
- {
44
- icon: DiscordIcon,
45
- title: "Reach us on Discord",
46
- href: "https://discord.com/invite/xud7bH9"
47
- },
48
- {
49
- icon: GitHubIcon,
50
- title: "Check our GitHub account",
51
- href: "https://github.com/the-guild-org"
52
- },
53
- {
54
- icon: YouTubeIcon,
55
- title: "Watch Our Videos",
56
- href: "https://youtube.com/watch?v=d_GBgH-L5c4&list=PLhCf3AUOg4PgQoY_A6xWDQ70yaNtPYtZd"
57
- }
58
- ];
59
- const products = [
60
- PRODUCTS.HIVE,
61
- PRODUCTS.MESH,
62
- PRODUCTS.YOGA,
63
- PRODUCTS.CODEGEN,
64
- PRODUCTS.NEXTRA,
65
- { ...PRODUCTS.SOFA, name: "GraphQL to REST" }
66
- ].map(({ name, href, title }) => ({
67
- children: name,
68
- href,
69
- title
70
- }));
71
- const classes = {
72
- title: clsx("mb-2.5 text-lg font-medium text-gray-900 dark:text-gray-100"),
73
- anchor: clsx("text-gray-500 hover:text-black dark:text-[#b4b5be] hover:dark:text-gray-100")
74
- };
75
- const renderLinks = (list) => /* @__PURE__ */ jsx("ul", { className: "m-0 mb-8 list-none p-0 last:mb-0", children: list.map((link, i) => /* @__PURE__ */ jsx("li", { className: "mb-3 last:mb-0", children: /* @__PURE__ */ jsx(Anchor, { className: clsx(classes.anchor, "inline-block text-sm"), ...link }) }, i)) });
76
- function Footer({ className, resources = [], logo }) {
77
- return /* @__PURE__ */ jsx(
78
- "footer",
79
- {
80
- className: clsx(
81
- "bg-[#fafafa] py-[60px] text-base md:py-[140px] dark:bg-[#0f1114]",
82
- className
83
- ),
84
- children: /* @__PURE__ */ jsx("div", { className: "container max-w-[90rem]", children: /* @__PURE__ */ jsxs("div", { className: "relative flex justify-between gap-10 max-md:flex-col", children: [
85
- /* @__PURE__ */ jsxs(Anchor, { className: "flex items-center gap-2 self-start", href: `${siteOrigin}/`, ...logo, children: [
86
- /* @__PURE__ */ jsx(GuildLogo, { className: "h-9 w-auto" }),
87
- /* @__PURE__ */ jsx(TheGuild, { className: "h-7 w-auto" })
88
- ] }),
89
- /* @__PURE__ */ jsxs("div", { children: [
90
- /* @__PURE__ */ jsx("h3", { className: classes.title, children: "Products" }),
91
- /* @__PURE__ */ jsx("div", { className: "flex gap-6", children: renderLinks(products) })
92
- ] }),
93
- /* @__PURE__ */ jsxs("div", { children: [
94
- /* @__PURE__ */ jsx("h3", { className: classes.title, children: "Resources" }),
95
- renderLinks([
96
- {
97
- children: "Press Kit",
98
- title: "Press Kit",
99
- href: `${siteOrigin}/logos`
100
- },
101
- ...resources
102
- ])
103
- ] }),
104
- /* @__PURE__ */ jsxs("div", { children: [
105
- /* @__PURE__ */ jsx("h3", { className: classes.title, children: "Company" }),
106
- renderLinks(COMPANY)
107
- ] }),
108
- /* @__PURE__ */ jsx("div", { className: "flex items-start gap-5 text-[#b4b5be]", children: COMMUNITY.map(({ icon: Icon, ...iconProps }) => /* @__PURE__ */ jsx(Anchor, { className: classes.anchor, ...iconProps, children: /* @__PURE__ */ jsx(Icon, { className: "h-5 w-auto" }) }, iconProps.title)) }),
109
- /* @__PURE__ */ jsx(CSAStarLevelOneIcon, { className: "absolute right-0 ml-auto h-[4.5rem] w-auto md:bottom-0" })
110
- ] }) })
111
- }
112
- );
113
- }
114
- export {
115
- Footer
116
- };
@@ -1,19 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { FC, ReactNode } from 'react';
3
-
4
- declare const GuildUnifiedLogo: FC<{
5
- children: ReactNode;
6
- title: string;
7
- description: string;
8
- }>;
9
- /**
10
- * GraphQL-related products live under the Hive platform brand, so we use a single logo for them.
11
- * The rest gets The Guild / {Product} logo.
12
- */
13
- declare function getNavbarLogo({ logo, websiteName, description, }: {
14
- logo: ReactNode;
15
- websiteName: string;
16
- description: string;
17
- }): react_jsx_runtime.JSX.Element;
18
-
19
- export { GuildUnifiedLogo, getNavbarLogo };
@@ -1,62 +0,0 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import clsx from "clsx";
3
- import { siteOrigin } from "../constants";
4
- import { GuildLogo, TheGuild } from "../logos";
5
- import { Anchor } from "./anchor";
6
- const GuildUnifiedLogo = ({ children, title, description }) => {
7
- return /* @__PURE__ */ jsxs(Fragment, { children: [
8
- /* @__PURE__ */ jsxs(
9
- Anchor,
10
- {
11
- title: "View our website",
12
- className: clsx(
13
- "flex items-center gap-x-1.5 transition-opacity hover:opacity-75",
14
- children && "max-md:hidden"
15
- ),
16
- href: `${siteOrigin}/`,
17
- children: [
18
- /* @__PURE__ */ jsx(GuildLogo, { className: "h-9 w-auto" }),
19
- /* @__PURE__ */ jsx(TheGuild, { className: "w-11" })
20
- ]
21
- }
22
- ),
23
- children && /* @__PURE__ */ jsxs(Fragment, { children: [
24
- /* @__PURE__ */ jsx(
25
- "svg",
26
- {
27
- height: "22",
28
- viewBox: "0 0 10 22",
29
- stroke: "currentColor",
30
- className: "mx-6 shrink-0 max-md:hidden",
31
- children: /* @__PURE__ */ jsx("path", { d: "M8.6001 0.833313L0.600097 20.8333" })
32
- }
33
- ),
34
- /* @__PURE__ */ jsxs(
35
- Anchor,
36
- {
37
- title,
38
- className: "flex shrink-0 items-center gap-x-1.5 hover:opacity-75",
39
- href: "/",
40
- children: [
41
- children,
42
- /* @__PURE__ */ jsxs("div", { children: [
43
- /* @__PURE__ */ jsx("h1", { className: "text-sm font-bold leading-tight", children: title }),
44
- /* @__PURE__ */ jsx("h2", { className: "text-xs max-lg:hidden", children: description })
45
- ] })
46
- ]
47
- }
48
- )
49
- ] })
50
- ] });
51
- };
52
- function getNavbarLogo({
53
- logo,
54
- websiteName,
55
- description
56
- }) {
57
- return websiteName === "Hive" ? /* @__PURE__ */ jsx(Anchor, { title: websiteName, href: "/", children: logo }) : /* @__PURE__ */ jsx(GuildUnifiedLogo, { description, title: websiteName, children: logo });
58
- }
59
- export {
60
- GuildUnifiedLogo,
61
- getNavbarLogo
62
- };
@@ -1,3 +0,0 @@
1
- declare function renderSlot<TProps extends object>(Slot: React.ReactNode | ((props: TProps) => React.ReactNode), props: Partial<TProps>): React.ReactNode;
2
-
3
- export { renderSlot };
@@ -1,21 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { cloneElement } from "react";
3
- import { cn } from "../cn";
4
- function renderSlot(Slot, props) {
5
- if (typeof Slot === "function") {
6
- return /* @__PURE__ */ jsx(Slot, { ...props });
7
- }
8
- if (!(typeof Slot === "object" && Slot && "props" in Slot)) {
9
- return null;
10
- }
11
- if ("className" in props) {
12
- props = {
13
- ...props,
14
- className: cn(Slot.props.className, props.className)
15
- };
16
- return cloneElement(Slot, props);
17
- }
18
- }
19
- export {
20
- renderSlot
21
- };