{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "arithmetic-ladder", "type": "registry:component", "title": "Arithmetic ladder", "description": "Transfer review: literal operators in the gutter, working before the answer, tint-band total, uncertainty attached to the number.", "registryDependencies": [ "@venlyfinance/venly-tokens", "@venlyfinance/money" ], "files": [ { "path": "registry/components/arithmetic-ladder.tsx", "type": "registry:component", "target": "~/components/venly/components/arithmetic-ladder.tsx", "content": "import type { CSSProperties, ReactElement, ReactNode } from \"react\";\nimport { Money } from \"../lib/money.js\";\n\n/**\n * Arithmetic ladder – the transfer review register.\n *\n * Design contract encoded by this component:\n * - Make the operators literal: a left gutter carrying − × + against each\n * fee and rate, so the reader verifies the sum without a calculator.\n * - Components before the total. Never the answer before the working.\n * - The total is separated by a filled tint band, not just a rule.\n * - Uncertainty attaches to the uncertain number (an asterisk on the row),\n * not to a global disclaimer.\n * - Rate liveness belongs on the rate row itself, never as a countdown on\n * the commit button.\n * - Never mask values on a review screen.\n */\nexport interface LadderRow {\n /** Literal operator rendered in the gutter: \"−\", \"+\", \"×\". */\n operator: \"−\" | \"+\" | \"×\";\n label: string;\n /** A money amount… */\n amount?: number | null;\n currency?: string;\n /** …or a non-money value (a rate like \"0.9996\"). */\n value?: ReactNode;\n /** Marks the number as an estimate: asterisk on the row. */\n uncertain?: boolean;\n /** Liveness note, e.g. \"Refreshed at 11:55:46\". */\n meta?: string;\n}\n\nexport interface ArithmeticLadderProps {\n input: { label: string; amount: number; currency?: string };\n rows: LadderRow[];\n total: { label: string; amount: number; currency?: string; uncertain?: boolean };\n style?: CSSProperties;\n className?: string;\n}\n\nexport function ArithmeticLadder({\n input,\n rows,\n total,\n style,\n className,\n}: ArithmeticLadderProps): ReactElement {\n return (\n