@shell-shock/preset-script 0.1.1 → 0.2.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.
Files changed (134) hide show
  1. package/README.md +1 -1
  2. package/dist/components/args-parser-logic.cjs +678 -0
  3. package/dist/components/args-parser-logic.cjs.map +1 -0
  4. package/dist/components/args-parser-logic.d.cts +45 -0
  5. package/dist/components/args-parser-logic.d.cts.map +1 -0
  6. package/dist/components/args-parser-logic.d.mts +45 -0
  7. package/dist/components/args-parser-logic.d.mts.map +1 -0
  8. package/dist/components/args-parser-logic.mjs +672 -0
  9. package/dist/components/args-parser-logic.mjs.map +1 -0
  10. package/dist/components/bin-entry.cjs +188 -0
  11. package/dist/components/bin-entry.cjs.map +1 -0
  12. package/dist/components/{entry/bin.d.cts → bin-entry.d.cts} +9 -3
  13. package/dist/components/bin-entry.d.cts.map +1 -0
  14. package/dist/components/{entry/bin.d.mts → bin-entry.d.mts} +9 -3
  15. package/dist/components/bin-entry.d.mts.map +1 -0
  16. package/dist/components/bin-entry.mjs +185 -0
  17. package/dist/components/bin-entry.mjs.map +1 -0
  18. package/dist/components/command-entry.cjs +162 -0
  19. package/dist/components/command-entry.cjs.map +1 -0
  20. package/dist/components/command-entry.d.cts +24 -0
  21. package/dist/components/command-entry.d.cts.map +1 -0
  22. package/dist/components/command-entry.d.mts +24 -0
  23. package/dist/components/command-entry.d.mts.map +1 -0
  24. package/dist/components/command-entry.mjs +158 -0
  25. package/dist/components/command-entry.mjs.map +1 -0
  26. package/dist/components/command-router.cjs +129 -74
  27. package/dist/components/command-router.cjs.map +1 -1
  28. package/dist/components/command-router.d.cts +13 -4
  29. package/dist/components/command-router.d.cts.map +1 -0
  30. package/dist/components/command-router.d.mts +13 -4
  31. package/dist/components/command-router.d.mts.map +1 -0
  32. package/dist/components/command-router.mjs +128 -73
  33. package/dist/components/command-router.mjs.map +1 -1
  34. package/dist/components/console-builtin.cjs +2086 -0
  35. package/dist/components/console-builtin.cjs.map +1 -0
  36. package/dist/components/console-builtin.d.cts +56 -0
  37. package/dist/components/console-builtin.d.cts.map +1 -0
  38. package/dist/components/console-builtin.d.mts +56 -0
  39. package/dist/components/console-builtin.d.mts.map +1 -0
  40. package/dist/components/console-builtin.mjs +2077 -0
  41. package/dist/components/console-builtin.mjs.map +1 -0
  42. package/dist/components/help.cjs +130 -0
  43. package/dist/components/help.cjs.map +1 -0
  44. package/dist/components/help.d.cts +57 -0
  45. package/dist/components/help.d.cts.map +1 -0
  46. package/dist/components/help.d.mts +57 -0
  47. package/dist/components/help.d.mts.map +1 -0
  48. package/dist/components/help.mjs +126 -0
  49. package/dist/components/help.mjs.map +1 -0
  50. package/dist/components/index.cjs +39 -15
  51. package/dist/components/index.d.cts +9 -7
  52. package/dist/components/index.d.mts +9 -7
  53. package/dist/components/index.mjs +8 -6
  54. package/dist/components/utils-builtin.cjs +612 -0
  55. package/dist/components/utils-builtin.cjs.map +1 -0
  56. package/dist/components/utils-builtin.d.cts +32 -0
  57. package/dist/components/utils-builtin.d.cts.map +1 -0
  58. package/dist/components/utils-builtin.d.mts +32 -0
  59. package/dist/components/utils-builtin.d.mts.map +1 -0
  60. package/dist/components/utils-builtin.mjs +605 -0
  61. package/dist/components/utils-builtin.mjs.map +1 -0
  62. package/dist/components/virtual-command-entry.cjs +140 -0
  63. package/dist/components/virtual-command-entry.cjs.map +1 -0
  64. package/dist/components/virtual-command-entry.d.cts +21 -0
  65. package/dist/components/virtual-command-entry.d.cts.map +1 -0
  66. package/dist/components/virtual-command-entry.d.mts +21 -0
  67. package/dist/components/virtual-command-entry.d.mts.map +1 -0
  68. package/dist/components/virtual-command-entry.mjs +137 -0
  69. package/dist/components/virtual-command-entry.mjs.map +1 -0
  70. package/dist/contexts/index.cjs +4 -0
  71. package/dist/contexts/index.d.cts +2 -0
  72. package/dist/contexts/index.d.mts +2 -0
  73. package/dist/contexts/index.mjs +3 -0
  74. package/dist/contexts/theme.d.cts +20 -0
  75. package/dist/contexts/theme.d.cts.map +1 -0
  76. package/dist/contexts/theme.d.mts +20 -0
  77. package/dist/contexts/theme.d.mts.map +1 -0
  78. package/dist/helpers/ansi-utils.cjs +28 -4
  79. package/dist/helpers/ansi-utils.cjs.map +1 -1
  80. package/dist/helpers/ansi-utils.d.cts +68 -0
  81. package/dist/helpers/ansi-utils.d.cts.map +1 -0
  82. package/dist/helpers/ansi-utils.d.mts +68 -0
  83. package/dist/helpers/ansi-utils.d.mts.map +1 -0
  84. package/dist/helpers/ansi-utils.mjs +28 -4
  85. package/dist/helpers/ansi-utils.mjs.map +1 -1
  86. package/dist/helpers/get-default-options.cjs +6 -13
  87. package/dist/helpers/get-default-options.cjs.map +1 -1
  88. package/dist/helpers/get-default-options.mjs +6 -13
  89. package/dist/helpers/get-default-options.mjs.map +1 -1
  90. package/dist/index.cjs +117 -29
  91. package/dist/index.cjs.map +1 -1
  92. package/dist/index.d.cts.map +1 -0
  93. package/dist/index.d.mts.map +1 -0
  94. package/dist/index.mjs +118 -28
  95. package/dist/index.mjs.map +1 -1
  96. package/dist/types/plugin.d.cts +1 -6
  97. package/dist/types/plugin.d.cts.map +1 -0
  98. package/dist/types/plugin.d.mts +1 -6
  99. package/dist/types/plugin.d.mts.map +1 -0
  100. package/package.json +163 -71
  101. package/dist/components/builtin/console.cjs +0 -1232
  102. package/dist/components/builtin/console.cjs.map +0 -1
  103. package/dist/components/builtin/console.d.cts +0 -37
  104. package/dist/components/builtin/console.d.mts +0 -37
  105. package/dist/components/builtin/console.mjs +0 -1225
  106. package/dist/components/builtin/console.mjs.map +0 -1
  107. package/dist/components/builtin/index.cjs +0 -9
  108. package/dist/components/builtin/index.d.cts +0 -2
  109. package/dist/components/builtin/index.d.mts +0 -2
  110. package/dist/components/builtin/index.mjs +0 -3
  111. package/dist/components/entry/bin.cjs +0 -92
  112. package/dist/components/entry/bin.cjs.map +0 -1
  113. package/dist/components/entry/bin.mjs +0 -91
  114. package/dist/components/entry/bin.mjs.map +0 -1
  115. package/dist/components/entry/command.cjs +0 -54
  116. package/dist/components/entry/command.cjs.map +0 -1
  117. package/dist/components/entry/command.d.cts +0 -15
  118. package/dist/components/entry/command.d.mts +0 -15
  119. package/dist/components/entry/command.mjs +0 -53
  120. package/dist/components/entry/command.mjs.map +0 -1
  121. package/dist/components/entry/index.cjs +0 -3
  122. package/dist/components/entry/index.d.cts +0 -2
  123. package/dist/components/entry/index.d.mts +0 -2
  124. package/dist/components/entry/index.mjs +0 -3
  125. package/dist/components/shutdown.cjs +0 -93
  126. package/dist/components/shutdown.cjs.map +0 -1
  127. package/dist/components/shutdown.d.cts +0 -14
  128. package/dist/components/shutdown.d.mts +0 -14
  129. package/dist/components/shutdown.mjs +0 -91
  130. package/dist/components/shutdown.mjs.map +0 -1
  131. package/dist/contexts/command.cjs +0 -21
  132. package/dist/contexts/command.cjs.map +0 -1
  133. package/dist/contexts/command.mjs +0 -19
  134. package/dist/contexts/command.mjs.map +0 -1
@@ -1,1225 +0,0 @@
1
- import { useColors, useTheme } from "../../contexts/theme.mjs";
2
- import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
3
- import { For, Show, code } from "@alloy-js/core";
4
- import { FunctionDeclaration, IfStatement, InterfaceDeclaration, InterfaceMember, TypeDeclaration, VarDeclaration } from "@alloy-js/typescript";
5
- import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
6
- import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
7
- import { TSDoc, TSDocDefaultValue, TSDocExample, TSDocParam, TSDocRemarks, TSDocReturns } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
8
-
9
- //#region src/components/builtin/console.tsx
10
- /**
11
- * A component to generate a console message function in a Shell Shock project.
12
- */
13
- function ColorFunction({ ansi16, ansi256, ansi16m }) {
14
- return code` (text: string) => {
15
- try {
16
- if (!isColorSupported) {
17
- return String(text);
18
- }
19
-
20
- if (colorSupportLevels.stdout === 1) {
21
- return wrapAnsi(text, "${ansi16.open}", "${ansi16.close}");
22
- } else if (colorSupportLevels.stdout === 2) {
23
- return wrapAnsi(text, "${ansi256.open}", "${ansi256.close}");
24
- }
25
-
26
- return wrapAnsi(text, "${ansi16m.open}", "${ansi16m.close}");
27
- } catch {
28
- return String(text);
29
- }
30
- }
31
- `;
32
- }
33
- /**
34
- * A component to generate an object containing functions for coloring text in a Shell Shock project.
35
- */
36
- function ColorsDeclaration() {
37
- const colors = useColors();
38
- return [
39
- createComponent(TypeDeclaration, {
40
- "export": true,
41
- name: "AnsiColor",
42
- get children() {
43
- return createComponent(For, {
44
- get each() {
45
- return Object.keys(colors.ansi16).filter((color) => color !== "theme");
46
- },
47
- children: (color, idx) => `${idx > 0 ? " | " : ""}"${color}"`
48
- });
49
- }
50
- }),
51
- code`export type ThemeColors<T> = T extends object ? { [K in keyof T]: ThemeColor<T[K]>; } : ((text: string) => string); `,
52
- createComponent(TypeDeclaration, {
53
- "export": true,
54
- name: "Colors",
55
- children: code`Record<AnsiColor, (text: string) => string> & ThemeColors<ThemeColorsConfig>`
56
- }),
57
- createComponent(TSDoc, { heading: "An object containing functions for coloring console applications. Each function corresponds to a terminal color. See {@link Colors} for available colors." }),
58
- createComponent(VarDeclaration, {
59
- "const": true,
60
- "export": true,
61
- name: "colors",
62
- type: "Colors",
63
- get initializer() {
64
- return [
65
- code` {
66
- `,
67
- createIntrinsic("hbr", {}),
68
- createComponent(For, {
69
- get each() {
70
- return Object.keys(colors.ansi16).filter((color) => color !== "theme");
71
- },
72
- comma: true,
73
- doubleHardline: true,
74
- enderPunctuation: true,
75
- children: (color) => [code`${color}: `, createComponent(ColorFunction, {
76
- get ansi16() {
77
- return colors.ansi16[color];
78
- },
79
- get ansi256() {
80
- return colors.ansi256[color];
81
- },
82
- get ansi16m() {
83
- return colors.ansi16m[color];
84
- }
85
- })]
86
- }),
87
- createIntrinsic("hbr", {}),
88
- code`theme: {
89
- text: {
90
- banner: {
91
- title: ${createComponent(ColorFunction, {
92
- get ansi16() {
93
- return colors.ansi16.theme.text.banner.title;
94
- },
95
- get ansi256() {
96
- return colors.ansi256.theme.text.banner.title;
97
- },
98
- get ansi16m() {
99
- return colors.ansi16m.theme.text.banner.title;
100
- }
101
- })},
102
- header: ${createComponent(ColorFunction, {
103
- get ansi16() {
104
- return colors.ansi16.theme.text.banner.header;
105
- },
106
- get ansi256() {
107
- return colors.ansi256.theme.text.banner.header;
108
- },
109
- get ansi16m() {
110
- return colors.ansi16m.theme.text.banner.header;
111
- }
112
- })},
113
- footer: ${createComponent(ColorFunction, {
114
- get ansi16() {
115
- return colors.ansi16.theme.text.banner.footer;
116
- },
117
- get ansi256() {
118
- return colors.ansi256.theme.text.banner.footer;
119
- },
120
- get ansi16m() {
121
- return colors.ansi16m.theme.text.banner.footer;
122
- }
123
- })},
124
- command: ${createComponent(ColorFunction, {
125
- get ansi16() {
126
- return colors.ansi16.theme.text.banner.command;
127
- },
128
- get ansi256() {
129
- return colors.ansi256.theme.text.banner.command;
130
- },
131
- get ansi16m() {
132
- return colors.ansi16m.theme.text.banner.command;
133
- }
134
- })},
135
- description: ${createComponent(ColorFunction, {
136
- get ansi16() {
137
- return colors.ansi16.theme.text.banner.description;
138
- },
139
- get ansi256() {
140
- return colors.ansi256.theme.text.banner.description;
141
- },
142
- get ansi16m() {
143
- return colors.ansi16m.theme.text.banner.description;
144
- }
145
- })}
146
- },
147
- heading: {
148
- primary: ${createComponent(ColorFunction, {
149
- get ansi16() {
150
- return colors.ansi16.theme.text.heading.primary;
151
- },
152
- get ansi256() {
153
- return colors.ansi256.theme.text.heading.primary;
154
- },
155
- get ansi16m() {
156
- return colors.ansi16m.theme.text.heading.primary;
157
- }
158
- })},
159
- secondary: ${createComponent(ColorFunction, {
160
- get ansi16() {
161
- return colors.ansi16.theme.text.heading.secondary;
162
- },
163
- get ansi256() {
164
- return colors.ansi256.theme.text.heading.secondary;
165
- },
166
- get ansi16m() {
167
- return colors.ansi16m.theme.text.heading.secondary;
168
- }
169
- })},
170
- tertiary: ${createComponent(ColorFunction, {
171
- get ansi16() {
172
- return colors.ansi16.theme.text.heading.tertiary;
173
- },
174
- get ansi256() {
175
- return colors.ansi256.theme.text.heading.tertiary;
176
- },
177
- get ansi16m() {
178
- return colors.ansi16m.theme.text.heading.tertiary;
179
- }
180
- })}
181
- },
182
- body: {
183
- primary: ${createComponent(ColorFunction, {
184
- get ansi16() {
185
- return colors.ansi16.theme.text.body.primary;
186
- },
187
- get ansi256() {
188
- return colors.ansi256.theme.text.body.primary;
189
- },
190
- get ansi16m() {
191
- return colors.ansi16m.theme.text.body.primary;
192
- }
193
- })},
194
- secondary: ${createComponent(ColorFunction, {
195
- get ansi16() {
196
- return colors.ansi16.theme.text.body.secondary;
197
- },
198
- get ansi256() {
199
- return colors.ansi256.theme.text.body.secondary;
200
- },
201
- get ansi16m() {
202
- return colors.ansi16m.theme.text.body.secondary;
203
- }
204
- })},
205
- tertiary: ${createComponent(ColorFunction, {
206
- get ansi16() {
207
- return colors.ansi16.theme.text.body.tertiary;
208
- },
209
- get ansi256() {
210
- return colors.ansi256.theme.text.body.tertiary;
211
- },
212
- get ansi16m() {
213
- return colors.ansi16m.theme.text.body.tertiary;
214
- }
215
- })},
216
- link: ${createComponent(ColorFunction, {
217
- get ansi16() {
218
- return colors.ansi16.theme.text.body.link;
219
- },
220
- get ansi256() {
221
- return colors.ansi256.theme.text.body.link;
222
- },
223
- get ansi16m() {
224
- return colors.ansi16m.theme.text.body.link;
225
- }
226
- })}
227
- },
228
- message: {
229
- link: {
230
- help: ${createComponent(ColorFunction, {
231
- get ansi16() {
232
- return colors.ansi16.theme.text.message.link.help;
233
- },
234
- get ansi256() {
235
- return colors.ansi256.theme.text.message.link.help;
236
- },
237
- get ansi16m() {
238
- return colors.ansi16m.theme.text.message.link.help;
239
- }
240
- })},
241
- success: ${createComponent(ColorFunction, {
242
- get ansi16() {
243
- return colors.ansi16.theme.text.message.link.success;
244
- },
245
- get ansi256() {
246
- return colors.ansi256.theme.text.message.link.success;
247
- },
248
- get ansi16m() {
249
- return colors.ansi16m.theme.text.message.link.success;
250
- }
251
- })},
252
- info: ${createComponent(ColorFunction, {
253
- get ansi16() {
254
- return colors.ansi16.theme.text.message.link.info;
255
- },
256
- get ansi256() {
257
- return colors.ansi256.theme.text.message.link.info;
258
- },
259
- get ansi16m() {
260
- return colors.ansi16m.theme.text.message.link.info;
261
- }
262
- })},
263
- warning: ${createComponent(ColorFunction, {
264
- get ansi16() {
265
- return colors.ansi16.theme.text.message.link.warning;
266
- },
267
- get ansi256() {
268
- return colors.ansi256.theme.text.message.link.warning;
269
- },
270
- get ansi16m() {
271
- return colors.ansi16m.theme.text.message.link.warning;
272
- }
273
- })},
274
- danger: ${createComponent(ColorFunction, {
275
- get ansi16() {
276
- return colors.ansi16.theme.text.message.link.danger;
277
- },
278
- get ansi256() {
279
- return colors.ansi256.theme.text.message.link.danger;
280
- },
281
- get ansi16m() {
282
- return colors.ansi16m.theme.text.message.link.danger;
283
- }
284
- })},
285
- error: ${createComponent(ColorFunction, {
286
- get ansi16() {
287
- return colors.ansi16.theme.text.message.link.error;
288
- },
289
- get ansi256() {
290
- return colors.ansi256.theme.text.message.link.error;
291
- },
292
- get ansi16m() {
293
- return colors.ansi16m.theme.text.message.link.error;
294
- }
295
- })}
296
- },
297
- header: {
298
- help: ${createComponent(ColorFunction, {
299
- get ansi16() {
300
- return colors.ansi16.theme.text.message.header.help;
301
- },
302
- get ansi256() {
303
- return colors.ansi256.theme.text.message.header.help;
304
- },
305
- get ansi16m() {
306
- return colors.ansi16m.theme.text.message.header.help;
307
- }
308
- })},
309
- success: ${createComponent(ColorFunction, {
310
- get ansi16() {
311
- return colors.ansi16.theme.text.message.header.success;
312
- },
313
- get ansi256() {
314
- return colors.ansi256.theme.text.message.header.success;
315
- },
316
- get ansi16m() {
317
- return colors.ansi16m.theme.text.message.header.success;
318
- }
319
- })},
320
- info: ${createComponent(ColorFunction, {
321
- get ansi16() {
322
- return colors.ansi16.theme.text.message.header.info;
323
- },
324
- get ansi256() {
325
- return colors.ansi256.theme.text.message.header.info;
326
- },
327
- get ansi16m() {
328
- return colors.ansi16m.theme.text.message.header.info;
329
- }
330
- })},
331
- warning: ${createComponent(ColorFunction, {
332
- get ansi16() {
333
- return colors.ansi16.theme.text.message.header.warning;
334
- },
335
- get ansi256() {
336
- return colors.ansi256.theme.text.message.header.warning;
337
- },
338
- get ansi16m() {
339
- return colors.ansi16m.theme.text.message.header.warning;
340
- }
341
- })},
342
- danger: ${createComponent(ColorFunction, {
343
- get ansi16() {
344
- return colors.ansi16.theme.text.message.header.danger;
345
- },
346
- get ansi256() {
347
- return colors.ansi256.theme.text.message.header.danger;
348
- },
349
- get ansi16m() {
350
- return colors.ansi16m.theme.text.message.header.danger;
351
- }
352
- })},
353
- error: ${createComponent(ColorFunction, {
354
- get ansi16() {
355
- return colors.ansi16.theme.text.message.header.error;
356
- },
357
- get ansi256() {
358
- return colors.ansi256.theme.text.message.header.error;
359
- },
360
- get ansi16m() {
361
- return colors.ansi16m.theme.text.message.header.error;
362
- }
363
- })}
364
- },
365
- footer: {
366
- help: ${createComponent(ColorFunction, {
367
- get ansi16() {
368
- return colors.ansi16.theme.text.message.footer.help;
369
- },
370
- get ansi256() {
371
- return colors.ansi256.theme.text.message.footer.help;
372
- },
373
- get ansi16m() {
374
- return colors.ansi16m.theme.text.message.footer.help;
375
- }
376
- })},
377
- success: ${createComponent(ColorFunction, {
378
- get ansi16() {
379
- return colors.ansi16.theme.text.message.footer.success;
380
- },
381
- get ansi256() {
382
- return colors.ansi256.theme.text.message.footer.success;
383
- },
384
- get ansi16m() {
385
- return colors.ansi16m.theme.text.message.footer.success;
386
- }
387
- })},
388
- info: ${createComponent(ColorFunction, {
389
- get ansi16() {
390
- return colors.ansi16.theme.text.message.footer.info;
391
- },
392
- get ansi256() {
393
- return colors.ansi256.theme.text.message.footer.info;
394
- },
395
- get ansi16m() {
396
- return colors.ansi16m.theme.text.message.footer.info;
397
- }
398
- })},
399
- warning: ${createComponent(ColorFunction, {
400
- get ansi16() {
401
- return colors.ansi16.theme.text.message.footer.warning;
402
- },
403
- get ansi256() {
404
- return colors.ansi256.theme.text.message.footer.warning;
405
- },
406
- get ansi16m() {
407
- return colors.ansi16m.theme.text.message.footer.warning;
408
- }
409
- })},
410
- danger: ${createComponent(ColorFunction, {
411
- get ansi16() {
412
- return colors.ansi16.theme.text.message.footer.danger;
413
- },
414
- get ansi256() {
415
- return colors.ansi256.theme.text.message.footer.danger;
416
- },
417
- get ansi16m() {
418
- return colors.ansi16m.theme.text.message.footer.danger;
419
- }
420
- })},
421
- error: ${createComponent(ColorFunction, {
422
- get ansi16() {
423
- return colors.ansi16.theme.text.message.footer.error;
424
- },
425
- get ansi256() {
426
- return colors.ansi256.theme.text.message.footer.error;
427
- },
428
- get ansi16m() {
429
- return colors.ansi16m.theme.text.message.footer.error;
430
- }
431
- })}
432
- },
433
- description: {
434
- help: ${createComponent(ColorFunction, {
435
- get ansi16() {
436
- return colors.ansi16.theme.text.message.description.help;
437
- },
438
- get ansi256() {
439
- return colors.ansi256.theme.text.message.description.help;
440
- },
441
- get ansi16m() {
442
- return colors.ansi16m.theme.text.message.description.help;
443
- }
444
- })},
445
- success: ${createComponent(ColorFunction, {
446
- get ansi16() {
447
- return colors.ansi16.theme.text.message.description.success;
448
- },
449
- get ansi256() {
450
- return colors.ansi256.theme.text.message.description.success;
451
- },
452
- get ansi16m() {
453
- return colors.ansi16m.theme.text.message.description.success;
454
- }
455
- })},
456
- info: ${createComponent(ColorFunction, {
457
- get ansi16() {
458
- return colors.ansi16.theme.text.message.description.info;
459
- },
460
- get ansi256() {
461
- return colors.ansi256.theme.text.message.description.info;
462
- },
463
- get ansi16m() {
464
- return colors.ansi16m.theme.text.message.description.info;
465
- }
466
- })},
467
- warning: ${createComponent(ColorFunction, {
468
- get ansi16() {
469
- return colors.ansi16.theme.text.message.description.warning;
470
- },
471
- get ansi256() {
472
- return colors.ansi256.theme.text.message.description.warning;
473
- },
474
- get ansi16m() {
475
- return colors.ansi16m.theme.text.message.description.warning;
476
- }
477
- })},
478
- danger: ${createComponent(ColorFunction, {
479
- get ansi16() {
480
- return colors.ansi16.theme.text.message.description.danger;
481
- },
482
- get ansi256() {
483
- return colors.ansi256.theme.text.message.description.danger;
484
- },
485
- get ansi16m() {
486
- return colors.ansi16m.theme.text.message.description.danger;
487
- }
488
- })},
489
- error: ${createComponent(ColorFunction, {
490
- get ansi16() {
491
- return colors.ansi16.theme.text.message.description.error;
492
- },
493
- get ansi256() {
494
- return colors.ansi256.theme.text.message.description.error;
495
- },
496
- get ansi16m() {
497
- return colors.ansi16m.theme.text.message.description.error;
498
- }
499
- })}
500
- }
501
- },
502
- usage: {
503
- bin: ${createComponent(ColorFunction, {
504
- get ansi16() {
505
- return colors.ansi16.theme.text.usage.bin;
506
- },
507
- get ansi256() {
508
- return colors.ansi256.theme.text.usage.bin;
509
- },
510
- get ansi16m() {
511
- return colors.ansi16m.theme.text.usage.bin;
512
- }
513
- })},
514
- command: ${createComponent(ColorFunction, {
515
- get ansi16() {
516
- return colors.ansi16.theme.text.usage.command;
517
- },
518
- get ansi256() {
519
- return colors.ansi256.theme.text.usage.command;
520
- },
521
- get ansi16m() {
522
- return colors.ansi16m.theme.text.usage.command;
523
- }
524
- })},
525
- subcommand: ${createComponent(ColorFunction, {
526
- get ansi16() {
527
- return colors.ansi16.theme.text.usage.subcommand;
528
- },
529
- get ansi256() {
530
- return colors.ansi256.theme.text.usage.subcommand;
531
- },
532
- get ansi16m() {
533
- return colors.ansi16m.theme.text.usage.subcommand;
534
- }
535
- })},
536
- options: ${createComponent(ColorFunction, {
537
- get ansi16() {
538
- return colors.ansi16.theme.text.usage.options;
539
- },
540
- get ansi256() {
541
- return colors.ansi256.theme.text.usage.options;
542
- },
543
- get ansi16m() {
544
- return colors.ansi16m.theme.text.usage.options;
545
- }
546
- })},
547
- params: ${createComponent(ColorFunction, {
548
- get ansi16() {
549
- return colors.ansi16.theme.text.usage.params;
550
- },
551
- get ansi256() {
552
- return colors.ansi256.theme.text.usage.params;
553
- },
554
- get ansi16m() {
555
- return colors.ansi16m.theme.text.usage.params;
556
- }
557
- })},
558
- description: ${createComponent(ColorFunction, {
559
- get ansi16() {
560
- return colors.ansi16.theme.text.usage.description;
561
- },
562
- get ansi256() {
563
- return colors.ansi256.theme.text.usage.description;
564
- },
565
- get ansi16m() {
566
- return colors.ansi16m.theme.text.usage.description;
567
- }
568
- })}
569
- }
570
- },
571
- border: {
572
- banner: {
573
- outline: {
574
- primary: ${createComponent(ColorFunction, {
575
- get ansi16() {
576
- return colors.ansi16.theme.border.banner.outline.primary;
577
- },
578
- get ansi256() {
579
- return colors.ansi256.theme.border.banner.outline.primary;
580
- },
581
- get ansi16m() {
582
- return colors.ansi16m.theme.border.banner.outline.primary;
583
- }
584
- })},
585
- secondary: ${createComponent(ColorFunction, {
586
- get ansi16() {
587
- return colors.ansi16.theme.border.banner.outline.secondary;
588
- },
589
- get ansi256() {
590
- return colors.ansi256.theme.border.banner.outline.secondary;
591
- },
592
- get ansi16m() {
593
- return colors.ansi16m.theme.border.banner.outline.secondary;
594
- }
595
- })},
596
- tertiary: ${createComponent(ColorFunction, {
597
- get ansi16() {
598
- return colors.ansi16.theme.border.banner.outline.tertiary;
599
- },
600
- get ansi256() {
601
- return colors.ansi256.theme.border.banner.outline.tertiary;
602
- },
603
- get ansi16m() {
604
- return colors.ansi16m.theme.border.banner.outline.tertiary;
605
- }
606
- })}
607
- },
608
- divider: {
609
- primary: ${createComponent(ColorFunction, {
610
- get ansi16() {
611
- return colors.ansi16.theme.border.banner.divider.primary;
612
- },
613
- get ansi256() {
614
- return colors.ansi256.theme.border.banner.divider.primary;
615
- },
616
- get ansi16m() {
617
- return colors.ansi16m.theme.border.banner.divider.primary;
618
- }
619
- })},
620
- secondary: ${createComponent(ColorFunction, {
621
- get ansi16() {
622
- return colors.ansi16.theme.border.banner.divider.secondary;
623
- },
624
- get ansi256() {
625
- return colors.ansi256.theme.border.banner.divider.secondary;
626
- },
627
- get ansi16m() {
628
- return colors.ansi16m.theme.border.banner.divider.secondary;
629
- }
630
- })},
631
- tertiary: ${createComponent(ColorFunction, {
632
- get ansi16() {
633
- return colors.ansi16.theme.border.banner.divider.tertiary;
634
- },
635
- get ansi256() {
636
- return colors.ansi256.theme.border.banner.divider.tertiary;
637
- },
638
- get ansi16m() {
639
- return colors.ansi16m.theme.border.banner.divider.tertiary;
640
- }
641
- })}
642
- }
643
- },
644
- app: {
645
- outline: {
646
- primary: ${createComponent(ColorFunction, {
647
- get ansi16() {
648
- return colors.ansi16.theme.border.app.outline.primary;
649
- },
650
- get ansi256() {
651
- return colors.ansi256.theme.border.app.outline.primary;
652
- },
653
- get ansi16m() {
654
- return colors.ansi16m.theme.border.app.outline.primary;
655
- }
656
- })},
657
- secondary: ${createComponent(ColorFunction, {
658
- get ansi16() {
659
- return colors.ansi16.theme.border.app.outline.secondary;
660
- },
661
- get ansi256() {
662
- return colors.ansi256.theme.border.app.outline.secondary;
663
- },
664
- get ansi16m() {
665
- return colors.ansi16m.theme.border.app.outline.secondary;
666
- }
667
- })},
668
- tertiary: ${createComponent(ColorFunction, {
669
- get ansi16() {
670
- return colors.ansi16.theme.border.app.outline.tertiary;
671
- },
672
- get ansi256() {
673
- return colors.ansi256.theme.border.app.outline.tertiary;
674
- },
675
- get ansi16m() {
676
- return colors.ansi16m.theme.border.app.outline.tertiary;
677
- }
678
- })}
679
- },
680
- divider: {
681
- primary: ${createComponent(ColorFunction, {
682
- get ansi16() {
683
- return colors.ansi16.theme.border.app.divider.primary;
684
- },
685
- get ansi256() {
686
- return colors.ansi256.theme.border.app.divider.primary;
687
- },
688
- get ansi16m() {
689
- return colors.ansi16m.theme.border.app.divider.primary;
690
- }
691
- })},
692
- secondary: ${createComponent(ColorFunction, {
693
- get ansi16() {
694
- return colors.ansi16.theme.border.app.divider.secondary;
695
- },
696
- get ansi256() {
697
- return colors.ansi256.theme.border.app.divider.secondary;
698
- },
699
- get ansi16m() {
700
- return colors.ansi16m.theme.border.app.divider.secondary;
701
- }
702
- })},
703
- tertiary: ${createComponent(ColorFunction, {
704
- get ansi16() {
705
- return colors.ansi16.theme.border.app.divider.tertiary;
706
- },
707
- get ansi256() {
708
- return colors.ansi256.theme.border.app.divider.tertiary;
709
- },
710
- get ansi16m() {
711
- return colors.ansi16m.theme.border.app.divider.tertiary;
712
- }
713
- })}
714
- }
715
- },
716
- message: {
717
- outline: {
718
- help: ${createComponent(ColorFunction, {
719
- get ansi16() {
720
- return colors.ansi16.theme.border.message.outline.help;
721
- },
722
- get ansi256() {
723
- return colors.ansi256.theme.border.message.outline.help;
724
- },
725
- get ansi16m() {
726
- return colors.ansi16m.theme.border.message.outline.help;
727
- }
728
- })},
729
- success: ${createComponent(ColorFunction, {
730
- get ansi16() {
731
- return colors.ansi16.theme.border.message.outline.success;
732
- },
733
- get ansi256() {
734
- return colors.ansi256.theme.border.message.outline.success;
735
- },
736
- get ansi16m() {
737
- return colors.ansi16m.theme.border.message.outline.success;
738
- }
739
- })},
740
- info: ${createComponent(ColorFunction, {
741
- get ansi16() {
742
- return colors.ansi16.theme.border.message.outline.info;
743
- },
744
- get ansi256() {
745
- return colors.ansi256.theme.border.message.outline.info;
746
- },
747
- get ansi16m() {
748
- return colors.ansi16m.theme.border.message.outline.info;
749
- }
750
- })},
751
- warning: ${createComponent(ColorFunction, {
752
- get ansi16() {
753
- return colors.ansi16.theme.border.message.outline.warning;
754
- },
755
- get ansi256() {
756
- return colors.ansi256.theme.border.message.outline.warning;
757
- },
758
- get ansi16m() {
759
- return colors.ansi16m.theme.border.message.outline.warning;
760
- }
761
- })},
762
- danger: ${createComponent(ColorFunction, {
763
- get ansi16() {
764
- return colors.ansi16.theme.border.message.outline.danger;
765
- },
766
- get ansi256() {
767
- return colors.ansi256.theme.border.message.outline.danger;
768
- },
769
- get ansi16m() {
770
- return colors.ansi16m.theme.border.message.outline.danger;
771
- }
772
- })},
773
- error: ${createComponent(ColorFunction, {
774
- get ansi16() {
775
- return colors.ansi16.theme.border.message.outline.error;
776
- },
777
- get ansi256() {
778
- return colors.ansi256.theme.border.message.outline.error;
779
- },
780
- get ansi16m() {
781
- return colors.ansi16m.theme.border.message.outline.error;
782
- }
783
- })}
784
- },
785
- divider: {
786
- help: ${createComponent(ColorFunction, {
787
- get ansi16() {
788
- return colors.ansi16.theme.border.message.divider.help;
789
- },
790
- get ansi256() {
791
- return colors.ansi256.theme.border.message.divider.help;
792
- },
793
- get ansi16m() {
794
- return colors.ansi16m.theme.border.message.divider.help;
795
- }
796
- })},
797
- success: ${createComponent(ColorFunction, {
798
- get ansi16() {
799
- return colors.ansi16.theme.border.message.divider.success;
800
- },
801
- get ansi256() {
802
- return colors.ansi256.theme.border.message.divider.success;
803
- },
804
- get ansi16m() {
805
- return colors.ansi16m.theme.border.message.divider.success;
806
- }
807
- })},
808
- info: ${createComponent(ColorFunction, {
809
- get ansi16() {
810
- return colors.ansi16.theme.border.message.divider.info;
811
- },
812
- get ansi256() {
813
- return colors.ansi256.theme.border.message.divider.info;
814
- },
815
- get ansi16m() {
816
- return colors.ansi16m.theme.border.message.divider.info;
817
- }
818
- })},
819
- warning: ${createComponent(ColorFunction, {
820
- get ansi16() {
821
- return colors.ansi16.theme.border.message.divider.warning;
822
- },
823
- get ansi256() {
824
- return colors.ansi256.theme.border.message.divider.warning;
825
- },
826
- get ansi16m() {
827
- return colors.ansi16m.theme.border.message.divider.warning;
828
- }
829
- })},
830
- danger: ${createComponent(ColorFunction, {
831
- get ansi16() {
832
- return colors.ansi16.theme.border.message.divider.danger;
833
- },
834
- get ansi256() {
835
- return colors.ansi256.theme.border.message.divider.danger;
836
- },
837
- get ansi16m() {
838
- return colors.ansi16m.theme.border.message.divider.danger;
839
- }
840
- })},
841
- error: ${createComponent(ColorFunction, {
842
- get ansi16() {
843
- return colors.ansi16.theme.border.message.divider.error;
844
- },
845
- get ansi256() {
846
- return colors.ansi256.theme.border.message.divider.error;
847
- },
848
- get ansi16m() {
849
- return colors.ansi16m.theme.border.message.divider.error;
850
- }
851
- })}
852
- }
853
- }
854
- }
855
- }
856
- }
857
- `
858
- ];
859
- }
860
- })
861
- ];
862
- }
863
- /**
864
- * A component to generate the `writeLine` function in the `shell-shock:console` builtin module.
865
- */
866
- function WriteLineFunction() {
867
- const theme = useTheme();
868
- return [
869
- createComponent(InterfaceDeclaration, {
870
- "export": true,
871
- name: "WriteLineOptions",
872
- get children() {
873
- return [createComponent(InterfaceMember, {
874
- get doc() {
875
- return createComponent(TSDoc, {
876
- heading: "Padding to apply to the line",
877
- get children() {
878
- return createComponent(TSDocRemarks, { children: `The amount of padding (in spaces) to apply to the line when writing to the console. This value is applied to both the left and right sides of the line. If not specified, the default padding defined in the current theme configuration will be used.` });
879
- }
880
- });
881
- },
882
- name: "padding",
883
- optional: true,
884
- type: "number"
885
- }), createComponent(InterfaceMember, {
886
- get doc() {
887
- return createComponent(TSDoc, {
888
- heading: "Console function to use for writing the line",
889
- get children() {
890
- return [createComponent(TSDocRemarks, { children: `The console function to use for writing the line. If not specified, the default console function \`console.log\` will be used.` }), createComponent(TSDocDefaultValue, {
891
- get type() {
892
- return ReflectionKind.method;
893
- },
894
- defaultValue: `\`console.log\``
895
- })];
896
- }
897
- });
898
- },
899
- name: "consoleFn",
900
- optional: true,
901
- type: "(text: string) => void"
902
- })];
903
- }
904
- }),
905
- createComponent(TSDoc, {
906
- heading: "Write a line to the console.",
907
- get children() {
908
- return [
909
- createComponent(TSDocRemarks, { children: `This function writes a line to the console, applying the appropriate padding as defined in the current theme configuration and wrapping as needed.` }),
910
- createComponent(TSDocParam, {
911
- name: "text",
912
- children: `The line text to write to the console.`
913
- }),
914
- createComponent(TSDocParam, {
915
- name: "padding",
916
- children: `Padding to apply to the line`
917
- })
918
- ];
919
- }
920
- }),
921
- createComponent(FunctionDeclaration, {
922
- "export": true,
923
- name: "writeLine",
924
- parameters: [{
925
- name: "text",
926
- type: "string | number | boolean | null",
927
- optional: true
928
- }, {
929
- name: "options",
930
- type: "WriteLineOptions",
931
- default: "{}"
932
- }],
933
- get children() {
934
- return code`const consoleFn = options.consoleFn ?? console.log;
935
- if (text === undefined || text === null || text === "") {
936
- consoleFn("");
937
- return;
938
- }
939
-
940
- const str = String(text);
941
- const padding = Math.max(options.padding ?? ${theme.padding.app}, 0);
942
-
943
- if (stripAnsi(str).length + padding * 2 <= process.stdout.columns) {
944
- consoleFn(\`\${" ".repeat(padding)}\${str}\`);
945
- } else {
946
- const words = str.split(" ");
947
- let line = "";
948
- for (let i = 0; i < words.length; i++) {
949
- const word = words[i]!;
950
- if (line.length + stripAnsi(word).length + 1 <= process.stdout.columns - padding * 2) {
951
- line += (line ? " " : "") + word;
952
- } else {
953
- consoleFn(\`\${" ".repeat(padding)}\${line}\`);
954
- line = word;
955
- }
956
- }
957
-
958
- if (line && stripAnsi(line).length > 0) {
959
- consoleFn(\`\${" ".repeat(padding)}\${line}\`);
960
- }
961
- }
962
- `;
963
- }
964
- })
965
- ];
966
- }
967
- /**
968
- * A component to generate the message functions in the `shell-shock:console` builtin module.
969
- */
970
- function MessageFunction(props) {
971
- const { type } = props;
972
- return [createComponent(TSDoc, {
973
- heading: `Write ${type === "error" || type === "info" ? "an" : "a"} ${type ? type === "info" ? "informational" : type : ""} message to the console.`,
974
- get children() {
975
- return [
976
- createComponent(TSDocRemarks, { children: `This function initializes the Powerlines environment configuration object.` }),
977
- createComponent(Show, {
978
- when: !type,
979
- get children() {
980
- return createComponent(TSDocParam, {
981
- name: "type",
982
- children: `The type of message to write to the console.`
983
- });
984
- }
985
- }),
986
- createComponent(TSDocParam, {
987
- name: "message",
988
- children: `The message(s) to write to the console.`
989
- })
990
- ];
991
- }
992
- }), createComponent(FunctionDeclaration, {
993
- "export": true,
994
- name: type || "message",
995
- get parameters() {
996
- return [!type && {
997
- name: "type",
998
- type: `"success" | "help" | "info" | "verbose" | "warning" | "danger" | "error"`,
999
- optional: false
1000
- }, {
1001
- name: "message",
1002
- type: "string",
1003
- optional: false
1004
- }].filter(Boolean);
1005
- },
1006
- children: code`writeLine(message, { consoleFn: console.${type === "warning" ? "warn" : type === "error" || type === "danger" ? "error" : type === "info" ? "info" : type === "verbose" ? "debug" : "log"} });`
1007
- })];
1008
- }
1009
- /**
1010
- * A component to generate the `wrapAnsi` function in the `shell-shock:console` builtin module.
1011
- */
1012
- function WrapAnsiFunction() {
1013
- return [createComponent(TSDoc, {
1014
- heading: "Applies ANSI escape codes to a string.",
1015
- get children() {
1016
- return [
1017
- createComponent(TSDocRemarks, { children: `Split text by /\\\\u001b[\\[|\\]][0-9;]*m/ and wrap non-ANSI parts with open/closeing tags.` }),
1018
- createComponent(TSDocExample, { children: `const result = wrapAnsi("Hello\\\\u001b[31mWorld\\\\u001b[0mAgain", "\\\\u001b[36m", "\\\\u001b[39");\nconsole.log(result); // "\\\\u001b[36mHello\\\\u001b[39\\\\u001b[31mWorld\\\\u001b[0m\\\\u001b[36mAgain\\\\u001b[39"` }),
1019
- createComponent(TSDocParam, {
1020
- name: "text",
1021
- children: `The text to apply ANSI codes to.`
1022
- }),
1023
- createComponent(TSDocParam, {
1024
- name: "open",
1025
- children: `The opening ANSI code.`
1026
- }),
1027
- createComponent(TSDocParam, {
1028
- name: "close",
1029
- children: `The closing ANSI code.`
1030
- }),
1031
- createComponent(TSDocReturns, { children: `The text with ANSI codes applied.` })
1032
- ];
1033
- }
1034
- }), createComponent(FunctionDeclaration, {
1035
- name: "wrapAnsi",
1036
- parameters: [
1037
- {
1038
- name: "text",
1039
- type: "string | number",
1040
- optional: false
1041
- },
1042
- {
1043
- name: "open",
1044
- type: "string",
1045
- optional: false
1046
- },
1047
- {
1048
- name: "close",
1049
- type: "string",
1050
- optional: false
1051
- }
1052
- ],
1053
- children: code`const str = String(text);
1054
- const tokens: string[] = [];
1055
-
1056
- let last = 0;
1057
- let match: RegExpExecArray | null;
1058
- while ((match = /\\\\u001b[\\[|\\]][0-9;]*m/g.exec(str)) !== null) {
1059
- if (match.index > last) tokens.push(str.slice(last, match.index));
1060
- tokens.push(match[0]);
1061
- last = match.index + match[0].length;
1062
- }
1063
-
1064
- if (last < str.length) {
1065
- tokens.push(str.slice(last));
1066
- }
1067
-
1068
- let result = "";
1069
- for (let i = 0; i < tokens.length; i++) {
1070
- const seg = tokens[i]!;
1071
- if (/^\\\\u001b[\\[|\\]][0-9;]*m$/.test(seg)) {
1072
- result += seg;
1073
- continue;
1074
- }
1075
-
1076
- if (!seg) {
1077
- continue;
1078
- }
1079
-
1080
- result += i > 0 && /^\\\\u001b[\\[|\\]][0-9;]*m$/.test(tokens[i - 1]!) && i + 1 < tokens.length && ansiExactRegex.test(tokens[i + 1]!) ? seg : \`\${open}\${seg}\${close}\`;
1081
- }
1082
-
1083
- return result;
1084
- `
1085
- })];
1086
- }
1087
- /**
1088
- * A component to generate the `stripAnsi` function in the `shell-shock:console` builtin module.
1089
- */
1090
- function StripAnsiFunction() {
1091
- return [createComponent(TSDoc, {
1092
- heading: "Removes ANSI escape codes from a string.",
1093
- get children() {
1094
- return [
1095
- createComponent(TSDocExample, { children: `const result = stripAnsi("Hello\\\\u001b[31mWorld\\\\u001b[0mAgain"); // "HelloWorldAgain"` }),
1096
- createComponent(TSDocParam, {
1097
- name: "text",
1098
- children: `The text to strip ANSI codes from.`
1099
- }),
1100
- createComponent(TSDocReturns, { children: `The text with ANSI codes removed.` })
1101
- ];
1102
- }
1103
- }), createComponent(FunctionDeclaration, {
1104
- "export": true,
1105
- name: "stripAnsi",
1106
- parameters: [{
1107
- name: "text",
1108
- type: "string | number",
1109
- optional: false
1110
- }],
1111
- children: code`return String(text).replace(new RegExp([
1112
- String.raw\`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)\`,
1113
- String.raw\`(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))\`
1114
- ].join("|"), "g"), "");`
1115
- })];
1116
- }
1117
- /**
1118
- * A component to generate the `link` function in the `shell-shock:console` builtin module.
1119
- */
1120
- function LinkFunction() {
1121
- return [createComponent(TSDoc, {
1122
- heading: "Render a hyperlink in the console.",
1123
- get children() {
1124
- return [
1125
- createComponent(TSDocParam, {
1126
- name: "url",
1127
- children: `The URL to render as a hyperlink.`
1128
- }),
1129
- createComponent(TSDocParam, {
1130
- name: "text",
1131
- children: `The text to display for the link. If not provided, the URL will be used as the text.`
1132
- }),
1133
- createComponent(TSDocReturns, { children: `The formatted hyperlink string.` })
1134
- ];
1135
- }
1136
- }), createComponent(FunctionDeclaration, {
1137
- "export": true,
1138
- name: "link",
1139
- parameters: [{
1140
- name: "url",
1141
- type: "string",
1142
- optional: false
1143
- }, {
1144
- name: "text",
1145
- type: "string",
1146
- optional: true
1147
- }],
1148
- get children() {
1149
- return [
1150
- createComponent(IfStatement, {
1151
- condition: code`isHyperlinkSupported()`,
1152
- children: code`return \`\\u001b]8;;\${url}\\u0007\${text ?? url}\\u001b]8;;\\u0007\`;`
1153
- }),
1154
- createIntrinsic("hbr", {}),
1155
- createComponent(IfStatement, {
1156
- condition: code`isColorSupported`,
1157
- children: code`return colors.underline(colors.theme.text.body.link(\`$\{text ?? url\} $\{url\}\`));`
1158
- }),
1159
- createIntrinsic("hbr", {}),
1160
- code`return \`$\{text ?? url\} $\{url\}\`;`
1161
- ];
1162
- }
1163
- })];
1164
- }
1165
- /**
1166
- * A built-in console utilities module for Shell Shock.
1167
- */
1168
- function ConsoleBuiltin() {
1169
- return createComponent(BuiltinFile, {
1170
- id: "console",
1171
- description: "A collection of helper utilities to assist in generating content meant for display in the console.",
1172
- builtinImports: { utils: [
1173
- "isColorSupported",
1174
- "colorSupportLevels",
1175
- "isHyperlinkSupported"
1176
- ] },
1177
- get children() {
1178
- return [
1179
- createComponent(StripAnsiFunction, {}),
1180
- createIntrinsic("hbr", {}),
1181
- createIntrinsic("hbr", {}),
1182
- createComponent(WrapAnsiFunction, {}),
1183
- createIntrinsic("hbr", {}),
1184
- createIntrinsic("hbr", {}),
1185
- createComponent(ColorsDeclaration, {}),
1186
- createIntrinsic("hbr", {}),
1187
- createIntrinsic("hbr", {}),
1188
- createComponent(WriteLineFunction, {}),
1189
- createIntrinsic("hbr", {}),
1190
- createIntrinsic("hbr", {}),
1191
- createComponent(LinkFunction, {}),
1192
- createIntrinsic("hbr", {}),
1193
- createIntrinsic("hbr", {}),
1194
- createComponent(MessageFunction, { type: "help" }),
1195
- createIntrinsic("hbr", {}),
1196
- createIntrinsic("hbr", {}),
1197
- createComponent(MessageFunction, { type: "success" }),
1198
- createIntrinsic("hbr", {}),
1199
- createIntrinsic("hbr", {}),
1200
- createComponent(MessageFunction, { type: "info" }),
1201
- createIntrinsic("hbr", {}),
1202
- createIntrinsic("hbr", {}),
1203
- createComponent(MessageFunction, { type: "verbose" }),
1204
- createIntrinsic("hbr", {}),
1205
- createIntrinsic("hbr", {}),
1206
- createComponent(MessageFunction, { type: "warning" }),
1207
- createIntrinsic("hbr", {}),
1208
- createIntrinsic("hbr", {}),
1209
- createComponent(MessageFunction, { type: "danger" }),
1210
- createIntrinsic("hbr", {}),
1211
- createIntrinsic("hbr", {}),
1212
- createComponent(MessageFunction, { type: "error" }),
1213
- createIntrinsic("hbr", {}),
1214
- createIntrinsic("hbr", {}),
1215
- createComponent(MessageFunction, {}),
1216
- createIntrinsic("hbr", {}),
1217
- createIntrinsic("hbr", {})
1218
- ];
1219
- }
1220
- });
1221
- }
1222
-
1223
- //#endregion
1224
- export { ColorsDeclaration, ConsoleBuiltin, LinkFunction, MessageFunction, StripAnsiFunction, WrapAnsiFunction, WriteLineFunction };
1225
- //# sourceMappingURL=console.mjs.map