UNPKG

@theguild/components

Version:
395 lines (356 loc) • 15.7 kB
export { default as Giscus } from '@giscus/react'; import { DocsThemeConfig } from 'nextra-theme-docs'; export { Bleed, Collapse, DocsThemeConfig, Navbar, NotFoundPage, useConfig, useTheme, useThemeConfig } from 'nextra-theme-docs'; export { createCatchAllMeta } from 'nextra/catch-all'; export { Callout, Cards, Code, FileTree, Mermaid, RemoteContent, Steps, Table, Tabs, Td, Th, Tr } from 'nextra/components'; export { useData, useMounted } from 'nextra/hooks'; export { useMDXComponents } from 'nextra/mdx'; import * as React$1 from 'react'; import React__default, { ComponentProps, ReactNode, ReactElement, HTMLAttributes, ComponentPropsWithoutRef } from 'react'; import * as url from 'url'; import { ImageProps, StaticImageData } from 'next/image'; import { LinkProps } from 'next/link'; import { ReactPlayerProps } from 'react-player'; export { AngularLogo as AccountBox, AngularLogo, AngularLogo as AppsIcon, AngularLogo as ArchDecoration, AngularLogo as ArchDecorationGradientDefs, AngularLogo as ArrowIcon, AngularLogo as BardIcon, AngularLogo as CSAStarLevelOneIcon, AngularLogo as CaretSlimIcon, AngularLogo as CheckIcon, AngularLogo as CloseIcon, AngularLogo as CodeGeneratorLogo, AngularLogo as CodegenIcon, AngularLogo as ConductorLogo, AngularLogo as ConfigLogo, EnvelopLettermark, AngularLogo as FetsLogo, GraphQLESlintLettermark, AngularLogo as GraphQLFoundationLogo, AngularLogo as GroupIcon, AngularLogo as GuildLogo, AngularLogo as HeltinLogo, AngularLogo as HighlightDecoration, AngularLogo as HiveCombinationMark, AngularLogo as HiveGatewayIcon, AngularLogo as HiveIcon, AngularLogo as HonourIcon, InspectorLettermark, AngularLogo as KitQLLogo, AngularLogo as LargeHiveIconDecoration, LettermarkLogoProps, AngularLogo as LinkedInIcon, AngularLogo as ListIcon, AngularLogo as MeshIcon, AngularLogo as MeshLogo, AngularLogo as ModulesLogo, AngularLogo as MoonIcon, AngularLogo as MoreIcon, AngularLogo as NextraLogo, AngularLogo as PaperIcon, AngularLogo as PencilIcon, AngularLogo as RightCornerIcon, AngularLogo as SSELogo, ScalarsLettermark, AngularLogo as SearchIcon, AngularLogo as ShareIcon, AngularLogo as ShieldFlashIcon, SofaLettermark, AngularLogo as StellateIcon, AngularLogo as StitchingLogo, AngularLogo as TargetIcon, AngularLogo as TheGuild, AngularLogo as ToolsLogo, AngularLogo as TwitterIcon, AngularLogo as WSLogo, AngularLogo as WhatsAppLogo, AngularLogo as YogaIcon, AngularLogo as YogaLogo, AngularLogo as YouTubeIcon } from './logos.mjs'; export { DiscordIcon, GitHubIcon, InformationCircleIcon } from 'nextra/icons'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { ProductInfo } from './products.mjs'; export { PRODUCTS } from './products.mjs'; import { ClassValue } from 'clsx'; export { ClassValue } from 'clsx'; import 'nextra/normalize-pages'; interface IVideo { src: string; placeholder: string; } type ILink = LinkProps & Pick<ComponentProps<'a'>, 'target' | 'rel' | 'title' | 'className' | 'style'> & { children: ReactNode; newWindow?: boolean; sameSite?: boolean; }; interface IFooterExtendedProps { className?: string; sameSite?: boolean; resources?: ILink[]; logo?: ILink; } interface IFeatureListProps { className?: string; title?: string; description?: string; items: { title: string; description: string; image: ImageProps; link?: ILink; }[]; link?: ILink; } interface IInfoListProps { className?: string; title?: string | ReactNode; items: { title: string | ReactNode; description: string | ReactNode; link?: ILink; }[]; } interface IHeroVideoProps { className?: string; title: string | ReactNode; description: string | ReactNode; flipped?: boolean; link?: ILink; video: IVideo; videoProps?: ReactPlayerProps; } interface IHeroIllustrationProps { className?: string; title: string | ReactNode; description: string | ReactNode; flipped?: boolean; link?: ILink; image: ImageProps; } interface IHeroGradientProps { className?: string; title: string | ReactNode; description: string | ReactNode; colors?: string[]; version?: string | ReactNode; link?: ILink | ILink[]; image?: ImageProps; } interface IHeroMarketplaceProps { className?: string; title: string | ReactNode; description: string | ReactNode; link: ILink; image?: ImageProps; } interface IMarketplaceItemProps { title: string; description: string | ReactNode; tags?: string[]; modal?: { header: { image?: ImageProps; description?: string | ILink; }; content: string | (() => ReactNode) | ReactNode; }; update: string; image: ImageProps; link: Omit<ILink, 'children'>; weeklyNPMDownloads?: number; } interface IMarketplaceItemsProps { items: IMarketplaceItemProps[]; } interface IMarketplaceListProps { className?: string; title?: string; colorScheme?: 'green' | 'neutral'; placeholder: string | ReactElement; pagination: number; items: IMarketplaceItemProps[]; } interface IMarketplaceSearchProps { className?: string; title: string | ReactNode; placeholder: string; colorScheme?: 'green' | 'neutral'; primaryList: IMarketplaceListProps; secondaryList?: IMarketplaceListProps; queryList?: IMarketplaceListProps; tagsFilter?: string[] | ReadonlyArray<string>; } interface ISchemaPageProps { schemaName: string; tags?: string[]; editorData: Omit<IEditorProps, 'icon' | 'children'>[]; } interface IEditorProps { children: ReactNode; title: string; frameworks?: string[]; schema?: string; image?: string; operations?: string; } type AnchorProps = ILink; declare const Anchor: React$1.ForwardRefExoticComponent<{ href: string | url.UrlObject; as?: string | url.UrlObject; replace?: boolean; scroll?: boolean; shallow?: boolean; passHref?: boolean; prefetch?: boolean | null; locale?: string | false; legacyBehavior?: boolean; onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>; onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>; onClick?: React.MouseEventHandler<HTMLAnchorElement>; } & Pick<React$1.DetailedHTMLProps<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "style" | "title" | "target" | "rel" | "className"> & { children: React$1.ReactNode; newWindow?: boolean; sameSite?: boolean; } & React$1.RefAttributes<HTMLAnchorElement>>; interface ButtonProps extends AnchorProps { variant?: 'primary' | 'secondary'; } declare const Button: ({ children, className, variant, ...props }: ButtonProps) => ReactElement; type CardsColorfulProps = { className?: string; cards: { title: string; description: string; category: string; color: string; link: Omit<ILink, 'children'>; }[]; }; declare const CardsColorful: ({ cards, className }: CardsColorfulProps) => ReactElement; declare const FeatureList: ({ title, description, items, link, className, }: IFeatureListProps) => ReactElement; declare function Footer({ className, sameSite, resources, logo, }: IFooterExtendedProps): ReactElement; declare const HeroGradient: ({ title, description, link, version, colors, image, className, }: IHeroGradientProps) => ReactElement; declare const HeroIllustration: ({ title, description, link, image, flipped, className, }: IHeroIllustrationProps) => ReactElement; declare const HeroMarketplace: ({ title, description, link, className, image, }: IHeroMarketplaceProps) => ReactElement; declare const HeroVideo: ({ title, description, link, video, flipped, className, videoProps, }: IHeroVideoProps) => ReactElement; declare function Image(props: ImageProps): ReactElement; declare const InfoList: ({ title, items, className }: IInfoListProps) => ReactElement; type Command = { name: string; cmd: 'add' | 'run' | 'install' | 'init'; isNpx?: boolean; isGlobal?: boolean; }; declare const LegacyPackageCmd: ({ packages, }: { packages: (string | Command)[]; }) => ReactElement; declare const MarketplaceList: ({ title, placeholder, items, pagination, className, colorScheme, }: IMarketplaceListProps) => ReactElement; declare const MarketplaceSearch: ({ title, tagsFilter, placeholder, primaryList, secondaryList, queryList, className, colorScheme, }: IMarketplaceSearchProps) => ReactElement; declare const mdxComponents: { [tag: string]: (props: object) => ReactElement; }; declare const NPMBadge: ({ name }: { name: string; }) => ReactElement; /** * GraphQL-related products live under the Hive platform brand, so we use a single logo for them. * The rest gets The Guild / {Product} logo. */ declare function getNavbarLogo(logo: DocsThemeConfig['logo'], websiteName: string, description: string): react_jsx_runtime.JSX.Element; declare function ThemeSwitcherButton(): react_jsx_runtime.JSX.Element; declare const productsItems: { [k: string]: { title: string; href: `https://${string}`; }; }; declare function GetYourAPIGameRightSection({ className }: { className?: string; }): react_jsx_runtime.JSX.Element; interface GraphQLConfCardProps { image: StaticImageData; } declare function GraphQLConfCard({ image }: GraphQLConfCardProps): react_jsx_runtime.JSX.Element; interface HiveNavigationProps { companyMenuChildren?: ReactNode; children?: ReactNode; className?: string; /** * We change links to relative based on what product we're in. */ productName: string; logo?: ReactNode; navLinks?: { href: string; children: ReactNode; }[]; developerMenu?: { href: string; title?: string; icon: React__default.FC<{ className?: string; }>; children: ReactNode; }[]; } /** * * @example * ```tsx * <HiveNavigation * companyMenuChildren={<GraphQLConfCard image={graphQLConfLocalImage} />} * items={items} * > * {extraContent} * </HiveNavigation> * ``` */ declare function HiveNavigation({ companyMenuChildren, children, className, productName, logo, navLinks, developerMenu, }: HiveNavigationProps): react_jsx_runtime.JSX.Element; interface HiveFooterProps extends IFooterExtendedProps { description?: string; /** * @deprecated use `items` instead */ resources?: never; items?: HiveFooterItems; } declare function HiveFooter({ className, logo, sameSite, description, items, }: HiveFooterProps): react_jsx_runtime.JSX.Element; declare namespace HiveFooter { var DEFAULT_ITEMS: HiveFooterItems; } interface HiveFooterItems { developer?: ILink[]; company?: ILink[]; resources?: ILink[]; links?: ILink[]; } interface ToolsAndLibrariesCardsProps extends HTMLAttributes<HTMLDivElement> { isHive?: boolean; } declare function ToolsAndLibrariesCards({ className, isHive, ...rest }: ToolsAndLibrariesCardsProps): react_jsx_runtime.JSX.Element; /** * Decorations must be isolated, as clicking id links scrolls the container with overflow: hidden. */ declare function DecorationIsolation(props: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element; declare const variantStyles: { primary: string; 'primary-inverted': string; secondary: string; 'secondary-inverted': string; tertiary: string; }; declare namespace CallToActionProps { type Variant = keyof typeof variantStyles; interface BaseProps { variant: Variant; } interface AnchorProps extends BaseProps, React.ComponentPropsWithoutRef<typeof Anchor> { href: string; } interface ButtonProps extends BaseProps, React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> { href?: never; onClick: (event: React.MouseEvent<HTMLButtonElement>) => void; } } type CallToActionProps = CallToActionProps.AnchorProps | CallToActionProps.ButtonProps; /** * This is called `Button` in Figma in the new Hive brand design system. * It's a styled variant of {@link Anchor}. * * // TODO: Consider renaming it to `Button`. */ declare function CallToAction(props: CallToActionProps): react_jsx_runtime.JSX.Element; type CookiesConsentProps = React.HTMLAttributes<HTMLElement>; declare function CookiesConsent(props: CookiesConsentProps): react_jsx_runtime.JSX.Element | null; interface HeadingProps extends ComponentPropsWithoutRef<'h1'> { as: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'p' | 'span'; size: 'xl' | 'lg' | 'md' | 'sm' | 'xs'; } declare function Heading({ as: _as, size, className, children, ...rest }: HeadingProps): react_jsx_runtime.JSX.Element; interface InfoCardProps extends React.HTMLAttributes<HTMLElement> { icon: ReactNode; heading: ReactNode; as?: 'div' | 'li'; } declare function InfoCard({ as: Root, icon, heading, className, children, ...rest }: InfoCardProps): react_jsx_runtime.JSX.Element; type StudProps = React.HTMLAttributes<HTMLElement>; declare function Stud(props: StudProps): react_jsx_runtime.JSX.Element; interface ExploreMainProductCardsProps extends HTMLAttributes<HTMLDivElement> { isHive?: boolean; } declare function ExploreMainProductCards({ className, isHive, ...rest }: ExploreMainProductCardsProps): react_jsx_runtime.JSX.Element; declare function MainProductCard({ as: Root, product, className, ...rest }: ProductCardProps): react_jsx_runtime.JSX.Element; declare function AncillaryProductCard({ product, as: Root, className, ...rest }: ProductCardProps): react_jsx_runtime.JSX.Element; interface ProductCardProps extends React.HTMLAttributes<HTMLElement> { as: 'div' | 'li'; product: ProductInfo; } declare function ProductCard(props: ProductCardProps): react_jsx_runtime.JSX.Element; interface GuildDocsThemeConfig extends DocsThemeConfig { websiteName: string; description: string; } declare function defineConfig({ websiteName, description, logo, ...config }: GuildDocsThemeConfig): DocsThemeConfig; type Package = { readme: string; createdAt: string; updatedAt: string; description: string; weeklyNPMDownloads: number; }; declare const fetchPackageInfo: (packageName: string, githubReadme?: { repo: string; path: string; }) => Promise<Package>; declare function cn(...inputs: ClassValue[]): string; declare module 'react' { interface CSSProperties { [key: `--${string}`]: string | number | undefined; } } export { Anchor, AncillaryProductCard, Button, CallToAction, CallToActionProps, CardsColorful, CookiesConsent, type CookiesConsentProps, DecorationIsolation, ExploreMainProductCards, type ExploreMainProductCardsProps, FeatureList, Footer, GetYourAPIGameRightSection, GraphQLConfCard, type GraphQLConfCardProps, Heading, type HeadingProps, HeroGradient, HeroIllustration, HeroMarketplace, HeroVideo, HiveFooter, HiveNavigation, type HiveNavigationProps, type IEditorProps, type IFeatureListProps, type IFooterExtendedProps, type IHeroGradientProps, type IHeroIllustrationProps, type IHeroMarketplaceProps, type IHeroVideoProps, type IInfoListProps, type ILink, type IMarketplaceItemProps, type IMarketplaceItemsProps, type IMarketplaceListProps, type IMarketplaceSearchProps, type ISchemaPageProps, Image, InfoCard, type InfoCardProps, InfoList, LegacyPackageCmd, MainProductCard, MarketplaceList, MarketplaceSearch, NPMBadge, ProductCard, type ProductCardProps, Stud, type StudProps, ThemeSwitcherButton, ToolsAndLibrariesCards, cn, defineConfig, fetchPackageInfo, getNavbarLogo, mdxComponents, productsItems };