@knpkv/rly 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -3
- package/dist/{Dialog-_t9OodCK.js → Dialog-B9Ub_gMT.js} +79 -62
- package/dist/Dialog-B9Ub_gMT.js.map +1 -0
- package/dist/components.css +2 -2
- package/dist/diff/bounded/index.js +317 -303
- package/dist/diff/bounded/index.js.map +1 -1
- package/dist/diff/index.js +2436 -2433
- package/dist/diff/index.js.map +1 -1
- package/dist/diff/patch/index.js +188 -186
- package/dist/diff/patch/index.js.map +1 -1
- package/dist/diff/workbench/index.js +1 -1
- package/dist/dts/diff/DiffCodeView.d.ts.map +1 -1
- package/dist/dts/diff/DiffFileTree.d.ts.map +1 -1
- package/dist/dts/diff/DiffFinding.d.ts.map +1 -1
- package/dist/dts/diff/DiffHeader.d.ts.map +1 -1
- package/dist/dts/diff/bounded/BoundedDiffCodeView.d.ts.map +1 -1
- package/dist/dts/diff/patch/PatchDiffView.d.ts.map +1 -1
- package/dist/dts/internal/useNarrowerThan.d.ts +10 -0
- package/dist/dts/internal/useNarrowerThan.d.ts.map +1 -0
- package/dist/dts/patterns/AgentThread.d.ts.map +1 -1
- package/dist/dts/patterns/DecisionBar.d.ts +68 -0
- package/dist/dts/patterns/DecisionBar.d.ts.map +1 -0
- package/dist/dts/patterns/FreshnessStamp.d.ts.map +1 -1
- package/dist/dts/patterns/Hero.d.ts +69 -0
- package/dist/dts/patterns/Hero.d.ts.map +1 -0
- package/dist/dts/patterns/Region.d.ts +56 -0
- package/dist/dts/patterns/Region.d.ts.map +1 -0
- package/dist/dts/patterns/ReleaseRelay.d.ts.map +1 -1
- package/dist/dts/patterns/StageRail.d.ts +11 -1
- package/dist/dts/patterns/StageRail.d.ts.map +1 -1
- package/dist/dts/patterns/TimelineRow.d.ts +25 -0
- package/dist/dts/patterns/TimelineRow.d.ts.map +1 -1
- package/dist/dts/patterns/Verdict.d.ts +1 -1
- package/dist/dts/patterns/Verdict.d.ts.map +1 -1
- package/dist/dts/patterns/index.d.ts +8 -2
- package/dist/dts/patterns/index.d.ts.map +1 -1
- package/dist/dts/primitives/Button.d.ts +9 -4
- package/dist/dts/primitives/Button.d.ts.map +1 -1
- package/dist/dts/primitives/ChartLegend.d.ts +23 -0
- package/dist/dts/primitives/ChartLegend.d.ts.map +1 -0
- package/dist/dts/primitives/Field.d.ts +8 -3
- package/dist/dts/primitives/Field.d.ts.map +1 -1
- package/dist/dts/primitives/IconButton.d.ts +9 -4
- package/dist/dts/primitives/IconButton.d.ts.map +1 -1
- package/dist/dts/primitives/LimitTrack.d.ts +62 -0
- package/dist/dts/primitives/LimitTrack.d.ts.map +1 -0
- package/dist/dts/primitives/Notice.d.ts +5 -5
- package/dist/dts/primitives/Select.d.ts +8 -3
- package/dist/dts/primitives/Select.d.ts.map +1 -1
- package/dist/dts/primitives/StateLabel.d.ts +6 -6
- package/dist/dts/primitives/StateLabel.d.ts.map +1 -1
- package/dist/dts/primitives/StatePanel.d.ts +7 -6
- package/dist/dts/primitives/StatePanel.d.ts.map +1 -1
- package/dist/dts/primitives/ThemeSelect.d.ts +3 -2
- package/dist/dts/primitives/ThemeSelect.d.ts.map +1 -1
- package/dist/dts/primitives/ToggleGroup.d.ts +9 -4
- package/dist/dts/primitives/ToggleGroup.d.ts.map +1 -1
- package/dist/dts/primitives/TrackKey.d.ts +20 -0
- package/dist/dts/primitives/TrackKey.d.ts.map +1 -0
- package/dist/dts/primitives/index.d.ts +6 -0
- package/dist/dts/primitives/index.d.ts.map +1 -1
- package/dist/dts/tokens/control.d.ts +27 -0
- package/dist/dts/tokens/control.d.ts.map +1 -0
- package/dist/dts/tokens/index.d.ts +2 -2
- package/dist/dts/tokens/index.d.ts.map +1 -1
- package/dist/dts/tokens/semantic-tokens.d.ts +3 -1
- package/dist/dts/tokens/semantic-tokens.d.ts.map +1 -1
- package/dist/generated-tokens.css +55 -6
- package/dist/index.js +5 -5
- package/dist/patterns/index.js +2 -2
- package/dist/{patterns-LJ8Y44f2.js → patterns-DTsU3pFo.js} +1251 -954
- package/dist/patterns-DTsU3pFo.js.map +1 -0
- package/dist/primitives/index.js +3 -3
- package/dist/primitives-CgvvYKjR.js +589 -0
- package/dist/primitives-CgvvYKjR.js.map +1 -0
- package/dist/tokens/index.js +2 -2
- package/dist/{tokens-CjK9bxo7.js → tokens-B075JP3Z.js} +8 -3
- package/dist/tokens-B075JP3Z.js.map +1 -0
- package/dist/useNarrowerThan-B1PM32sm.js +21 -0
- package/dist/useNarrowerThan-B1PM32sm.js.map +1 -0
- package/dist/{workbench-4C25n_BY.js → workbench-CHCnYW3G.js} +107 -131
- package/dist/workbench-CHCnYW3G.js.map +1 -0
- package/package.json +5 -3
- package/registry/components.json +707 -25
- package/registry/search.json +172 -2
- package/dist/Dialog-_t9OodCK.js.map +0 -1
- package/dist/patterns-LJ8Y44f2.js.map +0 -1
- package/dist/primitives-CjQX0eVM.js +0 -453
- package/dist/primitives-CjQX0eVM.js.map +0 -1
- package/dist/tokens-CjK9bxo7.js.map +0 -1
- package/dist/workbench-4C25n_BY.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_Fragment","styles","Fragment$1","BoundedDiffCodeView_module_default","invalid","HUNK","HEADER","unquote","path","source","bytes","encoder","escapes","offset","match","literal","byte","code","trailing","headerPaths","candidates","index","header","left","right","destination","defaultPrefixes","prefixes","selected","oldPath","newPath","moved","unmarkedBinary","paths","binaryPaths","summary","body","selections","status","parsePatch","text","records","lines","line","files","currentPaths","movedSource","movedDestination","fileMode","oldMode","newMode","binary","binarySummary","hunks","oldEnd","newEnd","oldEof","newEof","oldCoordinates","newCoordinates","mode","value","kind","payload","readBinary","parsed","readHunk","record","hunk","markerStatus","start","chunks","first","lead","length","oldStart","newStart","oldCount","newCount","oldOffset","newOffset","oldNo","newNo","marker","previous","pathsOf","file","findFile","patch","pairRows","rows","deleted","added","next","PatchDiffView","cell","number","side","wrap","id","annotation","content","renderAnnotation","Fragment","row","rowIndex","lineIndex","hunkIndex"],"sources":["../../../src/diff/bounded/BoundedDiffCodeView.module.css","../../../src/diff/patch/parse.ts","../../../src/diff/patch/PatchDiffView.tsx"],"sourcesContent":[".root {\n overflow: hidden;\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-field);\n background: var(--rly-color-surface-1);\n color: var(--rly-color-text-1);\n}\n\n.file + .file {\n border-top: 1px solid var(--rly-color-border-1);\n}\n\n.noChanges {\n margin: 0;\n padding: var(--rly-space-16);\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n}\n\n.fileName {\n margin: 0;\n padding: var(--rly-space-12) var(--rly-space-16);\n border-bottom: 1px solid var(--rly-color-border-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n}\n\n.scroller {\n max-height: min(70vh, 56rem);\n overflow: auto;\n}\n\n.table {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n font-family: var(--rly-font-mono);\n font-size: 0.78rem;\n line-height: 1.55;\n}\n\n.table td {\n min-width: 0;\n padding: 0;\n vertical-align: top;\n}\n\n.hunk td {\n padding: var(--rly-space-4) var(--rly-space-12);\n border-block: 1px solid var(--rly-color-border-1);\n background: var(--rly-color-surface-2);\n color: var(--rly-color-text-2);\n}\n\n.lineNumber {\n width: 3.25rem;\n padding-inline: var(--rly-space-2) !important;\n border-right: 1px solid var(--rly-color-border-1);\n color: var(--rly-color-text-3);\n text-align: right;\n user-select: none;\n}\n\n.marker {\n width: 1.5rem;\n color: var(--rly-color-text-3);\n text-align: center;\n user-select: none;\n}\n\n.code,\n.wrappedCode {\n display: block;\n min-height: 1.55em;\n padding-inline: var(--rly-space-12);\n white-space: pre;\n}\n\n.wrappedCode {\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n.deletion > td,\n.change .deletionCode {\n background: var(--rly-color-blocked-tint);\n}\n\n.addition > td,\n.change .additionCode {\n background: var(--rly-color-success-tint);\n}\n\n.deletion .lineNumber,\n.addition .lineNumber,\n.deletion .marker,\n.addition .marker {\n color: var(--rly-color-text-2);\n}\n\n.context > td {\n background: var(--rly-color-surface-1);\n}\n\n.deletionCode,\n.additionCode {\n width: 50%;\n border-right: 1px solid var(--rly-color-border-1);\n}\n\n.annotationRow > td {\n background: var(--rly-color-surface-2);\n border-block: 1px solid var(--rly-color-border-1);\n}\n\n.annotationRow > .annotationCell {\n padding: var(--rly-space-8);\n}\n\n.annotation {\n background: var(--rly-color-held-tint);\n border-inline-start: var(--rly-space-2) solid var(--rly-color-held-ink);\n color: var(--rly-color-text-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n padding: var(--rly-space-8) var(--rly-space-12);\n}\n\n.annotation:focus-visible,\n[data-rly-diff-line]:focus-visible {\n outline: var(--rly-space-2) solid var(--rly-color-focus);\n outline-offset: var(--rly-space-2);\n}\n\n@media (forced-colors: active) {\n .annotation,\n [data-rly-diff-line]:focus-visible {\n forced-color-adjust: auto;\n }\n}\n","/**\n * A `git diff` parsed into files, hunks and numbered lines.\n *\n * Only what the renderer and the anchoring need: which files changed and how, and for\n * every line in a hunk its number on the old and the new side. Status, mode and body\n * evidence must agree; index and similarity values are not used for line anchoring.\n */\n\n/** A malformed patch cannot supply trustworthy source line positions. */\nexport interface PatchInvalid {\n readonly _tag: \"PatchInvalid\"\n readonly reason: string\n}\n\n/** What `parsePatch` returns: either a patch, or the reason it could not be trusted. */\nexport type ParseResult = { readonly _tag: \"Patch\"; readonly patch: Patch } | PatchInvalid\n\nconst invalid = (reason: string): PatchInvalid => ({ _tag: \"PatchInvalid\", reason })\n\ntype UnquotedPath = { readonly _tag: \"Path\"; readonly path: string } | PatchInvalid\nexport type LineKind = \"context\" | \"add\" | \"del\"\n\nexport interface DiffLine {\n readonly kind: LineKind\n readonly text: string\n /** Git EOF marker on this record: old side for deletions, new for additions, both for context. */\n readonly noNewline?: boolean\n /** Line number in the old file; absent on added lines. */\n readonly oldNo?: number\n /** Line number in the new file; absent on deleted lines. */\n readonly newNo?: number\n}\n\nexport interface Hunk {\n readonly header: string\n readonly oldStart: number\n readonly newStart: number\n readonly lines: ReadonlyArray<DiffLine>\n}\n\nexport type FileStatus = \"added\" | \"deleted\" | \"modified\" | \"renamed\" | \"copied\"\n\nexport interface FileDiff {\n /** The path a guide refers to: the new path, or the old one when the file was deleted. */\n readonly path: string\n readonly oldPath: string\n readonly newPath: string\n readonly status: FileStatus\n readonly binary: boolean\n /** Explicit mode headers only; an absent side or unreported mode stays absent. */\n readonly oldMode?: string\n readonly newMode?: string\n readonly hunks: ReadonlyArray<Hunk>\n}\n\nexport interface Patch {\n readonly files: ReadonlyArray<FileDiff>\n}\n\nconst HUNK = /^@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@(.*)$/\nconst HEADER = \"diff --git \"\n\n/** Exact Git producer prefixes. Use two empty strings for --no-prefix, including paths resembling a/ and b/. */\nexport interface PatchPrefixes {\n readonly source: string\n readonly destination: string\n}\n\nconst unquote = (path: string): UnquotedPath => {\n if (path.includes(\"\\u0000\")) return invalid(\"Git paths cannot contain NUL\")\n if (!path.startsWith(\"\\\"\")) return { _tag: \"Path\", path }\n if (!path.endsWith(\"\\\"\")) return invalid(\"Unclosed quoted path\")\n const source = path.slice(1, -1)\n const bytes: Array<number> = []\n const encoder = new TextEncoder()\n const escapes = new Map([\n [\"a\", 7],\n [\"b\", 8],\n [\"t\", 9],\n [\"n\", 10],\n [\"v\", 11],\n [\"f\", 12],\n [\"r\", 13],\n [\"\\\"\", 34],\n [\"\\\\\", 92]\n ])\n let offset = 0\n for (const match of source.matchAll(/\\\\([0-7]{3}|.)/gs)) {\n const literal = source.slice(offset, match.index)\n if (literal.includes(\"\\\"\")) return invalid(\"Unescaped quote in quoted path\")\n for (const byte of encoder.encode(literal)) bytes.push(byte)\n const code = match[1] ?? \"\"\n const byte = /^[0-7]{3}$/.test(code) ? parseInt(code, 8) : escapes.get(code)\n if (byte === undefined || byte === 0 || byte > 255) return invalid(\"Invalid quoted path escape\")\n bytes.push(byte)\n offset = match.index + match[0].length\n }\n const trailing = source.slice(offset)\n if (trailing.includes(\"\\\\\")) return invalid(\"Dangling quoted path escape\")\n if (trailing.includes(\"\\\"\")) return invalid(\"Unescaped quote in quoted path\")\n for (const byte of encoder.encode(trailing)) bytes.push(byte)\n try {\n return {\n _tag: \"Path\",\n path: new TextDecoder(\"utf-8\", { fatal: true, ignoreBOM: true }).decode(new Uint8Array(bytes))\n }\n } catch {\n return invalid(\"Quoted Git path is not valid UTF-8\")\n }\n}\n\n/** Resolve header boundaries against file markers; spaces in unquoted filenames are legal Git output. */\nconst headerPaths = (\n header: string,\n source: string | undefined,\n destination: string | undefined,\n prefixes: PatchPrefixes | undefined,\n moved: { readonly source: string; readonly destination: string } | undefined,\n unmarkedBinary = false\n): { readonly _tag: \"Paths\"; readonly oldPath: string; readonly newPath: string } | PatchInvalid => {\n const candidates: Array<{ readonly oldPath: string; readonly newPath: string }> = []\n for (let index = 0; index < header.length; index++) {\n if (header[index] !== \" \") continue\n const left = unquote(header.slice(0, index))\n const right = unquote(header.slice(index + 1))\n if (left._tag === \"PatchInvalid\" || right._tag === \"PatchInvalid\") continue\n if (left.path === \"\" || right.path === \"\") continue\n if (source !== undefined && source !== \"/dev/null\" && source !== left.path) continue\n if (destination !== undefined && destination !== \"/dev/null\" && destination !== right.path) continue\n const defaultPrefixes = prefixes === undefined && left.path.startsWith(\"a/\") && right.path.startsWith(\"b/\")\n const selected = prefixes ?? (defaultPrefixes\n ? { source: \"a/\", destination: \"b/\" }\n : { source: \"\", destination: \"\" })\n if (!left.path.startsWith(selected.source) || !right.path.startsWith(selected.destination)) continue\n const oldPath = left.path.slice(selected.source.length)\n const newPath = right.path.slice(selected.destination.length)\n if (oldPath === \"\" || newPath === \"\") continue\n if (moved !== undefined && (oldPath !== moved.source || newPath !== moved.destination)) continue\n if (\n moved === undefined && source === undefined && destination === undefined && oldPath !== newPath &&\n !(unmarkedBinary && (defaultPrefixes || prefixes !== undefined))\n ) continue\n candidates.push({ oldPath, newPath })\n }\n const paths = candidates[0]\n return candidates.length === 1 && paths !== undefined\n ? { _tag: \"Paths\", ...paths }\n : invalid(\"Inconsistent or ambiguous Git file headers; custom prefixes must be supplied explicitly\")\n}\n\n/** Match every possible summary separator against the authoritative header, including quoted and spaced paths. */\nconst binaryPaths = (\n header: string,\n summary: string,\n prefixes: PatchPrefixes | undefined,\n moved: { readonly source: string; readonly destination: string } | undefined,\n status: FileStatus\n): ReturnType<typeof headerPaths> => {\n if (!summary.endsWith(\" differ\")) return invalid(\"Incomplete binary summary\")\n const body = summary.slice(\"Binary files \".length, -\" differ\".length)\n // Auto mode tries Git's standard prefixes before an unprefixed producer.\n // Otherwise a filename ending in \" and\" can fabricate a second no-prefix interpretation.\n const selections = prefixes === undefined\n ? [{ source: \"a/\", destination: \"b/\" }, { source: \"\", destination: \"\" }]\n : [prefixes]\n for (const selected of selections) {\n const candidates: Array<Extract<ReturnType<typeof headerPaths>, { readonly _tag: \"Paths\" }>> = []\n for (const match of body.matchAll(/(?= and )/g)) {\n const source = unquote(body.slice(0, match.index))\n const destination = unquote(body.slice(match.index + \" and \".length))\n if (source._tag === \"PatchInvalid\" || destination._tag === \"PatchInvalid\") continue\n if ((source.path === \"/dev/null\") !== (status === \"added\")) continue\n if ((destination.path === \"/dev/null\") !== (status === \"deleted\")) continue\n const paths = headerPaths(header, source.path, destination.path, selected, moved)\n if (paths._tag === \"Paths\") candidates.push(paths)\n }\n const paths = candidates[0]\n if (candidates.length === 1 && paths !== undefined) return paths\n if (candidates.length > 1) return invalid(\"Ambiguous binary summary paths\")\n }\n return invalid(\"Binary summary paths disagree with Git headers\")\n}\n\n/** Infer default a/b prefixes when present; pass explicit empty prefixes for unambiguous --no-prefix parsing. */\nexport const parsePatch = (text: string, prefixes?: PatchPrefixes): ParseResult => {\n if (text !== \"\" && !text.endsWith(\"\\n\")) return invalid(\"Unterminated patch record\")\n // A CR on a Git header identifies transport line endings; body-only CR belongs to the source.\n const records = text.split(\"\\n\")\n const converted = records.some((line) => line.startsWith(HEADER) && line.endsWith(\"\\r\"))\n const lines = converted ? records.map((line) => line.endsWith(\"\\r\") ? line.slice(0, -1) : line) : records\n const files: Array<FileDiff> = []\n const currentPaths = new Set<string>()\n let index = 0\n\n while (index < lines.length) {\n const line = lines[index] ?? \"\"\n if (!line.startsWith(HEADER)) {\n index += 1\n continue\n }\n const header = line.slice(HEADER.length)\n let source: string | undefined\n let destination: string | undefined\n let movedSource: string | undefined\n let movedDestination: string | undefined\n let status: FileStatus = \"modified\"\n let fileMode: string | undefined\n let oldMode: string | undefined\n let newMode: string | undefined\n let binary = false\n let binarySummary: string | undefined\n const hunks: Array<Hunk> = []\n let oldEnd = 0\n let newEnd = 0\n let oldEof = false\n let newEof = false\n const oldCoordinates = new Set<number>()\n const newCoordinates = new Set<number>()\n index += 1\n\n while (index < lines.length && !(lines[index] ?? \"\").startsWith(HEADER)) {\n const line = lines[index] ?? \"\"\n if (/^(new file|deleted file|old|new) mode/.test(line)) {\n const mode = /^(new file|deleted file|old|new) mode ([0-7]{6})$/.exec(line)\n if (mode === null) return invalid(\"Invalid file mode header\")\n const value = mode[2]\n if (mode[1] === \"old\") {\n if (oldMode !== undefined && oldMode !== value) return invalid(\"Conflicting old modes\")\n oldMode = value\n } else if (mode[1] === \"new\") {\n if (newMode !== undefined && newMode !== value) return invalid(\"Conflicting new modes\")\n newMode = value\n } else {\n const kind = mode[1] === \"new file\" ? \"added\" : \"deleted\"\n if (status !== \"modified\" && status !== kind) return invalid(\"Conflicting file status headers\")\n if (fileMode !== undefined && fileMode !== value) return invalid(\"Conflicting file modes\")\n status = kind\n fileMode = value\n }\n } else if (/^(rename|copy) (from|to) /.test(line)) {\n const kind = line.startsWith(\"copy \") ? \"copied\" : \"renamed\"\n if (status !== \"modified\" && status !== kind) return invalid(\"Conflicting file status headers\")\n status = kind\n const path = unquote(line.replace(/^(rename|copy) (from|to) /, \"\"))\n if (path._tag === \"PatchInvalid\") return path\n if (/^(rename|copy) from /.test(line)) {\n if (movedSource !== undefined && movedSource !== path.path) return invalid(\"Conflicting move source paths\")\n movedSource = path.path\n } else {\n if (movedDestination !== undefined && movedDestination !== path.path) {\n return invalid(\"Conflicting move destination paths\")\n }\n movedDestination = path.path\n }\n } else if (line.startsWith(\"GIT binary patch\")) {\n if (line !== \"GIT binary patch\") return invalid(\"Invalid binary patch marker\")\n const payload = readBinary(lines, index + 1)\n if (payload._tag === \"PatchInvalid\") return payload\n binary = true\n index = payload.next\n continue\n } else if (line.startsWith(\"Binary files \")) {\n if (binarySummary !== undefined && binarySummary !== line) return invalid(\"Conflicting binary summaries\")\n binarySummary = line\n binary = true\n } else if (line.startsWith(\"--- \") || line.startsWith(\"+++ \")) {\n const path = unquote(line.slice(4).replace(/\\t$/, \"\"))\n if (path._tag === \"PatchInvalid\") return path\n if (line.startsWith(\"--- \")) {\n if (source !== undefined && source !== path.path) return invalid(\"Conflicting source file markers\")\n source = path.path\n } else {\n if (destination !== undefined && destination !== path.path) {\n return invalid(\"Conflicting destination file markers\")\n }\n destination = path.path\n }\n } else if (HUNK.test(line)) {\n if (source === undefined || destination === undefined) return invalid(\"Text hunks require paired file markers\")\n const parsed = readHunk(lines, index)\n if (parsed._tag === \"PatchInvalid\") return parsed\n if (!parsed.hunk.lines.some((record) => record.kind === \"add\" || record.kind === \"del\")) {\n return invalid(\"Text hunk has no change evidence\")\n }\n if (parsed.oldOffset < oldEnd || parsed.newOffset < newEnd) return invalid(\"Hunk ranges move backwards\")\n oldEnd = parsed.oldEnd\n newEnd = parsed.newEnd\n for (const record of parsed.hunk.lines) {\n if ((oldEof && record.oldNo !== undefined) || (newEof && record.newNo !== undefined)) {\n return invalid(\"Patch records follow an EOF marker on the same side\")\n }\n if (record.noNewline === true) {\n oldEof ||= record.oldNo !== undefined\n newEof ||= record.newNo !== undefined\n }\n if (\n (record.oldNo !== undefined && oldCoordinates.has(record.oldNo)) ||\n (record.newNo !== undefined && newCoordinates.has(record.newNo))\n ) return invalid(`Overlapping hunk at line ${index + 1}`)\n if (record.oldNo !== undefined) oldCoordinates.add(record.oldNo)\n if (record.newNo !== undefined) newCoordinates.add(record.newNo)\n }\n hunks.push(parsed.hunk)\n index = parsed.next\n continue\n } else if (/^(?:@@|[+\\- \\\\])/.test(line)) {\n return invalid(`Unexpected patch body at line ${index + 1}`)\n }\n index += 1\n }\n if ((source === undefined) !== (destination === undefined)) return invalid(\"Unpaired file markers\")\n if ((movedSource === undefined) !== (movedDestination === undefined)) {\n return invalid(\"Unpaired rename or copy headers\")\n }\n if ((oldMode === undefined) !== (newMode === undefined)) return invalid(\"Unpaired mode transition\")\n if (fileMode !== undefined && oldMode !== undefined) return invalid(\"Conflicting file mode headers\")\n if (oldMode !== undefined && (source === \"/dev/null\" || destination === \"/dev/null\")) {\n return invalid(\"Mode transition requires both file sides\")\n }\n if (binary && source !== undefined) return invalid(\"Mixed binary and text bodies\")\n if (source !== undefined && hunks.length === 0) return invalid(\"Text markers require hunks\")\n if (source === \"/dev/null\" && destination === \"/dev/null\") return invalid(\"Both file sides are absent\")\n if (\n hunks.some((hunk) =>\n hunk.lines.some((line) =>\n (source === \"/dev/null\" && line.oldNo !== undefined) ||\n (destination === \"/dev/null\" && line.newNo !== undefined)\n )\n )\n ) return invalid(\"Absent file side contains text lines\")\n if (source !== undefined) {\n const markerStatus = source === \"/dev/null\" ? \"added\" : destination === \"/dev/null\" ? \"deleted\" : \"modified\"\n if (\n (status === \"added\" || status === \"deleted\" || markerStatus !== \"modified\") &&\n status !== \"modified\" && status !== markerStatus\n ) return invalid(\"File status disagrees with file markers\")\n if (markerStatus !== \"modified\") status = markerStatus\n }\n if (\n hunks.length === 0 && !binary && movedSource === undefined && fileMode === undefined &&\n (oldMode === undefined || oldMode === newMode)\n ) return invalid(\"File block has no change evidence\")\n const moved = movedSource === undefined || movedDestination === undefined\n ? undefined\n : { source: movedSource, destination: movedDestination }\n const paths = binarySummary === undefined\n ? headerPaths(header, source, destination, prefixes, moved, binary)\n : binaryPaths(header, binarySummary, prefixes, moved, status)\n if (paths._tag === \"PatchInvalid\") return paths\n if (\n binary && source === undefined && moved === undefined && status !== \"modified\" && paths.oldPath !== paths.newPath\n ) {\n return invalid(\"Binary addition or deletion has conflicting header paths\")\n }\n const path = status === \"deleted\" ? paths.oldPath : paths.newPath\n if (currentPaths.has(path)) return invalid(\"Duplicate canonical current file path\")\n currentPaths.add(path)\n files.push({\n path,\n oldPath: paths.oldPath,\n newPath: paths.newPath,\n status,\n binary,\n ...(status === \"deleted\" && fileMode !== undefined\n ? { oldMode: fileMode }\n : oldMode === undefined\n ? {}\n : { oldMode }),\n ...(status === \"added\" && fileMode !== undefined\n ? { newMode: fileMode }\n : newMode === undefined\n ? {}\n : { newMode }),\n hunks\n })\n }\n if (files.length === 0 && text.trim() !== \"\") return invalid(\"Expected a git unified diff\")\n return { _tag: \"Patch\", patch: { files } }\n}\n\n/** Validate Git's literal/delta record framing without inflating or applying binary content. */\nconst readBinary = (\n lines: ReadonlyArray<string>,\n start: number\n): { readonly _tag: \"Binary\"; readonly next: number } | PatchInvalid => {\n let index = start\n let chunks = 0\n do {\n const header = /^(literal|delta) (\\d+)$/.exec(lines[index] ?? \"\")\n if (header === null || !Number.isSafeInteger(Number(header[2]))) return invalid(\"Invalid binary chunk header\")\n index += 1\n const first = index\n while (index < lines.length && lines[index] !== \"\") {\n const line = lines[index] ?? \"\"\n const lead = line.charCodeAt(0)\n const length = lead >= 65 && lead <= 90 ? lead - 64 : lead >= 97 && lead <= 122 ? lead - 70 : 0\n if (\n length === 0 || line.length !== 1 + Math.ceil(length / 4) * 5 ||\n !/^[0-9A-Za-z!#$%&()*+;<=>?@^_`{|}~-]+$/.test(line.slice(1))\n ) return invalid(\"Invalid binary chunk data\")\n index += 1\n }\n // A final split sentinel is not the blank record that terminates a Git payload.\n if (index === first || index >= lines.length - 1) return invalid(\"Incomplete binary chunk\")\n index += 1\n chunks += 1\n } while (chunks < 2 && /^(literal|delta)(?:\\s|$)/.test(lines[index] ?? \"\"))\n if (/^(literal|delta)(?:\\s|$)/.test(lines[index] ?? \"\")) return invalid(\"Surplus binary chunk\")\n return { _tag: \"Binary\", next: index }\n}\n\nconst readHunk = (\n lines: ReadonlyArray<string>,\n start: number\n): {\n readonly _tag: \"Hunk\"\n readonly hunk: Hunk\n readonly next: number\n readonly oldOffset: number\n readonly newOffset: number\n readonly oldEnd: number\n readonly newEnd: number\n} | PatchInvalid => {\n const match = HUNK.exec(lines[start] ?? \"\")\n if (match === null) return invalid(`not a hunk header at line ${start + 1}`)\n const oldStart = Number(match[1])\n const newStart = Number(match[3])\n let oldCount = match[2] === undefined ? 1 : Number(match[2])\n let newCount = match[4] === undefined ? 1 : Number(match[4])\n if (![oldStart, newStart, oldCount, newCount].every(Number.isSafeInteger)) return invalid(\"Unsafe hunk integers\")\n if (oldCount === 0 && newCount === 0) return invalid(\"Empty hunk\")\n if (\n (oldCount > 0 && !Number.isSafeInteger(oldStart + (oldCount - 1))) ||\n (newCount > 0 && !Number.isSafeInteger(newStart + (newCount - 1)))\n ) return invalid(\"Hunk coordinates overflow\")\n // Half-open zero-based ranges: empty Git ranges anchor after the named line.\n const oldOffset = oldStart - (oldCount === 0 ? 0 : 1)\n const newOffset = newStart - (newCount === 0 ? 0 : 1)\n const oldEnd = oldOffset + oldCount\n const newEnd = newOffset + newCount\n let oldNo = oldStart\n let newNo = newStart\n const body: Array<DiffLine> = []\n let index = start + 1\n\n while (index < lines.length && (oldCount > 0 || newCount > 0)) {\n const line = lines[index] ?? \"\"\n const marker = line[0]\n const text = line.slice(1)\n if (marker === \"+\") {\n body.push({ kind: \"add\", text, newNo })\n newNo += 1\n newCount -= 1\n } else if (marker === \"-\") {\n body.push({ kind: \"del\", text, oldNo })\n oldNo += 1\n oldCount -= 1\n } else if (marker === \" \") {\n body.push({ kind: \"context\", text, oldNo, newNo })\n oldNo += 1\n newNo += 1\n oldCount -= 1\n newCount -= 1\n } else {\n break\n }\n index += 1\n // A marker belongs to exactly one preceding body record and consumes no coordinate.\n if ((lines[index] ?? \"\").startsWith(\"\\\\\")) {\n if (lines[index] !== \"\\\\") return invalid(`Invalid newline marker at line ${index + 1}`)\n const previous = body[body.length - 1]\n if (previous !== undefined) body[body.length - 1] = { ...previous, noNewline: true }\n index += 1\n }\n }\n if (oldCount !== 0 || newCount !== 0) return invalid(`Incomplete hunk at line ${start + 1}`)\n\n return {\n _tag: \"Hunk\",\n oldOffset,\n newOffset,\n oldEnd,\n newEnd,\n hunk: { header: match[5]?.trim() ?? \"\", oldStart, newStart, lines: body },\n next: index\n }\n}\n\n/** Changed-file paths: the current name first, then the source of a rename or modified comparison. */\nexport const pathsOf = (file: FileDiff): ReadonlyArray<string> =>\n file.status === \"renamed\" || (file.status === \"modified\" && file.oldPath !== file.newPath)\n ? [file.newPath, file.oldPath]\n : [file.path]\n\nexport const findFile = (patch: Patch, path: string): FileDiff | undefined =>\n patch.files.find((file) => file.path === path) ?? patch.files.find((file) => pathsOf(file).includes(path))\n","import { Fragment, type ReactElement, type ReactNode } from \"react\"\nimport styles from \"../bounded/BoundedDiffCodeView.module.css\"\nimport type { DiffLine, FileDiff, Hunk } from \"./parse.js\"\n\nexport { findFile, parsePatch, pathsOf } from \"./parse.js\"\nexport type {\n DiffLine,\n FileDiff,\n FileStatus,\n Hunk,\n LineKind,\n ParseResult,\n Patch,\n PatchInvalid,\n PatchPrefixes\n} from \"./parse.js\"\n\nexport interface PatchDiffViewProps {\n readonly file: FileDiff\n /** Unique prefix for stable source-line links within the document. */\n readonly id: string\n readonly mode?: \"split\" | \"stacked\"\n readonly wrap?: boolean\n /** Called once for each visible side and line; consumers own annotation identity and content. */\n readonly renderAnnotation?: (side: \"old\" | \"new\", line: number) => ReactNode\n}\n\ninterface Row {\n readonly left: DiffLine | undefined\n readonly right: DiffLine | undefined\n}\n\n/** Pair consecutive deletions and additions without renumbering sparse patch hunks. */\nexport const pairRows = (hunk: Hunk): ReadonlyArray<Row> => {\n const rows: Array<Row> = []\n let index = 0\n while (index < hunk.lines.length) {\n const line = hunk.lines[index]\n if (line === undefined) break\n if (line.kind === \"context\") {\n rows.push({ left: line, right: line })\n index++\n continue\n }\n const deleted: Array<DiffLine> = []\n const added: Array<DiffLine> = []\n while (hunk.lines[index]?.kind === \"del\") {\n const next = hunk.lines[index++]\n if (next !== undefined) deleted.push(next)\n }\n while (hunk.lines[index]?.kind === \"add\") {\n const next = hunk.lines[index++]\n if (next !== undefined) added.push(next)\n }\n for (let offset = 0; offset < Math.max(deleted.length, added.length); offset++) {\n const left = deleted[offset]\n const right = added[offset]\n rows.push({ left, right })\n }\n }\n return rows\n}\n\n/** Render a patch as an accessible, server-renderable table. Source omissions stay omitted. */\nexport const PatchDiffView = ({\n file,\n id,\n mode = \"split\",\n renderAnnotation,\n wrap = false\n}: PatchDiffViewProps): ReactElement => {\n const cell = (line: DiffLine | undefined, side: \"old\" | \"new\") => {\n const number = side === \"old\" ? line?.oldNo : line?.newNo\n return (\n <>\n <td className={styles.lineNumber}>{number}</td>\n <td className={side === \"old\" ? styles.deletionCode : styles.additionCode}>\n {line === undefined ? null : (\n <>\n <code className={wrap ? styles.wrappedCode : styles.code} id={`${id}-${side}-${number}`} tabIndex={-1}>\n {line.text || \" \"}\n </code>\n {line.noNewline === true ? (\n <small aria-label={`${side === \"old\" ? \"Before\" : \"After\"}: no newline`}>\n No newline at end of file\n </small>\n ) : null}\n </>\n )}\n </td>\n </>\n )\n }\n const annotation = (line: DiffLine | undefined, side: \"old\" | \"new\") => {\n const number = side === \"old\" ? line?.oldNo : line?.newNo\n const content = number === undefined ? undefined : renderAnnotation?.(side, number)\n return content == null ? null : (\n <tr className={styles.annotationRow}>\n <td className={styles.annotationCell} colSpan={4}>\n {content}\n </td>\n </tr>\n )\n }\n return (\n <div className={styles.root} data-rly-patch-diff=\"\" data-rly-diff-mode={mode}>\n {file.oldMode === undefined && file.newMode === undefined ? null : (\n <p className={styles.noChanges}>\n {file.oldMode === undefined\n ? `Mode added: ${file.newMode}`\n : file.newMode === undefined\n ? `Mode removed: ${file.oldMode}`\n : `Mode: ${file.oldMode} → ${file.newMode}`}\n </p>\n )}\n {file.binary || file.hunks.length === 0 ? (\n <p className={styles.noChanges}>{file.binary ? \"Binary file.\" : \"No content change.\"}</p>\n ) : (\n <div style={{ overflowX: \"auto\" }} role=\"region\" aria-label={`Changes in ${file.path}`} tabIndex={0}>\n <table className={styles.table} aria-label={`Changes in ${file.path}`}>\n <thead>\n <tr>\n {mode === \"split\" ? (\n <>\n <th colSpan={2} scope=\"colgroup\">\n Before\n </th>\n <th colSpan={2} scope=\"colgroup\">\n After\n </th>\n </>\n ) : (\n <>\n <th scope=\"col\">Before</th>\n <th scope=\"col\">After</th>\n <th colSpan={2} scope=\"colgroup\">\n Change\n </th>\n </>\n )}\n </tr>\n </thead>\n <tbody>\n {file.hunks.map((hunk, hunkIndex) => (\n <Fragment key={hunkIndex}>\n <tr className={styles.hunk}>\n <td colSpan={4}>\n @@ {hunk.oldStart} → {hunk.newStart} {hunk.header}\n </td>\n </tr>\n {mode === \"split\"\n ? pairRows(hunk).map((row, rowIndex) => (\n <Fragment key={rowIndex}>\n <tr className={row.left?.kind === \"context\" ? styles.context : styles.change}>\n {cell(row.left, \"old\")}\n {cell(row.right, \"new\")}\n </tr>\n {annotation(row.left, \"old\")}\n {annotation(row.right, \"new\")}\n </Fragment>\n ))\n : hunk.lines.map((line, lineIndex) => (\n <Fragment key={lineIndex}>\n <tr\n className={\n line.kind === \"add\"\n ? styles.addition\n : line.kind === \"del\"\n ? styles.deletion\n : styles.context\n }\n >\n <td className={styles.lineNumber}>\n <span id={line.oldNo === undefined ? undefined : `${id}-old-${line.oldNo}`} tabIndex={-1}>\n {line.oldNo}\n </span>\n </td>\n <td className={styles.lineNumber}>\n <span id={line.newNo === undefined ? undefined : `${id}-new-${line.newNo}`} tabIndex={-1}>\n {line.newNo}\n </span>\n </td>\n <td className={styles.marker}>\n {line.kind === \"add\" ? \"+\" : line.kind === \"del\" ? \"−\" : \" \"}\n </td>\n <td>\n <code className={wrap ? styles.wrappedCode : styles.code}>{line.text || \" \"}</code>\n {line.noNewline === true ? (\n <small\n aria-label={\n line.kind === \"del\"\n ? \"Before: no newline\"\n : line.kind === \"add\"\n ? \"After: no newline\"\n : \"Before: no newline; After: no newline\"\n }\n >\n No newline at end of file\n </small>\n ) : null}\n </td>\n </tr>\n {annotation(line, \"old\")}\n {annotation(line, \"new\")}\n </Fragment>\n ))}\n </Fragment>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;GCiBMI,KAAW,OAAkC;CAAE,MAAM;CAAgB;AAAO,IA0C5EC,IAAO,oDACPC,IAAS,eAQTC,KAAW,MAA+B;CAC9C,IAAIC,EAAK,SAAS,IAAQ,GAAG,OAAOJ,EAAQ,8BAA8B;CAC1E,IAAI,CAACI,EAAK,WAAW,IAAI,GAAG,OAAO;EAAE,MAAM;EAAQ;CAAK;CACxD,IAAI,CAACA,EAAK,SAAS,IAAI,GAAG,OAAOJ,EAAQ,sBAAsB;CAC/D,IAAMK,IAASD,EAAK,MAAM,GAAG,EAAE,GACzBE,IAAuB,CAAC,GACxBC,IAAU,IAAI,YAAY,GAC1BC,oBAAU,IAAI,IAAI;EACtB,CAAC,KAAK,CAAC;EACP,CAAC,KAAK,CAAC;EACP,CAAC,KAAK,CAAC;EACP,CAAC,KAAK,EAAE;EACR,CAAC,KAAK,EAAE;EACR,CAAC,KAAK,EAAE;EACR,CAAC,KAAK,EAAE;EACR,CAAC,MAAM,EAAE;EACT,CAAC,MAAM,EAAE;CACX,CAAC,GACGC,IAAS;CACb,KAAK,IAAMC,KAASL,EAAO,SAAS,kBAAkB,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G,EAAA,GA9DKC,CA8DL,CACX,EACI,CAAA,CACF;;EACJ,CAAA,CAEJ;;AAET"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Fragment","styles","useNarrowerThan","Fragment$1","BoundedDiffCodeView_module_default","invalid","HUNK","HEADER","unquote","path","source","bytes","encoder","escapes","offset","match","literal","byte","code","trailing","headerPaths","candidates","index","header","left","right","destination","defaultPrefixes","prefixes","selected","oldPath","newPath","moved","unmarkedBinary","paths","binaryPaths","summary","body","selections","status","parsePatch","text","records","lines","line","files","currentPaths","movedSource","movedDestination","fileMode","oldMode","newMode","binary","binarySummary","hunks","oldEnd","newEnd","oldEof","newEof","oldCoordinates","newCoordinates","mode","value","kind","payload","readBinary","parsed","readHunk","record","hunk","markerStatus","start","chunks","first","lead","length","oldStart","newStart","oldCount","newCount","oldOffset","newOffset","oldNo","newNo","marker","previous","pathsOf","file","findFile","patch","pairRows","rows","deleted","added","next","PatchDiffView","narrow","measureRef","shown","cell","number","side","wrap","id","annotation","content","renderAnnotation","Fragment","row","rowIndex","lineIndex","hunkIndex"],"sources":["../../../src/diff/bounded/BoundedDiffCodeView.module.css","../../../src/diff/patch/parse.ts","../../../src/diff/patch/PatchDiffView.tsx"],"sourcesContent":[".root {\n overflow: hidden;\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-field);\n background: var(--rly-color-surface-1);\n color: var(--rly-color-text-1);\n}\n\n.file + .file {\n border-top: 1px solid var(--rly-color-border-1);\n}\n\n.noChanges {\n margin: 0;\n padding: var(--rly-space-16);\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n}\n\n.fileName {\n margin: 0;\n padding: var(--rly-space-12) var(--rly-space-16);\n border-bottom: 1px solid var(--rly-color-border-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n}\n\n.scroller {\n max-height: min(70vh, 56rem);\n overflow: auto;\n}\n\n.table {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n font-family: var(--rly-font-mono);\n font-size: 0.78rem;\n line-height: 1.55;\n}\n\n.table td {\n min-width: 0;\n padding: 0;\n vertical-align: top;\n}\n\n.hunk td {\n padding: var(--rly-space-4) var(--rly-space-12);\n border-block: 1px solid var(--rly-color-border-1);\n background: var(--rly-color-surface-2);\n color: var(--rly-color-text-2);\n}\n\n.lineNumber {\n width: 3.25rem;\n /* Room either side of the number, so the column rule reads as one rule, not a box per line. */\n padding-inline: var(--rly-space-8) var(--rly-space-6) !important;\n border-right: 1px solid var(--rly-color-border-1);\n color: var(--rly-color-text-3);\n text-align: right;\n user-select: none;\n}\n\n.marker {\n width: 1.5rem;\n color: var(--rly-color-text-3);\n text-align: center;\n user-select: none;\n}\n\n.code,\n.wrappedCode {\n display: block;\n min-height: 1.55em;\n padding-inline: var(--rly-space-12);\n white-space: pre;\n}\n\n.wrappedCode {\n white-space: pre-wrap;\n overflow-wrap: break-word;\n}\n\n/*\n * In an auto-sized table a long token would widen its column rather than wrap. Capping the wrapped\n * code cell at zero and letting it take the remaining width bounds it to the viewport, so\n * break-word can wrap a 200-character string; unwrapped views keep their horizontal scroll.\n */\n.table td:has(> .wrappedCode) {\n inline-size: 100%;\n max-inline-size: 0;\n}\n\n.deletion > td,\n.change .deletionCode {\n background: var(--rly-color-blocked-tint);\n}\n\n.addition > td,\n.change .additionCode {\n background: var(--rly-color-success-tint);\n}\n\n.deletion .lineNumber,\n.addition .lineNumber,\n.deletion .marker,\n.addition .marker {\n color: var(--rly-color-text-2);\n}\n\n.context > td {\n background: var(--rly-color-surface-1);\n}\n\n.deletionCode,\n.additionCode {\n width: 50%;\n border-right: 1px solid var(--rly-color-border-1);\n}\n\n.annotationRow > td {\n background: var(--rly-color-surface-2);\n border-block: 1px solid var(--rly-color-border-1);\n}\n\n.annotationRow > .annotationCell {\n padding: var(--rly-space-8);\n}\n\n.annotation {\n background: var(--rly-color-held-tint);\n border: 1px solid color-mix(in oklab, var(--rly-color-held-ink) 35%, transparent);\n border-radius: var(--rly-radius-tag);\n color: var(--rly-color-text-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n padding: var(--rly-space-8) var(--rly-space-12);\n}\n\n.annotation:focus-visible,\n[data-rly-diff-line]:focus-visible {\n outline: var(--rly-space-2) solid var(--rly-color-focus);\n outline-offset: var(--rly-space-2);\n}\n\n@media (forced-colors: active) {\n .annotation,\n [data-rly-diff-line]:focus-visible {\n forced-color-adjust: auto;\n }\n}\n\n/*\n * Forced colours drop the add/remove tints. Split cells have no marker column, so a changed cell\n * gets its sign drawn before the code (hidden from assistive technology, which reads the column).\n */\n@media (forced-colors: active) {\n .change .deletionCode > :is(.code, .wrappedCode)::before {\n content: \"− \" / \"\";\n }\n .change .additionCode > :is(.code, .wrappedCode)::before {\n content: \"+ \" / \"\";\n }\n}\n\n:where([data-forced-colors=\"active\"], [data-rly-forced-colors=\"active\"])\n .change\n .deletionCode\n > :is(.code, .wrappedCode)::before {\n content: \"− \" / \"\";\n}\n:where([data-forced-colors=\"active\"], [data-rly-forced-colors=\"active\"])\n .change\n .additionCode\n > :is(.code, .wrappedCode)::before {\n content: \"+ \" / \"\";\n}\n","/**\n * A `git diff` parsed into files, hunks and numbered lines.\n *\n * Only what the renderer and the anchoring need: which files changed and how, and for\n * every line in a hunk its number on the old and the new side. Status, mode and body\n * evidence must agree; index and similarity values are not used for line anchoring.\n */\n\n/** A malformed patch cannot supply trustworthy source line positions. */\nexport interface PatchInvalid {\n readonly _tag: \"PatchInvalid\"\n readonly reason: string\n}\n\n/** What `parsePatch` returns: either a patch, or the reason it could not be trusted. */\nexport type ParseResult = { readonly _tag: \"Patch\"; readonly patch: Patch } | PatchInvalid\n\nconst invalid = (reason: string): PatchInvalid => ({ _tag: \"PatchInvalid\", reason })\n\ntype UnquotedPath = { readonly _tag: \"Path\"; readonly path: string } | PatchInvalid\nexport type LineKind = \"context\" | \"add\" | \"del\"\n\nexport interface DiffLine {\n readonly kind: LineKind\n readonly text: string\n /** Git EOF marker on this record: old side for deletions, new for additions, both for context. */\n readonly noNewline?: boolean\n /** Line number in the old file; absent on added lines. */\n readonly oldNo?: number\n /** Line number in the new file; absent on deleted lines. */\n readonly newNo?: number\n}\n\nexport interface Hunk {\n readonly header: string\n readonly oldStart: number\n readonly newStart: number\n readonly lines: ReadonlyArray<DiffLine>\n}\n\nexport type FileStatus = \"added\" | \"deleted\" | \"modified\" | \"renamed\" | \"copied\"\n\nexport interface FileDiff {\n /** The path a guide refers to: the new path, or the old one when the file was deleted. */\n readonly path: string\n readonly oldPath: string\n readonly newPath: string\n readonly status: FileStatus\n readonly binary: boolean\n /** Explicit mode headers only; an absent side or unreported mode stays absent. */\n readonly oldMode?: string\n readonly newMode?: string\n readonly hunks: ReadonlyArray<Hunk>\n}\n\nexport interface Patch {\n readonly files: ReadonlyArray<FileDiff>\n}\n\nconst HUNK = /^@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@(.*)$/\nconst HEADER = \"diff --git \"\n\n/** Exact Git producer prefixes. Use two empty strings for --no-prefix, including paths resembling a/ and b/. */\nexport interface PatchPrefixes {\n readonly source: string\n readonly destination: string\n}\n\nconst unquote = (path: string): UnquotedPath => {\n if (path.includes(\"\\u0000\")) return invalid(\"Git paths cannot contain NUL\")\n if (!path.startsWith(\"\\\"\")) return { _tag: \"Path\", path }\n if (!path.endsWith(\"\\\"\")) return invalid(\"Unclosed quoted path\")\n const source = path.slice(1, -1)\n const bytes: Array<number> = []\n const encoder = new TextEncoder()\n const escapes = new Map([\n [\"a\", 7],\n [\"b\", 8],\n [\"t\", 9],\n [\"n\", 10],\n [\"v\", 11],\n [\"f\", 12],\n [\"r\", 13],\n [\"\\\"\", 34],\n [\"\\\\\", 92]\n ])\n let offset = 0\n for (const match of source.matchAll(/\\\\([0-7]{3}|.)/gs)) {\n const literal = source.slice(offset, match.index)\n if (literal.includes(\"\\\"\")) return invalid(\"Unescaped quote in quoted path\")\n for (const byte of encoder.encode(literal)) bytes.push(byte)\n const code = match[1] ?? \"\"\n const byte = /^[0-7]{3}$/.test(code) ? parseInt(code, 8) : escapes.get(code)\n if (byte === undefined || byte === 0 || byte > 255) return invalid(\"Invalid quoted path escape\")\n bytes.push(byte)\n offset = match.index + match[0].length\n }\n const trailing = source.slice(offset)\n if (trailing.includes(\"\\\\\")) return invalid(\"Dangling quoted path escape\")\n if (trailing.includes(\"\\\"\")) return invalid(\"Unescaped quote in quoted path\")\n for (const byte of encoder.encode(trailing)) bytes.push(byte)\n try {\n return {\n _tag: \"Path\",\n path: new TextDecoder(\"utf-8\", { fatal: true, ignoreBOM: true }).decode(new Uint8Array(bytes))\n }\n } catch {\n return invalid(\"Quoted Git path is not valid UTF-8\")\n }\n}\n\n/** Resolve header boundaries against file markers; spaces in unquoted filenames are legal Git output. */\nconst headerPaths = (\n header: string,\n source: string | undefined,\n destination: string | undefined,\n prefixes: PatchPrefixes | undefined,\n moved: { readonly source: string; readonly destination: string } | undefined,\n unmarkedBinary = false\n): { readonly _tag: \"Paths\"; readonly oldPath: string; readonly newPath: string } | PatchInvalid => {\n const candidates: Array<{ readonly oldPath: string; readonly newPath: string }> = []\n for (let index = 0; index < header.length; index++) {\n if (header[index] !== \" \") continue\n const left = unquote(header.slice(0, index))\n const right = unquote(header.slice(index + 1))\n if (left._tag === \"PatchInvalid\" || right._tag === \"PatchInvalid\") continue\n if (left.path === \"\" || right.path === \"\") continue\n if (source !== undefined && source !== \"/dev/null\" && source !== left.path) continue\n if (destination !== undefined && destination !== \"/dev/null\" && destination !== right.path) continue\n const defaultPrefixes = prefixes === undefined && left.path.startsWith(\"a/\") && right.path.startsWith(\"b/\")\n const selected = prefixes ?? (defaultPrefixes\n ? { source: \"a/\", destination: \"b/\" }\n : { source: \"\", destination: \"\" })\n if (!left.path.startsWith(selected.source) || !right.path.startsWith(selected.destination)) continue\n const oldPath = left.path.slice(selected.source.length)\n const newPath = right.path.slice(selected.destination.length)\n if (oldPath === \"\" || newPath === \"\") continue\n if (moved !== undefined && (oldPath !== moved.source || newPath !== moved.destination)) continue\n if (\n moved === undefined && source === undefined && destination === undefined && oldPath !== newPath &&\n !(unmarkedBinary && (defaultPrefixes || prefixes !== undefined))\n ) continue\n candidates.push({ oldPath, newPath })\n }\n const paths = candidates[0]\n return candidates.length === 1 && paths !== undefined\n ? { _tag: \"Paths\", ...paths }\n : invalid(\"Inconsistent or ambiguous Git file headers; custom prefixes must be supplied explicitly\")\n}\n\n/** Match every possible summary separator against the authoritative header, including quoted and spaced paths. */\nconst binaryPaths = (\n header: string,\n summary: string,\n prefixes: PatchPrefixes | undefined,\n moved: { readonly source: string; readonly destination: string } | undefined,\n status: FileStatus\n): ReturnType<typeof headerPaths> => {\n if (!summary.endsWith(\" differ\")) return invalid(\"Incomplete binary summary\")\n const body = summary.slice(\"Binary files \".length, -\" differ\".length)\n // Auto mode tries Git's standard prefixes before an unprefixed producer.\n // Otherwise a filename ending in \" and\" can fabricate a second no-prefix interpretation.\n const selections = prefixes === undefined\n ? [{ source: \"a/\", destination: \"b/\" }, { source: \"\", destination: \"\" }]\n : [prefixes]\n for (const selected of selections) {\n const candidates: Array<Extract<ReturnType<typeof headerPaths>, { readonly _tag: \"Paths\" }>> = []\n for (const match of body.matchAll(/(?= and )/g)) {\n const source = unquote(body.slice(0, match.index))\n const destination = unquote(body.slice(match.index + \" and \".length))\n if (source._tag === \"PatchInvalid\" || destination._tag === \"PatchInvalid\") continue\n if ((source.path === \"/dev/null\") !== (status === \"added\")) continue\n if ((destination.path === \"/dev/null\") !== (status === \"deleted\")) continue\n const paths = headerPaths(header, source.path, destination.path, selected, moved)\n if (paths._tag === \"Paths\") candidates.push(paths)\n }\n const paths = candidates[0]\n if (candidates.length === 1 && paths !== undefined) return paths\n if (candidates.length > 1) return invalid(\"Ambiguous binary summary paths\")\n }\n return invalid(\"Binary summary paths disagree with Git headers\")\n}\n\n/** Infer default a/b prefixes when present; pass explicit empty prefixes for unambiguous --no-prefix parsing. */\nexport const parsePatch = (text: string, prefixes?: PatchPrefixes): ParseResult => {\n if (text !== \"\" && !text.endsWith(\"\\n\")) return invalid(\"Unterminated patch record\")\n // A CR on a Git header identifies transport line endings; body-only CR belongs to the source.\n const records = text.split(\"\\n\")\n const converted = records.some((line) => line.startsWith(HEADER) && line.endsWith(\"\\r\"))\n const lines = converted ? records.map((line) => line.endsWith(\"\\r\") ? line.slice(0, -1) : line) : records\n const files: Array<FileDiff> = []\n const currentPaths = new Set<string>()\n let index = 0\n\n while (index < lines.length) {\n const line = lines[index] ?? \"\"\n if (!line.startsWith(HEADER)) {\n index += 1\n continue\n }\n const header = line.slice(HEADER.length)\n let source: string | undefined\n let destination: string | undefined\n let movedSource: string | undefined\n let movedDestination: string | undefined\n let status: FileStatus = \"modified\"\n let fileMode: string | undefined\n let oldMode: string | undefined\n let newMode: string | undefined\n let binary = false\n let binarySummary: string | undefined\n const hunks: Array<Hunk> = []\n let oldEnd = 0\n let newEnd = 0\n let oldEof = false\n let newEof = false\n const oldCoordinates = new Set<number>()\n const newCoordinates = new Set<number>()\n index += 1\n\n while (index < lines.length && !(lines[index] ?? \"\").startsWith(HEADER)) {\n const line = lines[index] ?? \"\"\n if (/^(new file|deleted file|old|new) mode/.test(line)) {\n const mode = /^(new file|deleted file|old|new) mode ([0-7]{6})$/.exec(line)\n if (mode === null) return invalid(\"Invalid file mode header\")\n const value = mode[2]\n if (mode[1] === \"old\") {\n if (oldMode !== undefined && oldMode !== value) return invalid(\"Conflicting old modes\")\n oldMode = value\n } else if (mode[1] === \"new\") {\n if (newMode !== undefined && newMode !== value) return invalid(\"Conflicting new modes\")\n newMode = value\n } else {\n const kind = mode[1] === \"new file\" ? \"added\" : \"deleted\"\n if (status !== \"modified\" && status !== kind) return invalid(\"Conflicting file status headers\")\n if (fileMode !== undefined && fileMode !== value) return invalid(\"Conflicting file modes\")\n status = kind\n fileMode = value\n }\n } else if (/^(rename|copy) (from|to) /.test(line)) {\n const kind = line.startsWith(\"copy \") ? \"copied\" : \"renamed\"\n if (status !== \"modified\" && status !== kind) return invalid(\"Conflicting file status headers\")\n status = kind\n const path = unquote(line.replace(/^(rename|copy) (from|to) /, \"\"))\n if (path._tag === \"PatchInvalid\") return path\n if (/^(rename|copy) from /.test(line)) {\n if (movedSource !== undefined && movedSource !== path.path) return invalid(\"Conflicting move source paths\")\n movedSource = path.path\n } else {\n if (movedDestination !== undefined && movedDestination !== path.path) {\n return invalid(\"Conflicting move destination paths\")\n }\n movedDestination = path.path\n }\n } else if (line.startsWith(\"GIT binary patch\")) {\n if (line !== \"GIT binary patch\") return invalid(\"Invalid binary patch marker\")\n const payload = readBinary(lines, index + 1)\n if (payload._tag === \"PatchInvalid\") return payload\n binary = true\n index = payload.next\n continue\n } else if (line.startsWith(\"Binary files \")) {\n if (binarySummary !== undefined && binarySummary !== line) return invalid(\"Conflicting binary summaries\")\n binarySummary = line\n binary = true\n } else if (line.startsWith(\"--- \") || line.startsWith(\"+++ \")) {\n const path = unquote(line.slice(4).replace(/\\t$/, \"\"))\n if (path._tag === \"PatchInvalid\") return path\n if (line.startsWith(\"--- \")) {\n if (source !== undefined && source !== path.path) return invalid(\"Conflicting source file markers\")\n source = path.path\n } else {\n if (destination !== undefined && destination !== path.path) {\n return invalid(\"Conflicting destination file markers\")\n }\n destination = path.path\n }\n } else if (HUNK.test(line)) {\n if (source === undefined || destination === undefined) return invalid(\"Text hunks require paired file markers\")\n const parsed = readHunk(lines, index)\n if (parsed._tag === \"PatchInvalid\") return parsed\n if (!parsed.hunk.lines.some((record) => record.kind === \"add\" || record.kind === \"del\")) {\n return invalid(\"Text hunk has no change evidence\")\n }\n if (parsed.oldOffset < oldEnd || parsed.newOffset < newEnd) return invalid(\"Hunk ranges move backwards\")\n oldEnd = parsed.oldEnd\n newEnd = parsed.newEnd\n for (const record of parsed.hunk.lines) {\n if ((oldEof && record.oldNo !== undefined) || (newEof && record.newNo !== undefined)) {\n return invalid(\"Patch records follow an EOF marker on the same side\")\n }\n if (record.noNewline === true) {\n oldEof ||= record.oldNo !== undefined\n newEof ||= record.newNo !== undefined\n }\n if (\n (record.oldNo !== undefined && oldCoordinates.has(record.oldNo)) ||\n (record.newNo !== undefined && newCoordinates.has(record.newNo))\n ) return invalid(`Overlapping hunk at line ${index + 1}`)\n if (record.oldNo !== undefined) oldCoordinates.add(record.oldNo)\n if (record.newNo !== undefined) newCoordinates.add(record.newNo)\n }\n hunks.push(parsed.hunk)\n index = parsed.next\n continue\n } else if (/^(?:@@|[+\\- \\\\])/.test(line)) {\n return invalid(`Unexpected patch body at line ${index + 1}`)\n }\n index += 1\n }\n if ((source === undefined) !== (destination === undefined)) return invalid(\"Unpaired file markers\")\n if ((movedSource === undefined) !== (movedDestination === undefined)) {\n return invalid(\"Unpaired rename or copy headers\")\n }\n if ((oldMode === undefined) !== (newMode === undefined)) return invalid(\"Unpaired mode transition\")\n if (fileMode !== undefined && oldMode !== undefined) return invalid(\"Conflicting file mode headers\")\n if (oldMode !== undefined && (source === \"/dev/null\" || destination === \"/dev/null\")) {\n return invalid(\"Mode transition requires both file sides\")\n }\n if (binary && source !== undefined) return invalid(\"Mixed binary and text bodies\")\n if (source !== undefined && hunks.length === 0) return invalid(\"Text markers require hunks\")\n if (source === \"/dev/null\" && destination === \"/dev/null\") return invalid(\"Both file sides are absent\")\n if (\n hunks.some((hunk) =>\n hunk.lines.some((line) =>\n (source === \"/dev/null\" && line.oldNo !== undefined) ||\n (destination === \"/dev/null\" && line.newNo !== undefined)\n )\n )\n ) return invalid(\"Absent file side contains text lines\")\n if (source !== undefined) {\n const markerStatus = source === \"/dev/null\" ? \"added\" : destination === \"/dev/null\" ? \"deleted\" : \"modified\"\n if (\n (status === \"added\" || status === \"deleted\" || markerStatus !== \"modified\") &&\n status !== \"modified\" && status !== markerStatus\n ) return invalid(\"File status disagrees with file markers\")\n if (markerStatus !== \"modified\") status = markerStatus\n }\n if (\n hunks.length === 0 && !binary && movedSource === undefined && fileMode === undefined &&\n (oldMode === undefined || oldMode === newMode)\n ) return invalid(\"File block has no change evidence\")\n const moved = movedSource === undefined || movedDestination === undefined\n ? undefined\n : { source: movedSource, destination: movedDestination }\n const paths = binarySummary === undefined\n ? headerPaths(header, source, destination, prefixes, moved, binary)\n : binaryPaths(header, binarySummary, prefixes, moved, status)\n if (paths._tag === \"PatchInvalid\") return paths\n if (\n binary && source === undefined && moved === undefined && status !== \"modified\" && paths.oldPath !== paths.newPath\n ) {\n return invalid(\"Binary addition or deletion has conflicting header paths\")\n }\n const path = status === \"deleted\" ? paths.oldPath : paths.newPath\n if (currentPaths.has(path)) return invalid(\"Duplicate canonical current file path\")\n currentPaths.add(path)\n files.push({\n path,\n oldPath: paths.oldPath,\n newPath: paths.newPath,\n status,\n binary,\n ...(status === \"deleted\" && fileMode !== undefined\n ? { oldMode: fileMode }\n : oldMode === undefined\n ? {}\n : { oldMode }),\n ...(status === \"added\" && fileMode !== undefined\n ? { newMode: fileMode }\n : newMode === undefined\n ? {}\n : { newMode }),\n hunks\n })\n }\n if (files.length === 0 && text.trim() !== \"\") return invalid(\"Expected a git unified diff\")\n return { _tag: \"Patch\", patch: { files } }\n}\n\n/** Validate Git's literal/delta record framing without inflating or applying binary content. */\nconst readBinary = (\n lines: ReadonlyArray<string>,\n start: number\n): { readonly _tag: \"Binary\"; readonly next: number } | PatchInvalid => {\n let index = start\n let chunks = 0\n do {\n const header = /^(literal|delta) (\\d+)$/.exec(lines[index] ?? \"\")\n if (header === null || !Number.isSafeInteger(Number(header[2]))) return invalid(\"Invalid binary chunk header\")\n index += 1\n const first = index\n while (index < lines.length && lines[index] !== \"\") {\n const line = lines[index] ?? \"\"\n const lead = line.charCodeAt(0)\n const length = lead >= 65 && lead <= 90 ? lead - 64 : lead >= 97 && lead <= 122 ? lead - 70 : 0\n if (\n length === 0 || line.length !== 1 + Math.ceil(length / 4) * 5 ||\n !/^[0-9A-Za-z!#$%&()*+;<=>?@^_`{|}~-]+$/.test(line.slice(1))\n ) return invalid(\"Invalid binary chunk data\")\n index += 1\n }\n // A final split sentinel is not the blank record that terminates a Git payload.\n if (index === first || index >= lines.length - 1) return invalid(\"Incomplete binary chunk\")\n index += 1\n chunks += 1\n } while (chunks < 2 && /^(literal|delta)(?:\\s|$)/.test(lines[index] ?? \"\"))\n if (/^(literal|delta)(?:\\s|$)/.test(lines[index] ?? \"\")) return invalid(\"Surplus binary chunk\")\n return { _tag: \"Binary\", next: index }\n}\n\nconst readHunk = (\n lines: ReadonlyArray<string>,\n start: number\n): {\n readonly _tag: \"Hunk\"\n readonly hunk: Hunk\n readonly next: number\n readonly oldOffset: number\n readonly newOffset: number\n readonly oldEnd: number\n readonly newEnd: number\n} | PatchInvalid => {\n const match = HUNK.exec(lines[start] ?? \"\")\n if (match === null) return invalid(`not a hunk header at line ${start + 1}`)\n const oldStart = Number(match[1])\n const newStart = Number(match[3])\n let oldCount = match[2] === undefined ? 1 : Number(match[2])\n let newCount = match[4] === undefined ? 1 : Number(match[4])\n if (![oldStart, newStart, oldCount, newCount].every(Number.isSafeInteger)) return invalid(\"Unsafe hunk integers\")\n if (oldCount === 0 && newCount === 0) return invalid(\"Empty hunk\")\n if (\n (oldCount > 0 && !Number.isSafeInteger(oldStart + (oldCount - 1))) ||\n (newCount > 0 && !Number.isSafeInteger(newStart + (newCount - 1)))\n ) return invalid(\"Hunk coordinates overflow\")\n // Half-open zero-based ranges: empty Git ranges anchor after the named line.\n const oldOffset = oldStart - (oldCount === 0 ? 0 : 1)\n const newOffset = newStart - (newCount === 0 ? 0 : 1)\n const oldEnd = oldOffset + oldCount\n const newEnd = newOffset + newCount\n let oldNo = oldStart\n let newNo = newStart\n const body: Array<DiffLine> = []\n let index = start + 1\n\n while (index < lines.length && (oldCount > 0 || newCount > 0)) {\n const line = lines[index] ?? \"\"\n const marker = line[0]\n const text = line.slice(1)\n if (marker === \"+\") {\n body.push({ kind: \"add\", text, newNo })\n newNo += 1\n newCount -= 1\n } else if (marker === \"-\") {\n body.push({ kind: \"del\", text, oldNo })\n oldNo += 1\n oldCount -= 1\n } else if (marker === \" \") {\n body.push({ kind: \"context\", text, oldNo, newNo })\n oldNo += 1\n newNo += 1\n oldCount -= 1\n newCount -= 1\n } else {\n break\n }\n index += 1\n // A marker belongs to exactly one preceding body record and consumes no coordinate.\n if ((lines[index] ?? \"\").startsWith(\"\\\\\")) {\n if (lines[index] !== \"\\\\") return invalid(`Invalid newline marker at line ${index + 1}`)\n const previous = body[body.length - 1]\n if (previous !== undefined) body[body.length - 1] = { ...previous, noNewline: true }\n index += 1\n }\n }\n if (oldCount !== 0 || newCount !== 0) return invalid(`Incomplete hunk at line ${start + 1}`)\n\n return {\n _tag: \"Hunk\",\n oldOffset,\n newOffset,\n oldEnd,\n newEnd,\n hunk: { header: match[5]?.trim() ?? \"\", oldStart, newStart, lines: body },\n next: index\n }\n}\n\n/** Changed-file paths: the current name first, then the source of a rename or modified comparison. */\nexport const pathsOf = (file: FileDiff): ReadonlyArray<string> =>\n file.status === \"renamed\" || (file.status === \"modified\" && file.oldPath !== file.newPath)\n ? [file.newPath, file.oldPath]\n : [file.path]\n\nexport const findFile = (patch: Patch, path: string): FileDiff | undefined =>\n patch.files.find((file) => file.path === path) ?? patch.files.find((file) => pathsOf(file).includes(path))\n","import { Fragment, type ReactElement, type ReactNode } from \"react\"\nimport styles from \"../bounded/BoundedDiffCodeView.module.css\"\nimport { RLY_SPLIT_DIFF_MIN_WIDTH, useNarrowerThan } from \"../../internal/useNarrowerThan.js\"\nimport type { DiffLine, FileDiff, Hunk } from \"./parse.js\"\n\nexport { findFile, parsePatch, pathsOf } from \"./parse.js\"\nexport type {\n DiffLine,\n FileDiff,\n FileStatus,\n Hunk,\n LineKind,\n ParseResult,\n Patch,\n PatchInvalid,\n PatchPrefixes\n} from \"./parse.js\"\n\nexport interface PatchDiffViewProps {\n readonly file: FileDiff\n /** Unique prefix for stable source-line links within the document. */\n readonly id: string\n readonly mode?: \"split\" | \"stacked\"\n readonly wrap?: boolean\n /** Called once for each visible side and line; consumers own annotation identity and content. */\n readonly renderAnnotation?: (side: \"old\" | \"new\", line: number) => ReactNode\n}\n\ninterface Row {\n readonly left: DiffLine | undefined\n readonly right: DiffLine | undefined\n}\n\n/** Pair consecutive deletions and additions without renumbering sparse patch hunks. */\nexport const pairRows = (hunk: Hunk): ReadonlyArray<Row> => {\n const rows: Array<Row> = []\n let index = 0\n while (index < hunk.lines.length) {\n const line = hunk.lines[index]\n if (line === undefined) break\n if (line.kind === \"context\") {\n rows.push({ left: line, right: line })\n index++\n continue\n }\n const deleted: Array<DiffLine> = []\n const added: Array<DiffLine> = []\n while (hunk.lines[index]?.kind === \"del\") {\n const next = hunk.lines[index++]\n if (next !== undefined) deleted.push(next)\n }\n while (hunk.lines[index]?.kind === \"add\") {\n const next = hunk.lines[index++]\n if (next !== undefined) added.push(next)\n }\n for (let offset = 0; offset < Math.max(deleted.length, added.length); offset++) {\n const left = deleted[offset]\n const right = added[offset]\n rows.push({ left, right })\n }\n }\n return rows\n}\n\n/** Render a patch as an accessible, server-renderable table. Source omissions stay omitted. */\nexport const PatchDiffView = ({\n file,\n id,\n mode = \"split\",\n renderAnnotation,\n wrap = false\n}: PatchDiffViewProps): ReactElement => {\n // A split view stacks in a narrow container, so neither side is clipped to a sliver.\n const [narrow, measureRef] = useNarrowerThan<HTMLDivElement>(RLY_SPLIT_DIFF_MIN_WIDTH)\n const shown = mode === \"split\" && narrow ? \"stacked\" : mode\n const cell = (line: DiffLine | undefined, side: \"old\" | \"new\") => {\n const number = side === \"old\" ? line?.oldNo : line?.newNo\n return (\n <>\n <td className={styles.lineNumber}>{number}</td>\n <td className={side === \"old\" ? styles.deletionCode : styles.additionCode}>\n {line === undefined ? null : (\n <>\n <code className={wrap ? styles.wrappedCode : styles.code} id={`${id}-${side}-${number}`} tabIndex={-1}>\n {line.text || \" \"}\n </code>\n {line.noNewline === true ? (\n <small aria-label={`${side === \"old\" ? \"Before\" : \"After\"}: no newline`}>\n No newline at end of file\n </small>\n ) : null}\n </>\n )}\n </td>\n </>\n )\n }\n const annotation = (line: DiffLine | undefined, side: \"old\" | \"new\") => {\n const number = side === \"old\" ? line?.oldNo : line?.newNo\n const content = number === undefined ? undefined : renderAnnotation?.(side, number)\n return content == null ? null : (\n <tr className={styles.annotationRow}>\n <td className={styles.annotationCell} colSpan={4}>\n {content}\n </td>\n </tr>\n )\n }\n return (\n <div className={styles.root} data-rly-patch-diff=\"\" data-rly-diff-mode={shown} ref={measureRef}>\n {file.oldMode === undefined && file.newMode === undefined ? null : (\n <p className={styles.noChanges}>\n {file.oldMode === undefined\n ? `Mode added: ${file.newMode}`\n : file.newMode === undefined\n ? `Mode removed: ${file.oldMode}`\n : `Mode: ${file.oldMode} → ${file.newMode}`}\n </p>\n )}\n {file.binary || file.hunks.length === 0 ? (\n <p className={styles.noChanges}>{file.binary ? \"Binary file.\" : \"No content change.\"}</p>\n ) : (\n <div style={{ overflowX: \"auto\" }} role=\"region\" aria-label={`Changes in ${file.path}`} tabIndex={0}>\n <table className={styles.table} aria-label={`Changes in ${file.path}`}>\n <thead>\n <tr>\n {shown === \"split\" ? (\n <>\n <th colSpan={2} scope=\"colgroup\">\n Before\n </th>\n <th colSpan={2} scope=\"colgroup\">\n After\n </th>\n </>\n ) : (\n <>\n <th scope=\"col\">Before</th>\n <th scope=\"col\">After</th>\n <th colSpan={2} scope=\"colgroup\">\n Change\n </th>\n </>\n )}\n </tr>\n </thead>\n <tbody>\n {file.hunks.map((hunk, hunkIndex) => (\n <Fragment key={hunkIndex}>\n <tr className={styles.hunk}>\n <td colSpan={4}>\n @@ {hunk.oldStart} → {hunk.newStart} {hunk.header}\n </td>\n </tr>\n {shown === \"split\"\n ? pairRows(hunk).map((row, rowIndex) => (\n <Fragment key={rowIndex}>\n <tr className={row.left?.kind === \"context\" ? styles.context : styles.change}>\n {cell(row.left, \"old\")}\n {cell(row.right, \"new\")}\n </tr>\n {annotation(row.left, \"old\")}\n {annotation(row.right, \"new\")}\n </Fragment>\n ))\n : hunk.lines.map((line, lineIndex) => (\n <Fragment key={lineIndex}>\n <tr\n className={\n line.kind === \"add\"\n ? styles.addition\n : line.kind === \"del\"\n ? styles.deletion\n : styles.context\n }\n >\n <td className={styles.lineNumber}>\n <span id={line.oldNo === undefined ? undefined : `${id}-old-${line.oldNo}`} tabIndex={-1}>\n {line.oldNo}\n </span>\n </td>\n <td className={styles.lineNumber}>\n <span id={line.newNo === undefined ? undefined : `${id}-new-${line.newNo}`} tabIndex={-1}>\n {line.newNo}\n </span>\n </td>\n <td className={styles.marker}>\n {line.kind === \"add\" ? \"+\" : line.kind === \"del\" ? \"−\" : \" \"}\n </td>\n <td>\n <code className={wrap ? styles.wrappedCode : styles.code}>{line.text || \" \"}</code>\n {line.noNewline === true ? (\n <small\n aria-label={\n line.kind === \"del\"\n ? \"Before: no newline\"\n : line.kind === \"add\"\n ? \"After: no newline\"\n : \"Before: no newline; After: no newline\"\n }\n >\n No newline at end of file\n </small>\n ) : null}\n </td>\n </tr>\n {annotation(line, \"old\")}\n {annotation(line, \"new\")}\n </Fragment>\n ))}\n </Fragment>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;GCiBMK,KAAW,OAAkC;CAAE,MAAM;CAAgB;AAAO,IA0C5EC,IAAO,oDACPC,IAAS,eAQTC,KAAW,MAA+B;CAC9C,IAAIC,EAAK,SAAS,IAAQ,GAAG,OAAOJ,EAAQ,8BAA8B;CAC1E,IAAI,CAACI,EAAK,WAAW,IAAI,GAAG,OAAO;EAAE,MAAM;EAAQ;CAAK;CACxD,IAAI,CAACA,EAAK,SAAS,IAAI,GAAG,OAAOJ,EAAQ,sBAAsB;CAC/D,IAAMK,IAASD,EAAK,MAAM,GAAG,EAAE,GACzBE,IAAuB,CAAC,GACxBC,IAAU,IAAI,YAAY,GAC1BC,oBAAU,IAAI,I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ACvD,CAAA;OACJ,kBAAC,MAAD,EAAA,UAAA,CACE,kBAAC,QAAD;QAAM,WAAW0D,IAAOrG,EAAO,cAAcA,EAAO;QAAO,UAAA2C,EAAK,QAAQ;OAAU,CAAA,GACjFA,EAAK,cAAc,KAClB,kBAAC,SAAD;QACE,cACEA,EAAK,SAAS,QACV,uBACAA,EAAK,SAAS,QACZ,sBACA;QAET,UAAA;OAEM,CAAA,IACL,IACF,EAAA,CAAA;MACF;;KACH4D,EAAW5D,GAAM,KAAK;KACtB4D,EAAW5D,GAAM,KAAK;IACf,EAAA,GA1CKkE,CA0CL,CACX,CACG,EAAA,GA9DKC,CA8DL,CACX,EACI,CAAA,CACF;;EACJ,CAAA,CAEJ;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiffCodeView.d.ts","sourceRoot":"","sources":["../../../src/diff/DiffCodeView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAEnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAc,KAAK,aAAa,EAAE,KAAK,GAAG,EAAoD,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"DiffCodeView.d.ts","sourceRoot":"","sources":["../../../src/diff/DiffCodeView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAEnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAc,KAAK,aAAa,EAAE,KAAK,GAAG,EAAoD,MAAM,OAAO,CAAA;AAQlH,OAAO,KAAK,EAAE,qBAAqB,EAAmB,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGrH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,EAAE,qBAAqB,CAAA;CAC3C;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC,kBAAkB,EAAE,SAAS,CAAC,GAAG;QACrE,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,cAAc,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC,CAAA;KACjE,CAAA;CACF;AAED,MAAM,MAAM,uBAAuB,GAAG,aAAa,CAAC,4BAA4B,CAAC,CAAA;AA0FjF,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,aAAc,uBAAuB,2HA+IhE,CAAA;AAEJ,qGAAqG;AACrG,eAAO,MAAM,YAAY,wHAA6C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiffFileTree.d.ts","sourceRoot":"","sources":["../../../src/diff/DiffFileTree.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"DiffFileTree.d.ts","sourceRoot":"","sources":["../../../src/diff/DiffFileTree.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EAMlB,MAAM,OAAO,CAAA;AAMd,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAA;AAE5E,mGAAmG;AACnG,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;CAAE,GACrD;IACE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,OAAO,CAAA;CAC/E,CAAA;AAEL,UAAU,eAAe;IACvB,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAA;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,oFAAoF;AACpF,M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Q,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IACnD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B,CAAA;AAgBD,yGAAyG;AACzG,eAAO,MAAM,UAAU,yKAapB,eAAe,KAAG,YA2DpB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoundedDiffCodeView.d.ts","sourceRoot":"","sources":["../../../../src/diff/bounded/BoundedDiffCodeView.tsx"],"names":[],"mappings":"AASA,OAAO,EAA+B,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"BoundedDiffCodeView.d.ts","sourceRoot":"","sources":["../../../../src/diff/bounded/BoundedDiffCodeView.tsx"],"names":[],"mappings":"AASA,OAAO,EAA+B,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAA;AAIxF,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAGzE,YAAY,EACV,qBAAqB,EACrB,6BAA6B,EAC7B,kCAAkC,EAClC,eAAe,EAChB,MAAM,aAAa,CAAA;AAEpB,KAAK,eAAe,GAAG,OAAO,GAAG,SAAS,CAAA;AAwC1C,mEAAmE;AACnE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAA;IAC3D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,eAAe,CAAC,CAAA;IACrD,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,CAAA;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CACxB;AA4RD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,gEAO7B,wBAAwB,KAAG,SA4C7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatchDiffView.d.ts","sourceRoot":"","sources":["../../../../src/diff/patch/PatchDiffView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"PatchDiffView.d.ts","sourceRoot":"","sources":["../../../../src/diff/patch/PatchDiffView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAGnE,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAE1D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAC1D,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,YAAY,EACZ,aAAa,EACd,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,iGAAiG;IACjG,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE,IAAI,EAAE,MAAM,KAAK,SAAS,CAAA;CAC7E;AAED,UAAU,GAAG;IACX,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAA;IACnC,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,SAAS,CAAA;CACrC;AAED,uFAAuF;AACvF,eAAO,MAAM,QAAQ,SAAU,IAAI,KAAG,aAAa,CAAC,GAAG,CA4BtD,CAAA;AAED,+FAA+F;AAC/F,eAAO,MAAM,aAAa,+CAMvB,kBAAkB,KAAG,YAmJvB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RefCallback } from "react";
|
|
2
|
+
/** Below this container width a side-by-side diff leaves each code column too narrow to read. */
|
|
3
|
+
export declare const RLY_SPLIT_DIFF_MIN_WIDTH = 720;
|
|
4
|
+
/**
|
|
5
|
+
* Whether the element is laid out narrower than `width`, kept current with a ResizeObserver from the
|
|
6
|
+
* element's own window. It measures in the commit phase, before paint, so a layout chosen from it
|
|
7
|
+
* never shifts. An element not laid out yet (width 0, or no layout engine) counts as wide.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useNarrowerThan: <E extends Element>(width: number) => readonly [boolean, RefCallback<E>];
|
|
10
|
+
//# sourceMappingURL=useNarrowerThan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNarrowerThan.d.ts","sourceRoot":"","sources":["../../../src/internal/useNarrowerThan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,OAAO,CAAA;AAE/D,iGAAiG;AACjG,eAAO,MAAM,wBAAwB,MAAM,CAAA;AAE3C;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,OAAO,SAAS,MAAM,KAAG,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAmBnG,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentThread.d.ts","sourceRoot":"","sources":["../../../src/patterns/AgentThread.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAa5C,sFAAsF;AACtF,MAAM,WA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C,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAC7B;AAED,oFAAoF;AACpF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC,GAAG;IACjG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAA;IACvD,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,kFAAkF;IAClF,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAC/B,CAAA;AA2DD,sFAAsF;AACtF,eAAO,MAAM,WAAW,4FASrB,gBAAgB,KAAG,YA8DrB,CAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactElement, type ReactNode } from "react";
|
|
2
|
+
/** Machine-readable placement choices for a DecisionBar. */
|
|
3
|
+
export declare const RLY_DECISION_BAR_VARIANTS: {
|
|
4
|
+
readonly placement: {
|
|
5
|
+
readonly inline: {
|
|
6
|
+
readonly className: string;
|
|
7
|
+
readonly purpose: "In the flow of the detail it decides";
|
|
8
|
+
readonly tokens: readonly ["color-text-1", "color-text-2"];
|
|
9
|
+
};
|
|
10
|
+
readonly sticky: {
|
|
11
|
+
readonly className: string;
|
|
12
|
+
readonly purpose: "Pinned to the bottom of a phone viewport while its target is open, at thumb reach";
|
|
13
|
+
readonly tokens: readonly ["color-canvas", "color-border-1"];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
/** Default DecisionBar placement. */
|
|
18
|
+
export declare const RLY_DECISION_BAR_DEFAULT_VARIANTS: {
|
|
19
|
+
readonly placement: "inline";
|
|
20
|
+
};
|
|
21
|
+
/** Where the bar sits. */
|
|
22
|
+
export type RlyDecisionBarPlacement = keyof typeof RLY_DECISION_BAR_VARIANTS.placement;
|
|
23
|
+
/**
|
|
24
|
+
* What the bar can do right now. `ready` enables both actions; `off` keeps them focusable but
|
|
25
|
+
* inert and points them at `reason`; `sending` waits for the server's answer, never assuming it.
|
|
26
|
+
*/
|
|
27
|
+
export type RlyDecisionBarState = {
|
|
28
|
+
readonly _tag: "ready";
|
|
29
|
+
} | {
|
|
30
|
+
readonly _tag: "off";
|
|
31
|
+
readonly reason: string;
|
|
32
|
+
} | {
|
|
33
|
+
readonly _tag: "sending";
|
|
34
|
+
readonly action: "approve" | "reject";
|
|
35
|
+
};
|
|
36
|
+
/** Presentation-only DecisionBar props. */
|
|
37
|
+
export type DecisionBarProps = Omit<ComponentPropsWithRef<"div">, "children" | "title"> & {
|
|
38
|
+
/** Visible approve label. Defaults to "Approve". */
|
|
39
|
+
readonly approveLabel?: string;
|
|
40
|
+
/** Time left on the decision, shown after the target ("4m 12s left"). */
|
|
41
|
+
readonly clock?: ReactNode;
|
|
42
|
+
/** One line under the actions, such as what happens if the request expires first. */
|
|
43
|
+
readonly note?: ReactNode;
|
|
44
|
+
readonly onApprove: () => void;
|
|
45
|
+
readonly onReject: () => void;
|
|
46
|
+
/** Defaults to `inline`. */
|
|
47
|
+
readonly placement?: RlyDecisionBarPlacement;
|
|
48
|
+
/** Visible reject label. Defaults to "Reject". */
|
|
49
|
+
readonly rejectLabel?: string;
|
|
50
|
+
readonly state: RlyDecisionBarState;
|
|
51
|
+
/**
|
|
52
|
+
* The server's answer once a sent decision settles, such as "Approved on the hub." or
|
|
53
|
+
* "Refused: the request expired before your approval arrived.". It is announced through the
|
|
54
|
+
* bar's status region, the same one that says a decision is waiting for the server.
|
|
55
|
+
*/
|
|
56
|
+
readonly status?: string;
|
|
57
|
+
/** What is being decided, named in full ("Reassign Rotate signing keys from arch to arch-b"). */
|
|
58
|
+
readonly target: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Approve or reject one named target. The target and its clock stay visible above the actions,
|
|
62
|
+
* and both buttons carry the target in their accessible names, so a tap never decides the wrong
|
|
63
|
+
* thing. An `off` decision stays focusable with its reason linked; a sent decision waits for the
|
|
64
|
+
* server, and the caller passes the server's answer (including a refusal) as `status`, never an
|
|
65
|
+
* optimistic one. Both are announced through one status region that stays mounted.
|
|
66
|
+
*/
|
|
67
|
+
export declare const DecisionBar: ({ approveLabel, className, clock, note, onApprove, onReject, placement, rejectLabel, state, status, target, ...props }: DecisionBarProps) => ReactElement;
|
|
68
|
+
//# sourceMappingURL=DecisionBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DecisionBar.d.ts","sourceRoot":"","sources":["../../../src/patterns/DecisionBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAA;AAO5F,4DAA4D;AAC5D,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;CAapC,CAAA;AAEF,qCAAqC;AACrC,eAAO,MAAM,iCAAiC;;CAA0C,CAAA;AAExF,0BAA0B;AAC1B,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,yBAAyB,CAAC,SAAS,CAAA;AAEtF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS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kB,GACrB;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AAE7G,wFAAwF;AACxF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAC/E,kBAAkB,GAAG;IACnB,QAAQ,CAAC,IAAI,CAAC,EAAE,qBAAqB,CAAA;IACrC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAA;CAClC,CAAA;AAEH,sFAAsF;AACtF,eAAO,MAAM,cAAc,yDAOxB,mBAAmB,KAAG,YA6BxB,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
|
|
2
|
+
/** Machine-readable size choices for a Hero. */
|
|
3
|
+
export declare const RLY_HERO_VARIANTS: {
|
|
4
|
+
readonly size: {
|
|
5
|
+
readonly heading: {
|
|
6
|
+
readonly className: string;
|
|
7
|
+
readonly purpose: "The page's one fact as a sentence at heading size, with its caption below";
|
|
8
|
+
readonly tokens: readonly ["type-card-title-size", "color-text-1", "color-text-2"];
|
|
9
|
+
};
|
|
10
|
+
readonly line: {
|
|
11
|
+
readonly className: string;
|
|
12
|
+
readonly purpose: "The same fact folded to one line, when a detail with its own figure sits beside the list";
|
|
13
|
+
readonly tokens: readonly ["type-body-size", "color-text-1", "color-text-2"];
|
|
14
|
+
};
|
|
15
|
+
readonly display: {
|
|
16
|
+
readonly className: string;
|
|
17
|
+
readonly purpose: "Read from across a room (a wall or desk board); not for ordinary screens";
|
|
18
|
+
readonly tokens: readonly ["type-page-title-size", "color-text-1", "color-text-2"];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/** Default Hero size. */
|
|
23
|
+
export declare const RLY_HERO_DEFAULT_VARIANTS: {
|
|
24
|
+
readonly size: "heading";
|
|
25
|
+
};
|
|
26
|
+
/** Hero size. Only one Hero per screen, and `display` only where it is read from a distance. */
|
|
27
|
+
export type RlyHeroSize = keyof typeof RLY_HERO_VARIANTS.size;
|
|
28
|
+
/** Ink for the one state word inside a hero sentence. */
|
|
29
|
+
export declare const RLY_HERO_WORD_VARIANTS: {
|
|
30
|
+
readonly tone: {
|
|
31
|
+
readonly blocked: {
|
|
32
|
+
readonly className: string;
|
|
33
|
+
readonly purpose: "Can't proceed, failed, or can't decide";
|
|
34
|
+
readonly tokens: readonly ["color-blocked-ink"];
|
|
35
|
+
};
|
|
36
|
+
readonly held: {
|
|
37
|
+
readonly className: string;
|
|
38
|
+
readonly purpose: "Degraded or waiting, but still working";
|
|
39
|
+
readonly tokens: readonly ["color-held-ink"];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
/** State ink for {@link HeroWord}. */
|
|
44
|
+
export type RlyHeroWordTone = keyof typeof RLY_HERO_WORD_VARIANTS.tone;
|
|
45
|
+
/** Presentation-only Hero props. */
|
|
46
|
+
export type HeroProps = Omit<ComponentPropsWithRef<"section">, "children" | "title"> & {
|
|
47
|
+
/** Supporting facts in secondary ink: what is next, what is missing, how old the reading is. */
|
|
48
|
+
readonly caption?: ReactNode;
|
|
49
|
+
/** The one fact as a sentence, with its figure inside ("3 goals need you, 2 blocked"). */
|
|
50
|
+
readonly fact: ReactNode;
|
|
51
|
+
/** Accessible name of the summary. Defaults to "Summary". */
|
|
52
|
+
readonly label?: string;
|
|
53
|
+
/** Defaults to `heading`. */
|
|
54
|
+
readonly size?: RlyHeroSize;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* The fact a screen leads with, as one sentence in text ink with its figure inside it. State is
|
|
58
|
+
* carried by a word (wrap it in {@link HeroWord}), never by a coloured display number. Unknown is
|
|
59
|
+
* said, not shown as zero: pass "Unknown" or qualify the sentence.
|
|
60
|
+
*/
|
|
61
|
+
export declare const Hero: ({ caption, className, fact, label, size, ...props }: HeroProps) => ReactElement;
|
|
62
|
+
/** Props for the one state word in a hero sentence. */
|
|
63
|
+
export type HeroWordProps = Omit<ComponentPropsWithRef<"span">, "children"> & {
|
|
64
|
+
readonly children: string;
|
|
65
|
+
readonly tone: RlyHeroWordTone;
|
|
66
|
+
};
|
|
67
|
+
/** The state word inside a hero sentence ("Relay 2.4 is <HeroWord tone="blocked">blocked</HeroWord>"). */
|
|
68
|
+
export declare const HeroWord: ({ children, className, tone, ...props }: HeroWordProps) => ReactElement;
|
|
69
|
+
//# sourceMappingURL=Hero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hero.d.ts","sourceRoot":"","sources":["../../../src/patterns/Hero.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAM3E,gDAAgD;AAChD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;CAkB5B,CAAA;AAEF,yBAAyB;AACzB,eAAO,MAAM,yBAAyB;;CAAsC,CAAA;AAE5E,gGAAgG;AAChG,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAE7D,yDAAyD;AACzD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;CAajC,CAAA;AAEF,sCAAsC;AACtC,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,sBAAsB,CAAC,IAAI,CAAA;AAEtE,oCAAoC;AACpC,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG;IACrF,gGAAgG;IAChG,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;IAC5B,0FAA0F;IAC1F,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAC5B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,IAAI,wDAOd,SAAS,KAAG,YAuBd,CAAA;AAED,uDAAuD;AACvD,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAC5E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAA;CAC/B,CAAA;AAED,0GAA0G;AAC1G,eAAO,MAAM,QAAQ,4CAA6C,aAAa,KAAG,YAIjF,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactElement, type ReactNode } from "react";
|
|
2
|
+
/** Machine-readable surface choices for a Region. */
|
|
3
|
+
export declare const RLY_REGION_VARIANTS: {
|
|
4
|
+
readonly tone: {
|
|
5
|
+
readonly default: {
|
|
6
|
+
readonly className: string;
|
|
7
|
+
readonly purpose: "A main page region: list, detail or chart";
|
|
8
|
+
readonly tokens: readonly ["color-surface-1", "color-border-1"];
|
|
9
|
+
};
|
|
10
|
+
readonly tray: {
|
|
11
|
+
readonly className: string;
|
|
12
|
+
readonly purpose: "A region holding individually actionable cards, one surface step down so the cards stand out";
|
|
13
|
+
readonly tokens: readonly ["color-surface-2", "color-border-1"];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
/** Default Region surface. */
|
|
18
|
+
export declare const RLY_REGION_DEFAULT_VARIANTS: {
|
|
19
|
+
readonly tone: "default";
|
|
20
|
+
};
|
|
21
|
+
/** Surface step for a Region; it carries no state meaning. */
|
|
22
|
+
export type RlyRegionTone = keyof typeof RLY_REGION_VARIANTS.tone;
|
|
23
|
+
/** Heading level of the region title, within the page's outline. */
|
|
24
|
+
export type RlyRegionHeadingLevel = 2 | 3;
|
|
25
|
+
/** Presentation-only Region props. */
|
|
26
|
+
export type RegionProps = Omit<ComponentPropsWithRef<"section">, "children" | "title"> & {
|
|
27
|
+
/** Controls at the end of the header row, such as a filter or "Mark all read". */
|
|
28
|
+
readonly actions?: ReactNode;
|
|
29
|
+
readonly children: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Plain count shown after the title in secondary ink, such as the number of rows. It is part of
|
|
32
|
+
* the region's accessible name ("Queue 3"), so a screen reader hears the count when it lands on
|
|
33
|
+
* the region.
|
|
34
|
+
*/
|
|
35
|
+
readonly count?: number | string;
|
|
36
|
+
/** Heading level within the page outline. Defaults to 2. */
|
|
37
|
+
readonly headingLevel?: RlyRegionHeadingLevel;
|
|
38
|
+
/**
|
|
39
|
+
* Stable id for the heading, so a caller can move focus to it (for example when a list row
|
|
40
|
+
* opens this region). The heading is focusable by script only.
|
|
41
|
+
*/
|
|
42
|
+
readonly headingId?: string;
|
|
43
|
+
/** Required visible title in sentence case. */
|
|
44
|
+
readonly title: string;
|
|
45
|
+
/** Surface step. Defaults to `default`. */
|
|
46
|
+
readonly tone?: RlyRegionTone;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* One main page region: a bordered surface with a single header row (title, plain count,
|
|
50
|
+
* actions) above a rule, then the content. The section is named by its heading.
|
|
51
|
+
*
|
|
52
|
+
* Use one Region per main block (a queue, a detail, a chart); put titled sub-groups inside it
|
|
53
|
+
* rather than nesting Regions. Cards belong only inside a `tray` Region.
|
|
54
|
+
*/
|
|
55
|
+
export declare const Region: ({ actions, children, className, count, headingId, headingLevel, title, tone, ...props }: RegionProps) => ReactElement;
|
|
56
|
+
//# sourceMappingURL=Region.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Region.d.ts","sourceRoot":"","sources":["../../../src/patterns/Region.tsx"],"names":[],"mappings":"AAAA,OAAO,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