Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@ All notable changes to **NoJS Elements** will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/no-js-dev/nojs-elements/compare/v1.15.3...HEAD)
## [Unreleased](https://github.com/no-js-dev/nojs-elements/compare/v1.15.4...HEAD)

## [1.15.4](https://github.com/no-js-dev/nojs-elements/compare/v1.15.3...v1.15.4) — 2026-06-22

### Fixed

- fix(docs): remove npm/ESM sections from README and docs — NoJS Elements is CDN-only
- fix(docs): remove npmjs.com link from llms.txt
- fix(docs): remove npm/ESM/CJS migration sections from migration-from-core.md
- fix(docs): expand Contributing section with build/test commands
- fix(docs): standardize CDN URL to cdn-elements.no-js.dev/
- fix(docs): remove surviving ESM instructions from llms-full.txt
- fix(docs): fix dead link to Skill repo element references

## [1.15.3](https://github.com/no-js-dev/nojs-elements/compare/v1.15.2...v1.15.3) — 2026-06-20

Expand Down
42 changes: 12 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,16 @@

## Installation

### NPM

```bash
npm install @no-js-dev/nojs-elements
```

### CDN

```html
<script src="https://cdn.no-js.dev/elements"></script>
```

---

## Usage

### ESM

```javascript
import NoJS from '@no-js-dev/nojs';
import NoJSElements from '@no-js-dev/nojs-elements';

NoJS.use(NoJSElements);
```

### CDN (Script Tag)

When loaded via `<script>` tag, NoJS Elements auto-installs itself — no `NoJS.use()` call needed:
Add both script tags to your HTML — NoJS Core first, then Elements:

```html
<script src="https://cdn.no-js.dev/"></script>
<script src="https://cdn.no-js.dev/elements"></script>
<script src="https://cdn-elements.no-js.dev/"></script>
<!-- That's it — all elements are ready to use -->
```

NoJS Elements auto-installs itself when loaded via `<script>` tag — no `NoJS.use()` call needed.

---

## Elements
Expand Down Expand Up @@ -132,7 +107,7 @@ This plugin requires **No.JS >= 1.13.0** as a peer dependency.

Detailed documentation for each element is available in [`docs/md/`](docs/md/).

For the full directive reference with all attributes, events, CSS classes, and accessibility details, see the [NoJS-Skill directive reference](https://github.com/no-js-dev/nojs-skill/blob/main/references/directives.md#drag-and-drop).
For the full directive reference with all attributes, events, CSS classes, and accessibility details, see the [NoJS-Skill element references](https://github.com/no-js-dev/nojs-skill/blob/main/nojs/references/elements/).

---

Expand All @@ -151,6 +126,13 @@ For the full directive reference with all attributes, events, CSS classes, and a

Contributions are welcome! Please open an issue or submit a pull request.

```bash
npm install # install dependencies
npm run build # esbuild → dist/{iife,esm,cjs}/nojs-elements.js
npm test # Jest unit tests
cd e2e && npx playwright test # E2E tests (Playwright)
```

- [Changelog](CHANGELOG.md)

## License
Expand Down
2 changes: 1 addition & 1 deletion dist/cjs/nojs-elements.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esm/nojs-elements.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/iife/nojs-elements.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 7 additions & 30 deletions docs/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NoJS Elements provides drag-and-drop, form validation, tooltips, popovers, modal
## Table of Contents

### Installation
- [Getting Started](#getting-started) — NPM, CDN, ESM usage
- [Getting Started](#getting-started) — CDN script tag usage

### Interaction Elements
- [Drag & Drop](#drag-and-drop) — `drag`, `drop`, `drag-list`, `drag-multiple`
Expand Down Expand Up @@ -44,39 +44,16 @@ NoJS Elements provides drag-and-drop, form validation, tooltips, popovers, modal

## Installation

### NPM

```bash
npm install @no-js-dev/nojs-elements
```

### CDN

```html
<script src="https://cdn.jsdelivr.net/npm/@no-js-dev/nojs-elements/dist/iife/nojs-elements.js"></script>
```

## Usage

### ESM

```javascript
import NoJS from '@no-js-dev/nojs';
import NoJSElements from '@no-js-dev/nojs-elements';

NoJS.use(NoJSElements);
```

### CDN (Script Tag)

When loaded via `<script>` tag, NoJS Elements auto-installs itself — no `NoJS.use()` call needed:
Add both script tags to your HTML — NoJS Core first, then Elements:

```html
<script src="https://cdn.no-js.dev/"></script>
<script src="https://cdn.no-js.dev/elements"></script>
<script src="https://cdn-elements.no-js.dev/"></script>
<!-- That's it — all elements are ready to use -->
```

NoJS Elements auto-installs itself when loaded via `<script>` tag — no `NoJS.use()` call needed.

## Peer Dependency

This plugin requires **No.JS >= 1.13.0** as a peer dependency.
Expand Down Expand Up @@ -107,7 +84,7 @@ This plugin requires **No.JS >= 1.13.0** as a peer dependency.

# Drag and Drop

> The DnD module is included in NoJS Elements. When using the CDN, it is auto-installed — no separate registration is needed. For ESM usage, call `NoJS.use(NoJSElements)` once.
> The DnD module is included in NoJS Elements. When using the CDN, it is auto-installed — no separate registration is needed.

## `drag` — Make an Element Draggable

Expand Down Expand Up @@ -365,7 +342,7 @@ No.JS automatically adds:

# Validation

> The Validation module is included in NoJS Elements. When using the CDN, it is auto-installed — no separate registration is needed. For ESM usage, call `NoJS.use(NoJSElements)` once.
> The Validation module is included in NoJS Elements. When using the CDN, it is auto-installed — no separate registration is needed.

## `<form validate>` — Form-Level Validation

Expand Down
3 changes: 1 addition & 2 deletions docs/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NoJS Elements provides drag-and-drop, form validation, tooltips, popovers, modal

## Installation

- [Getting Started](https://elements.no-js.dev/): NPM install, CDN script tag, ESM/IIFE usage, peer dependency on No.JS
- [Getting Started](https://elements.no-js.dev/): CDN script tag usage, peer dependency on No.JS

## Drag & Drop

Expand Down Expand Up @@ -56,5 +56,4 @@ NoJS Elements provides drag-and-drop, form validation, tooltips, popovers, modal
- [No.JS Full Docs](https://no-js.dev/llms-full.txt): Complete No.JS framework documentation
- [NoJS LSP](https://lsp.no-js.dev/): VS Code extension with completion, hover, and diagnostics for No.JS directives
- [NoJS Skill](https://github.com/no-js-dev/nojs-skill): AI agent reference for No.JS — full directive, filter, and validation docs
- [npm](https://www.npmjs.com/package/@no-js-dev/nojs-elements): Install via npm
- [GitHub](https://github.com/no-js-dev/nojs-elements): Source code, issues, and contributions
49 changes: 1 addition & 48 deletions docs/md/migration-from-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Both packages must be at version 1.13.0 or later. Earlier versions of NoJS Eleme

```html
<script src="https://cdn.no-js.dev/"></script>
<script src="https://cdn.no-js.dev/elements/"></script>
<script src="https://cdn-elements.no-js.dev/"></script>

<form validate>
<input name="email" validate="required|email" />
Expand All @@ -76,53 +76,6 @@ The CDN build of NoJS Elements auto-installs when it detects `window.NoJS`. No J

---

## npm / ESM Users

### Before (Core only)

```javascript
import NoJS from '@no-js-dev/nojs';

NoJS.config({ /* ... */ });
NoJS.init();
```

### After (Core + Elements)

```bash
npm install @no-js-dev/nojs-elements
```

```javascript
import NoJS from '@no-js-dev/nojs';
import NoJSElements from '@no-js-dev/nojs-elements';

NoJS.config({ /* ... */ });
NoJS.use(NoJSElements);
NoJS.init();
```

**Order matters:** `NoJS.use(NoJSElements)` must be called before `NoJS.init()`.

---

## CJS / require() Users

```bash
npm install @no-js-dev/nojs-elements
```

```javascript
const NoJS = require('@no-js-dev/nojs');
const NoJSElements = require('@no-js-dev/nojs-elements');

NoJS.config({ /* ... */ });
NoJS.use(NoJSElements);
NoJS.init();
```

---

## HTML Templates — No Changes Required

Your HTML templates are 100% backward compatible. Every directive attribute, implicit variable, CSS class, and event works exactly as before:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@no-js-dev/nojs-elements",
"version": "1.15.3",
"version": "1.15.4",
"description": "Element plugins for No.JS — drag-and-drop, validation, and more",
"main": "dist/cjs/nojs-elements.js",
"module": "dist/esm/nojs-elements.js",
Expand Down