Expand description
Round 1 (docs/round-1-contract.md §4): the BUILT-IN UI strings — the copy
no author writes (search placeholder, month buttons, copy, close, …). The
ids and English defaults are catalog/strings.json (embedded); a host
overrides any id per surface; $string.<id> in a prop value resolves
through the surface’s table at bind time. Mirrors src/strings.ts.
Statics§
- DEFAULT_
STRINGS - The English defaults, in source order.
Functions§
- default_
string - The default text of one id.
- format_
string {name}placeholders filled fromparams; unknown (or null) ones stay.- is_
string_ ref - True for a well-formed reference to a KNOWN id.
- parse_
string_ ref $string.choose→choose;Nonefor any other value (^\$string\.([a-zA-Z][a-zA-Z0-9]*)$).- resolve_
string - A value with a
$string.<id>reference replaced by the table’s text (an unknown id resolves to the id itself); any other value passes. - string_
table - The host’s overrides merged over the defaults.
Type Aliases§
- String
Table - One string table: id → text (the defaults merged under the overrides).