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

@sigx/lynx-runtime

v0.2.6

Published

Lynx renderer for SignalX (background thread)

Readme

@sigx/lynx-runtime

Background-thread renderer for SignalX on Lynx. Translates sigx component output into the BG → MT op stream that drives the native render tree.

Most apps should depend on @sigx/lynx instead, which re-exports this package's public surface alongside @sigx/reactivity and @sigx/runtime-core for a single import path.

Responsibilities

  • render / lynxMount — boot the BG renderer against a lynx.getJSContext()-style host.
  • nodeOps — sigx RuntimeRenderer adapter that turns vnode operations into op-queue entries.
  • Op queuepushOp, scheduleFlush, takeOps, flushNow — the wire protocol carrying renders from BG to MT.
  • Main-thread refsMainThreadRef, useMainThreadRef — the BG-side handle whose .current value lives on the main thread; the build pipeline serializes these into worklet captures via their _wvid.
  • Cross-thread bridgesrunOnMainThread (BG→MT one-shot), runOnBackground (MT→BG dispatch handle), transformToWorklet (handle → JsFn marshal).
  • AnimatedValue BG sinkregisterBgSink, unregisterBgSink, ingestAvPublishes — receive MT-published AnimatedValue writes into a signal-backed mirror so effect(() => av.value) re-runs reactively. The producer side lives in @sigx/gestures; the MT side lives in @sigx/lynx-runtime-main.
  • JSX typesMainThread, Define, ViewAttributes, etc.

Wire protocol

Ops are flat-array tuples produced on BG and consumed on MT. The op codes (CREATE, INSERT, SET_STYLE, SET_WORKLET_EVENT, INIT_MT_REF, REGISTER_AV_BRIDGE, ...) are defined in @sigx/lynx-runtime-internal so both sides stay in sync.

A typical batch:

[OP.CREATE, 1, 'view',
 OP.SET_STYLE, 1, { width: '100px', height: '100px' },
 OP.INSERT, 0, 1, -1,
 OP.INIT_MT_REF, 7, null,
 OP.SET_MT_REF, 1, 7]

Serialized to JSON, shipped via lynx.getNativeApp().callLepusMethod('sigxPatchUpdate', { data }), applied by the MT runtime in @sigx/lynx-runtime-main.

Background event bridge

bg-bridge.ts listens on lynx.getCoreContext() for two MT-originated event types:

  • Lynx.Sigx.PublishEvent — hybrid worklet → BG event handler dispatch (<view bindtap={…}> style).
  • Lynx.Sigx.AvPublish — coalesced AnimatedValue write batches; routed into ingestAvPublishes.

License

MIT