@shell-shock/preset-script 0.2.0 → 0.3.0

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.
Files changed (61) hide show
  1. package/README.md +2 -2
  2. package/dist/components/args-parser-logic.d.cts +7 -7
  3. package/dist/components/args-parser-logic.d.cts.map +1 -1
  4. package/dist/components/bin-entry.cjs +0 -1
  5. package/dist/components/bin-entry.cjs.map +1 -1
  6. package/dist/components/bin-entry.d.cts.map +1 -1
  7. package/dist/components/bin-entry.d.mts.map +1 -1
  8. package/dist/components/bin-entry.mjs +0 -1
  9. package/dist/components/bin-entry.mjs.map +1 -1
  10. package/dist/components/command-entry.d.cts +4 -4
  11. package/dist/components/command-entry.d.mts +4 -4
  12. package/dist/components/command-entry.d.mts.map +1 -1
  13. package/dist/components/command-router.cjs +5 -7
  14. package/dist/components/command-router.cjs.map +1 -1
  15. package/dist/components/command-router.mjs +5 -7
  16. package/dist/components/command-router.mjs.map +1 -1
  17. package/dist/components/console-builtin.cjs +314 -82
  18. package/dist/components/console-builtin.cjs.map +1 -1
  19. package/dist/components/console-builtin.d.cts +12 -2
  20. package/dist/components/console-builtin.d.cts.map +1 -1
  21. package/dist/components/console-builtin.d.mts +12 -2
  22. package/dist/components/console-builtin.d.mts.map +1 -1
  23. package/dist/components/console-builtin.mjs +315 -84
  24. package/dist/components/console-builtin.mjs.map +1 -1
  25. package/dist/components/help.cjs +35 -23
  26. package/dist/components/help.cjs.map +1 -1
  27. package/dist/components/help.d.cts +19 -11
  28. package/dist/components/help.d.cts.map +1 -1
  29. package/dist/components/help.d.mts +19 -11
  30. package/dist/components/help.d.mts.map +1 -1
  31. package/dist/components/help.mjs +36 -24
  32. package/dist/components/help.mjs.map +1 -1
  33. package/dist/components/index.cjs +1 -0
  34. package/dist/components/index.d.cts +3 -3
  35. package/dist/components/index.d.mts +3 -3
  36. package/dist/components/index.mjs +2 -2
  37. package/dist/components/utils-builtin.cjs +18 -16
  38. package/dist/components/utils-builtin.cjs.map +1 -1
  39. package/dist/components/utils-builtin.d.cts +7 -7
  40. package/dist/components/utils-builtin.d.cts.map +1 -1
  41. package/dist/components/utils-builtin.d.mts +7 -7
  42. package/dist/components/utils-builtin.d.mts.map +1 -1
  43. package/dist/components/utils-builtin.mjs +18 -16
  44. package/dist/components/utils-builtin.mjs.map +1 -1
  45. package/dist/components/virtual-command-entry.d.cts +3 -3
  46. package/dist/components/virtual-command-entry.d.cts.map +1 -1
  47. package/dist/helpers/ansi-utils.cjs +74 -10
  48. package/dist/helpers/ansi-utils.cjs.map +1 -1
  49. package/dist/helpers/ansi-utils.mjs +74 -10
  50. package/dist/helpers/ansi-utils.mjs.map +1 -1
  51. package/dist/helpers/get-default-options.cjs +20 -0
  52. package/dist/helpers/get-default-options.cjs.map +1 -1
  53. package/dist/helpers/get-default-options.mjs +20 -0
  54. package/dist/helpers/get-default-options.mjs.map +1 -1
  55. package/dist/index.cjs +97 -75
  56. package/dist/index.cjs.map +1 -1
  57. package/dist/index.d.cts.map +1 -1
  58. package/dist/index.d.mts.map +1 -1
  59. package/dist/index.mjs +99 -77
  60. package/dist/index.mjs.map +1 -1
  61. package/package.json +10 -10
@@ -1,6 +1,6 @@
1
1
  import { Children } from "@alloy-js/core";
2
2
  import { FunctionDeclarationProps } from "@alloy-js/typescript";
3
- import { ThemeMessageVariant } from "@shell-shock/plugin-theme/types/theme";
3
+ import { ThemeColorVariant, ThemeMessageVariant } from "@shell-shock/plugin-theme/types/theme";
4
4
 
5
5
  //#region src/components/console-builtin.d.ts
6
6
 
@@ -18,11 +18,21 @@ type MessageFunctionDeclarationProps = Partial<Pick<FunctionDeclarationProps, "p
18
18
  consoleFnName: "log" | "info" | "warn" | "error" | "debug";
19
19
  description: string;
20
20
  prefix?: Children;
21
+ timestamp?: boolean;
21
22
  };
22
23
  /**
23
24
  * A component to generate the message functions in the `shell-shock:console` builtin module.
24
25
  */
25
26
  declare function MessageFunctionDeclaration(props: MessageFunctionDeclarationProps): Children;
27
+ interface BannerFunctionDeclarationProps {
28
+ variant?: ThemeColorVariant;
29
+ consoleFnName?: "log" | "info" | "warn" | "error" | "debug";
30
+ title?: string;
31
+ }
32
+ /**
33
+ * A component to generate the `banner` function in the `shell-shock:console` builtin module.
34
+ */
35
+ declare function BannerFunctionDeclaration(props: BannerFunctionDeclarationProps): Children;
26
36
  /**
27
37
  * A component to generate the `wrapAnsi` function in the `shell-shock:console` builtin module.
28
38
  */
@@ -52,5 +62,5 @@ declare function TableFunctionDeclaration(props: TableFunctionDeclarationProps):
52
62
  */
53
63
  declare function ConsoleBuiltin(): Children;
54
64
  //#endregion
55
- export { ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
65
+ export { BannerFunctionDeclaration, BannerFunctionDeclarationProps, ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
56
66
  //# sourceMappingURL=console-builtin.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"console-builtin.d.cts","names":[],"sources":["../../src/components/console-builtin.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AA8EA;AA47BgB,iBA57BA,iBAAA,CAAA,CA47B4B,EA57BX,QA47BW;AAuJ5C;;;AAA8C,iBAvJ9B,4BAAA,CAAA,CAuJ8B,EAvJF,QAuJE;AAYnC,KAZC,+BAAA,GAAkC,OAYnC,CAXT,IAWS,CAXJ,wBAWI,EAAA,YAAA,CAAA,CAAA,GAAA;EAGA,IAAA,EAAA,SAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,SAAA,GAAA,MAAA,GAAA,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,+BAipBoE,CAAA,EAjpBrC,QAipBqC;AAse7D,UAh9BC,8BAAA,CAg9Ba;YA/8BlB;;;;;;;iBAQI,yBAAA,QACP,iCAA8B;;;;iBAyLvB,gBAAA,CAAA,GAAgB;;;;iBA4EhB,4BAAA,CAAA,GAA4B;;;;iBAmC5B,0BAAA,CAAA,GAA0B;;;;iBAsF1B,uBAAA,CAAA,GAAuB;;;;KA0F3B,6BAAA,GAAgC,KAC1C;;;;iBAOc,wBAAA,QAAgC,gCAA6B;;;;iBAse7D,cAAA,CAAA,GAAc"}
@@ -1,6 +1,6 @@
1
1
  import { Children } from "@alloy-js/core";
2
2
  import { FunctionDeclarationProps } from "@alloy-js/typescript";
3
- import { ThemeMessageVariant } from "@shell-shock/plugin-theme/types/theme";
3
+ import { ThemeColorVariant, ThemeMessageVariant } from "@shell-shock/plugin-theme/types/theme";
4
4
 
5
5
  //#region src/components/console-builtin.d.ts
6
6
 
@@ -18,11 +18,21 @@ type MessageFunctionDeclarationProps = Partial<Pick<FunctionDeclarationProps, "p
18
18
  consoleFnName: "log" | "info" | "warn" | "error" | "debug";
19
19
  description: string;
20
20
  prefix?: Children;
21
+ timestamp?: boolean;
21
22
  };
22
23
  /**
23
24
  * A component to generate the message functions in the `shell-shock:console` builtin module.
24
25
  */
25
26
  declare function MessageFunctionDeclaration(props: MessageFunctionDeclarationProps): Children;
27
+ interface BannerFunctionDeclarationProps {
28
+ variant?: ThemeColorVariant;
29
+ consoleFnName?: "log" | "info" | "warn" | "error" | "debug";
30
+ title?: string;
31
+ }
32
+ /**
33
+ * A component to generate the `banner` function in the `shell-shock:console` builtin module.
34
+ */
35
+ declare function BannerFunctionDeclaration(props: BannerFunctionDeclarationProps): Children;
26
36
  /**
27
37
  * A component to generate the `wrapAnsi` function in the `shell-shock:console` builtin module.
28
38
  */
@@ -52,5 +62,5 @@ declare function TableFunctionDeclaration(props: TableFunctionDeclarationProps):
52
62
  */
53
63
  declare function ConsoleBuiltin(): Children;
54
64
  //#endregion
55
- export { ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
65
+ export { BannerFunctionDeclaration, BannerFunctionDeclarationProps, ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
56
66
  //# sourceMappingURL=console-builtin.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"console-builtin.d.mts","names":[],"sources":["../../src/components/console-builtin.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AA8EA;AA47BgB,iBA57BA,iBAAA,CAAA,CA47B4B,EA57BX,QA47BW;AAuJ5C;;;AAA8C,iBAvJ9B,4BAAA,CAAA,CAuJ8B,EAvJF,QAuJE;AAYnC,KAZC,+BAAA,GAAkC,OAYnC,CAXT,IAWS,CAXJ,wBAWI,EAAA,YAAA,CAAA,CAAA,GAAA;EAGA,IAAA,EAAA,SAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,SAAA,GAAA,MAAA,GAAA,QAAA,GAAA,OAAA;EAAQ,OAAA,EAHR,mBAGQ;EAMH,aAAA,EAAA,KAAA,GAAA,MAA0B,GAAA,MAAA,GACjC,OAAA,GAAA,OAAA;EAoGO,WAAA,EAAA,MAAgB;EA4EhB,MAAA,CAAA,EAvLL,QAuLK;AAmChB,CAAA;AAsFA;AA0FA;AAQA;AA0cgB,iBAt1BA,0BAAA,CAs1Bc,KAAA,EAr1BrB,+BAq1BqB,CAAA,EAr1BU,QAq1BV;;;;iBAjvBd,gBAAA,CAAA,GAAgB;;;;iBA4EhB,4BAAA,CAAA,GAA4B;;;;iBAmC5B,0BAAA,CA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