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

workadventure-dialog

v1.2.2

Published

This package is highly inspired by [workadventure/npc-dialog-box](https://github.com/workadventure/npc-dialog-box/).

Readme

Workadventure Dialog

This package is highly inspired by workadventure/npc-dialog-box.

The major difference is that this package is promise based. You can add any number of buttons to the dialog box, await a button click and work with the result.\

For now, it only supports a single message with a number of buttons. Optionally with a title (e.g. the name of an npc) and an image (e.g. the avatar of an npc).

Usage

Install the package

npm install workdaventure-dialog

Add the Vite plugin to your map project's Vite config(s) — for the map-starter-kit, both web.vite.config.ts and buildmap.vite.config.ts:

import { workAdventureDialog } from "workadventure-dialog/vite";

export default defineConfig({
    // ...
    plugins: [
        workAdventureDialog({ assets: ["npc-avatar.png"] }),
        // ...the other plugins (map optimizers, etc.)
    ],
});

It makes the dialog page available next to your map, in dev and in your build, along with any extra files you list in assets (your avatar images, typically).

[!Note] To add additional files, use recursive paths from the root directory, e.g. ./src/assets/npc-avatar.png
The files will be added to the map build root directory. Use them as npc-avatar.png.

Initialize the dialog service. Then use the singleton instance to open and close dialogs:

import {WorkAdventureDialogService} from "@lumrenion/workadventure-dialog";

WorkAdventureDialogService.initialize(WA);

const dialogs = WorkAdventureDialogService.getInstance();
const buttonValue = await dialogs.show({
    message: "Are you ready for a WorkAdventure?",
    title: "Frank the Mayor",
    avatar: "npc-avatar.png",
    buttons: [
        { label: "Yes", value: "true" },
        { label: "No", value: "false" }
    ]
});

dialogs.close();

Development hint

To publish a new version, execute:

npm version major|minor|patch
git push
git push --tags

npm version changes the version number in package.json, makes a commit and creates a git tag automatically.