@powerlines/plugin-alloy 0.25.15 → 0.25.16

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,39 +0,0 @@
1
- import { PrintTreeOptions } from "@alloy-js/core";
2
- import { PluginContext } from "powerlines";
3
- import { BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types/plugin";
4
-
5
- //#region src/types/plugin.d.ts
6
- type AlloyPluginOptions = Partial<PrintTreeOptions> & {
7
- /**
8
- * If true, the Alloy framework is used to generate Typescript output files.
9
- *
10
- * @defaultValue true
11
- */
12
- typescript?: boolean;
13
- /**
14
- * If true, the Alloy framework is used to generate JSON output files.
15
- *
16
- * @defaultValue false
17
- */
18
- json?: boolean;
19
- /**
20
- * If true, the Alloy framework is used to generate Markdown output files.
21
- *
22
- * @defaultValue false
23
- */
24
- markdown?: boolean;
25
- };
26
- type AlloyPluginUserConfig = BabelPluginUserConfig & {
27
- alloy?: AlloyPluginOptions;
28
- };
29
- type AlloyPluginResolvedConfig = BabelPluginResolvedConfig & {
30
- alloy: AlloyPluginOptions;
31
- };
32
- type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig>;
33
- declare type __ΩAlloyPluginOptions = any[];
34
- declare type __ΩAlloyPluginUserConfig = any[];
35
- declare type __ΩAlloyPluginResolvedConfig = any[];
36
- declare type __ΩAlloyPluginContext = any[];
37
- //#endregion
38
- export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig, __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig };
39
- //# sourceMappingURL=plugin.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;KAyBY,kBAAA,GAAqB,QAAQ;;AAAzC;AAuBA;AAIA;AAIA;EAC0B,UAAA,CAAA,EAAA,OAAA;EAA4B;;;;;;;;;;;;;KAT1C,qBAAA,GAAwB;UAC1B;;KAGE,yBAAA,GAA4B;SAC/B;;KAGG,2CACc,4BAA4B,6BAClD,cAAc"}
@@ -1,39 +0,0 @@
1
- import { PrintTreeOptions } from "@alloy-js/core";
2
- import { PluginContext } from "powerlines";
3
- import { BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types/plugin";
4
-
5
- //#region src/types/plugin.d.ts
6
- type AlloyPluginOptions = Partial<PrintTreeOptions> & {
7
- /**
8
- * If true, the Alloy framework is used to generate Typescript output files.
9
- *
10
- * @defaultValue true
11
- */
12
- typescript?: boolean;
13
- /**
14
- * If true, the Alloy framework is used to generate JSON output files.
15
- *
16
- * @defaultValue false
17
- */
18
- json?: boolean;
19
- /**
20
- * If true, the Alloy framework is used to generate Markdown output files.
21
- *
22
- * @defaultValue false
23
- */
24
- markdown?: boolean;
25
- };
26
- type AlloyPluginUserConfig = BabelPluginUserConfig & {
27
- alloy?: AlloyPluginOptions;
28
- };
29
- type AlloyPluginResolvedConfig = BabelPluginResolvedConfig & {
30
- alloy: AlloyPluginOptions;
31
- };
32
- type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig>;
33
- declare type __ΩAlloyPluginOptions = any[];
34
- declare type __ΩAlloyPluginUserConfig = any[];
35
- declare type __ΩAlloyPluginResolvedConfig = any[];
36
- declare type __ΩAlloyPluginContext = any[];
37
- //#endregion
38
- export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig, __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig };
39
- //# sourceMappingURL=plugin.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;KAyBY,kBAAA,GAAqB,QAAQ;;AAAzC;AAuBA;AAIA;AAIA;EAC0B,UAAA,CAAA,EAAA,OAAA;EAA4B;;;;;;;;;;;;;KAT1C,qBAAA,GAAwB;UAC1B;;KAGE,yBAAA,GAA4B;SAC/B;;KAGG,2CACc,4BAA4B,6BAClD,cAAc"}
@@ -1,35 +0,0 @@
1
- import { TSDocModuleProps } from "./tsdoc.cjs";
2
- import { TypescriptFileProps } from "./typescript-file.cjs";
3
- import * as _alloy_js_core17 from "@alloy-js/core";
4
-
5
- //#region src/typescript/components/builtin-file.d.ts
6
- type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
7
- /**
8
- * The runtime module identifier.
9
- *
10
- * @remarks
11
- * This value will be included after the \`storm:\` prefix in the import statement.
12
- */
13
- id: string;
14
- /**
15
- * The description for the builtin module.
16
- */
17
- description?: string;
18
- /**
19
- * Whether the file is a TSX file.
20
- *
21
- * @defaultValue false
22
- */
23
- tsx?: boolean;
24
- };
25
- /**
26
- * A base component representing a Powerlines generated Typescript source file.
27
- *
28
- * @param props - The properties for the source file.
29
- * @returns The rendered source file component.
30
- */
31
- declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core17.Children;
32
- declare type __ΩBuiltinFileProps = any[];
33
- //#endregion
34
- export { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps };
35
- //# sourceMappingURL=builtin-file.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"builtin-file.d.cts","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"sourcesContent":[],"mappings":";;;;;KAgCY,gBAAA,GAAmB,KAAK,+BAClC,KAAK;;;AADP;;;;EACE,EAAA,EAAA,MAAA;EAAI;AA4BN;;;;;;;;;;;;;;;;iBAAgB,WAAA,QAAmB,mBAAgB,gBAAA,CAAA"}
@@ -1,35 +0,0 @@
1
- import { TSDocModuleProps } from "./tsdoc.mjs";
2
- import { TypescriptFileProps } from "./typescript-file.mjs";
3
- import * as _alloy_js_core24 from "@alloy-js/core";
4
-
5
- //#region src/typescript/components/builtin-file.d.ts
6
- type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
7
- /**
8
- * The runtime module identifier.
9
- *
10
- * @remarks
11
- * This value will be included after the \`storm:\` prefix in the import statement.
12
- */
13
- id: string;
14
- /**
15
- * The description for the builtin module.
16
- */
17
- description?: string;
18
- /**
19
- * Whether the file is a TSX file.
20
- *
21
- * @defaultValue false
22
- */
23
- tsx?: boolean;
24
- };
25
- /**
26
- * A base component representing a Powerlines generated Typescript source file.
27
- *
28
- * @param props - The properties for the source file.
29
- * @returns The rendered source file component.
30
- */
31
- declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core24.Children;
32
- declare type __ΩBuiltinFileProps = any[];
33
- //#endregion
34
- export { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps };
35
- //# sourceMappingURL=builtin-file.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"builtin-file.d.mts","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"sourcesContent":[],"mappings":";;;;;KAgCY,gBAAA,GAAmB,KAAK,+BAClC,KAAK;;;AADP;;;;EACE,EAAA,EAAA,MAAA;EAAI;AA4BN;;;;;;;;;;;;;;;;iBAAgB,WAAA,QAAmB,mBAAgB,gBAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"builtin-file.mjs","names":["computed","splitProps","hasFileExtension","replaceExtension","replacePath","isSet","usePowerlinesSafe","TSDocModule","TypescriptFile","TypescriptFileHeader","TypescriptFileHeaderImports","BuiltinFile","props","children","imports","builtinImports","id","description","tsx","rest","context","path","builtinsPath","_$createComponent","_$mergeProps","header","name","meta","kind","extension","value"],"sources":["../../../src/typescript/components/builtin-file.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { computed, splitProps } from \"@alloy-js/core\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport type { TSDocModuleProps } from \"./tsdoc\";\nimport { TSDocModule } from \"./tsdoc\";\nimport {\n TypescriptFile,\n TypescriptFileHeader,\n TypescriptFileHeaderImports,\n TypescriptFileProps\n} from \"./typescript-file\";\n\nexport type BuiltinFileProps = Omit<TypescriptFileProps, \"path\"> &\n Omit<TSDocModuleProps, \"name\"> & {\n /**\n * The runtime module identifier.\n *\n * @remarks\n * This value will be included after the \\`storm:\\` prefix in the import statement.\n */\n id: string;\n\n /**\n * The description for the builtin module.\n */\n description?: string;\n\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n };\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function BuiltinFile(props: BuiltinFileProps) {\n const [{ children, imports, builtinImports, id, description, tsx }, rest] =\n splitProps(props, [\n \"children\",\n \"imports\",\n \"builtinImports\",\n \"id\",\n \"description\",\n \"tsx\"\n ]);\n\n const context = usePowerlinesSafe();\n const path = computed(() =>\n replacePath(\n `${!isSet(tsx) ? id : replaceExtension(id)}${\n hasFileExtension(id) && !isSet(tsx) ? \"\" : tsx ? \".tsx\" : \".ts\"\n }`,\n context?.builtinsPath\n )\n );\n\n return (\n <TypescriptFile\n header={\n <TypescriptFileHeader\n header={<TSDocModule name={id}>{description}</TSDocModule>}>\n <TypescriptFileHeaderImports\n imports={imports}\n builtinImports={builtinImports}\n />\n </TypescriptFileHeader>\n }\n meta={{\n kind: \"builtin\",\n extension: tsx ? \"tsx\" : \"ts\",\n id: replaceExtension(id)\n }}\n {...rest}\n path={path.value}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":""}
@@ -1,145 +0,0 @@
1
- import { TypeParameters } from "./type-parameters.cjs";
2
- import { Children, Namekey, Refkey } from "@alloy-js/core";
3
- import { CallSignatureProps, CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
4
-
5
- //#region src/typescript/components/class-declaration.d.ts
6
- /**
7
- * Props for the ClassDeclaration component, which represents a TypeScript class declaration
8
- */
9
- interface ClassDeclarationProps extends CommonDeclarationProps {
10
- /**
11
- * An indication of whether this class is abstract
12
- */
13
- abstract?: boolean;
14
- /**
15
- * An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration
16
- */
17
- extends?: Children;
18
- /**
19
- * Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration
20
- */
21
- implements?: Children[];
22
- /**
23
- * The generic type parameters of the class.
24
- */
25
- typeParameters?: TypeParameterDescriptor[] | string[];
26
- }
27
- /**
28
- * Create a TypeScript class declaration.
29
- *
30
- * @example
31
- * ```tsx
32
- * const myPetRefkey = refkey();
33
- * const Animal = refkey();
34
- * const staticMember = refkey();
35
- * const instanceMember = refkey();
36
- *
37
- * <ClassDeclaration name="Animal" refkey={Animal}>
38
- * <ClassMember public static name="something" type="string" refkey={staticMember}>
39
- * "hello"
40
- * </ClassMember>
41
- * <ClassMember public name="kind" type="string" />
42
- * <ClassMember public name="name" type="string" refkey={instanceMember} />
43
- * <ClassConstructor parameters="name: string">
44
- * this.name = name;
45
- * </ClassConstructor>
46
- * </ClassDeclaration>
47
- *
48
- * <VarDeclaration const name="myPet" refkey={myPetRefkey}>
49
- * new {Animal}();
50
- * </VarDeclaration>
51
- *
52
- * {staticMember}; // Animal.something
53
- * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name
54
- * {memberRefkey(myPetRefkey, instanceMember)}
55
- * ```
56
- */
57
- declare function ClassDeclaration(props: ClassDeclarationProps): Children;
58
- declare namespace ClassDeclaration {
59
- var TypeParameters: typeof TypeParameters;
60
- }
61
- /**
62
- * Generates a TypeScript class member declaration for the given reflection class.
63
- */
64
- interface ClassMemberProps {
65
- name: string | Namekey;
66
- refkey?: Refkey;
67
- public?: boolean;
68
- private?: boolean;
69
- protected?: boolean;
70
- jsPrivate?: boolean;
71
- static?: boolean;
72
- abstract?: boolean;
73
- children?: Children;
74
- doc?: Children;
75
- nullish?: boolean;
76
- override?: boolean;
77
- }
78
- /**
79
- * Generates a TypeScript class member declaration for the given reflection class.
80
- *
81
- * @param props - The properties of the class member, including its name, visibility, and other modifiers.
82
- * @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.
83
- */
84
- declare function ClassMember(props: ClassMemberProps): Children;
85
- /**
86
- * Props for a class field, which is a specific type of class member that represents a property of the class.
87
- */
88
- interface ClassFieldProps extends ClassMemberProps {
89
- name: string;
90
- type?: Children;
91
- optional?: boolean;
92
- children?: Children;
93
- isPrivateMember?: boolean;
94
- }
95
- /**
96
- * Generates a TypeScript class field declaration for the given reflection class.
97
- *
98
- * @param props - The properties of the class field, including its name, type, optionality, and other modifiers.
99
- * @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.
100
- */
101
- declare function ClassField(props: ClassFieldProps): Children;
102
- /**
103
- * Props for a class field, which is a specific type of class member that represents a property of the class.
104
- */
105
- interface ClassPropertyProps extends ClassMemberProps {
106
- name: string;
107
- type?: Children;
108
- children?: Children;
109
- }
110
- /**
111
- * Generates a TypeScript class property setter declaration for the given reflection class.
112
- *
113
- * @param props - The properties of the class property, including its name, type, and other modifiers.
114
- * @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.
115
- */
116
- declare function ClassPropertySet(props: ClassPropertyProps): Children;
117
- /**
118
- * Generates a TypeScript class property getter declaration for the given reflection class.
119
- *
120
- * @param props - The properties of the class property, including its name, type, and other modifiers.
121
- * @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.
122
- */
123
- declare function ClassPropertyGet(props: ClassPropertyProps): Children;
124
- /**
125
- * Props for a class method, which is a specific type of class member that represents a function defined within the class.
126
- */
127
- interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {
128
- async?: boolean;
129
- children?: Children;
130
- }
131
- /**
132
- * Generates a TypeScript class method declaration for the given reflection class.
133
- *
134
- * @param props - The properties of the class method, including its name, visibility, and other modifiers.
135
- * @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.
136
- */
137
- declare function ClassMethod(props: ClassMethodProps): Children;
138
- declare type __ΩClassDeclarationProps = any[];
139
- declare type __ΩClassMemberProps = any[];
140
- declare type __ΩClassFieldProps = any[];
141
- declare type __ΩClassPropertyProps = any[];
142
- declare type __ΩClassMethodProps = any[];
143
- //#endregion
144
- export { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps };
145
- //# sourceMappingURL=class-declaration.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-declaration.d.cts","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAoDiB,UAAA,qBAAA,SAA8B,sBAAR,CAAA;EAS3B;;;EATmC,QAAA,CAAA,EAAA,OAAA;EAAsB;AAoDrE;;EA4CiB,OAAA,CAAA,EAvFL,QAuFK;EACA;;;EAST,UAAA,CAAA,EA5FO,QA4FP,EAAA;EAAQ;AAWhB;AAiCA;EAES,cAAA,CAAA,EArIU,uBAqIV,EAAA,GAAA,MAAA,EAAA;;;;AAYT;AAyBA;;;;;AAYA;AA4BA;AAkBA;;;;;AAWA;;;;;;;;;;;;;;;iBA9MgB,gBAAA,QAAwB,wBAAqB;kBAA7C,gBAAA;6BAAgB;;;;;UA4Cf,gBAAA;iBACA;WACN;;;;;;;aAOE;QACL;;;;;;;;;;iBAWQ,WAAA,QAAmB,mBAAgB;;;;UAiClC,eAAA,SAAwB;;SAEhC;;aAEI;;;;;;;;;iBAUG,UAAA,QAAkB,kBAAe;;;;UAyBhC,kBAAA,SAA2B;;SAEnC;aACI;;;;;;;;iBASG,gBAAA,QAAwB,qBAAkB;;;;;;;iBA4B1C,gBAAA,QAAwB,qBAAkB;;;;UAkBzC,gBAAA,SAAyB,kBAAkB;;aAE/C;;;;;;;;iBASG,WAAA,QAAmB,mBAAgB"}
@@ -1,145 +0,0 @@
1
- import { TypeParameters } from "./type-parameters.mjs";
2
- import { Children, Namekey, Refkey } from "@alloy-js/core";
3
- import { CallSignatureProps, CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
4
-
5
- //#region src/typescript/components/class-declaration.d.ts
6
- /**
7
- * Props for the ClassDeclaration component, which represents a TypeScript class declaration
8
- */
9
- interface ClassDeclarationProps extends CommonDeclarationProps {
10
- /**
11
- * An indication of whether this class is abstract
12
- */
13
- abstract?: boolean;
14
- /**
15
- * An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration
16
- */
17
- extends?: Children;
18
- /**
19
- * Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration
20
- */
21
- implements?: Children[];
22
- /**
23
- * The generic type parameters of the class.
24
- */
25
- typeParameters?: TypeParameterDescriptor[] | string[];
26
- }
27
- /**
28
- * Create a TypeScript class declaration.
29
- *
30
- * @example
31
- * ```tsx
32
- * const myPetRefkey = refkey();
33
- * const Animal = refkey();
34
- * const staticMember = refkey();
35
- * const instanceMember = refkey();
36
- *
37
- * <ClassDeclaration name="Animal" refkey={Animal}>
38
- * <ClassMember public static name="something" type="string" refkey={staticMember}>
39
- * "hello"
40
- * </ClassMember>
41
- * <ClassMember public name="kind" type="string" />
42
- * <ClassMember public name="name" type="string" refkey={instanceMember} />
43
- * <ClassConstructor parameters="name: string">
44
- * this.name = name;
45
- * </ClassConstructor>
46
- * </ClassDeclaration>
47
- *
48
- * <VarDeclaration const name="myPet" refkey={myPetRefkey}>
49
- * new {Animal}();
50
- * </VarDeclaration>
51
- *
52
- * {staticMember}; // Animal.something
53
- * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name
54
- * {memberRefkey(myPetRefkey, instanceMember)}
55
- * ```
56
- */
57
- declare function ClassDeclaration(props: ClassDeclarationProps): Children;
58
- declare namespace ClassDeclaration {
59
- var TypeParameters: typeof TypeParameters;
60
- }
61
- /**
62
- * Generates a TypeScript class member declaration for the given reflection class.
63
- */
64
- interface ClassMemberProps {
65
- name: string | Namekey;
66
- refkey?: Refkey;
67
- public?: boolean;
68
- private?: boolean;
69
- protected?: boolean;
70
- jsPrivate?: boolean;
71
- static?: boolean;
72
- abstract?: boolean;
73
- children?: Children;
74
- doc?: Children;
75
- nullish?: boolean;
76
- override?: boolean;
77
- }
78
- /**
79
- * Generates a TypeScript class member declaration for the given reflection class.
80
- *
81
- * @param props - The properties of the class member, including its name, visibility, and other modifiers.
82
- * @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.
83
- */
84
- declare function ClassMember(props: ClassMemberProps): Children;
85
- /**
86
- * Props for a class field, which is a specific type of class member that represents a property of the class.
87
- */
88
- interface ClassFieldProps extends ClassMemberProps {
89
- name: string;
90
- type?: Children;
91
- optional?: boolean;
92
- children?: Children;
93
- isPrivateMember?: boolean;
94
- }
95
- /**
96
- * Generates a TypeScript class field declaration for the given reflection class.
97
- *
98
- * @param props - The properties of the class field, including its name, type, optionality, and other modifiers.
99
- * @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.
100
- */
101
- declare function ClassField(props: ClassFieldProps): Children;
102
- /**
103
- * Props for a class field, which is a specific type of class member that represents a property of the class.
104
- */
105
- interface ClassPropertyProps extends ClassMemberProps {
106
- name: string;
107
- type?: Children;
108
- children?: Children;
109
- }
110
- /**
111
- * Generates a TypeScript class property setter declaration for the given reflection class.
112
- *
113
- * @param props - The properties of the class property, including its name, type, and other modifiers.
114
- * @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.
115
- */
116
- declare function ClassPropertySet(props: ClassPropertyProps): Children;
117
- /**
118
- * Generates a TypeScript class property getter declaration for the given reflection class.
119
- *
120
- * @param props - The properties of the class property, including its name, type, and other modifiers.
121
- * @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.
122
- */
123
- declare function ClassPropertyGet(props: ClassPropertyProps): Children;
124
- /**
125
- * Props for a class method, which is a specific type of class member that represents a function defined within the class.
126
- */
127
- interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {
128
- async?: boolean;
129
- children?: Children;
130
- }
131
- /**
132
- * Generates a TypeScript class method declaration for the given reflection class.
133
- *
134
- * @param props - The properties of the class method, including its name, visibility, and other modifiers.
135
- * @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.
136
- */
137
- declare function ClassMethod(props: ClassMethodProps): Children;
138
- declare type __ΩClassDeclarationProps = any[];
139
- declare type __ΩClassMemberProps = any[];
140
- declare type __ΩClassFieldProps = any[];
141
- declare type __ΩClassPropertyProps = any[];
142
- declare type __ΩClassMethodProps = any[];
143
- //#endregion
144
- export { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps };
145
- //# sourceMappingURL=class-declaration.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAoDiB,UAAA,qBAAA,SAA8B,sBAAR,CAAA;EAS3B;;;EATmC,QAAA,CAAA,EAAA,OAAA;EAAsB;AAoDrE;;EA4CiB,OAAA,CAAA,EAvFL,QAuFK;EACA;;;EAST,UAAA,CAAA,EA5FO,QA4FP,EAAA;EAAQ;AAWhB;AAiCA;EAES,cAAA,CAAA,EArIU,uBAqIV,EAAA,GAAA,MAAA,EAAA;;;;AAYT;AAyBA;;;;;AAYA;AA4BA;AAkBA;;;;;AAWA;;;;;;;;;;;;;;;iBA9MgB,gBAAA,QAAwB,wBAAqB;kBAA7C,gBAAA;6BAAgB;;;;;UA4Cf,gBAAA;iBACA;WACN;;;;;;;aAOE;QACL;;;;;;;;;;iBAWQ,WAAA,QAAmB,mBAAgB;;;;UAiClC,eAAA,SAAwB;;SAEhC;;aAEI;;;;;;;;;iBAUG,UAAA,QAAkB,kBAAe;;;;UAyBhC,kBAAA,SAA2B;;SAEnC;aACI;;;;;;;;iBASG,gBAAA,QAAwB,qBAAkB;;;;;;;iBA4B1C,gBAAA,QAAwB,qBAAkB;;;;UAkBzC,gBAAA,SAAyB,kBAAkB;;aAE/C;;;;;;;;iBASG,WAAA,QAAmB,mBAAgB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-declaration.mjs","names":["Block","code","For","MemberDeclaration","Name","Show","splitProps","CallSignature","createMemberSymbol","createTypeAndValueSymbol","Declaration","TSSymbolFlags","TypeRefContext","useTSNamePolicy","LexicalScope","MemberScope","getCallSignatureProps","PropertyName","TSDoc","TSDocParams","TypeParameters","ClassDeclaration","props","extendsPart","extends","_$memo","implementsPart","implements","length","_$createComponent","each","comma","space","children","implement","sym","name","refkeys","refkey","export","default","metadata","hasInstanceMembers","namePolicy","for","when","Boolean","doc","heading","symbol","ownerSymbol","abstract","typeParameters","parameters","ClassMember","tsFlags","None","nullish","Nullish","public","private","protected","override","static","ClassField","optionality","optional","typeSection","type","initializerSection","_$mergeProps","isPrivateMember","undefined","ClassPropertySet","ClassPropertyGet","returnType","ClassMethod","callProps","_","rest","Array","isArray","async"],"sources":["../../../src/typescript/components/class-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Block,\n Children,\n code,\n For,\n MemberDeclaration,\n Name,\n Namekey,\n Refkey,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n CallSignature,\n CallSignatureProps,\n CommonDeclarationProps,\n createMemberSymbol,\n createTypeAndValueSymbol,\n Declaration,\n TSSymbolFlags,\n TypeParameterDescriptor,\n TypeRefContext,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\nimport { LexicalScope } from \"../contexts\";\nimport { MemberScope } from \"../contexts/member-scope\";\nimport { getCallSignatureProps } from \"../helpers\";\nimport { PropertyName } from \"./property-name\";\nimport { TSDoc, TSDocParams } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\n/**\n * Props for the ClassDeclaration component, which represents a TypeScript class declaration\n */\nexport interface ClassDeclarationProps extends CommonDeclarationProps {\n /**\n * An indication of whether this class is abstract\n */\n abstract?: boolean;\n\n /**\n * An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration\n */\n extends?: Children;\n\n /**\n * Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration\n */\n implements?: Children[];\n\n /**\n * The generic type parameters of the class.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Create a TypeScript class declaration.\n *\n * @example\n * ```tsx\n * const myPetRefkey = refkey();\n * const Animal = refkey();\n * const staticMember = refkey();\n * const instanceMember = refkey();\n *\n * <ClassDeclaration name=\"Animal\" refkey={Animal}>\n * <ClassMember public static name=\"something\" type=\"string\" refkey={staticMember}>\n * \"hello\"\n * </ClassMember>\n * <ClassMember public name=\"kind\" type=\"string\" />\n * <ClassMember public name=\"name\" type=\"string\" refkey={instanceMember} />\n * <ClassConstructor parameters=\"name: string\">\n * this.name = name;\n * </ClassConstructor>\n * </ClassDeclaration>\n *\n * <VarDeclaration const name=\"myPet\" refkey={myPetRefkey}>\n * new {Animal}();\n * </VarDeclaration>\n *\n * {staticMember}; // Animal.something\n * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name\n * {memberRefkey(myPetRefkey, instanceMember)}\n * ```\n */\nexport function ClassDeclaration(props: ClassDeclarationProps) {\n const extendsPart = props.extends && <> extends {props.extends}</>;\n const implementsPart = props.implements && props.implements.length > 0 && (\n <>\n {\" \"}\n implements{\" \"}\n <For each={props.implements} comma space>\n {implement => implement}\n </For>\n </>\n );\n const sym = createTypeAndValueSymbol(props.name, {\n refkeys: props.refkey,\n export: props.export,\n default: props.default,\n metadata: props.metadata,\n hasInstanceMembers: true,\n namePolicy: useTSNamePolicy().for(\"class\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <Declaration symbol={sym} export={props.export} default={props.default}>\n <MemberScope ownerSymbol={sym}>\n {props.abstract && code`abstract `} class <Name />\n {props.typeParameters && (\n <TypeParameters parameters={props.typeParameters} />\n )}\n {extendsPart}\n {implementsPart} <Block>{props.children}</Block>\n </MemberScope>\n </Declaration>\n </>\n );\n}\n\nClassDeclaration.TypeParameters = TypeParameters;\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n */\nexport interface ClassMemberProps {\n name: string | Namekey;\n refkey?: Refkey;\n public?: boolean;\n private?: boolean;\n protected?: boolean;\n jsPrivate?: boolean;\n static?: boolean;\n abstract?: boolean;\n children?: Children;\n doc?: Children;\n nullish?: boolean;\n override?: boolean;\n}\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n *\n * @param props - The properties of the class member, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMember(props: ClassMemberProps) {\n let tsFlags = TSSymbolFlags.None;\n if (props.nullish) {\n tsFlags |= TSSymbolFlags.Nullish;\n }\n\n const sym = createMemberSymbol(props.name, props, {\n refkeys: props.refkey,\n tsFlags,\n namePolicy: useTSNamePolicy().for(\"class-member-data\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <MemberDeclaration symbol={sym}>\n {props.public && \"public \"}\n {props.private && \"private \"}\n {props.protected && \"protected \"}\n {props.abstract && \"abstract \"}\n {props.override && \"override \"}\n {props.static && \"static \"}\n {props.children}\n </MemberDeclaration>\n </>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassFieldProps extends ClassMemberProps {\n name: string;\n type?: Children;\n optional?: boolean;\n children?: Children;\n isPrivateMember?: boolean;\n}\n\n/**\n * Generates a TypeScript class field declaration for the given reflection class.\n *\n * @param props - The properties of the class field, including its name, type, optionality, and other modifiers.\n * @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassField(props: ClassFieldProps) {\n const optionality = props.optional ? \"?\" : \"\";\n const typeSection = props.type && (\n <>\n {optionality}: <TypeRefContext>{props.type}</TypeRefContext>\n </>\n );\n const initializerSection = props.children && <> = {props.children}</>;\n const nullish = props.nullish ?? props.optional;\n\n return (\n <ClassMember {...props} nullish={nullish}>\n <PropertyName\n private={props.isPrivateMember}\n name={props.isPrivateMember ? props.name : undefined}\n />\n {typeSection}\n {initializerSection}\n </ClassMember>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassPropertyProps extends ClassMemberProps {\n name: string;\n type?: Children;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class property setter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertySet(props: ClassPropertyProps) {\n return (\n <>\n <ClassMember {...props}>\n {\"set \"}\n <PropertyName name={props.name} />\n <LexicalScope>\n <CallSignature\n parameters={[\n {\n name: \"value\",\n type: <TypeRefContext>{props.type}</TypeRefContext>\n }\n ]}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n\n/**\n * Generates a TypeScript class property getter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertyGet(props: ClassPropertyProps) {\n return (\n <ClassMember {...props}>\n {\"get \"}\n <PropertyName name={props.name} />\n <LexicalScope>\n <CallSignature\n returnType={<TypeRefContext>{props.type}</TypeRefContext>}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n );\n}\n\n/**\n * Props for a class method, which is a specific type of class member that represents a function defined within the class.\n */\nexport interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {\n async?: boolean;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class method declaration for the given reflection class.\n *\n * @param props - The properties of the class method, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMethod(props: ClassMethodProps) {\n const callProps = getCallSignatureProps(props);\n const [_, rest] = splitProps(props, [\"doc\"]);\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc}>\n {Array.isArray(rest.parameters) && (\n <TSDocParams parameters={rest.parameters} />\n )}\n </TSDoc>\n </Show>\n <ClassMember {...rest}>\n {props.async && \"async \"}\n <PropertyName />\n <LexicalScope>\n <CallSignature {...callProps} /> <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAySA;;;;;;;;;;;;;;;;UAqBW;EAAA,KAAA,YAAA;AAAA,UAAA,MAAA;;EAAA,KAAA,aAAA;AAAA,UAAA,MAAA;;EAAA,IAAA,WAAA;AAAA,UAAA;iBAAA;IAAA,IAAA,WAAA;AAAA,YAAA;MAAA"}
@@ -1,33 +0,0 @@
1
- import * as _alloy_js_core18 from "@alloy-js/core";
2
- import { VarDeclarationProps } from "@alloy-js/typescript";
3
-
4
- //#region src/typescript/components/dynamic-import-statement.d.ts
5
- interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initializer"> {
6
- /**
7
- * The path of the module to import.
8
- */
9
- importPath: string;
10
- /**
11
- * The name of the export to import from the module.
12
- *
13
- * @defaultValue "default"
14
- */
15
- exportName?: string;
16
- }
17
- /**
18
- * Generates a dynamic import statement for a given module path and export name.
19
- *
20
- * @example
21
- * ```tsx
22
- * <DynamicImportStatement importPath="./my-module" exportName="myExport" const={true} name="myVar" />
23
- * // const myVar = await import("./my-module").then(m => m.myExport);
24
- * ```
25
- *
26
- * @param props - The properties for the dynamic import statement.
27
- * @returns A `VarDeclaration` component representing the dynamic import statement.
28
- */
29
- declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core18.Children;
30
- declare type __ΩDynamicImportStatementProps = any[];
31
- //#endregion
32
- export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
33
- //# sourceMappingURL=dynamic-import-statement.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamic-import-statement.d.cts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"sourcesContent":[],"mappings":";;;;UAqBiB,2BAAA,SAAoC,KACnD;;;AADF;EA6BgB,UAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;iBAAA,sBAAA,QAA8B,8BAA2B,gBAAA,CAAA"}
@@ -1,33 +0,0 @@
1
- import * as _alloy_js_core22 from "@alloy-js/core";
2
- import { VarDeclarationProps } from "@alloy-js/typescript";
3
-
4
- //#region src/typescript/components/dynamic-import-statement.d.ts
5
- interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initializer"> {
6
- /**
7
- * The path of the module to import.
8
- */
9
- importPath: string;
10
- /**
11
- * The name of the export to import from the module.
12
- *
13
- * @defaultValue "default"
14
- */
15
- exportName?: string;
16
- }
17
- /**
18
- * Generates a dynamic import statement for a given module path and export name.
19
- *
20
- * @example
21
- * ```tsx
22
- * <DynamicImportStatement importPath="./my-module" exportName="myExport" const={true} name="myVar" />
23
- * // const myVar = await import("./my-module").then(m => m.myExport);
24
- * ```
25
- *
26
- * @param props - The properties for the dynamic import statement.
27
- * @returns A `VarDeclaration` component representing the dynamic import statement.
28
- */
29
- declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core22.Children;
30
- declare type __ΩDynamicImportStatementProps = any[];
31
- //#endregion
32
- export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
33
- //# sourceMappingURL=dynamic-import-statement.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamic-import-statement.d.mts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"sourcesContent":[],"mappings":";;;;UAqBiB,2BAAA,SAAoC,KACnD;;;AADF;EA6BgB,UAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;iBAAA,sBAAA,QAA8B,8BAA2B,gBAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamic-import-statement.mjs","names":["code","VarDeclaration","DynamicImportStatement","props","importPath","exportName","const","isConst","rest","_$createComponent","_$mergeProps","initializer"],"sources":["../../../src/typescript/components/dynamic-import-statement.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 { code } from \"@alloy-js/core\";\nimport { VarDeclaration, VarDeclarationProps } from \"@alloy-js/typescript\";\n\nexport interface DynamicImportStatementProps extends Omit<\n VarDeclarationProps,\n \"initializer\"\n> {\n /**\n * The path of the module to import.\n */\n importPath: string;\n\n /**\n * The name of the export to import from the module.\n *\n * @defaultValue \"default\"\n */\n exportName?: string;\n}\n\n/**\n * Generates a dynamic import statement for a given module path and export name.\n *\n * @example\n * ```tsx\n * <DynamicImportStatement importPath=\"./my-module\" exportName=\"myExport\" const={true} name=\"myVar\" />\n * // const myVar = await import(\"./my-module\").then(m => m.myExport);\n * ```\n *\n * @param props - The properties for the dynamic import statement.\n * @returns A `VarDeclaration` component representing the dynamic import statement.\n */\nexport function DynamicImportStatement(props: DynamicImportStatementProps) {\n const {\n importPath,\n exportName = \"default\",\n const: isConst = true,\n ...rest\n } = props;\n\n return (\n <VarDeclaration\n const={isConst}\n {...rest}\n initializer={code`await import(\"${importPath}\").then(m => m.${exportName});`}></VarDeclaration>\n );\n}\n"],"mappings":""}
@@ -1,28 +0,0 @@
1
- import { TypescriptFileProps } from "./typescript-file.cjs";
2
- import * as _alloy_js_core23 from "@alloy-js/core";
3
- import { ResolvedEntryTypeDefinition } from "powerlines";
4
-
5
- //#region src/typescript/components/entry-file.d.ts
6
- type EntryFileProps = TypescriptFileProps & {
7
- /**
8
- * Whether the file is a TSX file.
9
- *
10
- * @defaultValue false
11
- */
12
- tsx?: boolean;
13
- /**
14
- * Render metadata information about the entrypoint
15
- */
16
- typeDefinition?: ResolvedEntryTypeDefinition;
17
- };
18
- /**
19
- * A base component representing a Powerlines generated Typescript source file.
20
- *
21
- * @param props - The properties for the source file.
22
- * @returns The rendered source file component.
23
- */
24
- declare function EntryFile(props: EntryFileProps): _alloy_js_core23.Children;
25
- declare type __ΩEntryFileProps = any[];
26
- //#endregion
27
- export { EntryFile, EntryFileProps, __ΩEntryFileProps };
28
- //# sourceMappingURL=entry-file.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entry-file.d.cts","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"sourcesContent":[],"mappings":";;;;;KA4BY,cAAA,GAAiB;;;AAA7B;AAoBA;;;;;;mBATmB;;;;;;;;iBASH,SAAA,QAAiB,iBAAc,gBAAA,CAAA"}