Drives the cyan-soft language pill + the file-type tint dot.
showLineNumbers
boolean
false
Right-aligned, muted line-number gutter (sticky under horizontal scroll).
highlightLines
number[]
[]
Lines to emphasize: a faint cyan wash + a left cyan rail (a shape, not a glow). This inset rail is the one sanctioned Law 6 carve-out: editorial emphasis inside a code surface only, always paired with a wash, never status, never selection, and never outside code.
wrap
boolean
false
Soft-wrap long lines. Off → lines scroll horizontally (the app default).
diff
boolean
false
Unified-diff mode: a +/- gutter with warm added/removed washes.
oldCode
string
n/a
The pre-change source, diffed against code when diff is set.
onCopy
() => void
n/a
Fires after a successful copy. The button confirms Copied for ~2s.
Parameter
Type
Default
Description
content *
FileContent?
n/a
FileContent(content, language, isBinary, error). Drives the well + its empty / binary / error states.
isLoading *
Boolean
n/a
Shows a centered progress indicator while the file is fetched.
modifier
Modifier
Modifier
Applied to the content root. Pass Modifier.fillMaxSize() for a full viewer.
language
String
n/a
LanguageBadge(language), the cyan-soft pill beside the filename in the sheet top bar.
diffLines
List<DiffLine>
n/a
DiffView input from computeDiff(old, new); each DiffLine(type, text, lineNumber) is ADDED / REMOVED / UNCHANGED.
newContent
String
n/a
The resulting content the DiffView copy button writes to the clipboard.
NockerlCodeBlock is the recessed well: a filename header (which also hosts the copy
button), an optional line-number gutter, and horizontal scroll. It renders the
platform .monospaced design (the Swift token build emits no mono type role yet;
see drift). The code argument is the first positional.
Parameter
Type
Default
Description
code *
String
n/a
First positional arg: the source text, rendered verbatim in the mono well.
filename
String?
nil
Header title (e.g. "backoff.swift"). The header also hosts the copy button; omit → no header (copy still shows where the platform has a pasteboard).
showLineNumbers
Bool
false
Render the muted, right-aligned line-number gutter.
wrap
Bool
false
Soft-wrap long lines instead of scrolling horizontally (horizontal scroll is the default idiom).
Cross-platform drift (tracked for reconciliation)
These are the real divergences:
Swift now ships the well.NockerlCodeBlock (NockerlDesign) provides the recessed
well, filename header, copy, line-number gutter, and horizontal scroll, replacing
Voice’s raw .monospacedText. Syntax highlighting, highlight-lines, and diff are
not in it yet (web/Android-first follow-ups).
Mono font token: the ratified code face is Space Mono, but the Swift token build
emits no mono type role and the package bundles no fonts, so NockerlCodeBlock renders
the platform.monospaced design. Emitting + bundling the mono token is the flagged
follow-up.
Syntax highlighting: the Android file viewer is plain monospace (highlighting
deferred), and NockerlCodeBlock is too; only the markdown renderer + this web demo tint
syntax. The well + chrome are identical either way. Pick one policy.
Language pill:NockerlCodeBlock takes nolanguage (no pill), and there is also no
file-type.swift token. Add both when the language affordance lands on Swift.
Diff ships on Android (DiffView) and is specified for web; Swift has none.