import type { DockPanelStorage } from '@devframes/hub/client' import { getDevframeRpcClient, setDevframeClientContext } from '@devframes/hub/client' import { useLocalStorage } from '@vueuse/core' import { watchEffect } from 'vue' import { isDark } from '../src/client/state/color-mode' import { DEFAULT_DOCK_PANEL_STORE } from '../src/client/state/docks' import { setupLocale } from '../src/client/state/locale' /** * The base `hub-plugin.ts` mounts the playground's hub instance at. Kept as * an explicit constant (rather than inferred from the page's own URL, like * the production `standalone`/`embedded` entries do) because this playground * page is served from Vite's own root (`/`), not colocated with the hub the * way a built `createUi()` viewer is. */ const HUB_BASE = '/__devframes/' /** * `?embedded` mounts the floating `DockEmbedded` bootstrap over the sample * host content in `index.html`, the same surface a host page gets from * `