@powerlines/plugin-alloy 0.19.24 → 0.19.25

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 (168) hide show
  1. package/dist/{builtin-file-uzudbU6M.mjs → builtin-file-B8Y36s1a.mjs} +4 -4
  2. package/dist/{builtin-file-uzudbU6M.mjs.map → builtin-file-B8Y36s1a.mjs.map} +1 -1
  3. package/dist/builtin-file-BDHvdI1i.d.mts +35 -0
  4. package/dist/{builtin-file-Sx0sbgXZ.d.cts.map → builtin-file-BDHvdI1i.d.mts.map} +1 -1
  5. package/dist/{builtin-file-Sx0sbgXZ.d.cts → builtin-file-Bf0byhqY.d.cts} +4 -4
  6. package/dist/builtin-file-Bf0byhqY.d.cts.map +1 -0
  7. package/dist/{builtin-file-V_vMh8s8.cjs → builtin-file-vG9RwKpd.cjs} +3 -3
  8. package/dist/{context-CdPajCh6.mjs → context-BaVJCPfX.mjs} +1 -1
  9. package/dist/{context-CdPajCh6.mjs.map → context-BaVJCPfX.mjs.map} +1 -1
  10. package/dist/core/components/index.cjs +4 -4
  11. package/dist/core/components/index.mjs +4 -4
  12. package/dist/core/components/output.cjs +2 -2
  13. package/dist/core/components/output.mjs +2 -2
  14. package/dist/core/components/source-file.cjs +2 -2
  15. package/dist/core/components/source-file.mjs +2 -2
  16. package/dist/core/contexts/context.cjs +1 -1
  17. package/dist/core/contexts/context.mjs +1 -1
  18. package/dist/core/contexts/index.cjs +2 -2
  19. package/dist/core/contexts/index.mjs +2 -2
  20. package/dist/core/contexts/meta.cjs +1 -1
  21. package/dist/core/contexts/meta.mjs +1 -1
  22. package/dist/core/index.cjs +4 -4
  23. package/dist/core/index.mjs +4 -4
  24. package/dist/{dynamic-import-statement-CkTDZa9C.d.cts → dynamic-import-statement-C142NY9L.d.cts} +3 -3
  25. package/dist/{dynamic-import-statement-CkTDZa9C.d.cts.map → dynamic-import-statement-C142NY9L.d.cts.map} +1 -1
  26. package/dist/{entry-file-Big6nfUK.cjs → entry-file-BF1TZjhp.cjs} +2 -2
  27. package/dist/{entry-file-CI22kUBs.d.cts → entry-file-CHSinjc8.d.cts} +3 -3
  28. package/dist/{entry-file-6OSh_HPP.d.mts.map → entry-file-CHSinjc8.d.cts.map} +1 -1
  29. package/dist/{entry-file-DW7QEqXv.d.cts → entry-file-DlyBq92D.d.cts} +2 -2
  30. package/dist/{entry-file-CI22kUBs.d.cts.map → entry-file-DlyBq92D.d.cts.map} +1 -1
  31. package/dist/{entry-file-BwAnSku3.mjs → entry-file-DzlSog-0.mjs} +3 -3
  32. package/dist/{entry-file-BwAnSku3.mjs.map → entry-file-DzlSog-0.mjs.map} +1 -1
  33. package/dist/{entry-file-6OSh_HPP.d.mts → entry-file-RCTtBe-Z.d.mts} +4 -4
  34. package/dist/{entry-file-DW7QEqXv.d.cts.map → entry-file-RCTtBe-Z.d.mts.map} +1 -1
  35. package/dist/{front-matter-DNU08CaL.d.mts → front-matter-BxgmGhju.d.cts} +3 -3
  36. package/dist/{front-matter-DNU08CaL.d.mts.map → front-matter-BxgmGhju.d.cts.map} +1 -1
  37. package/dist/{front-matter-D_wSuNkq.d.cts → front-matter-DpKD40Zz.d.cts} +3 -3
  38. package/dist/{front-matter-BdXzBycV.d.cts.map → front-matter-DpKD40Zz.d.cts.map} +1 -1
  39. package/dist/index.cjs +2 -13
  40. package/dist/index.d.cts.map +1 -1
  41. package/dist/index.d.mts.map +1 -1
  42. package/dist/index.mjs +2 -13
  43. package/dist/index.mjs.map +1 -1
  44. package/dist/markdown/components/front-matter.d.cts +1 -1
  45. package/dist/markdown/components/index.cjs +4 -4
  46. package/dist/markdown/components/index.d.cts +3 -3
  47. package/dist/markdown/components/index.mjs +4 -4
  48. package/dist/markdown/components/markdown-file.cjs +4 -4
  49. package/dist/markdown/components/markdown-file.d.cts +2 -2
  50. package/dist/markdown/components/markdown-file.mjs +4 -4
  51. package/dist/markdown/components/markdown-table.d.cts +1 -1
  52. package/dist/markdown/index.cjs +4 -4
  53. package/dist/markdown/index.d.cts +3 -3
  54. package/dist/markdown/index.mjs +4 -4
  55. package/dist/{markdown-file-B6gbsDmK.cjs → markdown-file-BDzUAptw.cjs} +2 -2
  56. package/dist/{markdown-file-DD1Uc7fZ.d.cts → markdown-file-C0tsAvPo.d.cts} +6 -6
  57. package/dist/{markdown-file-B7Epw0lo.d.mts.map → markdown-file-C0tsAvPo.d.cts.map} +1 -1
  58. package/dist/{markdown-file-BNzfeQa-.d.cts → markdown-file-CwMc-alS.d.cts} +5 -5
  59. package/dist/{markdown-file-BNzfeQa-.d.cts.map → markdown-file-CwMc-alS.d.cts.map} +1 -1
  60. package/dist/{markdown-file-k5ep-0VI.mjs → markdown-file-DLIS2yeG.mjs} +3 -3
  61. package/dist/{markdown-file-k5ep-0VI.mjs.map → markdown-file-DLIS2yeG.mjs.map} +1 -1
  62. package/dist/{markdown-file-B7Epw0lo.d.mts → markdown-file-DwxnA0FP.d.mts} +6 -6
  63. package/dist/markdown-file-DwxnA0FP.d.mts.map +1 -0
  64. package/dist/markdown-table-CZMEY6IR.d.cts.map +1 -1
  65. package/dist/{markdown-table-BPAguEBC.d.cts → markdown-table-Cv6HmRUB.d.cts} +5 -5
  66. package/dist/markdown-table-Cv6HmRUB.d.cts.map +1 -0
  67. package/dist/markdown-table-D2KgJkWx.d.cts +28 -0
  68. package/dist/markdown-table-D2KgJkWx.d.cts.map +1 -0
  69. package/dist/markdown-table-FflgG7B5.d.mts +28 -0
  70. package/dist/markdown-table-FflgG7B5.d.mts.map +1 -0
  71. package/dist/{meta-D0pfCtdR.mjs → meta-BuwJuxY9.mjs} +1 -1
  72. package/dist/{meta-D0pfCtdR.mjs.map → meta-BuwJuxY9.mjs.map} +1 -1
  73. package/dist/{output-CPbwcL2j.mjs → output-BehYSTRr.mjs} +2 -2
  74. package/dist/{output-CPbwcL2j.mjs.map → output-BehYSTRr.mjs.map} +1 -1
  75. package/dist/{output-B52VAyyC.cjs → output-Ck9L8v3E.cjs} +1 -1
  76. package/dist/output-gLuHZTGo.d.mts +19 -0
  77. package/dist/{output-CGYPi1rL.d.cts.map → output-gLuHZTGo.d.mts.map} +1 -1
  78. package/dist/{output-CGYPi1rL.d.cts → output-qne-NsTE.d.cts} +3 -3
  79. package/dist/output-qne-NsTE.d.cts.map +1 -0
  80. package/dist/single-line-comment-B35kAUee.d.mts +23 -0
  81. package/dist/single-line-comment-B35kAUee.d.mts.map +1 -0
  82. package/dist/single-line-comment-VsK5yZdC.d.cts +23 -0
  83. package/dist/single-line-comment-VsK5yZdC.d.cts.map +1 -0
  84. package/dist/{source-file-MLTzYO0w.mjs → source-file-B5FSrvOa.mjs} +2 -2
  85. package/dist/{source-file-MLTzYO0w.mjs.map → source-file-B5FSrvOa.mjs.map} +1 -1
  86. package/dist/{source-file-ZzGhiuHr.d.cts → source-file-BsjyDo3Z.d.cts} +3 -3
  87. package/dist/source-file-BsjyDo3Z.d.cts.map +1 -0
  88. package/dist/{source-file-BCcq9Me3.cjs → source-file-C8ntga6V.cjs} +1 -1
  89. package/dist/source-file-ChbaAOt8.d.mts +33 -0
  90. package/dist/{source-file-ZzGhiuHr.d.cts.map → source-file-ChbaAOt8.d.mts.map} +1 -1
  91. package/dist/tsdoc-BpOXtq0v.d.cts.map +1 -1
  92. package/dist/{tsdoc-BufL8muf.cjs → tsdoc-fSRc8v2O.cjs} +1 -1
  93. package/dist/{tsdoc-DB1Qzwsn.mjs → tsdoc-prhuuYav.mjs} +2 -2
  94. package/dist/{tsdoc-DB1Qzwsn.mjs.map → tsdoc-prhuuYav.mjs.map} +1 -1
  95. package/dist/{tsdoc-reflection-BrqOulOQ.d.cts → tsdoc-reflection-BGmCcaYs.d.cts} +5 -5
  96. package/dist/{tsdoc-reflection-BOeS3c66.d.mts.map → tsdoc-reflection-BGmCcaYs.d.cts.map} +1 -1
  97. package/dist/{tsdoc-reflection-BOeS3c66.d.mts → tsdoc-reflection-B_mvCfkF.d.mts} +5 -5
  98. package/dist/{tsdoc-reflection-DU6zoCVk.d.cts.map → tsdoc-reflection-B_mvCfkF.d.mts.map} +1 -1
  99. package/dist/{tsdoc-reflection-Cov5Qh1c.cjs → tsdoc-reflection-BpkFCXw6.cjs} +1 -1
  100. package/dist/{tsdoc-reflection-BcTrWAwt.mjs → tsdoc-reflection-CQX-iDtz.mjs} +2 -2
  101. package/dist/{tsdoc-reflection-BcTrWAwt.mjs.map → tsdoc-reflection-CQX-iDtz.mjs.map} +1 -1
  102. package/dist/{tsdoc-reflection-DU6zoCVk.d.cts → tsdoc-reflection-DpF0t1Xj.d.cts} +5 -5
  103. package/dist/{tsdoc-reflection-BrqOulOQ.d.cts.map → tsdoc-reflection-DpF0t1Xj.d.cts.map} +1 -1
  104. package/dist/typescript/components/builtin-file.cjs +6 -6
  105. package/dist/typescript/components/builtin-file.mjs +6 -6
  106. package/dist/typescript/components/dynamic-import-statement.d.cts +1 -1
  107. package/dist/typescript/components/entry-file.cjs +5 -5
  108. package/dist/typescript/components/entry-file.d.cts +1 -1
  109. package/dist/typescript/components/entry-file.d.mts +1 -1
  110. package/dist/typescript/components/entry-file.mjs +5 -5
  111. package/dist/typescript/components/index.cjs +10 -10
  112. package/dist/typescript/components/index.d.cts +5 -5
  113. package/dist/typescript/components/index.d.mts +4 -4
  114. package/dist/typescript/components/index.mjs +10 -10
  115. package/dist/typescript/components/tsdoc-reflection.cjs +3 -3
  116. package/dist/typescript/components/tsdoc-reflection.d.cts +1 -1
  117. package/dist/typescript/components/tsdoc-reflection.d.mts +1 -1
  118. package/dist/typescript/components/tsdoc-reflection.mjs +3 -3
  119. package/dist/typescript/components/tsdoc.cjs +2 -2
  120. package/dist/typescript/components/tsdoc.mjs +2 -2
  121. package/dist/typescript/components/typescript-file.cjs +4 -4
  122. package/dist/typescript/components/typescript-file.mjs +4 -4
  123. package/dist/typescript/components/typescript-interface.cjs +4 -4
  124. package/dist/typescript/components/typescript-interface.d.cts +1 -1
  125. package/dist/typescript/components/typescript-interface.d.mts +1 -1
  126. package/dist/typescript/components/typescript-interface.mjs +4 -4
  127. package/dist/typescript/components/typescript-object.cjs +4 -4
  128. package/dist/typescript/components/typescript-object.d.cts +1 -1
  129. package/dist/typescript/components/typescript-object.d.mts +1 -1
  130. package/dist/typescript/components/typescript-object.mjs +4 -4
  131. package/dist/typescript/index.cjs +10 -10
  132. package/dist/typescript/index.d.cts +5 -5
  133. package/dist/typescript/index.d.mts +4 -4
  134. package/dist/typescript/index.mjs +10 -10
  135. package/dist/{typescript-file-BqsB2ASG.d.cts → typescript-file-C-JfXPBj.d.cts} +2 -2
  136. package/dist/{typescript-file-BqsB2ASG.d.cts.map → typescript-file-C-JfXPBj.d.cts.map} +1 -1
  137. package/dist/{typescript-file-DJy5gCL9.mjs → typescript-file-CNCLRiyf.mjs} +3 -3
  138. package/dist/{typescript-file-DJy5gCL9.mjs.map → typescript-file-CNCLRiyf.mjs.map} +1 -1
  139. package/dist/{typescript-file-D8ACLdIR.cjs → typescript-file-DKYD5v5W.cjs} +2 -2
  140. package/dist/typescript-file-uSWR-Uzq.d.mts +50 -0
  141. package/dist/typescript-file-uSWR-Uzq.d.mts.map +1 -0
  142. package/dist/{typescript-interface-CGQ0pwib.mjs → typescript-interface-BnRXH_zM.mjs} +2 -2
  143. package/dist/{typescript-interface-CGQ0pwib.mjs.map → typescript-interface-BnRXH_zM.mjs.map} +1 -1
  144. package/dist/{typescript-interface-CTyDcMdt.d.mts → typescript-interface-C1n8sI7E.d.mts} +4 -4
  145. package/dist/{typescript-interface-CTyDcMdt.d.mts.map → typescript-interface-C1n8sI7E.d.mts.map} +1 -1
  146. package/dist/{typescript-interface-Q4trMyzm.cjs → typescript-interface-DC2d5S0V.cjs} +1 -1
  147. package/dist/typescript-interface-DX0WJLCa.d.mts +26 -0
  148. package/dist/{typescript-interface-Xgm71cgZ.d.cts.map → typescript-interface-DX0WJLCa.d.mts.map} +1 -1
  149. package/dist/{typescript-interface-Xgm71cgZ.d.cts → typescript-interface-LTD6nhQZ.d.cts} +4 -4
  150. package/dist/typescript-interface-LTD6nhQZ.d.cts.map +1 -0
  151. package/dist/{typescript-object-DSdGl3Ha.d.cts → typescript-object-BHwyh1vl.d.cts} +4 -4
  152. package/dist/{typescript-object-B_md46Hq.d.cts.map → typescript-object-BHwyh1vl.d.cts.map} +1 -1
  153. package/dist/{typescript-object-B_md46Hq.d.cts → typescript-object-BeOv-T9D.d.cts} +4 -4
  154. package/dist/{typescript-object-DSdGl3Ha.d.cts.map → typescript-object-BeOv-T9D.d.cts.map} +1 -1
  155. package/dist/{typescript-object-DHFnCfRa.cjs → typescript-object-CGjPvsYM.cjs} +1 -1
  156. package/dist/{typescript-object-L2Zn4zbB.d.mts → typescript-object-DK3sl8cB.d.mts} +4 -4
  157. package/dist/{typescript-object-L2Zn4zbB.d.mts.map → typescript-object-DK3sl8cB.d.mts.map} +1 -1
  158. package/dist/{typescript-object-B0R92yL7.mjs → typescript-object-Dhr7lMRV.mjs} +2 -2
  159. package/dist/{typescript-object-B0R92yL7.mjs.map → typescript-object-Dhr7lMRV.mjs.map} +1 -1
  160. package/dist/typescript-object-zP6NWofT.d.mts +30 -0
  161. package/dist/typescript-object-zP6NWofT.d.mts.map +1 -0
  162. package/package.json +2 -2
  163. package/dist/front-matter-BdXzBycV.d.cts +0 -16
  164. package/dist/front-matter-D_wSuNkq.d.cts.map +0 -1
  165. package/dist/markdown-file-DD1Uc7fZ.d.cts.map +0 -1
  166. package/dist/markdown-table-BPAguEBC.d.cts.map +0 -1
  167. /package/dist/{context-DNdlL_gp.cjs → context-D-lZVHpZ.cjs} +0 -0
  168. /package/dist/{meta-BjTflizw.cjs → meta-CBKMGDr1.cjs} +0 -0
@@ -1,6 +1,6 @@
1
- import { i as usePowerlinesSafe } from "./context-CdPajCh6.mjs";
2
- import { d as TSDocModule } from "./tsdoc-DB1Qzwsn.mjs";
3
- import { n as TypescriptFileHeader, r as TypescriptFileHeaderImports, t as TypescriptFile } from "./typescript-file-DJy5gCL9.mjs";
1
+ import { i as usePowerlinesSafe } from "./context-BaVJCPfX.mjs";
2
+ import { d as TSDocModule } from "./tsdoc-prhuuYav.mjs";
3
+ import { n as TypescriptFileHeader, r as TypescriptFileHeaderImports, t as TypescriptFile } from "./typescript-file-CNCLRiyf.mjs";
4
4
  import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
5
5
  import { computed, splitProps } from "@alloy-js/core";
6
6
  import { hasFileExtension } from "@stryke/path/file-path-fns";
@@ -59,4 +59,4 @@ function BuiltinFile(props) {
59
59
 
60
60
  //#endregion
61
61
  export { BuiltinFile as t };
62
- //# sourceMappingURL=builtin-file-uzudbU6M.mjs.map
62
+ //# sourceMappingURL=builtin-file-B8Y36s1a.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-file-uzudbU6M.mjs","names":["computed","splitProps","hasFileExtension","replaceExtension","replacePath","isSet","usePowerlinesSafe","TSDocModule","TypescriptFile","TypescriptFileHeader","TypescriptFileHeaderImports","BuiltinFile","props","children","imports","builtinImports","id","description","tsx","rest","context","path","builtinsPath","_$createComponent","_$mergeProps","header","name","meta","kind","extension","value"],"sources":["../src/typescript/components/builtin-file.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 { computed, splitProps } from \"@alloy-js/core\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport type { TSDocModuleProps } from \"./tsdoc\";\nimport { TSDocModule } from \"./tsdoc\";\nimport {\n TypescriptFile,\n TypescriptFileHeader,\n TypescriptFileHeaderImports,\n TypescriptFileProps\n} from \"./typescript-file\";\n\nexport type BuiltinFileProps = Omit<TypescriptFileProps, \"path\"> &\n Omit<TSDocModuleProps, \"name\"> & {\n /**\n * The runtime module identifier.\n *\n * @remarks\n * This value will be included after the \\`storm:\\` prefix in the import statement.\n */\n id: string;\n\n /**\n * The description for the builtin module.\n */\n description?: string;\n\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n };\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function BuiltinFile(props: BuiltinFileProps) {\n const [{ children, imports, builtinImports, id, description, tsx }, rest] =\n splitProps(props, [\n \"children\",\n \"imports\",\n \"builtinImports\",\n \"id\",\n \"description\",\n \"tsx\"\n ]);\n\n const context = usePowerlinesSafe();\n const path = computed(() =>\n replacePath(\n `${!isSet(tsx) ? id : replaceExtension(id)}${\n hasFileExtension(id) && !isSet(tsx) ? \"\" : tsx ? \".tsx\" : \".ts\"\n }`,\n context?.builtinsPath\n )\n );\n\n return (\n <TypescriptFile\n header={\n <TypescriptFileHeader\n header={<TSDocModule name={id}>{description}</TSDocModule>}>\n <TypescriptFileHeaderImports\n imports={imports}\n builtinImports={builtinImports}\n />\n </TypescriptFileHeader>\n }\n meta={{\n kind: \"builtin\",\n extension: tsx ? \"tsx\" : \"ts\",\n id: replaceExtension(id)\n }}\n {...rest}\n path={path.value}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":""}
1
+ {"version":3,"file":"builtin-file-B8Y36s1a.mjs","names":["computed","splitProps","hasFileExtension","replaceExtension","replacePath","isSet","usePowerlinesSafe","TSDocModule","TypescriptFile","TypescriptFileHeader","TypescriptFileHeaderImports","BuiltinFile","props","children","imports","builtinImports","id","description","tsx","rest","context","path","builtinsPath","_$createComponent","_$mergeProps","header","name","meta","kind","extension","value"],"sources":["../src/typescript/components/builtin-file.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 { computed, splitProps } from \"@alloy-js/core\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport type { TSDocModuleProps } from \"./tsdoc\";\nimport { TSDocModule } from \"./tsdoc\";\nimport {\n TypescriptFile,\n TypescriptFileHeader,\n TypescriptFileHeaderImports,\n TypescriptFileProps\n} from \"./typescript-file\";\n\nexport type BuiltinFileProps = Omit<TypescriptFileProps, \"path\"> &\n Omit<TSDocModuleProps, \"name\"> & {\n /**\n * The runtime module identifier.\n *\n * @remarks\n * This value will be included after the \\`storm:\\` prefix in the import statement.\n */\n id: string;\n\n /**\n * The description for the builtin module.\n */\n description?: string;\n\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n };\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function BuiltinFile(props: BuiltinFileProps) {\n const [{ children, imports, builtinImports, id, description, tsx }, rest] =\n splitProps(props, [\n \"children\",\n \"imports\",\n \"builtinImports\",\n \"id\",\n \"description\",\n \"tsx\"\n ]);\n\n const context = usePowerlinesSafe();\n const path = computed(() =>\n replacePath(\n `${!isSet(tsx) ? id : replaceExtension(id)}${\n hasFileExtension(id) && !isSet(tsx) ? \"\" : tsx ? \".tsx\" : \".ts\"\n }`,\n context?.builtinsPath\n )\n );\n\n return (\n <TypescriptFile\n header={\n <TypescriptFileHeader\n header={<TSDocModule name={id}>{description}</TSDocModule>}>\n <TypescriptFileHeaderImports\n imports={imports}\n builtinImports={builtinImports}\n />\n </TypescriptFileHeader>\n }\n meta={{\n kind: \"builtin\",\n extension: tsx ? \"tsx\" : \"ts\",\n id: replaceExtension(id)\n }}\n {...rest}\n path={path.value}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":""}
@@ -0,0 +1,35 @@
1
+ import { h as TSDocModuleProps } from "./tsdoc-CwqGhmLe.mjs";
2
+ import { o as TypescriptFileProps } from "./typescript-file-uSWR-Uzq.mjs";
3
+ import * as _alloy_js_core17 from "@alloy-js/core";
4
+
5
+ //#region src/typescript/components/builtin-file.d.ts
6
+ type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
7
+ /**
8
+ * The runtime module identifier.
9
+ *
10
+ * @remarks
11
+ * This value will be included after the \`storm:\` prefix in the import statement.
12
+ */
13
+ id: string;
14
+ /**
15
+ * The description for the builtin module.
16
+ */
17
+ description?: string;
18
+ /**
19
+ * Whether the file is a TSX file.
20
+ *
21
+ * @defaultValue false
22
+ */
23
+ tsx?: boolean;
24
+ };
25
+ /**
26
+ * A base component representing a Powerlines generated Typescript source file.
27
+ *
28
+ * @param props - The properties for the source file.
29
+ * @returns The rendered source file component.
30
+ */
31
+ declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core17.Children;
32
+ declare type __ΩBuiltinFileProps = any[];
33
+ //#endregion
34
+ export { BuiltinFileProps as n, __ΩBuiltinFileProps as r, BuiltinFile as t };
35
+ //# sourceMappingURL=builtin-file-BDHvdI1i.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-file-Sx0sbgXZ.d.cts","names":[],"sources":["../src/typescript/components/builtin-file.tsx"],"sourcesContent":[],"mappings":";;;;;KAgCY,gBAAA,GAAmB,KAAK,+BAClC,KAAK;;;AADP;;;;EACE,EAAA,EAAA,MAAA;EAAI;AA4BN;;;;;;;;;;;;;;;;iBAAgB,WAAA,QAAmB,mBAAgB,gBAAA,CAAA"}
1
+ {"version":3,"file":"builtin-file-BDHvdI1i.d.mts","names":[],"sources":["../src/typescript/components/builtin-file.tsx"],"sourcesContent":[],"mappings":";;;;;KAgCY,gBAAA,GAAmB,KAAK,+BAClC,KAAK;;;AADP;;;;EACE,EAAA,EAAA,MAAA;EAAI;AA4BN;;;;;;;;;;;;;;;;iBAAgB,WAAA,QAAmB,mBAAgB,gBAAA,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { h as TSDocModuleProps } from "./tsdoc-BpOXtq0v.cjs";
2
- import { o as TypescriptFileProps } from "./typescript-file-BqsB2ASG.cjs";
3
- import * as _alloy_js_core14 from "@alloy-js/core";
2
+ import { o as TypescriptFileProps } from "./typescript-file-C-JfXPBj.cjs";
3
+ import * as _alloy_js_core13 from "@alloy-js/core";
4
4
 
5
5
  //#region src/typescript/components/builtin-file.d.ts
6
6
  type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
@@ -28,8 +28,8 @@ type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProp
28
28
  * @param props - The properties for the source file.
29
29
  * @returns The rendered source file component.
30
30
  */
31
- declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core14.Children;
31
+ declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core13.Children;
32
32
  declare type __ΩBuiltinFileProps = any[];
33
33
  //#endregion
34
34
  export { BuiltinFileProps as n, __ΩBuiltinFileProps as r, BuiltinFile as t };
35
- //# sourceMappingURL=builtin-file-Sx0sbgXZ.d.cts.map
35
+ //# sourceMappingURL=builtin-file-Bf0byhqY.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-file-Bf0byhqY.d.cts","names":[],"sources":["../src/typescript/components/builtin-file.tsx"],"sourcesContent":[],"mappings":";;;;;KAgCY,gBAAA,GAAmB,KAAK,+BAClC,KAAK;;;AADP;;;;EACE,EAAA,EAAA,MAAA;EAAI;AA4BN;;;;;;;;;;;;;;;;iBAAgB,WAAA,QAAmB,mBAAgB,gBAAA,CAAA"}
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./chunk-CbDLau6x.cjs');
2
- const require_context = require('./context-DNdlL_gp.cjs');
3
- const require_tsdoc = require('./tsdoc-BufL8muf.cjs');
4
- const require_typescript_file = require('./typescript-file-D8ACLdIR.cjs');
2
+ const require_context = require('./context-D-lZVHpZ.cjs');
3
+ const require_tsdoc = require('./tsdoc-fSRc8v2O.cjs');
4
+ const require_typescript_file = require('./typescript-file-DKYD5v5W.cjs');
5
5
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
6
6
  let __alloy_js_core = require("@alloy-js/core");
7
7
  let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
@@ -34,4 +34,4 @@ function usePowerlines() {
34
34
 
35
35
  //#endregion
36
36
  export { usePowerlinesSafe as i, usePowerlines as n, usePowerlinesContext as r, PowerlinesContext as t };
37
- //# sourceMappingURL=context-CdPajCh6.mjs.map
37
+ //# sourceMappingURL=context-BaVJCPfX.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-CdPajCh6.mjs","names":["createNamedContext","useContext","PowerlinesContext","usePowerlinesContext","usePowerlinesSafe","powerlines","undefined","usePowerlines","Error"],"sources":["../src/core/contexts/context.ts"],"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 {\n ComponentContext,\n createNamedContext,\n useContext\n} from \"@alloy-js/core\";\nimport type { PluginContext } from \"powerlines/types/context\";\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const PowerlinesContext: ComponentContext<PluginContext> =\n createNamedContext<PluginContext>(\"Powerlines\");\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function usePowerlinesContext<\n TContext extends PluginContext = PluginContext\n>(): TContext | undefined {\n return useContext(PowerlinesContext) as TContext | undefined;\n}\n\n/**\n * Hook to safely access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context or undefined if not set.\n */\nexport function usePowerlinesSafe<\n TContext extends PluginContext = PluginContext\n>(): TContext | undefined {\n const powerlines = usePowerlinesContext<TContext>();\n\n return powerlines ?? undefined;\n}\n\n/**\n * Hook to access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context.\n */\nexport function usePowerlines<\n TContext extends PluginContext = PluginContext\n>(): TContext {\n const powerlines = usePowerlinesSafe<TContext>();\n if (!powerlines) {\n throw new Error(\n \"Powerlines - Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return powerlines;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"context-BaVJCPfX.mjs","names":["createNamedContext","useContext","PowerlinesContext","usePowerlinesContext","usePowerlinesSafe","powerlines","undefined","usePowerlines","Error"],"sources":["../src/core/contexts/context.ts"],"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 {\n ComponentContext,\n createNamedContext,\n useContext\n} from \"@alloy-js/core\";\nimport type { PluginContext } from \"powerlines/types/context\";\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const PowerlinesContext: ComponentContext<PluginContext> =\n createNamedContext<PluginContext>(\"Powerlines\");\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function usePowerlinesContext<\n TContext extends PluginContext = PluginContext\n>(): TContext | undefined {\n return useContext(PowerlinesContext) as TContext | undefined;\n}\n\n/**\n * Hook to safely access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context or undefined if not set.\n */\nexport function usePowerlinesSafe<\n TContext extends PluginContext = PluginContext\n>(): TContext | undefined {\n const powerlines = usePowerlinesContext<TContext>();\n\n return powerlines ?? undefined;\n}\n\n/**\n * Hook to access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context.\n */\nexport function usePowerlines<\n TContext extends PluginContext = PluginContext\n>(): TContext {\n const powerlines = usePowerlinesSafe<TContext>();\n if (!powerlines) {\n throw new Error(\n \"Powerlines - Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return powerlines;\n}\n"],"mappings":""}
@@ -1,8 +1,8 @@
1
- require('../../context-DNdlL_gp.cjs');
2
- const require_output = require('../../output-B52VAyyC.cjs');
3
- require('../../meta-BjTflizw.cjs');
1
+ require('../../meta-CBKMGDr1.cjs');
2
+ require('../../context-D-lZVHpZ.cjs');
3
+ const require_output = require('../../output-Ck9L8v3E.cjs');
4
4
  const require_single_line_comment = require('../../single-line-comment-DvU69OGj.cjs');
5
- const require_source_file = require('../../source-file-BCcq9Me3.cjs');
5
+ const require_source_file = require('../../source-file-C8ntga6V.cjs');
6
6
  require('../../components-BYyc8-6U.cjs');
7
7
 
8
8
  exports.Output = require_output.Output;
@@ -1,8 +1,8 @@
1
- import "../../context-CdPajCh6.mjs";
2
- import { t as Output } from "../../output-CPbwcL2j.mjs";
3
- import "../../meta-D0pfCtdR.mjs";
1
+ import "../../meta-BuwJuxY9.mjs";
2
+ import "../../context-BaVJCPfX.mjs";
3
+ import { t as Output } from "../../output-BehYSTRr.mjs";
4
4
  import { t as SingleLineComment } from "../../single-line-comment-MRVbskt3.mjs";
5
- import { t as SourceFile } from "../../source-file-MLTzYO0w.mjs";
5
+ import { t as SourceFile } from "../../source-file-B5FSrvOa.mjs";
6
6
  import "../../components-pztyf7qk.mjs";
7
7
 
8
8
  export { Output, SingleLineComment, SourceFile };
@@ -1,4 +1,4 @@
1
- require('../../context-DNdlL_gp.cjs');
2
- const require_output = require('../../output-B52VAyyC.cjs');
1
+ require('../../context-D-lZVHpZ.cjs');
2
+ const require_output = require('../../output-Ck9L8v3E.cjs');
3
3
 
4
4
  exports.Output = require_output.Output;
@@ -1,4 +1,4 @@
1
- import "../../context-CdPajCh6.mjs";
2
- import { t as Output } from "../../output-CPbwcL2j.mjs";
1
+ import "../../context-BaVJCPfX.mjs";
2
+ import { t as Output } from "../../output-BehYSTRr.mjs";
3
3
 
4
4
  export { Output };
@@ -1,4 +1,4 @@
1
- require('../../meta-BjTflizw.cjs');
2
- const require_source_file = require('../../source-file-BCcq9Me3.cjs');
1
+ require('../../meta-CBKMGDr1.cjs');
2
+ const require_source_file = require('../../source-file-C8ntga6V.cjs');
3
3
 
4
4
  exports.SourceFile = require_source_file.SourceFile;
@@ -1,4 +1,4 @@
1
- import "../../meta-D0pfCtdR.mjs";
2
- import { t as SourceFile } from "../../source-file-MLTzYO0w.mjs";
1
+ import "../../meta-BuwJuxY9.mjs";
2
+ import { t as SourceFile } from "../../source-file-B5FSrvOa.mjs";
3
3
 
4
4
  export { SourceFile };
@@ -1,4 +1,4 @@
1
- const require_context = require('../../context-DNdlL_gp.cjs');
1
+ const require_context = require('../../context-D-lZVHpZ.cjs');
2
2
 
3
3
  exports.PowerlinesContext = require_context.PowerlinesContext;
4
4
  exports.usePowerlines = require_context.usePowerlines;
@@ -1,3 +1,3 @@
1
- import { i as usePowerlinesSafe, n as usePowerlines, r as usePowerlinesContext, t as PowerlinesContext } from "../../context-CdPajCh6.mjs";
1
+ import { i as usePowerlinesSafe, n as usePowerlines, r as usePowerlinesContext, t as PowerlinesContext } from "../../context-BaVJCPfX.mjs";
2
2
 
3
3
  export { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
@@ -1,5 +1,5 @@
1
- const require_context = require('../../context-DNdlL_gp.cjs');
2
- const require_meta = require('../../meta-BjTflizw.cjs');
1
+ const require_meta = require('../../meta-CBKMGDr1.cjs');
2
+ const require_context = require('../../context-D-lZVHpZ.cjs');
3
3
  const require_reflection = require('../../reflection-BSrdR0Qz.cjs');
4
4
  require('../../contexts-Do5bLA7f.cjs');
5
5
 
@@ -1,5 +1,5 @@
1
- import { i as usePowerlinesSafe, n as usePowerlines, r as usePowerlinesContext, t as PowerlinesContext } from "../../context-CdPajCh6.mjs";
2
- import { i as useMetaSafe, n as useMeta, r as useMetaContext, t as MetaContext } from "../../meta-D0pfCtdR.mjs";
1
+ import { i as useMetaSafe, n as useMeta, r as useMetaContext, t as MetaContext } from "../../meta-BuwJuxY9.mjs";
2
+ import { i as usePowerlinesSafe, n as usePowerlines, r as usePowerlinesContext, t as PowerlinesContext } from "../../context-BaVJCPfX.mjs";
3
3
  import { a as useReflectionClass, c as useReflectionProperty, i as ReflectionPropertyContext, n as ReflectionMethodContext, o as useReflectionMethod, r as ReflectionParameterContext, s as useReflectionParameter, t as ReflectionClassContext } from "../../reflection-Btb1NqwS.mjs";
4
4
  import "../../contexts-oubuaPo0.mjs";
5
5
 
@@ -1,4 +1,4 @@
1
- const require_meta = require('../../meta-BjTflizw.cjs');
1
+ const require_meta = require('../../meta-CBKMGDr1.cjs');
2
2
 
3
3
  exports.MetaContext = require_meta.MetaContext;
4
4
  exports.useMeta = require_meta.useMeta;
@@ -1,3 +1,3 @@
1
- import { i as useMetaSafe, n as useMeta, r as useMetaContext, t as MetaContext } from "../../meta-D0pfCtdR.mjs";
1
+ import { i as useMetaSafe, n as useMeta, r as useMetaContext, t as MetaContext } from "../../meta-BuwJuxY9.mjs";
2
2
 
3
3
  export { MetaContext, useMeta, useMetaContext, useMetaSafe };
@@ -1,8 +1,8 @@
1
- const require_context = require('../context-DNdlL_gp.cjs');
2
- const require_output = require('../output-B52VAyyC.cjs');
3
- const require_meta = require('../meta-BjTflizw.cjs');
1
+ const require_meta = require('../meta-CBKMGDr1.cjs');
2
+ const require_context = require('../context-D-lZVHpZ.cjs');
3
+ const require_output = require('../output-Ck9L8v3E.cjs');
4
4
  const require_single_line_comment = require('../single-line-comment-DvU69OGj.cjs');
5
- const require_source_file = require('../source-file-BCcq9Me3.cjs');
5
+ const require_source_file = require('../source-file-C8ntga6V.cjs');
6
6
  require('../components-BYyc8-6U.cjs');
7
7
  const require_reflection = require('../reflection-BSrdR0Qz.cjs');
8
8
  require('../contexts-Do5bLA7f.cjs');
@@ -1,8 +1,8 @@
1
- import { i as usePowerlinesSafe, n as usePowerlines, r as usePowerlinesContext, t as PowerlinesContext } from "../context-CdPajCh6.mjs";
2
- import { t as Output } from "../output-CPbwcL2j.mjs";
3
- import { i as useMetaSafe, n as useMeta, r as useMetaContext, t as MetaContext } from "../meta-D0pfCtdR.mjs";
1
+ import { i as useMetaSafe, n as useMeta, r as useMetaContext, t as MetaContext } from "../meta-BuwJuxY9.mjs";
2
+ import { i as usePowerlinesSafe, n as usePowerlines, r as usePowerlinesContext, t as PowerlinesContext } from "../context-BaVJCPfX.mjs";
3
+ import { t as Output } from "../output-BehYSTRr.mjs";
4
4
  import { t as SingleLineComment } from "../single-line-comment-MRVbskt3.mjs";
5
- import { t as SourceFile } from "../source-file-MLTzYO0w.mjs";
5
+ import { t as SourceFile } from "../source-file-B5FSrvOa.mjs";
6
6
  import "../components-pztyf7qk.mjs";
7
7
  import { a as useReflectionClass, c as useReflectionProperty, i as ReflectionPropertyContext, n as ReflectionMethodContext, o as useReflectionMethod, r as ReflectionParameterContext, s as useReflectionParameter, t as ReflectionClassContext } from "../reflection-Btb1NqwS.mjs";
8
8
  import "../contexts-oubuaPo0.mjs";
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core2 from "@alloy-js/core";
1
+ import * as _alloy_js_core10 from "@alloy-js/core";
2
2
  import { VarDeclarationProps } from "@alloy-js/typescript";
3
3
 
4
4
  //#region src/typescript/components/dynamic-import-statement.d.ts
@@ -26,8 +26,8 @@ interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initial
26
26
  * @param props - The properties for the dynamic import statement.
27
27
  * @returns A `VarDeclaration` component representing the dynamic import statement.
28
28
  */
29
- declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core2.Children;
29
+ declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core10.Children;
30
30
  declare type __ΩDynamicImportStatementProps = any[];
31
31
  //#endregion
32
32
  export { DynamicImportStatementProps as n, __ΩDynamicImportStatementProps as r, DynamicImportStatement as t };
33
- //# sourceMappingURL=dynamic-import-statement-CkTDZa9C.d.cts.map
33
+ //# sourceMappingURL=dynamic-import-statement-C142NY9L.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-import-statement-CkTDZa9C.d.cts","names":[],"sources":["../src/typescript/components/dynamic-import-statement.tsx"],"sourcesContent":[],"mappings":";;;;UAqBiB,2BAAA,SAAoC,KACnD;;;AADF;EA6BgB,UAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;iBAAA,sBAAA,QAA8B,8BAA2B,eAAA,CAAA"}
1
+ {"version":3,"file":"dynamic-import-statement-C142NY9L.d.cts","names":[],"sources":["../src/typescript/components/dynamic-import-statement.tsx"],"sourcesContent":[],"mappings":";;;;UAqBiB,2BAAA,SAAoC,KACnD;;;AADF;EA6BgB,UAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;iBAAA,sBAAA,QAA8B,8BAA2B,gBAAA,CAAA"}
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./chunk-CbDLau6x.cjs');
2
- const require_context = require('./context-DNdlL_gp.cjs');
3
- const require_typescript_file = require('./typescript-file-D8ACLdIR.cjs');
2
+ const require_context = require('./context-D-lZVHpZ.cjs');
3
+ const require_typescript_file = require('./typescript-file-DKYD5v5W.cjs');
4
4
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
5
  let __alloy_js_core = require("@alloy-js/core");
6
6
  let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
@@ -1,5 +1,5 @@
1
1
  import { o as TypescriptFileProps } from "./typescript-file-BqamPJcI.cjs";
2
- import * as _alloy_js_core3 from "@alloy-js/core";
2
+ import * as _alloy_js_core14 from "@alloy-js/core";
3
3
  import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
4
4
 
5
5
  //#region src/typescript/components/entry-file.d.ts
@@ -21,8 +21,8 @@ type EntryFileProps = TypescriptFileProps & {
21
21
  * @param props - The properties for the source file.
22
22
  * @returns The rendered source file component.
23
23
  */
24
- declare function EntryFile(props: EntryFileProps): _alloy_js_core3.Children;
24
+ declare function EntryFile(props: EntryFileProps): _alloy_js_core14.Children;
25
25
  declare type __ΩEntryFileProps = any[];
26
26
  //#endregion
27
27
  export { EntryFileProps as n, __ΩEntryFileProps as r, EntryFile as t };
28
- //# sourceMappingURL=entry-file-CI22kUBs.d.cts.map
28
+ //# sourceMappingURL=entry-file-CHSinjc8.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entry-file-6OSh_HPP.d.mts","names":[],"sources":["../src/typescript/components/entry-file.tsx"],"sourcesContent":[],"mappings":";;;;;KA4BY,cAAA,GAAiB;;;AAA7B;AAoBA;;;;;;mBATmB;;;;;;;;iBASH,SAAA,QAAiB,iBAAc,gBAAA,CAAA"}
1
+ {"version":3,"file":"entry-file-CHSinjc8.d.cts","names":[],"sources":["../src/typescript/components/entry-file.tsx"],"sourcesContent":[],"mappings":";;;;;KA4BY,cAAA,GAAiB;;;AAA7B;AAoBA;;;;;;mBATmB;;;;;;;;iBASH,SAAA,QAAiB,iBAAc,gBAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import { o as TypescriptFileProps } from "./typescript-file-BqsB2ASG.cjs";
1
+ import { o as TypescriptFileProps } from "./typescript-file-C-JfXPBj.cjs";
2
2
  import * as _alloy_js_core9 from "@alloy-js/core";
3
3
  import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
4
4
 
@@ -25,4 +25,4 @@ declare function EntryFile(props: EntryFileProps): _alloy_js_core9.Children;
25
25
  declare type __ΩEntryFileProps = any[];
26
26
  //#endregion
27
27
  export { EntryFileProps as n, __ΩEntryFileProps as r, EntryFile as t };
28
- //# sourceMappingURL=entry-file-DW7QEqXv.d.cts.map
28
+ //# sourceMappingURL=entry-file-DlyBq92D.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entry-file-CI22kUBs.d.cts","names":[],"sources":["../src/typescript/components/entry-file.tsx"],"sourcesContent":[],"mappings":";;;;;KA4BY,cAAA,GAAiB;;;AAA7B;AAoBA;;;;;;mBATmB;;;;;;;;iBASH,SAAA,QAAiB,iBAAc,eAAA,CAAA"}
1
+ {"version":3,"file":"entry-file-DlyBq92D.d.cts","names":[],"sources":["../src/typescript/components/entry-file.tsx"],"sourcesContent":[],"mappings":";;;;;KA4BY,cAAA,GAAiB;;;AAA7B;AAoBA;;;;;;mBATmB;;;;;;;;iBASH,SAAA,QAAiB,iBAAc,eAAA,CAAA"}
@@ -1,5 +1,5 @@
1
- import { i as usePowerlinesSafe } from "./context-CdPajCh6.mjs";
2
- import { t as TypescriptFile } from "./typescript-file-DJy5gCL9.mjs";
1
+ import { i as usePowerlinesSafe } from "./context-BaVJCPfX.mjs";
2
+ import { t as TypescriptFile } from "./typescript-file-CNCLRiyf.mjs";
3
3
  import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
4
4
  import { computed, splitProps } from "@alloy-js/core";
5
5
  import { hasFileExtension } from "@stryke/path/file-path-fns";
@@ -38,4 +38,4 @@ function EntryFile(props) {
38
38
 
39
39
  //#endregion
40
40
  export { EntryFile as t };
41
- //# sourceMappingURL=entry-file-BwAnSku3.mjs.map
41
+ //# sourceMappingURL=entry-file-DzlSog-0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"entry-file-BwAnSku3.mjs","names":["computed","splitProps","appendPath","hasFileExtension","replaceExtension","replacePath","isSet","defu","usePowerlinesSafe","TypescriptFile","EntryFile","props","children","meta","tsx","path","typeDefinition","rest","context","fullPath","entryPath","workspaceConfig","workspaceRoot","_$createComponent","_$mergeProps","value","kind"],"sources":["../src/typescript/components/entry-file.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 { computed, splitProps } from \"@alloy-js/core\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport defu from \"defu\";\nimport { ResolvedEntryTypeDefinition } from \"powerlines/types/resolved\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { TypescriptFile, TypescriptFileProps } from \"./typescript-file\";\n\nexport type EntryFileProps = TypescriptFileProps & {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n\n /**\n * Render metadata information about the entrypoint\n */\n typeDefinition?: ResolvedEntryTypeDefinition;\n};\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function EntryFile(props: EntryFileProps) {\n const [{ children, meta, tsx, path, typeDefinition }, rest] = splitProps(\n props,\n [\"children\", \"meta\", \"tsx\", \"path\", \"typeDefinition\"]\n );\n\n const context = usePowerlinesSafe();\n const fullPath = computed(() =>\n context\n ? appendPath(\n `${\n !isSet(tsx) ? path : replaceExtension(path)\n }${tsx ? \".tsx\" : hasFileExtension(path) ? \"\" : \".ts\"}`,\n replacePath(context.entryPath, context.workspaceConfig.workspaceRoot)\n )\n : path\n );\n\n return (\n <TypescriptFile\n {...rest}\n path={fullPath.value}\n meta={defu(\n {\n kind: \"entry\"\n },\n meta ?? {},\n {\n typeDefinition\n }\n )}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":""}
1
+ {"version":3,"file":"entry-file-DzlSog-0.mjs","names":["computed","splitProps","appendPath","hasFileExtension","replaceExtension","replacePath","isSet","defu","usePowerlinesSafe","TypescriptFile","EntryFile","props","children","meta","tsx","path","typeDefinition","rest","context","fullPath","entryPath","workspaceConfig","workspaceRoot","_$createComponent","_$mergeProps","value","kind"],"sources":["../src/typescript/components/entry-file.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 { computed, splitProps } from \"@alloy-js/core\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport defu from \"defu\";\nimport { ResolvedEntryTypeDefinition } from \"powerlines/types/resolved\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { TypescriptFile, TypescriptFileProps } from \"./typescript-file\";\n\nexport type EntryFileProps = TypescriptFileProps & {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n\n /**\n * Render metadata information about the entrypoint\n */\n typeDefinition?: ResolvedEntryTypeDefinition;\n};\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function EntryFile(props: EntryFileProps) {\n const [{ children, meta, tsx, path, typeDefinition }, rest] = splitProps(\n props,\n [\"children\", \"meta\", \"tsx\", \"path\", \"typeDefinition\"]\n );\n\n const context = usePowerlinesSafe();\n const fullPath = computed(() =>\n context\n ? appendPath(\n `${\n !isSet(tsx) ? path : replaceExtension(path)\n }${tsx ? \".tsx\" : hasFileExtension(path) ? \"\" : \".ts\"}`,\n replacePath(context.entryPath, context.workspaceConfig.workspaceRoot)\n )\n : path\n );\n\n return (\n <TypescriptFile\n {...rest}\n path={fullPath.value}\n meta={defu(\n {\n kind: \"entry\"\n },\n meta ?? {},\n {\n typeDefinition\n }\n )}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":""}
@@ -1,5 +1,5 @@
1
- import { o as TypescriptFileProps } from "./typescript-file-dsHm_Y5Y.mjs";
2
- import * as _alloy_js_core12 from "@alloy-js/core";
1
+ import { o as TypescriptFileProps } from "./typescript-file-uSWR-Uzq.mjs";
2
+ import * as _alloy_js_core11 from "@alloy-js/core";
3
3
  import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
4
4
 
5
5
  //#region src/typescript/components/entry-file.d.ts
@@ -21,8 +21,8 @@ type EntryFileProps = TypescriptFileProps & {
21
21
  * @param props - The properties for the source file.
22
22
  * @returns The rendered source file component.
23
23
  */
24
- declare function EntryFile(props: EntryFileProps): _alloy_js_core12.Children;
24
+ declare function EntryFile(props: EntryFileProps): _alloy_js_core11.Children;
25
25
  declare type __ΩEntryFileProps = any[];
26
26
  //#endregion
27
27
  export { EntryFileProps as n, __ΩEntryFileProps as r, EntryFile as t };
28
- //# sourceMappingURL=entry-file-6OSh_HPP.d.mts.map
28
+ //# sourceMappingURL=entry-file-RCTtBe-Z.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entry-file-DW7QEqXv.d.cts","names":[],"sources":["../src/typescript/components/entry-file.tsx"],"sourcesContent":[],"mappings":";;;;;KA4BY,cAAA,GAAiB;;;AAA7B;AAoBA;;;;;;mBATmB;;;;;;;;iBASH,SAAA,QAAiB,iBAAc,eAAA,CAAA"}
1
+ {"version":3,"file":"entry-file-RCTtBe-Z.d.mts","names":[],"sources":["../src/typescript/components/entry-file.tsx"],"sourcesContent":[],"mappings":";;;;;KA4BY,cAAA,GAAiB;;;AAA7B;AAoBA;;;;;;mBATmB;;;;;;;;iBASH,SAAA,QAAiB,iBAAc,gBAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core5 from "@alloy-js/core";
1
+ import * as _alloy_js_core6 from "@alloy-js/core";
2
2
 
3
3
  //#region src/markdown/components/front-matter.d.ts
4
4
  interface FrontMatterProps {
@@ -9,8 +9,8 @@ interface FrontMatterProps {
9
9
  *
10
10
  * @see https://jekyllrb.com/docs/front-matter/
11
11
  */
12
- declare function FrontMatter(props: FrontMatterProps): _alloy_js_core5.Children;
12
+ declare function FrontMatter(props: FrontMatterProps): _alloy_js_core6.Children;
13
13
  declare type __ΩFrontMatterProps = any[];
14
14
  //#endregion
15
15
  export { FrontMatterProps as n, __ΩFrontMatterProps as r, FrontMatter as t };
16
- //# sourceMappingURL=front-matter-DNU08CaL.d.mts.map
16
+ //# sourceMappingURL=front-matter-BxgmGhju.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"front-matter-DNU08CaL.d.mts","names":[],"sources":["../src/markdown/components/front-matter.tsx"],"sourcesContent":[],"mappings":";;;UAoBiB,gBAAA;QACT;;AADR;AASA;;;;iBAAgB,WAAA,QAAmB,mBAAgB,eAAA,CAAA"}
1
+ {"version":3,"file":"front-matter-BxgmGhju.d.cts","names":[],"sources":["../src/markdown/components/front-matter.tsx"],"sourcesContent":[],"mappings":";;;UAoBiB,gBAAA;QACT;;AADR;AASA;;;;iBAAgB,WAAA,QAAmB,mBAAgB,eAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core17 from "@alloy-js/core";
1
+ import * as _alloy_js_core7 from "@alloy-js/core";
2
2
 
3
3
  //#region src/markdown/components/front-matter.d.ts
4
4
  interface FrontMatterProps {
@@ -9,8 +9,8 @@ interface FrontMatterProps {
9
9
  *
10
10
  * @see https://jekyllrb.com/docs/front-matter/
11
11
  */
12
- declare function FrontMatter(props: FrontMatterProps): _alloy_js_core17.Children;
12
+ declare function FrontMatter(props: FrontMatterProps): _alloy_js_core7.Children;
13
13
  declare type __ΩFrontMatterProps = any[];
14
14
  //#endregion
15
15
  export { FrontMatterProps as n, __ΩFrontMatterProps as r, FrontMatter as t };
16
- //# sourceMappingURL=front-matter-D_wSuNkq.d.cts.map
16
+ //# sourceMappingURL=front-matter-DpKD40Zz.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"front-matter-BdXzBycV.d.cts","names":[],"sources":["../src/markdown/components/front-matter.tsx"],"sourcesContent":[],"mappings":";;;UAoBiB,gBAAA;QACT;;AADR;AASA;;;;iBAAgB,WAAA,QAAmB,mBAAgB,gBAAA,CAAA"}
1
+ {"version":3,"file":"front-matter-DpKD40Zz.d.cts","names":[],"sources":["../src/markdown/components/front-matter.tsx"],"sourcesContent":[],"mappings":";;;UAoBiB,gBAAA;QACT;;AADR;AASA;;;;iBAAgB,WAAA,QAAmB,mBAAgB,eAAA,CAAA"}
package/dist/index.cjs CHANGED
@@ -1,8 +1,6 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
  const require_chunk = require('./chunk-CbDLau6x.cjs');
3
- require('./context-DNdlL_gp.cjs');
4
- const require_output = require('./output-B52VAyyC.cjs');
5
- const require_meta = require('./meta-BjTflizw.cjs');
3
+ const require_meta = require('./meta-CBKMGDr1.cjs');
6
4
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
5
  let __alloy_js_core = require("@alloy-js/core");
8
6
  let __alloy_js_rollup_plugin = require("@alloy-js/rollup-plugin");
@@ -50,19 +48,10 @@ const plugin = (options = {}) => {
50
48
  async handler() {
51
49
  this.debug("Attaching the `render` method to the context object.");
52
50
  this.render = async (child) => {
53
- const _self$ = this;
54
51
  const meta = {};
55
52
  const output = await (0, __alloy_js_core.renderAsync)((0, __alloy_js_core_jsx_runtime.createComponent)(require_meta.MetaContext.Provider, {
56
53
  value: meta,
57
- get children() {
58
- return (0, __alloy_js_core_jsx_runtime.createComponent)(require_output.Output, {
59
- context: _self$,
60
- get basePath() {
61
- return _self$.workspaceConfig.workspaceRoot;
62
- },
63
- children: child
64
- });
65
- }
54
+ children: child
66
55
  }));
67
56
  this.debug("Processing rendered output from Alloy-js.");
68
57
  await (0, __alloy_js_core.traverseOutput)(output, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAkCA;;;;AAwHc,cAxHD,MAwHC,EAAA,CAAA,iBAvHK,kBAuHL,GAvH0B,kBAuH1B,CAAA,CAAA,OAAA,CAAA,EArHH,kBAqHG,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA,EAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAiCA;;;;AAkHc,cAlHD,MAkHC,EAAA,CAAA,iBAjHK,kBAiHL,GAjH0B,kBAiH1B,CAAA,CAAA,OAAA,CAAA,EA/GH,kBA+GG,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA,EAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAkCA;;;;AAwHc,cAxHD,MAwHC,EAAA,CAAA,iBAvHK,kBAuHL,GAvH0B,kBAuH1B,CAAA,CAAA,OAAA,CAAA,EArHH,kBAqHG,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA,EAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAiCA;;;;AAkHc,cAlHD,MAkHC,EAAA,CAAA,iBAjHK,kBAiHL,GAjH0B,kBAiH1B,CAAA,CAAA,OAAA,CAAA,EA/GH,kBA+GG,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA,EAAA"}
package/dist/index.mjs CHANGED
@@ -1,6 +1,4 @@
1
- import "./context-CdPajCh6.mjs";
2
- import { t as Output$1 } from "./output-CPbwcL2j.mjs";
3
- import { t as MetaContext } from "./meta-D0pfCtdR.mjs";
1
+ import { t as MetaContext } from "./meta-BuwJuxY9.mjs";
4
2
  import { createComponent } from "@alloy-js/core/jsx-runtime";
5
3
  import { renderAsync, traverseOutput } from "@alloy-js/core";
6
4
  import rollupPlugin from "@alloy-js/rollup-plugin";
@@ -47,19 +45,10 @@ const plugin = (options = {}) => {
47
45
  async handler() {
48
46
  this.debug("Attaching the `render` method to the context object.");
49
47
  this.render = async (child) => {
50
- const _self$ = this;
51
48
  const meta = {};
52
49
  const output = await renderAsync(createComponent(MetaContext.Provider, {
53
50
  value: meta,
54
- get children() {
55
- return createComponent(Output$1, {
56
- context: _self$,
57
- get basePath() {
58
- return _self$.workspaceConfig.workspaceRoot;
59
- },
60
- children: child
61
- });
62
- }
51
+ children: child
63
52
  }));
64
53
  this.debug("Processing rendered output from Alloy-js.");
65
54
  await traverseOutput(output, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["renderAsync","traverseOutput","rollupPlugin","StormJSON","findFileExtension","Output","MetaContext","plugin","options","name","config","debug","alloy","typescript","build","inputOptions","transform","jsx","plugins","external","configResolved","tsconfig","tsconfigJson","compilerOptions","jsxImportSource","fs","write","tsconfigFilePath","stringify","order","handler","render","child","_self$","meta","output","_$createComponent","Provider","value","children","context","basePath","workspaceConfig","workspaceRoot","visitDirectory","directory","existsSync","path","mkdirSync","visitFile","file","metadata","kind","id","Error","emitBuiltinSync","contents","skipFormat","storage","extension","emitEntrySync","typeDefinition","emitSync","copySync","sourcePath"],"sources":["../src/index.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 type { Children } from \"@alloy-js/core\";\nimport { renderAsync, traverseOutput } from \"@alloy-js/core\";\nimport rollupPlugin from \"@alloy-js/rollup-plugin\";\nimport { StormJSON } from \"@stryke/json/storm-json\";\nimport { findFileExtension } from \"@stryke/path/file-path-fns\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { Output } from \"./core/components/output\";\nimport { MetaContext, MetaItem } from \"./core/contexts/meta\";\nimport { AlloyPluginContext, AlloyPluginOptions } from \"./types/plugin\";\n\n/**\n * Alloy-js plugin for Powerlines.\n *\n * @param options - The Alloy-js plugin user configuration options.\n * @returns A Powerlines plugin that integrates Alloy-js transformations.\n */\nexport const plugin = <\n TContext extends AlloyPluginContext = AlloyPluginContext\n>(\n options: AlloyPluginOptions = {}\n) => {\n return [\n {\n name: \"alloy:config\",\n config() {\n this.debug(\n \"Updating configuration options to support Alloy-js builds.\"\n );\n\n return {\n alloy: {\n typescript: true,\n ...options\n },\n build: {\n inputOptions: {\n transform: {\n jsx: \"preserve\"\n }\n },\n plugins: [rollupPlugin()],\n external: [/^@alloy-js\\//]\n }\n };\n },\n async configResolved() {\n this.debug(\"Ensuring TypeScript configuration is set up for Alloy-js.\");\n if (\n this.tsconfig.tsconfigJson.compilerOptions?.jsx !== \"preserve\" ||\n this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !==\n \"@alloy-js/core\"\n ) {\n this.tsconfig.tsconfigJson.compilerOptions ??= {};\n\n if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== \"preserve\") {\n this.tsconfig.tsconfigJson.compilerOptions.jsx = \"preserve\";\n }\n\n if (\n this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !==\n \"@alloy-js/core\"\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource =\n \"@alloy-js/core\";\n }\n\n await this.fs.write(\n this.tsconfig.tsconfigFilePath,\n StormJSON.stringify(this.tsconfig.tsconfigJson)\n );\n }\n }\n },\n {\n name: \"alloy:attach-render\",\n configResolved: {\n order: \"pre\",\n async handler() {\n this.debug(\"Attaching the `render` method to the context object.\");\n\n this.render = async (child: Children) => {\n const meta = {} as Record<string, MetaItem>;\n\n const output = await renderAsync(\n <MetaContext.Provider value={meta}>\n <Output<TContext>\n context={this}\n basePath={this.workspaceConfig.workspaceRoot}>\n {child}\n </Output>\n </MetaContext.Provider>\n );\n\n this.debug(\"Processing rendered output from Alloy-js.\");\n\n await traverseOutput(output, {\n visitDirectory: directory => {\n if (this.fs.existsSync(directory.path)) {\n return;\n }\n\n this.fs.mkdirSync(directory.path);\n },\n visitFile: file => {\n if (\"contents\" in file) {\n const metadata = meta[file.path] ?? {};\n if (metadata.kind === \"builtin\") {\n if (!metadata.id) {\n throw new Error(\n `Built-in file \"${file.path}\" is missing its ID in the render metadata.`\n );\n }\n\n this.emitBuiltinSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else if (metadata.kind === \"entry\") {\n this.emitEntrySync(file.contents, file.path, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n ...(metadata.typeDefinition ?? {})\n });\n } else {\n this.emitSync(file.contents, file.path, metadata);\n }\n } else {\n this.fs.copySync(file.sourcePath, file.path);\n }\n }\n });\n };\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":""}
1
+ {"version":3,"file":"index.mjs","names":["renderAsync","traverseOutput","rollupPlugin","StormJSON","findFileExtension","MetaContext","plugin","options","name","config","debug","alloy","typescript","build","inputOptions","transform","jsx","plugins","external","configResolved","tsconfig","tsconfigJson","compilerOptions","jsxImportSource","fs","write","tsconfigFilePath","stringify","order","handler","render","child","meta","output","_$createComponent","Provider","value","children","visitDirectory","directory","existsSync","path","mkdirSync","visitFile","file","metadata","kind","id","Error","emitBuiltinSync","contents","skipFormat","storage","extension","emitEntrySync","typeDefinition","emitSync","copySync","sourcePath"],"sources":["../src/index.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 type { Children } from \"@alloy-js/core\";\nimport { renderAsync, traverseOutput } from \"@alloy-js/core\";\nimport rollupPlugin from \"@alloy-js/rollup-plugin\";\nimport { StormJSON } from \"@stryke/json/storm-json\";\nimport { findFileExtension } from \"@stryke/path/file-path-fns\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { MetaContext, MetaItem } from \"./core/contexts/meta\";\nimport { AlloyPluginContext, AlloyPluginOptions } from \"./types/plugin\";\n\n/**\n * Alloy-js plugin for Powerlines.\n *\n * @param options - The Alloy-js plugin user configuration options.\n * @returns A Powerlines plugin that integrates Alloy-js transformations.\n */\nexport const plugin = <\n TContext extends AlloyPluginContext = AlloyPluginContext\n>(\n options: AlloyPluginOptions = {}\n) => {\n return [\n {\n name: \"alloy:config\",\n config() {\n this.debug(\n \"Updating configuration options to support Alloy-js builds.\"\n );\n\n return {\n alloy: {\n typescript: true,\n ...options\n },\n build: {\n inputOptions: {\n transform: {\n jsx: \"preserve\"\n }\n },\n plugins: [rollupPlugin()],\n external: [/^@alloy-js\\//]\n }\n };\n },\n async configResolved() {\n this.debug(\"Ensuring TypeScript configuration is set up for Alloy-js.\");\n if (\n this.tsconfig.tsconfigJson.compilerOptions?.jsx !== \"preserve\" ||\n this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !==\n \"@alloy-js/core\"\n ) {\n this.tsconfig.tsconfigJson.compilerOptions ??= {};\n\n if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== \"preserve\") {\n this.tsconfig.tsconfigJson.compilerOptions.jsx = \"preserve\";\n }\n\n if (\n this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !==\n \"@alloy-js/core\"\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource =\n \"@alloy-js/core\";\n }\n\n await this.fs.write(\n this.tsconfig.tsconfigFilePath,\n StormJSON.stringify(this.tsconfig.tsconfigJson)\n );\n }\n }\n },\n {\n name: \"alloy:attach-render\",\n configResolved: {\n order: \"pre\",\n async handler() {\n this.debug(\"Attaching the `render` method to the context object.\");\n\n this.render = async (child: Children) => {\n const meta = {} as Record<string, MetaItem>;\n\n const output = await renderAsync(\n <MetaContext.Provider value={meta}>{child}</MetaContext.Provider>\n );\n\n this.debug(\"Processing rendered output from Alloy-js.\");\n\n await traverseOutput(output, {\n visitDirectory: directory => {\n if (this.fs.existsSync(directory.path)) {\n return;\n }\n\n this.fs.mkdirSync(directory.path);\n },\n visitFile: file => {\n if (\"contents\" in file) {\n const metadata = meta[file.path] ?? {};\n if (metadata.kind === \"builtin\") {\n if (!metadata.id) {\n throw new Error(\n `Built-in file \"${file.path}\" is missing its ID in the render metadata.`\n );\n }\n\n this.emitBuiltinSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else if (metadata.kind === \"entry\") {\n this.emitEntrySync(file.contents, file.path, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n ...(metadata.typeDefinition ?? {})\n });\n } else {\n this.emitSync(file.contents, file.path, metadata);\n }\n } else {\n this.fs.copySync(file.sourcePath, file.path);\n }\n }\n });\n };\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":""}
@@ -1,2 +1,2 @@
1
- import { n as FrontMatterProps, r as __ΩFrontMatterProps, t as FrontMatter } from "../../front-matter-BdXzBycV.cjs";
1
+ import { n as FrontMatterProps, r as __ΩFrontMatterProps, t as FrontMatter } from "../../front-matter-DpKD40Zz.cjs";
2
2
  export { FrontMatter, FrontMatterProps, __ΩFrontMatterProps };
@@ -1,9 +1,9 @@
1
- require('../../context-DNdlL_gp.cjs');
2
- require('../../meta-BjTflizw.cjs');
1
+ require('../../meta-CBKMGDr1.cjs');
2
+ require('../../context-D-lZVHpZ.cjs');
3
3
  require('../../single-line-comment-DvU69OGj.cjs');
4
- require('../../source-file-BCcq9Me3.cjs');
4
+ require('../../source-file-C8ntga6V.cjs');
5
5
  const require_front_matter = require('../../front-matter-DZ1tB-Uj.cjs');
6
- const require_markdown_file = require('../../markdown-file-B6gbsDmK.cjs');
6
+ const require_markdown_file = require('../../markdown-file-BDzUAptw.cjs');
7
7
  require('../../markdown-table-BWPm6GbJ.cjs');
8
8
  const require_markdown_table$1 = require('../../markdown-table-eTnxxb46.cjs');
9
9
  require('../../components-DPKSrvP-.cjs');