{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "marketing-05",
  "title": "Contact page",
  "description": "A Driftdesk contact page: contact details beside a form that checks each field, shows a sending state and morphs into a confirmation, grouped questions and a compact footer.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/accordion.json",
    "https://ui.ndekocode.dev/r/animated-size.json",
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/field.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/input.json",
    "https://ui.ndekocode.dev/r/select.json",
    "https://ui.ndekocode.dev/r/selected-mark.json",
    "https://ui.ndekocode.dev/r/sheet.json",
    "https://ui.ndekocode.dev/r/status-orb.json",
    "https://ui.ndekocode.dev/r/textarea.json",
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/use-prefers-reduced-motion.json",
    "https://ui.ndekocode.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/templates/contact/marketing-05/index.tsx",
      "content": "import { Contact } from './contact';\nimport { Faq } from './faq';\nimport { SiteFooter } from './site-footer';\nimport { SiteHeader } from './site-header';\n\nexport default function Marketing05() {\n  return (\n    <div className='flex min-h-screen flex-col'>\n      <SiteHeader />\n      <main className='flex-1'>\n        <Contact />\n        <Faq />\n      </main>\n      <SiteFooter />\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/index.tsx"
    },
    {
      "path": "registry/ndeko/templates/contact/marketing-05/site-header.tsx",
      "content": "import { Button } from '@/registry/ndeko/ui/button';\n\nimport { DriftdeskMark } from './brand-mark';\nimport { CURRENT_LINK_ID, HEADER, NAV_LINKS } from './data';\nimport { MobileSheet } from './mobile-sheet';\nimport { NavLinks } from './nav-links';\n\nexport function SiteHeader() {\n  return (\n    <header className='px-4 pt-4 sm:px-6'>\n      <div className='bg-card hairline-ring ring-border dark:bg-foreground/[0.04] mx-auto flex h-14 max-w-4xl items-center gap-3 rounded-full ps-4 pe-2 shadow-[0_1px_2px_rgb(0_0_0/0.04)]'>\n        <a\n          href='#'\n          className='focus-visible:ring-ring/25 flex items-center gap-2 rounded-full text-sm font-semibold outline-none focus-visible:ring-[3px]'\n        >\n          <DriftdeskMark />\n          Driftdesk\n        </a>\n        <div className='flex flex-1 justify-center'>\n          <NavLinks links={NAV_LINKS} currentId={CURRENT_LINK_ID} />\n        </div>\n        <div className='flex items-center gap-1'>\n          <Button\n            variant='ghost'\n            className='hidden md:inline-flex'\n            nativeButton={false}\n            render={<a href='#' />}\n          >\n            Sign in\n          </Button>\n          <Button\n            variant='outline'\n            nativeButton={false}\n            render={<a href={HEADER.actionHref} />}\n          >\n            {HEADER.action}\n          </Button>\n          <MobileSheet links={NAV_LINKS} currentId={CURRENT_LINK_ID} />\n        </div>\n      </div>\n    </header>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/site-header.tsx"
    },
    {
      "path": "registry/ndeko/templates/contact/marketing-05/nav-links.tsx",
      "content": "'use client';\n\nimport { AnimatePresence, motion, type Transition } from 'motion/react';\nimport { useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\n\nimport { type NavLink } from './data';\n\nconst HIGHLIGHT_TRANSITION: Transition = {\n  type: 'spring',\n  bounce: 0,\n  duration: 0.3,\n};\n\nconst INSTANT_LAYOUT: Transition = {\n  layout: { duration: 0 },\n  opacity: { duration: 0.15 },\n};\n\nfunction highlightTransitionOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return INSTANT_LAYOUT;\n  }\n  return HIGHLIGHT_TRANSITION;\n}\n\nfunction currentAttributeOf(isCurrent: boolean) {\n  if (isCurrent) {\n    return 'page' as const;\n  }\n  return undefined;\n}\n\ntype NavLinksProps = {\n  links: NavLink[];\n  currentId: string | null;\n};\n\nexport function NavLinks({ links, currentId }: NavLinksProps) {\n  const [hoveredId, setHoveredId] = useState<string | null>(null);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const highlightTransition = highlightTransitionOf(shouldReduceMotion);\n\n  function clearHover() {\n    setHoveredId(null);\n  }\n\n  return (\n    <nav aria-label='Main' className='hidden md:block'>\n      <ul className='flex items-center' onPointerLeave={clearHover}>\n        {links.map((link) => {\n          const isHovered = hoveredId === link.id;\n          const isCurrent = currentId === link.id;\n\n          function highlight() {\n            setHoveredId(link.id);\n          }\n\n          return (\n            <li key={link.id}>\n              <a\n                href={link.href}\n                aria-current={currentAttributeOf(isCurrent)}\n                onPointerEnter={highlight}\n                onFocus={highlight}\n                onBlur={clearHover}\n                className='text-muted-foreground hover:text-foreground aria-[current=page]:text-foreground focus-visible:ring-ring/25 relative inline-flex h-8 items-center rounded-full px-3 text-[13px] font-medium transition-colors outline-none focus-visible:ring-[3px]'\n              >\n                <AnimatePresence>\n                  {isHovered && (\n                    <motion.span\n                      layoutId='marketing-05-nav-highlight'\n                      aria-hidden='true'\n                      className='bg-foreground/5 absolute inset-0 rounded-full'\n                      initial={{ opacity: 0 }}\n                      animate={{ opacity: 1 }}\n                      exit={{ opacity: 0 }}\n                      transition={highlightTransition}\n                    />\n                  )}\n                </AnimatePresence>\n                <span className='relative'>{link.label}</span>\n              </a>\n            </li>\n          );\n        })}\n      </ul>\n    </nav>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/nav-links.tsx"
    },
    {
      "path": "registry/ndeko/templates/contact/marketing-05/mobile-sheet.tsx",
      "content": "'use client';\n\nimport { useRef, useState } from 'react';\n\nimport { MenuIcon } from '@/registry/ndeko/lib/icons';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { SelectedMark } from '@/registry/ndeko/ui/selected-mark';\nimport {\n  Sheet,\n  SheetContent,\n  SheetDescription,\n  SheetFooter,\n  SheetHeader,\n  SheetTitle,\n  SheetTrigger,\n} from '@/registry/ndeko/ui/sheet';\n\nimport { DriftdeskMark } from './brand-mark';\nimport { HEADER, type NavLink } from './data';\nimport { scrollToSection, sectionHashOf } from './section-link';\n\nfunction currentAttributeOf(isCurrent: boolean) {\n  if (isCurrent) {\n    return 'page' as const;\n  }\n  return undefined;\n}\n\ntype MobileSheetProps = {\n  links: NavLink[];\n  currentId: string | null;\n};\n\nexport function MobileSheet({ links, currentId }: MobileSheetProps) {\n  const [isOpen, setIsOpen] = useState(false);\n  const [shouldReturnFocus, setShouldReturnFocus] = useState(true);\n  const pendingHashRef = useRef<string | null>(null);\n\n  function changeOpen(open: boolean) {\n    if (open) {\n      setShouldReturnFocus(true);\n    }\n    setIsOpen(open);\n  }\n\n  function followLink(event: React.MouseEvent<HTMLElement>) {\n    const href = event.currentTarget.getAttribute('href');\n    const sectionHash = sectionHashOf(href);\n    setShouldReturnFocus(false);\n    setIsOpen(false);\n    if (sectionHash === null) {\n      return;\n    }\n    event.preventDefault();\n    pendingHashRef.current = sectionHash;\n  }\n\n  function finishOpenChange(open: boolean) {\n    const pendingHash = pendingHashRef.current;\n    pendingHashRef.current = null;\n    if (open) {\n      return;\n    }\n    if (pendingHash === null) {\n      return;\n    }\n    scrollToSection(pendingHash);\n  }\n\n  return (\n    <Sheet\n      open={isOpen}\n      onOpenChange={changeOpen}\n      onOpenChangeComplete={finishOpenChange}\n    >\n      <SheetTrigger\n        render={\n          <Button\n            variant='ghost'\n            size='icon'\n            className='md:hidden'\n            aria-label='Open menu'\n          />\n        }\n      >\n        <MenuIcon />\n      </SheetTrigger>\n      <SheetContent side='right' finalFocus={shouldReturnFocus}>\n        <SheetHeader>\n          <SheetTitle className='flex items-center gap-2'>\n            <DriftdeskMark />\n            Driftdesk\n          </SheetTitle>\n          <SheetDescription>{HEADER.tagline}</SheetDescription>\n        </SheetHeader>\n        <nav aria-label='Main'>\n          <ul className='flex flex-col gap-0.5'>\n            {links.map((link) => {\n              const isCurrent = currentId === link.id;\n\n              return (\n                <li key={link.id}>\n                  <a\n                    href={link.href}\n                    aria-current={currentAttributeOf(isCurrent)}\n                    onClick={followLink}\n                    className='text-foreground hover:bg-foreground/5 aria-[current=page]:bg-foreground/5 focus-visible:ring-ring/25 flex h-11 items-center justify-between rounded-md px-3 text-base font-medium transition-colors outline-none focus-visible:ring-[3px]'\n                  >\n                    {link.label}\n                    {isCurrent && <SelectedMark />}\n                  </a>\n                </li>\n              );\n            })}\n          </ul>\n        </nav>\n        <SheetFooter>\n          <Button\n            variant='outline'\n            size='lg'\n            nativeButton={false}\n            render={<a href='#' />}\n          >\n            Sign in\n          </Button>\n          <Button\n            size='lg'\n            nativeButton={false}\n            render={<a href={HEADER.actionHref} />}\n            onClick={followLink}\n          >\n            {HEADER.action}\n          </Button>\n        </SheetFooter>\n      </SheetContent>\n    </Sheet>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/mobile-sheet.tsx"
    },
    {
      "path": "registry/ndeko/templates/contact/marketing-05/section-link.ts",
      "content": "const SECTION_HASH_PATTERN = /^#.+/;\n\nexport function sectionHashOf(href: string | null) {\n  if (href === null) {\n    return null;\n  }\n  const isSectionHash = SECTION_HASH_PATTERN.test(href);\n  if (!isSectionHash) {\n    return null;\n  }\n  return href;\n}\n\nexport function scrollToSection(hash: string) {\n  const id = hash.slice(1);\n  const target = document.getElementById(id);\n  target?.scrollIntoView();\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/section-link.ts"
    },
    {
      "path": "registry/ndeko/templates/contact/marketing-05/brand-mark.tsx",
      "content": "import { cn } from '@/registry/ndeko/lib/utils';\n\nexport function DriftdeskMark({ className }: { className?: string }) {\n  return (\n    <svg\n      viewBox='0 0 24 24'\n      aria-hidden='true'\n      className={cn('size-6 shrink-0', className)}\n    >\n      <rect width='24' height='24' rx='7' className='fill-primary' />\n      <path\n        d='M8 6.5h8A1.5 1.5 0 0 1 17.5 8v8a1.5 1.5 0 0 1-1.5 1.5H8A1.5 1.5 0 0 1 6.5 16V8A1.5 1.5 0 0 1 8 6.5Z'\n        className='fill-white/25'\n      />\n      <path\n        d='M6.5 13h3.25l.9 1.5h2.7l.9-1.5h3.25v3a1.5 1.5 0 0 1-1.5 1.5H8A1.5 1.5 0 0 1 6.5 16Z'\n        className='fill-white'\n      />\n      <path\n        d='M9.5 9.5h5'\n        fill='none'\n        strokeWidth='1.5'\n        strokeLinecap='round'\n        className='stroke-white'\n      />\n    </svg>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/brand-mark.tsx"
    },
    {
      "path": "registry/ndeko/templates/contact/marketing-05/contact.tsx",
      "content": "import { ContactForm } from './contact-form';\nimport { CONTACT, CONTACT_ANCHOR, CONTACT_DETAILS } from './data';\n\nexport function Contact() {\n  return (\n    <section\n      id={CONTACT_ANCHOR}\n      className='px-4 py-16 sm:px-6 sm:py-24 lg:px-8'\n    >\n      <div className='mx-auto grid max-w-6xl gap-10 lg:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] lg:gap-16'>\n        <div className='flex flex-col gap-8'>\n          <div className='flex flex-col gap-3'>\n            <h1 className='text-2xl font-semibold text-balance sm:text-3xl'>\n              {CONTACT.title}\n            </h1>\n            <p className='text-muted-foreground max-w-md text-base text-pretty'>\n              {CONTACT.description}\n            </p>\n          </div>\n          <dl className='flex flex-col gap-4'>\n            {CONTACT_DETAILS.map((detail) => (\n              <div key={detail.label} className='flex items-center gap-3'>\n                <span className='keycap-3d text-muted-foreground flex size-8 shrink-0 items-center justify-center rounded-lg'>\n                  <detail.icon />\n                </span>\n                <div className='flex min-w-0 flex-col'>\n                  <dt className='text-muted-foreground text-xs'>\n                    {detail.label}\n                  </dt>\n                  <dd className='text-[13px] font-medium'>\n                    {detail.href && (\n                      <a\n                        href={detail.href}\n                        className='text-primary-ink focus-visible:ring-ring/25 rounded-sm underline-offset-4 outline-none hover:underline focus-visible:ring-[3px]'\n                      >\n                        {detail.value}\n                      </a>\n                    )}\n                    {!detail.href && detail.value}\n                  </dd>\n                </div>\n              </div>\n            ))}\n          </dl>\n        </div>\n        <ContactForm />\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/contact.tsx"
    },
    {
      "path": "registry/ndeko/templates/contact/marketing-05/contact-form.tsx",
      "content": "'use client';\n\nimport {\n  AnimatePresence,\n  motion,\n  type Transition,\n  type Variants,\n} from 'motion/react';\nimport { useEffect, useId, useRef, useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { LoaderCircleIcon, SendIcon } from '@/registry/ndeko/lib/icons';\nimport { AnimatedSize } from '@/registry/ndeko/ui/animated-size';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport {\n  Field,\n  FieldDescription,\n  FieldError,\n  FieldLabel,\n} from '@/registry/ndeko/ui/field';\nimport { Input } from '@/registry/ndeko/ui/input';\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from '@/registry/ndeko/ui/select';\nimport { StatusOrb } from '@/registry/ndeko/ui/status-orb';\nimport { Textarea } from '@/registry/ndeko/ui/textarea';\n\nimport { TEAM_SIZES } from './data';\nimport {\n  type ContactErrors,\n  type ContactField,\n  EMPTY_VALUES,\n  errorsOf,\n  firstInvalidFieldOf,\n  firstNameOf,\n  isContactField,\n  MESSAGE_MAX_LENGTH,\n} from './validation';\n\ntype Status = 'editing' | 'sending' | 'sent';\n\nconst SEND_DELAY_MS = 1200;\n\nconst MESSAGE_COUNT_FORMAT = new Intl.NumberFormat('en');\n\nconst PANEL_TRANSITION: Transition = {\n  duration: 0.2,\n  ease: [0.23, 1, 0.32, 1],\n};\n\nconst LABEL_TRANSITION: Transition = {\n  type: 'spring',\n  bounce: 0,\n  duration: 0.3,\n};\n\nconst INSTANT: Transition = { duration: 0 };\n\nconst PANEL_VARIANTS: Variants = {\n  enter: { opacity: 0, scale: 0.98, filter: 'blur(2px)' },\n  visible: { opacity: 1, scale: 1, filter: 'blur(0px)' },\n  exit: { opacity: 0, scale: 0.98, filter: 'blur(2px)' },\n};\n\nconst ICON_VARIANTS: Variants = {\n  enter: { opacity: 0, scale: 0.6, filter: 'blur(2px)' },\n  visible: { opacity: 1, scale: 1, filter: 'blur(0px)' },\n  exit: { opacity: 0, scale: 0.6, filter: 'blur(2px)' },\n};\n\nconst FADE_VARIANTS: Variants = {\n  enter: { opacity: 0 },\n  visible: { opacity: 1 },\n  exit: { opacity: 0 },\n};\n\nfunction panelVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return PANEL_VARIANTS;\n}\n\nfunction iconVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return ICON_VARIANTS;\n}\n\nfunction labelTransitionOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return INSTANT;\n  }\n  return LABEL_TRANSITION;\n}\n\nfunction sendLabelOf(isSending: boolean) {\n  if (isSending) {\n    return 'Sending';\n  }\n  return 'Send message';\n}\n\nfunction sendGlyphOf(isSending: boolean) {\n  if (isSending) {\n    return {\n      key: 'sending',\n      icon: <LoaderCircleIcon className='animate-spin' />,\n    };\n  }\n  return { key: 'send', icon: <SendIcon /> };\n}\n\nfunction selectedValueOf(value: string) {\n  if (value.length === 0) {\n    return null;\n  }\n  return value;\n}\n\nfunction describedByOf(hintId: string, errorId: string, hasError: boolean) {\n  if (hasError) {\n    return `${errorId} ${hintId}`;\n  }\n  return hintId;\n}\n\nfunction messageCountOf(message: string) {\n  const length = MESSAGE_COUNT_FORMAT.format(message.length);\n  const limit = MESSAGE_COUNT_FORMAT.format(MESSAGE_MAX_LENGTH);\n  return `${length} of ${limit} characters`;\n}\n\nexport function ContactForm() {\n  const [values, setValues] = useState(EMPTY_VALUES);\n  const [errors, setErrors] = useState<ContactErrors>({});\n  const [hasTriedSubmit, setHasTriedSubmit] = useState(false);\n  const [status, setStatus] = useState<Status>('editing');\n  const nameRef = useRef<HTMLInputElement>(null);\n  const emailRef = useRef<HTMLInputElement>(null);\n  const teamSizeRef = useRef<HTMLButtonElement>(null);\n  const messageRef = useRef<HTMLTextAreaElement>(null);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const panelVariants = panelVariantsOf(shouldReduceMotion);\n  const iconVariants = iconVariantsOf(shouldReduceMotion);\n  const labelTransition = labelTransitionOf(shouldReduceMotion);\n  const isSending = status === 'sending';\n  const isSent = status === 'sent';\n  const sendLabel = sendLabelOf(isSending);\n  const sendGlyph = sendGlyphOf(isSending);\n  const selectedTeamSize = selectedValueOf(values.teamSize);\n  const messageCount = messageCountOf(values.message);\n  const firstName = firstNameOf(values.name);\n  const replyEmail = values.email.trim();\n  const messageId = useId();\n  const messageHintId = `${messageId}-hint`;\n  const messageErrorId = `${messageId}-error`;\n  const hasMessageError = Boolean(errors.message);\n  const messageDescribedBy = describedByOf(\n    messageHintId,\n    messageErrorId,\n    hasMessageError\n  );\n\n  useEffect(() => {\n    if (!isSending) {\n      return;\n    }\n    const timeout = window.setTimeout(() => {\n      setStatus('sent');\n    }, SEND_DELAY_MS);\n    return () => window.clearTimeout(timeout);\n  }, [isSending]);\n\n  function focusField(field: ContactField) {\n    if (field === 'name') {\n      nameRef.current?.focus();\n    }\n    if (field === 'email') {\n      emailRef.current?.focus();\n    }\n    if (field === 'teamSize') {\n      teamSizeRef.current?.focus();\n    }\n    if (field === 'message') {\n      messageRef.current?.focus();\n    }\n  }\n\n  function updateValue(field: ContactField, value: string) {\n    const nextValues = { ...values, [field]: value };\n    setValues(nextValues);\n    if (hasTriedSubmit) {\n      const nextErrors = errorsOf(nextValues);\n      setErrors(nextErrors);\n    }\n  }\n\n  function changeText(\n    event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n  ) {\n    const { name, value } = event.target;\n    if (isContactField(name)) {\n      updateValue(name, value);\n    }\n  }\n\n  function changeTeamSize(value: string | null) {\n    const nextValue = value ?? '';\n    updateValue('teamSize', nextValue);\n  }\n\n  function submit(event: React.FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    const nextErrors = errorsOf(values);\n    const firstInvalidField = firstInvalidFieldOf(nextErrors);\n    setHasTriedSubmit(true);\n    setErrors(nextErrors);\n    if (firstInvalidField) {\n      focusField(firstInvalidField);\n      return;\n    }\n    setStatus('sending');\n  }\n\n  function startOver() {\n    setValues(EMPTY_VALUES);\n    setErrors({});\n    setHasTriedSubmit(false);\n    setStatus('editing');\n  }\n\n  return (\n    <div className='bg-card hairline-ring ring-border dark:bg-foreground/[0.03] rounded-xl p-5 shadow-[0_1px_2px_rgb(0_0_0/0.04)] sm:p-7'>\n      <AnimatedSize contentClassName='relative'>\n        <AnimatePresence mode='popLayout' initial={false}>\n          {isSent && (\n            <motion.div\n              key='sent'\n              role='status'\n              variants={panelVariants}\n              initial='enter'\n              animate='visible'\n              exit='exit'\n              transition={PANEL_TRANSITION}\n              className='flex flex-col items-start gap-4 py-6 sm:py-10'\n            >\n              <StatusOrb tone='success' />\n              <div className='flex flex-col gap-1.5'>\n                <p className='text-lg font-semibold'>Message sent</p>\n                <p className='text-muted-foreground max-w-md text-[13px] text-pretty'>\n                  Thanks, {firstName}. Someone from the team replies to{' '}\n                  <span className='text-foreground font-medium break-all'>\n                    {replyEmail}\n                  </span>{' '}\n                  within one working day.\n                </p>\n              </div>\n              <Button variant='outline' onClick={startOver}>\n                Send another message\n              </Button>\n            </motion.div>\n          )}\n          {!isSent && (\n            <motion.form\n              key='form'\n              noValidate\n              onSubmit={submit}\n              variants={panelVariants}\n              initial='enter'\n              animate='visible'\n              exit='exit'\n              transition={PANEL_TRANSITION}\n              className='flex flex-col gap-5'\n            >\n              <div className='grid gap-5 sm:grid-cols-2'>\n                <Field invalid={Boolean(errors.name)}>\n                  <FieldLabel>Name</FieldLabel>\n                  <Input\n                    ref={nameRef}\n                    name='name'\n                    autoComplete='name'\n                    placeholder='Amara Okafor'\n                    value={values.name}\n                    onChange={changeText}\n                    readOnly={isSending}\n                  />\n                  {errors.name && <FieldError match>{errors.name}</FieldError>}\n                </Field>\n                <Field invalid={Boolean(errors.email)}>\n                  <FieldLabel>Work email</FieldLabel>\n                  <Input\n                    ref={emailRef}\n                    type='email'\n                    name='email'\n                    autoComplete='email'\n                    placeholder='amara@company.com'\n                    value={values.email}\n                    onChange={changeText}\n                    readOnly={isSending}\n                  />\n                  {errors.email && (\n                    <FieldError match>{errors.email}</FieldError>\n                  )}\n                </Field>\n                <Field>\n                  <FieldLabel>\n                    Company\n                    <span className='text-muted-foreground font-normal'>\n                      Optional\n                    </span>\n                  </FieldLabel>\n                  <Input\n                    name='company'\n                    autoComplete='organization'\n                    placeholder='Okafor Bakery'\n                    value={values.company}\n                    onChange={changeText}\n                    readOnly={isSending}\n                  />\n                </Field>\n                <Field invalid={Boolean(errors.teamSize)}>\n                  <FieldLabel>Team size</FieldLabel>\n                  <Select\n                    items={TEAM_SIZES}\n                    value={selectedTeamSize}\n                    onValueChange={changeTeamSize}\n                    readOnly={isSending}\n                    name='teamSize'\n                  >\n                    <SelectTrigger ref={teamSizeRef}>\n                      <SelectValue placeholder='Pick a size' />\n                    </SelectTrigger>\n                    <SelectContent>\n                      {TEAM_SIZES.map((size) => (\n                        <SelectItem key={size.value} value={size.value}>\n                          {size.label}\n                        </SelectItem>\n                      ))}\n                    </SelectContent>\n                  </Select>\n                  {errors.teamSize && (\n                    <FieldError match>{errors.teamSize}</FieldError>\n                  )}\n                </Field>\n              </div>\n              <Field invalid={hasMessageError}>\n                <FieldLabel htmlFor={messageId}>How can we help?</FieldLabel>\n                <Textarea\n                  ref={messageRef}\n                  id={messageId}\n                  name='message'\n                  rows={4}\n                  maxLength={MESSAGE_MAX_LENGTH}\n                  placeholder='We answer about 200 emails a week with four people and want to stop replying twice to the same customer.'\n                  value={values.message}\n                  onChange={changeText}\n                  readOnly={isSending}\n                  aria-invalid={hasMessageError}\n                  aria-describedby={messageDescribedBy}\n                  className='min-h-28'\n                />\n                {hasMessageError && (\n                  <FieldError id={messageErrorId} match>\n                    {errors.message}\n                  </FieldError>\n                )}\n                <FieldDescription id={messageHintId} className='tabular-nums'>\n                  {messageCount}\n                </FieldDescription>\n              </Field>\n              <div className='flex flex-col-reverse gap-3 sm:flex-row sm:items-center sm:justify-between'>\n                <p className='text-muted-foreground text-xs'>\n                  We only use these details to answer you\n                </p>\n                <Button\n                  type='submit'\n                  size='lg'\n                  disabled={isSending}\n                  focusableWhenDisabled\n                  className='data-disabled:opacity-100'\n                >\n                  <AnimatePresence mode='popLayout' initial={false}>\n                    <motion.span\n                      key={sendGlyph.key}\n                      className='flex'\n                      variants={iconVariants}\n                      initial='enter'\n                      animate='visible'\n                      exit='exit'\n                      transition={PANEL_TRANSITION}\n                    >\n                      {sendGlyph.icon}\n                    </motion.span>\n                  </AnimatePresence>\n                  <motion.span layout transition={labelTransition}>\n                    {sendLabel}\n                  </motion.span>\n                </Button>\n              </div>\n            </motion.form>\n          )}\n        </AnimatePresence>\n      </AnimatedSize>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/contact-form.tsx"
    },
    {
      "path": "registry/ndeko/templates/contact/marketing-05/validation.ts",
      "content": "export type ContactValues = {\n  name: string;\n  email: string;\n  company: string;\n  teamSize: string;\n  message: string;\n};\n\nexport type ContactField = keyof ContactValues;\n\nexport type ContactErrors = Partial<Record<ContactField, string>>;\n\nexport const MESSAGE_MIN_LENGTH = 20;\n\nexport const MESSAGE_MAX_LENGTH = 1000;\n\nexport const EMPTY_VALUES: ContactValues = {\n  name: '',\n  email: '',\n  company: '',\n  teamSize: '',\n  message: '',\n};\n\nconst FIELD_ORDER: ContactField[] = [\n  'name',\n  'email',\n  'company',\n  'teamSize',\n  'message',\n];\n\nconst EMAIL_PATTERN = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n\nexport function isContactField(value: string): value is ContactField {\n  return FIELD_ORDER.some((field) => field === value);\n}\n\nfunction isBlank(value: string) {\n  const trimmed = value.trim();\n  return trimmed.length === 0;\n}\n\nfunction nameErrorOf(value: string) {\n  if (isBlank(value)) {\n    return 'Enter your name so we know who to answer';\n  }\n  return null;\n}\n\nfunction emailErrorOf(value: string) {\n  if (isBlank(value)) {\n    return 'Enter your work email';\n  }\n  const trimmed = value.trim();\n  const isEmailShaped = EMAIL_PATTERN.test(trimmed);\n  if (!isEmailShaped) {\n    return 'Check the address, it should look like name@company.com';\n  }\n  return null;\n}\n\nfunction teamSizeErrorOf(value: string) {\n  if (isBlank(value)) {\n    return 'Pick the size of your team';\n  }\n  return null;\n}\n\nfunction messageErrorOf(value: string) {\n  const trimmed = value.trim();\n  const isTooShort = trimmed.length < MESSAGE_MIN_LENGTH;\n  if (isTooShort) {\n    return `Tell us a little more, at least ${MESSAGE_MIN_LENGTH} characters`;\n  }\n  const isTooLong = trimmed.length > MESSAGE_MAX_LENGTH;\n  if (isTooLong) {\n    return 'Keep the message under 1,000 characters';\n  }\n  return null;\n}\n\nfunction addError(\n  errors: ContactErrors,\n  field: ContactField,\n  error: string | null\n) {\n  if (error) {\n    errors[field] = error;\n  }\n}\n\nexport function errorsOf(values: ContactValues) {\n  const errors: ContactErrors = {};\n  const nameError = nameErrorOf(values.name);\n  const emailError = emailErrorOf(values.email);\n  const teamSizeError = teamSizeErrorOf(values.teamSize);\n  const messageError = messageErrorOf(values.message);\n  addError(errors, 'name', nameError);\n  addError(errors, 'email', emailError);\n  addError(errors, 'teamSize', teamSizeError);\n  addError(errors, 'message', messageError);\n  return errors;\n}\n\nexport function firstInvalidFieldOf(errors: ContactErrors) {\n  const invalidFields = FIELD_ORDER.filter((field) => errors[field]);\n  if (invalidFields.length === 0) {\n    return null;\n  }\n  return invalidFields[0];\n}\n\nexport function firstNameOf(name: string) {\n  const trimmed = name.trim();\n  const words = trimmed.split(' ');\n  return words[0];\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/validation.ts"
    },
    {
      "path": "registry/ndeko/templates/contact/marketing-05/faq.tsx",
      "content": "import {\n  Accordion,\n  AccordionContent,\n  AccordionItem,\n  AccordionTrigger,\n} from '@/registry/ndeko/ui/accordion';\nimport { Button } from '@/registry/ndeko/ui/button';\n\nimport { FAQ, QUESTION_GROUPS } from './data';\n\nconst FIRST_QUESTION_ID = QUESTION_GROUPS[0].questions[0].id;\n\nexport function Faq() {\n  return (\n    <section className='px-4 py-16 sm:px-6 sm:py-24 lg:px-8'>\n      <div className='mx-auto grid max-w-6xl gap-10 lg:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] lg:gap-16'>\n        <div className='flex flex-col items-start gap-6 lg:sticky lg:top-12 lg:self-start'>\n          <div className='flex flex-col gap-3'>\n            <h2 className='text-2xl font-semibold text-balance sm:text-3xl'>\n              {FAQ.title}\n            </h2>\n            <p className='text-muted-foreground max-w-sm text-base text-pretty'>\n              {FAQ.description}\n            </p>\n          </div>\n          <nav aria-label='Question topics' className='hidden lg:block'>\n            <ul className='flex flex-col gap-0.5'>\n              {QUESTION_GROUPS.map((group) => (\n                <li key={group.id}>\n                  <a\n                    href={`#${group.id}`}\n                    className='text-muted-foreground hover:text-foreground hover:bg-foreground/5 focus-visible:ring-ring/25 -mx-2 flex h-8 items-center rounded-md px-2 text-[13px] transition-colors outline-none focus-visible:ring-[3px]'\n                  >\n                    {group.title}\n                  </a>\n                </li>\n              ))}\n            </ul>\n          </nav>\n          <Button\n            variant='outline'\n            nativeButton={false}\n            render={<a href={FAQ.contactHref} />}\n          >\n            {FAQ.contactLabel}\n          </Button>\n        </div>\n        <div className='flex flex-col gap-10'>\n          {QUESTION_GROUPS.map((group) => (\n            <section\n              key={group.id}\n              id={group.id}\n              aria-labelledby={`${group.id}-title`}\n              className='flex scroll-mt-8 flex-col gap-1'\n            >\n              <h3\n                id={`${group.id}-title`}\n                className='text-primary-ink text-xs font-medium'\n              >\n                {group.title}\n              </h3>\n              <Accordion defaultValue={[FIRST_QUESTION_ID]}>\n                {group.questions.map((item) => (\n                  <AccordionItem key={item.id} value={item.id}>\n                    <AccordionTrigger className='text-sm'>\n                      {item.question}\n                    </AccordionTrigger>\n                    <AccordionContent className='text-sm leading-relaxed text-pretty'>\n                      {item.answer}\n                    </AccordionContent>\n                  </AccordionItem>\n                ))}\n              </Accordion>\n            </section>\n          ))}\n        </div>\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/faq.tsx"
    },
    {
      "path": "registry/ndeko/templates/contact/marketing-05/site-footer.tsx",
      "content": "import { Button } from '@/registry/ndeko/ui/button';\n\nimport { DriftdeskMark } from './brand-mark';\nimport { BRAND, FOOTER_LINKS, SOCIAL_LINKS } from './data';\n\nfunction currentAttributeOf(isCurrent: boolean | undefined) {\n  if (isCurrent) {\n    return 'page' as const;\n  }\n  return undefined;\n}\n\nexport function SiteFooter() {\n  return (\n    <footer className='px-4 py-8 sm:px-6 lg:px-8'>\n      <div className='mx-auto flex max-w-6xl flex-col items-center gap-6 md:flex-row md:justify-between md:gap-8'>\n        <div className='flex items-center gap-3'>\n          <a\n            href='#'\n            className='focus-visible:ring-ring/25 flex items-center gap-2 rounded-md text-sm font-semibold outline-none focus-visible:ring-[3px]'\n          >\n            <DriftdeskMark />\n            {BRAND.name}\n          </a>\n          <p className='text-muted-foreground text-xs'>{BRAND.copyright}</p>\n        </div>\n        <nav aria-label='Footer'>\n          <ul className='flex flex-wrap justify-center gap-x-5 gap-y-2'>\n            {FOOTER_LINKS.map((link) => (\n              <li key={link.label}>\n                <a\n                  href={link.href}\n                  aria-current={currentAttributeOf(link.isCurrent)}\n                  className='text-muted-foreground hover:text-foreground aria-[current=page]:text-foreground focus-visible:ring-ring/25 rounded-sm text-[13px] transition-colors outline-none focus-visible:ring-[3px] aria-[current=page]:font-medium'\n                >\n                  {link.label}\n                </a>\n              </li>\n            ))}\n          </ul>\n        </nav>\n        <ul className='flex items-center gap-1'>\n          {SOCIAL_LINKS.map((link) => (\n            <li key={link.label}>\n              <Button\n                variant='ghost'\n                size='icon'\n                className='text-muted-foreground'\n                aria-label={link.label}\n                nativeButton={false}\n                render={<a href={link.href} />}\n              >\n                <link.icon />\n              </Button>\n            </li>\n          ))}\n        </ul>\n      </div>\n    </footer>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/site-footer.tsx"
    },
    {
      "path": "registry/ndeko/templates/contact/marketing-05/data.ts",
      "content": "import {\n  ClockIcon,\n  GlobeIcon,\n  type Icon,\n  LinkedinBrandIcon,\n  MailIcon,\n  TwitterXIcon,\n} from '@/registry/ndeko/lib/icons';\n\nexport const CONTACT_ANCHOR = 'contact';\n\nexport type NavLink = {\n  id: string;\n  label: string;\n  href: string;\n};\n\nexport const NAV_LINKS: NavLink[] = [\n  { id: 'features', label: 'Features', href: '#' },\n  { id: 'pricing', label: 'Pricing', href: '#' },\n  { id: 'docs', label: 'Docs', href: '#' },\n  { id: 'contact', label: 'Contact', href: `#${CONTACT_ANCHOR}` },\n];\n\nexport const CURRENT_LINK_ID: string | null = 'contact';\n\nexport const HEADER = {\n  tagline: 'A shared inbox that stays calm on a busy Monday',\n  action: 'Ask for a trial',\n  actionHref: `#${CONTACT_ANCHOR}`,\n};\n\nexport type ContactDetail = {\n  icon: Icon;\n  label: string;\n  value: string;\n  href?: string;\n};\n\nexport const CONTACT = {\n  title: 'Talk to the people who build Driftdesk',\n  description:\n    'Tell us how your team answers customers today. We reply with a setup that fits, and a trial workspace if you want one.',\n};\n\nexport const CONTACT_DETAILS: ContactDetail[] = [\n  {\n    icon: MailIcon,\n    label: 'Email',\n    value: 'sales@driftdesk.example',\n    href: 'mailto:sales@driftdesk.example',\n  },\n  {\n    icon: ClockIcon,\n    label: 'Reply time',\n    value: 'Within one working day, Monday to Friday',\n  },\n  {\n    icon: GlobeIcon,\n    label: 'Team',\n    value: 'Kinshasa, Lisbon and Nairobi',\n  },\n];\n\nexport const TEAM_SIZES = [\n  { value: '1-10', label: '1 to 10 people' },\n  { value: '11-50', label: '11 to 50 people' },\n  { value: '51-200', label: '51 to 200 people' },\n  { value: '201+', label: 'More than 200 people' },\n];\n\nexport type Question = {\n  id: string;\n  question: string;\n  answer: string;\n};\n\nexport type QuestionGroup = {\n  id: string;\n  title: string;\n  questions: Question[];\n};\n\nexport const FAQ = {\n  title: 'Questions teams ask before switching',\n  description:\n    'Short answers about moving to Driftdesk. If yours is missing, the support team answers it by email.',\n  contactLabel: 'Write to support',\n  contactHref: 'mailto:support@driftdesk.example',\n};\n\nexport const QUESTION_GROUPS: QuestionGroup[] = [\n  {\n    id: 'marketing-05-getting-started',\n    title: 'Getting started',\n    questions: [\n      {\n        id: 'import',\n        question: 'Can we bring our old conversations with us?',\n        answer:\n          'Yes. Connect your current inbox and Driftdesk imports the last twelve months of conversations, with their tags and their authors.',\n      },\n      {\n        id: 'setup',\n        question: 'How long does the setup take?',\n        answer:\n          'Forwarding your support address and inviting the team is enough to start. Routing rules and saved replies can come later.',\n      },\n      {\n        id: 'channels',\n        question: 'Which channels can we answer from Driftdesk?',\n        answer:\n          'Email, the chat widget on your site and contact forms. Each conversation keeps its channel, so replies leave the way the message came in.',\n      },\n    ],\n  },\n  {\n    id: 'marketing-05-billing',\n    title: 'Billing',\n    questions: [\n      {\n        id: 'seats',\n        question: 'Do we pay for people who only read?',\n        answer:\n          'No. A seat is someone who replies to customers. Teammates who read conversations and leave private notes are free.',\n      },\n      {\n        id: 'cancel',\n        question: 'What happens to our data if we cancel?',\n        answer:\n          'You can export every conversation as CSV or JSON for thirty days after cancelling. After that the workspace is deleted.',\n      },\n    ],\n  },\n  {\n    id: 'marketing-05-security',\n    title: 'Data and security',\n    questions: [\n      {\n        id: 'storage',\n        question: 'Where are conversations stored?',\n        answer:\n          'In the region you pick when you create the workspace. Attachments stay in the same region as the messages they belong to.',\n      },\n      {\n        id: 'access',\n        question: 'Can we limit who sees which inbox?',\n        answer:\n          'Yes. Each inbox has its own members, and an admin can hide an inbox from everyone who is not on it.',\n      },\n    ],\n  },\n];\n\nexport type FooterLink = {\n  label: string;\n  href: string;\n  isCurrent?: boolean;\n};\n\nexport type SocialLink = {\n  label: string;\n  href: string;\n  icon: Icon;\n};\n\nexport const BRAND = {\n  name: 'Driftdesk',\n  copyright: '© 2026 Driftdesk',\n};\n\nexport const FOOTER_LINKS: FooterLink[] = [\n  { label: 'Features', href: '#' },\n  { label: 'Pricing', href: '#' },\n  { label: 'Docs', href: '#' },\n  { label: 'Privacy', href: '#' },\n  { label: 'Terms', href: '#' },\n  { label: 'Contact', href: `#${CONTACT_ANCHOR}`, isCurrent: true },\n];\n\nexport const SOCIAL_LINKS: SocialLink[] = [\n  { label: 'Driftdesk on LinkedIn', href: '#', icon: LinkedinBrandIcon },\n  { label: 'Driftdesk on X', href: '#', icon: TwitterXIcon },\n];\n",
      "type": "registry:component",
      "target": "components/templates/marketing-05/data.ts"
    }
  ],
  "categories": [
    "templates",
    "contact"
  ],
  "type": "registry:block"
}