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

@allnulled/ui-script

v1.0.6

Published

UI-Script is a shorter & simpler substitute for HTML syntax

Downloads

7

Readme

UI-Script

UI-Script is a shorter & simpler substitute for HTML syntax.

Shield Shield Shield Shield Shield Shield Shield Shield Shield

Index

Online version

You have a free tester online version here:

Documentation

The documentation can be found:

Installation

Before starting, import the package via npm:

npm install --save @allnulled/ui-script

First, you import the CSS file for general and per-component styling:

<link rel="stylesheet" type="text/css" href="./node_modules/@allnulled/ui-script/docs/lib/ui-script/ui-script.css" />

Second, you import the JS file for general and per-component logic:

<script src="./node_modules/@allnulled/ui-script/docs/lib/ui-script/ui-script.js"></script>

Usage

Once you have done this, 2 variables are added into the global scope window:

  • uiscript_api and
  • uiscript_components.

However, you can use import statement too to retrieve the uiscript_api.

The uiscript_api comes packed like this:

window.uiscript_api = {
    ast: { parser: ast_parser },
    parser,
    components: window.uiscript_components
};

The uiscript_api.parser.parse(uiscript) function returns HTML syntax from uiscript syntax.

The uiscript_api.ast.parser.parse(uiscript) function returns an object syntax from uiscript syntax.

The uiscript_api.components holds the uiscript_components object.

The uiscript_components holds all the ui-script (Vue2) components of the library, this is:

Examples

The following example demonstrates how to create a new Vue.js v2 component from UI-Scripting markup.

<script>
Vue.component("CustomComponent", {
    template: uiscript_api.parser.parse(`
      !div {
       !xwindow {
        !xwindowtitle {{ Título de la ventana }}
        !xwindowbody {
         !xtitle {{ Título de página }}
         !xsubtitle {{ Subttulo de página }}
         !xbreadcrumb {{ Ruta » a » subdireccion }}
         !xpanel {
          !xform {
           !xformfield {{ Usuario: }}
           !xformfield {{ Contraseña: }}
          }
         }
         !xlayoutnopaddingtop [style="text-align: right;"] {
          !xbutton {{ Entrar }}
         }
        }
        !xwindowfooter {
         !xwindowfooteritem {{ Pie de ventana }}
        }
       }
      }
    `)
});
</script>

Binaries usage

Usage of uiscript

To parse uiscript code into html you can simply:

uiscript file1.uis file2.uis file3.uis

This will output the equivalent html files beside each.

Usage of xcomponents

To create a setup of files (lib folder) you can simply:

xcomponents docs

This will create a lib folder inside the docs folder with:

  • calo: castelog import statement.
  • win7: win7 CSS library.
  • ui-script: ui-script JS and CSS files, and the whole component API too, in case you need to modify it.

Extra information

Use Windows 7 programmatic dialogs

The xdialogport provides a special API for Windows 7 based dialogs with very easy asynchronous methods. Visit its documentation here to take full advantage of this API.

As easy as:

const confirmation_1 = await Vue.prototype.$dialogs.confirm("Did you like it?", "Question", "A daily custion", "Yes", "No");
const confirmation_2 = await Vue.prototype.$dialogs.confirm({
  html: "Did you like it?",
  title: "Question",
  footer: "A daily custion",
  button_accept: "Yes",
  button_reject: "No"
});

More than 25 components

The most of them are just CSS. But useful anyway to wrap the contents of your templates.

  1. xbreadcrumb
  2. xbutton
  3. xdialogport
  4. xdialogcurrent
  5. xform
  6. xformfield
  7. xjumbotron
  8. xlabel
  9. xlayout
  10. xlayoutnopaddingbottom
  11. xlayoutnopaddingtop
  12. xlink
  13. xpage
  14. xpanel
  15. xparagraph
  16. xstatic
  17. xsubtitle
  18. xtable
  19. xtablecell
  20. xtablerow
  21. xtester
  22. xtitle
  23. xwindow
  24. xwindowbody
  25. xwindowfooter
  26. xwindowfooteritem
  27. xwindowtitle