dsh-graft-plugin 0.3.1 → 0.3.3

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <picture>
2
- <source media="(prefers-color-scheme: dark)" srcset="assets/banner-dark.png">
3
- <img alt="graft" src="assets/banner-light.png" width="1012">
2
+ <source media="(prefers-color-scheme: dark)" srcset="assets/banner-dark.png?v=2">
3
+ <img alt="graft" src="assets/banner-light.png?v=2" width="1012">
4
4
  </picture>
5
5
 
6
6
  <br>
package/README.zh-CN.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <picture>
2
- <source media="(prefers-color-scheme: dark)" srcset="assets/banner-dark.png">
3
- <img alt="graft" src="assets/banner-light.png" width="1012">
2
+ <source media="(prefers-color-scheme: dark)" srcset="assets/banner-dark.png?v=2">
3
+ <img alt="graft" src="assets/banner-light.png?v=2" width="1012">
4
4
  </picture>
5
5
 
6
6
  <br>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-graft-plugin",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Shows which graft index a dsh session is serving and whether it still matches the code, and gives the model graft_ask, graft_grep, graft_callers, graft_skeleton and graft_map as native tools.",
5
5
  "icon": "assets/icon.png",
6
6
  "type": "module",
package/src/client.js CHANGED
@@ -182,9 +182,16 @@ window.__ModuleLoader__.load({
182
182
  ".gs-chip.gs-clickable:focus-visible{outline:2px solid var(--dsw-focus-ring-color,var(--dsw-alias-brand-primary,#4b8bd6));outline-offset:2px}",
183
183
  ".gs-viz{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;",
184
184
  "padding:0;border:0;border-radius:var(--dsw-radius-sm,8px);background:transparent;color:var(--dsw-alias-label-secondary,inherit);",
185
- "cursor:pointer;--accent:var(--dsw-alias-brand-primary,#e5484d)}",
185
+ "cursor:pointer;--accent:var(--dsh-graft-accent,#e5484d)}",
186
186
  ".gs-viz:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(128,128,128,.14))}",
187
187
  ".gs-viz:disabled{opacity:.5;cursor:progress}",
188
+ // No graph (or a status not yet resolved): the mark greys out with the
189
+ // chip. The red accent is the "this repo IS grafted" signal — wearing
190
+ // it on a workspace with no index advertised a graph the tools would
191
+ // then refuse with "No graft index". currentColor folds the leaf and
192
+ // the node into the mark's own label colour; the opacity matches
193
+ // .gs-chip.gs-muted so the two read as one disabled pair.
194
+ ".gs-viz.gs-muted{--accent:currentColor;opacity:.6}",
188
195
  ".gs-viz.gs-err{color:var(--dsw-alias-state-error-primary,#e5484d)}",
189
196
  ".gs-tabwrap{display:flex;flex-direction:column;height:100%;min-height:0}",
190
197
  ".gs-tabbar{display:flex;align-items:center;gap:6px;padding:0 6px 0 10px;min-height:32px;",
@@ -515,7 +522,10 @@ window.__ModuleLoader__.load({
515
522
  /** The graft mark: thick trunk with a leaf, thin branches, accent node.
516
523
  * The same design as `assets/icon.svg` and the banners, at button scale
517
524
  * (trunk and branch widths match the tuned vector's tube widths).
518
- * `--accent` is set by `.gs-viz`. */
525
+ * `--accent` is set by `.gs-viz` to the graft red — deliberately NOT the
526
+ * theme's brand-primary, which some themes set to white and which then
527
+ * washes the accent out of the mark entirely; themes may opt in with
528
+ * `--dsh-graft-accent`. */
519
529
  function GraphIcon() {
520
530
  return h(
521
531
  "svg",
@@ -1169,7 +1179,7 @@ window.__ModuleLoader__.load({
1169
1179
  "button",
1170
1180
  {
1171
1181
  type: "button",
1172
- className: "gs-viz" + (failed ? " gs-err" : ""),
1182
+ className: "gs-viz" + (failed ? " gs-err" : "") + (ok ? "" : " gs-muted"),
1173
1183
  onClick: openViz,
1174
1184
  disabled: busy,
1175
1185
  title: busy