@lmzhen/dsh-evolution-skill-health 0.25.7 → 0.25.9

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 +59 -59
  2. package/package.json +3 -3
package/lib/client.js CHANGED
@@ -104,6 +104,64 @@ window.__ModuleLoader__.load({
104
104
  "loading.failed": "Reading failed — this cannot be judged right now; press Refresh to retry."
105
105
  };
106
106
  //#endregion
107
+ //#region src/client/styles.ts
108
+ /**
109
+ * The panel stylesheet. The bundle is built outside the platform CSS-Modules pipeline, so it carries
110
+ * the text itself and injects one tagged <style> element; the tag id keeps a hot reload from stacking
111
+ * copies. Only the panel body is styled — the sidebar owns the row and its glyph slot.
112
+ *
113
+ * Token discipline (the family gate `verify-client-tokens --strict` enforces it): every `--evo-*` name
114
+ * below is DECLARED in `packages/scripts/client-tokens.json` — the family scale — and every `--dsw-*`
115
+ * name is a platform semantic alias (packages/client/ui-theme/src/styles). No type step, space, radius,
116
+ * hairline or colour is invented here, and no pixel geometry literal appears.
117
+ *
118
+ * Metrics are COPIED from the platform’s own components rather than invented, each cited here:
119
+ *
120
+ * - hover and current-row fills (`--dsw-alias-interactive-bg-hover`) follow the platform sidebar row
121
+ * (client/ui-sidebar/…/SidebarRoot.module.css), as the sibling panel does;
122
+ * - label steps (`--dsw-alias-label-primary/secondary/tertiary`) and the card hairline
123
+ * (`--evo-hairline-width`, the scale’s copy of the platform’s 0.5px card border) come from
124
+ * client/ui-chat/…/GenericCommandCard.module.css;
125
+ * - the control radius (`--evo-radius-control`, the scale’s copy of the platform field radius) comes
126
+ * from client/ui-primitives/Input.module.css; the capsule uses `--evo-radius-pill`;
127
+ * - verdict colours are the platform STATE aliases (state-success / state-warn / state-error) plus the
128
+ * scale’s `--evo-tone-quiet`; the validity bar is an inset shadow, not a border-width literal.
129
+ *
130
+ * Layout: four verdict cards, then the by-rule table as a grid (rule / skills / count) so numbers sit
131
+ * on tabular figures and long skill lists wrap into pills instead of ragged comma text.
132
+ * @module @lmzhen/dsh-evolution-skill-health/client
133
+ */
134
+ /** Tag id for the injected <style>, so a hot reload replaces rather than stacks it. */
135
+ const CSS_TAG_ID = "dsh-evolution-skill-health";
136
+ /** The panel stylesheet text. */
137
+ const CSS = [
138
+ ":where(.dsh-evolution-skill-health) { --evo-type-lg:calc(1em + 2px);--evo-type-body:1em;--evo-type-sm:calc(1em - 1px);--evo-type-xs:calc(1em - 2px);--evo-space-2:2px;--evo-space-4:4px;--evo-space-6:6px;--evo-space-8:8px;--evo-space-10:10px;--evo-space-12:12px;--evo-space-14:14px;--evo-space-16:16px;--evo-space-20:20px;--evo-radius-chip:4px;--evo-radius-control:8px;--evo-radius-surface:12px;--evo-radius-pill:999px;--evo-hairline-width:.5px;--evo-hairline-marker:2px;--evo-measure-read:80ch;--evo-leading-base:1.5;--evo-tone-quiet:var(--dsw-alias-label-secondary);--evo-tone-primary:var(--dsw-alias-brand-primary);--evo-tone-danger:var(--dsw-alias-state-error-primary);--evo-tone-success:var(--dsw-alias-state-success-primary);--evo-focus-ring:2px solid var(--dsw-alias-label-primary);--evo-focus-offset:-2px;--evo-cap-aside:280px;--evo-cap-block:260px }",
139
+ ":where(.dsh-evolution-skill-health) { display: flex; flex-direction: column; gap: var(--evo-space-12); padding: var(--evo-space-16); color: var(--dsw-alias-label-primary); font-size: var(--evo-type-sm); line-height: var(--evo-leading-base); }",
140
+ ":where(.dsh-evolution-skill-health [data-role=\"hint\"]) { margin: 0; color: var(--dsw-alias-label-secondary); }",
141
+ ":where(.dsh-evolution-skill-health [data-role=\"stats\"]) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--evo-space-8); }",
142
+ ":where(.dsh-evolution-skill-health [data-role=\"stat\"]) { display: flex; flex-direction: column; gap: var(--evo-space-2); padding: var(--evo-space-8) var(--evo-space-10); border: var(--evo-hairline-width) solid var(--dsw-alias-border-l); border-radius: var(--evo-radius-control); }",
143
+ ":where(.dsh-evolution-skill-health [data-role=\"stat\"][data-tone=\"ok\"]) { box-shadow: inset 2px 0 0 var(--dsw-alias-state-success-primary); }",
144
+ ":where(.dsh-evolution-skill-health [data-role=\"stat\"][data-tone=\"warn\"]) { box-shadow: inset 2px 0 0 var(--dsw-alias-state-warn-primary); }",
145
+ ":where(.dsh-evolution-skill-health [data-role=\"stat\"][data-tone=\"error\"]) { box-shadow: inset 2px 0 0 var(--dsw-alias-state-error-primary); }",
146
+ ":where(.dsh-evolution-skill-health [data-role=\"stat\"][data-tone=\"unreadable\"]) { box-shadow: inset 2px 0 0 var(--evo-tone-quiet); }",
147
+ ":where(.dsh-evolution-skill-health [data-role=\"stat-value\"]) { font-size: var(--evo-type-lg); font-variant-numeric: tabular-nums; line-height: 1; }",
148
+ ":where(.dsh-evolution-skill-health [data-role=\"stat-label\"]) { color: var(--dsw-alias-label-tertiary); }",
149
+ ":where(.dsh-evolution-skill-health [data-role=\"group-title\"]) { margin: 0; font-weight: 500; }",
150
+ ":where(.dsh-evolution-skill-health [data-role=\"rule-table\"]) { display: flex; flex-direction: column; border: var(--evo-hairline-width) solid var(--dsw-alias-border-l); border-radius: var(--evo-radius-control); overflow: hidden; }",
151
+ ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"]) { display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr) 4rem; gap: var(--evo-space-10); align-items: center; padding: var(--evo-space-6) var(--evo-space-10); border-top: var(--evo-hairline-width) solid var(--dsw-alias-border-l); }",
152
+ ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"][data-tone=\"warn\"]) { box-shadow: inset var(--evo-hairline-marker) 0 0 var(--dsw-alias-state-warn-primary); }",
153
+ ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"][data-tone=\"error\"]) { box-shadow: inset var(--evo-hairline-marker) 0 0 var(--dsw-alias-state-error-primary); }",
154
+ ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"][data-tone=\"unreadable\"]) { box-shadow: inset var(--evo-hairline-marker) 0 0 var(--evo-tone-quiet); }",
155
+ ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"]:hover) { background: var(--dsw-alias-interactive-bg-hover); }",
156
+ ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"]:focus-visible) { outline: var(--evo-focus-ring); outline-offset: var(--evo-focus-offset); }",
157
+ ":where(.dsh-evolution-skill-health [data-role=\"rule-head\"]) { border-top: 0; color: var(--dsw-alias-label-tertiary); }",
158
+ ":where(.dsh-evolution-skill-health [data-role=\"rule-name\"]) { overflow-wrap: anywhere; }",
159
+ ":where(.dsh-evolution-skill-health [data-role=\"rule-count\"]) { text-align: right; font-variant-numeric: tabular-nums; color: var(--dsw-alias-label-secondary); }",
160
+ ":where(.dsh-evolution-skill-health [data-role=\"skills\"]) { display: flex; flex-wrap: wrap; gap: var(--evo-space-4); }",
161
+ ":where(.dsh-evolution-skill-health [data-role=\"skill-pill\"]) { padding: 0 var(--evo-space-6); border: var(--evo-hairline-width) solid var(--dsw-alias-border-l); border-radius: var(--evo-radius-pill); color: var(--dsw-alias-label-secondary); white-space: nowrap; }",
162
+ ":where(.dsh-evolution-skill-health [data-role=\"note\"]) { margin: 0; color: var(--dsw-alias-label-secondary); }"
163
+ ].join(String.fromCharCode(10));
164
+ //#endregion
107
165
  //#region src/client/Panel.ts
108
166
  /**
109
167
  * The panel body: a four-state summary plus the list aggregated BY RULE.
@@ -205,70 +263,12 @@ window.__ModuleLoader__.load({
205
263
  "data-role": "stat",
206
264
  "data-tone": kind
207
265
  }, (0, react.createElement)("div", { "data-role": "stat-value" }, String(counts.get(kind) ?? 0)), (0, react.createElement)("div", { "data-role": "stat-label" }, t("verdict." + kind)))));
208
- return (0, react.createElement)("section", null, (0, react.createElement)("p", { "data-role": "hint" }, t("hint")), stats, view.truncated ? (0, react.createElement)("p", { "data-role": "note" }, t("loading.failed")) : null, failed === void 0 ? null : (0, react.createElement)("p", { "data-role": "note" }, t("read.failed") + " " + failed), view.rows.length === 0 ? (0, react.createElement)("p", { "data-role": "note" }, t("empty.noneReported")) : null, (0, react.createElement)("h3", { "data-role": "group-title" }, t("group.byRule")), ruleTable(view, t), view.rows.filter((row) => row.verdict === "unreadable").map((row) => (0, react.createElement)("p", {
266
+ return (0, react.createElement)("section", { className: CSS_TAG_ID }, (0, react.createElement)("p", { "data-role": "hint" }, t("hint")), stats, view.truncated ? (0, react.createElement)("p", { "data-role": "note" }, t("loading.failed")) : null, failed === void 0 ? null : (0, react.createElement)("p", { "data-role": "note" }, t("read.failed") + " " + failed), view.rows.length === 0 ? (0, react.createElement)("p", { "data-role": "note" }, t("empty.noneReported")) : null, (0, react.createElement)("h3", { "data-role": "group-title" }, t("group.byRule")), ruleTable(view, t), view.rows.filter((row) => row.verdict === "unreadable").map((row) => (0, react.createElement)("p", {
209
267
  key: row.name + ":unreadable",
210
268
  "data-role": "note"
211
269
  }, row.name + " — " + t("unreadable.note"))));
212
270
  }
213
271
  //#endregion
214
- //#region src/client/styles.ts
215
- /**
216
- * The panel stylesheet. The bundle is built outside the platform CSS-Modules pipeline, so it carries
217
- * the text itself and injects one tagged <style> element; the tag id keeps a hot reload from stacking
218
- * copies. Only the panel body is styled — the sidebar owns the row and its glyph slot.
219
- *
220
- * Token discipline (the family gate `verify-client-tokens --strict` enforces it): every `--evo-*` name
221
- * below is DECLARED in `packages/scripts/client-tokens.json` — the family scale — and every `--dsw-*`
222
- * name is a platform semantic alias (packages/client/ui-theme/src/styles). No type step, space, radius,
223
- * hairline or colour is invented here, and no pixel geometry literal appears.
224
- *
225
- * Metrics are COPIED from the platform’s own components rather than invented, each cited here:
226
- *
227
- * - hover and current-row fills (`--dsw-alias-interactive-bg-hover`) follow the platform sidebar row
228
- * (client/ui-sidebar/…/SidebarRoot.module.css), as the sibling panel does;
229
- * - label steps (`--dsw-alias-label-primary/secondary/tertiary`) and the card hairline
230
- * (`--evo-hairline-width`, the scale’s copy of the platform’s 0.5px card border) come from
231
- * client/ui-chat/…/GenericCommandCard.module.css;
232
- * - the control radius (`--evo-radius-control`, the scale’s copy of the platform field radius) comes
233
- * from client/ui-primitives/Input.module.css; the capsule uses `--evo-radius-pill`;
234
- * - verdict colours are the platform STATE aliases (state-success / state-warn / state-error) plus the
235
- * scale’s `--evo-tone-quiet`; the validity bar is an inset shadow, not a border-width literal.
236
- *
237
- * Layout: four verdict cards, then the by-rule table as a grid (rule / skills / count) so numbers sit
238
- * on tabular figures and long skill lists wrap into pills instead of ragged comma text.
239
- * @module @lmzhen/dsh-evolution-skill-health/client
240
- */
241
- /** Tag id for the injected <style>, so a hot reload replaces rather than stacks it. */
242
- const CSS_TAG_ID = "dsh-evolution-skill-health";
243
- /** The panel stylesheet text. */
244
- const CSS = [
245
- ":where(.dsh-evolution-skill-health) { --evo-type-lg:calc(1em + 2px);--evo-type-body:1em;--evo-type-sm:calc(1em - 1px);--evo-type-xs:calc(1em - 2px);--evo-space-2:2px;--evo-space-4:4px;--evo-space-6:6px;--evo-space-8:8px;--evo-space-10:10px;--evo-space-12:12px;--evo-space-14:14px;--evo-space-16:16px;--evo-space-20:20px;--evo-radius-chip:4px;--evo-radius-control:8px;--evo-radius-surface:12px;--evo-radius-pill:999px;--evo-hairline-width:.5px;--evo-hairline-marker:2px;--evo-measure-read:80ch;--evo-leading-base:1.5;--evo-tone-quiet:var(--dsw-alias-label-secondary);--evo-tone-primary:var(--dsw-alias-brand-primary);--evo-tone-danger:var(--dsw-alias-state-error-primary);--evo-tone-success:var(--dsw-alias-state-success-primary);--evo-focus-ring:2px solid var(--dsw-alias-label-primary);--evo-focus-offset:-2px;--evo-cap-aside:280px;--evo-cap-block:260px }",
246
- ":where(.dsh-evolution-skill-health) { display: flex; flex-direction: column; gap: var(--evo-space-12); padding: var(--evo-space-16); color: var(--dsw-alias-label-primary); font-size: var(--evo-type-sm); line-height: var(--evo-leading-base); }",
247
- ":where(.dsh-evolution-skill-health [data-role=\"hint\"]) { margin: 0; color: var(--dsw-alias-label-secondary); }",
248
- ":where(.dsh-evolution-skill-health [data-role=\"stats\"]) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--evo-space-8); }",
249
- ":where(.dsh-evolution-skill-health [data-role=\"stat\"]) { display: flex; flex-direction: column; gap: var(--evo-space-2); padding: var(--evo-space-8) var(--evo-space-10); border: var(--evo-hairline-width) solid var(--dsw-alias-border-l); border-radius: var(--evo-radius-control); }",
250
- ":where(.dsh-evolution-skill-health [data-role=\"stat\"][data-tone=\"ok\"]) { box-shadow: inset 2px 0 0 var(--dsw-alias-state-success-primary); }",
251
- ":where(.dsh-evolution-skill-health [data-role=\"stat\"][data-tone=\"warn\"]) { box-shadow: inset 2px 0 0 var(--dsw-alias-state-warn-primary); }",
252
- ":where(.dsh-evolution-skill-health [data-role=\"stat\"][data-tone=\"error\"]) { box-shadow: inset 2px 0 0 var(--dsw-alias-state-error-primary); }",
253
- ":where(.dsh-evolution-skill-health [data-role=\"stat\"][data-tone=\"unreadable\"]) { box-shadow: inset 2px 0 0 var(--evo-tone-quiet); }",
254
- ":where(.dsh-evolution-skill-health [data-role=\"stat-value\"]) { font-size: var(--evo-type-lg); font-variant-numeric: tabular-nums; line-height: 1; }",
255
- ":where(.dsh-evolution-skill-health [data-role=\"stat-label\"]) { color: var(--dsw-alias-label-tertiary); }",
256
- ":where(.dsh-evolution-skill-health [data-role=\"group-title\"]) { margin: 0; font-weight: 500; }",
257
- ":where(.dsh-evolution-skill-health [data-role=\"rule-table\"]) { display: flex; flex-direction: column; border: var(--evo-hairline-width) solid var(--dsw-alias-border-l); border-radius: var(--evo-radius-control); overflow: hidden; }",
258
- ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"]) { display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr) 4rem; gap: var(--evo-space-10); align-items: center; padding: var(--evo-space-6) var(--evo-space-10); border-top: var(--evo-hairline-width) solid var(--dsw-alias-border-l); }",
259
- ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"][data-tone=\"warn\"]) { box-shadow: inset var(--evo-hairline-marker) 0 0 var(--dsw-alias-state-warn-primary); }",
260
- ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"][data-tone=\"error\"]) { box-shadow: inset var(--evo-hairline-marker) 0 0 var(--dsw-alias-state-error-primary); }",
261
- ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"][data-tone=\"unreadable\"]) { box-shadow: inset var(--evo-hairline-marker) 0 0 var(--evo-tone-quiet); }",
262
- ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"]:hover) { background: var(--dsw-alias-interactive-bg-hover); }",
263
- ":where(.dsh-evolution-skill-health [data-role=\"rule-row\"]:focus-visible) { outline: var(--evo-focus-ring); outline-offset: var(--evo-focus-offset); }",
264
- ":where(.dsh-evolution-skill-health [data-role=\"rule-head\"]) { border-top: 0; color: var(--dsw-alias-label-tertiary); }",
265
- ":where(.dsh-evolution-skill-health [data-role=\"rule-name\"]) { overflow-wrap: anywhere; }",
266
- ":where(.dsh-evolution-skill-health [data-role=\"rule-count\"]) { text-align: right; font-variant-numeric: tabular-nums; color: var(--dsw-alias-label-secondary); }",
267
- ":where(.dsh-evolution-skill-health [data-role=\"skills\"]) { display: flex; flex-wrap: wrap; gap: var(--evo-space-4); }",
268
- ":where(.dsh-evolution-skill-health [data-role=\"skill-pill\"]) { padding: 0 var(--evo-space-6); border: var(--evo-hairline-width) solid var(--dsw-alias-border-l); border-radius: var(--evo-radius-pill); color: var(--dsw-alias-label-secondary); white-space: nowrap; }",
269
- ":where(.dsh-evolution-skill-health [data-role=\"note\"]) { margin: 0; color: var(--dsw-alias-label-secondary); }"
270
- ].join(String.fromCharCode(10));
271
- //#endregion
272
272
  //#region src/client/index.ts
273
273
  /** Required client services: the slot registry and the locale seat. */
274
274
  const inject = ["slots", "locale"];
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  ]
12
12
  }
13
13
  },
14
- "version": "0.25.7",
14
+ "version": "0.25.9",
15
15
  "publishConfig": {
16
16
  "access": "public"
17
17
  },
@@ -43,13 +43,13 @@
43
43
  "@deepseek-ai/cordis": "^4.0.1",
44
44
  "@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.1",
45
45
  "react": "^18.2.0",
46
- "@lmzhen/dsh-evolution-curator": "^0.25.7"
46
+ "@lmzhen/dsh-evolution-curator": "^0.25.9"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@deepseek-ai/cordis": "^4.0.1",
50
50
  "@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.1",
51
51
  "@types/react": "~18.3.1",
52
52
  "react": "^18.2.0",
53
- "@lmzhen/dsh-evolution-curator": "^0.25.7"
53
+ "@lmzhen/dsh-evolution-curator": "^0.25.9"
54
54
  }
55
55
  }