@devframes/hub 0.6.2 → 0.7.2

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,11 +1,11 @@
1
- import { S as DevframeMessagesClient, _ as DevframeMessageEntryInput } from "../context-BVliVH77.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-ZM591NEp.mjs";
3
- import { DevframeClientRpcHost, DevframeRpcClient, DevframeRpcClientOptions, DevframeRpcContext, RpcClientEvents } from "devframe/client";
1
+ import { S as DevframeMessagesClient, _ as DevframeMessageEntryInput } from "../context-CANUHYpc.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-0U1BorGE.mjs";
3
+ import "../index-DmNIgq0_.mjs";
4
+ import { DevframeClientRpcHost, DevframeConnectionStatus, DevframeRpcClient, DevframeRpcClientOptions, DevframeRpcContext, RpcClientEvents, RpcClientEvents as RpcClientEvents$1 } from "devframe/client";
4
5
  import { EventEmitter } from "devframe/types";
5
6
  import { SharedState } from "devframe/utils/shared-state";
6
7
  import { WhenContext } from "devframe/utils/when";
7
8
  export * from "devframe/client";
8
-
9
9
  //#region src/client/docks.d.ts
10
10
  interface DockPanelStorage {
11
11
  mode: 'float' | 'edge';
@@ -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 };
@@ -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();
@@ -1,6 +1,5 @@
1
- import { t as DevframeDocksUserSettings } from "./settings-ZM591NEp.mjs";
1
+ import { t as DevframeDocksUserSettings } from "./settings-0U1BorGE.mjs";
2
2
  export * from "devframe/constants";
3
-
4
3
  //#region src/constants.d.ts
5
4
  declare const DEFAULT_CATEGORIES_ORDER: Record<string, number>;
6
5
  declare const DEFAULT_STATE_USER_SETTINGS: () => DevframeDocksUserSettings;
@@ -1,8 +1,7 @@
1
- import { M as JsonRenderer, _ as DevframeDockEntryIcon, c as DevframeCommandsHost, j as JsonRenderSpec, y as DevframeDocksHost } from "./settings-ZM591NEp.mjs";
1
+ import { M as JsonRenderer, _ as DevframeDockEntryIcon, c as DevframeCommandsHost, j as JsonRenderSpec, y as DevframeDocksHost } from "./settings-0U1BorGE.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";
5
-
6
5
  //#region src/types/messages.d.ts
7
6
  type DevframeMessageLevel = 'info' | 'warn' | 'error' | 'success' | 'debug';
8
7
  type DevframeMessageEntryFrom = 'server' | 'browser';
@@ -1,3 +1,5 @@
1
+ import "./context-CANUHYpc.mjs";
2
+ import "./settings-0U1BorGE.mjs";
1
3
  import { RpcDefinitionsFilter, RpcDefinitionsToFunctions } from "devframe/rpc";
2
4
  import { ConnectionMeta as ConnectionMeta$1, DevframeCapabilities, DevframeDiagnosticsDefinition, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeHost as DevframeHost$1, DevframeNodeRpcSession, DevframeRpcClientFunctions, DevframeRpcServerFunctions, DevframeRpcSharedStates, DevframeViewHost, EntriesToObject, EventEmitter as EventEmitter$1, EventUnsubscribe, EventsMap, PartialWithoutId, RpcBroadcastOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, Thenable } from "devframe/types";
3
5
  export { RpcStreamingChannel as C, Thenable as E, RpcSharedStateHost as S, RpcStreamingHost as T, RpcBroadcastOptions as _, DevframeDiagnosticsLogger as a, RpcFunctionsHost as b, DevframeRpcClientFunctions as c, DevframeViewHost as d, EntriesToObject as f, PartialWithoutId as g, EventsMap as h, DevframeDiagnosticsHost as i, DevframeRpcServerFunctions as l, EventUnsubscribe as m, DevframeCapabilities as n, DevframeHost$1 as o, EventEmitter$1 as p, DevframeDiagnosticsDefinition as r, DevframeNodeRpcSession as s, ConnectionMeta$1 as t, DevframeRpcSharedStates as u, RpcDefinitionsFilter as v, RpcStreamingChannelOptions as w, RpcSharedStateGetOptions as x, RpcDefinitionsToFunctions as y };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,7 @@
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-BVliVH77.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-ZM591NEp.mjs";
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";
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-CANUHYpc.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-0U1BorGE.mjs";
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-DmNIgq0_.mjs";
4
4
  import { WhenContext, WhenExpression } from "devframe/utils/when";
5
-
6
5
  //#region src/define.d.ts
7
6
  declare const defineHubRpcFunction: <NAME extends string, TYPE extends import("devframe/rpc").RpcFunctionType, ARGS extends any[], RETURN = void, const AS extends import("devframe/rpc").RpcArgsSchema | undefined = undefined, const RS extends import("devframe/rpc").RpcReturnSchema | undefined = undefined>(definition: import("devframe/rpc").RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeHubContext>) => import("devframe/rpc").RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeHubContext>;
8
7
  declare function defineCommand<const W extends string = ''>(command: Omit<DevframeServerCommandInput, 'when'> & {
@@ -1,9 +1,8 @@
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-BVliVH77.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-ZM591NEp.mjs";
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-CANUHYpc.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-0U1BorGE.mjs";
3
3
  import { RpcFunctionDefinitionAny } from "devframe/rpc";
4
4
  import { DevframeDefinition } from "devframe/types";
5
5
  import { SharedState } from "devframe/utils/shared-state";
6
-
7
6
  //#region src/node/host-commands.d.ts
8
7
  declare class DevframeCommandsHost implements DevframeCommandsHost$1 {
9
8
  readonly context: DevframeHubContext;
@@ -35,12 +34,6 @@ declare class DevframeDocksHost implements DevframeDocksHost$1 {
35
34
  update: (patch: Partial<T>) => void;
36
35
  };
37
36
  update(view: DevframeDockUserEntry): void;
38
- /**
39
- * `~builtin` views default their category to `~builtin` so the viewer's
40
- * native views group together and sort last — a high-level integration
41
- * registering one needn't repeat the category.
42
- */
43
- private withBuiltinCategory;
44
37
  private validateGroupMembership;
45
38
  private prepareRemoteRegistration;
46
39
  }
@@ -115,10 +108,11 @@ interface MountDevframeOptions {
115
108
  */
116
109
  base?: string;
117
110
  /**
118
- * Overrides for the auto-synthesized iframe dock entry. Use this to
119
- * customize the entry's `category`, override the icon, hide it via
120
- * `when`, etc. Cannot change `id`, `type`, or `url` — those are
121
- * derived from the devframe definition.
111
+ * Per-mount overrides for the auto-synthesized iframe dock entry. Use
112
+ * this to customize the entry's `category`, override the icon, hide it
113
+ * via `when`, etc. Takes precedence over the definition's own
114
+ * {@link DevframeDefinition.dock} defaults. Cannot change `id`, `type`,
115
+ * or `url` — those are derived from the devframe definition.
122
116
  */
123
117
  dock?: Partial<Omit<DevframeViewIframe, 'id' | 'type' | 'url'>>;
124
118
  }
@@ -53,6 +53,10 @@ const diagnostics = defineDiagnostics({
53
53
  why: (p) => `Devframe "${p.name}" (id "${p.id}") is already mounted on this hub`,
54
54
  fix: "Each devframe is deduplicated by id. Set `duplicationStrategy: \"duplicate\"` on the definition to let instances coexist, `\"silent\"` to drop duplicates quietly, or `\"throw\"` to surface them as errors."
55
55
  },
56
+ DF8106: {
57
+ why: (p) => `The host cannot serve the RPC connection meta for devframe "${p.name}" (id "${p.id}") at "${p.base}" — its \`DevframeHost\` does not implement \`mountConnectionMeta\`.`,
58
+ fix: "Implement `mountConnectionMeta(base)` on your DevframeHost so it serves `__connection.json` at each mounted base. Without it, the devframe SPA connects only when it shares an origin with the hub UI (same-origin window inheritance); cross-origin, sandboxed, or directly-opened iframes stay disconnected. Static-snapshot hosts that bake the meta into the served files can implement it as a no-op to acknowledge this intentionally."
59
+ },
56
60
  DF8200: { why: (p) => `Terminal session with id "${p.id}" already registered` },
57
61
  DF8201: { why: (p) => `Terminal session with id "${p.id}" not registered` },
58
62
  DF8202: {
@@ -248,9 +252,8 @@ var DevframeDocksHost = class {
248
252
  if (this.views.has(view.id) && !force) throw diagnostics.DF8100({ id: view.id });
249
253
  this.validateGroupMembership(view);
250
254
  this.prepareRemoteRegistration(view);
251
- const entry = this.withBuiltinCategory(view);
252
- this.views.set(entry.id, entry);
253
- this.events.emit("dock:entry:updated", entry);
255
+ this.views.set(view.id, view);
256
+ this.events.emit("dock:entry:updated", view);
254
257
  return { update: (patch) => {
255
258
  if (patch.id && patch.id !== view.id) throw diagnostics.DF8101({
256
259
  id: view.id,
@@ -263,21 +266,8 @@ var DevframeDocksHost = class {
263
266
  if (!this.views.has(view.id)) throw diagnostics.DF8102({ id: view.id });
264
267
  this.validateGroupMembership(view);
265
268
  this.prepareRemoteRegistration(view);
266
- const entry = this.withBuiltinCategory(view);
267
- this.views.set(entry.id, entry);
268
- this.events.emit("dock:entry:updated", entry);
269
- }
270
- /**
271
- * `~builtin` views default their category to `~builtin` so the viewer's
272
- * native views group together and sort last — a high-level integration
273
- * registering one needn't repeat the category.
274
- */
275
- withBuiltinCategory(view) {
276
- if (view.type === "~builtin" && view.category === void 0) return {
277
- ...view,
278
- category: "~builtin"
279
- };
280
- return view;
269
+ this.views.set(view.id, view);
270
+ this.events.emit("dock:entry:updated", view);
281
271
  }
282
272
  validateGroupMembership(view) {
283
273
  if (view.groupId === void 0) return;
@@ -1024,12 +1014,18 @@ async function mountDevframe(ctx, d, options = {}) {
1024
1014
  }, "hosted"));
1025
1015
  if (d.cli?.distDir) {
1026
1016
  ctx.views.hostStatic(base, resolve(d.cli.distDir));
1027
- await ctx.host.mountConnectionMeta?.(base);
1017
+ if (ctx.host.mountConnectionMeta) await ctx.host.mountConnectionMeta(base);
1018
+ else diagnostics.DF8106({
1019
+ id,
1020
+ name: d.name,
1021
+ base
1022
+ });
1028
1023
  }
1029
1024
  ctx.docks.register({
1030
1025
  id,
1031
1026
  title: d.name,
1032
1027
  icon: d.icon ?? "ph:plug-duotone",
1028
+ ...d.dock,
1033
1029
  ...options.dock,
1034
1030
  type: "iframe",
1035
1031
  url: base
@@ -2057,7 +2053,8 @@ function binop(name, prec) {
2057
2053
  binop: prec
2058
2054
  });
2059
2055
  }
2060
- var beforeExpr = { beforeExpr: true }, startsExpr = { startsExpr: true };
2056
+ var beforeExpr = { beforeExpr: true };
2057
+ var startsExpr = { startsExpr: true };
2061
2058
  var keywords = {};
2062
2059
  function kw(name, options) {
2063
2060
  if (options === void 0) options = {};
@@ -2310,11 +2307,27 @@ function pushComment(options, array) {
2310
2307
  array.push(comment);
2311
2308
  };
2312
2309
  }
2313
- var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_CLASS_FIELD_INIT = 512, SCOPE_SWITCH = 1024, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
2310
+ var SCOPE_TOP = 1;
2311
+ var SCOPE_FUNCTION = 2;
2312
+ var SCOPE_ASYNC = 4;
2313
+ var SCOPE_GENERATOR = 8;
2314
+ var SCOPE_ARROW = 16;
2315
+ var SCOPE_SIMPLE_CATCH = 32;
2316
+ var SCOPE_SUPER = 64;
2317
+ var SCOPE_DIRECT_SUPER = 128;
2318
+ var SCOPE_CLASS_STATIC_BLOCK = 256;
2319
+ var SCOPE_CLASS_FIELD_INIT = 512;
2320
+ var SCOPE_SWITCH = 1024;
2321
+ var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
2314
2322
  function functionFlags(async, generator) {
2315
2323
  return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
2316
2324
  }
2317
- var BIND_NONE = 0, BIND_VAR = 1, BIND_LEXICAL = 2, BIND_FUNCTION = 3, BIND_SIMPLE_CATCH = 4, BIND_OUTSIDE = 5;
2325
+ var BIND_NONE = 0;
2326
+ var BIND_VAR = 1;
2327
+ var BIND_LEXICAL = 2;
2328
+ var BIND_FUNCTION = 3;
2329
+ var BIND_SIMPLE_CATCH = 4;
2330
+ var BIND_OUTSIDE = 5;
2318
2331
  var Parser = function Parser(options, input, startPos) {
2319
2332
  this.options = options = getOptions(options);
2320
2333
  this.sourceFile = options.sourceFile;
@@ -2548,7 +2561,8 @@ pp$8.parseTopLevel = function(node) {
2548
2561
  node.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType;
2549
2562
  return this.finishNode(node, "Program");
2550
2563
  };
2551
- var loopLabel = { kind: "loop" }, switchLabel = { kind: "switch" };
2564
+ var loopLabel = { kind: "loop" };
2565
+ var switchLabel = { kind: "switch" };
2552
2566
  pp$8.isLet = function(context) {
2553
2567
  if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return false;
2554
2568
  skipWhiteSpace.lastIndex = this.pos;
@@ -2969,7 +2983,9 @@ pp$8.parseVarId = function(decl, kind) {
2969
2983
  decl.id = kind === "using" || kind === "await using" ? this.parseIdent() : this.parseBindingAtom();
2970
2984
  this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
2971
2985
  };
2972
- var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4;
2986
+ var FUNC_STATEMENT = 1;
2987
+ var FUNC_HANGING_STATEMENT = 2;
2988
+ var FUNC_NULLABLE_ID = 4;
2973
2989
  pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
2974
2990
  this.initFunction(node);
2975
2991
  if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
@@ -1,5 +1,4 @@
1
1
  import { ConnectionMeta, EventEmitter } from "devframe/types";
2
-
3
2
  //#region src/types/json-render.d.ts
4
3
  interface JsonRenderElement {
5
4
  type: string;
@@ -192,7 +191,7 @@ interface DevframeViewCustomRender extends DevframeDockEntryBase {
192
191
  */
193
192
  interface DevframeViewBuiltin extends DevframeDockEntryBase {
194
193
  type: '~builtin';
195
- id: '~terminals' | '~messages' | '~client-auth-notice' | '~settings' | '~popup';
194
+ id: string;
196
195
  }
197
196
  interface DevframeViewJsonRender extends DevframeDockEntryBase {
198
197
  type: 'json-render';
@@ -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-BVliVH77.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-ZM591NEp.mjs";
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";
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-CANUHYpc.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-0U1BorGE.mjs";
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-DmNIgq0_.mjs";
4
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.6.2",
4
+ "version": "0.7.2",
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.6.2"
36
+ "devframe": "0.7.2"
37
37
  },
38
38
  "dependencies": {
39
39
  "birpc": "^4.0.0",
@@ -45,10 +45,10 @@
45
45
  "zigpty": "^0.2.1"
46
46
  },
47
47
  "devDependencies": {
48
- "@types/node": "^26.1.0",
48
+ "@types/node": "^26.1.1",
49
49
  "mlly": "^1.8.2",
50
- "tsdown": "^0.22.3",
51
- "devframe": "0.6.2"
50
+ "tsdown": "^0.22.7",
51
+ "devframe": "0.7.2"
52
52
  },
53
53
  "scripts": {
54
54
  "build": "tsdown",