@molecule/app-ide-react 3.0.1 → 3.0.2
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/components/AutoCommitBadge.d.ts +3 -1
- package/dist/components/AutoCommitBadge.d.ts.map +1 -1
- package/dist/components/AutoCommitBadge.js +8 -4
- package/dist/components/AutoCommitBadge.js.map +1 -1
- package/dist/components/ChatPanel.d.ts.map +1 -1
- package/dist/components/ChatPanel.js +18 -10
- package/dist/components/ChatPanel.js.map +1 -1
- package/dist/components/ContextSessionUsage.d.ts +24 -0
- package/dist/components/ContextSessionUsage.d.ts.map +1 -0
- package/dist/components/ContextSessionUsage.js +97 -0
- package/dist/components/ContextSessionUsage.js.map +1 -0
- package/dist/components/ContextUsageIndicator.d.ts +8 -3
- package/dist/components/ContextUsageIndicator.d.ts.map +1 -1
- package/dist/components/ContextUsageIndicator.js +81 -35
- package/dist/components/ContextUsageIndicator.js.map +1 -1
- package/dist/components/DockStrip.d.ts +5 -1
- package/dist/components/DockStrip.d.ts.map +1 -1
- package/dist/components/DockStrip.js +21 -14
- package/dist/components/DockStrip.js.map +1 -1
- package/dist/components/TestStatusBar.d.ts +16 -16
- package/dist/components/TestStatusBar.d.ts.map +1 -1
- package/dist/components/TestStatusBar.js +5 -22
- package/dist/components/TestStatusBar.js.map +1 -1
- package/package.json +3 -3
|
@@ -9,16 +9,11 @@
|
|
|
9
9
|
*
|
|
10
10
|
* It deliberately borrows the commit bar's chrome — same hairline top border,
|
|
11
11
|
* same `8px 8px 8px 10px` padding, same 12px chevron rotating 90° on expand,
|
|
12
|
-
* same muted `xs` label
|
|
13
|
-
*
|
|
14
|
-
* state; expanded adds the per-outcome counts and the running file.
|
|
12
|
+
* same muted `xs` label. The summary opens the tests browser directly; there
|
|
13
|
+
* is no intermediate disclosure or second navigation button.
|
|
15
14
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* Once anything has a result, the collapsed row shows a coloured
|
|
19
|
-
* `passed / failed / skipped` readout (green / red / yellow) so the state reads
|
|
20
|
-
* at a glance without expanding. Every colour comes from a theme token with a fallback, per
|
|
21
|
-
* DESIGN.md's semantic colours — no hardcoded palette.
|
|
15
|
+
* The status mark carries the run's tone; the short label summarises the result.
|
|
16
|
+
* The tests browser contains the full counts, current file and run output.
|
|
22
17
|
*
|
|
23
18
|
* @module
|
|
24
19
|
*/
|
|
@@ -34,8 +29,7 @@ import type { TestsRunState } from './tests-card-utilities.js';
|
|
|
34
29
|
*/
|
|
35
30
|
export declare function testsBarLabel(summary: TestsBarSummary): string;
|
|
36
31
|
/**
|
|
37
|
-
* The short label the tray chip wears
|
|
38
|
-
* and the running file are in the opened detail.
|
|
32
|
+
* The short label the tray chip wears; full details live in the tests browser.
|
|
39
33
|
*
|
|
40
34
|
* @param summary - The derived run summary.
|
|
41
35
|
* @returns The label.
|
|
@@ -47,10 +41,16 @@ export interface TestStatusBarProps {
|
|
|
47
41
|
run: TestsRunState;
|
|
48
42
|
/** The discovered tests, for naming the file that is running. */
|
|
49
43
|
tests: TestItem[];
|
|
50
|
-
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Legacy expansion state.
|
|
46
|
+
* @deprecated The summary opens the tests browser directly.
|
|
47
|
+
*/
|
|
48
|
+
expanded?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Legacy disclosure callback.
|
|
51
|
+
* @deprecated The summary opens the tests browser directly.
|
|
52
|
+
*/
|
|
53
|
+
onToggle?: () => void;
|
|
54
54
|
/** Open the tests browser (the `/test` card) — the place runs are started. */
|
|
55
55
|
onOpen: () => void;
|
|
56
56
|
/** Stop the run in flight, when one is running. */
|
|
@@ -62,5 +62,5 @@ export interface TestStatusBarProps {
|
|
|
62
62
|
* @param props - See {@link TestStatusBarProps}.
|
|
63
63
|
* @returns The bar.
|
|
64
64
|
*/
|
|
65
|
-
export declare function TestStatusBar({ run, tests,
|
|
65
|
+
export declare function TestStatusBar({ run, tests, onOpen, onStop }: TestStatusBarProps): JSX.Element;
|
|
66
66
|
//# sourceMappingURL=TestStatusBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestStatusBar.d.ts","sourceRoot":"","sources":["../../src/components/TestStatusBar.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"TestStatusBar.d.ts","sourceRoot":"","sources":["../../src/components/TestStatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAKhC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,0BAA0B,CAAA;AAE7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CA0C9D;AAYD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAS/D;AAED,wCAAwC;AACxC,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,GAAG,EAAE,aAAa,CAAA;IAClB,iEAAiE;IACjE,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,8EAA8E;IAC9E,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,mDAAmD;IACnD,MAAM,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAA;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAyC7F"}
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { t } from '@molecule/app-i18n';
|
|
3
3
|
import { getClassMap } from '@molecule/app-ui';
|
|
4
4
|
import { DockStrip, StatusMark } from './DockStrip.js';
|
|
5
5
|
import { summariseTestsBar } from './tests-bar-utilities.js';
|
|
6
|
-
/** The theme token each tone paints its dot and figures with. */
|
|
7
|
-
const TONE_COLOR = {
|
|
8
|
-
idle: 'var(--mol-color-text-muted, #6b7280)',
|
|
9
|
-
running: 'var(--mol-color-info, #2563eb)',
|
|
10
|
-
passing: 'var(--mol-color-success, #16a34a)',
|
|
11
|
-
failing: 'var(--mol-color-error, #dc2626)',
|
|
12
|
-
stopped: 'var(--mol-color-warning, #d97706)',
|
|
13
|
-
error: 'var(--mol-color-error, #dc2626)',
|
|
14
|
-
};
|
|
15
6
|
/**
|
|
16
7
|
* The one-line summary the collapsed bar shows.
|
|
17
8
|
*
|
|
@@ -55,8 +46,7 @@ const TONE_MARK = {
|
|
|
55
46
|
error: 'failed',
|
|
56
47
|
};
|
|
57
48
|
/**
|
|
58
|
-
* The short label the tray chip wears
|
|
59
|
-
* and the running file are in the opened detail.
|
|
49
|
+
* The short label the tray chip wears; full details live in the tests browser.
|
|
60
50
|
*
|
|
61
51
|
* @param summary - The derived run summary.
|
|
62
52
|
* @returns The label.
|
|
@@ -77,20 +67,13 @@ export function testsChipLabel(summary) {
|
|
|
77
67
|
* @param props - See {@link TestStatusBarProps}.
|
|
78
68
|
* @returns The bar.
|
|
79
69
|
*/
|
|
80
|
-
export function TestStatusBar({ run, tests,
|
|
70
|
+
export function TestStatusBar({ run, tests, onOpen, onStop }) {
|
|
81
71
|
const cm = getClassMap();
|
|
82
72
|
const summary = summariseTestsBar(run, tests);
|
|
83
73
|
const label = testsBarLabel(summary);
|
|
84
|
-
return (_jsx(DockStrip, { molId: "tests-bar", toggleMolId: "tests-bar-toggle", rootProps: { 'data-tests-tone': summary.tone }, expanded:
|
|
74
|
+
return (_jsx(DockStrip, { molId: "tests-bar", toggleMolId: "tests-bar-toggle", rootProps: { 'data-tests-tone': summary.tone }, expanded: false, onToggle: onOpen, onActivate: onOpen, label: _jsx("span", { "data-mol-id": "tests-bar-label", children: label }), hint: summary.tone === 'running' && (summary.currentTest ?? summary.currentFile) ? (_jsx("span", { "data-mol-id": "tests-bar-current", children: `· ${summary.currentTest ?? summary.currentFile}` })) : undefined, actions: run.running && onStop ? (_jsx("button", { type: "button", "data-mol-id": "tests-bar-stop", className: cm.cn(cm.button({ variant: 'solid', color: 'error', size: 'xs' }), cm.touchTargetCompact), onClick: (e) => {
|
|
85
75
|
e.stopPropagation();
|
|
86
76
|
onStop();
|
|
87
|
-
}, children: t('ide.testsBar.stop', undefined, { defaultValue: 'Stop' }) })) : undefined,
|
|
88
|
-
e.stopPropagation();
|
|
89
|
-
onOpen();
|
|
90
|
-
}, children: t('ide.testsBar.open', undefined, { defaultValue: 'Tests' }) })), icon: _jsx(StatusMark, { state: TONE_MARK[summary.tone], size: 14 }), chipLabel: testsChipLabel(summary), children: _jsxs("div", { "data-mol-id": "tests-bar-detail", className: cm.cn(cm.textMuted, cm.textSize('xs')), style: {
|
|
91
|
-
display: 'flex',
|
|
92
|
-
flexDirection: 'column',
|
|
93
|
-
gap: 2,
|
|
94
|
-
}, children: [_jsxs("div", { style: { display: 'flex', gap: 12, flexWrap: 'wrap' }, children: [_jsxs("span", { "data-mol-id": "tests-bar-passed", children: [_jsx("span", { style: { color: TONE_COLOR.passing, fontWeight: 600 }, children: summary.passed }), ' ', t('ide.testsBar.passedLabel', undefined, { defaultValue: 'passing' })] }), _jsxs("span", { "data-mol-id": "tests-bar-failed", children: [_jsx("span", { style: { color: TONE_COLOR.failing, fontWeight: 600 }, children: summary.failed }), ' ', t('ide.testsBar.failedLabel', undefined, { defaultValue: 'failing' })] }), _jsxs("span", { "data-mol-id": "tests-bar-skipped", children: [_jsx("span", { style: { color: TONE_COLOR.stopped, fontWeight: 600 }, children: summary.skipped }), ' ', t('ide.testsBar.skippedLabel', undefined, { defaultValue: 'skipped' })] }), summary.tone === 'running' ? (_jsxs("span", { "data-mol-id": "tests-bar-remaining", children: [_jsx("span", { style: { color: TONE_COLOR.running, fontWeight: 600 }, children: summary.remaining }), ' ', t('ide.testsBar.remainingLabel', undefined, { defaultValue: 'to go' })] })) : null] }), summary.currentFile ? (_jsxs("div", { "data-mol-id": "tests-bar-current-file", children: [t('ide.testsBar.currentFile', { file: summary.currentFile }, { defaultValue: 'Running {{file}}' }), summary.currentTest ? ` › ${summary.currentTest}` : ''] })) : null, run.error ? _jsx("div", { "data-mol-id": "tests-bar-error", children: run.error }) : null] }) }));
|
|
77
|
+
}, children: t('ide.testsBar.stop', undefined, { defaultValue: 'Stop' }) })) : undefined, icon: _jsx(StatusMark, { state: TONE_MARK[summary.tone], size: 14 }), chipLabel: testsChipLabel(summary) }));
|
|
95
78
|
}
|
|
96
79
|
//# sourceMappingURL=TestStatusBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestStatusBar.js","sourceRoot":"","sources":["../../src/components/TestStatusBar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"TestStatusBar.js","sourceRoot":"","sources":["../../src/components/TestStatusBar.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAwB,MAAM,gBAAgB,CAAA;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAG5D;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,OAAwB;IACpD,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA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
|
2
2
|
"name": "@molecule/app-ide-react",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "React IDE components for molecule.dev workspace",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
"@molecule/app-i18n": "1.1.1",
|
|
63
63
|
"@molecule/app-icons": "1.0.3",
|
|
64
64
|
"@molecule/app-live-preview": "1.0.3",
|
|
65
|
-
"@molecule/app-locales-ide": "1.10.
|
|
65
|
+
"@molecule/app-locales-ide": "1.10.12",
|
|
66
66
|
"@molecule/app-logger": "1.0.3",
|
|
67
67
|
"@molecule/app-react": "3.0.2",
|
|
68
68
|
"@molecule/app-storage": "1.1.0",
|
|
69
69
|
"@molecule/app-ui": "1.3.8",
|
|
70
|
-
"@molecule/app-ui-react": "3.0.
|
|
70
|
+
"@molecule/app-ui-react": "3.0.2",
|
|
71
71
|
"@molecule/app-ui-tailwind": "1.2.8",
|
|
72
72
|
"@testing-library/react": "16.3.3",
|
|
73
73
|
"@types/node": "26.6.5",
|