@powerlines/plugin-alloy 0.25.33 → 0.25.34

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 (287) hide show
  1. package/README.md +1 -1
  2. package/dist/core/components/output.cjs +17 -10
  3. package/dist/core/components/output.mjs +18 -12
  4. package/dist/core/components/single-line-comment.cjs +6 -4
  5. package/dist/core/components/single-line-comment.mjs +7 -6
  6. package/dist/core/components/source-file.cjs +10 -6
  7. package/dist/core/components/source-file.mjs +11 -8
  8. package/dist/core/components/spacing.cjs +6 -4
  9. package/dist/core/components/spacing.mjs +7 -6
  10. package/dist/core/contexts/context.mjs +1 -2
  11. package/dist/core/contexts/meta.mjs +1 -2
  12. package/dist/core/contexts/reflection.mjs +1 -2
  13. package/dist/core/helpers/code.mjs +1 -2
  14. package/dist/helpers/capnp.mjs +1 -2
  15. package/dist/helpers/create-builtin.mjs +1 -2
  16. package/dist/helpers/refkey.mjs +1 -2
  17. package/dist/helpers/typescript.mjs +1 -2
  18. package/dist/index.cjs +8 -18
  19. package/dist/index.mjs +8 -19
  20. package/dist/markdown/components/front-matter.cjs +9 -7
  21. package/dist/markdown/components/front-matter.mjs +10 -9
  22. package/dist/markdown/components/markdown-file.cjs +76 -44
  23. package/dist/markdown/components/markdown-file.mjs +77 -46
  24. package/dist/markdown/components/markdown-table.cjs +49 -28
  25. package/dist/markdown/components/markdown-table.mjs +50 -30
  26. package/dist/markdown/contexts/markdown-table.mjs +1 -2
  27. package/dist/render.cjs +3 -3
  28. package/dist/render.mjs +4 -5
  29. package/dist/typescript/components/builtin-file.cjs +29 -19
  30. package/dist/typescript/components/builtin-file.mjs +30 -21
  31. package/dist/typescript/components/class-declaration.cjs +165 -100
  32. package/dist/typescript/components/class-declaration.mjs +166 -102
  33. package/dist/typescript/components/dynamic-import-statement.cjs +2 -6
  34. package/dist/typescript/components/dynamic-import-statement.mjs +3 -8
  35. package/dist/typescript/components/entry-file.cjs +9 -6
  36. package/dist/typescript/components/entry-file.mjs +10 -8
  37. package/dist/typescript/components/infrastructure-file.cjs +9 -6
  38. package/dist/typescript/components/infrastructure-file.mjs +10 -8
  39. package/dist/typescript/components/interface-declaration.cjs +121 -70
  40. package/dist/typescript/components/interface-declaration.mjs +122 -72
  41. package/dist/typescript/components/object-declaration.cjs +76 -44
  42. package/dist/typescript/components/object-declaration.mjs +77 -46
  43. package/dist/typescript/components/property-name.cjs +3 -3
  44. package/dist/typescript/components/property-name.mjs +4 -5
  45. package/dist/typescript/components/record-expression.mjs +1 -2
  46. package/dist/typescript/components/tsdoc-reflection.cjs +225 -104
  47. package/dist/typescript/components/tsdoc-reflection.mjs +226 -106
  48. package/dist/typescript/components/tsdoc.cjs +255 -160
  49. package/dist/typescript/components/tsdoc.mjs +256 -162
  50. package/dist/typescript/components/type-declaration.cjs +20 -15
  51. package/dist/typescript/components/type-declaration.mjs +21 -17
  52. package/dist/typescript/components/type-parameters.cjs +55 -29
  53. package/dist/typescript/components/type-parameters.mjs +56 -31
  54. package/dist/typescript/components/typescript-file.cjs +145 -80
  55. package/dist/typescript/components/typescript-file.mjs +146 -82
  56. package/dist/typescript/contexts/lexical-scope.cjs +5 -3
  57. package/dist/typescript/contexts/lexical-scope.mjs +6 -5
  58. package/dist/typescript/contexts/member-scope.cjs +5 -3
  59. package/dist/typescript/contexts/member-scope.mjs +6 -5
  60. package/dist/typescript/helpers/get-call-signature-props.mjs +1 -2
  61. package/dist/typescript/helpers/utilities.mjs +1 -2
  62. package/dist/yaml/components/yaml-file.cjs +92 -47
  63. package/dist/yaml/components/yaml-file.mjs +93 -49
  64. package/package.json +16 -17
  65. package/dist/core/components/index.d.cts +0 -5
  66. package/dist/core/components/index.d.mts +0 -5
  67. package/dist/core/components/output.d.cts +0 -24
  68. package/dist/core/components/output.d.cts.map +0 -1
  69. package/dist/core/components/output.d.mts +0 -24
  70. package/dist/core/components/output.d.mts.map +0 -1
  71. package/dist/core/components/output.mjs.map +0 -1
  72. package/dist/core/components/single-line-comment.d.cts +0 -23
  73. package/dist/core/components/single-line-comment.d.cts.map +0 -1
  74. package/dist/core/components/single-line-comment.d.mts +0 -23
  75. package/dist/core/components/single-line-comment.d.mts.map +0 -1
  76. package/dist/core/components/single-line-comment.mjs.map +0 -1
  77. package/dist/core/components/source-file.d.cts +0 -33
  78. package/dist/core/components/source-file.d.cts.map +0 -1
  79. package/dist/core/components/source-file.d.mts +0 -33
  80. package/dist/core/components/source-file.d.mts.map +0 -1
  81. package/dist/core/components/source-file.mjs.map +0 -1
  82. package/dist/core/components/spacing.d.cts +0 -24
  83. package/dist/core/components/spacing.d.cts.map +0 -1
  84. package/dist/core/components/spacing.d.mts +0 -24
  85. package/dist/core/components/spacing.d.mts.map +0 -1
  86. package/dist/core/components/spacing.mjs.map +0 -1
  87. package/dist/core/contexts/context.d.cts +0 -29
  88. package/dist/core/contexts/context.d.cts.map +0 -1
  89. package/dist/core/contexts/context.d.mts +0 -29
  90. package/dist/core/contexts/context.d.mts.map +0 -1
  91. package/dist/core/contexts/context.mjs.map +0 -1
  92. package/dist/core/contexts/index.d.cts +0 -4
  93. package/dist/core/contexts/index.d.mts +0 -4
  94. package/dist/core/contexts/meta.d.cts +0 -48
  95. package/dist/core/contexts/meta.d.cts.map +0 -1
  96. package/dist/core/contexts/meta.d.mts +0 -48
  97. package/dist/core/contexts/meta.d.mts.map +0 -1
  98. package/dist/core/contexts/meta.mjs.map +0 -1
  99. package/dist/core/contexts/reflection.d.cts +0 -53
  100. package/dist/core/contexts/reflection.d.cts.map +0 -1
  101. package/dist/core/contexts/reflection.d.mts +0 -53
  102. package/dist/core/contexts/reflection.d.mts.map +0 -1
  103. package/dist/core/contexts/reflection.mjs.map +0 -1
  104. package/dist/core/helpers/code.d.cts +0 -29
  105. package/dist/core/helpers/code.d.cts.map +0 -1
  106. package/dist/core/helpers/code.d.mts +0 -29
  107. package/dist/core/helpers/code.d.mts.map +0 -1
  108. package/dist/core/helpers/code.mjs.map +0 -1
  109. package/dist/core/helpers/index.d.cts +0 -2
  110. package/dist/core/helpers/index.d.mts +0 -2
  111. package/dist/core/index.d.cts +0 -9
  112. package/dist/core/index.d.mts +0 -9
  113. package/dist/helpers/capnp.d.cts +0 -87
  114. package/dist/helpers/capnp.d.cts.map +0 -1
  115. package/dist/helpers/capnp.d.mts +0 -87
  116. package/dist/helpers/capnp.d.mts.map +0 -1
  117. package/dist/helpers/capnp.mjs.map +0 -1
  118. package/dist/helpers/create-builtin.d.cts +0 -16
  119. package/dist/helpers/create-builtin.d.cts.map +0 -1
  120. package/dist/helpers/create-builtin.d.mts +0 -16
  121. package/dist/helpers/create-builtin.d.mts.map +0 -1
  122. package/dist/helpers/create-builtin.mjs.map +0 -1
  123. package/dist/helpers/index.d.cts +0 -5
  124. package/dist/helpers/index.d.mts +0 -5
  125. package/dist/helpers/refkey.d.cts +0 -13
  126. package/dist/helpers/refkey.d.cts.map +0 -1
  127. package/dist/helpers/refkey.d.mts +0 -13
  128. package/dist/helpers/refkey.d.mts.map +0 -1
  129. package/dist/helpers/refkey.mjs.map +0 -1
  130. package/dist/helpers/typescript.d.cts +0 -26
  131. package/dist/helpers/typescript.d.cts.map +0 -1
  132. package/dist/helpers/typescript.d.mts +0 -26
  133. package/dist/helpers/typescript.d.mts.map +0 -1
  134. package/dist/helpers/typescript.mjs.map +0 -1
  135. package/dist/index.d.cts +0 -19
  136. package/dist/index.d.cts.map +0 -1
  137. package/dist/index.d.mts +0 -19
  138. package/dist/index.d.mts.map +0 -1
  139. package/dist/index.mjs.map +0 -1
  140. package/dist/markdown/components/front-matter.d.cts +0 -16
  141. package/dist/markdown/components/front-matter.d.cts.map +0 -1
  142. package/dist/markdown/components/front-matter.d.mts +0 -16
  143. package/dist/markdown/components/front-matter.d.mts.map +0 -1
  144. package/dist/markdown/components/front-matter.mjs.map +0 -1
  145. package/dist/markdown/components/index.d.cts +0 -4
  146. package/dist/markdown/components/index.d.mts +0 -4
  147. package/dist/markdown/components/markdown-file.d.cts +0 -29
  148. package/dist/markdown/components/markdown-file.d.cts.map +0 -1
  149. package/dist/markdown/components/markdown-file.d.mts +0 -29
  150. package/dist/markdown/components/markdown-file.d.mts.map +0 -1
  151. package/dist/markdown/components/markdown-file.mjs.map +0 -1
  152. package/dist/markdown/components/markdown-table.d.cts +0 -28
  153. package/dist/markdown/components/markdown-table.d.cts.map +0 -1
  154. package/dist/markdown/components/markdown-table.d.mts +0 -28
  155. package/dist/markdown/components/markdown-table.d.mts.map +0 -1
  156. package/dist/markdown/components/markdown-table.mjs.map +0 -1
  157. package/dist/markdown/contexts/index.d.cts +0 -2
  158. package/dist/markdown/contexts/index.d.mts +0 -2
  159. package/dist/markdown/contexts/markdown-table.d.cts +0 -38
  160. package/dist/markdown/contexts/markdown-table.d.cts.map +0 -1
  161. package/dist/markdown/contexts/markdown-table.d.mts +0 -38
  162. package/dist/markdown/contexts/markdown-table.d.mts.map +0 -1
  163. package/dist/markdown/contexts/markdown-table.mjs.map +0 -1
  164. package/dist/markdown/index.d.cts +0 -5
  165. package/dist/markdown/index.d.mts +0 -5
  166. package/dist/render.d.cts +0 -38
  167. package/dist/render.d.cts.map +0 -1
  168. package/dist/render.d.mts +0 -38
  169. package/dist/render.d.mts.map +0 -1
  170. package/dist/render.mjs.map +0 -1
  171. package/dist/types/components.d.cts +0 -142
  172. package/dist/types/components.d.cts.map +0 -1
  173. package/dist/types/components.d.mts +0 -142
  174. package/dist/types/components.d.mts.map +0 -1
  175. package/dist/types/index.d.cts +0 -3
  176. package/dist/types/index.d.mts +0 -3
  177. package/dist/types/plugin.d.cts +0 -39
  178. package/dist/types/plugin.d.cts.map +0 -1
  179. package/dist/types/plugin.d.mts +0 -39
  180. package/dist/types/plugin.d.mts.map +0 -1
  181. package/dist/typescript/components/builtin-file.d.cts +0 -35
  182. package/dist/typescript/components/builtin-file.d.cts.map +0 -1
  183. package/dist/typescript/components/builtin-file.d.mts +0 -35
  184. package/dist/typescript/components/builtin-file.d.mts.map +0 -1
  185. package/dist/typescript/components/builtin-file.mjs.map +0 -1
  186. package/dist/typescript/components/class-declaration.d.cts +0 -145
  187. package/dist/typescript/components/class-declaration.d.cts.map +0 -1
  188. package/dist/typescript/components/class-declaration.d.mts +0 -145
  189. package/dist/typescript/components/class-declaration.d.mts.map +0 -1
  190. package/dist/typescript/components/class-declaration.mjs.map +0 -1
  191. package/dist/typescript/components/dynamic-import-statement.d.cts +0 -33
  192. package/dist/typescript/components/dynamic-import-statement.d.cts.map +0 -1
  193. package/dist/typescript/components/dynamic-import-statement.d.mts +0 -33
  194. package/dist/typescript/components/dynamic-import-statement.d.mts.map +0 -1
  195. package/dist/typescript/components/dynamic-import-statement.mjs.map +0 -1
  196. package/dist/typescript/components/entry-file.d.cts +0 -28
  197. package/dist/typescript/components/entry-file.d.cts.map +0 -1
  198. package/dist/typescript/components/entry-file.d.mts +0 -28
  199. package/dist/typescript/components/entry-file.d.mts.map +0 -1
  200. package/dist/typescript/components/entry-file.mjs.map +0 -1
  201. package/dist/typescript/components/index.d.cts +0 -15
  202. package/dist/typescript/components/index.d.mts +0 -15
  203. package/dist/typescript/components/infrastructure-file.d.cts +0 -21
  204. package/dist/typescript/components/infrastructure-file.d.cts.map +0 -1
  205. package/dist/typescript/components/infrastructure-file.d.mts +0 -21
  206. package/dist/typescript/components/infrastructure-file.d.mts.map +0 -1
  207. package/dist/typescript/components/infrastructure-file.mjs.map +0 -1
  208. package/dist/typescript/components/interface-declaration.d.cts +0 -86
  209. package/dist/typescript/components/interface-declaration.d.cts.map +0 -1
  210. package/dist/typescript/components/interface-declaration.d.mts +0 -86
  211. package/dist/typescript/components/interface-declaration.d.mts.map +0 -1
  212. package/dist/typescript/components/interface-declaration.mjs.map +0 -1
  213. package/dist/typescript/components/object-declaration.d.cts +0 -30
  214. package/dist/typescript/components/object-declaration.d.cts.map +0 -1
  215. package/dist/typescript/components/object-declaration.d.mts +0 -30
  216. package/dist/typescript/components/object-declaration.d.mts.map +0 -1
  217. package/dist/typescript/components/object-declaration.mjs.map +0 -1
  218. package/dist/typescript/components/property-name.d.cts +0 -24
  219. package/dist/typescript/components/property-name.d.cts.map +0 -1
  220. package/dist/typescript/components/property-name.d.mts +0 -24
  221. package/dist/typescript/components/property-name.d.mts.map +0 -1
  222. package/dist/typescript/components/property-name.mjs.map +0 -1
  223. package/dist/typescript/components/record-expression.d.cts +0 -13
  224. package/dist/typescript/components/record-expression.d.cts.map +0 -1
  225. package/dist/typescript/components/record-expression.d.mts +0 -13
  226. package/dist/typescript/components/record-expression.d.mts.map +0 -1
  227. package/dist/typescript/components/record-expression.mjs.map +0 -1
  228. package/dist/typescript/components/tsdoc-reflection.d.cts +0 -44
  229. package/dist/typescript/components/tsdoc-reflection.d.cts.map +0 -1
  230. package/dist/typescript/components/tsdoc-reflection.d.mts +0 -44
  231. package/dist/typescript/components/tsdoc-reflection.d.mts.map +0 -1
  232. package/dist/typescript/components/tsdoc-reflection.mjs.map +0 -1
  233. package/dist/typescript/components/tsdoc.d.cts +0 -164
  234. package/dist/typescript/components/tsdoc.d.cts.map +0 -1
  235. package/dist/typescript/components/tsdoc.d.mts +0 -164
  236. package/dist/typescript/components/tsdoc.d.mts.map +0 -1
  237. package/dist/typescript/components/tsdoc.mjs.map +0 -1
  238. package/dist/typescript/components/type-declaration.d.cts +0 -18
  239. package/dist/typescript/components/type-declaration.d.cts.map +0 -1
  240. package/dist/typescript/components/type-declaration.d.mts +0 -18
  241. package/dist/typescript/components/type-declaration.d.mts.map +0 -1
  242. package/dist/typescript/components/type-declaration.mjs.map +0 -1
  243. package/dist/typescript/components/type-parameters.d.cts +0 -24
  244. package/dist/typescript/components/type-parameters.d.cts.map +0 -1
  245. package/dist/typescript/components/type-parameters.d.mts +0 -24
  246. package/dist/typescript/components/type-parameters.d.mts.map +0 -1
  247. package/dist/typescript/components/type-parameters.mjs.map +0 -1
  248. package/dist/typescript/components/typescript-file.d.cts +0 -50
  249. package/dist/typescript/components/typescript-file.d.cts.map +0 -1
  250. package/dist/typescript/components/typescript-file.d.mts +0 -50
  251. package/dist/typescript/components/typescript-file.d.mts.map +0 -1
  252. package/dist/typescript/components/typescript-file.mjs.map +0 -1
  253. package/dist/typescript/contexts/index.d.cts +0 -2
  254. package/dist/typescript/contexts/index.d.mts +0 -2
  255. package/dist/typescript/contexts/lexical-scope.d.cts +0 -17
  256. package/dist/typescript/contexts/lexical-scope.d.cts.map +0 -1
  257. package/dist/typescript/contexts/lexical-scope.d.mts +0 -17
  258. package/dist/typescript/contexts/lexical-scope.d.mts.map +0 -1
  259. package/dist/typescript/contexts/lexical-scope.mjs.map +0 -1
  260. package/dist/typescript/contexts/member-scope.d.cts +0 -20
  261. package/dist/typescript/contexts/member-scope.d.cts.map +0 -1
  262. package/dist/typescript/contexts/member-scope.d.mts +0 -20
  263. package/dist/typescript/contexts/member-scope.d.mts.map +0 -1
  264. package/dist/typescript/contexts/member-scope.mjs.map +0 -1
  265. package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -14
  266. package/dist/typescript/helpers/get-call-signature-props.d.cts.map +0 -1
  267. package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -14
  268. package/dist/typescript/helpers/get-call-signature-props.d.mts.map +0 -1
  269. package/dist/typescript/helpers/get-call-signature-props.mjs.map +0 -1
  270. package/dist/typescript/helpers/index.d.cts +0 -3
  271. package/dist/typescript/helpers/index.d.mts +0 -3
  272. package/dist/typescript/helpers/utilities.d.cts +0 -11
  273. package/dist/typescript/helpers/utilities.d.cts.map +0 -1
  274. package/dist/typescript/helpers/utilities.d.mts +0 -11
  275. package/dist/typescript/helpers/utilities.d.mts.map +0 -1
  276. package/dist/typescript/helpers/utilities.mjs.map +0 -1
  277. package/dist/typescript/index.d.cts +0 -18
  278. package/dist/typescript/index.d.mts +0 -18
  279. package/dist/yaml/components/index.d.cts +0 -2
  280. package/dist/yaml/components/index.d.mts +0 -2
  281. package/dist/yaml/components/yaml-file.d.cts +0 -34
  282. package/dist/yaml/components/yaml-file.d.cts.map +0 -1
  283. package/dist/yaml/components/yaml-file.d.mts +0 -34
  284. package/dist/yaml/components/yaml-file.d.mts.map +0 -1
  285. package/dist/yaml/components/yaml-file.mjs.map +0 -1
  286. package/dist/yaml/index.d.cts +0 -2
  287. package/dist/yaml/index.d.mts +0 -2
@@ -1 +0,0 @@
1
- {"version":3,"file":"typescript-file.mjs","names":["SourceFileContext"],"sources":["../../../src/typescript/components/typescript-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 type { Children } from \"@alloy-js/core\";\nimport {\n computed,\n For,\n Scope,\n Show,\n SourceDirectoryContext,\n splitProps,\n useContext,\n useScope\n} from \"@alloy-js/core\";\nimport {\n getSourceDirectoryData,\n ImportStatements,\n PackageContext,\n SourceFileContext,\n TSModuleScope,\n useSourceFile\n} from \"@alloy-js/typescript\";\nimport { getUniqueBy } from \"@stryke/helpers/get-unique\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isBoolean } from \"@stryke/type-checks/is-boolean\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { getFileHeaderWarning } from \"powerlines/utils\";\nimport { SingleLineComment } from \"../../core/components/single-line-comment\";\nimport { SourceFile, SourceFileProps } from \"../../core/components/source-file\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { code } from \"../../core/helpers/code\";\nimport {\n ComponentProps,\n SourceFileHeaderProps,\n TypescriptFileImportItem,\n TypescriptFileImports\n} from \"../../types/components\";\n\nexport type TypescriptFileProps = Omit<SourceFileProps, \"filetype\"> &\n ComponentProps & {\n hashbang?: Children | true;\n header?: Children;\n imports?: TypescriptFileImports;\n builtinImports?: TypescriptFileImports;\n export?: boolean | string;\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 TypescriptFile(props: TypescriptFileProps) {\n const [\n { children, path, imports, builtinImports, tsx, header, hashbang },\n rest\n ] = splitProps(props, [\n \"children\",\n \"path\",\n \"imports\",\n \"builtinImports\",\n \"tsx\",\n \"header\",\n \"hashbang\"\n ]);\n\n const directoryContext = useContext(SourceDirectoryContext)!;\n const sdData = getSourceDirectoryData(directoryContext);\n\n const modulePath = appendPath(path, directoryContext.path);\n const scope = new TSModuleScope(modulePath, useScope());\n sdData.modules.add(scope);\n\n const pkg = useContext(PackageContext);\n if (pkg) {\n pkg.scope.addModule(scope);\n }\n\n if (props.export) {\n if (pkg) {\n if (isBoolean(props.export)) {\n pkg.scope.addExport(modulePath, scope);\n } else {\n pkg.scope.addExport(props.export, scope);\n }\n }\n }\n\n return (\n <SourceFileContext.Provider\n value={{\n scope\n }}>\n <Scope value={scope}>\n <SourceFile\n {...rest}\n path={modulePath}\n header={\n header ?? (\n <TypescriptFileHeader hashbang={hashbang}>\n <TypescriptFileHeaderImports\n imports={imports}\n builtinImports={builtinImports}\n scope={scope}\n />\n </TypescriptFileHeader>\n )\n }\n filetype={tsx ? \"tsx\" : \"typescript\"}>\n {children}\n </SourceFile>\n </Scope>\n </SourceFileContext.Provider>\n );\n}\n\nexport interface TypescriptFileHeaderProps extends SourceFileHeaderProps {\n header?: Children;\n hashbang?: Children | true;\n}\n\n/**\n * Renders the header for a Powerlines Typescript source file.\n *\n * @param props - The properties for the source file header.\n * @returns The rendered source file header.\n */\nexport function TypescriptFileHeader(props: TypescriptFileHeaderProps) {\n const {\n header,\n hashbang,\n disableEslint = true,\n disableBiome = true,\n disablePrettier = false,\n children\n } = props;\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n <Show when={Boolean(hashbang)}>\n {hashbang === true\n ? code`#!/usr/bin/env ${\n context?.config.mode === \"development\"\n ? \"-S NODE_OPTIONS=--enable-source-maps\"\n : \"\"\n } node`\n : hashbang}\n <hbr />\n </Show>\n <Show when={Boolean(header)}>\n {header}\n <hbr />\n </Show>\n <hbr />\n <Show when={Boolean(disableEslint)}>\n <SingleLineComment variant=\"slash-star\">\n {\"eslint-disable\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show when={Boolean(disablePrettier)}>\n <SingleLineComment variant=\"slash-star\">\n {\"prettier-ignore\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show when={Boolean(disableBiome)}>\n <SingleLineComment>{\"biome-ignore lint: disable\"}</SingleLineComment>\n <hbr />\n </Show>\n <Show\n when={\n Boolean(disableEslint) ||\n Boolean(disablePrettier) ||\n Boolean(disableBiome)\n }>\n <hbr />\n </Show>\n <Show when={Boolean(children)}>\n {children}\n <hbr />\n </Show>\n <SingleLineComment>{`Generated by ${\n titleCase(context?.config?.framework) || \"Powerlines\"\n }`}</SingleLineComment>\n <hbr />\n <SingleLineComment>{getFileHeaderWarning(context!)}</SingleLineComment>\n <hbr />\n </>\n );\n}\n\nexport interface TypescriptFileHeaderImportsProps extends SourceFileHeaderProps {\n imports?: TypescriptFileImports;\n builtinImports?: TypescriptFileImports;\n scope?: TSModuleScope;\n}\n\n/**\n * Renders the header for a Powerlines Typescript source file.\n *\n * @param props - The properties for the source file header.\n * @returns The rendered source file header.\n */\nexport function TypescriptFileHeaderImports(\n props: TypescriptFileHeaderImportsProps\n) {\n const { imports: importProps, builtinImports: builtinImportsProps } = props;\n\n const context = usePowerlinesSafe();\n const sourceFile = useSourceFile();\n\n const scope = props.scope ?? sourceFile.scope;\n\n const imports = computed(() => {\n return Object.fromEntries(\n Object.entries(importProps ?? {}).map(([module, importItem]) => [\n module,\n Array.isArray(importItem)\n ? getUniqueBy(importItem, i => (isString(i) ? i : i.alias || i.name))\n : importItem\n ])\n );\n });\n const builtinImports = computed(() => {\n return Object.fromEntries(\n Object.entries(builtinImportsProps ?? {}).map(([module, importItem]) => [\n module,\n Array.isArray(importItem)\n ? getUniqueBy(importItem, i => (isString(i) ? i : i.alias || i.name))\n : importItem\n ])\n );\n });\n\n return (\n <Show\n when={\n scope.importedModules.size > 0 ||\n (!!imports.value && Object.keys(imports.value).length > 0) ||\n (!!builtinImports.value && Object.keys(builtinImports.value).length > 0)\n }>\n <Show when={!!imports.value && Object.keys(imports.value).length > 0}>\n <For\n each={Object.entries(imports.value ?? {})}\n hardline\n ender={<hbr />}>\n {([module, importItem]) =>\n code`import ${\n importItem === null\n ? \"\"\n : isString(importItem)\n ? importItem\n : `${\n (\n importItem.filter(\n i => !isString(i) && i.default\n ) as TypescriptFileImportItem[]\n )\n .map(i => (i.alias ? i.alias : i.name))\n .join(\", \") +\n (importItem.filter(i => !isString(i) && i.default)\n .length > 0 &&\n importItem.filter(i => isString(i) || !i.default).length >\n 0\n ? \", \"\n : \"\") +\n (importItem.filter(i => isString(i) || !i.default)\n .length > 0\n ? `{ ${importItem\n .filter(i => isString(i) || !i.default)\n .map(i =>\n isString(i)\n ? i\n : i.alias\n ? `${i.name} as ${i.alias}`\n : i.name\n )\n .join(\", \")} }`\n : \"\")\n }`\n } from \"${module}\";`\n }\n </For>\n </Show>\n <Show\n when={\n builtinImports.value && Object.keys(builtinImports.value).length > 0\n }>\n <For\n each={Object.entries(\n (builtinImports.value ?? {}) as Record<\n string,\n null | Array<TypescriptFileImportItem | string>\n >\n )}\n hardline\n ender={<hbr />}>\n {([module, importItem]) =>\n code`import ${\n importItem === null\n ? \"\"\n : isString(importItem)\n ? importItem\n : `${\n (\n importItem.filter(\n i => !isString(i) && i.default\n ) as TypescriptFileImportItem[]\n )\n .map(i => (i.alias ? i.alias : i.name))\n .join(\", \") +\n (importItem.filter(i => !isString(i) && i.default)\n .length > 0 &&\n importItem.filter(i => isString(i) || !i.default).length >\n 0\n ? \", \"\n : \"\") +\n (importItem.filter(i => isString(i) || !i.default)\n .length > 0\n ? `{ ${importItem\n .filter(i => isString(i) || !i.default)\n .map(i =>\n isString(i)\n ? i\n : i.alias\n ? `${i.name} as ${i.alias}`\n : i.name\n )\n .join(\", \")} }`\n : \"\")\n }`\n } from \"${\n module.includes(\":\")\n ? module\n : `${context?.config?.framework || \"powerlines\"}:${module}`\n }\";`\n }\n </For>\n </Show>\n <Show when={scope.importedModules.size > 0}>\n <ImportStatements records={scope.importedModules} />\n </Show>\n <hbr />\n </Show>\n );\n}\n"],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue } from "./lexical-scope.cjs";
2
- export { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue };
@@ -1,2 +0,0 @@
1
- import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue } from "./lexical-scope.mjs";
2
- export { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue };
@@ -1,17 +0,0 @@
1
- import * as _alloy_js_core0 from "@alloy-js/core";
2
- import { ScopePropsWithInfo, ScopePropsWithValue } from "@alloy-js/core";
3
-
4
- //#region src/typescript/contexts/lexical-scope.d.ts
5
- interface LexicalScopePropsWithScopeValue extends ScopePropsWithValue {}
6
- interface LexicalScopePropsWithScopeInfo extends ScopePropsWithInfo {}
7
- type LexicalScopeProps = LexicalScopePropsWithScopeValue | LexicalScopePropsWithScopeInfo;
8
- /**
9
- * A lexical scope for TypeScript, which contains declaration spaces for types and values. Declaration components will create symbols in this scope.
10
- */
11
- declare function LexicalScope(props: LexicalScopeProps): _alloy_js_core0.Children;
12
- declare type __ΩLexicalScopePropsWithScopeValue = any[];
13
- declare type __ΩLexicalScopePropsWithScopeInfo = any[];
14
- declare type __ΩLexicalScopeProps = any[];
15
- //#endregion
16
- export { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue };
17
- //# sourceMappingURL=lexical-scope.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lexical-scope.d.cts","names":[],"sources":["../../../src/typescript/contexts/lexical-scope.tsx"],"mappings":";;;;UAqBiB,+BAAA,SAAwC,mBAAA;AAAA,UACxC,8BAAA,SAAuC,kBAAA;AAAA,KAE5C,iBAAA,GACR,+BAAA,GACA,8BAAA;;;;iBAKY,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,eAAA,CAAA,QAAA;AAAA"}
@@ -1,17 +0,0 @@
1
- import * as _alloy_js_core0 from "@alloy-js/core";
2
- import { ScopePropsWithInfo, ScopePropsWithValue } from "@alloy-js/core";
3
-
4
- //#region src/typescript/contexts/lexical-scope.d.ts
5
- interface LexicalScopePropsWithScopeValue extends ScopePropsWithValue {}
6
- interface LexicalScopePropsWithScopeInfo extends ScopePropsWithInfo {}
7
- type LexicalScopeProps = LexicalScopePropsWithScopeValue | LexicalScopePropsWithScopeInfo;
8
- /**
9
- * A lexical scope for TypeScript, which contains declaration spaces for types and values. Declaration components will create symbols in this scope.
10
- */
11
- declare function LexicalScope(props: LexicalScopeProps): _alloy_js_core0.Children;
12
- declare type __ΩLexicalScopePropsWithScopeValue = any[];
13
- declare type __ΩLexicalScopePropsWithScopeInfo = any[];
14
- declare type __ΩLexicalScopeProps = any[];
15
- //#endregion
16
- export { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue };
17
- //# sourceMappingURL=lexical-scope.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lexical-scope.d.mts","names":[],"sources":["../../../src/typescript/contexts/lexical-scope.tsx"],"mappings":";;;;UAqBiB,+BAAA,SAAwC,mBAAA;AAAA,UACxC,8BAAA,SAAuC,kBAAA;AAAA,KAE5C,iBAAA,GACR,+BAAA,GACA,8BAAA;;;;iBAKY,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,eAAA,CAAA,QAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"lexical-scope.mjs","names":[],"sources":["../../../src/typescript/contexts/lexical-scope.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 { Scope, ScopePropsWithInfo, ScopePropsWithValue } from \"@alloy-js/core\";\nimport { createLexicalScope, TSLexicalScope } from \"@alloy-js/typescript\";\n\nexport interface LexicalScopePropsWithScopeValue extends ScopePropsWithValue {}\nexport interface LexicalScopePropsWithScopeInfo extends ScopePropsWithInfo {}\n\nexport type LexicalScopeProps =\n | LexicalScopePropsWithScopeValue\n | LexicalScopePropsWithScopeInfo;\n\n/**\n * A lexical scope for TypeScript, which contains declaration spaces for types and values. Declaration components will create symbols in this scope.\n */\nexport function LexicalScope(props: LexicalScopeProps) {\n let scope;\n if (\"value\" in props) {\n if (!(props.value instanceof TSLexicalScope)) {\n throw new TypeError(\n \"LexicalScope value must be a TSLexicalScope instance\"\n );\n }\n scope = props.value;\n } else {\n scope = createLexicalScope(props.name ?? \"Lexical scope\", props);\n }\n\n return <Scope value={scope}>{props.children}</Scope>;\n}\n"],"mappings":";;;;;;;;AA+BA,SAAgB,aAAa,OAA0B;CACrD,IAAI;AACJ,KAAI,WAAW,OAAO;AACpB,MAAI,EAAE,MAAM,iBAAiB,gBAC3B,OAAM,IAAI,UACR,uDACD;AAEH,UAAQ,MAAM;OAEd,SAAQ,mBAAmB,MAAM,QAAQ,iBAAiB,MAAM;AAGlE,QAAO,oBAAC,OAAD;EAAO,OAAO;YAAQ,MAAM;EAAiB"}
@@ -1,20 +0,0 @@
1
- import { Children } from "@alloy-js/core";
2
- import { TSOutputSymbol } from "@alloy-js/typescript";
3
-
4
- //#region src/typescript/contexts/member-scope.d.ts
5
- interface MemberScopeProps {
6
- children: Children;
7
- /**
8
- * The symbol that this member scope will create member symbols on.
9
- */
10
- ownerSymbol: TSOutputSymbol;
11
- }
12
- /**
13
- * A member scope for TypeScript. Member declarations will create symbols
14
- * in this scope, which will be added to the owner symbol's members.
15
- */
16
- declare function MemberScope(props: MemberScopeProps): Children;
17
- declare type __ΩMemberScopeProps = any[];
18
- //#endregion
19
- export { MemberScope, MemberScopeProps, __ΩMemberScopeProps };
20
- //# sourceMappingURL=member-scope.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"member-scope.d.cts","names":[],"sources":["../../../src/typescript/contexts/member-scope.tsx"],"mappings":";;;;UA6BiB,gBAAA;EACf,QAAA,EAAU,QAAA;EADK;;;EAMf,WAAA,EAAa,cAAA;AAAA;;;;;iBAOC,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;AAAA"}
@@ -1,20 +0,0 @@
1
- import { Children } from "@alloy-js/core";
2
- import { TSOutputSymbol } from "@alloy-js/typescript";
3
-
4
- //#region src/typescript/contexts/member-scope.d.ts
5
- interface MemberScopeProps {
6
- children: Children;
7
- /**
8
- * The symbol that this member scope will create member symbols on.
9
- */
10
- ownerSymbol: TSOutputSymbol;
11
- }
12
- /**
13
- * A member scope for TypeScript. Member declarations will create symbols
14
- * in this scope, which will be added to the owner symbol's members.
15
- */
16
- declare function MemberScope(props: MemberScopeProps): Children;
17
- declare type __ΩMemberScopeProps = any[];
18
- //#endregion
19
- export { MemberScope, MemberScopeProps, __ΩMemberScopeProps };
20
- //# sourceMappingURL=member-scope.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"member-scope.d.mts","names":[],"sources":["../../../src/typescript/contexts/member-scope.tsx"],"mappings":";;;;UA6BiB,gBAAA;EACf,QAAA,EAAU,QAAA;EADK;;;EAMf,WAAA,EAAa,cAAA;AAAA;;;;;iBAOC,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"member-scope.mjs","names":["CoreMemberScope"],"sources":["../../../src/typescript/contexts/member-scope.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 {\n Children,\n MemberScope as CoreMemberScope,\n createScope\n} from \"@alloy-js/core\";\nimport {\n TSMemberScope,\n TSOutputSymbol,\n useTSLexicalScopeIfPresent\n} from \"@alloy-js/typescript\";\n\nexport interface MemberScopeProps {\n children: Children;\n\n /**\n * The symbol that this member scope will create member symbols on.\n */\n ownerSymbol: TSOutputSymbol;\n}\n\n/**\n * A member scope for TypeScript. Member declarations will create symbols\n * in this scope, which will be added to the owner symbol's members.\n */\nexport function MemberScope(props: MemberScopeProps) {\n const parentScope = useTSLexicalScopeIfPresent();\n const binder = props.ownerSymbol.binder ?? parentScope?.binder;\n const memberScope = createScope(\n TSMemberScope,\n \"member-scope\",\n parentScope,\n props.ownerSymbol,\n {\n binder\n }\n );\n\n return (\n <CoreMemberScope value={memberScope}>{props.children}</CoreMemberScope>\n );\n}\n"],"mappings":";;;;;;;;;AA0CA,SAAgB,YAAY,OAAyB;CACnD,MAAM,cAAc,4BAA4B;CAChD,MAAM,SAAS,MAAM,YAAY,UAAU,aAAa;AAWxD,QACE,oBAACA,eAAD;EAAiB,OAXC,YAClB,eACA,gBACA,aACA,MAAM,aACN,EACE,QACD,CACF;YAGuC,MAAM;EAA2B"}
@@ -1,14 +0,0 @@
1
- import { CallSignatureProps } from "@alloy-js/typescript";
2
-
3
- //#region src/typescript/helpers/get-call-signature-props.d.ts
4
- /**
5
- * Get the properties for a call signature, applying any defaults as necessary.
6
- *
7
- * @param props - The properties for the call signature.
8
- * @param defaults - Optional default properties to apply to the call signature.
9
- * @returns The properties for the call signature, with defaults applied as necessary.
10
- */
11
- declare function getCallSignatureProps(props: CallSignatureProps, defaults?: Partial<CallSignatureProps>): CallSignatureProps;
12
- //#endregion
13
- export { getCallSignatureProps };
14
- //# sourceMappingURL=get-call-signature-props.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-call-signature-props.d.cts","names":[],"sources":["../../../src/typescript/helpers/get-call-signature-props.ts"],"mappings":";;;;;AA4BA;;;;;iBAAgB,qBAAA,CACd,KAAA,EAAO,kBAAA,EACP,QAAA,GAAW,OAAA,CAAQ,kBAAA,IAAmB,kBAAA"}
@@ -1,14 +0,0 @@
1
- import { CallSignatureProps } from "@alloy-js/typescript";
2
-
3
- //#region src/typescript/helpers/get-call-signature-props.d.ts
4
- /**
5
- * Get the properties for a call signature, applying any defaults as necessary.
6
- *
7
- * @param props - The properties for the call signature.
8
- * @param defaults - Optional default properties to apply to the call signature.
9
- * @returns The properties for the call signature, with defaults applied as necessary.
10
- */
11
- declare function getCallSignatureProps(props: CallSignatureProps, defaults?: Partial<CallSignatureProps>): CallSignatureProps;
12
- //#endregion
13
- export { getCallSignatureProps };
14
- //# sourceMappingURL=get-call-signature-props.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-call-signature-props.d.mts","names":[],"sources":["../../../src/typescript/helpers/get-call-signature-props.ts"],"mappings":";;;;;AA4BA;;;;;iBAAgB,qBAAA,CACd,KAAA,EAAO,kBAAA,EACP,QAAA,GAAW,OAAA,CAAQ,kBAAA,IAAmB,kBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-call-signature-props.mjs","names":[],"sources":["../../../src/typescript/helpers/get-call-signature-props.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 { defaultProps, splitProps } from \"@alloy-js/core\";\nimport { CallSignatureProps } from \"@alloy-js/typescript\";\n\n/**\n * Get the properties for a call signature, applying any defaults as necessary.\n *\n * @param props - The properties for the call signature.\n * @param defaults - Optional default properties to apply to the call signature.\n * @returns The properties for the call signature, with defaults applied as necessary.\n */\nexport function getCallSignatureProps(\n props: CallSignatureProps,\n defaults?: Partial<CallSignatureProps>\n) {\n const [callSignatureProps] = splitProps(props, [\n \"parameters\",\n \"parametersChildren\",\n \"typeParameters\",\n \"typeParametersChildren\",\n \"returnType\"\n ]);\n\n if (!defaults) {\n return callSignatureProps;\n }\n\n return defaultProps(callSignatureProps, defaults);\n}\n"],"mappings":";;;;;;;;;;AA4BA,SAAgB,sBACd,OACA,UACA;CACA,MAAM,CAAC,sBAAsB,WAAW,OAAO;EAC7C;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,KAAI,CAAC,SACH,QAAO;AAGT,QAAO,aAAa,oBAAoB,SAAS"}
@@ -1,3 +0,0 @@
1
- import { getCallSignatureProps } from "./get-call-signature-props.cjs";
2
- import { isValidJSIdentifier } from "./utilities.cjs";
3
- export { getCallSignatureProps, isValidJSIdentifier };
@@ -1,3 +0,0 @@
1
- import { getCallSignatureProps } from "./get-call-signature-props.mjs";
2
- import { isValidJSIdentifier } from "./utilities.mjs";
3
- export { getCallSignatureProps, isValidJSIdentifier };
@@ -1,11 +0,0 @@
1
- //#region src/typescript/helpers/utilities.d.ts
2
- /**
3
- * Check if a string is a valid JavaScript identifier.
4
- *
5
- * @param identifier - The string to check.
6
- * @returns `true` if the string is a valid JavaScript identifier, `false` otherwise.
7
- */
8
- declare function isValidJSIdentifier(identifier: string): boolean;
9
- //#endregion
10
- export { isValidJSIdentifier };
11
- //# sourceMappingURL=utilities.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilities.d.cts","names":[],"sources":["../../../src/typescript/helpers/utilities.ts"],"mappings":";;AAwBA;;;;;iBAAgB,mBAAA,CAAoB,UAAA"}
@@ -1,11 +0,0 @@
1
- //#region src/typescript/helpers/utilities.d.ts
2
- /**
3
- * Check if a string is a valid JavaScript identifier.
4
- *
5
- * @param identifier - The string to check.
6
- * @returns `true` if the string is a valid JavaScript identifier, `false` otherwise.
7
- */
8
- declare function isValidJSIdentifier(identifier: string): boolean;
9
- //#endregion
10
- export { isValidJSIdentifier };
11
- //# sourceMappingURL=utilities.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilities.d.mts","names":[],"sources":["../../../src/typescript/helpers/utilities.ts"],"mappings":";;AAwBA;;;;;iBAAgB,mBAAA,CAAoB,UAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilities.mjs","names":[],"sources":["../../../src/typescript/helpers/utilities.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\n/**\n * Check if a string is a valid JavaScript identifier.\n *\n * @param identifier - The string to check.\n * @returns `true` if the string is a valid JavaScript identifier, `false` otherwise.\n */\nexport function isValidJSIdentifier(identifier: string) {\n return /^[\\p{ID_Start}$_][\\p{ID_Continue}$\\u200C\\u200D]*$/u.test(identifier);\n}\n"],"mappings":";;;;;;;AAwBA,SAAgB,oBAAoB,YAAoB;AACtD,QAAO,qDAAqD,KAAK,WAAW"}
@@ -1,18 +0,0 @@
1
- import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps } from "./components/tsdoc.cjs";
2
- import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps } from "./components/typescript-file.cjs";
3
- import { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps } from "./components/builtin-file.cjs";
4
- import { TypeParameters, TypeParametersProps, __ΩTypeParametersProps } from "./components/type-parameters.cjs";
5
- import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps } from "./components/class-declaration.cjs";
6
- import { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps } from "./components/dynamic-import-statement.cjs";
7
- import { EntryFile, EntryFileProps, __ΩEntryFileProps } from "./components/entry-file.cjs";
8
- import { InfrastructureFile, InfrastructureFileProps, __ΩInfrastructureFileProps } from "./components/infrastructure-file.cjs";
9
- import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps } from "./components/interface-declaration.cjs";
10
- import { ComputedRef, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, __ΩComputedRef, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps } from "./components/object-declaration.cjs";
11
- import { PropertyName, PropertyNameProps, __ΩPropertyNameProps } from "./components/property-name.cjs";
12
- import { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps } from "./components/record-expression.cjs";
13
- import { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, __ΩTSDocReflectionClassProps, __ΩTSDocReflectionMethodProps, __ΩTSDocReflectionPropertyProps } from "./components/tsdoc-reflection.cjs";
14
- import { TypeDeclaration, TypeDeclarationProps, __ΩTypeDeclarationProps } from "./components/type-declaration.cjs";
15
- import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue } from "./contexts/lexical-scope.cjs";
16
- import { getCallSignatureProps } from "./helpers/get-call-signature-props.cjs";
17
- import { isValidJSIdentifier } from "./helpers/utilities.cjs";
18
- export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InfrastructureFile, InfrastructureFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩBuiltinFileProps, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps, __ΩComputedRef, __ΩDynamicImportStatementProps, __ΩEntryFileProps, __ΩInfrastructureFileProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps, __ΩPropertyNameProps, __ΩRecordExpressionProps, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocReflectionClassProps, __ΩTSDocReflectionMethodProps, __ΩTSDocReflectionPropertyProps, __ΩTSDocTagProps, __ΩTypeDeclarationProps, __ΩTypeParametersProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps, getCallSignatureProps, isValidJSIdentifier };
@@ -1,18 +0,0 @@
1
- import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps } from "./components/tsdoc.mjs";
2
- import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps } from "./components/typescript-file.mjs";
3
- import { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps } from "./components/builtin-file.mjs";
4
- import { TypeParameters, TypeParametersProps, __ΩTypeParametersProps } from "./components/type-parameters.mjs";
5
- import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps } from "./components/class-declaration.mjs";
6
- import { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps } from "./components/dynamic-import-statement.mjs";
7
- import { EntryFile, EntryFileProps, __ΩEntryFileProps } from "./components/entry-file.mjs";
8
- import { InfrastructureFile, InfrastructureFileProps, __ΩInfrastructureFileProps } from "./components/infrastructure-file.mjs";
9
- import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps } from "./components/interface-declaration.mjs";
10
- import { ComputedRef, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, __ΩComputedRef, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps } from "./components/object-declaration.mjs";
11
- import { PropertyName, PropertyNameProps, __ΩPropertyNameProps } from "./components/property-name.mjs";
12
- import { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps } from "./components/record-expression.mjs";
13
- import { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, __ΩTSDocReflectionClassProps, __ΩTSDocReflectionMethodProps, __ΩTSDocReflectionPropertyProps } from "./components/tsdoc-reflection.mjs";
14
- import { TypeDeclaration, TypeDeclarationProps, __ΩTypeDeclarationProps } from "./components/type-declaration.mjs";
15
- import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue } from "./contexts/lexical-scope.mjs";
16
- import { getCallSignatureProps } from "./helpers/get-call-signature-props.mjs";
17
- import { isValidJSIdentifier } from "./helpers/utilities.mjs";
18
- export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InfrastructureFile, InfrastructureFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩBuiltinFileProps, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps, __ΩComputedRef, __ΩDynamicImportStatementProps, __ΩEntryFileProps, __ΩInfrastructureFileProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps, __ΩPropertyNameProps, __ΩRecordExpressionProps, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocReflectionClassProps, __ΩTSDocReflectionMethodProps, __ΩTSDocReflectionPropertyProps, __ΩTSDocTagProps, __ΩTypeDeclarationProps, __ΩTypeParametersProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps, getCallSignatureProps, isValidJSIdentifier };
@@ -1,2 +0,0 @@
1
- import { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps } from "./yaml-file.cjs";
2
- export { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps };
@@ -1,2 +0,0 @@
1
- import { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps } from "./yaml-file.mjs";
2
- export { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps };
@@ -1,34 +0,0 @@
1
- import { ComponentProps, SourceFileHeaderProps } from "../../types/components.cjs";
2
- import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.cjs";
3
- import { Children } from "@alloy-js/core";
4
-
5
- //#region src/yaml/components/yaml-file.d.ts
6
- interface YamlData {
7
- [key: string]: string | number | boolean | YamlData | YamlData[];
8
- }
9
- type YamlFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & {
10
- header?: Children;
11
- data?: YamlData;
12
- };
13
- /**
14
- * A base component representing a Powerlines generated YAML source file.
15
- *
16
- * @remarks
17
- * The file content can be provided either through the `data` prop, which accepts a nested object representing the YAML structure, or through the `children` prop, which allows for custom YAML content to be rendered. The `header` prop can be used to provide custom header content for the YAML file, which is rendered above the generated file header warning and generation comment.
18
- *
19
- * @param props - The properties for the source file.
20
- * @returns The rendered source file component.
21
- */
22
- declare function YamlFile(props: YamlFileProps): Children;
23
- /**
24
- * Renders the header for a Powerlines YAML source file.
25
- *
26
- * @param props - The properties for the source file header.
27
- * @returns The rendered source file header.
28
- */
29
- declare function YamlFileHeader(props: SourceFileHeaderProps): Children;
30
- declare type __ΩYamlData = any[];
31
- declare type __ΩYamlFileProps = any[];
32
- //#endregion
33
- export { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps };
34
- //# sourceMappingURL=yaml-file.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"yaml-file.d.cts","names":[],"sources":["../../../src/yaml/components/yaml-file.tsx"],"mappings":";;;;;UA4BiB,QAAA;EAAA,CACd,GAAA,uCAA0C,QAAA,GAAW,QAAA;AAAA;AAAA,KAoD5C,aAAA,GAAgB,IAAA,CAAK,iBAAA,gBAC/B,cAAA;EACE,MAAA,GAAS,QAAA;EACT,IAAA,GAAO,QAAA;AAAA;;;;;AAHX;;;;;iBAegB,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA;;;;;;;iBAiC7B,cAAA,CAAe,KAAA,EAAO,qBAAA,GAAqB,QAAA;AAAA"}
@@ -1,34 +0,0 @@
1
- import { ComponentProps, SourceFileHeaderProps } from "../../types/components.mjs";
2
- import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.mjs";
3
- import { Children } from "@alloy-js/core";
4
-
5
- //#region src/yaml/components/yaml-file.d.ts
6
- interface YamlData {
7
- [key: string]: string | number | boolean | YamlData | YamlData[];
8
- }
9
- type YamlFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & {
10
- header?: Children;
11
- data?: YamlData;
12
- };
13
- /**
14
- * A base component representing a Powerlines generated YAML source file.
15
- *
16
- * @remarks
17
- * The file content can be provided either through the `data` prop, which accepts a nested object representing the YAML structure, or through the `children` prop, which allows for custom YAML content to be rendered. The `header` prop can be used to provide custom header content for the YAML file, which is rendered above the generated file header warning and generation comment.
18
- *
19
- * @param props - The properties for the source file.
20
- * @returns The rendered source file component.
21
- */
22
- declare function YamlFile(props: YamlFileProps): Children;
23
- /**
24
- * Renders the header for a Powerlines YAML source file.
25
- *
26
- * @param props - The properties for the source file header.
27
- * @returns The rendered source file header.
28
- */
29
- declare function YamlFileHeader(props: SourceFileHeaderProps): Children;
30
- declare type __ΩYamlData = any[];
31
- declare type __ΩYamlFileProps = any[];
32
- //#endregion
33
- export { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps };
34
- //# sourceMappingURL=yaml-file.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"yaml-file.d.mts","names":[],"sources":["../../../src/yaml/components/yaml-file.tsx"],"mappings":";;;;;UA4BiB,QAAA;EAAA,CACd,GAAA,uCAA0C,QAAA,GAAW,QAAA;AAAA;AAAA,KAoD5C,aAAA,GAAgB,IAAA,CAAK,iBAAA,gBAC/B,cAAA;EACE,MAAA,GAAS,QAAA;EACT,IAAA,GAAO,QAAA;AAAA;;;;;AAHX;;;;;iBAegB,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA;;;;;;;iBAiC7B,cAAA,CAAe,KAAA,EAAO,qBAAA,GAAqB,QAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"yaml-file.mjs","names":[],"sources":["../../../src/yaml/components/yaml-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 type { Children } from \"@alloy-js/core\";\nimport { code, For, Show, splitProps } from \"@alloy-js/core\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { getFileHeaderWarning } from \"powerlines/utils\";\nimport { SingleLineComment } from \"../../core/components/single-line-comment\";\nimport { SourceFile, SourceFileProps } from \"../../core/components/source-file\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { ComponentProps, SourceFileHeaderProps } from \"../../types/components\";\n\nexport interface YamlData {\n [key: string]: string | number | boolean | YamlData | YamlData[];\n}\n\ninterface YamlFileDataItemProps {\n value: string | number | boolean | YamlData | YamlData[];\n key?: string;\n}\n\nfunction YamlFileDataItem({ key, value }: YamlFileDataItemProps) {\n return (\n <>\n <Show when={Boolean(key)}>{code`${key}:`}</Show>\n <Show\n when={\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\"\n }>\n {code` ${String(value)}`}\n </Show>\n <Show when={isSetObject(value) && !Array.isArray(value)}>\n <For each={Object.entries(value as YamlData)}>\n {([nestedKey, nestedValue]) => (\n <YamlFileDataItem key={nestedKey} value={nestedValue} />\n )}\n </For>\n </Show>\n <Show when={Array.isArray(value)}>\n <For each={value as YamlData[]}>\n {item => <YamlFileDataItem value={item} />}\n </For>\n </Show>\n </>\n );\n}\n\ninterface YamlFileDataProps {\n data?: YamlData;\n}\n\nfunction YamlFileData({ data }: YamlFileDataProps) {\n return (\n <>\n <Show when={Boolean(data)}>\n <For each={Object.entries(data ?? {})}>\n {([key, value]) => <YamlFileDataItem key={key} value={value} />}\n </For>\n </Show>\n </>\n );\n}\n\nexport type YamlFileProps = Omit<SourceFileProps, \"filetype\"> &\n ComponentProps & {\n header?: Children;\n data?: YamlData;\n };\n\n/**\n * A base component representing a Powerlines generated YAML source file.\n *\n * @remarks\n * The file content can be provided either through the `data` prop, which accepts a nested object representing the YAML structure, or through the `children` prop, which allows for custom YAML content to be rendered. The `header` prop can be used to provide custom header content for the YAML file, which is rendered above the generated file header warning and generation comment.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function YamlFile(props: YamlFileProps) {\n const [{ children, path, data, header }, rest] = splitProps(props, [\n \"children\",\n \"path\",\n \"data\",\n \"header\"\n ]);\n\n return (\n <SourceFile\n {...rest}\n path={path}\n header={<YamlFileHeader>{header}</YamlFileHeader>}\n filetype=\"yaml\">\n <Show when={Boolean(data)}>\n <YamlFileData data={data} />\n </Show>\n <Show when={Boolean(children)}>\n <>\n {children}\n <hbr />\n </>\n </Show>\n </SourceFile>\n );\n}\n\n/**\n * Renders the header for a Powerlines YAML source file.\n *\n * @param props - The properties for the source file header.\n * @returns The rendered source file header.\n */\nexport function YamlFileHeader(props: SourceFileHeaderProps) {\n const { children } = props;\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n <Show when={Boolean(children)}>\n <>\n {children}\n <hbr />\n </>\n </Show>\n <SingleLineComment>{`Generated by ${\n titleCase(context?.config?.framework) || \"Powerlines\"\n }`}</SingleLineComment>\n <hbr />\n <SingleLineComment variant=\"yaml\">\n {getFileHeaderWarning(context!)}\n </SingleLineComment>\n <hbr />\n </>\n );\n}\n"],"mappings":";;;;;;;;;;AAqCA,SAAS,iBAAiB,EAAE,KAAK,SAAgC;AAC/D,QACE;EACE,oBAAC,MAAD;GAAM,MAAM,QAAQ,IAAI;aAAG,IAAI,GAAG,IAAI;GAAU;EAChD,oBAAC,MAAD;GACE,MACE,OAAO,UAAU,YACjB,OAAO,UAAU,YACjB,OAAO,UAAU;aAElB,IAAI,KAAK,OAAO,MAAM;GAClB;EACP,oBAAC,MAAD;GAAM,MAAM,YAAY,MAAM,IAAI,CAAC,MAAM,QAAQ,MAAM;aACrD,oBAAC,KAAD;IAAK,MAAM,OAAO,QAAQ,MAAkB;eACxC,CAAC,WAAW,iBACZ,oBAAC,kBAAD,EAAkC,OAAO,aAAe,EAAjC,UAAiC;IAEtD;GACD;EACP,oBAAC,MAAD;GAAM,MAAM,MAAM,QAAQ,MAAM;aAC9B,oBAAC,KAAD;IAAK,MAAM;eACR,SAAQ,oBAAC,kBAAD,EAAkB,OAAO,MAAQ;IACtC;GACD;EACN;;AAQP,SAAS,aAAa,EAAE,QAA2B;AACjD,QACE,0CACE,oBAAC,MAAD;EAAM,MAAM,QAAQ,KAAK;YACvB,oBAAC,KAAD;GAAK,MAAM,OAAO,QAAQ,QAAQ,EAAE,CAAC;cACjC,CAAC,KAAK,WAAW,oBAAC,kBAAD,EAAmC,OAAS,EAArB,IAAqB;GAC3D;EACD,GACN;;;;;;;;;;;AAmBP,SAAgB,SAAS,OAAsB;CAC7C,MAAM,CAAC,EAAE,UAAU,MAAM,MAAM,UAAU,QAAQ,WAAW,OAAO;EACjE;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,qBAAC,YAAD;EACE,GAAI;EACE;EACN,QAAQ,oBAAC,gBAAD,YAAiB,QAAwB;EACjD,UAAS;YAJX,CAKE,oBAAC,MAAD;GAAM,MAAM,QAAQ,KAAK;aACvB,oBAAC,cAAD,EAAoB,MAAQ;GACvB,GACP,oBAAC,MAAD;GAAM,MAAM,QAAQ,SAAS;aAC3B,4CACG,UACD,oBAAC,OAAD,EAAO,EACN;GACE,EACI;;;;;;;;;AAUjB,SAAgB,eAAe,OAA8B;CAC3D,MAAM,EAAE,aAAa;CAErB,MAAM,UAAU,mBAAmB;AAEnC,QACE;EACE,oBAAC,MAAD;GAAM,MAAM,QAAQ,SAAS;aAC3B,4CACG,UACD,oBAAC,OAAD,EAAO,EACN;GACE;EACP,oBAAC,mBAAD,YAAoB,gBAClB,UAAU,SAAS,QAAQ,UAAU,IAAI,gBACpB;EACvB,oBAAC,OAAD,EAAO;EACP,oBAAC,mBAAD;GAAmB,SAAQ;aACxB,qBAAqB,QAAS;GACb;EACpB,oBAAC,OAAD,EAAO;EACN"}
@@ -1,2 +0,0 @@
1
- import { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps } from "./components/yaml-file.cjs";
2
- export { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps };
@@ -1,2 +0,0 @@
1
- import { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps } from "./components/yaml-file.mjs";
2
- export { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps };