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

iot-elements-node

v1.1.0

Published

Collections of HTML/DOM elements for IoT systems by domain (home, retail, hospitality, etc.).

Downloads

2

Readme

HTML/DOM IoT Element Factories

Collections of HTML/DOM element factories for IoT systems by domain (home, retail, hospitality, etc.).

Elements refer to a single node in the HTML document structure, typically representing part of the logical structure (e.g. <iot-room></iot-room>, <iot-door/>, <iot-wardrobe></iot-wardrobe>).

Element classes are required to implement their specific behaviors. For example, "a door element should fire a change event when its state changes from locked=true to locked=false and vice versa".

Elements are organized by domain because their meaning may change depending on the domain of application.

Installation

npm install iot-elements-node

Usage

Import domain-specific collections

import { retailElementFactoryCollection } from 'iot-elements-node';
import { homeElementFactoryCollection } from 'iot-elements-node';
import { hospitalityElementFactoryCollection } from 'iot-elements-node';

Then you can use them in your IoT system HTML:

<html>
    <iot-section>
        <iot-aisle id="aisle6" name="Coffee, Hot Beverages, Cookies & Chocolate">

            <iot-ibits-button-binding id="a6ButtonBinding" location="/dev/ihubx24-sim0">
            <iot-obits-color-binding id="a6RelayBinding" channels-per-element="2" location="/dev/ohubx24-sim0">

            <iot-button id="a6Product1Button" shelving-unit-id="a6L1" binding="a6ButtonBinding">
            <iot-button id="a6Product2Button" shelving-unit-id="a6L2" binding="a6ButtonBinding">

            <iot-shelving-unit id="a6L1" name="Ground Coffee" style="background-color:white;" binding="a6RelayBinding:0">
            <iot-shelving-unit id="a6L2" name="Coffee Pods & K-Cups" 

            <iot-my-element></iot-my-element>

        </iot-aisle>
    </iot-section>
</html>

Pass the collections to the DOMIoT (you can pass none, one or more element factory collections to the DOMIoT.):

const domiot = new DOMIoT(html, [retailElementFactoryCollection, myElementFactoryCollection]);
const document = domiot.window.document;

const button = document.getElementById('a6Product2Button');

button.addEventListener('press', (ev) => {
    const shelvingUnitId = ev.target.getAttribute('shelving-unit-id');
    if (!shelvingUnitId) return;

    const shelvingUnit = document.getElementById(shelvingUnitId);
    if (!shelvingUnit) return;

    // change the color of the shelving unit to blue,
    // this changes the light color.
    shelvingUnit.style.setProperty('color','blue');

});

...

Import individual element creators

Useful for creating your own collections (see below).

import { createHTMLIoTButtonElement, createHTMLIoTAisleElement } from 'iot-elements-node/retail';
import { createHTMLIoTLampElement, createHTMLIoTRoomElement } from 'iot-elements-node/home';
import { createHTMLIoTDoorElement, createHTMLIoTCurtainElement } from 'iot-elements-node/hospitality';

Create your collections using HTMLElementFactoryCollection

You can create your own collection of element factories using HTMLElementFactoryCollection

Example:

'use strict';
import { HTMLElementFactoryCollection } from 'iot-elements-node';

import {
    createHTMLIoTAisleElement,
    createHTMLIoTShelvingUnitElement,
    createHTMLIoTButtonElement,
    createHTMLIoTVideoElement,
    createHTMLIoTAudioElement
} from 'iot-elements-node/retail';

const myElementFactoryCollection = new HTMLElementFactoryCollection();

myElementFactoryCollection.add('iot-aisle', createHTMLIoTAisleElement);
myElementFactoryCollection.add('iot-shelving-unit', createHTMLIoTShelvingUnitElement);
myElementFactoryCollection.add('iot-button', createHTMLIoTButtonElement);
myElementFactoryCollection.add('iot-video', createHTMLIoTVideoElement);
myElementFactoryCollection.add('iot-audio', createHTMLIoTAudioElement);
  • add(tagName, elementFactory) - Add an element factory
  • remove(tagName) - Remove an element factory
  • get(tagName) - Get an element factory
  • Iterable (supports for...of loops):
for (const [tagName, elementFactory] of collection) {
    ...
}

Domain-specific collections

Retail

HTMLIoTAisleElement

HTMLIoTAudioElement

HTMLIoTBasketElement

HTMLIoTButtonElement

HTMLIoTColumnElement

HTMLIoTCompartmentElement

HTMLIoTCubbyElement

HTMLIoTCustomerElement

HTMLIoTDisplayUnitElement

HTMLIoTEndcapElement

HTMLIoTGondolaElement

HTMLIoTItemElement

HTMLIoTLineElement

HTMLIoTPodiumElement

HTMLIoTRoomElement

HTMLIoTShelfElement

HTMLIoTShelvingUnitElement

HTMLIoTTileElement

HTMLIoTVideoElement

Home

HTMLIoTAudioElement

HTMLIoTCurtainElement

HTMLIoTLampElement

HTMLIoTRoomElement

HTMLIoTVideoElement

HTMLIoTWindowElement

Hospitality

HTMLIoTAudioElement

HTMLIoTCurtainElement

HTMLIoTDoorElement

HTMLIoTLampElement

HTMLIoTRoomElement

HTMLIoTVideoElement

HTMLIoTWindowElement

License

MIT.