@devframes/hub 1.1.0 → 1.2.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.
- package/dist/client/index.d.mts +5 -4
- package/dist/client/index.mjs +6 -1
- package/dist/{constants-29tNOFia.d.mts → constants-C7cDDASI.d.mts} +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/{context-DM9oJvHH.d.mts → context-BK50aJ-F.d.mts} +1 -1
- package/dist/{index-DPLrAsh-.d.mts → index-BvEO3eOd.d.mts} +2 -2
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +2 -1
- package/dist/locale-BbVtoVI6.mjs +28 -0
- package/dist/locale-C3-NpDlX.d.mts +12 -0
- package/dist/node/build.d.mts +1 -1
- package/dist/node/index.d.mts +2 -2
- package/dist/node/initiate.d.mts +2 -2
- package/dist/{settings-Dx8_shF9.d.mts → settings-DPLPzYfX.d.mts} +27 -1
- package/dist/types/index.d.mts +4 -4
- package/package.json +7 -7
package/dist/client/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../
|
|
1
|
+
import { A as DevframeViewIframe, C as DevframeDockUserEntry, F as RemoteConnectionInfo, P as NavTarget, S as DevframeDockPanelState, _ as DevframeDockEntry, a as DevframeCommandEntry, b as DevframeDockEntryIcon, g as DevframeDockEntriesGrouped, n as DevframeClientCommand, p as ClientScriptEntry, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings } from "../settings-DPLPzYfX.mjs";
|
|
2
|
+
import { n as resolveTitle, t as matchLocale } from "../locale-C3-NpDlX.mjs";
|
|
3
|
+
import { k as DevframeMessagesClient, w as DevframeMessageEntryInput } from "../context-BK50aJ-F.mjs";
|
|
4
|
+
import "../index-BvEO3eOd.mjs";
|
|
4
5
|
import { DevframeClientRpcHost, DevframeConnection, DevframeConnectionStatus, DevframeRpcClient, DevframeRpcClientOptions, DevframeRpcContext, RpcClientEvents, RpcClientEvents as RpcClientEvents$1 } from "devframe/client";
|
|
5
6
|
import { EventEmitter } from "devframe/types";
|
|
6
7
|
import { SharedState } from "devframe/utils/shared-state";
|
|
@@ -773,4 +774,4 @@ export declare function parseRemoteConnection(input?: string): RemoteConnectionI
|
|
|
773
774
|
*/
|
|
774
775
|
export declare function connectRemoteDevframe(options?: ConnectRemoteDevframeOptions): Promise<DevframeRpcClient>;
|
|
775
776
|
//#endregion
|
|
776
|
-
export { CLIENT_CONTEXT_KEY, type DevframeClientRpcHost, type RpcClientEvents };
|
|
777
|
+
export { CLIENT_CONTEXT_KEY, type DevframeClientRpcHost, type RpcClientEvents, matchLocale, resolveTitle };
|
package/dist/client/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as resolveTitle, t as matchLocale } from "../locale-BbVtoVI6.mjs";
|
|
1
2
|
import { i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, t as DEFAULT_CATEGORIES_ORDER } from "../constants-BSPQmlA1.mjs";
|
|
2
3
|
import { a as resolveClientModuleSpecifier, n as stripRemoteConnectionFromUrl, r as clientScriptFailureHint, t as buildRemoteConnectionUrl } from "../remote-url-UClKLQ5_.mjs";
|
|
3
4
|
import { DEVFRAME_EVENTS, REMOTE_CONNECTION_KEY } from "devframe/constants";
|
|
@@ -586,6 +587,8 @@ async function createDevframeClientRuntime(options = {}) {
|
|
|
586
587
|
rpc.sharedState.get(DOCK_RENDERERS_STATE_KEY, { initialValue: {} })
|
|
587
588
|
]);
|
|
588
589
|
let selectedId = null;
|
|
590
|
+
/** Bumped by every `switchEntry` call, so a stale one can tell it was superseded. */
|
|
591
|
+
let switchRequest = 0;
|
|
589
592
|
const entryToStateMap = /* @__PURE__ */ new Map();
|
|
590
593
|
const clientDocks = /* @__PURE__ */ new Map();
|
|
591
594
|
const frameNavAdapters = /* @__PURE__ */ new Map();
|
|
@@ -814,7 +817,9 @@ async function createDevframeClientRuntime(options = {}) {
|
|
|
814
817
|
if (next !== null && !entryToStateMap.has(next)) return false;
|
|
815
818
|
const entry = entryToStateMap.get(next ?? "")?.entryMeta;
|
|
816
819
|
if (entry && loadScriptsEnabled && !rpc.isTrusted) return false;
|
|
820
|
+
const request = ++switchRequest;
|
|
817
821
|
if (entry?.type === "iframe" && entry.clientScript && loadScriptsEnabled && !await preparePageScript(entry)) return false;
|
|
822
|
+
if (request !== switchRequest) return false;
|
|
818
823
|
const previous = selectedId;
|
|
819
824
|
selectedId = next;
|
|
820
825
|
panel.session.selectedDockId = next;
|
|
@@ -1147,4 +1152,4 @@ async function connectRemoteDevframe(options = {}) {
|
|
|
1147
1152
|
});
|
|
1148
1153
|
}
|
|
1149
1154
|
//#endregion
|
|
1150
|
-
export { CLIENT_CONTEXT_KEY, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, attachFrameNavClient, buildRemoteDevframeUrl, clientScriptFailureHint, connectRemoteDevframe, createDevframeClientRuntime, createDockRenderersContext, createMessagesClient, getDevframeClientContext, parseRemoteConnection, resolveClientModuleSpecifier, resolveDockIcon, resolveDockUrl, setDevframeClientContext, stripRemoteConnectionFromUrl, watchFrameLocation };
|
|
1155
|
+
export { CLIENT_CONTEXT_KEY, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, attachFrameNavClient, buildRemoteDevframeUrl, clientScriptFailureHint, connectRemoteDevframe, createDevframeClientRuntime, createDockRenderersContext, createMessagesClient, getDevframeClientContext, matchLocale, parseRemoteConnection, resolveClientModuleSpecifier, resolveDockIcon, resolveDockUrl, resolveTitle, setDevframeClientContext, stripRemoteConnectionFromUrl, watchFrameLocation };
|
package/dist/constants.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, r as DEVFRAMES_HUB_BASE, t as DEFAULT_CATEGORIES_ORDER } from "./constants-
|
|
1
|
+
import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, r as DEVFRAMES_HUB_BASE, t as DEFAULT_CATEGORIES_ORDER } from "./constants-C7cDDASI.mjs";
|
|
2
2
|
export * from "devframe/constants";
|
|
3
3
|
export { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS, DEVFRAMES_HUB_BASE, DOCK_RENDERERS_STATE_KEY, HUB_EVENTS, normalizeHubBase };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as DevframeViewIframe, T as DevframeDocksHost, b as DevframeDockEntryIcon, l as DevframeCommandsHost, m as DevframeDockActivation } from "./settings-
|
|
1
|
+
import { A as DevframeViewIframe, T as DevframeDocksHost, b as DevframeDockEntryIcon, l as DevframeCommandsHost, m as DevframeDockActivation } from "./settings-DPLPzYfX.mjs";
|
|
2
2
|
import { CreateHostContextOptions } from "devframe/node";
|
|
3
3
|
import { DevframeDefinition, DevframeHost, DevframeNodeContext, EventEmitter } from "devframe/types";
|
|
4
4
|
import { ChildProcess } from "node:child_process";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
1
|
+
import "./settings-DPLPzYfX.mjs";
|
|
2
|
+
import "./context-BK50aJ-F.mjs";
|
|
3
3
|
import { RpcDefinitionsFilter, RpcDefinitionsToFunctions } from "devframe/rpc";
|
|
4
4
|
import { ConnectionMeta as ConnectionMeta$1, DevframeCapabilities, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeHost as DevframeHost$1, DevframeNodeRpcSession, DevframeRpcClientFunctions, DevframeRpcServerFunctions, DevframeRpcSharedStates, DevframeViewHost, EventEmitter as EventEmitter$1, EventUnsubscribe, EventsMap, RpcBroadcastOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost } from "devframe/types";
|
|
5
5
|
export { RpcStreamingHost as S, RpcFunctionsHost as _, DevframeHost$1 as a, RpcStreamingChannel as b, DevframeRpcServerFunctions as c, EventEmitter$1 as d, EventUnsubscribe as f, RpcDefinitionsToFunctions as g, RpcDefinitionsFilter as h, DevframeDiagnosticsLogger as i, DevframeRpcSharedStates as l, RpcBroadcastOptions as m, DevframeCapabilities as n, DevframeNodeRpcSession as o, EventsMap as p, DevframeDiagnosticsHost as r, DevframeRpcClientFunctions as s, ConnectionMeta$1 as t, DevframeViewHost as u, RpcSharedStateGetOptions as v, RpcStreamingChannelOptions as x, RpcSharedStateHost as y };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import {
|
|
3
|
-
import { S as
|
|
1
|
+
import { A as DevframeViewIframe, C as DevframeDockUserEntry, D as DevframeViewBuiltin, E as DevframeViewAction, F as RemoteConnectionInfo, I as RemoteDockOptions, L as DevframeTitleLocales, M as DevframeViewLauncherStatus, N as FrameSubTabsConfig, O as DevframeViewCustomRender, P as NavTarget, R as DevframeTitled, S as DevframeDockPanelState, T as DevframeDocksHost, _ as DevframeDockEntry, a as DevframeCommandEntry, b as DevframeDockEntryIcon, c as DevframeCommandShortcutOverrides, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, g as DevframeDockEntriesGrouped, h as DevframeDockBadgeVariant, i as DevframeCommandBase, j as DevframeViewLauncher, k as DevframeViewGroup, l as DevframeCommandsHost, m as DevframeDockActivation, n as DevframeClientCommand, o as DevframeCommandHandle, p as ClientScriptEntry, r as DevframeCommandAgentOptions, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings, u as DevframeCommandsHostEvents, v as DevframeDockEntryBase, w as DevframeDocksActiveState, x as DevframeDockEntryRegistry, y as DevframeDockEntryCategory } from "./settings-DPLPzYfX.mjs";
|
|
2
|
+
import { n as resolveTitle, t as matchLocale } from "./locale-C3-NpDlX.mjs";
|
|
3
|
+
import { A as DevframeMessagesHost, C as DevframeMessageEntryFrom, D as DevframeMessageLevel, E as DevframeMessageHandle, M as DevframeMessagesListDelta, O as DevframeMessageShortcutInput, S as DevframeMessageEntry, T as DevframeMessageFilePosition, _ as DevframeTerminalsHost, b as DevframeMessageCommandAction, c as DevframeChildProcessResult, d as DevframePtyOutput, f as DevframePtyResult, g as DevframeTerminalStatus, h as DevframeTerminalSessionBase, j as DevframeMessagesLevelShortcuts, k as DevframeMessagesClient, l as DevframeChildProcessTerminalSession, m as DevframeTerminalSession, n as DevframeHubContext, o as DevframeChildProcessExecuteOptions, p as DevframePtyTerminalSession, s as DevframeChildProcessOutput, t as CreateHubContextOptions, u as DevframePtyExecuteOptions, v as DevframeMessageAction, w as DevframeMessageEntryInput, x as DevframeMessageElementPosition, y as DevframeMessageActivateAction } from "./context-BK50aJ-F.mjs";
|
|
4
|
+
import { S as RpcStreamingHost, _ as RpcFunctionsHost, a as DevframeHost, b as RpcStreamingChannel, c as DevframeRpcServerFunctions, d as EventEmitter, f as EventUnsubscribe, g as RpcDefinitionsToFunctions, h as RpcDefinitionsFilter, i as DevframeDiagnosticsLogger, l as DevframeRpcSharedStates, m as RpcBroadcastOptions, n as DevframeCapabilities, o as DevframeNodeRpcSession, p as EventsMap, r as DevframeDiagnosticsHost, s as DevframeRpcClientFunctions, t as ConnectionMeta, u as DevframeViewHost, v as RpcSharedStateGetOptions, x as RpcStreamingChannelOptions, y as RpcSharedStateHost } from "./index-BvEO3eOd.mjs";
|
|
4
5
|
import { WhenContext, WhenExpression } from "devframe/utils/when";
|
|
5
6
|
//#region src/define.d.ts
|
|
6
7
|
export 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>;
|
|
@@ -12,4 +13,4 @@ export declare function defineDockEntry<const T extends DevframeDockUserEntry, c
|
|
|
12
13
|
visibility?: WhenExpression<WhenContext, V>;
|
|
13
14
|
}): T;
|
|
14
15
|
//#endregion
|
|
15
|
-
export type
|
|
16
|
+
export { type ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, type DevframeChildProcessExecuteOptions, type DevframeChildProcessOutput, type DevframeChildProcessResult, type DevframeChildProcessTerminalSession, type DevframeClientCommand, type DevframeCommandAgentOptions, type DevframeCommandBase, type DevframeCommandEntry, type DevframeCommandHandle, type DevframeCommandKeybinding, type DevframeCommandShortcutOverrides, type DevframeCommandsHost, type DevframeCommandsHostEvents, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockActivation, type DevframeDockBadgeVariant, type DevframeDockEntriesGrouped, type DevframeDockEntry, type DevframeDockEntryBase, type DevframeDockEntryCategory, type DevframeDockEntryIcon, type DevframeDockEntryRegistry, type DevframeDockPanelState, type DevframeDockUserEntry, type DevframeDocksActiveState, type DevframeDocksHost, type DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, type DevframeMessageAction, type DevframeMessageActivateAction, type DevframeMessageCommandAction, 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 DevframePtyOutput, type DevframePtyResult, type DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeServerCommandEntry, type DevframeServerCommandInput, type DevframeTerminalSession, type DevframeTerminalSessionBase, type DevframeTerminalStatus, type DevframeTerminalsHost, type DevframeTitleLocales, type DevframeTitled, type DevframeViewAction, type DevframeViewBuiltin, type DevframeViewCustomRender, type DevframeViewGroup, type DevframeViewHost, type DevframeViewIframe, type DevframeViewLauncher, type DevframeViewLauncherStatus, type EventEmitter, type EventUnsubscribe, type EventsMap, type FrameSubTabsConfig, type NavTarget, type RemoteConnectionInfo, type RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, matchLocale, resolveTitle };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { n as defineDockEntry, r as defineHubRpcFunction, t as defineCommand } from "./define-Ceekw2EO.mjs";
|
|
2
|
-
|
|
2
|
+
import { n as resolveTitle, t as matchLocale } from "./locale-BbVtoVI6.mjs";
|
|
3
|
+
export { defineCommand, defineDockEntry, defineHubRpcFunction, matchLocale, resolveTitle };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region src/locale.ts
|
|
2
|
+
/**
|
|
3
|
+
* Pick the tag in `available` closest to `tag`: exact match first, then
|
|
4
|
+
* the Traditional Chinese family (`zh-Hant`, `zh-HK`, `zh-MO` → `zh-TW`),
|
|
5
|
+
* then the first tag sharing the language (`pt-PT` → `pt-BR`, `en-GB` → `en`).
|
|
6
|
+
*/
|
|
7
|
+
function matchLocale(tag, available) {
|
|
8
|
+
if (!tag) return void 0;
|
|
9
|
+
const tags = [...available];
|
|
10
|
+
const wanted = tag.toLowerCase();
|
|
11
|
+
const exact = tags.find((code) => code.toLowerCase() === wanted);
|
|
12
|
+
if (exact) return exact;
|
|
13
|
+
const [language, ...rest] = wanted.split("-");
|
|
14
|
+
if (language === "zh" && rest.some((part) => part === "hant" || part === "hk" || part === "mo" || part === "tw")) {
|
|
15
|
+
const traditional = tags.find((code) => code.toLowerCase() === "zh-tw");
|
|
16
|
+
if (traditional) return traditional;
|
|
17
|
+
}
|
|
18
|
+
return tags.find((code) => code.toLowerCase().split("-")[0] === language);
|
|
19
|
+
}
|
|
20
|
+
/** The `title` of a dock entry, command or launcher in `locale`, else its default `title`. */
|
|
21
|
+
function resolveTitle(titled, locale) {
|
|
22
|
+
const locales = titled.titleLocales;
|
|
23
|
+
if (!locales) return titled.title;
|
|
24
|
+
const matched = matchLocale(locale, Object.keys(locales));
|
|
25
|
+
return matched ? locales[matched] : titled.title;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { resolveTitle as n, matchLocale as t };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { R as DevframeTitled } from "./settings-DPLPzYfX.mjs";
|
|
2
|
+
//#region src/locale.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Pick the tag in `available` closest to `tag`: exact match first, then
|
|
5
|
+
* the Traditional Chinese family (`zh-Hant`, `zh-HK`, `zh-MO` → `zh-TW`),
|
|
6
|
+
* then the first tag sharing the language (`pt-PT` → `pt-BR`, `en-GB` → `en`).
|
|
7
|
+
*/
|
|
8
|
+
declare function matchLocale(tag: string | undefined, available: Iterable<string>): string | undefined;
|
|
9
|
+
/** The `title` of a dock entry, command or launcher in `locale`, else its default `title`. */
|
|
10
|
+
declare function resolveTitle(titled: DevframeTitled, locale: string | undefined): string;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { resolveTitle as n, matchLocale as t };
|
package/dist/node/build.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DevframeHubContext, t as CreateHubContextOptions } from "../context-
|
|
1
|
+
import { n as DevframeHubContext, t as CreateHubContextOptions } from "../context-BK50aJ-F.mjs";
|
|
2
2
|
import { DevframeHubUi, DevframesInput, DockRendererRegistration } from "./initiate.mjs";
|
|
3
3
|
import { DevframeServiceInput, DevframeStorageScope } from "devframe/types";
|
|
4
4
|
//#region src/node/build.d.ts
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { C as DevframeDockUserEntry, T as DevframeDocksHost$1, _ as DevframeDockEntry, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, l as DevframeCommandsHost$1, o as DevframeCommandHandle, p as ClientScriptEntry, t as DevframeDocksUserSettings } from "../settings-DPLPzYfX.mjs";
|
|
2
|
+
import { A as DevframeMessagesHost$1, E as DevframeMessageHandle, M as DevframeMessagesListDelta, O as DevframeMessageShortcutInput, S as DevframeMessageEntry, _ as DevframeTerminalsHost$1, a as InstallDevframeOptions, h as DevframeTerminalSessionBase, i as createHubContext, l as DevframeChildProcessTerminalSession, m as DevframeTerminalSession, n as DevframeHubContext, o as DevframeChildProcessExecuteOptions, p as DevframePtyTerminalSession, r as HubMountedFrame, t as CreateHubContextOptions, u as DevframePtyExecuteOptions, w as DevframeMessageEntryInput } from "../context-BK50aJ-F.mjs";
|
|
3
3
|
import { RpcFunctionDefinitionAny } from "devframe/rpc";
|
|
4
4
|
import { SharedState } from "devframe/utils/shared-state";
|
|
5
5
|
//#region src/node/host-commands.d.ts
|
package/dist/node/initiate.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as InstallDevframeOptions, n as DevframeHubContext, t as CreateHubContextOptions } from "../context-
|
|
2
|
-
import { r as DEVFRAMES_HUB_BASE } from "../constants-
|
|
1
|
+
import { a as InstallDevframeOptions, n as DevframeHubContext, t as CreateHubContextOptions } from "../context-BK50aJ-F.mjs";
|
|
2
|
+
import { r as DEVFRAMES_HUB_BASE } from "../constants-C7cDDASI.mjs";
|
|
3
3
|
import { DevframeInstanceRecord } from "devframe/internal";
|
|
4
4
|
import { Buffer } from "node:buffer";
|
|
5
5
|
import { AuthBannerFunction } from "devframe/recipes/interactive-auth";
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { ConnectionMeta, EventEmitter } from "devframe/types";
|
|
2
|
+
//#region src/types/locale.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Translations of a `title`, keyed by BCP 47 tag (`'zh-CN'`, `'ja'`). The
|
|
5
|
+
* plain `title` stays the default and is what a reader shows when no tag
|
|
6
|
+
* matches, so a registrant adds languages without breaking a reader that
|
|
7
|
+
* ignores this field. Resolve with `resolveTitle()` from `@devframes/hub`.
|
|
8
|
+
*/
|
|
9
|
+
type DevframeTitleLocales = Record<string, string>;
|
|
10
|
+
/** Anything carrying a `title` with optional translations: a dock entry, a command, a launcher. */
|
|
11
|
+
interface DevframeTitled {
|
|
12
|
+
title: string;
|
|
13
|
+
titleLocales?: DevframeTitleLocales;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
2
16
|
//#region ../../node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts
|
|
3
17
|
/** The Standard Typed interface. This is a base type extended by other specs. */
|
|
4
18
|
interface StandardTypedV1<Input = unknown, Output = Input> {
|
|
@@ -143,6 +157,8 @@ type DevframeDockBadgeVariant = 'default' | 'info' | 'success' | 'warning' | 'da
|
|
|
143
157
|
interface DevframeDockEntryBase {
|
|
144
158
|
id: string;
|
|
145
159
|
title: string;
|
|
160
|
+
/** Translations of `title` by BCP 47 tag; see `resolveTitle()` from `@devframes/hub`. */
|
|
161
|
+
titleLocales?: DevframeTitleLocales;
|
|
146
162
|
icon: DevframeDockEntryIcon;
|
|
147
163
|
/**
|
|
148
164
|
* The default order of the entry in the dock.
|
|
@@ -402,6 +418,7 @@ interface DevframeViewLauncher extends DevframeDockEntryBase {
|
|
|
402
418
|
launcher: {
|
|
403
419
|
icon?: DevframeDockEntryIcon;
|
|
404
420
|
title: string;
|
|
421
|
+
titleLocales?: DevframeTitleLocales;
|
|
405
422
|
status?: DevframeViewLauncherStatus;
|
|
406
423
|
error?: string;
|
|
407
424
|
description?: string;
|
|
@@ -561,6 +578,8 @@ interface DevframeCommandBase {
|
|
|
561
578
|
*/
|
|
562
579
|
id: string;
|
|
563
580
|
title: string;
|
|
581
|
+
/** Translations of `title` by BCP 47 tag; see `resolveTitle()` from `@devframes/hub`. */
|
|
582
|
+
titleLocales?: DevframeTitleLocales;
|
|
564
583
|
description?: string;
|
|
565
584
|
/**
|
|
566
585
|
* Icon for the command. Either an Iconify icon string (e.g. "ph:pencil-duotone")
|
|
@@ -582,6 +601,13 @@ interface DevframeCommandBase {
|
|
|
582
601
|
* when the expression evaluates to true.
|
|
583
602
|
*/
|
|
584
603
|
when?: string;
|
|
604
|
+
/**
|
|
605
|
+
* Whether keyboard shortcuts can invoke this command. Default: true.
|
|
606
|
+
* Set to false for commands that require arguments from their caller.
|
|
607
|
+
* The hub UI hides their shortcut settings and ignores default and saved bindings.
|
|
608
|
+
* Explicit calls through `commands.execute(id, ...args)` remain available.
|
|
609
|
+
*/
|
|
610
|
+
allowShortcuts?: boolean;
|
|
585
611
|
/**
|
|
586
612
|
* Default keyboard shortcut(s) for this command
|
|
587
613
|
*/
|
|
@@ -735,4 +761,4 @@ interface DevframeDocksUserSettings {
|
|
|
735
761
|
commandShortcuts: DevframeCommandShortcutOverrides;
|
|
736
762
|
}
|
|
737
763
|
//#endregion
|
|
738
|
-
export { DevframeViewIframe as A, DevframeDockUserEntry as C, DevframeViewBuiltin as D, DevframeViewAction as E, RemoteConnectionInfo as F, RemoteDockOptions as I, DevframeViewLauncherStatus as M, FrameSubTabsConfig as N, DevframeViewCustomRender as O, NavTarget as P, DevframeDockPanelState as S, DevframeDocksHost as T, DevframeDockEntry as _, DevframeCommandEntry as a, DevframeDockEntryIcon as b, DevframeCommandShortcutOverrides as c, DevframeServerCommandEntry as d, DevframeServerCommandInput as f, DevframeDockEntriesGrouped as g, DevframeDockBadgeVariant as h, DevframeCommandBase as i, DevframeViewLauncher as j, DevframeViewGroup 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, DevframeDockEntryBase as v, DevframeDocksActiveState as w, DevframeDockEntryRegistry as x, DevframeDockEntryCategory as y };
|
|
764
|
+
export { DevframeViewIframe as A, DevframeDockUserEntry as C, DevframeViewBuiltin as D, DevframeViewAction as E, RemoteConnectionInfo as F, RemoteDockOptions as I, DevframeTitleLocales as L, DevframeViewLauncherStatus as M, FrameSubTabsConfig as N, DevframeViewCustomRender as O, NavTarget as P, DevframeTitled as R, DevframeDockPanelState as S, DevframeDocksHost as T, DevframeDockEntry as _, DevframeCommandEntry as a, DevframeDockEntryIcon as b, DevframeCommandShortcutOverrides as c, DevframeServerCommandEntry as d, DevframeServerCommandInput as f, DevframeDockEntriesGrouped as g, DevframeDockBadgeVariant as h, DevframeCommandBase as i, DevframeViewLauncher as j, DevframeViewGroup 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, DevframeDockEntryBase as v, DevframeDocksActiveState as w, DevframeDockEntryRegistry as x, DevframeDockEntryCategory as y };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { A as
|
|
3
|
-
import { S as RpcStreamingHost, _ as RpcFunctionsHost, a as DevframeHost, b as RpcStreamingChannel, c as DevframeRpcServerFunctions, d as EventEmitter, f as EventUnsubscribe, g as RpcDefinitionsToFunctions, h as RpcDefinitionsFilter, i as DevframeDiagnosticsLogger, l as DevframeRpcSharedStates, m as RpcBroadcastOptions, n as DevframeCapabilities, o as DevframeNodeRpcSession, p as EventsMap, r as DevframeDiagnosticsHost, s as DevframeRpcClientFunctions, t as ConnectionMeta, u as DevframeViewHost, v as RpcSharedStateGetOptions, x as RpcStreamingChannelOptions, y as RpcSharedStateHost } from "../index-
|
|
4
|
-
export { ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, DevframeChildProcessExecuteOptions, DevframeChildProcessOutput, DevframeChildProcessResult, DevframeChildProcessTerminalSession, DevframeClientCommand, DevframeCommandAgentOptions, DevframeCommandBase, DevframeCommandEntry, DevframeCommandHandle, DevframeCommandKeybinding, DevframeCommandShortcutOverrides, DevframeCommandsHost, DevframeCommandsHostEvents, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, DevframeDockActivation, DevframeDockBadgeVariant, DevframeDockEntriesGrouped, DevframeDockEntry, DevframeDockEntryBase, DevframeDockEntryCategory, DevframeDockEntryIcon, DevframeDockEntryRegistry, DevframeDockPanelState, DevframeDockUserEntry, DevframeDocksActiveState, DevframeDocksHost, DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, DevframeMessageAction, DevframeMessageActivateAction, DevframeMessageCommandAction, DevframeMessageElementPosition, DevframeMessageEntry, DevframeMessageEntryFrom, DevframeMessageEntryInput, DevframeMessageFilePosition, DevframeMessageHandle, DevframeMessageLevel, DevframeMessageShortcutInput, DevframeMessagesClient, DevframeMessagesHost, DevframeMessagesLevelShortcuts, DevframeMessagesListDelta, type DevframeNodeRpcSession, DevframePtyExecuteOptions, DevframePtyOutput, DevframePtyResult, DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, DevframeServerCommandEntry, DevframeServerCommandInput, DevframeTerminalSession, DevframeTerminalSessionBase, DevframeTerminalStatus, DevframeTerminalsHost, DevframeViewAction, DevframeViewBuiltin, DevframeViewCustomRender, DevframeViewGroup, type DevframeViewHost, DevframeViewIframe, DevframeViewLauncher, DevframeViewLauncherStatus, type EventEmitter, type EventUnsubscribe, type EventsMap, FrameSubTabsConfig, NavTarget, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost };
|
|
1
|
+
import { A as DevframeViewIframe, C as DevframeDockUserEntry, D as DevframeViewBuiltin, E as DevframeViewAction, F as RemoteConnectionInfo, I as RemoteDockOptions, L as DevframeTitleLocales, M as DevframeViewLauncherStatus, N as FrameSubTabsConfig, O as DevframeViewCustomRender, P as NavTarget, R as DevframeTitled, S as DevframeDockPanelState, T as DevframeDocksHost, _ as DevframeDockEntry, a as DevframeCommandEntry, b as DevframeDockEntryIcon, c as DevframeCommandShortcutOverrides, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, g as DevframeDockEntriesGrouped, h as DevframeDockBadgeVariant, i as DevframeCommandBase, j as DevframeViewLauncher, k as DevframeViewGroup, l as DevframeCommandsHost, m as DevframeDockActivation, n as DevframeClientCommand, o as DevframeCommandHandle, p as ClientScriptEntry, r as DevframeCommandAgentOptions, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings, u as DevframeCommandsHostEvents, v as DevframeDockEntryBase, w as DevframeDocksActiveState, x as DevframeDockEntryRegistry, y as DevframeDockEntryCategory } from "../settings-DPLPzYfX.mjs";
|
|
2
|
+
import { A as DevframeMessagesHost, C as DevframeMessageEntryFrom, D as DevframeMessageLevel, E as DevframeMessageHandle, M as DevframeMessagesListDelta, O as DevframeMessageShortcutInput, S as DevframeMessageEntry, T as DevframeMessageFilePosition, _ as DevframeTerminalsHost, b as DevframeMessageCommandAction, c as DevframeChildProcessResult, d as DevframePtyOutput, f as DevframePtyResult, g as DevframeTerminalStatus, h as DevframeTerminalSessionBase, j as DevframeMessagesLevelShortcuts, k as DevframeMessagesClient, l as DevframeChildProcessTerminalSession, m as DevframeTerminalSession, n as DevframeHubContext, o as DevframeChildProcessExecuteOptions, p as DevframePtyTerminalSession, s as DevframeChildProcessOutput, t as CreateHubContextOptions, u as DevframePtyExecuteOptions, v as DevframeMessageAction, w as DevframeMessageEntryInput, x as DevframeMessageElementPosition, y as DevframeMessageActivateAction } from "../context-BK50aJ-F.mjs";
|
|
3
|
+
import { S as RpcStreamingHost, _ as RpcFunctionsHost, a as DevframeHost, b as RpcStreamingChannel, c as DevframeRpcServerFunctions, d as EventEmitter, f as EventUnsubscribe, g as RpcDefinitionsToFunctions, h as RpcDefinitionsFilter, i as DevframeDiagnosticsLogger, l as DevframeRpcSharedStates, m as RpcBroadcastOptions, n as DevframeCapabilities, o as DevframeNodeRpcSession, p as EventsMap, r as DevframeDiagnosticsHost, s as DevframeRpcClientFunctions, t as ConnectionMeta, u as DevframeViewHost, v as RpcSharedStateGetOptions, x as RpcStreamingChannelOptions, y as RpcSharedStateHost } from "../index-BvEO3eOd.mjs";
|
|
4
|
+
export { ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, DevframeChildProcessExecuteOptions, DevframeChildProcessOutput, DevframeChildProcessResult, DevframeChildProcessTerminalSession, DevframeClientCommand, DevframeCommandAgentOptions, DevframeCommandBase, DevframeCommandEntry, DevframeCommandHandle, DevframeCommandKeybinding, DevframeCommandShortcutOverrides, DevframeCommandsHost, DevframeCommandsHostEvents, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, DevframeDockActivation, DevframeDockBadgeVariant, DevframeDockEntriesGrouped, DevframeDockEntry, DevframeDockEntryBase, DevframeDockEntryCategory, DevframeDockEntryIcon, DevframeDockEntryRegistry, DevframeDockPanelState, DevframeDockUserEntry, DevframeDocksActiveState, DevframeDocksHost, DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, DevframeMessageAction, DevframeMessageActivateAction, DevframeMessageCommandAction, DevframeMessageElementPosition, DevframeMessageEntry, DevframeMessageEntryFrom, DevframeMessageEntryInput, DevframeMessageFilePosition, DevframeMessageHandle, DevframeMessageLevel, DevframeMessageShortcutInput, DevframeMessagesClient, DevframeMessagesHost, DevframeMessagesLevelShortcuts, DevframeMessagesListDelta, type DevframeNodeRpcSession, DevframePtyExecuteOptions, DevframePtyOutput, DevframePtyResult, DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, DevframeServerCommandEntry, DevframeServerCommandInput, DevframeTerminalSession, DevframeTerminalSessionBase, DevframeTerminalStatus, DevframeTerminalsHost, DevframeTitleLocales, DevframeTitled, DevframeViewAction, DevframeViewBuiltin, DevframeViewCustomRender, DevframeViewGroup, type DevframeViewHost, DevframeViewIframe, DevframeViewLauncher, DevframeViewLauncherStatus, type EventEmitter, type EventUnsubscribe, type EventsMap, FrameSubTabsConfig, NavTarget, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devframes/hub",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"description": "Hub layer that orchestrates devframe docks, terminals, messages, and commands on any host.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@devframes/agentic": "1.1
|
|
39
|
-
"devframe": "1.1
|
|
38
|
+
"@devframes/agentic": "1.2.1",
|
|
39
|
+
"devframe": "1.2.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependenciesMeta": {
|
|
42
42
|
"@devframes/agentic": {
|
|
@@ -45,16 +45,16 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"destr": "^2.0.5",
|
|
48
|
-
"h3": "^2.0.1
|
|
48
|
+
"h3": "^2.0.1",
|
|
49
49
|
"pathe": "^2.0.3",
|
|
50
50
|
"tinyexec": "^1.3.1",
|
|
51
51
|
"zigpty": "^0.2.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@devframes/agentic": "1.1
|
|
54
|
+
"@devframes/agentic": "1.2.1",
|
|
55
55
|
"@standard-schema/spec": "^1.1.0",
|
|
56
|
-
"@types/node": "^26.6.
|
|
57
|
-
"devframe": "1.1
|
|
56
|
+
"@types/node": "^26.6.4",
|
|
57
|
+
"devframe": "1.2.1",
|
|
58
58
|
"get-port-please": "^3.2.0",
|
|
59
59
|
"tsdown": "^0.23.0",
|
|
60
60
|
"valibot": "^1.5.0"
|