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 🙏

© 2024 – Pkg Stats / Ryan Hefner

gaia-js-sdk-convey

v0.97.0

Published

JavaScript connector to the G.A.I.A. ecosystem.

Downloads

215

Readme

Convey

CircleCI branch GitHub tag (latest SemVer)

Convey is a JavaScript Framework for connecting to processes created with G.A.I.A..

The framework ist compatible with all major Browsers and can be used standalone as well as in conjunction with React, Angular or Vue.

Integration

In order to add Convey to your project, follow these steps:

Prerequisites

In order to integrate with G.A.I.A. two things are required:

  1. MQTT endpoint: e.g. wss://gaia.local/mqtt
  2. Identifier of the so called Identity to connect to.

Add Convey

npm i gaia-js-sdk-convey

Create HTML page

<html>
    <head>
        <meta charset="UTF-8"/>
        <link rel="stylesheet" href="gaia-js-sdk-convey-std.css"/>
        <script src="gaia-js-sdk-convey-std.js"></script>
    </head>
    <body>
        <div class="lto-gaia">
            <div class="lto-content"></div>
                <div class="lto-suggest"></div>
                <input class="lto-textbox"/>
                <button class="lto-invoker"/>
            </div>
        </div>
    </body>
</html>

Integrate Convey as standalone lib

Add the following before the </head> tag in the HTML file.

<script type="javascript">
    new GaiaConvey.Gaia(
        new GaiaConvey.ContentCentricRenderer(),
        new GaiaConvey.OffSwitchListener()
    ).connect('wss://DOMAIN_NAME/mqtt', 'IDENTITY_ID')
        .then(connection => {
            connection.subscribe(ChannelType.CONTEXT, (data) => console.log(data));
            connection.reception();
        });
</script>

Integrate Convey as NPM package

import {Gaia, ContentCentricRenderer, OffSwitchListener, ChannelType} from "gaia-js-sdk-convey";
...
new Gaia(new ContentCentricRenderer(), new OffSwitchListener())
    .connect('wss://DOMAIN_NAME/mqtt', 'IDENTITY_ID')
    .then(conn => {
        conn.subscribe(ChannelType.CONTEXT, (data) => console.log(data));
        conn.reception();
    });

Channels

The communication with G.A.I.A. contains several channels where each one has its own purpose.

TEXT

Is the main channel and is responsible for exchanging the elements configured in G.A.I.A.. Convey automatically subscribes to this channel. The messages in this channel are rendered to HTML elements.

NOTIFICATION

Each notification configured in the G.A.I.A. BPMN process can be received if subscribed to this channel.

LOG

G.A.I.A. sends logs for certain process executions which can be received by subscribing to this channel.

Renderer

A Renderer defines how elements, arrived in the TEXT channel, are rendered in the HTML DOM tree. Furthermore, a renderer allows for specifying the layout of an integration project.

Classic Renderer

The classic renderer renders the G.A.I.A. messages in a classic top-down manner.

Content Centric Renderer

The content centric renderer tries to maximize the time a content is visible by updating the content if possible or displaying interrupting actions like intent cascading by overlaying the content.

RevealJS Renderer

Renderer implementation which is based on the reveal.js library. This renderer supports horizontal as well as vertical navigation.

NoopRenderer

No-operation dummy renderer. Mainly used for audio only use cases.

Listener

A listener provides the functionality to react to certain events. Events can be

  • Connected
  • ConnectionLost
  • PacketSend
  • Disconnected
  • Error
  • Message

Default Listener

Acts as the base listener.

OffSwitch Listener

If an input text area should only be visible when a input is required, this is the listener to be used.

Modules

The following modules are available:

  • std: Contains default modules
  • aud: Contains the audio module
  • cod: Contains the code reader module (e.g. QRCode)
  • map: Contains modules for Open Street Map and Google Maps
  • vis: Contains modules for rendering data as charts
  • all: Contains all modules

Development

Release

Releases are triggered locally. Just a tag will be pushed to trigger the CI release pipeline.

Major

Run yarn trigger-release:major locally.

Minor

Run yarn trigger-release:minor locally.

Patch

Run yarn trigger-release:patch locally.