@owlmeans/web-router 0.1.18-rc.4 → 0.1.18-rc.41
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 +2 -2
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/web-router/SKILL.md +9 -8
- package/build/browser/chain.d.ts +4 -4
- package/build/browser/chain.js +4 -4
- package/package.json +4 -4
- package/src/browser/chain.tsx +4 -4
- package/tests/harness/mount.tsx +1 -1
- package/build/.gitkeep +0 -0
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ third-party router — react-router is a separate opt-in plugin,
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
bun add @owlmeans/web-router
|
|
17
|
+
bun add @owlmeans/web-router@^0.1.18-rc.41
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
@@ -50,7 +50,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
50
50
|
your project's skill store (`.agents/skills/`):
|
|
51
51
|
|
|
52
52
|
```sh
|
|
53
|
-
npx @owlmeans/agent-skills
|
|
53
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.40
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/web-router",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-
|
|
4
|
+
"version": "0.1.18-rc.41",
|
|
5
|
+
"generatedAt": "2026-09-25T21:19:38.001Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,19 +8,20 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/web-router
|
|
9
9
|
|
|
10
10
|
**Layer:** Web (React), build level L2
|
|
11
|
-
**Install:** `"@owlmeans/web-router": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/web-router": "^0.1.18-rc.41"` in `dependencies`
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
This package **is the default OwlMeans in-browser router** — a minimal, react-router-free
|
|
14
|
+
implementation of standard URL routing over the browser History API. It registers itself as a
|
|
15
|
+
`RouterPlugin` on the `@owlmeans/router` host. (react-router is the separate opt-in
|
|
16
|
+
`@owlmeans/web-router-react-router` package.)
|
|
17
17
|
|
|
18
18
|
## Key Exports
|
|
19
19
|
|
|
20
20
|
| Export | Description |
|
|
21
21
|
|--------|-------------|
|
|
22
22
|
| `appendWebRouter(ctx)` | Register the OwlMeans browser plugin on a context's router host (idempotent via `ensureRouterService`). Called transparently by `@owlmeans/web-client`. |
|
|
23
|
-
| `makeBrowserRouterPlugin()` | The `RouterPlugin` itself (alias `
|
|
23
|
+
| `makeBrowserRouterPlugin()` | The `RouterPlugin` itself (alias `BROWSER_ROUTER`, priority 0). |
|
|
24
|
+
| `BROWSER_ROUTER` | The plugin's alias string, `'owlmeans-browser-router'` — name the constant rather than the literal when selecting or overriding the plugin. |
|
|
24
25
|
| `makeWebRouterService()` | Back-compat: a host pre-loaded with the browser plugin. |
|
|
25
26
|
| `BrowserRouterProvider`, `Outlet` | React provider/outlet components. |
|
|
26
27
|
| `RouteChain` | Renders the matched chain from a given depth, skipping `Component`-less matches (used by the provider and `Outlet`). |
|
|
@@ -35,8 +36,8 @@ separate opt-in `@owlmeans/web-router-react-router` package.)
|
|
|
35
36
|
chain via `RouteChain`; `<Outlet/>` renders the next-deeper match (depth tracked via context).
|
|
36
37
|
Composes unchanged with the `@owlmeans/client` route renderer (parent components emit `<Outlet/>`).
|
|
37
38
|
- **Component-less matches are pass-through** — exactly like react-router's implicit `<Outlet/>` for
|
|
38
|
-
element-less routes. `@owlmeans/client` emits `RouteObject`s with no `Component` for
|
|
39
|
-
have no handler (grouping
|
|
39
|
+
element-less routes. `@owlmeans/client` emits `RouteObject`s with no `Component` for entrypoints
|
|
40
|
+
that have no handler (grouping entrypoints such as `client-authentication` →
|
|
40
41
|
`client-authentication:authentication`), so rendering only the exact node at a depth would blank
|
|
41
42
|
the whole subtree. `RouteChain` walks down to the first match that has a `Component`, and the
|
|
42
43
|
`OutletContext` depth it publishes is that match's depth, so nested outlets stay aligned.
|
package/build/browser/chain.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ import type { FC } from 'react';
|
|
|
4
4
|
*
|
|
5
5
|
* A matched route that carries no `Component` is a **pass-through**: it renders
|
|
6
6
|
* the next-deeper match, exactly like react-router's implicit `<Outlet/>` for
|
|
7
|
-
* element-less routes. OwlMeans
|
|
8
|
-
* (e.g. `client-authentication` → `client-authentication:authentication`)
|
|
9
|
-
* no handler, so `@owlmeans/client` emits `RouteObject`s without a `Component`
|
|
7
|
+
* element-less routes. OwlMeans entrypoint trees depend on this — grouping
|
|
8
|
+
* entrypoints (e.g. `client-authentication` → `client-authentication:authentication`)
|
|
9
|
+
* have no handler, so `@owlmeans/client` emits `RouteObject`s without a `Component`
|
|
10
10
|
* for them. Rendering only the exact node at `depth` would leave the whole
|
|
11
|
-
* subtree blank whenever a group sits above the screen
|
|
11
|
+
* subtree blank whenever a group sits above the screen entrypoint.
|
|
12
12
|
*/
|
|
13
13
|
export declare const RouteChain: FC<{
|
|
14
14
|
depth: number;
|
package/build/browser/chain.js
CHANGED
|
@@ -5,11 +5,11 @@ import { RouterStateContext, OutletContext } from './context.js';
|
|
|
5
5
|
*
|
|
6
6
|
* A matched route that carries no `Component` is a **pass-through**: it renders
|
|
7
7
|
* the next-deeper match, exactly like react-router's implicit `<Outlet/>` for
|
|
8
|
-
* element-less routes. OwlMeans
|
|
9
|
-
* (e.g. `client-authentication` → `client-authentication:authentication`)
|
|
10
|
-
* no handler, so `@owlmeans/client` emits `RouteObject`s without a `Component`
|
|
8
|
+
* element-less routes. OwlMeans entrypoint trees depend on this — grouping
|
|
9
|
+
* entrypoints (e.g. `client-authentication` → `client-authentication:authentication`)
|
|
10
|
+
* have no handler, so `@owlmeans/client` emits `RouteObject`s without a `Component`
|
|
11
11
|
* for them. Rendering only the exact node at `depth` would leave the whole
|
|
12
|
-
* subtree blank whenever a group sits above the screen
|
|
12
|
+
* subtree blank whenever a group sits above the screen entrypoint.
|
|
13
13
|
*/
|
|
14
14
|
export const RouteChain = ({ depth }) => {
|
|
15
15
|
const state = useContext(RouterStateContext);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/web-router",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.41",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@owlmeans/dep-config": "workspace:*",
|
|
29
|
-
"@owlmeans/test-ui": "^0.1.18-rc.
|
|
29
|
+
"@owlmeans/test-ui": "^0.1.18-rc.41",
|
|
30
30
|
"@types/node": "^26.1.0",
|
|
31
31
|
"@types/react": "^19.2.17",
|
|
32
32
|
"@vitejs/plugin-react": "^6.0.3",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"vite": "^8.1.2"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
42
|
-
"@owlmeans/router": "^0.1.18-rc.
|
|
41
|
+
"@owlmeans/context": "^0.1.18-rc.32",
|
|
42
|
+
"@owlmeans/router": "^0.1.18-rc.31"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
package/src/browser/chain.tsx
CHANGED
|
@@ -7,11 +7,11 @@ import { RouterStateContext, OutletContext } from './context.js'
|
|
|
7
7
|
*
|
|
8
8
|
* A matched route that carries no `Component` is a **pass-through**: it renders
|
|
9
9
|
* the next-deeper match, exactly like react-router's implicit `<Outlet/>` for
|
|
10
|
-
* element-less routes. OwlMeans
|
|
11
|
-
* (e.g. `client-authentication` → `client-authentication:authentication`)
|
|
12
|
-
* no handler, so `@owlmeans/client` emits `RouteObject`s without a `Component`
|
|
10
|
+
* element-less routes. OwlMeans entrypoint trees depend on this — grouping
|
|
11
|
+
* entrypoints (e.g. `client-authentication` → `client-authentication:authentication`)
|
|
12
|
+
* have no handler, so `@owlmeans/client` emits `RouteObject`s without a `Component`
|
|
13
13
|
* for them. Rendering only the exact node at `depth` would leave the whole
|
|
14
|
-
* subtree blank whenever a group sits above the screen
|
|
14
|
+
* subtree blank whenever a group sits above the screen entrypoint.
|
|
15
15
|
*/
|
|
16
16
|
export const RouteChain: FC<{ depth: number }> = ({ depth }) => {
|
|
17
17
|
const state = useContext(RouterStateContext)
|
package/tests/harness/mount.tsx
CHANGED
|
@@ -49,7 +49,7 @@ const routes: RouteObject[] = [
|
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
51
|
// component-less grouping node at the very top of the chain — this is the shape
|
|
52
|
-
// `@owlmeans/client` emits for
|
|
52
|
+
// `@owlmeans/client` emits for entrypoints without a handler (e.g. `client-authentication`)
|
|
53
53
|
{ path: 'group', children: [{ path: 'leaf', Component: Leaf }] }
|
|
54
54
|
]
|
|
55
55
|
|
package/build/.gitkeep
DELETED
|
File without changes
|