@astrofoundry/pi-astro 0.14.3 → 0.14.5
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/extensions/astro-welcome/art.ansi +18 -0
- package/extensions/astro-welcome/art.test.ts +14 -24
- package/extensions/astro-welcome/art.ts +32 -119
- package/extensions/astro-welcome/colors.ts +8 -2
- package/extensions/astro-welcome/compose.ts +7 -7
- package/extensions/astro-welcome/index.ts +5 -5
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;3;4;2m▀[38;2;1;2;1m[48;2;4;5;3m▀[38;2;1;2;1m[48;2;5;6;3m▀[38;2;1;2;1m[48;2;5;6;3m▀[38;2;1;2;1m[48;2;5;5;3m▀[38;2;1;2;1m[48;2;3;4;2m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
2
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;2;3;2m▀[38;2;1;2;1m[48;2;4;4;2m▀[38;2;3;4;3m[48;2;0;0;0m▀[38;2;2;3;0m[48;2;0;0;5m▀[38;2;0;0;0m[48;2;46;45;35m▀[38;2;0;0;0m[48;2;96;89;55m▀[38;2;0;0;0m[48;2;121;111;62m▀[38;2;0;0;0m[48;2;121;111;62m▀[38;2;0;0;0m[48;2;96;89;54m▀[38;2;0;0;0m[48;2;47;45;34m▀[38;2;2;3;0m[48;2;0;0;6m▀[38;2;3;4;2m[48;2;0;0;0m▀[38;2;1;2;1m[48;2;3;4;2m▀[38;2;1;2;1m[48;2;1;2;2m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
3
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;2;3;2m▀[38;2;1;2;1m[48;2;4;5;2m▀[38;2;2;3;2m[48;2;1;2;0m▀[38;2;1;2;0m[48;2;0;0;3m▀[38;2;0;0;0m[48;2;135;122;65m▀[38;2;57;54;35m[48;2;216;180;39m▀[38;2;200;177;74m[48;2;255;216;3m▀[38;2;254;216;57m[48;2;252;201;0m▀[38;2;255;221;38m[48;2;251;201;0m▀[38;2;255;221;29m[48;2;249;200;0m▀[38;2;255;221;29m[48;2;249;200;0m▀[38;2;255;222;38m[48;2;250;200;0m▀[38;2;254;216;56m[48;2;252;201;0m▀[38;2;201;177;73m[48;2;255;217;3m▀[38;2;59;55;35m[48;2;217;181;38m▀[38;2;0;0;0m[48;2;137;123;64m▀[38;2;1;2;0m[48;2;0;0;3m▀[38;2;2;3;2m[48;2;1;2;0m▀[38;2;1;2;1m[48;2;4;5;2m▀[38;2;1;2;1m[48;2;2;3;2m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
4
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;0;0;1m▀[38;2;0;0;0m[48;2;43;37;11m▀[38;2;0;0;0m[48;2;55;47;9m▀[38;2;0;0;0m[48;2;87;77;32m▀[38;2;144;127;51m[48;2;255;220;23m▀[38;2;255;210;24m[48;2;224;178;0m▀[38;2;208;165;0m[48;2;182;146;8m▀[38;2;250;201;4m[48;2;173;139;7m▀[38;2;235;189;6m[48;2;131;107;15m▀[38;2;226;180;5m[48;2;104;88;23m▀[38;2;221;176;4m[48;2;89;78;27m▀[38;2;221;176;5m[48;2;88;77;25m▀[38;2;226;180;5m[48;2;103;88;22m▀[38;2;234;188;6m[48;2;135;111;19m▀[38;2;250;202;4m[48;2;175;139;7m▀[38;2;209;166;0m[48;2;181;144;8m▀[38;2;255;209;23m[48;2;221;175;0m▀[38;2;147;129;51m[48;2;255;222;24m▀[38;2;0;0;0m[48;2;91;81;34m▀[38;2;0;0;0m[48;2;49;40;4m▀[38;2;0;0;1m[48;2;29;24;0m▀[38;2;1;2;1m[48;2;0;1;2m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
5
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;2;3;1m[48;2;3;4;1m▀[38;2;0;0;1m[48;2;0;0;1m▀[38;2;32;26;3m[48;2;60;48;3m▀[38;2;84;74;30m[48;2;120;98;17m▀[38;2;165;136;23m[48;2;149;121;17m▀[38;2;234;191;25m[48;2;198;158;10m▀[38;2;215;170;1m[48;2;97;84;26m▀[38;2;144;117;13m[48;2;27;41;65m▀[38;2;76;70;34m[48;2;51;70;100m▀[38;2;39;49;60m[48;2;70;86;107m▀[38;2;38;55;82m[48;2;63;77;95m▀[38;2;44;63;95m[48;2;52;66;84m▀[38;2;48;67;99m[48;2;47;61;78m▀[38;2;49;68;99m[48;2;48;62;79m▀[38;2;41;59;91m[48;2;48;62;80m▀[38;2;20;37;65m[48;2;35;50;69m▀[38;2;37;48;59m[48;2;68;84;106m▀[38;2;75;69;34m[48;2;53;71;102m▀[38;2;146;118;15m[48;2;27;42;66m▀[38;2;215;170;2m[48;2;94;81;25m▀[38;2;222;180;17m[48;2;193;154;8m▀[38;2;210;177;52m[48;2;177;147;35m▀[38;2;193;176;109m[48;2;185;159;63m▀[38;2;24;18;0m[48;2;54;43;0m▀[38;2;0;0;2m[48;2;0;0;2m▀[38;2;2;3;1m[48;2;3;4;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
6
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;3;4;1m[48;2;1;2;1m▀[38;2;0;0;1m[48;2;0;2;1m▀[38;2;52;42;4m[48;2;3;3;0m▀[38;2;141;116;22m[48;2;48;41;11m▀[38;2;171;137;12m[48;2;138;111;15m▀[38;2;118;96;17m[48;2;80;73;36m▀[38;2;21;39;71m[48;2;21;39;70m▀[38;2;75;90;109m[48;2;35;47;66m▀[38;2;55;68;85m[48;2;23;36;58m▀[38;2;29;42;63m[48;2;28;41;62m▀[38;2;24;37;59m[48;2;29;43;64m▀[38;2;24;38;59m[48;2;28;43;64m▀[38;2;24;39;60m[48;2;27;42;63m▀[38;2;24;38;60m[48;2;28;42;63m▀[38;2;24;38;60m[48;2;28;42;63m▀[38;2;26;41;62m[48;2;28;42;63m▀[38;2;29;43;64m[48;2;28;41;63m▀[38;2;55;69;86m[48;2;23;37;59m▀[38;2;69;84;103m[48;2;31;44;63m▀[38;2;16;34;67m[48;2;18;36;68m▀[38;2;119;98;20m[48;2;78;73;37m▀[38;2;164;130;7m[48;2;138;111;16m▀[38;2;127;103;12m[48;2;50;43;13m▀[38;2;54;44;5m[48;2;3;3;0m▀[38;2;0;0;0m[48;2;0;2;1m▀[38;2;3;4;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
7
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;4;5;2m[48;2;4;5;1m▀[38;2;0;0;0m[48;2;0;0;2m▀[38;2;101;92;39m[48;2;151;121;4m▀[38;2;176;146;30m[48;2;180;143;10m▀[38;2;48;48;31m[48;2;39;39;29m▀[38;2;19;35;63m[48;2;7;22;45m▀[38;2;30;42;63m[48;2;23;36;54m▀[38;2;29;43;64m[48;2;26;39;61m▀[38;2;28;42;63m[48;2;29;41;63m▀[38;2;28;41;62m[48;2;29;42;64m▀[38;2;26;41;62m[48;2;28;42;63m▀[38;2;25;41;62m[48;2;27;42;63m▀[38;2;26;41;62m[48;2;27;42;63m▀[38;2;26;42;62m[48;2;29;42;64m▀[38;2;27;42;63m[48;2;28;42;63m▀[38;2;28;42;63m[48;2;28;42;63m▀[38;2;29;43;64m[48;2;26;40;60m▀[38;2;28;44;62m[48;2;23;37;54m▀[38;2;18;36;63m[48;2;8;22;45m▀[38;2;47;48;32m[48;2;37;37;28m▀[38;2;174;144;31m[48;2;178;142;11m▀[38;2;102;93;40m[48;2;154;123;3m▀[38;2;0;0;0m[48;2;0;0;2m▀[38;2;4;5;2m[48;2;4;5;1m▀[38;2;0;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
8
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;5;5;1m[48;2;2;3;1m▀[38;2;0;0;1m[48;2;0;0;1m▀[38;2;131;100;6m[48;2;34;24;3m▀[38;2;190;151;14m[48;2;138;106;11m▀[38;2;45;40;21m[48;2;78;66;19m▀[38;2;5;11;31m[48;2;1;6;29m▀[38;2;13;23;36m[48;2;16;18;28m▀[38;2;14;26;42m[48;2;12;17;30m▀[38;2;17;30;48m[48;2;11;20;34m▀[38;2;20;33;52m[48;2;12;22;36m▀[38;2;22;35;54m[48;2;12;23;38m▀[38;2;22;35;55m[48;2;12;24;38m▀[38;2;22;36;55m[48;2;12;24;39m▀[38;2;22;35;54m[48;2;12;23;38m▀[38;2;19;33;51m[48;2;12;21;36m▀[38;2;17;30;47m[48;2;12;20;34m▀[38;2;14;26;43m[48;2;12;17;30m▀[38;2;14;23;36m[48;2;16;18;28m▀[38;2;5;12;31m[48;2;1;6;29m▀[38;2;44;39;21m[48;2;77;65;19m▀[38;2;191;150;13m[48;2;143;109;11m▀[38;2;134;101;6m[48;2;36;25;3m▀[38;2;0;0;1m[48;2;0;0;1m▀[38;2;5;5;1m[48;2;2;3;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
9
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;0;2;1m[48;2;1;2;1m▀[38;2;4;4;1m[48;2;1;2;1m▀[38;2;0;0;0m[48;2;2;3;1m▀[38;2;44;34;5m[48;2;0;0;2m▀[38;2;147;116;14m[48;2;167;128;10m▀[38;2;7;10;25m[48;2;120;98;15m▀[38;2;11;14;29m[48;2;5;8;26m▀[38;2;16;18;27m[48;2;4;10;30m▀[38;2;13;15;27m[48;2;13;17;29m▀[38;2;13;15;28m[48;2;16;19;28m▀[38;2;12;16;29m[48;2;16;18;28m▀[38;2;12;16;29m[48;2;15;18;28m▀[38;2;12;16;29m[48;2;15;18;28m▀[38;2;13;16;29m[48;2;15;18;28m▀[38;2;13;15;28m[48;2;16;18;28m▀[38;2;13;15;27m[48;2;14;17;29m▀[38;2;16;18;27m[48;2;5;10;30m▀[38;2;11;15;29m[48;2;4;8;25m▀[38;2;5;9;25m[48;2;113;93;16m▀[38;2;141;112;14m[48;2;199;154;11m▀[38;2;34;27;5m[48;2;99;78;10m▀[38;2;0;0;0m[48;2;0;1;2m▀[38;2;4;4;1m[48;2;1;2;1m▀[38;2;0;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
10
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;0;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;0;2;1m▀[38;2;3;4;1m[48;2;2;3;3m▀[38;2;0;0;1m[48;2;4;5;2m▀[38;2;62;46;5m[48;2;0;0;1m▀[38;2;229;177;5m[48;2;99;78;26m▀[38;2;139;114;13m[48;2;248;189;1m▀[38;2;46;40;21m[48;2;212;169;6m▀[38;2;10;13;27m[48;2;144;117;13m▀[38;2;1;6;28m[48;2;96;80;16m▀[38;2;2;8;29m[48;2;68;58;20m▀[38;2;3;9;30m[48;2;55;47;19m▀[38;2;3;9;30m[48;2;56;47;19m▀[38;2;2;7;29m[48;2;68;58;20m▀[38;2;1;6;29m[48;2;95;79;17m▀[38;2;9;13;26m[48;2;142;117;14m▀[38;2;45;40;21m[48;2;211;169;7m▀[38;2;142;117;14m[48;2;250;191;1m▀[38;2;215;166;5m[48;2;103;81;26m▀[38;2;142;108;9m[48;2;0;0;2m▀[38;2;107;87;10m[48;2;0;0;1m▀[38;2;0;0;1m[48;2;2;3;3m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;0;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;0;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
11
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;0;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;0;2;1m▀[38;2;0;2;1m[48;2;4;5;5m▀[38;2;3;4;4m[48;2;0;0;0m▀[38;2;3;4;3m[48;2;0;0;0m▀[38;2;1;3;3m[48;2;0;0;0m▀[38;2;0;0;0m[48;2;25;26;23m▀[38;2;0;0;0m[48;2;138;153;180m▀[38;2;34;32;22m[48;2;101;110;115m▀[38;2;57;82;140m[48;2;178;163;94m▀[38;2;68;66;59m[48;2;103;130;190m▀[38;2;206;154;3m[48;2;32;58;121m▀[38;2;255;197;0m[48;2;75;69;55m▀[38;2;250;196;1m[48;2;140;108;24m▀[38;2;232;183;3m[48;2;182;136;10m▀[38;2;224;179;6m[48;2;199;149;6m▀[38;2;222;178;6m[48;2;200;149;6m▀[38;2;231;184;4m[48;2;183;137;11m▀[38;2;249;196;2m[48;2;141;109;23m▀[38;2;255;196;0m[48;2;78;70;53m▀[38;2;208;155;3m[48;2;33;58;120m▀[38;2;72;68;59m[48;2;100;127;189m▀[38;2;57;82;140m[48;2;180;164;95m▀[38;2;35;33;23m[48;2;103;111;113m▀[38;2;0;0;0m[48;2;138;154;182m▀[38;2;0;0;0m[48;2;26;27;25m▀[38;2;1;3;3m[48;2;0;0;0m▀[38;2;3;4;3m[48;2;0;0;0m▀[38;2;3;4;3m[48;2;0;0;0m▀[38;2;0;2;1m[48;2;4;6;5m▀[38;2;1;2;1m[48;2;0;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
12
|
+
[38;2;1;2;1m[48;2;1;2;1m▀[38;2;1;2;1m[48;2;0;2;1m▀[38;2;0;2;1m[48;2;4;5;3m▀[38;2;4;5;2m[48;2;0;0;0m▀[38;2;0;0;0m[48;2;84;91;104m▀[38;2;39;44;54m[48;2;255;245;164m▀[38;2;120;125;127m[48;2;221;189;52m▀[38;2;31;49;89m[48;2;0;33;121m▀[38;2;105;97;49m[48;2;98;95;58m▀[38;2;56;86;145m[48;2;94;93;61m▀[38;2;0;43;155m[48;2;5;45;141m▀[38;2;151;127;21m[48;2;100;91;43m▀[38;2;226;192;62m[48;2;206;163;0m▀[38;2;164;170;168m[48;2;246;197;0m▀[38;2;107;133;190m[48;2;227;191;45m▀[38;2;60;93;170m[48;2;212;191;99m▀[38;2;45;74;147m[48;2;199;189;131m▀[38;2;41;67;133m[48;2;182;179;145m▀[38;2;42;67;131m[48;2;182;179;145m▀[38;2;45;74;146m[48;2;198;188;131m▀[38;2;60;93;171m[48;2;211;191;99m▀[38;2;106;132;189m[48;2;228;192;47m▀[38;2;163;169;169m[48;2;246;197;0m▀[38;2;226;193;63m[48;2;206;163;0m▀[38;2;153;129;21m[48;2;102;92;43m▀[38;2;0;44;154m[48;2;5;45;140m▀[38;2;54;85;147m[48;2;93;93;62m▀[38;2;106;98;50m[48;2;102;99;59m▀[38;2;32;51;91m[48;2;0;32;120m▀[38;2;122;126;128m[48;2;219;187;52m▀[38;2;41;46;56m[48;2;255;247;163m▀[38;2;0;0;0m[48;2;89;94;104m▀[38;2;4;5;2m[48;2;0;0;0m▀[38;2;0;2;1m[48;2;4;5;3m▀[38;2;1;2;1m[48;2;0;2;1m▀[38;2;1;2;1m[48;2;1;2;1m▀[0m
|
|
13
|
+
[38;2;1;2;1m[48;2;1;2;2m▀[38;2;3;4;2m[48;2;3;3;0m▀[38;2;0;0;0m[48;2;0;0;11m▀[38;2;52;43;5m[48;2;146;133;71m▀[38;2;211;188;98m[48;2;218;172;0m▀[38;2;246;199;2m[48;2;211;171;8m▀[38;2;247;195;0m[48;2;255;215;0m▀[38;2;42;59;92m[48;2;54;68;85m▀[38;2;45;64;99m[48;2;9;39;110m▀[38;2;192;154;7m[48;2;225;183;8m▀[38;2;150;122;13m[48;2;255;214;1m▀[38;2;234;188;2m[48;2;250;200;0m▀[38;2;210;169;7m[48;2;194;167;51m▀[38;2;191;158;29m[48;2;227;199;70m▀[38;2;220;180;20m[48;2;243;209;61m▀[38;2;209;170;14m[48;2;240;207;64m▀[38;2;211;172;14m[48;2;237;206;68m▀[38;2;178;145;19m[48;2;239;207;67m▀[38;2;178;144;19m[48;2;240;208;67m▀[38;2;211;171;14m[48;2;237;206;68m▀[38;2;209;170;13m[48;2;239;207;66m▀[38;2;219;180;19m[48;2;244;209;61m▀[38;2;191;159;29m[48;2;227;199;71m▀[38;2;209;168;7m[48;2;192;166;52m▀[38;2;235;188;2m[48;2;249;200;0m▀[38;2;151;122;13m[48;2;255;214;1m▀[38;2;192;155;7m[48;2;227;184;8m▀[38;2;49;67;99m[48;2;11;40;110m▀[38;2;42;58;93m[48;2;51;65;84m▀[38;2;248;195;0m[48;2;255;213;0m▀[38;2;241;194;4m[48;2;217;176;6m▀[38;2;200;182;104m[48;2;71;83;109m▀[38;2;64;51;0m[48;2;112;112;99m▀[38;2;0;0;0m[48;2;3;3;1m▀[38;2;3;4;2m[48;2;0;2;1m▀[38;2;1;2;1m[48;2;1;2;2m▀[0m
|
|
14
|
+
[38;2;0;2;3m[48;2;2;3;3m▀[38;2;3;1;0m[48;2;0;0;0m▀[38;2;0;2;47m[48;2;48;58;82m▀[38;2;52;77;148m[48;2;160;139;51m▀[38;2;193;157;15m[48;2;255;216;0m▀[38;2;255;220;0m[48;2;202;167;17m▀[38;2;140;126;45m[48;2;40;56;94m▀[38;2;43;52;80m[48;2;200;145;5m▀[38;2;39;57;98m[48;2;47;59;89m▀[38;2;205;169;21m[48;2;208;170;16m▀[38;2;255;203;0m[48;2;210;174;25m▀[38;2;186;162;56m[48;2;228;193;42m▀[38;2;244;207;43m[48;2;255;219;0m▀[38;2;233;185;0m[48;2;142;123;38m▀[38;2;186;151;13m[48;2;0;18;147m▀[38;2;199;161;14m[48;2;47;79;172m▀[38;2;218;171;0m[48;2;131;126;93m▀[38;2;215;171;0m[48;2;238;187;0m▀[38;2;212;168;0m[48;2;226;183;10m▀[38;2;217;171;0m[48;2;247;196;0m▀[38;2;201;161;6m[48;2;97;100;85m▀[38;2;181;148;14m[48;2;0;8;159m▀[38;2;233;186;0m[48;2;142;123;39m▀[38;2;244;206;43m[48;2;255;219;0m▀[38;2;185;161;59m[48;2;229;194;43m▀[38;2;254;203;0m[48;2;209;172;25m▀[38;2;207;172;20m[48;2;211;174;16m▀[38;2;41;57;95m[48;2;48;61;92m▀[38;2;44;52;80m[48;2;199;145;5m▀[38;2;136;123;48m[48;2;39;54;91m▀[38;2;255;227;0m[48;2;201;166;20m▀[38;2;113;105;52m[48;2;255;224;0m▀[38;2;0;29;174m[48;2;158;137;43m▀[38;2;0;13;47m[48;2;48;59;81m▀[38;2;0;0;0m[48;2;0;0;0m▀[38;2;1;2;3m[48;2;2;3;3m▀[0m
|
|
15
|
+
[38;2;3;3;0m[48;2;0;0;0m▀[38;2;0;0;7m[48;2;8;9;7m▀[38;2;198;186;119m[48;2;96;104;110m▀[38;2;255;211;0m[48;2;41;56;90m▀[38;2;162;141;37m[48;2;67;67;76m▀[38;2;6;39;111m[48;2;113;91;45m▀[38;2;69;71;69m[48;2;8;47;137m▀[38;2;245;182;0m[48;2;36;58;103m▀[38;2;49;59;84m[48;2;56;57;66m▀[38;2;216;176;14m[48;2;243;190;5m▀[38;2;212;169;6m[48;2;205;164;7m▀[38;2;242;194;1m[48;2;239;192;6m▀[38;2;255;215;0m[48;2;255;216;0m▀[38;2;150;130;37m[48;2;150;128;36m▀[38;2;0;32;153m[48;2;0;33;150m▀[38;2;9;48;147m[48;2;6;45;143m▀[38;2;59;92;179m[48;2;7;47;146m▀[38;2;164;151;84m[48;2;62;94;179m▀[38;2;255;209;0m[48;2;162;145;71m▀[38;2;255;217;0m[48;2;255;219;0m▀[38;2;115;115;84m[48;2;113;113;84m▀[38;2;0;22;164m[48;2;0;21;160m▀[38;2;151;131;37m[48;2;151;130;37m▀[38;2;255;215;0m[48;2;255;215;0m▀[38;2;243;195;1m[48;2;240;194;6m▀[38;2;212;170;4m[48;2;205;165;6m▀[38;2;220;180;13m[48;2;244;193;5m▀[38;2;49;59;82m[48;2;59;60;67m▀[38;2;246;183;0m[48;2;37;58;101m▀[38;2;76;77;72m[48;2;7;46;136m▀[38;2;5;37;110m[48;2;111;90;43m▀[38;2;159;137;37m[48;2;67;68;76m▀[38;2;255;212;1m[48;2;39;53;86m▀[38;2;201;188;119m[48;2;94;101;106m▀[38;2;0;0;8m[48;2;8;9;8m▀[38;2;2;3;0m[48;2;0;0;0m▀[0m
|
|
16
|
+
[38;2;3;4;1m[48;2;0;1;0m▀[38;2;0;0;0m[48;2;2;5;13m▀[38;2;103;86;37m[48;2;197;174;72m▀[38;2;208;160;14m[48;2;218;174;1m▀[38;2;255;199;0m[48;2;201;164;10m▀[38;2;255;204;0m[48;2;254;208;4m▀[38;2;184;137;13m[48;2;255;206;0m▀[38;2;27;50;105m[48;2;164;117;8m▀[38;2;72;70;64m[48;2;138;105;23m▀[38;2;255;206;0m[48;2;255;210;0m▀[38;2;203;164;9m[48;2;176;142;11m▀[38;2;245;197;4m[48;2;216;173;6m▀[38;2;255;215;0m[48;2;255;219;0m▀[38;2;143;125;39m[48;2;175;146;23m▀[38;2;0;22;163m[48;2;50;64;90m▀[38;2;0;40;158m[48;2;66;76;87m▀[38;2;0;33;156m[48;2;65;76;88m▀[38;2;0;38;157m[48;2;60;71;86m▀[38;2;45;84;192m[48;2;68;79;93m▀[38;2;183;162;69m[48;2;116;115;100m▀[38;2;111;111;84m[48;2;104;99;64m▀[38;2;0;9;175m[48;2;45;61;94m▀[38;2;144;125;40m[48;2;174;145;24m▀[38;2;255;216;0m[48;2;255;219;0m▀[38;2;246;199;4m[48;2;216;175;7m▀[38;2;202;164;8m[48;2;177;143;10m▀[38;2;255;206;0m[48;2;255;210;0m▀[38;2;75;71;62m[48;2;141;108;23m▀[38;2;26;49;104m[48;2;162;116;8m▀[38;2;183;136;14m[48;2;255;205;0m▀[38;2;255;203;0m[48;2;254;208;5m▀[38;2;255;199;0m[48;2;202;165;10m▀[38;2;207;160;12m[48;2;217;174;1m▀[38;2;106;88;37m[48;2;199;175;70m▀[38;2;0;0;0m[48;2;3;6;14m▀[38;2;2;3;1m[48;2;0;0;0m▀[0m
|
|
17
|
+
[38;2;0;0;0m[48;2;0;0;0m▀[38;2;28;31;34m[48;2;66;65;55m▀[38;2;252;216;71m[48;2;255;230;53m▀[38;2;246;194;0m[48;2;226;179;0m▀[38;2;204;163;10m[48;2;214;173;8m▀[38;2;255;209;2m[48;2;255;211;1m▀[38;2;244;188;3m[48;2;242;183;2m▀[38;2;188;133;7m[48;2;196;138;5m▀[38;2;204;147;4m[48;2;161;117;9m▀[38;2;182;144;11m[48;2;199;158;9m▀[38;2;188;151;10m[48;2;190;154;10m▀[38;2;207;166;8m[48;2;210;169;8m▀[38;2;212;170;7m[48;2;189;151;9m▀[38;2;255;205;0m[48;2;171;129;10m▀[38;2;255;206;0m[48;2;193;147;9m▀[38;2;255;206;0m[48;2;188;143;9m▀[38;2;255;206;0m[48;2;192;146;9m▀[38;2;255;209;0m[48;2;176;135;10m▀[38;2;255;206;0m[48;2;177;136;10m▀[38;2;253;201;0m[48;2;194;147;9m▀[38;2;253;203;0m[48;2;189;144;9m▀[38;2;255;207;0m[48;2;193;147;9m▀[38;2;255;206;0m[48;2;171;129;9m▀[38;2;212;170;7m[48;2;189;152;9m▀[38;2;206;165;8m[48;2;210;170;7m▀[38;2;188;152;10m[48;2;190;153;9m▀[38;2;182;144;11m[48;2;198;158;9m▀[38;2;205;147;4m[48;2;160;116;9m▀[38;2;189;133;6m[48;2;195;138;5m▀[38;2;244;188;2m[48;2;242;183;2m▀[38;2;255;209;2m[48;2;255;210;2m▀[38;2;204;164;10m[48;2;215;173;8m▀[38;2;245;193;0m[48;2;225;179;0m▀[38;2;253;217;68m[48;2;255;232;51m▀[38;2;30;32;34m[48;2;68;67;54m▀[38;2;0;0;0m[48;2;0;0;0m▀[0m
|
|
18
|
+
[38;2;0;0;0m[48;2;0;0;0m▀[38;2;78;75;56m[48;2;113;105;67m▀[38;2;247;205;36m[48;2;230;188;26m▀[38;2;201;160;0m[48;2;203;161;3m▀[38;2;226;182;6m[48;2;249;200;4m▀[38;2;255;208;2m[48;2;250;201;3m▀[38;2;242;180;2m[48;2;244;178;2m▀[38;2;181;128;6m[48;2;154;109;6m▀[38;2;182;131;6m[48;2;174;124;5m▀[38;2;255;208;1m[48;2;255;204;2m▀[38;2;218;177;7m[48;2;230;186;5m▀[38;2;164;131;13m[48;2;186;139;8m▀[38;2;190;142;7m[48;2;254;200;2m▀[38;2;251;196;2m[48;2;254;205;3m▀[38;2;249;196;2m[48;2;251;202;3m▀[38;2;248;195;3m[48;2;251;202;3m▀[38;2;255;202;2m[48;2;255;209;2m▀[38;2;216;171;5m[48;2;221;178;6m▀[38;2;217;170;5m[48;2;221;177;6m▀[38;2;255;202;2m[48;2;255;209;2m▀[38;2;248;195;3m[48;2;251;202;3m▀[38;2;250;196;3m[48;2;252;202;3m▀[38;2;252;197;2m[48;2;254;205;4m▀[38;2;193;144;7m[48;2;255;200;2m▀[38;2;164;131;12m[48;2;188;140;7m▀[38;2;217;175;7m[48;2;230;185;6m▀[38;2;255;208;2m[48;2;255;205;2m▀[38;2;183;132;5m[48;2;174;124;5m▀[38;2;181;128;6m[48;2;153;109;5m▀[38;2;243;180;2m[48;2;244;178;2m▀[38;2;255;208;3m[48;2;250;200;3m▀[38;2;227;183;7m[48;2;250;200;4m▀[38;2;201;160;1m[48;2;203;161;3m▀[38;2;247;205;35m[48;2;229;188;26m▀[38;2;79;75;55m[48;2;115;106;66m▀[38;2;0;0;0m[48;2;0;0;0m▀[0m
|
|
@@ -1,35 +1,25 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import {
|
|
2
|
+
import { artHeight, artWidth, renderArt } from "./art.ts";
|
|
3
3
|
|
|
4
4
|
describe("art", () => {
|
|
5
|
-
it("
|
|
6
|
-
expect(
|
|
7
|
-
expect(
|
|
8
|
-
for (const v of VARIANTS) {
|
|
9
|
-
expect(v[0].length).toBe(ART_WIDTH);
|
|
10
|
-
expect(Math.ceil(v.length / 2)).toBe(ART_HEIGHT);
|
|
11
|
-
}
|
|
5
|
+
it("loads non-zero dimensions from the bundled art.ansi", () => {
|
|
6
|
+
expect(artWidth()).toBeGreaterThan(0);
|
|
7
|
+
expect(artHeight()).toBeGreaterThan(0);
|
|
12
8
|
});
|
|
13
9
|
|
|
14
|
-
it("
|
|
15
|
-
|
|
16
|
-
expect(
|
|
10
|
+
it("renderArt returns artHeight() lines", () => {
|
|
11
|
+
const lines = renderArt();
|
|
12
|
+
expect(lines).toHaveLength(artHeight());
|
|
17
13
|
});
|
|
18
14
|
|
|
19
|
-
it("
|
|
20
|
-
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it("renderArt produces ART_HEIGHT rows", () => {
|
|
24
|
-
const lines = renderArt(VARIANTS[0]);
|
|
25
|
-
expect(lines).toHaveLength(ART_HEIGHT);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it("renderArt embeds 24-bit ANSI fg+bg colours and the upper-half block glyph", () => {
|
|
29
|
-
const lines = renderArt(VARIANTS[0]);
|
|
30
|
-
const joined = lines.join("\n");
|
|
15
|
+
it("each line embeds 24-bit ANSI fg+bg colours and the upper-half block glyph", () => {
|
|
16
|
+
const joined = renderArt().join("\n");
|
|
31
17
|
expect(joined).toContain("[38;2;");
|
|
32
|
-
expect(joined).toContain("
|
|
18
|
+
expect(joined).toContain("[48;2;");
|
|
33
19
|
expect(joined).toContain("▀");
|
|
34
20
|
});
|
|
21
|
+
|
|
22
|
+
it("subsequent calls return the same cached array", () => {
|
|
23
|
+
expect(renderArt()).toBe(renderArt());
|
|
24
|
+
});
|
|
35
25
|
});
|
|
@@ -1,125 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const F = "F";
|
|
15
|
-
const O = "O";
|
|
16
|
-
const R = "R";
|
|
17
|
-
|
|
18
|
-
type PaletteKey = typeof _ | typeof S | typeof X | typeof A | typeof Y | typeof W | typeof M | typeof D | typeof G | typeof T | typeof E | typeof F | typeof O | typeof R;
|
|
19
|
-
|
|
20
|
-
const PIXEL_COLOR: Record<PaletteKey, RGB | null> = {
|
|
21
|
-
[_]: null,
|
|
22
|
-
[S]: PALETTE.suitLight,
|
|
23
|
-
[X]: PALETTE.suitMid,
|
|
24
|
-
[A]: PALETTE.suitShadow,
|
|
25
|
-
[Y]: PALETTE.suitTrim,
|
|
26
|
-
[W]: PALETTE.visorLow,
|
|
27
|
-
[M]: PALETTE.visorMid,
|
|
28
|
-
[D]: PALETTE.visorTop,
|
|
29
|
-
[G]: PALETTE.backpack,
|
|
30
|
-
[T]: PALETTE.earthBlue,
|
|
31
|
-
[E]: PALETTE.earthGreen,
|
|
32
|
-
[F]: PALETTE.flameYellow,
|
|
33
|
-
[O]: PALETTE.flameOrange,
|
|
34
|
-
[R]: PALETTE.flameRed,
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const ASTRONAUT_FLOATING: readonly string[] = [
|
|
38
|
-
"··········SSSSSSSSSS··········",
|
|
39
|
-
"·······SSSSXXXXXXXXSSSS·······",
|
|
40
|
-
"·····SSXXMMMMMMMMMMMMXXSS·····",
|
|
41
|
-
"····SXMMDDDDDDDDDDDDDDMMSS····",
|
|
42
|
-
"···SXMDDDDWWDDDDDDWWDDDDMMS···",
|
|
43
|
-
"···SXMDDWWWWDDDDDDWWWWDDMMS···",
|
|
44
|
-
"···SXMDDDDDDDDDDDDDDDDDDMMS···",
|
|
45
|
-
"···SXMDDDDDDDDWWDDDDDDDDMMS···",
|
|
46
|
-
"····SXMMDDDDDDDDDDDDDDMMSS····",
|
|
47
|
-
"·····SSXXMMMMMMMMMMMMXXSS·····",
|
|
48
|
-
"·······SSXXXXXXXXXXXXSS·······",
|
|
49
|
-
"··········SXAAAAAAXSS·········",
|
|
50
|
-
"·······SSSSSSSSSSSSSSSS·······",
|
|
51
|
-
"······SSSSGGGGSSSSGGGGSSS·····",
|
|
52
|
-
"·····SSSSGGGGSSAAYAASSGGSSS···",
|
|
53
|
-
"·····SSGGGGSSSAYYYAASSGGGGS···",
|
|
54
|
-
"·····SSGGGSSSSAYAYASSSSGGGS···",
|
|
55
|
-
"·····SSGGGSSSSAAAASSSSSGGGS···",
|
|
56
|
-
"·····SSGGGSSSSSSSSSSSSGGGS····",
|
|
57
|
-
"······SSSSSSSSSSSSSSSSSS······",
|
|
58
|
-
"········SSAAAAAASSSSSSAAAA····",
|
|
59
|
-
"········SSSAAAASSSSAAAAS······",
|
|
60
|
-
"········SXXSSSSSSSXXXSS·······",
|
|
61
|
-
"·········SSSS·····SSSS········",
|
|
62
|
-
"··········SSS······SSS········",
|
|
63
|
-
"··········SS········SS········",
|
|
64
|
-
];
|
|
65
|
-
|
|
66
|
-
const ASTRONAUT_FLAG: readonly string[] = [
|
|
67
|
-
"··········SSSSSSSSSS··········",
|
|
68
|
-
"·······SSSSXXXXXXXXSSSS·······",
|
|
69
|
-
"·····SSXXMMMMMMMMMMMMXXSS·····",
|
|
70
|
-
"····SXMMDDDDDDDDDDDDDDMMSS····",
|
|
71
|
-
"···SXMDDDDWWDDDDDDWWDDDDMMS···",
|
|
72
|
-
"···SXMDDWWWWDDDDDDWWWWDDMMS···",
|
|
73
|
-
"···SXMDDDDDDDDDDDDDDDDDDMMS···",
|
|
74
|
-
"···SXMDDDDDDDDWWDDDDDDDDMMS···",
|
|
75
|
-
"····SXMMDDDDDDDDDDDDDDMMSS····",
|
|
76
|
-
"·····SSXXMMMMMMMMMMMMXXSS·····",
|
|
77
|
-
"·······SSXXXXXXXXXXXXSS·······",
|
|
78
|
-
"··········SXAAAAAAXSS·········",
|
|
79
|
-
"······YYYYYSSSSSSSSSSSSSS·····",
|
|
80
|
-
"······YYYYYSSGGGGSSSGGGGSSS···",
|
|
81
|
-
"······YYYYYSSGGGGSSSSGGGSS····",
|
|
82
|
-
"······YYYYYSSGGGSSSSSSGGGS····",
|
|
83
|
-
"······YYYYYSSGGSSSSSSSSGGS····",
|
|
84
|
-
"········SSSSSSSSSSSSSSSSSS····",
|
|
85
|
-
"········SSAAAAAASSSAAAASS·····",
|
|
86
|
-
"········SSSAAAASSSAAAAAS······",
|
|
87
|
-
"········SXXSSSSSSSXXXSS·······",
|
|
88
|
-
"·········SSSS·····SSSS········",
|
|
89
|
-
"··········SSS······SSS········",
|
|
90
|
-
"··········SS········SS········",
|
|
91
|
-
"·························E····",
|
|
92
|
-
"·························TT···",
|
|
93
|
-
];
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { visibleWidth } from "@mariozechner/pi-tui";
|
|
5
|
+
|
|
6
|
+
const extensionDir = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const artPath = path.resolve(extensionDir, "art.ansi");
|
|
8
|
+
|
|
9
|
+
interface ArtData {
|
|
10
|
+
lines: string[];
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
}
|
|
94
14
|
|
|
95
|
-
|
|
15
|
+
let cached: ArtData | null = null;
|
|
16
|
+
|
|
17
|
+
function load(): ArtData {
|
|
18
|
+
if (cached !== null) return cached;
|
|
19
|
+
const raw = fs.readFileSync(artPath, "utf8");
|
|
20
|
+
const lines = raw.split("\n");
|
|
21
|
+
while (lines.length > 0 && lines[lines.length - 1] === "") lines.pop();
|
|
22
|
+
const width = lines.length > 0 ? visibleWidth(lines[0]) : 0;
|
|
23
|
+
const height = lines.length;
|
|
24
|
+
cached = { lines, width, height };
|
|
25
|
+
return cached;
|
|
26
|
+
}
|
|
96
27
|
|
|
97
|
-
export function
|
|
98
|
-
|
|
99
|
-
return VARIANTS[idx];
|
|
28
|
+
export function renderArt(): string[] {
|
|
29
|
+
return load().lines;
|
|
100
30
|
}
|
|
101
31
|
|
|
102
|
-
export function
|
|
103
|
-
|
|
104
|
-
for (let y = 0; y < grid.length; y += 2) {
|
|
105
|
-
const top = grid[y];
|
|
106
|
-
const bot = grid[y + 1] ?? "·".repeat(top.length);
|
|
107
|
-
let line = "";
|
|
108
|
-
for (let x = 0; x < top.length; x++) {
|
|
109
|
-
const tk = (top[x] ?? "·") as PaletteKey;
|
|
110
|
-
const bk = (bot[x] ?? "·") as PaletteKey;
|
|
111
|
-
const tc = PIXEL_COLOR[tk] ?? null;
|
|
112
|
-
const bc = PIXEL_COLOR[bk] ?? null;
|
|
113
|
-
if (!tc && !bc) {
|
|
114
|
-
line += " ";
|
|
115
|
-
continue;
|
|
116
|
-
}
|
|
117
|
-
line += fgBg(tc ?? PALETTE.space, bc ?? PALETTE.space);
|
|
118
|
-
}
|
|
119
|
-
rows.push(line);
|
|
120
|
-
}
|
|
121
|
-
return rows;
|
|
32
|
+
export function artWidth(): number {
|
|
33
|
+
return load().width;
|
|
122
34
|
}
|
|
123
35
|
|
|
124
|
-
export
|
|
125
|
-
|
|
36
|
+
export function artHeight(): number {
|
|
37
|
+
return load().height;
|
|
38
|
+
}
|
|
@@ -16,10 +16,16 @@ export const PALETTE = {
|
|
|
16
16
|
visorTop: [40, 80, 180] as const,
|
|
17
17
|
visorMid: [80, 160, 240] as const,
|
|
18
18
|
visorLow: [180, 220, 255] as const,
|
|
19
|
-
suitLight: [
|
|
19
|
+
suitLight: [255, 255, 255] as const,
|
|
20
20
|
suitMid: [200, 200, 195] as const,
|
|
21
21
|
suitShadow: [120, 120, 130] as const,
|
|
22
|
-
suitTrim: [
|
|
22
|
+
suitTrim: [254, 209, 0] as const,
|
|
23
|
+
suitGoldHigh: [255, 220, 110] as const,
|
|
24
|
+
suitGoldShadow: [200, 150, 30] as const,
|
|
25
|
+
flagBlue: [0, 51, 160] as const,
|
|
26
|
+
voidBlack: [10, 12, 30] as const,
|
|
27
|
+
outline: [22, 32, 64] as const,
|
|
28
|
+
highlight: [255, 255, 255] as const,
|
|
23
29
|
backpack: [80, 80, 90] as const,
|
|
24
30
|
earthBlue: [50, 110, 200] as const,
|
|
25
31
|
earthGreen: [70, 160, 100] as const,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { visibleWidth } from "@mariozechner/pi-tui";
|
|
2
2
|
import { fg, PALETTE } from "./colors.ts";
|
|
3
|
-
import {
|
|
3
|
+
import { artHeight, artWidth, renderArt } from "./art.ts";
|
|
4
4
|
import { pickMessage } from "./messages.ts";
|
|
5
5
|
import { renderStarfield, type Mask } from "./stars.ts";
|
|
6
6
|
|
|
@@ -73,12 +73,12 @@ export function composeWelcome(width: number, seed: number, stats: WelcomeStats)
|
|
|
73
73
|
const hasVersion = !!stats.pkgVersion;
|
|
74
74
|
const versionRow = 1;
|
|
75
75
|
const artStartRow = hasVersion ? 2 : 1;
|
|
76
|
-
const totalRows = artStartRow +
|
|
76
|
+
const totalRows = artStartRow + artHeight() + 6;
|
|
77
77
|
const safeWidth = Math.max(40, width);
|
|
78
|
-
const artStartCol = Math.max(0, Math.floor((safeWidth -
|
|
78
|
+
const artStartCol = Math.max(0, Math.floor((safeWidth - artWidth()) / 2));
|
|
79
79
|
|
|
80
80
|
const mask = new CompositeMask(totalRows, safeWidth);
|
|
81
|
-
mask.occupyArt(artStartRow, artStartCol,
|
|
81
|
+
mask.occupyArt(artStartRow, artStartCol, artHeight(), artWidth());
|
|
82
82
|
|
|
83
83
|
const titleLine = fg(PALETTE.title, TITLE);
|
|
84
84
|
const titlePlaced = centerInLine(titleLine, safeWidth);
|
|
@@ -93,7 +93,7 @@ export function composeWelcome(width: number, seed: number, stats: WelcomeStats)
|
|
|
93
93
|
|
|
94
94
|
const taglineRaw = pickMessage(seed);
|
|
95
95
|
const taglineLine = fg(PALETTE.tagline, taglineRaw);
|
|
96
|
-
const taglineRow = artStartRow +
|
|
96
|
+
const taglineRow = artStartRow + artHeight() + 1;
|
|
97
97
|
const taglinePlaced = centerInLine(taglineLine, safeWidth);
|
|
98
98
|
mask.occupy(taglineRow, taglinePlaced.col, visibleWidth(taglineLine));
|
|
99
99
|
|
|
@@ -109,7 +109,7 @@ export function composeWelcome(width: number, seed: number, stats: WelcomeStats)
|
|
|
109
109
|
mask.occupy(hintRow, hintPlaced.col, visibleWidth(hintColored));
|
|
110
110
|
|
|
111
111
|
const stars = renderStarfield(safeWidth, totalRows, seed, mask);
|
|
112
|
-
const artLines = renderArt(
|
|
112
|
+
const artLines = renderArt();
|
|
113
113
|
|
|
114
114
|
const composed: string[] = [];
|
|
115
115
|
for (let r = 0; r < totalRows; r++) {
|
|
@@ -121,7 +121,7 @@ export function composeWelcome(width: number, seed: number, stats: WelcomeStats)
|
|
|
121
121
|
if (r === statsRow) line = overlay(line, statsPlaced.line, safeWidth);
|
|
122
122
|
if (r === hintRow) line = overlay(line, hintPlaced.line, safeWidth);
|
|
123
123
|
|
|
124
|
-
if (r >= artStartRow && r < artStartRow +
|
|
124
|
+
if (r >= artStartRow && r < artStartRow + artHeight()) {
|
|
125
125
|
const artLine = artLines[r - artStartRow];
|
|
126
126
|
const artLineWidth = visibleWidth(artLine);
|
|
127
127
|
line = overlayAt(line, " ".repeat(artStartCol) + artLine, safeWidth, artStartCol, artLineWidth);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
|
|
2
2
|
import { composeWelcome, type WelcomeStats } from "./compose.ts";
|
|
3
|
-
import {
|
|
3
|
+
import { artHeight, artWidth } from "./art.ts";
|
|
4
4
|
import { readPackageVersion } from "./version.ts";
|
|
5
5
|
|
|
6
6
|
const DISMISS_AFTER_MS = 6_000;
|
|
7
7
|
const MOUNT_DELAY_MS = 100;
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const OVERLAY_HORIZONTAL_PADDING = 30;
|
|
9
|
+
const OVERLAY_VERTICAL_PADDING = 8;
|
|
10
10
|
|
|
11
11
|
function readCavemanLevel(ctx: ExtensionContext): string | undefined {
|
|
12
12
|
const entries = ctx.sessionManager.getEntries();
|
|
@@ -103,8 +103,8 @@ export default function astroWelcomeExtension(pi: ExtensionAPI): void {
|
|
|
103
103
|
overlay: true,
|
|
104
104
|
overlayOptions: {
|
|
105
105
|
anchor: "center",
|
|
106
|
-
width:
|
|
107
|
-
maxHeight:
|
|
106
|
+
width: Math.max(artWidth() + OVERLAY_HORIZONTAL_PADDING, 70),
|
|
107
|
+
maxHeight: artHeight() + OVERLAY_VERTICAL_PADDING,
|
|
108
108
|
},
|
|
109
109
|
},
|
|
110
110
|
)
|