project-athena 0.2.0 → 0.3.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/CHANGELOG.md +76 -0
- package/README.md +19 -11
- package/dist/activity-P4UUFHWV.js +77 -0
- package/dist/agents-3HTSQGL2.js +69 -0
- package/dist/ai-ASL4FFQ7.js +96 -0
- package/dist/analyze-F3YOILNL.js +49 -0
- package/dist/chunk-2DY4PUR4.js +465 -0
- package/dist/chunk-2R6PXY6Z.js +33 -0
- package/dist/chunk-2RS6TA3D.js +908 -0
- package/dist/chunk-32PRS2MG.js +169 -0
- package/dist/chunk-3IS2X2Z7.js +89 -0
- package/dist/chunk-65TSRDQ3.js +124 -0
- package/dist/chunk-673EPYYH.js +105 -0
- package/dist/chunk-AD4OZCU2.js +34 -0
- package/dist/chunk-CXUTYCZX.js +238 -0
- package/dist/chunk-DOQMAZL5.js +436 -0
- package/dist/chunk-EF6GHOIN.js +343 -0
- package/dist/chunk-ELKFRTZT.js +221 -0
- package/dist/chunk-EUPETUWA.js +14 -0
- package/dist/chunk-FQEGEVLY.js +38 -0
- package/dist/chunk-GHFRQAYT.js +112 -0
- package/dist/chunk-GR4DL2VM.js +47 -0
- package/dist/chunk-INT3IGMQ.js +111 -0
- package/dist/chunk-IQQBAWSM.js +90 -0
- package/dist/chunk-JCGDR4UV.js +182 -0
- package/dist/chunk-JY6BFIJJ.js +95 -0
- package/dist/chunk-KBO7XRBW.js +26 -0
- package/dist/chunk-LEMPCNAY.js +209 -0
- package/dist/chunk-LMOFZNTQ.js +379 -0
- package/dist/chunk-OLPSEQS5.js +264 -0
- package/dist/chunk-PANVPNYF.js +2892 -0
- package/dist/chunk-PDFQ5BFG.js +378 -0
- package/dist/chunk-PR53DT7I.js +179 -0
- package/dist/chunk-PVCIGUIT.js +64 -0
- package/dist/chunk-RXNRMIZP.js +390 -0
- package/dist/chunk-S7T6VX56.js +61 -0
- package/dist/chunk-SHKXELUX.js +295 -0
- package/dist/chunk-SJOOXO34.js +904 -0
- package/dist/chunk-TGJUUB44.js +399 -0
- package/dist/chunk-VSYBC3VY.js +28 -0
- package/dist/chunk-XB66PZ6Z.js +182 -0
- package/dist/chunk-XFN7UZCS.js +35 -0
- package/dist/chunk-XW3MLHI2.js +32 -0
- package/dist/chunk-Z6QWMJLK.js +124 -0
- package/dist/chunk-ZB7LC6FP.js +221 -0
- package/dist/clean-S7PKCOLM.js +23 -0
- package/dist/cli.js +18 -9795
- package/dist/context-AH5MFHRG.js +147 -0
- package/dist/doctor-RSJMLE2P.js +62 -0
- package/dist/event-TNT6CQZR.js +101 -0
- package/dist/git-hook-YZNZGAAP.js +252 -0
- package/dist/init-2V34DVRQ.js +37 -0
- package/dist/mcp-T2GRTEX5.js +255 -0
- package/dist/open-2QSZKKUG.js +1259 -0
- package/dist/program-V2USHGXN.js +148 -0
- package/dist/review-R3R2J5BJ.js +115 -0
- package/dist/rules-4FXJUCXB.js +83 -0
- package/dist/security-PI4LXCOB.js +175 -0
- package/dist/staged-check-HHIBKKMR.js +500 -0
- package/dist/status-6M73WX5I.js +75 -0
- package/dist/sync-3ZNJDSSU.js +216 -0
- package/dist/watch-USN5CQIV.js +121 -0
- package/dist/web/assets/{Editor-CL6A82dQ.js → Editor-BI56-HX5.js} +1 -1
- package/dist/web/assets/{abnfDiagram-O67JEVCF-BuFfjTfx.js → abnfDiagram-O67JEVCF-y_9px2ob.js} +1 -1
- package/dist/web/assets/architecture-7GRP2DOG-DyxkwYiW.js +1 -0
- package/dist/web/assets/{architectureDiagram-NJMV4G6O-BTsv87pA.js → architectureDiagram-NJMV4G6O-lB6fcVzU.js} +1 -1
- package/dist/web/assets/{blockDiagram-BEXU5L5S-CNXqyKIx.js → blockDiagram-BEXU5L5S-DcM5pEjM.js} +1 -1
- package/dist/web/assets/{c4Diagram-YGBWAQC7-kksFXQoJ.js → c4Diagram-YGBWAQC7-CJgqxTY2.js} +1 -1
- package/dist/web/assets/channel-BvDD7AMO.js +1 -0
- package/dist/web/assets/{chunk-3FUC2YCW-BY99XYBs.js → chunk-3FUC2YCW-B8l_VuWR.js} +1 -1
- package/dist/web/assets/{chunk-5DYCD2WN-h-PRThMP.js → chunk-5DYCD2WN-CZecgNhf.js} +1 -1
- package/dist/web/assets/{chunk-742MDFTN-BIxfyBUj.js → chunk-742MDFTN-BeZ7P5jB.js} +1 -1
- package/dist/web/assets/{chunk-7INBJB4K-DZtctDdk.js → chunk-7INBJB4K-IKy0pr5m.js} +1 -1
- package/dist/web/assets/{chunk-7M6MHVWA-BX9fUUbL.js → chunk-7M6MHVWA-Dg_QqJEX.js} +1 -1
- package/dist/web/assets/{chunk-7PRAP22T-X1s3e81n.js → chunk-7PRAP22T-DqQNS8oq.js} +1 -1
- package/dist/web/assets/{chunk-GTNCS2PH-Bh8eluU-.js → chunk-GTNCS2PH-x4sM51nJ.js} +1 -1
- package/dist/web/assets/{chunk-GWA4HPMP-D1KATAi0.js → chunk-GWA4HPMP-CE5GcwVN.js} +1 -1
- package/dist/web/assets/{chunk-MBY4JIJT-CEErv5kP.js → chunk-MBY4JIJT-DA_D1hjF.js} +1 -1
- package/dist/web/assets/{chunk-NETBCI7D-BXiH4aPa.js → chunk-NETBCI7D-CeJ3XBZ2.js} +1 -1
- package/dist/web/assets/{chunk-O7XYJQB3-Dede62yi.js → chunk-O7XYJQB3-BH2gESvO.js} +1 -1
- package/dist/web/assets/{chunk-UA2S7LBM-KZ9aWRTa.js → chunk-UA2S7LBM-BWr0xCux.js} +1 -1
- package/dist/web/assets/{chunk-WEXAMYUT-xf-3L2zU.js → chunk-WEXAMYUT-B4QwUZPM.js} +1 -1
- package/dist/web/assets/{chunk-Z7XXMR3K-DLpRdZ8n.js → chunk-Z7XXMR3K-BxcA-y5B.js} +1 -1
- package/dist/web/assets/{chunk-ZIGJFQKS-BdJ0_J-U.js → chunk-ZIGJFQKS-BZYvP63G.js} +1 -1
- package/dist/web/assets/{classDiagram-v2-NBCMYWYE-C5VzGDGq.js → classDiagram-v2-NBCMYWYE-BS3P_NXb.js} +1 -1
- package/dist/web/assets/{cynefin-OW5HDTMX-BqOgbE7U.js → cynefin-OW5HDTMX-BALD4Pve.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-VND7K2PF-CCC_feG5.js → cynefinDiagram-VND7K2PF-BM2y4W6d.js} +1 -1
- package/dist/web/assets/{dagre-6A5THRUB-SLP-94sd.js → dagre-6A5THRUB-PTfOrIdF.js} +1 -1
- package/dist/web/assets/{diagram-22UHCM2B-DpHwEBYM.js → diagram-22UHCM2B-CpXEHhUl.js} +1 -1
- package/dist/web/assets/{diagram-3UASUU5V-iGFwuMEk.js → diagram-3UASUU5V-DPHfXzr6.js} +1 -1
- package/dist/web/assets/{diagram-ATOU4E4O-Csx9hj0z.js → diagram-ATOU4E4O-DMBNXvAC.js} +1 -1
- package/dist/web/assets/{diagram-CDSNMT55-yGKrLRO5.js → diagram-CDSNMT55-CDLe1M7G.js} +1 -1
- package/dist/web/assets/{diagram-MLGK6HIB-mDpCormD.js → diagram-MLGK6HIB-D6L8oE7j.js} +1 -1
- package/dist/web/assets/{diagram-MPIPVDR6-BJHdatrF.js → diagram-MPIPVDR6-CP-S7rrQ.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-ZINNZB2B-ClJbCBBu.js → ebnfDiagram-ZINNZB2B-CkUc63TK.js} +1 -1
- package/dist/web/assets/{elk-276RUBZZ-C5tFZMYm.js → elk-276RUBZZ-C1CAJLH_.js} +1 -1
- package/dist/web/assets/{erDiagram-OPXOYQCR-u7_UFZot.js → erDiagram-OPXOYQCR-DXBnaTHm.js} +1 -1
- package/dist/web/assets/eventmodeling-NTZA5JFV-cLIzvgDp.js +1 -0
- package/dist/web/assets/flowDiagram-KWPJA3E3-D7Zq63VQ.js +1 -0
- package/dist/web/assets/{ganttDiagram-FUAMR5RP-B4hrLcLf.js → ganttDiagram-FUAMR5RP-BVm8SiGg.js} +1 -1
- package/dist/web/assets/{gitGraph-4MIJSDKK-Dxx-Bl-U.js → gitGraph-4MIJSDKK-Dm7xBrW0.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-X574FWY7-DKjDV5Kr.js → gitGraphDiagram-X574FWY7-D_PIKKhx.js} +1 -1
- package/dist/web/assets/index-CeOIBpu2.js +45 -0
- package/dist/web/assets/{info-A6RAGUB7-CgqIdgQA.js → info-A6RAGUB7-CLGrx8pn.js} +1 -1
- package/dist/web/assets/{infoDiagram-VRGFBTTK-D-qjWkwy.js → infoDiagram-VRGFBTTK-BlBjaKm7.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-OU5B5YK6-CzpqV6WN.js → ishikawaDiagram-OU5B5YK6-Kxe7GGS3.js} +1 -1
- package/dist/web/assets/{journeyDiagram-ZHPQQLJL-BBnOUDzw.js → journeyDiagram-ZHPQQLJL-wCMoHK4M.js} +1 -1
- package/dist/web/assets/{kanban-definition-PNTS6WVX-Di9sTFB1.js → kanban-definition-PNTS6WVX-BxdCz9Ko.js} +1 -1
- package/dist/web/assets/{line-B8ehGiwF.js → line-Zf11FnWF.js} +1 -1
- package/dist/web/assets/{mermaid-parser.core-DWsT24e5.js → mermaid-parser.core-BvFFklev.js} +3 -3
- package/dist/web/assets/{mermaid.core-DzYpaVzI.js → mermaid.core-Cd_Ssti9.js} +4 -4
- package/dist/web/assets/{mindmap-definition-NLK3R4M7-CxagBsH3.js → mindmap-definition-NLK3R4M7-BGPQl-GY.js} +1 -1
- package/dist/web/assets/{packet-AYTQ26CC-CmxbS0qf.js → packet-AYTQ26CC-6lI3cEX_.js} +1 -1
- package/dist/web/assets/{pegDiagram-GJSIUBJH-_3jnD3q8.js → pegDiagram-GJSIUBJH-BPIjlSAj.js} +1 -1
- package/dist/web/assets/{pie-WAS4IAKB-DppCWOqP.js → pie-WAS4IAKB-D6Dzj3Ja.js} +1 -1
- package/dist/web/assets/{pieDiagram-5QR66LMP-DTVThTqz.js → pieDiagram-5QR66LMP-DtA-vZmv.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-O4NWA36T-BJ_OFnht.js → quadrantDiagram-O4NWA36T-EettyqQn.js} +1 -1
- package/dist/web/assets/{radar-RG4KPBEZ-B6quSMjs.js → radar-RG4KPBEZ-xmRc3Dl8.js} +1 -1
- package/dist/web/assets/{railroad-74A4TZTK-CErU7RG3.js → railroad-74A4TZTK-BLB7dhOn.js} +1 -1
- package/dist/web/assets/railroad-abnf-HS5TGJTU-DBFym6g8.js +1 -0
- package/dist/web/assets/railroad-ebnf-LZEXJU2U-CkG28ig8.js +1 -0
- package/dist/web/assets/railroad-peg-WCYAUIDC-Df_Ifaad.js +1 -0
- package/dist/web/assets/{railroadDiagram-XR7U4H2S-Zu0N_D-D.js → railroadDiagram-XR7U4H2S-PBw4We6b.js} +1 -1
- package/dist/web/assets/{requirementDiagram-PLB6GJNP-Bl6CN3ul.js → requirementDiagram-PLB6GJNP-DjQpaUFA.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-IPEJSGJF-DdpKzZV8.js → sankeyDiagram-IPEJSGJF-CBW-_AoF.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-PO4LG4MO-BwUqrl9F.js → sequenceDiagram-PO4LG4MO-DEoPYqY9.js} +1 -1
- package/dist/web/assets/{stateDiagram-v2-GCMORJYK-C3vZGpAi.js → stateDiagram-v2-GCMORJYK-UZq5rPud.js} +1 -1
- package/dist/web/assets/{swimlanes-2SLR337P-BjoMa2HW.js → swimlanes-2SLR337P-CACfuXJR.js} +1 -1
- package/dist/web/assets/swimlanesDiagram-TC7HE7FX-CDSrqdgx.js +8 -0
- package/dist/web/assets/{timeline-definition-EJHVYXUP-0apcf2l2.js → timeline-definition-EJHVYXUP-CYJl7mP-.js} +1 -1
- package/dist/web/assets/{treeView-Q6P3EWNA-BOPWzyg3.js → treeView-Q6P3EWNA-DtZ5nkPQ.js} +1 -1
- package/dist/web/assets/{treemap-WGGIJYW6-CC6rU6dD.js → treemap-WGGIJYW6-m49GDM-M.js} +1 -1
- package/dist/web/assets/{usecaseDiagram-POWQR4AR-BFclVNBG.js → usecaseDiagram-POWQR4AR-C2Vg20UK.js} +1 -1
- package/dist/web/assets/{vennDiagram-UO4OBE2U-D2XPv-zb.js → vennDiagram-UO4OBE2U-C07v5OGI.js} +1 -1
- package/dist/web/assets/{wardley-WFR3VGLG-Btz6ID8P.js → wardley-WFR3VGLG-C9Z7EZtz.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-VNRHLVJA-DFYPvGpS.js → wardleyDiagram-VNRHLVJA-DdA8CcSC.js} +1 -1
- package/dist/web/assets/{xychartDiagram-PMCCYNJV-DMkQD-sV.js → xychartDiagram-PMCCYNJV-C9EZw07b.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +5 -2
- package/dist/web/assets/architecture-7GRP2DOG-CGSEE8po.js +0 -1
- package/dist/web/assets/channel-Dneho6u-.js +0 -1
- package/dist/web/assets/eventmodeling-NTZA5JFV-CA-vzJb3.js +0 -1
- package/dist/web/assets/flowDiagram-KWPJA3E3-Ca_1cbbS.js +0 -1
- package/dist/web/assets/index-s6lwoj84.js +0 -45
- package/dist/web/assets/railroad-abnf-HS5TGJTU-CWsEvTRR.js +0 -1
- package/dist/web/assets/railroad-ebnf-LZEXJU2U-Cyq9ELNn.js +0 -1
- package/dist/web/assets/railroad-peg-WCYAUIDC-BX1hI1hV.js +0 -1
- package/dist/web/assets/swimlanesDiagram-TC7HE7FX-BGNz1HGG.js +0 -8
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
isJson,
|
|
4
|
+
isQuiet,
|
|
5
|
+
line,
|
|
6
|
+
unicode
|
|
7
|
+
} from "./chunk-Z6QWMJLK.js";
|
|
8
|
+
import {
|
|
9
|
+
ATHENA_VERSION,
|
|
10
|
+
AUTHOR,
|
|
11
|
+
NPM_URL,
|
|
12
|
+
REPO_URL,
|
|
13
|
+
WEBSITE_URL
|
|
14
|
+
} from "./chunk-2R6PXY6Z.js";
|
|
15
|
+
|
|
16
|
+
// src/cli/ui/brand.ts
|
|
17
|
+
import pc2 from "picocolors";
|
|
18
|
+
|
|
19
|
+
// src/cli/ui/layout.ts
|
|
20
|
+
import pc from "picocolors";
|
|
21
|
+
var ANSI = /\x1b\[[0-9;?]*[A-Za-z]|\x1b\]8;;[^\x07]*\x07/g;
|
|
22
|
+
var strip = (s) => s.replace(ANSI, "");
|
|
23
|
+
var width = (s) => [...strip(s)].length;
|
|
24
|
+
function termWidth() {
|
|
25
|
+
const cols = process.stdout.columns || Number(process.env.COLUMNS) || 80;
|
|
26
|
+
return Math.max(40, Math.min(cols, 160));
|
|
27
|
+
}
|
|
28
|
+
function truncate(s, max) {
|
|
29
|
+
if (width(s) <= max) return s;
|
|
30
|
+
if (max <= 0) return "";
|
|
31
|
+
let out = "";
|
|
32
|
+
let visible = 0;
|
|
33
|
+
let i = 0;
|
|
34
|
+
while (i < s.length) {
|
|
35
|
+
ANSI.lastIndex = 0;
|
|
36
|
+
const rest = s.slice(i);
|
|
37
|
+
const m = rest.match(new RegExp(`^(?:${ANSI.source})`));
|
|
38
|
+
if (m) {
|
|
39
|
+
out += m[0];
|
|
40
|
+
i += m[0].length;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const ch = String.fromCodePoint(s.codePointAt(i));
|
|
44
|
+
if (visible === max - 1) {
|
|
45
|
+
out += unicode ? "\u2026" : ".";
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
out += ch;
|
|
49
|
+
visible++;
|
|
50
|
+
i += ch.length;
|
|
51
|
+
}
|
|
52
|
+
return pc.isColorSupported ? `${out}\x1B[0m` : out;
|
|
53
|
+
}
|
|
54
|
+
var padEnd = (s, w) => {
|
|
55
|
+
const cut = truncate(s, w);
|
|
56
|
+
return cut + " ".repeat(Math.max(0, w - width(cut)));
|
|
57
|
+
};
|
|
58
|
+
var center = (s, w) => {
|
|
59
|
+
const n = width(s);
|
|
60
|
+
if (n >= w) return truncate(s, w);
|
|
61
|
+
const left = Math.floor((w - n) / 2);
|
|
62
|
+
return " ".repeat(left) + s + " ".repeat(w - n - left);
|
|
63
|
+
};
|
|
64
|
+
var truecolor = /^(truecolor|24bit)$/i.test(process.env.COLORTERM ?? "") || ["iTerm.app", "vscode", "WezTerm", "ghostty", "Hyper"].includes(process.env.TERM_PROGRAM ?? "");
|
|
65
|
+
var hex = (h) => [parseInt(h.slice(1, 3), 16), parseInt(h.slice(3, 5), 16), parseInt(h.slice(5, 7), 16)];
|
|
66
|
+
function ansi256([r, g, b]) {
|
|
67
|
+
const q = (v) => v < 48 ? 0 : v < 115 ? 1 : Math.round((v - 35) / 40);
|
|
68
|
+
return 16 + 36 * q(r) + 6 * q(g) + q(b);
|
|
69
|
+
}
|
|
70
|
+
function paint(color, s, bold = false) {
|
|
71
|
+
if (!pc.isColorSupported || !s) return s;
|
|
72
|
+
const rgb = typeof color === "string" ? hex(color) : color;
|
|
73
|
+
const fg = truecolor ? `\x1B[38;2;${rgb[0]};${rgb[1]};${rgb[2]}m` : `\x1B[38;5;${ansi256(rgb)}m`;
|
|
74
|
+
return `${bold ? "\x1B[1m" : ""}${fg}${s}\x1B[0m`;
|
|
75
|
+
}
|
|
76
|
+
function cell(ch, fg, bg) {
|
|
77
|
+
if (!pc.isColorSupported) return ch;
|
|
78
|
+
const code = (c, layer) => {
|
|
79
|
+
const rgb = typeof c === "string" ? hex(c) : c;
|
|
80
|
+
return truecolor ? `\x1B[${layer};2;${rgb[0]};${rgb[1]};${rgb[2]}m` : `\x1B[${layer};5;${ansi256(rgb)}m`;
|
|
81
|
+
};
|
|
82
|
+
return `${fg ? code(fg, 38) : ""}${bg ? code(bg, 48) : ""}${ch}\x1B[0m`;
|
|
83
|
+
}
|
|
84
|
+
var PALETTE = {
|
|
85
|
+
green: "#34d399",
|
|
86
|
+
cyan: "#22d3ee",
|
|
87
|
+
blue: "#3b82f6",
|
|
88
|
+
violet: "#a855f7",
|
|
89
|
+
pink: "#f472b6",
|
|
90
|
+
amber: "#fbbf24",
|
|
91
|
+
slate: "#64748b"
|
|
92
|
+
};
|
|
93
|
+
var BRAND = [PALETTE.cyan, PALETTE.blue, PALETTE.violet];
|
|
94
|
+
function mix(stops, t) {
|
|
95
|
+
const rgb = stops.map(hex);
|
|
96
|
+
if (rgb.length === 1) return rgb[0];
|
|
97
|
+
const x = Math.min(0.9999, Math.max(0, t)) * (rgb.length - 1);
|
|
98
|
+
const i = Math.floor(x);
|
|
99
|
+
const f = x - i;
|
|
100
|
+
const [a, b] = [rgb[i], rgb[i + 1]];
|
|
101
|
+
return [0, 1, 2].map((k) => Math.round(a[k] + (b[k] - a[k]) * f));
|
|
102
|
+
}
|
|
103
|
+
function gradientBlock(lines, stops = BRAND, bold = true) {
|
|
104
|
+
const w = Math.max(...lines.map((l) => [...l].length));
|
|
105
|
+
return lines.map((l) => [...l].map((ch, i) => ch === " " ? ch : paint(mix(stops, i / Math.max(1, w - 1)), ch, bold)).join(""));
|
|
106
|
+
}
|
|
107
|
+
var gradient = (s, stops = BRAND, bold = false) => gradientBlock([s], stops, bold)[0];
|
|
108
|
+
var B = unicode ? { tl: "\u256D", tr: "\u256E", bl: "\u2570", br: "\u256F", h: "\u2500", v: "\u2502" } : { tl: "+", tr: "+", bl: "+", br: "+", h: "-", v: "|" };
|
|
109
|
+
var HR = B.h;
|
|
110
|
+
var VR = B.v;
|
|
111
|
+
function box(content, w, opts = {}) {
|
|
112
|
+
const color = opts.color ?? PALETTE.slate;
|
|
113
|
+
const padX = opts.padX ?? 1;
|
|
114
|
+
const inner = w - 2;
|
|
115
|
+
const edge = (s) => paint(color, s);
|
|
116
|
+
const title = opts.title ? ` ${opts.title} ` : "";
|
|
117
|
+
const top = title ? edge(`${B.tl}${B.h}`) + title + edge(B.h.repeat(Math.max(0, inner - 1 - width(title))) + B.tr) : edge(B.tl + B.h.repeat(inner) + B.tr);
|
|
118
|
+
const body = content.map((l) => edge(B.v) + " ".repeat(padX) + padEnd(l, inner - padX * 2) + " ".repeat(padX) + edge(B.v));
|
|
119
|
+
return [top, ...body, edge(B.bl + B.h.repeat(inner) + B.br)];
|
|
120
|
+
}
|
|
121
|
+
function columns(blocks, widths, gap = 2) {
|
|
122
|
+
const h = Math.max(...blocks.map((b) => b.length));
|
|
123
|
+
const rows = [];
|
|
124
|
+
for (let r = 0; r < h; r++) rows.push(blocks.map((b, i) => padEnd(b[r] ?? "", widths[i])).join(" ".repeat(gap)).trimEnd());
|
|
125
|
+
return rows;
|
|
126
|
+
}
|
|
127
|
+
function vcenter(block, h) {
|
|
128
|
+
const top = Math.max(0, Math.floor((h - block.length) / 2));
|
|
129
|
+
return [...Array(top).fill(""), ...block];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// src/cli/ui/brand.ts
|
|
133
|
+
var LETTERS = {
|
|
134
|
+
A: [" \u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551", "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551", "\u2588\u2588\u2551 \u2588\u2588\u2551", "\u255A\u2550\u255D \u255A\u2550\u255D"],
|
|
135
|
+
T: ["\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557", "\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D", " \u2588\u2588\u2551 ", " \u2588\u2588\u2551 ", " \u2588\u2588\u2551 ", " \u255A\u2550\u255D "],
|
|
136
|
+
H: ["\u2588\u2588\u2557 \u2588\u2588\u2557", "\u2588\u2588\u2551 \u2588\u2588\u2551", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551", "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551", "\u2588\u2588\u2551 \u2588\u2588\u2551", "\u255A\u2550\u255D \u255A\u2550\u255D"],
|
|
137
|
+
E: ["\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557", "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D", "\u2588\u2588\u2588\u2588\u2588\u2557 ", "\u2588\u2588\u2554\u2550\u2550\u255D ", "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557", "\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"],
|
|
138
|
+
N: ["\u2588\u2588\u2588\u2557 \u2588\u2588\u2557", "\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551", "\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551", "\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551", "\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551", "\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D"]
|
|
139
|
+
};
|
|
140
|
+
var LOGO = [0, 1, 2, 3, 4, 5].map((r) => [..."ATHENA"].map((ch) => LETTERS[ch][r]).join(""));
|
|
141
|
+
var LOGO_WIDTH = width(LOGO[0]);
|
|
142
|
+
var ROBOT_PIXELS = [
|
|
143
|
+
"...........AA...........",
|
|
144
|
+
"..........AAAA..........",
|
|
145
|
+
"...........KK...........",
|
|
146
|
+
"....KKKKKKKKKKKKKKKK....",
|
|
147
|
+
"...KBBBBBBBBBBBBBBBBK...",
|
|
148
|
+
"..KBBBBBBBBBBBBBBBBBBK..",
|
|
149
|
+
"..KBBBBWWBBBBBBYYYYBBK..",
|
|
150
|
+
"YYKBBBWBBWBBBBYYDDYYBKYY",
|
|
151
|
+
"YYKBBBBBBBBBBBYYDDYYBKYY",
|
|
152
|
+
"YYKBBBBBBBBBBBBYYYYBBKYY",
|
|
153
|
+
"YYKBBBBBYYYYYYYYBBBBBKYY",
|
|
154
|
+
"..KBBBBBBYYYYYYBBBBBBK..",
|
|
155
|
+
"..KBBBBBBBYYYYBBBBBBBK..",
|
|
156
|
+
"..KBBBBBBBBBBBBBBBBBBK..",
|
|
157
|
+
"..KBBBBBBBBBBBBBBBBBBK..",
|
|
158
|
+
"..KBBBBBKKKKKKKKKKKK....",
|
|
159
|
+
"...KBBBK................",
|
|
160
|
+
"....KBK.................",
|
|
161
|
+
".....K..................",
|
|
162
|
+
"........................"
|
|
163
|
+
];
|
|
164
|
+
var PIXEL_COLORS = { K: "#1e40af", B: "#4ba3e3", Y: "#f5c542", D: "#2e3f9e", A: "#5b7cfa", W: "#0f172a" };
|
|
165
|
+
var ROBOT_ASCII = [
|
|
166
|
+
" \u25CF ",
|
|
167
|
+
" \u2503 ",
|
|
168
|
+
" \u256D\u2500\u2500\u2500\u2538\u2500\u2500\u2500\u256E ",
|
|
169
|
+
" \u2590\u2502 \u25E0 \u25C9 \u2502\u258C ",
|
|
170
|
+
" \u2590\u2502 \u2570\u2500\u256F \u2502\u258C ",
|
|
171
|
+
" \u2502 \u2502 ",
|
|
172
|
+
" \u2570\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u256F ",
|
|
173
|
+
" \u2570\u256F ",
|
|
174
|
+
" ",
|
|
175
|
+
" "
|
|
176
|
+
];
|
|
177
|
+
var ROBOT_HEIGHT = ROBOT_PIXELS.length / 2;
|
|
178
|
+
var ROBOT_WIDTH = pc2.isColorSupported ? ROBOT_PIXELS[0].length : ROBOT_ASCII[0].length;
|
|
179
|
+
var BUBBLE = ["\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E", "\u2502 Analyze \u2502", "\u2502 Understand \u2502", "\u2502 Document \u2502", "\u2502 Empower \u2726 \u2502", "\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"];
|
|
180
|
+
var BUBBLE_WIDTH = 14;
|
|
181
|
+
function paintRobot() {
|
|
182
|
+
if (!pc2.isColorSupported) return ROBOT_ASCII;
|
|
183
|
+
const color = (p) => PIXEL_COLORS[p] ?? null;
|
|
184
|
+
const out = [];
|
|
185
|
+
for (let r = 0; r < ROBOT_PIXELS.length; r += 2) {
|
|
186
|
+
const top = ROBOT_PIXELS[r];
|
|
187
|
+
const bottom = ROBOT_PIXELS[r + 1];
|
|
188
|
+
let row = "";
|
|
189
|
+
for (let x = 0; x < top.length; x++) {
|
|
190
|
+
const [t, b] = [color(top[x]), color(bottom[x])];
|
|
191
|
+
if (!t && !b) row += " ";
|
|
192
|
+
else if (t === b) row += cell("\u2588", t, null);
|
|
193
|
+
else if (!b) row += cell("\u2580", t, null);
|
|
194
|
+
else if (!t) row += cell("\u2584", b, null);
|
|
195
|
+
else row += cell("\u2580", t, b);
|
|
196
|
+
}
|
|
197
|
+
out.push(row);
|
|
198
|
+
}
|
|
199
|
+
return out;
|
|
200
|
+
}
|
|
201
|
+
function paintBubble() {
|
|
202
|
+
return BUBBLE.map((row) => {
|
|
203
|
+
const inner = row.slice(1, -1);
|
|
204
|
+
const edge = (s) => paint(PALETTE.slate, s);
|
|
205
|
+
if (row.startsWith("\u256D") || row.startsWith("\u2570")) return edge(row);
|
|
206
|
+
return edge("\u2502") + inner.replace("\u2726", paint(PALETTE.amber, "\u2726")).replace(/[A-Za-z]+/, (w) => paint(PALETTE.cyan, w)) + edge("\u2502");
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
function logoBlock(w) {
|
|
210
|
+
const rule = (label) => {
|
|
211
|
+
const side = Math.max(2, Math.floor((w - width(label) - 2) / 2));
|
|
212
|
+
return `${pc2.dim(HR.repeat(side))} ${label} ${pc2.dim(HR.repeat(side))}`;
|
|
213
|
+
};
|
|
214
|
+
return [
|
|
215
|
+
...gradientBlock(LOGO),
|
|
216
|
+
"",
|
|
217
|
+
center(gradient("Project Intelligence for AI Coding", [PALETTE.blue, PALETTE.violet], true), w),
|
|
218
|
+
center(rule(`${pc2.dim("developed by")} ${paint(PALETTE.cyan, AUTHOR, true)}`), w)
|
|
219
|
+
];
|
|
220
|
+
}
|
|
221
|
+
function linksBlock() {
|
|
222
|
+
return [
|
|
223
|
+
pc2.italic('"Turn any codebase into clear knowledge."'),
|
|
224
|
+
"",
|
|
225
|
+
`${paint(PALETTE.green, "web", true)} ${paint(PALETTE.cyan, WEBSITE_URL, true)}`,
|
|
226
|
+
`${paint(PALETTE.pink, "npm", true)} ${pc2.dim(`v${ATHENA_VERSION}`)}`,
|
|
227
|
+
paint(PALETTE.blue, NPM_URL),
|
|
228
|
+
paint(PALETTE.violet, "github", true),
|
|
229
|
+
paint(PALETTE.blue, REPO_URL)
|
|
230
|
+
];
|
|
231
|
+
}
|
|
232
|
+
var LINKS_WIDTH = Math.max(NPM_URL.length, REPO_URL.length);
|
|
233
|
+
function printHeader() {
|
|
234
|
+
if (isJson() || isQuiet()) return;
|
|
235
|
+
for (const l of header()) line(l);
|
|
236
|
+
}
|
|
237
|
+
function header() {
|
|
238
|
+
if (!unicode) return [pc2.bold(pc2.cyan("ATHENA")) + pc2.dim(` Project Intelligence for AI Coding \xB7 v${ATHENA_VERSION}`), ""];
|
|
239
|
+
const total = termWidth();
|
|
240
|
+
const logoW = LOGO_WIDTH;
|
|
241
|
+
const divider = (h) => Array.from({ length: h }, () => pc2.dim(VR));
|
|
242
|
+
const robotBubble = columns([paintRobot(), vcenter(paintBubble(), ROBOT_HEIGHT - 2)], [ROBOT_WIDTH, BUBBLE_WIDTH], 1);
|
|
243
|
+
const logo = vcenter(logoBlock(logoW), ROBOT_HEIGHT);
|
|
244
|
+
const links = vcenter(linksBlock(), ROBOT_HEIGHT);
|
|
245
|
+
const H = ROBOT_HEIGHT;
|
|
246
|
+
const layouts = [
|
|
247
|
+
{ w: ROBOT_WIDTH + 1 + BUBBLE_WIDTH + 3 + logoW + 3 + 1 + 3 + LINKS_WIDTH, build: () => columns([robotBubble, logo, divider(H), links], [ROBOT_WIDTH + 1 + BUBBLE_WIDTH, logoW, 1, LINKS_WIDTH], 3) },
|
|
248
|
+
{ w: ROBOT_WIDTH + 3 + logoW + 3 + 1 + 3 + LINKS_WIDTH, build: () => columns([paintRobot(), logo, divider(H), links], [ROBOT_WIDTH, logoW, 1, LINKS_WIDTH], 3) },
|
|
249
|
+
{ w: ROBOT_WIDTH + 3 + logoW, build: () => [...columns([paintRobot(), logo], [ROBOT_WIDTH, logoW], 3), "", ...compactLinks()] },
|
|
250
|
+
{ w: logoW, build: () => [...logoBlock(logoW), "", ...compactLinks()] }
|
|
251
|
+
];
|
|
252
|
+
const fit = layouts.find((l) => l.w + 4 <= total);
|
|
253
|
+
if (!fit) return [pc2.bold(gradient("ATHENA", BRAND, true)) + pc2.dim(` Project Intelligence for AI Coding \xB7 v${ATHENA_VERSION}`), pc2.dim(REPO_URL), ""];
|
|
254
|
+
const content = fit.build();
|
|
255
|
+
return [...box(content, Math.min(total, fit.w + 4), { color: PALETTE.blue }), ""];
|
|
256
|
+
}
|
|
257
|
+
function compactLinks() {
|
|
258
|
+
return [
|
|
259
|
+
`${paint(PALETTE.green, "web", true)} ${paint(PALETTE.cyan, WEBSITE_URL, true)}`,
|
|
260
|
+
`${paint(PALETTE.pink, "npm", true)} ${paint(PALETTE.blue, NPM_URL)}`,
|
|
261
|
+
`${paint(PALETTE.violet, "github", true)} ${paint(PALETTE.blue, REPO_URL)}`
|
|
262
|
+
];
|
|
263
|
+
}
|
|
264
|
+
function footer(title, subtitle, tone = "success") {
|
|
265
|
+
const total = termWidth();
|
|
266
|
+
const color = tone === "success" ? PALETTE.green : PALETTE.amber;
|
|
267
|
+
const mark = tone === "success" ? "\u2713" : "!";
|
|
268
|
+
const status = [`${paint(color, ` ${mark} `, true)} ${paint(color, title, true)}`, ` ${subtitle}`, ""];
|
|
269
|
+
const links = compactLinks();
|
|
270
|
+
const credit = [pc2.dim("Developed by"), `${paint(PALETTE.cyan, AUTHOR, true)} ${paint(PALETTE.pink, "\u2665")}`, ""];
|
|
271
|
+
const statusW = Math.max(...status.map(width));
|
|
272
|
+
const linksW = 8 + LINKS_WIDTH;
|
|
273
|
+
const wide = statusW + 4 + linksW + 3 + 1 + 3 + 14 + 4;
|
|
274
|
+
const content = wide <= total ? columns([status, links, divider2(), credit], [statusW, linksW, 1, 14], 3) : total >= linksW + 4 ? [...status.filter(Boolean), "", ...links, credit.filter(Boolean).join(" ")] : [...status, pc2.dim(REPO_URL)];
|
|
275
|
+
const w = wide <= total ? wide : Math.min(total, Math.max(statusW, linksW) + 4);
|
|
276
|
+
return box(content, w, { color });
|
|
277
|
+
}
|
|
278
|
+
var divider2 = () => [pc2.dim(VR), pc2.dim(VR), pc2.dim(VR)];
|
|
279
|
+
|
|
280
|
+
export {
|
|
281
|
+
width,
|
|
282
|
+
termWidth,
|
|
283
|
+
truncate,
|
|
284
|
+
padEnd,
|
|
285
|
+
paint,
|
|
286
|
+
PALETTE,
|
|
287
|
+
mix,
|
|
288
|
+
gradient,
|
|
289
|
+
HR,
|
|
290
|
+
box,
|
|
291
|
+
columns,
|
|
292
|
+
printHeader,
|
|
293
|
+
footer
|
|
294
|
+
};
|
|
295
|
+
//# sourceMappingURL=chunk-SHKXELUX.js.map
|