JSPM

  • Created
  • Published
  • Downloads 67
  • Score
    100M100P100Q58990F
  • License AGPL-3.0

Toolkit for developing user interfaces with Node.js

Package Exports

  • atlastk

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (atlastk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Binding for Node.js of the Atlas toolkit

The Atlas toolkit is a library for web and desktop UI. This is the binding of this toolkit for Node.js.

Hello World!

Little demonstration

JavaScript source code

const atlas = require('atlastk');

atlas.register( {
 "Connect": (dom, id) => dom.setLayout("", new atlas.Tree(), "Main.xsl"),
 "Typing": (dom, id) => dom.getContent(id, (name) => dom.setContent("name", name)),
 "Clear": (dom, id) => dom.confirm("Are you sure ?", (answer) => { if (answer) dom.setContents({"input": "", "name": ""})}),
 } );

atlas.launch(() => new atlas.DOM(), "Connect");

XSL file

This is the content of the Main.xsl file which name is given given as parameter to above dom.setLayout(...) instruction.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" encoding="UTF-8"/>
  <xsl:template match="/">
    <label>Name:</label>
    <input id="input" maxlength="20" placeholder="Enter a name here" type="text" data-xdh-onevent="input|Typing"/>
    <button data-xdh-onevent="Clear">Clear</button>
    <hr/>
    <h1>
      <span>Hello </span>
      <span style="font-style: italic;" id="name"/>
      <span>!</span>
    </h1>
  </xsl:template>
</xsl:stylesheet>

What's next ?

For more information: http://atlastk.org/