Skip to content

Commit 6acd97f

Browse files
committed
chore(examples): log dock panel state updates
1 parent bb71e9c commit 6acd97f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

examples/hub-vite/vite.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import type { DevframeHubContext } from '@devframes/hub/node'
2+
import { styleText } from 'node:util'
23
import { defineHubRpcFunction } from '@devframes/hub'
4+
import { HUB_EVENTS } from '@devframes/hub/constants'
35
import { jsonRenderUiRenderer } from '@devframes/json-render-ui/hub'
46
import { toJsonRenderDockEntry } from '@devframes/json-render/hub'
57
import createA11yDevframe, { a11yPageScriptBundlePath } from '@devframes/plugin-a11y'
@@ -156,6 +158,10 @@ export default defineConfig({
156158
// into this host's own bundle.
157159
renderers: [jsonRenderUiRenderer()],
158160
configure: async (context) => {
161+
context.docks.events.on(HUB_EVENTS.bus.docksPanelState, (event) => {
162+
console.info(styleText('cyan', '🔄 [hub-vite]'), 'Dock panel state updated', event)
163+
})
164+
159165
// Seed a sample command directly on the hub so the UI shows something
160166
// even without any plugged-in devframes.
161167
context.commands.register({

0 commit comments

Comments
 (0)