npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@angadie/chittie-react-native

v0.1.0

Published

React Native (Nitro) backend for chittie: native non-Latin text rasterization (CoreText / android.graphics) implementing chittie's TextRasterizer. Dev-client / bare RN — not Expo Go.

Downloads

42

Readme

@angadie/chittie-react-native

The React Native backend for chittie — a Nitro module that rasterizes non-Latin text (Sinhala/Tamil/Arabic) natively (CoreText on iOS, android.graphics on Android) and exposes it as chittie's TextRasterizer. No Skia.

Dev client / bare RN only — it's a native module, so it can't run in Expo Go. (Your printer transport — BLE/USB — needs a dev client anyway, so this costs you nothing extra.) See the RFC: docs/rfc/rn-native.md.

Install

npm i @angadie/chittie-react-native @angadie/chittie react-native-nitro-modules
cd ios && pod install     # iOS
# Android autolinks; rebuild the dev client.

The Nitro bindings (nitrogen/) are generated and shipped — you only re-run npm run codegen if you change the .nitro.ts spec. Built with react-native-builder-bob (lib/commonjs|module| typescript). Requires React Native's new architecture.

Use

Pass the native rasterizer to render() — everything else is the same chittie API:

import { render, Printer, Text, Row } from '@angadie/chittie';
import { createNativeRasterizer } from '@angadie/chittie-react-native';

const rasterizer = createNativeRasterizer();

const bytes = render(
  <Printer width={32}>
    <Text align="center" bold>ආයුබෝවන්</Text>
    <Row left="තේ" right="Rs. 250" />
  </Printer>,
  { dotWidth: 384, rasterizer }   // 58mm
);
// send `bytes` over your transport (BLE/USB/TCP)

The native side returns an RGBA bitmap sized to the text (dims padded to /8), which chittie packs to ESC/POS raster unchanged.

Architecture

TS:   createNativeRasterizer()  →  makeRasterizer(native)  →  chittie TextRasterizer
      (src/index.ts)               (src/adapter.ts, pure)     (ImageData → render())
Nitro spec: src/specs/ChittieRasterizer.nitro.ts  (rasterize → RasterBitmap{data,width,height})
Native:  ios/HybridChittieRasterizer.swift   (UIKit/CoreText)
         android/.../HybridChittieRasterizer.kt  (StaticLayout/Canvas)

makeRasterizer is pure and dependency-free (no Nitro import) so it's unit-testable off-device; createNativeRasterizer wires the real Nitro HybridObject.

What's verified vs gated

  • Verified (off-device): nitro-codegen runs and the bindings are committed under nitrogen/; the TS adapter spike (native bitmap → ImageData → chittie's padTo8, spikes/adapter.spike.mts); bob build (commonjs/module/typescript) + typecheck in the monorepo gate.
  • Gated (needs Xcode/Android Studio + a device): the native Swift/Kotlin compile and an on-device snapshot of the rendered glyphs. The iOS/Android build files mirror the proven react-native-nitro-haptics template; the device build validates them.

Roadmap (per the RFC)

  • Phase 1 — rasterizer (this).
  • Phase 2 — read-capable BLE transport (status via DLE EOT notify; see chittie-transport's queryStatus).
  • Phase 3 — USB (Android host) + TCP transports.

Notes

  • Complex shaping + bidi come from the platform engines for free (UIKit/StaticLayout), so Arabic joins and reorders correctly. For RTL rows, also pass rtl to <Row> (see docs/i18n.md).
  • For font selection, the native side uses the system font (which has Sinhala/Tamil/Arabic fallbacks); custom-font support is a future option.