@prozilla-os/core 2.0.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -113
- package/dist/chunks/afire-DlRwSfiJ.js +68 -0
- package/dist/chunks/afire-DlRwSfiJ.js.map +1 -0
- package/dist/chunks/banner-jSvYkuqB.js +351 -0
- package/dist/chunks/banner-jSvYkuqB.js.map +1 -0
- package/dist/chunks/cat-B_KOgu80.js +37 -0
- package/dist/chunks/cat-B_KOgu80.js.map +1 -0
- package/dist/chunks/clear-C8xhqHmC.js +12 -0
- package/dist/chunks/clear-C8xhqHmC.js.map +1 -0
- package/dist/chunks/compgen-2kLzA1wV.js +11 -0
- package/dist/chunks/compgen-2kLzA1wV.js.map +1 -0
- package/dist/chunks/{cowsay-hTKzWScw.js → cowsay-CTLxUPtF.js} +13 -13
- package/dist/chunks/cowsay-CTLxUPtF.js.map +1 -0
- package/dist/chunks/date-CA1ub92R.js +33 -0
- package/dist/chunks/date-CA1ub92R.js.map +1 -0
- package/dist/chunks/dir-w2XNd6oI.js +11 -0
- package/dist/chunks/dir-w2XNd6oI.js.map +1 -0
- package/dist/chunks/doubleBracket-B5nqIccY.js +78 -0
- package/dist/chunks/doubleBracket-B5nqIccY.js.map +1 -0
- package/dist/chunks/{echo-Gmh-b8f5.js → echo-_hDVbupR.js} +5 -5
- package/dist/chunks/echo-_hDVbupR.js.map +1 -0
- package/dist/chunks/{eval-DINS_Vhl.js → eval-4uLqmhXl.js} +5 -5
- package/dist/chunks/eval-4uLqmhXl.js.map +1 -0
- package/dist/chunks/false-D6AWAlcU.js +12 -0
- package/dist/chunks/false-D6AWAlcU.js.map +1 -0
- package/dist/chunks/{fortune-DkIZpYa_.js → fortune-D8ZK6xtX.js} +7 -7
- package/dist/chunks/fortune-D8ZK6xtX.js.map +1 -0
- package/dist/chunks/grep-DZO92KaH.js +41 -0
- package/dist/chunks/grep-DZO92KaH.js.map +1 -0
- package/dist/chunks/head-C_bbNyUc.js +50 -0
- package/dist/chunks/head-C_bbNyUc.js.map +1 -0
- package/dist/chunks/help-OHTeCzgo.js +19 -0
- package/dist/chunks/help-OHTeCzgo.js.map +1 -0
- package/dist/chunks/history-DeQor0w1.js +17 -0
- package/dist/chunks/history-DeQor0w1.js.map +1 -0
- package/dist/chunks/hostname-B-lPyRps.js +10 -0
- package/dist/chunks/hostname-B-lPyRps.js.map +1 -0
- package/dist/chunks/install-9Dikj7i2.js +27 -0
- package/dist/chunks/install-9Dikj7i2.js.map +1 -0
- package/dist/chunks/less-wELkkcQx.js +98 -0
- package/dist/chunks/less-wELkkcQx.js.map +1 -0
- package/dist/chunks/{lolcat-Dyjbg15t.js → lolcat-xpDAXsIt.js} +20 -20
- package/dist/chunks/lolcat-xpDAXsIt.js.map +1 -0
- package/dist/chunks/{ls-DnmR50y0.js → ls-D2Ln7mue.js} +7 -7
- package/dist/chunks/ls-D2Ln7mue.js.map +1 -0
- package/dist/chunks/man-E9nMmKZ1.js +58 -0
- package/dist/chunks/man-E9nMmKZ1.js.map +1 -0
- package/dist/chunks/nano-DsRjsQ-k.js +79 -0
- package/dist/chunks/nano-DsRjsQ-k.js.map +1 -0
- package/dist/chunks/neofetch-Dyre2Ik0.js +46 -0
- package/dist/chunks/neofetch-Dyre2Ik0.js.map +1 -0
- package/dist/chunks/pipes-CQ-pK6Kv.js +89 -0
- package/dist/chunks/pipes-CQ-pK6Kv.js.map +1 -0
- package/dist/chunks/printenv-Cq-skM9d.js +22 -0
- package/dist/chunks/printenv-Cq-skM9d.js.map +1 -0
- package/dist/chunks/pwd-CZ9IWAfu.js +11 -0
- package/dist/chunks/pwd-CZ9IWAfu.js.map +1 -0
- package/dist/chunks/rain-DT-V01dD.js +63 -0
- package/dist/chunks/rain-DT-V01dD.js.map +1 -0
- package/dist/chunks/reload-CE3ZVq6O.js +10 -0
- package/dist/chunks/reload-CE3ZVq6O.js.map +1 -0
- package/dist/chunks/rev-C5m1qeoZ.js +15 -0
- package/dist/chunks/rev-C5m1qeoZ.js.map +1 -0
- package/dist/chunks/rm-Uxuv-dEz.js.map +1 -1
- package/dist/chunks/rmdir-BYWer3pb.js.map +1 -1
- package/dist/chunks/sh-CIyBHb8C.js +11 -0
- package/dist/chunks/sh-CIyBHb8C.js.map +1 -0
- package/dist/chunks/{sl-CLAmugya.js → sl-CVLteJLH.js} +10 -10
- package/dist/chunks/{sl-CLAmugya.js.map → sl-CVLteJLH.js.map} +1 -1
- package/dist/chunks/sleep-hEBW30R3.js +26 -0
- package/dist/chunks/sleep-hEBW30R3.js.map +1 -0
- package/dist/chunks/snow-DAlyPPxX.js +76 -0
- package/dist/chunks/snow-DAlyPPxX.js.map +1 -0
- package/dist/chunks/tail-BLlaoTxA.js +50 -0
- package/dist/chunks/tail-BLlaoTxA.js.map +1 -0
- package/dist/chunks/terminalUIApp-Bmiaqvd9.js +63 -0
- package/dist/chunks/terminalUIApp-Bmiaqvd9.js.map +1 -0
- package/dist/chunks/textEditorApp-BM3EiMoV.js +56 -0
- package/dist/chunks/textEditorApp-BM3EiMoV.js.map +1 -0
- package/dist/chunks/true-j1Uf2Nz9.js +12 -0
- package/dist/chunks/true-j1Uf2Nz9.js.map +1 -0
- package/dist/chunks/uniq-LncLpnFY.js +44 -0
- package/dist/chunks/uniq-LncLpnFY.js.map +1 -0
- package/dist/chunks/uptime-pYltXMOi.js +10 -0
- package/dist/chunks/uptime-pYltXMOi.js.map +1 -0
- package/dist/chunks/vi-Cgo3qLR9.js +121 -0
- package/dist/chunks/vi-Cgo3qLR9.js.map +1 -0
- package/dist/chunks/watch-B4Tgzgbn.js +53 -0
- package/dist/chunks/watch-B4Tgzgbn.js.map +1 -0
- package/dist/chunks/whatis-BPKA-MNF.js +17 -0
- package/dist/chunks/whatis-BPKA-MNF.js.map +1 -0
- package/dist/chunks/whoami-BS3xdQEI.js +10 -0
- package/dist/chunks/whoami-BS3xdQEI.js.map +1 -0
- package/dist/chunks/yes-ilM2l2xq.js +18 -0
- package/dist/chunks/yes-ilM2l2xq.js.map +1 -0
- package/dist/main.d.ts +807 -77
- package/dist/main.js +17714 -16034
- package/dist/main.js.map +1 -1
- package/package.json +20 -19
- package/dist/chunks/cat-DH-kPf08.js +0 -44
- package/dist/chunks/cat-DH-kPf08.js.map +0 -1
- package/dist/chunks/clear-DC-frUcf.js +0 -13
- package/dist/chunks/clear-DC-frUcf.js.map +0 -1
- package/dist/chunks/compgen-OhvISbst.js +0 -11
- package/dist/chunks/compgen-OhvISbst.js.map +0 -1
- package/dist/chunks/cowsay-hTKzWScw.js.map +0 -1
- package/dist/chunks/date-D8cnHZuY.js +0 -33
- package/dist/chunks/date-D8cnHZuY.js.map +0 -1
- package/dist/chunks/dir-BmNeEPzy.js +0 -11
- package/dist/chunks/dir-BmNeEPzy.js.map +0 -1
- package/dist/chunks/echo-Gmh-b8f5.js.map +0 -1
- package/dist/chunks/eval-DINS_Vhl.js.map +0 -1
- package/dist/chunks/fortune-DkIZpYa_.js.map +0 -1
- package/dist/chunks/grep-CR3FMStR.js +0 -41
- package/dist/chunks/grep-CR3FMStR.js.map +0 -1
- package/dist/chunks/help-Drx0UDCY.js +0 -19
- package/dist/chunks/help-Drx0UDCY.js.map +0 -1
- package/dist/chunks/history-BEJhnsrb.js +0 -17
- package/dist/chunks/history-BEJhnsrb.js.map +0 -1
- package/dist/chunks/hostname-D8sxyWIy.js +0 -10
- package/dist/chunks/hostname-D8sxyWIy.js.map +0 -1
- package/dist/chunks/lolcat-Dyjbg15t.js.map +0 -1
- package/dist/chunks/ls-DnmR50y0.js.map +0 -1
- package/dist/chunks/man-7W6T7lda.js +0 -60
- package/dist/chunks/man-7W6T7lda.js.map +0 -1
- package/dist/chunks/neofetch--vHMIS9v.js +0 -40
- package/dist/chunks/neofetch--vHMIS9v.js.map +0 -1
- package/dist/chunks/printenv-6OpJKd7g.js +0 -24
- package/dist/chunks/printenv-6OpJKd7g.js.map +0 -1
- package/dist/chunks/pwd-9JYDUbov.js +0 -11
- package/dist/chunks/pwd-9JYDUbov.js.map +0 -1
- package/dist/chunks/reload-CjTJVt5Z.js +0 -10
- package/dist/chunks/reload-CjTJVt5Z.js.map +0 -1
- package/dist/chunks/rev--2pyt1P8.js +0 -12
- package/dist/chunks/rev--2pyt1P8.js.map +0 -1
- package/dist/chunks/sh-B67OTc-j.js +0 -15
- package/dist/chunks/sh-B67OTc-j.js.map +0 -1
- package/dist/chunks/uniq-Dx_4r3B5.js +0 -44
- package/dist/chunks/uniq-Dx_4r3B5.js.map +0 -1
- package/dist/chunks/uptime-DjJ5V7hu.js +0 -10
- package/dist/chunks/uptime-DjJ5V7hu.js.map +0 -1
- package/dist/chunks/watch-BjJ8bCnP.js +0 -52
- package/dist/chunks/watch-BjJ8bCnP.js.map +0 -1
- package/dist/chunks/whatis-CFZWdHZ4.js +0 -17
- package/dist/chunks/whatis-CFZWdHZ4.js.map +0 -1
- package/dist/chunks/whoami-D-es0JvS.js +0 -10
- package/dist/chunks/whoami-D-es0JvS.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<a href="https://os.prozilla.dev/"><img src="https://os.prozilla.dev/assets/logo.svg?v=2" height="200" alt="ProzillaOS" /></a>
|
|
5
5
|
</p>
|
|
6
6
|
<p>
|
|
7
|
-
<a href="https://github.com/prozilla-os/ProzillaOS/blob/main/LICENSE
|
|
8
|
-
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Stars" src="https://img.shields.io/github/stars/
|
|
9
|
-
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Forks" src="https://img.shields.io/github/forks/
|
|
7
|
+
<a href="https://github.com/prozilla-os/ProzillaOS/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/prozilla-os/ProzillaOS?style=flat-square&color=FF4D5B&label=License"></a>
|
|
8
|
+
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Stars" src="https://img.shields.io/github/stars/prozilla-os/ProzillaOS?style=flat-square&color=FED24C&label=%E2%AD%90"></a>
|
|
9
|
+
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Forks" src="https://img.shields.io/github/forks/prozilla-os/ProzillaOS?style=flat-square&color=4D9CFF&label=Forks&logo=github"></a>
|
|
10
10
|
<a href="https://www.npmjs.com/package/prozilla-os"><img alt="NPM Version" src="https://img.shields.io/npm/v/prozilla-os?logo=npm&style=flat-square&label=prozilla-os&color=FF4D5B"></a>
|
|
11
11
|
</p>
|
|
12
12
|
</div>
|
|
@@ -46,126 +46,118 @@ function App() {
|
|
|
46
46
|
|
|
47
47
|
### Configuration
|
|
48
48
|
|
|
49
|
-
```
|
|
49
|
+
```ts
|
|
50
50
|
interface ProzillaOSProps {
|
|
51
|
+
systemName?: string;
|
|
52
|
+
tagLine?: string;
|
|
53
|
+
skin?: Skin;
|
|
54
|
+
config?: {
|
|
55
|
+
apps?: Partial<AppsConfigOptions>;
|
|
56
|
+
desktop?: Partial<DesktopConfigOptions>;
|
|
57
|
+
misc?: Partial<MiscConfigOptions>;
|
|
58
|
+
modals?: Partial<ModalsConfigOptions>;
|
|
59
|
+
taskbar?: Partial<TaskbarConfigOptions>;
|
|
60
|
+
tracking?: Partial<TrackingConfigOptions>;
|
|
61
|
+
windows?: Partial<WindowsConfigOptions>;
|
|
62
|
+
virtualDrive?: Partial<VirtualDriveConfigOptions>;
|
|
63
|
+
};
|
|
64
|
+
children?: ReactNode;
|
|
65
|
+
}
|
|
66
|
+
```
|
|
51
67
|
|
|
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
|
-
loadStyleSheet: () => void | undefined
|
|
81
|
-
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
config: {
|
|
85
|
-
apps: new AppsConfig({
|
|
86
|
-
|
|
87
|
-
apps: App[]
|
|
88
|
-
|
|
89
|
-
}),
|
|
90
|
-
desktop: new DesktopConfig({
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* @default 1
|
|
94
|
-
*/
|
|
95
|
-
defaultIconSize: 0 | 1 | 2,
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* 0: vertical, 1: horizontal
|
|
99
|
-
* @default 0
|
|
100
|
-
* */
|
|
101
|
-
defaultIconDirection: 0 | 1
|
|
102
|
-
|
|
103
|
-
}),
|
|
104
|
-
misc: new MiscConfig({
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* @default 250
|
|
108
|
-
*/
|
|
109
|
-
doubleClickDelay: number
|
|
110
|
-
|
|
111
|
-
})
|
|
112
|
-
modals: new ModalsConfig({
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Default size of a dialog box
|
|
116
|
-
* @default new Vector2(400, 200)
|
|
117
|
-
*/
|
|
118
|
-
defaultDialogSize: Vector2,
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Default size of a file selector
|
|
122
|
-
* @default new Vector2(700, 400)
|
|
123
|
-
*/
|
|
124
|
-
defaultFileSelectorSize: Vector2
|
|
125
|
-
|
|
126
|
-
}),
|
|
127
|
-
taskbar: new TaskbarConfig({
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Height of the taskbar in CSS pixels
|
|
131
|
-
* @default 3 * 16
|
|
132
|
-
*/
|
|
133
|
-
height: number
|
|
68
|
+
```ts
|
|
69
|
+
interface SkinOptions {
|
|
70
|
+
systemIcon: string;
|
|
71
|
+
appIcons?: { [key: string]: string };
|
|
72
|
+
appNames?: { [key: string]: string };
|
|
73
|
+
wallpapers: string[];
|
|
74
|
+
defaultWallpaper: string;
|
|
75
|
+
fileIcons: {
|
|
76
|
+
generic: string;
|
|
77
|
+
info?: string;
|
|
78
|
+
text?: string;
|
|
79
|
+
code?: string;
|
|
80
|
+
external?: string;
|
|
81
|
+
video?: string;
|
|
82
|
+
audio?: string;
|
|
83
|
+
};
|
|
84
|
+
folderIcons: {
|
|
85
|
+
generic: string;
|
|
86
|
+
images?: string;
|
|
87
|
+
text?: string;
|
|
88
|
+
link?: string;
|
|
89
|
+
video?: string;
|
|
90
|
+
audio?: string;
|
|
91
|
+
};
|
|
92
|
+
loadStyleSheet?: () => void;
|
|
93
|
+
defaultTheme?: Theme;
|
|
94
|
+
}
|
|
95
|
+
```
|
|
134
96
|
|
|
135
|
-
|
|
136
|
-
|
|
97
|
+
```ts
|
|
98
|
+
interface AppsConfigOptions {
|
|
99
|
+
apps: App[];
|
|
100
|
+
}
|
|
137
101
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
102
|
+
interface DesktopConfigOptions {
|
|
103
|
+
/** @default 1 */
|
|
104
|
+
defaultIconSize: 0 | 1 | 2;
|
|
105
|
+
/** 0: vertical, 1: horizontal @default 0 */
|
|
106
|
+
defaultIconDirection: 0 | 1;
|
|
107
|
+
}
|
|
143
108
|
|
|
144
|
-
|
|
145
|
-
|
|
109
|
+
interface MiscConfigOptions {
|
|
110
|
+
/** @default 250 */
|
|
111
|
+
doubleClickDelay: number;
|
|
112
|
+
}
|
|
146
113
|
|
|
147
|
-
|
|
148
|
-
|
|
114
|
+
interface ModalsConfigOptions {
|
|
115
|
+
/** Default size of a dialog box @default new Vector2(400, 200) */
|
|
116
|
+
defaultDialogSize: Vector2;
|
|
117
|
+
/** Default size of a file selector @default new Vector2(700, 400) */
|
|
118
|
+
defaultFileSelectorSize: Vector2;
|
|
119
|
+
}
|
|
149
120
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
121
|
+
interface TaskbarConfigOptions {
|
|
122
|
+
/** Height of the taskbar in CSS pixels @default 3 * 16 */
|
|
123
|
+
height: number;
|
|
124
|
+
}
|
|
154
125
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
126
|
+
interface TrackingConfigOptions {
|
|
127
|
+
/** Enable tracking @default true */
|
|
128
|
+
enabled: boolean;
|
|
129
|
+
/** Google Analytics measurement ID */
|
|
130
|
+
GAMeasurementId: string;
|
|
131
|
+
}
|
|
159
132
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
133
|
+
interface WindowsConfigOptions {
|
|
134
|
+
/** @default 32 */
|
|
135
|
+
screenMargin: number;
|
|
136
|
+
/** @default "-" */
|
|
137
|
+
titleSeparator: string;
|
|
138
|
+
/** If the user's screen is smaller than these values, windows will always be maximized @default new Vector2(350, 350) */
|
|
139
|
+
minScreenSize: Vector2;
|
|
140
|
+
}
|
|
168
141
|
|
|
142
|
+
interface VirtualDriveConfigOptions {
|
|
143
|
+
/** Enables persistent storage of the virtual drive. */
|
|
144
|
+
saveData: false | {
|
|
145
|
+
enableCompression: boolean;
|
|
146
|
+
prefix?: string;
|
|
147
|
+
migrations?: [string, string][];
|
|
148
|
+
};
|
|
149
|
+
/** Configure the data that is loaded initially. */
|
|
150
|
+
defaultData: {
|
|
151
|
+
includePicturesFolder?: boolean;
|
|
152
|
+
includeAudioFolder?: boolean;
|
|
153
|
+
includeVideoFolder?: boolean;
|
|
154
|
+
includeDocumentsFolder?: boolean;
|
|
155
|
+
includeDesktopFolder?: boolean;
|
|
156
|
+
includeSourceTree?: boolean;
|
|
157
|
+
includeAppsFolder?: boolean;
|
|
158
|
+
includeScriptsFolder?: boolean;
|
|
159
|
+
loadData?: (virtualRoot: VirtualRoot) => void;
|
|
160
|
+
};
|
|
169
161
|
}
|
|
170
162
|
```
|
|
171
163
|
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { parseOptionalInteger as p, parseOptionalFloat as j, ANSI as c } from "@prozilla-os/shared";
|
|
2
|
+
import { Command as G, Shell as P } from "../main.js";
|
|
3
|
+
const m = " .:-=+*#%@".split(""), M = 256 * 5, X = 60, Y = 25, k = 8, u = 12, S = 1, g = 6, O = 2, H = 60 / 50, L = 1 / 1.5, N = 1200, R = 5, x = 255, K = new G().setManual({
|
|
4
|
+
purpose: "Display burning ASCII art flames",
|
|
5
|
+
usage: "afire [-s <speed>] [-i <float>] [-c <int>] [-d <int>] [-h <int>]",
|
|
6
|
+
options: {
|
|
7
|
+
"-s speed": `Speed of the animation (Defaults to ${H})`,
|
|
8
|
+
"-i float": `Color intensity modifier (defaults to ${L})`,
|
|
9
|
+
"-c int": `Height cooling factor (defaults to ${N})`,
|
|
10
|
+
"-d int": `Heat dissipation rate (defaults to ${R})`,
|
|
11
|
+
"-h int": `Maximum heat source (defaults to ${x})`
|
|
12
|
+
}
|
|
13
|
+
}).addOption({ short: "s", long: "speed", isInput: !0 }).addOption({ short: "i", long: "intensity", isInput: !0 }).addOption({ short: "c", long: "cooling", isInput: !0 }).addOption({ short: "d", long: "dissipation", isInput: !0 }).addOption({ short: "h", long: "heat", isInput: !0 }).setExecute(function(v, { size: l, stdin: y, stdout: D, inputs: d }) {
|
|
14
|
+
const F = 60 / p(d.s, H), E = 1 / j(d.i, L), C = p(d.c, N), w = p(d.d, R), U = p(d.h, x), b = E * X, $ = E * Y, V = E * k;
|
|
15
|
+
let t = l.x, i = l.y, T = i + 4, n = new Uint8Array(t * T);
|
|
16
|
+
const I = new Uint32Array(M), _ = () => {
|
|
17
|
+
const o = Math.max(1, Math.floor(C / i));
|
|
18
|
+
for (let e = 0; e < M; e++)
|
|
19
|
+
e > o ? I[e] = Math.floor((e - o) / w) : I[e] = 0;
|
|
20
|
+
}, W = () => {
|
|
21
|
+
for (let o = 0; o < t * i; o++) {
|
|
22
|
+
const e = I[(n[o + t - 1] || 0) + (n[o + t + 1] || 0) + (n[o + t] || 0) + (n[o + 2 * t - 1] || 0) + (n[o + 2 * t + 1] || 0)] || 0;
|
|
23
|
+
n[o] = e > S ? e - S : 0;
|
|
24
|
+
}
|
|
25
|
+
}, B = () => {
|
|
26
|
+
let o = 1, e = u * t + 1;
|
|
27
|
+
const h = t * i;
|
|
28
|
+
for (let a = 0; a < t; a++, o += u, e -= u) {
|
|
29
|
+
let s = Math.floor(Math.random() * Math.min(o, e, U)), f = Math.floor(Math.random() * g);
|
|
30
|
+
for (; a < t && f !== 0; ) {
|
|
31
|
+
const A = h + a;
|
|
32
|
+
n[A] = s, s += Math.floor(Math.random() * g) - O, A + t < n.length && (n[A + t] = s), s += Math.floor(Math.random() * g) - O, f--, f !== 0 && (a++, o += u, e -= u);
|
|
33
|
+
}
|
|
34
|
+
const r = h + a;
|
|
35
|
+
r + 2 * t < n.length && (n[r + 2 * t] = s), s += Math.floor(Math.random() * g) - O;
|
|
36
|
+
}
|
|
37
|
+
W();
|
|
38
|
+
};
|
|
39
|
+
return _(), P.animate({
|
|
40
|
+
stdin: y,
|
|
41
|
+
stdout: D,
|
|
42
|
+
delay: F,
|
|
43
|
+
useAltBuffer: !0,
|
|
44
|
+
render: () => {
|
|
45
|
+
(t !== l.x || i !== l.y) && (t = l.x, i = l.y, T = i + 4, n = new Uint8Array(t * T), _()), B();
|
|
46
|
+
const o = [];
|
|
47
|
+
for (let e = 0; e < i; e++) {
|
|
48
|
+
for (let h = 0; h < t; h++) {
|
|
49
|
+
const a = n[e * t + h] || 0;
|
|
50
|
+
if (a === 0)
|
|
51
|
+
o.push(" ");
|
|
52
|
+
else {
|
|
53
|
+
const s = Math.floor(a / 63 * m.length), f = m[Math.min(s, m.length - 1)] || " ";
|
|
54
|
+
let r = c.fg.red + c.decoration.dim;
|
|
55
|
+
a > b ? r = c.fg.white : a > $ ? r = c.fg.yellow : a > V && (r = c.fg.red), o.push(r + f + c.reset);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
e < i - 1 && o.push(`
|
|
59
|
+
`);
|
|
60
|
+
}
|
|
61
|
+
return o.join("");
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
K as afire
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=afire-DlRwSfiJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"afire-DlRwSfiJ.js","sources":["../../src/features/shell/commands/afire.ts"],"sourcesContent":["import { ANSI, parseOptionalFloat, parseOptionalInteger } from \"@prozilla-os/shared\";\nimport { Command } from \"../command\";\nimport { Shell } from \"../shell\";\n\nconst FIRE_CHARS = \" .:-=+*#%@\".split(\"\");\nconst MAX_HEAT_LEVELS = 256 * 5;\nconst WHITE_THRESHOLD = 60;\nconst YELLOW_THRESHOLD = 25;\nconst RED_THRESHOLD = 8;\n\nconst CENTER_CONCENTRATION_BIAS = 12;\nconst VERTICAL_HEAT_LOSS = 1;\nconst FLICKER_SPEED = 3;\nconst NOISE_VARIATION_RANGE = 6;\nconst NOISE_VARIATION_OFFSET = 2;\n\nconst ANIMATION_SPEED_DEFAULT = 60 / 50;\nconst INTENSITY_DEFAULT = 1 / 1.5;\nconst COOLING_FACTOR_DEFAULT = 1200;\nconst DISSIPATION_RATE_DEFAULT = 5;\nconst MAX_HEAT_DEFAULT = 255;\n\nexport const afire = new Command()\n\t.setManual({\n\t\tpurpose: \"Display burning ASCII art flames\",\n\t\tusage: \"afire [-s <speed>] [-i <float>] [-c <int>] [-d <int>] [-h <int>]\",\n\t\toptions: {\n\t\t\t\"-s speed\": `Speed of the animation (Defaults to ${ANIMATION_SPEED_DEFAULT})`,\n\t\t\t\"-i float\": `Color intensity modifier (defaults to ${INTENSITY_DEFAULT})`,\n\t\t\t\"-c int\": `Height cooling factor (defaults to ${COOLING_FACTOR_DEFAULT})`,\n\t\t\t\"-d int\": `Heat dissipation rate (defaults to ${DISSIPATION_RATE_DEFAULT})`,\n\t\t\t\"-h int\": `Maximum heat source (defaults to ${MAX_HEAT_DEFAULT})`,\n\t\t},\n\t})\n\t.addOption({ short: \"s\", long: \"speed\", isInput: true })\n\t.addOption({ short: \"i\", long: \"intensity\", isInput: true })\n\t.addOption({ short: \"c\", long: \"cooling\", isInput: true })\n\t.addOption({ short: \"d\", long: \"dissipation\", isInput: true })\n\t.addOption({ short: \"h\", long: \"heat\", isInput: true })\n\t.setExecute(function(this: Command, _args, { size, stdin, stdout, inputs }) {\n\t\tconst animationDelay = 60 / parseOptionalInteger(inputs.s, ANIMATION_SPEED_DEFAULT);\n\t\tconst colorThreshold = 1 / parseOptionalFloat(inputs.i, INTENSITY_DEFAULT);\n\t\tconst coolingFactor = parseOptionalInteger(inputs.c, COOLING_FACTOR_DEFAULT);\n\t\tconst dissipationRate = parseOptionalInteger(inputs.d, DISSIPATION_RATE_DEFAULT);\n\t\tconst maxHeat = parseOptionalInteger(inputs.h, MAX_HEAT_DEFAULT);\n\n\t\tconst whiteThreshold = colorThreshold * WHITE_THRESHOLD;\n\t\tconst yellowThreshold = colorThreshold * YELLOW_THRESHOLD;\n\t\tconst redThreshold = colorThreshold * RED_THRESHOLD;\n\n\t\tlet width = size.x;\n\t\tlet visibleHeight = size.y;\n\t\tlet bufferHeight = visibleHeight + 4;\n\t\t\n\t\tlet bitmap = new Uint8Array(width * bufferHeight);\n\t\tconst heatLookupTable = new Uint32Array(MAX_HEAT_LEVELS);\n\t\tlet flickerTimer = 0;\n\n\t\tconst generateHeatTable = () => {\n\t\t\tconst heightCoolingThreshold = Math.max(1, Math.floor(coolingFactor / visibleHeight));\n\t\t\tfor (let i = 0; i < MAX_HEAT_LEVELS; i++) {\n\t\t\t\tif (i > heightCoolingThreshold) {\n\t\t\t\t\theatLookupTable[i] = Math.floor((i - heightCoolingThreshold) / dissipationRate);\n\t\t\t\t} else {\n\t\t\t\t\theatLookupTable[i] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tconst propagateFire = () => {\n\t\t\tfor (let i = 0; i < width * visibleHeight; i++) {\n\t\t\t\tconst combinedHeat = heatLookupTable[\n\t\t\t\t\t(bitmap[i + width - 1] || 0) + \n\t\t\t\t\t(bitmap[i + width + 1] || 0) + \n\t\t\t\t\t(bitmap[i + width] || 0) + \n\t\t\t\t\t(bitmap[i + 2 * width - 1] || 0) + \n\t\t\t\t\t(bitmap[i + 2 * width + 1] || 0)\n\t\t\t\t] || 0;\n\t\t\t\t\n\t\t\t\tbitmap[i] = combinedHeat > VERTICAL_HEAT_LOSS ? combinedHeat - VERTICAL_HEAT_LOSS : 0;\n\t\t\t}\n\t\t};\n\n\t\tconst injectHeatSource = () => {\n\t\t\tflickerTimer--;\n\t\t\tif (flickerTimer < 0)\n\t\t\t\tflickerTimer = Math.floor(Math.random() * FLICKER_SPEED);\n\n\t\t\tlet leftEdgeWeight = 1;\n\t\t\tlet rightEdgeWeight = CENTER_CONCENTRATION_BIAS * width + 1;\n\t\t\tconst sourceBaseIndex = width * visibleHeight;\n\n\t\t\tfor (let x = 0; x < width; x++, leftEdgeWeight += CENTER_CONCENTRATION_BIAS, rightEdgeWeight -= CENTER_CONCENTRATION_BIAS) {\n\t\t\t\tlet currentHeat = Math.floor(Math.random() * Math.min(leftEdgeWeight, rightEdgeWeight, maxHeat));\n\t\t\t\tlet clusterSize = Math.floor(Math.random() * NOISE_VARIATION_RANGE);\n\n\t\t\t\twhile (x < width && clusterSize !== 0) {\n\t\t\t\t\tconst idx = sourceBaseIndex + x;\n\t\t\t\t\tbitmap[idx] = currentHeat;\n\t\t\t\t\tcurrentHeat += Math.floor(Math.random() * NOISE_VARIATION_RANGE) - NOISE_VARIATION_OFFSET;\n\t\t\t\t\t\n\t\t\t\t\tif (idx + width < bitmap.length) bitmap[idx + width] = currentHeat;\n\t\t\t\t\tcurrentHeat += Math.floor(Math.random() * NOISE_VARIATION_RANGE) - NOISE_VARIATION_OFFSET;\n\t\t\t\t\t\n\t\t\t\t\tclusterSize--;\n\t\t\t\t\tif (clusterSize !== 0) {\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tleftEdgeWeight += CENTER_CONCENTRATION_BIAS;\n\t\t\t\t\t\trightEdgeWeight -= CENTER_CONCENTRATION_BIAS;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconst finalIdx = sourceBaseIndex + x;\n\t\t\t\tif (finalIdx + 2 * width < bitmap.length) bitmap[finalIdx + 2 * width] = currentHeat;\n\t\t\t\tcurrentHeat += Math.floor(Math.random() * NOISE_VARIATION_RANGE) - NOISE_VARIATION_OFFSET;\n\t\t\t}\n\n\t\t\tpropagateFire();\n\t\t};\n\n\t\tgenerateHeatTable();\n\n\t\treturn Shell.animate({\n\t\t\tstdin,\n\t\t\tstdout,\n\t\t\tdelay: animationDelay,\n\t\t\tuseAltBuffer: true,\n\t\t\trender: () => {\n\t\t\t\tif (width !== size.x || visibleHeight !== size.y) {\n\t\t\t\t\twidth = size.x;\n\t\t\t\t\tvisibleHeight = size.y;\n\t\t\t\t\tbufferHeight = visibleHeight + 4;\n\t\t\t\t\tbitmap = new Uint8Array(width * bufferHeight);\n\t\t\t\t\tgenerateHeatTable();\n\t\t\t\t}\n\n\t\t\t\tinjectHeatSource();\n\n\t\t\t\tconst output = [];\n\t\t\t\tfor (let y = 0; y < visibleHeight; y++) {\n\t\t\t\t\tfor (let x = 0; x < width; x++) {\n\t\t\t\t\t\tconst heat = bitmap[y * width + x] || 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (heat === 0) {\n\t\t\t\t\t\t\toutput.push(\" \");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst charIndex = Math.floor(heat / 63 * FIRE_CHARS.length);\n\t\t\t\t\t\t\tconst char = FIRE_CHARS[Math.min(charIndex, FIRE_CHARS.length - 1)] || \" \";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlet color = ANSI.fg.red + ANSI.decoration.dim;\n\t\t\t\t\t\t\tif (heat > whiteThreshold) {\n\t\t\t\t\t\t\t\tcolor = ANSI.fg.white;\n\t\t\t\t\t\t\t} else if (heat > yellowThreshold) {\n\t\t\t\t\t\t\t\tcolor = ANSI.fg.yellow;\n\t\t\t\t\t\t\t} else if (heat > redThreshold) {\n\t\t\t\t\t\t\t\tcolor = ANSI.fg.red;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\toutput.push(color + char + ANSI.reset);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (y < visibleHeight - 1)\n\t\t\t\t\t\toutput.push(\"\\n\");\n\t\t\t\t}\n\t\t\t\treturn output.join(\"\");\n\t\t\t},\n\t\t});\n\t});"],"names":["FIRE_CHARS","MAX_HEAT_LEVELS","WHITE_THRESHOLD","YELLOW_THRESHOLD","RED_THRESHOLD","CENTER_CONCENTRATION_BIAS","VERTICAL_HEAT_LOSS","NOISE_VARIATION_RANGE","NOISE_VARIATION_OFFSET","ANIMATION_SPEED_DEFAULT","INTENSITY_DEFAULT","COOLING_FACTOR_DEFAULT","DISSIPATION_RATE_DEFAULT","MAX_HEAT_DEFAULT","afire","Command","_args","size","stdin","stdout","inputs","animationDelay","parseOptionalInteger","colorThreshold","parseOptionalFloat","coolingFactor","dissipationRate","maxHeat","whiteThreshold","yellowThreshold","redThreshold","width","visibleHeight","bufferHeight","bitmap","heatLookupTable","generateHeatTable","heightCoolingThreshold","i","propagateFire","combinedHeat","injectHeatSource","leftEdgeWeight","rightEdgeWeight","sourceBaseIndex","x","currentHeat","clusterSize","idx","finalIdx","Shell","output","y","heat","charIndex","char","color","ANSI"],"mappings":";;AAIA,MAAMA,IAAa,aAAa,MAAM,EAAE,GAClCC,IAAkB,MAAM,GACxBC,IAAkB,IAClBC,IAAmB,IACnBC,IAAgB,GAEhBC,IAA4B,IAC5BC,IAAqB,GAErBC,IAAwB,GACxBC,IAAyB,GAEzBC,IAA0B,KAAK,IAC/BC,IAAoB,IAAI,KACxBC,IAAyB,MACzBC,IAA2B,GAC3BC,IA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A,UACtC;AAAA,QACD;AACA,QAAIL,IAAIpB,IAAgB,KACvBmB,EAAO,KAAK;AAAA,CAAI;AAAA,MAClB;AACA,aAAOA,EAAO,KAAK,EAAE;AAAA,IACtB;AAAA,EAAA,CACA;AACF,CAAC;"}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import { Command as p, EXIT_CODE as s, Shell as u } from "../main.js";
|
|
2
|
+
const o = {
|
|
3
|
+
A: [
|
|
4
|
+
" ### ",
|
|
5
|
+
"# #",
|
|
6
|
+
"#####",
|
|
7
|
+
"# #",
|
|
8
|
+
"# #"
|
|
9
|
+
],
|
|
10
|
+
B: [
|
|
11
|
+
"#### ",
|
|
12
|
+
"# #",
|
|
13
|
+
"#### ",
|
|
14
|
+
"# #",
|
|
15
|
+
"#### "
|
|
16
|
+
],
|
|
17
|
+
C: [
|
|
18
|
+
" ####",
|
|
19
|
+
"# ",
|
|
20
|
+
"# ",
|
|
21
|
+
"# ",
|
|
22
|
+
" ####"
|
|
23
|
+
],
|
|
24
|
+
D: [
|
|
25
|
+
"#### ",
|
|
26
|
+
"# #",
|
|
27
|
+
"# #",
|
|
28
|
+
"# #",
|
|
29
|
+
"#### "
|
|
30
|
+
],
|
|
31
|
+
E: [
|
|
32
|
+
"#####",
|
|
33
|
+
"# ",
|
|
34
|
+
"#### ",
|
|
35
|
+
"# ",
|
|
36
|
+
"#####"
|
|
37
|
+
],
|
|
38
|
+
F: [
|
|
39
|
+
"#####",
|
|
40
|
+
"# ",
|
|
41
|
+
"#### ",
|
|
42
|
+
"# ",
|
|
43
|
+
"# "
|
|
44
|
+
],
|
|
45
|
+
G: [
|
|
46
|
+
" ####",
|
|
47
|
+
"# ",
|
|
48
|
+
"# ##",
|
|
49
|
+
"# #",
|
|
50
|
+
" ####"
|
|
51
|
+
],
|
|
52
|
+
H: [
|
|
53
|
+
"# #",
|
|
54
|
+
"# #",
|
|
55
|
+
"#####",
|
|
56
|
+
"# #",
|
|
57
|
+
"# #"
|
|
58
|
+
],
|
|
59
|
+
I: [
|
|
60
|
+
"#####",
|
|
61
|
+
" # ",
|
|
62
|
+
" # ",
|
|
63
|
+
" # ",
|
|
64
|
+
"#####"
|
|
65
|
+
],
|
|
66
|
+
J: [
|
|
67
|
+
" ####",
|
|
68
|
+
" #",
|
|
69
|
+
" #",
|
|
70
|
+
"# #",
|
|
71
|
+
" ### "
|
|
72
|
+
],
|
|
73
|
+
K: [
|
|
74
|
+
"# #",
|
|
75
|
+
"# # ",
|
|
76
|
+
"### ",
|
|
77
|
+
"# # ",
|
|
78
|
+
"# #"
|
|
79
|
+
],
|
|
80
|
+
L: [
|
|
81
|
+
"# ",
|
|
82
|
+
"# ",
|
|
83
|
+
"# ",
|
|
84
|
+
"# ",
|
|
85
|
+
"#####"
|
|
86
|
+
],
|
|
87
|
+
M: [
|
|
88
|
+
"# #",
|
|
89
|
+
"## ##",
|
|
90
|
+
"# # #",
|
|
91
|
+
"# #",
|
|
92
|
+
"# #"
|
|
93
|
+
],
|
|
94
|
+
N: [
|
|
95
|
+
"# #",
|
|
96
|
+
"## #",
|
|
97
|
+
"# # #",
|
|
98
|
+
"# ##",
|
|
99
|
+
"# #"
|
|
100
|
+
],
|
|
101
|
+
O: [
|
|
102
|
+
" ### ",
|
|
103
|
+
"# #",
|
|
104
|
+
"# #",
|
|
105
|
+
"# #",
|
|
106
|
+
" ### "
|
|
107
|
+
],
|
|
108
|
+
P: [
|
|
109
|
+
"#### ",
|
|
110
|
+
"# #",
|
|
111
|
+
"#### ",
|
|
112
|
+
"# ",
|
|
113
|
+
"# "
|
|
114
|
+
],
|
|
115
|
+
Q: [
|
|
116
|
+
" ### ",
|
|
117
|
+
"# #",
|
|
118
|
+
"# #",
|
|
119
|
+
"# ##",
|
|
120
|
+
" ####"
|
|
121
|
+
],
|
|
122
|
+
R: [
|
|
123
|
+
"#### ",
|
|
124
|
+
"# #",
|
|
125
|
+
"#### ",
|
|
126
|
+
"# # ",
|
|
127
|
+
"# #"
|
|
128
|
+
],
|
|
129
|
+
S: [
|
|
130
|
+
" ####",
|
|
131
|
+
"# ",
|
|
132
|
+
" ### ",
|
|
133
|
+
" #",
|
|
134
|
+
"#### "
|
|
135
|
+
],
|
|
136
|
+
T: [
|
|
137
|
+
"#####",
|
|
138
|
+
" # ",
|
|
139
|
+
" # ",
|
|
140
|
+
" # ",
|
|
141
|
+
" # "
|
|
142
|
+
],
|
|
143
|
+
U: [
|
|
144
|
+
"# #",
|
|
145
|
+
"# #",
|
|
146
|
+
"# #",
|
|
147
|
+
"# #",
|
|
148
|
+
" ### "
|
|
149
|
+
],
|
|
150
|
+
V: [
|
|
151
|
+
"# #",
|
|
152
|
+
"# #",
|
|
153
|
+
"# #",
|
|
154
|
+
" # # ",
|
|
155
|
+
" # "
|
|
156
|
+
],
|
|
157
|
+
W: [
|
|
158
|
+
"# #",
|
|
159
|
+
"# #",
|
|
160
|
+
"# # #",
|
|
161
|
+
"## ##",
|
|
162
|
+
"# #"
|
|
163
|
+
],
|
|
164
|
+
X: [
|
|
165
|
+
"# #",
|
|
166
|
+
" # # ",
|
|
167
|
+
" # ",
|
|
168
|
+
" # # ",
|
|
169
|
+
"# #"
|
|
170
|
+
],
|
|
171
|
+
Y: [
|
|
172
|
+
"# #",
|
|
173
|
+
" # # ",
|
|
174
|
+
" # ",
|
|
175
|
+
" # ",
|
|
176
|
+
" # "
|
|
177
|
+
],
|
|
178
|
+
Z: [
|
|
179
|
+
"#####",
|
|
180
|
+
" # ",
|
|
181
|
+
" # ",
|
|
182
|
+
" # ",
|
|
183
|
+
"#####"
|
|
184
|
+
],
|
|
185
|
+
0: [
|
|
186
|
+
" ### ",
|
|
187
|
+
"# ##",
|
|
188
|
+
"# # #",
|
|
189
|
+
"## #",
|
|
190
|
+
" ### "
|
|
191
|
+
],
|
|
192
|
+
1: [
|
|
193
|
+
" # ",
|
|
194
|
+
" ## ",
|
|
195
|
+
" # ",
|
|
196
|
+
" # ",
|
|
197
|
+
" ### "
|
|
198
|
+
],
|
|
199
|
+
2: [
|
|
200
|
+
" ### ",
|
|
201
|
+
"# #",
|
|
202
|
+
" ## ",
|
|
203
|
+
" # ",
|
|
204
|
+
"#####"
|
|
205
|
+
],
|
|
206
|
+
3: [
|
|
207
|
+
"#### ",
|
|
208
|
+
" #",
|
|
209
|
+
" ## ",
|
|
210
|
+
" #",
|
|
211
|
+
"#### "
|
|
212
|
+
],
|
|
213
|
+
4: [
|
|
214
|
+
" # ",
|
|
215
|
+
" ## ",
|
|
216
|
+
" # # ",
|
|
217
|
+
"#####",
|
|
218
|
+
" # "
|
|
219
|
+
],
|
|
220
|
+
5: [
|
|
221
|
+
"#####",
|
|
222
|
+
"# ",
|
|
223
|
+
"#### ",
|
|
224
|
+
" #",
|
|
225
|
+
"#### "
|
|
226
|
+
],
|
|
227
|
+
6: [
|
|
228
|
+
" ####",
|
|
229
|
+
"# ",
|
|
230
|
+
"#### ",
|
|
231
|
+
"# #",
|
|
232
|
+
" ####"
|
|
233
|
+
],
|
|
234
|
+
7: [
|
|
235
|
+
"#####",
|
|
236
|
+
" #",
|
|
237
|
+
" # ",
|
|
238
|
+
" # ",
|
|
239
|
+
" # "
|
|
240
|
+
],
|
|
241
|
+
8: [
|
|
242
|
+
" ### ",
|
|
243
|
+
"# #",
|
|
244
|
+
" ### ",
|
|
245
|
+
"# #",
|
|
246
|
+
" ### "
|
|
247
|
+
],
|
|
248
|
+
9: [
|
|
249
|
+
" ####",
|
|
250
|
+
"# #",
|
|
251
|
+
" ####",
|
|
252
|
+
" #",
|
|
253
|
+
"#### "
|
|
254
|
+
],
|
|
255
|
+
" ": [
|
|
256
|
+
" ",
|
|
257
|
+
" ",
|
|
258
|
+
" ",
|
|
259
|
+
" ",
|
|
260
|
+
" "
|
|
261
|
+
],
|
|
262
|
+
"!": [
|
|
263
|
+
" # ",
|
|
264
|
+
" # ",
|
|
265
|
+
" # ",
|
|
266
|
+
" ",
|
|
267
|
+
" # "
|
|
268
|
+
],
|
|
269
|
+
"?": [
|
|
270
|
+
" ### ",
|
|
271
|
+
" #",
|
|
272
|
+
" ## ",
|
|
273
|
+
" ",
|
|
274
|
+
" # "
|
|
275
|
+
],
|
|
276
|
+
"-": [
|
|
277
|
+
" ",
|
|
278
|
+
" ",
|
|
279
|
+
"#####",
|
|
280
|
+
" ",
|
|
281
|
+
" "
|
|
282
|
+
],
|
|
283
|
+
".": [
|
|
284
|
+
" ",
|
|
285
|
+
" ",
|
|
286
|
+
" ",
|
|
287
|
+
" ",
|
|
288
|
+
" # "
|
|
289
|
+
],
|
|
290
|
+
"(": [
|
|
291
|
+
" # ",
|
|
292
|
+
" # ",
|
|
293
|
+
" # ",
|
|
294
|
+
" # ",
|
|
295
|
+
" # "
|
|
296
|
+
],
|
|
297
|
+
")": [
|
|
298
|
+
" # ",
|
|
299
|
+
" # ",
|
|
300
|
+
" # ",
|
|
301
|
+
" # ",
|
|
302
|
+
" # "
|
|
303
|
+
],
|
|
304
|
+
"{": [
|
|
305
|
+
" # ",
|
|
306
|
+
" # ",
|
|
307
|
+
"## ",
|
|
308
|
+
" # ",
|
|
309
|
+
" # "
|
|
310
|
+
],
|
|
311
|
+
"}": [
|
|
312
|
+
" # ",
|
|
313
|
+
" # ",
|
|
314
|
+
" ##",
|
|
315
|
+
" # ",
|
|
316
|
+
" # "
|
|
317
|
+
],
|
|
318
|
+
"[": [
|
|
319
|
+
" ## ",
|
|
320
|
+
" # ",
|
|
321
|
+
" # ",
|
|
322
|
+
" # ",
|
|
323
|
+
" ## "
|
|
324
|
+
],
|
|
325
|
+
"]": [
|
|
326
|
+
" ## ",
|
|
327
|
+
" # ",
|
|
328
|
+
" # ",
|
|
329
|
+
" # ",
|
|
330
|
+
" ## "
|
|
331
|
+
]
|
|
332
|
+
}, f = new p().setManual({
|
|
333
|
+
purpose: "Display a message in large letters",
|
|
334
|
+
usage: "banner [STRING]...",
|
|
335
|
+
description: "Prints the ASCII art representation of the provided text."
|
|
336
|
+
}).setExecute(async function(t, { stdout: r }) {
|
|
337
|
+
if (!t.length)
|
|
338
|
+
return s.success;
|
|
339
|
+
const a = t.join(" ").toUpperCase(), n = ["", "", "", "", ""];
|
|
340
|
+
for (const i of a) {
|
|
341
|
+
const c = o[i] ?? o["?"];
|
|
342
|
+
for (let e = 0; e < 5; e++)
|
|
343
|
+
n[e] += c[e] + " ";
|
|
344
|
+
}
|
|
345
|
+
return await u.printLn(r, n.join(`
|
|
346
|
+
`)), s.success;
|
|
347
|
+
});
|
|
348
|
+
export {
|
|
349
|
+
f as banner
|
|
350
|
+
};
|
|
351
|
+
//# sourceMappingURL=banner-jSvYkuqB.js.map
|