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

@expofp/wayfinding

v3.35.1

Published

ExpoFP SDK internal: framework-neutral wayfinding (routing, snapping, scene rendering)

Readme

@expofp/wayfinding

Framework-neutral wayfinding for the ExpoFP SDK: a routing/snapping engine, an imperative runtime orchestrator, and a scene renderer — with no coupling to efp stores or MobX. core and runtime are environment-agnostic; the scene renderer assumes a browser-like environment (requestAnimationFrame, document), so the package is not suitable for Node/SSR as-is. All three layers sit behind two entry points: initWayfindingLayers, which builds the layer block for the host to mount, and createWayfinding, which finds it in the scene and fills it.

Install

pnpm add @expofp/wayfinding @expofp/renderer

@expofp/renderer is a peer dependency and must be installed by the consumer: the package's public types (e.g. RenderableDef on Wayfinding/RendererPort) reference it, so its types must resolve for @expofp/wayfinding's .d.ts to compile.

Layers

| Layer | What it is | | ---------- | -------------------------------------------------------------------------------------------- | | core | Graph build + A* pathfinding, route geometry, snapping, transition points. Pure functions. | | runtime | Imperative orchestrator (setRoute / setPosition / notifyFloorChanged) over the engine. | | renderer | Scene mutator (icons, trails, route lines) against an injected RendererPort. |

These layers are internal. The package exports only the createWayfinding facade, initWayfindingLayers (the layer block it draws into, for the host to mount) with resolveWayfindingLayers (which finds that block in a scene again), the port interfaces the host implements, the boundary data types, the CURRENT_POSITION_POINT_ID protocol sentinel, and the optimizeWaypointOrder helper.

Ports (host implements)

The package knows nothing concrete about the host renderer, graph data, or app state. The host supplies four ports via WayfindingConfig:

  • dataSource (GraphDataSource) — graph lines + line ends for pathfinding.
  • renderer (RendererPort) — the host's cardinal-snap rule and commit.
  • iconProvider (IconProvider) — canvases for icon names.
  • floorContext (FloorContext) — active floor / visibility predicates.

@expofp/renderer is a type-only peer (its types appear in the public API; the concrete renderer is injected through RendererPort). @expofp/geometry is a regular runtime dependency (Rect, Box, geometry helpers).

Usage

import { createWayfinding } from '@expofp/wayfinding';

const wayfinding = createWayfinding({
  dataSource, // GraphDataSource
  renderer, // RendererPort
  iconProvider, // IconProvider
  floorContext, // FloorContext
  layers, // WayfindingLayers, from resolveWayfindingLayers(scene.rootLayer)
  gpsConfig, // optional GPS calibration + snap/reroute thresholds
  onTransitionClick: (point) => {
    /* switch active floor */
  },
  onRouteUpdate: (lines, bounds) => {
    /* fit camera, update UI */
  },
  onRouteDistance: (distance) => {
    /* show remaining distance */
  },
});

// Drive it with route/position/floor updates:
wayfinding.setRoute({ from, to, accessible: false });
wayfinding.setPosition(position); // or null to hide
wayfinding.notifyFloorChanged();

// Forward pointer events:
wayfinding.handleClick(pickedDefs);

wayfinding.destroy();

optimizeWaypointOrder is exported separately to order booth waypoints before a createWayfinding instance exists (it backs the SDK's getOptimizedRoutes).