Releases: jingjing2222/react-native-nitro-pretext
react-native-nitro-pretext@1.1.0
Minor Changes
-
f8f77a6: Add platform-native RN Text parity support across iOS and Android.
This release aligns normal-wrap layout with TextKit on iOS and RN-compatible
StaticLayout on Android, adds the strict 260-case RN Text parity harness, and
introduces deterministic Maestro parity gates. It also expandsshapeSlices
from a single constrained segment per row to multi-slot obstacle-aware line
placement, including blocked-row and narrow-slot handling.The example app now includes the draggable Pretext React Native shape reflow
demo, benchmark/parity screens, release-run documentation, and Maestro coverage
that verifies 20 circle moves across a 3x3 grid without text intruding into the
shape obstacle.
react-native-nitro-pretext@1.0.1
Patch Changes
- 5d0861f: fix: include nitrogen in tarball
react-native-nitro-pretext@1.0.0
Major Changes
-
400e33e: Release the layout-only Pretext API for computing React Native text geometry before visible render.
This is a major release because the public surface was intentionally narrowed
around pre-render layout data instead of rendering or raw native measurement.Breaking changes:
-
Removed the previous
measure(),measureBatch(),TextMeasure, renderer
components, native prepared renderer APIs, and raw prepared paragraph APIs
from the package export surface. -
Removed public native drawing/view-manager paths. Pretext no longer exposes a
renderer component; apps render with ordinary React Native UI after reading
layout metrics.New public API:
-
Added the public
Pretextnamespace plus namedprepare(),layout(), and
usePretextLayout()exports. -
prepare()creates opaque native prepared state without exposing raw native
ids, andprepared.release()is the only manual lifecycle API. -
layout()returns native text-engine metrics by default and can optionally
return line geometry, diagnostics, or rich inline box frames. -
usePretextLayout()prepares, layouts, and releases native state from React
components.Native layout contract:
-
Android API 29+ normal-wrap requests use the canonical
MeasuredText + LineBreakerpath. -
Android API 24-28 remains supported through StaticLayout/legacy fallback
paths and is not the canonical parity or performance target. -
iOS uses Core Text
CTTypesetter + CTLine. -
Android
includeFontPaddingdefaults totrueto align with RN<Text>. -
React and
react-native-nitro-moduleskeep open peer ranges as*. -
React Native
>=0.81.0is the package peer floor. The example app and
latest local validation use React19.2.3and React Native0.85.0. -
The package now exposes a React Native condition that points Metro at the
source entry so platform resolution can select the native Nitro bridge.Documentation and examples were rebuilt around the layout-only contract:
-
README and API docs now describe
Pretext,prepare,layout, and
usePretextLayoutonly. -
API-matched examples live under
examples/use-case/*; matching RN-only
workaround examples live underexamples/non-use-case/*. -
Benchmark docs now separate API examples from benchmark case studies, report
iOS and Android numbers separately, and show the measured-layout improvement
percentage for the hidden RN<Text onLayout>path versusPretext.layout(). -
The latest local Android API 36 Maestro suite passes the layout-only benchmark
gate; RN<Text>parity drift remains diagnostic and is not the correctness
source. -
Added
ts-pruneas a development dead-export check and removed stale
TypeScript/example exports found during the audit.
-