@lmzhen/dsh-evolution-skill-history 0.17.0-rc.1 → 0.17.1

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 (3) hide show
  1. package/README.md +2 -0
  2. package/lib/client.js +16 -30
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -15,6 +15,8 @@ Two registrations, one id (`skill-history`), because that is the sidebar's contr
15
15
 
16
16
  The label is a **thunk**: the sidebar re-reads it on every projection, so a language switch follows without re-registering the row. The body receives plain callbacks through its inject face — no service handle, no subscription, and the component never sees the context.
17
17
 
18
+ The icon draws at the edge the sidebar asks for. The seat hands every occupant `{ size, active }` and the panel row owns the glyph slot, its inset and the gap to the label — the platform's own occupants hand that same `size` straight to their primitive — so `PanelIcon` renders its 16-unit glyph at exactly that `size`. A glyph box of our own moves this label out of the column the other panel rows share; ours did, by 10px, until 0.17.1.
19
+
18
20
  ## The host routes
19
21
 
20
22
  | Method | Path | Use case |
package/lib/client.js CHANGED
@@ -1073,44 +1073,30 @@ window.__ModuleLoader__.load({
1073
1073
  /** Row order inside the global panel list (beside the platform's own rows). */
1074
1074
  const PANEL_ORDER = 35;
1075
1075
  /**
1076
- * The row's icon: a platform-style line glyph, whose SIZE comes from the sidebar's contract and whose
1077
- * glyph BOX is the one the neighbouring rows draw at.
1076
+ * The row's icon: a platform-style line glyph, drawn at the edge the sidebar asks for.
1078
1077
  *
1079
- * Size: the platform hands every `sidebar.panellist` occupant `{ size, active }` (`SidebarRoot.tsx`
1080
- * `renderSlot('sidebar.panellist', { size: wide ? 16 : 18, active }, …)`), so the glyph takes its size
1081
- * from that prop; a glyph that sizes itself from CSS (`width: 100%`) resolves against an unsized flex
1082
- * box and fills the whole column.
1078
+ * The sidebar hands every `sidebar.panellist` occupant `{ size, active }` — its panel row renders
1079
+ * `renderSlot('sidebar.panellist', { size: wide ? 16 : 18, active }, { only: id })` and owns the glyph
1080
+ * slot, its inset and the gap to the label (`ui-sidebar/src/client/SidebarRoot.tsx`) — so the glyph
1081
+ * takes BOTH its edge and its box from that prop, exactly as the platform's own occupants do: their
1082
+ * `PluginsPanelIcon` and `TaskManagerIcon` hand `size` straight to their primitive.
1083
1083
  *
1084
- * Box: the three rows above (task board / SSH / skill centre) are NOT slot occupants — they inject
1085
- * plain DOM into the sidebar with their own CSS (`.entry{padding:0 10px;gap:8px}` plus a 24px icon box
1086
- * holding an 18px glyph, `shared/client/sidebar-entry-core.ts`), so their glyph ink starts 13px into
1087
- * the column and their label 42px. Inside the platform panel row (8px padding, 8px gap) those two
1088
- * lines are reached by a 26px box: `8 + (26 - 16) / 2 = 13` and `8 + 26 + 8 = 42`.
1089
- * Matching the neighbours is a CHOICE (the platform's own rows below — the workspace folders — sit at
1090
- * 8px and 32px); it keeps the four plugin rows reading as one column. The label carries the accessible
1091
- * name, so the glyph stays decoration.
1084
+ * A box of our own, sized to some other row's pixels, moves this label out of the column: measured in
1085
+ * the desktop's global panel list (2026-10-09, 0.2.0) a 26px box put the label at 56px while the
1086
+ * platform's own rows in that list sat at 46px. The label carries the accessible name, so the glyph
1087
+ * stays decoration.
1092
1088
  */
1093
- /** The glyph box in px: the neighbours' 24px icon box, placed to land on their two content lines. */
1094
- const GLYPH_BOX = 26;
1095
1089
  /** The glyph's own coordinate system: every path below is drawn inside 16 units. */
1096
1090
  const GLYPH_UNITS = 16;
1097
- /**
1098
- * Trim a computed viewBox number: three decimals stay readable and are far below one pixel.
1099
- * @param value - the raw number.
1100
- * @returns the value rounded to three decimals.
1101
- */
1102
- function round3(value) {
1103
- return Math.round(value * 1e3) / 1e3;
1104
- }
1091
+ /** The edge to draw at when the sidebar hands no size: its collapsed column asks for 18. */
1092
+ const DEFAULT_GLYPH_SIZE = 18;
1105
1093
  function PanelIcon(props = {}) {
1106
- const size = typeof props.size === "number" && props.size > 0 ? props.size : 18;
1107
- const units = round3(GLYPH_UNITS * GLYPH_BOX / size);
1108
- const inset = round3((units - GLYPH_UNITS) / 2);
1094
+ const size = typeof props.size === "number" && props.size > 0 ? props.size : DEFAULT_GLYPH_SIZE;
1109
1095
  return (0, react.createElement)("svg", {
1110
1096
  "aria-hidden": "true",
1111
- width: String(GLYPH_BOX),
1112
- height: String(GLYPH_BOX),
1113
- viewBox: String(-inset) + " " + String(-inset) + " " + String(units) + " " + String(units),
1097
+ width: String(size),
1098
+ height: String(size),
1099
+ viewBox: "0 0 " + String(GLYPH_UNITS) + " " + String(GLYPH_UNITS),
1114
1100
  fill: "none",
1115
1101
  stroke: "currentColor",
1116
1102
  strokeWidth: "1.5",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-skill-history",
3
3
  "description": "Web surface for skill content history: loopback host routes plus the sidebar panel (community build)",
4
- "version": "0.17.0-rc.1",
4
+ "version": "0.17.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -30,23 +30,23 @@
30
30
  ],
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
- "@lmzhen/dsh-evolution-core": "^0.17.0-rc.1"
33
+ "@lmzhen/dsh-evolution-core": "^0.17.1"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@deepseek-ai/cordis": "^4.0.1",
37
37
  "@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.1",
38
38
  "react": "^18.2.0",
39
- "@lmzhen/dsh-evolution-curator": "^0.17.0-rc.1"
39
+ "@lmzhen/dsh-evolution-curator": "^0.17.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@deepseek-ai/cordis": "^4.0.1",
43
43
  "@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.1",
44
44
  "@types/react": "~18.3.1",
45
45
  "react": "^18.2.0",
46
- "@lmzhen/dsh-evolution-core": "^0.17.0-rc.1",
47
- "@lmzhen/dsh-evolution-curator": "^0.17.0-rc.1",
48
- "@lmzhen/dsh-evolution-io": "^0.17.0-rc.1",
49
- "@lmzhen/dsh-evolution-io-node": "^0.17.0-rc.1"
46
+ "@lmzhen/dsh-evolution-core": "^0.17.1",
47
+ "@lmzhen/dsh-evolution-curator": "^0.17.1",
48
+ "@lmzhen/dsh-evolution-io": "^0.17.1",
49
+ "@lmzhen/dsh-evolution-io-node": "^0.17.1"
50
50
  },
51
51
  "dsh": {
52
52
  "client": {