CDN
Summary
This docs site doubles as a CDN for the Neura distribution
files. Instead of copying the flatpack into your project, you
can reference the files directly from
neura.nsys.org: one <link> and
one <script> and the full component library
(including the AUI compatibility shim) is available.
Files
| File | What it is |
|---|---|
/cdn/neura.css | The complete stylesheet: all neura-* components, themes, a11y layer, and the aui-* class aliases. |
/cdn/neura.umd.cjs | UMD bundle for plain <script> tags. Sets window.Neura and window.AJS, runs auto-init on DOMContentLoaded. This is the drop-in for server-rendered (Velocity-era) pages. |
/cdn/neura.d.ts | TypeScript definitions for the Neura.* API; also inside the zip for vendoring. |
/cdn/neura.js | ESM build for <script type="module"> or bundlers consuming a URL import. Default-exports the Neura API. |
/cdn/*.map | Source maps for both JS builds; DevTools picks them up automatically. |
/cdn/neura.zip | The complete flatpack as a downloadable archive; see Download below. |
Download
If you'd rather vendor the files into your project (offline builds, air-gapped deployments, checked-in static assets), grab the flatpack archive instead of referencing the CDN:
| Archive | Contents |
|---|---|
neura.zip/cdn/neura.zip | Latest release. Extracts to a neura-<version>/ folder containing neura.css, neura.js, neura.umd.cjs, both source maps, and the Apache 2.0 LICENSE + NOTICE (keep these two alongside the files when redistributing). |
/cdn/<version>/neura-<version>.zip | The same archive under the version-pinned path, e.g. /cdn/0.2.0/neura-0.2.0.zip. |
The archive contents are byte-identical to the loose CDN files; swapping between vendored and CDN delivery never changes behaviour.
Latest vs pinned
| Path | Behaviour |
|---|---|
/cdn/neura.css | Latest. Always the currently deployed release. Cached for 5 minutes, so consumers pick up a new release quickly, and may also pick up breaking changes. Fine for internal tools that track Neura. |
/cdn/0.2.0/neura.css | Pinned. Version-stamped path, cached as immutable for a year. Use this in anything you don't redeploy alongside Neura. The version matches the deployed release; see the caveat below. |
Caveat: the CDN ships inside the docs-site container, and each container carries exactly one version. A pinned URL keeps working as long as that release is the one deployed; after Neura moves on, old pinned paths stop resolving unless the previous container is kept routable. Treat pinning as cache-correctness (the URL never silently changes content), not as a permanent archive of old releases.
HTML
Drop-in for server-rendered pages (classic script + stylesheet):
<link rel="stylesheet" href="https://neura.nsys.org/cdn/neura.css">
<script src="https://neura.nsys.org/cdn/neura.umd.cjs"></script>
<!-- Neura.* and AJS.* are now available; auto-init has run. -->
<button class="neura-button neura-button-primary">Save</button>
<script>
Neura.flag({ type: 'success', title: 'Neura is loaded' });
</script>
Modern pages can use the ESM build instead:
<script type="module">
import Neura from 'https://neura.nsys.org/cdn/neura.js';
Neura.flag({ type: 'success', title: 'Neura is loaded' });
</script>
Pin a version by inserting it into the path (same files, same markup):
<link rel="stylesheet" href="https://neura.nsys.org/cdn/0.2.0/neura.css">
<script src="https://neura.nsys.org/cdn/0.2.0/neura.umd.cjs"></script>
Notes
- CORS is open (
Access-Control-Allow-Origin: *), so ESM imports, fonts, and source maps work from any origin. - Everything is served gzipped with correct MIME types (including
.cjsand.map). - jQuery is not bundled and not required; Neura core is zero-dependency. If your page uses
AJS.$or Nsys's ownnsys.js, load your jQuery before the Neura script, exactly as with the AUI flatpack. - The CDN serves the same
dist/flatpack that the AUI compatibility drop-in path installs into the Nsys portal; the two are interchangeable.
AUI compatibility
The UMD bundle contains the full AUI shim: window.AJS
(dialog2, dropdown2, messages, tabs, InlineDialog, whenIType,
RestfulTable, utils, …) and every aui-* CSS alias.
Pointing an existing AUI 5.4 page's stylesheet and script tags at
the CDN URLs is equivalent to the flatpack swap described on the
AUI compatibility page.
Version retention
Version-pinned paths are permanent: every released version is
archived in the repository (cdn-releases/) and
baked into each site image, so /cdn/<version>/…
keeps serving byte-identical files after later releases. Pin
versions (and their hashes below) with confidence; only the
un-versioned "latest" paths move.
Integrity (SRI)
For the version-pinned CDN files you can pin content hashes too; browsers then refuse the file if it ever differs. Hashes for every version this CDN serves:
| Version | File | integrity |
|---|---|---|
| Loading… | ||
<link rel="stylesheet"
href="https://neura.nsys.org/cdn/0.2.0/neura.css"
integrity="sha384-…"
crossorigin="anonymous">
Pair integrity with the version-pinned paths: the
un-versioned /cdn/… files change on every
release, so a pinned hash there would break on purpose.