Skip to content

Commit e1cb53c

Browse files
committed
chore: rename minimal-* example dirs, reorganize docs nav
Rename examples/minimal-next-devframe-hub -> examples/next-devframe-hub, examples/minimal-vite-devframe-hub -> examples/vite-devframe-hub, and examples/minimal-json-render -> examples/json-render, updating every package name, identifier, workspace path, and doc link tied to the old names. Restructure the docs top nav: Plugins gets its own dedicated dropdown, Helpers moves under Adapters, and Examples moves under Guide.
1 parent 51c8b29 commit e1cb53c

66 files changed

Lines changed: 235 additions & 262 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**`devframe`** is the framework-neutral container for one devtool integration, portable across viewers. Build a single tool (its RPC, its SPA, its diagnostics, its CLI/build/spa/embedded outputs) without caring how it'll be displayed. A devframe app runs standalone (CLI, static deploy, embedded SPA) just as well as it mounts inside a hub.
66

7-
**`@devframes/hub`** is the framework-neutral hub layer that sits on top of devframe and provides the multi-integration orchestration (docks, terminals, messages, commands). It does not ship UI — implementers (e.g. `@vitejs/devtools-kit`) provide their own UI on top of the hub's RPC + shared-state protocol. It does ship a **headless client runtime** (`createDevframeClientHost()` from `@devframes/hub/client`): booted in the host page, it assembles the shared `DevframeClientContext` (panel, docks, commands, when) and imports each dock entry's client script (`action` / `custom-render` / iframe `clientScript`) into that page — how a plugin like the a11y inspector runs code inside the page being inspected. See `examples/minimal-vite-devframe-hub/` for a working ~120-line Vite host demonstrating the protocol end to end.
7+
**`@devframes/hub`** is the framework-neutral hub layer that sits on top of devframe and provides the multi-integration orchestration (docks, terminals, messages, commands). It does not ship UI — implementers (e.g. `@vitejs/devtools-kit`) provide their own UI on top of the hub's RPC + shared-state protocol. It does ship a **headless client runtime** (`createDevframeClientHost()` from `@devframes/hub/client`): booted in the host page, it assembles the shared `DevframeClientContext` (panel, docks, commands, when) and imports each dock entry's client script (`action` / `custom-render` / iframe `clientScript`) into that page — how a plugin like the a11y inspector runs code inside the page being inspected. See `examples/vite-devframe-hub/` for a working ~120-line Vite host demonstrating the protocol end to end.
88

99
## Stack & Structure
1010

alias.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const alias = {
5555
'@devframes/json-render-ui/components': r('json-render-ui/src/components/index.ts'),
5656
'@devframes/json-render-ui/spa': r('json-render-ui/src/spa.ts'),
5757
'@devframes/json-render-ui': r('json-render-ui/src/index.ts'),
58-
'minimal-json-render/dashboard': fileURLToPath(new URL('./examples/minimal-json-render/src/dashboard.ts', import.meta.url)),
58+
'json-render/dashboard': fileURLToPath(new URL('./examples/json-render/src/dashboard.ts', import.meta.url)),
5959
'@devframes/plugin-code-server/client': p('code-server/src/client/index.ts'),
6060
'@devframes/plugin-code-server/node': p('code-server/src/node/index.ts'),
6161
'@devframes/plugin-code-server/constants': p('code-server/src/constants.ts'),

docs/.vitepress/config.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ function examplesItems(prefix: string) {
7979
{ text: 'Overview', link: `${prefix}/examples/` },
8080
{ text: 'Built with Devframe', link: `${prefix}/examples/built-with` },
8181
{ text: 'files-inspector', link: `${prefix}/examples/files-inspector` },
82-
{ text: 'minimal-json-render', link: `${prefix}/examples/minimal-json-render` },
82+
{ text: 'json-render', link: `${prefix}/examples/json-render` },
8383
{ text: 'streaming-chat', link: `${prefix}/examples/streaming-chat` },
8484
{ text: 'next-runtime-snapshot', link: `${prefix}/examples/next-runtime-snapshot` },
85-
{ text: 'minimal-vite-devframe-hub', link: `${prefix}/examples/minimal-vite-devframe-hub` },
86-
{ text: 'minimal-next-devframe-hub', link: `${prefix}/examples/minimal-next-devframe-hub` },
85+
{ text: 'vite-devframe-hub', link: `${prefix}/examples/vite-devframe-hub` },
86+
{ text: 'next-devframe-hub', link: `${prefix}/examples/next-devframe-hub` },
8787
] satisfies DefaultTheme.NavItemWithLink[]
8888
}
8989

@@ -114,17 +114,21 @@ export function devframeSidebar(prefix = ''): DefaultTheme.SidebarItem[] {
114114

115115
export function devframeNav(prefix = ''): DefaultTheme.NavItem[] {
116116
return [
117-
{ text: 'Guide', items: guideItems(prefix) },
118-
{ text: 'Adapters', items: adaptersItems(prefix) },
119117
{
120-
text: 'Resources',
118+
text: 'Guide',
119+
items: [
120+
...guideItems(prefix),
121+
{ text: 'Examples', items: examplesItems(prefix) },
122+
],
123+
},
124+
{
125+
text: 'Adapters',
121126
items: [
122-
{ text: 'Examples', link: `${prefix}/examples/` },
123-
{ text: 'Built with Devframe', link: `${prefix}/examples/built-with` },
127+
...adaptersItems(prefix),
124128
{ text: 'Helpers', items: helpersItems(prefix) },
125-
{ text: 'Plugins', items: pluginsItems(prefix) },
126129
],
127130
},
131+
{ text: 'Plugins', items: pluginsItems(prefix) },
128132
{ text: 'Errors', link: `${prefix}/errors/` },
129133
{
130134
text: `v${pkg.version}`,

docs/examples/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ End-to-end examples that exercise the full adapter surface, each a runnable app
99
| Example | UI framework | What it shows |
1010
|---------|--------------|---------------|
1111
| [files-inspector](./files-inspector) | Preact | Lists files in the cwd via RPC; exercises the CLI dev / build / spa surfaces. |
12-
| [minimal-json-render](./minimal-json-render) | Vue | A server-authored JSON-render view rendered by `@devframes/json-render-ui`, with live state and an action bridge. |
12+
| [json-render](./json-render) | Vue | A server-authored JSON-render view rendered by `@devframes/json-render-ui`, with live state and an action bridge. |
1313
| [streaming-chat](./streaming-chat) | Preact | Streams synthetic chat tokens server → client, with history kept in shared state. |
1414
| [next-runtime-snapshot](./next-runtime-snapshot) | React (Next.js) | A Next.js App Router SPA over RPC, surfacing the host Node runtime. |
15-
| [minimal-vite-devframe-hub](./minimal-vite-devframe-hub) | Vanilla TypeScript (Vite) | A ~120-line Vite host wiring `@devframes/hub` end to end. |
16-
| [minimal-next-devframe-hub](./minimal-next-devframe-hub) | React (Next.js) | The same hub protocol, hosted from a Next.js route handler. |
15+
| [vite-devframe-hub](./vite-devframe-hub) | Vanilla TypeScript (Vite) | A ~120-line Vite host wiring `@devframes/hub` end to end. |
16+
| [next-devframe-hub](./next-devframe-hub) | React (Next.js) | The same hub protocol, hosted from a Next.js route handler. |
1717

1818
## Run any example
1919

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
outline: deep
33
---
44

5-
# minimal-json-render
5+
# json-render
66

77
A standalone devframe that serves a **JSON-render view**: the server authors an
88
`@json-render/core` spec once, and the prebuilt `@devframes/json-render-ui` SPA
99
renders it — the app ships no client build of its own.
1010

11-
Package: `minimal-json-render` · frontend: **prebuilt `@devframes/json-render-ui/spa`**
11+
Package: `json-render` · frontend: **prebuilt `@devframes/json-render-ui/spa`**
1212

1313
## What it shows
1414

@@ -29,12 +29,12 @@ Package: `minimal-json-render` · frontend: **prebuilt `@devframes/json-render-u
2929
## Run it
3030

3131
```sh
32-
pnpm --filter minimal-json-render dev # CLI dev server (live RPC)
33-
pnpm --filter minimal-json-render cli:build # static deploy → dist/static
32+
pnpm --filter json-render dev # CLI dev server (live RPC)
33+
pnpm --filter json-render cli:build # static deploy → dist/static
3434
```
3535

36-
The dev server serves the SPA at `/__minimal-json-render/`.
36+
The dev server serves the SPA at `/__json-render/`.
3737

3838
## Source
3939

40-
[`examples/minimal-json-render`](https://github.com/devframes/devframe/tree/main/examples/minimal-json-render)
40+
[`examples/json-render`](https://github.com/devframes/devframe/tree/main/examples/json-render)

docs/examples/minimal-next-devframe-hub.md renamed to docs/examples/next-devframe-hub.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
outline: deep
33
---
44

5-
# minimal-next-devframe-hub
5+
# next-devframe-hub
66

7-
The same hub protocol as the [Vite host](./minimal-vite-devframe-hub), hosted from a **Next.js** App Router app. It wires [`@devframes/hub`](/guide/hub) by lazily starting a side-car RPC / WebSocket server from a Node route handler — proof that the hub is host-runtime-agnostic.
7+
The same hub protocol as the [Vite host](./vite-devframe-hub), hosted from a **Next.js** App Router app. It wires [`@devframes/hub`](/guide/hub) by lazily starting a side-car RPC / WebSocket server from a Node route handler — proof that the hub is host-runtime-agnostic.
88

9-
Package: `minimal-next-devframe-hub` · framework: **React (Next.js)**
9+
Package: `next-devframe-hub` · framework: **React (Next.js)**
1010

1111
## What it proves
1212

@@ -22,7 +22,7 @@ Package: `minimal-next-devframe-hub` · framework: **React (Next.js)**
2222

2323
```sh
2424
pnpm install
25-
pnpm --filter minimal-next-devframe-hub dev
25+
pnpm --filter next-devframe-hub dev
2626
```
2727

2828
Open the printed URL to see the docks, commands, messages, and terminals lists, plus a button that dispatches a sample command through `hub:commands:execute`.
@@ -33,4 +33,4 @@ Open the printed URL to see the docks, commands, messages, and terminals lists,
3333

3434
## Source
3535

36-
[`examples/minimal-next-devframe-hub`](https://github.com/devframes/devframe/tree/main/examples/minimal-next-devframe-hub)
36+
[`examples/next-devframe-hub`](https://github.com/devframes/devframe/tree/main/examples/next-devframe-hub)

docs/examples/minimal-vite-devframe-hub.md renamed to docs/examples/vite-devframe-hub.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
outline: deep
33
---
44

5-
# minimal-vite-devframe-hub
5+
# vite-devframe-hub
66

77
A protocol-witness host: roughly 120 lines of Vite plugin code that wire [`@devframes/hub`](/guide/hub) into a Vite dev server. The browser UI is plain **vanilla TypeScript**, so nothing distracts from the hub protocol itself. Every framework's hub host follows the same shape.
88

9-
Package: `minimal-vite-devframe-hub` · framework: **Vanilla TypeScript (Vite)**
9+
Package: `vite-devframe-hub` · framework: **Vanilla TypeScript (Vite)**
1010

1111
## What it proves
1212

@@ -22,11 +22,11 @@ Package: `minimal-vite-devframe-hub` · framework: **Vanilla TypeScript (Vite)**
2222

2323
```sh
2424
pnpm install
25-
pnpm --filter minimal-vite-devframe-hub dev
25+
pnpm --filter vite-devframe-hub dev
2626
```
2727

2828
Open the printed URL to see the docks, commands, messages, and terminals lists the hub exposes, plus a button that dispatches a sample command through `hub:commands:execute`.
2929

3030
## Source
3131

32-
[`examples/minimal-vite-devframe-hub`](https://github.com/devframes/devframe/tree/main/examples/minimal-vite-devframe-hub)
32+
[`examples/vite-devframe-hub`](https://github.com/devframes/devframe/tree/main/examples/vite-devframe-hub)

docs/guide/client-context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,4 @@ state.domElements.iframe = iframeEl
186186
state.events.emit('dom:iframe:mounted', iframeEl)
187187
```
188188

189-
That announcement is what the adapter attaches to. Both minimal hubs wire this end to end — see the "Tabbed Tool" in [`examples/minimal-vite-devframe-hub`](https://github.com/devframes/devframe/tree/main/examples/minimal-vite-devframe-hub) and [`examples/minimal-next-devframe-hub`](https://github.com/devframes/devframe/tree/main/examples/minimal-next-devframe-hub), including the SPA's `postMessage` shim.
189+
That announcement is what the adapter attaches to. Both minimal hubs wire this end to end — see the "Tabbed Tool" in [`examples/vite-devframe-hub`](https://github.com/devframes/devframe/tree/main/examples/vite-devframe-hub) and [`examples/next-devframe-hub`](https://github.com/devframes/devframe/tree/main/examples/next-devframe-hub), including the SPA's `postMessage` shim.

docs/guide/hub.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Each mounted SPA is served at `/__<id>/` and references its assets relatively (`
152152
export default { skipTrailingSlashRedirect: true }
153153
```
154154

155-
[`examples/minimal-next-devframe-hub/`](https://github.com/devframes/devframe/tree/main/examples/minimal-next-devframe-hub) is a working Next.js App Router host that mounts the built-in plugins this way.
155+
[`examples/next-devframe-hub/`](https://github.com/devframes/devframe/tree/main/examples/next-devframe-hub) is a working Next.js App Router host that mounts the built-in plugins this way.
156156

157157
### Duplicate devframes
158158

@@ -260,8 +260,8 @@ The hub also ships a headless browser runtime, `createDevframeClientHost()` from
260260

261261
Two minimal, copyable hubs mount every built-in plugin (git, terminals, code-server, inspect, a11y) behind an icon dock — the same shape [vite-devtools](https://github.com/vitejs/devtools) wears as the full Vite viewer, shrunk to the smallest thing you can build your own viewer from:
262262

263-
- [`examples/minimal-vite-devframe-hub/`](https://github.com/devframes/devframe/tree/main/examples/minimal-vite-devframe-hub) — a ~120-line Vite plugin host with a vanilla DOM UI.
264-
- [`examples/minimal-next-devframe-hub/`](https://github.com/devframes/devframe/tree/main/examples/minimal-next-devframe-hub) — the same protocol hosted from a Next.js App Router app.
263+
- [`examples/vite-devframe-hub/`](https://github.com/devframes/devframe/tree/main/examples/vite-devframe-hub) — a ~120-line Vite plugin host with a vanilla DOM UI.
264+
- [`examples/next-devframe-hub/`](https://github.com/devframes/devframe/tree/main/examples/next-devframe-hub) — the same protocol hosted from a Next.js App Router app.
265265

266266
Both also mount a "Tabbed Tool" that demonstrates [shared-iframe soft navigation](./client-context#shared-iframe-soft-navigation) — one SPA whose tabs surface as separate docks sharing a single iframe.
267267

docs/guide/json-render.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ the browser and render it with no shared state at all (see [client-only
211211
docks](./client-context#client-only-docks)). The client host disposes the
212212
renderer when the dock deactivates.
213213

214-
Both hub example shells dogfood this end to end: the [Vite hub](/examples/minimal-vite-devframe-hub)
215-
registers `@devframes/json-render-ui` (Vue), and the [Next hub](/examples/minimal-next-devframe-hub)
214+
Both hub example shells dogfood this end to end: the [Vite hub](/examples/vite-devframe-hub)
215+
registers `@devframes/json-render-ui` (Vue), and the [Next hub](/examples/next-devframe-hub)
216216
registers a small in-example React registry — the same dock, two frontends.
217217

218218
## Swapping the frontend
@@ -228,5 +228,5 @@ placeholder — showing the component type and a gist of its prop keys (`{ label
228228
onPress }`) — and logs a `console.warn`, while the rest of the view renders
229229
normally.
230230

231-
See the [`minimal-json-render` example](/examples/minimal-json-render) for a
231+
See the [`json-render` example](/examples/json-render) for a
232232
runnable end-to-end app.

0 commit comments

Comments
 (0)