{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "progress",
  "title": "Progress",
  "type": "registry:ui",
  "files": [
    {
      "path": "packages/registry-native/components/progress/Progress.tsx",
      "content": "import * as React from 'react'\nimport { StyleSheet, View, type ViewProps } from 'react-native'\nimport Animated, {\n  useAnimatedStyle,\n  useReducedMotion,\n  useSharedValue,\n  withRepeat,\n  withTiming,\n} from 'react-native-reanimated'\nimport { cn } from '@/lib/utils'\nimport { motionDurations } from '@/lib/motion'\n\nexport interface ProgressProps extends ViewProps {\n  className?: string\n  indicatorClassName?: string\n  /** Current value, clamped to 0..max. Omit or pass null for indeterminate. */\n  value?: number | null\n  max?: number\n}\n\nfunction Progress({ className, indicatorClassName, value, max = 100, accessibilityState, ...props }: ProgressProps) {\n  const reduced = useReducedMotion()\n  const indeterminate = value === undefined || value === null\n  const safeMax = max > 0 ? max : 100\n  const clamped = indeterminate ? 0 : Math.min(safeMax, Math.max(0, value))\n  const percent = indeterminate ? 100 : (clamped / safeMax) * 100\n\n  const fill = useSharedValue(percent)\n  const opacity = useSharedValue(1)\n  // Transform-only fill: the indicator is a full-width bar translated left by\n  // the remaining percent, clipped by the track. Never animate `width` —\n  // layout properties cost a layout pass per frame; transforms composite.\n  const fillStyle = useAnimatedStyle(() => ({\n    transform: [{ translateX: `${fill.value - 100}%` }],\n    opacity: opacity.value,\n  }))\n\n  React.useEffect(() => {\n    fill.value = reduced ? percent : withTiming(percent, { duration: motionDurations.base })\n  }, [percent, reduced, fill])\n\n  React.useEffect(() => {\n    opacity.value =\n      indeterminate && !reduced ? withRepeat(withTiming(0.45, { duration: motionDurations.slow * 2 }), -1, true) : 1\n  }, [indeterminate, reduced, opacity])\n\n  return (\n    <View\n      accessibilityRole=\"progressbar\"\n      accessibilityState={{ ...accessibilityState, busy: indeterminate || accessibilityState?.busy }}\n      accessibilityValue={indeterminate ? undefined : { min: 0, max: safeMax, now: clamped }}\n      className={cn('bg-secondary h-2 w-full overflow-hidden rounded-full', className)}\n      {...props}\n    >\n      {/* Keep the animated transform out of NativeWind's style resolution. */}\n      <Animated.View cssInterop={false} style={[StyleSheet.absoluteFill, fillStyle]}>\n        <View className={cn('bg-primary h-full w-full rounded-full', indicatorClassName)} />\n      </Animated.View>\n    </View>\n  )\n}\n\nexport { Progress }\n",
      "type": "registry:ui",
      "target": "~/components/ui/progress/Progress.tsx"
    },
    {
      "path": "packages/registry-native/components/progress/index.ts",
      "content": "export { Progress, type ProgressProps } from './Progress'\n",
      "type": "registry:ui",
      "target": "~/components/ui/progress/index.ts"
    }
  ],
  "dependencies": [
    "react-native-reanimated"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://native.uipkge.dev/r/native/motion.json"
  ],
  "description": "Determinate progress bar with clamped value and progressbar semantics, plus an indeterminate pulsing mode when value is omitted. Reduced-motion safe.",
  "categories": [
    "feedback"
  ]
}