Skip to content

feat(hub-ui): add @devframes/hub-ui — the reference UI filling the hub's ui slot - #170

Merged
antfu merged 1 commit into
mainfrom
feat/hub-ui
Aug 6, 2026
Merged

feat(hub-ui): add @devframes/hub-ui — the reference UI filling the hub's ui slot#170
antfu merged 1 commit into
mainfrom
feat/hub-ui

Conversation

@antfubot

@antfubot antfubot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Layer 4 of the /__devframes/ standard-middleware stack (on #169). See plans/devframes-standard-middleware.md.

Intent

Batteries for the hub's headless ui slot: createUi() from @devframes/hub-ui returns a DevframeHubUi object pointing at two prebuilt artifacts —

  • embedded.js — the floating DockEmbedded bootstrap, a single self-contained ES module the hub serves at <base>embedded.js; one documented <script type="module"> tag gives any host page the Vite-DevTools-style floating dock. Always visible by design: visibility policy belongs to the entry's author (Vite DevTools keeps its passive/hidden model in its entry against the same slot).
  • standalone viewer — a vanilla shell mounting DockStandalone, served at the hub base; open /__devframes/ in a tab and the devtools are there.

The components are a port of Vite DevTools' web components (dock shell, panels, command palette, messages/toasts, views, json-render catalog — ~120 files) rewired onto @devframes/hub's client runtime: kit imports map to @devframes/hub/client (getDevframeRpcClient, attachFrameNavClient, context key), kit types to their Devframe* hub equivalents (kit-only shapes ported locally), RPCs to the hub built-ins (hub:commands:execute, hub:messages:*), and the client-script loader to native import() — no virtual modules, no mount-path constant, no __mode.json. Shadow-root styles compile ahead of time from the shared devframe design system (@antfu/design sage-green preset, named z-layers), so the dock stays styled inside any host page. Storybook follows the repo's shared vue3-vite setup.

The hub itself stays headless — this package is one implementation of the slot; any viewer supplies its own object to the same option and reuses all the infrastructure.

Components descend from vitejs/devtools (MIT).

Stack

  1. feat!: add devframe/initiate — initDevframe framework-agnostic middleware #167 feat/handler-core
  2. refactor(adapters): rebuild createDevServer, viteDevBridge, and @devframes/next on initDevframe #168 feat/handler-adapters
  3. feat(hub): add @devframes/hub/initiate — initHub, the headless hub behind one handler #169 feat/hub-handler
  4. feat/hub-ui (this PR)
  5. feat/handler-examples-docs — examples + framework guides + Bun smoke test

Created with the help of an agent.

…b's ui slot

A port of Vite DevTools' web components onto @devframes/hub, prebuilt
into two entries the hub serves through DevframeHubUi:

- embedded.js — the floating DockEmbedded bootstrap (single self-
  contained ES module; always visible by design — visibility policy
  belongs to whoever authors an embedded entry)
- a standalone viewer SPA (vanilla shell mounting DockStandalone,
  relative asset paths, served at the hub base)

createUi() returns the slot object pointing at the built artifacts.
The components (dock shell, panels, command palette, messages/toasts,
views, json-render catalog) are Vue custom elements with shadow-root
styles compiled ahead of time from the shared devframe design system
(@antfu/design sage-green preset); imports are rewired from
@vitejs/devtools-kit onto @devframes/hub's client runtime, the
view-mode machinery is removed, and branding/element names/storage
keys move to the devframes namespace. Storybook follows the repo's
shared vue3-vite setup.

Co-developed with Vite DevTools — the components descend from
vitejs/devtools (MIT).
@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit 29f4953
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a745b8dbda6520008f596b0
😎 Deploy Preview https://deploy-preview-170--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu
antfu merged commit 8c18a2f into main Aug 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants