@theguild/components 8.2.0-alpha-20250103151446-09bf8a8e900b99a16f377e186435dea2a4d22728 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/decorations/highlight-decoration.js +1 -1
- package/dist/components/hive-navigation/index.d.mts +2 -3
- package/dist/components/hive-navigation/index.js +8 -2
- package/dist/components/icons/yoga.js +3 -3
- package/dist/components/index.d.mts +0 -3
- package/dist/components/index.js +0 -4
- package/dist/components/legacy-package-cmd.js +1 -1
- package/dist/index.d.mts +0 -3
- package/dist/server/index.d.mts +0 -1
- package/dist/server/index.js +0 -2
- package/dist/server/theme-layout.d.mts +1 -4
- package/dist/server/theme-layout.js +2 -27
- package/package.json +2 -4
- package/style.css +1 -17
- package/dist/components/comparison-table/index.d.mts +0 -12
- package/dist/components/comparison-table/index.js +0 -43
- package/dist/components/faq/attach-page-faq-schema.d.mts +0 -7
- package/dist/components/faq/attach-page-faq-schema.js +0 -22
- package/dist/components/faq/index.d.mts +0 -9
- package/dist/components/faq/index.js +0 -90
- package/dist/server/body.d.mts +0 -8
- package/dist/server/body.js +0 -11
|
@@ -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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import react__default, { ReactNode,
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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: "
|
|
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';
|
package/dist/components/index.js
CHANGED
|
@@ -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
|
|
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';
|
package/dist/server/index.d.mts
CHANGED
|
@@ -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';
|
package/dist/server/index.js
CHANGED
|
@@ -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
|
|
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,28 +67,8 @@ const GuildLayout = async ({
|
|
|
70
67
|
suppressHydrationWarning: true,
|
|
71
68
|
...htmlProps,
|
|
72
69
|
children: [
|
|
73
|
-
/* @__PURE__ */ jsx(Head, { ...headProps
|
|
74
|
-
|
|
75
|
-
--nextra-primary-hue: 67.1deg;
|
|
76
|
-
--nextra-primary-saturation: 100%;
|
|
77
|
-
--nextra-primary-lightness: 55%;
|
|
78
|
-
--nextra-bg: 17, 17, 17;
|
|
79
|
-
}
|
|
80
|
-
:root.dark *::selection {
|
|
81
|
-
background-color: hsl(191deg 95% 72% / 0.25);
|
|
82
|
-
}
|
|
83
|
-
:root.light,
|
|
84
|
-
body.light {
|
|
85
|
-
--nextra-primary-hue: 191deg;
|
|
86
|
-
--nextra-primary-saturation: 40%;
|
|
87
|
-
--nextra-bg: 255, 255, 255;
|
|
88
|
-
}
|
|
89
|
-
.x\\:tracking-tight,
|
|
90
|
-
.nextra-steps :is(h2, h3, h4) {
|
|
91
|
-
letter-spacing: normal;
|
|
92
|
-
}
|
|
93
|
-
` }) }),
|
|
94
|
-
/* @__PURE__ */ jsx(Body, { lightOnlyPages, children: /* @__PURE__ */ jsx(
|
|
70
|
+
/* @__PURE__ */ jsx(Head, { ...headProps }),
|
|
71
|
+
/* @__PURE__ */ jsx("body", { children: /* @__PURE__ */ jsx(
|
|
95
72
|
Layout,
|
|
96
73
|
{
|
|
97
74
|
footer: /* @__PURE__ */ jsx(
|
|
@@ -104,14 +81,12 @@ const GuildLayout = async ({
|
|
|
104
81
|
description
|
|
105
82
|
}
|
|
106
83
|
),
|
|
107
|
-
search,
|
|
108
84
|
navbar: /* @__PURE__ */ jsx(
|
|
109
85
|
HiveNavigation,
|
|
110
86
|
{
|
|
111
87
|
className: "max-w-[90rem]",
|
|
112
88
|
productName: websiteName,
|
|
113
89
|
navLinks: [],
|
|
114
|
-
search,
|
|
115
90
|
...navbarProps,
|
|
116
91
|
logo: /* @__PURE__ */ jsxs(
|
|
117
92
|
Anchor,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theguild/components",
|
|
3
|
-
"version": "8.2.0
|
|
3
|
+
"version": "8.2.0",
|
|
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-
|
|
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
|
-
|
|
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,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
|
-
};
|
package/dist/server/body.d.mts
DELETED
package/dist/server/body.js
DELETED
|
@@ -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" : void 0, children });
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
Body
|
|
11
|
-
};
|