@jiyr0119/dsh-service-console 0.2.2 → 0.3.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/docs/local-debugging.md +158 -0
- package/dsh.plugin.json +1 -1
- package/lib/client.js +806 -452
- package/lib/types/client/ServiceConsole.d.ts +16 -5
- package/lib/types/client/dictionaries.d.ts +6 -0
- package/lib/types/client/index.d.ts +8 -6
- package/package.json +1 -1
|
@@ -1,14 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-service-console — 面板组件(原生包 v2)
|
|
3
|
+
*
|
|
4
|
+
* 架构对齐 dsh-workspace-explorer:
|
|
5
|
+
* - i18n: 通过 locale.bind(NS) 获取翻译函数(而非硬编码 TEXTS)
|
|
6
|
+
* - API: 通过 fetch 直连 webServer JSON 路由(不走 host.call / LLM)
|
|
7
|
+
* - UI: 抽屉式面板 + Tab 栏(服务 / 设置),对标 workspace-explorer 视觉风格
|
|
8
|
+
*/
|
|
1
9
|
import * as React from 'react';
|
|
2
10
|
interface TimerLike {
|
|
3
11
|
timeout(callback: () => void, delay: number): () => void;
|
|
4
12
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
getLocale: () => {
|
|
13
|
+
interface LocaleLike {
|
|
14
|
+
getLocale(): {
|
|
8
15
|
id?: string;
|
|
9
16
|
};
|
|
10
|
-
subscribe
|
|
11
|
-
|
|
17
|
+
subscribe(fn: () => void): () => void;
|
|
18
|
+
bind(ns: string): (key: string, vars?: Record<string, string | number>) => string;
|
|
19
|
+
}
|
|
20
|
+
export declare function bindTimer(t: TimerLike): void;
|
|
21
|
+
export declare function bindLocale(locale: LocaleLike): void;
|
|
12
22
|
export declare function ServiceConsoleEntry(): React.ReactElement;
|
|
23
|
+
export declare function ServiceConsoleSettings(): React.ReactElement;
|
|
13
24
|
export declare function ServiceConsolePanel(): React.ReactElement | null;
|
|
14
25
|
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
interface CtxLike {
|
|
2
|
+
get(name: string): unknown;
|
|
3
|
+
effect(fn: () => () => void): void;
|
|
4
|
+
timer: {
|
|
5
|
+
timeout(cb: () => void, ms: number): () => void;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
1
8
|
declare const _default: {
|
|
2
9
|
inject: string[];
|
|
3
|
-
apply(ctx:
|
|
4
|
-
get(name: string): unknown;
|
|
5
|
-
timer: {
|
|
6
|
-
timeout(cb: () => void, ms: number): () => void;
|
|
7
|
-
};
|
|
8
|
-
}): void;
|
|
10
|
+
apply(ctx: CtxLike): void;
|
|
9
11
|
};
|
|
10
12
|
export default _default;
|
package/package.json
CHANGED