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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@learnupio/explorable-helpers

v0.1.3

Published

Helper functions and callbacks for better mobile client <> explorable view integration.

Readme

👋 Hallo!

This is a complementary library to make integration and communication between Learnup mobile apps and explorable content seamless.

If you don't know what Learnup or an explorable is, it probably means that you got here by chance and have no idea what is going on. Feel free to checkout learnup.io, and if you are interested in creating explorable content together, open an issue, or drop us an email.

A Humble Guideline

In this section we are going to explore common terminology and bigger picture.

Explorables

In Learnup, we try to share what we know and enable other sharers to find more interactive ways to present their content.

So far, we have found that sharing and learning anything is better done in a conversational fashion, and we build up our dialogues(content) as chat-like experiences.

However this provides us a good foundation, we always want to explore the ways to make our dialogues more interactive. In the end, learning is more fun, enjoyable, and immersive when it is more interactive, isn't it?

This is where explorables come in. We want to provide a good foundation for creators to develop their interactive explorables and be able to integrate those within the natural flow of dialogues.

Right now, we support two kinds of explorable entries in our dialogues:

Mini Explorable

It is shown as a part of dialogue flow just like text or gif entries, and should be designed as an embedded box with dimensions of at most (300x300) px.

Fullscreen Explorable

It is shown in its own fullscreen view, with one exception: native back button. (Position and Dimension is TBA.)

Scenes

Scenes provide a way to separate explorable content in parts. You can design your explorable in one scene or multiple scenes; it is all up to you.

We only care that each scene has a unique name, so that, when we load your explorable and pass it to your load callback, you'll know which scene to show on your side.

As dialogue flows, you can stage different views and interactions as scenes. In that way, we can have opportunity to build up experience in steps, and provide extra rich content to make our point before the next scene.

State Management

Throughout scenes, having capability of sharing state helps to build up experience for sure.

For example; if you ask user how much plastic bottles does she consume per week in first scene, then show her impact on the environment in the next one, you'll need to store bottlesConsumedPerWeek in some kind of persistent state.

Initially, we had that required state management in-house, and exposed an api point. Later, we decided to give full freedom to content creators, which includes their way of state management.

Since we open scenes in different web views for mobile apps, any in-browser storage option may fail. You can use firebase or any custom server you would build for persistent state management purposes.

For identification and tracking purposes, we provide enrolmentId to the onload callback. Enrolment is the unique relationship between a Dialogue and a User on our side, which means you can trust it.

If you think that you require persistent state and handling it is so much for you, tell us about it. We can also provide you an endpoint for that purpose.

Getting Started

Install library with npm or Yarn:

npm i @learnupio/explorable-helpers

Then import helper functions to your code.

import { load, onload, complete, cancel } from '@learnupio/explorable-helpers'

In order to make minimum functional explorable, you'll need to provide onload callback and expose load function globally.

onload((name, scene, enrolmentId) => {
  // bootstrap, initialize or do whatever you want with your explorable here.
})

window.explorables = { load }

Having window.explorables.load function with exact name is required, since mobile apps directly look for that function name, and call it with relevant arguments.

After that point, based on your requirements, you can call complete or cancel functions whenever you see fit.

// call on complete
complete()

// call on cancel
cancel()

For fullscreen explorables, complete and cancel calls enable mobile apps to perform teardown actions, close the explorable view and continue dialogue from where it left off.

Rest is all up to you; use whatever framework you want, and create awesome explorables!

Documentation

Currently, we have inline documentation for every function exposed. You can take a look at the humble source here.