JubaKitiashvili

expo-pretext

JubaKitiashvili

Predict React Native text heights before rendering. Native TextKit/TextPaint measurement + ~0.0002ms JS layout. FlashList, streaming AI chat, typewriter, pinch-to-zoom, obstacle reflow, Dynamic Type, Expo Web. 386 tests. MIT.

AI 简介

expo-pretext 是一个用于在 React Native 中预计算文本布局高度与换行位置的高性能库。它通过调用 iOS TextKit、Android TextPaint 和 Web Canvas 原生接口进行首次文本度量,再以纯 JavaScript(约 0.0002ms/次)完成毫秒级动态 layout 计算,支持绕任意形状排版、流式 AI 聊天逐 token 渲染、缩放/手势中实时重排、障碍物避让及 Dynamic Type 等特性。所有功能基于标准 `<Text>` 和 `<View>` 组件,完全兼容可访问性、RTL、emoji 和富文本。适用于需要高精度文本控制的场景,如虚拟列表(FlashList)、实时聊天界面、杂志式图文混排、交互式排版工具和跨平台移动/Web 应用。

TypeScript
MIT License
253
Stars
12
Forks
230
Watchers
2
Issues

Star 增长

今日0
近 7 天0
近 30 天0
综合评分43.34
默认分支main