@shell-shock/plugin-console 0.2.26 → 0.2.28
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-BsXspqTY.cjs +39 -0
- package/dist/generator-CI1BFzOW.mjs +35 -0
- package/dist/generator-CI1BFzOW.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
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Children } from "@alloy-js/core";
|
|
2
2
|
import { FunctionDeclarationProps } from "@alloy-js/typescript";
|
|
3
|
-
import { BuiltinFileProps } from "@
|
|
3
|
+
import { BuiltinFileProps } from "@shell-shock/core/contexts/power-plant";
|
|
4
4
|
import { ThemeMessageVariant } from "@shell-shock/plugin-theme";
|
|
5
5
|
import { AnsiColorWrappers } from "@shell-shock/plugin-theme/helpers/ansi-utils";
|
|
6
|
-
|
|
7
6
|
//#region src/components/console-builtin.d.ts
|
|
8
7
|
declare function AnsiHelpersDeclarations(): Children;
|
|
9
8
|
interface ThemeColorNode {
|
|
@@ -75,6 +74,14 @@ declare function CodeFunctionDeclaration(): Children;
|
|
|
75
74
|
* A component to generate the `inlineCode` function declaration
|
|
76
75
|
*/
|
|
77
76
|
declare function InlineCodeFunctionDeclaration(): Children;
|
|
77
|
+
/**
|
|
78
|
+
* A component to generate the `shine` text animation in the `shell-shock:console` builtin module.
|
|
79
|
+
*
|
|
80
|
+
* Mirrors chalk-animation's `rainbow` frame loop, but paints a gray↔white shine instead of a hue spectrum.
|
|
81
|
+
*
|
|
82
|
+
* @see https://github.com/bokub/chalk-animation/blob/master/index.js
|
|
83
|
+
*/
|
|
84
|
+
declare function ShineFunctionDeclaration(): Children;
|
|
78
85
|
/**
|
|
79
86
|
* A component to generate the `spinner` function in the `shell-shock:console` builtin module.
|
|
80
87
|
*/
|
|
@@ -93,5 +100,5 @@ type ConsoleBuiltinProps = Pick<BuiltinFileProps, "children" | "imports" | "buil
|
|
|
93
100
|
*/
|
|
94
101
|
declare function ConsoleBuiltin(props: ConsoleBuiltinProps): Children;
|
|
95
102
|
//#endregion
|
|
96
|
-
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
103
|
+
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, ShineFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
97
104
|
//# sourceMappingURL=console-builtin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console-builtin.d.cts","names":[],"sources":["../../src/components/console-builtin.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"console-builtin.d.cts","names":[],"sources":["../../src/components/console-builtin.tsx"],"mappings":";;;;;;iBAiEgB,2BAAuB;UA8L7B;GACP,cAAc,oBAAoB;;UAG3B;EACR;EACA;EACA,QAAQ;EACR,SAAS;EACT,SAAS;;iBAGK,yBAAyB,OAAO,4BAAyB;iBA0EzD,2BAA2B,OAAO,4BAAyB;;;;iBA8E3D,iCAA6B;;;;iBAiK7B,gCAA4B;;;;iBAiL5B,4BAAwB;;;;iBA6DxB,gCAA4B;KAqEhC,kCAAkC,QAC5C,KAAK;EAEL;EASA,SAAS;EACT,QAAQ;EACR;EACA;EACA,SAAS;EACT;;;;;iBAMc,2BACd,OAAO,kCAA+B;;;;iBAkLxB,oBAAgB;;;;iBA4EhB,gCAA4B;;;;iBAmC5B,8BAA0B;;;;iBAiF1B,2BAAuB;;;;iBA0EvB,iCAA6B;;;;iBA4C7B,2BAAuB;;;;iBAkDvB,iCAA6B;;;;;;;;iBAuC7B,4BAAwB;;;;iBAwOxB,8BAA0B;;;;KA0hB9B,gCAAgC,KAC1C;;;;iBAOc,yBAAyB,OAAO,gCAA6B;KAonBjE,sBAAsB,KAChC;;;;iBAOc,eAAe,OAAO,sBAAmB"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ThemeMessageVariant } from "@shell-shock/plugin-theme";
|
|
2
2
|
import { Children } from "@alloy-js/core";
|
|
3
3
|
import { FunctionDeclarationProps } from "@alloy-js/typescript";
|
|
4
|
-
import { BuiltinFileProps } from "@
|
|
4
|
+
import { BuiltinFileProps } from "@shell-shock/core/contexts/power-plant";
|
|
5
5
|
import { AnsiColorWrappers } from "@shell-shock/plugin-theme/helpers/ansi-utils";
|
|
6
|
-
|
|
7
6
|
//#region src/components/console-builtin.d.ts
|
|
8
7
|
declare function AnsiHelpersDeclarations(): Children;
|
|
9
8
|
interface ThemeColorNode {
|
|
@@ -75,6 +74,14 @@ declare function CodeFunctionDeclaration(): Children;
|
|
|
75
74
|
* A component to generate the `inlineCode` function declaration
|
|
76
75
|
*/
|
|
77
76
|
declare function InlineCodeFunctionDeclaration(): Children;
|
|
77
|
+
/**
|
|
78
|
+
* A component to generate the `shine` text animation in the `shell-shock:console` builtin module.
|
|
79
|
+
*
|
|
80
|
+
* Mirrors chalk-animation's `rainbow` frame loop, but paints a gray↔white shine instead of a hue spectrum.
|
|
81
|
+
*
|
|
82
|
+
* @see https://github.com/bokub/chalk-animation/blob/master/index.js
|
|
83
|
+
*/
|
|
84
|
+
declare function ShineFunctionDeclaration(): Children;
|
|
78
85
|
/**
|
|
79
86
|
* A component to generate the `spinner` function in the `shell-shock:console` builtin module.
|
|
80
87
|
*/
|
|
@@ -93,5 +100,5 @@ type ConsoleBuiltinProps = Pick<BuiltinFileProps, "children" | "imports" | "buil
|
|
|
93
100
|
*/
|
|
94
101
|
declare function ConsoleBuiltin(props: ConsoleBuiltinProps): Children;
|
|
95
102
|
//#endregion
|
|
96
|
-
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
103
|
+
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, ShineFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
97
104
|
//# sourceMappingURL=console-builtin.d.mts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
2
2
|
import { For, Show, code } from "@alloy-js/core";
|
|
3
3
|
import { ElseClause, ElseIfClause, FunctionDeclaration, IfStatement, InterfaceDeclaration, InterfaceMember, TypeDeclaration, VarDeclaration } from "@alloy-js/typescript";
|
|
4
|
-
import { Spacing } from "@
|
|
5
|
-
import { ClassDeclaration, ClassField, ClassMethod, ClassPropertyGet, ClassPropertySet } from "@
|
|
6
|
-
import {
|
|
7
|
-
import { TSDoc, TSDocDefaultValue, TSDocExample, TSDocParam, TSDocRemarks, TSDocReturns } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
4
|
+
import { Spacing } from "@power-plant/alloy-js/core/components/spacing";
|
|
5
|
+
import { ClassDeclaration, ClassField, ClassMethod, ClassPropertyGet, ClassPropertySet } from "@power-plant/alloy-js/typescript";
|
|
6
|
+
import { TSDoc, TSDocDefaultValue, TSDocExample, TSDocParam, TSDocRemarks, TSDocReturns } from "@power-plant/alloy-js/typescript/components/tsdoc";
|
|
8
7
|
import { IsNotDebug, IsNotVerbose } from "@shell-shock/core/components/helpers";
|
|
8
|
+
import { BuiltinFile } from "@shell-shock/core/contexts/power-plant";
|
|
9
9
|
import { useColors, useTheme } from "@shell-shock/plugin-theme/contexts/theme";
|
|
10
10
|
import { colorKeys, modifierKeys } from "@shell-shock/plugin-theme/helpers/ansi-utils";
|
|
11
11
|
import { camelCase, titleCase } from "@stryke/string-format";
|
|
@@ -1229,6 +1229,271 @@ function InlineCodeFunctionDeclaration() {
|
|
|
1229
1229
|
];
|
|
1230
1230
|
}
|
|
1231
1231
|
/**
|
|
1232
|
+
* A component to generate the `shine` text animation in the `shell-shock:console` builtin module.
|
|
1233
|
+
*
|
|
1234
|
+
* Mirrors chalk-animation's `rainbow` frame loop, but paints a gray↔white shine instead of a hue spectrum.
|
|
1235
|
+
*
|
|
1236
|
+
* @see https://github.com/bokub/chalk-animation/blob/master/index.js
|
|
1237
|
+
*/
|
|
1238
|
+
function ShineFunctionDeclaration() {
|
|
1239
|
+
return [
|
|
1240
|
+
createComponent(InterfaceDeclaration, {
|
|
1241
|
+
"export": true,
|
|
1242
|
+
name: "TextAnimation",
|
|
1243
|
+
doc: "A console text animation controller returned by functions like `shine`.",
|
|
1244
|
+
get children() {
|
|
1245
|
+
return [
|
|
1246
|
+
createComponent(InterfaceMember, {
|
|
1247
|
+
name: "replace",
|
|
1248
|
+
type: "(str: string) => TextAnimation",
|
|
1249
|
+
doc: "Replace the animated text while the animation is running."
|
|
1250
|
+
}),
|
|
1251
|
+
createIntrinsic("hbr", {}),
|
|
1252
|
+
createComponent(InterfaceMember, {
|
|
1253
|
+
name: "stop",
|
|
1254
|
+
type: "() => TextAnimation",
|
|
1255
|
+
doc: "Stop the animation."
|
|
1256
|
+
}),
|
|
1257
|
+
createIntrinsic("hbr", {}),
|
|
1258
|
+
createComponent(InterfaceMember, {
|
|
1259
|
+
name: "start",
|
|
1260
|
+
type: "() => TextAnimation",
|
|
1261
|
+
doc: "Start or resume the animation."
|
|
1262
|
+
}),
|
|
1263
|
+
createIntrinsic("hbr", {}),
|
|
1264
|
+
createComponent(InterfaceMember, {
|
|
1265
|
+
name: "frame",
|
|
1266
|
+
type: "() => string",
|
|
1267
|
+
doc: "Advance one frame and return the ANSI-colored output for the current text."
|
|
1268
|
+
})
|
|
1269
|
+
];
|
|
1270
|
+
}
|
|
1271
|
+
}),
|
|
1272
|
+
createComponent(Spacing, {}),
|
|
1273
|
+
createComponent(VarDeclaration, {
|
|
1274
|
+
"let": true,
|
|
1275
|
+
name: "currentTextAnimation",
|
|
1276
|
+
type: "TextAnimation | null",
|
|
1277
|
+
initializer: "null"
|
|
1278
|
+
}),
|
|
1279
|
+
createComponent(Spacing, {}),
|
|
1280
|
+
createComponent(FunctionDeclaration, {
|
|
1281
|
+
name: "stopLastTextAnimation",
|
|
1282
|
+
doc: "Stop the currently running text animation, if any.",
|
|
1283
|
+
children: code`if (currentTextAnimation) {
|
|
1284
|
+
currentTextAnimation.stop();
|
|
1285
|
+
} `
|
|
1286
|
+
}),
|
|
1287
|
+
createComponent(Spacing, {}),
|
|
1288
|
+
createComponent(TSDoc, {
|
|
1289
|
+
heading: "Apply one frame of the gray/white shine effect to a string.",
|
|
1290
|
+
get children() {
|
|
1291
|
+
return [
|
|
1292
|
+
createComponent(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.` }),
|
|
1293
|
+
createComponent(TSDocParam, {
|
|
1294
|
+
name: "str",
|
|
1295
|
+
children: `The text to colorize for the given frame.`
|
|
1296
|
+
}),
|
|
1297
|
+
createComponent(TSDocParam, {
|
|
1298
|
+
name: "frame",
|
|
1299
|
+
children: `The current animation frame index.`
|
|
1300
|
+
}),
|
|
1301
|
+
createComponent(TSDocReturns, { children: `The input string with ANSI gray/white shine coloring applied for the frame.` })
|
|
1302
|
+
];
|
|
1303
|
+
}
|
|
1304
|
+
}),
|
|
1305
|
+
createComponent(FunctionDeclaration, {
|
|
1306
|
+
name: "applyShineEffect",
|
|
1307
|
+
parameters: [{
|
|
1308
|
+
name: "str",
|
|
1309
|
+
type: "string"
|
|
1310
|
+
}, {
|
|
1311
|
+
name: "frame",
|
|
1312
|
+
type: "number"
|
|
1313
|
+
}],
|
|
1314
|
+
children: code`if (!isColorSupported) {
|
|
1315
|
+
return str;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
const chars = Array.from(str);
|
|
1319
|
+
const length = chars.length;
|
|
1320
|
+
if (length === 0) {
|
|
1321
|
+
return str;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
// Same phase advance as chalk-animation rainbow: hue = 5 * frame
|
|
1325
|
+
const phase = (5 * frame) % 360;
|
|
1326
|
+
const support = colorSupportLevels.stdout;
|
|
1327
|
+
const level =
|
|
1328
|
+
typeof support === "object" && support !== null && "level" in support
|
|
1329
|
+
? (support as { level: number }).level
|
|
1330
|
+
: typeof support === "number"
|
|
1331
|
+
? support
|
|
1332
|
+
: 3;
|
|
1333
|
+
|
|
1334
|
+
return chars
|
|
1335
|
+
.map((char, index) => {
|
|
1336
|
+
if (char === "\\n" || char === "\\r") {
|
|
1337
|
+
return char;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
// Traveling gray↔white wave across the string (rainbow-style shift)
|
|
1341
|
+
const angle =
|
|
1342
|
+
((index / Math.max(length - 1, 1)) * 360 + phase) % 360;
|
|
1343
|
+
const t = (Math.cos((angle * Math.PI) / 180) + 1) / 2;
|
|
1344
|
+
const channel = Math.round(128 + t * 127);
|
|
1345
|
+
|
|
1346
|
+
if (level >= 3) {
|
|
1347
|
+
return \`\\x1b[38;2;\${channel};\${channel};\${channel}m\${char}\\x1b[39m\`;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
if (level >= 2) {
|
|
1351
|
+
const ansi256 =
|
|
1352
|
+
channel < 8
|
|
1353
|
+
? 16
|
|
1354
|
+
: channel > 248
|
|
1355
|
+
? 231
|
|
1356
|
+
: Math.round(((channel - 8) / 247) * 24) + 232;
|
|
1357
|
+
return \`\\x1b[38;5;\${ansi256}m\${char}\\x1b[39m\`;
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
return t > 0.6
|
|
1361
|
+
? \`\\x1b[37m\${char}\\x1b[39m\`
|
|
1362
|
+
: \`\\x1b[90m\${char}\\x1b[39m\`;
|
|
1363
|
+
})
|
|
1364
|
+
.join(""); `
|
|
1365
|
+
}),
|
|
1366
|
+
createComponent(Spacing, {}),
|
|
1367
|
+
createComponent(FunctionDeclaration, {
|
|
1368
|
+
name: "animateText",
|
|
1369
|
+
parameters: [
|
|
1370
|
+
{
|
|
1371
|
+
name: "str",
|
|
1372
|
+
type: "string"
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
name: "effect",
|
|
1376
|
+
type: "(str: string, frame: number) => string"
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
name: "delay",
|
|
1380
|
+
type: "number"
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
name: "speed",
|
|
1384
|
+
type: "number | undefined"
|
|
1385
|
+
}
|
|
1386
|
+
],
|
|
1387
|
+
children: code`stopLastTextAnimation();
|
|
1388
|
+
|
|
1389
|
+
const resolvedSpeed = speed === undefined ? 1 : Number.parseFloat(String(speed));
|
|
1390
|
+
if (!resolvedSpeed || resolvedSpeed <= 0) {
|
|
1391
|
+
throw new Error("Expected \`speed\` to be a number greater than 0");
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
const log = console.log.bind(console);
|
|
1395
|
+
const animation: TextAnimation & {
|
|
1396
|
+
text: string[];
|
|
1397
|
+
lines: number;
|
|
1398
|
+
stopped: boolean;
|
|
1399
|
+
init: boolean;
|
|
1400
|
+
f: number;
|
|
1401
|
+
render: () => void;
|
|
1402
|
+
} = {
|
|
1403
|
+
text: str.split(/\\r\\n|\\r|\\n/),
|
|
1404
|
+
lines: str.split(/\\r\\n|\\r|\\n/).length,
|
|
1405
|
+
stopped: false,
|
|
1406
|
+
init: false,
|
|
1407
|
+
f: 0,
|
|
1408
|
+
render() {
|
|
1409
|
+
if (!this.init) {
|
|
1410
|
+
log("\\n".repeat(Math.max(this.lines - 1, 0)));
|
|
1411
|
+
this.init = true;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
log(this.frame());
|
|
1415
|
+
setTimeout(() => {
|
|
1416
|
+
if (!this.stopped) {
|
|
1417
|
+
this.render();
|
|
1418
|
+
}
|
|
1419
|
+
}, delay / resolvedSpeed);
|
|
1420
|
+
},
|
|
1421
|
+
frame() {
|
|
1422
|
+
this.f++;
|
|
1423
|
+
return (
|
|
1424
|
+
\`\\u001B[\${this.lines}F\\u001B[G\\u001B[2K\` +
|
|
1425
|
+
this.text.map(line => effect(line, this.f)).join("\\n")
|
|
1426
|
+
);
|
|
1427
|
+
},
|
|
1428
|
+
replace(next: string) {
|
|
1429
|
+
this.text = next.split(/\\r\\n|\\r|\\n/);
|
|
1430
|
+
this.lines = this.text.length;
|
|
1431
|
+
return this;
|
|
1432
|
+
},
|
|
1433
|
+
stop() {
|
|
1434
|
+
this.stopped = true;
|
|
1435
|
+
return this;
|
|
1436
|
+
},
|
|
1437
|
+
start() {
|
|
1438
|
+
this.stopped = false;
|
|
1439
|
+
this.render();
|
|
1440
|
+
return this;
|
|
1441
|
+
}
|
|
1442
|
+
};
|
|
1443
|
+
|
|
1444
|
+
currentTextAnimation = animation;
|
|
1445
|
+
|
|
1446
|
+
if (!isInteractive) {
|
|
1447
|
+
log(effect(str, 0));
|
|
1448
|
+
animation.stopped = true;
|
|
1449
|
+
return animation;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
setTimeout(() => {
|
|
1453
|
+
if (!animation.stopped) {
|
|
1454
|
+
animation.start();
|
|
1455
|
+
}
|
|
1456
|
+
}, delay / resolvedSpeed);
|
|
1457
|
+
|
|
1458
|
+
return animation; `
|
|
1459
|
+
}),
|
|
1460
|
+
createComponent(Spacing, {}),
|
|
1461
|
+
createComponent(TSDoc, {
|
|
1462
|
+
heading: "Animate text with a gray/white shine effect.",
|
|
1463
|
+
get children() {
|
|
1464
|
+
return [
|
|
1465
|
+
createComponent(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.` }),
|
|
1466
|
+
createComponent(TSDocParam, {
|
|
1467
|
+
name: "text",
|
|
1468
|
+
children: `The text to animate.`
|
|
1469
|
+
}),
|
|
1470
|
+
createComponent(TSDocParam, {
|
|
1471
|
+
name: "speed",
|
|
1472
|
+
children: `Animation speed multiplier. Must be greater than \`0\`. Defaults to \`1\`.`
|
|
1473
|
+
}),
|
|
1474
|
+
createComponent(TSDocReturns, { children: `A \`TextAnimation\` controller with \`start\`, \`stop\`, \`replace\`, and \`frame\` methods.` }),
|
|
1475
|
+
createComponent(TSDocExample, { children: `const animation = shine("Shell Shock");
|
|
1476
|
+
// later...
|
|
1477
|
+
animation.stop();` })
|
|
1478
|
+
];
|
|
1479
|
+
}
|
|
1480
|
+
}),
|
|
1481
|
+
createComponent(FunctionDeclaration, {
|
|
1482
|
+
"export": true,
|
|
1483
|
+
name: "shine",
|
|
1484
|
+
parameters: [{
|
|
1485
|
+
name: "text",
|
|
1486
|
+
type: "string"
|
|
1487
|
+
}, {
|
|
1488
|
+
name: "speed",
|
|
1489
|
+
type: "number",
|
|
1490
|
+
optional: true
|
|
1491
|
+
}],
|
|
1492
|
+
children: code`return animateText(text, applyShineEffect, 15, speed);`
|
|
1493
|
+
})
|
|
1494
|
+
];
|
|
1495
|
+
}
|
|
1496
|
+
/**
|
|
1232
1497
|
* A component to generate the `spinner` function in the `shell-shock:console` builtin module.
|
|
1233
1498
|
*/
|
|
1234
1499
|
function SpinnerFunctionDeclaration() {
|
|
@@ -2517,6 +2782,8 @@ function ConsoleBuiltin(props) {
|
|
|
2517
2782
|
createComponent(Spacing, {}),
|
|
2518
2783
|
createComponent(DividerFunctionDeclaration, {}),
|
|
2519
2784
|
createComponent(Spacing, {}),
|
|
2785
|
+
createComponent(ShineFunctionDeclaration, {}),
|
|
2786
|
+
createComponent(Spacing, {}),
|
|
2520
2787
|
createComponent(SpinnerFunctionDeclaration, {}),
|
|
2521
2788
|
createComponent(Spacing, {}),
|
|
2522
2789
|
createComponent(MessageFunctionDeclaration, {
|
|
@@ -2648,5 +2915,5 @@ function ConsoleBuiltin(props) {
|
|
|
2648
2915
|
}
|
|
2649
2916
|
|
|
2650
2917
|
//#endregion
|
|
2651
|
-
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
2918
|
+
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, ShineFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
2652
2919
|
//# sourceMappingURL=console-builtin.mjs.map
|
|
@@ -10,6 +10,7 @@ exports.DividerFunctionDeclaration = require_components_console_builtin.DividerF
|
|
|
10
10
|
exports.InlineCodeFunctionDeclaration = require_components_console_builtin.InlineCodeFunctionDeclaration;
|
|
11
11
|
exports.LinkFunctionDeclaration = require_components_console_builtin.LinkFunctionDeclaration;
|
|
12
12
|
exports.MessageFunctionDeclaration = require_components_console_builtin.MessageFunctionDeclaration;
|
|
13
|
+
exports.ShineFunctionDeclaration = require_components_console_builtin.ShineFunctionDeclaration;
|
|
13
14
|
exports.SpinnerFunctionDeclaration = require_components_console_builtin.SpinnerFunctionDeclaration;
|
|
14
15
|
exports.SplitTextFunctionDeclaration = require_components_console_builtin.SplitTextFunctionDeclaration;
|
|
15
16
|
exports.StripAnsiFunctionDeclaration = require_components_console_builtin.StripAnsiFunctionDeclaration;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration } from "./console-builtin.cjs";
|
|
2
|
-
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
1
|
+
import { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, ShineFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration } from "./console-builtin.cjs";
|
|
2
|
+
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, ShineFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration } from "./console-builtin.mjs";
|
|
2
|
-
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
1
|
+
import { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, ShineFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration } from "./console-builtin.mjs";
|
|
2
|
+
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, ShineFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration } from "./console-builtin.mjs";
|
|
1
|
+
import { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, ShineFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration } from "./console-builtin.mjs";
|
|
2
2
|
|
|
3
|
-
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
3
|
+
export { AnsiHelpersDeclarations, AnsiStyleFunctionsDeclaration, BlockquoteFunctionDeclaration, CodeFunctionDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, InlineCodeFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, ShineFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, ThemeColorObjectDefinition, ThemeColorTypeDefinition, WrapAnsiFunction, WriteFunctionDeclaration, WriteLineFunctionDeclaration };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const require_components_console_builtin = require('./components/console-builtin.cjs');
|
|
2
|
+
require('./components/index.cjs');
|
|
3
|
+
let _shell_shock_core_helpers_power_plant = require("@shell-shock/core/helpers/power-plant");
|
|
4
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
|
+
|
|
6
|
+
//#region package.json
|
|
7
|
+
var version = "0.2.27";
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/generator.tsx
|
|
11
|
+
/**
|
|
12
|
+
* Power Plant generator for Shell Shock console builtins.
|
|
13
|
+
*
|
|
14
|
+
* @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
|
|
15
|
+
*/
|
|
16
|
+
const consoleGenerator = (0, _shell_shock_core_helpers_power_plant.defineCommandGenerator)({
|
|
17
|
+
meta: {
|
|
18
|
+
name: "shell-shock-console",
|
|
19
|
+
title: "Shell Shock Console Generator",
|
|
20
|
+
description: "Generates the console built-in module from the Shell Shock command tree specification.",
|
|
21
|
+
version,
|
|
22
|
+
tags: [
|
|
23
|
+
"shell-shock",
|
|
24
|
+
"console",
|
|
25
|
+
"alloy-js"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
generator: async (_commands, options) => {
|
|
29
|
+
await (0, _shell_shock_core_helpers_power_plant.renderCommandTemplate)(options, (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_console_builtin.ConsoleBuiltin, {}));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
Object.defineProperty(exports, 'consoleGenerator', {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () {
|
|
37
|
+
return consoleGenerator;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ConsoleBuiltin } from "./components/console-builtin.mjs";
|
|
2
|
+
import "./components/index.mjs";
|
|
3
|
+
import { defineCommandGenerator, renderCommandTemplate } from "@shell-shock/core/helpers/power-plant";
|
|
4
|
+
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region package.json
|
|
7
|
+
var version = "0.2.27";
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/generator.tsx
|
|
11
|
+
/**
|
|
12
|
+
* Power Plant generator for Shell Shock console builtins.
|
|
13
|
+
*
|
|
14
|
+
* @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
|
|
15
|
+
*/
|
|
16
|
+
const consoleGenerator = defineCommandGenerator({
|
|
17
|
+
meta: {
|
|
18
|
+
name: "shell-shock-console",
|
|
19
|
+
title: "Shell Shock Console Generator",
|
|
20
|
+
description: "Generates the console built-in module from the Shell Shock command tree specification.",
|
|
21
|
+
version,
|
|
22
|
+
tags: [
|
|
23
|
+
"shell-shock",
|
|
24
|
+
"console",
|
|
25
|
+
"alloy-js"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
generator: async (_commands, options) => {
|
|
29
|
+
await renderCommandTemplate(options, createComponent(ConsoleBuiltin, {}));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { consoleGenerator as t };
|
|
35
|
+
//# sourceMappingURL=generator-CI1BFzOW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-CI1BFzOW.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_generator = require('./generator-BsXspqTY.cjs');
|
|
3
|
+
|
|
4
|
+
exports.consoleGenerator = require_generator.consoleGenerator;
|
|
5
|
+
exports.default = require_generator.consoleGenerator;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/generator.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Power Plant generator for Shell Shock console builtins.
|
|
4
|
+
*
|
|
5
|
+
* @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
|
|
6
|
+
*/
|
|
7
|
+
declare const consoleGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, import("@shell-shock/core/helpers/power-plant").CommandGeneratorOptions, void>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { consoleGenerator, consoleGenerator as default };
|
|
10
|
+
//# sourceMappingURL=generator.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.d.cts","names":[],"sources":["../src/generator.tsx"],"mappings":";;;;;;cA8Ba,8CAAgB,sBAAA,6CAAA,wEAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/generator.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Power Plant generator for Shell Shock console builtins.
|
|
4
|
+
*
|
|
5
|
+
* @see https://github.com/storm-software/power-plant/tree/main/packages/generators/alloy-js
|
|
6
|
+
*/
|
|
7
|
+
declare const consoleGenerator: import("@power-plant/core").GeneratorConfigObject<Record<string, import("@shell-shock/schema").SerializedCommandTree>, import("@shell-shock/core/helpers/power-plant").CommandGeneratorOptions, void>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { consoleGenerator, consoleGenerator as default };
|
|
10
|
+
//# sourceMappingURL=generator.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.d.mts","names":[],"sources":["../src/generator.tsx"],"mappings":""}
|
package/dist/index.cjs
CHANGED
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
require('./components/index.cjs');
|
|
5
|
-
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
|
-
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
2
|
+
const require_generator = require('./generator-BsXspqTY.cjs');
|
|
3
|
+
let _shell_shock_core_helpers_power_plant = require("@shell-shock/core/helpers/power-plant");
|
|
7
4
|
let _shell_shock_plugin_theme = require("@shell-shock/plugin-theme");
|
|
8
|
-
_shell_shock_plugin_theme = require_runtime.__toESM(_shell_shock_plugin_theme, 1);
|
|
9
5
|
|
|
10
6
|
//#region src/index.tsx
|
|
11
7
|
/**
|
|
12
8
|
* A Shell Shock plugin to generate the `console` built-in module, which provides a set of commands for logging messages to the console and inspecting values. This plugin is designed to be used in conjunction with the `script` preset, but can also be used independently in any Shell Shock application.
|
|
13
9
|
*/
|
|
14
10
|
const plugin = (options = {}) => {
|
|
15
|
-
return [...(0, _shell_shock_plugin_theme.
|
|
11
|
+
return [...(0, _shell_shock_plugin_theme.plugin)(options), {
|
|
16
12
|
name: "shell-shock/console",
|
|
17
13
|
config() {
|
|
18
14
|
this.debug("Providing default configuration for the Shell Shock `console` plugin.");
|
|
19
15
|
return options;
|
|
20
16
|
},
|
|
21
17
|
async prepare() {
|
|
22
|
-
this.debug("Rendering command handling modules for the Shell Shock `console` plugin.");
|
|
23
|
-
return (0,
|
|
18
|
+
this.debug("Rendering command handling modules via Power Plant for the Shell Shock `console` plugin.");
|
|
19
|
+
return (0, _shell_shock_core_helpers_power_plant.executeCommandGenerator)(this, require_generator.consoleGenerator);
|
|
24
20
|
}
|
|
25
21
|
}];
|
|
26
22
|
};
|
|
27
23
|
|
|
28
24
|
//#endregion
|
|
25
|
+
exports.consoleGenerator = require_generator.consoleGenerator;
|
|
29
26
|
exports.default = plugin;
|
|
30
27
|
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { consoleGenerator } from "./generator.cjs";
|
|
1
2
|
import { ConsolePluginContext, ConsolePluginOptions, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "./types/plugin.cjs";
|
|
3
|
+
import "./types/index.cjs";
|
|
2
4
|
import { Plugin } from "powerlines";
|
|
3
|
-
|
|
4
5
|
//#region src/index.d.ts
|
|
5
6
|
/**
|
|
6
7
|
* A Shell Shock plugin to generate the `console` built-in module, which provides a set of commands for logging messages to the console and inspecting values. This plugin is designed to be used in conjunction with the `script` preset, but can also be used independently in any Shell Shock application.
|
|
7
8
|
*/
|
|
8
9
|
declare const plugin: <TContext extends ConsolePluginContext = ConsolePluginContext>(options?: ConsolePluginOptions) => Plugin<TContext>[];
|
|
9
10
|
//#endregion
|
|
10
|
-
export { type ConsolePluginContext, type ConsolePluginOptions, type ConsolePluginResolvedConfig, type ConsolePluginUserConfig, plugin as default, plugin };
|
|
11
|
+
export { type ConsolePluginContext, type ConsolePluginOptions, type ConsolePluginResolvedConfig, type ConsolePluginUserConfig, consoleGenerator, plugin as default, plugin };
|
|
11
12
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;;cAiCa,SACX,iBAAiB,uBAAuB,sBAExC,UAAS,yBACR,OAAO"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { consoleGenerator } from "./generator.mjs";
|
|
1
2
|
import { ConsolePluginContext, ConsolePluginOptions, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "./types/plugin.mjs";
|
|
3
|
+
import "./types/index.mjs";
|
|
2
4
|
import { Plugin } from "powerlines";
|
|
3
|
-
|
|
4
5
|
//#region src/index.d.ts
|
|
5
6
|
/**
|
|
6
7
|
* A Shell Shock plugin to generate the `console` built-in module, which provides a set of commands for logging messages to the console and inspecting values. This plugin is designed to be used in conjunction with the `script` preset, but can also be used independently in any Shell Shock application.
|
|
7
8
|
*/
|
|
8
9
|
declare const plugin: <TContext extends ConsolePluginContext = ConsolePluginContext>(options?: ConsolePluginOptions) => Plugin<TContext>[];
|
|
9
10
|
//#endregion
|
|
10
|
-
export { type ConsolePluginContext, type ConsolePluginOptions, type ConsolePluginResolvedConfig, type ConsolePluginUserConfig, plugin as default, plugin };
|
|
11
|
+
export { type ConsolePluginContext, type ConsolePluginOptions, type ConsolePluginResolvedConfig, type ConsolePluginUserConfig, consoleGenerator, plugin as default, plugin };
|
|
11
12
|
//# sourceMappingURL=index.d.mts.map
|