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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:
attributes:
label: Package version
description: Exact npm version (or commit SHA if from git).
placeholder: "@auraui/router@0.1.0"
placeholder: "@auraui/router@0.2.0"
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body:
id: version
attributes:
label: Package version
placeholder: "@auraui/router@0.1.0"
placeholder: "@auraui/router@0.2.0"
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '22'
node-version: '24'
cache: npm

- run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0"
".": "0.2.0"
}
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,29 @@ All notable changes to `@auraui/router` are documented here.

Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

Package version in `package.json` is **`0.1.0`**, published as [`@auraui/router`](https://www.npmjs.com/package/@auraui/router).
Package version in `package.json` is **`0.2.0`**, published as [`@auraui/router`](https://www.npmjs.com/package/@auraui/router).

## Unreleased

## [0.2.0](https://github.com/aura-ui/router/compare/v0.1.0...v0.2.0) - 21.08.2026

### ⚠ BREAKING CHANGES

- **Hook continuation** — `{ type: 'continue' }` is no longer recognized. Return `void`, `undefined`, or `true` to proceed. See [#20](https://github.com/aura-ui/router/pull/20).

### Added

- Explicit `{ type: 'cancel', reason? }` hook results propagate their optional machine-readable reason to the `navigation-cancel` event.
- **Typed load hooks** — export `RouteLoadFn` for typed, data-producing `load` hooks. Docs: [Lifecycle and route data](./docs/guide/05-lifecycle-and-data.md). See [#20](https://github.com/aura-ui/router/pull/20).
- **Cancel reasons** — `{ type: 'cancel', reason? }` propagates the optional machine-readable reason to the `navigation-cancel` event.
- **View search** — resolve query on `view`: `?*` (raw match search) or allowlist/remap (`?id=:id&tag=:tag`). Docs: [Views](./docs/guide/03-views-and-layouts.md#views). See [#28](https://github.com/aura-ui/router/pull/28).
- **Document meta** — sync document title, description, canonical, and OG/Twitter on navigation (from leaf HTML `url` views, with route attrs `meta-title` / `meta-title-template` / `meta-description` / `meta-canonical` and optional `AuraRouter.configure({ documentMeta })` slots). Docs: [Document meta](./docs/guide/04-document-meta.md). See [#29](https://github.com/aura-ui/router/pull/29).

### Documentation

- Split the guide into focused chapters with prev/next navigation; `docs/guide.md` is the index. See [#20](https://github.com/aura-ui/router/pull/20).
- Add [10-minute tutorial](./docs/tutorial.md). See [#23](https://github.com/aura-ui/router/pull/23).
- Lead README with HTML-first client navigation; add live demo, StackBlitz playground, and dev.to article links.
- Refocus roadmap; clarify recipes (auth, nested, prefetch-cache, not-found, first-paint).

## [0.1.0](https://github.com/aura-ui/router/compare/v0.0.1...v0.1.0) - 10.08.2026

Expand Down
4 changes: 2 additions & 2 deletions LIMITATIONS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Known limitations

Honest gaps for the current **`0.1.0`** tree — public surface that can surprise authors. Shipped contract: [docs/guide.md](./docs/guide.md) · [SECURITY.md](./SECURITY.md). Planned work: [ROADMAP.md](./ROADMAP.md). History: [CHANGELOG.md](./CHANGELOG.md).
Honest gaps for the current **`0.2.0`** tree — public surface that can surprise authors. Shipped contract: [docs/guide.md](./docs/guide.md) · [SECURITY.md](./SECURITY.md). Planned work: [ROADMAP.md](./ROADMAP.md). History: [CHANGELOG.md](./CHANGELOG.md).

## Status

- **Published on npm** — [`@auraui/router@0.1.0`](https://www.npmjs.com/package/@auraui/router). Still 0.x: pin exact versions; do not treat as a frozen production contract until `1.0.0`.
- **Published on npm** — [`@auraui/router@0.2.0`](https://www.npmjs.com/package/@auraui/router). Still 0.x: pin exact versions; do not treat as a frozen production contract until `1.0.0`.
- **0.x semver** — expect breaking changes until `1.0.0`.
- **Docs may lag code** — trust shipped attrs on `<aura-route>` / [README](./README.md) / [guide](./docs/guide.md) over older design notes.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ It runs in the browser; it is not a Node SSR runtime. Your server or static host

## Project

Current release: **0.1.0**
Current release: **0.2.0**

**Documentation:** [Guide](./docs/guide.md) · [Recipes](./docs/recipes/) · [Playground](./playground/) · [Known limitations](./LIMITATIONS.md)

Expand Down
19 changes: 5 additions & 14 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Declarative routing for Web Components — what is shipped, what is being built, and why it matters.**

> Current release: `0.1.0` · Updated: 2026-08-18
> Current release: `0.2.0` · Updated: 2026-08-21
>
> [Tutorial](./docs/tutorial.md) · [README](./README.md) · [Guide](./docs/guide.md) · [Recipes](./docs/recipes/README.md) · [Limitations](./LIMITATIONS.md) · [Security](./SECURITY.md) · [Changelog](./CHANGELOG.md)

Expand All @@ -25,7 +25,7 @@

## Current focus

These are the three outcomes that matter most right now.
These are the outcomes that matter most right now.

### 🎯 8.1 — One clear MPA → SPA migration path

Expand All @@ -35,14 +35,6 @@ Turn the existing guide, recipe, draft article, playground, and [`router-preview

**Finish line:** one guide covers server HTML, router injection, flat and nested first paint, link upgrades, deployment, no-JS behavior, and common failure modes.

### 🎯 7.7 — A demo you can open, not just clone

Deploy [`aura-ui/router-preview`](https://github.com/aura-ui/router-preview) and link it from the README.

**Why it matters:** developers should be able to verify direct URLs, SPA navigation, nested layouts, and no-JS fallback before installing anything.

**Finish line:** stable public URL, working direct routes, verified fallback, and a prominent README link.

### 🎯 7.10 — Browser tests on every change

Run the existing Playwright suite automatically in CI.
Expand All @@ -62,7 +54,7 @@ Run the existing Playwright suite automatically in CI.
| **1** | Explicit, typed, and testable navigation stages | ✅ Shipped |
| **2** | Predictable route-data loading, caching, and revalidation | 🟡 Building |
| **3** | Update changed route DOM without losing component state | 🟡 Building |
| **4** | Navigation built on modern browser APIs with safe fallbacks | ○ Planned |
| **4** | Navigation built on modern browser APIs with safe fallbacks | 🟡 Building |
| **5** | Configure routes in HTML with typed JavaScript APIs | 🟡 Building |
| **6** | Navigation timing and cache diagnostics | 🟡 Building |
| **7** | Runnable examples for common routing patterns | 🟡 Building |
Expand Down Expand Up @@ -128,7 +120,6 @@ CSS/WAAPI transitions already work through route attributes in the demo.
| 5.3a | Nested routes, layouts, outlets, and path-only parents | ✅ | Available in the engine, guide, demo, playground, and [nested recipe](./docs/recipes/nested.md) |
| 5.3b | **Colocated route folders** — optional route/template convention | ○ | Define build-time file-system and automatic template wiring, then document it in a runnable example |
| 5.4 | **Optional `/min` entry** — small core with opt-in capabilities | ○ | Validate the size/value target and plugin boundaries; the default `@auraui/router` package stays full |
| 5.5 | **Basename** — mount under `/app`, GitHub Pages, or a multi-SPA host | ○ | Add router attr/config and consistent strip/join behavior for matching, links, redirects, navigation, and history |
| 5.6a | **Typed params** — `:userId(int)`, `:slug(slug)` | ○ | Keep types inline in `path`—not a separate `params` attr—define builtins, reject mismatches, and test conflicts |
| 5.6b | **Optional params** — `:section?`, `:page(int)?` | 🟡 | Define route priority, add conflict tests, and document public support |
| 5.7 | **Hook cause** — distinguish `enter`, `prefetch`, and `stay` | ○ | Add typed context values so speculative work can avoid analytics or committed DOM side effects |
Expand Down Expand Up @@ -159,9 +150,9 @@ Local microbenchmarks, smoke checks, bundle-size CI, `EventBus`, and `Navigation
| 7.4 | Async auth guard, login redirect, and protected layout shell | ✅ | Runnable playground flow and [auth recipe](./docs/recipes/auth.md) |
| 7.5 | Link intent, cache modes, and invalidation | ✅ | Playground and [prefetch/cache recipe](./docs/recipes/prefetch-cache.md); navigation SWR remains in 2.1 |
| 7.6 | Catch-all routes and not-found fallback handling | ✅ | Demo, playground, and [not-found recipe](./docs/recipes/not-found.md) |
| 7.7 | **Hosted demo** — one-click public preview | 🎯 | Deploy `router-preview`, verify production routes and no-JS fallback, then link it from README |
| 7.7 | **Hosted demo** — one-click public preview | | [Live demo](https://aura-ui.github.io/router-preview/) · [Source](https://github.com/aura-ui/router-preview) · linked from README |
| 7.8 | Playwright E2E for the static MPA example | ✅ | Direct HTML, SPA navigation, history, nested persistence, no-JS fallback, and real 404 |
| 7.9 | Publish `@auraui/router@0.1.0` | ✅ | [npm package](https://www.npmjs.com/package/@auraui/router) · [GitHub release](https://github.com/aura-ui/router/releases/tag/v0.1.0) |
| 7.9 | Publish `@auraui/router@0.2.0` | ✅ | [npm package](https://www.npmjs.com/package/@auraui/router) · [GitHub release](https://github.com/aura-ui/router/releases/tag/v0.2.0) |
| 7.10 | **E2E in CI** — browser coverage on every pull request | 🎯 | Run the existing Playwright suite as an automated required check with failure artifacts |
| 7.11 | **Document meta guide** — title, head tags, and route attrs on navigation | ✅ | [Guide ch. 4](./docs/guide/04-document-meta.md) |

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Report via a [private GitHub security advisory](https://github.com/aura-ui/route

Please include:

1. Package / commit (e.g. `@auraui/router@0.1.0` or a commit SHA)
1. Package / commit (e.g. `@auraui/router@0.2.0` or a commit SHA)
2. Impact (what an attacker can do)
3. Minimal reproduction (HTML + JS)
4. Whether the attack needs attacker-controlled route markup or other already-trusted app config
Expand Down
2 changes: 1 addition & 1 deletion docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Aura Router upgrades ordinary HTML pages with client-side navigation. This guide is the canonical documentation for [`@auraui/router`](https://www.npmjs.com/package/@auraui/router).

> **Current release: 0.1.0.** Pin the package version and check the [changelog](../CHANGELOG.md) when upgrading.
> **Current release: 0.2.0.** Pin the package version and check the [changelog](../CHANGELOG.md) when upgrading.

New to Aura Router? Complete [Static site → SPA in 10 minutes](./tutorial.md) first, then use these chapters for concepts and API details.

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/01-fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install Aura Router, understand its three elements, and create the first routes.
Pin the current `0.x` release, import the package, then install the custom elements once:

```bash
npm install --save-exact @auraui/router@0.1.0
npm install --save-exact @auraui/router@0.2.0
```

```ts
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Each URL must return a complete HTML page. Aura Router enhances those pages in t
If the site does not have a `package.json`, run `npm init -y`. Then install Aura Router and Vite:

```bash
npm install --save-exact @auraui/router@0.1.0
npm install --save-exact @auraui/router@0.2.0
npm install --save-dev vite
```

Expand Down Expand Up @@ -127,7 +127,7 @@ If your HTML site is already served over HTTP, skip steps 1 and 4. Follow steps

```html
<script type="module">
import { AuraRouter } from 'https://esm.sh/@auraui/router@0.1.0';
import { AuraRouter } from 'https://esm.sh/@auraui/router@0.2.0';
AuraRouter.install();
</script>
```
Expand Down
Loading
Loading