@shell-shock/plugin-console 0.2.14 → 0.2.15
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 +6 -20
- package/dist/components/console-builtin.d.cts.map +1 -1
- package/dist/components/console-builtin.d.mts.map +1 -1
- package/dist/components/console-builtin.mjs +6 -19
- package/dist/components/console-builtin.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +14 -14
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
3
|
let _alloy_js_core = require("@alloy-js/core");
|
|
5
4
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
6
|
-
let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
7
5
|
let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
8
6
|
let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
|
|
9
7
|
let _powerlines_plugin_alloy_typescript_components_builtin_file = require("@powerlines/plugin-alloy/typescript/components/builtin-file");
|
|
@@ -636,9 +634,7 @@ function WriteFunctionDeclaration() {
|
|
|
636
634
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_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.` }),
|
|
637
635
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
638
636
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
639
|
-
|
|
640
|
-
return _powerlines_deepkit_vendor_type.ReflectionKind.method;
|
|
641
|
-
},
|
|
637
|
+
type: "any",
|
|
642
638
|
defaultValue: `\`console.log\``
|
|
643
639
|
})
|
|
644
640
|
];
|
|
@@ -971,9 +967,7 @@ function DividerFunctionDeclaration() {
|
|
|
971
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.",
|
|
972
968
|
get children() {
|
|
973
969
|
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_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)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
974
|
-
|
|
975
|
-
return _powerlines_deepkit_vendor_type.ReflectionKind.string;
|
|
976
|
-
},
|
|
970
|
+
type: "string",
|
|
977
971
|
defaultValue: "primary"
|
|
978
972
|
})];
|
|
979
973
|
}
|
|
@@ -989,9 +983,7 @@ function DividerFunctionDeclaration() {
|
|
|
989
983
|
heading: "Padding to apply to the line",
|
|
990
984
|
get children() {
|
|
991
985
|
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_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)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
992
|
-
|
|
993
|
-
return _powerlines_deepkit_vendor_type.ReflectionKind.number;
|
|
994
|
-
},
|
|
986
|
+
type: "number",
|
|
995
987
|
get defaultValue() {
|
|
996
988
|
return theme.padding.app * 4;
|
|
997
989
|
}
|
|
@@ -1929,9 +1921,7 @@ function TableFunctionDeclaration(props) {
|
|
|
1929
1921
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_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.` }),
|
|
1930
1922
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1931
1923
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
1932
|
-
|
|
1933
|
-
return _powerlines_deepkit_vendor_type.ReflectionKind.property;
|
|
1934
|
-
},
|
|
1924
|
+
type: "any",
|
|
1935
1925
|
defaultValue: "primary"
|
|
1936
1926
|
})
|
|
1937
1927
|
];
|
|
@@ -1950,9 +1940,7 @@ function TableFunctionDeclaration(props) {
|
|
|
1950
1940
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_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.` }),
|
|
1951
1941
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1952
1942
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
1953
|
-
|
|
1954
|
-
return _powerlines_deepkit_vendor_type.ReflectionKind.property;
|
|
1955
|
-
},
|
|
1943
|
+
type: "any",
|
|
1956
1944
|
get defaultValue() {
|
|
1957
1945
|
return `\`${theme.padding.table}\``;
|
|
1958
1946
|
}
|
|
@@ -1973,9 +1961,7 @@ function TableFunctionDeclaration(props) {
|
|
|
1973
1961
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_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".` }),
|
|
1974
1962
|
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
1975
1963
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
1976
|
-
|
|
1977
|
-
return _powerlines_deepkit_vendor_type.ReflectionKind.property;
|
|
1978
|
-
},
|
|
1964
|
+
type: "any",
|
|
1979
1965
|
defaultValue: "left"
|
|
1980
1966
|
})
|
|
1981
1967
|
];
|
|
@@ -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,uBAAA,IAAuB,QAAA;AAAA,UA8L7B,cAAA;EAAA,CACP,GAAA,WAAc,iBAAA,GAAoB,cAAc;AAAA;AAAA,UAGzC,yBAAA;EACR,IAAA;EACA,OAAA;EACA,MAAA,EAAQ,cAAA;EACR,OAAA,EAAS,cAAA;EACT,OAAA,EAAS,cAAA;AAAA;AAAA,iBAGK,wBAAA,CAAyB,KAAA,EAAO,yBAAA,GAAyB,QAAA;AAAA,iBA0EzD,0BAAA,CAA2B,KAAA,EAAO,yBAAA,GAAyB,QAAA;;;AArFxB;iBAmKnC,6BAAA,IAA6B,QAAA;;;;iBAiK7B,4BAAA,IAA4B,QAAA;;;;iBAiL5B,wBAAA,IAAwB,QAAA;;;;iBA6DxB,4BAAA,IAA4B,QAAA;AAAA,KAqEhC,+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;;;;iBAMc,0BAAA,CACd,KAAA,EAAO,+BAAA,GAA+B,QAAA;AApoBiC;AA0EzE;;AA1EyE,iBAszBzD,gBAAA,IAAgB,QAAA;;;;iBA4EhB,4BAAA,IAA4B,QAAA;;AAxzB+B;AA8E3E;iBA6wBgB,0BAAA,IAA0B,QAAA;;;AA7wBG;iBA81B7B,uBAAA,IAAuB,QAAA;;;;iBA0EvB,6BAAA,IAA6B,QAAA;AAtlB7C;;;AAAA,iBAkoBgB,uBAAA,IAAuB,QAAA;AAloBC;AA6DxC;;AA7DwC,iBAorBxB,6BAAA,IAA6B,QAAA;;AAvnBD;AAqE5C;iBAqlBgB,0BAAA,IAA0B,QAAA;;;;KA0hB9B,6BAAA,GAAgC,IAAI,CAC9C,wBAAA;;;;iBAOc,wBAAA,CAAyB,KAAA,EAAO,6BAAA,GAA6B,QAAA;AAAA,KAonBjE,mBAAA,GAAsB,IAAI,CACpC,gBAAA;;;;iBAOc,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console-builtin.d.mts","names":[],"sources":["../../src/components/console-builtin.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"console-builtin.d.mts","names":[],"sources":["../../src/components/console-builtin.tsx"],"mappings":""}
|
|
@@ -1,7 +1,6 @@
|
|
|
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 { ReflectionKind } from "@powerlines/deepkit/vendor/type";
|
|
5
4
|
import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
|
|
6
5
|
import { ClassDeclaration, ClassField, ClassMethod, ClassPropertyGet, ClassPropertySet } from "@powerlines/plugin-alloy/typescript";
|
|
7
6
|
import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
|
|
@@ -634,9 +633,7 @@ function WriteFunctionDeclaration() {
|
|
|
634
633
|
createComponent(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
634
|
createIntrinsic("hbr", {}),
|
|
636
635
|
createComponent(TSDocDefaultValue, {
|
|
637
|
-
|
|
638
|
-
return ReflectionKind.method;
|
|
639
|
-
},
|
|
636
|
+
type: "any",
|
|
640
637
|
defaultValue: `\`console.log\``
|
|
641
638
|
})
|
|
642
639
|
];
|
|
@@ -969,9 +966,7 @@ function DividerFunctionDeclaration() {
|
|
|
969
966
|
heading: "The border of the divider line. Can be 'primary', 'secondary', 'tertiary', or 'none'. If not specified, the default border style will be used.",
|
|
970
967
|
get children() {
|
|
971
968
|
return [createComponent(TSDocRemarks, { children: `The value provided will determine the border style and color based on the current theme configuration.` }), createComponent(TSDocDefaultValue, {
|
|
972
|
-
|
|
973
|
-
return ReflectionKind.string;
|
|
974
|
-
},
|
|
969
|
+
type: "string",
|
|
975
970
|
defaultValue: "primary"
|
|
976
971
|
})];
|
|
977
972
|
}
|
|
@@ -987,9 +982,7 @@ function DividerFunctionDeclaration() {
|
|
|
987
982
|
heading: "Padding to apply to the line",
|
|
988
983
|
get children() {
|
|
989
984
|
return [createComponent(TSDocRemarks, { children: `The amount of padding (in spaces) to apply to the line when writing to the console. This value is applied to both the left and right sides of the line. If not specified, the default padding defined in the current theme configuration will be used.` }), createComponent(TSDocDefaultValue, {
|
|
990
|
-
|
|
991
|
-
return ReflectionKind.number;
|
|
992
|
-
},
|
|
985
|
+
type: "number",
|
|
993
986
|
get defaultValue() {
|
|
994
987
|
return theme.padding.app * 4;
|
|
995
988
|
}
|
|
@@ -1927,9 +1920,7 @@ function TableFunctionDeclaration(props) {
|
|
|
1927
1920
|
createComponent(TSDocRemarks, { children: `The border variant to use for the table cell. This determines the color and style of the border around the cell.` }),
|
|
1928
1921
|
createIntrinsic("hbr", {}),
|
|
1929
1922
|
createComponent(TSDocDefaultValue, {
|
|
1930
|
-
|
|
1931
|
-
return ReflectionKind.property;
|
|
1932
|
-
},
|
|
1923
|
+
type: "any",
|
|
1933
1924
|
defaultValue: "primary"
|
|
1934
1925
|
})
|
|
1935
1926
|
];
|
|
@@ -1948,9 +1939,7 @@ function TableFunctionDeclaration(props) {
|
|
|
1948
1939
|
createComponent(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.` }),
|
|
1949
1940
|
createIntrinsic("hbr", {}),
|
|
1950
1941
|
createComponent(TSDocDefaultValue, {
|
|
1951
|
-
|
|
1952
|
-
return ReflectionKind.property;
|
|
1953
|
-
},
|
|
1942
|
+
type: "any",
|
|
1954
1943
|
get defaultValue() {
|
|
1955
1944
|
return `\`${theme.padding.table}\``;
|
|
1956
1945
|
}
|
|
@@ -1971,9 +1960,7 @@ function TableFunctionDeclaration(props) {
|
|
|
1971
1960
|
createComponent(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".` }),
|
|
1972
1961
|
createIntrinsic("hbr", {}),
|
|
1973
1962
|
createComponent(TSDocDefaultValue, {
|
|
1974
|
-
|
|
1975
|
-
return ReflectionKind.property;
|
|
1976
|
-
},
|
|
1963
|
+
type: "any",
|
|
1977
1964
|
defaultValue: "left"
|
|
1978
1965
|
})
|
|
1979
1966
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console-builtin.mjs","names":[],"sources":["../../src/components/console-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Children } from \"@alloy-js/core\";\nimport { code, For, Show } from \"@alloy-js/core\";\nimport type { FunctionDeclarationProps } from \"@alloy-js/typescript\";\nimport {\n ElseClause,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n InterfaceDeclaration,\n InterfaceMember,\n TypeDeclaration,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport {\n ClassDeclaration,\n ClassField,\n ClassMethod,\n ClassPropertyGet,\n ClassPropertySet\n} from \"@powerlines/plugin-alloy/typescript\";\nimport type { BuiltinFileProps } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport { BuiltinFile } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport {\n TSDoc,\n TSDocDefaultValue,\n TSDocExample,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { IsNotDebug, IsNotVerbose } from \"@shell-shock/core/components/helpers\";\nimport type {\n ThemeMessageVariant,\n ThemeResolvedConfig\n} from \"@shell-shock/plugin-theme\";\nimport { useColors, useTheme } from \"@shell-shock/plugin-theme/contexts/theme\";\nimport type { AnsiColorWrappers } from \"@shell-shock/plugin-theme/helpers/ansi-utils\";\nimport {\n colorKeys,\n modifierKeys\n} from \"@shell-shock/plugin-theme/helpers/ansi-utils\";\nimport { camelCase, titleCase } from \"@stryke/string-format\";\nimport { getIndefiniteArticle } from \"@stryke/string-format/vowels\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { defu } from \"defu\";\n\nexport function AnsiHelpersDeclarations() {\n return (\n <>\n <VarDeclaration\n const\n export\n name=\"beep\"\n doc=\"The ASCII Bell character, which can be used to trigger a beep sound in the console.\">\n {code` \"\\\\u0007\"; `}\n </VarDeclaration>\n <Spacing />\n <VarDeclaration\n const\n export\n name=\"cursor\"\n doc=\"An object containing ANSI escape codes for controlling the console cursor.\">\n {code` {\n to(x: number, y?: number) {\n if (!y) {\n return \\`\\\\x1B[\\${x + 1}G\\`;\n }\n\n return \\`\\\\x1B[\\${y + 1};\\${x + 1}H\\`;\n },\n move(x: number, y: number) {\n let ret = '';\n\n if (x < 0) {\n ret += \\`\\\\x1B[\\${-x}D\\`;\n } else if (x > 0) {\n ret += \\`\\\\x1B[\\${x}C\\`;\n }\n\n if (y < 0) {\n ret += \\`\\\\x1B[\\${-y}A\\`;\n } else if (y > 0) {\n ret += \\`\\\\x1B[\\${y}B\\`;\n }\n\n return ret;\n },\n up: (count = 1) => \\`\\\\x1B[\\${count}A\\`,\n down: (count = 1) => \\`\\\\x1B[\\${count}B\\`,\n forward: (count = 1) => \\`\\\\x1B[\\${count}C\\`,\n backward: (count = 1) => \\`\\\\x1B[\\${count}D\\`,\n nextLine: (count = 1) => \"\\\\x1B[E\".repeat(count),\n prevLine: (count = 1) => \"\\\\x1B[F\".repeat(count),\n left: \"\\\\x1B[G\",\n hide: \"\\\\x1B[?25l\",\n show: \"\\\\x1B[?25h\",\n save: \"\\\\x1B7\",\n restore: \"\\\\x1B8\"\n } `}\n </VarDeclaration>\n <Spacing />\n <VarDeclaration\n const\n export\n name=\"erase\"\n doc=\"An object containing ANSI escape codes for erasing parts of the console.\">\n {code` {\n screen: \"\\\\x1B[2J\",\n up: (count = 1) => \"\\\\x1B[1J\".repeat(count),\n down: (count = 1) => \"\\\\x1B[J\".repeat(count),\n line: \"\\\\x1B[2K\",\n lineEnd: \"\\\\x1B[K\",\n lineStart: \"\\\\x1B[1K\",\n lines(count: number) {\n let lineClear = \"\";\n for (let i = 0; i < count; i++) {\n lineClear += this.line + (i < count - 1 ? cursor.up() : \"\");\n }\n\n if (count) {\n lineClear += cursor.left;\n }\n\n return lineClear;\n }\n } `}\n </VarDeclaration>\n <Spacing />\n <VarDeclaration\n const\n export\n name=\"scroll\"\n doc=\"An object containing ANSI escape codes for scrolling the console.\">\n {code` {\n up: (count = 1) => \"\\\\x1B[S\".repeat(count),\n down: (count = 1) => \"\\\\x1B[T\".repeat(count)\n } `}\n </VarDeclaration>\n <Spacing />\n <FunctionDeclaration\n export\n name=\"clear\"\n doc=\"A helper function to clear the console based on a count of lines\"\n parameters={[\n {\n name: \"current\",\n type: \"string\",\n doc: \"The current console output to be cleared\"\n },\n {\n name: \"consoleWidth\",\n type: \"number\",\n doc: \"The number of characters per line in the console\"\n }\n ]}>\n {code`if (!consoleWidth) {\n return erase.line + cursor.to(0);\n }\n\n let rows = 0;\n const lines = current.split(/\\\\r?\\\\n/);\n for (let line of lines) {\n rows += 1 + Math.floor(Math.max([...stripAnsi(line)].length - 1, 0) / consoleWidth);\n }\n\n return erase.lines(rows); `}\n </FunctionDeclaration>\n <Spacing />\n </>\n );\n}\n\ntype ColorFunctionProps = Record<\n \"ansi16\" | \"ansi256\" | \"ansi16m\",\n AnsiColorWrappers\n> & {\n skipBackground?: boolean;\n};\n\n/**\n * A component to generate a console message function in a Shell Shock project.\n */\nfunction ColorFunction({\n ansi16,\n ansi256,\n ansi16m,\n skipBackground = false\n}: ColorFunctionProps) {\n return code` (text: string | number | boolean | null | undefined${\n skipBackground ? \"\" : `, background = false`\n }): string => {\n try {\n if (text === undefined || text === null || text === \"\") {\n return \"\";\n }\n\n if (!isColorSupported) {\n return String(text);\n }\n\n if (colorSupportLevels.stdout === 1) {\n return wrapAnsi(String(text), ${\n skipBackground\n ? `\"${ansi16.open}\", \"${ansi16.close}\"`\n : `background ? \"${\n ansi16.background.open\n }\" : \"${ansi16.open}\", background ? \"${\n ansi16.background.close\n }\" : \"${ansi16.close}\"`\n });\n } else if (colorSupportLevels.stdout === 2) {\n return wrapAnsi(String(text), ${\n skipBackground\n ? `\"${ansi256.open}\", \"${ansi256.close}\"`\n : `background ? \"${\n ansi256.background.open\n }\" : \"${ansi256.open}\", background ? \"${\n ansi256.background.close\n }\" : \"${ansi256.close}\"`\n });\n }\n\n return wrapAnsi(String(text), ${\n skipBackground\n ? `\"${ansi16m.open}\", \"${ansi16m.close}\"`\n : `background ? \"${ansi16m.background.open}\" : \"${\n ansi16m.open\n }\", background ? \"${ansi16m.background.close}\" : \"${ansi16m.close}\"`\n });\n } catch {\n return String(text);\n }\n }\n`;\n}\n\ninterface ThemeColorNode {\n [key: string]: AnsiColorWrappers | ThemeColorNode;\n}\n\ninterface ThemeColorDefinitionProps {\n type: string;\n subType?: string;\n ansi16: ThemeColorNode;\n ansi256: ThemeColorNode;\n ansi16m: ThemeColorNode;\n}\n\nexport function ThemeColorTypeDefinition(props: ThemeColorDefinitionProps) {\n const { ansi16, ansi256, ansi16m, type, subType } = props;\n\n return (\n <For\n each={Object.entries(ansi16)}\n semicolon\n doubleHardline\n enderPunctuation>\n {([color, value]) => (\n <>\n <Show when={isSetObject(value)}>\n <Show\n when={\"open\" in value && \"close\" in value}\n fallback={\n <>\n <TSDoc\n heading={`An object containing various ${\n subType ? `${subType} ` : \"\"\n }${color}${\n type ? ` ${type}` : \"\"\n } theme coloring functions.`}></TSDoc>\n {code` ${camelCase(color)}: { `}\n <hbr />\n <ThemeColorTypeDefinition\n ansi16={ansi16[color] as ThemeColorNode}\n ansi256={ansi256[color] as ThemeColorNode}\n ansi16m={ansi16m[color] as ThemeColorNode}\n type={subType || type}\n subType={color}\n />\n <hbr />\n {code` }`}\n </>\n }>\n <TSDoc\n heading={`A function that applies ${getIndefiniteArticle(color)} ${\n color\n }${type ? ` ${type}` : \"\"}${\n subType ? ` ${subType}` : \"\"\n } color styling to provided console text.`}>\n <TSDocRemarks>\n {`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 ${\n color\n }${type ? ` ${type}` : \"\"}${\n subType ? ` ${subType}` : \"\"\n } color styling, based on the terminal's color support level. If colors are not supported, it simply returns the input text as a string.`}\n </TSDocRemarks>\n <hbr />\n <TSDocParam name=\"text\">\n {`The console text to which the ${color}${\n type ? ` ${type}` : \"\"\n }${subType ? ` ${subType}` : \"\"} color styling should be applied.`}\n </TSDocParam>\n <TSDocParam name=\"background\">\n {`A boolean indicating whether to apply the color as a background. Defaults to \\`false\\`.`}\n </TSDocParam>\n <TSDocReturns>\n {`A string with ANSI escape codes applied for ${color}${\n type ? ` ${type}` : \"\"\n }${\n subType ? ` ${subType}` : \"\"\n } color styling, or the original text if the style is not supported in the current terminal.`}\n </TSDocReturns>\n </TSDoc>\n {code`${camelCase(color)}: (text: string, background?: boolean) => string`}\n </Show>\n </Show>\n </>\n )}\n </For>\n );\n}\n\nexport function ThemeColorObjectDefinition(props: ThemeColorDefinitionProps) {\n const { ansi16, ansi256, ansi16m, type, subType } = props;\n\n return (\n <For each={Object.entries(ansi16)} comma doubleHardline enderPunctuation>\n {([color, value]) => (\n <>\n <Show when={isSetObject(value)}>\n <Show\n when={\"open\" in value && \"close\" in value}\n fallback={\n <>\n <TSDoc\n heading={`An object containing various ${\n subType ? `${subType} ` : \"\"\n }${color}${\n type ? ` ${type}` : \"\"\n } theme coloring functions.`}></TSDoc>\n {code` ${camelCase(color)}: { `}\n <hbr />\n <ThemeColorObjectDefinition\n ansi16={ansi16[color] as ThemeColorNode}\n ansi256={ansi256[color] as ThemeColorNode}\n ansi16m={ansi16m[color] as ThemeColorNode}\n type={subType || type}\n subType={color}\n />\n <hbr />\n {code` }`}\n </>\n }>\n <TSDoc\n heading={`A function that applies ${getIndefiniteArticle(color)} ${\n color\n }${type ? ` ${type}` : \"\"}${\n subType ? ` ${subType}` : \"\"\n } color styling to provided console text.`}>\n <TSDocRemarks>\n {`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 ${\n color\n }${type ? ` ${type}` : \"\"}${\n subType ? ` ${subType}` : \"\"\n } color styling, based on the terminal's color support level. If colors are not supported, it simply returns the input text as a string.`}\n </TSDocRemarks>\n <hbr />\n <TSDocParam name=\"text\">\n {`The console text to which the ${color}${\n type ? ` ${type}` : \"\"\n }${subType ? ` ${subType}` : \"\"} color styling should be applied.`}\n </TSDocParam>\n <TSDocParam name=\"background\">\n {`A boolean indicating whether to apply the color as a background. Defaults to \\`false\\`.`}\n </TSDocParam>\n <TSDocReturns>\n {`A string with ANSI escape codes applied for ${color}${\n type ? ` ${type}` : \"\"\n }${\n subType ? ` ${subType}` : \"\"\n } color styling, or the original text if the style is not supported in the current terminal.`}\n </TSDocReturns>\n </TSDoc>\n {code`${camelCase(color)}: `}\n <ColorFunction\n ansi16={ansi16[color] as AnsiColorWrappers}\n ansi256={ansi256[color] as AnsiColorWrappers}\n ansi16m={ansi16m[color] as AnsiColorWrappers}\n />\n </Show>\n </Show>\n </>\n )}\n </For>\n );\n}\n\n/**\n * A component to generate an object containing functions for coloring text in a Shell Shock project.\n */\nexport function AnsiStyleFunctionsDeclaration() {\n const colors = useColors();\n\n return (\n <>\n <For each={modifierKeys} semicolon doubleHardline enderPunctuation>\n {modifier => (\n <>\n <TSDoc\n heading={`A function that applies ${getIndefiniteArticle(\n titleCase(modifier)\n )} ${titleCase(modifier)} text-style to provided console text.`}>\n <TSDocParam name=\"text\">\n {`The console text to which the ${titleCase(\n modifier\n )} text-style should be applied.`}\n </TSDocParam>\n <TSDocReturns>\n {`A string with ANSI escape codes applied for ${titleCase(\n modifier\n )} text-style, or the original text if the style is not supported in the current terminal.`}\n </TSDocReturns>\n </TSDoc>\n <VarDeclaration\n const\n export\n name={camelCase(modifier)}\n initializer={\n <ColorFunction\n ansi16={\n colors.ansi16[\n modifier as keyof typeof colors.ansi16\n ] as AnsiColorWrappers\n }\n ansi256={\n colors.ansi256[\n modifier as keyof typeof colors.ansi256\n ] as AnsiColorWrappers\n }\n ansi16m={\n colors.ansi16m[\n modifier as keyof typeof colors.ansi16m\n ] as AnsiColorWrappers\n }\n skipBackground={true}\n />\n }\n />\n </>\n )}\n </For>\n <Spacing />\n <For each={colorKeys} semicolon doubleHardline enderPunctuation>\n {color => (\n <>\n <TSDoc\n heading={`A function that applies ${getIndefiniteArticle(\n titleCase(color)\n )} ${titleCase(color)} color styling to provided console text.`}>\n <TSDocRemarks>\n {`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 ${getIndefiniteArticle(\n titleCase(color)\n )} ${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.`}\n </TSDocRemarks>\n <hbr />\n <TSDocParam name=\"text\">\n {`The console text to which the ${titleCase(\n color\n )} color styling should be applied.`}\n </TSDocParam>\n <TSDocParam name=\"background\">\n {`A boolean indicating whether to apply the color as a background. Defaults to \\`false\\`.`}\n </TSDocParam>\n <TSDocReturns>\n {`A string with ANSI escape codes applied for ${titleCase(\n color\n )} color styling, or the original text if the style is not supported in the current terminal.`}\n </TSDocReturns>\n </TSDoc>\n <VarDeclaration\n const\n export\n name={camelCase(color)}\n initializer={\n <ColorFunction\n ansi16={\n colors.ansi16[\n color as keyof typeof colors.ansi16\n ] as AnsiColorWrappers\n }\n ansi256={\n colors.ansi256[\n color as keyof typeof colors.ansi256\n ] as AnsiColorWrappers\n }\n ansi16m={\n colors.ansi16m[\n color as keyof typeof colors.ansi16m\n ] as AnsiColorWrappers\n }\n />\n }\n />\n </>\n )}\n </For>\n <Spacing />\n\n <For\n each={Object.keys(colors.ansi16.theme)}\n semicolon\n doubleHardline\n enderPunctuation>\n {type => (\n <>\n <TSDoc\n heading={`A nested object containing functions for applying ${\n type\n } theme colors to the console.`}\n />\n <VarDeclaration\n export\n name={`${camelCase(type)}Colors`}\n initializer={\n <>\n {code` {`}\n <hbr />\n <ThemeColorObjectDefinition\n ansi16={\n colors.ansi16.theme[\n type as keyof typeof colors.ansi16.theme\n ]\n }\n ansi256={\n colors.ansi256.theme[\n type as keyof typeof colors.ansi256.theme\n ]\n }\n ansi16m={\n colors.ansi16m.theme[\n type as keyof typeof colors.ansi16m.theme\n ]\n }\n type={type}\n />\n <hbr />\n {code`}`}\n </>\n }\n />\n </>\n )}\n </For>\n <Spacing />\n </>\n );\n}\n\n/**\n * A component to generate the `splitText` function in the `shell-shock:console` builtin module.\n */\nexport function SplitTextFunctionDeclaration() {\n return (\n <>\n <FunctionDeclaration\n name=\"adjustIndex\"\n parameters={[\n {\n name: \"line\",\n type: \"string\",\n doc: \"An input line which may contain ANSI escape codes. This is used to adjust the index for splitting the line based on visible characters rather than raw string length, ensuring that ANSI codes do not cause incorrect splitting of the text.\"\n },\n {\n name: \"index\",\n type: \"number\",\n doc: \"The index at which to split the line, based on visible characters (does not account for ANSI escape codes).\"\n }\n ]}\n returnType=\"number\">\n {code`let adjustedIndex = 0;\n let visibleCount = 0;\n const ansiRegex = new RegExp([\n String.raw\\`[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\\`,\n String.raw\\`(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\\`\n ].join(\"|\"), \"g\");\n\n while (visibleCount < index && adjustedIndex < line.length) {\n ansiRegex.lastIndex = adjustedIndex;\n const match = ansiRegex.exec(line);\n\n if (match && match.index === adjustedIndex) {\n adjustedIndex += match[0].length;\n } else {\n adjustedIndex++;\n visibleCount++;\n }\n }\n\n return adjustedIndex; `}\n </FunctionDeclaration>\n <Spacing />\n <FunctionDeclaration\n name=\"breakLine\"\n parameters={[\n {\n name: \"line\",\n type: \"string\"\n },\n {\n name: \"index\",\n type: \"number\"\n }\n ]}\n returnType=\"[string, string]\">\n {code`const adjustedIndex = adjustIndex(line, index);\n const first = line.slice(0, adjustedIndex);\n const second = line.slice(adjustedIndex);\n\n // Match all ANSI escape sequences in the first string\n const ansiRegex = /[\\\\x1b\\\\u009b][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?(?:\\\\u0007))|(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))/g;\n\n const openCodes: string[] = [];\n const closeCodes: string[] = [];\n let match: RegExpExecArray | null;\n\n while ((match = ansiRegex.exec(first)) !== null) {\n const code = match[0];\n // Check if this is a reset/close code (e.g., \\\\x1b[0m, \\\\x1b[39m, \\\\x1b[49m, etc.)\n if (/\\\\x1b\\\\[(?:0|22|23|24|27|28|29|39|49)m/.test(code)) {\n // A close/reset code cancels the last open code\n openCodes.pop();\n closeCodes.pop();\n } else {\n openCodes.push(code);\n // Derive a close code: map SGR open codes to their reset counterparts\n const sgrMatch = code.match(/\\\\x1b\\\\[(\\\\d+)m/);\n if (sgrMatch) {\n const n = parseInt(sgrMatch[1]!, 10);\n let closeCode: string;\n if (n >= 30 && n <= 37) closeCode = \"\\\\x1b[39m\";\n else if (n >= 40 && n <= 47) closeCode = \"\\\\x1b[49m\";\n else if (n >= 90 && n <= 97) closeCode = \"\\\\x1b[39m\";\n else if (n >= 100 && n <= 107) closeCode = \"\\\\x1b[49m\";\n else if (n === 1) closeCode = \"\\\\x1b[22m\";\n else if (n === 2) closeCode = \"\\\\x1b[22m\";\n else if (n === 3) closeCode = \"\\\\x1b[23m\";\n else if (n === 4) closeCode = \"\\\\x1b[24m\";\n else if (n === 7) closeCode = \"\\\\x1b[27m\";\n else if (n === 8) closeCode = \"\\\\x1b[28m\";\n else if (n === 9) closeCode = \"\\\\x1b[29m\";\n else closeCode = \"\\\\x1b[0m\";\n closeCodes.push(closeCode);\n } else {\n closeCodes.push(\"\\\\x1b[0m\");\n }\n }\n }\n\n // Append close codes to the end of \"first\" (in reverse order)\n const closeSequence = closeCodes.slice().reverse().join(\"\");\n // Prepend open codes to the start of \"second\"\n const openSequence = openCodes.join(\"\");\n\n return [first.replace(/^\\\\s+/, \"\").replace(/\\\\s+$/, \"\") + closeSequence, openSequence + second.replace(/^\\\\s+/, \"\").replace(/\\\\s+$/, \"\")]; `}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc heading=\"Split text into multiple lines based on a maximum length.\">\n <TSDocRemarks>\n {`This function splits the provided text into multiple lines based on the specified maximum length, ensuring that words are not broken in the middle.`}\n </TSDocRemarks>\n <hbr />\n <TSDocParam name=\"text\">\n {`The text to split into multiple lines.`}\n </TSDocParam>\n <TSDocParam name=\"maxLength\">\n {`The maximum length of each line.`}\n </TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n name=\"splitText\"\n export\n parameters={[\n {\n name: \"text\",\n type: \"string\"\n },\n {\n name: \"maxLength\",\n type: \"number | SizeToken\"\n }\n ]}>\n {code`let line = text;\n let result = [] as string[];\n\n const calculatedMaxLength = isSizeToken(maxLength) ? calculateWidth(maxLength) : maxLength;\n while (stripAnsi(line).length > calculatedMaxLength || line.indexOf(\"\\\\n\") !== -1) {\n if (line.indexOf(\"\\\\n\") !== -1) {\n result.push(...splitText(line.slice(0, line.indexOf(\"\\\\n\")).replace(/(\\\\r)?\\\\n/, \"\"), calculatedMaxLength));\n line = line.indexOf(\"\\\\n\") + 1 < line.length\n ? line.slice(line.indexOf(\"\\\\n\") + 1)\n : \"\";\n } else {\n const strippedLine = stripAnsi(line);\n const index = [\" \", \"/\", \"+\", \"=\"].reduce((ret, split) => {\n let cursor = ret;\n while (strippedLine.substring(cursor + 1).includes(split) &&\n strippedLine.indexOf(split, cursor + 1) <= calculatedMaxLength) {\n cursor = strippedLine.indexOf(split, cursor + 1);\n }\n\n return cursor;\n }, -1);\n if (index === -1) {\n break;\n }\n\n const lines = breakLine(line, index);\n result.push(lines[0]);\n line = lines[1];\n }\n }\n\n while (stripAnsi(line).length > calculatedMaxLength) {\n const lines = breakLine(line, calculatedMaxLength);\n result.push(lines[0]);\n line = lines[1];\n }\n\n result.push(line);\n return result; `}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component to generate the `write` function in the `shell-shock:console` builtin module.\n */\nexport function WriteFunctionDeclaration() {\n return (\n <>\n <InterfaceDeclaration\n export\n name=\"WriteOptions\"\n doc=\"Options for writing to the console.\">\n <TSDoc heading=\"Console function to use for writing to the console\">\n <TSDocRemarks>\n {`The console function to use for writing to the console. If not specified, the default console function \\`console.log\\` will be used.`}\n </TSDocRemarks>\n <hbr />\n <TSDocDefaultValue\n type={ReflectionKind.method}\n defaultValue={`\\`console.log\\``}\n />\n </TSDoc>\n <InterfaceMember\n name=\"consoleFn\"\n optional\n type=\"(text: string) => void\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <TSDoc heading=\"Write to the console.\">\n <TSDocRemarks>\n {`This function writes to the console, applying the appropriate padding as defined in the current theme configuration and wrapping as needed.`}\n </TSDocRemarks>\n <hbr />\n <TSDocParam name=\"text\">\n {`The text to write to the console.`}\n </TSDocParam>\n <TSDocParam name=\"options\">{`The options to apply when writing to the console.`}</TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"write\"\n parameters={[\n {\n name: \"text\",\n type: \"string | number | boolean | null\",\n optional: true\n },\n {\n name: \"options\",\n type: \"WriteOptions\",\n default: \"{}\"\n }\n ]}>\n {code`const consoleFn = options.consoleFn ?? console.log;\n if (text === undefined || text === null || text === \"\") {\n consoleFn(\"\");\n return;\n }\n\n consoleFn(String(text)); `}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component to generate the `writeLine` function in the `shell-shock:console` builtin module.\n */\nexport function WriteLineFunctionDeclaration() {\n const theme = useTheme();\n\n return (\n <>\n <InterfaceDeclaration\n export\n name=\"WriteLineOptions\"\n doc=\"Options for writing a line to the console.\"\n extends={[\"WriteOptions\"]}>\n <TSDoc heading=\"Padding to apply to the line\">\n <TSDocRemarks>\n {`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.`}\n </TSDocRemarks>\n </TSDoc>\n <InterfaceMember name=\"padding\" optional type=\"number\" />\n <hbr />\n <TSDoc heading=\"Color of the line text\">\n <TSDocRemarks>\n {`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).`}\n </TSDocRemarks>\n <hbr />\n </TSDoc>\n <InterfaceMember\n name=\"color\"\n optional\n type='\"primary\" | \"secondary\" | \"tertiary\"'\n />\n </InterfaceDeclaration>\n <Spacing />\n <TSDoc heading=\"Write a line to the console.\">\n <TSDocRemarks>\n {`This function writes a line to the console, applying the appropriate padding as defined in the current theme configuration and wrapping as needed.`}\n </TSDocRemarks>\n <hbr />\n <TSDocParam name=\"text\">\n {`The line text to write to the console.`}\n </TSDocParam>\n <TSDocParam name=\"options\">{`The options to apply when writing the line to the console.`}</TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"writeLine\"\n parameters={[\n {\n name: \"text\",\n type: \"string | number | boolean | null\",\n optional: true\n },\n {\n name: \"options\",\n type: \"WriteLineOptions\",\n default: \"{}\"\n }\n ]}>\n {code`const color = options.color;\n if (text === undefined || text === null || text === \"\") {\n write(\"\", options);\n return;\n }\n\n write(\\`\\${\" \".repeat(Math.max(options.padding ?? ${\n theme.padding.app\n }, 0))}\\${color ? textColors.body[color](String(text)) : String(text)}\\`, options); `}\n </FunctionDeclaration>\n </>\n );\n}\n\nexport type MessageFunctionDeclarationProps = Partial<\n Pick<FunctionDeclarationProps, \"parameters\">\n> & {\n type:\n | \"success\"\n | \"help\"\n | \"info\"\n | \"debug\"\n | \"verbose\"\n | \"warn\"\n | \"danger\"\n | \"error\";\n variant: ThemeMessageVariant;\n color?: ThemeMessageVariant;\n consoleFnName: \"log\" | \"info\" | \"warn\" | \"error\" | \"debug\";\n description: string;\n prefix?: Children;\n timestamp?: boolean;\n};\n\n/**\n * A component to generate the message functions in the `shell-shock:console` builtin module.\n */\nexport function MessageFunctionDeclaration(\n props: MessageFunctionDeclarationProps\n) {\n const {\n type,\n variant,\n consoleFnName,\n description,\n prefix,\n parameters,\n timestamp,\n color = variant\n } = props;\n\n const theme = useTheme();\n\n return (\n <>\n <TSDoc\n heading={`Write ${getIndefiniteArticle(\n description\n )} ${description} message to the console.`}>\n <TSDocRemarks>\n {`This function initializes the Powerlines environment configuration object.`}\n </TSDocRemarks>\n <hbr />\n <TSDocParam name=\"message\">\n {`The message to write to the console.`}\n </TSDocParam>\n <TSDocParam name=\"header\">\n {`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.`}\n </TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n export\n name={type}\n parameters={\n parameters ?? [\n {\n name: \"message\",\n type: \"string\",\n optional: false\n },\n {\n name: \"header\",\n type: \"string\",\n optional: true\n }\n ]\n }>\n <Show when={Boolean(prefix)}>\n {prefix}\n <hbr />\n <hbr />\n </Show>\n {code`\n if (!message) {\n return;\n }\n\n ${\n !theme.labels.message.footer[variant] && timestamp\n ? `const timestamp = \\`\\${textColors.message.footer.${\n color\n }(new Date().toLocaleDateString())} \\${borderColors.message.outline.${\n color\n }(\"${\n theme.borderStyles.message.outline[variant].bottom\n }\")} \\${textColors.message.footer.${\n color\n }(new Date().toLocaleTimeString())}\\`; `\n : \"\"\n }\n\n writeLine(borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].topLeft\n }\") + ${\n theme.labels.message.header[variant] ||\n theme.icons.message.header[variant]\n ? `borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].top\n }\".repeat(4)) + \" \" + ${\n theme.icons.message.header[variant]\n ? `borderColors.message.outline.${color}(\"${\n theme.icons.message.header[variant]\n }\") + \" \" +`\n : \"\"\n } bold(textColors.message.header.${color}(header || \"${\n theme.labels.message.header[variant]\n }\")) + \" \" + borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].top\n }\".repeat(Math.max(getTerminalSize().columns - ${\n Math.max(theme.padding.app, 0) * 2 +\n theme.borderStyles.message.outline[variant].topLeft.length +\n 4 +\n (theme.icons.message.header[variant]\n ? 2 + (theme.labels.message.header[variant] ? 0 : 1)\n : 0) +\n (theme.labels.message.header[variant]\n ? theme.labels.message.header[variant].length + 2\n : 0) +\n theme.borderStyles.message.outline[variant].topRight.length\n }, 0)))`\n : `borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].top\n }\".repeat(Math.max(getTerminalSize().columns - ${\n Math.max(theme.padding.app, 0) * 2 +\n theme.borderStyles.message.outline[variant].topLeft.length +\n theme.borderStyles.message.outline[variant].topRight.length\n }, 0)))`\n } + borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].topRight\n }\"), { consoleFn: console.${consoleFnName} });\n splitText(\n message,\n Math.max(getTerminalSize().columns - ${\n (Math.max(theme.padding.app, 0) +\n Math.max(theme.padding.message, 0)) *\n 2 +\n theme.borderStyles.message.outline[variant].left.length +\n theme.borderStyles.message.outline[variant].right.length\n }, 12)\n ).forEach(line => {\n writeLine(borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].left +\n \" \".repeat(Math.max(theme.padding.message, 0))\n }\") + textColors.message.description.${color}(line) + \" \".repeat(Math.max(getTerminalSize().columns - (stripAnsi(line).length + ${\n Math.max(theme.padding.app, 0) * 2 +\n Math.max(theme.padding.message, 0) +\n theme.borderStyles.message.outline[variant].left.length +\n theme.borderStyles.message.outline[variant].right.length\n }), 0)) + borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].right\n }\"), { consoleFn: console.${consoleFnName} });\n });\n writeLine(borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].bottomLeft\n }\") + ${\n theme.labels.message.footer[variant] || timestamp\n ? `borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].bottom\n }\".repeat(Math.max(getTerminalSize().columns - ${\n Math.max(theme.padding.app, 0) * 2 +\n 4 +\n (theme.labels.message.footer[variant]\n ? theme.labels.message.footer[variant].length + 2\n : 0) +\n theme.borderStyles.message.outline[variant].bottomLeft.length +\n theme.borderStyles.message.outline[variant].bottomRight.length\n }${\n !theme.labels.message.footer[variant] && timestamp\n ? \" - (stripAnsi(timestamp).length + 2)\"\n : \"\"\n }, 0))) + \" \" + ${`bold(textColors.message.footer.${color}(${\n theme.labels.message.footer[variant]\n ? `\"${theme.labels.message.footer[variant]}\"`\n : timestamp && \"timestamp\"\n }))`} + \" \" + borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].bottom\n }\".repeat(4))`\n : `borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].bottom\n }\".repeat(Math.max(getTerminalSize().columns - ${\n Math.max(theme.padding.app, 0) * 2 +\n theme.borderStyles.message.outline[variant].bottomLeft.length +\n theme.borderStyles.message.outline[variant].bottomRight.length\n }, 0)))`\n } + borderColors.message.outline.${color}(\"${\n theme.borderStyles.message.outline[variant].bottomRight\n }\"), { consoleFn: console.${consoleFnName} });\n`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component to generate the `wrapAnsi` function in the `shell-shock:console` builtin module.\n */\nexport function WrapAnsiFunction() {\n return (\n <>\n <TSDoc heading=\"Applies ANSI escape codes to a string.\">\n <TSDocRemarks>\n {`Split text by /\\\\\\\\x1b[\\\\[|\\\\]][0-9;]*m/ and wrap non-ANSI parts with open/closing tags.`}\n </TSDocRemarks>\n\n <TSDocExample>\n {`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\"`}\n </TSDocExample>\n\n <TSDocParam name=\"text\">\n {`The text to apply ANSI codes to.`}\n </TSDocParam>\n <TSDocParam name=\"open\">{`The opening ANSI code.`}</TSDocParam>\n <TSDocParam name=\"close\">{`The closing ANSI code.`}</TSDocParam>\n <TSDocReturns>{`The text with ANSI codes applied.`}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"wrapAnsi\"\n parameters={[\n {\n name: \"text\",\n type: \"string | number\",\n optional: false\n },\n {\n name: \"open\",\n type: \"string\",\n optional: false\n },\n { name: \"close\", type: \"string\", optional: false }\n ]}>\n {code`const str = String(text);\n const tokens = [] as string[];\n\n let last = 0;\n let match: RegExpExecArray | null;\n while ((match = /\\\\\\\\x1b[\\\\[|\\\\]][0-9;]*m/g.exec(str)) !== null) {\n if (match.index > last) tokens.push(str.slice(last, match.index));\n tokens.push(match[0]);\n last = match.index + match[0].length;\n }\n\n if (last < str.length) {\n tokens.push(str.slice(last));\n }\n\n let result = \"\";\n for (let i = 0; i < tokens.length; i++) {\n const seg = tokens[i]!;\n if (/^\\\\\\\\x1b[\\\\[|\\\\]][0-9;]*m$/.test(seg)) {\n result += seg;\n continue;\n }\n\n if (!seg) {\n continue;\n }\n\n result += i > 0 && /^\\\\\\\\x1b[\\\\[|\\\\]][0-9;]*m$/.test(tokens[i - 1]!) && i + 1 < tokens.length && /^\\\\\\\\x1b[\\\\[|\\\\]][0-9;]*m$/.test(tokens[i + 1]!)\n ? seg\n : \\`\\${open}\\${seg}\\${close}\\`;\n }\n\n return result;\n`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component to generate the `stripAnsi` function in the `shell-shock:console` builtin module.\n */\nexport function StripAnsiFunctionDeclaration() {\n return (\n <>\n <TSDoc heading=\"Removes ANSI escape codes from a string.\">\n <TSDocExample>\n {`const result = stripAnsi(\"Hello\\\\\\\\x1b[31mWorld\\\\\\\\x1b[0mAgain\"); // \"HelloWorldAgain\"`}\n </TSDocExample>\n\n <TSDocParam name=\"text\">\n {`The text to strip ANSI codes from.`}\n </TSDocParam>\n <TSDocReturns>{`The text with ANSI codes removed.`}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"stripAnsi\"\n parameters={[\n {\n name: \"text\",\n type: \"string | number\",\n optional: false\n }\n ]}>\n {code`return String(text).replace(new RegExp([\n String.raw\\`[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\\`,\n String.raw\\`(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\\`\n ].join(\"|\"), \"g\"), \"\");`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component to generate the `stripAnsi` function in the `shell-shock:console` builtin module.\n */\nexport function DividerFunctionDeclaration() {\n const theme = useTheme();\n\n return (\n <>\n <InterfaceDeclaration\n export\n name=\"DividerOptions\"\n doc=\"Options for formatting the divider line written to console.\">\n <InterfaceMember\n name=\"width\"\n optional\n type=\"number\"\n doc=\"The width of the divider line. If not specified, the divider will span the full width of the console, minus the padding.\"\n />\n <hbr />\n <TSDoc heading=\"The border of the divider line. Can be 'primary', 'secondary', 'tertiary', or 'none'. If not specified, the default border style will be used.\">\n <TSDocRemarks>\n {`The value provided will determine the border style and color based on the current theme configuration.`}\n </TSDocRemarks>\n <TSDocDefaultValue\n type={ReflectionKind.string}\n defaultValue=\"primary\"\n />\n </TSDoc>\n <InterfaceMember\n name=\"border\"\n optional\n type='\"primary\" | \"secondary\" | \"tertiary\"'\n 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.\"\n />\n <hbr />\n <TSDoc heading=\"Padding to apply to the line\">\n <TSDocRemarks>\n {`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.`}\n </TSDocRemarks>\n <TSDocDefaultValue\n type={ReflectionKind.number}\n defaultValue={theme.padding.app * 4}\n />\n </TSDoc>\n <InterfaceMember name=\"padding\" optional type=\"number\" />\n </InterfaceDeclaration>\n <Spacing />\n <TSDoc heading=\"Write a horizontal divider line to the console.\">\n <TSDocExample>\n {`divider({ width: 50, border: \"primary\" }); // Writes a horizontal divider line of width 50 with primary border.`}\n </TSDocExample>\n <TSDocParam name=\"options\">\n {`Options for formatting the divider line.`}\n </TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"divider\"\n parameters={[\n {\n name: \"options\",\n type: \"DividerOptions\",\n optional: false\n }\n ]}>\n {code`const padding = options.padding ?? ${Math.max(theme.padding.app, 1) * 4};\n const width = options.width ?? (getTerminalSize().columns - (Math.max(padding, 0) * 2));\n const border = options.border === \"tertiary\" ? borderColors.app.divider.tertiary(\"${\n theme.borderStyles.app.divider.tertiary.top\n }\") : options.border === \"secondary\" ? borderColors.app.divider.secondary(\"${\n theme.borderStyles.app.divider.secondary.top\n }\") : borderColors.app.divider.primary(\"${\n theme.borderStyles.app.divider.primary.top\n }\");\n\n writeLine(\" \".repeat(Math.max(padding - ${theme.padding.app}, 0)) + border.repeat(Math.max(width / ${\n theme.borderStyles.app.divider.primary.top.length ?? 1\n }, 0)));\n `}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component to generate the `link` function in the `shell-shock:console` builtin module.\n */\nexport function LinkFunctionDeclaration() {\n const theme = useTheme();\n\n return (\n <>\n <InterfaceDeclaration\n export\n name=\"LinkOptions\"\n doc=\"Options for formatting a hyperlink in the console.\">\n <InterfaceMember\n name=\"external\"\n optional\n type=\"boolean\"\n 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.\"\n />\n <Spacing />\n <InterfaceMember\n name=\"text\"\n optional\n type=\"string\"\n doc=\"The text to display for the link. If not provided, the URL will be used as the text.\"\n />\n <Spacing />\n <InterfaceMember\n name=\"useTextWhenUnsupported\"\n optional\n type=\"boolean\"\n doc=\"Whether to use the text when the hyperlink is not supported. If true, the text will be displayed even if the terminal does not support hyperlinks.\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <TSDoc heading=\"Render a hyperlink in the console.\">\n <TSDocParam name=\"url\">\n {`The URL to render as a hyperlink.`}\n </TSDocParam>\n <TSDocParam name=\"options\">\n {`Options for formatting the hyperlink.`}\n </TSDocParam>\n <TSDocReturns>{`The formatted hyperlink string for display in the console.`}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"link\"\n parameters={[\n {\n name: \"url\",\n type: \"string\",\n optional: false\n },\n { name: \"options\", type: \"LinkOptions\", default: \"{}\" }\n ]}>\n <IfStatement condition={code`isHyperlinkSupported()`}>\n {code`return \\`\\\\x1b]8;;\\${url}\\\\u0007\\${options.text ? options.text : url}\\\\x1b]8;;\\\\u0007\\${options.external === true ? \"${\n theme.icons.link.external\n }\" : \"\"}\\`;`}\n </IfStatement>\n <hbr />\n <IfStatement condition={code`isColorSupported`}>\n {code`return \\`\\${underline(textColors.body.link(\\`\\${options.useTextWhenUnsupported && options.text ? options.text : url}\\`))}\\${options.external === true ? \"${\n theme.icons.link.external\n }\" : \"\"}\\`;`}\n </IfStatement>\n <hbr />\n {code`return \\`\\${options.useTextWhenUnsupported && options.text ? options.text : url}\\${options.external === true ? \"${\n theme.icons.link.external\n }\" : \"\"}\\`;`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component to generate the `blockquote` function declaration\n */\nexport function BlockquoteFunctionDeclaration() {\n const theme = useTheme();\n\n return (\n <>\n <Spacing />\n <TSDoc\n heading={`Format a string with blockquote styling for display in console.`}>\n <TSDocParam name=\"text\">\n {`The text to format with blockquote styling.`}\n </TSDocParam>\n <TSDocReturns>{`The formatted string with blockquote styling.`}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"blockquote\"\n parameters={[\n {\n name: \"text\",\n type: \"string | number | boolean | null\",\n optional: true\n }\n ]}\n returnType=\"string\">\n {code`if (text === undefined || text === null || text === \"\") {\n return \"\";\n }\n\n const lines = splitText(\n String(text),\n Math.max(getTerminalSize().columns, 20) - 6\n );\n\n return lines.map(line => \\`\\${borderColors.app.blockquote.primary(isUnicodeSupported() ? \"${\n theme.borderStyles.app.blockquote.primary.left\n }\" : \"|\")} \\${italic(line)} \\`).join(\"\\\\n\"); `}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component to generate the `code` function declaration\n */\nexport function CodeFunctionDeclaration() {\n const theme = useTheme();\n\n return (\n <>\n <Spacing />\n <TSDoc heading={`Format a source code string for display in console.`}>\n <TSDocParam name=\"text\">\n {`The source code text to format with code styling.`}\n </TSDocParam>\n <TSDocReturns>{`The formatted string with code styling.`}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"code\"\n parameters={[\n {\n name: \"text\",\n type: \"string | number | boolean | null\",\n optional: true\n },\n {\n name: \"language\",\n type: \"string\",\n optional: true\n }\n ]}\n returnType=\"string\">\n {code`if (text === undefined || text === null || text === \"\") {\n return \"\";\n }\n\n const lines = splitText(\n String(text),\n Math.max(getTerminalSize().columns, 20)\n );\n\n return \\` \\${borderColors.app.divider.primary(\"${\n theme.borderStyles.app.divider.primary.top\n }\".repeat(4))}\\${language ? \\` \\${borderColors.app.divider.primary(language)} \\` : \"\"}\\${borderColors.app.divider.primary(\"${\n theme.borderStyles.app.divider.primary.top\n }\".repeat(getTerminalSize().columns - (language ? language.length + 2 : 0) - 5))} \\\\n\\${lines.map((line, index) => \\` \\${\" \".repeat(String(lines.length).length - String(index + 1).length)}\\${textColors.body.tertiary(index + 1)} \\${textColors.body.primary(line)}\\`).join(\"\\\\n\")}\\`; `}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component to generate the `inlineCode` function declaration\n */\nexport function InlineCodeFunctionDeclaration() {\n return (\n <>\n <Spacing />\n <TSDoc\n heading={`Format a string with inline code styling for display in console.`}>\n <TSDocParam name=\"text\">\n {`The text to format with inline code styling.`}\n </TSDocParam>\n <TSDocReturns>{`The formatted string with inline code styling.`}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"inlineCode\"\n parameters={[\n {\n name: \"text\",\n type: \"string | number | boolean | null\",\n optional: true\n }\n ]}\n returnType=\"string\">\n {code`if (text === undefined || text === null || text === \"\") {\n return \"\";\n }\n\n return inverse(\\`\\${text}\\`); `}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component to generate the `spinner` function in the `shell-shock:console` builtin module.\n */\nexport function SpinnerFunctionDeclaration() {\n const theme = useTheme();\n\n return (\n <>\n <TypeDeclaration name=\"WriteStream\">\n {`NodeJS.WriteStream;`}\n </TypeDeclaration>\n <Spacing />\n <VarDeclaration\n const\n name=\"activeHooksPerStream\"\n initializer=\"new Set();\"\n />\n <Spacing />\n <InterfaceDeclaration\n export\n name=\"SpinnerOptions\"\n doc=\"Options for configuring the spinner.\">\n <InterfaceMember\n name=\"message\"\n optional\n type=\"string\"\n doc=\"The message text to display next to the spinner. Defaults to an empty string.\"\n />\n <hbr />\n <InterfaceMember\n name=\"stream\"\n optional\n type=\"WriteStream\"\n doc=\"The output stream to write the spinner to. Defaults to process.stderr.\"\n />\n <hbr />\n <InterfaceMember\n name=\"spinner\"\n optional\n type=\"ThemeSpinnerResolvedConfig | SpinnerPreset\"\n doc=\"The spinner animation to use. Should be an object with a 'frames' property (an array of strings representing each frame of the animation) and an 'interval' property (the time in milliseconds between each frame). If not specified, a default spinner animation will be used.\"\n />\n </InterfaceDeclaration>\n\n <Spacing />\n <ClassDeclaration name=\"Spinner\">\n <ClassField name=\"frames\" isPrivateMember type=\"string[]\" />\n <hbr />\n <ClassField name=\"interval\" isPrivateMember type=\"number\" />\n <hbr />\n <ClassField name=\"currentFrame\" isPrivateMember type=\"number\">\n {code`-1`}\n </ClassField>\n <hbr />\n <ClassField\n name=\"timer\"\n isPrivateMember\n optional\n type=\"NodeJS.Timeout\"\n />\n <hbr />\n <ClassField name=\"message\" isPrivateMember type=\"string\">\n {code`\"\"`}\n </ClassField>\n <hbr />\n <ClassField name=\"stream\" isPrivateMember type=\"WriteStream\">\n {code`process.stderr`}\n </ClassField>\n <hbr />\n <ClassField name=\"lines\" isPrivateMember type=\"number\">\n {code`0`}\n </ClassField>\n <hbr />\n <ClassField\n name=\"exitHandlerBound\"\n isPrivateMember\n type=\"(signal: any) => void\">\n {code`() => {}`}\n </ClassField>\n <hbr />\n <ClassField name=\"lastSpinnerFrameTime\" isPrivateMember type=\"number\">\n {code`0`}\n </ClassField>\n <hbr />\n <ClassField name=\"isSpinning\" isPrivateMember type=\"boolean\">\n {code`false`}\n </ClassField>\n <hbr />\n <ClassField\n name=\"hookedStreams\"\n isPrivateMember\n type='Map<WriteStream, { write?: WriteStream[\"write\"]; originalWrite: WriteStream[\"write\"]; hookedWrite: WriteStream[\"write\"] }>'>\n {code`new Map()`}\n </ClassField>\n <hbr />\n <ClassField name=\"isInternalWrite\" isPrivateMember type=\"boolean\">\n {code`false`}\n </ClassField>\n <hbr />\n <ClassField name=\"isDeferringRender\" isPrivateMember type=\"boolean\">\n {code`false`}\n </ClassField>\n <Spacing />\n {code`constructor(options: SpinnerOptions = {}) {\n const spinner = (typeof options.spinner === \"string\" ? resolveSpinner(options.spinner as SpinnerPreset) : options.spinner) ?? ${JSON.stringify(\n theme.spinner\n )};\n this.#frames = spinner.frames;\n this.#interval = spinner.interval;\n\n if (options.message) {\n this.#message = options.message;\n }\n if (options.stream) {\n this.#stream = options.stream;\n }\n\n this.#exitHandlerBound = this.#exitHandler.bind(this);\n }\n\n #internalWrite(action: () => unknown) {\n this.#isInternalWrite = true;\n try {\n return action();\n } finally {\n this.#isInternalWrite = false;\n }\n }\n\n #stringifyChunk(chunk: string | Uint8Array<ArrayBufferLike> | ArrayBufferLike) {\n if (chunk === undefined || chunk === null) {\n return \"\";\n }\n\n if (typeof chunk === \"string\") {\n return chunk;\n }\n\n if (Buffer.isBuffer(chunk) || ArrayBuffer.isView(chunk)) {\n return Buffer.from(chunk).toString(\"utf8\");\n }\n\n return String(chunk);\n }\n\n #withSynchronizedOutput(action: () => unknown) {\n if (!isInteractive) {\n return action();\n }\n\n try {\n this.#write(\"\\\\u001B[?2026h\");\n return action();\n } finally {\n this.#write(\"\\\\u001B[?2026l\");\n }\n }\n\n #hookStream(stream: WriteStream) {\n if (!stream || this.#hookedStreams.has(stream) || typeof stream.write !== \"function\") {\n return;\n }\n\n if (activeHooksPerStream.has(stream)) {\n return;\n }\n\n const originalWrite = stream.write;\n const hookedWrite = ((...writeArguments: Parameters<WriteStream[\"write\"]>) => this.#hookedWrite(stream, originalWrite, writeArguments)) as WriteStream[\"write\"];\n\n this.#hookedStreams.set(stream, {originalWrite, hookedWrite});\n activeHooksPerStream.add(stream);\n stream.write = hookedWrite;\n }\n\n #installHook() {\n if (!isInteractive || this.#hookedStreams.size > 0) {\n return;\n }\n\n const streamsToHook = new Set([this.#stream]);\n if (isInteractive && (this.#stream === process.stdout || this.#stream === process.stderr)) {\n streamsToHook.add(process.stdout);\n streamsToHook.add(process.stderr);\n }\n\n for (const stream of streamsToHook) {\n this.#hookStream(stream);\n }\n }\n\n #uninstallHook() {\n for (const [stream, hookInfo] of this.#hookedStreams) {\n if (stream.write === hookInfo.hookedWrite) {\n stream.write = hookInfo.originalWrite;\n }\n\n activeHooksPerStream.delete(stream);\n }\n\n this.#hookedStreams.clear();\n }\n\n #hookedWrite(stream: WriteStream, originalWrite: typeof stream.write, writeArguments: Parameters<typeof stream.write>) {\n const [chunk, callback] = writeArguments;\n\n if (this.#isInternalWrite || !this.isSpinning) {\n return originalWrite.call(stream, chunk);\n }\n\n if (this.#lines > 0) {\n this.clear();\n }\n\n const chunkString = this.#stringifyChunk(chunk);\n const chunkTerminatesLine = chunkString.at(-1) === \"\\\\n\";\n const writeResult = originalWrite.call(stream, chunk);\n\n if (chunkTerminatesLine) {\n this.#isDeferringRender = false;\n } else if (chunkString !== \"\") {\n this.#isDeferringRender = true;\n }\n\n if (this.isSpinning && !this.#isDeferringRender) {\n this.#render();\n }\n\n return writeResult;\n }\n\n #stopWithIcon(icon: string, message: string) {\n return this.stop(\\` \\${icon} \\${message ?? this.#message}\\`);\n }\n\n #render() {\n if (this.#isDeferringRender) {\n return;\n }\n\n if (this.#currentFrame === -1 || Date.now() - this.#lastSpinnerFrameTime >= this.#interval) {\n this.#currentFrame = ++this.#currentFrame % this.#frames.length;\n this.#lastSpinnerFrameTime = Date.now();\n }\n\n let display = \\`\\${textColors.spinner.icon.active(this.#frames[this.#currentFrame])} \\${textColors.spinner.message.active(this.#message)}\\`;\n if (!isInteractive) {\n display += \"\\\\n\";\n }\n\n if (isInteractive) {\n this.#withSynchronizedOutput(() => {\n this.clear();\n this.#write(display);\n });\n } else {\n this.#write(display);\n }\n\n if (isInteractive) {\n this.#lines = this.#lineCount(display);\n }\n }\n\n #write(message: string) {\n this.#internalWrite(() => {\n this.#stream.write(message);\n });\n }\n\n #lineCount(message: string) {\n const width = this.#stream.columns ?? 80;\n const lines = stripVTControlCharacters(message).split(\"\\\\n\");\n\n let lineCount = 0;\n for (const line of lines) {\n lineCount += Math.max(1, Math.ceil(line.length / width));\n }\n\n return lineCount;\n }\n\n #hideCursor() {\n if (isInteractive) {\n this.#write(\"\\\\u001B[?25l\");\n }\n }\n\n #showCursor() {\n if (isInteractive) {\n this.#write(\"\\\\u001B[?25h\");\n }\n }\n\n #subscribeToProcessEvents() {\n process.once(\"SIGINT\", this.#exitHandlerBound);\n process.once(\"SIGTERM\", this.#exitHandlerBound);\n }\n\n #unsubscribeFromProcessEvents() {\n process.off(\"SIGINT\", this.#exitHandlerBound);\n process.off(\"SIGTERM\", this.#exitHandlerBound);\n }\n\n #exitHandler(signal: any) {\n if (this.isSpinning) {\n this.stop();\n }\n\n process.exit(signal === \"SIGINT\" ? 130 : (signal === \"SIGTERM\" ? 143 : 1));\n } `}\n <ClassPropertyGet\n public\n name=\"isSpinning\"\n type=\"boolean\"\n doc=\"Whether the spinner is currently active and spinning.\">\n {code`return this.#isSpinning;`}\n </ClassPropertyGet>\n <Spacing />\n <ClassPropertySet\n public\n name=\"message\"\n type=\"string\"\n doc=\"Set the message displayed by the spinner.\">\n {code`this.#message = value;`}\n </ClassPropertySet>\n <Spacing />\n <ClassPropertyGet\n public\n name=\"message\"\n type=\"string\"\n doc=\"Get the message displayed by the spinner.\">\n {code`return this.#message;`}\n </ClassPropertyGet>\n <Spacing />\n <ClassMethod\n name=\"start\"\n doc=\"Start the spinner animation.\"\n parameters={[{ name: \"message\", type: \"string\" }]}>\n <IfStatement condition={code`message !== undefined`}>\n {code`this.#message = message;`}\n </IfStatement>\n <IfStatement condition={code`this.isSpinning`}>\n {code`return this;`}\n </IfStatement>\n {code`this.#isSpinning = true;\n this.#hideCursor();\n this.#installHook();\n this.#render();\n this.#subscribeToProcessEvents();\n\n if (isInteractive) {\n this.#timer = setInterval(() => {\n this.#render();\n }, this.#interval);\n }\n\n return this;\n `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n name=\"stop\"\n doc=\"Stop the spinner animation.\"\n parameters={[\n { name: \"finalMessage\", optional: true, type: \"string\" }\n ]}>\n {code`if (!this.isSpinning) {\n return this;\n }\n\n const shouldWriteNewline = this.#isDeferringRender;\n this.#isSpinning = false;\n if (this.#timer) {\n clearInterval(this.#timer);\n this.#timer = undefined;\n }\n\n this.#isDeferringRender = false;\n this.#uninstallHook();\n this.#showCursor();\n this.clear();\n this.#unsubscribeFromProcessEvents();\n\n if (finalMessage) {\n const prefix = shouldWriteNewline ? \"\\\\n\" : \"\";\n this.#stream.write(\\`\\${prefix}\\${finalMessage}\\\\n\\`);\n }\n\n return this;\n\n `}\n </ClassMethod>\n <Spacing />\n <ClassMethod name=\"clear\" doc=\"Clear the spinner animation.\">\n {code`if (!isInteractive) {\n return this;\n }\n\n if (this.#lines === 0) {\n return this;\n }\n\n this.#internalWrite(() => {\n this.#stream.cursorTo(0);\n\n for (let index = 0; index < this.#lines; index++) {\n if (index > 0) {\n this.#stream.moveCursor(0, -1);\n }\n\n this.#stream.clearLine(1);\n }\n });\n\n this.#lines = 0;\n return this; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n name=\"success\"\n doc=\"Mark the spinner as successful.\"\n parameters={[{ name: \"message\", type: \"string\" }]}>\n {code`return this.#stopWithIcon(textColors.spinner.icon.success(\"${\n theme.icons.spinner.success\n }\"), textColors.spinner.message.success(message)); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n name=\"error\"\n doc=\"Mark the spinner as failed.\"\n parameters={[{ name: \"message\", type: \"string\" }]}>\n {code`return this.#stopWithIcon(textColors.spinner.icon.error(\"${\n theme.icons.spinner.error\n }\"), textColors.spinner.message.error(message)); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n name=\"warning\"\n doc=\"Mark the spinner as warning.\"\n parameters={[{ name: \"message\", type: \"string\" }]}>\n {code`return this.#stopWithIcon(textColors.spinner.icon.warning(\"${\n theme.icons.spinner.warning\n }\"), textColors.spinner.message.warning(message)); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n name=\"info\"\n doc=\"Mark the spinner as informational.\"\n parameters={[{ name: \"message\", type: \"string\" }]}>\n {code`return this.#stopWithIcon(textColors.spinner.icon.info(\"${\n theme.icons.spinner.info\n }\"), textColors.spinner.message.info(message)); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n name=\"help\"\n doc=\"Mark the spinner as help.\"\n parameters={[{ name: \"message\", type: \"string\" }]}>\n {code`return this.#stopWithIcon(textColors.spinner.icon.help(\"${\n theme.icons.spinner.help\n }\"), textColors.spinner.message.help(message)); `}\n </ClassMethod>\n <Spacing />\n </ClassDeclaration>\n <Spacing />\n <TSDoc heading=\"Render a spinner in the console.\">\n <TSDocParam name=\"options\">\n {`Options for configuring the spinner, including the message to display, the output stream to write to, and the spinner animation to use.`}\n </TSDocParam>\n <TSDocReturns>{`An instance of the Spinner class, which can be used to control the spinner animation (e.g., start, stop, mark as success/error, etc.).`}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"createSpinner\"\n parameters={[\n {\n name: \"options\",\n type: \"SpinnerOptions\",\n optional: true\n }\n ]}>\n {code`return new Spinner(options);`}\n </FunctionDeclaration>\n </>\n );\n}\n\nfunction extractBorderOptionsObject(\n direction:\n | \"top\"\n | \"right\"\n | \"bottom\"\n | \"left\"\n | \"topLeft\"\n | \"topRight\"\n | \"bottomLeft\"\n | \"bottomRight\",\n theme: ThemeResolvedConfig\n): string {\n return `borderOptions.${\n direction\n } === \"primary\" ? borderColors.app.table.primary(\"${\n theme.borderStyles.app.table.primary[direction]\n }\") : borderOptions.${\n direction\n } === \"secondary\" ? borderColors.app.table.secondary(\"${\n theme.borderStyles.app.table.secondary[direction]\n }\") : borderOptions.${\n direction\n } === \"tertiary\" ? borderColors.app.table.tertiary(\"${\n theme.borderStyles.app.table.tertiary[direction]\n }\") : !borderOptions.${direction} || borderOptions.${\n direction\n } === \"none\" ? \"\" : borderOptions.${direction}`;\n}\n\nfunction extractBorderOptionsString(\n direction:\n | \"top\"\n | \"right\"\n | \"bottom\"\n | \"left\"\n | \"topLeft\"\n | \"topRight\"\n | \"bottomLeft\"\n | \"bottomRight\",\n theme: ThemeResolvedConfig\n): string {\n return `borderOptions === \"primary\" ? borderColors.app.table.primary(\"${\n theme.borderStyles.app.table.primary[direction]\n }\") : borderOptions === \"secondary\" ? borderColors.app.table.secondary(\"${\n theme.borderStyles.app.table.secondary[direction]\n }\") : borderOptions === \"tertiary\" ? borderColors.app.table.tertiary(\"${\n theme.borderStyles.app.table.tertiary[direction]\n }\") : !borderOptions || borderOptions === \"none\" ? \"\" : borderOptions`;\n}\n\n/**\n * Props for the TableFunctionDeclaration component.\n */\nexport type TableFunctionDeclarationProps = Omit<\n FunctionDeclarationProps,\n \"parameters\" | \"name\"\n>;\n\n/**\n * A component to generate the table functions in the `shell-shock:console` builtin module.\n */\nexport function TableFunctionDeclaration(props: TableFunctionDeclarationProps) {\n const theme = useTheme();\n\n return (\n <>\n <TypeDeclaration\n export\n name=\"SizeToken\"\n doc=\"A type representing the width size of an item in the console.\">\n {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%\"`}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"Determine if a value is a valid size token.\">\n <TSDocRemarks>\n {`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%\").`}\n </TSDocRemarks>\n <TSDocParam name=\"value\">{`The value to check for being a valid size token.`}</TSDocParam>\n <TSDocReturns>{`True if the value is a valid size token, false otherwise.`}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n doc=\"Determines if the provided value is a valid size token.\"\n name=\"isSizeToken\"\n parameters={[\n {\n name: \"value\",\n type: \"any\"\n }\n ]}\n returnType=\"value is SizeToken\">\n <IfStatement\n condition={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%\"].includes(value)`}>\n {code`return true; `}\n </IfStatement>\n {code`return false; `}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc heading=\"Calculate the width in characters based on the provided width size.\">\n <TSDocRemarks>\n {`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).`}\n </TSDocRemarks>\n <TSDocParam name=\"size\">\n {`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%\").`}\n </TSDocParam>\n <TSDocReturns>{`The calculated width in characters.`}</TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"calculateWidth\"\n parameters={[\n {\n name: \"size\",\n type: \"SizeToken\",\n optional: false\n }\n ]}\n returnType=\"number\">\n <IfStatement condition={code`[\"full\", \"100%\", \"1/1\"]. includes(size)`}>\n {code`return getTerminalSize().columns;`}\n </IfStatement>\n <ElseIfClause condition={code`[\"1/2\", \"50%\"].includes(size)`}>\n {code`return Math.round(getTerminalSize().columns / 2);`}\n </ElseIfClause>\n <ElseIfClause condition={code`[\"1/3\", \"33.33%\"].includes(size)`}>\n {code`return Math.round(getTerminalSize().columns / 3);`}\n </ElseIfClause>\n <ElseIfClause condition={code`[\"1/4\", \"25%\"].includes(size)`}>\n {code`return Math.round(getTerminalSize().columns / 4);`}\n </ElseIfClause>\n <ElseIfClause condition={code`[\"1/5\", \"20%\"].includes(size)`}>\n {code`return Math.round(getTerminalSize().columns / 5);`}\n </ElseIfClause>\n <ElseIfClause condition={code`[\"1/6\", \"10%\"].includes(size)`}>\n {code`return Math.round(getTerminalSize().columns / 6);`}\n </ElseIfClause>\n <ElseIfClause condition={code`[\"1/12\", \"5%\"].includes(size)`}>\n {code`return Math.round(getTerminalSize().columns / 12);`}\n </ElseIfClause>\n <ElseIfClause condition={code`[\"1/24\", \"2.5%\"].includes(size)`}>\n {code`return Math.round(getTerminalSize().columns / 24);`}\n </ElseIfClause>\n <ElseClause>\n {code`\n const match = size.match(/(\\\\d+(\\\\.\\\\d+)?)%/);\n if (match) {\n return Math.round((getTerminalSize().columns * parseFloat(match[1])) / 100);\n }\n\n throw new Error(\\`Invalid width size: \\${size}\\`);\n `}\n </ElseClause>\n <Spacing />\n </FunctionDeclaration>\n\n <TypeDeclaration\n export\n name=\"BorderOption\"\n doc=\"The border options applied to table cells.\">\n {code`\"primary\" | \"secondary\" | \"tertiary\" | \"none\" | string; `}\n </TypeDeclaration>\n <Spacing />\n <InterfaceDeclaration\n export\n name=\"TableOutputOptions\"\n doc=\"Options to customize the output of the {@link table} function.\">\n <TSDoc heading=\"Border variant for the table cell.\">\n <TSDocRemarks>\n {`The border variant to use for the table cell. This determines the color and style of the border around the cell.`}\n </TSDocRemarks>\n <hbr />\n <TSDocDefaultValue\n type={ReflectionKind.property}\n defaultValue=\"primary\"\n />\n </TSDoc>\n <InterfaceMember\n name=\"border\"\n optional\n type=\"BorderOption | { top?: BorderOption; right?: BorderOption; bottom?: BorderOption; left?: BorderOption; topLeft?: BorderOption; topRight?: BorderOption; bottomLeft?: BorderOption; bottomRight?: BorderOption; }\"\n />\n <hbr />\n <TSDoc heading=\"Padding for the table cell.\">\n <TSDocRemarks>\n {`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.`}\n </TSDocRemarks>\n <hbr />\n <TSDocDefaultValue\n type={ReflectionKind.property}\n defaultValue={`\\`${theme.padding.table}\\``}\n />\n </TSDoc>\n <InterfaceMember name=\"padding\" optional type=\"number\" />\n <hbr />\n <TSDoc heading=\"Alignment for the table cell.\">\n <TSDocRemarks>\n {`The alignment for the table cell. This determines how the text within the cell is aligned. If not specified, the default alignment is \"left\".`}\n </TSDocRemarks>\n <hbr />\n <TSDocDefaultValue\n type={ReflectionKind.property}\n defaultValue=\"left\"\n />\n </TSDoc>\n <InterfaceMember\n name=\"align\"\n optional\n type='\"left\" | \"right\" | \"center\"'\n />\n <hbr />\n </InterfaceDeclaration>\n <Spacing />\n <InterfaceDeclaration\n export\n name=\"TableCellOptions\"\n extends=\"TableOutputOptions\"\n doc=\"Options for a specific table cell provided to the {@link table} function.\">\n <InterfaceMember\n name=\"value\"\n optional\n type=\"string\"\n doc=\"The actual string value of the table cell.\"\n />\n <hbr />\n <TSDoc heading=\"Width of the table cell.\">\n <TSDocRemarks>\n {`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.`}\n </TSDocRemarks>\n </TSDoc>\n <InterfaceMember\n name=\"maxWidth\"\n type=\"number | SizeToken | undefined\"\n />\n <hbr />\n </InterfaceDeclaration>\n <Spacing />\n <InterfaceDeclaration\n export\n name=\"TableRowOptions\"\n extends=\"TableOutputOptions\"\n doc=\"Options for a specific table row provided to the {@link table} function.\">\n <InterfaceMember\n name=\"values\"\n optional\n type=\"(string | TableCellOptions)[]\"\n doc=\"The actual string values of the table row's cells.\"\n />\n <hbr />\n </InterfaceDeclaration>\n <Spacing />\n <InterfaceDeclaration\n export\n name=\"TableOptions\"\n extends=\"TableOutputOptions\"\n doc=\"Options for a specific table cell provided to the {@link table} function.\">\n <InterfaceMember\n name=\"values\"\n optional\n type=\"(string | TableCellOptions)[][]\"\n doc=\"The actual string values of the table's rows' cells.\"\n />\n <hbr />\n </InterfaceDeclaration>\n <Spacing />\n <InterfaceDeclaration\n name=\"Dimensions\"\n doc=\"The height and width for a specific table/cell used internally in the {@link table} function.\">\n <InterfaceMember\n name=\"height\"\n type=\"number\"\n doc=\"The height of the row/cell (where 1 is a single line in the terminal).\"\n />\n <hbr />\n <InterfaceMember\n name=\"width\"\n type=\"number\"\n doc=\"The width of the row/cell (where 1 is a single character in the terminal).\"\n />\n <hbr />\n </InterfaceDeclaration>\n <Spacing />\n <InterfaceDeclaration\n name=\"TableCellBorder\"\n doc=\"The resolved complete border styles for a table cell.\">\n <InterfaceMember\n name=\"top\"\n type=\"string\"\n doc=\"The top border style of the table cell.\"\n />\n <hbr />\n <InterfaceMember\n name=\"bottom\"\n type=\"string\"\n doc=\"The bottom border style of the table cell.\"\n />\n <hbr />\n <InterfaceMember\n name=\"right\"\n type=\"string\"\n doc=\"The right border style of the table cell.\"\n />\n <hbr />\n <InterfaceMember\n name=\"left\"\n type=\"string\"\n doc=\"The left border style of the table cell.\"\n />\n <hbr />\n <InterfaceMember\n name=\"topLeft\"\n type=\"string\"\n doc=\"The top-left border style of the table cell.\"\n />\n <hbr />\n <InterfaceMember\n name=\"topRight\"\n type=\"string\"\n doc=\"The top-right border style of the table cell.\"\n />\n <hbr />\n <InterfaceMember\n name=\"bottomLeft\"\n type=\"string\"\n doc=\"The bottom-left border style of the table cell.\"\n />\n <hbr />\n <InterfaceMember\n name=\"bottomRight\"\n type=\"string\"\n doc=\"The bottom-right border style of the table cell.\"\n />\n <hbr />\n </InterfaceDeclaration>\n <Spacing />\n <TypeDeclaration\n name=\"TableCell\"\n doc=\"The internal state of a formatted table cell in the {@link table} function.\">\n {code`Required<Omit<TableCellOptions, \"maxWidth\" | \"border\">> & Dimensions & {\n border: TableCellBorder;\n maxWidth?: number;\n };\n `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"Write a table to the console.\">\n <TSDocRemarks>\n {`This function writes a table to the console, applying the appropriate padding as defined in the current theme configuration and wrapping as needed.`}\n </TSDocRemarks>\n <hbr />\n <TSDocParam name=\"options\">\n {`Options to customize the table output.`}\n </TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n export\n {...props}\n name=\"table\"\n parameters={[\n {\n name: \"options\",\n type: \"TableOptions | TableRowOptions[] | TableCellOptions[][] | string[] | string[][]\",\n optional: false\n }\n ]}>\n <IfStatement\n condition={code`!options ||\n (!Array.isArray(options) && (typeof options !== \"object\" || !options.values || !Array.isArray(options.values) || options.values.length === 0)) ||\n (Array.isArray(options) && !options.every(item => typeof item === \"object\" || typeof item === \"string\" || Array.isArray(item))) `}>\n {code`return;`}\n </IfStatement>\n <Spacing />\n <VarDeclaration\n let\n name=\"cells\"\n type={`TableCell[][]`}\n initializer={code`[];`}\n />\n <hbr />\n {code`\n const extractTableCell = (cell: string | TableCellOptions, columnIndex: number, rowLength: number, opts?: TableOutputOptions): TableCell => {\n if (typeof cell === \"string\") {\n const borderOptions = opts?.border || \"primary\";\n\n let border = {} as TableCellBorder;\n if (typeof borderOptions === \"object\") {\n border = {\n top: ${extractBorderOptionsObject(\"top\", theme)},\n bottom: ${extractBorderOptionsObject(\"bottom\", theme)},\n left: ${extractBorderOptionsObject(\"left\", theme)},\n right: ${extractBorderOptionsObject(\"right\", theme)},\n topLeft: ${extractBorderOptionsObject(\"topLeft\", theme)},\n topRight: ${extractBorderOptionsObject(\"topRight\", theme)},\n bottomLeft: ${extractBorderOptionsObject(\"bottomLeft\", theme)},\n bottomRight: ${extractBorderOptionsObject(\"bottomRight\", theme)},\n };\n } else {\n border.top = ${extractBorderOptionsString(\"top\", theme)};\n border.bottom = ${extractBorderOptionsString(\"bottom\", theme)};\n border.left = ${extractBorderOptionsString(\"left\", theme)};\n border.right = ${extractBorderOptionsString(\"right\", theme)};\n border.topLeft = ${extractBorderOptionsString(\"topLeft\", theme)};\n border.topRight = ${extractBorderOptionsString(\"topRight\", theme)};\n border.bottomLeft = ${extractBorderOptionsString(\"bottomLeft\", theme)};\n border.bottomRight = ${extractBorderOptionsString(\"bottomRight\", theme)};\n }\n\n const padding = Math.max(0, opts?.padding ?? ${theme.padding.table}) * (columnIndex === 0 || columnIndex === rowLength - 1 ? 2 : 1);\n const value = cell ?? \"\";\n const width = stripAnsi(value).length + padding * 2;\n\n return {\n value,\n height: 1,\n width,\n border,\n padding,\n align: opts?.align || \"left\",\n };\n } else {\n const borderOptions = cell.border || opts?.border || \"primary\";\n\n let border = {} as TableCellBorder;\n if (typeof borderOptions === \"object\") {\n border = {\n top: ${extractBorderOptionsObject(\"top\", theme)},\n bottom: ${extractBorderOptionsObject(\"bottom\", theme)},\n left: ${extractBorderOptionsObject(\"left\", theme)},\n right: ${extractBorderOptionsObject(\"right\", theme)},\n topLeft: ${extractBorderOptionsObject(\"topLeft\", theme)},\n topRight: ${extractBorderOptionsObject(\"topRight\", theme)},\n bottomLeft: ${extractBorderOptionsObject(\"bottomLeft\", theme)},\n bottomRight: ${extractBorderOptionsObject(\"bottomRight\", theme)},\n };\n } else {\n border.top = ${extractBorderOptionsString(\"top\", theme)};\n border.bottom = ${extractBorderOptionsString(\"bottom\", theme)};\n border.left = ${extractBorderOptionsString(\"left\", theme)};\n border.right = ${extractBorderOptionsString(\"right\", theme)};\n border.topLeft = ${extractBorderOptionsString(\"topLeft\", theme)};\n border.topRight = ${extractBorderOptionsString(\"topRight\", theme)};\n border.bottomLeft = ${extractBorderOptionsString(\"bottomLeft\", theme)};\n border.bottomRight = ${extractBorderOptionsString(\"bottomRight\", theme)};\n }\n\n const padding = Math.max(0, cell.padding ?? opts?.padding ?? ${\n theme.padding.table\n });\n const value = cell.value ?? \"\";\n const width = stripAnsi(value).length + padding * 2;\n const maxWidth = cell.maxWidth ? typeof cell.maxWidth === \"number\" ? cell.maxWidth : calculateWidth(cell.maxWidth) : undefined;\n\n return {\n value,\n height: 1,\n width,\n maxWidth,\n border,\n padding,\n align: cell.align || opts?.align || \"left\",\n };\n }\n };\n\n let colMaxWidths = [] as (number | undefined)[];\n `}\n <hbr />\n <IfStatement condition={code`Array.isArray(options)`}>\n <IfStatement\n condition={code`options.every(row => typeof row === \"string\" || (typeof row === \"object\" && !Array.isArray(row) && !(\"values\" in row)))`}>\n {code`cells.push(options.map((cell, index) => extractTableCell(cell as string | TableCellOptions, index, options.length)));`}\n </IfStatement>\n <ElseClause>\n {code`\n cells.push(\n ...options.map(row => Array.isArray(row)\n ? row.reduce((cellRow, cell, index) => {\n if (colMaxWidths.length <= index) {\n colMaxWidths.push(undefined);\n }\n const newCell = extractTableCell(cell, index, row.length);\n if (newCell.maxWidth && (!colMaxWidths[index] || newCell.maxWidth < colMaxWidths[index]!)) {\n colMaxWidths[index] = newCell.maxWidth;\n }\n cellRow.push(newCell);\n return cellRow;\n }, [] as TableCell[])\n : (row as TableRowOptions).values?.reduce((cellRow, cell, index) => {\n if (colMaxWidths.length <= index) {\n colMaxWidths.push(undefined);\n }\n const newCell = extractTableCell(cell, index, (row as TableRowOptions).values?.length ?? 1, row as TableRowOptions);\n if (newCell.maxWidth && (!colMaxWidths[index] || newCell.maxWidth < colMaxWidths[index]!)) {\n colMaxWidths[index] = newCell.maxWidth;\n }\n cellRow.push(newCell);\n return cellRow;\n }, [] as TableCell[]) ?? []\n )\n );\n `}\n </ElseClause>\n </IfStatement>\n <ElseClause>\n {code`\n cells.push(\n ...options.values!.map(row => Array.isArray(row)\n ? row.reduce((cellRow, cell, index) => {\n if (colMaxWidths.length <= index) {\n colMaxWidths.push(undefined);\n }\n const newCell = extractTableCell(cell, index, row.length);\n if (newCell.maxWidth && (!colMaxWidths[index] || newCell.maxWidth < colMaxWidths[index]!)) {\n colMaxWidths[index] = newCell.maxWidth;\n }\n cellRow.push(newCell);\n return cellRow;\n }, [] as TableCell[])\n : (row as TableRowOptions).values?.reduce((cellRow, cell, index) => {\n if (colMaxWidths.length <= index) {\n colMaxWidths.push(undefined);\n }\n const newCell = extractTableCell(cell, index, (row as TableRowOptions).values?.length ?? 1, options);\n if (newCell.maxWidth && (!colMaxWidths[index] || newCell.maxWidth < colMaxWidths[index]!)) {\n colMaxWidths[index] = newCell.maxWidth;\n }\n cellRow.push(newCell);\n return cellRow;\n }, [] as TableCell[]) ?? []\n )\n );\n\n `}\n </ElseClause>\n <hbr />\n {code`\ncells = cells.filter(row => row.length > 0);\nif (cells.length === 0) {\n return;\n}\n\ncells.forEach(row => row.forEach((cell, index) => {\n if (colMaxWidths[index] && cell.maxWidth !== colMaxWidths[index]!) {\n cell.maxWidth = colMaxWidths[index]!;\n }\n}));\n\n// Calculate table dimensions\nlet colWidths = [] as number[];\nlet rowDims = [] as Dimensions[];\n\nconst calculateRowDimensions = () => {\n colWidths = [];\n return cells.reduce((dims, row) => {\n dims.push(row.reduce((dim, cell, index) => {\n dim.width += cell.width;\n if (cell.height > dim.height) {\n dim.height = cell.height;\n }\n if (!colWidths[index] || cell.width > colWidths[index]!) {\n colWidths[index] = cell.width;\n }\n\n return dim;\n }, { width: 0, height: 0 } as Dimensions));\n\n return dims;\n }, [] as Dimensions[]);\n}\n\nlet recalculate!: boolean;\ndo {\n recalculate = false;\n rowDims = calculateRowDimensions();\n\n if (!recalculate && colWidths.some((colWidth, index) => colMaxWidths[index] && colWidth > colMaxWidths[index]!)) {\n (colWidths.map((colWidth, index) => colMaxWidths[index] && colWidth > colMaxWidths[index]! ? index : undefined).filter(colWidth => colWidth !== undefined) as number[]).forEach(index => {\n cells.forEach(row => {\n const cell = row[index]!;\n if (colMaxWidths[index] && cell.width > colMaxWidths[index]) {\n const lines = splitText(\n cell.value,\n colMaxWidths[index] - cell.padding * 2,\n );\n\n cell.value = lines.join(\"\\\\n\");\n cell.height = lines.length;\n cell.width = Math.max(...lines.map(line => stripAnsi(line).length)) + cell.padding * 2;\n\n recalculate = true;\n }\n });\n });\n }\n\n rowDims.forEach((row, rowIndex) => {\n if (!recalculate && row.width > Math.max(getTerminalSize().columns - ${\n Math.max(theme.padding.app, 0) * 2\n }, 0)) {\n const cell = cells[rowIndex]!.reduce((largestCell, cell) => {\n if (cell.width > largestCell.width) {\n return cell;\n }\n return largestCell;\n }, cells[rowIndex]![0]!);\n\n const lines = splitText(\n cell.value,\n Math.min(Math.max(getTerminalSize().columns - ${\n Math.max(theme.padding.app, 0) * 2\n } - (row.width - (cell.width - cell.padding * 2)), 0),\n cell.maxWidth ?? Number.POSITIVE_INFINITY)\n );\n\n cell.value = lines.join(\"\\\\n\");\n cell.height = lines.length;\n cell.width = Math.max(...lines.map(line => stripAnsi(line).length)) + cell.padding * 2;\n\n recalculate = true;\n }\n });\n\n if (!recalculate && colWidths.reduce((a, b) => a + b, 0) > Math.max(getTerminalSize().columns - ${\n Math.max(theme.padding.app, 0) * 2\n }, 0)) {\n let colIndex = 0;\n const cell = cells.reduce((ret, row) => {\n return row.reduce((largest, current, index) => {\n if (largest.width < current.width) {\n colIndex = index;\n return current;\n }\n return largest;\n }, ret);\n }, cells[0]![0]!);\n\n const lines = splitText(\n cell.value,\n Math.min(Math.max(getTerminalSize().columns - ${\n Math.max(theme.padding.app, 0) * 2\n } - (colWidths.filter((_, i) => i !== colIndex).reduce((a, b) => a + b, 0)) - cell.padding * 2, 0),\n cell.maxWidth ?? Number.POSITIVE_INFINITY)\n );\n\n cell.value = lines.join(\"\\\\n\");\n cell.height = lines.length;\n cell.width = Math.max(...lines.map(line => stripAnsi(line).length)) + cell.padding * 2;\n\n recalculate = true;\n }\n} while (recalculate);\n\n// Render table\ncells.forEach((row, rowIndex) => {\n const outputs = [] as string[][];\n row.forEach((cell, colIndex) => {\n const lines = cell.value.split(\"\\\\n\");\n while (lines.length < rowDims[rowIndex]!.height) {\n lines.push(\"\");\n }\n\n outputs.push(lines.map(line => {\n let paddedContent = \"\";\n switch (cell.align) {\n case \"right\":\n paddedContent = \" \".repeat(Math.max(colWidths[colIndex] - stripAnsi(line).length - cell.padding, 0)) + line + \" \".repeat(cell.padding);\n break;\n case \"center\":\n const leftPadding = Math.floor((colWidths[colIndex] - stripAnsi(line).length - cell.padding) / 2);\n const rightPadding = colWidths[colIndex] - stripAnsi(line).length - leftPadding;\n paddedContent = \" \".repeat(leftPadding) + line + \" \".repeat(rightPadding);\n break;\n case \"left\":\n default:\n paddedContent = \" \".repeat(cell.padding) + line + \" \".repeat(Math.max(colWidths[colIndex] - stripAnsi(line).length - cell.padding, 0));\n break;\n }\n\n if (colIndex === row.length - 1) {\n return cell.border.left + paddedContent + cell.border.right;\n } else {\n return cell.border.left + paddedContent;\n }\n }));\n });\n\n for (let index = 0; index < rowDims[rowIndex]!.height; index++) {\n writeLine(outputs.map(output => output[index] ?? \"\").join(\"\"));\n }\n});\n`}\n </FunctionDeclaration>\n </>\n );\n}\n\nexport type ConsoleBuiltinProps = Pick<\n BuiltinFileProps,\n \"children\" | \"imports\" | \"builtinImports\"\n>;\n\n/**\n * A built-in console utilities module for Shell Shock.\n */\nexport function ConsoleBuiltin(props: ConsoleBuiltinProps) {\n const { children, imports, builtinImports } = props;\n\n return (\n <BuiltinFile\n id=\"console\"\n description=\"A collection of helper utilities to assist in generating content meant for display in the console.\"\n imports={defu(imports, {\n \"@shell-shock/plugin-theme/types/theme\": [\"ThemeSpinnerResolvedConfig\"],\n \"@shell-shock/plugin-theme/helpers/spinners\": [\n \"SpinnerPreset\",\n \"resolveSpinner\"\n ],\n \"node:util\": [\"stripVTControlCharacters\"]\n })}\n builtinImports={defu(builtinImports, {\n utils: [\n \"isInteractive\",\n \"isColorSupported\",\n \"colorSupportLevels\",\n \"isUnicodeSupported\",\n \"isHyperlinkSupported\",\n \"getTerminalSize\"\n ],\n env: [\"env\", \"isDevelopment\", \"isDebug\"],\n state: [\"hasFlag\"]\n })}>\n <AnsiHelpersDeclarations />\n <Spacing />\n <StripAnsiFunctionDeclaration />\n <Spacing />\n <WrapAnsiFunction />\n <Spacing />\n <AnsiStyleFunctionsDeclaration />\n <Spacing />\n <WriteFunctionDeclaration />\n <Spacing />\n <WriteLineFunctionDeclaration />\n <Spacing />\n <SplitTextFunctionDeclaration />\n <Spacing />\n <LinkFunctionDeclaration />\n <Spacing />\n <DividerFunctionDeclaration />\n <Spacing />\n <SpinnerFunctionDeclaration />\n <Spacing />\n <MessageFunctionDeclaration\n type=\"help\"\n variant=\"help\"\n consoleFnName=\"log\"\n description=\"help\"\n />\n <Spacing />\n <MessageFunctionDeclaration\n type=\"success\"\n variant=\"success\"\n consoleFnName=\"info\"\n description=\"success\"\n />\n <Spacing />\n <MessageFunctionDeclaration\n type=\"info\"\n variant=\"info\"\n consoleFnName=\"info\"\n description=\"informational\"\n />\n <Spacing />\n <MessageFunctionDeclaration\n type=\"debug\"\n variant=\"debug\"\n consoleFnName=\"debug\"\n description=\"debug\"\n timestamp\n prefix={\n <IfStatement condition={<IsNotDebug />}>{code`return; `}</IfStatement>\n }\n />\n <Spacing />\n <MessageFunctionDeclaration\n type=\"verbose\"\n variant=\"info\"\n color=\"debug\"\n consoleFnName=\"debug\"\n description=\"verbose\"\n timestamp\n prefix={\n <IfStatement\n condition={<IsNotVerbose />}>{code`return; `}</IfStatement>\n }\n />\n <Spacing />\n <MessageFunctionDeclaration\n type=\"warn\"\n variant=\"warning\"\n consoleFnName=\"warn\"\n description=\"warning\"\n />\n <Spacing />\n <MessageFunctionDeclaration\n type=\"danger\"\n variant=\"danger\"\n consoleFnName=\"error\"\n description=\"destructive/danger\"\n />\n <Spacing />\n <MessageFunctionDeclaration\n type=\"error\"\n variant=\"error\"\n consoleFnName=\"error\"\n description=\"error\"\n timestamp\n parameters={[\n {\n name: \"err\",\n type: \"string | { message: string; stack?: string }\",\n optional: false\n },\n {\n name: \"header\",\n type: \"string\",\n optional: true\n }\n ]}\n prefix={\n <>\n <VarDeclaration let name=\"message\" type=\"string | undefined\" />\n <Spacing />\n <IfStatement\n condition={code`(err as { message: string; stack?: string })?.message`}>\n {code`message = (err as { message: string; stack?: string }).message;`}\n </IfStatement>\n <ElseClause>{code`message = String(err);`}</ElseClause>\n <Spacing />\n <IfStatement\n condition={code`env.STACKTRACE && typeof err === \"object\" && (err as { stack?: string })?.stack`}>\n {code`message += \" \\\\n\\\\n\" + (err as { stack: string }).stack.split(\"\\\\n\").slice(1).map(line => {\n const match = line.match(/at (?:(.+?)\\\\s+\\\\()?(?:(.+?):(\\\\d+)(?::(\\\\d+))?|([^)]+))\\\\)?/);\n if (match) {\n const filePath = match[2] || match[5] || \"<unknown>\";\n return \\`at \\${match[1] || \"<anonymous>\"} (\\${filePath === \"<anonymous>\" || filePath === \"<unknown>\" ? filePath : link(filePath, { text: \\`\\${filePath.replace(/^.*file:\\\\/\\\\//, \"\")}\\${match[3] ? \\`:\\${match[3]}\\${match[4] ? \\`:\\${match[4]}\\` : \"\"}\\` : \"\"}\\`, useTextWhenUnsupported: true })})\\`;\n }\n\n return line.trim();\n }).join(\"\\\\n\"); `}\n </IfStatement>\n </>\n }\n />\n <Spacing />\n <TableFunctionDeclaration />\n <Spacing />\n <BlockquoteFunctionDeclaration />\n <Spacing />\n <CodeFunctionDeclaration />\n <Spacing />\n <InlineCodeFunctionDeclaration />\n <Spacing />\n {children}\n <Spacing />\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,SAAO,0BAAA;AACL,QAAA;EAAA,gBAAgB,gBAAA;GAChB,SAAU;GACV,UAAW;GACX,MAAA;GACA,KAAA;GACA,UAAO,IAAA;GACT,CAAA;EAAM,gB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SAAA,EAAA,CAAA;IAAA,gBAAA,4BAAA;KACb,MAAM;KACN,SAAE;KACF,eAAC;KACD,aAAM;KACN,WAAK;KACL,YAAM,CAAA;MACJ,MAAI;MACJ,MAAE;;MAEH,EAAE;MACD,MAAM;MACN,MAAI;MACJ,UAAU;MACX,CAAC;KACF,IAAI,SAAS;AACX,aAAM;OAAA,gBAAS,gBAA2B;QACxC,OAAI;QACJ,MAAI;QACJ,MAAI;QACL,CAAC;OAAE,gBAAiB,SAAA,EAAA,CAAA;OAAA,gBAA4B,aAAc;QAC7D,WAAG,IAAA;QACH,UAAO,IAAA;QACR,CAAC;OAAE,gBAAe,YAAA,EACjB,UAAS,IAAA,0BACV,CAAC;OAAE,gBAAgB,SAAA,EAAA,CAAA;OAAA,gBAAkC,aAAQ;QAC5D,WAAS,IAAM;QACf,UAAS,IAAA;;;;;;;;;;;;KAWd,CAAC;IAAE,gBAAS,SAAA,EAAA,CAAA;IAAA,gBAAA,0BAAA,EAAA,CAAA;IAAA,gBAAA,SAAA,EAAA,CAAA;IAAA,gBAAA,+BAAA,EAAA,CAAA;IAAA,gBAAA,SAAA,EAAA,CAAA;IAAA,gBAAA,yBAAA,EAAA,CAAA;IAAA,gBAAA,SAAA,EAAA,CAAA;IAAA,gBAAA,+BAAA,EAAA,CAAA;IAAA,gBAAA,SAAA,EAAA,CAAA;IAAA;IAAA,gBAAA,SAAA,EAAA,CAAA;IAAA;;EAEhB,CAAC"}
|
|
1
|
+
{"version":3,"file":"console-builtin.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/index.cjs
CHANGED
|
@@ -13,7 +13,7 @@ _shell_shock_plugin_theme = require_runtime.__toESM(_shell_shock_plugin_theme);
|
|
|
13
13
|
*/
|
|
14
14
|
const plugin = (options = {}) => {
|
|
15
15
|
return [...(0, _shell_shock_plugin_theme.default)(options), {
|
|
16
|
-
name: "shell-shock
|
|
16
|
+
name: "shell-shock/console",
|
|
17
17
|
config() {
|
|
18
18
|
this.debug("Providing default configuration for the Shell Shock `console` plugin.");
|
|
19
19
|
return options;
|
package/dist/index.d.cts
CHANGED
|
@@ -7,5 +7,5 @@ import { Plugin } from "powerlines";
|
|
|
7
7
|
*/
|
|
8
8
|
declare const plugin: <TContext extends ConsolePluginContext = ConsolePluginContext>(options?: ConsolePluginOptions) => Plugin<TContext>[];
|
|
9
9
|
//#endregion
|
|
10
|
-
export { ConsolePluginContext, ConsolePluginOptions, ConsolePluginResolvedConfig, ConsolePluginUserConfig, plugin as default, plugin };
|
|
10
|
+
export { type ConsolePluginContext, type ConsolePluginOptions, type ConsolePluginResolvedConfig, type ConsolePluginUserConfig, plugin as default, plugin };
|
|
11
11
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -7,5 +7,5 @@ import { Plugin } from "powerlines";
|
|
|
7
7
|
*/
|
|
8
8
|
declare const plugin: <TContext extends ConsolePluginContext = ConsolePluginContext>(options?: ConsolePluginOptions) => Plugin<TContext>[];
|
|
9
9
|
//#endregion
|
|
10
|
-
export { ConsolePluginContext, ConsolePluginOptions, ConsolePluginResolvedConfig, ConsolePluginUserConfig, plugin as default, plugin };
|
|
10
|
+
export { type ConsolePluginContext, type ConsolePluginOptions, type ConsolePluginResolvedConfig, type ConsolePluginUserConfig, plugin as default, plugin };
|
|
11
11
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":""}
|
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import theme from "@shell-shock/plugin-theme";
|
|
|
10
10
|
*/
|
|
11
11
|
const plugin = (options = {}) => {
|
|
12
12
|
return [...theme(options), {
|
|
13
|
-
name: "shell-shock
|
|
13
|
+
name: "shell-shock/console",
|
|
14
14
|
config() {
|
|
15
15
|
this.debug("Providing default configuration for the Shell Shock `console` plugin.");
|
|
16
16
|
return options;
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;UA2BiB,oBAAA,SAA6B,
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;UA2BiB,oBAAA,SAA6B,kBAAkB;AAAA,KAEpD,uBAAA,GAA0B,qBAAA,GAAwB,UAAU;AAAA,KAE5D,2BAAA,GAA8B,cAAA,GACxC,yBAAyB;AAAA,KAEf,oBAAA,yBACc,2BAAA,GACtB,2BAAA,IACA,kBAAA,CAAmB,eAAA,IACrB,kBAAA,CAAmB,eAAA,IACnB,OAAA,CAAQ,eAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/plugin-console",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Shell Shock plugin to generate the `console` built-in module.",
|
|
6
6
|
"keywords": [
|
|
@@ -123,21 +123,21 @@
|
|
|
123
123
|
"typings": "dist/index.d.mts",
|
|
124
124
|
"files": ["dist/**/*"],
|
|
125
125
|
"dependencies": {
|
|
126
|
-
"@alloy-js/core": "0.23.
|
|
127
|
-
"@alloy-js/typescript": "0.23.0
|
|
128
|
-
"@powerlines/deepkit": "^0.
|
|
129
|
-
"@powerlines/plugin-alloy": "^0.26.
|
|
130
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
131
|
-
"@shell-shock/core": "
|
|
132
|
-
"@shell-shock/plugin-theme": "
|
|
133
|
-
"@stryke/string-format": "^0.17.
|
|
134
|
-
"@stryke/type-checks": "^0.6.
|
|
126
|
+
"@alloy-js/core": "^0.23.1",
|
|
127
|
+
"@alloy-js/typescript": "^0.23.0",
|
|
128
|
+
"@powerlines/deepkit": "^0.9.78",
|
|
129
|
+
"@powerlines/plugin-alloy": "^0.26.217",
|
|
130
|
+
"@powerlines/plugin-plugin": "^0.12.536",
|
|
131
|
+
"@shell-shock/core": "0.17.11",
|
|
132
|
+
"@shell-shock/plugin-theme": "0.4.24",
|
|
133
|
+
"@stryke/string-format": "^0.17.26",
|
|
134
|
+
"@stryke/type-checks": "^0.6.17",
|
|
135
135
|
"defu": "^6.1.7",
|
|
136
|
-
"powerlines": "^0.47.
|
|
136
|
+
"powerlines": "^0.47.124"
|
|
137
137
|
},
|
|
138
138
|
"devDependencies": {
|
|
139
|
-
"@powerlines/plugin-deepkit": "^0.11.
|
|
140
|
-
"@types/node": "^25.
|
|
139
|
+
"@powerlines/plugin-deepkit": "^0.11.467",
|
|
140
|
+
"@types/node": "^25.9.1"
|
|
141
141
|
},
|
|
142
142
|
"publishConfig": {
|
|
143
143
|
"access": "public",
|
|
@@ -154,5 +154,5 @@
|
|
|
154
154
|
"./package.json": "./package.json"
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
|
-
"gitHead": "
|
|
157
|
+
"gitHead": "9401c1de122d800040306fc89ad1835930c1a826"
|
|
158
158
|
}
|