@powerlines/plugin-alloy 0.25.15 → 0.25.17

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 (261) hide show
  1. package/dist/core/components/output.mjs +1 -2
  2. package/dist/core/components/single-line-comment.mjs +1 -2
  3. package/dist/core/components/source-file.mjs +1 -2
  4. package/dist/core/components/spacing.mjs +1 -2
  5. package/dist/core/contexts/context.mjs +1 -2
  6. package/dist/core/contexts/meta.mjs +1 -2
  7. package/dist/core/contexts/reflection.mjs +1 -2
  8. package/dist/core/helpers/code.mjs +1 -2
  9. package/dist/helpers/capnp.mjs +1 -2
  10. package/dist/helpers/create-builtin.mjs +1 -2
  11. package/dist/helpers/refkey.mjs +1 -2
  12. package/dist/helpers/typescript.mjs +1 -2
  13. package/dist/index.mjs +1 -2
  14. package/dist/markdown/components/front-matter.mjs +1 -2
  15. package/dist/markdown/components/markdown-file.mjs +1 -2
  16. package/dist/markdown/components/markdown-table.mjs +1 -2
  17. package/dist/markdown/contexts/markdown-table.mjs +1 -2
  18. package/dist/render.mjs +1 -2
  19. package/dist/typescript/components/builtin-file.mjs +1 -2
  20. package/dist/typescript/components/class-declaration.mjs +1 -2
  21. package/dist/typescript/components/dynamic-import-statement.mjs +1 -2
  22. package/dist/typescript/components/entry-file.mjs +1 -2
  23. package/dist/typescript/components/infrastructure-file.mjs +1 -2
  24. package/dist/typescript/components/interface-declaration.mjs +1 -2
  25. package/dist/typescript/components/object-declaration.mjs +1 -2
  26. package/dist/typescript/components/property-name.mjs +1 -2
  27. package/dist/typescript/components/record-expression.mjs +1 -2
  28. package/dist/typescript/components/tsdoc-reflection.mjs +1 -2
  29. package/dist/typescript/components/tsdoc.mjs +1 -2
  30. package/dist/typescript/components/type-declaration.mjs +1 -2
  31. package/dist/typescript/components/type-parameters.mjs +1 -2
  32. package/dist/typescript/components/typescript-file.mjs +1 -2
  33. package/dist/typescript/contexts/lexical-scope.mjs +1 -2
  34. package/dist/typescript/contexts/member-scope.mjs +1 -2
  35. package/dist/typescript/helpers/get-call-signature-props.mjs +1 -2
  36. package/dist/typescript/helpers/utilities.mjs +1 -2
  37. package/dist/yaml/components/yaml-file.mjs +1 -2
  38. package/package.json +18 -18
  39. package/dist/core/components/index.d.cts +0 -5
  40. package/dist/core/components/index.d.mts +0 -5
  41. package/dist/core/components/output.d.cts +0 -25
  42. package/dist/core/components/output.d.cts.map +0 -1
  43. package/dist/core/components/output.d.mts +0 -25
  44. package/dist/core/components/output.d.mts.map +0 -1
  45. package/dist/core/components/output.mjs.map +0 -1
  46. package/dist/core/components/single-line-comment.d.cts +0 -23
  47. package/dist/core/components/single-line-comment.d.cts.map +0 -1
  48. package/dist/core/components/single-line-comment.d.mts +0 -23
  49. package/dist/core/components/single-line-comment.d.mts.map +0 -1
  50. package/dist/core/components/single-line-comment.mjs.map +0 -1
  51. package/dist/core/components/source-file.d.cts +0 -33
  52. package/dist/core/components/source-file.d.cts.map +0 -1
  53. package/dist/core/components/source-file.d.mts +0 -33
  54. package/dist/core/components/source-file.d.mts.map +0 -1
  55. package/dist/core/components/source-file.mjs.map +0 -1
  56. package/dist/core/components/spacing.d.cts +0 -24
  57. package/dist/core/components/spacing.d.cts.map +0 -1
  58. package/dist/core/components/spacing.d.mts +0 -24
  59. package/dist/core/components/spacing.d.mts.map +0 -1
  60. package/dist/core/components/spacing.mjs.map +0 -1
  61. package/dist/core/contexts/context.d.cts +0 -30
  62. package/dist/core/contexts/context.d.cts.map +0 -1
  63. package/dist/core/contexts/context.d.mts +0 -30
  64. package/dist/core/contexts/context.d.mts.map +0 -1
  65. package/dist/core/contexts/context.mjs.map +0 -1
  66. package/dist/core/contexts/index.d.cts +0 -4
  67. package/dist/core/contexts/index.d.mts +0 -4
  68. package/dist/core/contexts/meta.d.cts +0 -48
  69. package/dist/core/contexts/meta.d.cts.map +0 -1
  70. package/dist/core/contexts/meta.d.mts +0 -48
  71. package/dist/core/contexts/meta.d.mts.map +0 -1
  72. package/dist/core/contexts/meta.mjs.map +0 -1
  73. package/dist/core/contexts/reflection.d.cts +0 -53
  74. package/dist/core/contexts/reflection.d.cts.map +0 -1
  75. package/dist/core/contexts/reflection.d.mts +0 -53
  76. package/dist/core/contexts/reflection.d.mts.map +0 -1
  77. package/dist/core/contexts/reflection.mjs.map +0 -1
  78. package/dist/core/helpers/code.d.cts +0 -30
  79. package/dist/core/helpers/code.d.cts.map +0 -1
  80. package/dist/core/helpers/code.d.mts +0 -30
  81. package/dist/core/helpers/code.d.mts.map +0 -1
  82. package/dist/core/helpers/code.mjs.map +0 -1
  83. package/dist/core/helpers/index.d.cts +0 -2
  84. package/dist/core/helpers/index.d.mts +0 -2
  85. package/dist/core/index.d.cts +0 -12
  86. package/dist/core/index.d.mts +0 -12
  87. package/dist/helpers/capnp.d.cts +0 -88
  88. package/dist/helpers/capnp.d.cts.map +0 -1
  89. package/dist/helpers/capnp.d.mts +0 -88
  90. package/dist/helpers/capnp.d.mts.map +0 -1
  91. package/dist/helpers/capnp.mjs.map +0 -1
  92. package/dist/helpers/create-builtin.d.cts +0 -16
  93. package/dist/helpers/create-builtin.d.cts.map +0 -1
  94. package/dist/helpers/create-builtin.d.mts +0 -16
  95. package/dist/helpers/create-builtin.d.mts.map +0 -1
  96. package/dist/helpers/create-builtin.mjs.map +0 -1
  97. package/dist/helpers/index.d.cts +0 -5
  98. package/dist/helpers/index.d.mts +0 -5
  99. package/dist/helpers/refkey.d.cts +0 -14
  100. package/dist/helpers/refkey.d.cts.map +0 -1
  101. package/dist/helpers/refkey.d.mts +0 -14
  102. package/dist/helpers/refkey.d.mts.map +0 -1
  103. package/dist/helpers/refkey.mjs.map +0 -1
  104. package/dist/helpers/typescript.d.cts +0 -26
  105. package/dist/helpers/typescript.d.cts.map +0 -1
  106. package/dist/helpers/typescript.d.mts +0 -26
  107. package/dist/helpers/typescript.d.mts.map +0 -1
  108. package/dist/helpers/typescript.mjs.map +0 -1
  109. package/dist/index.d.cts +0 -19
  110. package/dist/index.d.cts.map +0 -1
  111. package/dist/index.d.mts +0 -19
  112. package/dist/index.d.mts.map +0 -1
  113. package/dist/index.mjs.map +0 -1
  114. package/dist/markdown/components/front-matter.d.cts +0 -16
  115. package/dist/markdown/components/front-matter.d.cts.map +0 -1
  116. package/dist/markdown/components/front-matter.d.mts +0 -16
  117. package/dist/markdown/components/front-matter.d.mts.map +0 -1
  118. package/dist/markdown/components/front-matter.mjs.map +0 -1
  119. package/dist/markdown/components/index.d.cts +0 -4
  120. package/dist/markdown/components/index.d.mts +0 -4
  121. package/dist/markdown/components/markdown-file.d.cts +0 -29
  122. package/dist/markdown/components/markdown-file.d.cts.map +0 -1
  123. package/dist/markdown/components/markdown-file.d.mts +0 -29
  124. package/dist/markdown/components/markdown-file.d.mts.map +0 -1
  125. package/dist/markdown/components/markdown-file.mjs.map +0 -1
  126. package/dist/markdown/components/markdown-table.d.cts +0 -28
  127. package/dist/markdown/components/markdown-table.d.cts.map +0 -1
  128. package/dist/markdown/components/markdown-table.d.mts +0 -28
  129. package/dist/markdown/components/markdown-table.d.mts.map +0 -1
  130. package/dist/markdown/components/markdown-table.mjs.map +0 -1
  131. package/dist/markdown/contexts/index.d.cts +0 -2
  132. package/dist/markdown/contexts/index.d.mts +0 -2
  133. package/dist/markdown/contexts/markdown-table.d.cts +0 -38
  134. package/dist/markdown/contexts/markdown-table.d.cts.map +0 -1
  135. package/dist/markdown/contexts/markdown-table.d.mts +0 -38
  136. package/dist/markdown/contexts/markdown-table.d.mts.map +0 -1
  137. package/dist/markdown/contexts/markdown-table.mjs.map +0 -1
  138. package/dist/markdown/index.d.cts +0 -7
  139. package/dist/markdown/index.d.mts +0 -7
  140. package/dist/render.d.cts +0 -39
  141. package/dist/render.d.cts.map +0 -1
  142. package/dist/render.d.mts +0 -39
  143. package/dist/render.d.mts.map +0 -1
  144. package/dist/render.mjs.map +0 -1
  145. package/dist/types/components.d.cts +0 -142
  146. package/dist/types/components.d.cts.map +0 -1
  147. package/dist/types/components.d.mts +0 -142
  148. package/dist/types/components.d.mts.map +0 -1
  149. package/dist/types/index.d.cts +0 -3
  150. package/dist/types/index.d.mts +0 -3
  151. package/dist/types/plugin.d.cts +0 -39
  152. package/dist/types/plugin.d.cts.map +0 -1
  153. package/dist/types/plugin.d.mts +0 -39
  154. package/dist/types/plugin.d.mts.map +0 -1
  155. package/dist/typescript/components/builtin-file.d.cts +0 -35
  156. package/dist/typescript/components/builtin-file.d.cts.map +0 -1
  157. package/dist/typescript/components/builtin-file.d.mts +0 -35
  158. package/dist/typescript/components/builtin-file.d.mts.map +0 -1
  159. package/dist/typescript/components/builtin-file.mjs.map +0 -1
  160. package/dist/typescript/components/class-declaration.d.cts +0 -145
  161. package/dist/typescript/components/class-declaration.d.cts.map +0 -1
  162. package/dist/typescript/components/class-declaration.d.mts +0 -145
  163. package/dist/typescript/components/class-declaration.d.mts.map +0 -1
  164. package/dist/typescript/components/class-declaration.mjs.map +0 -1
  165. package/dist/typescript/components/dynamic-import-statement.d.cts +0 -33
  166. package/dist/typescript/components/dynamic-import-statement.d.cts.map +0 -1
  167. package/dist/typescript/components/dynamic-import-statement.d.mts +0 -33
  168. package/dist/typescript/components/dynamic-import-statement.d.mts.map +0 -1
  169. package/dist/typescript/components/dynamic-import-statement.mjs.map +0 -1
  170. package/dist/typescript/components/entry-file.d.cts +0 -28
  171. package/dist/typescript/components/entry-file.d.cts.map +0 -1
  172. package/dist/typescript/components/entry-file.d.mts +0 -28
  173. package/dist/typescript/components/entry-file.d.mts.map +0 -1
  174. package/dist/typescript/components/entry-file.mjs.map +0 -1
  175. package/dist/typescript/components/index.d.cts +0 -15
  176. package/dist/typescript/components/index.d.mts +0 -15
  177. package/dist/typescript/components/infrastructure-file.d.cts +0 -21
  178. package/dist/typescript/components/infrastructure-file.d.cts.map +0 -1
  179. package/dist/typescript/components/infrastructure-file.d.mts +0 -21
  180. package/dist/typescript/components/infrastructure-file.d.mts.map +0 -1
  181. package/dist/typescript/components/infrastructure-file.mjs.map +0 -1
  182. package/dist/typescript/components/interface-declaration.d.cts +0 -86
  183. package/dist/typescript/components/interface-declaration.d.cts.map +0 -1
  184. package/dist/typescript/components/interface-declaration.d.mts +0 -86
  185. package/dist/typescript/components/interface-declaration.d.mts.map +0 -1
  186. package/dist/typescript/components/interface-declaration.mjs.map +0 -1
  187. package/dist/typescript/components/object-declaration.d.cts +0 -30
  188. package/dist/typescript/components/object-declaration.d.cts.map +0 -1
  189. package/dist/typescript/components/object-declaration.d.mts +0 -30
  190. package/dist/typescript/components/object-declaration.d.mts.map +0 -1
  191. package/dist/typescript/components/object-declaration.mjs.map +0 -1
  192. package/dist/typescript/components/property-name.d.cts +0 -24
  193. package/dist/typescript/components/property-name.d.cts.map +0 -1
  194. package/dist/typescript/components/property-name.d.mts +0 -24
  195. package/dist/typescript/components/property-name.d.mts.map +0 -1
  196. package/dist/typescript/components/property-name.mjs.map +0 -1
  197. package/dist/typescript/components/record-expression.d.cts +0 -13
  198. package/dist/typescript/components/record-expression.d.cts.map +0 -1
  199. package/dist/typescript/components/record-expression.d.mts +0 -13
  200. package/dist/typescript/components/record-expression.d.mts.map +0 -1
  201. package/dist/typescript/components/record-expression.mjs.map +0 -1
  202. package/dist/typescript/components/tsdoc-reflection.d.cts +0 -44
  203. package/dist/typescript/components/tsdoc-reflection.d.cts.map +0 -1
  204. package/dist/typescript/components/tsdoc-reflection.d.mts +0 -44
  205. package/dist/typescript/components/tsdoc-reflection.d.mts.map +0 -1
  206. package/dist/typescript/components/tsdoc-reflection.mjs.map +0 -1
  207. package/dist/typescript/components/tsdoc.d.cts +0 -164
  208. package/dist/typescript/components/tsdoc.d.cts.map +0 -1
  209. package/dist/typescript/components/tsdoc.d.mts +0 -164
  210. package/dist/typescript/components/tsdoc.d.mts.map +0 -1
  211. package/dist/typescript/components/tsdoc.mjs.map +0 -1
  212. package/dist/typescript/components/type-declaration.d.cts +0 -18
  213. package/dist/typescript/components/type-declaration.d.cts.map +0 -1
  214. package/dist/typescript/components/type-declaration.d.mts +0 -18
  215. package/dist/typescript/components/type-declaration.d.mts.map +0 -1
  216. package/dist/typescript/components/type-declaration.mjs.map +0 -1
  217. package/dist/typescript/components/type-parameters.d.cts +0 -24
  218. package/dist/typescript/components/type-parameters.d.cts.map +0 -1
  219. package/dist/typescript/components/type-parameters.d.mts +0 -24
  220. package/dist/typescript/components/type-parameters.d.mts.map +0 -1
  221. package/dist/typescript/components/type-parameters.mjs.map +0 -1
  222. package/dist/typescript/components/typescript-file.d.cts +0 -50
  223. package/dist/typescript/components/typescript-file.d.cts.map +0 -1
  224. package/dist/typescript/components/typescript-file.d.mts +0 -50
  225. package/dist/typescript/components/typescript-file.d.mts.map +0 -1
  226. package/dist/typescript/components/typescript-file.mjs.map +0 -1
  227. package/dist/typescript/contexts/index.d.cts +0 -2
  228. package/dist/typescript/contexts/index.d.mts +0 -2
  229. package/dist/typescript/contexts/lexical-scope.d.cts +0 -17
  230. package/dist/typescript/contexts/lexical-scope.d.cts.map +0 -1
  231. package/dist/typescript/contexts/lexical-scope.d.mts +0 -17
  232. package/dist/typescript/contexts/lexical-scope.d.mts.map +0 -1
  233. package/dist/typescript/contexts/lexical-scope.mjs.map +0 -1
  234. package/dist/typescript/contexts/member-scope.d.cts +0 -20
  235. package/dist/typescript/contexts/member-scope.d.cts.map +0 -1
  236. package/dist/typescript/contexts/member-scope.d.mts +0 -20
  237. package/dist/typescript/contexts/member-scope.d.mts.map +0 -1
  238. package/dist/typescript/contexts/member-scope.mjs.map +0 -1
  239. package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -15
  240. package/dist/typescript/helpers/get-call-signature-props.d.cts.map +0 -1
  241. package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -15
  242. package/dist/typescript/helpers/get-call-signature-props.d.mts.map +0 -1
  243. package/dist/typescript/helpers/get-call-signature-props.mjs.map +0 -1
  244. package/dist/typescript/helpers/index.d.cts +0 -3
  245. package/dist/typescript/helpers/index.d.mts +0 -3
  246. package/dist/typescript/helpers/utilities.d.cts +0 -11
  247. package/dist/typescript/helpers/utilities.d.cts.map +0 -1
  248. package/dist/typescript/helpers/utilities.d.mts +0 -11
  249. package/dist/typescript/helpers/utilities.d.mts.map +0 -1
  250. package/dist/typescript/helpers/utilities.mjs.map +0 -1
  251. package/dist/typescript/index.d.cts +0 -21
  252. package/dist/typescript/index.d.mts +0 -21
  253. package/dist/yaml/components/index.d.cts +0 -2
  254. package/dist/yaml/components/index.d.mts +0 -2
  255. package/dist/yaml/components/yaml-file.d.cts +0 -34
  256. package/dist/yaml/components/yaml-file.d.cts.map +0 -1
  257. package/dist/yaml/components/yaml-file.d.mts +0 -34
  258. package/dist/yaml/components/yaml-file.d.mts.map +0 -1
  259. package/dist/yaml/components/yaml-file.mjs.map +0 -1
  260. package/dist/yaml/index.d.cts +0 -3
  261. package/dist/yaml/index.d.mts +0 -3
@@ -1 +0,0 @@
1
- {"version":3,"file":"type-parameters.mjs","names":["For","Indent","Show","TypeRefContext","typeParameter","param","_$createComponent","when","fallback","children","_$createIntrinsic","_$memo","name","extends","default","TypeParameters","props","parameters","undefined","softline","each","comma","line"],"sources":["../../../src/typescript/components/type-parameters.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Children, For, Indent, Show } from \"@alloy-js/core\";\nimport { TypeParameterDescriptor, TypeRefContext } from \"@alloy-js/typescript\";\n\n/** Props for type parameters */\nexport interface TypeParametersProps {\n /** Parameters */\n parameters?: TypeParameterDescriptor[] | string[];\n /** Jsx Children */\n children?: Children;\n}\n\nfunction typeParameter(param: TypeParameterDescriptor | string) {\n return (\n <Show when={typeof param === \"object\"} fallback={<>{param}</>}>\n <group>\n {(param as TypeParameterDescriptor).name}\n <Show when={!!(param as TypeParameterDescriptor).extends}>\n {\" \"}\n extends\n <indent>\n {\" \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).extends}\n </TypeRefContext>\n </indent>\n </Show>\n <Show when={!!(param as TypeParameterDescriptor).default}>\n {\" = \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).default}\n </TypeRefContext>\n </Show>\n </group>{\" \"}\n </Show>\n );\n}\n\n/**\n * Represent type parameters\n *\n * @example\n * ```ts\n * <A, B extends string>\n * ```\n */\nexport function TypeParameters(props: TypeParametersProps) {\n if (props.children) {\n return props.children;\n }\n\n if (!props.parameters) {\n return undefined;\n }\n\n return (\n <>\n {\"<\"}\n <group>\n <Indent softline>\n <For each={props.parameters} comma line>\n {param => typeParameter(param)}\n </For>\n <ifBreak>,</ifBreak>\n </Indent>\n </group>\n {\">\"}\n </>\n );\n}\n"],"mappings":";;;;;;SA+B6D,cAAA,OAAA;8BAAA;EAAA,MAAA,OAAA,UAAA;EAAA,IAAA,WAAA;AAAA,UAAA,CAAA,MAAA;;EAAA,IAAA,WAAA;AAAA,UAAA,CAAA,gBAAA,SAAA,EAAA,IAAA,WAAA;AAAA,WAAA;KAAA,WAAA,MAEbM,KAAAA;KAAAA,sBACnC;MAAA,IAAA,OAAA;AAAA,cAAA,CAAA,CAAA,MAAA;;MAAA,IAAA,WAAA;AAAA,cAAA;;QAAA;QAAA,gBAAA,UAAA,EAAA,IAAA,WAAA;AAAA,gBAAA,MAAA,gCAAA,EAAA,IAAA,WAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKAH;EAAAA,gBAAAA,SAAAA,EAAAA,IAAAA,WAAAA;AAAAA,UAAAA;;;;;;;;;;;;;;EAC4C;EAAA"}
@@ -1,50 +0,0 @@
1
- import { ComponentProps, SourceFileHeaderProps, TypescriptFileImports } from "../../types/components.cjs";
2
- import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.cjs";
3
- import { Children } from "@alloy-js/core";
4
- import { TSModuleScope } from "@alloy-js/typescript";
5
-
6
- //#region src/typescript/components/typescript-file.d.ts
7
- type TypescriptFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & {
8
- hashbang?: Children | true;
9
- header?: Children;
10
- imports?: TypescriptFileImports;
11
- builtinImports?: TypescriptFileImports;
12
- export?: boolean | string;
13
- tsx?: boolean;
14
- };
15
- /**
16
- * A base component representing a Powerlines generated Typescript source file.
17
- *
18
- * @param props - The properties for the source file.
19
- * @returns The rendered source file component.
20
- */
21
- declare function TypescriptFile(props: TypescriptFileProps): Children;
22
- interface TypescriptFileHeaderProps extends SourceFileHeaderProps {
23
- header?: Children;
24
- hashbang?: Children | true;
25
- }
26
- /**
27
- * Renders the header for a Powerlines Typescript source file.
28
- *
29
- * @param props - The properties for the source file header.
30
- * @returns The rendered source file header.
31
- */
32
- declare function TypescriptFileHeader(props: TypescriptFileHeaderProps): Children;
33
- interface TypescriptFileHeaderImportsProps extends SourceFileHeaderProps {
34
- imports?: TypescriptFileImports;
35
- builtinImports?: TypescriptFileImports;
36
- scope?: TSModuleScope;
37
- }
38
- /**
39
- * Renders the header for a Powerlines Typescript source file.
40
- *
41
- * @param props - The properties for the source file header.
42
- * @returns The rendered source file header.
43
- */
44
- declare function TypescriptFileHeaderImports(props: TypescriptFileHeaderImportsProps): Children;
45
- declare type __ΩTypescriptFileProps = any[];
46
- declare type __ΩTypescriptFileHeaderProps = any[];
47
- declare type __ΩTypescriptFileHeaderImportsProps = any[];
48
- //#endregion
49
- export { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps };
50
- //# sourceMappingURL=typescript-file.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typescript-file.d.cts","names":[],"sources":["../../../src/typescript/components/typescript-file.tsx"],"sourcesContent":[],"mappings":";;;;;;KAsDY,mBAAA,GAAsB,KAAK,iCACrC;aACa;EAFH,MAAA,CAAA,EAGC,QAHD;EAA2B,OAAA,CAAA,EAIzB,qBAJyB;EAAL,cAAA,CAAA,EAKb,qBALa;EAChC,MAAA,CAAA,EAAA,OAAA,GAAA,MAAA;EACa,GAAA,CAAA,EAAA,OAAA;CACF;;;;AAab;AAgEA;;AAEa,iBAlEG,cAAA,CAkEH,KAAA,EAlEyB,mBAkEzB,CAAA,EAlE4C,QAkE5C;AAFsC,UAAlC,yBAAA,SAAkC,qBAAA,CAAA;EAAqB,MAAA,CAAA,EAC7D,QAD6D;EAWxD,QAAA,CAAA,EATH,QASG,GAAA,IAAoB;AAqEpC;;;;;;AAYA;iBAjFgB,oBAAA,QAA4B,4BAAyB;UAqEpD,gCAAA,SAAyC;YAC9C;mBACO;UACT;;;;;;;;iBASM,2BAAA,QACP,mCAAgC"}
@@ -1,50 +0,0 @@
1
- import { ComponentProps, SourceFileHeaderProps, TypescriptFileImports } from "../../types/components.mjs";
2
- import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.mjs";
3
- import { Children } from "@alloy-js/core";
4
- import { TSModuleScope } from "@alloy-js/typescript";
5
-
6
- //#region src/typescript/components/typescript-file.d.ts
7
- type TypescriptFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & {
8
- hashbang?: Children | true;
9
- header?: Children;
10
- imports?: TypescriptFileImports;
11
- builtinImports?: TypescriptFileImports;
12
- export?: boolean | string;
13
- tsx?: boolean;
14
- };
15
- /**
16
- * A base component representing a Powerlines generated Typescript source file.
17
- *
18
- * @param props - The properties for the source file.
19
- * @returns The rendered source file component.
20
- */
21
- declare function TypescriptFile(props: TypescriptFileProps): Children;
22
- interface TypescriptFileHeaderProps extends SourceFileHeaderProps {
23
- header?: Children;
24
- hashbang?: Children | true;
25
- }
26
- /**
27
- * Renders the header for a Powerlines Typescript source file.
28
- *
29
- * @param props - The properties for the source file header.
30
- * @returns The rendered source file header.
31
- */
32
- declare function TypescriptFileHeader(props: TypescriptFileHeaderProps): Children;
33
- interface TypescriptFileHeaderImportsProps extends SourceFileHeaderProps {
34
- imports?: TypescriptFileImports;
35
- builtinImports?: TypescriptFileImports;
36
- scope?: TSModuleScope;
37
- }
38
- /**
39
- * Renders the header for a Powerlines Typescript source file.
40
- *
41
- * @param props - The properties for the source file header.
42
- * @returns The rendered source file header.
43
- */
44
- declare function TypescriptFileHeaderImports(props: TypescriptFileHeaderImportsProps): Children;
45
- declare type __ΩTypescriptFileProps = any[];
46
- declare type __ΩTypescriptFileHeaderProps = any[];
47
- declare type __ΩTypescriptFileHeaderImportsProps = any[];
48
- //#endregion
49
- export { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps };
50
- //# sourceMappingURL=typescript-file.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typescript-file.d.mts","names":[],"sources":["../../../src/typescript/components/typescript-file.tsx"],"sourcesContent":[],"mappings":";;;;;;KAsDY,mBAAA,GAAsB,KAAK,iCACrC;aACa;EAFH,MAAA,CAAA,EAGC,QAHD;EAA2B,OAAA,CAAA,EAIzB,qBAJyB;EAAL,cAAA,CAAA,EAKb,qBALa;EAChC,MAAA,CAAA,EAAA,OAAA,GAAA,MAAA;EACa,GAAA,CAAA,EAAA,OAAA;CACF;;;;AAab;AAgEA;;AAEa,iBAlEG,cAAA,CAkEH,KAAA,EAlEyB,mBAkEzB,CAAA,EAlE4C,QAkE5C;AAFsC,UAAlC,yBAAA,SAAkC,qBAAA,CAAA;EAAqB,MAAA,CAAA,EAC7D,QAD6D;EAWxD,QAAA,CAAA,EATH,QASG,GAAA,IAAoB;AAqEpC;;;;;;AAYA;iBAjFgB,oBAAA,QAA4B,4BAAyB;UAqEpD,gCAAA,SAAyC;YAC9C;mBACO;UACT;;;;;;;;iBASM,2BAAA,QACP,mCAAgC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"typescript-file.mjs","names":["code","computed","For","Scope","Show","SourceDirectoryContext","splitProps","useContext","useScope","getSourceDirectoryData","ImportStatements","PackageContext","SourceFileContext","TSModuleScope","useSourceFile","getUniqueBy","appendPath","titleCase","isBoolean","isString","getFileHeaderWarning","SingleLineComment","SourceFile","usePowerlinesSafe","TypescriptFile","props","children","path","imports","builtinImports","tsx","header","hashbang","rest","directoryContext","sdData","modulePath","scope","modules","add","pkg","addModule","export","addExport","_$createComponent","Provider","value","_$mergeProps","TypescriptFileHeader","TypescriptFileHeaderImports","filetype","disableEslint","disableBiome","disablePrettier","context","when","Boolean","_$memo","config","mode","_$createIntrinsic","variant","framework","importProps","builtinImportsProps","sourceFile","Object","fromEntries","entries","map","module","importItem","Array","isArray","i","alias","name","importedModules","size","keys","length","each","hardline","ender","filter","default","join","includes","records"],"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 code,\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 {\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 <>\n {children}\n <hbr />\n </>\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":";;;;;;;;;;;;;;;;;;;;SA2WwD,eAAA,OAAA;OAAA,aAAA,MAAA,SAAA,gBAAA,KAAA,QAAA,+BAAA,OAAA"}
@@ -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_core9 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_core9.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"],"sourcesContent":[],"mappings":";;;;UAqBiB,+BAAA,SAAwC;UACxC,8BAAA,SAAuC,oBADxD;AACiB,KAEL,iBAAA,GACR,+BAHoD,GAIpD,8BAJsE;AAE1E;AAOA;;iBAAgB,YAAA,QAAoB,oBAAiB,eAAA,CAAA"}
@@ -1,17 +0,0 @@
1
- import * as _alloy_js_core9 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_core9.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"],"sourcesContent":[],"mappings":";;;;UAqBiB,+BAAA,SAAwC;UACxC,8BAAA,SAAuC,oBADxD;AACiB,KAEL,iBAAA,GACR,+BAHoD,GAIpD,8BAJsE;AAE1E;AAOA;;iBAAgB,YAAA,QAAoB,oBAAiB,eAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"lexical-scope.mjs","names":["Scope","createLexicalScope","TSLexicalScope","LexicalScope","props","scope","value","TypeError","name","_$createComponent","children"],"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":""}
@@ -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"],"sourcesContent":[],"mappings":";;;;UA6BiB,gBAAA;YACL;EADK;AAajB;;eAPe;;;;;;iBAOC,WAAA,QAAmB,mBAAgB"}
@@ -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"],"sourcesContent":[],"mappings":";;;;UA6BiB,gBAAA;YACL;EADK;AAajB;;eAPe;;;;;;iBAOC,WAAA,QAAmB,mBAAgB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"member-scope.mjs","names":["MemberScope","CoreMemberScope","createScope","TSMemberScope","useTSLexicalScopeIfPresent","props","parentScope","binder","ownerSymbol","memberScope","_$createComponent","value","children"],"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":""}
@@ -1,15 +0,0 @@
1
- import { CallSignatureProps } from "@alloy-js/typescript";
2
-
3
- //#region src/typescript/helpers/get-call-signature-props.d.ts
4
-
5
- /**
6
- * Get the properties for a call signature, applying any defaults as necessary.
7
- *
8
- * @param props - The properties for the call signature.
9
- * @param defaults - Optional default properties to apply to the call signature.
10
- * @returns The properties for the call signature, with defaults applied as necessary.
11
- */
12
- declare function getCallSignatureProps(props: CallSignatureProps, defaults?: Partial<CallSignatureProps>): CallSignatureProps;
13
- //#endregion
14
- export { getCallSignatureProps };
15
- //# 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"],"sourcesContent":[],"mappings":";;;;;;AA4BA;;;;;AAEwC,iBAFxB,qBAAA,CAEwB,KAAA,EAD/B,kBAC+B,EAAA,QAAA,CAAA,EAA3B,OAA2B,CAAnB,kBAAmB,CAAA,CAAA,EAAA,kBAAA"}
@@ -1,15 +0,0 @@
1
- import { CallSignatureProps } from "@alloy-js/typescript";
2
-
3
- //#region src/typescript/helpers/get-call-signature-props.d.ts
4
-
5
- /**
6
- * Get the properties for a call signature, applying any defaults as necessary.
7
- *
8
- * @param props - The properties for the call signature.
9
- * @param defaults - Optional default properties to apply to the call signature.
10
- * @returns The properties for the call signature, with defaults applied as necessary.
11
- */
12
- declare function getCallSignatureProps(props: CallSignatureProps, defaults?: Partial<CallSignatureProps>): CallSignatureProps;
13
- //#endregion
14
- export { getCallSignatureProps };
15
- //# 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"],"sourcesContent":[],"mappings":";;;;;;AA4BA;;;;;AAEwC,iBAFxB,qBAAA,CAEwB,KAAA,EAD/B,kBAC+B,EAAA,QAAA,CAAA,EAA3B,OAA2B,CAAnB,kBAAmB,CAAA,CAAA,EAAA,kBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-call-signature-props.mjs","names":["defaultProps","splitProps","getCallSignatureProps","props","defaults","callSignatureProps"],"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":""}
@@ -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"],"sourcesContent":[],"mappings":";;AAwBA;;;;;iBAAgB,mBAAA"}
@@ -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"],"sourcesContent":[],"mappings":";;AAwBA;;;;;iBAAgB,mBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilities.mjs","names":["isValidJSIdentifier","identifier","test"],"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,SAAgBA,oBAAoBC,YAAoB;AACtD,QAAO,qDAAqDC,KAAKD,WAAW"}
@@ -1,21 +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 "./components/index.cjs";
16
- import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue } from "./contexts/lexical-scope.cjs";
17
- import "./contexts/index.cjs";
18
- import { getCallSignatureProps } from "./helpers/get-call-signature-props.cjs";
19
- import { isValidJSIdentifier } from "./helpers/utilities.cjs";
20
- import "./helpers/index.cjs";
21
- 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,21 +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 "./components/index.mjs";
16
- import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue, __ΩLexicalScopeProps, __ΩLexicalScopePropsWithScopeInfo, __ΩLexicalScopePropsWithScopeValue } from "./contexts/lexical-scope.mjs";
17
- import "./contexts/index.mjs";
18
- import { getCallSignatureProps } from "./helpers/get-call-signature-props.mjs";
19
- import { isValidJSIdentifier } from "./helpers/utilities.mjs";
20
- import "./helpers/index.mjs";
21
- 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"],"sourcesContent":[],"mappings":";;;;;UA4BiB,QAAA;6CAC4B,WAAW;AADxD;AAqDY,KAAA,aAAA,GAAgB,IAAH,CAAQ,iBAAR,EAAA,UAAA,CAAA,GACvB,cADuB,GAAA;EAAQ,MAAA,CAAA,EAEpB,QAFoB;EAAL,IAAA,CAAA,EAGjB,QAHiB;CAC1B;;;;AAcF;AAiCA;;;;;iBAjCgB,QAAA,QAAgB,gBAAa;;;;;;;iBAiC7B,cAAA,QAAsB,wBAAqB"}
@@ -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"],"sourcesContent":[],"mappings":";;;;;UA4BiB,QAAA;6CAC4B,WAAW;AADxD;AAqDY,KAAA,aAAA,GAAgB,IAAH,CAAQ,iBAAR,EAAA,UAAA,CAAA,GACvB,cADuB,GAAA;EAAQ,MAAA,CAAA,EAEpB,QAFoB;EAAL,IAAA,CAAA,EAGjB,QAHiB;CAC1B;;;;AAcF;AAiCA;;;;;iBAjCgB,QAAA,QAAgB,gBAAa;;;;;;;iBAiC7B,cAAA,QAAsB,wBAAqB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"yaml-file.mjs","names":["code","For","Show","splitProps","titleCase","isSetObject","getFileHeaderWarning","SingleLineComment","SourceFile","usePowerlinesSafe","YamlFileDataItem","key","value","_$createComponent","when","Boolean","children","String","_$memo","Array","isArray","each","Object","entries","nestedKey","nestedValue","item","YamlFileData","data","YamlFile","props","path","header","rest","_$mergeProps","YamlFileHeader","filetype","_$createIntrinsic","context","config","framework","variant"],"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":";;;;;;;;;;SAoDgE,iBAAA,EAAA,KAAA,SAAA;;kBAAA,MAAA;GAAA,IAAA,OAAA;AAAA,WAAA,YAAA;;GAAA,UAAA,IAAA,GAAA,IAAA;GAAA,CAAA;EAAA,gBAAA,MAAA;GAAA,MAAA,OAAA,UAAA,YAAA,OAAA,UAAA,YAAA,OAAA,UAAA;GAAA,IAAA,WAAA;AAAA,eAAA,KAAA,OAAA,MAAA;;GAAA,CAAA;EAAA,sBAAA;GAAA,IAAA,OAAA;AAAA,WAAA,WAAA,CAAA,CAAA,YAAA,MAAA,CAAA,EAAA,IAAA,CAAA,MAAA,QAAA,MAAA;;GAAA,IAAA,WAAA;AAAA,WAAA,qBAAA;KAAA,IAAA,OAAA;AAAA,aAAA,OAAA,QAAA,MAAA;;KAAA,WAAA,CAAA,WAAA,iBAAA,gBAAA,kBAAA;MAAA,KAAA;MAAA,OAAA;MAAA,CAAA;KACrD,CAAA;;GAAA,CAAA;EAAA,gBAGK,MAAA;GAAA,IAAA,OAAA;AAAA,WAAA,MAAA,QAAA,MAAA;;GAAA,IAAA,WAAA;AAAA,WAAA,gBAAA,KAAA;KAAA,MAAA;KAAA,WAAA,SAAA,gBAAA,kBAAA,EAAA,OAAA,MAAA,CAAA;KAAA,CAAA;;GAAA,CAAA;EAAA;;AAahB,SAAS2B,aAAa,EAAA,QAAA;AAAA,QAAA,CAAA,gBAAA,MAAA;EAAA,IAAA,OAAA;AAAA,UAAA,QAAA,KAAA;;EAAA,IAAA,WAAA;AAAA,UAAA,gBAAA,KAAA;IAAA,IAAA,OAAA;AAAA,YAAA,OAAA,QAAA,QAAA,EAAA,CAAA;;IAAA,WAAA,CAAA,KAAA,WAAA,gBAAA,kBAAA;KAAA;KAAA;KAAA,CAAA;IAAA,CAAA;;EAAA,CAAA,CAAA;;;;;;;;;;;AAUtB,SAAA,SAAA,OAAA;CAQA,MAAA,CAAA,EAAA,UAAA,MAAA,MAAA,UAAA,QAAA,WAAA,OAAA;EACA;EACA;EAAA;EAAA;GAAA;AAAA,QAAA,gBAEA,YAAA,WAiBY,MAAA;EAAA;EAAA,IAAA,SAAA;AAAA,UAAA,gBAAA,gBAAA,EAAA,UAAA,QAAA,CAAA;;YAAA;EAAA,IAAA,WAAA;AAAA,UAAA,CAAA,gBAAA,MAAA;IAAA,IAAA,OAAA;AAAA,YAAA,QAAA,KAAA;;IAAA,IAAA,WAAA;AAAA,YAAA,gBAAA,cAAA,EAAA,MAAA,CAAA;;IAAA,CAAA,EAAA,gBAAA,MAAA;IAAA,IAAA,OAAA;AAAA,YAAA,QAAA,SAAA;;IAAA,IAAA,WAAA;AAAA,YAAA,CAAA,UAAA,gBAAA,OAAA,EAAA,CAAA,CAAA;;IAAA,CAAA,CAAA;;EAAA,CAAA,CAAA;;;;;;;;SAAAd,eAAAA,OAAAA;OAAAA,EAAAA,aAAAA;CAAAA,MAAAA,UAAAA,mBAAAA;;;;;;;;;;qCAAGsB,EAAAA,IAAAA,WAAAA;AAAAA,UAAAA,gBAAAA,UAAAA,SAAAA,QAAAA,UAAAA,IAAAA;KAAAA,CAAAA;EAAAA,gBAAAA,OAAAA,EAAAA,CAAAA;EAAAA"}
@@ -1,3 +0,0 @@
1
- import { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps } from "./components/yaml-file.cjs";
2
- import "./components/index.cjs";
3
- export { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps };
@@ -1,3 +0,0 @@
1
- import { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps } from "./components/yaml-file.mjs";
2
- import "./components/index.mjs";
3
- export { YamlData, YamlFile, YamlFileHeader, YamlFileProps, __ΩYamlData, __ΩYamlFileProps };