@dsh-workbench/shared 0.1.7 → 0.1.8
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 +11 -0
- package/dist/components/Activity.css +69 -0
- package/dist/components/Activity.d.ts +23 -0
- package/dist/components/Activity.js +23 -0
- package/dist/components/ApprovalPlan.css +41 -0
- package/dist/components/ApprovalPlan.d.ts +13 -0
- package/dist/components/ApprovalPlan.js +11 -0
- package/dist/components/Card.css +20 -0
- package/dist/components/Card.d.ts +13 -0
- package/dist/components/Card.js +8 -0
- package/dist/components/Note.css +14 -0
- package/dist/components/Note.d.ts +8 -0
- package/dist/components/Note.js +6 -0
- package/dist/components/ResourceStates.css +5 -1
- package/dist/components/Rows.css +30 -0
- package/dist/components/Rows.d.ts +11 -0
- package/dist/components/Rows.js +10 -0
- package/dist/components/SettingsSection.css +26 -0
- package/dist/components/SettingsSection.d.ts +9 -0
- package/dist/components/SettingsSection.js +9 -0
- package/dist/components/Stack.css +7 -0
- package/dist/components/Stack.d.ts +6 -0
- package/dist/components/Stack.js +5 -0
- package/dist/components/StateBlock.css +36 -0
- package/dist/components/StateBlock.d.ts +11 -0
- package/dist/components/StateBlock.js +12 -0
- package/dist/components/StateDot.d.ts +5 -0
- package/dist/components/StateDot.js +10 -0
- package/dist/components/icons.d.ts +1 -0
- package/dist/components/icons.js +4 -0
- package/dist/config/constants.d.ts +2 -0
- package/dist/config/constants.js +2 -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-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/i18n/en.js +4 -1
- package/dist/i18n/index.d.ts +5 -2
- package/dist/i18n/zh.d.ts +4 -1
- package/dist/i18n/zh.js +4 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/lib/react.d.ts +1 -0
- package/dist/lib/react.js +1 -0
- package/package.json +1 -1
- package/src/api/dsh-client.ts +13 -0
- package/src/components/Activity.css +69 -0
- package/src/components/Activity.tsx +76 -0
- package/src/components/ApprovalPlan.css +41 -0
- package/src/components/ApprovalPlan.tsx +33 -0
- package/src/components/Card.css +20 -0
- package/src/components/Card.tsx +28 -0
- package/src/components/Note.css +14 -0
- package/src/components/Note.tsx +14 -0
- package/src/components/ResourceStates.css +5 -1
- package/src/components/Rows.css +30 -0
- package/src/components/Rows.tsx +25 -0
- package/src/components/SettingsSection.css +26 -0
- package/src/components/SettingsSection.tsx +22 -0
- package/src/components/Stack.css +7 -0
- package/src/components/Stack.tsx +11 -0
- package/src/components/StateBlock.css +36 -0
- package/src/components/StateBlock.tsx +29 -0
- package/src/components/icons.tsx +16 -0
- package/src/config/constants.ts +4 -0
- package/src/i18n/en.ts +4 -1
- package/src/i18n/zh.ts +4 -1
- package/src/index.ts +8 -0
- package/src/lib/react.test.ts +2 -1
- package/src/lib/react.ts +1 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ReactNode } from '../lib/react.js';
|
|
2
|
+
import { h } from '../lib/react.js';
|
|
3
|
+
import './ApprovalPlan.css';
|
|
4
|
+
|
|
5
|
+
export interface ApprovalPlanRow {
|
|
6
|
+
readonly label: ReactNode;
|
|
7
|
+
readonly value: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ApprovalPlanProps {
|
|
11
|
+
readonly rows: readonly ApprovalPlanRow[];
|
|
12
|
+
readonly hint?: ReactNode | undefined;
|
|
13
|
+
readonly warn?: ReactNode | undefined;
|
|
14
|
+
readonly children?: ReactNode | undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function ApprovalPlan({ rows, hint, warn, children }: ApprovalPlanProps) {
|
|
18
|
+
return (
|
|
19
|
+
<div className="wb-approvalPlan">
|
|
20
|
+
{hint === undefined ? null : <p className="wb-approvalHint">{hint}</p>}
|
|
21
|
+
<dl className="wb-approvalRows">
|
|
22
|
+
{rows.map((row, index) => (
|
|
23
|
+
<div className="wb-approvalRow" key={String(index)}>
|
|
24
|
+
<dt className="wb-approvalLabel">{row.label}</dt>
|
|
25
|
+
<dd className="wb-approvalValue">{row.value}</dd>
|
|
26
|
+
</div>
|
|
27
|
+
))}
|
|
28
|
+
</dl>
|
|
29
|
+
{children}
|
|
30
|
+
{warn === undefined ? null : <p className="wb-approvalWarn">{warn}</p>}
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
.wb-card {
|
|
3
|
+
border: 0.5px solid var(--dsw-alias-border-l3);
|
|
4
|
+
border-radius: var(--dsw-radius-xl);
|
|
5
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
flex: none;
|
|
10
|
+
}
|
|
11
|
+
.wb-cardBody {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: var(--wb-len-12);
|
|
15
|
+
padding: var(--wb-len-12);
|
|
16
|
+
}
|
|
17
|
+
.wb-cardBody > :not([data-wb-bleed]) {
|
|
18
|
+
padding-left: var(--wb-len-8);
|
|
19
|
+
padding-right: var(--wb-len-8);
|
|
20
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactNode } from '../lib/react.js';
|
|
2
|
+
import type { Translate } from '../api/dsh-client.js';
|
|
3
|
+
import { h } from '../lib/react.js';
|
|
4
|
+
import { CardHead } from './CardHead.js';
|
|
5
|
+
import './Card.css';
|
|
6
|
+
|
|
7
|
+
export interface CardProps {
|
|
8
|
+
readonly t: Translate;
|
|
9
|
+
readonly title: string;
|
|
10
|
+
readonly refreshing: boolean;
|
|
11
|
+
readonly onRefresh: () => void;
|
|
12
|
+
readonly meta?: ReactNode | undefined;
|
|
13
|
+
readonly head?: ReactNode | undefined;
|
|
14
|
+
readonly children?: ReactNode | undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function Card({ t, title, refreshing, onRefresh, meta, head, children }: CardProps) {
|
|
18
|
+
return (
|
|
19
|
+
<section className="wb-card">
|
|
20
|
+
{head === undefined ? (
|
|
21
|
+
<CardHead t={t} title={title} refreshing={refreshing} onRefresh={onRefresh} meta={meta} />
|
|
22
|
+
) : (
|
|
23
|
+
head
|
|
24
|
+
)}
|
|
25
|
+
<div className="wb-cardBody">{children}</div>
|
|
26
|
+
</section>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
.wb-note {
|
|
3
|
+
margin: 0;
|
|
4
|
+
font-size: var(--dsw-font-xxxs-11-font-size);
|
|
5
|
+
line-height: var(--wb-line-16);
|
|
6
|
+
color: var(--dsw-alias-label-tertiary);
|
|
7
|
+
}
|
|
8
|
+
.wb-problem {
|
|
9
|
+
margin: 0;
|
|
10
|
+
font-size: var(--dsw-font-xxxs-11-font-size);
|
|
11
|
+
line-height: var(--wb-line-16);
|
|
12
|
+
color: var(--dsw-alias-state-error-primary);
|
|
13
|
+
overflow-wrap: anywhere;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from '../lib/react.js';
|
|
2
|
+
import { h } from '../lib/react.js';
|
|
3
|
+
import './Note.css';
|
|
4
|
+
|
|
5
|
+
export interface NoteProps {
|
|
6
|
+
readonly tone?: 'muted' | 'problem';
|
|
7
|
+
readonly as?: 'p' | 'span';
|
|
8
|
+
readonly children?: ReactNode | undefined;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function Note({ tone = 'muted', as, children }: NoteProps) {
|
|
12
|
+
const className = tone === 'problem' ? 'wb-problem' : 'wb-note';
|
|
13
|
+
return as === 'span' ? <span className={className}>{children}</span> : <p className={className}>{children}</p>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
.wb-row:has(> [data-wb-dot]) {
|
|
3
|
+
grid-template-columns: 84px minmax(0, 1fr);
|
|
4
|
+
}
|
|
5
|
+
.wb-rows {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
}
|
|
9
|
+
.wb-row {
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: 56px minmax(0, 1fr);
|
|
12
|
+
align-items: baseline;
|
|
13
|
+
gap: var(--wb-len-8);
|
|
14
|
+
padding: var(--wb-len-4) 0;
|
|
15
|
+
}
|
|
16
|
+
.wb-row + .wb-row {
|
|
17
|
+
border-top: 0.5px solid var(--dsw-alias-border-l2);
|
|
18
|
+
}
|
|
19
|
+
.wb-rowKey {
|
|
20
|
+
font-size: var(--dsw-font-xxxs-11-font-size);
|
|
21
|
+
line-height: var(--wb-line-16);
|
|
22
|
+
color: var(--dsw-alias-label-tertiary);
|
|
23
|
+
}
|
|
24
|
+
.wb-rowValue {
|
|
25
|
+
min-width: 0;
|
|
26
|
+
font-size: var(--dsw-font-xxs-12-font-size);
|
|
27
|
+
line-height: var(--wb-line-18);
|
|
28
|
+
color: var(--dsw-alias-label-primary);
|
|
29
|
+
overflow-wrap: anywhere;
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from '../lib/react.js';
|
|
2
|
+
import { h } from '../lib/react.js';
|
|
3
|
+
import './Rows.css';
|
|
4
|
+
|
|
5
|
+
export interface RowsProps {
|
|
6
|
+
readonly children?: ReactNode | undefined;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function Rows({ children }: RowsProps) {
|
|
10
|
+
return <div className="wb-rows">{children}</div>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface RowProps {
|
|
14
|
+
readonly label: ReactNode;
|
|
15
|
+
readonly value: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function Row({ label, value }: RowProps) {
|
|
19
|
+
return (
|
|
20
|
+
<div className="wb-row">
|
|
21
|
+
<span className="wb-rowKey">{label}</span>
|
|
22
|
+
<span className="wb-rowValue">{value}</span>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
.wb-settings {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: var(--wb-len-8);
|
|
6
|
+
padding: var(--wb-len-10);
|
|
7
|
+
border: 0.5px solid var(--dsw-alias-border-l2);
|
|
8
|
+
border-radius: var(--dsw-radius-md);
|
|
9
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
10
|
+
}
|
|
11
|
+
.wb-settingsHead {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: var(--wb-len-8);
|
|
15
|
+
}
|
|
16
|
+
.wb-settingsTitle {
|
|
17
|
+
flex: 1 1 auto;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
text-overflow: ellipsis;
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
font-size: var(--dsw-font-xxs-12-font-size);
|
|
23
|
+
line-height: var(--wb-line-18);
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
color: var(--dsw-alias-label-primary);
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from '../lib/react.js';
|
|
2
|
+
import { h } from '../lib/react.js';
|
|
3
|
+
import './SettingsSection.css';
|
|
4
|
+
|
|
5
|
+
export interface SettingsSectionProps {
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly title: ReactNode;
|
|
8
|
+
readonly action?: ReactNode | undefined;
|
|
9
|
+
readonly children?: ReactNode | undefined;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function SettingsSection({ label, title, action, children }: SettingsSectionProps) {
|
|
13
|
+
return (
|
|
14
|
+
<section className="wb-settings" role="group" aria-label={label}>
|
|
15
|
+
<header className="wb-settingsHead">
|
|
16
|
+
<span className="wb-settingsTitle">{title}</span>
|
|
17
|
+
{action}
|
|
18
|
+
</header>
|
|
19
|
+
{children}
|
|
20
|
+
</section>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from '../lib/react.js';
|
|
2
|
+
import { h } from '../lib/react.js';
|
|
3
|
+
import './Stack.css';
|
|
4
|
+
|
|
5
|
+
export interface StackProps {
|
|
6
|
+
readonly children?: ReactNode | undefined;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function Stack({ children }: StackProps) {
|
|
10
|
+
return <div className="wb-stack">{children}</div>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
.wb-stateBlock {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: var(--wb-len-6);
|
|
6
|
+
}
|
|
7
|
+
.wb-stateBlockTitle {
|
|
8
|
+
margin: 0;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: var(--wb-len-6);
|
|
12
|
+
font-size: var(--dsw-font-xxs-12-font-size);
|
|
13
|
+
line-height: var(--wb-line-18);
|
|
14
|
+
color: var(--dsw-alias-label-primary);
|
|
15
|
+
}
|
|
16
|
+
.wb-stateBlockHint {
|
|
17
|
+
margin: 0;
|
|
18
|
+
font-size: var(--dsw-font-xxxs-11-font-size);
|
|
19
|
+
line-height: var(--wb-line-16);
|
|
20
|
+
color: var(--dsw-alias-label-tertiary);
|
|
21
|
+
}
|
|
22
|
+
.wb-stateBlockActions {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: var(--wb-len-8);
|
|
26
|
+
margin-top: var(--wb-len-2);
|
|
27
|
+
}
|
|
28
|
+
.wb-stateBlockResolving {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: var(--wb-len-8);
|
|
32
|
+
margin: 0;
|
|
33
|
+
font-size: var(--dsw-font-xxs-12-font-size);
|
|
34
|
+
line-height: var(--wb-line-18);
|
|
35
|
+
color: var(--dsw-alias-label-secondary);
|
|
36
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReactNode } from '../lib/react.js';
|
|
2
|
+
import { h } from '../lib/react.js';
|
|
3
|
+
import './StateBlock.css';
|
|
4
|
+
|
|
5
|
+
export interface StateBlockProps {
|
|
6
|
+
readonly title?: ReactNode | undefined;
|
|
7
|
+
readonly dot?: ReactNode | undefined;
|
|
8
|
+
readonly hint?: ReactNode | undefined;
|
|
9
|
+
readonly actions?: ReactNode | undefined;
|
|
10
|
+
readonly resolving?: ReactNode | undefined;
|
|
11
|
+
readonly children?: ReactNode | undefined;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function StateBlock({ title, dot, hint, actions, resolving, children }: StateBlockProps) {
|
|
15
|
+
return (
|
|
16
|
+
<div className="wb-stateBlock">
|
|
17
|
+
{title === undefined && dot === undefined ? null : (
|
|
18
|
+
<p className="wb-stateBlockTitle">
|
|
19
|
+
{dot}
|
|
20
|
+
{title}
|
|
21
|
+
</p>
|
|
22
|
+
)}
|
|
23
|
+
{resolving === undefined ? null : <p className="wb-stateBlockResolving">{resolving}</p>}
|
|
24
|
+
{hint === undefined ? null : <p className="wb-stateBlockHint">{hint}</p>}
|
|
25
|
+
{children}
|
|
26
|
+
{actions === undefined ? null : <div className="wb-stateBlockActions">{actions}</div>}
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
}
|
package/src/components/icons.tsx
CHANGED
|
@@ -66,3 +66,19 @@ export function IconModules({ size = 16 }: IconProps) {
|
|
|
66
66
|
</svg>
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
|
+
|
|
70
|
+
export function IconPanelScreen({ size = 16 }: IconProps) {
|
|
71
|
+
return (
|
|
72
|
+
<svg
|
|
73
|
+
width={size}
|
|
74
|
+
height={size}
|
|
75
|
+
viewBox="0 0 1024 1024"
|
|
76
|
+
fill="currentColor"
|
|
77
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
78
|
+
aria-hidden="true"
|
|
79
|
+
style={{ display: 'block', overflow: 'hidden' }}
|
|
80
|
+
>
|
|
81
|
+
<path d="M939 112c17.673 0 32 14.327 32 32v554.667c0 17.673-14.327 32-32 32l-394.5-0.001v96c0 3.74-0.642 7.331-1.82 10.668H768.4c17.673 0 32 14.326 32 32 0 17.496-14.042 31.712-31.47 31.995l-0.53 0.004H256.6c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h225.721a31.923 31.923 0 0 1-1.817-10.137l-0.004-0.53v-96H86c-17.496 0-31.713-14.041-31.996-31.47l-0.004-0.53V144c0-17.673 14.327-32 32-32z m-32 64H118v490.666h789V176zM341.9 432c17.496 0 31.713 14.042 31.996 31.47l0.004 0.53v85.333c0 17.673-14.327 32-32 32-17.496 0-31.713-14.041-31.996-31.47l-0.004-0.53V464c0-17.673 14.327-32 32-32z m170.6-85.333c17.496 0 31.713 14.041 31.996 31.47l0.004 0.53v170.666c0 17.673-14.327 32-32 32-17.496 0-31.713-14.041-31.996-31.47l-0.004-0.53V378.667c0-17.673 14.327-32 32-32z m170.6-85.334c17.496 0 31.713 14.042 31.996 31.471l0.004 0.53v256c0 17.672-14.327 32-32 32-17.496 0-31.713-14.042-31.996-31.471l-0.004-0.53v-256c0-17.673 14.327-32 32-32z" />
|
|
82
|
+
</svg>
|
|
83
|
+
);
|
|
84
|
+
}
|
package/src/config/constants.ts
CHANGED
|
@@ -47,6 +47,10 @@ export const STORAGE_KEY_PROJECT = "dsh-workbench.project";
|
|
|
47
47
|
|
|
48
48
|
export const STORAGE_KEY_RIGHTBAR = "dsh-workbench.rightbar.expanded";
|
|
49
49
|
|
|
50
|
+
export const STORAGE_KEY_RIGHTBAR_COLUMN = "dsh-workbench.rightbar.column";
|
|
51
|
+
|
|
52
|
+
export const RIGHTBAR_FULLSCREEN_WIDTH = 768;
|
|
53
|
+
|
|
50
54
|
export const LOCALE_NS = "workbench";
|
|
51
55
|
|
|
52
56
|
export const LOCALES = ["zh", "en"] as const;
|
package/src/i18n/en.ts
CHANGED
|
@@ -282,6 +282,9 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
282
282
|
'rightbar.label': 'Data panels',
|
|
283
283
|
'rightbar.expand': 'Expand the data panel',
|
|
284
284
|
'rightbar.collapse': 'Collapse the data panel',
|
|
285
|
+
'rightbar.column.label': 'Right column',
|
|
286
|
+
'rightbar.column.workbench': 'Workbench panel',
|
|
287
|
+
'rightbar.column.dsh': 'dsh panel',
|
|
285
288
|
'rightbar.refresh': 'Refresh',
|
|
286
289
|
'rightbar.refreshing': 'Refreshing…',
|
|
287
290
|
'rightbar.updatedAt': 'updated {time}',
|
|
@@ -289,7 +292,7 @@ export const en: Record<keyof WorkbenchMessages, string> = {
|
|
|
289
292
|
'coding.notARepo.title': 'This workspace is not a Coding repository',
|
|
290
293
|
'error.unknown': 'Something went wrong',
|
|
291
294
|
|
|
292
|
-
'board.title': '
|
|
295
|
+
'board.title': 'Workbench panel',
|
|
293
296
|
|
|
294
297
|
'panel.conversation': 'Conversation',
|
|
295
298
|
'panels.label': 'Global panels',
|
package/src/i18n/zh.ts
CHANGED
|
@@ -278,6 +278,9 @@ export const zh = {
|
|
|
278
278
|
'rightbar.label': '数据面板',
|
|
279
279
|
'rightbar.expand': '展开数据面板',
|
|
280
280
|
'rightbar.collapse': '收起数据面板',
|
|
281
|
+
'rightbar.column.label': '右侧栏',
|
|
282
|
+
'rightbar.column.workbench': '工作台面板',
|
|
283
|
+
'rightbar.column.dsh': 'dsh 面板',
|
|
281
284
|
'rightbar.refresh': '刷新',
|
|
282
285
|
'rightbar.refreshing': '刷新中…',
|
|
283
286
|
'rightbar.updatedAt': '更新于 {time}',
|
|
@@ -285,7 +288,7 @@ export const zh = {
|
|
|
285
288
|
'coding.notARepo.title': '这个项目不是 Coding 仓库',
|
|
286
289
|
'error.unknown': '出错了',
|
|
287
290
|
|
|
288
|
-
'board.title': '
|
|
291
|
+
'board.title': '工作台面板',
|
|
289
292
|
|
|
290
293
|
'panel.conversation': '对话',
|
|
291
294
|
'panels.label': '全局面板',
|
package/src/index.ts
CHANGED
|
@@ -10,13 +10,21 @@ export * from './api/unit-board.js';
|
|
|
10
10
|
export * from './api/unit.js';
|
|
11
11
|
export * from './api/workbench-client.js';
|
|
12
12
|
export * from './api/workbench-contract.js';
|
|
13
|
+
export * from './components/Activity.js';
|
|
13
14
|
export * from './components/ApprovalDetail.js';
|
|
15
|
+
export * from './components/ApprovalPlan.js';
|
|
16
|
+
export * from './components/Card.js';
|
|
14
17
|
export * from './components/CardHead.js';
|
|
15
18
|
export * from './components/ChoiceGroup.js';
|
|
16
19
|
export * from './components/LongTaskRow.js';
|
|
17
20
|
export * from './components/MockStrip.js';
|
|
21
|
+
export * from './components/Note.js';
|
|
18
22
|
export * from './components/ResourceStates.js';
|
|
23
|
+
export * from './components/Rows.js';
|
|
19
24
|
export * from './components/SaveBar.js';
|
|
25
|
+
export * from './components/SettingsSection.js';
|
|
26
|
+
export * from './components/Stack.js';
|
|
27
|
+
export * from './components/StateBlock.js';
|
|
20
28
|
export * from './components/TextField.js';
|
|
21
29
|
export * from './components/board-module.js';
|
|
22
30
|
export * from './components/icons.js';
|
package/src/lib/react.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { Fragment, h, useCallback, useEffect, useMemo, useRef, useState } from './react.js';
|
|
3
|
+
import { Fragment, h, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from './react.js';
|
|
4
4
|
|
|
5
5
|
describe('react 入口', () => {
|
|
6
6
|
it('h 就是 React.createElement(同一个引用,不是包装)', () => {
|
|
@@ -19,6 +19,7 @@ describe('react 入口', () => {
|
|
|
19
19
|
expect(Fragment).toBe(React.Fragment);
|
|
20
20
|
expect(useState).toBe(React.useState);
|
|
21
21
|
expect(useEffect).toBe(React.useEffect);
|
|
22
|
+
expect(useLayoutEffect).toBe(React.useLayoutEffect);
|
|
22
23
|
expect(useMemo).toBe(React.useMemo);
|
|
23
24
|
expect(useCallback).toBe(React.useCallback);
|
|
24
25
|
expect(useRef).toBe(React.useRef);
|
package/src/lib/react.ts
CHANGED
|
@@ -8,6 +8,7 @@ export const Fragment = react.Fragment;
|
|
|
8
8
|
|
|
9
9
|
export const useState = react.useState;
|
|
10
10
|
export const useEffect = react.useEffect;
|
|
11
|
+
export const useLayoutEffect = react.useLayoutEffect;
|
|
11
12
|
export const useMemo = react.useMemo;
|
|
12
13
|
export const useCallback = react.useCallback;
|
|
13
14
|
export const useRef = react.useRef;
|