@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,28 +0,0 @@
1
- import { ComponentProps } from "../../types/components.cjs";
2
- import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.cjs";
3
- import * as _alloy_js_core0 from "@alloy-js/core";
4
-
5
- //#region src/markdown/components/markdown-table.d.ts
6
- interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
7
- data: T[];
8
- }
9
- /**
10
- * Component that provides a context for rendering markdown tables.
11
- */
12
- declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core0.Children;
13
- type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
14
- width?: number;
15
- };
16
- /**
17
- * Component that provides a context for rendering markdown tables.
18
- */
19
- declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
20
- /**
21
- * Component that provides a context for rendering markdown tables.
22
- */
23
- declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
24
- declare type __ΩMarkdownTableProps = any[];
25
- declare type __ΩMarkdownTableColumnProps = any[];
26
- //#endregion
27
- export { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps };
28
- //# sourceMappingURL=markdown-table.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown-table.d.cts","names":[],"sources":["../../../src/markdown/components/markdown-table.tsx"],"sourcesContent":[],"mappings":";;;;;UA4BiB,6BACL,sBAAsB,6BACxB;QACF;;AAHR;;;AAGQ,iBAMQ,aANR,CAAA,UAOI,MAPJ,CAAA,MAAA,EAAA,GAAA,CAAA,GAO0B,MAP1B,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAQC,kBARD,CAQoB,CARpB,CAAA,CAAA,EAQmB,eAAA,CAAG,QARtB;AADE,KA4BE,wBAAA,GAA2B,cA5B7B,GA6BR,OA7BQ,CA6BA,IA7BA,CA6BK,mCA7BL,EAAA,OAAA,CAAA,CAAA,GA8BR,QA9BQ,CA8BC,IA9BD,CA8BM,mCA9BN,EAAA,MAAA,CAAA,CAAA,GAAA;EAAc,KAAA,CAAA,EAAA,MAAA;AAOxB,CAAA;;;;AAES,iBA4BO,mBAAA,CA5BP,KAAA,EA4BkC,wBA5BlC,CAAA,EA4B0D,eAAA,CAAA,QA5B1D;;;AAmBT;AAAuC,iBAsDvB,yBAAA,CAtDuB,KAAA,EAsDU,wBAtDV,CAAA,EAsDkC,eAAA,CAAA,QAtDlC;AACxB,qCAAA,GAAA,EAAA;AAAL,2CAAA,GAAA,EAAA"}
@@ -1,28 +0,0 @@
1
- import { ComponentProps } from "../../types/components.mjs";
2
- import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.mjs";
3
- import * as _alloy_js_core5 from "@alloy-js/core";
4
-
5
- //#region src/markdown/components/markdown-table.d.ts
6
- interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
7
- data: T[];
8
- }
9
- /**
10
- * Component that provides a context for rendering markdown tables.
11
- */
12
- declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core5.Children;
13
- type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
14
- width?: number;
15
- };
16
- /**
17
- * Component that provides a context for rendering markdown tables.
18
- */
19
- declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core5.Children;
20
- /**
21
- * Component that provides a context for rendering markdown tables.
22
- */
23
- declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core5.Children;
24
- declare type __ΩMarkdownTableProps = any[];
25
- declare type __ΩMarkdownTableColumnProps = any[];
26
- //#endregion
27
- export { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps };
28
- //# sourceMappingURL=markdown-table.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/components/markdown-table.tsx"],"sourcesContent":[],"mappings":";;;;;UA4BiB,6BACL,sBAAsB,6BACxB;QACF;;AAHR;;;AAGQ,iBAMQ,aANR,CAAA,UAOI,MAPJ,CAAA,MAAA,EAAA,GAAA,CAAA,GAO0B,MAP1B,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAQC,kBARD,CAQoB,CARpB,CAAA,CAAA,EAQmB,eAAA,CAAG,QARtB;AADE,KA4BE,wBAAA,GAA2B,cA5B7B,GA6BR,OA7BQ,CA6BA,IA7BA,CA6BK,mCA7BL,EAAA,OAAA,CAAA,CAAA,GA8BR,QA9BQ,CA8BC,IA9BD,CA8BM,mCA9BN,EAAA,MAAA,CAAA,CAAA,GAAA;EAAc,KAAA,CAAA,EAAA,MAAA;AAOxB,CAAA;;;;AAES,iBA4BO,mBAAA,CA5BP,KAAA,EA4BkC,wBA5BlC,CAAA,EA4B0D,eAAA,CAAA,QA5B1D;;;AAmBT;AAAuC,iBAsDvB,yBAAA,CAtDuB,KAAA,EAsDU,wBAtDV,CAAA,EAsDkC,eAAA,CAAA,QAtDlC;AACxB,qCAAA,GAAA,EAAA;AAAL,2CAAA,GAAA,EAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown-table.mjs","names":["code","computed","Prose","Show","splitProps","titleCase","isUndefined","MarkdownTableContext","useMarkdownTable","MarkdownTable","props","children","data","columns","Object","keys","map","name","index","align","width","_$createComponent","Provider","value","when","Boolean","MarkdownTableColumn","tableContext","columnRef","find","c","indexRef","alignRef","widthRef","textLength","content","toString","length","repeat","MarkdownTableColumnHeader","rest","_$mergeProps","fallback","useDescriptions"],"sources":["../../../src/markdown/components/markdown-table.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, computed, Prose, Show, splitProps } from \"@alloy-js/core\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { ComponentProps } from \"../../types/components\";\nimport {\n MarkdownTableColumnContextInterface,\n MarkdownTableContext,\n useMarkdownTable\n} from \"../contexts/markdown-table\";\n\nexport interface MarkdownTableProps<\n T extends Record<string, any> = Record<string, any>\n> extends ComponentProps {\n data: T[];\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTable<\n T extends Record<string, any> = Record<string, any>\n>(props: MarkdownTableProps<T>) {\n const [{ children, data }] = splitProps(props, [\"children\", \"data\"]);\n\n const columns = computed(() =>\n Object.keys(data).map((name: string, index: number) => ({\n index,\n name,\n align: \"left\" as const,\n width: 20\n }))\n );\n\n return (\n <MarkdownTableContext.Provider value={{ columns: columns.value, data }}>\n <Show when={Boolean(children)}>{children}</Show>\n </MarkdownTableContext.Provider>\n );\n}\n\nexport type MarkdownTableColumnProps = ComponentProps &\n Partial<Pick<MarkdownTableColumnContextInterface, \"align\">> &\n Required<Pick<MarkdownTableColumnContextInterface, \"name\">> & {\n width?: number;\n };\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumn(props: MarkdownTableColumnProps) {\n const [{ children, width, align, name }] = splitProps(props, [\n \"children\",\n \"width\",\n \"align\",\n \"name\"\n ]);\n\n const tableContext = useMarkdownTable();\n const columnRef = computed(() =>\n tableContext?.columns.find(c => c.name === name)\n );\n\n const indexRef = computed(() => columnRef.value?.index ?? 0);\n const alignRef = computed(() => columnRef.value?.align ?? align ?? \"left\");\n const widthRef = computed(() => columnRef.value?.width ?? width ?? 20);\n\n const textLength = computed(() => {\n const content = children ? children.toString() : \"\";\n\n return content.length;\n });\n\n return (\n <Prose>\n <Show when={indexRef.value === 0}>{\"|\"}</Show>\n <Show when={Boolean(children)}>\n <Prose>{code`${\n alignRef.value === \"left\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }${children}${\n alignRef.value === \"right\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }`}</Prose>\n </Show>\n {\"|\"}\n </Prose>\n );\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumnHeader(props: MarkdownTableColumnProps) {\n const [{ children, name }, rest] = splitProps(props, [\"children\", \"name\"]);\n\n return (\n <>\n <MarkdownTableColumn {...rest} name={name}>\n <Show\n fallback={titleCase(name, {\n useDescriptions: false\n })}\n when={!isUndefined(children)}>\n {children}\n </Show>\n </MarkdownTableColumn>\n </>\n );\n}\n"],"mappings":""}
@@ -1,2 +0,0 @@
1
- import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./markdown-table.cjs";
2
- export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
@@ -1,2 +0,0 @@
1
- import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./markdown-table.mjs";
2
- export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
@@ -1,38 +0,0 @@
1
- import { ComponentContext } from "@alloy-js/core";
2
-
3
- //#region src/markdown/contexts/markdown-table.d.ts
4
- interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
5
- index: number;
6
- name: keyof T;
7
- align: "left" | "right" | "center";
8
- width: number;
9
- }
10
- /**
11
- * The Powerlines context used in template rendering.
12
- */
13
- declare const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface>;
14
- /**
15
- * Hook to access the Powerlines Context.
16
- *
17
- * @returns The Context.
18
- */
19
- declare function useMarkdownTableColumn(): MarkdownTableColumnContextInterface<Record<string, any>> | undefined;
20
- interface MarkdownTableContextInterface<T extends Record<string, any> = Record<string, any>> {
21
- columns: MarkdownTableColumnContextInterface<T>[];
22
- data: T[];
23
- }
24
- /**
25
- * The Powerlines context used in template rendering.
26
- */
27
- declare const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface>;
28
- /**
29
- * Hook to access the Powerlines Context.
30
- *
31
- * @returns The Context.
32
- */
33
- declare function useMarkdownTable(): MarkdownTableContextInterface<Record<string, any>> | undefined;
34
- declare type __ΩMarkdownTableColumnContextInterface = any[];
35
- declare type __ΩMarkdownTableContextInterface = any[];
36
- //#endregion
37
- export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
38
- //# sourceMappingURL=markdown-table.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown-table.d.cts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"sourcesContent":[],"mappings":";;;UAqBiB,8CACL,sBAAsB;;EADjB,IAAA,EAAA,MAIH,CAJG;EACL,KAAA,EAAA,MAAA,GAAA,OAAA,GAAA,QAAA;EAAsB,KAAA,EAAA,MAAA;;;AAWlC;AAWA;AAMiB,cAjBJ,0BAiBiC,EAjBL,gBAiBK,CAjBY,mCAiBZ,CAAA;;;;;;AAIrC,iBAVO,sBAAA,CAAA,CAUP,EAV6B,mCAU7B,CAV6B,MAU7B,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,GAAA,SAAA;AAMI,UAVI,6BAUmC,CAAA,UATxC,MASwC,CAAA,MAAA,EAAjB,GAAA,CAAA,GATD,MASC,CAAA,MAAgB,EAAA,GAAA,CAAA,CAAA,CAAA;EAWnC,OAAA,EAlBL,mCAkBqB,CAlBe,CAkBf,CAAA,EAAA;QAjBxB;;;;;cAMK,sBAAsB,iBAAiB;;;;;;iBAWpC,gBAAA,CAAA,GAAgB,8BAAA"}
@@ -1,38 +0,0 @@
1
- import { ComponentContext } from "@alloy-js/core";
2
-
3
- //#region src/markdown/contexts/markdown-table.d.ts
4
- interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
5
- index: number;
6
- name: keyof T;
7
- align: "left" | "right" | "center";
8
- width: number;
9
- }
10
- /**
11
- * The Powerlines context used in template rendering.
12
- */
13
- declare const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface>;
14
- /**
15
- * Hook to access the Powerlines Context.
16
- *
17
- * @returns The Context.
18
- */
19
- declare function useMarkdownTableColumn(): MarkdownTableColumnContextInterface<Record<string, any>> | undefined;
20
- interface MarkdownTableContextInterface<T extends Record<string, any> = Record<string, any>> {
21
- columns: MarkdownTableColumnContextInterface<T>[];
22
- data: T[];
23
- }
24
- /**
25
- * The Powerlines context used in template rendering.
26
- */
27
- declare const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface>;
28
- /**
29
- * Hook to access the Powerlines Context.
30
- *
31
- * @returns The Context.
32
- */
33
- declare function useMarkdownTable(): MarkdownTableContextInterface<Record<string, any>> | undefined;
34
- declare type __ΩMarkdownTableColumnContextInterface = any[];
35
- declare type __ΩMarkdownTableContextInterface = any[];
36
- //#endregion
37
- export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
38
- //# sourceMappingURL=markdown-table.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"sourcesContent":[],"mappings":";;;UAqBiB,8CACL,sBAAsB;;EADjB,IAAA,EAAA,MAIH,CAJG;EACL,KAAA,EAAA,MAAA,GAAA,OAAA,GAAA,QAAA;EAAsB,KAAA,EAAA,MAAA;;;AAWlC;AAWA;AAMiB,cAjBJ,0BAiBiC,EAjBL,gBAiBK,CAjBY,mCAiBZ,CAAA;;;;;;AAIrC,iBAVO,sBAAA,CAAA,CAUP,EAV6B,mCAU7B,CAV6B,MAU7B,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,GAAA,SAAA;AAMI,UAVI,6BAUmC,CAAA,UATxC,MASwC,CAAA,MAAjB,EAAA,GAAA,CAAA,GATD,MASC,CAAA,MAAgB,EAAA,GAAA,CAAA,CAAA,CAAA;EAWnC,OAAA,EAlBL,mCAkBqB,CAlBe,CAkBf,CAAA,EAAA;QAjBxB;;;;;cAMK,sBAAsB,iBAAiB;;;;;;iBAWpC,gBAAA,CAAA,GAAgB,8BAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown-table.mjs","names":["createContext","createNamedContext","useContext","MarkdownTableColumnContext","useMarkdownTableColumn","MarkdownTableContext","columns","data","useMarkdownTable"],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\n\nexport interface MarkdownTableColumnContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n index: number;\n name: keyof T;\n align: \"left\" | \"right\" | \"center\";\n width: number;\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface> =\n createNamedContext<MarkdownTableColumnContextInterface>(\n \"MarkdownTableColumn\",\n {} as MarkdownTableColumnContextInterface\n );\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTableColumn() {\n return useContext<MarkdownTableColumnContextInterface>(\n MarkdownTableColumnContext\n );\n}\n\nexport interface MarkdownTableContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n columns: MarkdownTableColumnContextInterface<T>[];\n data: T[];\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface> =\n createContext<MarkdownTableContextInterface>({\n columns: [],\n data: []\n } as MarkdownTableContextInterface);\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTable() {\n return useContext<MarkdownTableContextInterface>(MarkdownTableContext);\n}\n"],"mappings":""}
@@ -1,7 +0,0 @@
1
- import { FrontMatter, FrontMatterProps, __ΩFrontMatterProps } from "./components/front-matter.cjs";
2
- import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps } from "./components/markdown-file.cjs";
3
- import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.cjs";
4
- import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps } from "./components/markdown-table.cjs";
5
- import "./components/index.cjs";
6
- import "./contexts/index.cjs";
7
- export { FrontMatter, FrontMatterProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, __ΩFrontMatterProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableColumnProps, __ΩMarkdownTableContextInterface, __ΩMarkdownTableProps, useMarkdownTable, useMarkdownTableColumn };
@@ -1,7 +0,0 @@
1
- import { FrontMatter, FrontMatterProps, __ΩFrontMatterProps } from "./components/front-matter.mjs";
2
- import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps } from "./components/markdown-file.mjs";
3
- import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.mjs";
4
- import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps } from "./components/markdown-table.mjs";
5
- import "./components/index.mjs";
6
- import "./contexts/index.mjs";
7
- export { FrontMatter, FrontMatterProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, __ΩFrontMatterProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableColumnProps, __ΩMarkdownTableContextInterface, __ΩMarkdownTableProps, useMarkdownTable, useMarkdownTableColumn };
package/dist/render.d.cts DELETED
@@ -1,39 +0,0 @@
1
- import { Children, PrintTreeOptions } from "@alloy-js/core";
2
- import { PluginContext } from "powerlines";
3
-
4
- //#region src/render.d.ts
5
-
6
- /**
7
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.
8
- *
9
- * @example
10
- * ```tsx
11
- * import { render } from "@powerlines/plugin-alloy/render";
12
- *
13
- * await render(context, <> ... </>);
14
- * ```
15
- *
16
- * @param context - The Powerlines plugin context.
17
- * @param children - The children components to render.
18
- * @returns A promise that resolves when rendering is complete.
19
- */
20
- declare function render<TContext extends PluginContext>(context: TContext, children: Children): Promise<void>;
21
- /**
22
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.
23
- *
24
- * @example
25
- * ```tsx
26
- * import { renderString } from "@powerlines/plugin-alloy/render";
27
- *
28
- * const output = await renderString(context, <> ... </>);
29
- * ```
30
- *
31
- * @param context - The Powerlines plugin context.
32
- * @param children - The children components to render.
33
- * @param options - Optional print tree options.
34
- * @returns The rendered output as a string.
35
- */
36
- declare function renderString<TContext extends PluginContext>(context: TContext, children: Children, options?: PrintTreeOptions): string;
37
- //#endregion
38
- export { render, renderString };
39
- //# sourceMappingURL=render.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.d.cts","names":[],"sources":["../src/render.tsx"],"sourcesContent":[],"mappings":";;;;;;;AA4CA;;;;;;AA6FA;;;;;;iBA7FsB,wBAAwB,wBACnC,oBACC,WAAQ;;;;;;;;;;;;;;;;iBA2FJ,8BAA8B,wBACnC,oBACC,oBACA"}
package/dist/render.d.mts DELETED
@@ -1,39 +0,0 @@
1
- import { Children, PrintTreeOptions } from "@alloy-js/core";
2
- import { PluginContext } from "powerlines";
3
-
4
- //#region src/render.d.ts
5
-
6
- /**
7
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.
8
- *
9
- * @example
10
- * ```tsx
11
- * import { render } from "@powerlines/plugin-alloy/render";
12
- *
13
- * await render(context, <> ... </>);
14
- * ```
15
- *
16
- * @param context - The Powerlines plugin context.
17
- * @param children - The children components to render.
18
- * @returns A promise that resolves when rendering is complete.
19
- */
20
- declare function render<TContext extends PluginContext>(context: TContext, children: Children): Promise<void>;
21
- /**
22
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.
23
- *
24
- * @example
25
- * ```tsx
26
- * import { renderString } from "@powerlines/plugin-alloy/render";
27
- *
28
- * const output = await renderString(context, <> ... </>);
29
- * ```
30
- *
31
- * @param context - The Powerlines plugin context.
32
- * @param children - The children components to render.
33
- * @param options - Optional print tree options.
34
- * @returns The rendered output as a string.
35
- */
36
- declare function renderString<TContext extends PluginContext>(context: TContext, children: Children, options?: PrintTreeOptions): string;
37
- //#endregion
38
- export { render, renderString };
39
- //# sourceMappingURL=render.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.d.mts","names":[],"sources":["../src/render.tsx"],"sourcesContent":[],"mappings":";;;;;;;AA4CA;;;;;;AA6FA;;;;;;iBA7FsB,wBAAwB,wBACnC,oBACC,WAAQ;;;;;;;;;;;;;;;;iBA2FJ,8BAA8B,wBACnC,oBACC,oBACA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.mjs","names":["printTree","renderAsync","renderTree","traverseOutput","findFileExtension","Output","render","context","children","meta","output","_$createComponent","Object","keys","length","debug","visitDirectory","directory","fs","existsSync","path","mkdirSync","visitFile","file","metadata","kind","id","Error","emitBuiltinSync","contents","skipFormat","storage","extension","emitEntrySync","typeDefinition","emitInfrastructureSync","emitSync","copySync","sourcePath","renderString","options","tree"],"sources":["../src/render.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n printTree,\n PrintTreeOptions,\n renderAsync,\n renderTree,\n traverseOutput\n} from \"@alloy-js/core\";\nimport { findFileExtension } from \"@stryke/path/file-path-fns\";\nimport { PluginContext } from \"powerlines\";\nimport { MetaItem, Output } from \"./core\";\n\n/**\n * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.\n *\n * @example\n * ```tsx\n * import { render } from \"@powerlines/plugin-alloy/render\";\n *\n * await render(context, <> ... </>);\n * ```\n *\n * @param context - The Powerlines plugin context.\n * @param children - The children components to render.\n * @returns A promise that resolves when rendering is complete.\n */\nexport async function render<TContext extends PluginContext>(\n context: TContext,\n children: Children\n) {\n const meta = {} as Record<string, MetaItem>;\n const output = await renderAsync(\n <Output<TContext> context={context} meta={meta}>\n {children}\n </Output>\n );\n\n if (!Object.keys(output).length) {\n context.debug(\n \"No output files were rendered by Alloy-js component templates.\"\n );\n } else {\n context.debug(\n `Processing ${\n Object.keys(output).length\n } rendered output files from Alloy-js component templates.`\n );\n\n await traverseOutput(output, {\n visitDirectory: directory => {\n if (context.fs.existsSync(directory.path)) {\n return;\n }\n\n context.fs.mkdirSync(directory.path);\n },\n visitFile: file => {\n if (\"contents\" in file) {\n const metadata = meta[file.path] ?? {};\n if (metadata.kind === \"builtin\") {\n if (!metadata.id) {\n throw new Error(\n `Built-in file \"${\n file.path\n }\" is missing its ID in the render metadata.`\n );\n }\n\n context.emitBuiltinSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else if (metadata.kind === \"entry\") {\n context.emitEntrySync(file.contents, file.path, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n ...(metadata.typeDefinition ?? {})\n });\n } else if (metadata.kind === \"infrastructure\") {\n if (!metadata.id) {\n throw new Error(\n `Infrastructure file \"${\n file.path\n }\" is missing its ID in the render metadata.`\n );\n }\n\n context.emitInfrastructureSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else {\n context.emitSync(file.contents, file.path, metadata);\n }\n } else {\n context.fs.copySync(file.sourcePath, file.path);\n }\n }\n });\n }\n}\n\n/**\n * A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.\n *\n * @example\n * ```tsx\n * import { renderString } from \"@powerlines/plugin-alloy/render\";\n *\n * const output = await renderString(context, <> ... </>);\n * ```\n *\n * @param context - The Powerlines plugin context.\n * @param children - The children components to render.\n * @param options - Optional print tree options.\n * @returns The rendered output as a string.\n */\nexport function renderString<TContext extends PluginContext>(\n context: TContext,\n children: Children,\n options?: PrintTreeOptions\n) {\n const tree = renderTree(\n <Output<TContext> context={context}>{children}</Output>\n );\n\n return printTree(tree, options);\n}\n"],"mappings":""}
@@ -1,142 +0,0 @@
1
- import { Children, Context } from "@alloy-js/core";
2
- import { ResolvedEntryTypeDefinition, StoragePreset } from "powerlines";
3
- import { SourceFileContext } from "@alloy-js/typescript";
4
-
5
- //#region src/types/components.d.ts
6
- interface CopyOutputFile {
7
- kind: "file";
8
- path: string;
9
- sourcePath: string;
10
- /**
11
- * The format of the output files
12
- *
13
- * @remarks
14
- * If not specified, the output mode will be determined by the provided \`output.mode\` value.
15
- */
16
- preset?: StoragePreset;
17
- }
18
- interface WriteOutputFile {
19
- kind: "file" | "entry" | "builtin";
20
- path: string;
21
- contents: string;
22
- filetype: string;
23
- /**
24
- * The format of the output files
25
- *
26
- * @remarks
27
- * If not specified, the output mode will be determined by the provided \`output.mode\` value.
28
- */
29
- preset?: StoragePreset;
30
- }
31
- type OutputFile = (WriteOutputFile & {
32
- kind: "file";
33
- }) | (WriteOutputFile & {
34
- kind: "entry";
35
- typeDefinition?: ResolvedEntryTypeDefinition;
36
- }) | (WriteOutputFile & {
37
- kind: "builtin";
38
- id: string;
39
- }) | CopyOutputFile;
40
- interface OutputDirectory {
41
- kind: "directory";
42
- path: string;
43
- contents: (OutputDirectory | OutputFile)[];
44
- }
45
- interface RenderEntryContext {
46
- typeDefinition: ResolvedEntryTypeDefinition;
47
- }
48
- interface RenderBuiltinContext {
49
- id: string;
50
- }
51
- interface RenderOutputContext {
52
- mode?: StoragePreset;
53
- }
54
- interface CopyFileOutputContext {
55
- path?: string;
56
- sourcePath?: string;
57
- }
58
- interface RenderContext extends Context {
59
- meta?: {
60
- copyFile?: CopyFileOutputContext;
61
- /**
62
- * The current context for the built-in module.
63
- */
64
- builtin?: RenderBuiltinContext;
65
- /**
66
- * The current context for the application entrypoint file being rendered.
67
- */
68
- entry?: RenderEntryContext;
69
- /**
70
- * The current context for output rendering.
71
- */
72
- output?: RenderOutputContext;
73
- } & Record<string, any>;
74
- }
75
- /**
76
- * A type that represents the props of a component that can have children.
77
- */
78
- interface ComponentProps {
79
- children?: Children;
80
- }
81
- /**
82
- * A type that requires the `children` prop in a component.
83
- */
84
- type ComponentPropsWithChildren = Omit<ComponentProps, "children"> & Required<Pick<ComponentProps, "children">>;
85
- interface BuiltinSourceFileContext extends SourceFileContext {
86
- /**
87
- * The runtime module identifier.
88
- */
89
- id: string;
90
- }
91
- interface ReflectionOverrideInterface<T> {
92
- name?: string | Children;
93
- type?: string | Children;
94
- extends?: string | false;
95
- defaultValue?: Partial<T>;
96
- }
97
- interface TypescriptFileImportItem {
98
- name: string;
99
- default?: boolean;
100
- alias?: string;
101
- type?: boolean;
102
- }
103
- type TypescriptFileImports = Record<string, null | string | Array<TypescriptFileImportItem | string>>;
104
- interface SourceFileHeaderProps extends ComponentProps {
105
- /**
106
- * If true, disables the ESLint directive at the top of the file.
107
- *
108
- * @defaultValue true
109
- */
110
- disableEslint?: boolean;
111
- /**
112
- * If true, disables the Biome directive at the top of the file.
113
- *
114
- * @defaultValue true
115
- */
116
- disableBiome?: boolean;
117
- /**
118
- * If true, disables the Prettier directive at the top of the file.
119
- *
120
- * @defaultValue false
121
- */
122
- disablePrettier?: boolean;
123
- }
124
- declare type __ΩCopyOutputFile = any[];
125
- declare type __ΩWriteOutputFile = any[];
126
- declare type __ΩOutputFile = any[];
127
- declare type __ΩOutputDirectory = any[];
128
- declare type __ΩRenderEntryContext = any[];
129
- declare type __ΩRenderBuiltinContext = any[];
130
- declare type __ΩRenderOutputContext = any[];
131
- declare type __ΩCopyFileOutputContext = any[];
132
- declare type __ΩRenderContext = any[];
133
- declare type __ΩComponentProps = any[];
134
- declare type __ΩComponentPropsWithChildren = any[];
135
- declare type __ΩBuiltinSourceFileContext = any[];
136
- declare type __ΩReflectionOverrideInterface = any[];
137
- declare type __ΩTypescriptFileImportItem = any[];
138
- declare type __ΩTypescriptFileImports = any[];
139
- declare type __ΩSourceFileHeaderProps = any[];
140
- //#endregion
141
- export { BuiltinSourceFileContext, ComponentProps, ComponentPropsWithChildren, CopyFileOutputContext, CopyOutputFile, OutputDirectory, OutputFile, ReflectionOverrideInterface, RenderBuiltinContext, RenderContext, RenderEntryContext, RenderOutputContext, SourceFileHeaderProps, TypescriptFileImportItem, TypescriptFileImports, WriteOutputFile, __ΩBuiltinSourceFileContext, __ΩComponentProps, __ΩComponentPropsWithChildren, __ΩCopyFileOutputContext, __ΩCopyOutputFile, __ΩOutputDirectory, __ΩOutputFile, __ΩReflectionOverrideInterface, __ΩRenderBuiltinContext, __ΩRenderContext, __ΩRenderEntryContext, __ΩRenderOutputContext, __ΩSourceFileHeaderProps, __ΩTypescriptFileImportItem, __ΩTypescriptFileImports, __ΩWriteOutputFile };
142
- //# sourceMappingURL=components.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"components.d.cts","names":[],"sources":["../../src/types/components.ts"],"sourcesContent":[],"mappings":";;;;;UAsBiB,cAAA;;EAAA,IAAA,EAAA,MAAA;EAcA,UAAA,EAAA,MAAe;EAepB;;;;;;EAOM,MAAA,CAAA,EAzBP,aAyBO;AAElB;AAMiB,UA9BA,eAAA,CA8BkB;EAIlB,IAAA,EAAA,MAAA,GAAA,OAAA,GAAoB,SAAA;EAIpB,IAAA,EAAA,MAAA;EAIA,QAAA,EAAA,MAAA;EAKA,QAAA,EAAA,MAAc;EAEhB;;;;;;EAF+B,MAAA,CAAA,EAnCnC,aAmCmC;AAwB9C;AAOY,KA/DA,UAAA,GA+DA,CA9DP,eA8DiC,GAAA;EAAQ,IAAA,EAAA,MAAA;CAAL,CAAA,GAAA,CA7DpC,eA6DoC,GAAA;EACzB,IAAA,EAAA,OAAA;EAAL,cAAA,CAAA,EA5DY,2BA4DZ;CAAT,CAAA,GAAA,CA1DG,eA0DH,GAAA;EAAQ,IAAA,EAAA,SAAA;EAEO,EAAA,EAAA,MAAA;AAOjB,CAAA,CAAA,GAlEI,cAkEa;AACC,UAjED,eAAA,CAiEC;EACA,IAAA,EAAA,WAAA;EAEO,IAAA,EAAA,MAAA;EAAR,QAAA,EAAA,CAjEJ,eAiEI,GAjEc,UAiEd,CAAA,EAAA;;AAGA,UAjEA,kBAAA,CAiEwB;EAO7B,cAAA,EAvEM,2BAuEe;;AAEf,UAtED,oBAAA,CAsEC;EAFkB,EAAA,EAAA,MAAA;;AAKnB,UArEA,mBAAA,CAqEsB;SApE9B;;UAGQ,qBAAA;;;;UAKA,aAAA,SAAsB;;eAExB;;;;cAKD;;;;YAKF;;;;aAKC;MACP;;;;;UAMW,cAAA;aACJ;;;;;KAMD,0BAAA,GAA6B,KAAK,8BAC5C,SAAS,KAAK;UAEC,wBAAA,SAAiC;;;;;;UAOjC;kBACC;kBACA;;iBAED,QAAQ;;UAGR,wBAAA;;;;;;KAOL,qBAAA,GAAwB,+BAElB,MAAM;UAGP,qBAAA,SAA8B"}
@@ -1,142 +0,0 @@
1
- import { Children, Context } from "@alloy-js/core";
2
- import { SourceFileContext as SourceFileContext$1 } from "@alloy-js/typescript";
3
- import { ResolvedEntryTypeDefinition, StoragePreset } from "powerlines";
4
-
5
- //#region src/types/components.d.ts
6
- interface CopyOutputFile {
7
- kind: "file";
8
- path: string;
9
- sourcePath: string;
10
- /**
11
- * The format of the output files
12
- *
13
- * @remarks
14
- * If not specified, the output mode will be determined by the provided \`output.mode\` value.
15
- */
16
- preset?: StoragePreset;
17
- }
18
- interface WriteOutputFile {
19
- kind: "file" | "entry" | "builtin";
20
- path: string;
21
- contents: string;
22
- filetype: string;
23
- /**
24
- * The format of the output files
25
- *
26
- * @remarks
27
- * If not specified, the output mode will be determined by the provided \`output.mode\` value.
28
- */
29
- preset?: StoragePreset;
30
- }
31
- type OutputFile = (WriteOutputFile & {
32
- kind: "file";
33
- }) | (WriteOutputFile & {
34
- kind: "entry";
35
- typeDefinition?: ResolvedEntryTypeDefinition;
36
- }) | (WriteOutputFile & {
37
- kind: "builtin";
38
- id: string;
39
- }) | CopyOutputFile;
40
- interface OutputDirectory {
41
- kind: "directory";
42
- path: string;
43
- contents: (OutputDirectory | OutputFile)[];
44
- }
45
- interface RenderEntryContext {
46
- typeDefinition: ResolvedEntryTypeDefinition;
47
- }
48
- interface RenderBuiltinContext {
49
- id: string;
50
- }
51
- interface RenderOutputContext {
52
- mode?: StoragePreset;
53
- }
54
- interface CopyFileOutputContext {
55
- path?: string;
56
- sourcePath?: string;
57
- }
58
- interface RenderContext extends Context {
59
- meta?: {
60
- copyFile?: CopyFileOutputContext;
61
- /**
62
- * The current context for the built-in module.
63
- */
64
- builtin?: RenderBuiltinContext;
65
- /**
66
- * The current context for the application entrypoint file being rendered.
67
- */
68
- entry?: RenderEntryContext;
69
- /**
70
- * The current context for output rendering.
71
- */
72
- output?: RenderOutputContext;
73
- } & Record<string, any>;
74
- }
75
- /**
76
- * A type that represents the props of a component that can have children.
77
- */
78
- interface ComponentProps {
79
- children?: Children;
80
- }
81
- /**
82
- * A type that requires the `children` prop in a component.
83
- */
84
- type ComponentPropsWithChildren = Omit<ComponentProps, "children"> & Required<Pick<ComponentProps, "children">>;
85
- interface BuiltinSourceFileContext extends SourceFileContext$1 {
86
- /**
87
- * The runtime module identifier.
88
- */
89
- id: string;
90
- }
91
- interface ReflectionOverrideInterface<T> {
92
- name?: string | Children;
93
- type?: string | Children;
94
- extends?: string | false;
95
- defaultValue?: Partial<T>;
96
- }
97
- interface TypescriptFileImportItem {
98
- name: string;
99
- default?: boolean;
100
- alias?: string;
101
- type?: boolean;
102
- }
103
- type TypescriptFileImports = Record<string, null | string | Array<TypescriptFileImportItem | string>>;
104
- interface SourceFileHeaderProps extends ComponentProps {
105
- /**
106
- * If true, disables the ESLint directive at the top of the file.
107
- *
108
- * @defaultValue true
109
- */
110
- disableEslint?: boolean;
111
- /**
112
- * If true, disables the Biome directive at the top of the file.
113
- *
114
- * @defaultValue true
115
- */
116
- disableBiome?: boolean;
117
- /**
118
- * If true, disables the Prettier directive at the top of the file.
119
- *
120
- * @defaultValue false
121
- */
122
- disablePrettier?: boolean;
123
- }
124
- declare type __ΩCopyOutputFile = any[];
125
- declare type __ΩWriteOutputFile = any[];
126
- declare type __ΩOutputFile = any[];
127
- declare type __ΩOutputDirectory = any[];
128
- declare type __ΩRenderEntryContext = any[];
129
- declare type __ΩRenderBuiltinContext = any[];
130
- declare type __ΩRenderOutputContext = any[];
131
- declare type __ΩCopyFileOutputContext = any[];
132
- declare type __ΩRenderContext = any[];
133
- declare type __ΩComponentProps = any[];
134
- declare type __ΩComponentPropsWithChildren = any[];
135
- declare type __ΩBuiltinSourceFileContext = any[];
136
- declare type __ΩReflectionOverrideInterface = any[];
137
- declare type __ΩTypescriptFileImportItem = any[];
138
- declare type __ΩTypescriptFileImports = any[];
139
- declare type __ΩSourceFileHeaderProps = any[];
140
- //#endregion
141
- export { BuiltinSourceFileContext, ComponentProps, ComponentPropsWithChildren, CopyFileOutputContext, CopyOutputFile, OutputDirectory, OutputFile, ReflectionOverrideInterface, RenderBuiltinContext, RenderContext, RenderEntryContext, RenderOutputContext, SourceFileHeaderProps, TypescriptFileImportItem, TypescriptFileImports, WriteOutputFile, __ΩBuiltinSourceFileContext, __ΩComponentProps, __ΩComponentPropsWithChildren, __ΩCopyFileOutputContext, __ΩCopyOutputFile, __ΩOutputDirectory, __ΩOutputFile, __ΩReflectionOverrideInterface, __ΩRenderBuiltinContext, __ΩRenderContext, __ΩRenderEntryContext, __ΩRenderOutputContext, __ΩSourceFileHeaderProps, __ΩTypescriptFileImportItem, __ΩTypescriptFileImports, __ΩWriteOutputFile };
142
- //# sourceMappingURL=components.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"components.d.mts","names":[],"sources":["../../src/types/components.ts"],"sourcesContent":[],"mappings":";;;;;UAsBiB,cAAA;;EAAA,IAAA,EAAA,MAAA;EAcA,UAAA,EAAA,MAAe;EAepB;;;;;;EAOM,MAAA,CAAA,EAzBP,aAyBO;AAElB;AAMiB,UA9BA,eAAA,CA8BkB;EAIlB,IAAA,EAAA,MAAA,GAAA,OAAA,GAAoB,SAAA;EAIpB,IAAA,EAAA,MAAA;EAIA,QAAA,EAAA,MAAA;EAKA,QAAA,EAAA,MAAc;EAEhB;;;;;;EAF+B,MAAA,CAAA,EAnCnC,aAmCmC;AAwB9C;AAOY,KA/DA,UAAA,GA+DA,CA9DP,eA8DiC,GAAA;EAAQ,IAAA,EAAA,MAAA;CAAL,CAAA,GAAA,CA7DpC,eA6DoC,GAAA;EACzB,IAAA,EAAA,OAAA;EAAL,cAAA,CAAA,EA5DY,2BA4DZ;CAAT,CAAA,GAAA,CA1DG,eA0DH,GAAA;EAAQ,IAAA,EAAA,SAAA;EAEO,EAAA,EAAA,MAAA;AAOjB,CAAA,CAAA,GAlEI,cAkEa;AACC,UAjED,eAAA,CAiEC;EACA,IAAA,EAAA,WAAA;EAEO,IAAA,EAAA,MAAA;EAAR,QAAA,EAAA,CAjEJ,eAiEI,GAjEc,UAiEd,CAAA,EAAA;;AAGA,UAjEA,kBAAA,CAiEwB;EAO7B,cAAA,EAvEM,2BAuEe;;AAEf,UAtED,oBAAA,CAsEC;EAFkB,EAAA,EAAA,MAAA;;AAKnB,UArEA,mBAAA,CAqEsB;SApE9B;;UAGQ,qBAAA;;;;UAKA,aAAA,SAAsB;;eAExB;;;;cAKD;;;;YAKF;;;;aAKC;MACP;;;;;UAMW,cAAA;aACJ;;;;;KAMD,0BAAA,GAA6B,KAAK,8BAC5C,SAAS,KAAK;UAEC,wBAAA,SAAiC;;;;;;UAOjC;kBACC;kBACA;;iBAED,QAAQ;;UAGR,wBAAA;;;;;;KAOL,qBAAA,GAAwB,+BAElB,MAAM;UAGP,qBAAA,SAA8B"}
@@ -1,3 +0,0 @@
1
- import { BuiltinSourceFileContext, ComponentProps, ComponentPropsWithChildren, CopyFileOutputContext, CopyOutputFile, OutputDirectory, OutputFile, ReflectionOverrideInterface, RenderBuiltinContext, RenderContext, RenderEntryContext, RenderOutputContext, SourceFileHeaderProps, TypescriptFileImportItem, TypescriptFileImports, WriteOutputFile, __ΩBuiltinSourceFileContext, __ΩComponentProps, __ΩComponentPropsWithChildren, __ΩCopyFileOutputContext, __ΩCopyOutputFile, __ΩOutputDirectory, __ΩOutputFile, __ΩReflectionOverrideInterface, __ΩRenderBuiltinContext, __ΩRenderContext, __ΩRenderEntryContext, __ΩRenderOutputContext, __ΩSourceFileHeaderProps, __ΩTypescriptFileImportItem, __ΩTypescriptFileImports, __ΩWriteOutputFile } from "./components.cjs";
2
- import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig, __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig } from "./plugin.cjs";
3
- export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig, BuiltinSourceFileContext, ComponentProps, ComponentPropsWithChildren, CopyFileOutputContext, CopyOutputFile, OutputDirectory, OutputFile, ReflectionOverrideInterface, RenderBuiltinContext, RenderContext, RenderEntryContext, RenderOutputContext, SourceFileHeaderProps, TypescriptFileImportItem, TypescriptFileImports, WriteOutputFile, __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig, __ΩBuiltinSourceFileContext, __ΩComponentProps, __ΩComponentPropsWithChildren, __ΩCopyFileOutputContext, __ΩCopyOutputFile, __ΩOutputDirectory, __ΩOutputFile, __ΩReflectionOverrideInterface, __ΩRenderBuiltinContext, __ΩRenderContext, __ΩRenderEntryContext, __ΩRenderOutputContext, __ΩSourceFileHeaderProps, __ΩTypescriptFileImportItem, __ΩTypescriptFileImports, __ΩWriteOutputFile };
@@ -1,3 +0,0 @@
1
- import { BuiltinSourceFileContext, ComponentProps, ComponentPropsWithChildren, CopyFileOutputContext, CopyOutputFile, OutputDirectory, OutputFile, ReflectionOverrideInterface, RenderBuiltinContext, RenderContext, RenderEntryContext, RenderOutputContext, SourceFileHeaderProps, TypescriptFileImportItem, TypescriptFileImports, WriteOutputFile, __ΩBuiltinSourceFileContext, __ΩComponentProps, __ΩComponentPropsWithChildren, __ΩCopyFileOutputContext, __ΩCopyOutputFile, __ΩOutputDirectory, __ΩOutputFile, __ΩReflectionOverrideInterface, __ΩRenderBuiltinContext, __ΩRenderContext, __ΩRenderEntryContext, __ΩRenderOutputContext, __ΩSourceFileHeaderProps, __ΩTypescriptFileImportItem, __ΩTypescriptFileImports, __ΩWriteOutputFile } from "./components.mjs";
2
- import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig, __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig } from "./plugin.mjs";
3
- export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig, BuiltinSourceFileContext, ComponentProps, ComponentPropsWithChildren, CopyFileOutputContext, CopyOutputFile, OutputDirectory, OutputFile, ReflectionOverrideInterface, RenderBuiltinContext, RenderContext, RenderEntryContext, RenderOutputContext, SourceFileHeaderProps, TypescriptFileImportItem, TypescriptFileImports, WriteOutputFile, __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig, __ΩBuiltinSourceFileContext, __ΩComponentProps, __ΩComponentPropsWithChildren, __ΩCopyFileOutputContext, __ΩCopyOutputFile, __ΩOutputDirectory, __ΩOutputFile, __ΩReflectionOverrideInterface, __ΩRenderBuiltinContext, __ΩRenderContext, __ΩRenderEntryContext, __ΩRenderOutputContext, __ΩSourceFileHeaderProps, __ΩTypescriptFileImportItem, __ΩTypescriptFileImports, __ΩWriteOutputFile };