@powerlines/plugin-alloy 0.26.237 → 0.26.238

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 (331) hide show
  1. package/dist/core/components/index.cjs +1 -9
  2. package/dist/core/components/index.d.cts +1 -5
  3. package/dist/core/components/index.d.mts +1 -5
  4. package/dist/core/components/index.mjs +1 -5
  5. package/dist/core/components/infrastructure-file.cjs +6 -3
  6. package/dist/core/components/infrastructure-file.d.cts +1 -1
  7. package/dist/core/components/infrastructure-file.d.cts.map +1 -1
  8. package/dist/core/components/infrastructure-file.d.mts +1 -1
  9. package/dist/core/components/infrastructure-file.mjs +5 -2
  10. package/dist/core/contexts/index.cjs +1 -11
  11. package/dist/core/contexts/index.d.cts +1 -3
  12. package/dist/core/contexts/index.d.mts +1 -3
  13. package/dist/core/contexts/index.mjs +1 -3
  14. package/dist/core/index.cjs +2 -23
  15. package/dist/core/index.d.cts +2 -10
  16. package/dist/core/index.d.mts +2 -10
  17. package/dist/core/index.mjs +2 -10
  18. package/dist/helpers/capnp.cjs +2 -2
  19. package/dist/helpers/capnp.mjs +2 -2
  20. package/dist/index.cjs +10 -2
  21. package/dist/index.d.cts +10 -4
  22. package/dist/index.d.cts.map +1 -1
  23. package/dist/index.d.mts +10 -4
  24. package/dist/index.mjs +10 -2
  25. package/dist/render.cjs +67 -48
  26. package/dist/render.d.cts +33 -2
  27. package/dist/render.d.cts.map +1 -1
  28. package/dist/render.d.mts +33 -2
  29. package/dist/render.mjs +68 -49
  30. package/dist/types/index.d.cts +2 -3
  31. package/dist/types/index.d.mts +2 -3
  32. package/dist/types/plugin.d.cts +7 -4
  33. package/dist/types/plugin.d.cts.map +1 -1
  34. package/dist/types/plugin.d.mts +7 -4
  35. package/dist/typescript/components/builtin-file.cjs +6 -6
  36. package/dist/typescript/components/builtin-file.d.cts +2 -2
  37. package/dist/typescript/components/builtin-file.d.cts.map +1 -1
  38. package/dist/typescript/components/builtin-file.d.mts +2 -2
  39. package/dist/typescript/components/builtin-file.mjs +2 -2
  40. package/dist/typescript/components/entry-file.cjs +2 -2
  41. package/dist/typescript/components/entry-file.d.cts +1 -1
  42. package/dist/typescript/components/entry-file.d.cts.map +1 -1
  43. package/dist/typescript/components/entry-file.d.mts +1 -1
  44. package/dist/typescript/components/entry-file.mjs +1 -1
  45. package/dist/typescript/components/index.cjs +1 -56
  46. package/dist/typescript/components/index.d.cts +1 -12
  47. package/dist/typescript/components/index.d.mts +1 -12
  48. package/dist/typescript/components/index.mjs +1 -12
  49. package/dist/typescript/index.cjs +1 -64
  50. package/dist/typescript/index.d.cts +1 -17
  51. package/dist/typescript/index.d.mts +1 -17
  52. package/dist/typescript/index.mjs +1 -17
  53. package/package.json +18 -639
  54. package/dist/core/components/output.cjs +0 -40
  55. package/dist/core/components/output.d.cts +0 -22
  56. package/dist/core/components/output.d.cts.map +0 -1
  57. package/dist/core/components/output.d.mts +0 -22
  58. package/dist/core/components/output.d.mts.map +0 -1
  59. package/dist/core/components/output.mjs +0 -40
  60. package/dist/core/components/output.mjs.map +0 -1
  61. package/dist/core/components/single-line-comment.cjs +0 -22
  62. package/dist/core/components/single-line-comment.d.cts +0 -19
  63. package/dist/core/components/single-line-comment.d.cts.map +0 -1
  64. package/dist/core/components/single-line-comment.d.mts +0 -19
  65. package/dist/core/components/single-line-comment.d.mts.map +0 -1
  66. package/dist/core/components/single-line-comment.mjs +0 -22
  67. package/dist/core/components/single-line-comment.mjs.map +0 -1
  68. package/dist/core/components/source-file.cjs +0 -64
  69. package/dist/core/components/source-file.d.cts +0 -30
  70. package/dist/core/components/source-file.d.cts.map +0 -1
  71. package/dist/core/components/source-file.d.mts +0 -30
  72. package/dist/core/components/source-file.d.mts.map +0 -1
  73. package/dist/core/components/source-file.mjs +0 -62
  74. package/dist/core/components/source-file.mjs.map +0 -1
  75. package/dist/core/components/spacing.cjs +0 -19
  76. package/dist/core/components/spacing.d.cts +0 -19
  77. package/dist/core/components/spacing.d.cts.map +0 -1
  78. package/dist/core/components/spacing.d.mts +0 -19
  79. package/dist/core/components/spacing.d.mts.map +0 -1
  80. package/dist/core/components/spacing.mjs +0 -19
  81. package/dist/core/components/spacing.mjs.map +0 -1
  82. package/dist/core/contexts/meta.cjs +0 -40
  83. package/dist/core/contexts/meta.d.cts +0 -46
  84. package/dist/core/contexts/meta.d.cts.map +0 -1
  85. package/dist/core/contexts/meta.d.mts +0 -46
  86. package/dist/core/contexts/meta.d.mts.map +0 -1
  87. package/dist/core/contexts/meta.mjs +0 -37
  88. package/dist/core/contexts/meta.mjs.map +0 -1
  89. package/dist/core/contexts/schema.cjs +0 -38
  90. package/dist/core/contexts/schema.d.cts +0 -26
  91. package/dist/core/contexts/schema.d.cts.map +0 -1
  92. package/dist/core/contexts/schema.d.mts +0 -26
  93. package/dist/core/contexts/schema.d.mts.map +0 -1
  94. package/dist/core/contexts/schema.mjs +0 -35
  95. package/dist/core/contexts/schema.mjs.map +0 -1
  96. package/dist/core/helpers/code.cjs +0 -33
  97. package/dist/core/helpers/code.d.cts +0 -28
  98. package/dist/core/helpers/code.d.cts.map +0 -1
  99. package/dist/core/helpers/code.d.mts +0 -28
  100. package/dist/core/helpers/code.d.mts.map +0 -1
  101. package/dist/core/helpers/code.mjs +0 -33
  102. package/dist/core/helpers/code.mjs.map +0 -1
  103. package/dist/core/helpers/index.cjs +0 -4
  104. package/dist/core/helpers/index.d.cts +0 -2
  105. package/dist/core/helpers/index.d.mts +0 -2
  106. package/dist/core/helpers/index.mjs +0 -3
  107. package/dist/hcl/components/block-declaration.cjs +0 -33
  108. package/dist/hcl/components/block-declaration.d.cts +0 -19
  109. package/dist/hcl/components/block-declaration.d.cts.map +0 -1
  110. package/dist/hcl/components/block-declaration.d.mts +0 -19
  111. package/dist/hcl/components/block-declaration.d.mts.map +0 -1
  112. package/dist/hcl/components/block-declaration.mjs +0 -33
  113. package/dist/hcl/components/block-declaration.mjs.map +0 -1
  114. package/dist/hcl/components/hcl-file.cjs +0 -82
  115. package/dist/hcl/components/hcl-file.d.cts +0 -25
  116. package/dist/hcl/components/hcl-file.d.cts.map +0 -1
  117. package/dist/hcl/components/hcl-file.d.mts +0 -25
  118. package/dist/hcl/components/hcl-file.d.mts.map +0 -1
  119. package/dist/hcl/components/hcl-file.mjs +0 -81
  120. package/dist/hcl/components/hcl-file.mjs.map +0 -1
  121. package/dist/hcl/components/index.cjs +0 -11
  122. package/dist/hcl/components/index.d.cts +0 -5
  123. package/dist/hcl/components/index.d.mts +0 -5
  124. package/dist/hcl/components/index.mjs +0 -6
  125. package/dist/hcl/components/packer-file.cjs +0 -28
  126. package/dist/hcl/components/packer-file.d.cts +0 -16
  127. package/dist/hcl/components/packer-file.d.cts.map +0 -1
  128. package/dist/hcl/components/packer-file.d.mts +0 -16
  129. package/dist/hcl/components/packer-file.d.mts.map +0 -1
  130. package/dist/hcl/components/packer-file.mjs +0 -28
  131. package/dist/hcl/components/packer-file.mjs.map +0 -1
  132. package/dist/hcl/components/terraform-file.cjs +0 -29
  133. package/dist/hcl/components/terraform-file.d.cts +0 -17
  134. package/dist/hcl/components/terraform-file.d.cts.map +0 -1
  135. package/dist/hcl/components/terraform-file.d.mts +0 -17
  136. package/dist/hcl/components/terraform-file.d.mts.map +0 -1
  137. package/dist/hcl/components/terraform-file.mjs +0 -29
  138. package/dist/hcl/components/terraform-file.mjs.map +0 -1
  139. package/dist/hcl/index.cjs +0 -12
  140. package/dist/hcl/index.d.cts +0 -6
  141. package/dist/hcl/index.d.mts +0 -6
  142. package/dist/hcl/index.mjs +0 -7
  143. package/dist/markdown/components/alert.cjs +0 -74
  144. package/dist/markdown/components/alert.d.cts +0 -52
  145. package/dist/markdown/components/alert.d.cts.map +0 -1
  146. package/dist/markdown/components/alert.d.mts +0 -52
  147. package/dist/markdown/components/alert.d.mts.map +0 -1
  148. package/dist/markdown/components/alert.mjs +0 -69
  149. package/dist/markdown/components/alert.mjs.map +0 -1
  150. package/dist/markdown/components/front-matter.cjs +0 -30
  151. package/dist/markdown/components/front-matter.d.cts +0 -13
  152. package/dist/markdown/components/front-matter.d.cts.map +0 -1
  153. package/dist/markdown/components/front-matter.d.mts +0 -13
  154. package/dist/markdown/components/front-matter.d.mts.map +0 -1
  155. package/dist/markdown/components/front-matter.mjs +0 -30
  156. package/dist/markdown/components/front-matter.mjs.map +0 -1
  157. package/dist/markdown/components/heading.cjs +0 -23
  158. package/dist/markdown/components/heading.d.cts +0 -17
  159. package/dist/markdown/components/heading.d.cts.map +0 -1
  160. package/dist/markdown/components/heading.d.mts +0 -17
  161. package/dist/markdown/components/heading.d.mts.map +0 -1
  162. package/dist/markdown/components/heading.mjs +0 -23
  163. package/dist/markdown/components/heading.mjs.map +0 -1
  164. package/dist/markdown/components/index.cjs +0 -20
  165. package/dist/markdown/components/index.d.cts +0 -6
  166. package/dist/markdown/components/index.d.mts +0 -6
  167. package/dist/markdown/components/index.mjs +0 -7
  168. package/dist/markdown/components/markdown-file.cjs +0 -146
  169. package/dist/markdown/components/markdown-file.d.cts +0 -25
  170. package/dist/markdown/components/markdown-file.d.cts.map +0 -1
  171. package/dist/markdown/components/markdown-file.d.mts +0 -25
  172. package/dist/markdown/components/markdown-file.d.mts.map +0 -1
  173. package/dist/markdown/components/markdown-file.mjs +0 -145
  174. package/dist/markdown/components/markdown-file.mjs.map +0 -1
  175. package/dist/markdown/components/markdown-table.cjs +0 -106
  176. package/dist/markdown/components/markdown-table.d.cts +0 -37
  177. package/dist/markdown/components/markdown-table.d.cts.map +0 -1
  178. package/dist/markdown/components/markdown-table.d.mts +0 -37
  179. package/dist/markdown/components/markdown-table.d.mts.map +0 -1
  180. package/dist/markdown/components/markdown-table.mjs +0 -104
  181. package/dist/markdown/components/markdown-table.mjs.map +0 -1
  182. package/dist/markdown/contexts/index.cjs +0 -7
  183. package/dist/markdown/contexts/index.d.cts +0 -2
  184. package/dist/markdown/contexts/index.d.mts +0 -2
  185. package/dist/markdown/contexts/index.mjs +0 -3
  186. package/dist/markdown/contexts/markdown-table.cjs +0 -37
  187. package/dist/markdown/contexts/markdown-table.d.cts +0 -35
  188. package/dist/markdown/contexts/markdown-table.d.cts.map +0 -1
  189. package/dist/markdown/contexts/markdown-table.d.mts +0 -35
  190. package/dist/markdown/contexts/markdown-table.d.mts.map +0 -1
  191. package/dist/markdown/contexts/markdown-table.mjs +0 -34
  192. package/dist/markdown/contexts/markdown-table.mjs.map +0 -1
  193. package/dist/markdown/index.cjs +0 -27
  194. package/dist/markdown/index.d.cts +0 -9
  195. package/dist/markdown/index.d.mts +0 -9
  196. package/dist/markdown/index.mjs +0 -10
  197. package/dist/types/components.cjs +0 -9
  198. package/dist/types/components.d.cts +0 -137
  199. package/dist/types/components.d.cts.map +0 -1
  200. package/dist/types/components.d.mts +0 -137
  201. package/dist/types/components.d.mts.map +0 -1
  202. package/dist/types/components.mjs +0 -10
  203. package/dist/types/components.mjs.map +0 -1
  204. package/dist/typescript/components/class-declaration.cjs +0 -305
  205. package/dist/typescript/components/class-declaration.d.cts +0 -139
  206. package/dist/typescript/components/class-declaration.d.cts.map +0 -1
  207. package/dist/typescript/components/class-declaration.d.mts +0 -139
  208. package/dist/typescript/components/class-declaration.d.mts.map +0 -1
  209. package/dist/typescript/components/class-declaration.mjs +0 -300
  210. package/dist/typescript/components/class-declaration.mjs.map +0 -1
  211. package/dist/typescript/components/dynamic-import-statement.cjs +0 -25
  212. package/dist/typescript/components/dynamic-import-statement.d.cts +0 -30
  213. package/dist/typescript/components/dynamic-import-statement.d.cts.map +0 -1
  214. package/dist/typescript/components/dynamic-import-statement.d.mts +0 -30
  215. package/dist/typescript/components/dynamic-import-statement.d.mts.map +0 -1
  216. package/dist/typescript/components/dynamic-import-statement.mjs +0 -25
  217. package/dist/typescript/components/dynamic-import-statement.mjs.map +0 -1
  218. package/dist/typescript/components/interface-declaration.cjs +0 -257
  219. package/dist/typescript/components/interface-declaration.d.cts +0 -78
  220. package/dist/typescript/components/interface-declaration.d.cts.map +0 -1
  221. package/dist/typescript/components/interface-declaration.d.mts +0 -78
  222. package/dist/typescript/components/interface-declaration.d.mts.map +0 -1
  223. package/dist/typescript/components/interface-declaration.mjs +0 -254
  224. package/dist/typescript/components/interface-declaration.mjs.map +0 -1
  225. package/dist/typescript/components/object-declaration.cjs +0 -131
  226. package/dist/typescript/components/object-declaration.d.cts +0 -24
  227. package/dist/typescript/components/object-declaration.d.cts.map +0 -1
  228. package/dist/typescript/components/object-declaration.d.mts +0 -24
  229. package/dist/typescript/components/object-declaration.d.mts.map +0 -1
  230. package/dist/typescript/components/object-declaration.mjs +0 -130
  231. package/dist/typescript/components/object-declaration.mjs.map +0 -1
  232. package/dist/typescript/components/property-name.cjs +0 -31
  233. package/dist/typescript/components/property-name.d.cts +0 -21
  234. package/dist/typescript/components/property-name.d.cts.map +0 -1
  235. package/dist/typescript/components/property-name.d.mts +0 -21
  236. package/dist/typescript/components/property-name.d.mts.map +0 -1
  237. package/dist/typescript/components/property-name.mjs +0 -31
  238. package/dist/typescript/components/property-name.mjs.map +0 -1
  239. package/dist/typescript/components/record-expression.cjs +0 -12
  240. package/dist/typescript/components/record-expression.d.cts +0 -9
  241. package/dist/typescript/components/record-expression.d.cts.map +0 -1
  242. package/dist/typescript/components/record-expression.d.mts +0 -9
  243. package/dist/typescript/components/record-expression.d.mts.map +0 -1
  244. package/dist/typescript/components/record-expression.mjs +0 -12
  245. package/dist/typescript/components/record-expression.mjs.map +0 -1
  246. package/dist/typescript/components/tsdoc-schema.cjs +0 -166
  247. package/dist/typescript/components/tsdoc-schema.d.cts +0 -21
  248. package/dist/typescript/components/tsdoc-schema.d.cts.map +0 -1
  249. package/dist/typescript/components/tsdoc-schema.d.mts +0 -21
  250. package/dist/typescript/components/tsdoc-schema.d.mts.map +0 -1
  251. package/dist/typescript/components/tsdoc-schema.mjs +0 -165
  252. package/dist/typescript/components/tsdoc-schema.mjs.map +0 -1
  253. package/dist/typescript/components/tsdoc.cjs +0 -486
  254. package/dist/typescript/components/tsdoc.d.cts +0 -163
  255. package/dist/typescript/components/tsdoc.d.cts.map +0 -1
  256. package/dist/typescript/components/tsdoc.d.mts +0 -163
  257. package/dist/typescript/components/tsdoc.d.mts.map +0 -1
  258. package/dist/typescript/components/tsdoc.mjs +0 -465
  259. package/dist/typescript/components/tsdoc.mjs.map +0 -1
  260. package/dist/typescript/components/type-declaration.cjs +0 -38
  261. package/dist/typescript/components/type-declaration.d.cts +0 -15
  262. package/dist/typescript/components/type-declaration.d.cts.map +0 -1
  263. package/dist/typescript/components/type-declaration.d.mts +0 -15
  264. package/dist/typescript/components/type-declaration.d.mts.map +0 -1
  265. package/dist/typescript/components/type-declaration.mjs +0 -38
  266. package/dist/typescript/components/type-declaration.mjs.map +0 -1
  267. package/dist/typescript/components/type-parameters.cjs +0 -82
  268. package/dist/typescript/components/type-parameters.d.cts +0 -22
  269. package/dist/typescript/components/type-parameters.d.cts.map +0 -1
  270. package/dist/typescript/components/type-parameters.d.mts +0 -22
  271. package/dist/typescript/components/type-parameters.d.mts.map +0 -1
  272. package/dist/typescript/components/type-parameters.mjs +0 -82
  273. package/dist/typescript/components/type-parameters.mjs.map +0 -1
  274. package/dist/typescript/components/typescript-file.cjs +0 -231
  275. package/dist/typescript/components/typescript-file.d.cts +0 -46
  276. package/dist/typescript/components/typescript-file.d.cts.map +0 -1
  277. package/dist/typescript/components/typescript-file.d.mts +0 -46
  278. package/dist/typescript/components/typescript-file.d.mts.map +0 -1
  279. package/dist/typescript/components/typescript-file.mjs +0 -229
  280. package/dist/typescript/components/typescript-file.mjs.map +0 -1
  281. package/dist/typescript/contexts/index.cjs +0 -4
  282. package/dist/typescript/contexts/index.d.cts +0 -2
  283. package/dist/typescript/contexts/index.d.mts +0 -2
  284. package/dist/typescript/contexts/index.mjs +0 -3
  285. package/dist/typescript/contexts/lexical-scope.cjs +0 -25
  286. package/dist/typescript/contexts/lexical-scope.d.cts +0 -12
  287. package/dist/typescript/contexts/lexical-scope.d.cts.map +0 -1
  288. package/dist/typescript/contexts/lexical-scope.d.mts +0 -12
  289. package/dist/typescript/contexts/lexical-scope.d.mts.map +0 -1
  290. package/dist/typescript/contexts/lexical-scope.mjs +0 -25
  291. package/dist/typescript/contexts/lexical-scope.mjs.map +0 -1
  292. package/dist/typescript/contexts/member-scope.cjs +0 -23
  293. package/dist/typescript/contexts/member-scope.d.cts +0 -18
  294. package/dist/typescript/contexts/member-scope.d.cts.map +0 -1
  295. package/dist/typescript/contexts/member-scope.d.mts +0 -18
  296. package/dist/typescript/contexts/member-scope.d.mts.map +0 -1
  297. package/dist/typescript/contexts/member-scope.mjs +0 -23
  298. package/dist/typescript/contexts/member-scope.mjs.map +0 -1
  299. package/dist/typescript/helpers/get-call-signature-props.cjs +0 -25
  300. package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -13
  301. package/dist/typescript/helpers/get-call-signature-props.d.cts.map +0 -1
  302. package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -13
  303. package/dist/typescript/helpers/get-call-signature-props.d.mts.map +0 -1
  304. package/dist/typescript/helpers/get-call-signature-props.mjs +0 -25
  305. package/dist/typescript/helpers/get-call-signature-props.mjs.map +0 -1
  306. package/dist/typescript/helpers/index.cjs +0 -6
  307. package/dist/typescript/helpers/index.d.cts +0 -3
  308. package/dist/typescript/helpers/index.d.mts +0 -3
  309. package/dist/typescript/helpers/index.mjs +0 -4
  310. package/dist/typescript/helpers/utilities.cjs +0 -15
  311. package/dist/typescript/helpers/utilities.d.cts +0 -11
  312. package/dist/typescript/helpers/utilities.d.cts.map +0 -1
  313. package/dist/typescript/helpers/utilities.d.mts +0 -11
  314. package/dist/typescript/helpers/utilities.d.mts.map +0 -1
  315. package/dist/typescript/helpers/utilities.mjs +0 -14
  316. package/dist/typescript/helpers/utilities.mjs.map +0 -1
  317. package/dist/yaml/components/index.cjs +0 -5
  318. package/dist/yaml/components/index.d.cts +0 -2
  319. package/dist/yaml/components/index.d.mts +0 -2
  320. package/dist/yaml/components/index.mjs +0 -3
  321. package/dist/yaml/components/yaml-file.cjs +0 -148
  322. package/dist/yaml/components/yaml-file.d.cts +0 -31
  323. package/dist/yaml/components/yaml-file.d.cts.map +0 -1
  324. package/dist/yaml/components/yaml-file.d.mts +0 -31
  325. package/dist/yaml/components/yaml-file.d.mts.map +0 -1
  326. package/dist/yaml/components/yaml-file.mjs +0 -147
  327. package/dist/yaml/components/yaml-file.mjs.map +0 -1
  328. package/dist/yaml/index.cjs +0 -6
  329. package/dist/yaml/index.d.cts +0 -3
  330. package/dist/yaml/index.d.mts +0 -3
  331. package/dist/yaml/index.mjs +0 -4
@@ -1,40 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_core_contexts_context = require('../contexts/context.cjs');
3
- const require_core_contexts_meta = require('../contexts/meta.cjs');
4
- require('../contexts/index.cjs');
5
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
6
- let _alloy_js_core = require("@alloy-js/core");
7
-
8
- //#region src/core/components/output.tsx
9
- /**
10
- * Output component for rendering the Powerlines plugin's output files via templates.
11
- */
12
- function Output(props) {
13
- const [{ children, context, meta = {} }, rest] = (0, _alloy_js_core.splitProps)(props, [
14
- "children",
15
- "context",
16
- "meta"
17
- ]);
18
- const contextRef = (0, _alloy_js_core.computed)(() => context);
19
- return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_meta.MetaContext.Provider, {
20
- value: meta,
21
- get children() {
22
- return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_context.PowerlinesContext.Provider, {
23
- get value() {
24
- return contextRef.value;
25
- },
26
- get children() {
27
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Output, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
28
- get basePath() {
29
- return contextRef.value.config.cwd;
30
- },
31
- children
32
- }));
33
- }
34
- });
35
- }
36
- });
37
- }
38
-
39
- //#endregion
40
- exports.Output = Output;
@@ -1,22 +0,0 @@
1
- import { MetaItem } from "../contexts/meta.cjs";
2
- import "../contexts/index.cjs";
3
- import { OutputProps as OutputProps$1 } from "@alloy-js/core";
4
- import { PluginContext } from "powerlines";
5
- //#region src/core/components/output.d.ts
6
- interface OutputProps<TContext extends PluginContext = PluginContext> extends Omit<OutputProps$1, "basePath"> {
7
- /**
8
- * The current Powerlines process context.
9
- */
10
- context: TContext;
11
- /**
12
- * The file metadata collected during rendering.
13
- */
14
- meta?: Record<string, MetaItem>;
15
- }
16
- /**
17
- * Output component for rendering the Powerlines plugin's output files via templates.
18
- */
19
- declare function Output<TContext extends PluginContext = PluginContext>(props: OutputProps<TContext>): import("@alloy-js/core").Children;
20
- //#endregion
21
- export { Output, OutputProps };
22
- //# sourceMappingURL=output.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.d.cts","names":[],"sources":["../../../src/core/components/output.tsx"],"mappings":";;;;;UAwBiB,YACf,iBAAiB,gBAAgB,uBACzB,KAAK;;;;EAIb,SAAS;;;;EAKT,OAAO,eAAe;;;;;iBAMR,OAAO,iBAAiB,gBAAgB,eACtD,OAAO,YAAY,qCAAS"}
@@ -1,22 +0,0 @@
1
- import { MetaItem } from "../contexts/meta.mjs";
2
- import "../contexts/index.mjs";
3
- import { OutputProps as OutputProps$1 } from "@alloy-js/core";
4
- import { PluginContext } from "powerlines";
5
- //#region src/core/components/output.d.ts
6
- interface OutputProps<TContext extends PluginContext = PluginContext> extends Omit<OutputProps$1, "basePath"> {
7
- /**
8
- * The current Powerlines process context.
9
- */
10
- context: TContext;
11
- /**
12
- * The file metadata collected during rendering.
13
- */
14
- meta?: Record<string, MetaItem>;
15
- }
16
- /**
17
- * Output component for rendering the Powerlines plugin's output files via templates.
18
- */
19
- declare function Output<TContext extends PluginContext = PluginContext>(props: OutputProps<TContext>): import("@alloy-js/core").Children;
20
- //#endregion
21
- export { Output, OutputProps };
22
- //# sourceMappingURL=output.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.d.mts","names":[],"sources":["../../../src/core/components/output.tsx"],"mappings":""}
@@ -1,40 +0,0 @@
1
- import { PowerlinesContext } from "../contexts/context.mjs";
2
- import { MetaContext } from "../contexts/meta.mjs";
3
- import "../contexts/index.mjs";
4
- import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
5
- import { Output as Output$1, computed, splitProps } from "@alloy-js/core";
6
-
7
- //#region src/core/components/output.tsx
8
- /**
9
- * Output component for rendering the Powerlines plugin's output files via templates.
10
- */
11
- function Output(props) {
12
- const [{ children, context, meta = {} }, rest] = splitProps(props, [
13
- "children",
14
- "context",
15
- "meta"
16
- ]);
17
- const contextRef = computed(() => context);
18
- return createComponent(MetaContext.Provider, {
19
- value: meta,
20
- get children() {
21
- return createComponent(PowerlinesContext.Provider, {
22
- get value() {
23
- return contextRef.value;
24
- },
25
- get children() {
26
- return createComponent(Output$1, mergeProps(rest, {
27
- get basePath() {
28
- return contextRef.value.config.cwd;
29
- },
30
- children
31
- }));
32
- }
33
- });
34
- }
35
- });
36
- }
37
-
38
- //#endregion
39
- export { Output };
40
- //# sourceMappingURL=output.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.mjs","names":[],"sources":[],"mappings":""}
@@ -1,22 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
- let _alloy_js_core = require("@alloy-js/core");
4
-
5
- //#region src/core/components/single-line-comment.tsx
6
- /**
7
- * A single line comment block. The children are rendered as a prose element, which means that they
8
- * are broken into multiple lines
9
- */
10
- function SingleLineComment(props) {
11
- const { variant = "double-slash", children } = props;
12
- const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : variant === "yaml" || variant === "hcl" ? "# " : "// ";
13
- return [commentStart, (0, _alloy_js_core_jsx_runtime.createIntrinsic)("align", {
14
- string: commentStart,
15
- get children() {
16
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""];
17
- }
18
- })];
19
- }
20
-
21
- //#endregion
22
- exports.SingleLineComment = SingleLineComment;
@@ -1,19 +0,0 @@
1
- import { ComponentProps } from "../../types/components.cjs";
2
- //#region src/core/components/single-line-comment.d.ts
3
- type SingleLineCommentVariant = "double-slash" | "triple-slash" | "slash-star" | "slash-star-star" | "markdown" | "yaml" | "hcl";
4
- interface SingleLineCommentProps extends ComponentProps {
5
- /**
6
- * The variant of the single line comment.
7
- *
8
- * @defaultValue "double-slash"
9
- */
10
- variant?: SingleLineCommentVariant;
11
- }
12
- /**
13
- * A single line comment block. The children are rendered as a prose element, which means that they
14
- * are broken into multiple lines
15
- */
16
- declare function SingleLineComment(props: SingleLineCommentProps): import("@alloy-js/core").Children;
17
- //#endregion
18
- export { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant };
19
- //# sourceMappingURL=single-line-comment.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"single-line-comment.d.cts","names":[],"sources":["../../../src/core/components/single-line-comment.tsx"],"mappings":";;KAqBY;UASK,+BAA+B;;;;;;EAM9C,UAAU;;;;;;iBAOI,kBAAkB,OAAO,kDAAsB"}
@@ -1,19 +0,0 @@
1
- import { ComponentProps } from "../../types/components.mjs";
2
- //#region src/core/components/single-line-comment.d.ts
3
- type SingleLineCommentVariant = "double-slash" | "triple-slash" | "slash-star" | "slash-star-star" | "markdown" | "yaml" | "hcl";
4
- interface SingleLineCommentProps extends ComponentProps {
5
- /**
6
- * The variant of the single line comment.
7
- *
8
- * @defaultValue "double-slash"
9
- */
10
- variant?: SingleLineCommentVariant;
11
- }
12
- /**
13
- * A single line comment block. The children are rendered as a prose element, which means that they
14
- * are broken into multiple lines
15
- */
16
- declare function SingleLineComment(props: SingleLineCommentProps): import("@alloy-js/core").Children;
17
- //#endregion
18
- export { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant };
19
- //# sourceMappingURL=single-line-comment.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"single-line-comment.d.mts","names":[],"sources":["../../../src/core/components/single-line-comment.tsx"],"mappings":""}
@@ -1,22 +0,0 @@
1
- import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
- import { Prose } from "@alloy-js/core";
3
-
4
- //#region src/core/components/single-line-comment.tsx
5
- /**
6
- * A single line comment block. The children are rendered as a prose element, which means that they
7
- * are broken into multiple lines
8
- */
9
- function SingleLineComment(props) {
10
- const { variant = "double-slash", children } = props;
11
- const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : variant === "yaml" || variant === "hcl" ? "# " : "// ";
12
- return [commentStart, createIntrinsic("align", {
13
- string: commentStart,
14
- get children() {
15
- return [createComponent(Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""];
16
- }
17
- })];
18
- }
19
-
20
- //#endregion
21
- export { SingleLineComment };
22
- //# sourceMappingURL=single-line-comment.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"single-line-comment.mjs","names":[],"sources":[],"mappings":""}
@@ -1,64 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
- const require_core_contexts_meta = require('../contexts/meta.cjs');
4
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
- let _alloy_js_core = require("@alloy-js/core");
6
- let _stryke_path_append = require("@stryke/path/append");
7
- let defu = require("defu");
8
- defu = require_runtime.__toESM(defu, 1);
9
-
10
- //#region src/core/components/source-file.tsx
11
- /**
12
- * A base component representing a Powerlines generated source file.
13
- *
14
- * @param props - The properties for the source file.
15
- * @returns The rendered source file component.
16
- */
17
- function SourceFile(props) {
18
- const [{ children, meta, path, header, storage, filetype, reference }] = (0, _alloy_js_core.splitProps)(props, [
19
- "children",
20
- "meta",
21
- "path",
22
- "header",
23
- "storage",
24
- "filetype",
25
- "reference"
26
- ]);
27
- const metadata = require_core_contexts_meta.useMeta();
28
- const parentDirectory = (0, _alloy_js_core.useContext)(_alloy_js_core.SourceDirectoryContext);
29
- const sourceFile = {
30
- path: (0, _stryke_path_append.appendPath)(path, parentDirectory.path),
31
- filetype,
32
- reference
33
- };
34
- parentDirectory?.addContent(sourceFile);
35
- const printOptions = (0, _alloy_js_core.useFormatOptions)({
36
- printWidth: props.printWidth,
37
- tabWidth: props.tabWidth,
38
- useTabs: props.useTabs,
39
- insertFinalNewLine: props.insertFinalNewLine
40
- });
41
- const nodeContext = (0, _alloy_js_core.getContext)();
42
- nodeContext.meta = (0, defu.default)({
43
- sourceFile,
44
- printOptions
45
- }, meta ?? {});
46
- if (metadata) metadata[sourceFile.path] = {
47
- storage,
48
- ...meta ?? {}
49
- };
50
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.SourceFileContext.Provider, {
51
- value: sourceFile,
52
- get children() {
53
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
54
- when: header !== void 0,
55
- get children() {
56
- return [header, (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
57
- }
58
- }), children];
59
- }
60
- });
61
- }
62
-
63
- //#endregion
64
- exports.SourceFile = SourceFile;
@@ -1,30 +0,0 @@
1
- import { ComponentProps } from "../../types/components.cjs";
2
- import { SourceFileProps as SourceFileProps$1 } from "@alloy-js/core";
3
- import { StoragePreset } from "powerlines";
4
- //#region src/core/components/source-file.d.ts
5
- type SourceFileProps = SourceFileProps$1 & ComponentProps & {
6
- /**
7
- * The storage preset for the output files.
8
- *
9
- * @remarks
10
- * If not specified, the output mode will be determined by the provided `output.mode` value.
11
- */
12
- storage?: StoragePreset;
13
- /**
14
- * The metadata associated with the source file.
15
- *
16
- * @remarks
17
- * The values stored in the metadata will be available in the rendering context.
18
- */
19
- meta?: Record<string, any>;
20
- };
21
- /**
22
- * A base component representing a Powerlines generated source file.
23
- *
24
- * @param props - The properties for the source file.
25
- * @returns The rendered source file component.
26
- */
27
- declare function SourceFile(props: SourceFileProps): import("@alloy-js/core").Children;
28
- //#endregion
29
- export { SourceFile, SourceFileProps };
30
- //# sourceMappingURL=source-file.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-file.d.cts","names":[],"sources":["../../../src/core/components/source-file.tsx"],"mappings":";;;;KAkCY,kBAAkB,oBAC5B;;;;;;;EAOE,UAAU;;;;;;;EAQV,OAAO;;;;;;;;iBASK,WAAW,OAAO,2CAAe"}
@@ -1,30 +0,0 @@
1
- import { ComponentProps } from "../../types/components.mjs";
2
- import { SourceFileProps as SourceFileProps$1 } from "@alloy-js/core";
3
- import { StoragePreset } from "powerlines";
4
- //#region src/core/components/source-file.d.ts
5
- type SourceFileProps = SourceFileProps$1 & ComponentProps & {
6
- /**
7
- * The storage preset for the output files.
8
- *
9
- * @remarks
10
- * If not specified, the output mode will be determined by the provided `output.mode` value.
11
- */
12
- storage?: StoragePreset;
13
- /**
14
- * The metadata associated with the source file.
15
- *
16
- * @remarks
17
- * The values stored in the metadata will be available in the rendering context.
18
- */
19
- meta?: Record<string, any>;
20
- };
21
- /**
22
- * A base component representing a Powerlines generated source file.
23
- *
24
- * @param props - The properties for the source file.
25
- * @returns The rendered source file component.
26
- */
27
- declare function SourceFile(props: SourceFileProps): import("@alloy-js/core").Children;
28
- //#endregion
29
- export { SourceFile, SourceFileProps };
30
- //# sourceMappingURL=source-file.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-file.d.mts","names":[],"sources":["../../../src/core/components/source-file.tsx"],"mappings":""}
@@ -1,62 +0,0 @@
1
- import { useMeta } from "../contexts/meta.mjs";
2
- import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
3
- import { Show, SourceDirectoryContext, SourceFileContext, getContext, splitProps, useContext, useFormatOptions } from "@alloy-js/core";
4
- import { appendPath } from "@stryke/path/append";
5
- import defu from "defu";
6
-
7
- //#region src/core/components/source-file.tsx
8
- /**
9
- * A base component representing a Powerlines generated source file.
10
- *
11
- * @param props - The properties for the source file.
12
- * @returns The rendered source file component.
13
- */
14
- function SourceFile(props) {
15
- const [{ children, meta, path, header, storage, filetype, reference }] = splitProps(props, [
16
- "children",
17
- "meta",
18
- "path",
19
- "header",
20
- "storage",
21
- "filetype",
22
- "reference"
23
- ]);
24
- const metadata = useMeta();
25
- const parentDirectory = useContext(SourceDirectoryContext);
26
- const sourceFile = {
27
- path: appendPath(path, parentDirectory.path),
28
- filetype,
29
- reference
30
- };
31
- parentDirectory?.addContent(sourceFile);
32
- const printOptions = useFormatOptions({
33
- printWidth: props.printWidth,
34
- tabWidth: props.tabWidth,
35
- useTabs: props.useTabs,
36
- insertFinalNewLine: props.insertFinalNewLine
37
- });
38
- const nodeContext = getContext();
39
- nodeContext.meta = defu({
40
- sourceFile,
41
- printOptions
42
- }, meta ?? {});
43
- if (metadata) metadata[sourceFile.path] = {
44
- storage,
45
- ...meta ?? {}
46
- };
47
- return createComponent(SourceFileContext.Provider, {
48
- value: sourceFile,
49
- get children() {
50
- return [createComponent(Show, {
51
- when: header !== void 0,
52
- get children() {
53
- return [header, createIntrinsic("hbr", {})];
54
- }
55
- }), children];
56
- }
57
- });
58
- }
59
-
60
- //#endregion
61
- export { SourceFile };
62
- //# sourceMappingURL=source-file.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-file.mjs","names":[],"sources":[],"mappings":""}
@@ -1,19 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
- let _alloy_js_core = require("@alloy-js/core");
4
-
5
- //#region src/core/components/spacing.tsx
6
- /**
7
- * A simple component that renders two horizontal breaks to create vertical spacing between elements.
8
- */
9
- function Spacing({ scale = 1 }) {
10
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
11
- get each() {
12
- return Array.from({ length: scale });
13
- },
14
- children: (_) => [(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})]
15
- });
16
- }
17
-
18
- //#endregion
19
- exports.Spacing = Spacing;
@@ -1,19 +0,0 @@
1
- //#region src/core/components/spacing.d.ts
2
- interface SpacingProps {
3
- /**
4
- * A scale factor that determines the amount of vertical space to be added.
5
- *
6
- * @remarks
7
- * The default value is 1, which corresponds to a standard spacing. A value of 2 would double the spacing, while a value of 0.5 would halve it.
8
- *
9
- * @defaultValue 1
10
- */
11
- scale?: number;
12
- }
13
- /**
14
- * A simple component that renders two horizontal breaks to create vertical spacing between elements.
15
- */
16
- declare function Spacing({ scale }: SpacingProps): import("@alloy-js/core").Children;
17
- //#endregion
18
- export { Spacing, SpacingProps };
19
- //# sourceMappingURL=spacing.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spacing.d.cts","names":[],"sources":["../../../src/core/components/spacing.tsx"],"mappings":";UAoBiB;;;;;;;;;EASf;;;;;iBAMc,UAAU,SAAa,wCAAY"}
@@ -1,19 +0,0 @@
1
- //#region src/core/components/spacing.d.ts
2
- interface SpacingProps {
3
- /**
4
- * A scale factor that determines the amount of vertical space to be added.
5
- *
6
- * @remarks
7
- * The default value is 1, which corresponds to a standard spacing. A value of 2 would double the spacing, while a value of 0.5 would halve it.
8
- *
9
- * @defaultValue 1
10
- */
11
- scale?: number;
12
- }
13
- /**
14
- * A simple component that renders two horizontal breaks to create vertical spacing between elements.
15
- */
16
- declare function Spacing({ scale }: SpacingProps): import("@alloy-js/core").Children;
17
- //#endregion
18
- export { Spacing, SpacingProps };
19
- //# sourceMappingURL=spacing.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spacing.d.mts","names":[],"sources":["../../../src/core/components/spacing.tsx"],"mappings":""}
@@ -1,19 +0,0 @@
1
- import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
- import { For } from "@alloy-js/core";
3
-
4
- //#region src/core/components/spacing.tsx
5
- /**
6
- * A simple component that renders two horizontal breaks to create vertical spacing between elements.
7
- */
8
- function Spacing({ scale = 1 }) {
9
- return createComponent(For, {
10
- get each() {
11
- return Array.from({ length: scale });
12
- },
13
- children: (_) => [createIntrinsic("hbr", {}), createIntrinsic("hbr", {})]
14
- });
15
- }
16
-
17
- //#endregion
18
- export { Spacing };
19
- //# sourceMappingURL=spacing.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spacing.mjs","names":[],"sources":[],"mappings":""}
@@ -1,40 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let _alloy_js_core = require("@alloy-js/core");
3
-
4
- //#region src/core/contexts/meta.ts
5
- /**
6
- * The Powerlines meta context used to determine metadata of files generated during rendering.
7
- */
8
- const MetaContext = (0, _alloy_js_core.createNamedContext)("Meta");
9
- /**
10
- * Hook to access the Powerlines Context.
11
- *
12
- * @returns The Context.
13
- */
14
- function useMetaContext() {
15
- return (0, _alloy_js_core.useContext)(MetaContext);
16
- }
17
- /**
18
- * Hook to safely access the render context's metadata.
19
- *
20
- * @returns The Powerlines context or undefined if not set.
21
- */
22
- function useMetaSafe() {
23
- return useMetaContext() ?? void 0;
24
- }
25
- /**
26
- * Hook to access the render context's metadata.
27
- *
28
- * @returns The Powerlines context.
29
- */
30
- function useMeta() {
31
- const meta = useMetaSafe();
32
- if (!meta) throw new Error("Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
33
- return meta;
34
- }
35
-
36
- //#endregion
37
- exports.MetaContext = MetaContext;
38
- exports.useMeta = useMeta;
39
- exports.useMetaContext = useMetaContext;
40
- exports.useMetaSafe = useMetaSafe;
@@ -1,46 +0,0 @@
1
- import { ComponentContext } from "@alloy-js/core";
2
- import { StoragePreset } from "powerlines";
3
- //#region src/core/contexts/meta.d.ts
4
- interface MetaItem {
5
- /**
6
- * The kind of metadata item.
7
- */
8
- kind?: "builtin" | "entry" | string;
9
- /**
10
- * Whether to skip formatting for this output.
11
- */
12
- skipFormat?: boolean;
13
- /**
14
- * The storage preset or adapter name for the output files.
15
- *
16
- * @remarks
17
- * If not specified, the output mode will be determined by the provided `output.mode` value.
18
- */
19
- storage?: StoragePreset | string;
20
- [key: string]: any;
21
- }
22
- /**
23
- * The Powerlines meta context used to determine metadata of files generated during rendering.
24
- */
25
- declare const MetaContext: ComponentContext<Record<string, MetaItem>>;
26
- /**
27
- * Hook to access the Powerlines Context.
28
- *
29
- * @returns The Context.
30
- */
31
- declare function useMetaContext(): Record<string, MetaItem> | undefined;
32
- /**
33
- * Hook to safely access the render context's metadata.
34
- *
35
- * @returns The Powerlines context or undefined if not set.
36
- */
37
- declare function useMetaSafe(): Record<string, MetaItem> | undefined;
38
- /**
39
- * Hook to access the render context's metadata.
40
- *
41
- * @returns The Powerlines context.
42
- */
43
- declare function useMeta(): Record<string, MetaItem>;
44
- //#endregion
45
- export { MetaContext, MetaItem, useMeta, useMetaContext, useMetaSafe };
46
- //# sourceMappingURL=meta.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.cts","names":[],"sources":["../../../src/core/contexts/meta.ts"],"mappings":";;;UAyBiB;;;;EAIf;;;;EAKA;;;;;;;EAQA,UAAU;GAET;;;;;cAMU,aAAa,iBAAiB,eAAe;;;;;;iBAQ1C,kBAAkB,eAAe;;;;;;iBASjC,eAAe,eAAe;;;;;;iBAW9B,WAAW,eAAe"}