@owlmeans/router 0.1.15 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,10 +23,9 @@ bun add @owlmeans/router
23
23
  <!-- owlmeans:agent-guidance:start -->
24
24
  ## Agent guidance
25
25
 
26
- This package ships embedded Claude Code skills and GitHub Copilot instructions under
27
- `agent-meta/`. After installing your `@owlmeans/*` packages, run the OwlMeans
28
- agent-skills installer to place them into your project's native locations
29
- (`.claude/skills/` and `.github/instructions/`):
26
+ This package ships embedded agent skills under `agent-meta/`. After installing your
27
+ `@owlmeans/*` packages, run the OwlMeans agent-skills installer to place them into
28
+ your project's skill store (`.agents/skills/`):
30
29
 
31
30
  ```sh
32
31
  npx @owlmeans/agent-skills
@@ -1,8 +1,8 @@
1
1
  {
2
- "schemaVersion": 1,
2
+ "schemaVersion": 2,
3
3
  "package": "@owlmeans/router",
4
- "version": "0.1.15",
5
- "generatedAt": "2026-08-07T17:06:32.907Z",
4
+ "version": "0.1.16",
5
+ "generatedAt": "2026-08-14T10:14:48.855Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -10,14 +10,7 @@
10
10
  "name": "router",
11
11
  "category": "package-specific",
12
12
  "file": "skills/router/SKILL.md",
13
- "canonicalPath": ".claude/skills/router/SKILL.md"
14
- },
15
- {
16
- "kind": "instruction",
17
- "name": "router",
18
- "category": "package-specific",
19
- "file": "instructions/router.instructions.md",
20
- "canonicalPath": ".github/instructions/router.instructions.md"
13
+ "canonicalPath": ".agents/skills/router/SKILL.md"
21
14
  }
22
15
  ]
23
16
  }
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/router
9
9
 
10
10
  **Layer:** Core (L1)
11
- **Install:** `"@owlmeans/router": "^0.1.15"` in `dependencies`
11
+ **Install:** `"@owlmeans/router": "^0.1.16"` in `dependencies`
12
12
 
13
13
  `@owlmeans/router` is the **plugin host** for OwlMeans UI routing. It does not talk to any
14
14
  concrete router; it defines the contract, holds a registry of routing plugins, and selects the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/router",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  }
22
22
  },
23
23
  "dependencies": {
24
- "@owlmeans/context": "^0.1.15"
24
+ "@owlmeans/context": "^0.1.16"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": "*"
@@ -1,48 +0,0 @@
1
- ---
2
- description: "How to use @owlmeans/router — the UI routing plugin host: RouterService registry, cascade selection, neutral route IR, and pure matcher. Use when registering a routing plugin, using the router service, or reusing the matcher."
3
- applyTo: "**/*.ts, **/*.tsx"
4
- ---
5
- <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
6
-
7
- # @owlmeans/router
8
-
9
- **Layer:** Core (L1)
10
- **Install:** `"@owlmeans/router": "^0.1.15"` in `dependencies`
11
-
12
- The plugin **host** for OwlMeans UI routing. Defines the contract, holds a registry of routing
13
- plugins, and selects the active one by cascade. Concrete mechanics are plugins:
14
- `@owlmeans/web-router` (default OwlMeans browser router) and `@owlmeans/web-router-react-router`
15
- (opt-in react-router v7).
16
-
17
- ## Key Exports
18
-
19
- | Export | Description |
20
- |--------|-------------|
21
- | `RouterService` | Facade + registry; `outlet/provider/useParams/useLocation/useNavigate/useSearchParams/compile` delegate to the active plugin. |
22
- | `RouterPlugin`, `RouterEnv`, `RouteObject` | Plugin contract, selection env (`{hasWindow,ssr,request?}`), neutral route IR (`{index?,path?,children?,Component?}`). |
23
- | `makeRouterService`, `ensureRouterService(ctx)` | Build / idempotently get the host. |
24
- | `flattenRoutes`, `rankRouteBranches`, `matchRoutes` | Pure DOM-free matcher (static/`:param`/nested/index). |
25
- | `defaultRouterEnv()`, `ROUTER_SERVICE`, `DEFAULT_ROUTER_PRIORITY`, `ROUTER_PLUGIN` | Env + constants. |
26
-
27
- ## Cascade
28
-
29
- Plugins sorted by `priority` desc; `service.plugin(env?)` returns the first whose `match(env)` is
30
- truthy (undefined ⇒ always). Browser plugin = priority 0, `match: () => true`; a higher-priority
31
- SSR plugin can win when `env.ssr`. Facade methods stay writable (native monkey-patches them).
32
-
33
- ```typescript
34
- import { ROUTER_SERVICE } from '@owlmeans/router'
35
- ctx.service(ROUTER_SERVICE).useParams() // delegates to the active plugin
36
- ```
37
-
38
- ## The host is a LAZY service
39
-
40
- `makeRouterService` builds a **lazy** service (`createLazyService`) — the host has no async setup,
41
- and plugin packages must reach it from an app's `makeContext`, i.e. while the context is still in
42
- the Loading stage. `context.service()` throws for an uninitialized non-lazy service, which would
43
- break `ensureRouterService` (and every `appendXxxRouter` on an existing host) exactly where apps
44
- are told to call them. Keep it lazy when extending the host.
45
-
46
- ## Depends On
47
-
48
- - `@owlmeans/context`; peer `react` (types only — no react-router, no DOM here)