Skip to content

Releases: jingjing2222/react-native-nitro-pretext

react-native-nitro-pretext@1.1.0

25 Apr 17:06
61afd32

Choose a tag to compare

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 expands shapeSlices
    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

25 Apr 01:23
2eaad1d

Choose a tag to compare

Patch Changes

  • 5d0861f: fix: include nitrogen in tarball

react-native-nitro-pretext@1.0.0

24 Apr 18:04

Choose a tag to compare

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 Pretext namespace plus named prepare(), layout(), and
      usePretextLayout() exports.

    • prepare() creates opaque native prepared state without exposing raw native
      ids, and prepared.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 + LineBreaker path.

    • 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 includeFontPadding defaults to true to align with RN <Text>.

    • React and react-native-nitro-modules keep open peer ranges as *.

    • React Native >=0.81.0 is the package peer floor. The example app and
      latest local validation use React 19.2.3 and React Native 0.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
      usePretextLayout only.

    • API-matched examples live under examples/use-case/*; matching RN-only
      workaround examples live under examples/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 versus Pretext.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-prune as a development dead-export check and removed stale
      TypeScript/example exports found during the audit.