@shell-shock/plugin-console 0.0.2
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/LICENSE +201 -0
- package/README.md +264 -0
- package/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/components/console-builtin.cjs +2962 -0
- package/dist/components/console-builtin.d.cts +60 -0
- package/dist/components/console-builtin.d.cts.map +1 -0
- package/dist/components/console-builtin.d.mts +60 -0
- package/dist/components/console-builtin.d.mts.map +1 -0
- package/dist/components/console-builtin.mjs +2953 -0
- package/dist/components/console-builtin.mjs.map +1 -0
- package/dist/components/index.cjs +12 -0
- package/dist/components/index.d.cts +2 -0
- package/dist/components/index.d.mts +2 -0
- package/dist/components/index.mjs +3 -0
- package/dist/index.cjs +31 -0
- package/dist/index.d.cts +12 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +28 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types/index.cjs +0 -0
- package/dist/types/index.d.cts +2 -0
- package/dist/types/index.d.mts +2 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +0 -0
- package/dist/types/plugin.d.cts +13 -0
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +13 -0
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +1 -0
- package/package.json +158 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Children } from "@alloy-js/core";
|
|
2
|
+
import { FunctionDeclarationProps } from "@alloy-js/typescript";
|
|
3
|
+
import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
|
|
4
|
+
import { ThemeMessageVariant } from "@shell-shock/plugin-theme/types/theme";
|
|
5
|
+
|
|
6
|
+
//#region src/components/console-builtin.d.ts
|
|
7
|
+
declare function AnsiHelpersDeclarations(): Children;
|
|
8
|
+
/**
|
|
9
|
+
* A component to generate an object containing functions for coloring text in a Shell Shock project.
|
|
10
|
+
*/
|
|
11
|
+
declare function ColorsDeclaration(): Children;
|
|
12
|
+
/**
|
|
13
|
+
* A component to generate the `writeLine` function in the `shell-shock:console` builtin module.
|
|
14
|
+
*/
|
|
15
|
+
declare function WriteLineFunctionDeclaration(): Children;
|
|
16
|
+
type MessageFunctionDeclarationProps = Partial<Pick<FunctionDeclarationProps, "parameters">> & {
|
|
17
|
+
type: "success" | "help" | "info" | "debug" | "verbose" | "warn" | "danger" | "error";
|
|
18
|
+
variant: ThemeMessageVariant;
|
|
19
|
+
color?: ThemeMessageVariant;
|
|
20
|
+
consoleFnName: "log" | "info" | "warn" | "error" | "debug";
|
|
21
|
+
description: string;
|
|
22
|
+
prefix?: Children;
|
|
23
|
+
timestamp?: boolean;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A component to generate the message functions in the `shell-shock:console` builtin module.
|
|
27
|
+
*/
|
|
28
|
+
declare function MessageFunctionDeclaration(props: MessageFunctionDeclarationProps): Children;
|
|
29
|
+
/**
|
|
30
|
+
* A component to generate the `wrapAnsi` function in the `shell-shock:console` builtin module.
|
|
31
|
+
*/
|
|
32
|
+
declare function WrapAnsiFunction(): Children;
|
|
33
|
+
/**
|
|
34
|
+
* A component to generate the `stripAnsi` function in the `shell-shock:console` builtin module.
|
|
35
|
+
*/
|
|
36
|
+
declare function StripAnsiFunctionDeclaration(): Children;
|
|
37
|
+
/**
|
|
38
|
+
* A component to generate the `stripAnsi` function in the `shell-shock:console` builtin module.
|
|
39
|
+
*/
|
|
40
|
+
declare function DividerFunctionDeclaration(): Children;
|
|
41
|
+
/**
|
|
42
|
+
* A component to generate the `link` function in the `shell-shock:console` builtin module.
|
|
43
|
+
*/
|
|
44
|
+
declare function LinkFunctionDeclaration(): Children;
|
|
45
|
+
/**
|
|
46
|
+
* Props for the TableFunctionDeclaration component.
|
|
47
|
+
*/
|
|
48
|
+
type TableFunctionDeclarationProps = Omit<FunctionDeclarationProps, "parameters" | "name">;
|
|
49
|
+
/**
|
|
50
|
+
* A component to generate the table functions in the `shell-shock:console` builtin module.
|
|
51
|
+
*/
|
|
52
|
+
declare function TableFunctionDeclaration(props: TableFunctionDeclarationProps): Children;
|
|
53
|
+
type ConsoleBuiltinProps = Pick<BuiltinFileProps, "children" | "imports" | "builtinImports">;
|
|
54
|
+
/**
|
|
55
|
+
* A built-in console utilities module for Shell Shock.
|
|
56
|
+
*/
|
|
57
|
+
declare function ConsoleBuiltin(props: ConsoleBuiltinProps): Children;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { AnsiHelpersDeclarations, ColorsDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
|
|
60
|
+
//# sourceMappingURL=console-builtin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-builtin.d.cts","names":[],"sources":["../../src/components/console-builtin.tsx"],"sourcesContent":[],"mappings":";;;;;;iBAwDgB,uBAAA,CAAA,GAAuB;;AAAvC;AA6JA;AAygDgB,iBAzgDA,iBAAA,CAAA,CAygD4B,EAzgDX,QAygDW;AA8P5C;;;AAA8C,iBA9P9B,4BAAA,CAAA,CA8P8B,EA9PF,QA8PE;AAYnC,KAZC,+BAAA,GAAkC,OAYnC,CAXT,IAWS,CAXJ,wBAWI,EAAA,YAAA,CAAA,CAAA,GAAA;EACD,IAAA,EAAA,SAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,SAAA,GAAA,MAAA,GAAA,QAAA,GAAA,OAAA;EAGC,OAAA,EAJA,mBAIA;EAAQ,KAAA,CAAA,EAHT,mBAGS;EAOH,aAAA,EAAA,KAAA,GAAA,MAA0B,GAAA,MAAA,GACjC,OAAA,GAAA,OAAA;EA2KO,WAAA,EAAA,MAAgB;EA4EhB,MAAA,CAAA,EA/PL,QA+PK;EAmCA,SAAA,CAAA,EAAA,OAAA;AAqFhB,CAAA;AA0FA;AAQA;AA4nBA;AAQgB,iBAtlCA,0BAAA,CAslCsB,KAAmB,EArlChD,+BAqlCgD,CAAA,EArlCjB,QAqlCiB;;;;iBA16BzC,gBAAA,CAAA,GAAgB;;;;iBA4EhB,4BAAA,CAAA,GAA4B;;;;iBAmC5B,0BAAA,CAAA,GAA0B;;;;iBAqF1B,uBAAA,CAAA,GAAuB;;;;KA0F3B,6BAAA,GAAgC,KAC1C;;;;iBAOc,wBAAA,QAAgC,gCAA6B;KA4nBjE,mBAAA,GAAsB,KAChC;;;;iBAOc,cAAA,QAAsB,sBAAmB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Children } from "@alloy-js/core";
|
|
2
|
+
import { FunctionDeclarationProps } from "@alloy-js/typescript";
|
|
3
|
+
import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
|
|
4
|
+
import { ThemeMessageVariant } from "@shell-shock/plugin-theme/types/theme";
|
|
5
|
+
|
|
6
|
+
//#region src/components/console-builtin.d.ts
|
|
7
|
+
declare function AnsiHelpersDeclarations(): Children;
|
|
8
|
+
/**
|
|
9
|
+
* A component to generate an object containing functions for coloring text in a Shell Shock project.
|
|
10
|
+
*/
|
|
11
|
+
declare function ColorsDeclaration(): Children;
|
|
12
|
+
/**
|
|
13
|
+
* A component to generate the `writeLine` function in the `shell-shock:console` builtin module.
|
|
14
|
+
*/
|
|
15
|
+
declare function WriteLineFunctionDeclaration(): Children;
|
|
16
|
+
type MessageFunctionDeclarationProps = Partial<Pick<FunctionDeclarationProps, "parameters">> & {
|
|
17
|
+
type: "success" | "help" | "info" | "debug" | "verbose" | "warn" | "danger" | "error";
|
|
18
|
+
variant: ThemeMessageVariant;
|
|
19
|
+
color?: ThemeMessageVariant;
|
|
20
|
+
consoleFnName: "log" | "info" | "warn" | "error" | "debug";
|
|
21
|
+
description: string;
|
|
22
|
+
prefix?: Children;
|
|
23
|
+
timestamp?: boolean;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A component to generate the message functions in the `shell-shock:console` builtin module.
|
|
27
|
+
*/
|
|
28
|
+
declare function MessageFunctionDeclaration(props: MessageFunctionDeclarationProps): Children;
|
|
29
|
+
/**
|
|
30
|
+
* A component to generate the `wrapAnsi` function in the `shell-shock:console` builtin module.
|
|
31
|
+
*/
|
|
32
|
+
declare function WrapAnsiFunction(): Children;
|
|
33
|
+
/**
|
|
34
|
+
* A component to generate the `stripAnsi` function in the `shell-shock:console` builtin module.
|
|
35
|
+
*/
|
|
36
|
+
declare function StripAnsiFunctionDeclaration(): Children;
|
|
37
|
+
/**
|
|
38
|
+
* A component to generate the `stripAnsi` function in the `shell-shock:console` builtin module.
|
|
39
|
+
*/
|
|
40
|
+
declare function DividerFunctionDeclaration(): Children;
|
|
41
|
+
/**
|
|
42
|
+
* A component to generate the `link` function in the `shell-shock:console` builtin module.
|
|
43
|
+
*/
|
|
44
|
+
declare function LinkFunctionDeclaration(): Children;
|
|
45
|
+
/**
|
|
46
|
+
* Props for the TableFunctionDeclaration component.
|
|
47
|
+
*/
|
|
48
|
+
type TableFunctionDeclarationProps = Omit<FunctionDeclarationProps, "parameters" | "name">;
|
|
49
|
+
/**
|
|
50
|
+
* A component to generate the table functions in the `shell-shock:console` builtin module.
|
|
51
|
+
*/
|
|
52
|
+
declare function TableFunctionDeclaration(props: TableFunctionDeclarationProps): Children;
|
|
53
|
+
type ConsoleBuiltinProps = Pick<BuiltinFileProps, "children" | "imports" | "builtinImports">;
|
|
54
|
+
/**
|
|
55
|
+
* A built-in console utilities module for Shell Shock.
|
|
56
|
+
*/
|
|
57
|
+
declare function ConsoleBuiltin(props: ConsoleBuiltinProps): Children;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { AnsiHelpersDeclarations, ColorsDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
|
|
60
|
+
//# sourceMappingURL=console-builtin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-builtin.d.mts","names":[],"sources":["../../src/components/console-builtin.tsx"],"sourcesContent":[],"mappings":";;;;;;iBAwDgB,uBAAA,CAAA,GAAuB;;AAAvC;AA6JA;AAygDgB,iBAzgDA,iBAAA,CAAA,CAygD4B,EAzgDX,QAygDW;AA8P5C;;;AAA8C,iBA9P9B,4BAAA,CAAA,CA8P8B,EA9PF,QA8PE;AAYnC,KAZC,+BAAA,GAAkC,OAYnC,CAXT,IAWS,CAXJ,wBAWI,EAAA,YAAA,CAAA,CAAA,GAAA;EACD,IAAA,EAAA,SAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,SAAA,GAAA,MAAA,GAAA,QAAA,GAAA,OAAA;EAGC,OAAA,EAJA,mBAIA;EAAQ,KAAA,CAAA,EAHT,mBAGS;EAOH,aAAA,EAAA,KAAA,GAAA,MAA0B,GAAA,MAAA,GACjC,OAAA,GAAA,OAAA;EA2KO,WAAA,EAAA,MAAgB;EA4EhB,MAAA,CAAA,EA/PL,QA+PK;EAmCA,SAAA,CAAA,EAAA,OAAA;AAqFhB,CAAA;AA0FA;AAQA;AA4nBA;AAQgB,iBAtlCA,0BAAA,CAslCsB,KAAmB,EArlChD,+BAqlCgD,CAAA,EArlCjB,QAqlCiB;;;;iBA16BzC,gBAAA,CAAA,GAAgB;;;;iBA4EhB,4BAAA,CAAA,GAA4B;;;;iBAmC5B,0BAAA,CAAA,GAA0B;;;;iBAqF1B,uBAAA,CAAA,GAAuB;;;;KA0F3B,6BAAA,GAAgC,KAC1C;;;;iBAOc,wBAAA,QAAgC,gCAA6B;KA4nBjE,mBAAA,GAAsB,KAChC;;;;iBAOc,cAAA,QAAsB,sBAAmB"}
|