@devframes/hub 0.6.1 → 0.7.0
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.
- package/dist/client/index.d.mts +21 -4
- package/dist/client/index.mjs +10 -1
- package/dist/constants.d.mts +1 -1
- package/dist/{context-BIZOsyvH.d.mts → context-CfJPSLH2.d.mts} +7 -14
- package/dist/index.d.mts +3 -3
- package/dist/node/index.d.mts +9 -25
- package/dist/node/index.mjs +5 -37
- package/dist/{settings-DJs3n2p1.d.mts → settings-CzbUEsyC.d.mts} +15 -32
- package/dist/types/index.d.mts +3 -3
- package/package.json +3 -3
package/dist/client/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as DevframeMessagesClient, _ as DevframeMessageEntryInput } from "../context-
|
|
2
|
-
import {
|
|
3
|
-
import { DevframeClientRpcHost, DevframeRpcClient, DevframeRpcClientOptions, DevframeRpcContext, RpcClientEvents } from "devframe/client";
|
|
1
|
+
import { S as DevframeMessagesClient, _ as DevframeMessageEntryInput } from "../context-CfJPSLH2.mjs";
|
|
2
|
+
import { O as RemoteConnectionInfo, i as DevframeCommandEntry, m as DevframeDockEntry, n as DevframeClientCommand, o as DevframeCommandKeybinding, p as DevframeDockEntriesGrouped, t as DevframeDocksUserSettings, v as DevframeDockUserEntry } from "../settings-CzbUEsyC.mjs";
|
|
3
|
+
import { DevframeClientRpcHost, DevframeConnectionStatus, DevframeRpcClient, DevframeRpcClientOptions, DevframeRpcContext, RpcClientEvents, RpcClientEvents as RpcClientEvents$1 } from "devframe/client";
|
|
4
4
|
import { EventEmitter } from "devframe/types";
|
|
5
5
|
import { SharedState } from "devframe/utils/shared-state";
|
|
6
6
|
import { WhenContext } from "devframe/utils/when";
|
|
@@ -42,6 +42,23 @@ interface DocksContext extends DevframeRpcContext {
|
|
|
42
42
|
* The when-clause context for conditional visibility
|
|
43
43
|
*/
|
|
44
44
|
readonly when: WhenClauseContext;
|
|
45
|
+
/**
|
|
46
|
+
* The live connection status of the underlying devframe client, so a viewer
|
|
47
|
+
* can render one central connection indicator for every docked plugin
|
|
48
|
+
* instead of each plugin surfacing its own.
|
|
49
|
+
*/
|
|
50
|
+
readonly connection: DocksConnectionContext;
|
|
51
|
+
}
|
|
52
|
+
interface DocksConnectionContext {
|
|
53
|
+
/** The current connection status. */
|
|
54
|
+
readonly status: DevframeConnectionStatus;
|
|
55
|
+
/** The most recent connection-level error, or `null` when healthy. */
|
|
56
|
+
readonly error: Error | null;
|
|
57
|
+
/**
|
|
58
|
+
* The client's event emitter — subscribe to `connection:status`,
|
|
59
|
+
* `connection:error`, and `rpc:error` to react to changes.
|
|
60
|
+
*/
|
|
61
|
+
readonly events: EventEmitter<RpcClientEvents$1>;
|
|
45
62
|
}
|
|
46
63
|
interface WhenClauseContext {
|
|
47
64
|
/**
|
|
@@ -235,4 +252,4 @@ declare function parseRemoteConnection(input?: string): RemoteConnectionInfo | n
|
|
|
235
252
|
*/
|
|
236
253
|
declare function connectRemoteDevframe(options?: ConnectRemoteDevframeOptions): Promise<DevframeRpcClient>;
|
|
237
254
|
//#endregion
|
|
238
|
-
export { CLIENT_CONTEXT_KEY, CommandsContext, ConnectRemoteDevframeOptions, DevframeClientContext, DevframeClientHost, DevframeClientHostOptions, type DevframeClientRpcHost, DockClientScriptContext, DockClientType, DockEntryState, DockEntryStateEvents, DockPanelStorage, DocksContext, DocksEntriesContext, DocksPanelContext, MessagesClientOptions, type RpcClientEvents, WhenClauseContext, connectRemoteDevframe, createDevframeClientHost, createMessagesClient, getDevframeClientContext, parseRemoteConnection, setDevframeClientContext };
|
|
255
|
+
export { CLIENT_CONTEXT_KEY, CommandsContext, ConnectRemoteDevframeOptions, DevframeClientContext, DevframeClientHost, DevframeClientHostOptions, type DevframeClientRpcHost, DockClientScriptContext, DockClientType, DockEntryState, DockEntryStateEvents, DockPanelStorage, DocksConnectionContext, DocksContext, DocksEntriesContext, DocksPanelContext, MessagesClientOptions, type RpcClientEvents, WhenClauseContext, connectRemoteDevframe, createDevframeClientHost, createMessagesClient, getDevframeClientContext, parseRemoteConnection, setDevframeClientContext };
|
package/dist/client/index.mjs
CHANGED
|
@@ -112,7 +112,16 @@ async function createDevframeClientHost(options = {}) {
|
|
|
112
112
|
paletteOpen: commands.paletteOpen,
|
|
113
113
|
dockSelectedId: selectedId ?? ""
|
|
114
114
|
};
|
|
115
|
-
} }
|
|
115
|
+
} },
|
|
116
|
+
connection: {
|
|
117
|
+
get status() {
|
|
118
|
+
return rpc.status;
|
|
119
|
+
},
|
|
120
|
+
get error() {
|
|
121
|
+
return rpc.connectionError;
|
|
122
|
+
},
|
|
123
|
+
events: rpc.events
|
|
124
|
+
}
|
|
116
125
|
};
|
|
117
126
|
const disposers = [];
|
|
118
127
|
reconcileEntries();
|
package/dist/constants.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as
|
|
1
|
+
import { M as JsonRenderer, _ as DevframeDockEntryIcon, c as DevframeCommandsHost, j as JsonRenderSpec, y as DevframeDocksHost } from "./settings-CzbUEsyC.mjs";
|
|
2
2
|
import { CreateHostContextOptions } from "devframe/node";
|
|
3
3
|
import { DevframeHost, DevframeNodeContext, EventEmitter } from "devframe/types";
|
|
4
4
|
import { ChildProcess } from "node:child_process";
|
|
@@ -351,19 +351,12 @@ interface DevframeHubContext extends DevframeNodeContext {
|
|
|
351
351
|
*/
|
|
352
352
|
createJsonRenderer: (spec: JsonRenderSpec) => JsonRenderer;
|
|
353
353
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
*
|
|
361
|
-
* Omitting this option keeps all three built-ins.
|
|
362
|
-
*
|
|
363
|
-
* @default { terminals: true, messages: true, settings: true }
|
|
364
|
-
*/
|
|
365
|
-
builtinDocks?: BuiltinDocksOptions;
|
|
366
|
-
}
|
|
354
|
+
/**
|
|
355
|
+
* Options for {@link createHubContext} — devframe's
|
|
356
|
+
* {@link CreateHostContextOptions} plus any hub-level additions kits layer on
|
|
357
|
+
* through declaration merging.
|
|
358
|
+
*/
|
|
359
|
+
interface CreateHubContextOptions extends CreateHostContextOptions {}
|
|
367
360
|
/**
|
|
368
361
|
* Create a hub-level node context: wraps devframe's `createHostContext`,
|
|
369
362
|
* attaches the hub hosts (`docks`, `terminals`, `messages`, `commands`),
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as DevframeMessagesHost, S as DevframeMessagesClient, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, a as DevframeChildProcessOutput, b as DevframeMessageLevel, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageEntryFrom, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageElementPosition, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageFilePosition, w as DevframeMessagesLevelShortcuts, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "./context-
|
|
2
|
-
import { A as
|
|
1
|
+
import { C as DevframeMessagesHost, S as DevframeMessagesClient, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, a as DevframeChildProcessOutput, b as DevframeMessageLevel, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageEntryFrom, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageElementPosition, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageFilePosition, w as DevframeMessagesLevelShortcuts, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "./context-CfJPSLH2.mjs";
|
|
2
|
+
import { A as JsonRenderElement, C as DevframeViewGroup, D as DevframeViewLauncherStatus, E as DevframeViewLauncher, M as JsonRenderer, O as RemoteConnectionInfo, S as DevframeViewCustomRender, T as DevframeViewJsonRender, _ as DevframeDockEntryIcon, a as DevframeCommandHandle, b as DevframeViewAction, c as DevframeCommandsHost, d as DevframeServerCommandInput, f as ClientScriptEntry, g as DevframeDockEntryCategory, h as DevframeDockEntryBase, i as DevframeCommandEntry, j as JsonRenderSpec, k as RemoteDockOptions, l as DevframeCommandsHostEvents, m as DevframeDockEntry, n as DevframeClientCommand, o as DevframeCommandKeybinding, p as DevframeDockEntriesGrouped, r as DevframeCommandBase, s as DevframeCommandShortcutOverrides, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry, v as DevframeDockUserEntry, w as DevframeViewIframe, x as DevframeViewBuiltin, y as DevframeDocksHost } from "./settings-CzbUEsyC.mjs";
|
|
3
3
|
import { C as RpcStreamingChannel, E as Thenable, S as RpcSharedStateHost, T as RpcStreamingHost, _ as RpcBroadcastOptions, a as DevframeDiagnosticsLogger, b as RpcFunctionsHost, c as DevframeRpcClientFunctions, d as DevframeViewHost, f as EntriesToObject, g as PartialWithoutId, h as EventsMap, i as DevframeDiagnosticsHost, l as DevframeRpcServerFunctions, m as EventUnsubscribe, n as DevframeCapabilities, o as DevframeHost, p as EventEmitter, r as DevframeDiagnosticsDefinition, s as DevframeNodeRpcSession, t as ConnectionMeta, u as DevframeRpcSharedStates, v as RpcDefinitionsFilter, w as RpcStreamingChannelOptions, x as RpcSharedStateGetOptions, y as RpcDefinitionsToFunctions } from "./index-Dic9q4eN.mjs";
|
|
4
4
|
import { WhenContext, WhenExpression } from "devframe/utils/when";
|
|
5
5
|
|
|
@@ -13,4 +13,4 @@ declare function defineDockEntry<const T extends DevframeDockUserEntry, const W
|
|
|
13
13
|
}): T;
|
|
14
14
|
declare function defineJsonRenderSpec(spec: JsonRenderSpec): JsonRenderSpec;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { type
|
|
16
|
+
export { type ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, type DevframeChildProcessExecuteOptions, type DevframeChildProcessOutput, type DevframeChildProcessResult, type DevframeChildProcessTerminalSession, type DevframeClientCommand, type DevframeCommandBase, type DevframeCommandEntry, type DevframeCommandHandle, type DevframeCommandKeybinding, type DevframeCommandShortcutOverrides, type DevframeCommandsHost, type DevframeCommandsHostEvents, type DevframeDiagnosticsDefinition, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockEntriesGrouped, type DevframeDockEntry, type DevframeDockEntryBase, type DevframeDockEntryCategory, type DevframeDockEntryIcon, type DevframeDockUserEntry, type DevframeDocksHost, type DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, type DevframeMessageElementPosition, type DevframeMessageEntry, type DevframeMessageEntryFrom, type DevframeMessageEntryInput, type DevframeMessageFilePosition, type DevframeMessageHandle, type DevframeMessageLevel, type DevframeMessageShortcutInput, type DevframeMessagesClient, type DevframeMessagesHost, type DevframeMessagesLevelShortcuts, type DevframeMessagesListDelta, type DevframeNodeRpcSession, type DevframePtyExecuteOptions, type DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeServerCommandEntry, type DevframeServerCommandInput, type DevframeTerminalSession, type DevframeTerminalSessionBase, type DevframeTerminalStatus, type DevframeTerminalsHost, type DevframeViewAction, type DevframeViewBuiltin, type DevframeViewCustomRender, type DevframeViewGroup, type DevframeViewHost, type DevframeViewIframe, type DevframeViewJsonRender, type DevframeViewLauncher, type DevframeViewLauncherStatus, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, type JsonRenderElement, type JsonRenderSpec, type JsonRenderer, type PartialWithoutId, type RemoteConnectionInfo, type RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type Thenable, defineCommand, defineDockEntry, defineHubRpcFunction, defineJsonRenderSpec };
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as DevframeMessagesHost$1, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, n as DevframeHubContext, p as DevframeTerminalsHost$1, r as createHubContext, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "../context-
|
|
2
|
-
import {
|
|
1
|
+
import { C as DevframeMessagesHost$1, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, n as DevframeHubContext, p as DevframeTerminalsHost$1, r as createHubContext, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "../context-CfJPSLH2.mjs";
|
|
2
|
+
import { a as DevframeCommandHandle, c as DevframeCommandsHost$1, d as DevframeServerCommandInput, f as ClientScriptEntry, m as DevframeDockEntry, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry, v as DevframeDockUserEntry, w as DevframeViewIframe, y as DevframeDocksHost$1 } from "../settings-CzbUEsyC.mjs";
|
|
3
3
|
import { RpcFunctionDefinitionAny } from "devframe/rpc";
|
|
4
4
|
import { DevframeDefinition } from "devframe/types";
|
|
5
5
|
import { SharedState } from "devframe/utils/shared-state";
|
|
@@ -21,31 +21,14 @@ declare class DevframeCommandsHost implements DevframeCommandsHost$1 {
|
|
|
21
21
|
//#region src/node/host-docks.d.ts
|
|
22
22
|
declare class DevframeDocksHost implements DevframeDocksHost$1 {
|
|
23
23
|
readonly context: DevframeHubContext;
|
|
24
|
-
/**
|
|
25
|
-
* Per-entry toggles for the synthesized built-in dock entries. An omitted
|
|
26
|
-
* (or `undefined`) flag keeps that built-in; only an explicit `false`
|
|
27
|
-
* suppresses it.
|
|
28
|
-
*/
|
|
29
|
-
private readonly builtinDocks;
|
|
30
24
|
readonly views: DevframeDocksHost$1['views'];
|
|
31
25
|
readonly events: DevframeDocksHost$1['events'];
|
|
32
26
|
userSettings: SharedState<DevframeDocksUserSettings>;
|
|
33
27
|
/** Dock-id → allocated remote token + resolved options. */
|
|
34
28
|
private readonly remoteDocks;
|
|
35
|
-
constructor(context: DevframeHubContext
|
|
36
|
-
/**
|
|
37
|
-
* Per-entry toggles for the synthesized built-in dock entries. An omitted
|
|
38
|
-
* (or `undefined`) flag keeps that built-in; only an explicit `false`
|
|
39
|
-
* suppresses it.
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
builtinDocks?: BuiltinDocksOptions);
|
|
29
|
+
constructor(context: DevframeHubContext);
|
|
43
30
|
init(): Promise<void>;
|
|
44
|
-
values(
|
|
45
|
-
includeBuiltin
|
|
46
|
-
}?: {
|
|
47
|
-
includeBuiltin?: boolean;
|
|
48
|
-
}): DevframeDockEntry[];
|
|
31
|
+
values(): DevframeDockEntry[];
|
|
49
32
|
private projectView;
|
|
50
33
|
private resolveDevServerOrigin;
|
|
51
34
|
register<T extends DevframeDockUserEntry>(view: T, force?: boolean): {
|
|
@@ -126,10 +109,11 @@ interface MountDevframeOptions {
|
|
|
126
109
|
*/
|
|
127
110
|
base?: string;
|
|
128
111
|
/**
|
|
129
|
-
*
|
|
130
|
-
* customize the entry's `category`, override the icon, hide it
|
|
131
|
-
* `when`, etc.
|
|
132
|
-
*
|
|
112
|
+
* Per-mount overrides for the auto-synthesized iframe dock entry. Use
|
|
113
|
+
* this to customize the entry's `category`, override the icon, hide it
|
|
114
|
+
* via `when`, etc. Takes precedence over the definition's own
|
|
115
|
+
* {@link DevframeDefinition.dock} defaults. Cannot change `id`, `type`,
|
|
116
|
+
* or `url` — those are derived from the devframe definition.
|
|
133
117
|
*/
|
|
134
118
|
dock?: Partial<Omit<DevframeViewIframe, 'id' | 'type' | 'url'>>;
|
|
135
119
|
}
|
package/dist/node/index.mjs
CHANGED
|
@@ -207,15 +207,13 @@ function buildRemoteUrl(baseUrl, payload, transport) {
|
|
|
207
207
|
}
|
|
208
208
|
var DevframeDocksHost = class {
|
|
209
209
|
context;
|
|
210
|
-
builtinDocks;
|
|
211
210
|
views = /* @__PURE__ */ new Map();
|
|
212
211
|
events = createEventEmitter();
|
|
213
212
|
userSettings = void 0;
|
|
214
213
|
/** Dock-id → allocated remote token + resolved options. */
|
|
215
214
|
remoteDocks = /* @__PURE__ */ new Map();
|
|
216
|
-
constructor(context
|
|
215
|
+
constructor(context) {
|
|
217
216
|
this.context = context;
|
|
218
|
-
this.builtinDocks = builtinDocks;
|
|
219
217
|
}
|
|
220
218
|
async init() {
|
|
221
219
|
this.userSettings = await this.context.rpc.sharedState.get("devframe:user-settings", { sharedState: createStorage({
|
|
@@ -223,39 +221,8 @@ var DevframeDocksHost = class {
|
|
|
223
221
|
initialValue: DEFAULT_STATE_USER_SETTINGS()
|
|
224
222
|
}) });
|
|
225
223
|
}
|
|
226
|
-
values(
|
|
227
|
-
|
|
228
|
-
const { terminals = true, messages = true, settings = true } = this.builtinDocks;
|
|
229
|
-
const builtinDocksEntries = [];
|
|
230
|
-
if (terminals) builtinDocksEntries.push({
|
|
231
|
-
type: "~builtin",
|
|
232
|
-
id: "~terminals",
|
|
233
|
-
title: "Terminals",
|
|
234
|
-
icon: "ph:terminal-duotone",
|
|
235
|
-
category: "~builtin",
|
|
236
|
-
get when() {
|
|
237
|
-
return context.terminals.sessions.size === 0 ? "false" : void 0;
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
if (messages) builtinDocksEntries.push({
|
|
241
|
-
type: "~builtin",
|
|
242
|
-
id: "~messages",
|
|
243
|
-
title: "Messages & Notifications",
|
|
244
|
-
icon: "ph:notification-duotone",
|
|
245
|
-
category: "~builtin",
|
|
246
|
-
get badge() {
|
|
247
|
-
const size = context.messages.entries.size;
|
|
248
|
-
return size > 0 ? String(size) : void 0;
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
if (settings) builtinDocksEntries.push({
|
|
252
|
-
type: "~builtin",
|
|
253
|
-
id: "~settings",
|
|
254
|
-
title: "Settings",
|
|
255
|
-
category: "~builtin",
|
|
256
|
-
icon: "ph:gear-duotone"
|
|
257
|
-
});
|
|
258
|
-
return [...Array.from(this.views.values(), (view) => this.projectView(view)), ...includeBuiltin ? builtinDocksEntries : []];
|
|
224
|
+
values() {
|
|
225
|
+
return Array.from(this.views.values(), (view) => this.projectView(view));
|
|
259
226
|
}
|
|
260
227
|
projectView(view) {
|
|
261
228
|
if (view.type !== "iframe" || !view.remote) return view;
|
|
@@ -934,7 +901,7 @@ async function createHubContext(options) {
|
|
|
934
901
|
...options,
|
|
935
902
|
builtinRpcDeclarations: [...builtinHubRpcDeclarations, ...options.builtinRpcDeclarations ?? []]
|
|
936
903
|
});
|
|
937
|
-
const docks = new DevframeDocksHost(context
|
|
904
|
+
const docks = new DevframeDocksHost(context);
|
|
938
905
|
const terminals = new DevframeTerminalsHost(context);
|
|
939
906
|
const messages = new DevframeMessagesHost(context);
|
|
940
907
|
const commands = new DevframeCommandsHost(context);
|
|
@@ -1049,6 +1016,7 @@ async function mountDevframe(ctx, d, options = {}) {
|
|
|
1049
1016
|
id,
|
|
1050
1017
|
title: d.name,
|
|
1051
1018
|
icon: d.icon ?? "ph:plug-duotone",
|
|
1019
|
+
...d.dock,
|
|
1052
1020
|
...options.dock,
|
|
1053
1021
|
type: "iframe",
|
|
1054
1022
|
url: base
|
|
@@ -39,34 +39,7 @@ interface DevframeDocksHost {
|
|
|
39
39
|
update: (patch: Partial<T>) => void;
|
|
40
40
|
};
|
|
41
41
|
update: (entry: DevframeDockUserEntry) => void;
|
|
42
|
-
values: (
|
|
43
|
-
includeBuiltin?: boolean;
|
|
44
|
-
}) => DevframeDockEntry[];
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Per-entry toggles for the hub's synthesized built-in dock entries.
|
|
48
|
-
*
|
|
49
|
-
* Each flag defaults to `true` (the entry is present). Set one to `false` to
|
|
50
|
-
* suppress that built-in everywhere it would otherwise appear — useful when a
|
|
51
|
-
* host mounts a plugin that supersedes the built-in tab (e.g.
|
|
52
|
-
* `@devframes/plugin-terminals` replacing the `~terminals` entry).
|
|
53
|
-
*/
|
|
54
|
-
interface BuiltinDocksOptions {
|
|
55
|
-
/**
|
|
56
|
-
* Include the built-in `~terminals` dock entry.
|
|
57
|
-
* @default true
|
|
58
|
-
*/
|
|
59
|
-
terminals?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Include the built-in `~messages` dock entry.
|
|
62
|
-
* @default true
|
|
63
|
-
*/
|
|
64
|
-
messages?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Include the built-in `~settings` dock entry.
|
|
67
|
-
* @default true
|
|
68
|
-
*/
|
|
69
|
-
settings?: boolean;
|
|
42
|
+
values: () => DevframeDockEntry[];
|
|
70
43
|
}
|
|
71
44
|
type DevframeDockEntryCategory = 'app' | 'framework' | 'web' | 'advanced' | 'default' | '~builtin' | (string & {});
|
|
72
45
|
type DevframeDockEntryIcon = string | {
|
|
@@ -207,9 +180,19 @@ interface DevframeViewCustomRender extends DevframeDockEntryBase {
|
|
|
207
180
|
type: 'custom-render';
|
|
208
181
|
renderer: ClientScriptEntry;
|
|
209
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* A view rendered natively by the viewer rather than by a plugin — the
|
|
185
|
+
* settings panel, the terminals feed, the messages feed, etc. A high-level
|
|
186
|
+
* integration registers the built-in views it wants; the viewer recognizes the
|
|
187
|
+
* reserved `id` and renders its own UI for it.
|
|
188
|
+
*
|
|
189
|
+
* Its {@link DevframeDockEntryBase.category} defaults to `'~builtin'` when
|
|
190
|
+
* omitted, so built-in views group together and sort last without every
|
|
191
|
+
* integration repeating it.
|
|
192
|
+
*/
|
|
210
193
|
interface DevframeViewBuiltin extends DevframeDockEntryBase {
|
|
211
194
|
type: '~builtin';
|
|
212
|
-
id:
|
|
195
|
+
id: string;
|
|
213
196
|
}
|
|
214
197
|
interface DevframeViewJsonRender extends DevframeDockEntryBase {
|
|
215
198
|
type: 'json-render';
|
|
@@ -237,8 +220,8 @@ interface DevframeViewGroup extends DevframeDockEntryBase {
|
|
|
237
220
|
*/
|
|
238
221
|
defaultChildId?: string;
|
|
239
222
|
}
|
|
240
|
-
type DevframeDockUserEntry = DevframeViewIframe | DevframeViewAction | DevframeViewCustomRender | DevframeViewLauncher | DevframeViewJsonRender | DevframeViewGroup;
|
|
241
|
-
type DevframeDockEntry = DevframeDockUserEntry
|
|
223
|
+
type DevframeDockUserEntry = DevframeViewIframe | DevframeViewAction | DevframeViewCustomRender | DevframeViewLauncher | DevframeViewJsonRender | DevframeViewGroup | DevframeViewBuiltin;
|
|
224
|
+
type DevframeDockEntry = DevframeDockUserEntry;
|
|
242
225
|
type DevframeDockEntriesGrouped = [category: string, entries: DevframeDockEntry[]][];
|
|
243
226
|
//#endregion
|
|
244
227
|
//#region src/types/commands.d.ts
|
|
@@ -370,4 +353,4 @@ interface DevframeDocksUserSettings {
|
|
|
370
353
|
commandShortcuts: DevframeCommandShortcutOverrides;
|
|
371
354
|
}
|
|
372
355
|
//#endregion
|
|
373
|
-
export {
|
|
356
|
+
export { JsonRenderElement as A, DevframeViewGroup as C, DevframeViewLauncherStatus as D, DevframeViewLauncher as E, JsonRenderer as M, RemoteConnectionInfo as O, DevframeViewCustomRender as S, DevframeViewJsonRender as T, DevframeDockEntryIcon as _, DevframeCommandHandle as a, DevframeViewAction as b, DevframeCommandsHost as c, DevframeServerCommandInput as d, ClientScriptEntry as f, DevframeDockEntryCategory as g, DevframeDockEntryBase as h, DevframeCommandEntry as i, JsonRenderSpec as j, RemoteDockOptions as k, DevframeCommandsHostEvents as l, DevframeDockEntry as m, DevframeClientCommand as n, DevframeCommandKeybinding as o, DevframeDockEntriesGrouped as p, DevframeCommandBase as r, DevframeCommandShortcutOverrides as s, DevframeDocksUserSettings as t, DevframeServerCommandEntry as u, DevframeDockUserEntry as v, DevframeViewIframe as w, DevframeViewBuiltin as x, DevframeDocksHost as y };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as DevframeMessagesHost, S as DevframeMessagesClient, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, a as DevframeChildProcessOutput, b as DevframeMessageLevel, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageEntryFrom, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageElementPosition, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageFilePosition, w as DevframeMessagesLevelShortcuts, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "../context-
|
|
2
|
-
import { A as
|
|
1
|
+
import { C as DevframeMessagesHost, S as DevframeMessagesClient, T as DevframeMessagesListDelta, _ as DevframeMessageEntryInput, a as DevframeChildProcessOutput, b as DevframeMessageLevel, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageEntryFrom, h as DevframeMessageEntry, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageElementPosition, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageFilePosition, w as DevframeMessagesLevelShortcuts, x as DevframeMessageShortcutInput, y as DevframeMessageHandle } from "../context-CfJPSLH2.mjs";
|
|
2
|
+
import { A as JsonRenderElement, C as DevframeViewGroup, D as DevframeViewLauncherStatus, E as DevframeViewLauncher, M as JsonRenderer, O as RemoteConnectionInfo, S as DevframeViewCustomRender, T as DevframeViewJsonRender, _ as DevframeDockEntryIcon, a as DevframeCommandHandle, b as DevframeViewAction, c as DevframeCommandsHost, d as DevframeServerCommandInput, f as ClientScriptEntry, g as DevframeDockEntryCategory, h as DevframeDockEntryBase, i as DevframeCommandEntry, j as JsonRenderSpec, k as RemoteDockOptions, l as DevframeCommandsHostEvents, m as DevframeDockEntry, n as DevframeClientCommand, o as DevframeCommandKeybinding, p as DevframeDockEntriesGrouped, r as DevframeCommandBase, s as DevframeCommandShortcutOverrides, t as DevframeDocksUserSettings, u as DevframeServerCommandEntry, v as DevframeDockUserEntry, w as DevframeViewIframe, x as DevframeViewBuiltin, y as DevframeDocksHost } from "../settings-CzbUEsyC.mjs";
|
|
3
3
|
import { C as RpcStreamingChannel, E as Thenable, S as RpcSharedStateHost, T as RpcStreamingHost, _ as RpcBroadcastOptions, a as DevframeDiagnosticsLogger, b as RpcFunctionsHost, c as DevframeRpcClientFunctions, d as DevframeViewHost, f as EntriesToObject, g as PartialWithoutId, h as EventsMap, i as DevframeDiagnosticsHost, l as DevframeRpcServerFunctions, m as EventUnsubscribe, n as DevframeCapabilities, o as DevframeHost, p as EventEmitter, r as DevframeDiagnosticsDefinition, s as DevframeNodeRpcSession, t as ConnectionMeta, u as DevframeRpcSharedStates, v as RpcDefinitionsFilter, w as RpcStreamingChannelOptions, x as RpcSharedStateGetOptions, y as RpcDefinitionsToFunctions } from "../index-Dic9q4eN.mjs";
|
|
4
|
-
export {
|
|
4
|
+
export { ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, DevframeChildProcessExecuteOptions, DevframeChildProcessOutput, DevframeChildProcessResult, DevframeChildProcessTerminalSession, DevframeClientCommand, DevframeCommandBase, DevframeCommandEntry, DevframeCommandHandle, DevframeCommandKeybinding, DevframeCommandShortcutOverrides, DevframeCommandsHost, DevframeCommandsHostEvents, type DevframeDiagnosticsDefinition, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, DevframeDockEntriesGrouped, DevframeDockEntry, DevframeDockEntryBase, DevframeDockEntryCategory, DevframeDockEntryIcon, DevframeDockUserEntry, DevframeDocksHost, DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, DevframeMessageElementPosition, DevframeMessageEntry, DevframeMessageEntryFrom, DevframeMessageEntryInput, DevframeMessageFilePosition, DevframeMessageHandle, DevframeMessageLevel, DevframeMessageShortcutInput, DevframeMessagesClient, DevframeMessagesHost, DevframeMessagesLevelShortcuts, DevframeMessagesListDelta, type DevframeNodeRpcSession, DevframePtyExecuteOptions, DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, DevframeServerCommandEntry, DevframeServerCommandInput, DevframeTerminalSession, DevframeTerminalSessionBase, DevframeTerminalStatus, DevframeTerminalsHost, DevframeViewAction, DevframeViewBuiltin, DevframeViewCustomRender, DevframeViewGroup, type DevframeViewHost, DevframeViewIframe, DevframeViewJsonRender, DevframeViewLauncher, DevframeViewLauncherStatus, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, JsonRenderElement, JsonRenderSpec, JsonRenderer, type PartialWithoutId, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type Thenable };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devframes/hub",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"description": "Framework-neutral hub layer for devframe — docks, terminals, messages, commands.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dist"
|
|
34
34
|
],
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"devframe": "0.
|
|
36
|
+
"devframe": "0.7.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"birpc": "^4.0.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@types/node": "^26.1.0",
|
|
49
49
|
"mlly": "^1.8.2",
|
|
50
50
|
"tsdown": "^0.22.3",
|
|
51
|
-
"devframe": "0.
|
|
51
|
+
"devframe": "0.7.0"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "tsdown",
|