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

agnos

v0.0.1

Published

An utility library that intends to applies any popular UI framework to standard html markup

Downloads

2

Readme

There is a large number of UI frameworks that can be used for web app development. Without too much effort, You can add UI elements by just incorporate the the markup language provided by any of those frameworks. The markup is however framework specific, and causes a vendor lock-in.

Concept

The example below shows the differences between the usage of a large colorful button in bootstrap and Bulma.

<button class="btn btn-primary btn-lg">botstrap button</button>
<button class="button is-primary is-large">bulma button</button>

In order to be able to move from one UI framework to another, we introduce a clean and standard markup for the html (we're not religious about this markup, but we aim to be as close to html5 standard as we can).

<button class="large">agnos button</button>

In our scss file, we're using the agnos to transform the underlying UI framework to our UI.

There are couple of other related concerns that are related to this work:

  • (web) components have an encapsulated view and therefor require smaller (dedicated) pieces of CSS. Agnos should be able to provide access to a small portion of the UI library only.
  • similar to CSS, icons are another candidate to be replaced. This can be done in the same spirit, but requires another technique.
  • variables (i.e. colors) are framework specific as well, we're considering to make those more generic (and move to css variables while we do that)
  • similar to icons and variables, the font settings should be configurable in a generic way. We haven't deep dived here, but this seems straightforward for now.

Getting started

Agnus has not yet been published to npm. In order to experiment with this framework, you can clone the project and use it by adding the following lines to your application scss file:

@import '../../agnos/scss/bulma';
@include _bootstrap($button: true, $tabs: true);

(this example will extend bulma, but only the button and tabs).

Coverage

This library just got started, so only a few components have been transformed. The implementation is intended to be extendable, but in order to 'proof' the concept, the following UI frameworks are used:

| Feature | Bootstrap | Materialize | Bulma | Foundation | Fundamental UI | | -------------- | --------- | ----------- | ----- | ---------- | -------------- | | Typography | ✅ | ✅ | ✅ | ✅ | ✅ | | Button | ✅ | ✅ | ✅ | ✅ | ✅ | | Tabs | ✅ | ✅ ¹ | ✅ | ✅ | ✅ | | Alert | ✅ | N/A | ✅ | ✅ | ✅ |

¹ Feature is incomplete as it requires JS

Limitations

This project only tries to fix the CSS part of the UI. Any interaction that requires JS are out of scope (which btw causes another dependency lock-in).

The key technique that used in agnos relies on inheritance, a key concept form the sass language. Using sass @extend obviously requires the UI framework to support sass in the first place (but most of them seem to do that). Ideally, UI frameworks would offer placeholder selectors to extend from,instead of concrete selectors. This would decrease the CSS output. Without placeholder selectors, the output is more poluted then anyone would like.