{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "mobile",
  "title": "Mobile",
  "author": "superzero11 <https://github.com/superzero11/uiset>",
  "description": "Phone app parts on UI SDK: rows that swipe aside to actions (createSwipeActions), wheel pickers and a time wheel (bindScrollPicker), bottom sheets and action sheets (Drawer), pull to refresh, an app bar and a tab bar.",
  "dependencies": [
    "@ui-sdk/core@0.1.0-beta.5",
    "@ui-sdk/react@0.1.0-beta.5"
  ],
  "registryDependencies": [
    "https://uiset.dev/r/uiset.json",
    "https://uiset.dev/r/button.json",
    "https://uiset.dev/r/drawer.json",
    "https://uiset.dev/r/listbox.json",
    "https://uiset.dev/r/menu.json"
  ],
  "files": [
    {
      "path": "registry/uiset/ui/mobile.tsx",
      "content": "\"use client\"\n\nimport { announce, bindDrag, bindScrollPicker } from \"@ui-sdk/core\"\nimport { rubberBand } from \"@ui-sdk/core/gesture\"\nimport { usePart, usePrimitive, type PartProps } from \"@ui-sdk/react/primitive\"\nimport {\n  useEffect,\n  useEffectEvent,\n  useId,\n  useLayoutEffect,\n  useRef,\n  useState,\n  type CSSProperties,\n  type ReactNode,\n} from \"react\"\nimport { Button } from \"./button\"\nimport {\n  Drawer,\n  DrawerBackdrop,\n  DrawerClose,\n  DrawerContent,\n  DrawerDescription,\n  DrawerHandle,\n  DrawerTitle,\n  createDrawerController,\n} from \"./drawer\"\nimport { Listbox, ListboxItem } from \"./listbox\"\nimport { Menu, MenuContent, MenuItem, MenuTrigger } from \"./menu\"\nimport { Icon, type IconName } from \"./shell/icons\"\nimport { swipeList, type SwipeSide } from \"./mobile/swipe-list\"\nimport { keepWheelOnValue } from \"./mobile/wheel\"\nimport \"./shell/shell.css\"\nimport \"./mobile/mobile.css\"\n\n/* ------------------------------------------------------------------ Swipe list */\n\ntype SwipeAction = {\n  id: string\n  label: string\n  icon?: IconName\n  /** Colors the action: \"danger\" for delete, \"accent\" for the rest. */\n  tone?: \"danger\" | \"accent\" | \"neutral\"\n}\n\ntype SwipeListItem = {\n  id: string\n  /** Shown on the row; also its name for screen readers unless `label` says otherwise. */\n  content: ReactNode\n  label?: string\n  /** Actions shown by swiping toward the end (left to right in English): usually one, like Mark read. */\n  start?: SwipeAction[]\n  /** Actions shown by swiping toward the start: usually Archive or Delete. */\n  end?: SwipeAction[]\n}\n\nfunction SwipeRowPart({ value, ...props }: { value: string } & PartProps<\"li\">) {\n  return usePart(swipeList, \"row\", { value }, props, \"li\")\n}\nfunction SwipeContentPart({ value, ...props }: { value: string } & PartProps<\"div\">) {\n  return usePart(swipeList, \"content\", { value }, props, \"div\")\n}\nfunction SwipeActionsPart({ row, side, ...props }: { row: string; side: SwipeSide } & PartProps<\"div\">) {\n  return usePart(swipeList, \"actions\", { value: `${row}:${side}`, row, side }, props, \"div\")\n}\n\ntype SwipeListMessages = {\n  /** How the keys work, read with each row that has actions. */\n  help: string\n  /** The name of a row's actions menu. */\n  actionsFor: (row: string) => string\n}\n\n/**\n * Rows that swipe aside to their actions. Swipe far enough to run the first action; with\n * the keyboard, arrows go between rows, Left and Right show a row's actions, Escape hides\n * them and Enter opens the row. Each row also has an Actions menu, for screen readers on\n * touch screens and in browse mode, where neither swipes nor arrows reach the actions.\n */\nfunction SwipeList({\n  label,\n  items,\n  onOpen,\n  onAction,\n  fullSwipe = 0.6,\n  messages,\n  className,\n}: {\n  label: string\n  items: SwipeListItem[]\n  onOpen?: (id: string) => void\n  /** Runs an action, from a press, a long swipe, the menu or an agent. */\n  onAction: (id: string, action: string) => void\n  fullSwipe?: number\n  messages?: Partial<SwipeListMessages>\n  className?: string\n}) {\n  const baseId = useId()\n  const words: SwipeListMessages = {\n    help: onOpen\n      ? \"Left and Right show this row's actions; Escape hides them; Enter opens it.\"\n      : \"Left and Right show this row's actions; Escape hides them.\",\n    actionsFor: (row) => `Actions for ${row}`,\n    ...messages,\n  }\n  const byId = new Map(items.map((item) => [item.id, item]))\n  const nameOf = (row: SwipeListItem) => row.label ?? document.getElementById(`${baseId}-${row.id}`)?.textContent ?? row.id\n  const handle = usePrimitive(swipeList, {\n    onOpen,\n    onAction: (key, { action }) => onAction(key, action),\n    fullSwipe,\n    // Agents run safe actions by name; a dangerous one goes through the row's menu, which asks.\n    actionsOf: (key) => {\n      const row = byId.get(key)\n      if (!row) return []\n      return [...(row.start ?? []), ...(row.end ?? [])].map((action) => ({\n        id: action.id,\n        label: action.label,\n        confirm: confirmOf(row, action),\n        via: words.actionsFor(row.label ?? nameOf(row)),\n      }))\n    },\n    rows: () => items.map((row) => ({ value: row.id, label: nameOf(row) })),\n    onFullSwipe: (key, side) => {\n      const row = byId.get(key)\n      const first = row?.[side]?.[0]\n      if (!row || !first) return false\n      onAction(key, first.id)\n      announce(`${first.label}: ${nameOf(row)}`)\n      return true\n    },\n    disabled: (key) => !byId.get(key)?.start?.length && !byId.get(key)?.end?.length,\n  })\n  // An action hands focus back to its row (or, if the row goes, the row now in its place).\n  const run = (row: string, action: SwipeAction) => handle.api.act(row, action.id)\n  const confirmOf = (row: SwipeListItem, action: SwipeAction) =>\n    action.tone === \"danger\" ? `${action.label}: ${nameOf(row)}` : undefined\n  const actions = (row: SwipeListItem, side: SwipeSide) => {\n    const list = row[side]\n    if (!list?.length) return null\n    return (\n      <SwipeActionsPart row={row.id} side={side} className=\"swipe-actions\" data-side={side}>\n        {list.map((action) => (\n          <button\n            key={action.id}\n            type=\"button\"\n            className=\"swipe-action\"\n            data-tone={action.tone ?? \"accent\"}\n            data-agent-confirm={confirmOf(row, action)}\n            onClick={() => run(row.id, action)}\n          >\n            {action.icon && <Icon name={action.icon} />}\n            {action.label}\n          </button>\n        ))}\n      </SwipeActionsPart>\n    )\n  }\n  return usePart(\n    handle,\n    \"root\",\n    {},\n    {\n      \"aria-label\": label,\n      className: [\"swipe-list\", className].filter(Boolean).join(\" \"),\n      children: (\n        <>\n          {items.map((row) => {\n            const all = [...(row.start ?? []), ...(row.end ?? [])]\n            return (\n              <SwipeRowPart\n                key={row.id}\n                value={row.id}\n                className=\"swipe-row\"\n                // Named by its label, or by its content when it has none.\n                aria-label={row.label}\n                aria-labelledby={row.label ? undefined : `${baseId}-${row.id}`}\n                aria-describedby={all.length ? `${baseId}-help` : undefined}\n              >\n                {actions(row, \"start\")}\n                {actions(row, \"end\")}\n                <SwipeContentPart value={row.id} className=\"swipe-content\">\n                  <span id={`${baseId}-${row.id}`} className=\"swipe-content-body\">\n                    {row.content}\n                  </span>\n                  {all.length > 0 && (\n                    <Menu onAction={(id: unknown) => onAction(row.id, String(id))}>\n                      {/* Out of the tab order (rows are one stop, with arrows), but there for\n                          screen readers' own navigation; it shows when it has focus. */}\n                      <MenuTrigger\n                        className=\"swipe-menu\"\n                        data-swipe-menu=\"\"\n                        tabIndex={-1}\n                        aria-label={row.label ? words.actionsFor(row.label) : undefined}\n                        // A row without a label is named by its content, which is on the page once\n                        // it commits.\n                        ref={row.label ? undefined : (el: HTMLElement | null) => el?.setAttribute(\"aria-label\", words.actionsFor(nameOf(row)))}\n                      >\n                        <Icon name=\"more\" />\n                      </MenuTrigger>\n                      <MenuContent>\n                        {all.map((action) => (\n                          <MenuItem\n                            key={action.id}\n                            value={action.id}\n                            destructive={action.tone === \"danger\"}\n                            data-agent-confirm={confirmOf(row, action)}\n                          >\n                            {action.label}\n                          </MenuItem>\n                        ))}\n                      </MenuContent>\n                    </Menu>\n                  )}\n                </SwipeContentPart>\n              </SwipeRowPart>\n            )\n          })}\n          <li hidden id={`${baseId}-help`}>\n            {words.help}\n          </li>\n        </>\n      ),\n    } as never,\n    \"ul\",\n  )\n}\n\n/* ---------------------------------------------------------------- Wheel picker */\n\ntype WheelOption = { value: string; label: string; disabled?: boolean }\n\n/**\n * A wheel you scroll to choose from, like a time picker's drums: the option in the middle is\n * the value. On UI SDK's Listbox with bindScrollPicker, so arrows, Home, End and typing work.\n */\nfunction WheelPicker({\n  label,\n  options,\n  value,\n  onValueChange,\n  className,\n}: {\n  label: string\n  options: WheelOption[]\n  value: string\n  onValueChange: (value: string) => void\n  className?: string\n}) {\n  const list = useRef<HTMLDivElement>(null)\n  const select = useEffectEvent((index: number) => {\n    const option = options[index]\n    if (option && option.value !== value) onValueChange(option.value)\n  })\n  // The picker puts the value in the band before the first paint, and glides to a new one.\n  useLayoutEffect(() => {\n    const stop = bindScrollPicker(list.current!, { onSelect: (index) => select(index) })\n    const keep = keepWheelOnValue(list.current!)\n    return () => {\n      stop()\n      keep()\n    }\n  }, [])\n  // Focus in the wheel stays on its value. A value set from elsewhere (a parent, an agent)\n  // would otherwise leave focus on the old option, and anything that reveals the focused\n  // element, like a sheet settling, would scroll the wheel back and choose it again.\n  useLayoutEffect(() => {\n    const el = list.current\n    const focused = document.activeElement\n    if (!el || !(focused instanceof HTMLElement) || !el.contains(focused)) return\n    if (focused.getAttribute(\"aria-selected\") === \"true\") return\n    el.querySelector<HTMLElement>('[aria-selected=\"true\"]')?.focus({ preventScroll: true })\n  }, [value])\n  return (\n    <div className={[\"wheel\", className].filter(Boolean).join(\" \")}>\n      <Listbox\n        ref={list}\n        className=\"wheel-list\"\n        aria-label={label}\n        keepInView={false}\n        value={value}\n        onValueChange={(next: unknown) => next != null && onValueChange(String(next))}\n      >\n        {options.map((option) => (\n          <ListboxItem key={option.value} value={option.value} disabled={option.disabled} className=\"wheel-option\">\n            {option.label}\n          </ListboxItem>\n        ))}\n      </Listbox>\n    </div>\n  )\n}\n\ntype TimeWheelLabels = { hour: string; minute: string; period: string; am: string; pm: string }\n\n/** Hours and minutes on two wheels (and AM/PM with a 12-hour clock), as \"HH:MM\". */\nfunction TimeWheel({\n  label = \"Time\",\n  value,\n  onValueChange,\n  minuteStep = 5,\n  hour12 = true,\n  labels: given,\n}: {\n  label?: string\n  /** 24-hour \"HH:MM\". */\n  value: string\n  onValueChange: (value: string) => void\n  minuteStep?: number\n  hour12?: boolean\n  /** The wheels' words, for other languages. Each wheel is named with the group's label first. */\n  labels?: Partial<TimeWheelLabels>\n}) {\n  const words: TimeWheelLabels = { hour: \"hour\", minute: \"minute\", period: \"AM or PM\", am: \"AM\", pm: \"PM\", ...given }\n  const [h, m] = value.split(\":\").map(Number) as [number, number]\n  const pad = (n: number) => String(n).padStart(2, \"0\")\n  const set = (hour: number, minute: number) => onValueChange(`${pad(hour)}:${pad(minute)}`)\n  // The steps, plus the value's own minute when it falls between them, so the wheel shows it.\n  const minutes = [...new Set([...Array.from({ length: Math.ceil(60 / minuteStep) }, (_, i) => i * minuteStep), m])].sort((a, b) => a - b)\n  const groupId = useId()\n  return (\n    <div className=\"wheel-group\" role=\"group\" aria-labelledby={groupId}>\n      <span id={groupId} className=\"uiset-visually-hidden\">\n        {label}\n      </span>\n      <WheelPicker\n        label={`${label}, ${words.hour}`}\n        options={(hour12 ? Array.from({ length: 12 }, (_, i) => i + 1) : Array.from({ length: 24 }, (_, i) => i)).map((n) => ({\n          value: String(n),\n          label: hour12 ? String(n) : pad(n),\n        }))}\n        value={String(hour12 ? ((h + 11) % 12) + 1 : h)}\n        onValueChange={(next) => set(hour12 ? (Number(next) % 12) + (h >= 12 ? 12 : 0) : Number(next), m)}\n      />\n      <span className=\"wheel-colon\" aria-hidden=\"true\">\n        :\n      </span>\n      <WheelPicker\n        label={`${label}, ${words.minute}`}\n        options={minutes.map((n) => ({ value: String(n), label: pad(n) }))}\n        value={String(m)}\n        onValueChange={(next) => set(h, Number(next))}\n      />\n      {hour12 && (\n        <WheelPicker\n          label={`${label}, ${words.period}`}\n          options={[\n            { value: \"am\", label: words.am },\n            { value: \"pm\", label: words.pm },\n          ]}\n          value={h >= 12 ? \"pm\" : \"am\"}\n          onValueChange={(next) => set((h % 12) + (next === \"pm\" ? 12 : 0), m)}\n        />\n      )}\n    </div>\n  )\n}\n\n/* ---------------------------------------------------------------------- Sheets */\n\ntype SnapPoints = NonNullable<React.ComponentProps<typeof Drawer>[\"snapPoints\"]>\ntype DrawerProps = React.ComponentProps<typeof Drawer>\n\n/**\n * A bottom sheet on UI SDK's Drawer. By default it's as tall as its content. Give it\n * `snapPoints` (like `[0.5, 1]`) to rest at heights you drag between or step through with its\n * handle; it then takes the screen's height, so every point has room. Drawer's other props,\n * like `dismissible` or `defaultOpen`, pass through.\n */\nfunction Sheet({\n  title,\n  description,\n  trigger,\n  snapPoints = [\"content\"],\n  resizeLabel = (name: string) => `Resize ${name}`,\n  children,\n  className,\n  ...drawer\n}: Omit<DrawerProps, \"children\" | \"snapPoints\"> & {\n  title: string\n  description?: string\n  trigger?: ReactNode\n  snapPoints?: SnapPoints\n  /** The handle's name, for other languages. */\n  resizeLabel?: (title: string) => string\n  children: ReactNode\n  className?: string\n}) {\n  const snaps = snapPoints.length > 1\n  return (\n    <Drawer {...drawer} snapPoints={snapPoints} defaultSnapPoint={drawer.defaultSnapPoint ?? snapPoints[0]}>\n      {trigger}\n      <DrawerBackdrop />\n      <DrawerContent className={[\"mobile-sheet\", className].filter(Boolean).join(\" \")} data-snaps={snaps ? \"\" : undefined}>\n        {snaps ? (\n          <DrawerHandle className=\"mobile-sheet-handle\" aria-label={resizeLabel(title)} />\n        ) : (\n          <span className=\"mobile-sheet-handle\" aria-hidden=\"true\" />\n        )}\n        <div className=\"mobile-sheet-head\">\n          <DrawerTitle className=\"mobile-sheet-title\">{title}</DrawerTitle>\n          {description && <DrawerDescription className=\"mobile-sheet-description\">{description}</DrawerDescription>}\n        </div>\n        <div className=\"mobile-sheet-body\">{children}</div>\n      </DrawerContent>\n    </Drawer>\n  )\n}\n\ntype ActionSheetAction = { value: string; label: string; destructive?: boolean }\n\n/** Opens an action sheet from code: `const choice = await sheet.choose()`, or undefined. */\nfunction createActionSheet<Value extends string = string>() {\n  const controller = createDrawerController<undefined, Value>()\n  return { controller, choose: async () => (await controller.open()).returnValue }\n}\ntype ActionSheetController = ReturnType<typeof createActionSheet>\n\n/** A sheet of choices, least risky first, with Cancel at the bottom. */\nfunction ActionSheet({\n  controller,\n  title,\n  description,\n  actions,\n  cancelLabel = \"Cancel\",\n}: {\n  controller: ActionSheetController\n  title: string\n  description?: string\n  actions: ActionSheetAction[]\n  cancelLabel?: string\n}) {\n  return (\n    <Drawer controller={controller.controller}>\n      <DrawerBackdrop />\n      <DrawerContent className=\"mobile-sheet mobile-action-sheet\">\n        <div className=\"mobile-sheet-head\">\n          <DrawerTitle className=\"mobile-sheet-title\">{title}</DrawerTitle>\n          {description && <DrawerDescription className=\"mobile-sheet-description\">{description}</DrawerDescription>}\n        </div>\n        <div className=\"mobile-action-list\">\n          {actions.map((action) => (\n            <DrawerClose\n              key={action.value}\n              value={action.value}\n              className=\"mobile-action\"\n              data-destructive={action.destructive ? \"\" : undefined}\n              // An agent choosing a destructive action waits for the person.\n              data-agent-confirm={action.destructive ? `${action.label} (${title})` : undefined}\n            >\n              {action.label}\n            </DrawerClose>\n          ))}\n        </div>\n        <DrawerClose className=\"mobile-action mobile-action-cancel\">{cancelLabel}</DrawerClose>\n      </DrawerContent>\n    </Drawer>\n  )\n}\n\n/* ------------------------------------------------------------ Bars and refresh */\n\ntype TabBarItem = { id: string; label: string; icon: IconName; href?: string; badge?: number }\n\n/** The bar along the bottom of a phone app: its sections, the current one marked. */\nfunction TabBar({\n  label = \"Sections\",\n  items,\n  value,\n  onValueChange,\n  badgeLabel = (count: number) => `${count} new`,\n}: {\n  label?: string\n  items: TabBarItem[]\n  value: string\n  onValueChange?: (id: string) => void\n  /** How a badge reads, after the item's name, for other languages. */\n  badgeLabel?: (count: number) => string\n}) {\n  return (\n    <nav className=\"mobile-tab-bar\" aria-label={label}>\n      <ul>\n        {items.map((item) => {\n          const current = item.id === value\n          const body = (\n            <>\n              <span className=\"mobile-tab-icon\">\n                <Icon name={item.icon} />\n                {item.badge ? (\n                  <span className=\"mobile-tab-badge\" aria-hidden=\"true\">\n                    {item.badge > 99 ? \"99+\" : item.badge}\n                  </span>\n                ) : null}\n              </span>\n              <span className=\"mobile-tab-label\">{item.label}</span>\n            </>\n          )\n          // The badge is a number on screen; the name says it in words, after the label.\n          const name = item.badge ? `${item.label}, ${badgeLabel(item.badge)}` : undefined\n          return (\n            <li key={item.id}>\n              {item.href ? (\n                <a\n                  className=\"mobile-tab\"\n                  href={item.href}\n                  aria-label={name}\n                  aria-current={current ? \"page\" : undefined}\n                  onClick={(event) => {\n                    // A modified click opens a new tab, leaving this one as it is.\n                    if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0) return\n                    onValueChange?.(item.id)\n                  }}\n                >\n                  {body}\n                </a>\n              ) : (\n                // UI SDK's Button, so agents see and press the sections too.\n                <Button\n                  variant=\"ghost\"\n                  className=\"mobile-tab\"\n                  aria-label={name}\n                  aria-current={current ? \"page\" : undefined}\n                  onClick={() => onValueChange?.(item.id)}\n                >\n                  {body}\n                </Button>\n              )}\n            </li>\n          )\n        })}\n      </ul>\n    </nav>\n  )\n}\n\n/** The bar along the top: back, the screen's title, and its actions. */\nfunction AppBar({\n  title,\n  onBack,\n  backLabel = \"Back\",\n  actions,\n  headingLevel = 1,\n}: {\n  title: ReactNode\n  onBack?: () => void\n  backLabel?: string\n  actions?: ReactNode\n  /** The title's heading level, to fit the page's outline. */\n  headingLevel?: 1 | 2 | 3 | 4 | 5 | 6\n}) {\n  const Heading = `h${headingLevel}` as \"h1\"\n  return (\n    <header className=\"mobile-app-bar\">\n      {onBack ? (\n        <Button variant=\"ghost\" className=\"mobile-app-bar-back\" onClick={onBack}>\n          <Icon name=\"chevron\" className=\"mobile-back-icon\" />\n          {backLabel}\n        </Button>\n      ) : (\n        <span />\n      )}\n      <Heading className=\"mobile-app-bar-title\">{title}</Heading>\n      <div className=\"mobile-app-bar-actions\">{actions}</div>\n    </header>\n  )\n}\n\ntype RefreshMessages = {\n  refresh: string\n  pull: string\n  release: string\n  refreshing: string\n  done: string\n  failed: string\n}\n\n/**\n * Pull down at the top of a list to refresh it. The pull resists more the further it goes;\n * past `threshold`, letting go runs `onRefresh` until its Promise settles. A Refresh button\n * appears on keyboard focus, for everyone who doesn't pull.\n */\nfunction PullToRefresh({\n  onRefresh,\n  onError,\n  threshold = 64,\n  messages,\n  children,\n  className,\n}: {\n  onRefresh: () => Promise<unknown>\n  /** A refresh that failed; the terminal's words already say so. */\n  onError?: (error: unknown) => void\n  threshold?: number\n  /** The words, for other languages. */\n  messages?: Partial<RefreshMessages>\n  children: ReactNode\n  className?: string\n}) {\n  const words: RefreshMessages = {\n    refresh: \"Refresh\",\n    pull: \"Pull to refresh\",\n    release: \"Release to refresh\",\n    refreshing: \"Refreshing…\",\n    done: \"Up to date.\",\n    failed: \"Couldn't refresh.\",\n    ...messages,\n  }\n  const box = useRef<HTMLDivElement>(null)\n  const scroller = useRef<HTMLDivElement>(null)\n  const drag = useRef<(() => void) | null>(null)\n  const [state, setState] = useState<\"idle\" | \"pulling\" | \"ready\" | \"refreshing\">(\"idle\")\n  const [atTop, setAtTop] = useState(true)\n  // The pull's distance goes straight to a variable: a pull renders only when its state changes.\n  const setPull = (px: number) => box.current?.style.setProperty(\"--pull\", `${px}px`)\n  useEffect(() => () => drag.current?.(), [])\n  const refresh = async () => {\n    if (state === \"refreshing\") return\n    setState(\"refreshing\")\n    setPull(threshold)\n    announce(words.refreshing)\n    try {\n      await onRefresh()\n      announce(words.done)\n    } catch (error) {\n      announce(words.failed)\n      onError?.(error)\n    } finally {\n      setState(\"idle\")\n      setPull(0)\n    }\n  }\n  const pointerDown = (event: React.PointerEvent<HTMLDivElement>) => {\n    const el = scroller.current\n    if (!el || el.scrollTop > 0 || state === \"refreshing\" || event.button !== 0) return\n    const startX = event.clientX\n    const startY = event.clientY\n    let distance = 0\n    drag.current?.()\n    drag.current = bindDrag(el, event.nativeEvent, {\n      threshold: 4,\n      // Only a pull down from the top; anything else is a scroll or a tap.\n      onStart: (move) => move.clientY > startY && Math.abs(move.clientY - startY) > Math.abs(move.clientX - startX) * 2,\n      onMove: ({ y }) => {\n        distance = Math.max(0, rubberBand(y - startY, el.clientHeight))\n        setPull(distance)\n        const next = distance >= threshold ? \"ready\" : \"pulling\"\n        setState((now) => (now === next ? now : next))\n      },\n      onEnd: (_event, canceled) => {\n        drag.current = null\n        if (!canceled && distance >= threshold) void refresh()\n        else {\n          setPull(0)\n          setState(\"idle\")\n        }\n      },\n    })\n  }\n  return (\n    <div ref={box} className={[\"mobile-refresh\", className].filter(Boolean).join(\" \")} data-state={state}>\n      <div className=\"mobile-refresh-indicator\" aria-hidden=\"true\">\n        <span className=\"mobile-refresh-spinner\" />\n        {state === \"ready\" ? words.release : state === \"refreshing\" ? words.refreshing : words.pull}\n      </div>\n      <div\n        ref={scroller}\n        className=\"mobile-refresh-scroll\"\n        data-at-top={atTop ? \"\" : undefined}\n        onScroll={(event) => setAtTop(event.currentTarget.scrollTop <= 0)}\n        onPointerDown={pointerDown}\n      >\n        {/* Disabled while it refreshes, but it keeps focus: no drop to the page. */}\n        <Button variant=\"ghost\" className=\"mobile-refresh-button\" onClick={() => void refresh()} disabled={state === \"refreshing\"} focusableWhenDisabled>\n          {words.refresh}\n        </Button>\n        <div className=\"mobile-refresh-content\">{children}</div>\n      </div>\n    </div>\n  )\n}\n\nexport { ActionSheet, AppBar, PullToRefresh, Sheet, SwipeList, TabBar, TimeWheel, WheelPicker, createActionSheet }\nexport type {\n  ActionSheetAction,\n  ActionSheetController,\n  RefreshMessages,\n  SwipeAction,\n  SwipeListItem,\n  SwipeListMessages,\n  TabBarItem,\n  TimeWheelLabels,\n  WheelOption,\n}\n",
      "type": "registry:ui",
      "target": "@ui/mobile.tsx"
    },
    {
      "path": "registry/uiset/ui/mobile/swipe-list.ts",
      "content": "import {\n  createFocusRecovery,\n  createRovingFocus,\n  createSwipeActions,\n  css,\n  definePrimitive,\n  live,\n  selects,\n  type SwipeDraft,\n  type SwipeOpen,\n  type SwipeSide,\n} from \"@ui-sdk/core\"\n\n// A list whose rows swipe aside to actions, on UI SDK's createSwipeActions: one row open at\n// a time, a long swipe runs the first action, and the keyboard does the same with Left and\n// Right (then Escape). Rows are one tab stop, arrows go between them, Enter opens one.\n\ntype SwipeListOptions = {\n  /** Enter or a press on a row. */\n  onOpen?: (key: string) => void\n  /**\n   * Runs one of a row's actions, from a press, a long swipe, a menu or an agent. Details\n   * come second, UI SDK's callback shape, so a web element's `action` event reads\n   * `{ value: row, action }`.\n   */\n  onAction?: (key: string, details: { action: string }) => void\n  /**\n   * A row's actions, for agents. One with `confirm` needs the person: `run` refuses it and\n   * points at `via`, the control that asks them.\n   */\n  actionsOf?: (key: string) => { id: string; label: string; confirm?: string; via?: string }[]\n  /** Each row as agents read it. */\n  rows?: () => { value: string; label: string }[]\n  /** A swipe past `fullSwipe` runs a side's first action; return whether it did. */\n  onFullSwipe?: (key: string, side: SwipeSide) => boolean\n  /** How far across the row a swipe runs the first action, from 0 to 1. */\n  fullSwipe?: number\n  /** Rows that don't swipe. */\n  disabled?: (key: string) => boolean\n}\n\n/** Whether a press landed on a control inside the row (a star in its content, say). */\nconst insideControl = (target: Element, row: Element | undefined) => {\n  const control = target.closest?.(\"button, a[href], input, select, textarea, label, [role=button], [role=link], [role=checkbox], [role=switch], [contenteditable=true]\")\n  return !!control && control !== row && !!row?.contains(control)\n}\n\n/** @internal Left out of @uiset/web's declarations: its type names UI SDK internals. */\nconst swipeList = definePrimitive({\n  name: \"swipe-list\",\n  options: {\n    onOpen: \"callback\",\n    onAction: \"action\",\n    actionsOf: \"value\",\n    rows: \"value\",\n    onFullSwipe: \"action\",\n    fullSwipe: \"number\",\n    disabled: \"value\",\n  },\n  live: [\"swiping\"],\n  state: (_options: SwipeListOptions) => ({\n    open: null as SwipeOpen | null,\n    swiping: null as SwipeDraft | null,\n    focused: null as string | null,\n  }),\n  api: (context) => {\n    const opts = () => context.options()\n    const swipe = createSwipeActions(context, {\n      key: \"open\",\n      draft: \"swiping\",\n      onFullSwipe: (key, side) => opts().onFullSwipe?.(key, side) ?? false,\n      fullSwipe: () => opts().fullSwipe ?? 0.6,\n      disabled: (key) => opts().disabled?.(key) ?? false,\n    })\n    // Up and Down go between rows; Left and Right belong to the swipe.\n    const roving = createRovingFocus(context, { slot: \"row\", key: \"focused\", orientation: () => \"vertical\" })\n    // A focused row that goes (archived, deleted) hands focus to the row now in its place.\n    const recovery = createFocusRecovery<{ value: string }>({\n      fallback: (lost) => {\n        const items = roving.items()\n        const at = Math.max(0, lostIndex.get(lost.key) ?? 0)\n        return (items[at] ?? items.at(-1))?.el\n      },\n    })\n    const lostIndex = new Map<string, number>()\n    // Whether a row was open when this press began: by its click, the swipe has closed it.\n    let openAtPress = false\n    const findRow = (name: string) => {\n      const rows = opts().rows?.() ?? []\n      const row = rows.find((r) => r.value === name) ?? rows.find((r) => r.label.toLowerCase().includes(String(name).toLowerCase()))\n      if (!row) throw new Error(`No row \"${name}\". Rows: ${rows.map((r) => r.label).join(\"; \")}.`)\n      return row\n    }\n    return {\n      swipe,\n      roving,\n      recovery,\n      // Every row's place, kept current as rows come and go, so a row that leaves (even after\n      // it's off the page, as a custom element's cleanup runs) knows where it was. Read once\n      // the row's registration has settled: a row just bound isn't in the list yet.\n      remember: () => queueMicrotask(() => roving.items().forEach((item, at) => lostIndex.set(item.key, at))),\n      pressStarted: () => (openAtPress = context.store.get().open !== null),\n      pressedOpen: () => openAtPress,\n      open: (key: string) => opts().onOpen?.(key),\n      /**\n       * A person runs an action: the row closes and focus goes back to it (or its successor).\n       * A long swipe with a pointer leaves focus where it was.\n       */\n      act(key: string, action: string, focus = true) {\n        swipe.close({ focus })\n        opts().onAction?.(key, { action })\n      },\n      /** Runs one of a row's actions, by the row's name and the action's. */\n      run(row: string, action: string) {\n        const found = findRow(row)\n        const actions = opts().actionsOf?.(found.value) ?? []\n        const chosen = actions.find((a) => a.id === action || a.label.toLowerCase() === String(action).toLowerCase())\n        if (!chosen) throw new Error(`\"${found.label}\" has no action \"${action}\". It has: ${actions.map((a) => a.label).join(\", \")}.`)\n        if (chosen.confirm) {\n          const via = chosen.via ? ` Press \"${chosen.label}\" in \"${chosen.via}\" instead, which asks them.` : \"\"\n          throw new Error(`Needs a person: \"${chosen.confirm}\".${via}`)\n        }\n        opts().onAction?.(found.value, { action: chosen.id })\n        return true\n      },\n      /** Opens a row, by its name. */\n      openRow(row: string) {\n        if (!opts().onOpen) throw new Error(\"These rows don't open.\")\n        opts().onOpen!(findRow(row).value)\n        return true\n      },\n      items: () =>\n        (opts().rows?.() ?? []).map((row) => {\n          const actions = opts().actionsOf?.(row.value) ?? []\n          return { value: row.value, label: actions.length ? `${row.label} (actions: ${actions.map((a) => a.label).join(\", \")})` : row.label }\n        }),\n    }\n  },\n  slots: (slot) => ({\n    // The root creates the instance, so it's named root: custom elements need that.\n    root: slot({\n      role: \"list\",\n    }),\n    row: slot<{ value: string }>({\n      props: { value: \"string\" },\n      role: \"listitem\",\n      focus: \"roving\",\n      keys: [\"ArrowUp\", \"ArrowDown\", \"Home\", \"End\", \"ArrowLeft\", \"ArrowRight\", \"Escape\", \"Enter\"],\n      selects: selects({ focused: ({ key }) => [key, null] }),\n      attrs: (state, part) => ({\n        tabindex: part.api.roving.tabIndex(state, part),\n        style: css({ position: \"relative\", overflow: \"hidden\", \"touch-action\": \"pan-y\" }),\n      }),\n      on: {\n        keydown: (event, { api, key, el }) => {\n          const e = event as KeyboardEvent\n          // The row's menu is its own (on the web its popup stays inside the row).\n          if ((e.target as Element).closest(\"[data-swipe-menu]\")) return\n          // The swipe hears its row and its actions (Escape there closes them);\n          // opening and moving between rows are the row's own.\n          if (api.swipe.keydown(e, key)) return\n          if (e.target !== el) return\n          if (e.key === \"Enter\" && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey) {\n            e.preventDefault()\n            api.open(key)\n            return\n          }\n          if (el) api.roving.keydown(e, el)\n        },\n        pointerdown: (event, { api, key, el }) => {\n          if ((event.target as Element).closest(\"[data-swipe-actions], [data-swipe-menu]\")) return\n          if (insideControl(event.target as Element, el)) return\n          api.pressStarted()\n          if (el) api.swipe.pointerdown(event as PointerEvent, key, el)\n        },\n        click: (event, { api, key, store, el }) => {\n          // A tap opens the row, unless it closes one that was open, or presses an action.\n          if ((event.target as Element).closest(\"[data-swipe-actions], [data-swipe-menu]\")) return\n          if (insideControl(event.target as Element, el)) return\n          if (api.pressedOpen() || store.get().open) {\n            api.swipe.close()\n            return\n          }\n          api.open(key)\n        },\n      },\n      bind: (el, part) => {\n        part.api.remember()\n        const cleanups = [part.api.roving.bind(el, part), part.api.swipe.bindRow(el, part.key), part.api.recovery.bind(el, part)]\n        return () => {\n          part.api.remember()\n          cleanups.forEach((cleanup) => cleanup())\n        }\n      },\n    }),\n    content: slot<{ value: string }>({\n      props: { value: \"string\" },\n      attrs: () => ({ style: css({ transform: \"translateX(var(--swipe-x, 0px))\" }) }),\n      live: live((state, { api, key }) => api.swipe.contentAttrs(state, key)),\n    }),\n    // Keyed by row and side (\"m1:end\"), since a row can have actions on both.\n    actions: slot<{ value: string; row: string; side: string }>({\n      props: { value: \"string\", row: \"string\", side: \"string\" },\n      attrs: () => ({ \"data-swipe-actions\": \"\" }),\n      live: live((state, { api, props }) => api.swipe.actionsAttrs(state, props.row, props.side as SwipeSide)),\n      bind: (el, { api, props }) => api.swipe.bindActions(el, props.row, props.side as SwipeSide),\n    }),\n  }),\n  agent: { actions: [\"run\", \"openRow\"], items: (api) => api.items() },\n})\n\nexport { swipeList }\nexport type { SwipeListOptions, SwipeSide }\n",
      "type": "registry:file",
      "target": "@ui/mobile/swipe-list.ts"
    },
    {
      "path": "registry/uiset/ui/mobile/wheel.ts",
      "content": "/**\n * Keeps a wheel's value in its band. `bindScrollPicker` glides to an option the listbox\n * selects, but one selected while a scroll is still settling is left where it was (in\n * WebKit, a sheet that just opened is still settling when an agent sets the wheel). The\n * wheel then shows the old option, and the next scroll, like the sheet revealing the\n * focused option as it rests, picks a value from there. This scrolls the value back into\n * the band at once, which the picker reads as the same value.\n */\nfunction keepWheelOnValue(list: HTMLElement) {\n  let timer: ReturnType<typeof setTimeout> | undefined\n  let scrolledAt = 0\n  const check = () => {\n    clearTimeout(timer)\n    // Still moving: look again once it stops.\n    if (performance.now() - scrolledAt < 100) {\n      timer = setTimeout(check, 100)\n      return\n    }\n    const selected = list.querySelector<HTMLElement>('[role=\"option\"][aria-selected=\"true\"]')\n    if (!selected) return\n    const band = list.getBoundingClientRect()\n    const option = selected.getBoundingClientRect()\n    const off = option.top + option.height / 2 - (band.top + band.height / 2)\n    // Within half an option it's in the band, or the picker is settling it there.\n    if (Math.abs(off) > option.height / 2) list.scrollBy({ top: off, behavior: \"instant\" })\n  }\n  const scrolled = () => {\n    scrolledAt = performance.now()\n  }\n  // Soon after a new value, before a sheet comes to rest: a glide has started by then.\n  const selected = () => {\n    clearTimeout(timer)\n    timer = setTimeout(check, 120)\n  }\n  const watch = new MutationObserver(selected)\n  watch.observe(list, { subtree: true, attributeFilter: [\"aria-selected\"] })\n  list.addEventListener(\"scroll\", scrolled, { passive: true })\n  list.addEventListener(\"scrollend\", check)\n  return () => {\n    clearTimeout(timer)\n    watch.disconnect()\n    list.removeEventListener(\"scroll\", scrolled)\n    list.removeEventListener(\"scrollend\", check)\n  }\n}\n\nexport { keepWheelOnValue }\n",
      "type": "registry:file",
      "target": "@ui/mobile/wheel.ts"
    },
    {
      "path": "registry/uiset/ui/mobile/mobile.css",
      "content": "@layer ui-sdk, uiset.tokens, uiset.base, uiset.skin;\n\n/* Phone app parts: swipe rows, wheels, sheets, bars and pull to refresh. Touch targets 44px+. */\n@layer uiset.base {\n  /* Accent text: the primary pulled toward the text color, 4.5:1 in every skin and scheme. */\n  :where([data-uiset]) {\n    --mobile-accent: color-mix(in oklch, var(--ui-primary) 55%, var(--ui-foreground));\n  }\n\n  /* The bars keep clear of the status bar, the home indicator and rounded corners: the\n     device's safe areas, or --mobile-inset-top, -bottom and -inline where a page draws its\n     own phone (a frame in docs or a preview, a web view that reports none). Each bar reads\n     them itself, so an inset set on any ancestor reaches it. */\n\n  /* A phone for previews and docs: rounded like a device, with a status bar and a home\n     indicator, and the insets that keep the bars clear of both. */\n  .mobile-frame {\n    --mobile-inset-top: 1.75rem;\n    --mobile-inset-bottom: 1.25rem;\n    --mobile-inset-inline: 0.75rem;\n    position: relative;\n    overflow: hidden;\n    border: 1px solid var(--ui-border);\n    border-radius: 2.25rem;\n    background: var(--ui-background);\n    color: var(--ui-foreground);\n    /* The phone's own stacking context: sheets and toasts open over it, not the page. */\n    isolation: isolate;\n    /* Sheets open in the browser's top layer; anchored here, they open inside the phone,\n       clipped to its corners, as on a device. Without anchor positioning they open at the\n       bottom of the window instead. */\n    anchor-name: --uiset-phone;\n    anchor-scope: --uiset-phone;\n\n    /* A sheet with snap points scroll-snaps in a window-sized container (UI SDK), so it\n       opens from the window's edge; every other sheet opens inside the phone. */\n    &:not(:has(.mobile-sheet[data-snaps][data-open])) [data-slot=\"drawer-backdrop\"] {\n      position-anchor: --uiset-phone;\n      inset: anchor(top) anchor(right) anchor(bottom) anchor(left);\n      inline-size: auto;\n      block-size: auto;\n      border-radius: 2.25rem;\n    }\n\n    /* The sheet itself (its container's position is an inline style UI SDK sets). */\n    /* On a phone the page is the phone: no frame inside it, no pretend status bar. */\n    @media (max-width: 30rem) {\n      --mobile-inset-top: 0px;\n      --mobile-inset-bottom: 0px;\n      --mobile-inset-inline: 0px;\n      border: 0;\n      border-radius: 0;\n\n      &::before,\n      &::after {\n        display: none;\n      }\n    }\n\n    & [data-slot=\"drawer-content\"]:not([data-snaps]) {\n      position: fixed;\n      position-anchor: --uiset-phone;\n      inset: auto anchor(right) anchor(bottom) anchor(left);\n      max-inline-size: none;\n      inline-size: auto;\n      max-block-size: calc(anchor-size(height) - 3rem);\n      border-end-start-radius: 2.25rem;\n      border-end-end-radius: 2.25rem;\n    }\n\n    &::before {\n      content: \"9:41\" / \"\";\n      position: absolute;\n      inset-block-start: 0.375rem;\n      inset-inline-start: 1.75rem;\n      z-index: 3;\n      font-size: 0.75rem;\n      font-weight: 650;\n      font-variant-numeric: tabular-nums;\n      pointer-events: none;\n    }\n\n    &::after {\n      content: \"\";\n      position: absolute;\n      inset-block-end: 0.5rem;\n      inset-inline-start: 50%;\n      z-index: 3;\n      inline-size: 7rem;\n      block-size: 0.25rem;\n      translate: -50% 0;\n      border-radius: 999px;\n      background: color-mix(in oklch, var(--ui-foreground) 35%, transparent);\n      pointer-events: none;\n    }\n  }\n\n  /* Swipe list */\n  .swipe-list {\n    margin: 0;\n    padding: 0;\n    list-style: none;\n    color: var(--ui-foreground);\n  }\n\n  .swipe-row {\n    border-block-end: 1px solid var(--ui-border);\n    outline: none;\n  }\n\n  /*\n   * Rings drawn inside: outside, a row's neighbors and the list's scroll edge cover them.\n   * These outrank base.css's ring ([data-uiset] [data-slot]...:focus-visible, 0,4,0).\n   */\n  [data-uiset] :is(.swipe-list, uiset-swipe-list) .swipe-row[data-slot]:focus-visible,\n  [data-uiset] .mobile-action-list .mobile-action[data-slot]:focus-visible,\n  [data-uiset] .mobile-sheet .mobile-action[data-slot]:focus-visible,\n  [data-uiset] .mobile-tab-bar .mobile-tab[data-slot]:focus-visible,\n  [data-uiset] .mobile-tab-bar a.mobile-tab:focus-visible {\n    outline: 2px solid var(--ui-ring-border);\n    outline-offset: -2px;\n  }\n\n  /* A filled swipe action rings in its own text color, which holds 4.5:1 on its fill. */\n  [data-uiset] .swipe-actions .swipe-action:focus-visible {\n    outline: 2px solid currentColor;\n    outline-offset: -4px;\n  }\n\n  [data-uiset] :is(.mobile-refresh, uiset-pull-refresh) .mobile-refresh-button[data-slot]:focus-visible {\n    outline: 2px solid var(--ui-ring-border);\n    outline-offset: -2px;\n  }\n\n  .swipe-content {\n    position: relative;\n    z-index: 1;\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n    min-block-size: 3.5rem;\n    padding: 0.75rem 1rem;\n    background: var(--ui-background);\n    cursor: default;\n    transition: transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1);\n\n    &[data-swiping] {\n      transition: none;\n    }\n\n    @media (prefers-reduced-motion: reduce) {\n      transition: none;\n    }\n  }\n\n  .swipe-actions {\n    position: absolute;\n    inset-block: 0;\n    display: flex;\n\n    &[data-side=\"start\"] {\n      inset-inline-start: 0;\n    }\n\n    /* The first action of a side sits at the row's edge, where a long swipe ends. */\n    &[data-side=\"end\"] {\n      inset-inline-end: 0;\n      flex-direction: row-reverse;\n    }\n  }\n\n  /* Past a full swipe, the side being swiped spans the row and its first action fills it. */\n  .swipe-row:has(> .swipe-content[data-full][data-swipe=\"start\"]) > .swipe-actions[data-side=\"start\"],\n  .swipe-row:has(> .swipe-content[data-full][data-swipe=\"end\"]) > .swipe-actions[data-side=\"end\"] {\n    inset-inline: 0;\n\n    & > .swipe-action:first-child {\n      flex: 1;\n    }\n  }\n\n  /* Swiping drags a finger or the mouse across text: nothing gets selected. */\n  .swipe-row:has(> [data-swiping]),\n  .mobile-refresh:is([data-state=\"pulling\"], [data-state=\"ready\"]) {\n    user-select: none;\n  }\n\n  /* A row's actions menu: out of sight until it has focus (from a screen reader's own keys). */\n  .swipe-content-body {\n    flex: 1;\n    min-inline-size: 0;\n  }\n\n  .swipe-menu[data-slot]:not(:focus-visible, [data-open], [aria-expanded=\"true\"]) {\n    position: absolute;\n    inline-size: 1px;\n    block-size: 1px;\n    overflow: hidden;\n    clip-path: inset(50%);\n    white-space: nowrap;\n  }\n\n  .swipe-action {\n    display: grid;\n    place-content: center;\n    justify-items: center;\n    gap: 0.25rem;\n    min-inline-size: 5rem;\n    padding-inline: 0.75rem;\n    border: 0;\n    background: var(--ui-primary);\n    color: var(--ui-primary-foreground);\n    font: inherit;\n    font-size: 0.8125rem;\n    font-weight: 600;\n    cursor: pointer;\n\n    &[data-tone=\"danger\"] {\n      background: var(--tone-danger);\n      color: var(--ui-background);\n    }\n\n    &[data-tone=\"neutral\"] {\n      background: var(--ui-muted);\n      color: var(--ui-foreground);\n    }\n\n    .uiset-icon {\n      inline-size: 1.25rem;\n      block-size: 1.25rem;\n    }\n  }\n\n  /* Wheel picker */\n  .wheel-group {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    gap: 0.25rem;\n  }\n\n  .wheel-colon {\n    font-size: 1.25rem;\n    font-weight: 600;\n  }\n\n  :is(.wheel, uiset-wheel) {\n    --wheel-row: 2.25rem;\n    position: relative;\n    inline-size: 4.5rem;\n\n    /* The band the chosen option sits in. */\n    &::before {\n      content: \"\";\n      position: absolute;\n      inset-inline: 0;\n      inset-block-start: calc(var(--wheel-row) * 2);\n      block-size: var(--wheel-row);\n      border-radius: var(--ui-radius);\n      background: var(--ui-muted);\n      pointer-events: none;\n    }\n  }\n\n  .wheel-list[data-slot] {\n    position: relative;\n    block-size: calc(var(--wheel-row) * 5);\n    max-block-size: none;\n    padding-block: calc(var(--wheel-row) * 2);\n    overflow-y: auto;\n    overscroll-behavior: contain;\n    scroll-snap-type: y mandatory;\n    border: 0;\n    background: transparent;\n    box-shadow: none;\n    scrollbar-width: none;\n    mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);\n\n    &::-webkit-scrollbar {\n      display: none;\n    }\n  }\n\n  .wheel-option[data-slot] {\n    justify-content: center;\n    block-size: var(--wheel-row);\n    min-block-size: var(--wheel-row);\n    padding-block: 0;\n    background: transparent;\n    font-size: 1.125rem;\n    font-variant-numeric: tabular-nums;\n    text-align: center;\n    scroll-snap-align: center;\n\n    &[aria-selected=\"true\"] {\n      font-weight: 650;\n    }\n  }\n\n  /* Sheets */\n  .mobile-sheet {\n    display: grid;\n    align-content: start;\n    gap: 0.75rem;\n    padding: 0.5rem 1rem calc(1rem + max(env(safe-area-inset-bottom), var(--mobile-inset-bottom, 0px)));\n    border-start-start-radius: 1rem;\n    border-start-end-radius: 1rem;\n  }\n\n  /* With snap points the sheet is as tall as UI SDK lets a drawer be, 85% of the screen,\n     and each point shows a part of it. */\n  .mobile-sheet[data-snaps] {\n    block-size: 85dvh;\n    grid-template-rows: auto auto minmax(0, 1fr);\n  }\n\n  .mobile-sheet-handle {\n    justify-self: center;\n    inline-size: 2.5rem;\n    block-size: 0.3125rem;\n    min-block-size: 0;\n    padding: 0;\n    border: 0;\n    border-radius: 999px;\n    background: var(--ui-muted-foreground);\n\n    /* The handle's target is bigger than its bar. */\n    &[data-slot] {\n      position: relative;\n      background-clip: content-box;\n\n      &::before {\n        content: \"\";\n        position: absolute;\n        inset: -1.25rem -2rem;\n      }\n    }\n  }\n\n  .mobile-sheet-head {\n    display: grid;\n    gap: 0.25rem;\n    text-align: center;\n  }\n\n  .mobile-sheet-title {\n    margin: 0;\n    font-size: 1.0625rem;\n    font-weight: 650;\n  }\n\n  .mobile-sheet-description {\n    margin: 0;\n    color: var(--ui-muted-foreground);\n    font-size: 0.875rem;\n  }\n\n  .mobile-sheet-body {\n    display: grid;\n    align-content: start;\n    gap: 1rem;\n    min-block-size: 0;\n    overflow: auto;\n  }\n\n  /* The body spaces its children with its gap; their own margins would stack on it. */\n  :where(.mobile-sheet-body > *) {\n    margin-block: 0;\n  }\n\n  .mobile-action-list {\n    display: grid;\n    overflow: hidden;\n    border-radius: calc(var(--ui-radius) + 6px);\n    background: var(--ui-muted);\n  }\n\n  .mobile-action[data-slot] {\n    min-block-size: 3.25rem;\n    border: 0;\n    border-radius: 0;\n    background: transparent;\n    color: var(--ui-foreground);\n    font-size: 1.0625rem;\n\n    & + & {\n      border-block-start: 1px solid var(--ui-border);\n    }\n\n    &[data-destructive] {\n      color: var(--tone-danger);\n    }\n  }\n\n  .mobile-action-cancel[data-slot] {\n    border-radius: calc(var(--ui-radius) + 6px);\n    background: var(--ui-muted);\n    font-weight: 650;\n  }\n\n  /* Bars */\n  .mobile-tab-bar {\n    border-block-start: 1px solid var(--ui-border);\n    background: var(--ui-background);\n    padding-inline: var(--mobile-inset-inline, 0px);\n    padding-block-end: max(env(safe-area-inset-bottom), var(--mobile-inset-bottom, 0px));\n\n    ul {\n      display: grid;\n      grid-auto-columns: 1fr;\n      grid-auto-flow: column;\n      margin: 0;\n      padding: 0;\n      list-style: none;\n    }\n  }\n\n  .mobile-tab {\n    display: grid;\n    justify-items: center;\n    gap: 0.125rem;\n    inline-size: 100%;\n    min-block-size: 3.25rem;\n    padding: 0.375rem 0.25rem;\n    border: 0;\n    background: transparent;\n    color: var(--ui-muted-foreground);\n    font: inherit;\n    font-size: 0.6875rem;\n    font-weight: 500;\n    text-decoration: none;\n    cursor: pointer;\n\n    &[aria-current=\"page\"] {\n      color: var(--mobile-accent);\n      font-weight: 650;\n    }\n  }\n\n  .mobile-tab-icon {\n    position: relative;\n\n    .uiset-icon {\n      inline-size: 1.5rem;\n      block-size: 1.5rem;\n    }\n  }\n\n  .mobile-tab-badge {\n    position: absolute;\n    inset-block-start: -0.25rem;\n    inset-inline-start: 1rem;\n    min-inline-size: 1.125rem;\n    padding-inline: 0.25rem;\n    border-radius: 999px;\n    background: var(--tone-danger);\n    color: var(--ui-background);\n    font-size: 0.6875rem;\n    font-weight: 700;\n    line-height: 1.125rem;\n    text-align: center;\n  }\n\n  .mobile-app-bar {\n    position: sticky;\n    inset-block-start: 0;\n    z-index: 2;\n    display: grid;\n    grid-template-columns: 1fr auto 1fr;\n    align-items: center;\n    min-block-size: 3rem;\n    padding: max(env(safe-area-inset-top), var(--mobile-inset-top, 0px)) max(0.25rem, var(--mobile-inset-inline, 0px)) 0;\n    border-block-end: 1px solid var(--ui-border);\n    background: var(--ui-background);\n  }\n\n  .mobile-app-bar-back {\n    justify-self: start;\n    color: var(--mobile-accent);\n  }\n\n  .mobile-back-icon {\n    scale: -1 1;\n\n    &:dir(rtl) {\n      scale: 1 1;\n    }\n  }\n\n  .mobile-app-bar-title {\n    margin: 0;\n    overflow: hidden;\n    font-size: 1.0625rem;\n    font-weight: 650;\n    text-align: center;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n\n  .mobile-app-bar-actions {\n    display: flex;\n    justify-content: flex-end;\n    gap: 0.125rem;\n  }\n\n  /* Pull to refresh */\n  .mobile-refresh {\n    position: relative;\n    display: grid;\n    min-block-size: 0;\n    overflow: hidden;\n  }\n\n  .mobile-refresh-indicator {\n    position: absolute;\n    inset-inline: 0;\n    inset-block-start: 0;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    gap: 0.5rem;\n    block-size: var(--pull, 0px);\n    overflow: hidden;\n    color: var(--ui-muted-foreground);\n    font-size: 0.8125rem;\n  }\n\n  .mobile-refresh-spinner {\n    inline-size: 1rem;\n    block-size: 1rem;\n    border: 2px solid currentColor;\n    border-block-start-color: transparent;\n    border-radius: 50%;\n\n    [data-state=\"refreshing\"] & {\n      animation: mobile-spin 0.8s linear infinite;\n    }\n\n    [data-state=\"ready\"] & {\n      border-color: var(--mobile-accent);\n    }\n  }\n\n  .mobile-refresh-scroll {\n    position: relative;\n    min-block-size: 0;\n    overflow-y: auto;\n    overscroll-behavior-y: contain;\n    translate: 0 var(--pull, 0px);\n    touch-action: pan-y;\n    transition: translate 260ms cubic-bezier(0.2, 0.9, 0.3, 1);\n\n    /* At the top, a finger pulling down is ours; scrolling down stays the browser's. */\n    &[data-at-top] {\n      touch-action: pan-x pan-down;\n    }\n\n    [data-state=\"pulling\"] &,\n    [data-state=\"ready\"] & {\n      transition: none;\n    }\n\n    @media (prefers-reduced-motion: reduce) {\n      transition: none;\n    }\n  }\n\n  /* For the keyboard: shown when focused, like a skip link. */\n  .mobile-refresh-button[data-slot]:not(:focus) {\n    position: absolute;\n    inline-size: 1px;\n    block-size: 1px;\n    overflow: hidden;\n    clip-path: inset(50%);\n    white-space: nowrap;\n  }\n\n  .mobile-refresh-button[data-slot]:focus {\n    inline-size: 100%;\n  }\n\n  @keyframes mobile-spin {\n    to {\n      rotate: 360deg;\n    }\n  }\n\n  @media (forced-colors: active) {\n    .swipe-action {\n      border: 1px solid CanvasText;\n    }\n\n    .mobile-tab[aria-current=\"page\"] {\n      outline: 2px solid Highlight;\n      outline-offset: -4px;\n    }\n  }\n}\n\n/* Tabs and app bar actions are a phone's own controls, not keys: a skin's button chrome\n   (Studio's pads, Blueprint's outlines) stays off them, while its type still applies. An\n   app bar action is a plain icon or word, with a round press state, as on a phone. */\n@layer uiset.skin {\n  [data-uiset] .mobile-tab-bar .mobile-tab[data-slot],\n  [data-uiset] .mobile-tab-bar .mobile-tab[data-slot]:is(:hover, :active) {\n    min-block-size: 3.25rem;\n    block-size: auto;\n    border: 0;\n    border-radius: 0;\n    box-shadow: none;\n    background: transparent;\n    translate: none;\n    scale: none;\n  }\n\n  [data-uiset] .mobile-app-bar [data-slot=\"button\"]:is([data-variant=\"ghost\"], .mobile-app-bar-back),\n  [data-uiset] .mobile-app-bar :is([data-slot$=\"-trigger\"]):not([data-variant=\"solid\"], [data-variant=\"outline\"]) {\n    min-inline-size: 2.75rem;\n    min-block-size: 2.75rem;\n    border: 0;\n    border-radius: 999px;\n    box-shadow: none;\n    background: transparent;\n    color: var(--mobile-accent);\n    translate: none;\n    scale: none;\n\n    &:hover:not([data-disabled]) {\n      background: color-mix(in oklch, var(--ui-foreground) 8%, transparent);\n    }\n\n    &:active:not([data-disabled]) {\n      background: color-mix(in oklch, var(--ui-foreground) 14%, transparent);\n    }\n  }\n}\n",
      "type": "registry:file",
      "target": "@ui/mobile/mobile.css"
    },
    {
      "path": "registry/uiset/ui/shell/shell.css",
      "content": "@layer ui-sdk, uiset.tokens, uiset.base, uiset.skin;\n\n@layer uiset.base {\n  :where([data-uiset]) {\n    /* Status colors: text and edges hold 4.5:1 / 3:1 on --ui-background in each scheme. */\n    /* Dark values also clear 4.5:1 on the mid-dark Blueprint and Studio panels. */\n    --tone-info: light-dark(oklch(0.48 0.15 255), oklch(0.86 0.08 240));\n    --tone-success: light-dark(oklch(0.47 0.12 150), oklch(0.87 0.11 150));\n    --tone-warning: light-dark(oklch(0.5 0.12 70), oklch(0.89 0.11 85));\n    --tone-danger: light-dark(oklch(0.46 0.19 27), oklch(0.86 0.08 25));\n    --tone-neutral: var(--ui-muted-foreground);\n  }\n\n  .uiset-visually-hidden {\n    position: absolute;\n    width: 1px;\n    height: 1px;\n    overflow: hidden;\n    clip-path: inset(50%);\n    white-space: nowrap;\n  }\n\n  .uiset-icon {\n    width: 1rem;\n    height: 1rem;\n    flex-shrink: 0;\n    fill: none;\n    stroke: currentColor;\n    stroke-width: 1.75;\n    stroke-linecap: round;\n    stroke-linejoin: round;\n  }\n\n  /* App shell */\n\n  .app-shell {\n    --sidebar-width: 15rem;\n    display: grid;\n    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);\n    min-height: var(--app-shell-height, 100dvh);\n    background: var(--ui-background);\n    color: var(--ui-foreground);\n\n    &[data-narrow] {\n      grid-template-columns: minmax(0, 1fr);\n    }\n  }\n\n  [data-sidebar=\"collapsed\"] .app-shell:not([data-narrow]) {\n    --sidebar-width: 3.75rem;\n  }\n\n  .app-sidebar,\n  .app-drawer {\n    display: flex;\n    flex-direction: column;\n    gap: 0.75rem;\n    min-width: 0;\n    padding: 0.75rem;\n    border-inline-end: 1px solid var(--ui-border);\n    background: color-mix(in oklab, var(--ui-muted) 55%, var(--ui-background));\n    overflow: hidden;\n  }\n\n  .app-sidebar-top {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 0.5rem;\n    min-height: 2.25rem;\n  }\n\n  .app-brand {\n    min-width: 0;\n    margin: 0;\n    overflow: hidden;\n    font-weight: 600;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n  }\n\n  [data-sidebar=\"collapsed\"] .app-sidebar .app-brand {\n    display: none;\n  }\n\n  .app-sidebar-toggle,\n  .app-menu-button {\n    flex-shrink: 0;\n    width: 2.25rem;\n    height: 2.25rem;\n    padding: 0;\n  }\n\n  .app-main {\n    display: flex;\n    flex-direction: column;\n    min-width: 0;\n  }\n\n  /* Its padding counts in its height, with or without a page's box-sizing reset. */\n  .app-header {\n    box-sizing: border-box;\n    display: flex;\n    flex-wrap: wrap;\n    align-items: center;\n    gap: 0.75rem;\n    min-height: 3.25rem;\n    padding: 0.5rem 1rem;\n    border-bottom: 1px solid var(--ui-border);\n  }\n\n  /* The padding is a variable, so a full-bleed page (an inbox) can cancel it exactly. */\n  .app-content {\n    --app-shell-pad: clamp(1rem, 3vw, 2rem);\n    flex: 1;\n    min-width: 0;\n    padding: var(--app-shell-pad);\n  }\n\n  .sidebar-nav {\n    display: grid;\n    gap: 1rem;\n  }\n\n  .sidebar-group {\n    display: grid;\n    gap: 0.25rem;\n\n    ul {\n      display: grid;\n      gap: 2px;\n      margin: 0;\n      padding: 0;\n      list-style: none;\n    }\n  }\n\n  .sidebar-group-title {\n    margin: 0;\n    padding-inline: 0.5rem;\n    font-size: 0.75rem;\n    font-weight: 600;\n    color: var(--ui-muted-foreground);\n  }\n\n  /* Collapsed to icons: group titles leave the layout (a hidden title used to keep its\n     width and push the icons off center), and a rule separates the groups instead. */\n  [data-sidebar=\"collapsed\"] .app-sidebar {\n    .sidebar-group-title {\n      position: absolute;\n      width: 1px;\n      height: 1px;\n      overflow: hidden;\n      clip-path: inset(50%);\n      white-space: nowrap;\n    }\n\n    .sidebar-nav {\n      gap: 0.5rem;\n    }\n\n    .sidebar-group + .sidebar-group {\n      padding-block-start: 0.5rem;\n      border-block-start: 1px solid var(--ui-border);\n    }\n  }\n\n  /* A tooltip trigger, so UI SDK's stylesheet would draw it as a button: reset that. */\n  .sidebar-link {\n    display: flex;\n    align-items: center;\n    justify-content: flex-start;\n    gap: 0.625rem;\n    width: 100%;\n    height: auto;\n    min-height: 2.25rem;\n    padding: 0.375rem 0.5rem;\n    border: 0;\n    border-radius: var(--ui-radius);\n    background: transparent;\n    color: var(--ui-foreground);\n    font-weight: 400;\n    text-decoration: none;\n\n    &:hover {\n      background: var(--ui-muted);\n    }\n\n    &[aria-current=\"page\"] {\n      position: relative;\n      background: var(--ui-muted);\n      font-weight: 600;\n\n      /* A short bar, inset from the corners (an inset shadow bent around them). */\n      &::before {\n        content: \"\";\n        position: absolute;\n        inset-block: 0.5rem;\n        inset-inline-start: 0;\n        inline-size: 3px;\n        border-radius: 999px;\n        background: var(--ui-primary);\n      }\n    }\n\n    &:focus-visible {\n      outline: 2px solid var(--ui-ring-border);\n      outline-offset: -2px;\n    }\n  }\n\n  .sidebar-icon {\n    display: inline-grid;\n    place-items: center;\n    width: 1.25rem;\n    flex-shrink: 0;\n  }\n\n  .sidebar-label {\n    flex: 1;\n    min-width: 0;\n    overflow: hidden;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n  }\n\n  .sidebar-badge {\n    font-size: 0.75rem;\n  }\n\n  /* Each link is a square icon button, centered in the rail under the toggle; the current\n     page shows by its fill and an accent icon (a side bar on a square reads as a glitch). */\n  [data-sidebar=\"collapsed\"] .app-sidebar {\n    .sidebar-link {\n      justify-content: center;\n      inline-size: 2.25rem;\n      min-block-size: 2.25rem;\n      margin-inline: auto;\n      padding: 0;\n\n      &[aria-current=\"page\"] {\n        color: color-mix(in oklch, var(--ui-primary) 55%, var(--ui-foreground));\n\n        &::before {\n          display: none;\n        }\n      }\n    }\n\n    .sidebar-label,\n    .sidebar-badge {\n      position: absolute;\n      width: 1px;\n      height: 1px;\n      overflow: hidden;\n      clip-path: inset(50%);\n    }\n  }\n\n  /* The tooltip repeats the visible label, so it only shows when labels are hidden. */\n  [data-sidebar=\"expanded\"] .sidebar-tooltip,\n  .app-drawer .sidebar-tooltip {\n    display: none;\n  }\n\n  /* Page structure */\n\n  .breadcrumbs ol {\n    display: flex;\n    flex-wrap: wrap;\n    align-items: center;\n    gap: 0.25rem;\n    margin: 0;\n    padding: 0;\n    list-style: none;\n    font-size: 0.875rem;\n  }\n\n  .breadcrumbs li {\n    display: inline-flex;\n    align-items: center;\n    gap: 0.25rem;\n    color: var(--ui-muted-foreground);\n\n    a {\n      color: inherit;\n      text-underline-offset: 0.2em;\n    }\n\n    [aria-current=\"page\"] {\n      color: var(--ui-foreground);\n      font-weight: 500;\n    }\n  }\n\n  .breadcrumbs-separator {\n    width: 0.875rem;\n    height: 0.875rem;\n  }\n\n  .page-header {\n    display: grid;\n    gap: 0.75rem;\n    margin-bottom: 1.5rem;\n  }\n\n  .page-header-row {\n    display: flex;\n    flex-wrap: wrap;\n    align-items: flex-end;\n    justify-content: space-between;\n    gap: 1rem;\n  }\n\n  .page-header-title {\n    margin: 0;\n    font-size: clamp(1.5rem, 3vw, 1.875rem);\n    line-height: 1.15;\n    text-wrap: balance;\n  }\n\n  .page-header-description {\n    max-width: 42rem;\n    margin: 0.375rem 0 0;\n    color: var(--ui-muted-foreground);\n  }\n\n  .page-header-actions {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 0.5rem;\n  }\n\n  .card {\n    display: grid;\n    gap: 1rem;\n    min-width: 0;\n    padding: 1.25rem;\n    border: 1px solid var(--ui-border);\n    border-radius: calc(var(--ui-radius) + 6px);\n    background: var(--ui-background);\n  }\n\n  .card-header {\n    display: grid;\n    gap: 0.25rem;\n  }\n\n  .card-title {\n    margin: 0;\n    font-size: 1rem;\n    font-weight: 600;\n  }\n\n  .card-description {\n    margin: 0;\n    color: var(--ui-muted-foreground);\n    font-size: 0.875rem;\n  }\n\n  .card-footer {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 0.5rem;\n    padding-top: 1rem;\n    border-top: 1px solid var(--ui-border);\n  }\n\n  /* Data display */\n\n  .badge {\n    --badge-color: var(--tone-neutral);\n    display: inline-flex;\n    align-items: center;\n    gap: 0.25rem;\n    padding: 0.0625rem 0.5rem;\n    border: 1px solid color-mix(in oklab, var(--badge-color) 55%, transparent);\n    border-radius: min(999px, calc(var(--ui-radius) * 999));\n    background: color-mix(in oklab, var(--badge-color) 10%, var(--ui-background));\n    color: var(--badge-color);\n    font-size: 0.75rem;\n    font-weight: 600;\n    line-height: 1.5;\n    white-space: nowrap;\n\n    &[data-tone=\"info\"] {\n      --badge-color: var(--tone-info);\n    }\n\n    &[data-tone=\"success\"] {\n      --badge-color: var(--tone-success);\n    }\n\n    &[data-tone=\"warning\"] {\n      --badge-color: var(--tone-warning);\n    }\n\n    &[data-tone=\"danger\"] {\n      --badge-color: var(--tone-danger);\n    }\n  }\n\n  .count-badge {\n    position: relative;\n    display: inline-flex;\n    vertical-align: middle;\n  }\n\n  /* The solid button's colors: every skin already holds 4.5:1 between them. */\n  .count-badge-count {\n    position: absolute;\n    inset-block-start: 0;\n    inset-inline-end: 0;\n    translate: 40% -40%;\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    box-sizing: border-box;\n    min-width: 1.125rem;\n    height: 1.125rem;\n    padding-inline: 0.3125rem;\n    border-radius: min(999px, calc(var(--ui-radius) * 999));\n    background: var(--uiset-solid-bg);\n    color: var(--uiset-solid-fg);\n    box-shadow: 0 0 0 2px var(--ui-background);\n    font-size: 0.6875rem;\n    font-weight: 600;\n    font-variant-numeric: tabular-nums;\n    line-height: 1;\n    white-space: nowrap;\n    pointer-events: none;\n\n    &:dir(rtl) {\n      translate: -40% -40%;\n    }\n\n    &[data-dot] {\n      min-width: 0.625rem;\n      width: 0.625rem;\n      height: 0.625rem;\n      padding: 0;\n      translate: 20% -20%;\n\n      &:dir(rtl) {\n        translate: -20% -20%;\n      }\n    }\n  }\n\n  /* Each avatar overlaps the one before it, with a ring of the page color between them. */\n  .avatar-group {\n    display: inline-flex;\n    align-items: center;\n    vertical-align: middle;\n\n    & > * {\n      box-shadow: 0 0 0 2px var(--ui-background);\n    }\n\n    /* A small overlap: more would cover the next avatar's initials. */\n    & > * + * {\n      margin-inline-start: calc(var(--ui-spacing) * -1);\n    }\n  }\n\n  .avatar-group-more {\n    font-variant-numeric: tabular-nums;\n  }\n\n  /* Content sits at the top, so figures in a row line up whether or not one has a trend. */\n  .stat {\n    display: grid;\n    align-content: start;\n    gap: 0.25rem;\n\n    p {\n      margin: 0;\n    }\n  }\n\n  .stat-label {\n    font-size: 0.875rem;\n    color: var(--ui-muted-foreground);\n  }\n\n  .stat-trend {\n    max-inline-size: 100%;\n  }\n\n  /* A standalone figure keeps proportional digits; tabular ones look loose this big. */\n  .stat-value {\n    font-size: 1.75rem;\n    font-weight: 650;\n    line-height: 1.15;\n  }\n\n  .stat-change {\n    display: inline-flex;\n    align-items: center;\n    gap: 0.25rem;\n    font-size: 0.875rem;\n    font-weight: 600;\n\n    &[data-good] {\n      color: var(--tone-success);\n    }\n\n    &[data-bad] {\n      color: var(--tone-danger);\n    }\n  }\n\n  .stat-period,\n  .stat-description {\n    color: var(--ui-muted-foreground);\n    font-weight: 400;\n  }\n\n  .stat-description {\n    font-size: 0.8125rem;\n  }\n\n  .empty-state {\n    display: grid;\n    justify-items: center;\n    gap: 0.5rem;\n    padding: 2.5rem 1rem;\n    text-align: center;\n  }\n\n  .empty-state-icon {\n    width: 2rem;\n    height: 2rem;\n    color: var(--ui-muted-foreground);\n  }\n\n  .empty-state-title {\n    margin: 0.25rem 0 0;\n    font-size: 1.0625rem;\n  }\n\n  .empty-state-description {\n    max-width: 28rem;\n    margin: 0;\n    color: var(--ui-muted-foreground);\n  }\n\n  .empty-state-actions {\n    display: flex;\n    flex-wrap: wrap;\n    justify-content: center;\n    gap: 0.5rem;\n    margin-top: 0.5rem;\n  }\n\n  .skeleton {\n    display: block;\n    width: 100%;\n    border-radius: var(--ui-radius);\n    background: linear-gradient(\n        90deg,\n        var(--ui-muted) 0 35%,\n        color-mix(in oklab, var(--ui-muted), var(--ui-foreground) 8%) 50%,\n        var(--ui-muted) 65% 100%\n      )\n      0 0 / 300% 100%;\n    animation: skeleton-wave 1.6s ease-in-out infinite;\n  }\n\n  .skeleton-text {\n    display: grid;\n    gap: 0.5rem;\n\n    .skeleton {\n      height: 0.75rem;\n    }\n  }\n\n  @keyframes skeleton-wave {\n    from {\n      background-position: 100% 0;\n    }\n    to {\n      background-position: 0 0;\n    }\n  }\n\n  .description-list {\n    display: grid;\n    margin: 0;\n\n    &[data-layout=\"columns\"] .description-item {\n      display: grid;\n      grid-template-columns: minmax(8rem, 1fr) 2fr;\n      gap: 1rem;\n    }\n\n    dt {\n      color: var(--ui-muted-foreground);\n    }\n\n    dd {\n      margin: 0;\n      min-width: 0;\n      overflow-wrap: anywhere;\n    }\n  }\n\n  .description-item {\n    padding-block: 0.625rem;\n    border-bottom: 1px solid var(--ui-border);\n\n    &:last-child {\n      border-bottom: 0;\n    }\n  }\n\n  .item-list {\n    display: grid;\n    margin: 0;\n    padding: 0;\n    list-style: none;\n  }\n\n  .item {\n    display: flex;\n    align-items: center;\n    gap: 0.75rem;\n    min-height: 3rem;\n    padding-block: 0.625rem;\n    border-bottom: 1px solid var(--ui-border);\n\n    &:last-child {\n      border-bottom: 0;\n    }\n  }\n\n  .item-text {\n    display: grid;\n    flex: 1;\n    min-width: 0;\n  }\n\n  .item-title {\n    overflow: hidden;\n    color: var(--ui-foreground);\n    font-weight: 500;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n  }\n\n  a.item-title {\n    text-decoration: none;\n\n    &:hover {\n      text-decoration: underline;\n    }\n  }\n\n  .item-description,\n  .item-meta {\n    color: var(--ui-muted-foreground);\n    font-size: 0.8125rem;\n  }\n\n  .item-actions {\n    display: flex;\n    gap: 0.25rem;\n  }\n\n  .alert {\n    --alert-color: var(--tone-info);\n    display: grid;\n    grid-template-columns: auto minmax(0, 1fr) auto;\n    gap: 0.75rem;\n    align-items: start;\n    padding: 0.875rem 1rem;\n    position: relative;\n    overflow: hidden;\n    padding-inline-start: calc(1rem + 3px);\n    border: 1px solid color-mix(in oklab, var(--alert-color) 45%, var(--ui-border));\n    border-radius: calc(var(--ui-radius) + 4px);\n    background: color-mix(in oklab, var(--alert-color) 7%, var(--ui-background));\n\n    /* The accent is a straight bar the corners clip; a thick border would taper into them. */\n    &::before {\n      content: \"\";\n      position: absolute;\n      inset-block: 0;\n      inset-inline-start: 0;\n      inline-size: 4px;\n      background: var(--alert-color);\n    }\n\n    &[data-tone=\"success\"] {\n      --alert-color: var(--tone-success);\n    }\n\n    &[data-tone=\"warning\"] {\n      --alert-color: var(--tone-warning);\n    }\n\n    &[data-tone=\"danger\"] {\n      --alert-color: var(--tone-danger);\n    }\n  }\n\n  .alert-icon {\n    width: 1.25rem;\n    height: 1.25rem;\n    color: var(--alert-color);\n  }\n\n  .alert-body {\n    display: grid;\n    gap: 0.25rem;\n  }\n\n  .alert-title {\n    margin: 0;\n    font-weight: 600;\n  }\n\n  .alert-text {\n    color: var(--ui-foreground);\n  }\n\n  .alert-actions {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 0.5rem;\n    margin-top: 0.375rem;\n  }\n\n  .alert-dismiss {\n    width: 2rem;\n    height: 2rem;\n    padding: 0;\n  }\n\n  /* Sized in its own em so a key sits inside a line of text, not below it. */\n  .kbd {\n    display: inline-flex;\n    align-items: center;\n    min-width: 1.75em;\n    height: 1.75em;\n    justify-content: center;\n    padding-inline: 0.4em;\n    vertical-align: 0.125em;\n    line-height: 1;\n    border: 1px solid var(--ui-input);\n    border-bottom-width: 2px;\n    border-radius: calc(var(--ui-radius) / 2 + 2px);\n    background: var(--ui-background);\n    color: var(--ui-foreground);\n    font-family: var(--ui-font-mono);\n    font-size: 0.75rem;\n  }\n\n  .spinner {\n    display: inline-block;\n    flex-shrink: 0;\n    border: 2px solid color-mix(in oklab, var(--ui-foreground) 18%, transparent);\n    border-top-color: var(--ui-primary);\n    border-radius: 50%;\n    animation: spinner-turn 0.8s linear infinite;\n  }\n\n  @keyframes spinner-turn {\n    to {\n      rotate: 1turn;\n    }\n  }\n\n  .stepper {\n    container-type: inline-size;\n  }\n\n  .stepper ol {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 0.25rem 1rem;\n    margin: 0;\n    padding: 0;\n    list-style: none;\n  }\n\n  /* Marks line up across steps, whether a step has a description or not. */\n  .stepper-step {\n    align-items: flex-start;\n    gap: 0.625rem;\n    height: auto;\n    min-height: 2.75rem;\n    padding: 0.375rem 0.625rem 0.375rem 0.375rem;\n    text-align: start;\n  }\n\n  @container (max-width: 30rem) {\n    .stepper ol {\n      flex-direction: column;\n      flex-wrap: nowrap;\n    }\n  }\n\n  .stepper-mark {\n    box-sizing: border-box;\n    display: inline-grid;\n    place-items: center;\n    width: 1.75rem;\n    height: 1.75rem;\n    flex-shrink: 0;\n    border: 2px solid var(--ui-input);\n    border-radius: 50%;\n    font-size: 0.8125rem;\n    font-weight: 600;\n    font-variant-numeric: tabular-nums;\n  }\n\n  .stepper li[data-state=\"current\"] .stepper-mark {\n    border-color: var(--ui-primary);\n    color: var(--ui-primary);\n  }\n\n  .stepper li[data-state=\"complete\"] .stepper-mark {\n    border-color: var(--ui-primary);\n    background: var(--ui-primary);\n    color: var(--ui-primary-foreground);\n  }\n\n  /* The label's first line centers on the mark, whatever the page's line height. */\n  .stepper-text {\n    display: grid;\n    padding-block-start: max(0px, calc((1.75rem - 1lh) / 2));\n  }\n\n  .stepper-label {\n    font-weight: 600;\n  }\n\n  .stepper-description {\n    font-size: 0.75rem;\n    color: var(--ui-muted-foreground);\n  }\n\n  .search-field {\n    position: relative;\n    display: flex;\n    /* A row even as a UI SDK field (which stacks its parts), so the icon centers. */\n    flex-direction: row;\n    align-items: center;\n    width: 100%;\n\n    [data-slot=\"input\"] {\n      width: 100%;\n      padding-inline: 2.125rem 3rem;\n    }\n  }\n\n  .search-field-icon {\n    position: absolute;\n    inset-inline-start: 0.625rem;\n    color: var(--ui-muted-foreground);\n    pointer-events: none;\n  }\n\n  .search-field-clear {\n    position: absolute;\n    inset-inline-end: 0.25rem;\n    width: 1.75rem;\n    height: 1.75rem;\n    padding: 0;\n  }\n\n  /* The browser's own clear button would duplicate ours. */\n  .search-field input[type=\"search\"]::-webkit-search-cancel-button {\n    display: none;\n  }\n\n  .search-field-hint {\n    position: absolute;\n    inset-inline-end: 0.5rem;\n    pointer-events: none;\n  }\n\n  .copy-button {\n    gap: 0.375rem;\n  }\n\n  @media (prefers-reduced-motion: reduce) {\n    .skeleton,\n    .spinner {\n      animation-duration: 0s;\n    }\n\n    .spinner {\n      border-top-color: var(--ui-muted-foreground);\n    }\n  }\n\n  @media (forced-colors: active) {\n    .badge,\n    .alert,\n    .kbd {\n      border-color: CanvasText;\n    }\n\n    /* Shadows don't draw here, so the rings become real edges. */\n    .avatar-group > *,\n    .count-badge-count {\n      outline: 1px solid CanvasText;\n    }\n\n    .count-badge-count {\n      background: Canvas;\n      color: CanvasText;\n    }\n\n    .sidebar-link[aria-current=\"page\"] {\n      outline: 2px solid Highlight;\n    }\n\n    .stepper li[data-state=\"complete\"] .stepper-mark {\n      background: Highlight;\n      color: HighlightText;\n    }\n  }\n}\n",
      "type": "registry:file",
      "target": "@ui/shell/shell.css"
    },
    {
      "path": "registry/uiset/ui/shell/icons.tsx",
      "content": "import { iconPaths, type IconName } from \"./icon-paths\"\n\nfunction Icon({ name, className }: { name: IconName; className?: string }) {\n  return (\n    <svg\n      viewBox=\"0 0 24 24\"\n      aria-hidden=\"true\"\n      focusable=\"false\"\n      className={[\"uiset-icon\", className].filter(Boolean).join(\" \")}\n    >\n      <path d={iconPaths[name]} />\n    </svg>\n  )\n}\n\nexport { Icon }\nexport type { IconName }\n",
      "type": "registry:file",
      "target": "@ui/shell/icons.tsx"
    },
    {
      "path": "registry/uiset/ui/shell/icon-paths.ts",
      "content": "// UISet's icons as SVG path data on a 24×24 grid, stroked: framework-free, so the React\n// Icon and the web elements draw the same shapes.\nconst iconPaths = {\n  // Text editing (the rich text editor's toolbar).\n  bold: \"M7 5h6a3.5 3.5 0 0 1 0 7H7zM7 12h7a3.5 3.5 0 0 1 0 7H7z\",\n  italic: \"M10 5h8M6 19h8M14 5l-4 14\",\n  underline: \"M7 5v6a5 5 0 0 0 10 0V5M5 20h14\",\n  strike: \"M5 12h14M16 7a4 4 0 0 0-3.5-2h-1A3.5 3.5 0 0 0 8 8.5c0 1.4.8 2.4 2.5 3M8 17a4 4 0 0 0 3.5 2h1a3.5 3.5 0 0 0 3.5-3.5c0-.6-.1-1.1-.4-1.5\",\n  \"code-inline\": \"M9 8l-4 4 4 4M15 8l4 4-4 4\",\n  link: \"M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1\",\n  \"list-bullet\": \"M9 6h11M9 12h11M9 18h11M4.5 6v.01M4.5 12v.01M4.5 18v.01\",\n  \"list-ordered\": \"M10 6h10M10 12h10M10 18h10M4 4.5l1.5-.5v4.5M4 15a1.3 1.3 0 0 1 2.4.6c0 .8-2.4 1.7-2.4 2.9h2.6\",\n  \"list-check\": \"M11 6h9M11 12h9M11 18h9M3.5 6l1.5 1.5L8 4.5M3.5 12l1.5 1.5 3-3M3.5 18l1.5 1.5 3-3\",\n  quote: \"M6 7h4v4c0 3-1.3 5-4 6M14 7h4v4c0 3-1.3 5-4 6\",\n  undo: \"M9 14L4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3\",\n  redo: \"M15 14l5-5-5-5M20 9H10a6 6 0 0 0 0 12h3\",\n  image: \"M4 5h16v14H4zM4 16l5-5 4 4 3-3 4 4M15 9.5v.01\",\n  \"code-block\": \"M4 5h16v14H4zM9.5 10l-2 2 2 2M14.5 10l2 2-2 2\",\n  rule: \"M4 12h16M8 8h8M8 16h8\",\n  menu: \"M4 7h16M4 12h16M4 17h16\",\n  sidebar: \"M4 5h16v14H4zM9 5v14\",\n  chevron: \"M9 6l6 6-6 6\",\n  search: \"M11 18a7 7 0 1 1 0-14 7 7 0 0 1 0 14zM20 20l-4-4\",\n  close: \"M6 6l12 12M18 6L6 18\",\n  copy: \"M8 8h11v11H8zM5 16V5h11\",\n  check: \"M5 12.5l4.5 4.5L19 7.5\",\n  info: \"M12 11v6M12 7.5v.01M12 21a9 9 0 1 1 0-18 9 9 0 0 1 0 18z\",\n  success: \"M8 12.5l2.5 2.5L16 9.5M12 21a9 9 0 1 1 0-18 9 9 0 0 1 0 18z\",\n  warning:\n    \"M12 9v4M12 16.5v.01M10.3 4.2L2.6 18a2 2 0 0 0 1.7 3h15.4a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0z\",\n  danger: \"M15 9l-6 6M9 9l6 6M12 21a9 9 0 1 1 0-18 9 9 0 0 1 0 18z\",\n  up: \"M7 14l5-5 5 5\",\n  down: \"M7 10l5 5 5-5\",\n  inbox: \"M4 13l2.5-7h11l2.5 7v6H4zM4 13h5l1 2h4l1-2h5\",\n  more: \"M4.8 12a1.2 1.2 0 1 0 2.4 0a1.2 1.2 0 1 0-2.4 0M10.8 12a1.2 1.2 0 1 0 2.4 0a1.2 1.2 0 1 0-2.4 0M16.8 12a1.2 1.2 0 1 0 2.4 0a1.2 1.2 0 1 0-2.4 0\",\n  columns: \"M4 5h16v14H4zM10 5v14M15 5v14\",\n  download: \"M12 4v11M7 10l5 5 5-5M5 20h14\",\n  upload: \"M12 15V4M7 9l5-5 5 5M5 20h14\",\n  retry: \"M20 12a8 8 0 1 1-8-8c2.2 0 4.3.9 5.9 2.4L20 8.5M20 4v4.5h-4.5\",\n  filter: \"M4 6h16M7 12h10M10 18h4\",\n  home: \"M4 11l8-7 8 7M6 9.5V20h12V9.5M10 20v-5h4v5\",\n  users: \"M9 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM3 20c0-3.3 2.7-6 6-6s6 2.7 6 6M16 4.5a3.5 3.5 0 0 1 0 6.5M21 20c0-2.6-1.6-4.8-4-5.6\",\n  orders: \"M6 4h12l1 16H5zM9 8a3 3 0 0 0 6 0\",\n  reports: \"M5 20V10M12 20V4M19 20v-7\",\n  settings: \"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM19.4 13.5l1.6 1.2-2 3.4-1.9-.7a7 7 0 0 1-2 1.2l-.3 2h-4l-.3-2a7 7 0 0 1-2-1.2l-1.9.7-2-3.4 1.6-1.2a7 7 0 0 1 0-3l-1.6-1.2 2-3.4 1.9.7a7 7 0 0 1 2-1.2l.3-2h4l.3 2a7 7 0 0 1 2 1.2l1.9-.7 2 3.4-1.6 1.2a7 7 0 0 1 0 3z\",\n  mail: \"M4 6h16v12H4zM4 7l8 6 8-6\",\n  star: \"M12 4l2.5 5.2 5.5.8-4 3.9.9 5.6L12 16.8 7.1 19.5l.9-5.6-4-3.9 5.5-.8z\",\n  archive: \"M4 5h16v4H4zM6 9v10h12V9M10 13h4\",\n  trash: \"M5 7h14M10 7V5h4v2M7 7l1 13h8l1-13\",\n  plus: \"M12 5v14M5 12h14\",\n  minus: \"M5 12h14\",\n  fit: \"M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5\",\n  folder: \"M3.5 6.5a1.5 1.5 0 0 1 1.5-1.5h4l2 2h8a1.5 1.5 0 0 1 1.5 1.5v9a1.5 1.5 0 0 1-1.5 1.5H5a1.5 1.5 0 0 1-1.5-1.5z\",\n  file: \"M6 3.5h8l4 4v13H6zM14 3.5v4h4\",\n  branch: \"M6 4v16M18 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM18 8c0 5-6 5-12 8\",\n  grip: \"M9 6.5v.01M15 6.5v.01M9 12v.01M15 12v.01M9 17.5v.01M15 17.5v.01\",\n  edit: \"M5 19h4L19 9l-4-4L5 15zM14 6l4 4\",\n  send: \"M4 12l16-8-6 16-2-7z\",\n  card: \"M3 6h18v12H3zM3 10h18M7 15h4\",\n  shield: \"M12 3l7 3v5c0 4.5-3 8.5-7 10-4-1.5-7-5.5-7-10V6z\",\n  bell: \"M6 16V11a6 6 0 0 1 12 0v5l2 2H4zM10 20a2 2 0 0 0 4 0\",\n}\n\ntype IconName = keyof typeof iconPaths\n\n/** An icon as an SVG element, for code without React. */\nfunction iconElement(name: IconName, className?: string) {\n  const svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\")\n  svg.setAttribute(\"viewBox\", \"0 0 24 24\")\n  svg.setAttribute(\"aria-hidden\", \"true\")\n  svg.setAttribute(\"focusable\", \"false\")\n  svg.setAttribute(\"class\", [\"uiset-icon\", className].filter(Boolean).join(\" \"))\n  const path = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\")\n  path.setAttribute(\"d\", iconPaths[name])\n  svg.append(path)\n  return svg\n}\n\nexport { iconElement, iconPaths }\nexport type { IconName }\n",
      "type": "registry:file",
      "target": "@ui/shell/icon-paths.ts"
    }
  ],
  "type": "registry:ui"
}