@variantree/watcher 0.1.2 → 0.1.3
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/package.json +1 -1
- package/scripts/postinstall.js +9 -11
- package/dist/ui/BranchTree.d.ts +0 -21
- package/dist/ui/BranchTree.d.ts.map +0 -1
- package/dist/ui/BranchTree.js +0 -48
- package/dist/ui/BranchTree.js.map +0 -1
- package/dist/ui/BranchView.d.ts +0 -14
- package/dist/ui/BranchView.d.ts.map +0 -1
- package/dist/ui/BranchView.js +0 -15
- package/dist/ui/BranchView.js.map +0 -1
- package/dist/ui/CheckpointView.d.ts +0 -7
- package/dist/ui/CheckpointView.d.ts.map +0 -1
- package/dist/ui/CheckpointView.js +0 -9
- package/dist/ui/CheckpointView.js.map +0 -1
- package/dist/ui/InitView.d.ts +0 -6
- package/dist/ui/InitView.d.ts.map +0 -1
- package/dist/ui/InitView.js +0 -8
- package/dist/ui/InitView.js.map +0 -1
- package/dist/ui/Panel.d.ts +0 -8
- package/dist/ui/Panel.d.ts.map +0 -1
- package/dist/ui/Panel.js +0 -8
- package/dist/ui/Panel.js.map +0 -1
- package/dist/ui/RestoreView.d.ts +0 -13
- package/dist/ui/RestoreView.d.ts.map +0 -1
- package/dist/ui/RestoreView.js +0 -15
- package/dist/ui/RestoreView.js.map +0 -1
- package/dist/ui/StatusView.d.ts +0 -25
- package/dist/ui/StatusView.d.ts.map +0 -1
- package/dist/ui/StatusView.js +0 -11
- package/dist/ui/StatusView.js.map +0 -1
- package/dist/ui/TreeView.d.ts +0 -21
- package/dist/ui/TreeView.d.ts.map +0 -1
- package/dist/ui/TreeView.js +0 -7
- package/dist/ui/TreeView.js.map +0 -1
- package/dist/ui/WatchView.d.ts +0 -7
- package/dist/ui/WatchView.d.ts.map +0 -1
- package/dist/ui/WatchView.js +0 -9
- package/dist/ui/WatchView.js.map +0 -1
- package/dist/ui/components.d.ts +0 -22
- package/dist/ui/components.d.ts.map +0 -1
- package/dist/ui/components.js +0 -25
- package/dist/ui/components.js.map +0 -1
- package/dist/ui/render.d.ts +0 -71
- package/dist/ui/render.d.ts.map +0 -1
- package/dist/ui/render.js +0 -61
- package/dist/ui/render.js.map +0 -1
- package/dist/ui/theme.d.ts +0 -45
- package/dist/ui/theme.d.ts.map +0 -1
- package/dist/ui/theme.js +0 -45
- package/dist/ui/theme.js.map +0 -1
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* AI tool global configs (OpenCode, Claude Code).
|
|
5
5
|
*
|
|
6
6
|
* Runs automatically after `npm install -g @variantree/watcher`.
|
|
7
|
-
*
|
|
7
|
+
* Always updates the config to ensure the latest MCP args are set.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const fs = require('node:fs');
|
|
11
|
+
const path = require('node:path');
|
|
12
|
+
const os = require('node:os');
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const MCP_ARGS = ['-y', '@variantree/mcp@latest'];
|
|
15
15
|
const MCP_ENV = { VARIANTREE_DIR: '.' };
|
|
16
16
|
|
|
17
17
|
// ─── OpenCode ────────────────────────────────────────────────────────────────
|
|
@@ -25,11 +25,10 @@ function registerOpenCode() {
|
|
|
25
25
|
try { config = JSON.parse(fs.readFileSync(configPath, 'utf8')); } catch {}
|
|
26
26
|
|
|
27
27
|
if (!config.mcp) config.mcp = {};
|
|
28
|
-
if (config.mcp.variantree) return;
|
|
29
28
|
|
|
30
29
|
config.mcp.variantree = {
|
|
31
30
|
type: 'local',
|
|
32
|
-
command: ['npx', ...
|
|
31
|
+
command: ['npx', ...MCP_ARGS],
|
|
33
32
|
environment: MCP_ENV,
|
|
34
33
|
};
|
|
35
34
|
|
|
@@ -47,11 +46,10 @@ function registerClaudeCode() {
|
|
|
47
46
|
try { config = JSON.parse(fs.readFileSync(configPath, 'utf8')); } catch {}
|
|
48
47
|
|
|
49
48
|
if (!config.mcpServers) config.mcpServers = {};
|
|
50
|
-
if (config.mcpServers.variantree) return;
|
|
51
49
|
|
|
52
50
|
config.mcpServers.variantree = {
|
|
53
51
|
command: 'npx',
|
|
54
|
-
args:
|
|
52
|
+
args: MCP_ARGS,
|
|
55
53
|
env: MCP_ENV,
|
|
56
54
|
};
|
|
57
55
|
|
|
@@ -61,5 +59,5 @@ function registerClaudeCode() {
|
|
|
61
59
|
|
|
62
60
|
// ─── Run ─────────────────────────────────────────────────────────────────────
|
|
63
61
|
|
|
64
|
-
try { registerOpenCode(); } catch {}
|
|
65
|
-
try { registerClaudeCode(); } catch {}
|
|
62
|
+
try { registerOpenCode(); } catch (e) { console.warn('[variantree] OpenCode config skipped:', e.message); }
|
|
63
|
+
try { registerClaudeCode(); } catch (e) { console.warn('[variantree] Claude Code config skipped:', e.message); }
|
package/dist/ui/BranchTree.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
interface BranchInfo {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
parentCheckpointId: string | null;
|
|
5
|
-
messageCount: number;
|
|
6
|
-
isActive: boolean;
|
|
7
|
-
}
|
|
8
|
-
interface CheckpointInfo {
|
|
9
|
-
id: string;
|
|
10
|
-
label: string;
|
|
11
|
-
branchId: string;
|
|
12
|
-
snapshotRef?: string | null;
|
|
13
|
-
createdAt: number;
|
|
14
|
-
}
|
|
15
|
-
interface BranchTreeProps {
|
|
16
|
-
branches: BranchInfo[];
|
|
17
|
-
checkpoints: CheckpointInfo[];
|
|
18
|
-
}
|
|
19
|
-
export default function BranchTree({ branches, checkpoints }: BranchTreeProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=BranchTree.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BranchTree.d.ts","sourceRoot":"","sources":["../../src/ui/BranchTree.tsx"],"names":[],"mappings":"AAIA,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,eAAe;IACvB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AAuGD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,eAAe,2CAiB5E"}
|
package/dist/ui/BranchTree.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import { colors, icons, tree as t } from './theme.js';
|
|
4
|
-
function formatTime(ts) {
|
|
5
|
-
const diff = Date.now() - ts;
|
|
6
|
-
if (diff < 60_000)
|
|
7
|
-
return 'just now';
|
|
8
|
-
if (diff < 3_600_000)
|
|
9
|
-
return `${Math.floor(diff / 60_000)}m ago`;
|
|
10
|
-
if (diff < 86_400_000)
|
|
11
|
-
return `${Math.floor(diff / 3_600_000)}h ago`;
|
|
12
|
-
return `${Math.floor(diff / 86_400_000)}d ago`;
|
|
13
|
-
}
|
|
14
|
-
function CheckpointNode({ cp, isLast, childBranches, allCheckpoints, allBranches, indent }) {
|
|
15
|
-
const connector = isLast && childBranches.length === 0 ? t.last : t.fork;
|
|
16
|
-
const snap = cp.snapshotRef ? ` ${icons.snap}` : '';
|
|
17
|
-
const time = formatTime(cp.createdAt);
|
|
18
|
-
const continuation = isLast ? t.space : t.vertSpace;
|
|
19
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsxs(Text, { dimColor: true, children: [indent, connector, " "] }), _jsx(Text, { color: colors.amber, children: cp.label }), _jsx(Text, { color: colors.slate, children: snap }), _jsxs(Text, { dimColor: true, children: [" ", time] })] }), childBranches.map((child, i) => {
|
|
20
|
-
const childIsLast = i === childBranches.length - 1;
|
|
21
|
-
const nextIndent = indent + continuation;
|
|
22
|
-
return (_jsx(BranchNode, { branch: child, allCheckpoints: allCheckpoints, allBranches: allBranches, indent: nextIndent, isLast: childIsLast }, child.id));
|
|
23
|
-
})] }));
|
|
24
|
-
}
|
|
25
|
-
function BranchNode({ branch, allCheckpoints, allBranches, indent, isLast }) {
|
|
26
|
-
const connector = indent === '' ? '' : (isLast ? t.last : t.fork) + ' ';
|
|
27
|
-
const nameColor = branch.isActive ? colors.green : colors.white;
|
|
28
|
-
const activeTag = branch.isActive ? ` ${icons.active}` : '';
|
|
29
|
-
const branchCheckpoints = allCheckpoints
|
|
30
|
-
.filter(cp => cp.branchId === branch.id)
|
|
31
|
-
.sort((a, b) => a.createdAt - b.createdAt);
|
|
32
|
-
const childIndent = indent === ''
|
|
33
|
-
? ' '
|
|
34
|
-
: indent + (isLast ? t.space : t.vertSpace);
|
|
35
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsxs(Text, { dimColor: true, children: [indent, connector] }), _jsx(Text, { color: nameColor, bold: true, children: branch.name }), _jsxs(Text, { dimColor: true, children: [" (", branch.messageCount, " msgs)"] }), branch.isActive && _jsx(Text, { color: colors.green, children: activeTag })] }), branchCheckpoints.map((cp, i) => {
|
|
36
|
-
const cpChildren = allBranches.filter(b => b.parentCheckpointId === cp.id);
|
|
37
|
-
const cpIsLast = i === branchCheckpoints.length - 1;
|
|
38
|
-
return (_jsx(CheckpointNode, { cp: cp, isLast: cpIsLast, childBranches: cpChildren, allCheckpoints: allCheckpoints, allBranches: allBranches, indent: childIndent }, cp.id));
|
|
39
|
-
}), branchCheckpoints.length === 0 && (_jsxs(Box, { children: [_jsxs(Text, { dimColor: true, children: [childIndent, t.last, " "] }), _jsx(Text, { dimColor: true, italic: true, children: "no checkpoints" })] }))] }));
|
|
40
|
-
}
|
|
41
|
-
export default function BranchTree({ branches, checkpoints }) {
|
|
42
|
-
const root = branches.find(b => !b.parentCheckpointId);
|
|
43
|
-
if (!root) {
|
|
44
|
-
return _jsx(Text, { dimColor: true, children: " No branches found." });
|
|
45
|
-
}
|
|
46
|
-
return (_jsx(Box, { flexDirection: "column", children: _jsx(BranchNode, { branch: root, allCheckpoints: checkpoints, allBranches: branches, indent: "", isLast: true }) }));
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=BranchTree.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BranchTree.js","sourceRoot":"","sources":["../../src/ui/BranchTree.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,YAAY,CAAC;AAuBtD,SAAS,UAAU,CAAC,EAAU;IAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;IAC7B,IAAI,IAAI,GAAG,MAAM;QAAE,OAAO,UAAU,CAAC;IACrC,IAAI,IAAI,GAAG,SAAS;QAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;IACjE,IAAI,IAAI,GAAG,UAAU;QAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC;IACrE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC;AACjD,CAAC;AAED,SAAS,cAAc,CAAC,EAAE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aAAa,EAAC,QAAQ,YACzB,KAAC,UAAU,IACT,MAAM,EAAE,IAAI,EACZ,cAAc,EAAE,WAAW,EAC3B,WAAW,EAAE,QAAQ,EACrB,MAAM,EAAC,EAAE,EACT,MAAM,EAAE,IAAI,GACZ,GACE,CACP,CAAC;AACJ,CAAC"}
|
package/dist/ui/BranchView.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface BranchViewProps {
|
|
2
|
-
name: string;
|
|
3
|
-
fromCheckpoint: string;
|
|
4
|
-
restoreSummary?: {
|
|
5
|
-
written: number;
|
|
6
|
-
deleted: number;
|
|
7
|
-
skipped: number;
|
|
8
|
-
} | null;
|
|
9
|
-
contextPath: string;
|
|
10
|
-
launchResult: 'launched' | 'failed' | 'skipped';
|
|
11
|
-
}
|
|
12
|
-
export default function BranchView({ name, fromCheckpoint, restoreSummary, contextPath, launchResult }: BranchViewProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=BranchView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BranchView.d.ts","sourceRoot":"","sources":["../../src/ui/BranchView.tsx"],"names":[],"mappings":"AAMA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;CACjD;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,eAAe,2CA6CtH"}
|
package/dist/ui/BranchView.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from 'ink';
|
|
3
|
-
import Panel from './Panel.js';
|
|
4
|
-
import { Success, Detail, Spacer, NextSteps, Warning } from './components.js';
|
|
5
|
-
import { colors } from './theme.js';
|
|
6
|
-
export default function BranchView({ name, fromCheckpoint, restoreSummary, contextPath, launchResult }) {
|
|
7
|
-
return (_jsxs(Panel, { command: "branch", children: [_jsxs(Success, { children: [_jsx(Text, { children: "Branch " }), _jsxs(Text, { bold: true, color: colors.purple, children: ["\"", name, "\""] }), _jsx(Text, { children: " created from " }), _jsxs(Text, { dimColor: true, children: ["\"", fromCheckpoint, "\""] })] }), _jsx(Spacer, {}), restoreSummary && (_jsx(Detail, { label: "restored", value: _jsxs(Text, { children: [restoreSummary.written, " written, ", restoreSummary.deleted, " deleted, ", restoreSummary.skipped, " unchanged"] }) })), _jsx(Detail, { label: "context", value: _jsx(Text, { children: contextPath }) }), _jsx(Spacer, {}), launchResult === 'launched' && (_jsx(Success, { children: _jsx(Text, { color: colors.blue, children: "Opening new OpenCode session..." }) })), launchResult === 'failed' && (_jsxs(_Fragment, { children: [_jsx(Warning, { children: "Could not launch OpenCode automatically" }), _jsx(Spacer, {}), _jsx(NextSteps, { steps: [
|
|
8
|
-
'Restart OpenCode (quit and reopen)',
|
|
9
|
-
'Tell it: "Read .variantree/branch-context.md for context"',
|
|
10
|
-
] })] })), launchResult === 'skipped' && (_jsx(NextSteps, { steps: [
|
|
11
|
-
'Restart OpenCode (quit and reopen)',
|
|
12
|
-
'Tell it: "Read .variantree/branch-context.md for context"',
|
|
13
|
-
] }))] }));
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=BranchView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BranchView.js","sourceRoot":"","sources":["../../src/ui/BranchView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,E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AAK,SAAS,IAAI,CAC7B,KAAC,SAAS,IAAC,KAAK,EAAE;oBAChB,oCAAoC;oBACpC,2DAA2D;iBAC5D,GAAI,CACN,IACK,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CheckpointView.d.ts","sourceRoot":"","sources":["../../src/ui/CheckpointView.tsx"],"names":[],"mappings":"AAMA,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,mBAAmB,2CAiBjF"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from 'ink';
|
|
3
|
-
import Panel from './Panel.js';
|
|
4
|
-
import { Success, Detail, Spacer } from './components.js';
|
|
5
|
-
import { colors } from './theme.js';
|
|
6
|
-
export default function CheckpointView({ label, syncedCount }) {
|
|
7
|
-
return (_jsxs(Panel, { command: "checkpoint", children: [_jsxs(Success, { children: [_jsx(Text, { children: "Checkpoint " }), _jsxs(Text, { bold: true, color: colors.white, children: ["\"", label, "\""] }), _jsx(Text, { children: " created" })] }), _jsx(Spacer, {}), syncedCount > 0 && (_jsx(Detail, { label: "synced", value: _jsxs(Text, { children: [syncedCount, " message(s) from OpenCode"] }) })), _jsx(Detail, { label: "snapshot", value: _jsx(Text, { children: "code saved" }) })] }));
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=CheckpointView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CheckpointView.js","sourceRoot":"","sources":["../../src/ui/CheckpointView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAOpC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,WAAW,EAAuB;IAChF,OAAO,CACL,MAAC,KAAK,IAAC,OAAO,EAAC,YAAY,aACzB,MAAC,OAAO,eACN,KAAC,IAAI,8BAAmB,EACxB,MAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,KAAK,mBAAS,KAAK,UAAc,EAC1D,KAAC,IAAI,2BAAgB,IACb,EAEV,KAAC,MAAM,KAAG,EAET,WAAW,GAAG,CAAC,IAAI,CAClB,KAAC,MAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,KAAK,EAAE,MAAC,IAAI,eAAE,WAAW,iCAAiC,GAAI,CACtF,EACD,KAAC,MAAM,IAAC,KAAK,EAAC,UAAU,EAAC,KAAK,EAAE,KAAC,IAAI,6BAAkB,GAAI,IACrD,CACT,CAAC;AACJ,CAAC"}
|
package/dist/ui/InitView.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InitView.d.ts","sourceRoot":"","sources":["../../src/ui/InitView.tsx"],"names":[],"mappings":"AAKA,UAAU,aAAa;IACrB,SAAS,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACtD;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,SAAS,EAAE,EAAE,aAAa,2CA6B5D"}
|
package/dist/ui/InitView.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from 'ink';
|
|
3
|
-
import Panel from './Panel.js';
|
|
4
|
-
import { Success, Hint, Spacer } from './components.js';
|
|
5
|
-
export default function InitView({ mcpStatus }) {
|
|
6
|
-
return (_jsxs(Panel, { command: "init", children: [_jsx(Success, { children: "Workspace ready" }), _jsx(Spacer, {}), mcpStatus === 'created' && (_jsx(Success, { children: "Created opencode.json with Variantree MCP server" })), mcpStatus === 'added' && (_jsx(Success, { children: "OpenCode MCP server added to existing opencode.json" })), mcpStatus === 'exists' && (_jsx(Hint, { children: "OpenCode MCP configuration already exists" })), mcpStatus === 'failed' && (_jsx(Hint, { children: "Could not auto-configure opencode.json \u2014 add the MCP server manually" })), _jsx(Spacer, {}), _jsxs(Hint, { children: [_jsx(Text, { children: "Run " }), _jsx(Text, { bold: true, color: "white", children: "variantree checkpoint \"label\"" }), _jsx(Text, { children: " after coding to save progress" })] })] }));
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=InitView.js.map
|
package/dist/ui/InitView.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InitView.js","sourceRoot":"","sources":["../../src/ui/InitView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAMxD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,SAAS,EAAiB;IAC3D,OAAO,CACL,MAAC,KAAK,IAAC,OAAO,EAAC,MAAM,aACnB,KAAC,OAAO,kCAA0B,EAElC,KAAC,MAAM,KAAG,EAET,SAAS,KAAK,SAAS,IAAI,CAC1B,KAAC,OAAO,mEAA2D,CACpE,EACA,SAAS,KAAK,OAAO,IAAI,CACxB,KAAC,OAAO,sEAA8D,CACvE,EACA,SAAS,KAAK,QAAQ,IAAI,CACzB,KAAC,IAAI,4DAAiD,CACvD,EACA,SAAS,KAAK,QAAQ,IAAI,CACzB,KAAC,IAAI,4FAA4E,CAClF,EAED,KAAC,MAAM,KAAG,EAEV,MAAC,IAAI,eACH,KAAC,IAAI,uBAAY,EACjB,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,OAAO,gDAA+C,EACvE,KAAC,IAAI,iDAAsC,IACtC,IACD,CACT,CAAC;AACJ,CAAC"}
|
package/dist/ui/Panel.d.ts
DELETED
package/dist/ui/Panel.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../src/ui/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,UAAU,2CA0B9D"}
|
package/dist/ui/Panel.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import { colors, icons } from './theme.js';
|
|
4
|
-
export default function Panel({ command, children }) {
|
|
5
|
-
const w = Math.min(process.stdout.columns ?? 60, 80);
|
|
6
|
-
return (_jsxs(Box, { flexDirection: "column", width: w, children: [_jsxs(Box, { paddingLeft: 2, paddingTop: 1, paddingBottom: 0, children: [_jsxs(Text, { color: colors.purple, bold: true, children: [icons.logo, " variantree"] }), _jsxs(Text, { dimColor: true, children: [" ", icons.dot, " "] }), _jsx(Text, { dimColor: true, children: command })] }), _jsx(Box, { flexDirection: "column", borderStyle: "round", borderColor: colors.dimGray, paddingLeft: 1, paddingRight: 1, paddingTop: 0, paddingBottom: 0, children: children })] }));
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=Panel.js.map
|
package/dist/ui/Panel.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.js","sourceRoot":"","sources":["../../src/ui/Panel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAO3C,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAc;IAC7D,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAErD,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,KAAK,EAAE,CAAC,aAElC,MAAC,GAAG,IAAC,WAAW,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,aAClD,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,mBAAE,KAAK,CAAC,IAAI,mBAAmB,EAC/D,MAAC,IAAI,IAAC,QAAQ,wBAAG,KAAK,CAAC,GAAG,SAAS,EACnC,KAAC,IAAI,IAAC,QAAQ,kBAAE,OAAO,GAAQ,IAC3B,EAGN,KAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,WAAW,EAAC,OAAO,EACnB,WAAW,EAAE,MAAM,CAAC,OAAO,EAC3B,WAAW,EAAE,CAAC,EACd,YAAY,EAAE,CAAC,EACf,UAAU,EAAE,CAAC,EACb,aAAa,EAAE,CAAC,YAEf,QAAQ,GACL,IACF,CACP,CAAC;AACJ,CAAC"}
|
package/dist/ui/RestoreView.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
interface RestoreViewProps {
|
|
2
|
-
label: string;
|
|
3
|
-
summary?: {
|
|
4
|
-
written: number;
|
|
5
|
-
deleted: number;
|
|
6
|
-
skipped: number;
|
|
7
|
-
} | null;
|
|
8
|
-
contextPath: string;
|
|
9
|
-
launchResult: 'launched' | 'failed' | 'skipped';
|
|
10
|
-
}
|
|
11
|
-
export default function RestoreView({ label, summary, contextPath, launchResult }: RestoreViewProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=RestoreView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RestoreView.d.ts","sourceRoot":"","sources":["../../src/ui/RestoreView.tsx"],"names":[],"mappings":"AAMA,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACvE,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;CACjD;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,gBAAgB,2CA6ClG"}
|
package/dist/ui/RestoreView.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from 'ink';
|
|
3
|
-
import Panel from './Panel.js';
|
|
4
|
-
import { Success, Detail, Spacer, NextSteps, Warning } from './components.js';
|
|
5
|
-
import { colors } from './theme.js';
|
|
6
|
-
export default function RestoreView({ label, summary, contextPath, launchResult }) {
|
|
7
|
-
return (_jsxs(Panel, { command: "restore", children: [_jsxs(Success, { children: [_jsx(Text, { children: "Restored to " }), _jsxs(Text, { bold: true, color: colors.white, children: ["\"", label, "\""] }), !summary && _jsx(Text, { dimColor: true, children: " (no code snapshot)" })] }), _jsx(Spacer, {}), summary && (_jsxs(_Fragment, { children: [_jsx(Detail, { label: "written", value: _jsxs(Text, { children: [summary.written, " file(s)"] }) }), _jsx(Detail, { label: "deleted", value: _jsxs(Text, { children: [summary.deleted, " file(s)"] }) }), _jsx(Detail, { label: "unchanged", value: _jsxs(Text, { children: [summary.skipped, " file(s)"] }) })] })), _jsx(Detail, { label: "context", value: _jsx(Text, { children: contextPath }) }), _jsx(Spacer, {}), launchResult === 'launched' && (_jsx(Success, { children: _jsx(Text, { color: colors.blue, children: "Opening new OpenCode session..." }) })), launchResult === 'failed' && (_jsxs(_Fragment, { children: [_jsx(Warning, { children: "Could not launch OpenCode automatically" }), _jsx(Spacer, {}), _jsx(NextSteps, { steps: [
|
|
8
|
-
'Restart OpenCode (quit and reopen)',
|
|
9
|
-
'Tell it: "Read .variantree/branch-context.md for context"',
|
|
10
|
-
] })] })), launchResult === 'skipped' && (_jsx(NextSteps, { steps: [
|
|
11
|
-
'Restart OpenCode (quit and reopen)',
|
|
12
|
-
'Tell it: "Read .variantree/branch-context.md for context"',
|
|
13
|
-
] }))] }));
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=RestoreView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RestoreView.js","sourceRoot":"","sources":["../../src/ui/RestoreView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AASpC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAoB;IACjG,OAAO,CACL,MAAC,KAAK,IAAC,OAAO,EAAC,SAAS,aACtB,MAAC,OAAO,eACN,KAAC,IAAI,+BAAoB,EACzB,MAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,KAAK,mBAAS,KAAK,UAAc,EACzD,CAAC,OAAO,IAAI,KAAC,IAAI,IAAC,QAAQ,0CAA2B,IAC9C,EAEV,KAAC,MAAM,KAAG,EAET,OAAO,IAAI,CACV,8BACE,KAAC,MAAM,IAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,MAAC,IAAI,eAAE,OAAO,CAAC,OAAO,gBAAgB,GAAI,EACzE,KAAC,MAAM,IAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,MAAC,IAAI,eAAE,OAAO,CAAC,OAAO,gBAAgB,GAAI,EACzE,KAAC,MAAM,IAAC,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,MAAC,IAAI,eAAE,OAAO,CAAC,OAAO,gBAAgB,GAAI,IAC1E,CACJ,EACD,KAAC,MAAM,IAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,KAAC,IAAI,cAAE,WAAW,GAAQ,GAAI,EAE7D,KAAC,MAAM,KAAG,EAET,YAAY,KAAK,UAAU,IAAI,CAC9B,KAAC,OAAO,cACN,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,gDAAwC,GACxD,CACX,EACA,YAAY,KAAK,QAAQ,IAAI,CAC5B,8BACE,KAAC,OAAO,0DAAkD,EAC1D,KAAC,MAAM,KAAG,EACV,KAAC,SAAS,IAAC,KAAK,EAAE;4BAChB,oCAAoC;4BACpC,2DAA2D;yBAC5D,GAAI,IACJ,CACJ,EACA,YAAY,KAAK,SAAS,IAAI,CAC7B,KAAC,SAAS,IAAC,KAAK,EAAE;oBAChB,oCAAoC;oBACpC,2DAA2D;iBAC5D,GAAI,CACN,IACK,CACT,CAAC;AACJ,CAAC"}
|
package/dist/ui/StatusView.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
interface BranchInfo {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
parentCheckpointId: string | null;
|
|
5
|
-
messageCount: number;
|
|
6
|
-
isActive: boolean;
|
|
7
|
-
}
|
|
8
|
-
interface CheckpointInfo {
|
|
9
|
-
id: string;
|
|
10
|
-
label: string;
|
|
11
|
-
branchId: string;
|
|
12
|
-
snapshotRef?: string | null;
|
|
13
|
-
createdAt: number;
|
|
14
|
-
}
|
|
15
|
-
interface StatusViewProps {
|
|
16
|
-
activeBranch: {
|
|
17
|
-
name: string;
|
|
18
|
-
};
|
|
19
|
-
messageCount: number;
|
|
20
|
-
branches: BranchInfo[];
|
|
21
|
-
checkpoints: CheckpointInfo[];
|
|
22
|
-
}
|
|
23
|
-
export default function StatusView({ activeBranch, messageCount, branches, checkpoints }: StatusViewProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export {};
|
|
25
|
-
//# sourceMappingURL=StatusView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusView.d.ts","sourceRoot":"","sources":["../../src/ui/StatusView.tsx"],"names":[],"mappings":"AAOA,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,eAAe;IACvB,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,eAAe,2CAyBxG"}
|
package/dist/ui/StatusView.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import Panel from './Panel.js';
|
|
4
|
-
import BranchTree from './BranchTree.js';
|
|
5
|
-
import { Hint, Spacer } from './components.js';
|
|
6
|
-
import { colors, icons } from './theme.js';
|
|
7
|
-
export default function StatusView({ activeBranch, messageCount, branches, checkpoints }) {
|
|
8
|
-
const snapshotCount = checkpoints.filter(cp => cp.snapshotRef).length;
|
|
9
|
-
return (_jsxs(Panel, { command: "status", children: [_jsxs(Box, { children: [_jsxs(Text, { color: colors.purple, children: [icons.branch, " "] }), _jsx(Text, { color: colors.green, bold: true, children: activeBranch.name }), _jsxs(Text, { dimColor: true, children: [" (", messageCount, " messages)"] })] }), _jsx(Spacer, {}), _jsx(BranchTree, { branches: branches, checkpoints: checkpoints }), _jsx(Spacer, {}), _jsxs(Hint, { children: [branches.length, " branch", branches.length !== 1 ? 'es' : '', ' · ', checkpoints.length, " checkpoint", checkpoints.length !== 1 ? 's' : '', snapshotCount > 0 ? ` (${snapshotCount} with snapshots)` : ''] })] }));
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=StatusView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusView.js","sourceRoot":"","sources":["../../src/ui/StatusView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAyB3C,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAmB;IACvG,MAAM,aAAa,GAAG,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;IAEtE,OAAO,CACL,MAAC,KAAK,IAAC,OAAO,EAAC,QAAQ,aACrB,MAAC,GAAG,eACF,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,aAAG,KAAK,CAAC,MAAM,SAAS,EAClD,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,kBAAE,YAAY,CAAC,IAAI,GAAQ,EAC1D,MAAC,IAAI,IAAC,QAAQ,0BAAK,YAAY,kBAAkB,IAC7C,EAEN,KAAC,MAAM,KAAG,EAEV,KAAC,UAAU,IAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,GAAI,EAE5D,KAAC,MAAM,KAAG,EAEV,MAAC,IAAI,eACF,QAAQ,CAAC,MAAM,aAAS,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EACzD,KAAK,EACL,WAAW,CAAC,MAAM,iBAAa,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAClE,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,aAAa,kBAAkB,CAAC,CAAC,CAAC,EAAE,IACzD,IACD,CACT,CAAC;AACJ,CAAC"}
|
package/dist/ui/TreeView.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
interface BranchInfo {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
parentCheckpointId: string | null;
|
|
5
|
-
messageCount: number;
|
|
6
|
-
isActive: boolean;
|
|
7
|
-
}
|
|
8
|
-
interface CheckpointInfo {
|
|
9
|
-
id: string;
|
|
10
|
-
label: string;
|
|
11
|
-
branchId: string;
|
|
12
|
-
snapshotRef?: string | null;
|
|
13
|
-
createdAt: number;
|
|
14
|
-
}
|
|
15
|
-
interface TreeViewProps {
|
|
16
|
-
branches: BranchInfo[];
|
|
17
|
-
checkpoints: CheckpointInfo[];
|
|
18
|
-
}
|
|
19
|
-
export default function TreeView({ branches, checkpoints }: TreeViewProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=TreeView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../src/ui/TreeView.tsx"],"names":[],"mappings":"AAIA,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,aAAa;IACrB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,aAAa,2CAMxE"}
|
package/dist/ui/TreeView.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import Panel from './Panel.js';
|
|
3
|
-
import BranchTree from './BranchTree.js';
|
|
4
|
-
export default function TreeView({ branches, checkpoints }) {
|
|
5
|
-
return (_jsx(Panel, { command: "tree", children: _jsx(BranchTree, { branches: branches, checkpoints: checkpoints }) }));
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=TreeView.js.map
|
package/dist/ui/TreeView.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TreeView.js","sourceRoot":"","sources":["../../src/ui/TreeView.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAuBzC,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAiB;IACvE,OAAO,CACL,KAAC,KAAK,IAAC,OAAO,EAAC,MAAM,YACnB,KAAC,UAAU,IAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,GAAI,GACtD,CACT,CAAC;AACJ,CAAC"}
|
package/dist/ui/WatchView.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WatchView.d.ts","sourceRoot":"","sources":["../../src/ui/WatchView.tsx"],"names":[],"mappings":"AAMA,UAAU,cAAc;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,cAAc,2CA2BzE"}
|
package/dist/ui/WatchView.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import Panel from './Panel.js';
|
|
4
|
-
import { Hint } from './components.js';
|
|
5
|
-
import { colors, icons } from './theme.js';
|
|
6
|
-
export default function WatchView({ syncCount, lastError }) {
|
|
7
|
-
return (_jsxs(Panel, { command: "watch", children: [_jsxs(Box, { children: [_jsxs(Text, { color: colors.green, children: [icons.watching, " "] }), _jsx(Text, { children: "Watching for changes..." })] }), syncCount > 0 && (_jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { dimColor: true, children: ["synced ", syncCount, " message(s)"] }) })), lastError && (_jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { color: colors.red, children: [icons.cross, " ", lastError] }) })), _jsxs(Hint, { children: [_jsx(Text, { children: "Press " }), _jsx(Text, { bold: true, color: "white", children: "Ctrl+C" }), _jsx(Text, { children: " to stop" })] })] }));
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=WatchView.js.map
|
package/dist/ui/WatchView.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WatchView.js","sourceRoot":"","sources":["../../src/ui/WatchView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAO3C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,SAAS,EAAkB;IACxE,OAAO,CACL,MAAC,KAAK,IAAC,OAAO,EAAC,OAAO,aACpB,MAAC,GAAG,eACF,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,aAAG,KAAK,CAAC,QAAQ,SAAS,EACnD,KAAC,IAAI,0CAA+B,IAChC,EAEL,SAAS,GAAG,CAAC,IAAI,CAChB,KAAC,GAAG,IAAC,WAAW,EAAE,CAAC,YACjB,MAAC,IAAI,IAAC,QAAQ,8BAAS,SAAS,mBAAmB,GAC/C,CACP,EAEA,SAAS,IAAI,CACZ,KAAC,GAAG,IAAC,WAAW,EAAE,CAAC,YACjB,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,GAAG,aAAG,KAAK,CAAC,KAAK,OAAG,SAAS,IAAQ,GACrD,CACP,EAED,MAAC,IAAI,eACH,KAAC,IAAI,yBAAc,EACnB,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,OAAO,uBAAc,EACtC,KAAC,IAAI,2BAAgB,IAChB,IACD,CACT,CAAC;AACJ,CAAC"}
|
package/dist/ui/components.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare function Success({ children }: {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare function ErrorLine({ children }: {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare function Warning({ children }: {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare function Hint({ children }: {
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare function Detail({ label, value }: {
|
|
15
|
-
label: string;
|
|
16
|
-
value: React.ReactNode;
|
|
17
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare function Spacer(): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export declare function NextSteps({ steps }: {
|
|
20
|
-
steps: string[];
|
|
21
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
//# sourceMappingURL=components.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/ui/components.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAOlE;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAOpE;AAED,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAOlE;AAED,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAM/D;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CASjF;AAED,wBAAgB,MAAM,4CAErB;AAED,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,2CAcvD"}
|
package/dist/ui/components.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import { colors, icons } from './theme.js';
|
|
4
|
-
export function Success({ children }) {
|
|
5
|
-
return (_jsxs(Box, { children: [_jsxs(Text, { color: colors.green, children: [icons.check, " "] }), _jsx(Text, { children: children })] }));
|
|
6
|
-
}
|
|
7
|
-
export function ErrorLine({ children }) {
|
|
8
|
-
return (_jsxs(Box, { children: [_jsxs(Text, { color: colors.red, children: [icons.cross, " "] }), _jsx(Text, { color: colors.red, children: children })] }));
|
|
9
|
-
}
|
|
10
|
-
export function Warning({ children }) {
|
|
11
|
-
return (_jsxs(Box, { children: [_jsxs(Text, { color: colors.amber, children: [icons.warning, " "] }), _jsx(Text, { children: children })] }));
|
|
12
|
-
}
|
|
13
|
-
export function Hint({ children }) {
|
|
14
|
-
return (_jsx(Box, { paddingLeft: 1, children: _jsx(Text, { dimColor: true, children: children }) }));
|
|
15
|
-
}
|
|
16
|
-
export function Detail({ label, value }) {
|
|
17
|
-
return (_jsxs(Box, { paddingLeft: 2, children: [_jsx(Box, { width: 14, children: _jsx(Text, { dimColor: true, children: label }) }), _jsx(Text, { children: value })] }));
|
|
18
|
-
}
|
|
19
|
-
export function Spacer() {
|
|
20
|
-
return _jsx(Text, { children: ' ' });
|
|
21
|
-
}
|
|
22
|
-
export function NextSteps({ steps }) {
|
|
23
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsxs(Text, { color: colors.amber, children: [icons.arrow, " "] }), _jsx(Text, { bold: true, children: "Next steps" })] }), steps.map((step, i) => (_jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { dimColor: true, children: [i + 1, ". ", step] }) }, i)))] }));
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=components.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/ui/components.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAiC;IACjE,OAAO,CACL,MAAC,GAAG,eACF,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,aAAG,KAAK,CAAC,KAAK,SAAS,EAChD,KAAC,IAAI,cAAE,QAAQ,GAAQ,IACnB,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,EAAE,QAAQ,EAAiC;IACnE,OAAO,CACL,MAAC,GAAG,eACF,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,GAAG,aAAG,KAAK,CAAC,KAAK,SAAS,EAC9C,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,GAAG,YAAG,QAAQ,GAAQ,IACtC,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,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AACJ,CAAC"}
|
package/dist/ui/render.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ink render helpers for CLI commands.
|
|
3
|
-
* Kept separate so cli.ts doesn't need JSX.
|
|
4
|
-
*/
|
|
5
|
-
interface BranchInfo {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
parentCheckpointId: string | null;
|
|
9
|
-
messageCount: number;
|
|
10
|
-
isActive: boolean;
|
|
11
|
-
}
|
|
12
|
-
interface CheckpointInfo {
|
|
13
|
-
id: string;
|
|
14
|
-
label: string;
|
|
15
|
-
branchId: string;
|
|
16
|
-
snapshotRef?: string | null;
|
|
17
|
-
createdAt: number;
|
|
18
|
-
}
|
|
19
|
-
export declare function renderInit(data: {
|
|
20
|
-
mcpStatus: 'created' | 'added' | 'exists' | 'failed';
|
|
21
|
-
}): Promise<unknown>;
|
|
22
|
-
export declare function renderCheckpoint(data: {
|
|
23
|
-
label: string;
|
|
24
|
-
syncedCount: number;
|
|
25
|
-
}): Promise<unknown>;
|
|
26
|
-
export declare function renderBranch(data: {
|
|
27
|
-
name: string;
|
|
28
|
-
fromCheckpoint: string;
|
|
29
|
-
restoreSummary?: {
|
|
30
|
-
written: number;
|
|
31
|
-
deleted: number;
|
|
32
|
-
skipped: number;
|
|
33
|
-
} | null;
|
|
34
|
-
contextPath: string;
|
|
35
|
-
launchResult: 'launched' | 'failed' | 'skipped';
|
|
36
|
-
}): Promise<unknown>;
|
|
37
|
-
export declare function renderRestore(data: {
|
|
38
|
-
label: string;
|
|
39
|
-
summary?: {
|
|
40
|
-
written: number;
|
|
41
|
-
deleted: number;
|
|
42
|
-
skipped: number;
|
|
43
|
-
} | null;
|
|
44
|
-
contextPath: string;
|
|
45
|
-
launchResult: 'launched' | 'failed' | 'skipped';
|
|
46
|
-
}): Promise<unknown>;
|
|
47
|
-
export declare function renderStatus(data: {
|
|
48
|
-
activeBranch: {
|
|
49
|
-
name: string;
|
|
50
|
-
};
|
|
51
|
-
messageCount: number;
|
|
52
|
-
branches: BranchInfo[];
|
|
53
|
-
checkpoints: CheckpointInfo[];
|
|
54
|
-
}): Promise<unknown>;
|
|
55
|
-
export declare function renderTree(data: {
|
|
56
|
-
branches: BranchInfo[];
|
|
57
|
-
checkpoints: CheckpointInfo[];
|
|
58
|
-
}): Promise<unknown>;
|
|
59
|
-
export declare function renderWatch(initialData: {
|
|
60
|
-
syncCount: number;
|
|
61
|
-
lastError?: string | null;
|
|
62
|
-
}): {
|
|
63
|
-
update(data: {
|
|
64
|
-
syncCount: number;
|
|
65
|
-
lastError?: string | null;
|
|
66
|
-
}): void;
|
|
67
|
-
cleanup(): void;
|
|
68
|
-
};
|
|
69
|
-
export declare function renderError(command: string, message: string, hintText?: string): Promise<unknown>;
|
|
70
|
-
export {};
|
|
71
|
-
//# sourceMappingURL=render.d.ts.map
|
package/dist/ui/render.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/ui/render.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE;IAAE,SAAS,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAA;CAAE,oBAGxF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IAA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AE,MAAM,GAAG,IAAI,CAAA;KAAE;;EAOhE;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,oBAW9E"}
|
package/dist/ui/render.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ink render helpers for CLI commands.
|
|
3
|
-
* Kept separate so cli.ts doesn't need JSX.
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { render } from 'ink';
|
|
7
|
-
import InitView from './InitView.js';
|
|
8
|
-
import CheckpointView from './CheckpointView.js';
|
|
9
|
-
import BranchView from './BranchView.js';
|
|
10
|
-
import RestoreView from './RestoreView.js';
|
|
11
|
-
import StatusView from './StatusView.js';
|
|
12
|
-
import TreeView from './TreeView.js';
|
|
13
|
-
import WatchView from './WatchView.js';
|
|
14
|
-
import Panel from './Panel.js';
|
|
15
|
-
import { ErrorLine, Hint } from './components.js';
|
|
16
|
-
export function renderInit(data) {
|
|
17
|
-
const { waitUntilExit } = render(React.createElement(InitView, data));
|
|
18
|
-
return waitUntilExit();
|
|
19
|
-
}
|
|
20
|
-
export function renderCheckpoint(data) {
|
|
21
|
-
const { waitUntilExit } = render(React.createElement(CheckpointView, data));
|
|
22
|
-
return waitUntilExit();
|
|
23
|
-
}
|
|
24
|
-
export function renderBranch(data) {
|
|
25
|
-
const { waitUntilExit } = render(React.createElement(BranchView, data));
|
|
26
|
-
return waitUntilExit();
|
|
27
|
-
}
|
|
28
|
-
export function renderRestore(data) {
|
|
29
|
-
const { waitUntilExit } = render(React.createElement(RestoreView, data));
|
|
30
|
-
return waitUntilExit();
|
|
31
|
-
}
|
|
32
|
-
export function renderStatus(data) {
|
|
33
|
-
const { waitUntilExit } = render(React.createElement(StatusView, data));
|
|
34
|
-
return waitUntilExit();
|
|
35
|
-
}
|
|
36
|
-
export function renderTree(data) {
|
|
37
|
-
const { waitUntilExit } = render(React.createElement(TreeView, data));
|
|
38
|
-
return waitUntilExit();
|
|
39
|
-
}
|
|
40
|
-
export function renderWatch(initialData) {
|
|
41
|
-
const inst = render(React.createElement(WatchView, initialData));
|
|
42
|
-
return {
|
|
43
|
-
update(data) {
|
|
44
|
-
inst.rerender(React.createElement(WatchView, data));
|
|
45
|
-
},
|
|
46
|
-
cleanup() {
|
|
47
|
-
inst.unmount();
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export function renderError(command, message, hintText) {
|
|
52
|
-
const children = [
|
|
53
|
-
React.createElement(ErrorLine, { key: 'err', children: message }),
|
|
54
|
-
];
|
|
55
|
-
if (hintText) {
|
|
56
|
-
children.push(React.createElement(Hint, { key: 'hint', children: hintText }));
|
|
57
|
-
}
|
|
58
|
-
const { waitUntilExit } = render(React.createElement(Panel, { command, children }));
|
|
59
|
-
return waitUntilExit();
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=render.js.map
|
package/dist/ui/render.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/ui/render.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAkBlD,MAAM,UAAU,UAAU,CAAC,IAA8D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ACL,MAAM,CAAC,IAAsD;YAC3D,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;QACtD,CAAC;QACD,OAAO;YACL,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAe,EAAE,OAAe,EAAE,QAAiB;IAC7E,MAAM,QAAQ,GAAyB;QACrC,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;KAClE,CAAC;IACF,IAAI,QAAQ,EAAE,CAAC;QACb,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;IAChF,CAAC;IACD,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAC9B,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAClD,CAAC;IACF,OAAO,aAAa,EAAE,CAAC;AACzB,CAAC"}
|
package/dist/ui/theme.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared theme constants for CLI and Ink components.
|
|
3
|
-
* Claude Code-inspired: minimal, muted, box-drawing borders.
|
|
4
|
-
*/
|
|
5
|
-
export declare const colors: {
|
|
6
|
-
readonly purple: "#A78BFA";
|
|
7
|
-
readonly green: "#34D399";
|
|
8
|
-
readonly amber: "#FBBF24";
|
|
9
|
-
readonly red: "#F87171";
|
|
10
|
-
readonly blue: "#60A5FA";
|
|
11
|
-
readonly dimGray: "#6B7280";
|
|
12
|
-
readonly white: "#F9FAFB";
|
|
13
|
-
readonly slate: "#94A3B8";
|
|
14
|
-
readonly cyan: "#67E8F9";
|
|
15
|
-
};
|
|
16
|
-
export declare const icons: {
|
|
17
|
-
readonly logo: "◆";
|
|
18
|
-
readonly check: "✓";
|
|
19
|
-
readonly cross: "✗";
|
|
20
|
-
readonly dot: "·";
|
|
21
|
-
readonly arrow: "→";
|
|
22
|
-
readonly branch: "⎇";
|
|
23
|
-
readonly snap: "◈";
|
|
24
|
-
readonly active: "●";
|
|
25
|
-
readonly inactive: "○";
|
|
26
|
-
readonly warning: "▲";
|
|
27
|
-
readonly play: "▶";
|
|
28
|
-
readonly watching: "◉";
|
|
29
|
-
};
|
|
30
|
-
export declare const box: {
|
|
31
|
-
readonly topLeft: "╭";
|
|
32
|
-
readonly topRight: "╮";
|
|
33
|
-
readonly bottomLeft: "╰";
|
|
34
|
-
readonly bottomRight: "╯";
|
|
35
|
-
readonly horizontal: "─";
|
|
36
|
-
readonly vertical: "│";
|
|
37
|
-
};
|
|
38
|
-
export declare const tree: {
|
|
39
|
-
readonly vert: "│";
|
|
40
|
-
readonly fork: "├──";
|
|
41
|
-
readonly last: "└──";
|
|
42
|
-
readonly space: " ";
|
|
43
|
-
readonly vertSpace: "│ ";
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=theme.d.ts.map
|
package/dist/ui/theme.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/ui/theme.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,MAAM;;;;;;;;;;CAUT,CAAC;AAEX,eAAO,MAAM,KAAK;;;;;;;;;;;;;CAaR,CAAC;AAEX,eAAO,MAAM,GAAG;;;;;;;CAON,CAAC;AAEX,eAAO,MAAM,IAAI;;;;;;CAMP,CAAC"}
|
package/dist/ui/theme.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared theme constants for CLI and Ink components.
|
|
3
|
-
* Claude Code-inspired: minimal, muted, box-drawing borders.
|
|
4
|
-
*/
|
|
5
|
-
export const colors = {
|
|
6
|
-
purple: '#A78BFA',
|
|
7
|
-
green: '#34D399',
|
|
8
|
-
amber: '#FBBF24',
|
|
9
|
-
red: '#F87171',
|
|
10
|
-
blue: '#60A5FA',
|
|
11
|
-
dimGray: '#6B7280',
|
|
12
|
-
white: '#F9FAFB',
|
|
13
|
-
slate: '#94A3B8',
|
|
14
|
-
cyan: '#67E8F9',
|
|
15
|
-
};
|
|
16
|
-
export const icons = {
|
|
17
|
-
logo: '◆',
|
|
18
|
-
check: '✓',
|
|
19
|
-
cross: '✗',
|
|
20
|
-
dot: '·',
|
|
21
|
-
arrow: '→',
|
|
22
|
-
branch: '⎇',
|
|
23
|
-
snap: '◈',
|
|
24
|
-
active: '●',
|
|
25
|
-
inactive: '○',
|
|
26
|
-
warning: '▲',
|
|
27
|
-
play: '▶',
|
|
28
|
-
watching: '◉',
|
|
29
|
-
};
|
|
30
|
-
export const box = {
|
|
31
|
-
topLeft: '╭',
|
|
32
|
-
topRight: '╮',
|
|
33
|
-
bottomLeft: '╰',
|
|
34
|
-
bottomRight: '╯',
|
|
35
|
-
horizontal: '─',
|
|
36
|
-
vertical: '│',
|
|
37
|
-
};
|
|
38
|
-
export const tree = {
|
|
39
|
-
vert: '│',
|
|
40
|
-
fork: '├──',
|
|
41
|
-
last: '└──',
|
|
42
|
-
space: ' ',
|
|
43
|
-
vertSpace: '│ ',
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=theme.js.map
|
package/dist/ui/theme.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/ui/theme.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;CACP,CAAC;AAEX,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,KAAK,EAAE,GAAG;IACV,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,GAAG;IACT,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,IAAI,EAAE,GAAG;IACT,QAAQ,EAAE,GAAG;CACL,CAAC;AAEX,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,GAAG;IACf,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,GAAG;CACL,CAAC;AAEX,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,MAAM;IACb,SAAS,EAAE,MAAM;CACT,CAAC"}
|