You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: tighten prose and jsdocs; reorder client-script shapes
Move the absolute-path shape to the third bullet and drop the a11y
parenthetical (review). Make the page-script docs, jsdocs, and comments
as concise as possible.
Copy file name to clipboardExpand all lines: docs/content/1.guide/17.client-context.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,11 +78,11 @@ A failed import retries on the next dock update.
78
78
79
79
`importFrom` accepts three shapes:
80
80
81
-
-**An absolute filesystem path** to a built, self-contained ES module — declared on the definition's `dock.clientScript`. The hub install path serves the file's directory under the devframe's mount base (`<base>__page-script/`) and rewrites `importFrom` to that served URL, so a definition names its own client script and mounting by package name works with no host wiring (this is how the [a11y inspector](/plugins/a11y) ships its page script).
82
81
-**A URL served by the host framework** — a self-contained ES module; works on every host framework.
83
82
-**A bare npm specifier** (`'vite-plugin-vue-tracer/client/vite-devtools'`) — resolved through the host framework.
83
+
-**An absolute filesystem path**, declared on the definition's `dock.clientScript`. The hub serves its directory under `<base>__page-script/` and rewrites `importFrom` to that URL, so mounting by package name needs no host wiring.
84
84
85
-
A definition declares its own by path on `dock: { clientScript: { importFrom } }`. Per-mount, attach a URL via `ctx.install(myDevframe, { dock: { clientScript: { importFrom } } })`; under Vite `/@fs/<absolute path>` serves it, and other host frameworks mount the directory statically.
85
+
Per-mount, attach a URL via `ctx.install(myDevframe, { dock: { clientScript: { importFrom } } })`; under Vite `/@fs/<absolute path>` serves it, and other host frameworks mount the directory statically.
Copy file name to clipboardExpand all lines: docs/content/5.plugins/4.a11y.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,15 +31,15 @@ The page script and the panel talk over the [in-page channel](/guide/in-page-cha
31
31
32
32
## In a hub
33
33
34
-
The definition declares the page script as its dock [client script](/guide/client-context), so mounting by package name works everywhere with no extra wiring:
34
+
The definition declares the page script as its dock [client script](/guide/client-context), so mounting by package name just works:
The hub serves the page-script bundle same-origin under the a11y mount base and rewrites the dock's `clientScript` to that URL; a client runtime (`createDevframeClientRuntime()`) then imports it into the host page. Each scan also mirrors into the hub's messages feed — a summary plus one per rule.
40
+
The hub serves the bundle same-origin and a client runtime imports it into the host page. Each scan also mirrors into the hub's messages feed — a summary plus one per rule.
41
41
42
-
A host that mounts the module itself still can — for example, a Vite host serving it via `/@fs/` — by attaching `a11yPageScriptBundlePath` as the dock's `clientScript`:
42
+
A host can also mount the module itself — e.g. a Vite host via `/@fs/`:
Copy file name to clipboardExpand all lines: examples/hub-next/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Open the printed URL. The dock rail on the left lists every mounted tool with it
20
20
21
21
Selecting a tool loads its SPA in the stage. The bottom drawer mirrors the hub's **Commands**, **Messages**, and **Terminals** subsystems, plus a button that dispatches a command through `hub:commands:execute`, and a **Transport** section showing which RPC transport the connection runs on (`websocket` or `sse`) with a segmented Auto / WS / SSE toggle - the choice rides a `?transport=` URL param and reconnects the whole client runtime on the pinned transport.
22
22
23
-
The A11y Inspector shows a live axe-core report of this hub's own page: the devframe declares its own page-script module as the a11y dock's `clientScript`, so the hub serves it same-origin inside the hub namespace and rewrites the entry to that URL with no host wiring; the hub client runtime - `createDevframeClientRuntime()` booted in `app/page.tsx` - imports it into the page, so the docked panel and the page script share the origin and tab their in-page channel handshakes across.
23
+
The A11y Inspector shows a live axe-core report of this hub's own page: the devframe declares its own page-script module as the a11y dock's `clientScript`, so the hub serves it same-origin with no host wiring; the hub client runtime - `createDevframeClientRuntime()` booted in `app/page.tsx` - imports it into the page, so the docked panel and the page script share the origin and tab their in-page channel handshakes across.
24
24
25
25
The **RPC & State Inspector** carries an **Instances** tab that lists every devframe dev server running on your machine. The hub registers itself in the shared registry (`~/.devframe/instances/`) on startup via `registerDevframeInstance()`, so it shows up as "this instance"; start another example (e.g. `pnpm --filter hub-vite dev`, or any `node bin.mjs` CLI example) in a second terminal and it appears there too, each linking to its own SPA.
Copy file name to clipboardExpand all lines: plugins/a11y/README.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,14 +57,12 @@ page script itself free of any RPC dependency.
57
57
devframe deliberately provides no access to the user app's DOM, so the
58
58
page script is the author-provided bridge into the user app's page. In a hub, the
59
59
page script is the a11y dock's **client script**, and the definition declares it by
60
-
path (`dock.clientScript.importFrom = a11yPageScriptBundlePath`): the hub install
61
-
path serves the bundle same-origin under the a11y mount base and rewrites the entry
62
-
to that URL, so `devframes: ['@devframes/plugin-a11y']` works everywhere with no host
63
-
wiring. The hub's client runtime (`createDevframeClientRuntime` from
64
-
`@devframes/hub/client`) then imports it into the host page and calls its default
65
-
export with the client-script context. A host that prefers to serve the module
66
-
itself (e.g. via `/@fs/…` under Vite) can still attach `a11yPageScriptBundlePath` as
67
-
a per-mount `clientScript`. Booted that way, the page script also
60
+
path, so the hub serves it same-origin and `devframes: ['@devframes/plugin-a11y']`
61
+
works with no host wiring. The hub's client runtime (`createDevframeClientRuntime`
62
+
from `@devframes/hub/client`) then imports it into the host page and calls its default
63
+
export with the client-script context. A host can also serve the module itself (e.g.
64
+
via `/@fs/…` under Vite) by attaching `a11yPageScriptBundlePath` as a per-mount
65
+
`clientScript`. Booted that way, the page script also
68
66
mirrors the active route's scan into the hub's **messages feed** — a summary entry
69
67
driven through the loading → idle lifecycle plus one entry per violated rule,
70
68
carrying the impact-mapped level, WCAG tags as labels, and the first offending
@@ -121,7 +119,7 @@ pnpm -C plugins/a11y dev # from source: same, at /__devframes_plugin_a11
121
119
122
120
| Path | Export | Purpose |
123
121
|------|--------|---------|
124
-
|`src/index.ts`|`.`|`createA11yDevframe()` (also the default export), declaring the page script as its dock's client script by path; `a11yPageScriptBundlePath` — that page-script module, for hosts that serve it themselves |
122
+
|`src/index.ts`|`.`|`createA11yDevframe()` (also the default export), declaring the page script as its dock's client script; `a11yPageScriptBundlePath` — that module, for hosts that serve it themselves |
125
123
|`src/node/index.ts`|`/node`|`setupA11y(ctx, options?)` — registers the RPC functions with the runtime config |
126
124
|`src/cli.ts`|`/cli`|`createA11yCli()` — backs the `devframes_plugin_a11y` bin |
0 commit comments