@powerlines/plugin-alloy 0.25.30 → 0.25.32

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 (74) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +3 -0
  2. package/dist/core/components/output.cjs +12 -7
  3. package/dist/core/components/output.mjs +12 -7
  4. package/dist/core/components/output.mjs.map +1 -1
  5. package/dist/core/components/single-line-comment.cjs +5 -8
  6. package/dist/core/components/single-line-comment.mjs +5 -8
  7. package/dist/core/components/single-line-comment.mjs.map +1 -1
  8. package/dist/core/components/source-file.cjs +8 -7
  9. package/dist/core/components/source-file.mjs +8 -7
  10. package/dist/core/components/source-file.mjs.map +1 -1
  11. package/dist/core/components/spacing.cjs +5 -6
  12. package/dist/core/components/spacing.mjs +5 -6
  13. package/dist/core/components/spacing.mjs.map +1 -1
  14. package/dist/markdown/components/front-matter.cjs +12 -9
  15. package/dist/markdown/components/front-matter.mjs +12 -9
  16. package/dist/markdown/components/front-matter.mjs.map +1 -1
  17. package/dist/markdown/components/markdown-file.cjs +57 -41
  18. package/dist/markdown/components/markdown-file.mjs +57 -41
  19. package/dist/markdown/components/markdown-file.mjs.map +1 -1
  20. package/dist/markdown/components/markdown-table.cjs +31 -20
  21. package/dist/markdown/components/markdown-table.mjs +31 -20
  22. package/dist/markdown/components/markdown-table.mjs.map +1 -1
  23. package/dist/render.cjs +10 -4
  24. package/dist/render.mjs +10 -4
  25. package/dist/render.mjs.map +1 -1
  26. package/dist/typescript/components/builtin-file.cjs +21 -9
  27. package/dist/typescript/components/builtin-file.mjs +21 -9
  28. package/dist/typescript/components/builtin-file.mjs.map +1 -1
  29. package/dist/typescript/components/class-declaration.cjs +112 -79
  30. package/dist/typescript/components/class-declaration.mjs +112 -79
  31. package/dist/typescript/components/class-declaration.mjs.map +1 -1
  32. package/dist/typescript/components/dynamic-import-statement.cjs +6 -1
  33. package/dist/typescript/components/dynamic-import-statement.mjs +6 -1
  34. package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -1
  35. package/dist/typescript/components/entry-file.cjs +7 -3
  36. package/dist/typescript/components/entry-file.mjs +7 -3
  37. package/dist/typescript/components/entry-file.mjs.map +1 -1
  38. package/dist/typescript/components/infrastructure-file.cjs +7 -3
  39. package/dist/typescript/components/infrastructure-file.mjs +7 -3
  40. package/dist/typescript/components/infrastructure-file.mjs.map +1 -1
  41. package/dist/typescript/components/interface-declaration.cjs +83 -47
  42. package/dist/typescript/components/interface-declaration.mjs +83 -47
  43. package/dist/typescript/components/interface-declaration.mjs.map +1 -1
  44. package/dist/typescript/components/object-declaration.cjs +48 -36
  45. package/dist/typescript/components/object-declaration.mjs +48 -36
  46. package/dist/typescript/components/object-declaration.mjs.map +1 -1
  47. package/dist/typescript/components/property-name.cjs +2 -2
  48. package/dist/typescript/components/property-name.mjs +3 -3
  49. package/dist/typescript/components/property-name.mjs.map +1 -1
  50. package/dist/typescript/components/tsdoc-reflection.cjs +112 -54
  51. package/dist/typescript/components/tsdoc-reflection.mjs +112 -54
  52. package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -1
  53. package/dist/typescript/components/tsdoc.cjs +211 -140
  54. package/dist/typescript/components/tsdoc.mjs +211 -140
  55. package/dist/typescript/components/tsdoc.mjs.map +1 -1
  56. package/dist/typescript/components/type-declaration.cjs +17 -9
  57. package/dist/typescript/components/type-declaration.mjs +17 -9
  58. package/dist/typescript/components/type-declaration.mjs.map +1 -1
  59. package/dist/typescript/components/type-parameters.cjs +33 -33
  60. package/dist/typescript/components/type-parameters.mjs +33 -33
  61. package/dist/typescript/components/type-parameters.mjs.map +1 -1
  62. package/dist/typescript/components/typescript-file.cjs +90 -65
  63. package/dist/typescript/components/typescript-file.mjs +90 -65
  64. package/dist/typescript/components/typescript-file.mjs.map +1 -1
  65. package/dist/typescript/contexts/lexical-scope.cjs +5 -1
  66. package/dist/typescript/contexts/lexical-scope.mjs +5 -1
  67. package/dist/typescript/contexts/lexical-scope.mjs.map +1 -1
  68. package/dist/typescript/contexts/member-scope.cjs +5 -2
  69. package/dist/typescript/contexts/member-scope.mjs +5 -2
  70. package/dist/typescript/contexts/member-scope.mjs.map +1 -1
  71. package/dist/yaml/components/yaml-file.cjs +58 -48
  72. package/dist/yaml/components/yaml-file.mjs +58 -48
  73. package/dist/yaml/components/yaml-file.mjs.map +1 -1
  74. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"type-declaration.mjs","names":["Declaration"],"sources":["../../../src/typescript/components/type-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Name, Show } from \"@alloy-js/core\";\nimport {\n CommonDeclarationProps,\n Declaration,\n ensureTypeRefContext,\n TypeParameterDescriptor\n} from \"@alloy-js/typescript\";\nimport { TSDoc } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\nexport interface TypeDeclarationProps extends CommonDeclarationProps {\n /**\n * The generic type parameters of the interface.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Renders a TypeScript type declaration, including its name, optional TSDoc comment, and generic type parameters.\n */\nexport const TypeDeclaration = ensureTypeRefContext(function TypeDeclaration(\n props: TypeDeclarationProps\n) {\n const { children, doc, typeParameters, ...rest } = props;\n\n return (\n <>\n <Show when={Boolean(doc)}>\n <TSDoc heading={doc} />\n </Show>\n <Declaration {...rest} kind=\"type\" nameKind=\"type\">\n type <Name />\n {typeParameters && (\n <TypeParameters parameters={typeParameters} />\n )} = {children};\n </Declaration>\n </>\n );\n});\n"],"mappings":";;;;;;;;;AAsCA,MAAa,kBAAkB,qBAAqB,SAAS,gBAC3D,OACA;CACA,MAAM,EAAE,UAAU,KAAK,gBAAgB,GAAG,SAAS;AAEnD,QACE,EAAE;MACA,CAAC,KAAK,MAAM,QAAQ,IAAI,EAAE;QACxB,CAAC,MAAM,SAAS,OAAO;MACzB,EAAE,KAAK;MACP,CAACA,kBAAgB,MAAM,YAAY,gBAAgB;aAC5C,CAAC,OAAO;SACZ,kBACC,CAAC,eAAe,YAAY,mBAC5B,IAAI,SAAS;MACjB,EAAEA,cAAY;IAChB;EAEF"}
1
+ {"version":3,"file":"type-declaration.mjs","names":["Declaration"],"sources":["../../../src/typescript/components/type-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Name, Show } from \"@alloy-js/core\";\nimport {\n CommonDeclarationProps,\n Declaration,\n ensureTypeRefContext,\n TypeParameterDescriptor\n} from \"@alloy-js/typescript\";\nimport { TSDoc } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\nexport interface TypeDeclarationProps extends CommonDeclarationProps {\n /**\n * The generic type parameters of the interface.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Renders a TypeScript type declaration, including its name, optional TSDoc comment, and generic type parameters.\n */\nexport const TypeDeclaration = ensureTypeRefContext(function TypeDeclaration(\n props: TypeDeclarationProps\n) {\n const { children, doc, typeParameters, ...rest } = props;\n\n return (\n <>\n <Show when={Boolean(doc)}>\n <TSDoc heading={doc} />\n </Show>\n <Declaration {...rest} kind=\"type\" nameKind=\"type\">\n type <Name />\n {typeParameters && (\n <TypeParameters parameters={typeParameters} />\n )} = {children};\n </Declaration>\n </>\n );\n});\n"],"mappings":";;;;;;;;;;AAsCA,MAAa,kBAAkB,qBAAqB,SAAS,gBAC3D,OACA;CACA,MAAM,EAAE,UAAU,KAAK,gBAAgB,GAAG,SAAS;AAEnD,QACE,4CACE,oBAAC,MAAD;EAAM,MAAM,QAAQ,IAAI;YACtB,oBAAC,OAAD,EAAO,SAAS,KAAO;EAClB,GACP,qBAACA,eAAD;EAAa,GAAI;EAAM,MAAK;EAAO,UAAS;YAA5C;GAAmD;GAC5C,oBAAC,MAAD,EAAQ;GACZ,kBACC,oBAAC,gBAAD,EAAgB,YAAY,gBAAkB;GAC9C;GAAI;GAAS;GACH;IACb;EAEL"}
@@ -1,31 +1,30 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
3
  let _alloy_js_core = require("@alloy-js/core");
4
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
5
  let _alloy_js_typescript = require("@alloy-js/typescript");
5
6
 
6
7
  //#region src/typescript/components/type-parameters.tsx
7
8
  function typeParameter(param) {
8
- return <_alloy_js_core.Show when={typeof param === "object"} fallback={<>{param}</>}>
9
- <group>
10
- {param.name}
11
- <_alloy_js_core.Show when={!!param.extends}>
12
- {" "}
13
- extends
14
- <indent>
15
- {" "}
16
- <_alloy_js_typescript.TypeRefContext>
17
- {param.extends}
18
- </_alloy_js_typescript.TypeRefContext>
19
- </indent>
20
- </_alloy_js_core.Show>
21
- <_alloy_js_core.Show when={!!param.default}>
22
- {" = "}
23
- <_alloy_js_typescript.TypeRefContext>
24
- {param.default}
25
- </_alloy_js_typescript.TypeRefContext>
26
- </_alloy_js_core.Show>
27
- </group>{" "}
28
- </_alloy_js_core.Show>;
9
+ return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
10
+ when: typeof param === "object",
11
+ fallback: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core_jsx_runtime.Fragment, { children: param }),
12
+ children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)("group", { children: [
13
+ param.name,
14
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
15
+ when: !!param.extends,
16
+ children: [
17
+ " ",
18
+ "extends",
19
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)("indent", { children: [" ", /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_typescript.TypeRefContext, { children: param.extends })] })
20
+ ]
21
+ }),
22
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
23
+ when: !!param.default,
24
+ children: [" = ", /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_typescript.TypeRefContext, { children: param.default })]
25
+ })
26
+ ] }), " "]
27
+ });
29
28
  }
30
29
  /**
31
30
  * Represent type parameters
@@ -38,18 +37,19 @@ function typeParameter(param) {
38
37
  function TypeParameters(props) {
39
38
  if (props.children) return props.children;
40
39
  if (!props.parameters) return;
41
- return <>
42
- {"<"}
43
- <group>
44
- <_alloy_js_core.Indent softline>
45
- <_alloy_js_core.For each={props.parameters} comma line>
46
- {(param) => typeParameter(param)}
47
- </_alloy_js_core.For>
48
- <ifBreak>,</ifBreak>
49
- </_alloy_js_core.Indent>
50
- </group>
51
- {">"}
52
- </>;
40
+ return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core_jsx_runtime.Fragment, { children: [
41
+ "<",
42
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("group", { children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Indent, {
43
+ softline: true,
44
+ children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.For, {
45
+ each: props.parameters,
46
+ comma: true,
47
+ line: true,
48
+ children: (param) => typeParameter(param)
49
+ }), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("ifBreak", { children: "," })]
50
+ }) }),
51
+ ">"
52
+ ] });
53
53
  }
54
54
 
55
55
  //#endregion
@@ -1,29 +1,28 @@
1
1
  import { For, Indent, Show } from "@alloy-js/core";
2
+ import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
2
3
  import { TypeRefContext } from "@alloy-js/typescript";
3
4
 
4
5
  //#region src/typescript/components/type-parameters.tsx
5
6
  function typeParameter(param) {
6
- return <Show when={typeof param === "object"} fallback={<>{param}</>}>
7
- <group>
8
- {param.name}
9
- <Show when={!!param.extends}>
10
- {" "}
11
- extends
12
- <indent>
13
- {" "}
14
- <TypeRefContext>
15
- {param.extends}
16
- </TypeRefContext>
17
- </indent>
18
- </Show>
19
- <Show when={!!param.default}>
20
- {" = "}
21
- <TypeRefContext>
22
- {param.default}
23
- </TypeRefContext>
24
- </Show>
25
- </group>{" "}
26
- </Show>;
7
+ return /* @__PURE__ */ jsxs(Show, {
8
+ when: typeof param === "object",
9
+ fallback: /* @__PURE__ */ jsx(Fragment, { children: param }),
10
+ children: [/* @__PURE__ */ jsxs("group", { children: [
11
+ param.name,
12
+ /* @__PURE__ */ jsxs(Show, {
13
+ when: !!param.extends,
14
+ children: [
15
+ " ",
16
+ "extends",
17
+ /* @__PURE__ */ jsxs("indent", { children: [" ", /* @__PURE__ */ jsx(TypeRefContext, { children: param.extends })] })
18
+ ]
19
+ }),
20
+ /* @__PURE__ */ jsxs(Show, {
21
+ when: !!param.default,
22
+ children: [" = ", /* @__PURE__ */ jsx(TypeRefContext, { children: param.default })]
23
+ })
24
+ ] }), " "]
25
+ });
27
26
  }
28
27
  /**
29
28
  * Represent type parameters
@@ -36,18 +35,19 @@ function typeParameter(param) {
36
35
  function TypeParameters(props) {
37
36
  if (props.children) return props.children;
38
37
  if (!props.parameters) return;
39
- return <>
40
- {"<"}
41
- <group>
42
- <Indent softline>
43
- <For each={props.parameters} comma line>
44
- {(param) => typeParameter(param)}
45
- </For>
46
- <ifBreak>,</ifBreak>
47
- </Indent>
48
- </group>
49
- {">"}
50
- </>;
38
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
39
+ "<",
40
+ /* @__PURE__ */ jsx("group", { children: /* @__PURE__ */ jsxs(Indent, {
41
+ softline: true,
42
+ children: [/* @__PURE__ */ jsx(For, {
43
+ each: props.parameters,
44
+ comma: true,
45
+ line: true,
46
+ children: (param) => typeParameter(param)
47
+ }), /* @__PURE__ */ jsx("ifBreak", { children: "," })]
48
+ }) }),
49
+ ">"
50
+ ] });
51
51
  }
52
52
 
53
53
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"type-parameters.mjs","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Children, For, Indent, Show } from \"@alloy-js/core\";\nimport { TypeParameterDescriptor, TypeRefContext } from \"@alloy-js/typescript\";\n\n/** Props for type parameters */\nexport interface TypeParametersProps {\n /** Parameters */\n parameters?: TypeParameterDescriptor[] | string[];\n /** Jsx Children */\n children?: Children;\n}\n\nfunction typeParameter(param: TypeParameterDescriptor | string) {\n return (\n <Show when={typeof param === \"object\"} fallback={<>{param}</>}>\n <group>\n {(param as TypeParameterDescriptor).name}\n <Show when={!!(param as TypeParameterDescriptor).extends}>\n {\" \"}\n extends\n <indent>\n {\" \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).extends}\n </TypeRefContext>\n </indent>\n </Show>\n <Show when={!!(param as TypeParameterDescriptor).default}>\n {\" = \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).default}\n </TypeRefContext>\n </Show>\n </group>{\" \"}\n </Show>\n );\n}\n\n/**\n * Represent type parameters\n *\n * @example\n * ```ts\n * <A, B extends string>\n * ```\n */\nexport function TypeParameters(props: TypeParametersProps) {\n if (props.children) {\n return props.children;\n }\n\n if (!props.parameters) {\n return undefined;\n }\n\n return (\n <>\n {\"<\"}\n <group>\n <Indent softline>\n <For each={props.parameters} comma line>\n {param => typeParameter(param)}\n </For>\n <ifBreak>,</ifBreak>\n </Indent>\n </group>\n {\">\"}\n </>\n );\n}\n"],"mappings":";;;;AA6BA,SAAS,cAAc,OAAyC;AAC9D,QACE,CAAC,KAAK,MAAM,OAAO,UAAU,UAAU,UAAU,GAAG,MAAM,KAAK;MAC7D,CAAC,MAAM;SACH,MAAkC,KAAK;QACzC,CAAC,KAAK,MAAM,CAAC,CAAE,MAAkC,SAAS;WACvD,IAAI;;UAEL,CAAC,OAAO;aACL,IAAI;YACL,CAAC,eAAe;eACZ,MAAkC,QAAQ;YAC9C,EAAE,eAAe;UACnB,EAAE,OAAO;QACX,EAAE,KAAK;QACP,CAAC,KAAK,MAAM,CAAC,CAAE,MAAkC,SAAS;WACvD,MAAM;UACP,CAAC,eAAe;aACZ,MAAkC,QAAQ;UAC9C,EAAE,eAAe;QACnB,EAAE,KAAK;MACT,EAAE,OAAO,IAAI;IACf,EAAE;;;;;;;;;;AAYN,SAAgB,eAAe,OAA4B;AACzD,KAAI,MAAM,SACR,QAAO,MAAM;AAGf,KAAI,CAAC,MAAM,WACT;AAGF,QACE,EAAE;OACC,IAAI;MACL,CAAC,MAAM;QACL,CAAC,OAAO,SAAS;UACf,CAAC,IAAI,MAAM,MAAM,YAAY,MAAM,KAAK;cACrC,UAAS,cAAc,MAAM,CAAC;UACjC,EAAE,IAAI;UACN,CAAC,QAAQ,CAAC,EAAE,QAAQ;QACtB,EAAE,OAAO;MACX,EAAE,MAAM;OACP,IAAI;IACP"}
1
+ {"version":3,"file":"type-parameters.mjs","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Children, For, Indent, Show } from \"@alloy-js/core\";\nimport { TypeParameterDescriptor, TypeRefContext } from \"@alloy-js/typescript\";\n\n/** Props for type parameters */\nexport interface TypeParametersProps {\n /** Parameters */\n parameters?: TypeParameterDescriptor[] | string[];\n /** Jsx Children */\n children?: Children;\n}\n\nfunction typeParameter(param: TypeParameterDescriptor | string) {\n return (\n <Show when={typeof param === \"object\"} fallback={<>{param}</>}>\n <group>\n {(param as TypeParameterDescriptor).name}\n <Show when={!!(param as TypeParameterDescriptor).extends}>\n {\" \"}\n extends\n <indent>\n {\" \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).extends}\n </TypeRefContext>\n </indent>\n </Show>\n <Show when={!!(param as TypeParameterDescriptor).default}>\n {\" = \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).default}\n </TypeRefContext>\n </Show>\n </group>{\" \"}\n </Show>\n );\n}\n\n/**\n * Represent type parameters\n *\n * @example\n * ```ts\n * <A, B extends string>\n * ```\n */\nexport function TypeParameters(props: TypeParametersProps) {\n if (props.children) {\n return props.children;\n }\n\n if (!props.parameters) {\n return undefined;\n }\n\n return (\n <>\n {\"<\"}\n <group>\n <Indent softline>\n <For each={props.parameters} comma line>\n {param => typeParameter(param)}\n </For>\n <ifBreak>,</ifBreak>\n </Indent>\n </group>\n {\">\"}\n </>\n );\n}\n"],"mappings":";;;;;AA6BA,SAAS,cAAc,OAAyC;AAC9D,QACE,qBAAC,MAAD;EAAM,MAAM,OAAO,UAAU;EAAU,UAAU,0CAAG,OAAS;YAA7D,CACE,qBAAC,SAAD;GACI,MAAkC;GACpC,qBAAC,MAAD;IAAM,MAAM,CAAC,CAAE,MAAkC;cAAjD;KACG;KAAI;KAEL,qBAAC,UAAD,aACG,KACD,oBAAC,gBAAD,YACI,MAAkC,SACrB,EACV;KACJ;;GACP,qBAAC,MAAD;IAAM,MAAM,CAAC,CAAE,MAAkC;cAAjD,CACG,OACD,oBAAC,gBAAD,YACI,MAAkC,SACrB,EACZ;;GACD,KAAC,IACJ;;;;;;;;;;;AAYX,SAAgB,eAAe,OAA4B;AACzD,KAAI,MAAM,SACR,QAAO,MAAM;AAGf,KAAI,CAAC,MAAM,WACT;AAGF,QACE;EACG;EACD,oBAAC,SAAD,YACE,qBAAC,QAAD;GAAQ;aAAR,CACE,oBAAC,KAAD;IAAK,MAAM,MAAM;IAAY;IAAM;eAChC,UAAS,cAAc,MAAM;IAC1B,GACN,oBAAC,WAAD,YAAS,KAAW,EACb;MACH;EACP;EACA"}
@@ -4,6 +4,7 @@ const require_core_contexts_context = require('../../core/contexts/context.cjs')
4
4
  const require_core_components_single_line_comment = require('../../core/components/single-line-comment.cjs');
5
5
  const require_core_components_source_file = require('../../core/components/source-file.cjs');
6
6
  let _alloy_js_core = require("@alloy-js/core");
7
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
8
  let _stryke_path_append = require("@stryke/path/append");
8
9
  let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
9
10
  let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
@@ -40,15 +41,26 @@ function TypescriptFile(props) {
40
41
  if (pkg) if ((0, _stryke_type_checks_is_boolean.isBoolean)(props.export)) pkg.scope.addExport(modulePath, scope);
41
42
  else pkg.scope.addExport(props.export, scope);
42
43
  }
43
- return <_alloy_js_typescript.SourceFileContext.Provider value={{ scope }}>
44
- <_alloy_js_core.Scope value={scope}>
45
- <require_core_components_source_file.SourceFile {...rest} path={modulePath} header={header ?? <TypescriptFileHeader hashbang={hashbang}>
46
- <TypescriptFileHeaderImports imports={imports} builtinImports={builtinImports} scope={scope} />
47
- </TypescriptFileHeader>} filetype={tsx ? "tsx" : "typescript"}>
48
- {children}
49
- </require_core_components_source_file.SourceFile>
50
- </_alloy_js_core.Scope>
51
- </_alloy_js_typescript.SourceFileContext.Provider>;
44
+ return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_typescript.SourceFileContext.Provider, {
45
+ value: { scope },
46
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Scope, {
47
+ value: scope,
48
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_source_file.SourceFile, {
49
+ ...rest,
50
+ path: modulePath,
51
+ header: header ?? /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(TypescriptFileHeader, {
52
+ hashbang,
53
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(TypescriptFileHeaderImports, {
54
+ imports,
55
+ builtinImports,
56
+ scope
57
+ })
58
+ }),
59
+ filetype: tsx ? "tsx" : "typescript",
60
+ children
61
+ })
62
+ })
63
+ });
52
64
  }
53
65
  /**
54
66
  * Renders the header for a Powerlines Typescript source file.
@@ -59,46 +71,47 @@ function TypescriptFile(props) {
59
71
  function TypescriptFileHeader(props) {
60
72
  const { header, hashbang, disableEslint = true, disableBiome = true, disablePrettier = false, children } = props;
61
73
  const context = require_core_contexts_context.usePowerlinesSafe();
62
- return <>
63
- <_alloy_js_core.Show when={Boolean(hashbang)}>
64
- {hashbang === true ? _alloy_js_core.code`#!/usr/bin/env ${context?.config.mode === "development" ? "-S NODE_OPTIONS=--enable-source-maps" : ""} node` : hashbang}
65
- <hbr />
66
- </_alloy_js_core.Show>
67
- <_alloy_js_core.Show when={Boolean(header)}>
68
- {header}
69
- <hbr />
70
- </_alloy_js_core.Show>
71
- <hbr />
72
- <_alloy_js_core.Show when={Boolean(disableEslint)}>
73
- <require_core_components_single_line_comment.SingleLineComment variant="slash-star">
74
- {"eslint-disable"}
75
- </require_core_components_single_line_comment.SingleLineComment>
76
- <hbr />
77
- </_alloy_js_core.Show>
78
- <_alloy_js_core.Show when={Boolean(disablePrettier)}>
79
- <require_core_components_single_line_comment.SingleLineComment variant="slash-star">
80
- {"prettier-ignore"}
81
- </require_core_components_single_line_comment.SingleLineComment>
82
- <hbr />
83
- </_alloy_js_core.Show>
84
- <_alloy_js_core.Show when={Boolean(disableBiome)}>
85
- <require_core_components_single_line_comment.SingleLineComment>{"biome-ignore lint: disable"}</require_core_components_single_line_comment.SingleLineComment>
86
- <hbr />
87
- </_alloy_js_core.Show>
88
- <_alloy_js_core.Show when={Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome)}>
89
- <hbr />
90
- </_alloy_js_core.Show>
91
- <_alloy_js_core.Show when={Boolean(children)}>
92
- <>
93
- {children}
94
- <hbr />
95
- </>
96
- </_alloy_js_core.Show>
97
- <require_core_components_single_line_comment.SingleLineComment>{`Generated by ${(0, _stryke_string_format_title_case.titleCase)(context?.config?.framework) || "Powerlines"}`}</require_core_components_single_line_comment.SingleLineComment>
98
- <hbr />
99
- <require_core_components_single_line_comment.SingleLineComment>{(0, powerlines_utils.getFileHeaderWarning)(context)}</require_core_components_single_line_comment.SingleLineComment>
100
- <hbr />
101
- </>;
74
+ return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core_jsx_runtime.Fragment, { children: [
75
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
76
+ when: Boolean(hashbang),
77
+ children: [hashbang === true ? _alloy_js_core.code`#!/usr/bin/env ${context?.config.mode === "development" ? "-S NODE_OPTIONS=--enable-source-maps" : ""} node` : hashbang, /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})]
78
+ }),
79
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
80
+ when: Boolean(header),
81
+ children: [header, /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})]
82
+ }),
83
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {}),
84
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
85
+ when: Boolean(disableEslint),
86
+ children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_single_line_comment.SingleLineComment, {
87
+ variant: "slash-star",
88
+ children: "eslint-disable"
89
+ }), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})]
90
+ }),
91
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
92
+ when: Boolean(disablePrettier),
93
+ children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_single_line_comment.SingleLineComment, {
94
+ variant: "slash-star",
95
+ children: "prettier-ignore"
96
+ }), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})]
97
+ }),
98
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
99
+ when: Boolean(disableBiome),
100
+ children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_single_line_comment.SingleLineComment, { children: "biome-ignore lint: disable" }), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})]
101
+ }),
102
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
103
+ when: Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome),
104
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})
105
+ }),
106
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
107
+ when: Boolean(children),
108
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core_jsx_runtime.Fragment, { children: [children, /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})] })
109
+ }),
110
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_single_line_comment.SingleLineComment, { children: `Generated by ${(0, _stryke_string_format_title_case.titleCase)(context?.config?.framework) || "Powerlines"}` }),
111
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {}),
112
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_single_line_comment.SingleLineComment, { children: (0, powerlines_utils.getFileHeaderWarning)(context) }),
113
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})
114
+ ] });
102
115
  }
103
116
  /**
104
117
  * Renders the header for a Powerlines Typescript source file.
@@ -117,22 +130,34 @@ function TypescriptFileHeaderImports(props) {
117
130
  const builtinImports = (0, _alloy_js_core.computed)(() => {
118
131
  return Object.fromEntries(Object.entries(builtinImportsProps ?? {}).map(([module, importItem]) => [module, Array.isArray(importItem) ? (0, _stryke_helpers_get_unique.getUniqueBy)(importItem, (i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : i.alias || i.name) : importItem]));
119
132
  });
120
- return <_alloy_js_core.Show when={scope.importedModules.size > 0 || !!imports.value && Object.keys(imports.value).length > 0 || !!builtinImports.value && Object.keys(builtinImports.value).length > 0}>
121
- <_alloy_js_core.Show when={!!imports.value && Object.keys(imports.value).length > 0}>
122
- <_alloy_js_core.For each={Object.entries(imports.value ?? {})} hardline ender={<hbr />}>
123
- {([module, importItem]) => _alloy_js_core.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module}";`}
124
- </_alloy_js_core.For>
125
- </_alloy_js_core.Show>
126
- <_alloy_js_core.Show when={builtinImports.value && Object.keys(builtinImports.value).length > 0}>
127
- <_alloy_js_core.For each={Object.entries(builtinImports.value ?? {})} hardline ender={<hbr />}>
128
- {([module, importItem]) => _alloy_js_core.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module.includes(":") ? module : `${context?.config?.framework || "powerlines"}:${module}`}";`}
129
- </_alloy_js_core.For>
130
- </_alloy_js_core.Show>
131
- <_alloy_js_core.Show when={scope.importedModules.size > 0}>
132
- <_alloy_js_typescript.ImportStatements records={scope.importedModules} />
133
- </_alloy_js_core.Show>
134
- <hbr />
135
- </_alloy_js_core.Show>;
133
+ return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
134
+ when: scope.importedModules.size > 0 || !!imports.value && Object.keys(imports.value).length > 0 || !!builtinImports.value && Object.keys(builtinImports.value).length > 0,
135
+ children: [
136
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
137
+ when: !!imports.value && Object.keys(imports.value).length > 0,
138
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.For, {
139
+ each: Object.entries(imports.value ?? {}),
140
+ hardline: true,
141
+ ender: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {}),
142
+ children: ([module, importItem]) => _alloy_js_core.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module}";`
143
+ })
144
+ }),
145
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
146
+ when: builtinImports.value && Object.keys(builtinImports.value).length > 0,
147
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.For, {
148
+ each: Object.entries(builtinImports.value ?? {}),
149
+ hardline: true,
150
+ ender: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {}),
151
+ children: ([module, importItem]) => _alloy_js_core.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module.includes(":") ? module : `${context?.config?.framework || "powerlines"}:${module}`}";`
152
+ })
153
+ }),
154
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
155
+ when: scope.importedModules.size > 0,
156
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_typescript.ImportStatements, { records: scope.importedModules })
157
+ }),
158
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})
159
+ ]
160
+ });
136
161
  }
137
162
 
138
163
  //#endregion
@@ -2,6 +2,7 @@ import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
2
2
  import { SingleLineComment } from "../../core/components/single-line-comment.mjs";
3
3
  import { SourceFile } from "../../core/components/source-file.mjs";
4
4
  import { For, Scope, Show, SourceDirectoryContext, code, computed, splitProps, useContext, useScope } from "@alloy-js/core";
5
+ import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
5
6
  import { appendPath } from "@stryke/path/append";
6
7
  import { titleCase } from "@stryke/string-format/title-case";
7
8
  import { getUniqueBy } from "@stryke/helpers/get-unique";
@@ -38,15 +39,26 @@ function TypescriptFile(props) {
38
39
  if (pkg) if (isBoolean(props.export)) pkg.scope.addExport(modulePath, scope);
39
40
  else pkg.scope.addExport(props.export, scope);
40
41
  }
41
- return <SourceFileContext$1.Provider value={{ scope }}>
42
- <Scope value={scope}>
43
- <SourceFile {...rest} path={modulePath} header={header ?? <TypescriptFileHeader hashbang={hashbang}>
44
- <TypescriptFileHeaderImports imports={imports} builtinImports={builtinImports} scope={scope} />
45
- </TypescriptFileHeader>} filetype={tsx ? "tsx" : "typescript"}>
46
- {children}
47
- </SourceFile>
48
- </Scope>
49
- </SourceFileContext$1.Provider>;
42
+ return /* @__PURE__ */ jsx(SourceFileContext$1.Provider, {
43
+ value: { scope },
44
+ children: /* @__PURE__ */ jsx(Scope, {
45
+ value: scope,
46
+ children: /* @__PURE__ */ jsx(SourceFile, {
47
+ ...rest,
48
+ path: modulePath,
49
+ header: header ?? /* @__PURE__ */ jsx(TypescriptFileHeader, {
50
+ hashbang,
51
+ children: /* @__PURE__ */ jsx(TypescriptFileHeaderImports, {
52
+ imports,
53
+ builtinImports,
54
+ scope
55
+ })
56
+ }),
57
+ filetype: tsx ? "tsx" : "typescript",
58
+ children
59
+ })
60
+ })
61
+ });
50
62
  }
51
63
  /**
52
64
  * Renders the header for a Powerlines Typescript source file.
@@ -57,46 +69,47 @@ function TypescriptFile(props) {
57
69
  function TypescriptFileHeader(props) {
58
70
  const { header, hashbang, disableEslint = true, disableBiome = true, disablePrettier = false, children } = props;
59
71
  const context = usePowerlinesSafe();
60
- return <>
61
- <Show when={Boolean(hashbang)}>
62
- {hashbang === true ? code`#!/usr/bin/env ${context?.config.mode === "development" ? "-S NODE_OPTIONS=--enable-source-maps" : ""} node` : hashbang}
63
- <hbr />
64
- </Show>
65
- <Show when={Boolean(header)}>
66
- {header}
67
- <hbr />
68
- </Show>
69
- <hbr />
70
- <Show when={Boolean(disableEslint)}>
71
- <SingleLineComment variant="slash-star">
72
- {"eslint-disable"}
73
- </SingleLineComment>
74
- <hbr />
75
- </Show>
76
- <Show when={Boolean(disablePrettier)}>
77
- <SingleLineComment variant="slash-star">
78
- {"prettier-ignore"}
79
- </SingleLineComment>
80
- <hbr />
81
- </Show>
82
- <Show when={Boolean(disableBiome)}>
83
- <SingleLineComment>{"biome-ignore lint: disable"}</SingleLineComment>
84
- <hbr />
85
- </Show>
86
- <Show when={Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome)}>
87
- <hbr />
88
- </Show>
89
- <Show when={Boolean(children)}>
90
- <>
91
- {children}
92
- <hbr />
93
- </>
94
- </Show>
95
- <SingleLineComment>{`Generated by ${titleCase(context?.config?.framework) || "Powerlines"}`}</SingleLineComment>
96
- <hbr />
97
- <SingleLineComment>{getFileHeaderWarning(context)}</SingleLineComment>
98
- <hbr />
99
- </>;
72
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
73
+ /* @__PURE__ */ jsxs(Show, {
74
+ when: Boolean(hashbang),
75
+ children: [hashbang === true ? code`#!/usr/bin/env ${context?.config.mode === "development" ? "-S NODE_OPTIONS=--enable-source-maps" : ""} node` : hashbang, /* @__PURE__ */ jsx("hbr", {})]
76
+ }),
77
+ /* @__PURE__ */ jsxs(Show, {
78
+ when: Boolean(header),
79
+ children: [header, /* @__PURE__ */ jsx("hbr", {})]
80
+ }),
81
+ /* @__PURE__ */ jsx("hbr", {}),
82
+ /* @__PURE__ */ jsxs(Show, {
83
+ when: Boolean(disableEslint),
84
+ children: [/* @__PURE__ */ jsx(SingleLineComment, {
85
+ variant: "slash-star",
86
+ children: "eslint-disable"
87
+ }), /* @__PURE__ */ jsx("hbr", {})]
88
+ }),
89
+ /* @__PURE__ */ jsxs(Show, {
90
+ when: Boolean(disablePrettier),
91
+ children: [/* @__PURE__ */ jsx(SingleLineComment, {
92
+ variant: "slash-star",
93
+ children: "prettier-ignore"
94
+ }), /* @__PURE__ */ jsx("hbr", {})]
95
+ }),
96
+ /* @__PURE__ */ jsxs(Show, {
97
+ when: Boolean(disableBiome),
98
+ children: [/* @__PURE__ */ jsx(SingleLineComment, { children: "biome-ignore lint: disable" }), /* @__PURE__ */ jsx("hbr", {})]
99
+ }),
100
+ /* @__PURE__ */ jsx(Show, {
101
+ when: Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome),
102
+ children: /* @__PURE__ */ jsx("hbr", {})
103
+ }),
104
+ /* @__PURE__ */ jsx(Show, {
105
+ when: Boolean(children),
106
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [children, /* @__PURE__ */ jsx("hbr", {})] })
107
+ }),
108
+ /* @__PURE__ */ jsx(SingleLineComment, { children: `Generated by ${titleCase(context?.config?.framework) || "Powerlines"}` }),
109
+ /* @__PURE__ */ jsx("hbr", {}),
110
+ /* @__PURE__ */ jsx(SingleLineComment, { children: getFileHeaderWarning(context) }),
111
+ /* @__PURE__ */ jsx("hbr", {})
112
+ ] });
100
113
  }
101
114
  /**
102
115
  * Renders the header for a Powerlines Typescript source file.
@@ -115,22 +128,34 @@ function TypescriptFileHeaderImports(props) {
115
128
  const builtinImports = computed(() => {
116
129
  return Object.fromEntries(Object.entries(builtinImportsProps ?? {}).map(([module, importItem]) => [module, Array.isArray(importItem) ? getUniqueBy(importItem, (i) => isString(i) ? i : i.alias || i.name) : importItem]));
117
130
  });
118
- return <Show when={scope.importedModules.size > 0 || !!imports.value && Object.keys(imports.value).length > 0 || !!builtinImports.value && Object.keys(builtinImports.value).length > 0}>
119
- <Show when={!!imports.value && Object.keys(imports.value).length > 0}>
120
- <For each={Object.entries(imports.value ?? {})} hardline ender={<hbr />}>
121
- {([module, importItem]) => code`import ${importItem === null ? "" : isString(importItem) ? importItem : `${importItem.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => isString(i) || !i.default).map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module}";`}
122
- </For>
123
- </Show>
124
- <Show when={builtinImports.value && Object.keys(builtinImports.value).length > 0}>
125
- <For each={Object.entries(builtinImports.value ?? {})} hardline ender={<hbr />}>
126
- {([module, importItem]) => code`import ${importItem === null ? "" : isString(importItem) ? importItem : `${importItem.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => isString(i) || !i.default).map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module.includes(":") ? module : `${context?.config?.framework || "powerlines"}:${module}`}";`}
127
- </For>
128
- </Show>
129
- <Show when={scope.importedModules.size > 0}>
130
- <ImportStatements records={scope.importedModules} />
131
- </Show>
132
- <hbr />
133
- </Show>;
131
+ return /* @__PURE__ */ jsxs(Show, {
132
+ when: scope.importedModules.size > 0 || !!imports.value && Object.keys(imports.value).length > 0 || !!builtinImports.value && Object.keys(builtinImports.value).length > 0,
133
+ children: [
134
+ /* @__PURE__ */ jsx(Show, {
135
+ when: !!imports.value && Object.keys(imports.value).length > 0,
136
+ children: /* @__PURE__ */ jsx(For, {
137
+ each: Object.entries(imports.value ?? {}),
138
+ hardline: true,
139
+ ender: /* @__PURE__ */ jsx("hbr", {}),
140
+ children: ([module, importItem]) => code`import ${importItem === null ? "" : isString(importItem) ? importItem : `${importItem.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => isString(i) || !i.default).map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module}";`
141
+ })
142
+ }),
143
+ /* @__PURE__ */ jsx(Show, {
144
+ when: builtinImports.value && Object.keys(builtinImports.value).length > 0,
145
+ children: /* @__PURE__ */ jsx(For, {
146
+ each: Object.entries(builtinImports.value ?? {}),
147
+ hardline: true,
148
+ ender: /* @__PURE__ */ jsx("hbr", {}),
149
+ children: ([module, importItem]) => code`import ${importItem === null ? "" : isString(importItem) ? importItem : `${importItem.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => isString(i) || !i.default).map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module.includes(":") ? module : `${context?.config?.framework || "powerlines"}:${module}`}";`
150
+ })
151
+ }),
152
+ /* @__PURE__ */ jsx(Show, {
153
+ when: scope.importedModules.size > 0,
154
+ children: /* @__PURE__ */ jsx(ImportStatements, { records: scope.importedModules })
155
+ }),
156
+ /* @__PURE__ */ jsx("hbr", {})
157
+ ]
158
+ });
134
159
  }
135
160
 
136
161
  //#endregion