{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "blog-01",
  "title": "Blog index",
  "description": "A blog index with the latest post on a washed card, topic chips with their counts, a search that can come up empty with the way back, and Load more: pick a topic and the thumb travels to it while the cards that stay glide to their new places and the others fade.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/agent-run.json",
    "https://ui.ndekocode.dev/r/avatar.json",
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/chip.json",
    "https://ui.ndekocode.dev/r/company-mark.json",
    "https://ui.ndekocode.dev/r/demonstration.json",
    "https://ui.ndekocode.dev/r/hatch.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/input.json",
    "https://ui.ndekocode.dev/r/live-duration.json",
    "https://ui.ndekocode.dev/r/live-region.json",
    "https://ui.ndekocode.dev/r/motion-presets.json",
    "https://ui.ndekocode.dev/r/motion-word-roll.json",
    "https://ui.ndekocode.dev/r/recipes.json",
    "https://ui.ndekocode.dev/r/replay-button.json",
    "https://ui.ndekocode.dev/r/seeded.json",
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/toggle-group.json",
    "https://ui.ndekocode.dev/r/use-kept-height.json",
    "https://ui.ndekocode.dev/r/use-prefers-reduced-motion.json",
    "https://ui.ndekocode.dev/r/use-session.json",
    "https://ui.ndekocode.dev/r/utils.json",
    "https://ui.ndekocode.dev/r/wash.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/blocks/blog/blog-01/index.tsx",
      "content": "'use client';\n\nimport { AnimatePresence, motion, type Transition } from 'motion/react';\n\nimport { WordRoll } from '@/components/core/word-roll';\nimport { useKeptHeight } from '@/registry/ndeko/hooks/use-kept-height';\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { useSession } from '@/registry/ndeko/hooks/use-session';\nimport {\n  pressedQuietOf,\n  spokenUnless,\n} from '@/registry/ndeko/lib/demonstration';\nimport { SearchIcon } from '@/registry/ndeko/lib/icons';\nimport {\n  EASE_OUT_STRONG,\n  INSTANT,\n  rowPresenceOf,\n  SLOW_SPRING,\n} from '@/registry/ndeko/lib/motion-presets';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { CompanyMark } from '@/registry/ndeko/ui/company-mark';\nimport { Input } from '@/registry/ndeko/ui/input';\nimport { ClockGate } from '@/registry/ndeko/ui/live-duration';\nimport { LiveRegion } from '@/registry/ndeko/ui/live-region';\nimport { ReplayButton } from '@/registry/ndeko/ui/replay-button';\nimport { ToggleGroup, ToggleGroupItem } from '@/registry/ndeko/ui/toggle-group';\n\nimport { BLOG, TOPICS } from './data';\nimport { FeaturedPost, PostCard } from './post-card';\nimport {\n  countOfTopic,\n  FEATURED,\n  INITIAL,\n  isBrowsing,\n  LOOP_AFTER_MS,\n  postsIn,\n  reducer,\n  RESTING,\n  SCRIPT,\n  type TopicFilter,\n} from './session';\n\nconst SESSION = {\n  reducer,\n  initial: INITIAL,\n  resting: RESTING,\n  script: SCRIPT,\n  loopAfter: LOOP_AFTER_MS,\n};\n\nconst FILTERS: { id: TopicFilter; label: string }[] = [\n  { id: 'all', label: 'All' },\n  ...TOPICS,\n];\n\nconst THUMB =\n  'bg-card shadow-[0_1px_2px_rgb(0_0_0/0.08)] hairline-ring ring-foreground/10 dark:bg-foreground/[0.09] dark:ring-foreground/15';\n\nconst ARRIVED = { opacity: 1, y: 0 };\n\nconst ARRIVING = { opacity: 0, y: 8 };\n\nconst FADED = { opacity: 0, y: 0 };\n\nconst ARRIVE: Transition = { duration: 0.25, ease: EASE_OUT_STRONG };\n\nconst LEAVE: Transition = { duration: 0.12, ease: EASE_OUT_STRONG };\n\nfunction arrivingOf(shouldReduceMotion: boolean) {\n  if (shouldReduceMotion) {\n    return FADED;\n  }\n  return ARRIVING;\n}\n\nfunction glideOf(shouldReduceMotion: boolean): Transition {\n  if (shouldReduceMotion) {\n    return { ...ARRIVE, layout: INSTANT };\n  }\n  return { ...ARRIVE, layout: SLOW_SPRING };\n}\n\nfunction filterOf(values: unknown[]) {\n  const [value] = values;\n  const filter = FILTERS.find((candidate) => candidate.id === value);\n  return filter?.id;\n}\n\nfunction shownLineOf(shown: number, total: number) {\n  if (total === 1) {\n    return 'Showing the only post';\n  }\n  return `Showing ${shown} of ${total} posts`;\n}\n\nfunction emptyLineOf(query: string, topic: TopicFilter) {\n  const trimmed = query.trim();\n  const filter = FILTERS.find((candidate) => candidate.id === topic);\n  const topicLabel = filter?.label ?? 'this topic';\n  const hasTopic = topic !== 'all';\n  if (trimmed === '') {\n    return `Nothing in ${topicLabel} yet`;\n  }\n  if (hasTopic) {\n    return `No ${topicLabel} post mentions “${trimmed}”`;\n  }\n  return `No post mentions “${trimmed}”`;\n}\n\nexport default function Blog01() {\n  const {\n    ref,\n    isInView,\n    isAutoplaying,\n    state,\n    act,\n    pressed,\n    isFinished,\n    restart,\n  } = useSession(SESSION);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const posts = postsIn(state);\n  const shownPosts = posts.slice(0, state.visible);\n  const shownCount = shownPosts.length;\n  const hasMore = posts.length > shownCount;\n  const isEmpty = posts.length === 0;\n  const showsFeatured = isBrowsing(state);\n  const layoutKey = shownPosts.map((post) => post.id).join(' ');\n  const message = spokenUnless(isAutoplaying, state.spoken);\n  const canReplay = isFinished && !isAutoplaying;\n  useKeptHeight(ref);\n\n  function pickTopic(values: unknown[]) {\n    const topic = filterOf(values);\n    if (topic) {\n      act({ type: 'topicPicked', topic });\n    }\n  }\n\n  /** The button leaves with the empty state, so the focus goes to the search it emptied. */\n  function showAll() {\n    act({ type: 'cleared' });\n    requestAnimationFrame(() => {\n      const search = ref.current?.querySelector<HTMLElement>('[data-search]');\n      search?.focus();\n    });\n  }\n\n  /** The first card that arrives takes the focus, so the keyboard carries on where the reading does. */\n  function loadMore() {\n    const firstNew = posts[shownCount];\n    act({ type: 'loadedMore' });\n    if (!firstNew) {\n      return;\n    }\n    requestAnimationFrame(() => {\n      const selector = `[data-post=\"${firstNew.id}\"] a`;\n      const link = ref.current?.querySelector<HTMLElement>(selector);\n      link?.focus();\n    });\n  }\n\n  return (\n    <ClockGate isActive={isInView}>\n      <div\n        ref={ref}\n        className='bg-background text-foreground @container min-h-dvh w-full'\n      >\n        <div className='mx-auto flex max-w-6xl flex-col px-4 py-8 @2xl:px-8 @2xl:py-12'>\n          <header className='flex flex-col gap-4 pb-8'>\n            <div className='flex min-h-7 items-center gap-2 text-[13px]'>\n              <CompanyMark seed={BLOG.company} />\n              <span className='font-medium'>{BLOG.company}</span>\n              <span className='text-muted-foreground'>/ Blog</span>\n              <span className='flex-1' />\n              <ReplayButton\n                isShown={canReplay}\n                onReplay={restart}\n                label='Replay'\n              />\n            </div>\n            <div className='flex flex-col gap-2'>\n              <h1 className='text-2xl font-semibold text-balance @sm:text-3xl'>\n                {BLOG.name}\n              </h1>\n              <p className='text-muted-foreground max-w-xl text-sm text-pretty'>\n                {BLOG.lead}\n              </p>\n            </div>\n          </header>\n\n          <AnimatePresence initial={false}>\n            {showsFeatured && (\n              <motion.div\n                key='featured'\n                className='-mx-1 -mt-1 overflow-hidden px-1 pt-1'\n                {...rowPresenceOf(shouldReduceMotion)}\n              >\n                <div className='pb-8'>\n                  <FeaturedPost post={FEATURED} />\n                </div>\n              </motion.div>\n            )}\n          </AnimatePresence>\n\n          <div className='flex flex-col gap-8'>\n            <div className='flex flex-col gap-3 @2xl:flex-row @2xl:items-center'>\n              <ToggleGroup\n                aria-label='Topics'\n                value={[state.topic]}\n                onValueChange={pickTopic}\n                travel\n                indicatorClassName={THUMB}\n                className='bg-foreground/[0.04] flex-wrap rounded-xl p-1'\n              >\n                {FILTERS.map((filter) => (\n                  <ToggleGroupItem\n                    key={filter.id}\n                    value={filter.id}\n                    className={cn(\n                      'h-7 gap-1.5 rounded-lg px-2.5 text-xs',\n                      pressedQuietOf(pressed === `topic-${filter.id}`)\n                    )}\n                  >\n                    {filter.label}\n                    <span className='text-muted-foreground tabular-nums'>\n                      {countOfTopic(filter.id)}\n                    </span>\n                  </ToggleGroupItem>\n                ))}\n              </ToggleGroup>\n              <div className='relative w-full @2xl:ms-auto @2xl:w-60'>\n                <SearchIcon className='text-muted-foreground pointer-events-none absolute start-2.5 top-1/2 size-4 -translate-y-1/2' />\n                <Input\n                  type='search'\n                  data-search\n                  aria-label='Search posts'\n                  placeholder='Search posts'\n                  autoComplete='off'\n                  value={state.query}\n                  onChange={(event) =>\n                    act({ type: 'searched', query: event.target.value })\n                  }\n                  className='ps-8'\n                />\n              </div>\n            </div>\n\n            {isEmpty && (\n              <div className='bg-foreground/[0.025] flex flex-col items-center gap-3 rounded-2xl px-6 py-14 text-center transition-opacity duration-200 starting:opacity-0'>\n                <span className='keycap-3d flex size-10 items-center justify-center rounded-xl'>\n                  <SearchIcon className='text-muted-foreground size-5' />\n                </span>\n                <p className='text-sm font-medium text-balance'>\n                  {emptyLineOf(state.query, state.topic)}\n                </p>\n                <p className='text-muted-foreground max-w-sm text-[13px] text-pretty'>\n                  Try a shorter word, or look through every topic.\n                </p>\n                <Button type='button' variant='outline' onClick={showAll}>\n                  Show all posts\n                </Button>\n              </div>\n            )}\n\n            {!isEmpty && (\n              <ul className='relative grid gap-x-3 gap-y-5 @lg:grid-cols-2 @3xl:grid-cols-3'>\n                <AnimatePresence mode='popLayout' initial={false}>\n                  {shownPosts.map((post) => (\n                    <motion.li\n                      key={post.id}\n                      data-post={post.id}\n                      layout\n                      layoutDependency={layoutKey}\n                      initial={arrivingOf(shouldReduceMotion)}\n                      animate={ARRIVED}\n                      exit={{ opacity: 0, transition: LEAVE }}\n                      transition={glideOf(shouldReduceMotion)}\n                    >\n                      <PostCard post={post} />\n                    </motion.li>\n                  ))}\n                </AnimatePresence>\n              </ul>\n            )}\n\n            {!isEmpty && (\n              <div className='flex flex-col items-center gap-3'>\n                <p className='text-muted-foreground text-xs tabular-nums'>\n                  <WordRoll\n                    text={shownLineOf(shownCount, posts.length)}\n                    value={shownCount}\n                  />\n                </p>\n                {hasMore && (\n                  <Button\n                    type='button'\n                    variant='outline'\n                    onClick={loadMore}\n                    className={pressedQuietOf(pressed === 'load-more')}\n                  >\n                    Load more posts\n                  </Button>\n                )}\n              </div>\n            )}\n          </div>\n        </div>\n        <LiveRegion message={message} />\n      </div>\n    </ClockGate>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/blog-01/index.tsx"
    },
    {
      "path": "registry/ndeko/blocks/blog/blog-01/post-card.tsx",
      "content": "import { seriesColorOf } from '@/registry/ndeko/lib/agent-run';\nimport { FOCUS_RING } from '@/registry/ndeko/lib/recipes';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Avatar } from '@/registry/ndeko/ui/avatar';\nimport { Chip } from '@/registry/ndeko/ui/chip';\nimport { Wash } from '@/registry/ndeko/ui/wash';\n\nimport { Cover } from './cover';\nimport { topicOf, type Post } from './data';\n\nconst LINK =\n  'group flex h-full rounded-xl transition-[background-color,scale] duration-150 ease-(--ease-out-strong) active:scale-[0.97]';\n\nfunction TopicLine({ post }: { post: Post }) {\n  const topic = topicOf(post.topic);\n  const color = seriesColorOf(topic.series);\n\n  return (\n    <p className='flex items-center gap-2 text-xs'>\n      <Chip color={color}>{topic.label}</Chip>\n      <span className='text-muted-foreground tabular-nums'>\n        {post.minutes} min read\n      </span>\n    </p>\n  );\n}\n\nfunction Byline({ post }: { post: Post }) {\n  return (\n    <p className='flex min-w-0 items-center gap-2 text-xs'>\n      <Avatar seed={post.author} className='size-5' />\n      <span className='truncate'>{post.author}</span>\n      <span aria-hidden='true' className='text-muted-foreground'>\n        ·\n      </span>\n      <time dateTime={post.isoDate} className='text-muted-foreground shrink-0'>\n        {post.date}\n      </time>\n    </p>\n  );\n}\n\nexport function PostCard({ post }: { post: Post }) {\n  return (\n    <article className='h-full'>\n      <a\n        href={post.href}\n        className={cn(\n          LINK,\n          'hover:bg-foreground/[0.03] flex-col gap-3 p-2',\n          FOCUS_RING\n        )}\n      >\n        <Cover topic={post.topic} seed={post.id} />\n        <div className='flex flex-1 flex-col gap-2 px-1 pb-1'>\n          <TopicLine post={post} />\n          <h3 className='text-base font-semibold text-balance'>{post.title}</h3>\n          <p className='text-muted-foreground line-clamp-3 text-[13px] text-pretty'>\n            {post.excerpt}\n          </p>\n          <div className='mt-auto pt-1'>\n            <Byline post={post} />\n          </div>\n        </div>\n      </a>\n    </article>\n  );\n}\n\nexport function FeaturedPost({ post }: { post: Post }) {\n  return (\n    <article className='bg-card hairline-ring ring-border dark:bg-foreground/[0.03] relative isolate rounded-2xl shadow-[0_1px_2px_rgb(0_0_0/0.04)]'>\n      <Wash />\n      <a\n        href={post.href}\n        className={cn(\n          LINK,\n          'flex-col gap-4 p-2 active:scale-[0.99] @3xl:grid @3xl:grid-cols-[1.1fr_1fr] @3xl:gap-6',\n          FOCUS_RING\n        )}\n      >\n        <Cover topic={post.topic} seed={post.id} size='featured' />\n        <div className='flex flex-col gap-3 px-2 pb-2 @3xl:py-6 @3xl:pe-6'>\n          <p className='text-primary-ink text-xs font-medium'>Latest post</p>\n          <TopicLine post={post} />\n          <h2 className='text-xl font-semibold text-balance @3xl:text-2xl'>\n            {post.title}\n          </h2>\n          <p className='text-muted-foreground text-sm text-pretty'>\n            {post.excerpt}\n          </p>\n          <div className='mt-auto pt-2'>\n            <Byline post={post} />\n          </div>\n        </div>\n      </a>\n    </article>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/blog-01/post-card.tsx"
    },
    {
      "path": "registry/ndeko/blocks/blog/blog-01/cover.tsx",
      "content": "import { seriesColorOf } from '@/registry/ndeko/lib/agent-run';\nimport { hatchOf } from '@/registry/ndeko/lib/hatch';\nimport { hashOf, pickedFrom } from '@/registry/ndeko/lib/seeded';\nimport { cn } from '@/registry/ndeko/lib/utils';\n\nimport { TOPIC_GLYPH, topicOf, type TopicId } from './data';\n\ntype CoverStyle = React.CSSProperties & { '--topic': string };\n\ntype GemStyle = React.CSSProperties & { '--gem': string };\n\ntype Placement = {\n  gem: string;\n  near: string;\n  far: string;\n};\n\n/** A post always lands on the same placement, so its cover never changes between visits. */\nconst PLACEMENTS: Placement[] = [\n  {\n    gem: 'left-[24%] top-[52%]',\n    near: 'left-[40%] top-[30%]',\n    far: 'left-[54%] top-[66%]',\n  },\n  {\n    gem: 'left-1/2 top-[46%]',\n    near: 'left-[30%] top-[66%]',\n    far: 'left-[70%] top-[28%]',\n  },\n  {\n    gem: 'left-[72%] top-[52%]',\n    near: 'left-[54%] top-[28%]',\n    far: 'left-[38%] top-[66%]',\n  },\n];\n\nconst PLATE = 'absolute -translate-x-1/2 -translate-y-1/2';\n\nconst GHOST =\n  'bg-[color-mix(in_oklab,var(--topic)_10%,transparent)] shadow-[inset_0_0_0_1px_color-mix(in_oklab,var(--topic)_30%,transparent)]';\n\nconst SIZE_CLASS = {\n  card: {\n    frame: 'aspect-[16/9] rounded-lg',\n    gem: 'size-12 rounded-[14px] [&_svg]:size-6',\n    ghost: 'size-9 rounded-[11px]',\n  },\n  featured: {\n    frame: 'aspect-[16/9] rounded-xl @3xl:aspect-auto @3xl:h-full',\n    gem: 'size-16 rounded-[18px] [&_svg]:size-8',\n    ghost: 'size-12 rounded-[14px]',\n  },\n};\n\ntype CoverProps = {\n  topic: TopicId;\n  seed: string;\n  size?: keyof typeof SIZE_CLASS;\n};\n\nexport function Cover({ topic, seed, size = 'card' }: CoverProps) {\n  const Glyph = TOPIC_GLYPH[topic];\n  const { series } = topicOf(topic);\n  const color = seriesColorOf(series);\n  const hash = hashOf(seed);\n  const placement = pickedFrom(PLACEMENTS, hash);\n  const sizeClass = SIZE_CLASS[size];\n  const coverStyle: CoverStyle = {\n    '--topic': color,\n    backgroundColor: 'color-mix(in oklab, var(--topic) 9%, var(--card))',\n  };\n  const hatchStyle = {\n    backgroundImage: hatchOf('var(--topic)', 14),\n    maskImage: 'linear-gradient(to left, black, transparent 75%)',\n  };\n  const gemStyle: GemStyle = { '--gem': color };\n\n  return (\n    <div\n      aria-hidden='true'\n      style={coverStyle}\n      className={cn('relative isolate w-full overflow-hidden', sizeClass.frame)}\n    >\n      <span style={hatchStyle} className='absolute inset-0' />\n      <span className={cn(PLATE, GHOST, sizeClass.ghost, placement.far)} />\n      <span className={cn(PLATE, GHOST, sizeClass.ghost, placement.near)} />\n      <span\n        style={gemStyle}\n        className={cn(\n          PLATE,\n          'gem-plate flex items-center justify-center',\n          sizeClass.gem,\n          placement.gem\n        )}\n      >\n        <Glyph />\n      </span>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/blog-01/cover.tsx"
    },
    {
      "path": "registry/ndeko/blocks/blog/blog-01/session.ts",
      "content": "import type { SessionStep } from '@/registry/ndeko/hooks/use-session';\n\nimport { POSTS, topicOf, type Post, type TopicId } from './data';\n\nexport type TopicFilter = TopicId | 'all';\n\nexport type BlogState = {\n  topic: TopicFilter;\n  query: string;\n  visible: number;\n  spoken: string;\n};\n\nexport type BlogAction =\n  | { type: 'topicPicked'; topic: TopicFilter }\n  | { type: 'searched'; query: string }\n  | { type: 'loadedMore' }\n  | { type: 'cleared' };\n\ntype Step = SessionStep<BlogState, BlogAction>;\n\nexport const PAGE_SIZE = 6;\n\n/** One more row of the widest grid. */\nconst LOAD_STEP = 3;\n\nexport const FEATURED = POSTS[0];\n\nexport const INITIAL: BlogState = {\n  topic: 'all',\n  query: '',\n  visible: PAGE_SIZE,\n  spoken: '',\n};\n\nfunction wordsOf(query: string) {\n  const trimmed = query.trim();\n  const lowered = trimmed.toLowerCase();\n  const pieces = lowered.split(/\\s+/);\n  return pieces.filter((piece) => piece !== '');\n}\n\nfunction matchesQuery(post: Post, words: string[]) {\n  const text = `${post.title} ${post.excerpt}`.toLowerCase();\n  return words.every((word) => text.includes(word));\n}\n\nfunction matchesTopic(post: Post, topic: TopicFilter) {\n  if (topic === 'all') {\n    return true;\n  }\n  return post.topic === topic;\n}\n\n/** With no topic and no search, the newest post sits apart as the featured one. */\nexport function isBrowsing(state: BlogState) {\n  const hasQuery = wordsOf(state.query).length > 0;\n  return state.topic === 'all' && !hasQuery;\n}\n\nexport function postsIn(state: BlogState) {\n  const words = wordsOf(state.query);\n  const matching = POSTS.filter((post) => {\n    const isInTopic = matchesTopic(post, state.topic);\n    return isInTopic && matchesQuery(post, words);\n  });\n  if (isBrowsing(state)) {\n    return matching.filter((post) => post.id !== FEATURED.id);\n  }\n  return matching;\n}\n\nexport function countOfTopic(topic: TopicFilter) {\n  const inTopic = POSTS.filter((post) => matchesTopic(post, topic));\n  return inTopic.length;\n}\n\nfunction postsWordOf(count: number) {\n  if (count === 1) {\n    return '1 post';\n  }\n  return `${count} posts`;\n}\n\nfunction topicNameOf(topic: TopicFilter) {\n  if (topic === 'all') {\n    return 'all topics';\n  }\n  return topicOf(topic).label;\n}\n\nfunction foundLineOf(state: BlogState) {\n  const count = postsIn(state).length;\n  if (count === 0) {\n    return 'No posts match';\n  }\n  return `${postsWordOf(count)} in ${topicNameOf(state.topic)}`;\n}\n\nfunction filtered(state: BlogState, change: Partial<BlogState>): BlogState {\n  const next = { ...state, ...change, visible: PAGE_SIZE };\n  return { ...next, spoken: foundLineOf(next) };\n}\n\nfunction loadedMore(state: BlogState): BlogState {\n  const total = postsIn(state).length;\n  const visible = Math.min(state.visible + LOAD_STEP, total);\n  const added = visible - state.visible;\n  if (added <= 0) {\n    return state;\n  }\n  return { ...state, visible, spoken: `${postsWordOf(added)} more` };\n}\n\nexport function reducer(state: BlogState, action: BlogAction): BlogState {\n  switch (action.type) {\n    case 'topicPicked':\n      return filtered(state, { topic: action.topic });\n    case 'searched':\n      return filtered(state, { query: action.query });\n    case 'loadedMore':\n      return loadedMore(state);\n    case 'cleared':\n      return filtered(state, { topic: 'all', query: '' });\n  }\n}\n\n/**\n * A reader loads another row, narrows to Design and comes back to every topic. Picking a topic\n * starts the list from its first page, so the round ends on the page it began with.\n */\nexport const SCRIPT: Step[] = [\n  {\n    after: 1700,\n    by: 'demo',\n    press: 'load-more',\n    action: { type: 'loadedMore' },\n  },\n  {\n    after: 2600,\n    by: 'demo',\n    press: 'topic-design',\n    action: { type: 'topicPicked', topic: 'design' },\n  },\n  {\n    after: 2800,\n    by: 'demo',\n    press: 'topic-all',\n    action: { type: 'topicPicked', topic: 'all' },\n  },\n];\n\nexport const RESTING: BlogState = INITIAL;\n\nexport const LOOP_AFTER_MS = 2600;\n",
      "type": "registry:component",
      "target": "components/blocks/blog-01/session.ts"
    },
    {
      "path": "registry/ndeko/blocks/blog/blog-01/data.ts",
      "content": "import type { SeriesSlot } from '@/registry/ndeko/lib/agent-run';\nimport {\n  BoxIcon,\n  BrushIcon,\n  CodeIcon,\n  MapPinIcon,\n  UsersIcon,\n  type Icon,\n} from '@/registry/ndeko/lib/icons';\n\nexport type TopicId =\n  'engineering' | 'product' | 'design' | 'field' | 'company';\n\nexport type Topic = {\n  id: TopicId;\n  label: string;\n  series: SeriesSlot;\n};\n\nexport type Post = {\n  id: string;\n  title: string;\n  excerpt: string;\n  topic: TopicId;\n  author: string;\n  date: string;\n  isoDate: string;\n  minutes: number;\n  href: string;\n};\n\nexport const BLOG = {\n  company: 'Saltmarsh',\n  name: 'Field notes',\n  lead: 'What we learn building Saltmarsh, and what surveyors teach us on the way',\n  homeHref: '#',\n};\n\nexport const TOPICS: Topic[] = [\n  { id: 'engineering', label: 'Engineering', series: 1 },\n  { id: 'product', label: 'Product', series: 2 },\n  { id: 'design', label: 'Design', series: 3 },\n  { id: 'field', label: 'Field stories', series: 4 },\n  { id: 'company', label: 'Company', series: 5 },\n];\n\nexport const TOPIC_GLYPH: Record<TopicId, Icon> = {\n  engineering: CodeIcon,\n  product: BoxIcon,\n  design: BrushIcon,\n  field: MapPinIcon,\n  company: UsersIcon,\n};\n\nexport const POSTS: Post[] = [\n  {\n    id: 'offline-sync',\n    title: 'Offline sync that survives a week without signal',\n    excerpt:\n      'Surveyors spend days on islands with no network. We rebuilt sync around a log of small changes that merge cleanly when the boat gets back to the harbour.',\n    topic: 'engineering',\n    author: 'Ines Duarte',\n    date: '4 Nov 2026',\n    isoDate: '2026-11-04',\n    minutes: 9,\n    href: '#offline-sync',\n  },\n  {\n    id: 'gloved-picker',\n    title: 'A species picker for gloved hands',\n    excerpt:\n      'Targets twice the usual size, the last five species one tap away, and no gesture that needs two fingers on a cold morning.',\n    topic: 'design',\n    author: 'Maarten de Vries',\n    date: '28 Oct 2026',\n    isoDate: '2026-10-28',\n    minutes: 6,\n    href: '#gloved-picker',\n  },\n  {\n    id: 'photo-pins',\n    title: 'Photos that keep their place on the map',\n    excerpt:\n      'Every photo now carries the point it was taken from, so a quadrat shot in May lines up with the same quadrat in September.',\n    topic: 'product',\n    author: 'Hannah Okafor',\n    date: '21 Oct 2026',\n    isoDate: '2026-10-21',\n    minutes: 4,\n    href: '#photo-pins',\n  },\n  {\n    id: 'curlews',\n    title: 'Counting curlews at dawn on the estuary',\n    excerpt:\n      'A volunteer team logged their winter counts on one shared form. What worked, what the tide got wrong, and what we changed after.',\n    topic: 'field',\n    author: 'Rhys Morgan',\n    date: '14 Oct 2026',\n    isoDate: '2026-10-14',\n    minutes: 7,\n    href: '#curlews',\n  },\n  {\n    id: 'search-on-phone',\n    title: 'Why we moved search into the phone',\n    excerpt:\n      'Looking up a species should not wait for a server. The whole checklist now ships with the app and answers in a few milliseconds.',\n    topic: 'engineering',\n    author: 'Ines Duarte',\n    date: '7 Oct 2026',\n    isoDate: '2026-10-07',\n    minutes: 8,\n    href: '#search-on-phone',\n  },\n  {\n    id: 'shared-forms',\n    title: 'Shared survey forms, without the spreadsheet',\n    excerpt:\n      'Build a form once, send it to the whole team, and see every visit arrive in one table instead of twelve attachments.',\n    topic: 'product',\n    author: 'Hannah Okafor',\n    date: '30 Sep 2026',\n    isoDate: '2026-09-30',\n    minutes: 5,\n    href: '#shared-forms',\n  },\n  {\n    id: 'full-sun',\n    title: 'Colours you can read in full sun',\n    excerpt:\n      'We took the app to a salt flat at noon and changed half the palette. Contrast numbers on a desk do not survive the glare.',\n    topic: 'design',\n    author: 'Maarten de Vries',\n    date: '23 Sep 2026',\n    isoDate: '2026-09-23',\n    minutes: 5,\n    href: '#full-sun',\n  },\n  {\n    id: 'bat-battery',\n    title: 'What a bat survey taught us about battery life',\n    excerpt:\n      'Night transects run for hours with the screen dimmed. We found the three things that drained phones before midnight.',\n    topic: 'engineering',\n    author: 'Tobias Lind',\n    date: '16 Sep 2026',\n    isoDate: '2026-09-16',\n    minutes: 6,\n    href: '#bat-battery',\n  },\n  {\n    id: 'export-format',\n    title: 'Exporting to the national records format',\n    excerpt:\n      'One button now turns a season of visits into a file the records centre accepts, with grid references in the shape they expect.',\n    topic: 'product',\n    author: 'Hannah Okafor',\n    date: '9 Sep 2026',\n    isoDate: '2026-09-09',\n    minutes: 3,\n    href: '#export-format',\n  },\n  {\n    id: 'seabirds',\n    title: 'Two seasons on the seabird count',\n    excerpt:\n      'Cliff ledges, sea fog and a ferry that runs twice a week. A field lead on planning a count around the weather.',\n    topic: 'field',\n    author: 'Rhys Morgan',\n    date: '2 Sep 2026',\n    isoDate: '2026-09-02',\n    minutes: 8,\n    href: '#seabirds',\n  },\n  {\n    id: 'first-year',\n    title: 'Our first year as a team of nine',\n    excerpt:\n      'Why we still answer every support message ourselves, and the two hires we would make again tomorrow.',\n    topic: 'company',\n    author: 'Clara Benn',\n    date: '26 Aug 2026',\n    isoDate: '2026-08-26',\n    minutes: 4,\n    href: '#first-year',\n  },\n  {\n    id: 'boat-testing',\n    title: 'Testing the app on a boat, on purpose',\n    excerpt:\n      'Spray, gloves and a horizon that will not hold still. The test day that now opens every release.',\n    topic: 'engineering',\n    author: 'Tobias Lind',\n    date: '19 Aug 2026',\n    isoDate: '2026-08-19',\n    minutes: 5,\n    href: '#boat-testing',\n  },\n];\n\nexport function topicOf(id: TopicId) {\n  const topic = TOPICS.find((candidate) => candidate.id === id);\n  return topic ?? TOPICS[0];\n}\n",
      "type": "registry:component",
      "target": "components/blocks/blog-01/data.ts"
    }
  ],
  "categories": [
    "blocks",
    "blog"
  ],
  "type": "registry:block"
}