{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "settings-01",
  "title": "Profile form",
  "description": "A profile in three sections with a travelling highlight, a photo picked in the browser, errors that fold in and out, and an unsaved-changes bar whose Save becomes Saving then Saved.",
  "dependencies": [
    "@base-ui/react",
    "motion"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/animated-size.json",
    "https://ui.ndekocode.dev/r/avatar.json",
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/input.json",
    "https://ui.ndekocode.dev/r/motion-word-roll.json",
    "https://ui.ndekocode.dev/r/select.json",
    "https://ui.ndekocode.dev/r/switch.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"
  ],
  "files": [
    {
      "path": "registry/ndeko/blocks/settings/settings-01/index.tsx",
      "content": "'use client';\n\nimport {\n  AnimatePresence,\n  motion,\n  type Transition,\n  type Variants,\n} from 'motion/react';\nimport { useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { GlobeIcon, MailIcon, UserIcon } from '@/registry/ndeko/lib/icons';\n\nimport {\n  BIO_MAX_LENGTH,\n  INITIAL_PROFILE,\n  LANGUAGES,\n  PROFILE_HOST,\n  SECTION_KEYS,\n  TIME_FORMATS,\n  TIME_FORMAT_SAMPLE,\n  TIME_ZONES,\n  WEEK_STARTS,\n  type ProfileField,\n  type ProfileValues,\n  type SectionId,\n} from './data';\nimport { BioRow, PhotoRow } from './profile-fields';\nimport {\n  ChoiceRow,\n  SectionPanel,\n  SectionTabs,\n  SelectRow,\n  SettingsPage,\n  SettingsSection,\n  SwitchRow,\n  TextRow,\n  UnsavedBar,\n  hasChangeIn,\n  useSettingsDraft,\n  type NavItem,\n} from './settings-kit';\nimport {\n  FIELD_SECTION,\n  errorCountOf,\n  errorsOf,\n  firstErrorFieldOf,\n  withoutError,\n  type ProfileErrors,\n} from './validation';\n\nconst SECTIONS = [\n  { id: 'profile', label: 'Profile', icon: UserIcon },\n  { id: 'contact', label: 'Contact', icon: MailIcon },\n  { id: 'region', label: 'Language and region', icon: GlobeIcon },\n] as const;\n\nconst SAMPLE_TRANSITION: Transition = { duration: 0.15, ease: [0.2, 0, 0, 1] };\n\nconst SAMPLE_VARIANTS: Variants = {\n  enter: { opacity: 0, y: 4 },\n  visible: { opacity: 1, y: 0 },\n  exit: { opacity: 0, y: -4 },\n};\n\nconst FADE_VARIANTS: Variants = {\n  enter: { opacity: 0 },\n  visible: { opacity: 1 },\n  exit: { opacity: 0 },\n};\n\nfunction sampleVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return SAMPLE_VARIANTS;\n}\n\nfunction fieldIdOf(field: ProfileField) {\n  return `profile-${field}`;\n}\n\nfunction fixMessageOf(count: number) {\n  if (count === 0) {\n    return undefined;\n  }\n  if (count === 1) {\n    return 'Fix 1 field to save';\n  }\n  return `Fix ${count} fields to save`;\n}\n\nfunction pageAddressOf(username: string) {\n  const handle = username.trim();\n  if (handle.length === 0) {\n    return `${PROFILE_HOST}your-name`;\n  }\n  return `${PROFILE_HOST}${handle}`;\n}\n\nfunction emailLineOf(isChanged: boolean) {\n  if (isChanged) {\n    return 'A confirmation link goes to the new address before it replaces the old one';\n  }\n  return 'Verified, used to sign in and for notifications';\n}\n\nfunction focusField(field: ProfileField) {\n  const fieldId = fieldIdOf(field);\n  window.requestAnimationFrame(() => {\n    document.getElementById(fieldId)?.focus();\n  });\n}\n\n/** The sample line under the time format swaps with the format it describes. */\nfunction TimeSample({ format }: { format: ProfileValues['timeFormat'] }) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const variants = sampleVariantsOf(shouldReduceMotion);\n\n  return (\n    <span className='relative block'>\n      <AnimatePresence mode='popLayout' initial={false}>\n        <motion.span\n          key={format}\n          variants={variants}\n          initial='enter'\n          animate='visible'\n          exit='exit'\n          transition={SAMPLE_TRANSITION}\n          className='block'\n        >\n          {TIME_FORMAT_SAMPLE[format]}\n        </motion.span>\n      </AnimatePresence>\n    </span>\n  );\n}\n\nexport default function Settings01() {\n  const settings = useSettingsDraft<ProfileValues>(INITIAL_PROFILE);\n  const [section, setSection] = useState<SectionId>('profile');\n  const [hasSwitched, setHasSwitched] = useState(false);\n  const [shownErrors, setShownErrors] = useState<ProfileErrors>({});\n  const [photoError, setPhotoError] = useState<string | null>(null);\n  const draft = settings.draft;\n  const errorCount = errorCountOf(shownErrors);\n  const fixMessage = fixMessageOf(errorCount);\n  const pageAddress = pageAddressOf(draft.username);\n  const isEmailChanged = settings.changedKeys.includes('email');\n  const emailLine = emailLineOf(isEmailChanged);\n  const navItems: NavItem<SectionId>[] = SECTIONS.map((item) => ({\n    id: item.id,\n    label: item.label,\n    icon: item.icon,\n    hasChanges: hasChangeIn(settings.changedKeys, SECTION_KEYS[item.id]),\n  }));\n\n  function openSection(nextSection: SectionId) {\n    setSection(nextSection);\n    setHasSwitched(true);\n  }\n\n  function changeField<Field extends ProfileField>(\n    field: Field,\n    value: ProfileValues[Field]\n  ) {\n    settings.change(field, value);\n    setShownErrors((previous) => withoutError(previous, field));\n  }\n\n  function save() {\n    const errors = errorsOf(draft);\n    const firstField = firstErrorFieldOf(errors);\n    setShownErrors(errors);\n    if (!firstField) {\n      settings.save();\n      return;\n    }\n    const fieldSection = FIELD_SECTION[firstField];\n    if (fieldSection !== section) {\n      openSection(fieldSection);\n    }\n    focusField(firstField);\n  }\n\n  function discard() {\n    settings.discard();\n    setShownErrors({});\n    setPhotoError(null);\n  }\n\n  function changePhoto(photo: string) {\n    changeField('photo', photo);\n  }\n\n  function changeName(name: string) {\n    changeField('name', name);\n  }\n\n  function changeUsername(username: string) {\n    const lowered = username.toLowerCase();\n    changeField('username', lowered);\n  }\n\n  function changeTitle(title: string) {\n    changeField('title', title);\n  }\n\n  function changeBio(bio: string) {\n    changeField('bio', bio);\n  }\n\n  function changeEmail(email: string) {\n    changeField('email', email);\n  }\n\n  function changePhone(phone: string) {\n    changeField('phone', phone);\n  }\n\n  function changeShowEmail(showEmail: boolean) {\n    changeField('showEmail', showEmail);\n  }\n\n  function changeLanguage(language: string) {\n    changeField('language', language);\n  }\n\n  function changeTimeZone(timeZone: string) {\n    changeField('timeZone', timeZone);\n  }\n\n  function changeWeekStart(weekStart: ProfileValues['weekStart']) {\n    changeField('weekStart', weekStart);\n  }\n\n  function changeTimeFormat(timeFormat: ProfileValues['timeFormat']) {\n    changeField('timeFormat', timeFormat);\n  }\n\n  const bar = (\n    <UnsavedBar\n      isShown={settings.isBarShown}\n      status={settings.status}\n      changeCount={settings.changedKeys.length}\n      message={fixMessage}\n      onDiscard={discard}\n      onSave={save}\n    />\n  );\n\n  return (\n    <SettingsPage\n      title='Profile'\n      line='How you appear to the people of Tidewell Studio, and how dates and times read for you.'\n      bar={bar}\n    >\n      <SectionTabs\n        label='Profile sections'\n        items={navItems}\n        value={section}\n        onValueChange={openSection}\n      >\n        <SectionPanel value='profile' animatesIn={hasSwitched}>\n          <SettingsSection\n            title='Public profile'\n            line='Teammates see this next to your tasks, comments and time'\n          >\n            <PhotoRow\n              photo={draft.photo}\n              seed={INITIAL_PROFILE.username}\n              error={photoError}\n              onPhotoChange={changePhoto}\n              onError={setPhotoError}\n            />\n            <TextRow\n              inputId={fieldIdOf('name')}\n              label='Full name'\n              line='As it appears on invoices and reports'\n              value={draft.name}\n              error={shownErrors.name}\n              autoComplete='name'\n              maxLength={60}\n              onValueChange={changeName}\n            />\n            <TextRow\n              inputId={fieldIdOf('username')}\n              label='Username'\n              line={pageAddress}\n              value={draft.username}\n              error={shownErrors.username}\n              autoComplete='username'\n              maxLength={24}\n              onValueChange={changeUsername}\n            />\n            <TextRow\n              inputId={fieldIdOf('title')}\n              label='Title'\n              line='Shown under your name in the member list'\n              value={draft.title}\n              autoComplete='organization-title'\n              maxLength={60}\n              onValueChange={changeTitle}\n            />\n            <BioRow\n              value={draft.bio}\n              maxLength={BIO_MAX_LENGTH}\n              onValueChange={changeBio}\n            />\n          </SettingsSection>\n        </SectionPanel>\n        <SectionPanel value='contact' animatesIn={hasSwitched}>\n          <SettingsSection\n            title='How teammates reach you'\n            line='Your email signs you in; your phone stays optional'\n          >\n            <TextRow\n              inputId={fieldIdOf('email')}\n              type='email'\n              label='Email'\n              line={emailLine}\n              value={draft.email}\n              error={shownErrors.email}\n              autoComplete='email'\n              onValueChange={changeEmail}\n            />\n            <TextRow\n              inputId={fieldIdOf('phone')}\n              type='tel'\n              inputMode='tel'\n              label='Phone'\n              line='Optional, for urgent calls from your team'\n              placeholder='+234 803 555 0142'\n              value={draft.phone}\n              error={shownErrors.phone}\n              autoComplete='tel'\n              onValueChange={changePhone}\n            />\n            <SwitchRow\n              label='Show my email to teammates'\n              line='Off keeps it visible to workspace admins only'\n              checked={draft.showEmail}\n              onCheckedChange={changeShowEmail}\n            />\n          </SettingsSection>\n        </SectionPanel>\n        <SectionPanel value='region' animatesIn={hasSwitched}>\n          <SettingsSection\n            title='Language and region'\n            line='Applies to the app, your emails and your exports'\n          >\n            <SelectRow\n              label='Language'\n              line='Menus, emails and dates'\n              value={draft.language}\n              options={LANGUAGES}\n              onValueChange={changeLanguage}\n            />\n            <SelectRow\n              label='Time zone'\n              line='Due dates and reminders follow it'\n              value={draft.timeZone}\n              options={TIME_ZONES}\n              onValueChange={changeTimeZone}\n            />\n            <ChoiceRow\n              label='Week starts on'\n              line='Calendars and weekly reports'\n              value={draft.weekStart}\n              options={WEEK_STARTS}\n              onValueChange={changeWeekStart}\n            />\n            <ChoiceRow\n              label='Time format'\n              line={<TimeSample format={draft.timeFormat} />}\n              value={draft.timeFormat}\n              options={TIME_FORMATS}\n              onValueChange={changeTimeFormat}\n            />\n          </SettingsSection>\n        </SectionPanel>\n      </SectionTabs>\n    </SettingsPage>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/settings-01/index.tsx"
    },
    {
      "path": "registry/ndeko/blocks/settings/settings-01/profile-fields.tsx",
      "content": "'use client';\n\nimport { useEffect, useId, useRef } from 'react';\n\nimport { ImageUpIcon } from '@/registry/ndeko/lib/icons';\nimport { Avatar, AvatarImage } from '@/registry/ndeko/ui/avatar';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { Textarea } from '@/registry/ndeko/ui/textarea';\n\nimport { PHOTO_MAX_BYTES, PHOTO_TYPES } from './data';\nimport { describedByOf, ErrorPresence, SettingsRow } from './settings-kit';\n\nconst PHOTO_ACCEPT = PHOTO_TYPES.join(',');\n\nfunction photoProblemOf(file: File) {\n  const isAllowedType = PHOTO_TYPES.includes(file.type);\n  if (!isAllowedType) {\n    return 'Pick a PNG, JPEG or WebP image';\n  }\n  const isSmallEnough = file.size <= PHOTO_MAX_BYTES;\n  if (!isSmallEnough) {\n    return 'Pick an image under 2 MB';\n  }\n  return null;\n}\n\ntype PhotoRowProps = {\n  photo: string;\n  /** What the gradient is drawn from while there is no photo: something that stays the same, such as the username. */\n  seed: string;\n  error: string | null;\n  onPhotoChange: (photo: string) => void;\n  onError: (error: string | null) => void;\n};\n\n/** The picked image stays in the browser as an object URL; nothing is uploaded. */\nexport function PhotoRow({\n  photo,\n  seed,\n  error,\n  onPhotoChange,\n  onError,\n}: PhotoRowProps) {\n  const pickerRef = useRef<HTMLInputElement>(null);\n  const createdUrlsRef = useRef<string[]>([]);\n  const errorId = useId();\n  const hasPhoto = photo.length > 0;\n  const hasError = Boolean(error);\n  const describedBy = describedByOf(hasError, errorId);\n\n  useEffect(() => {\n    const createdUrls = createdUrlsRef.current;\n    return () => {\n      createdUrls.forEach((url) => URL.revokeObjectURL(url));\n    };\n  }, []);\n\n  function openPicker() {\n    pickerRef.current?.click();\n  }\n\n  function pickPhoto(event: React.ChangeEvent<HTMLInputElement>) {\n    const file = event.target.files?.[0];\n    event.target.value = '';\n    if (!file) {\n      return;\n    }\n    const problem = photoProblemOf(file);\n    onError(problem);\n    if (problem) {\n      return;\n    }\n    const url = URL.createObjectURL(file);\n    createdUrlsRef.current.push(url);\n    onPhotoChange(url);\n  }\n\n  function removePhoto() {\n    onError(null);\n    onPhotoChange('');\n  }\n\n  return (\n    <SettingsRow\n      label='Photo'\n      line='PNG, JPEG or WebP under 2 MB, shown on your tasks and comments'\n    >\n      <div className='flex items-center gap-3'>\n        <Avatar className='size-11' seed={seed}>\n          {hasPhoto && <AvatarImage src={photo} alt='' />}\n        </Avatar>\n        <Button\n          variant='outline'\n          size='sm'\n          aria-describedby={describedBy}\n          onClick={openPicker}\n        >\n          <ImageUpIcon />\n          Upload photo\n        </Button>\n        {hasPhoto && (\n          <Button variant='ghost' size='sm' onClick={removePhoto}>\n            Remove\n          </Button>\n        )}\n        <input\n          ref={pickerRef}\n          type='file'\n          accept={PHOTO_ACCEPT}\n          tabIndex={-1}\n          aria-hidden='true'\n          onChange={pickPhoto}\n          className='sr-only'\n        />\n      </div>\n      <ErrorPresence id={errorId} error={error} />\n    </SettingsRow>\n  );\n}\n\ntype BioRowProps = {\n  value: string;\n  maxLength: number;\n  onValueChange: (value: string) => void;\n};\n\nexport function BioRow({ value, maxLength, onValueChange }: BioRowProps) {\n  const fieldId = useId();\n  const countId = useId();\n  const countText = `${value.length} of ${maxLength}`;\n\n  function changeValue(event: React.ChangeEvent<HTMLTextAreaElement>) {\n    onValueChange(event.target.value);\n  }\n\n  return (\n    <div className='flex flex-col gap-2 px-4 py-3'>\n      <div className='flex items-baseline justify-between gap-3'>\n        <label htmlFor={fieldId} className='text-[13px] font-medium'>\n          Bio\n        </label>\n        <span\n          id={countId}\n          className='text-muted-foreground text-xs tabular-nums'\n        >\n          {countText}\n        </span>\n      </div>\n      <p className='text-muted-foreground -mt-1.5 text-xs'>\n        Two lines on your profile card, plain text\n      </p>\n      <Textarea\n        id={fieldId}\n        value={value}\n        rows={2}\n        maxLength={maxLength}\n        aria-describedby={countId}\n        onChange={changeValue}\n      />\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/settings-01/profile-fields.tsx"
    },
    {
      "path": "registry/ndeko/blocks/settings/settings-01/settings-kit.tsx",
      "content": "'use client';\n\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\nimport { Tabs as TabsPrimitive } from '@base-ui/react/tabs';\nimport {\n  AnimatePresence,\n  motion,\n  type Transition,\n  type Variants,\n} from 'motion/react';\nimport { useEffect, useId, useState } from 'react';\n\nimport { WordRoll } from '@/components/core/word-roll';\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport {\n  CheckIcon,\n  LoaderCircleIcon,\n  type Icon,\n} from '@/registry/ndeko/lib/icons';\nimport { AnimatedSize } from '@/registry/ndeko/ui/animated-size';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { Input, type InputProps } from '@/registry/ndeko/ui/input';\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from '@/registry/ndeko/ui/select';\nimport { Switch } from '@/registry/ndeko/ui/switch';\n\nexport const SETTINGS_SURFACE_BASE =\n  'bg-card hairline-ring ring-border rounded-xl shadow-[0_1px_2px_rgb(0_0_0/0.04)] dark:bg-foreground/[0.03]';\n\nexport const SETTINGS_SURFACE = `${SETTINGS_SURFACE_BASE} hairline-divide-y divide-border`;\n\nconst ROW_LABEL = 'text-[13px] font-medium';\n\nconst SAVE_DELAY_MS = 800;\n\nconst SAVED_HOLD_MS = 1100;\n\nconst SWAP_TRANSITION: Transition = { duration: 0.15, ease: [0.2, 0, 0, 1] };\n\nconst THUMB_TRAVEL: Transition = { duration: 0.2, ease: [0.2, 0, 0, 1] };\n\nconst INSTANT: Transition = { duration: 0 };\n\nconst ENTER: Transition = { duration: 0.2, ease: [0.23, 1, 0.32, 1] };\n\nconst LEAVE: Transition = { duration: 0.14, ease: [0.23, 1, 0.32, 1] };\n\nconst SWAP_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 BAR_VARIANTS: Variants = {\n  enter: { opacity: 0, y: 12, scale: 0.98 },\n  visible: { opacity: 1, y: 0, scale: 1, transition: ENTER },\n  exit: { opacity: 0, y: 8, scale: 0.98, transition: LEAVE },\n};\n\nconst PANEL_VARIANTS: Variants = {\n  enter: { opacity: 0, y: 4 },\n  visible: { opacity: 1, y: 0, transition: ENTER },\n};\n\nconst DOT_VARIANTS: Variants = {\n  enter: { opacity: 0, scale: 0.4 },\n  visible: { opacity: 1, scale: 1, transition: ENTER },\n  exit: { opacity: 0, scale: 0.4, transition: LEAVE },\n};\n\nconst ERROR_VARIANTS: Variants = {\n  enter: { height: 0, opacity: 0 },\n  visible: { height: 'auto', opacity: 1, transition: ENTER },\n  exit: { height: 0, opacity: 0, transition: LEAVE },\n};\n\nconst FADE_VARIANTS: Variants = {\n  enter: { opacity: 0 },\n  visible: { opacity: 1, transition: ENTER },\n  exit: { opacity: 0, transition: LEAVE },\n};\n\nfunction swapVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return SWAP_VARIANTS;\n}\n\nfunction barVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return BAR_VARIANTS;\n}\n\nfunction panelVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return PANEL_VARIANTS;\n}\n\nfunction errorVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return ERROR_VARIANTS;\n}\n\nexport function describedByOf(hasError: boolean, errorId: string) {\n  if (hasError) {\n    return errorId;\n  }\n  return undefined;\n}\n\nfunction thumbTravelOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return INSTANT;\n  }\n  return THUMB_TRAVEL;\n}\n\nfunction dotVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return DOT_VARIANTS;\n}\n\nexport type SaveStatus = 'idle' | 'saving' | 'saved';\n\ntype SettingsValues = Record<string, unknown>;\n\nfunction changedKeysOf<Values extends SettingsValues>(\n  saved: Values,\n  draft: Values\n) {\n  const keys = Object.keys(saved);\n  return keys.filter((key) => !Object.is(saved[key], draft[key]));\n}\n\n/** An edit made while Saved is still showing starts a new round of changes. */\nfunction statusAfterEditOf(current: SaveStatus): SaveStatus {\n  if (current === 'saved') {\n    return 'idle';\n  }\n  return current;\n}\n\n/**\n * Keeps the saved values and the draft apart. Saving stands in for a request with a fixed\n * delay, then holds the Saved state long enough to be read.\n */\nexport function useSettingsDraft<Values extends SettingsValues>(\n  initialValues: Values\n) {\n  const [savedValues, setSavedValues] = useState(initialValues);\n  const [draft, setDraft] = useState(initialValues);\n  const [pending, setPending] = useState<Values | null>(null);\n  const [status, setStatus] = useState<SaveStatus>('idle');\n  const changedKeys = changedKeysOf(savedValues, draft);\n  const hasChanges = changedKeys.length > 0;\n  const isSettled = status === 'idle';\n  const isBarShown = hasChanges || !isSettled;\n\n  useEffect(() => {\n    if (status !== 'saving') {\n      return;\n    }\n    const timer = window.setTimeout(() => {\n      if (pending) {\n        setSavedValues(pending);\n      }\n      setStatus('saved');\n    }, SAVE_DELAY_MS);\n    return () => window.clearTimeout(timer);\n  }, [status, pending]);\n\n  useEffect(() => {\n    if (status !== 'saved') {\n      return;\n    }\n    const timer = window.setTimeout(() => setStatus('idle'), SAVED_HOLD_MS);\n    return () => window.clearTimeout(timer);\n  }, [status]);\n\n  function change<Key extends keyof Values>(key: Key, value: Values[Key]) {\n    setDraft((previous) => ({ ...previous, [key]: value }));\n    setStatus(statusAfterEditOf);\n  }\n\n  function discard() {\n    setDraft(savedValues);\n  }\n\n  function save() {\n    if (status === 'saving') {\n      return;\n    }\n    setPending(draft);\n    setStatus('saving');\n  }\n\n  return {\n    savedValues,\n    draft,\n    changedKeys,\n    status,\n    isBarShown,\n    change,\n    discard,\n    save,\n  };\n}\n\nexport function hasChangeIn(changedKeys: string[], sectionKeys: string[]) {\n  return sectionKeys.some((key) => changedKeys.includes(key));\n}\n\ntype SettingsPageProps = {\n  title: string;\n  line: string;\n  bar: React.ReactNode;\n  children: React.ReactNode;\n};\n\nexport function SettingsPage({\n  title,\n  line,\n  bar,\n  children,\n}: SettingsPageProps) {\n  return (\n    <div className='bg-background text-foreground flex min-h-dvh w-full flex-col'>\n      <div className='mx-auto flex w-full max-w-4xl flex-1 flex-col gap-6 px-4 py-8 md:gap-8 md:px-6 md:py-10'>\n        <header className='flex flex-col gap-1'>\n          <h1 className='text-2xl font-semibold text-balance sm:text-3xl'>\n            {title}\n          </h1>\n          <p className='text-muted-foreground text-[13px] text-pretty'>\n            {line}\n          </p>\n        </header>\n        {children}\n      </div>\n      {bar}\n    </div>\n  );\n}\n\nexport type NavItem<Id extends string> = {\n  id: Id;\n  label: string;\n  icon: Icon;\n  hasChanges: boolean;\n};\n\nfunction UnsavedDot({ isShown }: { isShown: boolean }) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const variants = dotVariantsOf(shouldReduceMotion);\n\n  return (\n    <AnimatePresence initial={false}>\n      {isShown && (\n        <motion.span\n          key='dot'\n          variants={variants}\n          initial='enter'\n          animate='visible'\n          exit='exit'\n          className='bg-primary ml-auto size-1.5 shrink-0 rounded-full'\n        >\n          <span className='sr-only'>Unsaved changes</span>\n        </motion.span>\n      )}\n    </AnimatePresence>\n  );\n}\n\ntype SectionTabsProps<Id extends string> = {\n  label: string;\n  items: NavItem<Id>[];\n  value: Id;\n  onValueChange: (id: Id) => void;\n  children: React.ReactNode;\n};\n\n/** Sections as tabs: a rail beside the column on wide screens, a row above it on phones. One highlight travels between them. */\nexport function SectionTabs<Id extends string>({\n  label,\n  items,\n  value,\n  onValueChange,\n  children,\n}: SectionTabsProps<Id>) {\n  function changeValue(nextValue: unknown) {\n    const item = items.find((candidate) => candidate.id === nextValue);\n    if (item) {\n      onValueChange(item.id);\n    }\n  }\n\n  return (\n    <TabsPrimitive.Root\n      value={value}\n      onValueChange={changeValue}\n      orientation='vertical'\n      className='flex flex-col gap-6 md:grid md:grid-cols-[11rem_minmax(0,42rem)] md:items-start md:gap-10'\n    >\n      <TabsPrimitive.List\n        aria-label={label}\n        className='relative -mx-4 flex gap-1 overflow-x-auto px-4 md:sticky md:top-10 md:mx-0 md:flex-col md:overflow-visible md:px-0'\n      >\n        {items.map((item) => {\n          const ItemIcon = item.icon;\n\n          return (\n            <TabsPrimitive.Tab\n              key={item.id}\n              value={item.id}\n              className='text-muted-foreground hover:text-foreground data-active:text-foreground focus-visible:ring-ring/25 relative z-10 flex h-8 shrink-0 cursor-pointer items-center gap-2 rounded-md px-2.5 text-left text-[13px] font-medium whitespace-nowrap transition-colors duration-150 outline-none focus-visible:ring-[3px] [&_svg]:size-4 [&_svg]:shrink-0'\n            >\n              <ItemIcon />\n              {item.label}\n              <UnsavedDot isShown={item.hasChanges} />\n            </TabsPrimitive.Tab>\n          );\n        })}\n        <TabsPrimitive.Indicator className='bg-foreground/[0.06] pointer-events-none absolute top-0 left-0 h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) translate-y-(--active-tab-top) rounded-md transition-[translate,width,height] duration-[250ms] ease-(--ease-in-out-strong)' />\n      </TabsPrimitive.List>\n      {children}\n    </TabsPrimitive.Root>\n  );\n}\n\ntype SectionPanelProps = {\n  value: string;\n  /** False on the section shown at first, so nothing moves on load. */\n  animatesIn: boolean;\n  children: React.ReactNode;\n};\n\nfunction panelInitialOf(animatesIn: boolean) {\n  if (animatesIn) {\n    return 'enter';\n  }\n  return false;\n}\n\nexport function SectionPanel({\n  value,\n  animatesIn,\n  children,\n}: SectionPanelProps) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const variants = panelVariantsOf(shouldReduceMotion);\n  const initial = panelInitialOf(animatesIn);\n\n  return (\n    <TabsPrimitive.Panel\n      value={value}\n      className='focus-visible:ring-ring/25 rounded-xl outline-none focus-visible:ring-[3px]'\n    >\n      <motion.div\n        variants={variants}\n        initial={initial}\n        animate='visible'\n        className='flex flex-col gap-8'\n      >\n        {children}\n      </motion.div>\n    </TabsPrimitive.Panel>\n  );\n}\n\ntype SettingsSectionProps = {\n  title: string;\n  line?: string;\n  action?: React.ReactNode;\n  children: React.ReactNode;\n};\n\nexport function SettingsSection({\n  title,\n  line,\n  action,\n  children,\n}: SettingsSectionProps) {\n  const headingId = useId();\n\n  return (\n    <section aria-labelledby={headingId} className='flex flex-col gap-3'>\n      <div className='flex items-end justify-between gap-3'>\n        <div className='flex flex-col gap-0.5'>\n          <h2 id={headingId} className='text-sm font-medium'>\n            {title}\n          </h2>\n          {line && <p className='text-muted-foreground text-xs'>{line}</p>}\n        </div>\n        {action}\n      </div>\n      <div className={SETTINGS_SURFACE}>{children}</div>\n    </section>\n  );\n}\n\ntype SettingsRowProps = {\n  label: string;\n  line: React.ReactNode;\n  labelId?: string;\n  lineId?: string;\n  htmlFor?: string;\n  children: React.ReactNode;\n};\n\nexport function SettingsRow({\n  label,\n  line,\n  labelId,\n  lineId,\n  htmlFor,\n  children,\n}: SettingsRowProps) {\n  return (\n    <div className='flex min-h-14 flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-6'>\n      <div className='flex min-w-0 flex-col gap-0.5'>\n        {htmlFor && (\n          <label id={labelId} htmlFor={htmlFor} className={ROW_LABEL}>\n            {label}\n          </label>\n        )}\n        {!htmlFor && (\n          <p id={labelId} className={ROW_LABEL}>\n            {label}\n          </p>\n        )}\n        <p id={lineId} className='text-muted-foreground text-xs'>\n          {line}\n        </p>\n      </div>\n      <div className='flex shrink-0 flex-col sm:items-end'>{children}</div>\n    </div>\n  );\n}\n\nfunction saveLabelOf(status: SaveStatus) {\n  if (status === 'saving') {\n    return 'Saving';\n  }\n  if (status === 'saved') {\n    return 'Saved';\n  }\n  return 'Save changes';\n}\n\nfunction saveGlyphOf(status: SaveStatus) {\n  if (status === 'saving') {\n    return {\n      key: 'saving',\n      icon: <LoaderCircleIcon className='animate-spin' />,\n    };\n  }\n  if (status === 'saved') {\n    return { key: 'saved', icon: <CheckIcon /> };\n  }\n  return null;\n}\n\ntype SaveButtonProps = {\n  status: SaveStatus;\n  onSave: () => void;\n};\n\n/** The label becomes its next state and the pill resizes to it: Save changes, Saving, Saved. */\nfunction SaveButton({ status, onSave }: SaveButtonProps) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const variants = swapVariantsOf(shouldReduceMotion);\n  const label = saveLabelOf(status);\n  const glyph = saveGlyphOf(status);\n  const isBusy = status !== 'idle';\n\n  return (\n    <Button\n      size='sm'\n      disabled={isBusy}\n      focusableWhenDisabled\n      onClick={onSave}\n      className='data-disabled:opacity-100'\n    >\n      <AnimatedSize\n        as='span'\n        axis='width'\n        contentClassName='relative flex items-center gap-1.5'\n      >\n        <AnimatePresence mode='popLayout' initial={false}>\n          {glyph && (\n            <motion.span\n              key={glyph.key}\n              variants={variants}\n              initial='enter'\n              animate='visible'\n              exit='exit'\n              transition={SWAP_TRANSITION}\n              className='flex'\n            >\n              {glyph.icon}\n            </motion.span>\n          )}\n        </AnimatePresence>\n        <AnimatePresence mode='popLayout' initial={false}>\n          <motion.span\n            key={label}\n            variants={variants}\n            initial='enter'\n            animate='visible'\n            exit='exit'\n            transition={SWAP_TRANSITION}\n          >\n            {label}\n          </motion.span>\n        </AnimatePresence>\n      </AnimatedSize>\n    </Button>\n  );\n}\n\nfunction changeCountLabelOf(count: number) {\n  if (count === 1) {\n    return '1 unsaved change';\n  }\n  return `${count} unsaved changes`;\n}\n\nfunction barMessageOf(status: SaveStatus, changeCount: number) {\n  if (status === 'saved') {\n    return 'All changes saved';\n  }\n  return changeCountLabelOf(changeCount);\n}\n\ntype UnsavedBarProps = {\n  isShown: boolean;\n  status: SaveStatus;\n  changeCount: number;\n  /** Replaces the count, for example to say what blocks the save. */\n  message?: string;\n  onDiscard: () => void;\n  onSave: () => void;\n};\n\nexport function UnsavedBar({\n  isShown,\n  status,\n  changeCount,\n  message,\n  onDiscard,\n  onSave,\n}: UnsavedBarProps) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const variants = barVariantsOf(shouldReduceMotion);\n  const defaultText = barMessageOf(status, changeCount);\n  const text = message ?? defaultText;\n  const isBusy = status !== 'idle';\n\n  return (\n    <div className='pointer-events-none sticky bottom-0 z-20 flex justify-center px-4 pb-4'>\n      <AnimatePresence initial={false}>\n        {isShown && (\n          <motion.div\n            key='unsaved-bar'\n            role='region'\n            aria-label='Unsaved changes'\n            variants={variants}\n            initial='enter'\n            animate='visible'\n            exit='exit'\n            className='surface-raised pointer-events-auto flex w-full max-w-md items-center gap-2 rounded-full py-1.5 pr-1.5 pl-4'\n          >\n            <p\n              role='status'\n              className='min-w-0 flex-1 truncate text-[13px] tabular-nums'\n            >\n              <WordRoll text={text} value={changeCount} />\n            </p>\n            <Button\n              variant='ghost'\n              size='sm'\n              disabled={isBusy}\n              onClick={onDiscard}\n            >\n              Discard\n            </Button>\n            <SaveButton status={status} onSave={onSave} />\n          </motion.div>\n        )}\n      </AnimatePresence>\n    </div>\n  );\n}\n\nexport type ChoiceOption<Value extends string> = {\n  value: Value;\n  label: string;\n};\n\ntype SegmentedChoiceProps<Value extends string> = {\n  options: ChoiceOption<Value>[];\n  value: Value;\n  labelledBy?: string;\n  describedBy?: string;\n  disabled?: boolean;\n  onValueChange: (value: Value) => void;\n};\n\n/** A setting with two to four values as one segmented radio group. The thumb slides to the picked value. */\nexport function SegmentedChoice<Value extends string>({\n  options,\n  value,\n  labelledBy,\n  describedBy,\n  disabled,\n  onValueChange,\n}: SegmentedChoiceProps<Value>) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const travel = thumbTravelOf(shouldReduceMotion);\n  const thumbId = useId();\n\n  function changeValue(nextValue: unknown) {\n    const option = options.find((candidate) => candidate.value === nextValue);\n    if (option) {\n      onValueChange(option.value);\n    }\n  }\n\n  return (\n    <RadioGroupPrimitive\n      value={value}\n      onValueChange={changeValue}\n      disabled={disabled}\n      aria-labelledby={labelledBy}\n      aria-describedby={describedBy}\n      className='bg-foreground/[0.05] inline-flex w-fit items-center gap-0.5 rounded-lg p-0.5 data-disabled:opacity-50'\n    >\n      {options.map((option) => {\n        const isPicked = option.value === value;\n\n        return (\n          <RadioPrimitive.Root\n            key={option.value}\n            value={option.value}\n            className='text-muted-foreground hover:text-foreground data-checked:text-foreground focus-visible:ring-ring/25 relative inline-flex h-7 cursor-pointer items-center justify-center rounded-md px-3 text-[13px] font-medium whitespace-nowrap transition-colors duration-150 outline-none focus-visible:ring-[3px] data-disabled:cursor-not-allowed'\n          >\n            {isPicked && (\n              <motion.span\n                aria-hidden='true'\n                layoutId={thumbId}\n                transition={travel}\n                className='bg-card hairline-ring ring-foreground/10 dark:bg-foreground/[0.09] absolute inset-0 rounded-md shadow-[0_1px_2px_rgb(0_0_0/0.08)]'\n              />\n            )}\n            <span className='relative'>{option.label}</span>\n          </RadioPrimitive.Root>\n        );\n      })}\n    </RadioGroupPrimitive>\n  );\n}\n\ntype ErrorPresenceProps = {\n  id: string;\n  error?: string | null;\n};\n\n/** A field error that grows in under its control and folds away once the person types again. */\nexport function ErrorPresence({ id, error }: ErrorPresenceProps) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const variants = errorVariantsOf(shouldReduceMotion);\n\n  return (\n    <AnimatePresence initial={false}>\n      {error && (\n        <motion.p\n          key='error'\n          id={id}\n          variants={variants}\n          initial='enter'\n          animate='visible'\n          exit='exit'\n          className='text-destructive-ink overflow-hidden text-xs sm:max-w-64 sm:text-right'\n        >\n          <span className='block pt-1.5'>{error}</span>\n        </motion.p>\n      )}\n    </AnimatePresence>\n  );\n}\n\ntype TextRowProps = Pick<\n  InputProps,\n  'type' | 'autoComplete' | 'inputMode' | 'placeholder' | 'maxLength'\n> & {\n  label: string;\n  line: string;\n  value: string;\n  error?: string;\n  inputId?: string;\n  onValueChange: (value: string) => void;\n};\n\nexport function TextRow({\n  label,\n  line,\n  value,\n  error,\n  inputId,\n  onValueChange,\n  ...inputProps\n}: TextRowProps) {\n  const generatedId = useId();\n  const errorId = useId();\n  const id = inputId ?? generatedId;\n  const hasError = Boolean(error);\n  const describedBy = describedByOf(hasError, errorId);\n\n  function changeValue(event: React.ChangeEvent<HTMLInputElement>) {\n    onValueChange(event.target.value);\n  }\n\n  return (\n    <SettingsRow label={label} line={line} htmlFor={id}>\n      <Input\n        id={id}\n        value={value}\n        aria-invalid={hasError}\n        aria-describedby={describedBy}\n        onChange={changeValue}\n        className='w-full sm:w-64'\n        {...inputProps}\n      />\n      <ErrorPresence id={errorId} error={error} />\n    </SettingsRow>\n  );\n}\n\ntype SwitchRowProps = {\n  label: string;\n  line: React.ReactNode;\n  checked: boolean;\n  disabled?: boolean;\n  onCheckedChange: (checked: boolean) => void;\n};\n\nexport function SwitchRow({\n  label,\n  line,\n  checked,\n  disabled,\n  onCheckedChange,\n}: SwitchRowProps) {\n  const labelId = useId();\n  const lineId = useId();\n\n  return (\n    <SettingsRow label={label} line={line} labelId={labelId} lineId={lineId}>\n      <Switch\n        checked={checked}\n        disabled={disabled}\n        onCheckedChange={onCheckedChange}\n        aria-labelledby={labelId}\n        aria-describedby={lineId}\n      />\n    </SettingsRow>\n  );\n}\n\ntype SelectOption = { value: string; label: string };\n\ntype SelectRowProps = {\n  label: string;\n  line: React.ReactNode;\n  value: string;\n  options: SelectOption[];\n  disabled?: boolean;\n  onValueChange: (value: string) => void;\n};\n\nexport function SelectRow({\n  label,\n  line,\n  value,\n  options,\n  disabled,\n  onValueChange,\n}: SelectRowProps) {\n  const labelId = useId();\n\n  function changeValue(nextValue: unknown) {\n    const option = options.find((candidate) => candidate.value === nextValue);\n    if (option) {\n      onValueChange(option.value);\n    }\n  }\n\n  return (\n    <SettingsRow label={label} line={line} labelId={labelId}>\n      <Select\n        items={options}\n        value={value}\n        disabled={disabled}\n        onValueChange={changeValue}\n      >\n        <SelectTrigger aria-labelledby={labelId} className='w-full sm:w-64'>\n          <SelectValue />\n        </SelectTrigger>\n        <SelectContent align='end'>\n          {options.map((option) => (\n            <SelectItem key={option.value} value={option.value}>\n              {option.label}\n            </SelectItem>\n          ))}\n        </SelectContent>\n      </Select>\n    </SettingsRow>\n  );\n}\n\ntype ChoiceRowProps<Value extends string> = {\n  label: string;\n  line: React.ReactNode;\n  value: Value;\n  options: ChoiceOption<Value>[];\n  disabled?: boolean;\n  onValueChange: (value: Value) => void;\n};\n\nexport function ChoiceRow<Value extends string>({\n  label,\n  line,\n  value,\n  options,\n  disabled,\n  onValueChange,\n}: ChoiceRowProps<Value>) {\n  const labelId = useId();\n  const lineId = useId();\n\n  return (\n    <SettingsRow label={label} line={line} labelId={labelId} lineId={lineId}>\n      <SegmentedChoice\n        options={options}\n        value={value}\n        labelledBy={labelId}\n        describedBy={lineId}\n        disabled={disabled}\n        onValueChange={onValueChange}\n      />\n    </SettingsRow>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/settings-01/settings-kit.tsx"
    },
    {
      "path": "registry/ndeko/blocks/settings/settings-01/validation.ts",
      "content": "import type { ProfileField, ProfileValues, SectionId } from './data';\n\nexport type ProfileErrors = Partial<Record<ProfileField, string>>;\n\nconst USERNAME_PATTERN = /^[a-z0-9-]{3,24}$/;\n\nconst EMAIL_PATTERN = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n\nconst PHONE_PATTERN = /^\\+?[\\d\\s().-]+$/;\n\nconst PHONE_MIN_DIGITS = 7;\n\nconst FIELD_ORDER: ProfileField[] = [\n  'photo',\n  'name',\n  'username',\n  'title',\n  'bio',\n  'email',\n  'phone',\n];\n\nexport const FIELD_SECTION: Record<ProfileField, SectionId> = {\n  photo: 'profile',\n  name: 'profile',\n  username: 'profile',\n  title: 'profile',\n  bio: 'profile',\n  email: 'contact',\n  phone: 'contact',\n  showEmail: 'contact',\n  language: 'region',\n  timeZone: 'region',\n  weekStart: 'region',\n  timeFormat: 'region',\n};\n\nfunction digitCountOf(text: string) {\n  const digits = text.replace(/\\D/g, '');\n  return digits.length;\n}\n\nfunction phoneErrorOf(phone: string) {\n  const trimmed = phone.trim();\n  if (trimmed.length === 0) {\n    return null;\n  }\n  const hasAllowedCharacters = PHONE_PATTERN.test(trimmed);\n  const digitCount = digitCountOf(trimmed);\n  const hasEnoughDigits = digitCount >= PHONE_MIN_DIGITS;\n  const isValid = hasAllowedCharacters && hasEnoughDigits;\n  if (isValid) {\n    return null;\n  }\n  return 'Enter a phone number with its country code, such as +234 803 555 0142';\n}\n\nexport function errorsOf(values: ProfileValues): ProfileErrors {\n  const errors: ProfileErrors = {};\n  const name = values.name.trim();\n  const email = values.email.trim();\n  const isUsernameValid = USERNAME_PATTERN.test(values.username);\n  const hasEmail = email.length > 0;\n  const isEmailValid = EMAIL_PATTERN.test(email);\n  const isEmailMalformed = hasEmail && !isEmailValid;\n  const phoneError = phoneErrorOf(values.phone);\n  if (name.length === 0) {\n    errors.name = 'Enter your full name';\n  }\n  if (!isUsernameValid) {\n    errors.username = 'Use 3 to 24 lowercase letters, digits or hyphens';\n  }\n  if (!hasEmail) {\n    errors.email = 'Enter the email address you sign in with';\n  }\n  if (isEmailMalformed) {\n    errors.email = 'Enter an email like name@company.com';\n  }\n  if (phoneError) {\n    errors.phone = phoneError;\n  }\n  return errors;\n}\n\nexport function firstErrorFieldOf(errors: ProfileErrors) {\n  const field = FIELD_ORDER.find((candidate) => Boolean(errors[candidate]));\n  if (field) {\n    return field;\n  }\n  return null;\n}\n\nexport function errorCountOf(errors: ProfileErrors) {\n  const messages = Object.values(errors);\n  return messages.filter(Boolean).length;\n}\n\nexport function withoutError(errors: ProfileErrors, field: ProfileField) {\n  if (!errors[field]) {\n    return errors;\n  }\n  const next = { ...errors };\n  delete next[field];\n  return next;\n}\n",
      "type": "registry:component",
      "target": "components/blocks/settings-01/validation.ts"
    },
    {
      "path": "registry/ndeko/blocks/settings/settings-01/data.ts",
      "content": "export type SectionId = 'profile' | 'contact' | 'region';\n\nexport type WeekStart = 'monday' | 'sunday';\n\nexport type TimeFormat = '24h' | '12h';\n\nexport type ProfileValues = {\n  photo: string;\n  name: string;\n  username: string;\n  title: string;\n  bio: string;\n  email: string;\n  phone: string;\n  showEmail: boolean;\n  language: string;\n  timeZone: string;\n  weekStart: WeekStart;\n  timeFormat: TimeFormat;\n};\n\nexport type ProfileField = keyof ProfileValues;\n\nexport const INITIAL_PROFILE: ProfileValues = {\n  photo: '',\n  name: 'Amara Okafor',\n  username: 'amara',\n  title: 'Product designer',\n  bio: 'Designs the onboarding and the reports. Ask me about empty states.',\n  email: 'amara.okafor@tidewell.example',\n  phone: '',\n  showEmail: true,\n  language: 'en-GB',\n  timeZone: 'africa-lagos',\n  weekStart: 'monday',\n  timeFormat: '24h',\n};\n\nexport const PROFILE_HOST = 'tidewell.example/';\n\nexport const BIO_MAX_LENGTH = 160;\n\nconst MEGABYTE = 1024 * 1024;\n\nexport const PHOTO_MAX_BYTES = 2 * MEGABYTE;\n\nexport const PHOTO_TYPES = ['image/png', 'image/jpeg', 'image/webp'];\n\nexport const SECTION_KEYS: Record<SectionId, ProfileField[]> = {\n  profile: ['photo', 'name', 'username', 'title', 'bio'],\n  contact: ['email', 'phone', 'showEmail'],\n  region: ['language', 'timeZone', 'weekStart', 'timeFormat'],\n};\n\nexport const LANGUAGES = [\n  { value: 'en-GB', label: 'English (United Kingdom)' },\n  { value: 'en-US', label: 'English (United States)' },\n  { value: 'fr-FR', label: 'Français' },\n  { value: 'pt-PT', label: 'Português' },\n  { value: 'sw', label: 'Kiswahili' },\n];\n\nexport const TIME_ZONES = [\n  { value: 'africa-lagos', label: 'Lagos, West Africa Time' },\n  { value: 'africa-kinshasa', label: 'Kinshasa, West Africa Time' },\n  { value: 'europe-london', label: 'London, Greenwich Mean Time' },\n  { value: 'europe-paris', label: 'Paris, Central European Time' },\n  { value: 'america-new-york', label: 'New York, Eastern Time' },\n  { value: 'asia-tokyo', label: 'Tokyo, Japan Standard Time' },\n];\n\nexport const WEEK_STARTS: { value: WeekStart; label: string }[] = [\n  { value: 'monday', label: 'Monday' },\n  { value: 'sunday', label: 'Sunday' },\n];\n\nexport const TIME_FORMATS: { value: TimeFormat; label: string }[] = [\n  { value: '24h', label: '24-hour' },\n  { value: '12h', label: '12-hour' },\n];\n\nexport const TIME_FORMAT_SAMPLE: Record<TimeFormat, string> = {\n  '24h': 'A meeting at half past two shows as 14:30',\n  '12h': 'A meeting at half past two shows as 2:30 PM',\n};\n",
      "type": "registry:component",
      "target": "components/blocks/settings-01/data.ts"
    }
  ],
  "categories": [
    "blocks",
    "settings"
  ],
  "type": "registry:block"
}