@shell-shock/plugin-console 0.2.26 → 0.2.27
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/dist/components/console-builtin.cjs +469 -201
- package/dist/components/console-builtin.d.cts +10 -3
- package/dist/components/console-builtin.d.cts.map +1 -1
- package/dist/components/console-builtin.d.mts +10 -3
- package/dist/components/console-builtin.mjs +272 -5
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +2 -2
- package/dist/generator-CCOO6Zl8.cjs +39 -0
- package/dist/generator-DOcMAjuQ.mjs +35 -0
- package/dist/generator-DOcMAjuQ.mjs.map +1 -0
- package/dist/generator.cjs +5 -0
- package/dist/generator.d.cts +10 -0
- package/dist/generator.d.cts.map +1 -0
- package/dist/generator.d.mts +10 -0
- package/dist/generator.d.mts.map +1 -0
- package/dist/generator.mjs +3 -0
- package/dist/index.cjs +6 -9
- package/dist/index.d.cts +3 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +7 -9
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.mjs +2 -0
- package/dist/types/plugin.d.cts +0 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +0 -1
- package/package.json +29 -17
- package/dist/_virtual/_rolldown/runtime.cjs +0 -29
|
@@ -2,11 +2,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
3
|
let _alloy_js_core = require("@alloy-js/core");
|
|
4
4
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
5
|
-
let
|
|
6
|
-
let
|
|
7
|
-
let
|
|
8
|
-
let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
5
|
+
let _power_plant_alloy_js_core_components_spacing = require("@power-plant/alloy-js/core/components/spacing");
|
|
6
|
+
let _power_plant_alloy_js_typescript = require("@power-plant/alloy-js/typescript");
|
|
7
|
+
let _power_plant_alloy_js_typescript_components_tsdoc = require("@power-plant/alloy-js/typescript/components/tsdoc");
|
|
9
8
|
let _shell_shock_core_components_helpers = require("@shell-shock/core/components/helpers");
|
|
9
|
+
let _shell_shock_core_contexts_power_plant = require("@shell-shock/core/contexts/power-plant");
|
|
10
10
|
let _shell_shock_plugin_theme_contexts_theme = require("@shell-shock/plugin-theme/contexts/theme");
|
|
11
11
|
let _shell_shock_plugin_theme_helpers_ansi_utils = require("@shell-shock/plugin-theme/helpers/ansi-utils");
|
|
12
12
|
let _stryke_string_format = require("@stryke/string-format");
|
|
@@ -24,7 +24,7 @@ function AnsiHelpersDeclarations() {
|
|
|
24
24
|
doc: "The ASCII Bell character, which can be used to trigger a beep sound in the console.",
|
|
25
25
|
children: _alloy_js_core.code` "\\u0007"; `
|
|
26
26
|
}),
|
|
27
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
27
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
28
28
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
29
29
|
"const": true,
|
|
30
30
|
"export": true,
|
|
@@ -68,7 +68,7 @@ function AnsiHelpersDeclarations() {
|
|
|
68
68
|
restore: "\\x1B8"
|
|
69
69
|
} `
|
|
70
70
|
}),
|
|
71
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
71
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
72
72
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
73
73
|
"const": true,
|
|
74
74
|
"export": true,
|
|
@@ -95,7 +95,7 @@ function AnsiHelpersDeclarations() {
|
|
|
95
95
|
}
|
|
96
96
|
} `
|
|
97
97
|
}),
|
|
98
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
98
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
99
99
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
100
100
|
"const": true,
|
|
101
101
|
"export": true,
|
|
@@ -106,7 +106,7 @@ function AnsiHelpersDeclarations() {
|
|
|
106
106
|
down: (count = 1) => "\\x1B[T".repeat(count)
|
|
107
107
|
} `
|
|
108
108
|
}),
|
|
109
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
109
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
110
110
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
111
111
|
"export": true,
|
|
112
112
|
name: "clear",
|
|
@@ -132,7 +132,7 @@ function AnsiHelpersDeclarations() {
|
|
|
132
132
|
|
|
133
133
|
return erase.lines(rows); `
|
|
134
134
|
}),
|
|
135
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
135
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {})
|
|
136
136
|
];
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
@@ -182,7 +182,7 @@ function ThemeColorTypeDefinition(props) {
|
|
|
182
182
|
},
|
|
183
183
|
get fallback() {
|
|
184
184
|
return [
|
|
185
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
185
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, { heading: `An object containing various ${subType ? `${subType} ` : ""}${color}${type ? ` ${type}` : ""} theme coloring functions.` }),
|
|
186
186
|
(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code` ${(0, _stryke_string_format.camelCase)(color)}: { `),
|
|
187
187
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
188
188
|
(0, _alloy_js_core_jsx_runtime.createComponent)(ThemeColorTypeDefinition, {
|
|
@@ -203,23 +203,23 @@ function ThemeColorTypeDefinition(props) {
|
|
|
203
203
|
];
|
|
204
204
|
},
|
|
205
205
|
get children() {
|
|
206
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
206
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
207
207
|
get heading() {
|
|
208
208
|
return `A function that applies ${(0, _stryke_string_format_vowels.getIndefiniteArticle)(color)} ${color}${type ? ` ${type}` : ""}${subType ? ` ${subType}` : ""} color styling to provided console text.`;
|
|
209
209
|
},
|
|
210
210
|
get children() {
|
|
211
211
|
return [
|
|
212
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
212
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `This function takes a string and an optional boolean indicating whether to apply the color as a background. It returns the input string wrapped in the appropriate ANSI escape codes for ${color}${type ? ` ${type}` : ""}${subType ? ` ${subType}` : ""} color styling, based on the terminal's color support level. If colors are not supported, it simply returns the input text as a string.` }),
|
|
213
213
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
214
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
214
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
215
215
|
name: "text",
|
|
216
216
|
children: `The console text to which the ${color}${type ? ` ${type}` : ""}${subType ? ` ${subType}` : ""} color styling should be applied.`
|
|
217
217
|
}),
|
|
218
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
218
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
219
219
|
name: "background",
|
|
220
220
|
children: `A boolean indicating whether to apply the color as a background. Defaults to \`false\`.`
|
|
221
221
|
}),
|
|
222
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
222
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `A string with ANSI escape codes applied for ${color}${type ? ` ${type}` : ""}${subType ? ` ${subType}` : ""} color styling, or the original text if the style is not supported in the current terminal.` })
|
|
223
223
|
];
|
|
224
224
|
}
|
|
225
225
|
}), (0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`${(0, _stryke_string_format.camelCase)(color)}: (text: string, background?: boolean) => string`)];
|
|
@@ -249,7 +249,7 @@ function ThemeColorObjectDefinition(props) {
|
|
|
249
249
|
},
|
|
250
250
|
get fallback() {
|
|
251
251
|
return [
|
|
252
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
252
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, { heading: `An object containing various ${subType ? `${subType} ` : ""}${color}${type ? ` ${type}` : ""} theme coloring functions.` }),
|
|
253
253
|
(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code` ${(0, _stryke_string_format.camelCase)(color)}: { `),
|
|
254
254
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
255
255
|
(0, _alloy_js_core_jsx_runtime.createComponent)(ThemeColorObjectDefinition, {
|
|
@@ -271,23 +271,23 @@ function ThemeColorObjectDefinition(props) {
|
|
|
271
271
|
},
|
|
272
272
|
get children() {
|
|
273
273
|
return [
|
|
274
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
274
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
275
275
|
get heading() {
|
|
276
276
|
return `A function that applies ${(0, _stryke_string_format_vowels.getIndefiniteArticle)(color)} ${color}${type ? ` ${type}` : ""}${subType ? ` ${subType}` : ""} color styling to provided console text.`;
|
|
277
277
|
},
|
|
278
278
|
get children() {
|
|
279
279
|
return [
|
|
280
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
280
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `This function takes a string and an optional boolean indicating whether to apply the color as a background. It returns the input string wrapped in the appropriate ANSI escape codes for ${color}${type ? ` ${type}` : ""}${subType ? ` ${subType}` : ""} color styling, based on the terminal's color support level. If colors are not supported, it simply returns the input text as a string.` }),
|
|
281
281
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
282
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
282
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
283
283
|
name: "text",
|
|
284
284
|
children: `The console text to which the ${color}${type ? ` ${type}` : ""}${subType ? ` ${subType}` : ""} color styling should be applied.`
|
|
285
285
|
}),
|
|
286
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
286
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
287
287
|
name: "background",
|
|
288
288
|
children: `A boolean indicating whether to apply the color as a background. Defaults to \`false\`.`
|
|
289
289
|
}),
|
|
290
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
290
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `A string with ANSI escape codes applied for ${color}${type ? ` ${type}` : ""}${subType ? ` ${subType}` : ""} color styling, or the original text if the style is not supported in the current terminal.` })
|
|
291
291
|
];
|
|
292
292
|
}
|
|
293
293
|
}),
|
|
@@ -321,17 +321,17 @@ function AnsiStyleFunctionsDeclaration() {
|
|
|
321
321
|
semicolon: true,
|
|
322
322
|
doubleHardline: true,
|
|
323
323
|
enderPunctuation: true,
|
|
324
|
-
children: (modifier) => [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
324
|
+
children: (modifier) => [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
325
325
|
get heading() {
|
|
326
326
|
return `A function that applies ${(0, _stryke_string_format_vowels.getIndefiniteArticle)((0, _stryke_string_format.titleCase)(modifier))} ${(0, _stryke_string_format.titleCase)(modifier)} text-style to provided console text.`;
|
|
327
327
|
},
|
|
328
328
|
get children() {
|
|
329
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
329
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
330
330
|
name: "text",
|
|
331
331
|
get children() {
|
|
332
332
|
return `The console text to which the ${(0, _stryke_string_format.titleCase)(modifier)} text-style should be applied.`;
|
|
333
333
|
}
|
|
334
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
334
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { get children() {
|
|
335
335
|
return `A string with ANSI escape codes applied for ${(0, _stryke_string_format.titleCase)(modifier)} text-style, or the original text if the style is not supported in the current terminal.`;
|
|
336
336
|
} })];
|
|
337
337
|
}
|
|
@@ -357,33 +357,33 @@ function AnsiStyleFunctionsDeclaration() {
|
|
|
357
357
|
}
|
|
358
358
|
})]
|
|
359
359
|
}),
|
|
360
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
360
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
361
361
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
362
362
|
each: _shell_shock_plugin_theme_helpers_ansi_utils.colorKeys,
|
|
363
363
|
semicolon: true,
|
|
364
364
|
doubleHardline: true,
|
|
365
365
|
enderPunctuation: true,
|
|
366
|
-
children: (color) => [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
366
|
+
children: (color) => [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
367
367
|
get heading() {
|
|
368
368
|
return `A function that applies ${(0, _stryke_string_format_vowels.getIndefiniteArticle)((0, _stryke_string_format.titleCase)(color))} ${(0, _stryke_string_format.titleCase)(color)} color styling to provided console text.`;
|
|
369
369
|
},
|
|
370
370
|
get children() {
|
|
371
371
|
return [
|
|
372
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
372
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { get children() {
|
|
373
373
|
return `This function takes a string and an optional boolean indicating whether to apply the color as a background. It returns the input string wrapped in the appropriate ANSI escape codes for ${(0, _stryke_string_format_vowels.getIndefiniteArticle)((0, _stryke_string_format.titleCase)(color))} ${(0, _stryke_string_format.titleCase)(color)} color styling, based on the terminal's color support level. If colors are not supported, it simply returns the input text as a string.`;
|
|
374
374
|
} }),
|
|
375
375
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
376
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
376
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
377
377
|
name: "text",
|
|
378
378
|
get children() {
|
|
379
379
|
return `The console text to which the ${(0, _stryke_string_format.titleCase)(color)} color styling should be applied.`;
|
|
380
380
|
}
|
|
381
381
|
}),
|
|
382
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
382
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
383
383
|
name: "background",
|
|
384
384
|
children: `A boolean indicating whether to apply the color as a background. Defaults to \`false\`.`
|
|
385
385
|
}),
|
|
386
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
386
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { get children() {
|
|
387
387
|
return `A string with ANSI escape codes applied for ${(0, _stryke_string_format.titleCase)(color)} color styling, or the original text if the style is not supported in the current terminal.`;
|
|
388
388
|
} })
|
|
389
389
|
];
|
|
@@ -409,7 +409,7 @@ function AnsiStyleFunctionsDeclaration() {
|
|
|
409
409
|
}
|
|
410
410
|
})]
|
|
411
411
|
}),
|
|
412
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
412
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
413
413
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
414
414
|
get each() {
|
|
415
415
|
return Object.keys(colors.ansi16.theme);
|
|
@@ -417,7 +417,7 @@ function AnsiStyleFunctionsDeclaration() {
|
|
|
417
417
|
semicolon: true,
|
|
418
418
|
doubleHardline: true,
|
|
419
419
|
enderPunctuation: true,
|
|
420
|
-
children: (type) => [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
420
|
+
children: (type) => [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, { heading: `A nested object containing functions for applying ${type} theme colors to the console.` }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
421
421
|
"export": true,
|
|
422
422
|
get name() {
|
|
423
423
|
return `${(0, _stryke_string_format.camelCase)(type)}Colors`;
|
|
@@ -444,7 +444,7 @@ function AnsiStyleFunctionsDeclaration() {
|
|
|
444
444
|
}
|
|
445
445
|
})]
|
|
446
446
|
}),
|
|
447
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
447
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {})
|
|
448
448
|
];
|
|
449
449
|
}
|
|
450
450
|
/**
|
|
@@ -485,7 +485,7 @@ function SplitTextFunctionDeclaration() {
|
|
|
485
485
|
|
|
486
486
|
return adjustedIndex; `
|
|
487
487
|
}),
|
|
488
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
488
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
489
489
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
490
490
|
name: "breakLine",
|
|
491
491
|
parameters: [{
|
|
@@ -547,18 +547,18 @@ function SplitTextFunctionDeclaration() {
|
|
|
547
547
|
|
|
548
548
|
return [first.replace(/^\\s+/, "").replace(/\\s+$/, "") + closeSequence, openSequence + second.replace(/^\\s+/, "").replace(/\\s+$/, "")]; `
|
|
549
549
|
}),
|
|
550
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
551
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
550
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
551
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
552
552
|
heading: "Split text into multiple lines based on a maximum length.",
|
|
553
553
|
get children() {
|
|
554
554
|
return [
|
|
555
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
555
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `This function splits the provided text into multiple lines based on the specified maximum length, ensuring that words are not broken in the middle.` }),
|
|
556
556
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
557
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
557
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
558
558
|
name: "text",
|
|
559
559
|
children: `The text to split into multiple lines.`
|
|
560
560
|
}),
|
|
561
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
561
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
562
562
|
name: "maxLength",
|
|
563
563
|
children: `The maximum length of each line.`
|
|
564
564
|
})
|
|
@@ -627,13 +627,13 @@ function WriteFunctionDeclaration() {
|
|
|
627
627
|
name: "WriteOptions",
|
|
628
628
|
doc: "Options for writing to the console.",
|
|
629
629
|
get children() {
|
|
630
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
630
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
631
631
|
heading: "Console function to use for writing to the console",
|
|
632
632
|
get children() {
|
|
633
633
|
return [
|
|
634
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
634
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `The console function to use for writing to the console. If not specified, the default console function \`console.log\` will be used.` }),
|
|
635
635
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
636
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
636
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
637
637
|
type: "any",
|
|
638
638
|
defaultValue: `\`console.log\``
|
|
639
639
|
})
|
|
@@ -646,18 +646,18 @@ function WriteFunctionDeclaration() {
|
|
|
646
646
|
})];
|
|
647
647
|
}
|
|
648
648
|
}),
|
|
649
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
650
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
649
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
650
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
651
651
|
heading: "Write to the console.",
|
|
652
652
|
get children() {
|
|
653
653
|
return [
|
|
654
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
654
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `This function writes to the console, applying the appropriate padding as defined in the current theme configuration and wrapping as needed.` }),
|
|
655
655
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
656
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
656
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
657
657
|
name: "text",
|
|
658
658
|
children: `The text to write to the console.`
|
|
659
659
|
}),
|
|
660
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
660
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
661
661
|
name: "options",
|
|
662
662
|
children: `The options to apply when writing to the console.`
|
|
663
663
|
})
|
|
@@ -699,10 +699,10 @@ function WriteLineFunctionDeclaration() {
|
|
|
699
699
|
"extends": ["WriteOptions"],
|
|
700
700
|
get children() {
|
|
701
701
|
return [
|
|
702
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
702
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
703
703
|
heading: "Padding to apply to the line",
|
|
704
704
|
get children() {
|
|
705
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
705
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.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.` });
|
|
706
706
|
}
|
|
707
707
|
}),
|
|
708
708
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceMember, {
|
|
@@ -711,10 +711,10 @@ function WriteLineFunctionDeclaration() {
|
|
|
711
711
|
type: "number"
|
|
712
712
|
}),
|
|
713
713
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
714
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
714
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
715
715
|
heading: "Color of the line text",
|
|
716
716
|
get children() {
|
|
717
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
717
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `The color to apply to the line text when writing to the console. This can be one of the predefined color themes: "primary", "secondary", or "tertiary". If not specified, no specific coloring will be applied to the text (the default/system terminal text color will likely be used).` }), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
718
718
|
}
|
|
719
719
|
}),
|
|
720
720
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceMember, {
|
|
@@ -725,18 +725,18 @@ function WriteLineFunctionDeclaration() {
|
|
|
725
725
|
];
|
|
726
726
|
}
|
|
727
727
|
}),
|
|
728
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
729
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
728
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
729
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
730
730
|
heading: "Write a line to the console.",
|
|
731
731
|
get children() {
|
|
732
732
|
return [
|
|
733
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
733
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.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.` }),
|
|
734
734
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
735
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
735
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
736
736
|
name: "text",
|
|
737
737
|
children: `The line text to write to the console.`
|
|
738
738
|
}),
|
|
739
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
739
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
740
740
|
name: "options",
|
|
741
741
|
children: `The options to apply when writing the line to the console.`
|
|
742
742
|
})
|
|
@@ -773,19 +773,19 @@ function WriteLineFunctionDeclaration() {
|
|
|
773
773
|
function MessageFunctionDeclaration(props) {
|
|
774
774
|
const { type, variant, consoleFnName, description, prefix, parameters, timestamp, color = variant } = props;
|
|
775
775
|
const theme = (0, _shell_shock_plugin_theme_contexts_theme.useTheme)();
|
|
776
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
776
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
777
777
|
get heading() {
|
|
778
778
|
return `Write ${(0, _stryke_string_format_vowels.getIndefiniteArticle)(description)} ${description} message to the console.`;
|
|
779
779
|
},
|
|
780
780
|
get children() {
|
|
781
781
|
return [
|
|
782
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
782
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `This function initializes the Powerlines environment configuration object.` }),
|
|
783
783
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
784
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
784
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
785
785
|
name: "message",
|
|
786
786
|
children: `The message to write to the console.`
|
|
787
787
|
}),
|
|
788
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
788
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
789
789
|
name: "header",
|
|
790
790
|
children: `An optional header to display above the message. If not provided, a default header based on the message type and variant will be used if defined in the theme configuration; otherwise, no header will be displayed.`
|
|
791
791
|
})
|
|
@@ -838,25 +838,25 @@ function MessageFunctionDeclaration(props) {
|
|
|
838
838
|
* A component to generate the `wrapAnsi` function in the `shell-shock:console` builtin module.
|
|
839
839
|
*/
|
|
840
840
|
function WrapAnsiFunction() {
|
|
841
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
841
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
842
842
|
heading: "Applies ANSI escape codes to a string.",
|
|
843
843
|
get children() {
|
|
844
844
|
return [
|
|
845
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
846
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
847
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
845
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `Split text by /\\\\x1b[\\[|\\]][0-9;]*m/ and wrap non-ANSI parts with open/closing tags.` }),
|
|
846
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocExample, { children: `const result = wrapAnsi("Hello\\\\x1b[31mWorld\\\\x1b[0mAgain", "\\\\x1b[36m", "\\\\x1b[39");\nconsole.log(result); // "\\\\x1b[36mHello\\\\x1b[39\\\\x1b[31mWorld\\\\x1b[0m\\\\x1b[36mAgain\\\\x1b[39"` }),
|
|
847
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
848
848
|
name: "text",
|
|
849
849
|
children: `The text to apply ANSI codes to.`
|
|
850
850
|
}),
|
|
851
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
851
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
852
852
|
name: "open",
|
|
853
853
|
children: `The opening ANSI code.`
|
|
854
854
|
}),
|
|
855
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
855
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
856
856
|
name: "close",
|
|
857
857
|
children: `The closing ANSI code.`
|
|
858
858
|
}),
|
|
859
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
859
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `The text with ANSI codes applied.` })
|
|
860
860
|
];
|
|
861
861
|
}
|
|
862
862
|
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
@@ -918,16 +918,16 @@ function WrapAnsiFunction() {
|
|
|
918
918
|
* A component to generate the `stripAnsi` function in the `shell-shock:console` builtin module.
|
|
919
919
|
*/
|
|
920
920
|
function StripAnsiFunctionDeclaration() {
|
|
921
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
921
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
922
922
|
heading: "Removes ANSI escape codes from a string.",
|
|
923
923
|
get children() {
|
|
924
924
|
return [
|
|
925
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
926
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
925
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocExample, { children: `const result = stripAnsi("Hello\\\\x1b[31mWorld\\\\x1b[0mAgain"); // "HelloWorldAgain"` }),
|
|
926
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
927
927
|
name: "text",
|
|
928
928
|
children: `The text to strip ANSI codes from.`
|
|
929
929
|
}),
|
|
930
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
930
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `The text with ANSI codes removed.` })
|
|
931
931
|
];
|
|
932
932
|
}
|
|
933
933
|
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
@@ -963,10 +963,10 @@ function DividerFunctionDeclaration() {
|
|
|
963
963
|
doc: "The width of the divider line. If not specified, the divider will span the full width of the console, minus the padding."
|
|
964
964
|
}),
|
|
965
965
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
966
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
966
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
967
967
|
heading: "The border of the divider line. Can be 'primary', 'secondary', 'tertiary', or 'none'. If not specified, the default border style will be used.",
|
|
968
968
|
get children() {
|
|
969
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
969
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `The value provided will determine the border style and color based on the current theme configuration.` }), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
970
970
|
type: "string",
|
|
971
971
|
defaultValue: "primary"
|
|
972
972
|
})];
|
|
@@ -979,10 +979,10 @@ function DividerFunctionDeclaration() {
|
|
|
979
979
|
doc: "The border style/color of the divider line. Can be 'primary', 'secondary', 'tertiary', or 'none'. If not specified, the default border style will be used."
|
|
980
980
|
}),
|
|
981
981
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
982
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
982
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
983
983
|
heading: "Padding to apply to the line",
|
|
984
984
|
get children() {
|
|
985
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
985
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.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.` }), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
986
986
|
type: "number",
|
|
987
987
|
get defaultValue() {
|
|
988
988
|
return theme.padding.app * 4;
|
|
@@ -998,11 +998,11 @@ function DividerFunctionDeclaration() {
|
|
|
998
998
|
];
|
|
999
999
|
}
|
|
1000
1000
|
}),
|
|
1001
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1002
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1001
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1002
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1003
1003
|
heading: "Write a horizontal divider line to the console.",
|
|
1004
1004
|
get children() {
|
|
1005
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1005
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocExample, { children: `divider({ width: 50, border: "primary" }); // Writes a horizontal divider line of width 50 with primary border.` }), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1006
1006
|
name: "options",
|
|
1007
1007
|
children: `Options for formatting the divider line.`
|
|
1008
1008
|
})];
|
|
@@ -1045,14 +1045,14 @@ function LinkFunctionDeclaration() {
|
|
|
1045
1045
|
type: "boolean",
|
|
1046
1046
|
doc: "Whether the link is external. If true, an external link icon will be displayed next to the link text (if supported by the terminal) and the link may be styled differently based on the current theme configuration."
|
|
1047
1047
|
}),
|
|
1048
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1048
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1049
1049
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceMember, {
|
|
1050
1050
|
name: "text",
|
|
1051
1051
|
optional: true,
|
|
1052
1052
|
type: "string",
|
|
1053
1053
|
doc: "The text to display for the link. If not provided, the URL will be used as the text."
|
|
1054
1054
|
}),
|
|
1055
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1055
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1056
1056
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceMember, {
|
|
1057
1057
|
name: "useTextWhenUnsupported",
|
|
1058
1058
|
optional: true,
|
|
@@ -1062,20 +1062,20 @@ function LinkFunctionDeclaration() {
|
|
|
1062
1062
|
];
|
|
1063
1063
|
}
|
|
1064
1064
|
}),
|
|
1065
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1066
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1065
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1066
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1067
1067
|
heading: "Render a hyperlink in the console.",
|
|
1068
1068
|
get children() {
|
|
1069
1069
|
return [
|
|
1070
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1070
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1071
1071
|
name: "url",
|
|
1072
1072
|
children: `The URL to render as a hyperlink.`
|
|
1073
1073
|
}),
|
|
1074
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1074
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1075
1075
|
name: "options",
|
|
1076
1076
|
children: `Options for formatting the hyperlink.`
|
|
1077
1077
|
}),
|
|
1078
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1078
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `The formatted hyperlink string for display in the console.` })
|
|
1079
1079
|
];
|
|
1080
1080
|
}
|
|
1081
1081
|
}),
|
|
@@ -1119,14 +1119,14 @@ function LinkFunctionDeclaration() {
|
|
|
1119
1119
|
function BlockquoteFunctionDeclaration() {
|
|
1120
1120
|
const theme = (0, _shell_shock_plugin_theme_contexts_theme.useTheme)();
|
|
1121
1121
|
return [
|
|
1122
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1123
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1122
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1123
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1124
1124
|
heading: `Format a string with blockquote styling for display in console.`,
|
|
1125
1125
|
get children() {
|
|
1126
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1126
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1127
1127
|
name: "text",
|
|
1128
1128
|
children: `The text to format with blockquote styling.`
|
|
1129
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1129
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `The formatted string with blockquote styling.` })];
|
|
1130
1130
|
}
|
|
1131
1131
|
}),
|
|
1132
1132
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
@@ -1159,14 +1159,14 @@ function BlockquoteFunctionDeclaration() {
|
|
|
1159
1159
|
function CodeFunctionDeclaration() {
|
|
1160
1160
|
const theme = (0, _shell_shock_plugin_theme_contexts_theme.useTheme)();
|
|
1161
1161
|
return [
|
|
1162
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1163
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1162
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1163
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1164
1164
|
heading: `Format a source code string for display in console.`,
|
|
1165
1165
|
get children() {
|
|
1166
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1166
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1167
1167
|
name: "text",
|
|
1168
1168
|
children: `The source code text to format with code styling.`
|
|
1169
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1169
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `The formatted string with code styling.` })];
|
|
1170
1170
|
}
|
|
1171
1171
|
}),
|
|
1172
1172
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
@@ -1202,14 +1202,14 @@ function CodeFunctionDeclaration() {
|
|
|
1202
1202
|
*/
|
|
1203
1203
|
function InlineCodeFunctionDeclaration() {
|
|
1204
1204
|
return [
|
|
1205
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1206
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1205
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1206
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1207
1207
|
heading: `Format a string with inline code styling for display in console.`,
|
|
1208
1208
|
get children() {
|
|
1209
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1209
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1210
1210
|
name: "text",
|
|
1211
1211
|
children: `The text to format with inline code styling.`
|
|
1212
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1212
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `The formatted string with inline code styling.` })];
|
|
1213
1213
|
}
|
|
1214
1214
|
}),
|
|
1215
1215
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
@@ -1230,6 +1230,271 @@ function InlineCodeFunctionDeclaration() {
|
|
|
1230
1230
|
];
|
|
1231
1231
|
}
|
|
1232
1232
|
/**
|
|
1233
|
+
* A component to generate the `shine` text animation in the `shell-shock:console` builtin module.
|
|
1234
|
+
*
|
|
1235
|
+
* Mirrors chalk-animation's `rainbow` frame loop, but paints a gray↔white shine instead of a hue spectrum.
|
|
1236
|
+
*
|
|
1237
|
+
* @see https://github.com/bokub/chalk-animation/blob/master/index.js
|
|
1238
|
+
*/
|
|
1239
|
+
function ShineFunctionDeclaration() {
|
|
1240
|
+
return [
|
|
1241
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
|
|
1242
|
+
"export": true,
|
|
1243
|
+
name: "TextAnimation",
|
|
1244
|
+
doc: "A console text animation controller returned by functions like `shine`.",
|
|
1245
|
+
get children() {
|
|
1246
|
+
return [
|
|
1247
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceMember, {
|
|
1248
|
+
name: "replace",
|
|
1249
|
+
type: "(str: string) => TextAnimation",
|
|
1250
|
+
doc: "Replace the animated text while the animation is running."
|
|
1251
|
+
}),
|
|
1252
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1253
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceMember, {
|
|
1254
|
+
name: "stop",
|
|
1255
|
+
type: "() => TextAnimation",
|
|
1256
|
+
doc: "Stop the animation."
|
|
1257
|
+
}),
|
|
1258
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1259
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceMember, {
|
|
1260
|
+
name: "start",
|
|
1261
|
+
type: "() => TextAnimation",
|
|
1262
|
+
doc: "Start or resume the animation."
|
|
1263
|
+
}),
|
|
1264
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1265
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceMember, {
|
|
1266
|
+
name: "frame",
|
|
1267
|
+
type: "() => string",
|
|
1268
|
+
doc: "Advance one frame and return the ANSI-colored output for the current text."
|
|
1269
|
+
})
|
|
1270
|
+
];
|
|
1271
|
+
}
|
|
1272
|
+
}),
|
|
1273
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1274
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
1275
|
+
"let": true,
|
|
1276
|
+
name: "currentTextAnimation",
|
|
1277
|
+
type: "TextAnimation | null",
|
|
1278
|
+
initializer: "null"
|
|
1279
|
+
}),
|
|
1280
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1281
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1282
|
+
name: "stopLastTextAnimation",
|
|
1283
|
+
doc: "Stop the currently running text animation, if any.",
|
|
1284
|
+
children: _alloy_js_core.code`if (currentTextAnimation) {
|
|
1285
|
+
currentTextAnimation.stop();
|
|
1286
|
+
} `
|
|
1287
|
+
}),
|
|
1288
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1289
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1290
|
+
heading: "Apply one frame of the gray/white shine effect to a string.",
|
|
1291
|
+
get children() {
|
|
1292
|
+
return [
|
|
1293
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `Uses the same phase advance as chalk-animation's rainbow effect (\`5 * frame\`), but maps the traveling wave to grayscale channels between gray and white instead of HSV hues.` }),
|
|
1294
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1295
|
+
name: "str",
|
|
1296
|
+
children: `The text to colorize for the given frame.`
|
|
1297
|
+
}),
|
|
1298
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1299
|
+
name: "frame",
|
|
1300
|
+
children: `The current animation frame index.`
|
|
1301
|
+
}),
|
|
1302
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `The input string with ANSI gray/white shine coloring applied for the frame.` })
|
|
1303
|
+
];
|
|
1304
|
+
}
|
|
1305
|
+
}),
|
|
1306
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1307
|
+
name: "applyShineEffect",
|
|
1308
|
+
parameters: [{
|
|
1309
|
+
name: "str",
|
|
1310
|
+
type: "string"
|
|
1311
|
+
}, {
|
|
1312
|
+
name: "frame",
|
|
1313
|
+
type: "number"
|
|
1314
|
+
}],
|
|
1315
|
+
children: _alloy_js_core.code`if (!isColorSupported) {
|
|
1316
|
+
return str;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
const chars = Array.from(str);
|
|
1320
|
+
const length = chars.length;
|
|
1321
|
+
if (length === 0) {
|
|
1322
|
+
return str;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
// Same phase advance as chalk-animation rainbow: hue = 5 * frame
|
|
1326
|
+
const phase = (5 * frame) % 360;
|
|
1327
|
+
const support = colorSupportLevels.stdout;
|
|
1328
|
+
const level =
|
|
1329
|
+
typeof support === "object" && support !== null && "level" in support
|
|
1330
|
+
? (support as { level: number }).level
|
|
1331
|
+
: typeof support === "number"
|
|
1332
|
+
? support
|
|
1333
|
+
: 3;
|
|
1334
|
+
|
|
1335
|
+
return chars
|
|
1336
|
+
.map((char, index) => {
|
|
1337
|
+
if (char === "\\n" || char === "\\r") {
|
|
1338
|
+
return char;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
// Traveling gray↔white wave across the string (rainbow-style shift)
|
|
1342
|
+
const angle =
|
|
1343
|
+
((index / Math.max(length - 1, 1)) * 360 + phase) % 360;
|
|
1344
|
+
const t = (Math.cos((angle * Math.PI) / 180) + 1) / 2;
|
|
1345
|
+
const channel = Math.round(128 + t * 127);
|
|
1346
|
+
|
|
1347
|
+
if (level >= 3) {
|
|
1348
|
+
return \`\\x1b[38;2;\${channel};\${channel};\${channel}m\${char}\\x1b[39m\`;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
if (level >= 2) {
|
|
1352
|
+
const ansi256 =
|
|
1353
|
+
channel < 8
|
|
1354
|
+
? 16
|
|
1355
|
+
: channel > 248
|
|
1356
|
+
? 231
|
|
1357
|
+
: Math.round(((channel - 8) / 247) * 24) + 232;
|
|
1358
|
+
return \`\\x1b[38;5;\${ansi256}m\${char}\\x1b[39m\`;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
return t > 0.6
|
|
1362
|
+
? \`\\x1b[37m\${char}\\x1b[39m\`
|
|
1363
|
+
: \`\\x1b[90m\${char}\\x1b[39m\`;
|
|
1364
|
+
})
|
|
1365
|
+
.join(""); `
|
|
1366
|
+
}),
|
|
1367
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1368
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1369
|
+
name: "animateText",
|
|
1370
|
+
parameters: [
|
|
1371
|
+
{
|
|
1372
|
+
name: "str",
|
|
1373
|
+
type: "string"
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
name: "effect",
|
|
1377
|
+
type: "(str: string, frame: number) => string"
|
|
1378
|
+
},
|
|
1379
|
+
{
|
|
1380
|
+
name: "delay",
|
|
1381
|
+
type: "number"
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
name: "speed",
|
|
1385
|
+
type: "number | undefined"
|
|
1386
|
+
}
|
|
1387
|
+
],
|
|
1388
|
+
children: _alloy_js_core.code`stopLastTextAnimation();
|
|
1389
|
+
|
|
1390
|
+
const resolvedSpeed = speed === undefined ? 1 : Number.parseFloat(String(speed));
|
|
1391
|
+
if (!resolvedSpeed || resolvedSpeed <= 0) {
|
|
1392
|
+
throw new Error("Expected \`speed\` to be a number greater than 0");
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
const log = console.log.bind(console);
|
|
1396
|
+
const animation: TextAnimation & {
|
|
1397
|
+
text: string[];
|
|
1398
|
+
lines: number;
|
|
1399
|
+
stopped: boolean;
|
|
1400
|
+
init: boolean;
|
|
1401
|
+
f: number;
|
|
1402
|
+
render: () => void;
|
|
1403
|
+
} = {
|
|
1404
|
+
text: str.split(/\\r\\n|\\r|\\n/),
|
|
1405
|
+
lines: str.split(/\\r\\n|\\r|\\n/).length,
|
|
1406
|
+
stopped: false,
|
|
1407
|
+
init: false,
|
|
1408
|
+
f: 0,
|
|
1409
|
+
render() {
|
|
1410
|
+
if (!this.init) {
|
|
1411
|
+
log("\\n".repeat(Math.max(this.lines - 1, 0)));
|
|
1412
|
+
this.init = true;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
log(this.frame());
|
|
1416
|
+
setTimeout(() => {
|
|
1417
|
+
if (!this.stopped) {
|
|
1418
|
+
this.render();
|
|
1419
|
+
}
|
|
1420
|
+
}, delay / resolvedSpeed);
|
|
1421
|
+
},
|
|
1422
|
+
frame() {
|
|
1423
|
+
this.f++;
|
|
1424
|
+
return (
|
|
1425
|
+
\`\\u001B[\${this.lines}F\\u001B[G\\u001B[2K\` +
|
|
1426
|
+
this.text.map(line => effect(line, this.f)).join("\\n")
|
|
1427
|
+
);
|
|
1428
|
+
},
|
|
1429
|
+
replace(next: string) {
|
|
1430
|
+
this.text = next.split(/\\r\\n|\\r|\\n/);
|
|
1431
|
+
this.lines = this.text.length;
|
|
1432
|
+
return this;
|
|
1433
|
+
},
|
|
1434
|
+
stop() {
|
|
1435
|
+
this.stopped = true;
|
|
1436
|
+
return this;
|
|
1437
|
+
},
|
|
1438
|
+
start() {
|
|
1439
|
+
this.stopped = false;
|
|
1440
|
+
this.render();
|
|
1441
|
+
return this;
|
|
1442
|
+
}
|
|
1443
|
+
};
|
|
1444
|
+
|
|
1445
|
+
currentTextAnimation = animation;
|
|
1446
|
+
|
|
1447
|
+
if (!isInteractive) {
|
|
1448
|
+
log(effect(str, 0));
|
|
1449
|
+
animation.stopped = true;
|
|
1450
|
+
return animation;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
setTimeout(() => {
|
|
1454
|
+
if (!animation.stopped) {
|
|
1455
|
+
animation.start();
|
|
1456
|
+
}
|
|
1457
|
+
}, delay / resolvedSpeed);
|
|
1458
|
+
|
|
1459
|
+
return animation; `
|
|
1460
|
+
}),
|
|
1461
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1462
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1463
|
+
heading: "Animate text with a gray/white shine effect.",
|
|
1464
|
+
get children() {
|
|
1465
|
+
return [
|
|
1466
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `Animates console text the same way chalk-animation's \`rainbow\` effect does — rewriting in-place on a frame timer — but uses a traveling gray-to-white highlight instead of a multi-hue spectrum.` }),
|
|
1467
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1468
|
+
name: "text",
|
|
1469
|
+
children: `The text to animate.`
|
|
1470
|
+
}),
|
|
1471
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1472
|
+
name: "speed",
|
|
1473
|
+
children: `Animation speed multiplier. Must be greater than \`0\`. Defaults to \`1\`.`
|
|
1474
|
+
}),
|
|
1475
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `A \`TextAnimation\` controller with \`start\`, \`stop\`, \`replace\`, and \`frame\` methods.` }),
|
|
1476
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocExample, { children: `const animation = shine("Shell Shock");
|
|
1477
|
+
// later...
|
|
1478
|
+
animation.stop();` })
|
|
1479
|
+
];
|
|
1480
|
+
}
|
|
1481
|
+
}),
|
|
1482
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1483
|
+
"export": true,
|
|
1484
|
+
name: "shine",
|
|
1485
|
+
parameters: [{
|
|
1486
|
+
name: "text",
|
|
1487
|
+
type: "string"
|
|
1488
|
+
}, {
|
|
1489
|
+
name: "speed",
|
|
1490
|
+
type: "number",
|
|
1491
|
+
optional: true
|
|
1492
|
+
}],
|
|
1493
|
+
children: _alloy_js_core.code`return animateText(text, applyShineEffect, 15, speed);`
|
|
1494
|
+
})
|
|
1495
|
+
];
|
|
1496
|
+
}
|
|
1497
|
+
/**
|
|
1233
1498
|
* A component to generate the `spinner` function in the `shell-shock:console` builtin module.
|
|
1234
1499
|
*/
|
|
1235
1500
|
function SpinnerFunctionDeclaration() {
|
|
@@ -1239,13 +1504,13 @@ function SpinnerFunctionDeclaration() {
|
|
|
1239
1504
|
name: "WriteStream",
|
|
1240
1505
|
children: `NodeJS.WriteStream;`
|
|
1241
1506
|
}),
|
|
1242
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1507
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1243
1508
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
1244
1509
|
"const": true,
|
|
1245
1510
|
name: "activeHooksPerStream",
|
|
1246
1511
|
initializer: "new Set();"
|
|
1247
1512
|
}),
|
|
1248
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1513
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1249
1514
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
|
|
1250
1515
|
"export": true,
|
|
1251
1516
|
name: "SpinnerOptions",
|
|
@@ -1275,100 +1540,100 @@ function SpinnerFunctionDeclaration() {
|
|
|
1275
1540
|
];
|
|
1276
1541
|
}
|
|
1277
1542
|
}),
|
|
1278
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1279
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1543
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1544
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassDeclaration, {
|
|
1280
1545
|
name: "Spinner",
|
|
1281
1546
|
get children() {
|
|
1282
1547
|
return [
|
|
1283
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1548
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1284
1549
|
name: "frames",
|
|
1285
1550
|
isPrivateMember: true,
|
|
1286
1551
|
type: "string[]"
|
|
1287
1552
|
}),
|
|
1288
1553
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1289
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1554
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1290
1555
|
name: "interval",
|
|
1291
1556
|
isPrivateMember: true,
|
|
1292
1557
|
type: "number"
|
|
1293
1558
|
}),
|
|
1294
1559
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1295
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1560
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1296
1561
|
name: "currentFrame",
|
|
1297
1562
|
isPrivateMember: true,
|
|
1298
1563
|
type: "number",
|
|
1299
1564
|
children: _alloy_js_core.code`-1`
|
|
1300
1565
|
}),
|
|
1301
1566
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1302
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1567
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1303
1568
|
name: "timer",
|
|
1304
1569
|
isPrivateMember: true,
|
|
1305
1570
|
optional: true,
|
|
1306
1571
|
type: "NodeJS.Timeout"
|
|
1307
1572
|
}),
|
|
1308
1573
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1309
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1574
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1310
1575
|
name: "message",
|
|
1311
1576
|
isPrivateMember: true,
|
|
1312
1577
|
type: "string",
|
|
1313
1578
|
children: _alloy_js_core.code`""`
|
|
1314
1579
|
}),
|
|
1315
1580
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1316
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1581
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1317
1582
|
name: "stream",
|
|
1318
1583
|
isPrivateMember: true,
|
|
1319
1584
|
type: "WriteStream",
|
|
1320
1585
|
children: _alloy_js_core.code`process.stderr`
|
|
1321
1586
|
}),
|
|
1322
1587
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1323
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1588
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1324
1589
|
name: "lines",
|
|
1325
1590
|
isPrivateMember: true,
|
|
1326
1591
|
type: "number",
|
|
1327
1592
|
children: _alloy_js_core.code`0`
|
|
1328
1593
|
}),
|
|
1329
1594
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1330
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1595
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1331
1596
|
name: "exitHandlerBound",
|
|
1332
1597
|
isPrivateMember: true,
|
|
1333
1598
|
type: "(signal: any) => void",
|
|
1334
1599
|
children: _alloy_js_core.code`() => {}`
|
|
1335
1600
|
}),
|
|
1336
1601
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1337
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1602
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1338
1603
|
name: "lastSpinnerFrameTime",
|
|
1339
1604
|
isPrivateMember: true,
|
|
1340
1605
|
type: "number",
|
|
1341
1606
|
children: _alloy_js_core.code`0`
|
|
1342
1607
|
}),
|
|
1343
1608
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1344
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1609
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1345
1610
|
name: "isSpinning",
|
|
1346
1611
|
isPrivateMember: true,
|
|
1347
1612
|
type: "boolean",
|
|
1348
1613
|
children: _alloy_js_core.code`false`
|
|
1349
1614
|
}),
|
|
1350
1615
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1351
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1616
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1352
1617
|
name: "hookedStreams",
|
|
1353
1618
|
isPrivateMember: true,
|
|
1354
1619
|
type: "Map<WriteStream, { write?: WriteStream[\"write\"]; originalWrite: WriteStream[\"write\"]; hookedWrite: WriteStream[\"write\"] }>",
|
|
1355
1620
|
children: _alloy_js_core.code`new Map()`
|
|
1356
1621
|
}),
|
|
1357
1622
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1358
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1623
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1359
1624
|
name: "isInternalWrite",
|
|
1360
1625
|
isPrivateMember: true,
|
|
1361
1626
|
type: "boolean",
|
|
1362
1627
|
children: _alloy_js_core.code`false`
|
|
1363
1628
|
}),
|
|
1364
1629
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1365
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1630
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassField, {
|
|
1366
1631
|
name: "isDeferringRender",
|
|
1367
1632
|
isPrivateMember: true,
|
|
1368
1633
|
type: "boolean",
|
|
1369
1634
|
children: _alloy_js_core.code`false`
|
|
1370
1635
|
}),
|
|
1371
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1636
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1372
1637
|
(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`constructor(options: SpinnerOptions = {}) {
|
|
1373
1638
|
const spinner = (typeof options.spinner === "string" ? resolveSpinner(options.spinner as SpinnerPreset) : options.spinner) ?? ${JSON.stringify(theme.spinner)};
|
|
1374
1639
|
this.#frames = spinner.frames;
|
|
@@ -1575,31 +1840,31 @@ function SpinnerFunctionDeclaration() {
|
|
|
1575
1840
|
|
|
1576
1841
|
process.exit(signal === "SIGINT" ? 130 : (signal === "SIGTERM" ? 143 : 1));
|
|
1577
1842
|
} `),
|
|
1578
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1843
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassPropertyGet, {
|
|
1579
1844
|
"public": true,
|
|
1580
1845
|
name: "isSpinning",
|
|
1581
1846
|
type: "boolean",
|
|
1582
1847
|
doc: "Whether the spinner is currently active and spinning.",
|
|
1583
1848
|
children: _alloy_js_core.code`return this.#isSpinning;`
|
|
1584
1849
|
}),
|
|
1585
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1586
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1850
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1851
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassPropertySet, {
|
|
1587
1852
|
"public": true,
|
|
1588
1853
|
name: "message",
|
|
1589
1854
|
type: "string",
|
|
1590
1855
|
doc: "Set the message displayed by the spinner.",
|
|
1591
1856
|
children: _alloy_js_core.code`this.#message = value;`
|
|
1592
1857
|
}),
|
|
1593
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1594
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1858
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1859
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassPropertyGet, {
|
|
1595
1860
|
"public": true,
|
|
1596
1861
|
name: "message",
|
|
1597
1862
|
type: "string",
|
|
1598
1863
|
doc: "Get the message displayed by the spinner.",
|
|
1599
1864
|
children: _alloy_js_core.code`return this.#message;`
|
|
1600
1865
|
}),
|
|
1601
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1602
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1866
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1867
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassMethod, {
|
|
1603
1868
|
name: "start",
|
|
1604
1869
|
doc: "Start the spinner animation.",
|
|
1605
1870
|
parameters: [{
|
|
@@ -1633,8 +1898,8 @@ function SpinnerFunctionDeclaration() {
|
|
|
1633
1898
|
];
|
|
1634
1899
|
}
|
|
1635
1900
|
}),
|
|
1636
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1637
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1901
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1902
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassMethod, {
|
|
1638
1903
|
name: "stop",
|
|
1639
1904
|
doc: "Stop the spinner animation.",
|
|
1640
1905
|
parameters: [{
|
|
@@ -1668,8 +1933,8 @@ function SpinnerFunctionDeclaration() {
|
|
|
1668
1933
|
|
|
1669
1934
|
`
|
|
1670
1935
|
}),
|
|
1671
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1672
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1936
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1937
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassMethod, {
|
|
1673
1938
|
name: "clear",
|
|
1674
1939
|
doc: "Clear the spinner animation.",
|
|
1675
1940
|
children: _alloy_js_core.code`if (!isInteractive) {
|
|
@@ -1695,8 +1960,8 @@ function SpinnerFunctionDeclaration() {
|
|
|
1695
1960
|
this.#lines = 0;
|
|
1696
1961
|
return this; `
|
|
1697
1962
|
}),
|
|
1698
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1699
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1963
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1964
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassMethod, {
|
|
1700
1965
|
name: "success",
|
|
1701
1966
|
doc: "Mark the spinner as successful.",
|
|
1702
1967
|
parameters: [{
|
|
@@ -1707,8 +1972,8 @@ function SpinnerFunctionDeclaration() {
|
|
|
1707
1972
|
return _alloy_js_core.code`return this.#stopWithIcon(textColors.spinner.icon.success("${theme.icons.spinner.success}"), textColors.spinner.message.success(message)); `;
|
|
1708
1973
|
}
|
|
1709
1974
|
}),
|
|
1710
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1711
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1975
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1976
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassMethod, {
|
|
1712
1977
|
name: "error",
|
|
1713
1978
|
doc: "Mark the spinner as failed.",
|
|
1714
1979
|
parameters: [{
|
|
@@ -1719,8 +1984,8 @@ function SpinnerFunctionDeclaration() {
|
|
|
1719
1984
|
return _alloy_js_core.code`return this.#stopWithIcon(textColors.spinner.icon.error("${theme.icons.spinner.error}"), textColors.spinner.message.error(message)); `;
|
|
1720
1985
|
}
|
|
1721
1986
|
}),
|
|
1722
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1723
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1987
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1988
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassMethod, {
|
|
1724
1989
|
name: "warning",
|
|
1725
1990
|
doc: "Mark the spinner as warning.",
|
|
1726
1991
|
parameters: [{
|
|
@@ -1731,8 +1996,8 @@ function SpinnerFunctionDeclaration() {
|
|
|
1731
1996
|
return _alloy_js_core.code`return this.#stopWithIcon(textColors.spinner.icon.warning("${theme.icons.spinner.warning}"), textColors.spinner.message.warning(message)); `;
|
|
1732
1997
|
}
|
|
1733
1998
|
}),
|
|
1734
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1735
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1999
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2000
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassMethod, {
|
|
1736
2001
|
name: "info",
|
|
1737
2002
|
doc: "Mark the spinner as informational.",
|
|
1738
2003
|
parameters: [{
|
|
@@ -1743,8 +2008,8 @@ function SpinnerFunctionDeclaration() {
|
|
|
1743
2008
|
return _alloy_js_core.code`return this.#stopWithIcon(textColors.spinner.icon.info("${theme.icons.spinner.info}"), textColors.spinner.message.info(message)); `;
|
|
1744
2009
|
}
|
|
1745
2010
|
}),
|
|
1746
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1747
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2011
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2012
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript.ClassMethod, {
|
|
1748
2013
|
name: "help",
|
|
1749
2014
|
doc: "Mark the spinner as help.",
|
|
1750
2015
|
parameters: [{
|
|
@@ -1755,18 +2020,18 @@ function SpinnerFunctionDeclaration() {
|
|
|
1755
2020
|
return _alloy_js_core.code`return this.#stopWithIcon(textColors.spinner.icon.help("${theme.icons.spinner.help}"), textColors.spinner.message.help(message)); `;
|
|
1756
2021
|
}
|
|
1757
2022
|
}),
|
|
1758
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2023
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {})
|
|
1759
2024
|
];
|
|
1760
2025
|
}
|
|
1761
2026
|
}),
|
|
1762
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1763
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2027
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2028
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1764
2029
|
heading: "Render a spinner in the console.",
|
|
1765
2030
|
get children() {
|
|
1766
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2031
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1767
2032
|
name: "options",
|
|
1768
2033
|
children: `Options for configuring the spinner, including the message to display, the output stream to write to, and the spinner animation to use.`
|
|
1769
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2034
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `An instance of the Spinner class, which can be used to control the spinner animation (e.g., start, stop, mark as success/error, etc.).` })];
|
|
1770
2035
|
}
|
|
1771
2036
|
}),
|
|
1772
2037
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
@@ -1802,17 +2067,17 @@ function TableFunctionDeclaration(props) {
|
|
|
1802
2067
|
doc: "A type representing the width size of an item in the console.",
|
|
1803
2068
|
children: _alloy_js_core.code`"full" | "1/1" | "1/2" | "1/3" | "1/4" | "1/5" | "1/6" | "1/12" | "1/24" | "100%" | "50%" | "33.33%" | "25%" | "20%" | "10%" | "5%" | "2.5%"`
|
|
1804
2069
|
}),
|
|
1805
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1806
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2070
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2071
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1807
2072
|
heading: "Determine if a value is a valid size token.",
|
|
1808
2073
|
get children() {
|
|
1809
2074
|
return [
|
|
1810
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1811
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2075
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `This function checks if the provided value is a valid size token, which can be one of the predefined strings representing common width sizes (e.g., "full", "1/2", "1/3", etc.) or percentage strings (e.g., "50%").` }),
|
|
2076
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1812
2077
|
name: "value",
|
|
1813
2078
|
children: `The value to check for being a valid size token.`
|
|
1814
2079
|
}),
|
|
1815
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2080
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `True if the value is a valid size token, false otherwise.` })
|
|
1816
2081
|
];
|
|
1817
2082
|
}
|
|
1818
2083
|
}),
|
|
@@ -1832,17 +2097,17 @@ function TableFunctionDeclaration(props) {
|
|
|
1832
2097
|
}), _alloy_js_core.code`return false; `];
|
|
1833
2098
|
}
|
|
1834
2099
|
}),
|
|
1835
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1836
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2100
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2101
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1837
2102
|
heading: "Calculate the width in characters based on the provided width size.",
|
|
1838
2103
|
get children() {
|
|
1839
2104
|
return [
|
|
1840
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1841
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2105
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `This function calculates the width in characters based on the provided width size, which can be a predefined string (e.g., "full", "1/2", "1/3", etc.) or a percentage string (e.g., "50%"). The calculation is based on the current width of the console (getTerminalSize().columns).` }),
|
|
2106
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1842
2107
|
name: "size",
|
|
1843
2108
|
children: `The width size to calculate. This can be a predefined string (e.g., "full", "1/2", "1/3", etc.) or a percentage string (e.g., "50%").`
|
|
1844
2109
|
}),
|
|
1845
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2110
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `The calculated width in characters.` })
|
|
1846
2111
|
];
|
|
1847
2112
|
}
|
|
1848
2113
|
}),
|
|
@@ -1897,7 +2162,7 @@ function TableFunctionDeclaration(props) {
|
|
|
1897
2162
|
|
|
1898
2163
|
throw new Error(\`Invalid width size: \${size}\`);
|
|
1899
2164
|
` }),
|
|
1900
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2165
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {})
|
|
1901
2166
|
];
|
|
1902
2167
|
}
|
|
1903
2168
|
}),
|
|
@@ -1907,20 +2172,20 @@ function TableFunctionDeclaration(props) {
|
|
|
1907
2172
|
doc: "The border options applied to table cells.",
|
|
1908
2173
|
children: _alloy_js_core.code`"primary" | "secondary" | "tertiary" | "none" | string; `
|
|
1909
2174
|
}),
|
|
1910
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2175
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1911
2176
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
|
|
1912
2177
|
"export": true,
|
|
1913
2178
|
name: "TableOutputOptions",
|
|
1914
2179
|
doc: "Options to customize the output of the {@link table} function.",
|
|
1915
2180
|
get children() {
|
|
1916
2181
|
return [
|
|
1917
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2182
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1918
2183
|
heading: "Border variant for the table cell.",
|
|
1919
2184
|
get children() {
|
|
1920
2185
|
return [
|
|
1921
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2186
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `The border variant to use for the table cell. This determines the color and style of the border around the cell.` }),
|
|
1922
2187
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1923
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2188
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
1924
2189
|
type: "any",
|
|
1925
2190
|
defaultValue: "primary"
|
|
1926
2191
|
})
|
|
@@ -1933,13 +2198,13 @@ function TableFunctionDeclaration(props) {
|
|
|
1933
2198
|
type: "BorderOption | { top?: BorderOption; right?: BorderOption; bottom?: BorderOption; left?: BorderOption; topLeft?: BorderOption; topRight?: BorderOption; bottomLeft?: BorderOption; bottomRight?: BorderOption; }"
|
|
1934
2199
|
}),
|
|
1935
2200
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1936
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2201
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1937
2202
|
heading: "Padding for the table cell.",
|
|
1938
2203
|
get children() {
|
|
1939
2204
|
return [
|
|
1940
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2205
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `The amount of padding (in spaces) to apply to the table cell. This value is applied to both the left and right sides of the cell. If not specified, the default table padding defined in the current theme configuration will be used.` }),
|
|
1941
2206
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1942
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2207
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
1943
2208
|
type: "any",
|
|
1944
2209
|
get defaultValue() {
|
|
1945
2210
|
return `\`${theme.padding.table}\``;
|
|
@@ -1954,13 +2219,13 @@ function TableFunctionDeclaration(props) {
|
|
|
1954
2219
|
type: "number"
|
|
1955
2220
|
}),
|
|
1956
2221
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1957
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2222
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1958
2223
|
heading: "Alignment for the table cell.",
|
|
1959
2224
|
get children() {
|
|
1960
2225
|
return [
|
|
1961
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2226
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `The alignment for the table cell. This determines how the text within the cell is aligned. If not specified, the default alignment is "left".` }),
|
|
1962
2227
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1963
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2228
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
1964
2229
|
type: "any",
|
|
1965
2230
|
defaultValue: "left"
|
|
1966
2231
|
})
|
|
@@ -1976,7 +2241,7 @@ function TableFunctionDeclaration(props) {
|
|
|
1976
2241
|
];
|
|
1977
2242
|
}
|
|
1978
2243
|
}),
|
|
1979
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2244
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1980
2245
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
|
|
1981
2246
|
"export": true,
|
|
1982
2247
|
name: "TableCellOptions",
|
|
@@ -1991,10 +2256,10 @@ function TableFunctionDeclaration(props) {
|
|
|
1991
2256
|
doc: "The actual string value of the table cell."
|
|
1992
2257
|
}),
|
|
1993
2258
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1994
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2259
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1995
2260
|
heading: "Width of the table cell.",
|
|
1996
2261
|
get children() {
|
|
1997
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2262
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `The width of the table cell (where 1 is a single character in the terminal). If not specified, the width will be determined based on the content of the cell and the available space in the console.` });
|
|
1998
2263
|
}
|
|
1999
2264
|
}),
|
|
2000
2265
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceMember, {
|
|
@@ -2005,7 +2270,7 @@ function TableFunctionDeclaration(props) {
|
|
|
2005
2270
|
];
|
|
2006
2271
|
}
|
|
2007
2272
|
}),
|
|
2008
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2273
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2009
2274
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
|
|
2010
2275
|
"export": true,
|
|
2011
2276
|
name: "TableRowOptions",
|
|
@@ -2020,7 +2285,7 @@ function TableFunctionDeclaration(props) {
|
|
|
2020
2285
|
}), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
2021
2286
|
}
|
|
2022
2287
|
}),
|
|
2023
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2288
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2024
2289
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
|
|
2025
2290
|
"export": true,
|
|
2026
2291
|
name: "TableOptions",
|
|
@@ -2035,7 +2300,7 @@ function TableFunctionDeclaration(props) {
|
|
|
2035
2300
|
}), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
2036
2301
|
}
|
|
2037
2302
|
}),
|
|
2038
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2303
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2039
2304
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
|
|
2040
2305
|
name: "Dimensions",
|
|
2041
2306
|
doc: "The height and width for a specific table/cell used internally in the {@link table} function.",
|
|
@@ -2056,7 +2321,7 @@ function TableFunctionDeclaration(props) {
|
|
|
2056
2321
|
];
|
|
2057
2322
|
}
|
|
2058
2323
|
}),
|
|
2059
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2324
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2060
2325
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
|
|
2061
2326
|
name: "TableCellBorder",
|
|
2062
2327
|
doc: "The resolved complete border styles for a table cell.",
|
|
@@ -2113,7 +2378,7 @@ function TableFunctionDeclaration(props) {
|
|
|
2113
2378
|
];
|
|
2114
2379
|
}
|
|
2115
2380
|
}),
|
|
2116
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2381
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2117
2382
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.TypeDeclaration, {
|
|
2118
2383
|
name: "TableCell",
|
|
2119
2384
|
doc: "The internal state of a formatted table cell in the {@link table} function.",
|
|
@@ -2123,14 +2388,14 @@ function TableFunctionDeclaration(props) {
|
|
|
2123
2388
|
};
|
|
2124
2389
|
`
|
|
2125
2390
|
}),
|
|
2126
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2127
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2391
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2392
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
2128
2393
|
heading: "Write a table to the console.",
|
|
2129
2394
|
get children() {
|
|
2130
2395
|
return [
|
|
2131
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2396
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: `This function writes a table to the console, applying the appropriate padding as defined in the current theme configuration and wrapping as needed.` }),
|
|
2132
2397
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
2133
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2398
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
2134
2399
|
name: "options",
|
|
2135
2400
|
children: `Options to customize the table output.`
|
|
2136
2401
|
})
|
|
@@ -2152,7 +2417,7 @@ function TableFunctionDeclaration(props) {
|
|
|
2152
2417
|
(Array.isArray(options) && !options.every(item => typeof item === "object" || typeof item === "string" || Array.isArray(item))) `,
|
|
2153
2418
|
children: _alloy_js_core.code`return;`
|
|
2154
2419
|
}),
|
|
2155
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2420
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2156
2421
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
2157
2422
|
"let": true,
|
|
2158
2423
|
name: "cells",
|
|
@@ -2470,7 +2735,7 @@ cells.forEach((row, rowIndex) => {
|
|
|
2470
2735
|
*/
|
|
2471
2736
|
function ConsoleBuiltin(props) {
|
|
2472
2737
|
const { children, imports, builtinImports } = props;
|
|
2473
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2738
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_shell_shock_core_contexts_power_plant.BuiltinFile, {
|
|
2474
2739
|
id: "console",
|
|
2475
2740
|
description: "A collection of helper utilities to assist in generating content meant for display in the console.",
|
|
2476
2741
|
get imports() {
|
|
@@ -2501,46 +2766,48 @@ function ConsoleBuiltin(props) {
|
|
|
2501
2766
|
get children() {
|
|
2502
2767
|
return [
|
|
2503
2768
|
(0, _alloy_js_core_jsx_runtime.createComponent)(AnsiHelpersDeclarations, {}),
|
|
2504
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2769
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2505
2770
|
(0, _alloy_js_core_jsx_runtime.createComponent)(StripAnsiFunctionDeclaration, {}),
|
|
2506
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2771
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2507
2772
|
(0, _alloy_js_core_jsx_runtime.createComponent)(WrapAnsiFunction, {}),
|
|
2508
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2773
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2509
2774
|
(0, _alloy_js_core_jsx_runtime.createComponent)(AnsiStyleFunctionsDeclaration, {}),
|
|
2510
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2775
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2511
2776
|
(0, _alloy_js_core_jsx_runtime.createComponent)(WriteFunctionDeclaration, {}),
|
|
2512
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2777
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2513
2778
|
(0, _alloy_js_core_jsx_runtime.createComponent)(WriteLineFunctionDeclaration, {}),
|
|
2514
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2779
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2515
2780
|
(0, _alloy_js_core_jsx_runtime.createComponent)(SplitTextFunctionDeclaration, {}),
|
|
2516
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2781
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2517
2782
|
(0, _alloy_js_core_jsx_runtime.createComponent)(LinkFunctionDeclaration, {}),
|
|
2518
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2783
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2519
2784
|
(0, _alloy_js_core_jsx_runtime.createComponent)(DividerFunctionDeclaration, {}),
|
|
2520
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2785
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2786
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(ShineFunctionDeclaration, {}),
|
|
2787
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2521
2788
|
(0, _alloy_js_core_jsx_runtime.createComponent)(SpinnerFunctionDeclaration, {}),
|
|
2522
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2789
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2523
2790
|
(0, _alloy_js_core_jsx_runtime.createComponent)(MessageFunctionDeclaration, {
|
|
2524
2791
|
type: "help",
|
|
2525
2792
|
variant: "help",
|
|
2526
2793
|
consoleFnName: "log",
|
|
2527
2794
|
description: "help"
|
|
2528
2795
|
}),
|
|
2529
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2796
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2530
2797
|
(0, _alloy_js_core_jsx_runtime.createComponent)(MessageFunctionDeclaration, {
|
|
2531
2798
|
type: "success",
|
|
2532
2799
|
variant: "success",
|
|
2533
2800
|
consoleFnName: "info",
|
|
2534
2801
|
description: "success"
|
|
2535
2802
|
}),
|
|
2536
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2803
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2537
2804
|
(0, _alloy_js_core_jsx_runtime.createComponent)(MessageFunctionDeclaration, {
|
|
2538
2805
|
type: "info",
|
|
2539
2806
|
variant: "info",
|
|
2540
2807
|
consoleFnName: "info",
|
|
2541
2808
|
description: "informational"
|
|
2542
2809
|
}),
|
|
2543
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2810
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2544
2811
|
(0, _alloy_js_core_jsx_runtime.createComponent)(MessageFunctionDeclaration, {
|
|
2545
2812
|
type: "debug",
|
|
2546
2813
|
variant: "debug",
|
|
@@ -2556,7 +2823,7 @@ function ConsoleBuiltin(props) {
|
|
|
2556
2823
|
});
|
|
2557
2824
|
}
|
|
2558
2825
|
}),
|
|
2559
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2826
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2560
2827
|
(0, _alloy_js_core_jsx_runtime.createComponent)(MessageFunctionDeclaration, {
|
|
2561
2828
|
type: "verbose",
|
|
2562
2829
|
variant: "info",
|
|
@@ -2573,21 +2840,21 @@ function ConsoleBuiltin(props) {
|
|
|
2573
2840
|
});
|
|
2574
2841
|
}
|
|
2575
2842
|
}),
|
|
2576
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2843
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2577
2844
|
(0, _alloy_js_core_jsx_runtime.createComponent)(MessageFunctionDeclaration, {
|
|
2578
2845
|
type: "warn",
|
|
2579
2846
|
variant: "warning",
|
|
2580
2847
|
consoleFnName: "warn",
|
|
2581
2848
|
description: "warning"
|
|
2582
2849
|
}),
|
|
2583
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2850
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2584
2851
|
(0, _alloy_js_core_jsx_runtime.createComponent)(MessageFunctionDeclaration, {
|
|
2585
2852
|
type: "danger",
|
|
2586
2853
|
variant: "danger",
|
|
2587
2854
|
consoleFnName: "error",
|
|
2588
2855
|
description: "destructive/danger"
|
|
2589
2856
|
}),
|
|
2590
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2857
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2591
2858
|
(0, _alloy_js_core_jsx_runtime.createComponent)(MessageFunctionDeclaration, {
|
|
2592
2859
|
type: "error",
|
|
2593
2860
|
variant: "error",
|
|
@@ -2610,13 +2877,13 @@ function ConsoleBuiltin(props) {
|
|
|
2610
2877
|
name: "message",
|
|
2611
2878
|
type: "string | undefined"
|
|
2612
2879
|
}),
|
|
2613
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2880
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2614
2881
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
2615
2882
|
condition: _alloy_js_core.code`(err as { message: string; stack?: string })?.message`,
|
|
2616
2883
|
children: _alloy_js_core.code`message = (err as { message: string; stack?: string }).message;`
|
|
2617
2884
|
}),
|
|
2618
2885
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseClause, { children: _alloy_js_core.code`message = String(err);` }),
|
|
2619
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2886
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2620
2887
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
2621
2888
|
condition: _alloy_js_core.code`env.STACKTRACE && typeof err === "object" && (err as { stack?: string })?.stack`,
|
|
2622
2889
|
children: _alloy_js_core.code`message += " \\n\\n" + (err as { stack: string }).stack.split("\\n").slice(1).map(line => {
|
|
@@ -2632,17 +2899,17 @@ function ConsoleBuiltin(props) {
|
|
|
2632
2899
|
];
|
|
2633
2900
|
}
|
|
2634
2901
|
}),
|
|
2635
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2902
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2636
2903
|
(0, _alloy_js_core_jsx_runtime.createComponent)(TableFunctionDeclaration, {}),
|
|
2637
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2904
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2638
2905
|
(0, _alloy_js_core_jsx_runtime.createComponent)(BlockquoteFunctionDeclaration, {}),
|
|
2639
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2906
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2640
2907
|
(0, _alloy_js_core_jsx_runtime.createComponent)(CodeFunctionDeclaration, {}),
|
|
2641
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2908
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2642
2909
|
(0, _alloy_js_core_jsx_runtime.createComponent)(InlineCodeFunctionDeclaration, {}),
|
|
2643
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2910
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
2644
2911
|
children,
|
|
2645
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
2912
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {})
|
|
2646
2913
|
];
|
|
2647
2914
|
}
|
|
2648
2915
|
});
|
|
@@ -2658,6 +2925,7 @@ exports.DividerFunctionDeclaration = DividerFunctionDeclaration;
|
|
|
2658
2925
|
exports.InlineCodeFunctionDeclaration = InlineCodeFunctionDeclaration;
|
|
2659
2926
|
exports.LinkFunctionDeclaration = LinkFunctionDeclaration;
|
|
2660
2927
|
exports.MessageFunctionDeclaration = MessageFunctionDeclaration;
|
|
2928
|
+
exports.ShineFunctionDeclaration = ShineFunctionDeclaration;
|
|
2661
2929
|
exports.SpinnerFunctionDeclaration = SpinnerFunctionDeclaration;
|
|
2662
2930
|
exports.SplitTextFunctionDeclaration = SplitTextFunctionDeclaration;
|
|
2663
2931
|
exports.StripAnsiFunctionDeclaration = StripAnsiFunctionDeclaration;
|