@mdxui/named 6.2.0 → 6.3.1

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.
@@ -1,6 +1,5 @@
1
1
  // src/view/view.tsx
2
- import { Site } from "@mdxui/themes";
3
- import { Navbar17, FooterSmall, NoiseTexture } from "@mdxui/neo";
2
+ import { DialectShell, NeoChrome } from "@mdxui/dialect";
4
3
 
5
4
  // src/components/hero/hero.tsx
6
5
  import Image from "next/image";
@@ -118,6 +117,26 @@ function Marquee({
118
117
  // src/components/hero/hero.tsx
119
118
  import { Button } from "@mdxui/primitives";
120
119
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
120
+ var isLogoUrl = (s) => /^(https?:)?\/\//i.test(s.trim()) || /^data:image\//i.test(s.trim());
121
+ var BRAND_LABELS = {
122
+ github: "GitHub",
123
+ gitlab: "GitLab",
124
+ linkedin: "LinkedIn",
125
+ youtube: "YouTube",
126
+ whatsapp: "WhatsApp",
127
+ hubspot: "HubSpot",
128
+ quickbooks: "QuickBooks",
129
+ typescript: "TypeScript",
130
+ javascript: "JavaScript",
131
+ postgresql: "PostgreSQL",
132
+ mongodb: "MongoDB",
133
+ graphql: "GraphQL",
134
+ openai: "OpenAI"
135
+ };
136
+ var brandLabel = (s) => {
137
+ const t = s.trim();
138
+ return BRAND_LABELS[t.toLowerCase()] ?? t.charAt(0).toUpperCase() + t.slice(1);
139
+ };
121
140
  function Hero({
122
141
  badgeEmoji = "",
123
142
  badgeText = "Meet Priya",
@@ -189,7 +208,24 @@ function Hero({
189
208
  style: { background: "linear-gradient(to left, var(--background), transparent)" }
190
209
  }
191
210
  ),
192
- /* @__PURE__ */ jsx3(Marquee, { className: "relative z-0 py-2 [--gap:1.25rem] sm:[--gap:3rem]", children: marqueeImages.map((src, i) => /* @__PURE__ */ jsx3("img", { src, alt: "Placeholder", className: "h-16 w-16 rounded-xl bg-card p-2" }, `${src}-${i}`)) })
211
+ /* @__PURE__ */ jsx3(Marquee, { className: "relative z-0 py-2 [--gap:1.25rem] sm:[--gap:3rem]", children: marqueeImages.map(
212
+ (src, i) => isLogoUrl(src) ? /* @__PURE__ */ jsx3(
213
+ "img",
214
+ {
215
+ src,
216
+ alt: "",
217
+ className: "h-16 w-16 rounded-xl bg-card p-2 object-contain"
218
+ },
219
+ `${src}-${i}`
220
+ ) : /* @__PURE__ */ jsx3(
221
+ "span",
222
+ {
223
+ className: "flex h-16 items-center whitespace-nowrap rounded-xl bg-card px-4 text-sm font-semibold tracking-tight text-foreground/70",
224
+ children: brandLabel(src)
225
+ },
226
+ `${src}-${i}`
227
+ )
228
+ ) })
193
229
  ] })
194
230
  ] })
195
231
  ] }) });
@@ -1010,106 +1046,96 @@ function mapWorkflows(workflows) {
1010
1046
  import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
1011
1047
  function NamedAgentView({ content, theme, mode, brandName, hostname }) {
1012
1048
  const { hero, problem, features, integration, pricing, faq, cta, contact } = content;
1013
- return /* @__PURE__ */ jsx15(Site, { theme, mode, children: /* @__PURE__ */ jsxs12("div", { className: "relative min-h-screen bg-background text-foreground antialiased", children: [
1014
- /* @__PURE__ */ jsx15(NoiseTexture, { fixed: true }),
1015
- /* @__PURE__ */ jsx15(
1016
- Navbar17,
1017
- {
1018
- logo: { url: "/", src: "", alt: brandName, title: brandName },
1019
- primaryCta: { text: hero.ctaText, url: hero.ctaHref }
1020
- }
1021
- ),
1022
- /* @__PURE__ */ jsx15(
1023
- Hero,
1024
- {
1025
- badgeEmoji: hero.badgeEmoji,
1026
- badgeText: hero.badgeText,
1027
- badgeHref: hero.badgeHref,
1028
- heading: hero.heading,
1029
- description: hero.description,
1030
- ctaText: hero.ctaText,
1031
- ctaHref: hero.ctaHref,
1032
- rightImageSrc: hero.rightImageSrc,
1033
- rightImageAlt: hero.rightImageAlt,
1034
- showIconOverlay: hero.showIconOverlay,
1035
- marqueeTitle: hero.marqueeTitle,
1036
- marqueeImages: hero.marqueeImages
1037
- }
1038
- ),
1039
- /* @__PURE__ */ jsx15(
1040
- Problem,
1041
- {
1042
- heading: problem.heading,
1043
- workflows: mapWorkflows(problem.workflows),
1044
- subheading: problem.subheading,
1045
- subheadingHighlight: problem.subheadingHighlight
1046
- }
1047
- ),
1048
- /* @__PURE__ */ jsx15(
1049
- Features,
1050
- {
1051
- heading: features.heading,
1052
- description: features.description,
1053
- features: features.features
1054
- }
1055
- ),
1056
- integration && /* @__PURE__ */ jsx15(
1057
- Integration,
1058
- {
1059
- title: integration.title,
1060
- description: integration.description,
1061
- buttonText: integration.buttonText,
1062
- buttonHref: integration.buttonHref,
1063
- leftNode: integration.leftNode,
1064
- rightNode: integration.rightNode
1065
- }
1066
- ),
1067
- pricing.variant === "single" ? /* @__PURE__ */ jsx15(
1068
- Pricing,
1069
- {
1070
- heading: pricing.heading,
1071
- subheading: pricing.subheading,
1072
- price: pricing.price,
1073
- priceUnit: pricing.priceUnit,
1074
- trialText: pricing.trialText,
1075
- ctaText: pricing.ctaText,
1076
- ctaHref: pricing.ctaHref,
1077
- featuresHeading: pricing.featuresHeading,
1078
- features: pricing.features,
1079
- securityNote: pricing.securityNote
1080
- }
1081
- ) : /* @__PURE__ */ jsx15(
1082
- PricingTiers,
1083
- {
1084
- heading: pricing.heading,
1085
- subheading: pricing.subheading,
1086
- tiers: pricing.tiers,
1087
- securityNote: pricing.securityNote
1088
- }
1089
- ),
1090
- /* @__PURE__ */ jsx15(FAQ, { heading: faq.heading, faqs: faq.faqs }),
1091
- /* @__PURE__ */ jsx15(CTA, { heading: cta.heading, subheading: cta.subheading, buttons: cta.buttons }),
1092
- contact && /* @__PURE__ */ jsx15(
1093
- Contact,
1094
- {
1095
- heading: contact.heading,
1096
- subheading: contact.subheading,
1097
- fields: contact.fields,
1098
- submitButtonText: contact.submitButtonText
1099
- }
1100
- ),
1101
- /* @__PURE__ */ jsx15(
1102
- FooterSmall,
1103
- {
1104
- logo: brandName,
1105
- domain: hostname,
1106
- showOpenInAI: true,
1107
- openInAIVariant: "dropdown",
1108
- openInAIDefaultPrompt: `Help me decide whether ${brandName} fits my team's workflow`,
1109
- pageTitle: brandName
1110
- }
1111
- )
1112
- ] }) });
1049
+ return /* @__PURE__ */ jsx15(DialectShell, { theme, mode, children: /* @__PURE__ */ jsxs12(
1050
+ NeoChrome,
1051
+ {
1052
+ brandName,
1053
+ hostname,
1054
+ primaryCta: { text: hero.ctaText, url: hero.ctaHref },
1055
+ openInAIPrompt: `Help me decide whether ${brandName} fits my team's workflow`,
1056
+ children: [
1057
+ /* @__PURE__ */ jsx15(
1058
+ Hero,
1059
+ {
1060
+ badgeEmoji: hero.badgeEmoji,
1061
+ badgeText: hero.badgeText,
1062
+ badgeHref: hero.badgeHref,
1063
+ heading: hero.heading,
1064
+ description: hero.description,
1065
+ ctaText: hero.ctaText,
1066
+ ctaHref: hero.ctaHref,
1067
+ rightImageSrc: hero.rightImageSrc,
1068
+ rightImageAlt: hero.rightImageAlt,
1069
+ showIconOverlay: hero.showIconOverlay,
1070
+ marqueeTitle: hero.marqueeTitle,
1071
+ marqueeImages: hero.marqueeImages
1072
+ }
1073
+ ),
1074
+ /* @__PURE__ */ jsx15(
1075
+ Problem,
1076
+ {
1077
+ heading: problem.heading,
1078
+ workflows: mapWorkflows(problem.workflows),
1079
+ subheading: problem.subheading,
1080
+ subheadingHighlight: problem.subheadingHighlight
1081
+ }
1082
+ ),
1083
+ /* @__PURE__ */ jsx15(
1084
+ Features,
1085
+ {
1086
+ heading: features.heading,
1087
+ description: features.description,
1088
+ features: features.features
1089
+ }
1090
+ ),
1091
+ integration && /* @__PURE__ */ jsx15(
1092
+ Integration,
1093
+ {
1094
+ title: integration.title,
1095
+ description: integration.description,
1096
+ buttonText: integration.buttonText,
1097
+ buttonHref: integration.buttonHref,
1098
+ leftNode: integration.leftNode,
1099
+ rightNode: integration.rightNode
1100
+ }
1101
+ ),
1102
+ pricing.variant === "single" ? /* @__PURE__ */ jsx15(
1103
+ Pricing,
1104
+ {
1105
+ heading: pricing.heading,
1106
+ subheading: pricing.subheading,
1107
+ price: pricing.price,
1108
+ priceUnit: pricing.priceUnit,
1109
+ trialText: pricing.trialText,
1110
+ ctaText: pricing.ctaText,
1111
+ ctaHref: pricing.ctaHref,
1112
+ featuresHeading: pricing.featuresHeading,
1113
+ features: pricing.features,
1114
+ securityNote: pricing.securityNote
1115
+ }
1116
+ ) : /* @__PURE__ */ jsx15(
1117
+ PricingTiers,
1118
+ {
1119
+ heading: pricing.heading,
1120
+ subheading: pricing.subheading,
1121
+ tiers: pricing.tiers,
1122
+ securityNote: pricing.securityNote
1123
+ }
1124
+ ),
1125
+ /* @__PURE__ */ jsx15(FAQ, { heading: faq.heading, faqs: faq.faqs }),
1126
+ /* @__PURE__ */ jsx15(CTA, { heading: cta.heading, subheading: cta.subheading, buttons: cta.buttons }),
1127
+ contact && /* @__PURE__ */ jsx15(
1128
+ Contact,
1129
+ {
1130
+ heading: contact.heading,
1131
+ subheading: contact.subheading,
1132
+ fields: contact.fields,
1133
+ submitButtonText: contact.submitButtonText
1134
+ }
1135
+ )
1136
+ ]
1137
+ }
1138
+ ) });
1113
1139
  }
1114
1140
  var view_default = NamedAgentView;
1115
1141
  export {