Documentation
¶
Overview ¶
tui/scripts/generatetables — regenerates tui/tables_generated.go.
pi's tui/src/utils.ts relies on ECMAScript v-flag Unicode property regexes (\p{Default_Ignorable_Code_Point}, \p{Control}, \p{Mark}, \p{Surrogate}, \p{Format}, \p{Spacing_Mark}, \p{RGI_Emoji}) and Intl.Segmenter. Go's regexp/stdlib has no equivalents for Default_Ignorable_Code_Point, Grapheme_Cluster_Break=SpacingMark, Script_Extensions, or RGI_Emoji, so the needed tables are generated here from the Unicode Character Database.
Data source pin: UCD 15.1.0 (matches the ICU bundled with Node 22 / Bun, which pi-tui runs on). Go stdlib / uniseg may carry a newer Unicode version; the delta is limited to newly-assigned code points.
Downloaded files:
https://www.unicode.org/Public/15.1.0/ucd/DerivedCoreProperties.txt https://www.unicode.org/Public/15.1.0/ucd/auxiliary/GraphemeBreakProperty.txt https://www.unicode.org/Public/15.1.0/ucd/ScriptExtensions.txt https://www.unicode.org/Public/15.1.0/ucd/Scripts.txt https://www.unicode.org/Public/15.1.0/ucd/emoji/emoji-data.txt https://www.unicode.org/Public/15.1.0/ucd/emoji/emoji-sequences.txt https://www.unicode.org/Public/15.1.0/ucd/emoji/emoji-zwj-sequences.txt
Run: cd tui/scripts/generatetables && go run . Output: tui/tables_generated.go (overwritten in place).