Expand description
Content styling spec types — shared module per supervisor 2026-05-24 disposition (a-modified) REVIVE-WITH-SHARED-MODULE.
This module hosts the f-string / builder-API content styling spec types
revived from pre-W18.3 (git show 19de5ef2^:crates/shape-ast/src/ interpolation.rs). Both W18.4 (f-string styling parser/lowering) and
W18.5 (Content.table / Content.code / Content.kv builder API)
consume these types from this single shared module — no parallel
implementations per CLAUDE.md §Parallel-implementation.
Module placement rationale: the supervisor’s preferred location was
crates/shape-value/src/content_style.rs (next to ContentNode). The
dependency graph forbids that placement: shape-ast cannot import from
shape-value (shape-value depends on shape-ast, not the reverse), and
the parsers MUST live in shape-ast because the f-string interpolation
parser produces typed InterpolationFormatSpec::ContentStyle(spec)
parts during AST parsing. Placing the types in shape-ast satisfies the
“one source of truth” constraint while preserving the workspace
dependency invariant. shape-vm’s compiler lowering and
shape-runtime’s W18.5 builders both import from shape_ast:: content_style::*.
The spec types here are SYNTACTIC descriptors — they describe what the
user wrote in f"{x:bold,red}" or Content.table(...).border(rounded).
They are NOT runtime ContentNode/Style/Color types from
shape_value::content. Conversion happens at the lowering boundary.
Structs§
- Content
Format Spec - Content-string format specification for rich terminal/HTML output.
Enums§
- Align
Spec - Alignment for content-string rendering.
- Border
Style Spec - Border style for content-string table rendering.
- Chart
Type Spec - Chart type hint for content format spec.
- Color
Spec - Color specification for content strings.
- Named
Content Color - Named colors for content strings.
Functions§
- parse_
align_ spec - parse_
border_ style_ spec - parse_
chart_ type_ spec - parse_
color_ spec - parse_
content_ format_ spec - Parse a content-string format spec like
"fg(red), bold, fixed(2)".