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

ump-plugin-mapview

v0.1.0

Published

Reference implementation of a plugin-authored native-view kind. The hosts render a coloured placeholder UIView/View/Stack — swap in a real map SDK at the points called out in inline comments. See docs/superpowers/specs/plugin-authoring-guide.md §17 for th

Readme

mapview-demo

Reference implementation of a plugin-authored native-view kind. Read this alongside §17 of the plugin authoring guide for the walkthrough that produced these files.

What's here

examples/mapview-demo/
├── package.json                 # ump.native multi-language entries
├── src/index.ts                 # MapView component (createNativeViewComponent)
├── native/
│   ├── mapview_register.cpp     # Kind spec — static init at process start
│   ├── android/
│   │   ├── MapViewHost.java     # Per-instance UMPNativeViewHost
│   │   └── MapViewHostFactory.java
│   ├── ios/
│   │   └── UMPMapViewHost.m     # UMPNativeViewHostInstance + factory
│   └── harmony/
│       └── MapViewHost.ets      # @Observed state + @Builder build()
├── App.tsx                      # demo consumer
└── index.tsx                    # AppRegistry.runApplication entry

What the hosts actually do

Each host renders a coloured placeholder view (light blue rectangle). Replace with your real map SDK at the points the inline comments call out:

  • Android: instantiate YourMapSDKView, add it to the FrameLayout, forward props through it.
  • iOS: instantiate MKMapView (or your SDK's view), constrain it to the wrapper UIView's bounds, forward props.
  • Harmony: replace the empty Stack() body in @Builder build() with your map ArkUI element.

Wiring

This demo lives under examples/ so reading it is friction-free, but npx ump autolink discovers plugins under packages/ump-plugins/<name> and installed node_modules/<name> only — it does NOT scan examples/. To actually run the demo against a host build, copy or symlink examples/mapview-demo/ into packages/ump-plugins/mapview/ and re-run autolink.

  1. Re-run npx ump autolink to pick up package.json's ump.native entries. The CLI emits the per-platform manifests:

    • Android cpp -> CMakeLists.gen.cmake
    • Android java -> app/build.gen.gradle (sets srcDirs)
    • iOS cpp -> UMPPlugins.filelist
    • iOS objc -> UMPPluginsObjC.filelist
    • Harmony cpp -> CMakeLists.gen.cmake
    • Harmony ets -> imports.gen.ets (side-effect imports)
  2. Android only: in UMPActivity.onCreate, after UMPNativeViewRegistry.attach(below, above), register the factory:

    UMPNativeViewRegistry.register("MapView", new com.example.mapview.MapViewHostFactory());
  3. iOS only: in UMPViewController.viewDidLoad, after the wireNativeViewRegistryWithBelow:above: call:

    [UMPNativeViewRegistry registerKind:@"MapView"
                                factory:[[UMPMapViewHostFactory alloc] init]];
  4. Harmony only: nothing extra. The side-effect register call at the bottom of MapViewHost.ets runs when imports.gen.ets (generated by autolink) imports the file at module load. Make sure EntryAbility.onCreate calls umpInstallPlugins() before bundle eval — see chapter §17.3 of the guide for that one-time wiring.

V1 limitations

See guide §17.7. The two limitations most likely to surprise plugin authors:

  • No event channel for plugin authors yet. The hosts in this example have TODO(events) markers where event firing would go through dispatch_native_view_event_from_ui. That C++ surface exists; the platform-specific JNI / NAPI / C-extern bridge for plugins is reconnected in a follow-up. Built-in Video uses UMPNativeViewRegistry.fireIntrinsicSize as the only event today.

  • Sync methods are gated. Methods that block the JS thread must be in spec.sync_methods. MapView declares sync_methods = {} so any sync handle method would silently downgrade to fire-and-forget; add the method name there if you want the blocking behaviour. Read guide §17.6 first — the bar is high.