brainfile 0.18.1 → 0.20.0
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/README.md +18 -24
- package/dist/__tests__/helpers/mcp-wire.d.ts +45 -0
- package/dist/__tests__/helpers/mcp-wire.d.ts.map +1 -0
- package/dist/__tests__/helpers/mcp-wire.js +133 -0
- package/dist/__tests__/helpers/mcp-wire.js.map +1 -0
- package/dist/__tests__/helpers/mcp.d.ts +34 -0
- package/dist/__tests__/helpers/mcp.d.ts.map +1 -0
- package/dist/__tests__/helpers/mcp.js +37 -0
- package/dist/__tests__/helpers/mcp.js.map +1 -0
- package/dist/chunk-I5SJHUZK.mjs +52 -0
- package/dist/chunk-UOCQBEEW.mjs +12583 -0
- package/dist/cli.js +8 -479
- package/dist/cli.mjs +41334 -0
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +28 -37
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/adr.d.ts +1 -9
- package/dist/commands/adr.d.ts.map +1 -1
- package/dist/commands/adr.js +11 -88
- package/dist/commands/adr.js.map +1 -1
- package/dist/commands/archive.d.ts +2 -4
- package/dist/commands/archive.d.ts.map +1 -1
- package/dist/commands/archive.js +55 -212
- package/dist/commands/archive.js.map +1 -1
- package/dist/commands/brief.d.ts +31 -0
- package/dist/commands/brief.d.ts.map +1 -0
- package/dist/commands/brief.js +151 -0
- package/dist/commands/brief.js.map +1 -0
- package/dist/commands/complete.d.ts +0 -4
- package/dist/commands/complete.d.ts.map +1 -1
- package/dist/commands/complete.js +14 -168
- package/dist/commands/complete.js.map +1 -1
- package/dist/commands/contract.d.ts.map +1 -1
- package/dist/commands/contract.js +66 -331
- package/dist/commands/contract.js.map +1 -1
- package/dist/commands/delete.d.ts.map +1 -1
- package/dist/commands/delete.js +13 -55
- package/dist/commands/delete.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +3 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +3 -54
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/log.js +33 -26
- package/dist/commands/log.js.map +1 -1
- package/dist/commands/mcp.d.ts +9 -0
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +34 -18
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +14 -15
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/move.d.ts.map +1 -1
- package/dist/commands/move.js +31 -126
- package/dist/commands/move.js.map +1 -1
- package/dist/commands/patch.d.ts.map +1 -1
- package/dist/commands/patch.js +22 -92
- package/dist/commands/patch.js.map +1 -1
- package/dist/commands/plan.d.ts +61 -0
- package/dist/commands/plan.d.ts.map +1 -0
- package/dist/commands/plan.js +205 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +20 -146
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/show.d.ts.map +1 -1
- package/dist/commands/show.js +5 -126
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/subtask.d.ts.map +1 -1
- package/dist/commands/subtask.js +19 -135
- package/dist/commands/subtask.js.map +1 -1
- package/dist/commands/types.d.ts +2 -2
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/commands/types.js +8 -30
- package/dist/commands/types.js.map +1 -1
- package/dist/devtools-NE5M3KPM.mjs +92 -0
- package/dist/lib/contractRunner.d.ts.map +1 -1
- package/dist/lib/contractRunner.js +19 -205
- package/dist/lib/contractRunner.js.map +1 -1
- package/dist/mcp/helpers.d.ts +11 -16
- package/dist/mcp/helpers.d.ts.map +1 -1
- package/dist/mcp/helpers.js +9 -46
- package/dist/mcp/helpers.js.map +1 -1
- package/dist/mcp/schemas.d.ts +297 -0
- package/dist/mcp/schemas.d.ts.map +1 -0
- package/dist/mcp/schemas.js +328 -0
- package/dist/mcp/schemas.js.map +1 -0
- package/dist/mcp/tools/brief_tool.d.ts +14 -0
- package/dist/mcp/tools/brief_tool.d.ts.map +1 -0
- package/dist/mcp/tools/brief_tool.js +58 -0
- package/dist/mcp/tools/brief_tool.js.map +1 -0
- package/dist/mcp/tools/contract_tool.d.ts +1 -1
- package/dist/mcp/tools/contract_tool.d.ts.map +1 -1
- package/dist/mcp/tools/contract_tool.js +58 -186
- package/dist/mcp/tools/contract_tool.js.map +1 -1
- package/dist/mcp/tools/get_task_tool.d.ts +1 -1
- package/dist/mcp/tools/get_task_tool.d.ts.map +1 -1
- package/dist/mcp/tools/get_task_tool.js +18 -32
- package/dist/mcp/tools/get_task_tool.js.map +1 -1
- package/dist/mcp/tools/list_tasks_tool.d.ts +1 -1
- package/dist/mcp/tools/list_tasks_tool.d.ts.map +1 -1
- package/dist/mcp/tools/list_tasks_tool.js +14 -45
- package/dist/mcp/tools/list_tasks_tool.js.map +1 -1
- package/dist/mcp/tools/search_tool.d.ts +1 -1
- package/dist/mcp/tools/search_tool.d.ts.map +1 -1
- package/dist/mcp/tools/search_tool.js +33 -101
- package/dist/mcp/tools/search_tool.js.map +1 -1
- package/dist/mcp/tools/subtask_tool.d.ts +1 -1
- package/dist/mcp/tools/subtask_tool.d.ts.map +1 -1
- package/dist/mcp/tools/subtask_tool.js +95 -236
- package/dist/mcp/tools/subtask_tool.js.map +1 -1
- package/dist/mcp/tools/task_add_tool.d.ts +1 -1
- package/dist/mcp/tools/task_add_tool.d.ts.map +1 -1
- package/dist/mcp/tools/task_add_tool.js +63 -154
- package/dist/mcp/tools/task_add_tool.js.map +1 -1
- package/dist/mcp/tools/task_complete_tool.d.ts +1 -1
- package/dist/mcp/tools/task_complete_tool.d.ts.map +1 -1
- package/dist/mcp/tools/task_complete_tool.js +59 -127
- package/dist/mcp/tools/task_complete_tool.js.map +1 -1
- package/dist/mcp/tools/task_delete_tool.d.ts +1 -1
- package/dist/mcp/tools/task_delete_tool.d.ts.map +1 -1
- package/dist/mcp/tools/task_delete_tool.js +19 -33
- package/dist/mcp/tools/task_delete_tool.js.map +1 -1
- package/dist/mcp/tools/task_move_tool.d.ts +1 -1
- package/dist/mcp/tools/task_move_tool.d.ts.map +1 -1
- package/dist/mcp/tools/task_move_tool.js +53 -150
- package/dist/mcp/tools/task_move_tool.js.map +1 -1
- package/dist/mcp/tools/task_patch_tool.d.ts +1 -1
- package/dist/mcp/tools/task_patch_tool.d.ts.map +1 -1
- package/dist/mcp/tools/task_patch_tool.js +49 -113
- package/dist/mcp/tools/task_patch_tool.js.map +1 -1
- package/dist/open-ZGSQIGEH.mjs +542 -0
- package/dist/schemas/board.json +1 -1
- package/dist/tui/theme.d.ts +74 -95
- package/dist/tui/theme.d.ts.map +1 -1
- package/dist/tui/theme.js +113 -110
- package/dist/tui/theme.js.map +1 -1
- package/dist/tui-H3RI22S4.mjs +23374 -0
- package/dist/utils/cli-error.d.ts +20 -0
- package/dist/utils/cli-error.d.ts.map +1 -1
- package/dist/utils/cli-error.js +36 -0
- package/dist/utils/cli-error.js.map +1 -1
- package/dist/utils/dot-brainfile.d.ts +0 -4
- package/dist/utils/dot-brainfile.d.ts.map +1 -1
- package/dist/utils/dot-brainfile.js +0 -17
- package/dist/utils/dot-brainfile.js.map +1 -1
- package/dist/utils/errorHandler.d.ts +7 -11
- package/dist/utils/errorHandler.d.ts.map +1 -1
- package/dist/utils/errorHandler.js +8 -19
- package/dist/utils/errorHandler.js.map +1 -1
- package/package.json +24 -16
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/rules.d.ts +0 -68
- package/dist/commands/rules.d.ts.map +0 -1
- package/dist/commands/rules.js +0 -322
- package/dist/commands/rules.js.map +0 -1
- package/dist/commands/tui.d.ts +0 -6
- package/dist/commands/tui.d.ts.map +0 -1
- package/dist/commands/tui.js +0 -79
- package/dist/commands/tui.js.map +0 -1
- package/dist/tui/BrainfileTUI.d.ts +0 -4
- package/dist/tui/BrainfileTUI.d.ts.map +0 -1
- package/dist/tui/BrainfileTUI.js +0 -272
- package/dist/tui/BrainfileTUI.js.map +0 -1
- package/dist/tui/actions.d.ts +0 -84
- package/dist/tui/actions.d.ts.map +0 -1
- package/dist/tui/actions.js +0 -1251
- package/dist/tui/actions.js.map +0 -1
- package/dist/tui/components/ColumnTabs.d.ts +0 -9
- package/dist/tui/components/ColumnTabs.d.ts.map +0 -1
- package/dist/tui/components/ColumnTabs.js +0 -34
- package/dist/tui/components/ColumnTabs.js.map +0 -1
- package/dist/tui/components/Header.d.ts +0 -15
- package/dist/tui/components/Header.d.ts.map +0 -1
- package/dist/tui/components/Header.js +0 -48
- package/dist/tui/components/Header.js.map +0 -1
- package/dist/tui/components/HelpOverlay.d.ts +0 -9
- package/dist/tui/components/HelpOverlay.d.ts.map +0 -1
- package/dist/tui/components/HelpOverlay.js +0 -116
- package/dist/tui/components/HelpOverlay.js.map +0 -1
- package/dist/tui/components/LogsPanel.d.ts +0 -16
- package/dist/tui/components/LogsPanel.d.ts.map +0 -1
- package/dist/tui/components/LogsPanel.js +0 -115
- package/dist/tui/components/LogsPanel.js.map +0 -1
- package/dist/tui/components/MainPanelTabs.d.ts +0 -10
- package/dist/tui/components/MainPanelTabs.d.ts.map +0 -1
- package/dist/tui/components/MainPanelTabs.js +0 -56
- package/dist/tui/components/MainPanelTabs.js.map +0 -1
- package/dist/tui/components/ManualBorder.d.ts +0 -42
- package/dist/tui/components/ManualBorder.d.ts.map +0 -1
- package/dist/tui/components/ManualBorder.js +0 -56
- package/dist/tui/components/ManualBorder.js.map +0 -1
- package/dist/tui/components/Overlays.d.ts +0 -41
- package/dist/tui/components/Overlays.d.ts.map +0 -1
- package/dist/tui/components/Overlays.js +0 -127
- package/dist/tui/components/Overlays.js.map +0 -1
- package/dist/tui/components/ProgressBar.d.ts +0 -8
- package/dist/tui/components/ProgressBar.d.ts.map +0 -1
- package/dist/tui/components/ProgressBar.js +0 -35
- package/dist/tui/components/ProgressBar.js.map +0 -1
- package/dist/tui/components/RulesPanel.d.ts +0 -25
- package/dist/tui/components/RulesPanel.d.ts.map +0 -1
- package/dist/tui/components/RulesPanel.js +0 -139
- package/dist/tui/components/RulesPanel.js.map +0 -1
- package/dist/tui/components/SearchBar.d.ts +0 -8
- package/dist/tui/components/SearchBar.d.ts.map +0 -1
- package/dist/tui/components/SearchBar.js +0 -38
- package/dist/tui/components/SearchBar.js.map +0 -1
- package/dist/tui/components/StackedTaskList.d.ts +0 -27
- package/dist/tui/components/StackedTaskList.d.ts.map +0 -1
- package/dist/tui/components/StackedTaskList.js +0 -120
- package/dist/tui/components/StackedTaskList.js.map +0 -1
- package/dist/tui/components/StatusBar.d.ts +0 -14
- package/dist/tui/components/StatusBar.d.ts.map +0 -1
- package/dist/tui/components/StatusBar.js +0 -42
- package/dist/tui/components/StatusBar.js.map +0 -1
- package/dist/tui/components/TaskCard.d.ts +0 -25
- package/dist/tui/components/TaskCard.d.ts.map +0 -1
- package/dist/tui/components/TaskCard.js +0 -221
- package/dist/tui/components/TaskCard.js.map +0 -1
- package/dist/tui/components/TaskCardMeasure.d.ts +0 -31
- package/dist/tui/components/TaskCardMeasure.d.ts.map +0 -1
- package/dist/tui/components/TaskCardMeasure.js +0 -133
- package/dist/tui/components/TaskCardMeasure.js.map +0 -1
- package/dist/tui/components/TaskDetail.d.ts +0 -13
- package/dist/tui/components/TaskDetail.d.ts.map +0 -1
- package/dist/tui/components/TaskDetail.js +0 -64
- package/dist/tui/components/TaskDetail.js.map +0 -1
- package/dist/tui/components/TaskList.d.ts +0 -12
- package/dist/tui/components/TaskList.d.ts.map +0 -1
- package/dist/tui/components/TaskList.js +0 -75
- package/dist/tui/components/TaskList.js.map +0 -1
- package/dist/tui/components/index.d.ts +0 -31
- package/dist/tui/components/index.d.ts.map +0 -1
- package/dist/tui/components/index.js +0 -43
- package/dist/tui/components/index.js.map +0 -1
- package/dist/tui/hooks/index.d.ts +0 -3
- package/dist/tui/hooks/index.d.ts.map +0 -1
- package/dist/tui/hooks/index.js +0 -8
- package/dist/tui/hooks/index.js.map +0 -1
- package/dist/tui/hooks/useBrainfileLoader.d.ts +0 -5
- package/dist/tui/hooks/useBrainfileLoader.d.ts.map +0 -1
- package/dist/tui/hooks/useBrainfileLoader.js +0 -237
- package/dist/tui/hooks/useBrainfileLoader.js.map +0 -1
- package/dist/tui/hooks/useKeyboardNavigation.d.ts +0 -20
- package/dist/tui/hooks/useKeyboardNavigation.d.ts.map +0 -1
- package/dist/tui/hooks/useKeyboardNavigation.js +0 -806
- package/dist/tui/hooks/useKeyboardNavigation.js.map +0 -1
- package/dist/tui/index.d.ts +0 -10
- package/dist/tui/index.d.ts.map +0 -1
- package/dist/tui/index.js +0 -38
- package/dist/tui/index.js.map +0 -1
- package/dist/tui/types.d.ts +0 -53
- package/dist/tui/types.d.ts.map +0 -1
- package/dist/tui/types.js +0 -12
- package/dist/tui/types.js.map +0 -1
- package/dist/tui/utils.d.ts +0 -24
- package/dist/tui/utils.d.ts.map +0 -1
- package/dist/tui/utils.js +0 -161
- package/dist/tui/utils.js.map +0 -1
- package/dist/utils/board-types.d.ts +0 -13
- package/dist/utils/board-types.d.ts.map +0 -1
- package/dist/utils/board-types.js +0 -7
- package/dist/utils/board-types.js.map +0 -1
- package/dist/utils/contractSpec.d.ts +0 -13
- package/dist/utils/contractSpec.d.ts.map +0 -1
- package/dist/utils/contractSpec.js +0 -61
- package/dist/utils/contractSpec.js.map +0 -1
- package/dist/utils/strict-validation.d.ts +0 -8
- package/dist/utils/strict-validation.d.ts.map +0 -1
- package/dist/utils/strict-validation.js +0 -41
- package/dist/utils/strict-validation.js.map +0 -1
package/dist/tui/theme.d.ts
CHANGED
|
@@ -1,119 +1,98 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Brainfile TUI
|
|
2
|
+
* Brainfile TUI v3 design system.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* 1. True black background (#000) for maximum contrast
|
|
6
|
-
* 2. Muted grays for secondary content
|
|
7
|
-
* 3. Vibrant accent colors used sparingly
|
|
8
|
-
* 4. Rounded borders for modern feel
|
|
9
|
-
* 5. Generous spacing for readability
|
|
4
|
+
* Two rules drive everything here:
|
|
10
5
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
6
|
+
* 1. **Colour is signal only.** Priority, contract state and selection get
|
|
7
|
+
* colour; nothing else does. IDs and metadata are dim, titles are default
|
|
8
|
+
* foreground. There are no decorative accents and no theme colours for
|
|
9
|
+
* "chrome", because v3 has no chrome.
|
|
10
|
+
* 2. **Structure comes from typography.** A document's kind is a single glyph
|
|
11
|
+
* in column 1; hierarchy is two spaces of indent; separation is whitespace.
|
|
12
|
+
* The only box-drawing character that survives is the horizontal rule used
|
|
13
|
+
* for the header and footer boundaries.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
-
readonly bg: "#000000";
|
|
16
|
-
readonly bgSubtle: "#0a0a0a";
|
|
17
|
-
readonly bgMuted: "#1a1a1a";
|
|
18
|
-
readonly bgHighlight: "#2a2a2a";
|
|
19
|
-
readonly panel: "#1e1e1e";
|
|
15
|
+
declare const RAW_PALETTE: {
|
|
20
16
|
readonly text: "#ffffff";
|
|
21
17
|
readonly textSecondary: "#a0a0a0";
|
|
22
18
|
readonly textMuted: "#606060";
|
|
23
19
|
readonly textDim: "#404040";
|
|
24
|
-
readonly border: "#333333";
|
|
25
|
-
readonly borderFocus: "#505050";
|
|
26
|
-
readonly borderAccent: "#7c3aed";
|
|
27
20
|
readonly critical: "#ef4444";
|
|
28
21
|
readonly high: "#f59e0b";
|
|
29
22
|
readonly medium: "#3b82f6";
|
|
30
23
|
readonly low: "#6b7280";
|
|
31
|
-
readonly
|
|
24
|
+
readonly contractDraft: "#606060";
|
|
25
|
+
readonly contractReady: "#06b6d4";
|
|
26
|
+
readonly contractInProgress: "#eab308";
|
|
27
|
+
readonly contractDelivered: "#c026d3";
|
|
28
|
+
readonly contractDone: "#22c55e";
|
|
29
|
+
readonly contractFailed: "#ef4444";
|
|
32
30
|
readonly success: "#22c55e";
|
|
33
31
|
readonly warning: "#eab308";
|
|
34
32
|
readonly error: "#ef4444";
|
|
35
33
|
readonly info: "#3b82f6";
|
|
36
|
-
readonly progress: "#3b82f6";
|
|
37
34
|
readonly accent: "#7c3aed";
|
|
38
|
-
readonly accentAlt: "#06b6d4";
|
|
39
|
-
readonly selected: "#ffffff";
|
|
40
35
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
readonly horizontal: "━";
|
|
82
|
-
readonly vertical: "┃";
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
export declare const SPACING: {
|
|
86
|
-
readonly none: 0;
|
|
87
|
-
readonly xs: 1;
|
|
88
|
-
readonly sm: 2;
|
|
89
|
-
readonly md: 3;
|
|
90
|
-
readonly lg: 4;
|
|
91
|
-
readonly xl: 6;
|
|
92
|
-
};
|
|
93
|
-
export declare const ICONS: {
|
|
36
|
+
/**
|
|
37
|
+
* `NO_COLOR` (https://no-color.org): any non-empty value disables colour. The
|
|
38
|
+
* empty string is falsy in JS, which happens to be exactly the spec's rule.
|
|
39
|
+
*
|
|
40
|
+
* Gating happens HERE, at the prop layer, rather than by forcing `chalk.level`
|
|
41
|
+
* to 0 globally. Ink still applies `inverse` through `chalk.inverse`, and chalk
|
|
42
|
+
* level 0 (NO_COLOR / FORCE_COLOR=0) is a no-op — so selection also puts a
|
|
43
|
+
* cursor glyph in column 1 of `DocumentRow`. The palette gate keeps colour
|
|
44
|
+
* props `undefined`; the glyph is what a no-colour terminal can actually see.
|
|
45
|
+
*
|
|
46
|
+
* The Proxy means all ~107 `PALETTE.x` call sites need no change, and the check
|
|
47
|
+
* is a plain runtime read at module init, so it survives the esbuild bundle
|
|
48
|
+
* without depending on import order the way a `FORCE_COLOR` shim would.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isNoColor(env?: NodeJS.ProcessEnv): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The palette the views see. Exported as a factory so the gate is testable
|
|
53
|
+
* without module-cache gymnastics — `PALETTE` itself is the one-shot
|
|
54
|
+
* application of it to the real environment.
|
|
55
|
+
*/
|
|
56
|
+
export declare function makePalette(noColor: boolean): typeof RAW_PALETTE;
|
|
57
|
+
export declare const NO_COLOR: boolean;
|
|
58
|
+
export declare const PALETTE: typeof RAW_PALETTE;
|
|
59
|
+
/** The only box-drawing character v3 uses: header and footer rules. */
|
|
60
|
+
export declare const RULE = "\u2500";
|
|
61
|
+
/**
|
|
62
|
+
* Document-type glyphs (column 1). A plain task deliberately renders *no*
|
|
63
|
+
* glyph — the blank column is what makes typed documents stand out.
|
|
64
|
+
*/
|
|
65
|
+
export declare const TYPE_GLYPHS: Record<string, string>;
|
|
66
|
+
export declare function getTypeGlyph(type?: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* Plain (non-emoji) glyphs used by the chrome-free views. The v2 emoji set
|
|
69
|
+
* (📄 📁 🔍 📦 📋 🗑 …) is gone: emoji have unreliable terminal widths and
|
|
70
|
+
* broke column alignment, which is the whole point of the v3 list.
|
|
71
|
+
*/
|
|
72
|
+
export declare const GLYPHS: {
|
|
73
|
+
readonly pointer: "▸";
|
|
74
|
+
readonly cursor: "▌";
|
|
75
|
+
readonly collapsed: "▶";
|
|
94
76
|
readonly success: "✓";
|
|
95
77
|
readonly error: "✗";
|
|
96
78
|
readonly warning: "⚠";
|
|
97
|
-
readonly info: "ℹ";
|
|
98
|
-
readonly expanded: "▼";
|
|
99
|
-
readonly collapsed: "▶";
|
|
100
|
-
readonly bullet: "•";
|
|
101
|
-
readonly arrow: "→";
|
|
102
|
-
readonly pointer: "▸";
|
|
103
|
-
readonly cursor: "▌";
|
|
104
|
-
readonly file: "📄";
|
|
105
|
-
readonly folder: "📁";
|
|
106
|
-
readonly task: "☐";
|
|
107
|
-
readonly taskDone: "☑";
|
|
108
|
-
readonly progressFilled: "█";
|
|
109
|
-
readonly progressEmpty: "░";
|
|
110
|
-
readonly progressPartial: "▓";
|
|
111
|
-
readonly reload: "↻";
|
|
112
79
|
readonly live: "●";
|
|
113
|
-
readonly
|
|
114
|
-
readonly
|
|
115
|
-
readonly
|
|
116
|
-
|
|
117
|
-
readonly
|
|
80
|
+
readonly subtaskOpen: "◻";
|
|
81
|
+
readonly subtaskDone: "☑";
|
|
82
|
+
readonly orphanParent: "←";
|
|
83
|
+
/** Board-list row glyph for a parent-with-children that is expanded (§A1). */
|
|
84
|
+
readonly parentExpanded: "▾";
|
|
85
|
+
/** Board-list row glyph for a parent-with-children that is collapsed (§A1). */
|
|
86
|
+
readonly parentCollapsed: "▸";
|
|
87
|
+
/** Detail body scroll indicator (§B2), e.g. `↕ 2/9`. */
|
|
88
|
+
readonly scroll: "↕";
|
|
118
89
|
};
|
|
90
|
+
export type ContractState = 'draft' | 'ready' | 'in_progress' | 'delivered' | 'done' | 'failed' | 'blocked';
|
|
91
|
+
/**
|
|
92
|
+
* Contract state → colour. Unlike v2 (which had two divergent, both-incomplete
|
|
93
|
+
* switch statements in TaskCard and TaskDetail) this is the single mapping, and
|
|
94
|
+
* it covers all six states the schema can produce.
|
|
95
|
+
*/
|
|
96
|
+
export declare function getContractStateColor(state?: string): string;
|
|
97
|
+
export {};
|
|
119
98
|
//# sourceMappingURL=theme.d.ts.map
|
package/dist/tui/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/tui/theme.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/tui/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;CA6BP,CAAC;AAEX;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAEvE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,WAAW,CAGhE;AAED,eAAO,MAAM,QAAQ,SAAc,CAAC;AAEpC,eAAO,MAAM,OAAO,EAAE,OAAO,WAAmC,CAAC;AAEjE,uEAAuE;AACvE,eAAO,MAAM,IAAI,WAAM,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAM9C,CAAC;AAEF,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAGlD;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;IAWjB,8EAA8E;;IAE9E,+EAA+E;;IAE/E,wDAAwD;;CAEhD,CAAC;AAEX,MAAM,MAAM,aAAa,GACrB,OAAO,GACP,OAAO,GACP,aAAa,GACb,WAAW,GACX,MAAM,GACN,QAAQ,GACR,SAAS,CAAC;AAEd;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAiB5D"}
|
package/dist/tui/theme.js
CHANGED
|
@@ -1,138 +1,141 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Brainfile TUI
|
|
3
|
+
* Brainfile TUI v3 design system.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* 1. True black background (#000) for maximum contrast
|
|
7
|
-
* 2. Muted grays for secondary content
|
|
8
|
-
* 3. Vibrant accent colors used sparingly
|
|
9
|
-
* 4. Rounded borders for modern feel
|
|
10
|
-
* 5. Generous spacing for readability
|
|
5
|
+
* Two rules drive everything here:
|
|
11
6
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
7
|
+
* 1. **Colour is signal only.** Priority, contract state and selection get
|
|
8
|
+
* colour; nothing else does. IDs and metadata are dim, titles are default
|
|
9
|
+
* foreground. There are no decorative accents and no theme colours for
|
|
10
|
+
* "chrome", because v3 has no chrome.
|
|
11
|
+
* 2. **Structure comes from typography.** A document's kind is a single glyph
|
|
12
|
+
* in column 1; hierarchy is two spaces of indent; separation is whitespace.
|
|
13
|
+
* The only box-drawing character that survives is the horizontal rule used
|
|
14
|
+
* for the header and footer boundaries.
|
|
14
15
|
*/
|
|
15
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
17
|
-
|
|
18
|
-
exports.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
bgMuted: '#1a1a1a',
|
|
23
|
-
bgHighlight: '#2a2a2a',
|
|
24
|
-
panel: '#1e1e1e',
|
|
17
|
+
exports.GLYPHS = exports.TYPE_GLYPHS = exports.RULE = exports.PALETTE = exports.NO_COLOR = void 0;
|
|
18
|
+
exports.isNoColor = isNoColor;
|
|
19
|
+
exports.makePalette = makePalette;
|
|
20
|
+
exports.getTypeGlyph = getTypeGlyph;
|
|
21
|
+
exports.getContractStateColor = getContractStateColor;
|
|
22
|
+
const RAW_PALETTE = {
|
|
25
23
|
// Text hierarchy
|
|
26
24
|
text: '#ffffff',
|
|
27
25
|
textSecondary: '#a0a0a0',
|
|
28
26
|
textMuted: '#606060',
|
|
29
27
|
textDim: '#404040',
|
|
30
|
-
//
|
|
31
|
-
border: '#333333',
|
|
32
|
-
borderFocus: '#505050',
|
|
33
|
-
borderAccent: '#7c3aed',
|
|
34
|
-
// Priority colors (TUI-optimized, inspired by VSCode extension)
|
|
28
|
+
// Priority signal
|
|
35
29
|
critical: '#ef4444',
|
|
36
30
|
high: '#f59e0b',
|
|
37
31
|
medium: '#3b82f6',
|
|
38
32
|
low: '#6b7280',
|
|
39
|
-
|
|
40
|
-
//
|
|
33
|
+
// Contract-state signal (design §3: draft dim · ready cyan · in_progress
|
|
34
|
+
// yellow · delivered magenta · done green · failed/blocked red)
|
|
35
|
+
contractDraft: '#606060',
|
|
36
|
+
contractReady: '#06b6d4',
|
|
37
|
+
contractInProgress: '#eab308',
|
|
38
|
+
contractDelivered: '#c026d3',
|
|
39
|
+
contractDone: '#22c55e',
|
|
40
|
+
contractFailed: '#ef4444',
|
|
41
|
+
// Feedback
|
|
41
42
|
success: '#22c55e',
|
|
42
43
|
warning: '#eab308',
|
|
43
44
|
error: '#ef4444',
|
|
44
45
|
info: '#3b82f6',
|
|
45
|
-
// UI accents
|
|
46
|
-
progress: '#3b82f6',
|
|
47
46
|
accent: '#7c3aed',
|
|
48
|
-
accentAlt: '#06b6d4',
|
|
49
|
-
selected: '#ffffff',
|
|
50
47
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
bottomRight: '┛',
|
|
93
|
-
horizontal: '━',
|
|
94
|
-
vertical: '┃',
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
// Spacing scale
|
|
98
|
-
exports.SPACING = {
|
|
99
|
-
none: 0,
|
|
100
|
-
xs: 1,
|
|
101
|
-
sm: 2,
|
|
102
|
-
md: 3,
|
|
103
|
-
lg: 4,
|
|
104
|
-
xl: 6,
|
|
48
|
+
/**
|
|
49
|
+
* `NO_COLOR` (https://no-color.org): any non-empty value disables colour. The
|
|
50
|
+
* empty string is falsy in JS, which happens to be exactly the spec's rule.
|
|
51
|
+
*
|
|
52
|
+
* Gating happens HERE, at the prop layer, rather than by forcing `chalk.level`
|
|
53
|
+
* to 0 globally. Ink still applies `inverse` through `chalk.inverse`, and chalk
|
|
54
|
+
* level 0 (NO_COLOR / FORCE_COLOR=0) is a no-op — so selection also puts a
|
|
55
|
+
* cursor glyph in column 1 of `DocumentRow`. The palette gate keeps colour
|
|
56
|
+
* props `undefined`; the glyph is what a no-colour terminal can actually see.
|
|
57
|
+
*
|
|
58
|
+
* The Proxy means all ~107 `PALETTE.x` call sites need no change, and the check
|
|
59
|
+
* is a plain runtime read at module init, so it survives the esbuild bundle
|
|
60
|
+
* without depending on import order the way a `FORCE_COLOR` shim would.
|
|
61
|
+
*/
|
|
62
|
+
function isNoColor(env = process.env) {
|
|
63
|
+
return Boolean(env.NO_COLOR);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The palette the views see. Exported as a factory so the gate is testable
|
|
67
|
+
* without module-cache gymnastics — `PALETTE` itself is the one-shot
|
|
68
|
+
* application of it to the real environment.
|
|
69
|
+
*/
|
|
70
|
+
function makePalette(noColor) {
|
|
71
|
+
if (!noColor)
|
|
72
|
+
return RAW_PALETTE;
|
|
73
|
+
return new Proxy(RAW_PALETTE, { get: () => undefined });
|
|
74
|
+
}
|
|
75
|
+
exports.NO_COLOR = isNoColor();
|
|
76
|
+
exports.PALETTE = makePalette(exports.NO_COLOR);
|
|
77
|
+
/** The only box-drawing character v3 uses: header and footer rules. */
|
|
78
|
+
exports.RULE = '─';
|
|
79
|
+
/**
|
|
80
|
+
* Document-type glyphs (column 1). A plain task deliberately renders *no*
|
|
81
|
+
* glyph — the blank column is what makes typed documents stand out.
|
|
82
|
+
*/
|
|
83
|
+
exports.TYPE_GLYPHS = {
|
|
84
|
+
epic: '▸',
|
|
85
|
+
spec: '◆',
|
|
86
|
+
adr: '●',
|
|
87
|
+
plan: '⎘',
|
|
88
|
+
task: '',
|
|
105
89
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
90
|
+
function getTypeGlyph(type) {
|
|
91
|
+
if (!type)
|
|
92
|
+
return '';
|
|
93
|
+
return exports.TYPE_GLYPHS[type.toLowerCase()] ?? '';
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Plain (non-emoji) glyphs used by the chrome-free views. The v2 emoji set
|
|
97
|
+
* (📄 📁 🔍 📦 📋 🗑 …) is gone: emoji have unreliable terminal widths and
|
|
98
|
+
* broke column alignment, which is the whole point of the v3 list.
|
|
99
|
+
*/
|
|
100
|
+
exports.GLYPHS = {
|
|
101
|
+
pointer: '▸',
|
|
102
|
+
cursor: '▌',
|
|
103
|
+
collapsed: '▶',
|
|
109
104
|
success: '✓',
|
|
110
105
|
error: '✗',
|
|
111
106
|
warning: '⚠',
|
|
112
|
-
info: 'ℹ',
|
|
113
|
-
// Navigation
|
|
114
|
-
expanded: '▼',
|
|
115
|
-
collapsed: '▶',
|
|
116
|
-
bullet: '•',
|
|
117
|
-
arrow: '→',
|
|
118
|
-
pointer: '▸',
|
|
119
|
-
cursor: '▌',
|
|
120
|
-
// Objects
|
|
121
|
-
file: '📄',
|
|
122
|
-
folder: '📁',
|
|
123
|
-
task: '☐',
|
|
124
|
-
taskDone: '☑',
|
|
125
|
-
// Progress
|
|
126
|
-
progressFilled: '█',
|
|
127
|
-
progressEmpty: '░',
|
|
128
|
-
progressPartial: '▓',
|
|
129
|
-
// Misc
|
|
130
|
-
reload: '↻',
|
|
131
107
|
live: '●',
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
108
|
+
subtaskOpen: '◻',
|
|
109
|
+
subtaskDone: '☑',
|
|
110
|
+
orphanParent: '←',
|
|
111
|
+
/** Board-list row glyph for a parent-with-children that is expanded (§A1). */
|
|
112
|
+
parentExpanded: '▾',
|
|
113
|
+
/** Board-list row glyph for a parent-with-children that is collapsed (§A1). */
|
|
114
|
+
parentCollapsed: '▸',
|
|
115
|
+
/** Detail body scroll indicator (§B2), e.g. `↕ 2/9`. */
|
|
116
|
+
scroll: '↕',
|
|
137
117
|
};
|
|
118
|
+
/**
|
|
119
|
+
* Contract state → colour. Unlike v2 (which had two divergent, both-incomplete
|
|
120
|
+
* switch statements in TaskCard and TaskDetail) this is the single mapping, and
|
|
121
|
+
* it covers all six states the schema can produce.
|
|
122
|
+
*/
|
|
123
|
+
function getContractStateColor(state) {
|
|
124
|
+
switch (state?.toLowerCase()) {
|
|
125
|
+
case 'ready':
|
|
126
|
+
return exports.PALETTE.contractReady;
|
|
127
|
+
case 'in_progress':
|
|
128
|
+
return exports.PALETTE.contractInProgress;
|
|
129
|
+
case 'delivered':
|
|
130
|
+
return exports.PALETTE.contractDelivered;
|
|
131
|
+
case 'done':
|
|
132
|
+
return exports.PALETTE.contractDone;
|
|
133
|
+
case 'failed':
|
|
134
|
+
case 'blocked':
|
|
135
|
+
return exports.PALETTE.contractFailed;
|
|
136
|
+
case 'draft':
|
|
137
|
+
default:
|
|
138
|
+
return exports.PALETTE.contractDraft;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
138
141
|
//# sourceMappingURL=theme.js.map
|
package/dist/tui/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/tui/theme.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"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