Skip to documentation
SLOP

tiny.ui.TextRun

Reference tiny.ui TextRun

Defined in tiny.ui.

A TextRun is checked in the admission survey.

API (4)

Fields and members

Public fields and members.

No direct callersNo direct callstiny.uiTextRun
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/ui/src/abi/envelope.zig:134

zig
/// A `TextRun` is checked in the admission survey. `byte_start` and `byte_end`/// are offsets into the UTF-8 bytes of its `TextRecord.content` atom: the start/// is inclusive and the end exclusive. A run must be nonempty (`TextRunEmpty`)/// and fit inside those bytes (`TextRunOutOfBounds`). Runs for one text record/// are sorted by start (`TextRunsUnordered`) and cannot overlap/// (`TextRunsOverlap`). Gaps are accepted and use the node's computed style.////// The survey validates the record's UTF-8 content before checking runs, but/// both endpoints must still be scalar boundaries: a continuation byte is not/// an endpoint (`TextRunSplitsScalar`). A run may end inside a grapheme/// cluster, and that cluster takes the style of the run holding its first byte.////// `declaration_first` and `declaration_count` locate declarations in the/// publish declaration table. The allowed properties are `background-color`;/// each border side's color, width, and style (`border-top-color`,/// `border-top-width`, `border-top-style`, `border-right-color`,/// `border-right-width`, `border-right-style`, `border-bottom-color`,/// `border-bottom-width`, `border-bottom-style`, `border-left-color`,/// `border-left-width`, `border-left-style`); each border corner's radius/// (`border-top-left-radius`, `border-top-right-radius`,/// `border-bottom-right-radius`, `border-bottom-left-radius`); `color`,/// `opacity`, `outline-color`, `outline-style`, `outline-width`,/// `outline-offset`, `font-family`, `font-size`, `font-style`, `font-weight`,/// `letter-spacing`, `line-height`, `word-spacing`, `text-decoration-color`,/// `text-decoration-line`, `text-decoration-style`,/// `text-decoration-thickness`, `text-transform`, `text-underline-offset`, and/// `user-select`. All others, including `text-align`, `text-indent`,/// `white-space`, `word-break`, `overflow-wrap`, and `display`, are rejected/// (`TextRunPropertyNotAllowed`).pub const TextRun = extern struct {    byte_start: u32 = 0,    byte_end: u32 = 0,    declaration_first: u32 = 0,    declaration_count: u32 = 0,};

Source: lib/ui/src/root.zig:28

zig
pub const TextRun = abi.TextRun;

Also reachable as

abi.TextRun.

Audit

Definitions1
Public names2
Members4
Version26.7.0
Revisiondaab053ee433