@dsh-workbench/shared 0.2.10 → 0.2.12

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 (90) hide show
  1. package/dist/api/dsh-client.d.ts +4 -1
  2. package/dist/components/Activity.css +1 -0
  3. package/dist/components/Card.css +4 -4
  4. package/dist/components/CardAnchor.d.ts +7 -0
  5. package/dist/components/CardAnchor.js +8 -0
  6. package/dist/components/CardAnchor.module.css +3 -0
  7. package/dist/components/CardHead.css +1 -5
  8. package/dist/components/ChoiceGroup.css +11 -2
  9. package/dist/components/Field.css +4 -0
  10. package/dist/components/MockStrip.css +11 -1
  11. package/dist/components/Note.css +4 -4
  12. package/dist/components/SelectField.css +156 -0
  13. package/dist/components/SelectField.d.ts +57 -0
  14. package/dist/components/SelectField.js +236 -0
  15. package/dist/components/SettingsSection.css +2 -2
  16. package/dist/components/StateDot.d.ts +5 -0
  17. package/dist/components/StateDot.js +10 -0
  18. package/dist/components/TextField.css +5 -0
  19. package/dist/components/icons.d.ts +1 -0
  20. package/dist/components/icons.js +13 -0
  21. package/dist/host/__tests__/fakes.d.ts +41 -0
  22. package/dist/host/__tests__/fakes.js +76 -0
  23. package/dist/host/__tests__/preflight-fixtures.d.ts +19 -0
  24. package/dist/host/__tests__/preflight-fixtures.js +47 -0
  25. package/dist/host/context-inject.d.ts +24 -0
  26. package/dist/host/context-inject.js +74 -0
  27. package/dist/host/events.d.ts +9 -0
  28. package/dist/host/events.js +70 -0
  29. package/dist/host/mount-units.d.ts +52 -0
  30. package/dist/host/mount-units.js +186 -0
  31. package/dist/host/preflight.d.ts +58 -0
  32. package/dist/host/preflight.js +233 -0
  33. package/dist/host/probe-cache.d.ts +6 -0
  34. package/dist/host/probe-cache.js +19 -0
  35. package/dist/host/probe-libs.d.ts +45 -0
  36. package/dist/host/probe-libs.js +61 -0
  37. package/dist/host/probe-units.d.ts +17 -0
  38. package/dist/host/probe-units.js +102 -0
  39. package/dist/host/probe-verdict.d.ts +7 -0
  40. package/dist/host/probe-verdict.js +143 -0
  41. package/dist/host/tool-approval.d.ts +2 -0
  42. package/dist/host/tool-approval.js +1 -1
  43. package/dist/host/tool-kit.js +2 -2
  44. package/dist/host/tool-scope.d.ts +32 -0
  45. package/dist/host/tool-scope.js +84 -0
  46. package/dist/host/unit-readiness.d.ts +7 -0
  47. package/dist/host/unit-readiness.js +5 -0
  48. package/dist/host/unit-registry.d.ts +9 -0
  49. package/dist/host/unit-registry.js +33 -0
  50. package/dist/host/version-range.d.ts +2 -0
  51. package/dist/host/version-range.js +73 -0
  52. package/dist/host.d.ts +1 -0
  53. package/dist/host.js +1 -0
  54. package/dist/i18n/en.js +1 -1
  55. package/dist/i18n/index.d.ts +1 -1
  56. package/dist/i18n/zh.d.ts +1 -1
  57. package/dist/i18n/zh.js +1 -1
  58. package/dist/index.d.ts +2 -1
  59. package/dist/index.js +2 -1
  60. package/dist/lib/react.d.ts +2 -0
  61. package/dist/lib/react.js +2 -0
  62. package/package.json +1 -1
  63. package/src/api/dsh-client.ts +5 -1
  64. package/src/components/Activity.css +1 -0
  65. package/src/components/Card.css +4 -4
  66. package/src/components/Card.test.tsx +46 -0
  67. package/src/components/CardAnchor.module.css +3 -0
  68. package/src/components/CardAnchor.test.tsx +36 -0
  69. package/src/components/CardAnchor.tsx +20 -0
  70. package/src/components/CardHead.css +1 -5
  71. package/src/components/ChoiceGroup.css +11 -2
  72. package/src/components/Field.css +4 -0
  73. package/src/components/Note.css +4 -4
  74. package/src/components/SelectField.css +156 -0
  75. package/src/components/SelectField.test.tsx +238 -0
  76. package/src/components/SelectField.tsx +486 -0
  77. package/src/components/SettingsSection.css +2 -2
  78. package/src/components/TextField.css +5 -0
  79. package/src/components/icons.tsx +19 -0
  80. package/src/host/tool-approval.ts +2 -1
  81. package/src/host/tool-kit.ts +2 -2
  82. package/src/host.ts +1 -0
  83. package/src/i18n/en.ts +1 -1
  84. package/src/i18n/zh.ts +1 -1
  85. package/src/index.ts +2 -1
  86. package/src/lib/react.ts +3 -0
  87. package/dist/lib/lint-probe.d.ts +0 -1
  88. package/dist/lib/lint-probe.js +0 -6
  89. package/src/components/MockStrip.css +0 -39
  90. package/src/components/MockStrip.tsx +0 -41
@@ -1,41 +0,0 @@
1
- import { h } from '../lib/react.js';
2
- import './MockStrip.css';
3
-
4
- export function MockStrip({
5
- mocks,
6
- index,
7
- onPick,
8
- note,
9
- real,
10
- }: {
11
- readonly mocks: readonly { readonly id: string; readonly label: string }[];
12
- readonly index: number;
13
- readonly onPick: (next: number) => void;
14
- readonly note?: string;
15
- readonly real?: { readonly label: string; readonly active: boolean; readonly onPick: () => void } | undefined;
16
- }) {
17
- return (
18
- <div className="wb-mockStrip">
19
- <span className="wb-mockNote">{note ?? '夹具:只切状态,不发请求'}</span>
20
- {real === undefined ? null : (
21
- <button
22
- type="button"
23
- className={`wb-mockChip${real.active ? ' wb-mockChipOn' : ''}`}
24
- onClick={real.onPick}
25
- >
26
- {real.label}
27
- </button>
28
- )}
29
- {mocks.map((mock, at) => (
30
- <button
31
- key={mock.id}
32
- type="button"
33
- className={`wb-mockChip${at === index ? ' wb-mockChipOn' : ''}`}
34
- onClick={() => onPick(at)}
35
- >
36
- {mock.label}
37
- </button>
38
- ))}
39
- </div>
40
- );
41
- }