@shell-shock/preset-script 0.6.0 → 0.6.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.
Files changed (63) hide show
  1. package/README.md +1 -1
  2. package/dist/components/banner-function-declaration.cjs +4 -2
  3. package/dist/components/banner-function-declaration.cjs.map +1 -1
  4. package/dist/components/banner-function-declaration.mjs +4 -2
  5. package/dist/components/banner-function-declaration.mjs.map +1 -1
  6. package/dist/components/bin-entry.cjs +9 -5
  7. package/dist/components/bin-entry.cjs.map +1 -1
  8. package/dist/components/bin-entry.d.cts.map +1 -1
  9. package/dist/components/bin-entry.d.mts.map +1 -1
  10. package/dist/components/bin-entry.mjs +9 -5
  11. package/dist/components/bin-entry.mjs.map +1 -1
  12. package/dist/components/command-entry.cjs +160 -155
  13. package/dist/components/command-entry.cjs.map +1 -1
  14. package/dist/components/command-entry.d.cts +8 -1
  15. package/dist/components/command-entry.d.cts.map +1 -1
  16. package/dist/components/command-entry.d.mts +8 -1
  17. package/dist/components/command-entry.d.mts.map +1 -1
  18. package/dist/components/command-entry.mjs +160 -156
  19. package/dist/components/command-entry.mjs.map +1 -1
  20. package/dist/components/command-router.cjs +90 -61
  21. package/dist/components/command-router.cjs.map +1 -1
  22. package/dist/components/command-router.d.cts +5 -1
  23. package/dist/components/command-router.d.cts.map +1 -1
  24. package/dist/components/command-router.d.mts +5 -1
  25. package/dist/components/command-router.d.mts.map +1 -1
  26. package/dist/components/command-router.mjs +90 -62
  27. package/dist/components/command-router.mjs.map +1 -1
  28. package/dist/components/console-builtin.cjs +27 -19
  29. package/dist/components/console-builtin.cjs.map +1 -1
  30. package/dist/components/console-builtin.d.cts +4 -2
  31. package/dist/components/console-builtin.d.cts.map +1 -1
  32. package/dist/components/console-builtin.d.mts +4 -2
  33. package/dist/components/console-builtin.d.mts.map +1 -1
  34. package/dist/components/console-builtin.mjs +27 -19
  35. package/dist/components/console-builtin.mjs.map +1 -1
  36. package/dist/components/help.d.cts +7 -7
  37. package/dist/components/help.d.cts.map +1 -1
  38. package/dist/components/helpers.d.cts +5 -5
  39. package/dist/components/index.cjs +2 -0
  40. package/dist/components/index.d.cts +4 -4
  41. package/dist/components/index.d.mts +4 -4
  42. package/dist/components/index.mjs +3 -3
  43. package/dist/components/utils-builtin.cjs +59 -92
  44. package/dist/components/utils-builtin.cjs.map +1 -1
  45. package/dist/components/utils-builtin.d.cts +8 -8
  46. package/dist/components/utils-builtin.d.cts.map +1 -1
  47. package/dist/components/utils-builtin.d.mts.map +1 -1
  48. package/dist/components/utils-builtin.mjs +60 -93
  49. package/dist/components/utils-builtin.mjs.map +1 -1
  50. package/dist/components/virtual-command-entry.cjs +16 -12
  51. package/dist/components/virtual-command-entry.cjs.map +1 -1
  52. package/dist/components/virtual-command-entry.d.cts.map +1 -1
  53. package/dist/components/virtual-command-entry.d.mts.map +1 -1
  54. package/dist/components/virtual-command-entry.mjs +16 -12
  55. package/dist/components/virtual-command-entry.mjs.map +1 -1
  56. package/dist/index.cjs +2 -3
  57. package/dist/index.cjs.map +1 -1
  58. package/dist/index.d.cts.map +1 -1
  59. package/dist/index.d.mts.map +1 -1
  60. package/dist/index.mjs +2 -3
  61. package/dist/index.mjs.map +1 -1
  62. package/dist/types/plugin.d.cts.map +1 -1
  63. package/package.json +8 -8
@@ -1,6 +1,7 @@
1
1
  import { Children } from "@alloy-js/core";
2
2
  import { ThemeMessageVariant } from "@shell-shock/plugin-theme/types/theme";
3
3
  import { FunctionDeclarationProps } from "@alloy-js/typescript";
4
+ import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
4
5
 
5
6
  //#region src/components/console-builtin.d.ts
6
7
 
@@ -49,10 +50,11 @@ type TableFunctionDeclarationProps = Omit<FunctionDeclarationProps, "parameters"
49
50
  * A component to generate the table functions in the `shell-shock:console` builtin module.
50
51
  */
51
52
  declare function TableFunctionDeclaration(props: TableFunctionDeclarationProps): Children;
53
+ type ConsoleBuiltinProps = Pick<BuiltinFileProps, "children" | "imports" | "builtinImports">;
52
54
  /**
53
55
  * A built-in console utilities module for Shell Shock.
54
56
  */
55
- declare function ConsoleBuiltin(): Children;
57
+ declare function ConsoleBuiltin(props: ConsoleBuiltinProps): Children;
56
58
  //#endregion
57
- export { ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
59
+ export { ColorsDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
58
60
  //# 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":";;;;;;;;AAgFA;AAwpCgB,iBAxpCA,iBAAA,CAAA,CAwpC4B,EAxpCX,QAwpCW;AAuJ5C;;;AAA8C,iBAvJ9B,4BAAA,CAAA,CAuJ8B,EAvJF,QAuJE;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;EAyKO,WAAA,EAAA,MAAgB;EA4EhB,MAAA,CAAA,EA7PL,QA6PK;EAmCA,SAAA,CAAA,EAAA,OAAA;AAs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AOc,wBAAA,QAAgC,gCAA6B;KAmejE,mBAAA,GAAsB,KAChC;;;;iBAOc,cAAA,QAAsB,sBAAmB"}
@@ -1,5 +1,6 @@
1
1
  import { Children } from "@alloy-js/core";
2
2
  import { FunctionDeclarationProps } from "@alloy-js/typescript";
3
+ import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
3
4
  import { ThemeMessageVariant } from "@shell-shock/plugin-theme/types/theme";
4
5
 
5
6
  //#region src/components/console-builtin.d.ts
@@ -49,10 +50,11 @@ type TableFunctionDeclarationProps = Omit<FunctionDeclarationProps, "parameters"
49
50
  * A component to generate the table functions in the `shell-shock:console` builtin module.
50
51
  */
51
52
  declare function TableFunctionDeclaration(props: TableFunctionDeclarationProps): Children;
53
+ type ConsoleBuiltinProps = Pick<BuiltinFileProps, "children" | "imports" | "builtinImports">;
52
54
  /**
53
55
  * A built-in console utilities module for Shell Shock.
54
56
  */
55
- declare function ConsoleBuiltin(): Children;
57
+ declare function ConsoleBuiltin(props: ConsoleBuiltinProps): Children;
56
58
  //#endregion
57
- export { ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
59
+ export { ColorsDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
58
60
  //# 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":";;;;;;;;AAgFA;AAwpCgB,iBAxpCA,iBAAA,CAAA,CAwpC4B,EAxpCX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,EAJA,mBAIA;EAAQ,KAAA,CAAA,EAHT,mBAGS;EAOH,aAAA,EAAA,KAAA,GAAA,MAA0B,GAAA,MAAA,GACjC,OAAA,GAAA,OAAA;EAyKO,WAAA,EAAA,MAAgB;EA4EhB,MAAA,CAAA,EA7PL,QA6PK;EAmCA,SAAA,CAAA,EAAA,OAAA;AAsFhB,CAAA;AA0FA;AAQA;AAmeA;AAQgB,iBA57BA,0BAAA,CA47BsB,KAAmB,EA37BhD,+BA27BgD,CAAA,EA37BjB,QA27BiB;;;;iBAlxBzC,gBAAA,CAAA,GAAgB;;;;iBA4EhB,4BAAA,CAAA,GAA4B;;;;iBAmC5B,0BAAA,CAAA,GAA0B;;;;iBAsF1B,uBAAA,CAAA,GAAuB;;;;KA0F3B,6BAAA,GAAgC,KAC1C;;;;iBAOc,wBAAA,QAAgC,gCAA6B;KAmejE,mBAAA,GAAsB,KAChC;;;;iBAOc,cAAA,QAAsB,sBAAmB"}
@@ -4,6 +4,7 @@ import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/co
4
4
  import { For, Show, code } from "@alloy-js/core";
5
5
  import { ElseClause, FunctionDeclaration, IfStatement, InterfaceDeclaration, InterfaceMember, TypeDeclaration, VarDeclaration } from "@alloy-js/typescript";
6
6
  import { TSDoc, TSDocDefaultValue, TSDocExample, TSDocParam, TSDocRemarks, TSDocReturns } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
7
+ import { defu as defu$1 } from "defu";
7
8
  import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
8
9
  import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
9
10
  import { getIndefiniteArticle } from "@stryke/string-format/vowels";
@@ -2093,28 +2094,32 @@ cells.forEach((row, rowIndex) => {
2093
2094
  /**
2094
2095
  * A built-in console utilities module for Shell Shock.
2095
2096
  */
2096
- function ConsoleBuiltin() {
2097
+ function ConsoleBuiltin(props) {
2098
+ const { children, imports, builtinImports } = props;
2097
2099
  return createComponent(BuiltinFile, {
2098
2100
  id: "console",
2099
2101
  description: "A collection of helper utilities to assist in generating content meant for display in the console.",
2100
- imports: { "@shell-shock/plugin-theme/types/theme": [{
2101
- name: "ThemeColorsResolvedConfig",
2102
- type: true
2103
- }] },
2104
- builtinImports: {
2105
- utils: [
2106
- "hasFlag",
2107
- "isMinimal",
2108
- "isColorSupported",
2109
- "colorSupportLevels",
2110
- "isHyperlinkSupported"
2111
- ],
2112
- env: [
2113
- "env",
2114
- "isDevelopment",
2115
- "isDebug",
2116
- "isCI"
2117
- ]
2102
+ get imports() {
2103
+ return defu$1(imports, { "@shell-shock/plugin-theme/types/theme": [{
2104
+ name: "ThemeColorsResolvedConfig",
2105
+ type: true
2106
+ }] });
2107
+ },
2108
+ get builtinImports() {
2109
+ return defu$1(builtinImports, {
2110
+ utils: [
2111
+ "hasFlag",
2112
+ "isMinimal",
2113
+ "isColorSupported",
2114
+ "colorSupportLevels",
2115
+ "isHyperlinkSupported"
2116
+ ],
2117
+ env: [
2118
+ "env",
2119
+ "isDevelopment",
2120
+ "isDebug"
2121
+ ]
2122
+ });
2118
2123
  },
2119
2124
  get children() {
2120
2125
  return [
@@ -2248,6 +2253,9 @@ function ConsoleBuiltin() {
2248
2253
  createIntrinsic("hbr", {}),
2249
2254
  createComponent(TableFunctionDeclaration, {}),
2250
2255
  createIntrinsic("hbr", {}),
2256
+ createIntrinsic("hbr", {}),
2257
+ children,
2258
+ createIntrinsic("hbr", {}),
2251
2259
  createIntrinsic("hbr", {})
2252
2260
  ];
2253
2261
  }