@theguild/components 7.6.1 → 7.6.2

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/index.d.mts CHANGED
@@ -382,6 +382,15 @@ interface ProductCardProps extends React.HTMLAttributes<HTMLElement> {
382
382
  }
383
383
  declare function ProductCard(props: ProductCardProps): react_jsx_runtime.JSX.Element;
384
384
 
385
+ interface ContactTextLinkProps extends Omit<React.HTMLAttributes<HTMLAnchorElement>, 'href' | 'onClick'> {
386
+ children?: React.ReactNode;
387
+ }
388
+ declare function ContactTextLink(props: ContactTextLinkProps): react_jsx_runtime.JSX.Element;
389
+ interface ContactButtonProps extends Omit<CallToActionProps.AnchorProps, 'onClick' | 'href' | 'children'> {
390
+ children?: React.ReactNode;
391
+ }
392
+ declare function ContactButton(props: ContactButtonProps): react_jsx_runtime.JSX.Element;
393
+
385
394
  type TextLinkProps = AnchorProps;
386
395
  declare function TextLink({ className, children, ...rest }: TextLinkProps): react_jsx_runtime.JSX.Element;
387
396
 
@@ -444,4 +453,4 @@ declare module 'react' {
444
453
  }
445
454
  }
446
455
 
447
- export { Anchor, AncillaryProductCard, Button, CallToAction, CallToActionProps, CardsColorful, CookiesConsent, type CookiesConsentProps, DecorationIsolation, Dropdown, DropdownContent, DropdownItem, DropdownTrigger, 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, MDXLink, type MDXLinkProps, MainProductCard, MarketplaceList, MarketplaceSearch, NPMBadge, ProductCard, type ProductCardProps, Stud, type StudProps, TextLink, type TextLinkProps, ThemeSwitcherButton, ToolsAndLibrariesCards, VersionDropdown, type VersionDropdownProps, cn, defineConfig, fetchPackageInfo, getNavbarLogo, hiveMdxComponents, mdxComponents, productsItems };
456
+ export { Anchor, AncillaryProductCard, Button, CallToAction, CallToActionProps, CardsColorful, ContactButton, type ContactButtonProps, ContactTextLink, type ContactTextLinkProps, CookiesConsent, type CookiesConsentProps, DecorationIsolation, Dropdown, DropdownContent, DropdownItem, DropdownTrigger, 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, MDXLink, type MDXLinkProps, MainProductCard, MarketplaceList, MarketplaceSearch, NPMBadge, ProductCard, type ProductCardProps, Stud, type StudProps, TextLink, type TextLinkProps, ThemeSwitcherButton, ToolsAndLibrariesCards, VersionDropdown, type VersionDropdownProps, cn, defineConfig, fetchPackageInfo, getNavbarLogo, hiveMdxComponents, mdxComponents, productsItems };
package/dist/index.js CHANGED
@@ -2672,9 +2672,36 @@ function ExploreMainProductCards({
2672
2672
  );
2673
2673
  }
2674
2674
 
2675
+ // src/components/contact-us.tsx
2676
+ import { jsx as jsx46 } from "react/jsx-runtime";
2677
+ var openCrisp = (event) => {
2678
+ if (window.$crisp) {
2679
+ window.$crisp.push(["do", "chat:open"]);
2680
+ event.preventDefault();
2681
+ }
2682
+ };
2683
+ function ContactTextLink(props) {
2684
+ return /* @__PURE__ */ jsx46(
2685
+ "a",
2686
+ {
2687
+ ...props,
2688
+ className: cn(
2689
+ "hive-focus -m-2 rounded p-2 font-medium hover:text-blue-700 hover:underline dark:hover:text-blue-100",
2690
+ props.className
2691
+ ),
2692
+ href: "https://the-guild.dev/contact",
2693
+ onClick: openCrisp,
2694
+ children: props.children || "Contact Us"
2695
+ }
2696
+ );
2697
+ }
2698
+ function ContactButton(props) {
2699
+ return /* @__PURE__ */ jsx46(CallToAction, { href: "https://the-guild.dev/contact", onClick: openCrisp, ...props, children: props.children || "Contact Us" });
2700
+ }
2701
+
2675
2702
  // src/components/dropdown.tsx
2676
2703
  import { createContext, useContext, useEffect as useEffect4, useId as useId2, useRef as useRef2, useState as useState4 } from "react";
2677
- import { jsx as jsx46 } from "react/jsx-runtime";
2704
+ import { jsx as jsx47 } from "react/jsx-runtime";
2678
2705
  var DropdownContext = createContext(null);
2679
2706
  function useDropdownContext() {
2680
2707
  const context = useContext(DropdownContext);
@@ -2721,11 +2748,11 @@ function Dropdown({ children, className, type, ...props }) {
2721
2748
  const dismissDelayMs = 200;
2722
2749
  const isHoveringRef = useRef2(isHovering);
2723
2750
  isHoveringRef.current = isHovering;
2724
- return /* @__PURE__ */ jsx46(
2751
+ return /* @__PURE__ */ jsx47(
2725
2752
  DropdownContext.Provider,
2726
2753
  {
2727
2754
  value: { isOpen, setIsOpen, isHovering, setIsHovering, buttonId, menuId, buttonRef, menuRef },
2728
- children: /* @__PURE__ */ jsx46(
2755
+ children: /* @__PURE__ */ jsx47(
2729
2756
  "div",
2730
2757
  {
2731
2758
  className: cn("relative", className),
@@ -2754,7 +2781,7 @@ function Dropdown({ children, className, type, ...props }) {
2754
2781
  }
2755
2782
  function DropdownTrigger({ children, className, ...props }) {
2756
2783
  const { isOpen, setIsOpen, buttonId, menuId, buttonRef, setIsHovering } = useDropdownContext();
2757
- return /* @__PURE__ */ jsx46(
2784
+ return /* @__PURE__ */ jsx47(
2758
2785
  "button",
2759
2786
  {
2760
2787
  ref: buttonRef,
@@ -2774,7 +2801,7 @@ function DropdownTrigger({ children, className, ...props }) {
2774
2801
  }
2775
2802
  function DropdownContent({ children, className, ...props }) {
2776
2803
  const { isOpen, buttonId, menuId, menuRef } = useDropdownContext();
2777
- return /* @__PURE__ */ jsx46(
2804
+ return /* @__PURE__ */ jsx47(
2778
2805
  "div",
2779
2806
  {
2780
2807
  ref: menuRef,
@@ -2791,9 +2818,9 @@ function DropdownContent({ children, className, ...props }) {
2791
2818
  }
2792
2819
  function DropdownItem({ children, onClick, className, href, ...props }) {
2793
2820
  if (href) {
2794
- return /* @__PURE__ */ jsx46("a", { role: "menuitem", href, className, onClick, ...props, children });
2821
+ return /* @__PURE__ */ jsx47("a", { role: "menuitem", href, className, onClick, ...props, children });
2795
2822
  }
2796
- return /* @__PURE__ */ jsx46(
2823
+ return /* @__PURE__ */ jsx47(
2797
2824
  "button",
2798
2825
  {
2799
2826
  role: "menuitem",
@@ -2811,7 +2838,7 @@ function DropdownItem({ children, onClick, className, href, ...props }) {
2811
2838
  }
2812
2839
 
2813
2840
  // src/components/version-dropdown.tsx
2814
- import { jsx as jsx47, jsxs as jsxs28 } from "react/jsx-runtime";
2841
+ import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
2815
2842
  function VersionDropdown({
2816
2843
  currentVersion,
2817
2844
  versions,
@@ -2819,11 +2846,11 @@ function VersionDropdown({
2819
2846
  }) {
2820
2847
  return /* @__PURE__ */ jsxs28(Dropdown, { type: "hover", className: "relative", children: [
2821
2848
  /* @__PURE__ */ jsxs28(DropdownTrigger, { className: "hive-focus flex cursor-default items-center gap-1 py-2 font-medium leading-normal text-green-800 aria-expanded:text-green-1000 dark:text-neutral-300 dark:aria-expanded:text-neutral-100", children: [
2822
- chevronPosition === "left" && /* @__PURE__ */ jsx47(SvgCaretSlim, { className: "size-3.5" }),
2849
+ chevronPosition === "left" && /* @__PURE__ */ jsx48(SvgCaretSlim, { className: "size-3.5" }),
2823
2850
  currentVersion,
2824
- chevronPosition === "right" && /* @__PURE__ */ jsx47(SvgCaretSlim, { className: "size-3.5" })
2851
+ chevronPosition === "right" && /* @__PURE__ */ jsx48(SvgCaretSlim, { className: "size-3.5" })
2825
2852
  ] }),
2826
- /* @__PURE__ */ jsx47(DropdownContent, { className: "absolute left-full min-w-16 -translate-x-full translate-y-2 rounded-xl border border-beige-200 bg-white p-1 shadow-[0px_16px_32px_-12px_rgba(14,18,27,0.10)] transition ease-in-out data-[state=closed]:pointer-events-none data-[state=closed]:translate-y-0 data-[state=closed]:scale-95 data-[state=closed]:opacity-0 data-[state=open]:fade-in-90 dark:border-neutral-800 dark:bg-neutral-900", children: versions.map((version) => /* @__PURE__ */ jsxs28(
2853
+ /* @__PURE__ */ jsx48(DropdownContent, { className: "absolute left-full min-w-16 -translate-x-full translate-y-2 rounded-xl border border-beige-200 bg-white p-1 shadow-[0px_16px_32px_-12px_rgba(14,18,27,0.10)] transition ease-in-out data-[state=closed]:pointer-events-none data-[state=closed]:translate-y-0 data-[state=closed]:scale-95 data-[state=closed]:opacity-0 data-[state=open]:fade-in-90 dark:border-neutral-800 dark:bg-neutral-900", children: versions.map((version) => /* @__PURE__ */ jsxs28(
2827
2854
  DropdownItem,
2828
2855
  {
2829
2856
  href: version.href,
@@ -2835,7 +2862,7 @@ function VersionDropdown({
2835
2862
  children: [
2836
2863
  version.label ?? version.value,
2837
2864
  " ",
2838
- version.value === currentVersion && /* @__PURE__ */ jsx47(SvgCheck, { className: "size-3.5" })
2865
+ version.value === currentVersion && /* @__PURE__ */ jsx48(SvgCheck, { className: "size-3.5" })
2839
2866
  ]
2840
2867
  },
2841
2868
  version.value
@@ -2846,7 +2873,7 @@ function VersionDropdown({
2846
2873
  // src/define-config.tsx
2847
2874
  import { useRouter as useRouter3 } from "next/router";
2848
2875
  import { Navbar, useConfig } from "nextra-theme-docs";
2849
- import { Fragment as Fragment7, jsx as jsx48, jsxs as jsxs29 } from "react/jsx-runtime";
2876
+ import { Fragment as Fragment7, jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
2850
2877
  function defineConfig({
2851
2878
  websiteName,
2852
2879
  description,
@@ -2869,7 +2896,7 @@ function defineConfig({
2869
2896
  labels: "kind/docs"
2870
2897
  },
2871
2898
  footer: {
2872
- component: /* @__PURE__ */ jsx48(Footer, {})
2899
+ component: /* @__PURE__ */ jsx49(Footer, {})
2873
2900
  },
2874
2901
  sidebar: {
2875
2902
  defaultMenuCollapseLevel: 1,
@@ -2903,33 +2930,33 @@ function defineConfig({
2903
2930
  } = frontMatter;
2904
2931
  const title = `${pageTitle} (${websiteName})`;
2905
2932
  return /* @__PURE__ */ jsxs29(Fragment7, { children: [
2906
- /* @__PURE__ */ jsx48("title", { children: title }),
2907
- /* @__PURE__ */ jsx48("meta", { property: "og:title", content: title }),
2933
+ /* @__PURE__ */ jsx49("title", { children: title }),
2934
+ /* @__PURE__ */ jsx49("meta", { property: "og:title", content: title }),
2908
2935
  description2 && [
2909
- /* @__PURE__ */ jsx48("meta", { name: "description", content: description2 }, 0),
2910
- /* @__PURE__ */ jsx48("meta", { property: "og:description", content: description2 }, 1)
2936
+ /* @__PURE__ */ jsx49("meta", { name: "description", content: description2 }, 0),
2937
+ /* @__PURE__ */ jsx49("meta", { property: "og:description", content: description2 }, 1)
2911
2938
  ],
2912
2939
  canonical && [
2913
- /* @__PURE__ */ jsx48("link", { rel: "canonical", href: canonical }, 3),
2914
- /* @__PURE__ */ jsx48("meta", { property: "og:url", content: canonical }, 4)
2940
+ /* @__PURE__ */ jsx49("link", { rel: "canonical", href: canonical }, 3),
2941
+ /* @__PURE__ */ jsx49("meta", { property: "og:url", content: canonical }, 4)
2915
2942
  ],
2916
- /* @__PURE__ */ jsx48("meta", { name: "twitter:card", content: "summary_large_image" }),
2917
- /* @__PURE__ */ jsx48("meta", { name: "twitter:site", content: "https://the-guild.dev" }),
2918
- /* @__PURE__ */ jsx48("meta", { name: "twitter:creator", content: "@TheGuildDev" }),
2919
- /* @__PURE__ */ jsx48("meta", { property: "og:type", content: type }),
2920
- /* @__PURE__ */ jsx48("meta", { property: "og:site_name", content: websiteName }),
2921
- /* @__PURE__ */ jsx48("meta", { property: "og:image", content: image }),
2922
- /* @__PURE__ */ jsx48("meta", { property: "og:image:alt", content: pageTitle }),
2923
- /* @__PURE__ */ jsx48("meta", { content: websiteName, name: "apple-mobile-web-app-title" }),
2924
- /* @__PURE__ */ jsx48("meta", { content: websiteName, name: "application-name" }),
2925
- /* @__PURE__ */ jsx48("meta", { name: "robots", content: "index,follow" })
2943
+ /* @__PURE__ */ jsx49("meta", { name: "twitter:card", content: "summary_large_image" }),
2944
+ /* @__PURE__ */ jsx49("meta", { name: "twitter:site", content: "https://the-guild.dev" }),
2945
+ /* @__PURE__ */ jsx49("meta", { name: "twitter:creator", content: "@TheGuildDev" }),
2946
+ /* @__PURE__ */ jsx49("meta", { property: "og:type", content: type }),
2947
+ /* @__PURE__ */ jsx49("meta", { property: "og:site_name", content: websiteName }),
2948
+ /* @__PURE__ */ jsx49("meta", { property: "og:image", content: image }),
2949
+ /* @__PURE__ */ jsx49("meta", { property: "og:image:alt", content: pageTitle }),
2950
+ /* @__PURE__ */ jsx49("meta", { content: websiteName, name: "apple-mobile-web-app-title" }),
2951
+ /* @__PURE__ */ jsx49("meta", { content: websiteName, name: "application-name" }),
2952
+ /* @__PURE__ */ jsx49("meta", { name: "robots", content: "index,follow" })
2926
2953
  ] });
2927
2954
  },
2928
2955
  logoLink: false,
2929
2956
  logo: getNavbarLogo(logo, websiteName, description),
2930
2957
  navbar: {
2931
- extraContent: /* @__PURE__ */ jsx48(ThemeSwitcherButton, {}),
2932
- ...logo && { component: (props) => /* @__PURE__ */ jsx48(Navbar, { items: addGuildCompanyMenu(props.items) }) }
2958
+ extraContent: /* @__PURE__ */ jsx49(ThemeSwitcherButton, {}),
2959
+ ...logo && { component: (props) => /* @__PURE__ */ jsx49(Navbar, { items: addGuildCompanyMenu(props.items) }) }
2933
2960
  },
2934
2961
  ...config,
2935
2962
  components: {
@@ -3036,6 +3063,8 @@ export {
3036
3063
  Collapse,
3037
3064
  SvgConductor as ConductorLogo,
3038
3065
  SvgConfig as ConfigLogo,
3066
+ ContactButton,
3067
+ ContactTextLink,
3039
3068
  CookiesConsent,
3040
3069
  DecorationIsolation,
3041
3070
  DiscordIcon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theguild/components",
3
- "version": "7.6.1",
3
+ "version": "7.6.2",
4
4
  "repository": {
5
5
  "url": "https://github.com/the-guild-org/docs",
6
6
  "directory": "packages/components"