dsh-win-pwsh7 0.2.3 → 0.2.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.4 — plugin page aligned with the dsh-ops card language
4
+
5
+ - Restyled both contributions after the installed dsh-ops 0.5.0 branch: a 0.5px hairline card on
6
+ `radius-lg` with a shaded card body, 13px/600 group titles, max-content fact labels, and the
7
+ same input, button and focus-token metrics.
8
+ - Split the configure surface into two cards: the executor path sits in a shaded body, the
9
+ dsh-ops coexistence switch sits in the card head, and save/reset follow the cards.
10
+ - The status section is one card now: title, refresh metric and action in the head, the facts in
11
+ a shaded body, and the profile patch as a sunken preview block.
12
+ - Updated the client gate to assert the card language instead of the retired flat section.
13
+
3
14
  ## 0.2.3 — removable dsh-ops coexistence bridge
4
15
 
5
16
  - Moved the bridge, profile-patch ownership, and pure name planning into `lib/dsh-ops-bridge.js`.
package/README.en.md CHANGED
@@ -44,7 +44,7 @@ multi-session validation passed, so the switch is default-on again.
44
44
  ## Install this plugin
45
45
 
46
46
  ```powershell
47
- dsh plugin --profile desktop add github:XinSpark/dsh-win-pwsh7#v0.2.3
47
+ dsh plugin --profile desktop add github:XinSpark/dsh-win-pwsh7#v0.2.4
48
48
  # or
49
49
  dsh plugin --profile desktop add dsh-win-pwsh7
50
50
  ```
package/README.md CHANGED
@@ -36,7 +36,7 @@
36
36
 
37
37
  ```powershell
38
38
  # 从 GitHub 安装(推荐锁定 tag)
39
- dsh plugin --profile desktop add github:XinSpark/dsh-win-pwsh7#v0.2.3
39
+ dsh plugin --profile desktop add github:XinSpark/dsh-win-pwsh7#v0.2.4
40
40
  # 或 npm
41
41
  dsh plugin --profile desktop add dsh-win-pwsh7
42
42
  ```
package/client.js CHANGED
@@ -1,6 +1,7 @@
1
- // client.js — the browser half of dsh-win-pwsh7: the configure section, the diagnostics
2
- // section, and the re-detect action on the plugin pages. Both render as flat native detail
3
- // sections — no card chrome, and the host page's own 32px section rhythm does the spacing.
1
+ // client.js — the browser half of dsh-win-pwsh7: the configure cards and the status card
2
+ // on the plugin pages. Both use the same chrome as the installed dsh-ops branch — a 0.5px
3
+ // hairline card on radius-lg, a shaded card body, 13px/600 titles and max-content fact
4
+ // labels — while the Host page keeps its own 32px rhythm between detail sections.
4
5
  //
5
6
  // One operation, two callers: the diagnostics section and the re-detect button call the
6
7
  // same Host method (`status`) that the `pwsh7_status` agent tool runs — over the Remote
@@ -97,6 +98,8 @@ window.__ModuleLoader__.load({
97
98
  redetect: 'Re-detect',
98
99
  redetecting: 'Detecting…',
99
100
  card_title: 'Configuration',
101
+ executor_title: 'PowerShell 7 executor',
102
+ executor_hint: 'The runtime the pwsh tool runs. This page only probes and recommends; the profile patch in the status section does the wiring.',
100
103
  field_overridePath: 'PowerShell 7 path',
101
104
  overridePath_hint: 'Optional explicit pwsh.exe path (`overridePath`). Empty = auto-detect. It must spawn and report PowerShell 7 or newer; the Store family alias is accepted, while a version-numbered Store path is never pinned. This only changes what the plugin probes and recommends — it does not wire the pwsh tool. Use the patch in the status section for that.',
102
105
  field_dshOpsCompat: 'Coexist with dsh-ops',
@@ -141,6 +144,8 @@ window.__ModuleLoader__.load({
141
144
  redetect: '重新检测',
142
145
  redetecting: '检测中…',
143
146
  card_title: '配置',
147
+ executor_title: 'PowerShell 7 执行器',
148
+ executor_hint: 'pwsh 工具实际运行的 PowerShell。本页只做探测与推荐;接线用状态区里的 profile 补丁。',
144
149
  field_overridePath: 'PowerShell 7 路径',
145
150
  overridePath_hint: '可选的显式 pwsh.exe 路径(`overridePath`)。留空 = 自动探测。必须能启动并报告 PowerShell 7 及以上;Store 家族别名可用,版本号目录永不被 pin。这里只影响插件的探测与推荐,不会给 pwsh 工具接线;接线请用状态区里的补丁。',
146
151
  field_dshOpsCompat: '与 dsh-ops 共存',
@@ -164,48 +169,61 @@ window.__ModuleLoader__.load({
164
169
  // while its section is mounted, so both sections carry it: a page can render the status
165
170
  // section without ever rendering the configure section.
166
171
  const CSS = `
167
- .dw7-section{display:flex;flex-direction:column;gap:12px;min-width:0;}
168
- .dw7-head{display:flex;align-items:baseline;gap:10px;min-width:0;}
169
- .dw7-title{margin:0;color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:20px;}
170
- .dw7-status{box-sizing:border-box;display:flex;flex-direction:column;gap:10px;padding:14px;border:.5px solid var(--dsw-alias-border-l1);border-radius:10px;font-size:13px;min-width:0;}
171
- .dw7-status-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0;}
172
- .dw7-status-title{flex:none;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px;}
173
- .dw7-status-metric{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px;}
174
- .dw7-status-action{margin-left:auto;flex:none;}
175
- .dw7-estimate{display:grid;gap:10px;padding:12px;border-radius:8px;background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1.6;min-width:0;}
176
- .dw7-estimate p{margin:0;}
177
- .dw7-facts{display:grid;gap:6px;margin:0;}
178
- .dw7-facts>div{display:grid;grid-template-columns:72px minmax(0,1fr);gap:10px;}
179
- .dw7-facts dt{color:var(--dsw-alias-label-tertiary);}
180
- .dw7-facts dd{margin:0;overflow-wrap:anywhere;}
181
- .dw7-note{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.6;}
172
+ .dw7-settings{display:flex;flex-direction:column;gap:12px;min-width:0;color:var(--dsw-alias-label-primary);font:inherit;}
173
+ .dw7-settings p{margin:0;line-height:1.55;overflow-wrap:anywhere;}
174
+ .dw7-group{display:flex;flex-direction:column;min-width:0;}
175
+ .dw7-card{border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-lg);padding:14px;gap:10px;}
176
+ .dw7-group-head{display:flex;align-items:flex-start;gap:16px;min-width:0;}
177
+ .dw7-card .dw7-group-head{align-items:flex-start;}
178
+ .dw7-group-head .dw7-field-text{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;gap:2px;}
179
+ .dw7-group-head > button[role=switch]{flex:none;margin-top:1px;}
180
+ .dw7-group-title{margin:0 0 4px;font-size:13px;font-weight:600;line-height:20px;color:var(--dsw-alias-label-secondary);}
181
+ .dw7-card .dw7-group-title{margin:0;}
182
+ .dw7-card-body{display:flex;flex-direction:column;min-width:0;padding:12px;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);}
183
+ .dw7-card-body > .dw7-field{padding:10px 0;}
184
+ .dw7-card-body > .dw7-field:first-child{padding-top:0;}
185
+ .dw7-card-body > .dw7-field:last-child{padding-bottom:0;}
186
+ .dw7-card-body .dw7-field + .dw7-field{border-top:.5px solid var(--dsw-alias-border-l2);}
182
187
  .dw7-field{display:flex;flex-direction:column;gap:6px;padding:12px 0;min-width:0;}
183
188
  .dw7-field + .dw7-field{border-top:.5px solid var(--dsw-alias-border-l2);}
184
- .dw7-label{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:1.5;}
185
- .dw7-input{box-sizing:border-box;width:100%;height:34px;padding:0 12px;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);font-family:inherit;font-size:13px;line-height:1.5;color:var(--dsw-alias-label-primary);}
189
+ .dw7-field-text{display:flex;flex-direction:column;flex:1 1 auto;gap:4px;min-width:0;}
190
+ .dw7-field-label{font-size:13px;font-weight:500;line-height:1.5;color:var(--dsw-alias-label-primary);}
191
+ .dw7-field-hint{margin:0;font-size:12px;line-height:1.5;color:var(--dsw-alias-label-tertiary);}
192
+ .dw7-input{box-sizing:border-box;width:100%;height:34px;padding:0 12px;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:1.5;}
186
193
  .dw7-input:focus-visible{outline:none;border-color:var(--dsw-alias-state-business-primary);}
187
194
  .dw7-input:disabled{color:var(--dsw-alias-label-tertiary);cursor:default;}
188
- .dw7-hint{margin:0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.5;}
189
- .dw7-switch-row{display:flex;align-items:flex-start;gap:16px;min-width:0;}
190
- .dw7-switch-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px;}
195
+ .dw7-input[aria-invalid=true]{border-color:var(--dsw-alias-state-error-primary);}
196
+ .dw7-field-error{margin:0;font-size:12px;line-height:18px;color:var(--dsw-alias-state-error-primary);}
191
197
  .dw7-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-top:4px;}
192
198
  .dw7-save{appearance:none;border:1px solid transparent;border-radius:var(--dsw-radius-md);padding:5px 14px;font:inherit;font-size:13px;line-height:1.5;cursor:pointer;background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3);}
193
199
  .dw7-save:disabled{opacity:.4;cursor:default;}
194
- .dw7-save:focus-visible,.dw7-reset:focus-visible,.dw7-small:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px;}
195
200
  .dw7-reset{border:none;background:none;padding:0;font:inherit;font-size:12px;line-height:1.5;color:var(--dsw-alias-label-secondary);cursor:pointer;}
196
- .dw7-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary);}
197
- .dw7-reset:disabled{cursor:default;}
201
+ .dw7-reset:disabled{opacity:.4;cursor:default;}
198
202
  .dw7-small{box-sizing:border-box;height:28px;padding:0 10px;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:transparent;font:inherit;font-size:12px;line-height:18px;color:var(--dsw-alias-label-primary);cursor:pointer;}
199
- .dw7-small:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);}
200
203
  .dw7-small:disabled{opacity:.4;cursor:not-allowed;}
204
+ .dw7-detail{display:flex;flex-direction:column;gap:12px;min-width:0;}
205
+ .dw7-detail-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0;}
206
+ .dw7-detail-title{margin:0;flex:none;font-size:13px;font-weight:600;line-height:20px;color:var(--dsw-alias-label-primary);}
207
+ .dw7-detail-metric{font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary);}
208
+ .dw7-detail-action{margin-left:auto;flex:none;}
209
+ .dw7-status-card{display:flex;flex-direction:column;gap:10px;padding:14px;border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-lg);min-width:0;}
210
+ .dw7-status-body{padding:12px;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);min-width:0;}
211
+ .dw7-status-lead{margin:0 0 12px;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1.6;}
212
+ .dw7-facts{display:grid;gap:6px;margin:0;}
213
+ .dw7-facts > div{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:baseline;column-gap:14px;}
214
+ .dw7-facts dt{color:var(--dsw-alias-label-tertiary);font-size:13px;}
215
+ .dw7-facts dd{margin:0;overflow-wrap:anywhere;font-size:13px;}
216
+ .dw7-status-note{margin:12px 0 0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.6;}
217
+ .dw7-note{margin:0;font-size:12px;line-height:1.6;color:var(--dsw-alias-label-tertiary);}
201
218
  .dw7-report{margin:0;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;}
202
- .dw7-empty{margin:0;color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:20px;}
203
219
  .dw7-error{margin:0;color:var(--dsw-alias-state-error-primary);font-size:12px;line-height:18px;overflow-wrap:anywhere;}
204
220
  .dw7-ok{margin:0;color:var(--dsw-alias-state-success-primary);font-size:12px;line-height:1.5;}
205
- .dw7-patch{display:flex;flex-direction:column;gap:8px;min-width:0;}
206
- .dw7-patch-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;}
207
- .dw7-patch-note{margin:0;flex:1;min-width:0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.5;}
221
+ .dw7-preview{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);font-size:13px;}
222
+ .dw7-preview-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;}
223
+ .dw7-preview-note{margin:0;flex:1;min-width:0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.5;}
208
224
  .dw7-code{box-sizing:border-box;margin:0;padding:10px 12px;border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-mono,ui-monospace,SFMono-Regular,Menlo,monospace);font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;}
225
+ .dw7-save:focus-visible,.dw7-reset:focus-visible,.dw7-small:focus-visible,.dw7-input:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px;}
226
+ @media(max-width:440px){.dw7-facts > div{grid-template-columns:1fr;gap:2px;}}
209
227
  `
210
228
 
211
229
  return {
@@ -369,40 +387,43 @@ window.__ModuleLoader__.load({
369
387
  }
370
388
  }
371
389
  const patchBlock = patch !== null
372
- ? h('div', { className: 'dw7-patch' },
373
- h('div', { className: 'dw7-patch-head' },
374
- h('p', { className: 'dw7-patch-note' }, t('patch_note')),
375
- h('button', { className: 'dw7-small', onClick: () => void copyPatch() }, copied ? t('copied') : t('copy_patch')),
390
+ ? h('div', { className: 'dw7-preview' },
391
+ h('div', { className: 'dw7-preview-head' },
392
+ h('p', { className: 'dw7-preview-note' }, t('patch_note')),
393
+ h('button', { type: 'button', className: 'dw7-small', onClick: () => void copyPatch() }, copied ? t('copied') : t('copy_patch')),
376
394
  copyNote ? h('span', { className: 'dw7-error' }, copyNote) : null),
377
395
  h('pre', { className: 'dw7-code' }, patch))
378
396
  : null
379
- return h('section', { className: 'dw7-status' },
397
+ const body = fallback
398
+ ? h('p', { className: 'dw7-report', key: 'report' }, report)
399
+ : h('div', { className: 'dw7-status-body', key: 'body' },
400
+ h('p', { className: 'dw7-status-lead' }, view.lead),
401
+ h('dl', { className: 'dw7-facts' },
402
+ h('div', { key: 'status' },
403
+ h('dt', null, t('status_row_status')),
404
+ h('dd', null, view.status)),
405
+ h('div', { key: 'runtime' },
406
+ h('dt', null, t('status_row_runtime')),
407
+ h('dd', null, view.runtime)),
408
+ h('div', { key: 'path' },
409
+ h('dt', null, t('status_row_path')),
410
+ h('dd', null, path ?? t('status_no_path')))),
411
+ h('p', { className: 'dw7-status-note' }, view.note))
412
+ return h('section', { className: 'dw7-detail' },
380
413
  h('style', null, CSS),
381
- h('div', { className: 'dw7-status-head' },
382
- h('strong', { className: 'dw7-status-title' }, t('diagnostics_title')),
383
- snap.at ? h('span', { className: 'dw7-status-metric' }, t('refreshed_at', { at: snap.at })) : null,
384
- h('button', {
385
- className: 'dw7-small dw7-status-action',
386
- onClick: () => void refresh(),
387
- disabled: snap.state === 'loading',
388
- }, snap.state === 'loading' ? t('redetecting') : t('redetect'))),
389
- fallback
390
- ? h('p', { className: 'dw7-report' }, report)
391
- : h('div', { className: 'dw7-estimate' },
392
- h('p', null, view.lead),
393
- h('dl', { className: 'dw7-facts' },
394
- h('div', { key: 'status' },
395
- h('dt', null, t('status_row_status')),
396
- h('dd', null, view.status)),
397
- h('div', { key: 'runtime' },
398
- h('dt', null, t('status_row_runtime')),
399
- h('dd', null, view.runtime)),
400
- h('div', { key: 'path' },
401
- h('dt', null, t('status_row_path')),
402
- h('dd', null, path ?? t('status_no_path')))),
403
- h('small', { className: 'dw7-note' }, view.note)),
404
- patchBlock,
405
- snap.error !== null ? h('p', { className: 'dw7-error' }, t('status_error', { error: snap.error })) : null,
414
+ h('div', { className: 'dw7-status-card' },
415
+ h('div', { className: 'dw7-detail-head' },
416
+ h('h3', { className: 'dw7-detail-title' }, t('diagnostics_title')),
417
+ snap.at ? h('span', { className: 'dw7-detail-metric' }, t('refreshed_at', { at: snap.at })) : null,
418
+ h('button', {
419
+ type: 'button',
420
+ className: 'dw7-small dw7-detail-action',
421
+ onClick: () => void refresh(),
422
+ disabled: snap.state === 'loading',
423
+ }, snap.state === 'loading' ? t('redetecting') : t('redetect'))),
424
+ body,
425
+ patchBlock,
426
+ snap.error !== null ? h('p', { className: 'dw7-error' }, t('status_error', { error: snap.error })) : null),
406
427
  )
407
428
  }
408
429
 
@@ -455,35 +476,45 @@ window.__ModuleLoader__.load({
455
476
  }
456
477
  }
457
478
 
458
- return h('section', { className: 'dw7-section' },
479
+ return h('form', {
480
+ className: 'dw7-settings',
481
+ onSubmit: (event) => {
482
+ event.preventDefault()
483
+ void save()
484
+ },
485
+ },
459
486
  h('style', null, CSS),
460
- h('div', { className: 'dw7-head' },
461
- h('h4', { className: 'dw7-title' }, t('card_title'))),
462
487
  loading || unavailable
463
- ? h('p', { className: 'dw7-empty' }, loading ? t('form_loading') : t('form_unavailable'))
488
+ ? h('p', { className: 'dw7-note' }, loading ? t('form_loading') : t('form_unavailable'))
464
489
  : [
465
- h('div', { className: 'dw7-field', key: 'overridePath' },
466
- h('label', { className: 'dw7-label', htmlFor: 'dw7-override-path' }, t('field_overridePath')),
467
- h('input', {
468
- id: 'dw7-override-path',
469
- className: 'dw7-input',
470
- type: 'text',
471
- spellCheck: false,
472
- value: values.overridePath,
473
- disabled: !editable,
474
- placeholder: 'C:\\Program Files\\PowerShell\\7\\pwsh.exe',
475
- onChange: (event) => {
476
- setDraft({ ...values, overridePath: event.target.value })
477
- setNote(null)
478
- setSavedAt(null)
479
- },
480
- }),
481
- h('p', { className: 'dw7-hint' }, t('overridePath_hint'))),
482
- h('div', { className: 'dw7-field', key: 'dshOpsCompat' },
483
- h('div', { className: 'dw7-switch-row' },
484
- h('div', { className: 'dw7-switch-text' },
485
- h('div', { className: 'dw7-label' }, t('field_dshOpsCompat')),
486
- h('p', { className: 'dw7-hint' }, t('dshOpsCompat_hint'))),
490
+ h('section', { className: 'dw7-group dw7-card', key: 'executor' },
491
+ h('div', { className: 'dw7-group-head' },
492
+ h('div', { className: 'dw7-field-text' },
493
+ h('h4', { className: 'dw7-group-title' }, t('executor_title')),
494
+ h('p', { className: 'dw7-field-hint' }, t('executor_hint')))),
495
+ h('div', { className: 'dw7-card-body' },
496
+ h('div', { className: 'dw7-field' },
497
+ h('label', { className: 'dw7-field-label', htmlFor: 'dw7-override-path' }, t('field_overridePath')),
498
+ h('input', {
499
+ id: 'dw7-override-path',
500
+ className: 'dw7-input',
501
+ type: 'text',
502
+ spellCheck: false,
503
+ value: values.overridePath,
504
+ disabled: !editable,
505
+ placeholder: 'C:\\Program Files\\PowerShell\\7\\pwsh.exe',
506
+ onChange: (event) => {
507
+ setDraft({ ...values, overridePath: event.target.value })
508
+ setNote(null)
509
+ setSavedAt(null)
510
+ },
511
+ }),
512
+ h('p', { className: 'dw7-field-hint' }, t('overridePath_hint'))))),
513
+ h('section', { className: 'dw7-group dw7-card', key: 'compat' },
514
+ h('div', { className: 'dw7-group-head' },
515
+ h('div', { className: 'dw7-field-text' },
516
+ h('h4', { className: 'dw7-group-title' }, t('field_dshOpsCompat')),
517
+ h('p', { className: 'dw7-field-hint' }, t('dshOpsCompat_hint'))),
487
518
  h(Switch, {
488
519
  checked: values.dshOpsCompat,
489
520
  disabled: !editable,
@@ -496,11 +527,12 @@ window.__ModuleLoader__.load({
496
527
  }))),
497
528
  h('div', { className: 'dw7-actions', key: 'actions' },
498
529
  h('button', {
530
+ type: 'submit',
499
531
  className: 'dw7-save',
500
- onClick: () => void save(),
501
532
  disabled: !editable || (!dirty && note === null),
502
533
  }, t('save')),
503
534
  h('button', {
535
+ type: 'button',
504
536
  className: 'dw7-reset',
505
537
  onClick: () => {
506
538
  setDraft(null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-win-pwsh7",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "description": "Detect and validate PowerShell 7 for the Harness pwsh tool on Windows, and install it on request through the Microsoft Store — scripted or manual — while the pwsh tool stays blocked until a PowerShell 7 runtime actually resolves.",
6
6
  "engines": {
@@ -176,10 +176,19 @@ check('the card renders every hint in Chinese', () => {
176
176
  check('the summary view renders nothing, as the row list expects', () => {
177
177
  assert.equal(card({ view: 'summary' }), null)
178
178
  })
179
- check('the configure surface is one flat section, not a card inside the native page', () => {
179
+ check('the configure surface uses the dsh-ops card language', () => {
180
+ // Aligned with the installed dsh-ops branch: one hairline card per group, a shaded
181
+ // card body for editable fields, and the toggle in the card head.
180
182
  const sections = elementsOf(cardTree, 'section')
181
- assert.equal(sections.length, 1, `expected one section, found ${sections.length}`)
182
- assert.equal(sections[0].props.className, 'dw7-section')
183
+ assert.equal(sections.length, 2, `expected two cards, found ${sections.length}`)
184
+ for (const section of sections) {
185
+ assert.match(String(section.props.className), /\bdw7-card\b/u)
186
+ assert.match(String(section.props.className), /\bdw7-group\b/u)
187
+ }
188
+ const bodies = elementsOf(cardTree, 'div').filter(node => node.props.className === 'dw7-card-body')
189
+ assert.equal(bodies.length, 1, `expected one shaded body for the editable card, found ${bodies.length}`)
190
+ assert.ok(!elementsOf(cardTree, 'section').some(node => /\bdw7-section\b/u.test(String(node.props.className))),
191
+ 'the retired flat section class survived')
183
192
  })
184
193
 
185
194
  // A second application with no controller for this row — the state that used to throw inside the
@@ -256,16 +265,28 @@ check('the en dictionary carries no Chinese', () => {
256
265
  const cjk = en.match(/[\u4e00-\u9fff]/gu)
257
266
  assert.equal(cjk, null, `Chinese in the en dictionary: ${cjk === null ? '' : cjk.join('')}`)
258
267
  })
259
- check('one flat stylesheet covers both sections and keeps the native control scale', () => {
268
+ check('one card-language stylesheet covers both surfaces', () => {
260
269
  assert.ok(/const CSS = `/u.test(source), 'the shared stylesheet is missing')
261
270
  assert.ok(!/CSS_CARD|CSS_DIAG/u.test(source), 'the old per-card stylesheets survived')
262
- for (const selector of ['.dw7-section{', '.dw7-status{', '.dw7-estimate{', '.dw7-facts{', '.dw7-input{', '.dw7-save{', '.dw7-small{', '.dw7-code{']) {
271
+ for (const selector of ['.dw7-card{', '.dw7-card-body{', '.dw7-group-title{', '.dw7-detail{', '.dw7-status-card{',
272
+ '.dw7-status-body{', '.dw7-facts{', '.dw7-input{', '.dw7-save{', '.dw7-small{', '.dw7-code{']) {
263
273
  assert.ok(source.includes(selector), `the stylesheet does not define ${selector}`)
264
274
  }
275
+ // The dsh-ops branch's card chrome: a 0.5px hairline on radius-lg with a shaded body,
276
+ // 13px/600 group titles, and description-list labels sized to their own text.
277
+ assert.ok(source.includes('border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-lg);padding:14px;gap:10px;'),
278
+ 'the card chrome no longer matches the dsh-ops card')
279
+ assert.ok(source.includes('background:var(--dsw-alias-interactive-bg-hover);'),
280
+ 'the card body no longer uses the sunken surface')
281
+ assert.ok(source.includes('font-size:13px;font-weight:600;line-height:20px;'),
282
+ 'the group title metrics no longer match the dsh-ops card')
283
+ assert.ok(source.includes('grid-template-columns:max-content minmax(0,1fr);align-items:baseline;column-gap:14px;'),
284
+ 'the fact list no longer uses the native max-content label column')
265
285
  const start = source.indexOf('const CSS = `')
266
286
  const css = source.slice(start, source.indexOf('`', start + 20))
267
287
  assert.ok(!/#[0-9a-f]{3,8}\b/iu.test(css), 'the stylesheet hard-codes a color instead of using a theme token')
268
288
  })
289
+
269
290
  check('no metered-network copy or branch remains', () => {
270
291
  assert.ok(!/metered/iu.test(source), 'the removed metered-network feature still has copy or a branch')
271
292
  })