@theguild/components 8.2.1-alpha-20250114083600-4edd0128723e72ee4602b933d6dd94b5af1bd8f0 → 9.0.0-alpha-20250114081532-be0c7eff66d202aae63bc434b3f1b34eeb4d865d

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';
@@ -31,15 +31,11 @@ import { Giscus } from "./giscus";
31
31
  export * from "./product-card";
32
32
  export * from "./version-dropdown";
33
33
  export * from "./dropdown";
34
- import { FrequentlyAskedQuestions } from "./faq";
35
- import { ComparisonTable } from "./comparison-table";
36
34
  export {
37
35
  Anchor,
38
36
  Button,
39
37
  CardsColorful,
40
- ComparisonTable,
41
38
  FeatureList,
42
- FrequentlyAskedQuestions,
43
39
  GetYourAPIGameRightSection,
44
40
  Giscus,
45
41
  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
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,8 +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.client.mjs';
10
- export { remarkLinkRewrite } from './remark-link-rewrite.mjs';
11
9
  export { GuildLayout, getDefaultMetadata } from './theme-layout.mjs';
12
10
  import 'next/image';
13
11
  import 'nextra';
@@ -15,8 +13,6 @@ import 'nextra/mdx-components/pre/index';
15
13
  import 'react/jsx-runtime';
16
14
  import 'react';
17
15
  import '../products.mjs';
18
- import 'mdast';
19
- import 'unified';
20
16
  import 'next';
21
17
  import 'nextra-theme-docs';
22
18
  import 'nextra/components';
@@ -11,12 +11,9 @@ import {
11
11
  } from "nextra/page-map";
12
12
  import { evaluate } from "nextra/evaluate";
13
13
  import { fetchPackageInfo } from "./npm.js";
14
- import { sharedMetaItems } from "./shared-meta-items.js";
15
- import { Body } from "./body.client.js";
16
- import { remarkLinkRewrite } from "./remark-link-rewrite.js";
14
+ import { sharedMetaItems } from "./shared-meta-items";
17
15
  import { GuildLayout, getDefaultMetadata } from "./theme-layout.js";
18
16
  export {
19
- Body,
20
17
  GuildLayout,
21
18
  MDXRemote,
22
19
  compileMdx,
@@ -29,7 +26,6 @@ export {
29
26
  getPageMap,
30
27
  mergeMetaWithPageMap,
31
28
  normalizePageMap,
32
- remarkLinkRewrite,
33
29
  sharedMetaItems,
34
30
  useMDXComponents
35
31
  };
@@ -1,17 +1,7 @@
1
1
  import { NextConfig } from 'next';
2
2
  import { NextraConfig } from 'nextra';
3
- import { Plugin } from 'unified';
4
3
 
5
- declare const defaultNextraOptions: {
6
- defaultShowCopyCode: true;
7
- whiteListTagsStyling: string[];
8
- search: {
9
- codeblocks: false;
10
- };
11
- mdxOptions: {
12
- rehypePlugins: Plugin<[], any>[];
13
- };
14
- };
4
+ declare const defaultNextraOptions: NextraConfig;
15
5
  interface WithGuildDocsOptions extends NextConfig {
16
6
  nextraConfig?: NextraConfig;
17
7
  }
@@ -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.client.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.client";
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
- .dark:has(body.light) ::selection {
85
- background: hsl(var(--nextra-primary-hue)var(--nextra-primary-saturation)calc(var(--nextra-primary-lightness) + 41%));
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-20250114083600-4edd0128723e72ee4602b933d6dd94b5af1bd8f0",
3
+ "version": "9.0.0-alpha-20250114081532-be0c7eff66d202aae63bc434b3f1b34eeb4d865d",
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.4",
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",
@@ -56,14 +54,12 @@
56
54
  "react-paginate": "8.2.0",
57
55
  "react-player": "2.16.0",
58
56
  "semver": "^7.3.8",
59
- "tailwind-merge": "^2.5.2",
60
- "unist-util-visit": "5.0.0"
57
+ "tailwind-merge": "^2.5.2"
61
58
  },
62
59
  "devDependencies": {
63
- "@svgr/plugin-svgo": "^8.1.0",
60
+ "@svgr/babel-plugin-remove-jsx-attribute": "^8.0.0",
64
61
  "@theguild/tailwind-config": "0.6.2",
65
62
  "@types/dedent": "0.7.2",
66
- "@types/mdast": "4.0.4",
67
63
  "@types/react": "18.3.18",
68
64
  "@types/react-dom": "18.3.5",
69
65
  "@types/semver": "7.5.8",
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,21 +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
- if (faqPages.includes(pathname) && !html.hasAttribute("itemscope")) {
9
- html.setAttribute("itemscope", "");
10
- html.setAttribute("itemtype", "https://schema.org/FAQPage");
11
- return () => {
12
- html.removeAttribute("itemscope");
13
- html.removeAttribute("itemtype");
14
- };
15
- }
16
- }, []);
17
- return null;
18
- };
19
- export {
20
- AttachPageFAQSchema
21
- };
@@ -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
- };
@@ -1,10 +0,0 @@
1
- import { Root } from 'mdast';
2
- import { Plugin } from 'unified';
3
-
4
- type RemarkLinkRewriteOptions = {
5
- pattern: RegExp;
6
- replace: string;
7
- };
8
- declare const remarkLinkRewrite: Plugin<[RemarkLinkRewriteOptions], Root>;
9
-
10
- export { type RemarkLinkRewriteOptions, remarkLinkRewrite };
@@ -1,13 +0,0 @@
1
- import { visit } from "unist-util-visit";
2
- const EXTERNAL_URL_RE = /^https?:\/\//;
3
- const remarkLinkRewrite = ({ pattern, replace }) => (ast) => {
4
- visit(ast, "link", (node) => {
5
- if (EXTERNAL_URL_RE.test(node.url)) {
6
- return;
7
- }
8
- node.url = node.url.replace(pattern, replace);
9
- });
10
- };
11
- export {
12
- remarkLinkRewrite
13
- };