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

jsgui3-client

v0.0.124

Published

ES6 JSGUI Client. For delivery to the browser.

Downloads

800

Readme

JSGUI3 Client

ES6 JSGUI Client library for delivery to the browser. This module provides client-side functionality for building web applications with the JSGUI framework.

Overview

The jsgui3-client package extends the base jsgui3-html framework with browser-specific functionality, including HTTP communication, client resource management, page context handling, and UI controls optimized for client-side execution.

Features

HTTP Communication

  • GET, POST, DELETE requests: Built-in HTTP methods with Promise/callback support
  • Automatic JSON handling: Serialization and parsing of JSON data
  • Timeout support: Configurable request timeouts (default: 2500ms)
  • Error handling: Comprehensive status code and error response handling

Resource Management

  • Client Resource Pool: Manages client-side resources with HTTP endpoint connectivity
  • Data Resources: HTTP-based data resources with GET/POST/DELETE operations
  • Resource Registration: Server resource registration and management

Page Context

  • Client Page Context: Extended page context class with browser-specific features
  • Modal Support: Built-in modal dialog functionality
  • Element Management: DOM element mapping and control
  • Control Integration: Seamless integration with JSGUI controls

Controls

  • Active HTML Document: Enhanced HTML document control with automatic activation
  • Standard Control Updates: Automatic control registration and updates

Installation

npm install jsgui3-client

Dependencies

  • jsgui3-html: ^0.0.172 - Core JSGUI HTML framework
  • fnl: 0.0.37 - Functional library utilities

Requirements

  • Node.js >= 15.0.0

Main Components

client.js

Main entry point that sets up the global jsgui object with client-specific functionality including HTTP methods and resource management.

resource.js

Defines client-side resources that can communicate with server endpoints via HTTP.

client-resource-pool.js

Manages pools of client resources, extending the base resource pool with client-specific capabilities.

page-context.js

Provides Client_Page_Context class that extends the base page context with browser-specific features like modals and DOM management.

data-get-post-delete-http-resource.js

Implements HTTP-based data resources supporting standard CRUD operations over HTTP.

Controls

This package builds on the control set provided by jsgui3-html (for example Control and Modal) and focuses on client/browser runtime integration (page context, HTTP helpers, client resources).

Usage

// The library automatically extends the global jsgui object when loaded
const jsgui = require('jsgui3-client');

// HTTP requests
jsgui.http('/api/data').then(data => {
    console.log('Retrieved data:', data);
});

// POST data
jsgui.http_post('/api/data', {name: 'example'}).then(response => {
    console.log('Posted successfully:', response);
});

// Create page context
const context = new jsgui.Client_Page_Context({
    document: document
});

// Use modal
context.modal.show('Hello World!');

Architecture

This module is designed to work in browser environments and provides the client-side counterpart to jsgui3-server. It handles:

  • Browser-specific DOM operations
  • HTTP communication with server resources
  • Client-side resource pooling and management
  • UI controls optimized for browser execution

Documentation

  • See docs/README.md for a comprehensive guide covering how jsgui3-client layers on top of jsgui3-html and how it integrates with jsgui3-server (bundling, serving, and API interaction).

Testing

npm test

E2E (Puppeteer):

npm run test:e2e

Notes:

  • Tests use Node’s built-in node:test runner (Node.js >= 18 recommended for running the test suite).
  • Browser-only behavior is tested by stubbing window, document, and XMLHttpRequest in Node (see test/fixtures/).

License

MIT

Author

James Vickers [email protected]

Repository

https://github.com/metabench/jsgui3-client.git