@devframes/hub 0.8.1 → 0.9.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { N as NavTarget, O as DevframeViewIframe, P as RemoteConnectionInfo, a as DevframeCommandEntry, g as DevframeDockEntry, h as DevframeDockEntriesGrouped, n as DevframeClientCommand, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings, x as DevframeDockUserEntry, y as DevframeDockEntryIcon } from "../settings-Byh48aCd.mjs";
2
- import { DEFAULT_CATEGORIES_ORDER } from "../constants.mjs";
3
- import { w as DevframeMessagesClient, y as DevframeMessageEntryInput } from "../context-Cw5sDVoA.mjs";
4
- import "../index-Bx3T-R7i.mjs";
1
+ import { E as DevframeMessagesClient, x as DevframeMessageEntryInput } from "../context-Dz0j8Eyg.mjs";
2
+ import { D as DevframeViewIframe, M as RemoteConnectionInfo, b as DevframeDockUserEntry, f as ClientScriptEntry, h as DevframeDockEntry, i as DevframeCommandEntry, j as NavTarget, m as DevframeDockEntriesGrouped, o as DevframeCommandKeybinding, t as DevframeClientCommand, v as DevframeDockEntryIcon } from "../commands-CAcTUSlj.mjs";
3
+ import { t as DevframeDocksUserSettings } from "../settings-B1qJ47d5.mjs";
4
+ import "../index-p4BktGvQ.mjs";
5
5
  import { DevframeClientRpcHost, DevframeConnection, DevframeConnectionStatus, DevframeRpcClient, DevframeRpcClientOptions, DevframeRpcContext, RpcClientEvents, RpcClientEvents as RpcClientEvents$1 } from "devframe/client";
6
6
  import { EventEmitter } from "devframe/types";
7
7
  import { SharedState } from "devframe/utils/shared-state";
@@ -11,10 +11,17 @@ export * from "devframe/client";
11
11
  /**
12
12
  * Options handed to a dock renderer when the client host mounts a dock entry.
13
13
  */
14
- interface DockRendererMountOptions {
14
+ interface DockRendererMountOptions<Entry extends DevframeDockEntry = DevframeDockEntry> {
15
15
  /** The dock entry being rendered (carries the entry's serializable payload). */
16
- entry: DevframeDockEntry;
17
- /** The DOM element the renderer should mount into. */
16
+ entry: Entry;
17
+ /**
18
+ * The DOM element the renderer should mount into. It may live inside a
19
+ * **shadow root** (the reference viewer isolates dock content that way), so
20
+ * a renderer must deliver its own styles into `container.getRootNode()`
21
+ * rather than assume a page-level stylesheet. The viewer mirrors a live
22
+ * `dark` class onto this element (the theme contract), and CSS custom
23
+ * properties inherit across the shadow boundary for brand theming.
24
+ */
18
25
  container: HTMLElement;
19
26
  /** The assembled client host context (rpc, docks, commands, …). */
20
27
  context: DevframeClientContext;
@@ -26,33 +33,99 @@ interface DockRendererInstance {
26
33
  }
27
34
  /**
28
35
  * A renderer for a dock `type`. The headless hub is renderer-agnostic — a
29
- * host application registers renderers at boot (e.g. injecting
30
- * `@devframes/json-render-ui` for the `'json-render'` type). The renderer
31
- * owns its framework (Vue, React, …); the hub only routes a dock type to it
32
- * and disposes it on deactivation.
36
+ * host registers renderers at boot (e.g. injecting `@devframes/json-render-ui`
37
+ * for the `'json-render'` type) or serves them as prebuilt modules through the
38
+ * hub's renderer manifest (`initHub({ renderers })`). The renderer owns its
39
+ * framework (Vue, React, …); the hub only routes a dock type to it and
40
+ * disposes it on deactivation.
41
+ *
42
+ * Integration packages narrow `Entry` to export a precisely-typed contract —
43
+ * e.g. `@devframes/json-render/hub` exports
44
+ * `JsonRenderDockRenderer = DockRenderer<DevframeJsonRenderDockEntry>`.
45
+ */
46
+ type DockRenderer<Entry extends DevframeDockEntry = DevframeDockEntry> = (options: DockRendererMountOptions<Entry>) => DockRendererInstance | Promise<DockRendererInstance>;
47
+ /**
48
+ * The outcome of {@link DockRenderersContext.mount}. A missing renderer is an
49
+ * expected, non-exceptional state — a viewer renders its "no renderer for this
50
+ * dock type" fallback from `missing-renderer`, and its error variant (with a
51
+ * retry affordance) from `load-error`.
33
52
  */
34
- type DockRenderer = (options: DockRendererMountOptions) => DockRendererInstance | Promise<DockRendererInstance>;
53
+ type DockRendererMountResult = {
54
+ status: 'mounted';
55
+ dispose: () => void;
56
+ } | {
57
+ status: 'missing-renderer';
58
+ } | {
59
+ status: 'load-error';
60
+ error: unknown;
61
+ };
35
62
  /**
36
63
  * The dock-renderer registry surfaced on the client host context. A viewer
37
64
  * calls {@link DockRenderersContext.mount} to render a dock whose `type` has a
38
- * registered renderer into a container it owns; the host tracks the instance
39
- * and disposes it when the entry deactivates.
65
+ * renderer — registered locally at boot, or served as a prebuilt module by the
66
+ * hub's renderer manifest — into a container it owns; the host tracks the
67
+ * instance and disposes it when the entry deactivates.
40
68
  */
41
69
  interface DockRenderersContext {
42
- /** Register a renderer for a dock `type`. Returns an unregister function. */
43
- register: (type: string, renderer: DockRenderer) => () => void;
44
- /** Look up the renderer registered for a dock `type`, if any. */
70
+ /**
71
+ * Register a renderer for a dock `type`. Returns an unregister function.
72
+ * Accepts a renderer narrowed to any specific entry variant (e.g. a
73
+ * {@link DockRenderer}<DevframeJsonRenderDockEntry> from an integration
74
+ * package) — the type routes only its own entries to it.
75
+ */
76
+ register: (type: string, renderer: DockRenderer<any>) => () => void;
77
+ /** Look up the locally-registered renderer for a dock `type`, if any. */
45
78
  get: (type: string) => DockRenderer | undefined;
46
- /** Whether a renderer is registered for a dock `type`. */
79
+ /**
80
+ * Whether a renderer is available for a dock `type` — registered locally
81
+ * **or** provided by the hub's renderer manifest. A viewer checks this
82
+ * before mounting to render its missing-renderer fallback declaratively.
83
+ */
47
84
  has: (type: string) => boolean;
48
85
  /**
49
- * Mount the entry's registered renderer into `container`. Resolves to a
50
- * disposer; the same instance is also disposed automatically when the entry
51
- * deactivates. Warns and resolves to a no-op disposer when no renderer is
52
- * registered for the entry's type.
86
+ * Mount the entry's renderer into `container` and resolve the
87
+ * {@link DockRendererMountResult}. A local registration wins; otherwise the
88
+ * manifest module for the entry's type is imported (lazily, cached) and
89
+ * registered. The mounted instance is also disposed automatically when the
90
+ * entry deactivates. Resolves `missing-renderer` (with a `console.warn`)
91
+ * when neither source has the type, and `load-error` when the module import
92
+ * or the renderer itself fails — a failed import is not cached, so a retry
93
+ * re-imports.
53
94
  */
54
- mount: (entry: DevframeDockEntry, container: HTMLElement) => Promise<() => void>;
95
+ mount: (entry: DevframeDockEntry, container: HTMLElement) => Promise<DockRendererMountResult>;
55
96
  }
97
+ /**
98
+ * The renderer manifest published by the hub at the
99
+ * `devframe:dock-renderers` shared-state slot — one {@link ClientScriptEntry}
100
+ * per dock `type`, whose `importFrom` is a URL path the hub serves
101
+ * (`<base>__renderers/<type>.mjs`). Mirrors the dock client-script
102
+ * convention: the module's `importName` export (default `'default'`) is a
103
+ * ready {@link DockRenderer}.
104
+ */
105
+ type DockRendererManifest = Record<string, ClientScriptEntry>;
106
+ /** Options for {@link createDockRenderersContext}. */
107
+ interface CreateDockRenderersContextOptions {
108
+ /** The assembled client context handed to renderers at mount. */
109
+ context: () => DevframeClientContext;
110
+ /** Renderers registered locally at boot — these win over manifest modules. */
111
+ local?: Record<string, DockRenderer<any>>;
112
+ /** The current {@link DockRendererManifest} (live getter). */
113
+ manifest?: () => DockRendererManifest;
114
+ /**
115
+ * Called with each successful mount's disposer so the caller can tie
116
+ * disposal to its own lifecycle (entry deactivation, host teardown). An
117
+ * optional returned cleanup runs exactly once when the mount is disposed —
118
+ * whichever side (caller or viewer) triggers it first.
119
+ */
120
+ onMounted?: (dispose: () => void, entry: DevframeDockEntry) => (() => void) | void;
121
+ }
122
+ /**
123
+ * Build the {@link DockRenderersContext} shared by every hub-aware client —
124
+ * `createDevframeClientHost` and viewers that assemble their own context
125
+ * (`@devframes/hub-ui`) both delegate here so local-first resolution, lazy
126
+ * manifest imports, and the typed mount result behave identically everywhere.
127
+ */
128
+ declare function createDockRenderersContext(options: CreateDockRenderersContextOptions): DockRenderersContext;
56
129
  //#endregion
57
130
  //#region src/client/docks.d.ts
58
131
  interface DockPanelStorage {
@@ -413,8 +486,11 @@ interface DevframeClientHostOptions {
413
486
  * application injects the ones it wants (e.g.
414
487
  * `{ 'json-render': createJsonRenderDockRenderer() }` from
415
488
  * `@devframes/json-render-ui`). The hub ships none by default.
489
+ *
490
+ * Local registrations take precedence over the hub's renderer manifest
491
+ * (`initHub({ renderers })`) — explicit local code beats wire config.
416
492
  */
417
- renderers?: Record<string, DockRenderer>;
493
+ renderers?: Record<string, DockRenderer<any>>;
418
494
  /**
419
495
  * Hub-wide override of the top-level dock-bar category ordering — a map of
420
496
  * category id → ordering weight (lower sorts earlier), mirroring the shape
@@ -504,4 +580,4 @@ declare function parseRemoteConnection(input?: string): RemoteConnectionInfo | n
504
580
  */
505
581
  declare function connectRemoteDevframe(options?: ConnectRemoteDevframeOptions): Promise<DevframeRpcClient>;
506
582
  //#endregion
507
- export { CLIENT_CONTEXT_KEY, CommandsContext, ConnectRemoteDevframeOptions, DEFAULT_CATEGORIES_ORDER, DevframeClientContext, DevframeClientHost, DevframeClientHostOptions, type DevframeClientRpcHost, DockClientScriptContext, DockClientType, DockEntryState, DockEntryStateEvents, DockPanelStorage, DockRegistration, DockRenderer, DockRendererInstance, DockRendererMountOptions, DockRenderersContext, DocksConnectionContext, DocksContext, DocksEntriesContext, DocksPanelContext, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, FrameNavClient, FrameNavClientOptions, FrameNavEnvelope, FrameNavFrameMessage, FrameNavHostMessage, FrameNavHostPayload, FrameNavListenTarget, FrameTab, MessagesClientOptions, type RpcClientEvents, WhenClauseContext, attachFrameNavClient, buildRemoteDevframeUrl, connectRemoteDevframe, createDevframeClientHost, createMessagesClient, getDevframeClientContext, parseRemoteConnection, resolveDockIcon, resolveDockUrl, setDevframeClientContext, stripRemoteConnectionFromUrl };
583
+ export { CLIENT_CONTEXT_KEY, CommandsContext, ConnectRemoteDevframeOptions, CreateDockRenderersContextOptions, DevframeClientContext, DevframeClientHost, DevframeClientHostOptions, type DevframeClientRpcHost, DockClientScriptContext, DockClientType, DockEntryState, DockEntryStateEvents, DockPanelStorage, DockRegistration, DockRenderer, DockRendererInstance, DockRendererManifest, DockRendererMountOptions, DockRendererMountResult, DockRenderersContext, DocksConnectionContext, DocksContext, DocksEntriesContext, DocksPanelContext, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, FrameNavClient, FrameNavClientOptions, FrameNavEnvelope, FrameNavFrameMessage, FrameNavHostMessage, FrameNavHostPayload, FrameNavListenTarget, FrameTab, MessagesClientOptions, type RpcClientEvents, WhenClauseContext, attachFrameNavClient, buildRemoteDevframeUrl, connectRemoteDevframe, createDevframeClientHost, createDockRenderersContext, createMessagesClient, getDevframeClientContext, parseRemoteConnection, resolveDockIcon, resolveDockUrl, setDevframeClientContext, stripRemoteConnectionFromUrl };
@@ -1,4 +1,4 @@
1
- import { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS } from "../constants.mjs";
1
+ import { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS, DOCK_RENDERERS_STATE_KEY } from "../constants.mjs";
2
2
  import { n as stripRemoteConnectionFromUrl, t as buildRemoteConnectionUrl } from "../remote-url-KVXtKP47.mjs";
3
3
  import { REMOTE_CONNECTION_KEY } from "devframe/constants";
4
4
  import { connectDevframe, getDevframeRpcClient, resolveWsUrl } from "devframe/client";
@@ -324,6 +324,97 @@ function createMessagesClient(rpc, options = {}) {
324
324
  };
325
325
  }
326
326
  //#endregion
327
+ //#region src/client/renderers.ts
328
+ /**
329
+ * Build the {@link DockRenderersContext} shared by every hub-aware client —
330
+ * `createDevframeClientHost` and viewers that assemble their own context
331
+ * (`@devframes/hub-ui`) both delegate here so local-first resolution, lazy
332
+ * manifest imports, and the typed mount result behave identically everywhere.
333
+ */
334
+ function createDockRenderersContext(options) {
335
+ const rendererMap = /* @__PURE__ */ new Map();
336
+ for (const [type, renderer] of Object.entries(options.local ?? {})) rendererMap.set(type, renderer);
337
+ const manifestImports = /* @__PURE__ */ new Map();
338
+ const manifestEntry = (type) => options.manifest?.()[type];
339
+ async function importManifestRenderer(type, script) {
340
+ const renderer = (await import(
341
+ /* @vite-ignore */
342
+ /* webpackIgnore: true */
343
+ /* turbopackIgnore: true */
344
+ script.importFrom
345
+ ))[script.importName ?? "default"];
346
+ return typeof renderer === "function" ? renderer : void 0;
347
+ }
348
+ async function resolveRenderer(type) {
349
+ const local = rendererMap.get(type);
350
+ if (local) return local;
351
+ const script = manifestEntry(type);
352
+ if (!script) return void 0;
353
+ let pending = manifestImports.get(type);
354
+ if (!pending) {
355
+ pending = importManifestRenderer(type, script);
356
+ manifestImports.set(type, pending);
357
+ pending.catch(() => manifestImports.delete(type));
358
+ }
359
+ const renderer = await pending;
360
+ if (renderer && !rendererMap.has(type)) rendererMap.set(type, renderer);
361
+ return renderer;
362
+ }
363
+ return {
364
+ register(type, renderer) {
365
+ rendererMap.set(type, renderer);
366
+ return () => {
367
+ if (rendererMap.get(type) === renderer) rendererMap.delete(type);
368
+ };
369
+ },
370
+ get: (type) => rendererMap.get(type),
371
+ has: (type) => rendererMap.has(type) || manifestEntry(type) !== void 0,
372
+ async mount(entry, container) {
373
+ let renderer;
374
+ try {
375
+ renderer = await resolveRenderer(entry.type);
376
+ } catch (error) {
377
+ console.error(`[@devframes/hub] failed to load the renderer module for dock type "${entry.type}"`, error);
378
+ return {
379
+ status: "load-error",
380
+ error
381
+ };
382
+ }
383
+ if (!renderer) {
384
+ console.warn(`[@devframes/hub] no renderer registered for dock type "${entry.type}" (entry "${entry.id}")`);
385
+ return { status: "missing-renderer" };
386
+ }
387
+ let instance;
388
+ try {
389
+ instance = await renderer({
390
+ entry,
391
+ container,
392
+ context: options.context()
393
+ });
394
+ } catch (error) {
395
+ console.error(`[@devframes/hub] renderer for dock type "${entry.type}" failed to mount (entry "${entry.id}")`, error);
396
+ return {
397
+ status: "load-error",
398
+ error
399
+ };
400
+ }
401
+ let disposed = false;
402
+ let cleanup;
403
+ const dispose = () => {
404
+ if (disposed) return;
405
+ disposed = true;
406
+ cleanup?.();
407
+ instance.dispose?.();
408
+ };
409
+ cleanup = options.onMounted?.(dispose, entry);
410
+ return {
411
+ status: "mounted",
412
+ dispose
413
+ };
414
+ }
415
+ };
416
+ }
417
+ //#endregion
327
418
  //#region src/client/host.ts
328
419
  const DOCKS_STATE_KEY = "devframe:docks";
329
420
  const COMMANDS_STATE_KEY = "devframe:commands";
@@ -343,10 +434,11 @@ async function createDevframeClientHost(options = {}) {
343
434
  const clientType = options.clientType ?? "standalone";
344
435
  const rpc = options.rpc ?? await connectDevframe(options.connect);
345
436
  let mountedRenderers;
346
- const [docksState, commandsState, settings] = await Promise.all([
437
+ const [docksState, commandsState, settings, renderersManifestState] = await Promise.all([
347
438
  rpc.sharedState.get(DOCKS_STATE_KEY, { initialValue: [] }),
348
439
  rpc.sharedState.get(COMMANDS_STATE_KEY, { initialValue: [] }),
349
- rpc.sharedState.get(USER_SETTINGS_STATE_KEY, { initialValue: DEFAULT_STATE_USER_SETTINGS() })
440
+ rpc.sharedState.get(USER_SETTINGS_STATE_KEY, { initialValue: DEFAULT_STATE_USER_SETTINGS() }),
441
+ rpc.sharedState.get(DOCK_RENDERERS_STATE_KEY, { initialValue: {} })
350
442
  ]);
351
443
  let selectedId = null;
352
444
  const entryToStateMap = /* @__PURE__ */ new Map();
@@ -579,44 +671,21 @@ async function createDevframeClientHost(options = {}) {
579
671
  };
580
672
  }
581
673
  function createRenderersContext() {
582
- const rendererMap = /* @__PURE__ */ new Map();
583
- for (const [type, renderer] of Object.entries(options.renderers ?? {})) rendererMap.set(type, renderer);
584
674
  const mountedDisposers = /* @__PURE__ */ new Set();
585
675
  mountedRenderers = mountedDisposers;
586
- return {
587
- register(type, renderer) {
588
- rendererMap.set(type, renderer);
676
+ return createDockRenderersContext({
677
+ context: () => context,
678
+ ...options.renderers ? { local: options.renderers } : {},
679
+ manifest: () => renderersManifestState.value(),
680
+ onMounted(dispose, entry) {
681
+ mountedDisposers.add(dispose);
682
+ const offDeactivate = entryToStateMap.get(entry.id)?.events.on("entry:deactivated", dispose);
589
683
  return () => {
590
- if (rendererMap.get(type) === renderer) rendererMap.delete(type);
591
- };
592
- },
593
- get: (type) => rendererMap.get(type),
594
- has: (type) => rendererMap.has(type),
595
- async mount(entry, container) {
596
- const renderer = rendererMap.get(entry.type);
597
- if (!renderer) {
598
- console.warn(`[@devframes/hub] no renderer registered for dock type "${entry.type}" (entry "${entry.id}")`);
599
- return () => {};
600
- }
601
- const instance = await renderer({
602
- entry,
603
- container,
604
- context
605
- });
606
- let disposed = false;
607
- let offDeactivate;
608
- const dispose = () => {
609
- if (disposed) return;
610
- disposed = true;
611
684
  mountedDisposers.delete(dispose);
612
685
  offDeactivate?.();
613
- instance.dispose?.();
614
686
  };
615
- mountedDisposers.add(dispose);
616
- offDeactivate = entryToStateMap.get(entry.id)?.events.on("entry:deactivated", dispose);
617
- return dispose;
618
687
  }
619
- };
688
+ });
620
689
  }
621
690
  function clientScriptOf(entry) {
622
691
  return entry.action ?? entry.renderer ?? entry.clientScript;
@@ -795,4 +864,4 @@ async function connectRemoteDevframe(options = {}) {
795
864
  });
796
865
  }
797
866
  //#endregion
798
- export { CLIENT_CONTEXT_KEY, DEFAULT_CATEGORIES_ORDER, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, attachFrameNavClient, buildRemoteDevframeUrl, connectRemoteDevframe, createDevframeClientHost, createMessagesClient, getDevframeClientContext, parseRemoteConnection, resolveDockIcon, resolveDockUrl, setDevframeClientContext, stripRemoteConnectionFromUrl };
867
+ export { CLIENT_CONTEXT_KEY, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, attachFrameNavClient, buildRemoteDevframeUrl, connectRemoteDevframe, createDevframeClientHost, createDockRenderersContext, createMessagesClient, getDevframeClientContext, parseRemoteConnection, resolveDockIcon, resolveDockUrl, setDevframeClientContext, stripRemoteConnectionFromUrl };
@@ -1,37 +1,5 @@
1
- import { StandardSchemaV1 } from "@standard-schema/spec";
2
1
  import { ConnectionMeta, EventEmitter } from "devframe/types";
3
- //#region src/types/json-render.d.ts
4
- /** @deprecated Use `DevframeJsonRenderSpec`'s element shape from `@devframes/json-render` instead. Removed in 0.8. */
5
- interface JsonRenderElement {
6
- type: string;
7
- props?: Record<string, unknown>;
8
- children?: string[];
9
- /** json-render event bindings (e.g. `{ press: { action: "my:action" } }`) */
10
- on?: Record<string, unknown>;
11
- /** json-render visibility condition */
12
- visible?: unknown;
13
- /** json-render repeat binding */
14
- repeat?: unknown;
15
- /** Allow additional json-render element fields */
16
- [key: string]: unknown;
17
- }
18
- /** @deprecated Use `DevframeJsonRenderSpec` from `@devframes/json-render` instead. Removed in 0.8. */
19
- interface JsonRenderSpec {
20
- root: string;
21
- elements: Record<string, JsonRenderElement>;
22
- /** Initial client-side state model for $state/$bindState expressions */
23
- state?: Record<string, unknown>;
24
- }
25
- /** @deprecated Use `JsonRenderView` from `@devframes/json-render` instead. Removed in 0.8. */
26
- interface JsonRenderer {
27
- /** Replace the entire spec */
28
- updateSpec: (spec: JsonRenderSpec) => void | Promise<void>;
29
- /** Update json-render state values (shallow merge into spec.state) */
30
- updateState: (state: Record<string, unknown>) => void | Promise<void>;
31
- /** Internal: shared state key used by the client to subscribe */
32
- readonly _stateKey: string;
33
- }
34
- //#endregion
2
+ import { StandardSchemaV1 } from "@standard-schema/spec";
35
3
  //#region src/types/docks.d.ts
36
4
  interface DevframeDocksHost {
37
5
  readonly views: Map<string, DevframeDockUserEntry>;
@@ -357,20 +325,6 @@ interface DevframeViewBuiltin extends DevframeDockEntryBase {
357
325
  type: '~builtin';
358
326
  id: string;
359
327
  }
360
- /**
361
- * @deprecated json-render moved out of the hub into the opt-in
362
- * `@devframes/json-render` integration in 0.7, which contributes its own
363
- * `'json-render'` entry (carrying a serializable view ref, not a live
364
- * `JsonRenderer` handle) to {@link DevframeDockEntryRegistry} via declaration
365
- * merging. This type is kept for compatibility but is no longer a member of
366
- * {@link DevframeDockUserEntry} — use `@devframes/json-render/hub` instead.
367
- * Removed in 0.8.
368
- */
369
- interface DevframeViewJsonRender extends DevframeDockEntryBase {
370
- type: 'json-render';
371
- /** JsonRenderer handle created by the deprecated ctx.createJsonRenderer() */
372
- ui: JsonRenderer;
373
- }
374
328
  /**
375
329
  * A dock group: a single dock-bar button that collapses every entry whose
376
330
  * {@link DevframeDockEntryBase.groupId} matches this group's `id`.
@@ -618,15 +572,4 @@ interface DevframeCommandShortcutOverrides {
618
572
  [commandId: string]: DevframeCommandKeybinding[];
619
573
  }
620
574
  //#endregion
621
- //#region src/types/settings.d.ts
622
- interface DevframeDocksUserSettings {
623
- docksHidden: string[];
624
- docksCategoriesHidden: string[];
625
- docksPinned: string[];
626
- docksCustomOrder: Record<string, number>;
627
- showIframeAddressBar: boolean;
628
- closeOnOutsideClick: boolean;
629
- commandShortcuts: DevframeCommandShortcutOverrides;
630
- }
631
- //#endregion
632
- export { DevframeViewLauncher as A, DevframeDocksHost as C, DevframeViewGroup as D, DevframeViewCustomRender as E, RemoteDockOptions as F, JsonRenderElement as I, JsonRenderSpec as L, FrameSubTabsConfig as M, NavTarget as N, DevframeViewIframe as O, RemoteConnectionInfo as P, JsonRenderer as R, DevframeDocksActiveState as S, DevframeViewBuiltin as T, DevframeDockEntryBase as _, DevframeCommandEntry as a, DevframeDockEntryRegistry as b, DevframeCommandShortcutOverrides as c, DevframeServerCommandEntry as d, DevframeServerCommandInput as f, DevframeDockEntry as g, DevframeDockEntriesGrouped as h, DevframeCommandBase as i, DevframeViewLauncherStatus as j, DevframeViewJsonRender as k, DevframeCommandsHost as l, DevframeDockActivation as m, DevframeClientCommand as n, DevframeCommandHandle as o, ClientScriptEntry as p, DevframeCommandAgentOptions as r, DevframeCommandKeybinding as s, DevframeDocksUserSettings as t, DevframeCommandsHostEvents as u, DevframeDockEntryCategory as v, DevframeViewAction as w, DevframeDockUserEntry as x, DevframeDockEntryIcon as y };
575
+ export { FrameSubTabsConfig as A, DevframeViewAction as C, DevframeViewIframe as D, DevframeViewGroup as E, RemoteConnectionInfo as M, RemoteDockOptions as N, DevframeViewLauncher as O, DevframeDocksHost as S, DevframeViewCustomRender as T, DevframeDockEntryCategory as _, DevframeCommandHandle as a, DevframeDockUserEntry as b, DevframeCommandsHost as c, DevframeServerCommandInput as d, ClientScriptEntry as f, DevframeDockEntryBase as g, DevframeDockEntry as h, DevframeCommandEntry as i, NavTarget as j, DevframeViewLauncherStatus as k, DevframeCommandsHostEvents as l, DevframeDockEntriesGrouped as m, DevframeCommandAgentOptions as n, DevframeCommandKeybinding as o, DevframeDockActivation as p, DevframeCommandBase as r, DevframeCommandShortcutOverrides as s, DevframeClientCommand as t, DevframeServerCommandEntry as u, DevframeDockEntryIcon as v, DevframeViewBuiltin as w, DevframeDocksActiveState as x, DevframeDockEntryRegistry as y };
@@ -1,4 +1,4 @@
1
- import { t as DevframeDocksUserSettings } from "./settings-Byh48aCd.mjs";
1
+ import { t as DevframeDocksUserSettings } from "./settings-B1qJ47d5.mjs";
2
2
  export * from "devframe/constants";
3
3
  //#region src/constants.d.ts
4
4
  /**
@@ -12,6 +12,13 @@ export * from "devframe/constants";
12
12
  * its own categories (or override these) without editing this table.
13
13
  */
14
14
  declare const DEFAULT_CATEGORIES_ORDER: Record<string, number>;
15
+ /**
16
+ * Shared-state slot carrying the hub's renderer manifest — one
17
+ * {@link import('./client/renderers').DockRendererManifest} entry per dock
18
+ * `type`, published by `initHub({ renderers })` and consumed by every
19
+ * hub-aware client (the headless client host and viewers alike).
20
+ */
21
+ declare const DOCK_RENDERERS_STATE_KEY = "devframe:dock-renderers";
15
22
  declare const DEFAULT_STATE_USER_SETTINGS: () => DevframeDocksUserSettings;
16
23
  //#endregion
17
- export { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS };
24
+ export { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS, DOCK_RENDERERS_STATE_KEY };
@@ -22,6 +22,13 @@ const DEFAULT_CATEGORIES_ORDER = {
22
22
  "docs": 500,
23
23
  "~builtin": 1e3
24
24
  };
25
+ /**
26
+ * Shared-state slot carrying the hub's renderer manifest — one
27
+ * {@link import('./client/renderers').DockRendererManifest} entry per dock
28
+ * `type`, published by `initHub({ renderers })` and consumed by every
29
+ * hub-aware client (the headless client host and viewers alike).
30
+ */
31
+ const DOCK_RENDERERS_STATE_KEY = "devframe:dock-renderers";
25
32
  const DEFAULT_STATE_USER_SETTINGS = () => ({
26
33
  docksHidden: [],
27
34
  docksCategoriesHidden: [],
@@ -32,4 +39,4 @@ const DEFAULT_STATE_USER_SETTINGS = () => ({
32
39
  commandShortcuts: {}
33
40
  });
34
41
  //#endregion
35
- export { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS };
42
+ export { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS, DOCK_RENDERERS_STATE_KEY };