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

@aglyn/aglyn

v1.0.0-beta.180

Published

The core of Aglyn: the platform's data model (hosts, screens, layouts, node trees), the runtime managers that hold components, plugins and the canvas, and the framework-independent utilities the rest of the `@aglyn` packages are built on. Install it if yo

Readme

@aglyn/aglyn

The core of Aglyn: the platform's data model (hosts, screens, layouts, node trees), the runtime managers that hold components, plugins and the canvas, and the framework-independent utilities the rest of the @aglyn packages are built on. Install it if you are building on Aglyn's model: a renderer, an editor, a plugin, or a tool that reads and writes Aglyn documents.

Beta. Published from the Aglyn monorepo under the beta dist-tag; APIs can change between beta releases.

Install

npm install @aglyn/aglyn@beta

Peer dependencies:

  • react is required.
  • next, firebase, @mui/material and @mui/system are declared optional (peerDependenciesMeta). The package installs and bundles with only react. Bring the optional ones only for the modules that use them:
    • @mui/material for the consent UI modules (@aglyn/aglyn/app-utils/consent-banner-ui, @aglyn/aglyn/app-utils/consent-preferences-dialog); @mui/material and @mui/system also supply types that some node and component type definitions refer to.
    • next for @aglyn/aglyn/app-utils/advertising-tag-mounts, which uses next/script.
    • firebase is declared for apps that pair the model with Firebase, as Aglyn's own apps do. No module in this package needs it to load.

This is the "logic only" consumer story: @aglyn/aglyn together with @aglyn/besigner installs with react as the only peer, and needs no UI library, no next, and no Firebase SDK.

What's in it

Entry points:

  • @aglyn/aglyn is the full barrel, for client code.
  • @aglyn/aglyn/server is the server-safe barrel. It re-exports the same model, managers and pure utilities without the client React contexts, so it can be imported from React Server Components. It also carries the modules that use Node built-ins or a JavaScript parser and are therefore kept out of the client barrel: the Web-to-(req, res) API adapter, API idempotency, the person key, the plugin bundle checks, and the server side of realm plugins.
  • @aglyn/aglyn/* maps to a file under src/lib, for example @aglyn/aglyn/aglyn or @aglyn/aglyn/app-utils/markdown-lite. A subpath names a file, not a folder. Importing by subpath keeps a bundle to what it uses.

Main areas under src/lib:

  • aglyn is the runtime singleton. It exports aglyn and its parts: emitter, plugins, components, canvas and logger. The instance is keyed on globalThis, so duplicate module copies in one JavaScript realm share one runtime.
  • types holds the node and screen model: NodeSchema, NodesMap, ComponentSchema, PresetSchema, ScreenSchema, routing and AST types.
  • foundation holds the platform document types (AglynHost, AglynScreen, AglynLayout, AglynHostTheme, organization and billing shapes, and their id types) and shared constants.
  • emit-manager is EmitManager (an eventemitter2 emitter) and the AglynEvent enum of lifecycle and action events.
  • components-manager is ComponentManager, the registry of component factories, their schemas, and presets.
  • plugin-manager is PluginManager (plugin registration and dependency status) plus the plugin seams: the plugin loader (createPluginLoader), contributions, configuration, permissions, entitlements, events, services and jobs. Aglyn's feature plugins attach to the platform through these.
  • canvas-manager is CanvasManager, the observable node tree: set, create, delete, duplicate, reparent and reorder nodes, with undo and redo history.
  • app-utils is a large set of pure helpers over the model: node composition and sanitizing, binding tokens and variables, datasets and collections, SEO and sitemap helpers, the markdown-lite dialect, permissions and roles, consent, analytics keys, media references, and more. Its React contexts (site context, media picker, enabled plugins and others) are exported from the client barrel only.
  • utils has the feature-flag predicates such as isFeatureEnabled.

Usage

import { AglynEvent, canvas, components, emitter } from '@aglyn/aglyn'

emitter.on(AglynEvent.COMPONENT_REGISTERED, ({ $id }) => {
  console.log('registered', $id)
})

components.registerComponent(MyBox, {
  $id: 'my-box',
  pluginId: 'my-plugin',
  displayName: 'My box',
})

components.getSchema('my-box')

// `nodes` is a NodesMap: node id -> NodeSchema
canvas.setNodes(nodes)
const root = canvas.rootNode

From a Server Component or other server code:

import type { AglynScreen, NodeSchema } from '@aglyn/aglyn/server'

How it fits

@aglyn/aglyn is the core scope of the package map. It imports only itself and the generic @aglyn/shared-* packages. It holds no rendering, no designer, no tenancy and no plugin: the core never imports a plugin, and a plugin's domain lives in that plugin. Everything else stands on it: @aglyn/aglyn-node-renderer turns its node trees into React, @aglyn/besigner and @aglyn/besigner-ui edit them, the @aglyn/tenant-* packages serve them, and every @aglyn/plugins-* package registers into its managers.

License

Apache-2.0. Source: https://github.com/aglyn/aglyn/tree/main/libs/aglyn