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

@harakah/remotion-arabic

v0.2.0

Published

Joining-aware Arabic text animation for Remotion: <ArabicText>, splitArabic(), formatDigits(), isolateLatin()

Downloads

58

Readme

@harakah/remotion-arabic

Joining-aware Arabic text animation for Remotion. Private, not published. تحريك النص العربي في Remotion حرفاً حرفاً أو كلمة كلمة مع بقاء الحروف متصلة.

  • splitArabic(text, "letter" | "word"): drop-in for text.split("") / [...text] / Array.from(text). It returns ZWJ-padded grapheme tokens with لا kept as one token, tashkeel attached, and spaces as " ".
  • mapArabicWords(splitArabic(text), (ch, i) => <span key={i}>…</span>): keeps words together when you animate per letter. Each word goes in a nowrap box, so wrapped lines never break mid-word. Your callback runs unchanged with the original global index, so the stagger is kept. harakah-fix fix --wrap-words writes this for you.
  • <ArabicText text="…" preset="rise" />: renders with RTL and lang="ar", staggered per letter or per word. Words sit in nowrap boxes so lines never break mid-word.
    • Safari / WebKit (the Player on iPhone, iPad, Mac Safari): with a font that has no U+200D (Alexandria, IBM Plex Sans Arabic, Cairo, Tajawal…), WebKit draws a letter + ZWJ in a fallback font. After mount there, <ArabicText> switches each Arabic word to the clip method: every letter box shows the whole word, aria-hidden and clipped to that letter's slice, plus one visually hidden copy for screen readers. It re-measures when fonts load and on resize. Renders (Chromium) and server output keep the ZWJ boxes, byte-for-byte unchanged. joinMode="zwj" | "clip" forces one method.
    • في Safari ومع خط لا يحتوي U+200D، يرسم المكوّن الكلمة كاملة في كل صندوق ويقصّها على حدود الحرف، فتبقى متصلة.
  • formatDigits(n | string, "eastern" | "western" | "keep") gives ١٬٢٥٠٬٠٠٠, and leaves Latin runs such as iPhone 17 untouched.
    • Eastern output always uses ٬ (U+066C) and ٫ (U+066B), whatever the renderer's ICU data.
    • Eastern digits typed with Latin separators (١,٢٥٠) are corrected too.
  • withArabicSeparators(loadFont(...)) fixes fonts like Alexandria, which draw ٬ and ٫ with their Latin comma glyph.
    • The returned fontFamily puts a unicode-range face first. It covers U+066A–U+066C only and comes from IBM Plex Sans Arabic (OFL).
    • Every other glyph still comes from your font, and font load order doesn't matter.
    • يرسم خط Alexandria الفاصلة ٬ بشكل الفاصلة اللاتينية، وهذه الدالة تصلح ذلك.
  • isolateLatin(text) adds FSI/PDI around Latin runs.

splitArabic() returns strings, so it cannot do the clip method: in Safari, its ZWJ tokens join only with fonts that map U+200D (Noto Naskh Arabic does; harakah-fix doctor warns about local fonts that don't). For the Player in Safari, prefer <ArabicText>, or animate per word there.

It is a single self-contained file (src/index.tsx), so harakah-fix fix can vendor it into a project as src/harakah-arabic.tsx. Set REMOTION_HARAKAH_REFERENCE=1 (render-time env) to make splitArabic return running text. harakah-fix compare uses this for its join verdict.