@lmzhen/dsh-evolution-skill-health 0.34.0 → 0.35.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.
Files changed (2) hide show
  1. package/lib/client.js +21 -6
  2. package/package.json +6 -6
package/lib/client.js CHANGED
@@ -112,6 +112,9 @@ window.__ModuleLoader__.load({
112
112
  reason: "transport"
113
113
  });
114
114
  //#endregion
115
+ //#region ../evolution-client-kit/src/notice.ts
116
+ /** One inline state notice: semantic tone plus text, no surface-specific styling. */
117
+ //#endregion
115
118
  //#region ../evolution-client-kit/src/action.ts
116
119
  /**
117
120
  * Command-only actions. Approval decisions are a separate host API and must never
@@ -499,7 +502,8 @@ window.__ModuleLoader__.load({
499
502
  ":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); }",
500
503
  ":where(.dsh-evolution-skill-health [data-role=\"hint\"]) { margin: 0; color: var(--dsw-alias-label-secondary); }",
501
504
  ":where(.dsh-evolution-skill-health [data-role=\"stats\"]) { display: grid; grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); gap: var(--evo-space-8); }",
502
- ":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-l1); border-radius: var(--evo-radius-control); }",
505
+ ":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-l1); border-radius: var(--evo-radius-control); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }",
506
+ ":where(.dsh-evolution-skill-health [data-role=\"stat\"][aria-pressed=\"true\"]) { border-color: var(--dsw-alias-brand-primary); background: var(--dsw-alias-interactive-bg-hover); }",
503
507
  ":where(.dsh-evolution-skill-health [data-role=\"stat\"][data-tone=\"ok\"]) { box-shadow: inset 2px 0 0 var(--dsw-alias-state-success-primary); }",
504
508
  ":where(.dsh-evolution-skill-health [data-role=\"stat\"][data-tone=\"warn\"]) { box-shadow: inset 2px 0 0 var(--dsw-alias-state-warn-primary); }",
505
509
  ":where(.dsh-evolution-skill-health [data-role=\"stat\"][data-tone=\"error\"]) { box-shadow: inset 2px 0 0 var(--dsw-alias-state-error-primary); }",
@@ -731,6 +735,7 @@ window.__ModuleLoader__.load({
731
735
  const [lastReadAt, setLastReadAt] = (0, react.useState)(face.readAt);
732
736
  const [scan, setScan] = (0, react.useState)(face.scan);
733
737
  const [viewMode, setViewMode] = (0, react.useState)("skills");
738
+ const [verdictFilter, setVerdictFilter] = (0, react.useState)(void 0);
734
739
  const firstLoad = (0, react.useRef)(false);
735
740
  const readTicket = (0, react.useRef)(0);
736
741
  /** One read trigger for first paint and the refresh button; the latest answer wins. */
@@ -771,11 +776,21 @@ window.__ModuleLoader__.load({
771
776
  load();
772
777
  }, [face]);
773
778
  const counts = new Map(KINDS.map((kind) => [kind, view.rows.filter((row) => row.verdict === kind).length]));
774
- const stats = (0, react.createElement)("div", { "data-role": "stats" }, KINDS.map((kind) => (0, react.createElement)("div", {
779
+ const shown = verdictFilter === void 0 ? view : {
780
+ ...view,
781
+ rows: view.rows.filter((row) => row.verdict === verdictFilter)
782
+ };
783
+ const stats = (0, react.createElement)("div", { "data-role": "stats" }, KINDS.map((kind) => (0, react.createElement)("button", {
775
784
  key: kind,
785
+ type: "button",
776
786
  "data-role": "stat",
777
- "data-tone": TONE[kind]
778
- }, (0, react.createElement)("div", { "data-role": "stat-value" }, String(counts.get(kind) ?? 0)), (0, react.createElement)("div", { "data-role": "stat-label" }, t("verdict." + kind)))));
787
+ "data-tone": TONE[kind],
788
+ "aria-pressed": verdictFilter === kind ? "true" : "false",
789
+ "aria-label": t("verdict." + kind),
790
+ onClick: () => {
791
+ setVerdictFilter((previous) => previous === kind ? void 0 : kind);
792
+ }
793
+ }, (0, react.createElement)("span", { "data-role": "stat-value" }, String(counts.get(kind) ?? 0)), (0, react.createElement)("span", { "data-role": "stat-label" }, t("verdict." + kind)))));
779
794
  return (0, react.createElement)("section", { className: CSS_TAG_ID }, (0, react.createElement)("div", { "data-role": "header" }, (0, react.createElement)("span", { "data-role": "read-at" }, lastReadAt === void 0 ? t("readAt.unknown") : new Date(lastReadAt).toLocaleString()), (0, react.createElement)("span", { "data-role": "scan-status" }, t("scan." + (scan?.status ?? "unavailable"))), (0, react.createElement)("button", {
780
795
  type: "button",
781
796
  "data-role": "refresh",
@@ -834,10 +849,10 @@ window.__ModuleLoader__.load({
834
849
  })(), viewMode === "skills" ? (0, react.createElement)("div", {
835
850
  id: "evo-health-skills",
836
851
  role: "tabpanel"
837
- }, skillQueue(view, t)) : (0, react.createElement)("div", {
852
+ }, skillQueue(shown, t)) : (0, react.createElement)("div", {
838
853
  id: "evo-health-rules",
839
854
  role: "tabpanel"
840
- }, (0, react.createElement)("h3", { "data-role": "group-title" }, t("group.byRule")), ruleTable(view, t)));
855
+ }, (0, react.createElement)("h3", { "data-role": "group-title" }, t("group.byRule")), ruleTable(shown, t)));
841
856
  }
842
857
  //#endregion
843
858
  //#region src/client/seats.ts
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  ]
12
12
  }
13
13
  },
14
- "version": "0.34.0",
14
+ "version": "0.35.0",
15
15
  "publishConfig": {
16
16
  "access": "public"
17
17
  },
@@ -42,18 +42,18 @@
42
42
  "peerDependencies": {
43
43
  "@deepseek-ai/cordis": "^4.0.5",
44
44
  "react": "^18.2.0",
45
- "@lmzhen/dsh-evolution-core": "^0.34.0",
46
- "@lmzhen/dsh-evolution-curator": "^0.34.0"
45
+ "@lmzhen/dsh-evolution-core": "^0.35.0",
46
+ "@lmzhen/dsh-evolution-curator": "^0.35.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@deepseek-ai/cordis": "^4.0.5",
50
50
  "@types/react": "~18.3.1",
51
51
  "react": "^18.2.0",
52
- "@lmzhen/dsh-evolution-core": "^0.34.0",
53
- "@lmzhen/dsh-evolution-curator": "^0.34.0"
52
+ "@lmzhen/dsh-evolution-core": "^0.35.0",
53
+ "@lmzhen/dsh-evolution-curator": "^0.35.0"
54
54
  },
55
55
  "dependencies": {
56
- "@lmzhen/dsh-evolution-client-kit": "^0.34.0"
56
+ "@lmzhen/dsh-evolution-client-kit": "^0.35.0"
57
57
  },
58
58
  "engines": {
59
59
  "dsh": ">=0.2.1-rc.2 <0.2.2-0"