@shell-shock/plugin-console 0.1.8 → 0.1.12
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/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -1
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/components/console-builtin.cjs +567 -563
- package/dist/components/console-builtin.d.cts +5 -1
- package/dist/components/console-builtin.d.cts.map +1 -1
- package/dist/components/console-builtin.d.mts +5 -1
- package/dist/components/console-builtin.d.mts.map +1 -1
- package/dist/components/console-builtin.mjs +17 -15
- package/dist/components/console-builtin.mjs.map +1 -1
- package/dist/components/index.cjs +2 -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/index.cjs +9 -10
- package/dist/index.d.cts +0 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts +2 -2
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +2 -2
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +12 -12
|
@@ -9,6 +9,10 @@ declare function AnsiHelpersDeclarations(): Children;
|
|
|
9
9
|
* A component to generate an object containing functions for coloring text in a Shell Shock project.
|
|
10
10
|
*/
|
|
11
11
|
declare function ColorsDeclaration(): Children;
|
|
12
|
+
/**
|
|
13
|
+
* A component to generate the `splitText` function in the `shell-shock:console` builtin module.
|
|
14
|
+
*/
|
|
15
|
+
declare function SplitTextFunctionDeclaration(): Children;
|
|
12
16
|
/**
|
|
13
17
|
* A component to generate the `writeLine` function in the `shell-shock:console` builtin module.
|
|
14
18
|
*/
|
|
@@ -60,5 +64,5 @@ type ConsoleBuiltinProps = Pick<BuiltinFileProps, "children" | "imports" | "buil
|
|
|
60
64
|
*/
|
|
61
65
|
declare function ConsoleBuiltin(props: ConsoleBuiltinProps): Children;
|
|
62
66
|
//#endregion
|
|
63
|
-
export { AnsiHelpersDeclarations, ColorsDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, SpinnerFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
|
|
67
|
+
export { AnsiHelpersDeclarations, ColorsDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
|
|
64
68
|
//# sourceMappingURL=console-builtin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console-builtin.d.cts","names":[],"sources":["../../src/components/console-builtin.tsx"],"
|
|
1
|
+
{"version":3,"file":"console-builtin.d.cts","names":[],"sources":["../../src/components/console-builtin.tsx"],"mappings":";;;;;;iBA+DgB,uBAAA,CAAA,GAAuB,QAAA;;AAAvC;;iBA6JgB,iBAAA,CAAA,GAAiB,QAAA;;;AAAjC;iBAqqDgB,4BAAA,CAAA,GAA4B,QAAA;;;;iBAiL5B,4BAAA,CAAA,GAA4B,QAAA;AAAA,KAsFhC,+BAAA,GAAkC,OAAA,CAC5C,IAAA,CAAK,wBAAA;EAEL,IAAA;EASA,OAAA,EAAS,mBAAA;EACT,KAAA,GAAQ,mBAAA;EACR,aAAA;EACA,WAAA;EACA,MAAA,GAAS,QAAA;EACT,SAAA;AAAA;AAjBF;;;AAAA,iBAuBgB,0BAAA,CACd,KAAA,EAAO,+BAAA,GAA+B,QAAA;;;;iBA0KxB,gBAAA,CAAA,GAAgB,QAAA;;;;iBA4EhB,4BAAA,CAAA,GAA4B,QAAA;;;;iBAmC5B,0BAAA,CAAA,GAA0B,QAAA;;;;iBAoF1B,uBAAA,CAAA,GAAuB,QAAA;;;;iBAwCvB,0BAAA,CAAA,GAA0B,QAAA;;;AAtZ1C;KAg7BY,6BAAA,GAAgC,IAAA,CAC1C,wBAAA;;;;iBAOc,wBAAA,CAAyB,KAAA,EAAO,6BAAA,GAA6B,QAAA;AAAA,KA0nBjE,mBAAA,GAAsB,IAAA,CAChC,gBAAA;;;AAx4CF;iBA+4CgB,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,QAAA"}
|
|
@@ -9,6 +9,10 @@ declare function AnsiHelpersDeclarations(): Children;
|
|
|
9
9
|
* A component to generate an object containing functions for coloring text in a Shell Shock project.
|
|
10
10
|
*/
|
|
11
11
|
declare function ColorsDeclaration(): Children;
|
|
12
|
+
/**
|
|
13
|
+
* A component to generate the `splitText` function in the `shell-shock:console` builtin module.
|
|
14
|
+
*/
|
|
15
|
+
declare function SplitTextFunctionDeclaration(): Children;
|
|
12
16
|
/**
|
|
13
17
|
* A component to generate the `writeLine` function in the `shell-shock:console` builtin module.
|
|
14
18
|
*/
|
|
@@ -60,5 +64,5 @@ type ConsoleBuiltinProps = Pick<BuiltinFileProps, "children" | "imports" | "buil
|
|
|
60
64
|
*/
|
|
61
65
|
declare function ConsoleBuiltin(props: ConsoleBuiltinProps): Children;
|
|
62
66
|
//#endregion
|
|
63
|
-
export { AnsiHelpersDeclarations, ColorsDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, SpinnerFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
|
|
67
|
+
export { AnsiHelpersDeclarations, ColorsDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
|
|
64
68
|
//# sourceMappingURL=console-builtin.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console-builtin.d.mts","names":[],"sources":["../../src/components/console-builtin.tsx"],"
|
|
1
|
+
{"version":3,"file":"console-builtin.d.mts","names":[],"sources":["../../src/components/console-builtin.tsx"],"mappings":";;;;;;iBA+DgB,uBAAA,CAAA,GAAuB,QAAA;;AAAvC;;iBA6JgB,iBAAA,CAAA,GAAiB,QAAA;;;AAAjC;iBAqqDgB,4BAAA,CAAA,GAA4B,QAAA;;;;iBAiL5B,4BAAA,CAAA,GAA4B,QAAA;AAAA,KAsFhC,+BAAA,GAAkC,OAAA,CAC5C,IAAA,CAAK,wBAAA;EAEL,IAAA;EASA,OAAA,EAAS,mBAAA;EACT,KAAA,GAAQ,mBAAA;EACR,aAAA;EACA,WAAA;EACA,MAAA,GAAS,QAAA;EACT,SAAA;AAAA;AAjBF;;;AAAA,iBAuBgB,0BAAA,CACd,KAAA,EAAO,+BAAA,GAA+B,QAAA;;;;iBA0KxB,gBAAA,CAAA,GAAgB,QAAA;;;;iBA4EhB,4BAAA,CAAA,GAA4B,QAAA;;;;iBAmC5B,0BAAA,CAAA,GAA0B,QAAA;;;;iBAoF1B,uBAAA,CAAA,GAAuB,QAAA;;;;iBAwCvB,0BAAA,CAAA,GAA0B,QAAA;;;AAtZ1C;KAg7BY,6BAAA,GAAgC,IAAA,CAC1C,wBAAA;;;;iBAOc,wBAAA,CAAyB,KAAA,EAAO,6BAAA,GAA6B,QAAA;AAAA,KA0nBjE,mBAAA,GAAsB,IAAA,CAChC,gBAAA;;;AAx4CF;iBA+4CgB,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,QAAA"}
|
|
@@ -78,7 +78,7 @@ function AnsiHelpersDeclarations() {
|
|
|
78
78
|
line: "\\x1B[2K",
|
|
79
79
|
lineEnd: "\\x1B[K",
|
|
80
80
|
lineStart: "\\x1B[1K",
|
|
81
|
-
lines(count) {
|
|
81
|
+
lines(count: number) {
|
|
82
82
|
let lineClear = "";
|
|
83
83
|
for (let i = 0; i < count; i++) {
|
|
84
84
|
lineClear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
@@ -1663,10 +1663,9 @@ function ColorsDeclaration() {
|
|
|
1663
1663
|
];
|
|
1664
1664
|
}
|
|
1665
1665
|
/**
|
|
1666
|
-
* A component to generate the `
|
|
1666
|
+
* A component to generate the `splitText` function in the `shell-shock:console` builtin module.
|
|
1667
1667
|
*/
|
|
1668
|
-
function
|
|
1669
|
-
const theme = useTheme();
|
|
1668
|
+
function SplitTextFunctionDeclaration() {
|
|
1670
1669
|
return [
|
|
1671
1670
|
createComponent(FunctionDeclaration, {
|
|
1672
1671
|
name: "adjustIndex",
|
|
@@ -1830,8 +1829,15 @@ function WriteLineFunctionDeclaration() {
|
|
|
1830
1829
|
result.push(line);
|
|
1831
1830
|
return result;
|
|
1832
1831
|
`
|
|
1833
|
-
})
|
|
1834
|
-
|
|
1832
|
+
})
|
|
1833
|
+
];
|
|
1834
|
+
}
|
|
1835
|
+
/**
|
|
1836
|
+
* A component to generate the `writeLine` function in the `shell-shock:console` builtin module.
|
|
1837
|
+
*/
|
|
1838
|
+
function WriteLineFunctionDeclaration() {
|
|
1839
|
+
const theme = useTheme();
|
|
1840
|
+
return [
|
|
1835
1841
|
createComponent(InterfaceDeclaration, {
|
|
1836
1842
|
"export": true,
|
|
1837
1843
|
name: "WriteLineOptions",
|
|
@@ -1976,7 +1982,6 @@ function MessageFunctionDeclaration(props) {
|
|
|
1976
1982
|
|
|
1977
1983
|
${!theme.labels.message.footer[variant] && timestamp ? `const timestamp = \`\${colors.text.message.footer.${color}(new Date().toLocaleDateString())} \${colors.border.message.outline.${color}("${theme.borderStyles.message.outline[variant].bottom}")} \${colors.text.message.footer.${color}(new Date().toLocaleTimeString())}\`; ` : ""}
|
|
1978
1984
|
|
|
1979
|
-
writeLine("");
|
|
1980
1985
|
writeLine(colors.border.message.outline.${color}("${theme.borderStyles.message.outline[variant].topLeft}") + ${theme.labels.message.header[variant] || theme.icons.message.header[variant] ? `colors.border.message.outline.${color}("${theme.borderStyles.message.outline[variant].top}".repeat(4)) + " " + ${theme.icons.message.header[variant] ? `colors.border.message.outline.${color}("${theme.icons.message.header[variant]}") + " " +` : ""} colors.bold(colors.text.message.header.${color}("${theme.labels.message.header[variant]}")) + " " + colors.border.message.outline.${color}("${theme.borderStyles.message.outline[variant].top}".repeat(Math.max(process.stdout.columns - ${Math.max(theme.padding.app, 0) * 2 + theme.borderStyles.message.outline[variant].topLeft.length + 4 + (theme.icons.message.header[variant] ? 2 + (theme.labels.message.header[variant] ? 0 : 1) : 0) + (theme.labels.message.header[variant] ? theme.labels.message.header[variant].length + 2 : 0) + theme.borderStyles.message.outline[variant].topRight.length}, 0)))` : `colors.border.message.outline.${color}("${theme.borderStyles.message.outline[variant].top}".repeat(Math.max(process.stdout.columns - ${Math.max(theme.padding.app, 0) * 2 + theme.borderStyles.message.outline[variant].topLeft.length + theme.borderStyles.message.outline[variant].topRight.length}, 0)))`} + colors.border.message.outline.${color}("${theme.borderStyles.message.outline[variant].topRight}"), { consoleFn: console.${consoleFnName} });
|
|
1981
1986
|
splitText(
|
|
1982
1987
|
message,
|
|
@@ -2793,9 +2798,6 @@ function extractBorderOptionsString(direction, theme) {
|
|
|
2793
2798
|
return `borderOptions === "primary" ? colors.border.app.table.primary("${theme.borderStyles.app.table.primary[direction]}") : borderOptions === "secondary" ? colors.border.app.table.secondary("${theme.borderStyles.app.table.secondary[direction]}") : borderOptions === "tertiary" ? colors.border.app.table.tertiary("${theme.borderStyles.app.table.tertiary[direction]}") : !borderOptions || borderOptions === "none" ? "" : borderOptions`;
|
|
2794
2799
|
}
|
|
2795
2800
|
/**
|
|
2796
|
-
* Props for the TableFunctionDeclaration component.
|
|
2797
|
-
*/
|
|
2798
|
-
/**
|
|
2799
2801
|
* A component to generate the table functions in the `shell-shock:console` builtin module.
|
|
2800
2802
|
*/
|
|
2801
2803
|
function TableFunctionDeclaration(props) {
|
|
@@ -2902,8 +2904,7 @@ function TableFunctionDeclaration(props) {
|
|
|
2902
2904
|
|
|
2903
2905
|
throw new Error(\`Invalid width size: \${size}\`);
|
|
2904
2906
|
` }),
|
|
2905
|
-
|
|
2906
|
-
createIntrinsic("hbr", {})
|
|
2907
|
+
createComponent(Spacing, {})
|
|
2907
2908
|
];
|
|
2908
2909
|
}
|
|
2909
2910
|
}),
|
|
@@ -3164,8 +3165,7 @@ function TableFunctionDeclaration(props) {
|
|
|
3164
3165
|
(Array.isArray(options) && !options.every(item => typeof item === "object" || typeof item === "string" || Array.isArray(item))) `,
|
|
3165
3166
|
children: code`return;`
|
|
3166
3167
|
}),
|
|
3167
|
-
|
|
3168
|
-
createIntrinsic("hbr", {}),
|
|
3168
|
+
createComponent(Spacing, {}),
|
|
3169
3169
|
createComponent(VarDeclaration, {
|
|
3170
3170
|
"let": true,
|
|
3171
3171
|
name: "cells",
|
|
@@ -3532,6 +3532,8 @@ function ConsoleBuiltin(props) {
|
|
|
3532
3532
|
createComponent(Spacing, {}),
|
|
3533
3533
|
createComponent(WriteLineFunctionDeclaration, {}),
|
|
3534
3534
|
createComponent(Spacing, {}),
|
|
3535
|
+
createComponent(SplitTextFunctionDeclaration, {}),
|
|
3536
|
+
createComponent(Spacing, {}),
|
|
3535
3537
|
createComponent(LinkFunctionDeclaration, {}),
|
|
3536
3538
|
createComponent(Spacing, {}),
|
|
3537
3539
|
createComponent(DividerFunctionDeclaration, {}),
|
|
@@ -3654,5 +3656,5 @@ function ConsoleBuiltin(props) {
|
|
|
3654
3656
|
}
|
|
3655
3657
|
|
|
3656
3658
|
//#endregion
|
|
3657
|
-
export { AnsiHelpersDeclarations, ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, SpinnerFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, WrapAnsiFunction, WriteLineFunctionDeclaration };
|
|
3659
|
+
export { AnsiHelpersDeclarations, ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, SpinnerFunctionDeclaration, SplitTextFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, WrapAnsiFunction, WriteLineFunctionDeclaration };
|
|
3658
3660
|
//# sourceMappingURL=console-builtin.mjs.map
|