@zhushanwen/extension-protocol 0.24.0 → 0.25.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/index.d.ts +17 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -100,6 +100,23 @@ interface GuiComponentProps {
|
|
|
100
100
|
args?: Record<string, string | number | boolean>;
|
|
101
101
|
}[];
|
|
102
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* 文本输入——GuiComponent 协议输入原语(provider-plugin-access D8:粘贴 PAT、
|
|
105
|
+
* 填回调地址)。值变更即经 plugin.uiEvent 回传({ viewId, componentId: id,
|
|
106
|
+
* event, value },插件侧始终持有最新值);确认动作复用 action-bar 按钮点击——
|
|
107
|
+
* 「输入 + 确认」两者组合完成,无表单聚合原语(single-select / form 砍除)。
|
|
108
|
+
* 宿主只做形状校验(value 标量、深度 ≤ 2),业务校验归插件。渲染端缺
|
|
109
|
+
* uiEvent 出口时输入框禁用 + warn(TabBar 降级出声范式)。
|
|
110
|
+
*/
|
|
111
|
+
'text-input': {
|
|
112
|
+
/** 组件 id(uiEvent 回传的 componentId,插件定位输入项的键) */
|
|
113
|
+
id: string;
|
|
114
|
+
label?: string;
|
|
115
|
+
placeholder?: string;
|
|
116
|
+
/** 当前值(插件推树携带,宿主受控渲染——单值权威在插件侧) */
|
|
117
|
+
value?: string;
|
|
118
|
+
multiline?: boolean;
|
|
119
|
+
};
|
|
103
120
|
/** 自定义组件——逃生口(仅限内置 extension 编译期注册) */
|
|
104
121
|
'custom': {
|
|
105
122
|
component: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhushanwen/extension-protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Cross-layer pi extension contract package: dual-mode (TUI/GUI) rendering helpers, session/background-task/pending-entries protocols, and shared behavior primitives",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,6 +33,6 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "tsup",
|
|
35
35
|
"typecheck": "tsc --noEmit",
|
|
36
|
-
"test": "vitest run"
|
|
36
|
+
"test": "vitest run --pool=threads"
|
|
37
37
|
}
|
|
38
38
|
}
|