@dsh-plus/image-studio 0.1.25 → 0.1.27

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 +54 -43
  2. package/package.json +2 -2
package/lib/client.js CHANGED
@@ -7,6 +7,54 @@ window.__ModuleLoader__.load({
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
8
  let react = require("react");
9
9
  let _deepseek_ai_dsh_client_ui_primitives = 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
+ function TextField(props) {
23
+ const p = props.prefix ?? "dshp";
24
+ const invalid = props.invalid === true;
25
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
26
+ className: `${p}-field`,
27
+ children: [
28
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
29
+ className: `${p}-head`,
30
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
31
+ className: `${p}-label`,
32
+ htmlFor: props.id,
33
+ children: props.label
34
+ }), props.badge !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
35
+ className: `${p}-badge ${props.badge.set ? `${p}-badgeSet` : `${p}-badgeUnset`}`,
36
+ children: props.badge.text
37
+ }) : null]
38
+ }),
39
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
40
+ id: props.id,
41
+ className: `${p}-input${invalid ? ` ${p}-inputInvalid` : ""}`,
42
+ type: props.password === true ? "password" : "text",
43
+ inputMode: props.numeric === true ? "numeric" : void 0,
44
+ autoComplete: props.password === true ? "off" : void 0,
45
+ "aria-invalid": invalid || void 0,
46
+ value: props.value,
47
+ disabled: props.disabled === true,
48
+ onChange: (event) => props.onEdit(event.target.value)
49
+ }),
50
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
51
+ className: invalid ? `${p}-invalid` : `${p}-hint`,
52
+ children: invalid ? props.invalidLabel ?? "" : props.hint ?? ""
53
+ })
54
+ ]
55
+ });
56
+ }
57
+ //#endregion
10
58
  //#region ../shared/src/client/card.tsx
11
59
  const IDLE_STATUS = {
12
60
  kind: "idle",
@@ -55,12 +103,12 @@ window.__ModuleLoader__.load({
55
103
  className: `${p}-status${props.status.kind === "error" ? ` ${p}-statusError` : ""}`,
56
104
  role: "status",
57
105
  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
106
+ }) : null, props.actions.map((action) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
107
+ prefix: p,
108
+ label: action.label,
109
+ variant: action.variant,
110
+ disabled: action.disabled,
111
+ onClick: action.onClick
64
112
  }, action.key))]
65
113
  })
66
114
  ]
@@ -136,43 +184,6 @@ window.__ModuleLoader__.load({
136
184
  }), guard);
137
185
  }
138
186
  //#endregion
139
- //#region ../shared/src/client/fields.tsx
140
- function TextField(props) {
141
- const p = props.prefix ?? "dshp";
142
- const invalid = props.invalid === true;
143
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
144
- className: `${p}-field`,
145
- children: [
146
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
147
- className: `${p}-head`,
148
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
149
- className: `${p}-label`,
150
- htmlFor: props.id,
151
- children: props.label
152
- }), props.badge !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
153
- className: `${p}-badge ${props.badge.set ? `${p}-badgeSet` : `${p}-badgeUnset`}`,
154
- children: props.badge.text
155
- }) : null]
156
- }),
157
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
158
- id: props.id,
159
- className: `${p}-input${invalid ? ` ${p}-inputInvalid` : ""}`,
160
- type: props.password === true ? "password" : "text",
161
- inputMode: props.numeric === true ? "numeric" : void 0,
162
- autoComplete: props.password === true ? "off" : void 0,
163
- "aria-invalid": invalid || void 0,
164
- value: props.value,
165
- disabled: props.disabled === true,
166
- onChange: (event) => props.onEdit(event.target.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 ../../node_modules/.pnpm/lucide-react@1.38.0_react@18.2.0/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
177
188
  /**
178
189
  * @license lucide-react v1.38.0 - ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-plus/image-studio",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "dsh-plus service+ui plugin: 图像工作室——OpenAI Images 协议文生图/图生图,全参数开关化,双预设体系,并发生图任务与可二次编辑画廊",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "https-proxy-agent": "^9.1.0",
23
- "@dsh-plus/shared": "0.1.33"
23
+ "@dsh-plus/shared": "0.1.35"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@deepseek-ai/cordis": "^4.0.5-alpha.1",