@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.
- package/dist/api/dsh-client.d.ts +4 -1
- package/dist/components/Activity.css +1 -0
- package/dist/components/Card.css +4 -4
- package/dist/components/CardAnchor.d.ts +7 -0
- package/dist/components/CardAnchor.js +8 -0
- package/dist/components/CardAnchor.module.css +3 -0
- package/dist/components/CardHead.css +1 -5
- package/dist/components/ChoiceGroup.css +11 -2
- package/dist/components/Field.css +4 -0
- package/dist/components/MockStrip.css +11 -1
- package/dist/components/Note.css +4 -4
- package/dist/components/SelectField.css +156 -0
- package/dist/components/SelectField.d.ts +57 -0
- package/dist/components/SelectField.js +236 -0
- package/dist/components/SettingsSection.css +2 -2
- package/dist/components/StateDot.d.ts +5 -0
- package/dist/components/StateDot.js +10 -0
- package/dist/components/TextField.css +5 -0
- package/dist/components/icons.d.ts +1 -0
- package/dist/components/icons.js +13 -0
- package/dist/host/__tests__/fakes.d.ts +41 -0
- package/dist/host/__tests__/fakes.js +76 -0
- package/dist/host/__tests__/preflight-fixtures.d.ts +19 -0
- package/dist/host/__tests__/preflight-fixtures.js +47 -0
- package/dist/host/context-inject.d.ts +24 -0
- package/dist/host/context-inject.js +74 -0
- package/dist/host/events.d.ts +9 -0
- package/dist/host/events.js +70 -0
- package/dist/host/mount-units.d.ts +52 -0
- package/dist/host/mount-units.js +186 -0
- package/dist/host/preflight.d.ts +58 -0
- package/dist/host/preflight.js +233 -0
- package/dist/host/probe-cache.d.ts +6 -0
- package/dist/host/probe-cache.js +19 -0
- package/dist/host/probe-libs.d.ts +45 -0
- package/dist/host/probe-libs.js +61 -0
- package/dist/host/probe-units.d.ts +17 -0
- package/dist/host/probe-units.js +102 -0
- package/dist/host/probe-verdict.d.ts +7 -0
- package/dist/host/probe-verdict.js +143 -0
- package/dist/host/tool-approval.d.ts +2 -0
- package/dist/host/tool-approval.js +1 -1
- package/dist/host/tool-kit.js +2 -2
- package/dist/host/tool-scope.d.ts +32 -0
- package/dist/host/tool-scope.js +84 -0
- package/dist/host/unit-readiness.d.ts +7 -0
- package/dist/host/unit-readiness.js +5 -0
- package/dist/host/unit-registry.d.ts +9 -0
- package/dist/host/unit-registry.js +33 -0
- package/dist/host/version-range.d.ts +2 -0
- package/dist/host/version-range.js +73 -0
- package/dist/host.d.ts +1 -0
- package/dist/host.js +1 -0
- package/dist/i18n/en.js +1 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/zh.d.ts +1 -1
- package/dist/i18n/zh.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/lib/react.d.ts +2 -0
- package/dist/lib/react.js +2 -0
- package/package.json +1 -1
- package/src/api/dsh-client.ts +5 -1
- package/src/components/Activity.css +1 -0
- package/src/components/Card.css +4 -4
- package/src/components/Card.test.tsx +46 -0
- package/src/components/CardAnchor.module.css +3 -0
- package/src/components/CardAnchor.test.tsx +36 -0
- package/src/components/CardAnchor.tsx +20 -0
- package/src/components/CardHead.css +1 -5
- package/src/components/ChoiceGroup.css +11 -2
- package/src/components/Field.css +4 -0
- package/src/components/Note.css +4 -4
- package/src/components/SelectField.css +156 -0
- package/src/components/SelectField.test.tsx +238 -0
- package/src/components/SelectField.tsx +486 -0
- package/src/components/SettingsSection.css +2 -2
- package/src/components/TextField.css +5 -0
- package/src/components/icons.tsx +19 -0
- package/src/host/tool-approval.ts +2 -1
- package/src/host/tool-kit.ts +2 -2
- package/src/host.ts +1 -0
- package/src/i18n/en.ts +1 -1
- package/src/i18n/zh.ts +1 -1
- package/src/index.ts +2 -1
- package/src/lib/react.ts +3 -0
- package/dist/lib/lint-probe.d.ts +0 -1
- package/dist/lib/lint-probe.js +0 -6
- package/src/components/MockStrip.css +0 -39
- 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
|
-
}
|