@dsh-plus/subagent-model 0.3.24 → 0.3.25

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.
Files changed (2) hide show
  1. package/lib/client.js +75 -64
  2. package/package.json +2 -2
package/lib/client.js CHANGED
@@ -7,6 +7,75 @@ window.__ModuleLoader__.load({
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
8
  let react = require("react");
9
9
  require("@deepseek-ai/dsh-client-ui-primitives");
10
+ //#region ../shared/src/client/fields.tsx
11
+ /** 卡片按钮(与 CardChrome 页脚同一套类名与视觉)。 */
12
+ function Button(props) {
13
+ const p = props.prefix ?? "dshp";
14
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
15
+ type: "button",
16
+ className: `${p}-btn ${props.variant === "primary" ? `${p}-btnPrimary` : `${p}-btnGhost`}`,
17
+ disabled: props.disabled === true,
18
+ onClick: props.onClick,
19
+ children: props.label
20
+ });
21
+ }
22
+ /**
23
+ * 勾选行:自绘圆角扁平开关(switch),对齐官方 WebUI 无原生 checkbox 的
24
+ * 设计语言(官方选择类控件全走胶囊/菜单,见 cardCss 的 -switch 规则)。
25
+ * 语义保持 checkbox(无障碍树与表单语义不变),视觉自绘。
26
+ */
27
+ function CheckRow(props) {
28
+ const p = props.prefix ?? "dshp";
29
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
30
+ className: `${p}-checkRow`,
31
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
32
+ id: props.id,
33
+ type: "checkbox",
34
+ role: "switch",
35
+ "aria-checked": props.checked,
36
+ checked: props.checked,
37
+ disabled: props.disabled === true,
38
+ onChange: (event) => props.onEdit(event.target.checked)
39
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
40
+ htmlFor: props.id,
41
+ children: props.label
42
+ })]
43
+ });
44
+ }
45
+ function SelectField(props) {
46
+ const p = props.prefix ?? "dshp";
47
+ const invalid = props.invalid === true;
48
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
49
+ className: `${p}-field`,
50
+ children: [
51
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
52
+ className: `${p}-head`,
53
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
54
+ className: `${p}-label`,
55
+ htmlFor: props.id,
56
+ children: props.label
57
+ })
58
+ }),
59
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
60
+ id: props.id,
61
+ className: `${p}-select${invalid ? ` ${p}-inputInvalid` : ""}`,
62
+ "aria-invalid": invalid || void 0,
63
+ value: props.value,
64
+ disabled: props.disabled === true,
65
+ onChange: (event) => props.onEdit(event.target.value),
66
+ children: props.options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
67
+ value: option.value,
68
+ children: option.label
69
+ }, option.value))
70
+ }),
71
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
72
+ className: invalid ? `${p}-invalid` : `${p}-hint`,
73
+ children: invalid ? props.invalidLabel ?? "" : props.hint ?? ""
74
+ })
75
+ ]
76
+ });
77
+ }
78
+ //#endregion
10
79
  //#region ../shared/src/client/card.tsx
11
80
  const IDLE_STATUS = {
12
81
  kind: "idle",
@@ -55,12 +124,12 @@ window.__ModuleLoader__.load({
55
124
  className: `${p}-status${props.status.kind === "error" ? ` ${p}-statusError` : ""}`,
56
125
  role: "status",
57
126
  children: props.status.text
58
- }) : null, props.actions.map((action) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
59
- type: "button",
60
- className: `${p}-btn ${action.variant === "primary" ? `${p}-btnPrimary` : `${p}-btnGhost`}`,
61
- disabled: action.disabled === true,
62
- onClick: action.onClick,
63
- children: action.label
127
+ }) : null, props.actions.map((action) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
128
+ prefix: p,
129
+ label: action.label,
130
+ variant: action.variant,
131
+ disabled: action.disabled,
132
+ onClick: action.onClick
64
133
  }, action.key))]
65
134
  })
66
135
  ]
@@ -115,64 +184,6 @@ window.__ModuleLoader__.load({
115
184
  * @module @dsh-plus/shared/client/draft
116
185
  */
117
186
  //#endregion
118
- //#region ../shared/src/client/fields.tsx
119
- /**
120
- * 勾选行:自绘圆角扁平开关(switch),对齐官方 WebUI 无原生 checkbox 的
121
- * 设计语言(官方选择类控件全走胶囊/菜单,见 cardCss 的 -switch 规则)。
122
- * 语义保持 checkbox(无障碍树与表单语义不变),视觉自绘。
123
- */
124
- function CheckRow(props) {
125
- const p = props.prefix ?? "dshp";
126
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
127
- className: `${p}-checkRow`,
128
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
129
- id: props.id,
130
- type: "checkbox",
131
- role: "switch",
132
- "aria-checked": props.checked,
133
- checked: props.checked,
134
- disabled: props.disabled === true,
135
- onChange: (event) => props.onEdit(event.target.checked)
136
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
137
- htmlFor: props.id,
138
- children: props.label
139
- })]
140
- });
141
- }
142
- function SelectField(props) {
143
- const p = props.prefix ?? "dshp";
144
- const invalid = props.invalid === true;
145
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
146
- className: `${p}-field`,
147
- children: [
148
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
149
- className: `${p}-head`,
150
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
151
- className: `${p}-label`,
152
- htmlFor: props.id,
153
- children: props.label
154
- })
155
- }),
156
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
157
- id: props.id,
158
- className: `${p}-select${invalid ? ` ${p}-inputInvalid` : ""}`,
159
- "aria-invalid": invalid || void 0,
160
- value: props.value,
161
- disabled: props.disabled === true,
162
- onChange: (event) => props.onEdit(event.target.value),
163
- children: props.options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
164
- value: option.value,
165
- children: option.label
166
- }, option.value))
167
- }),
168
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
169
- className: invalid ? `${p}-invalid` : `${p}-hint`,
170
- children: invalid ? props.invalidLabel ?? "" : props.hint ?? ""
171
- })
172
- ]
173
- });
174
- }
175
- //#endregion
176
187
  //#region ../shared/src/client/i18n.ts
177
188
  /** 卡片通用文案(save/discard/unsaved/loading 等四插件共有键)。 */
178
189
  const commonZh = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-plus/subagent-model",
3
- "version": "0.3.24",
3
+ "version": "0.3.25",
4
4
  "description": "dsh-plus service+ui plugin: 为 subagent/subagent_fork 等子代理按提供商配置模型与思考程度(或继承主代理)",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -19,7 +19,7 @@
19
19
  "src"
20
20
  ],
21
21
  "dependencies": {
22
- "@dsh-plus/shared": "0.1.34"
22
+ "@dsh-plus/shared": "0.1.35"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@deepseek-ai/cordis": "^4.0.5-alpha.1",