@theguild/components 8.2.1-alpha-20250106114900-eb890050d972af4df700dab38dc50585a12c08e2 → 8.2.1-alpha-20250106162405-da8e2b64faa6728e9b101c4610f9185e45766343

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.
@@ -6,7 +6,7 @@ const SvgHighlightDecoration = (props) => /* @__PURE__ */ jsxs("svg", { width: 8
6
6
  /* @__PURE__ */ jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
7
7
  /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: 175, result: "effect1_foregroundBlur_711_1774" })
8
8
  ] }) }),
9
- /* @__PURE__ */ jsx("style", { children: "@supports (-moz-appearance: none) {\n .firefox-highlight-fix {\n opacity: 0.3;\n filter: blur(175px);\n }\n }" })
9
+ /* @__PURE__ */ jsx("style", { children: "\n @supports (-moz-appearance: none) {\n .firefox-highlight-fix {\n opacity: 0.3;\n filter: blur(175px);\n }\n }\n " })
10
10
  ] });
11
11
  export {
12
12
  SvgHighlightDecoration as ReactComponent
@@ -25,7 +25,7 @@ function ExploreMainProductCards({
25
25
  TextLink,
26
26
  {
27
27
  href: isHive ? "/ecosystem" : "https://the-guild.dev/graphql/hive/ecosystem",
28
- className: "mt-4 text-green-800 lg:mt-6",
28
+ className: "mt-4 lg:mt-6",
29
29
  children: [
30
30
  "Learn more",
31
31
  /* @__PURE__ */ jsx(ArrowIcon, {})
@@ -1,8 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { GiscusProps } from '@giscus/react';
3
3
 
4
- declare const Giscus: FC<Omit<GiscusProps, 'mapping'> & {
5
- mapping?: GiscusProps['mapping'];
6
- }>;
4
+ declare const Giscus: FC<GiscusProps>;
7
5
 
8
6
  export { Giscus };
@@ -1,10 +1,13 @@
1
1
  "use client";
2
- import { jsx } from "react/jsx-runtime";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useTheme } from "nextra-theme-docs";
4
- import { default as Giscus_ } from "@giscus/react";
4
+ import { default as _Giscus } from "@giscus/react";
5
5
  const Giscus = (props) => {
6
6
  const { resolvedTheme } = useTheme();
7
- return /* @__PURE__ */ jsx(Giscus_, { theme: resolvedTheme, mapping: "pathname", ...props });
7
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
8
+ /* @__PURE__ */ jsx("br", {}),
9
+ /* @__PURE__ */ jsx(_Giscus, { theme: resolvedTheme, ...props })
10
+ ] });
8
11
  };
9
12
  export {
10
13
  Giscus
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import react__default, { ReactNode, ReactElement, ComponentProps } from 'react';
2
+ import react__default, { ReactNode, ComponentProps } from 'react';
3
3
  import { Search } from 'nextra/components';
4
4
  export { GraphQLConfCard, GraphQLConfCardProps } from './graphql-conf-card.mjs';
5
5
  import 'next/image';
@@ -18,7 +18,6 @@ type HiveNavigationProps = {
18
18
  children: ReactNode;
19
19
  }[];
20
20
  developerMenu: DeveloperMenuProps['developerMenu'];
21
- search?: ReactElement;
22
21
  searchProps?: ComponentProps<typeof Search>;
23
22
  };
24
23
  /**
@@ -33,7 +32,7 @@ type HiveNavigationProps = {
33
32
  * </HiveNavigation>
34
33
  * ```
35
34
  */
36
- declare function HiveNavigation({ companyMenuChildren, children, className, productName, logo, navLinks, developerMenu, search, }: HiveNavigationProps): react_jsx_runtime.JSX.Element;
35
+ declare function HiveNavigation({ companyMenuChildren, children, className, productName, logo, navLinks, developerMenu, searchProps, }: HiveNavigationProps): react_jsx_runtime.JSX.Element;
37
36
  interface ProductsMenuProps extends MenuContentColumnsProps {
38
37
  productName: string;
39
38
  }
@@ -51,7 +51,7 @@ function HiveNavigation({
51
51
  }
52
52
  ],
53
53
  developerMenu,
54
- search = /* @__PURE__ */ jsx(Search, {})
54
+ searchProps
55
55
  }) {
56
56
  const containerRef = useRef(null);
57
57
  return /* @__PURE__ */ jsxs(
@@ -100,7 +100,13 @@ function HiveNavigation({
100
100
  ] }),
101
101
  /* @__PURE__ */ jsx("div", { className: "flex-1" }),
102
102
  children,
103
- search,
103
+ /* @__PURE__ */ jsx(
104
+ Search,
105
+ {
106
+ className: "relative ml-4 basis-64 [&_:is(input,kbd)]:text-green-700 dark:[&_:is(input,kbd)]:text-neutral-300 [&_input]:h-12 [&_input]:w-full [&_input]:rounded-lg [&_input]:border [&_input]:border-green-200 [&_input]:bg-white [&_input]:pl-4 [&_input]:pr-8 [&_input]:ring-[hsl(var(--nextra-primary-hue)_var(--nextra-primary-saturation)_32%/var(--tw-ring-opacity))] [&_input]:ring-offset-[rgb(var(--nextra-bg))] dark:[&_input]:border-neutral-800 [&_input]:dark:bg-inherit [&_kbd]:absolute [&_kbd]:right-4 [&_kbd]:top-1/2 [&_kbd]:my-0 [&_kbd]:-translate-y-1/2 [&_kbd]:border-none [&_kbd]:bg-green-200 dark:[&_kbd]:bg-neutral-700",
107
+ ...searchProps
108
+ }
109
+ ),
104
110
  /* @__PURE__ */ jsxs(
105
111
  CallToAction,
106
112
  {
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- const SvgYoga = (props) => /* @__PURE__ */ jsxs("svg", { width: 53, height: 54, viewBox: "0 0 53 54", fill: "currentColor", ...props, children: [
3
- /* @__PURE__ */ jsx("path", { d: "M35.213 10.37h-8.231l4.943-4.943L26.5 0l-5.427 5.427 4.943 4.943h-8.231a4 4 0 0 0-2.827 1.172L.5 26l5.427 5.427 17.747-17.746a3.997 3.997 0 0 1 5.652 0l17.747 17.746L52.5 26 38.04 11.54a4 4 0 0 0-2.827-1.172v.002ZM26.5 42.197l-5.426 5.426L26.5 53.05l5.426-5.426-5.426-5.427Z" }),
4
- /* @__PURE__ */ jsx("path", { d: "M26.5 31.427h-8.713A4 4 0 0 0 14.96 32.6L10.79 36.77l5.427 5.427 7.46-7.46a3.997 3.997 0 0 1 5.653 0l7.46 7.46 5.427-5.427-4.172-4.171a4 4 0 0 0-2.827-1.172H26.5Z" })
2
+ const SvgYoga = (props) => /* @__PURE__ */ jsxs("svg", { width: 53, height: 54, viewBox: "0 0 53 54", fill: "none", ...props, children: [
3
+ /* @__PURE__ */ jsx("path", { d: "M35.213 10.37h-8.231l4.943-4.943L26.5 0l-5.427 5.427 4.943 4.943h-8.231a4 4 0 0 0-2.827 1.172L.5 26l5.427 5.427 17.747-17.746a3.997 3.997 0 0 1 5.652 0l17.747 17.746L52.5 26 38.04 11.54a4 4 0 0 0-2.827-1.172v.002ZM26.5 42.197l-5.426 5.426L26.5 53.05l5.426-5.426-5.426-5.427Z", fill: "currentColor" }),
4
+ /* @__PURE__ */ jsx("path", { d: "M26.5 31.427h-8.713A4 4 0 0 0 14.96 32.6L10.79 36.77l5.427 5.427 7.46-7.46a3.997 3.997 0 0 1 5.653 0l7.46 7.46 5.427-5.427-4.172-4.171a4 4 0 0 0-2.827-1.172H26.5Z", fill: "currentColor" })
5
5
  ] });
6
6
  export {
7
7
  SvgYoga as ReactComponent
@@ -31,8 +31,6 @@ export { ContactButton, ContactButtonProps, ContactTextLink, ContactTextLinkProp
31
31
  export { Giscus } from './giscus.mjs';
32
32
  export { VersionDropdown, VersionDropdownProps } from './version-dropdown.mjs';
33
33
  export { Dropdown, DropdownContent, DropdownItem, DropdownTrigger } from './dropdown.mjs';
34
- export { FrequentlyAskedQuestions } from './faq/index.mjs';
35
- export { ComparisonTable } from './comparison-table/index.mjs';
36
34
  export { GraphQLConfCard, GraphQLConfCardProps } from './hive-navigation/graphql-conf-card.mjs';
37
35
  import 'react';
38
36
  import 'url';
@@ -44,4 +42,3 @@ import 'react/jsx-runtime';
44
42
  import 'nextra/components';
45
43
  import '../products.mjs';
46
44
  import '@giscus/react';
47
- import './faq/attach-page-faq-schema.mjs';
@@ -30,15 +30,11 @@ export * from "./contact-us";
30
30
  import { Giscus } from "./giscus";
31
31
  export * from "./version-dropdown";
32
32
  export * from "./dropdown";
33
- import { FrequentlyAskedQuestions } from "./faq/index.js";
34
- import { ComparisonTable } from "./comparison-table/index.js";
35
33
  export {
36
34
  Anchor,
37
35
  Button,
38
36
  CardsColorful,
39
- ComparisonTable,
40
37
  FeatureList,
41
- FrequentlyAskedQuestions,
42
38
  GetYourAPIGameRightSection,
43
39
  Giscus,
44
40
  GraphQLConfCard,
@@ -47,7 +47,7 @@ const LegacyPackageCmd = ({
47
47
  ),
48
48
  [packages]
49
49
  );
50
- return /* @__PURE__ */ jsx(Tabs, { items: PACKAGE_MANAGERS, children: PACKAGE_MANAGERS.map((pkgManager, index) => /* @__PURE__ */ jsx(Tabs.Tab, { children: /* @__PURE__ */ jsx(Pre, { "data-filename": "Terminal", "data-copy": "", "data-language": "sh", "data-theme": "default", children: /* @__PURE__ */ jsx("code", { children: /* @__PURE__ */ jsx("span", { className: "line mx-4", children: commands[index] }) }) }) }, pkgManager)) });
50
+ return /* @__PURE__ */ jsx(Tabs, { items: PACKAGE_MANAGERS, children: PACKAGE_MANAGERS.map((pkgManager, index) => /* @__PURE__ */ jsx(Tabs.Tab, { children: /* @__PURE__ */ jsx(Pre, { "data-filename": "Terminal", "data-copy": "", "data-language": "sh", "data-theme": "default", children: /* @__PURE__ */ jsx("code", { children: /* @__PURE__ */ jsx("span", { className: "line", children: commands[index] }) }) }) }, pkgManager)) });
51
51
  };
52
52
  export {
53
53
  LegacyPackageCmd
@@ -3,9 +3,9 @@ import { cn } from "../../cn";
3
3
  import { FOUR_MAIN_PRODUCTS, PRODUCTS } from "../../products";
4
4
  import { HighlightDecoration } from "../decorations";
5
5
  import { ArrowIcon } from "../icons";
6
+ import { MeshDecoration } from "./mesh-decoration";
6
7
  import { ReactComponent as HiveDecoration } from "./hive-decoration";
7
8
  import { ReactComponent as HiveGatewayDecoration } from "./hive-gateway-decoration";
8
- import { ReactComponent as MeshDecoration } from "./mesh-decoration";
9
9
  import { ReactComponent as YogaDecoration } from "./yoga-decoration";
10
10
  const cardDecorations = {
11
11
  [PRODUCTS.HIVE.name]: HiveDecoration,
@@ -1,3 +1,10 @@
1
- import 'react';
2
- export { ReactComponent } from '../../logos/angular.mjs';
3
- import 'nextra/icons';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ /**
4
+ * This component can't be moved to .svg file, because SVGR doesn't use `React.useId()`,
5
+ * and we use this decoration inside of UI that can have `display: none`, which affects
6
+ * colliding SVG ids.
7
+ */
8
+ declare function MeshDecoration(props: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
9
+
10
+ export { MeshDecoration };
@@ -1,22 +1,85 @@
1
+ "use client";
1
2
  import { jsx, jsxs } from "react/jsx-runtime";
2
- const SvgMeshDecoration = (props) => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 156 172", fill: "none", ...props, children: [
3
- /* @__PURE__ */ jsxs("mask", { id: "path-1-outside-1_642_4203", maskUnits: "userSpaceOnUse", x: 0, y: -75, width: 248, height: 248, fill: "black", children: [
4
- /* @__PURE__ */ jsx("rect", { fill: "white", y: -75, width: 248, height: 248 }),
5
- /* @__PURE__ */ jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M213.474 -37.2159L246.99 -3.69922H247V101.699L213.483 135.216L210.216 138.483L176.699 172H71.3008L37.7841 138.483L34.5167 135.216L1 101.699V-3.69922L34.5071 -37.2159L37.7745 -40.4833L71.2912 -74H176.69L210.206 -40.4833L213.474 -37.2159ZM56.9474 135.206H191.043C201.631 135.206 210.206 126.631 210.206 116.043V-18.0526C210.206 -28.6403 201.631 -37.2159 191.043 -37.2159H56.9474C46.3597 -37.2159 37.7841 -28.6403 37.7841 -18.0526V116.043C37.7841 126.631 46.3597 135.206 56.9474 135.206ZM70.9266 83.0905V14.8977C70.9266 4.30997 79.5022 -4.26562 90.09 -4.26562H157.9C168.487 -4.26562 177.063 4.30997 177.063 14.8977V83.0905C177.063 93.6783 168.487 102.254 157.9 102.254H90.09C79.5022 102.254 70.9266 93.6783 70.9266 83.0905ZM140.279 65.4698V32.5184H107.711V65.4698H140.279Z" })
6
- ] }),
7
- /* @__PURE__ */ jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M213.474 -37.2159L246.99 -3.69922H247V101.699L213.483 135.216L210.216 138.483L176.699 172H71.3008L37.7841 138.483L34.5167 135.216L1 101.699V-3.69922L34.5071 -37.2159L37.7745 -40.4833L71.2912 -74H176.69L210.206 -40.4833L213.474 -37.2159ZM56.9474 135.206H191.043C201.631 135.206 210.206 126.631 210.206 116.043V-18.0526C210.206 -28.6403 201.631 -37.2159 191.043 -37.2159H56.9474C46.3597 -37.2159 37.7841 -28.6403 37.7841 -18.0526V116.043C37.7841 126.631 46.3597 135.206 56.9474 135.206ZM70.9266 83.0905V14.8977C70.9266 4.30997 79.5022 -4.26562 90.09 -4.26562H157.9C168.487 -4.26562 177.063 4.30997 177.063 14.8977V83.0905C177.063 93.6783 168.487 102.254 157.9 102.254H90.09C79.5022 102.254 70.9266 93.6783 70.9266 83.0905ZM140.279 65.4698V32.5184H107.711V65.4698H140.279Z", fill: "url(#paint0_linear_642_4203)" }),
8
- /* @__PURE__ */ jsx("path", { d: "M246.99 -3.69922L246.637 -3.34566L246.783 -3.19922H246.99V-3.69922ZM213.474 -37.2159L213.827 -37.5695L213.474 -37.2159ZM247 -3.69922H247.5V-4.19922H247V-3.69922ZM247 101.699L247.354 102.053L247.5 101.906V101.699H247ZM213.483 135.216L213.837 135.57L213.483 135.216ZM210.216 138.483L210.57 138.837L210.216 138.483ZM176.699 172V172.5H176.906L177.053 172.354L176.699 172ZM71.3008 172L70.9472 172.354L71.0937 172.5H71.3008V172ZM37.7841 138.483L38.1376 138.13V138.13L37.7841 138.483ZM34.5167 135.216L34.1632 135.57V135.57L34.5167 135.216ZM1 101.699H0.5V101.906L0.646447 102.053L1 101.699ZM1 -3.69922L0.646396 -4.05272L0.5 -3.90628V-3.69922H1ZM34.5071 -37.2159L34.1536 -37.5695L34.1535 -37.5694L34.5071 -37.2159ZM37.7745 -40.4833L38.128 -40.1297L37.7745 -40.4833ZM71.2912 -74V-74.5H71.0841L70.9376 -74.3536L71.2912 -74ZM176.69 -74L177.043 -74.3536L176.897 -74.5H176.69V-74ZM210.206 -40.4833L209.853 -40.1297L210.206 -40.4833ZM140.279 32.5184H140.779V32.0184H140.279V32.5184ZM140.279 65.4698V65.9698H140.779V65.4698H140.279ZM107.711 32.5184V32.0184H107.211V32.5184H107.711ZM107.711 65.4698H107.211V65.9698H107.711V65.4698ZM247.344 -4.05277L213.827 -37.5695L213.12 -36.8624L246.637 -3.34566L247.344 -4.05277ZM247 -4.19922H246.99V-3.19922H247V-4.19922ZM247.5 101.699V-3.69922H246.5V101.699H247.5ZM213.837 135.57L247.354 102.053L246.646 101.346L213.13 134.862L213.837 135.57ZM210.57 138.837L213.837 135.57L213.13 134.862L209.862 138.13L210.57 138.837ZM177.053 172.354L210.57 138.837L209.862 138.13L176.346 171.646L177.053 172.354ZM71.3008 172.5H176.699V171.5H71.3008V172.5ZM37.4305 138.837L70.9472 172.354L71.6543 171.646L38.1376 138.13L37.4305 138.837ZM34.1632 135.57L37.4305 138.837L38.1376 138.13L34.8703 134.862L34.1632 135.57ZM0.646447 102.053L34.1632 135.57L34.8703 134.862L1.35355 101.346L0.646447 102.053ZM0.5 -3.69922V101.699H1.5V-3.69922H0.5ZM34.1535 -37.5694L0.646396 -4.05272L1.3536 -3.34572L34.8607 -36.8624L34.1535 -37.5694ZM37.4209 -40.8368L34.1536 -37.5695L34.8607 -36.8624L38.128 -40.1297L37.4209 -40.8368ZM70.9376 -74.3536L37.4209 -40.8368L38.128 -40.1297L71.6447 -73.6464L70.9376 -74.3536ZM176.69 -74.5H71.2912V-73.5H176.69V-74.5ZM210.56 -40.8368L177.043 -74.3536L176.336 -73.6464L209.853 -40.1297L210.56 -40.8368ZM213.827 -37.5695L210.56 -40.8368L209.853 -40.1297L213.12 -36.8624L213.827 -37.5695ZM191.043 134.706H56.9474V135.706H191.043V134.706ZM209.706 116.043C209.706 126.355 201.355 134.706 191.043 134.706V135.706C201.907 135.706 210.706 126.907 210.706 116.043H209.706ZM209.706 -18.0526V116.043H210.706V-18.0526H209.706ZM191.043 -36.7159C201.355 -36.7159 209.706 -28.3642 209.706 -18.0526H210.706C210.706 -28.9165 201.907 -37.7159 191.043 -37.7159V-36.7159ZM56.9474 -36.7159H191.043V-37.7159H56.9474V-36.7159ZM38.2841 -18.0526C38.2841 -28.3642 46.6358 -36.7159 56.9474 -36.7159V-37.7159C46.0835 -37.7159 37.2841 -28.9165 37.2841 -18.0526H38.2841ZM38.2841 116.043V-18.0526H37.2841V116.043H38.2841ZM56.9474 134.706C46.6358 134.706 38.2841 126.355 38.2841 116.043H37.2841C37.2841 126.907 46.0835 135.706 56.9474 135.706V134.706ZM70.4266 14.8977V83.0905H71.4266V14.8977H70.4266ZM90.09 -4.76562C79.2261 -4.76562 70.4266 4.03383 70.4266 14.8977H71.4266C71.4266 4.58612 79.7784 -3.76562 90.09 -3.76562V-4.76562ZM157.9 -4.76562H90.09V-3.76562H157.9V-4.76562ZM177.563 14.8977C177.563 4.03383 168.763 -4.76562 157.9 -4.76562V-3.76562C168.211 -3.76562 176.563 4.58612 176.563 14.8977H177.563ZM177.563 83.0905V14.8977H176.563V83.0905H177.563ZM157.9 102.754C168.763 102.754 177.563 93.9544 177.563 83.0905H176.563C176.563 93.4021 168.211 101.754 157.9 101.754V102.754ZM90.09 102.754H157.9V101.754H90.09V102.754ZM70.4266 83.0905C70.4266 93.9544 79.2261 102.754 90.09 102.754V101.754C79.7784 101.754 71.4266 93.4021 71.4266 83.0905H70.4266ZM139.779 32.5184V65.4698H140.779V32.5184H139.779ZM107.711 33.0184H140.279V32.0184H107.711V33.0184ZM108.211 65.4698V32.5184H107.211V65.4698H108.211ZM140.279 64.9698H107.711V65.9698H140.279V64.9698Z", fill: "url(#paint1_linear_642_4203)", mask: "url(#path-1-outside-1_642_4203)" }),
9
- /* @__PURE__ */ jsxs("defs", { children: [
10
- /* @__PURE__ */ jsxs("linearGradient", { id: "paint0_linear_642_4203", x1: 1, y1: -1, x2: 143.007, y2: 171.994, gradientUnits: "userSpaceOnUse", children: [
11
- /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: 0.1 }),
12
- /* @__PURE__ */ jsx("stop", { offset: 1, stopColor: "white", stopOpacity: 0.4 })
13
- ] }),
14
- /* @__PURE__ */ jsxs("linearGradient", { id: "paint1_linear_642_4203", x1: 0.999998, y1: 0.500001, x2: 140.501, y2: 171.999, gradientUnits: "userSpaceOnUse", children: [
15
- /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: 0.6 }),
16
- /* @__PURE__ */ jsx("stop", { offset: 1, stopColor: "white", stopOpacity: 0.4 })
3
+ import { useId } from "react";
4
+ function MeshDecoration(props) {
5
+ const maskId = useId();
6
+ const gradientOneId = useId();
7
+ const gradientTwoId = useId();
8
+ return /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 156 172", fill: "none", ...props, children: [
9
+ /* @__PURE__ */ jsxs(
10
+ "mask",
11
+ {
12
+ id: maskId,
13
+ maskUnits: "userSpaceOnUse",
14
+ x: "0",
15
+ y: "-75",
16
+ width: "248",
17
+ height: "248",
18
+ fill: "black",
19
+ children: [
20
+ /* @__PURE__ */ jsx("rect", { fill: "white", y: "-75", width: "248", height: "248" }),
21
+ /* @__PURE__ */ jsx(
22
+ "path",
23
+ {
24
+ fillRule: "evenodd",
25
+ clipRule: "evenodd",
26
+ d: "M213.474 -37.2159L246.99 -3.69922H247V101.699L213.483 135.216L210.216 138.483L176.699 172H71.3008L37.7841 138.483L34.5167 135.216L1 101.699V-3.69922L34.5071 -37.2159L37.7745 -40.4833L71.2912 -74H176.69L210.206 -40.4833L213.474 -37.2159ZM56.9474 135.206H191.043C201.631 135.206 210.206 126.631 210.206 116.043V-18.0526C210.206 -28.6403 201.631 -37.2159 191.043 -37.2159H56.9474C46.3597 -37.2159 37.7841 -28.6403 37.7841 -18.0526V116.043C37.7841 126.631 46.3597 135.206 56.9474 135.206ZM70.9266 83.0905V14.8977C70.9266 4.30997 79.5022 -4.26562 90.09 -4.26562H157.9C168.487 -4.26562 177.063 4.30997 177.063 14.8977V83.0905C177.063 93.6783 168.487 102.254 157.9 102.254H90.09C79.5022 102.254 70.9266 93.6783 70.9266 83.0905ZM140.279 65.4698V32.5184H107.711V65.4698H140.279Z"
27
+ }
28
+ )
29
+ ]
30
+ }
31
+ ),
32
+ /* @__PURE__ */ jsx(
33
+ "path",
34
+ {
35
+ fillRule: "evenodd",
36
+ clipRule: "evenodd",
37
+ d: "M213.474 -37.2159L246.99 -3.69922H247V101.699L213.483 135.216L210.216 138.483L176.699 172H71.3008L37.7841 138.483L34.5167 135.216L1 101.699V-3.69922L34.5071 -37.2159L37.7745 -40.4833L71.2912 -74H176.69L210.206 -40.4833L213.474 -37.2159ZM56.9474 135.206H191.043C201.631 135.206 210.206 126.631 210.206 116.043V-18.0526C210.206 -28.6403 201.631 -37.2159 191.043 -37.2159H56.9474C46.3597 -37.2159 37.7841 -28.6403 37.7841 -18.0526V116.043C37.7841 126.631 46.3597 135.206 56.9474 135.206ZM70.9266 83.0905V14.8977C70.9266 4.30997 79.5022 -4.26562 90.09 -4.26562H157.9C168.487 -4.26562 177.063 4.30997 177.063 14.8977V83.0905C177.063 93.6783 168.487 102.254 157.9 102.254H90.09C79.5022 102.254 70.9266 93.6783 70.9266 83.0905ZM140.279 65.4698V32.5184H107.711V65.4698H140.279Z",
38
+ fill: `url(#${gradientOneId})`
39
+ }
40
+ ),
41
+ /* @__PURE__ */ jsx(
42
+ "path",
43
+ {
44
+ d: "M246.99 -3.69922L246.637 -3.34566L246.783 -3.19922H246.99V-3.69922ZM213.474 -37.2159L213.827 -37.5695L213.474 -37.2159ZM247 -3.69922H247.5V-4.19922H247V-3.69922ZM247 101.699L247.354 102.053L247.5 101.906V101.699H247ZM213.483 135.216L213.837 135.57L213.483 135.216ZM210.216 138.483L210.57 138.837L210.216 138.483ZM176.699 172V172.5H176.906L177.053 172.354L176.699 172ZM71.3008 172L70.9472 172.354L71.0937 172.5H71.3008V172ZM37.7841 138.483L38.1376 138.13V138.13L37.7841 138.483ZM34.5167 135.216L34.1632 135.57V135.57L34.5167 135.216ZM1 101.699H0.5V101.906L0.646447 102.053L1 101.699ZM1 -3.69922L0.646396 -4.05272L0.5 -3.90628V-3.69922H1ZM34.5071 -37.2159L34.1536 -37.5695L34.1535 -37.5694L34.5071 -37.2159ZM37.7745 -40.4833L38.128 -40.1297L37.7745 -40.4833ZM71.2912 -74V-74.5H71.0841L70.9376 -74.3536L71.2912 -74ZM176.69 -74L177.043 -74.3536L176.897 -74.5H176.69V-74ZM210.206 -40.4833L209.853 -40.1297L210.206 -40.4833ZM140.279 32.5184H140.779V32.0184H140.279V32.5184ZM140.279 65.4698V65.9698H140.779V65.4698H140.279ZM107.711 32.5184V32.0184H107.211V32.5184H107.711ZM107.711 65.4698H107.211V65.9698H107.711V65.4698ZM247.344 -4.05277L213.827 -37.5695L213.12 -36.8624L246.637 -3.34566L247.344 -4.05277ZM247 -4.19922H246.99V-3.19922H247V-4.19922ZM247.5 101.699V-3.69922H246.5V101.699H247.5ZM213.837 135.57L247.354 102.053L246.646 101.346L213.13 134.862L213.837 135.57ZM210.57 138.837L213.837 135.57L213.13 134.862L209.862 138.13L210.57 138.837ZM177.053 172.354L210.57 138.837L209.862 138.13L176.346 171.646L177.053 172.354ZM71.3008 172.5H176.699V171.5H71.3008V172.5ZM37.4305 138.837L70.9472 172.354L71.6543 171.646L38.1376 138.13L37.4305 138.837ZM34.1632 135.57L37.4305 138.837L38.1376 138.13L34.8703 134.862L34.1632 135.57ZM0.646447 102.053L34.1632 135.57L34.8703 134.862L1.35355 101.346L0.646447 102.053ZM0.5 -3.69922V101.699H1.5V-3.69922H0.5ZM34.1535 -37.5694L0.646396 -4.05272L1.3536 -3.34572L34.8607 -36.8624L34.1535 -37.5694ZM37.4209 -40.8368L34.1536 -37.5695L34.8607 -36.8624L38.128 -40.1297L37.4209 -40.8368ZM70.9376 -74.3536L37.4209 -40.8368L38.128 -40.1297L71.6447 -73.6464L70.9376 -74.3536ZM176.69 -74.5H71.2912V-73.5H176.69V-74.5ZM210.56 -40.8368L177.043 -74.3536L176.336 -73.6464L209.853 -40.1297L210.56 -40.8368ZM213.827 -37.5695L210.56 -40.8368L209.853 -40.1297L213.12 -36.8624L213.827 -37.5695ZM191.043 134.706H56.9474V135.706H191.043V134.706ZM209.706 116.043C209.706 126.355 201.355 134.706 191.043 134.706V135.706C201.907 135.706 210.706 126.907 210.706 116.043H209.706ZM209.706 -18.0526V116.043H210.706V-18.0526H209.706ZM191.043 -36.7159C201.355 -36.7159 209.706 -28.3642 209.706 -18.0526H210.706C210.706 -28.9165 201.907 -37.7159 191.043 -37.7159V-36.7159ZM56.9474 -36.7159H191.043V-37.7159H56.9474V-36.7159ZM38.2841 -18.0526C38.2841 -28.3642 46.6358 -36.7159 56.9474 -36.7159V-37.7159C46.0835 -37.7159 37.2841 -28.9165 37.2841 -18.0526H38.2841ZM38.2841 116.043V-18.0526H37.2841V116.043H38.2841ZM56.9474 134.706C46.6358 134.706 38.2841 126.355 38.2841 116.043H37.2841C37.2841 126.907 46.0835 135.706 56.9474 135.706V134.706ZM70.4266 14.8977V83.0905H71.4266V14.8977H70.4266ZM90.09 -4.76562C79.2261 -4.76562 70.4266 4.03383 70.4266 14.8977H71.4266C71.4266 4.58612 79.7784 -3.76562 90.09 -3.76562V-4.76562ZM157.9 -4.76562H90.09V-3.76562H157.9V-4.76562ZM177.563 14.8977C177.563 4.03383 168.763 -4.76562 157.9 -4.76562V-3.76562C168.211 -3.76562 176.563 4.58612 176.563 14.8977H177.563ZM177.563 83.0905V14.8977H176.563V83.0905H177.563ZM157.9 102.754C168.763 102.754 177.563 93.9544 177.563 83.0905H176.563C176.563 93.4021 168.211 101.754 157.9 101.754V102.754ZM90.09 102.754H157.9V101.754H90.09V102.754ZM70.4266 83.0905C70.4266 93.9544 79.2261 102.754 90.09 102.754V101.754C79.7784 101.754 71.4266 93.4021 71.4266 83.0905H70.4266ZM139.779 32.5184V65.4698H140.779V32.5184H139.779ZM107.711 33.0184H140.279V32.0184H107.711V33.0184ZM108.211 65.4698V32.5184H107.211V65.4698H108.211ZM140.279 64.9698H107.711V65.9698H140.279V64.9698Z",
45
+ fill: `url(#${gradientTwoId})`,
46
+ mask: `url(#${maskId})`
47
+ }
48
+ ),
49
+ /* @__PURE__ */ jsxs("defs", { children: [
50
+ /* @__PURE__ */ jsxs(
51
+ "linearGradient",
52
+ {
53
+ id: gradientOneId,
54
+ x1: "1",
55
+ y1: "-1",
56
+ x2: "143.007",
57
+ y2: "171.994",
58
+ gradientUnits: "userSpaceOnUse",
59
+ children: [
60
+ /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: "0.1" }),
61
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0.4" })
62
+ ]
63
+ }
64
+ ),
65
+ /* @__PURE__ */ jsxs(
66
+ "linearGradient",
67
+ {
68
+ id: gradientTwoId,
69
+ x1: "0.999998",
70
+ y1: "0.500001",
71
+ x2: "140.501",
72
+ y2: "171.999",
73
+ gradientUnits: "userSpaceOnUse",
74
+ children: [
75
+ /* @__PURE__ */ jsx("stop", { stopColor: "white", stopOpacity: "0.6" }),
76
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0.4" })
77
+ ]
78
+ }
79
+ )
17
80
  ] })
18
- ] })
19
- ] });
81
+ ] });
82
+ }
20
83
  export {
21
- SvgMeshDecoration as ReactComponent
84
+ MeshDecoration
22
85
  };
package/dist/index.d.mts CHANGED
@@ -34,8 +34,6 @@ export { ContactButton, ContactButtonProps, ContactTextLink, ContactTextLinkProp
34
34
  export { Giscus } from './components/giscus.mjs';
35
35
  export { VersionDropdown, VersionDropdownProps } from './components/version-dropdown.mjs';
36
36
  export { Dropdown, DropdownContent, DropdownItem, DropdownTrigger } from './components/dropdown.mjs';
37
- export { FrequentlyAskedQuestions } from './components/faq/index.mjs';
38
- export { ComparisonTable } from './components/comparison-table/index.mjs';
39
37
  export { PRODUCTS } from './products.mjs';
40
38
  export { IEditorProps, IFeatureListProps, IHeroGradientProps, IHeroIllustrationProps, IHeroMarketplaceProps, IHeroVideoProps, IInfoListProps, ILink, IMarketplaceItemProps, IMarketplaceItemsProps, IMarketplaceListProps, IMarketplaceSearchProps, ISchemaPageProps } from './types/components.mjs';
41
39
  export { AngularLettermark, ConductorLettermark, ConfigLettermark, EnvelopLettermark, FetsLettermark, GraphQLESlintLettermark, HeltinLettermark, InspectorLettermark, KitQLLettermark, ModulesLettermark, SSELettermark, ScalarsLettermark, SofaLettermark, StitchingLettermark, ToolsLettermark, WSLettermark, WhatsAppLettermark } from './logos/index.mjs';
@@ -48,7 +46,6 @@ import 'url';
48
46
  import 'next/image';
49
47
  import 'react/jsx-runtime';
50
48
  import '@giscus/react';
51
- import './components/faq/attach-page-faq-schema.mjs';
52
49
  import 'next/link';
53
50
  import 'react-player';
54
51
  import 'clsx';
@@ -6,7 +6,6 @@ export { convertToPageMap, createIndexPage, getPageMap, mergeMetaWithPageMap, no
6
6
  export { evaluate } from 'nextra/evaluate';
7
7
  export { fetchPackageInfo } from './npm.mjs';
8
8
  export { sharedMetaItems } from './shared-meta-items.mjs';
9
- export { Body } from './body.mjs';
10
9
  export { GuildLayout, getDefaultMetadata } from './theme-layout.mjs';
11
10
  import 'next/image';
12
11
  import 'nextra';
@@ -12,10 +12,8 @@ import {
12
12
  import { evaluate } from "nextra/evaluate";
13
13
  import { fetchPackageInfo } from "./npm.js";
14
14
  import { sharedMetaItems } from "./shared-meta-items";
15
- import { Body } from "./body";
16
15
  import { GuildLayout, getDefaultMetadata } from "./theme-layout.js";
17
16
  export {
18
- Body,
19
17
  GuildLayout,
20
18
  MDXRemote,
21
19
  compileMdx,
@@ -1,10 +1,9 @@
1
- import { FC, ReactNode, ComponentProps, ReactElement } from 'react';
1
+ import { FC, ReactNode, ComponentProps } from 'react';
2
2
  import { Metadata } from 'next';
3
3
  import { PageMapItem } from 'nextra';
4
4
  import { Navbar, Layout } from 'nextra-theme-docs';
5
5
  import { Head } from 'nextra/components';
6
6
  import { HiveNavigation } from '../components/hive-navigation/index.mjs';
7
- import { Body } from './body.mjs';
8
7
  import 'react/jsx-runtime';
9
8
  import '../components/hive-navigation/graphql-conf-card.mjs';
10
9
  import 'next/image';
@@ -38,8 +37,6 @@ declare const GuildLayout: FC<{
38
37
  */
39
38
  navbarProps: NavbarProps;
40
39
  pageMap?: PageMapItem[];
41
- search?: ReactElement;
42
- lightOnlyPages: ComponentProps<typeof Body>['lightOnlyPages'];
43
40
  }>;
44
41
  declare function getDefaultMetadata({ websiteName, description, productName, ...additionalMetadata }: {
45
42
  description?: string;
@@ -7,7 +7,6 @@ import { HiveFooter } from "../components/hive-footer";
7
7
  import { HiveNavigation } from "../components/hive-navigation";
8
8
  import { siteOrigin, siteUrl } from "../constants";
9
9
  import { PRODUCTS } from "../products";
10
- import { Body } from "./body";
11
10
  const companyItem = {
12
11
  type: "menu",
13
12
  title: "Company",
@@ -42,8 +41,6 @@ const GuildLayout = async ({
42
41
  logo,
43
42
  layoutProps,
44
43
  navbarProps,
45
- search,
46
- lightOnlyPages,
47
44
  ...props
48
45
  }) => {
49
46
  const [meta, ...pageMap] = props.pageMap || await getPageMap();
@@ -70,34 +67,8 @@ const GuildLayout = async ({
70
67
  suppressHydrationWarning: true,
71
68
  ...htmlProps,
72
69
  children: [
73
- /* @__PURE__ */ jsx(
74
- Head,
75
- {
76
- backgroundColor: { dark: "#111", light: "#fff" },
77
- color: {
78
- hue: { dark: 67, light: 171 },
79
- saturation: { dark: 100, light: 42 },
80
- lightness: { dark: 50, light: 24 }
81
- },
82
- ...headProps,
83
- children: /* @__PURE__ */ jsx("style", { children: `
84
- ::selection {
85
- background: hsla(var(--nextra-primary-hue)var(--nextra-primary-saturation)var(--nextra-primary-lightness)/.7) !important;
86
- }
87
- .dark:has(body.light) {
88
- --nextra-primary-hue: 171deg;
89
- --nextra-primary-saturation: 42%;
90
- --nextra-primary-lightness: 24%;
91
- --nextra-bg: 255, 255, 255;
92
- }
93
- .x\\:tracking-tight,
94
- .nextra-steps :is(h2, h3, h4) {
95
- letter-spacing: normal;
96
- }
97
- ` })
98
- }
99
- ),
100
- /* @__PURE__ */ jsx(Body, { lightOnlyPages, children: /* @__PURE__ */ jsx(
70
+ /* @__PURE__ */ jsx(Head, { ...headProps }),
71
+ /* @__PURE__ */ jsx("body", { children: /* @__PURE__ */ jsx(
101
72
  Layout,
102
73
  {
103
74
  footer: /* @__PURE__ */ jsx(
@@ -110,14 +81,12 @@ const GuildLayout = async ({
110
81
  description
111
82
  }
112
83
  ),
113
- search,
114
84
  navbar: /* @__PURE__ */ jsx(
115
85
  HiveNavigation,
116
86
  {
117
87
  className: "max-w-[90rem]",
118
88
  productName: websiteName,
119
89
  navLinks: [],
120
- search,
121
90
  ...navbarProps,
122
91
  logo: /* @__PURE__ */ jsxs(
123
92
  Anchor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theguild/components",
3
- "version": "8.2.1-alpha-20250106114900-eb890050d972af4df700dab38dc50585a12c08e2",
3
+ "version": "8.2.1-alpha-20250106162405-da8e2b64faa6728e9b101c4610f9185e45766343",
4
4
  "repository": {
5
5
  "url": "https://github.com/the-guild-org/docs",
6
6
  "directory": "packages/components"
@@ -46,8 +46,6 @@
46
46
  "dependencies": {
47
47
  "@giscus/react": "3.1.0",
48
48
  "@next/bundle-analyzer": "15.1.3",
49
- "@radix-ui/react-accordion": "^1.2.2",
50
- "@radix-ui/react-icons": "^1.3.2",
51
49
  "@radix-ui/react-navigation-menu": "^1.2.0",
52
50
  "clsx": "2.1.1",
53
51
  "fuzzy": "0.1.3",
@@ -59,7 +57,7 @@
59
57
  "tailwind-merge": "^2.5.2"
60
58
  },
61
59
  "devDependencies": {
62
- "@svgr/plugin-svgo": "^8.1.0",
60
+ "@svgr/babel-plugin-remove-jsx-attribute": "^8.0.0",
63
61
  "@theguild/tailwind-config": "0.6.2",
64
62
  "@types/dedent": "0.7.2",
65
63
  "@types/react": "18.3.18",
package/style.css CHANGED
@@ -127,23 +127,7 @@
127
127
  :root {
128
128
  --nextra-navbar-height: 82px;
129
129
  }
130
- @media (min-width: 768px) {
131
- .nextra-search {
132
- @apply ml-3 basis-64;
133
- input,
134
- kbd {
135
- @apply text-green-700 dark:text-neutral-300;
136
- }
137
- input {
138
- @apply h-12 w-full rounded-lg border border-green-200 bg-white pl-4 pr-8;
139
- @apply ring-[hsl(var(--nextra-primary-hue)_var(--nextra-primary-saturation)_32%/var(--tw-ring-opacity))];
140
- @apply ring-offset-[rgb(var(--nextra-bg))] dark:border-neutral-800 dark:bg-inherit;
141
- }
142
- kbd {
143
- @apply absolute right-4 top-1/2 my-0 -translate-y-1/2 border-none bg-green-200 dark:bg-neutral-700;
144
- }
145
- }
146
- }
130
+
147
131
  @media (max-width: 767px) {
148
132
  :root {
149
133
  --nextra-navbar-height: 64px;
@@ -1,12 +0,0 @@
1
- import * as react from 'react';
2
- import { FC } from 'react';
3
-
4
- declare const ComparisonTable: FC<react.DetailedHTMLProps<react.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>> & {
5
- Row: FC<react.ClassAttributes<HTMLTableRowElement> & react.HTMLAttributes<HTMLTableRowElement> & {
6
- highlight?: boolean;
7
- }>;
8
- Header: FC<react.DetailedHTMLProps<react.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>>;
9
- Cell: FC<react.DetailedHTMLProps<react.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>>;
10
- };
11
-
12
- export { ComparisonTable };
@@ -1,43 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { cn } from "@theguild/components";
3
- const Table = ({ className, ...props }) => {
4
- return /* @__PURE__ */ jsx(
5
- "table",
6
- {
7
- className: cn(
8
- "x:block x:overflow-x-auto nextra-scrollbar overflow-x-auto rounded-2xl border border-green-200",
9
- className
10
- ),
11
- ...props
12
- }
13
- );
14
- };
15
- const TableRow = ({
16
- highlight,
17
- className,
18
- ...props
19
- }) => {
20
- return /* @__PURE__ */ jsx("tr", { className: cn(highlight && "bg-green-100", className), ...props });
21
- };
22
- const cellStyle = cn(
23
- "border border-green-200 p-4 first:border-l-0 last:border-r-0",
24
- "[tbody_&]:border-b-0 [thead_&]:border-t-0",
25
- "first:sticky",
26
- "first:left-0",
27
- "max-sm:first:drop-shadow-2xl",
28
- "first:bg-[rgb(var(--nextra-bg))]"
29
- );
30
- const TableHeader = ({ className, ...props }) => {
31
- return /* @__PURE__ */ jsx("th", { className: cn(cellStyle, "font-medium", className), ...props });
32
- };
33
- const TableCell = ({ className, ...props }) => {
34
- return /* @__PURE__ */ jsx("td", { className: cn(cellStyle, className), ...props });
35
- };
36
- const ComparisonTable = Object.assign(Table, {
37
- Row: TableRow,
38
- Header: TableHeader,
39
- Cell: TableCell
40
- });
41
- export {
42
- ComparisonTable
43
- };
@@ -1,7 +0,0 @@
1
- import { FC } from 'react';
2
-
3
- declare const AttachPageFAQSchema: FC<{
4
- faqPages: string[];
5
- }>;
6
-
7
- export { AttachPageFAQSchema };
@@ -1,22 +0,0 @@
1
- "use client";
2
- import { useEffect } from "react";
3
- import { usePathname } from "next/navigation";
4
- const AttachPageFAQSchema = ({ faqPages }) => {
5
- const pathname = usePathname();
6
- useEffect(() => {
7
- const html = document.querySelector("html");
8
- const path = pathname.replace("/graphql/hive", "/");
9
- if (faqPages.includes(path) && !html.hasAttribute("itemscope")) {
10
- html.setAttribute("itemscope", "");
11
- html.setAttribute("itemtype", "https://schema.org/FAQPage");
12
- return () => {
13
- html.removeAttribute("itemscope");
14
- html.removeAttribute("itemtype");
15
- };
16
- }
17
- }, [pathname]);
18
- return null;
19
- };
20
- export {
21
- AttachPageFAQSchema
22
- };
@@ -1,9 +0,0 @@
1
- import { FC, ComponentProps, ReactElement } from 'react';
2
- import { AttachPageFAQSchema } from './attach-page-faq-schema.mjs';
3
-
4
- declare const FrequentlyAskedQuestions: FC<ComponentProps<typeof AttachPageFAQSchema> & {
5
- className?: string;
6
- children: ReactElement;
7
- }>;
8
-
9
- export { FrequentlyAskedQuestions };
@@ -1,90 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import {
3
- Children,
4
- cloneElement
5
- } from "react";
6
- import * as RadixAccordion from "@radix-ui/react-accordion";
7
- import { ChevronDownIcon } from "@radix-ui/react-icons";
8
- import { cn } from "../../cn";
9
- import { Anchor } from "../anchor";
10
- import { Heading } from "../heading";
11
- import { AttachPageFAQSchema } from "./attach-page-faq-schema";
12
- const UnwrapChild = (props) => props.children;
13
- const a = (props) => /* @__PURE__ */ jsx(
14
- Anchor,
15
- {
16
- className: "hive-focus rounded underline hover:text-blue-700",
17
- ...props,
18
- href: props.href,
19
- children: props.children
20
- }
21
- );
22
- const h2 = (props) => /* @__PURE__ */ jsx(Heading, { as: "h2", size: "md", className: "basis-1/2", ...props });
23
- const FrequentlyAskedQuestions = ({ className, faqPages, children }) => {
24
- return /* @__PURE__ */ jsxs(
25
- "section",
26
- {
27
- className: cn(
28
- className,
29
- "flex flex-col gap-x-6 gap-y-2 px-4 py-6 text-green-1000 md:flex-row md:px-10 lg:gap-x-24 lg:px-[120px] lg:py-24"
30
- ),
31
- children: [
32
- /* @__PURE__ */ jsx(AttachPageFAQSchema, { faqPages }),
33
- cloneElement(children, {
34
- components: {
35
- a,
36
- h2,
37
- p: UnwrapChild,
38
- ul: Accordion,
39
- li: AccordionItem
40
- }
41
- })
42
- ]
43
- }
44
- );
45
- };
46
- const Accordion = (props) => /* @__PURE__ */ jsx(RadixAccordion.Root, { asChild: true, type: "single", collapsible: true, children: /* @__PURE__ */ jsx("ul", { className: "basis-1/2 divide-y divide-beige-400 max-xl:grow", ...props }) });
47
- const AccordionItem = (props) => {
48
- const texts = Children.toArray(props.children).filter((child) => child !== "\n");
49
- if (texts.length === 0) {
50
- return null;
51
- }
52
- if (texts.length < 2) {
53
- console.error(texts);
54
- throw new Error(`Expected a question and an answer, got ${texts.length} items`);
55
- }
56
- const [first, ...answers] = texts;
57
- const question = typeof first === "string" ? first : typeof first === "object" && "type" in first ? first.props.children : null;
58
- if (!question) return null;
59
- return /* @__PURE__ */ jsx(
60
- RadixAccordion.Item,
61
- {
62
- asChild: true,
63
- value: question,
64
- className: "relative pb-0 focus-within:z-10 data-[state=open]:pb-4",
65
- itemScope: true,
66
- itemProp: "mainEntity",
67
- itemType: "https://schema.org/Question",
68
- children: /* @__PURE__ */ jsxs("li", { children: [
69
- /* @__PURE__ */ jsx(RadixAccordion.Header, { children: /* @__PURE__ */ jsxs(RadixAccordion.Trigger, { className: "hive-focus duration-[.8s] -mx-2 my-1 flex w-[calc(100%+1rem)] items-center justify-between rounded-xl bg-white px-2 py-3 text-left font-medium transition-colors hover:bg-beige-100/80 md:my-2 md:py-4", children: [
70
- /* @__PURE__ */ jsx("span", { itemProp: "name", children: question }),
71
- /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-5 [[data-state='open']_&]:[transform:rotateX(180deg)]" })
72
- ] }) }),
73
- /* @__PURE__ */ jsx(
74
- RadixAccordion.Content,
75
- {
76
- forceMount: true,
77
- className: "overflow-hidden bg-white text-green-800 data-[state=closed]:hidden",
78
- itemScope: true,
79
- itemProp: "acceptedAnswer",
80
- itemType: "https://schema.org/Answer",
81
- children: /* @__PURE__ */ jsx("div", { itemProp: "text", className: "space-y-2", children: answers.map((answer, i) => /* @__PURE__ */ jsx("p", { children: answer }, i)) })
82
- }
83
- )
84
- ] })
85
- }
86
- );
87
- };
88
- export {
89
- FrequentlyAskedQuestions
90
- };
@@ -1,8 +0,0 @@
1
- import { FC, ReactNode } from 'react';
2
-
3
- declare const Body: FC<{
4
- lightOnlyPages: string[];
5
- children: ReactNode;
6
- }>;
7
-
8
- export { Body };
@@ -1,11 +0,0 @@
1
- "use client";
2
- import { jsx } from "react/jsx-runtime";
3
- import { usePathname } from "next/navigation";
4
- const Body = ({ lightOnlyPages, children }) => {
5
- const pathname = usePathname();
6
- const isLightOnlyPage = lightOnlyPages.includes(pathname);
7
- return /* @__PURE__ */ jsx("body", { className: isLightOnlyPage ? "light text-green-1000" : void 0, children });
8
- };
9
- export {
10
- Body
11
- };