@powerlines/plugin-alloy 0.25.14 → 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 +17 -17
  39. package/dist/core/components/index.d.cts +0 -5
  40. package/dist/core/components/index.d.mts +0 -5
  41. package/dist/core/components/output.d.cts +0 -25
  42. package/dist/core/components/output.d.cts.map +0 -1
  43. package/dist/core/components/output.d.mts +0 -25
  44. package/dist/core/components/output.d.mts.map +0 -1
  45. package/dist/core/components/output.mjs.map +0 -1
  46. package/dist/core/components/single-line-comment.d.cts +0 -23
  47. package/dist/core/components/single-line-comment.d.cts.map +0 -1
  48. package/dist/core/components/single-line-comment.d.mts +0 -23
  49. package/dist/core/components/single-line-comment.d.mts.map +0 -1
  50. package/dist/core/components/single-line-comment.mjs.map +0 -1
  51. package/dist/core/components/source-file.d.cts +0 -33
  52. package/dist/core/components/source-file.d.cts.map +0 -1
  53. package/dist/core/components/source-file.d.mts +0 -33
  54. package/dist/core/components/source-file.d.mts.map +0 -1
  55. package/dist/core/components/source-file.mjs.map +0 -1
  56. package/dist/core/components/spacing.d.cts +0 -24
  57. package/dist/core/components/spacing.d.cts.map +0 -1
  58. package/dist/core/components/spacing.d.mts +0 -24
  59. package/dist/core/components/spacing.d.mts.map +0 -1
  60. package/dist/core/components/spacing.mjs.map +0 -1
  61. package/dist/core/contexts/context.d.cts +0 -30
  62. package/dist/core/contexts/context.d.cts.map +0 -1
  63. package/dist/core/contexts/context.d.mts +0 -30
  64. package/dist/core/contexts/context.d.mts.map +0 -1
  65. package/dist/core/contexts/context.mjs.map +0 -1
  66. package/dist/core/contexts/index.d.cts +0 -4
  67. package/dist/core/contexts/index.d.mts +0 -4
  68. package/dist/core/contexts/meta.d.cts +0 -48
  69. package/dist/core/contexts/meta.d.cts.map +0 -1
  70. package/dist/core/contexts/meta.d.mts +0 -48
  71. package/dist/core/contexts/meta.d.mts.map +0 -1
  72. package/dist/core/contexts/meta.mjs.map +0 -1
  73. package/dist/core/contexts/reflection.d.cts +0 -53
  74. package/dist/core/contexts/reflection.d.cts.map +0 -1
  75. package/dist/core/contexts/reflection.d.mts +0 -53
  76. package/dist/core/contexts/reflection.d.mts.map +0 -1
  77. package/dist/core/contexts/reflection.mjs.map +0 -1
  78. package/dist/core/helpers/code.d.cts +0 -30
  79. package/dist/core/helpers/code.d.cts.map +0 -1
  80. package/dist/core/helpers/code.d.mts +0 -30
  81. package/dist/core/helpers/code.d.mts.map +0 -1
  82. package/dist/core/helpers/code.mjs.map +0 -1
  83. package/dist/core/helpers/index.d.cts +0 -2
  84. package/dist/core/helpers/index.d.mts +0 -2
  85. package/dist/core/index.d.cts +0 -12
  86. package/dist/core/index.d.mts +0 -12
  87. package/dist/helpers/capnp.d.cts +0 -88
  88. package/dist/helpers/capnp.d.cts.map +0 -1
  89. package/dist/helpers/capnp.d.mts +0 -88
  90. package/dist/helpers/capnp.d.mts.map +0 -1
  91. package/dist/helpers/capnp.mjs.map +0 -1
  92. package/dist/helpers/create-builtin.d.cts +0 -16
  93. package/dist/helpers/create-builtin.d.cts.map +0 -1
  94. package/dist/helpers/create-builtin.d.mts +0 -16
  95. package/dist/helpers/create-builtin.d.mts.map +0 -1
  96. package/dist/helpers/create-builtin.mjs.map +0 -1
  97. package/dist/helpers/index.d.cts +0 -5
  98. package/dist/helpers/index.d.mts +0 -5
  99. package/dist/helpers/refkey.d.cts +0 -14
  100. package/dist/helpers/refkey.d.cts.map +0 -1
  101. package/dist/helpers/refkey.d.mts +0 -14
  102. package/dist/helpers/refkey.d.mts.map +0 -1
  103. package/dist/helpers/refkey.mjs.map +0 -1
  104. package/dist/helpers/typescript.d.cts +0 -26
  105. package/dist/helpers/typescript.d.cts.map +0 -1
  106. package/dist/helpers/typescript.d.mts +0 -26
  107. package/dist/helpers/typescript.d.mts.map +0 -1
  108. package/dist/helpers/typescript.mjs.map +0 -1
  109. package/dist/index.d.cts +0 -19
  110. package/dist/index.d.cts.map +0 -1
  111. package/dist/index.d.mts +0 -19
  112. package/dist/index.d.mts.map +0 -1
  113. package/dist/index.mjs.map +0 -1
  114. package/dist/markdown/components/front-matter.d.cts +0 -16
  115. package/dist/markdown/components/front-matter.d.cts.map +0 -1
  116. package/dist/markdown/components/front-matter.d.mts +0 -16
  117. package/dist/markdown/components/front-matter.d.mts.map +0 -1
  118. package/dist/markdown/components/front-matter.mjs.map +0 -1
  119. package/dist/markdown/components/index.d.cts +0 -4
  120. package/dist/markdown/components/index.d.mts +0 -4
  121. package/dist/markdown/components/markdown-file.d.cts +0 -29
  122. package/dist/markdown/components/markdown-file.d.cts.map +0 -1
  123. package/dist/markdown/components/markdown-file.d.mts +0 -29
  124. package/dist/markdown/components/markdown-file.d.mts.map +0 -1
  125. package/dist/markdown/components/markdown-file.mjs.map +0 -1
  126. package/dist/markdown/components/markdown-table.d.cts +0 -28
  127. package/dist/markdown/components/markdown-table.d.cts.map +0 -1
  128. package/dist/markdown/components/markdown-table.d.mts +0 -28
  129. package/dist/markdown/components/markdown-table.d.mts.map +0 -1
  130. package/dist/markdown/components/markdown-table.mjs.map +0 -1
  131. package/dist/markdown/contexts/index.d.cts +0 -2
  132. package/dist/markdown/contexts/index.d.mts +0 -2
  133. package/dist/markdown/contexts/markdown-table.d.cts +0 -38
  134. package/dist/markdown/contexts/markdown-table.d.cts.map +0 -1
  135. package/dist/markdown/contexts/markdown-table.d.mts +0 -38
  136. package/dist/markdown/contexts/markdown-table.d.mts.map +0 -1
  137. package/dist/markdown/contexts/markdown-table.mjs.map +0 -1
  138. package/dist/markdown/index.d.cts +0 -7
  139. package/dist/markdown/index.d.mts +0 -7
  140. package/dist/render.d.cts +0 -39
  141. package/dist/render.d.cts.map +0 -1
  142. package/dist/render.d.mts +0 -39
  143. package/dist/render.d.mts.map +0 -1
  144. package/dist/render.mjs.map +0 -1
  145. package/dist/types/components.d.cts +0 -142
  146. package/dist/types/components.d.cts.map +0 -1
  147. package/dist/types/components.d.mts +0 -142
  148. package/dist/types/components.d.mts.map +0 -1
  149. package/dist/types/index.d.cts +0 -3
  150. package/dist/types/index.d.mts +0 -3
  151. package/dist/types/plugin.d.cts +0 -39
  152. package/dist/types/plugin.d.cts.map +0 -1
  153. package/dist/types/plugin.d.mts +0 -39
  154. package/dist/types/plugin.d.mts.map +0 -1
  155. package/dist/typescript/components/builtin-file.d.cts +0 -35
  156. package/dist/typescript/components/builtin-file.d.cts.map +0 -1
  157. package/dist/typescript/components/builtin-file.d.mts +0 -35
  158. package/dist/typescript/components/builtin-file.d.mts.map +0 -1
  159. package/dist/typescript/components/builtin-file.mjs.map +0 -1
  160. package/dist/typescript/components/class-declaration.d.cts +0 -145
  161. package/dist/typescript/components/class-declaration.d.cts.map +0 -1
  162. package/dist/typescript/components/class-declaration.d.mts +0 -145
  163. package/dist/typescript/components/class-declaration.d.mts.map +0 -1
  164. package/dist/typescript/components/class-declaration.mjs.map +0 -1
  165. package/dist/typescript/components/dynamic-import-statement.d.cts +0 -33
  166. package/dist/typescript/components/dynamic-import-statement.d.cts.map +0 -1
  167. package/dist/typescript/components/dynamic-import-statement.d.mts +0 -33
  168. package/dist/typescript/components/dynamic-import-statement.d.mts.map +0 -1
  169. package/dist/typescript/components/dynamic-import-statement.mjs.map +0 -1
  170. package/dist/typescript/components/entry-file.d.cts +0 -28
  171. package/dist/typescript/components/entry-file.d.cts.map +0 -1
  172. package/dist/typescript/components/entry-file.d.mts +0 -28
  173. package/dist/typescript/components/entry-file.d.mts.map +0 -1
  174. package/dist/typescript/components/entry-file.mjs.map +0 -1
  175. package/dist/typescript/components/index.d.cts +0 -15
  176. package/dist/typescript/components/index.d.mts +0 -15
  177. package/dist/typescript/components/infrastructure-file.d.cts +0 -21
  178. package/dist/typescript/components/infrastructure-file.d.cts.map +0 -1
  179. package/dist/typescript/components/infrastructure-file.d.mts +0 -21
  180. package/dist/typescript/components/infrastructure-file.d.mts.map +0 -1
  181. package/dist/typescript/components/infrastructure-file.mjs.map +0 -1
  182. package/dist/typescript/components/interface-declaration.d.cts +0 -86
  183. package/dist/typescript/components/interface-declaration.d.cts.map +0 -1
  184. package/dist/typescript/components/interface-declaration.d.mts +0 -86
  185. package/dist/typescript/components/interface-declaration.d.mts.map +0 -1
  186. package/dist/typescript/components/interface-declaration.mjs.map +0 -1
  187. package/dist/typescript/components/object-declaration.d.cts +0 -30
  188. package/dist/typescript/components/object-declaration.d.cts.map +0 -1
  189. package/dist/typescript/components/object-declaration.d.mts +0 -30
  190. package/dist/typescript/components/object-declaration.d.mts.map +0 -1
  191. package/dist/typescript/components/object-declaration.mjs.map +0 -1
  192. package/dist/typescript/components/property-name.d.cts +0 -24
  193. package/dist/typescript/components/property-name.d.cts.map +0 -1
  194. package/dist/typescript/components/property-name.d.mts +0 -24
  195. package/dist/typescript/components/property-name.d.mts.map +0 -1
  196. package/dist/typescript/components/property-name.mjs.map +0 -1
  197. package/dist/typescript/components/record-expression.d.cts +0 -13
  198. package/dist/typescript/components/record-expression.d.cts.map +0 -1
  199. package/dist/typescript/components/record-expression.d.mts +0 -13
  200. package/dist/typescript/components/record-expression.d.mts.map +0 -1
  201. package/dist/typescript/components/record-expression.mjs.map +0 -1
  202. package/dist/typescript/components/tsdoc-reflection.d.cts +0 -44
  203. package/dist/typescript/components/tsdoc-reflection.d.cts.map +0 -1
  204. package/dist/typescript/components/tsdoc-reflection.d.mts +0 -44
  205. package/dist/typescript/components/tsdoc-reflection.d.mts.map +0 -1
  206. package/dist/typescript/components/tsdoc-reflection.mjs.map +0 -1
  207. package/dist/typescript/components/tsdoc.d.cts +0 -164
  208. package/dist/typescript/components/tsdoc.d.cts.map +0 -1
  209. package/dist/typescript/components/tsdoc.d.mts +0 -164
  210. package/dist/typescript/components/tsdoc.d.mts.map +0 -1
  211. package/dist/typescript/components/tsdoc.mjs.map +0 -1
  212. package/dist/typescript/components/type-declaration.d.cts +0 -18
  213. package/dist/typescript/components/type-declaration.d.cts.map +0 -1
  214. package/dist/typescript/components/type-declaration.d.mts +0 -18
  215. package/dist/typescript/components/type-declaration.d.mts.map +0 -1
  216. package/dist/typescript/components/type-declaration.mjs.map +0 -1
  217. package/dist/typescript/components/type-parameters.d.cts +0 -24
  218. package/dist/typescript/components/type-parameters.d.cts.map +0 -1
  219. package/dist/typescript/components/type-parameters.d.mts +0 -24
  220. package/dist/typescript/components/type-parameters.d.mts.map +0 -1
  221. package/dist/typescript/components/type-parameters.mjs.map +0 -1
  222. package/dist/typescript/components/typescript-file.d.cts +0 -50
  223. package/dist/typescript/components/typescript-file.d.cts.map +0 -1
  224. package/dist/typescript/components/typescript-file.d.mts +0 -50
  225. package/dist/typescript/components/typescript-file.d.mts.map +0 -1
  226. package/dist/typescript/components/typescript-file.mjs.map +0 -1
  227. package/dist/typescript/contexts/index.d.cts +0 -2
  228. package/dist/typescript/contexts/index.d.mts +0 -2
  229. package/dist/typescript/contexts/lexical-scope.d.cts +0 -17
  230. package/dist/typescript/contexts/lexical-scope.d.cts.map +0 -1
  231. package/dist/typescript/contexts/lexical-scope.d.mts +0 -17
  232. package/dist/typescript/contexts/lexical-scope.d.mts.map +0 -1
  233. package/dist/typescript/contexts/lexical-scope.mjs.map +0 -1
  234. package/dist/typescript/contexts/member-scope.d.cts +0 -20
  235. package/dist/typescript/contexts/member-scope.d.cts.map +0 -1
  236. package/dist/typescript/contexts/member-scope.d.mts +0 -20
  237. package/dist/typescript/contexts/member-scope.d.mts.map +0 -1
  238. package/dist/typescript/contexts/member-scope.mjs.map +0 -1
  239. package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -15
  240. package/dist/typescript/helpers/get-call-signature-props.d.cts.map +0 -1
  241. package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -15
  242. package/dist/typescript/helpers/get-call-signature-props.d.mts.map +0 -1
  243. package/dist/typescript/helpers/get-call-signature-props.mjs.map +0 -1
  244. package/dist/typescript/helpers/index.d.cts +0 -3
  245. package/dist/typescript/helpers/index.d.mts +0 -3
  246. package/dist/typescript/helpers/utilities.d.cts +0 -11
  247. package/dist/typescript/helpers/utilities.d.cts.map +0 -1
  248. package/dist/typescript/helpers/utilities.d.mts +0 -11
  249. package/dist/typescript/helpers/utilities.d.mts.map +0 -1
  250. package/dist/typescript/helpers/utilities.mjs.map +0 -1
  251. package/dist/typescript/index.d.cts +0 -21
  252. package/dist/typescript/index.d.mts +0 -21
  253. package/dist/yaml/components/index.d.cts +0 -2
  254. package/dist/yaml/components/index.d.mts +0 -2
  255. package/dist/yaml/components/yaml-file.d.cts +0 -34
  256. package/dist/yaml/components/yaml-file.d.cts.map +0 -1
  257. package/dist/yaml/components/yaml-file.d.mts +0 -34
  258. package/dist/yaml/components/yaml-file.d.mts.map +0 -1
  259. package/dist/yaml/components/yaml-file.mjs.map +0 -1
  260. package/dist/yaml/index.d.cts +0 -3
  261. package/dist/yaml/index.d.mts +0 -3
@@ -1 +0,0 @@
1
- {"version":3,"file":"spacing.d.cts","names":[],"sources":["../../../src/core/components/spacing.tsx"],"sourcesContent":[],"mappings":";;;UAoBiB,YAAA;;;AAAjB;AAeA;;;;;;;;;;iBAAgB,OAAA;;GAAuB,eAAY,eAAA,CAAA"}
@@ -1,24 +0,0 @@
1
- import * as _alloy_js_core7 from "@alloy-js/core";
2
-
3
- //#region src/core/components/spacing.d.ts
4
- interface SpacingProps {
5
- /**
6
- * A scale factor that determines the amount of vertical space to be added.
7
- *
8
- * @remarks
9
- * 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.
10
- *
11
- * @defaultValue 1
12
- */
13
- scale?: number;
14
- }
15
- /**
16
- * A simple component that renders two horizontal breaks to create vertical spacing between elements.
17
- */
18
- declare function Spacing({
19
- scale
20
- }: SpacingProps): _alloy_js_core7.Children;
21
- declare type __ΩSpacingProps = any[];
22
- //#endregion
23
- export { Spacing, SpacingProps, __ΩSpacingProps };
24
- //# sourceMappingURL=spacing.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spacing.d.mts","names":[],"sources":["../../../src/core/components/spacing.tsx"],"sourcesContent":[],"mappings":";;;UAoBiB,YAAA;;;AAAjB;AAeA;;;;;;;;;;iBAAgB,OAAA;;GAAuB,eAAY,eAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"spacing.mjs","names":["For","Spacing","scale","_$createComponent","each","Array","from","length","children","_","_$createIntrinsic"],"sources":["../../../src/core/components/spacing.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 { For } from \"@alloy-js/core\";\n\nexport interface SpacingProps {\n /**\n * A scale factor that determines the amount of vertical space to be added.\n *\n * @remarks\n * 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.\n *\n * @defaultValue 1\n */\n scale?: number;\n}\n\n/**\n * A simple component that renders two horizontal breaks to create vertical spacing between elements.\n */\nexport function Spacing({ scale = 1 }: SpacingProps) {\n return (\n <For each={Array.from({ length: scale })}>\n {_ => (\n <>\n <hbr />\n <hbr />\n </>\n )}\n </For>\n );\n}\n"],"mappings":""}
@@ -1,30 +0,0 @@
1
- import { ComponentContext } from "@alloy-js/core";
2
- import { PluginContext } from "powerlines";
3
-
4
- //#region src/core/contexts/context.d.ts
5
-
6
- /**
7
- * The Powerlines context used in template rendering.
8
- */
9
- declare const PowerlinesContext: ComponentContext<PluginContext>;
10
- /**
11
- * Hook to access the Powerlines Context.
12
- *
13
- * @returns The Context.
14
- */
15
- declare function usePowerlinesContext<TContext extends PluginContext = PluginContext>(): TContext | undefined;
16
- /**
17
- * Hook to safely access the {@link PluginContext | Powerlines context}.
18
- *
19
- * @returns The Powerlines context or undefined if not set.
20
- */
21
- declare function usePowerlinesSafe<TContext extends PluginContext = PluginContext>(): TContext | undefined;
22
- /**
23
- * Hook to access the {@link PluginContext | Powerlines context}.
24
- *
25
- * @returns The Powerlines context.
26
- */
27
- declare function usePowerlines<TContext extends PluginContext = PluginContext>(): TContext;
28
- //#endregion
29
- export { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
30
- //# sourceMappingURL=context.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.cts","names":[],"sources":["../../../src/core/contexts/context.ts"],"sourcesContent":[],"mappings":";;;;;;;AA4BA;AAQgB,cARH,iBAQuB,EARJ,gBAQI,CARa,aAQb,CAAA;;;;;AAWpC;AACmB,iBAZH,oBAYG,CAAA,iBAXA,aAWA,GAXgB,aAWhB,CAAA,CAAA,CAAA,EAVd,QAUc,GAAA,SAAA;;;;AAYnB;;AACmC,iBAdnB,iBAcmB,CAAA,iBAbhB,aAagB,GAbA,aAaA,CAAA,CAAA,CAAA,EAZ9B,QAY8B,GAAA,SAAA;;;;;;iBADnB,+BACG,gBAAgB,kBAC9B"}
@@ -1,30 +0,0 @@
1
- import { ComponentContext } from "@alloy-js/core";
2
- import { PluginContext } from "powerlines";
3
-
4
- //#region src/core/contexts/context.d.ts
5
-
6
- /**
7
- * The Powerlines context used in template rendering.
8
- */
9
- declare const PowerlinesContext: ComponentContext<PluginContext>;
10
- /**
11
- * Hook to access the Powerlines Context.
12
- *
13
- * @returns The Context.
14
- */
15
- declare function usePowerlinesContext<TContext extends PluginContext = PluginContext>(): TContext | undefined;
16
- /**
17
- * Hook to safely access the {@link PluginContext | Powerlines context}.
18
- *
19
- * @returns The Powerlines context or undefined if not set.
20
- */
21
- declare function usePowerlinesSafe<TContext extends PluginContext = PluginContext>(): TContext | undefined;
22
- /**
23
- * Hook to access the {@link PluginContext | Powerlines context}.
24
- *
25
- * @returns The Powerlines context.
26
- */
27
- declare function usePowerlines<TContext extends PluginContext = PluginContext>(): TContext;
28
- //#endregion
29
- export { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
30
- //# sourceMappingURL=context.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.mts","names":[],"sources":["../../../src/core/contexts/context.ts"],"sourcesContent":[],"mappings":";;;;;;;AA4BA;AAQgB,cARH,iBAQuB,EARJ,gBAQI,CARa,aAQb,CAAA;;;;;AAWpC;AACmB,iBAZH,oBAYG,CAAA,iBAXA,aAWA,GAXgB,aAWhB,CAAA,CAAA,CAAA,EAVd,QAUc,GAAA,SAAA;;;;AAYnB;;AACmC,iBAdnB,iBAcmB,CAAA,iBAbhB,aAagB,GAbA,aAaA,CAAA,CAAA,CAAA,EAZ9B,QAY8B,GAAA,SAAA;;;;;;iBADnB,+BACG,gBAAgB,kBAC9B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.mjs","names":["createNamedContext","useContext","PowerlinesContext","usePowerlinesContext","usePowerlinesSafe","powerlines","undefined","usePowerlines","Error"],"sources":["../../../src/core/contexts/context.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 {\n ComponentContext,\n createNamedContext,\n useContext\n} from \"@alloy-js/core\";\nimport type { PluginContext } from \"powerlines\";\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const PowerlinesContext: ComponentContext<PluginContext> =\n createNamedContext<PluginContext>(\"Powerlines\");\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function usePowerlinesContext<\n TContext extends PluginContext = PluginContext\n>(): TContext | undefined {\n return useContext(PowerlinesContext) as TContext | undefined;\n}\n\n/**\n * Hook to safely access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context or undefined if not set.\n */\nexport function usePowerlinesSafe<\n TContext extends PluginContext = PluginContext\n>(): TContext | undefined {\n const powerlines = usePowerlinesContext<TContext>();\n\n return powerlines ?? undefined;\n}\n\n/**\n * Hook to access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context.\n */\nexport function usePowerlines<\n TContext extends PluginContext = PluginContext\n>(): TContext {\n const powerlines = usePowerlinesSafe<TContext>();\n if (!powerlines) {\n throw new Error(\n \"Powerlines - Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return powerlines;\n}\n"],"mappings":""}
@@ -1,4 +0,0 @@
1
- import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.cjs";
2
- import { MetaContext, MetaItem, __ΩMetaItem, useMeta, useMetaContext, useMetaSafe } from "./meta.cjs";
3
- import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./reflection.cjs";
4
- export { MetaContext, MetaItem, PowerlinesContext, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩMetaItem, __ΩReflectionClassContextInterface, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,4 +0,0 @@
1
- import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
2
- import { MetaContext, MetaItem, __ΩMetaItem, useMeta, useMetaContext, useMetaSafe } from "./meta.mjs";
3
- import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./reflection.mjs";
4
- export { MetaContext, MetaItem, PowerlinesContext, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩMetaItem, __ΩReflectionClassContextInterface, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,48 +0,0 @@
1
- import { ComponentContext } from "@alloy-js/core";
2
- import { StoragePreset } from "powerlines";
3
-
4
- //#region src/core/contexts/meta.d.ts
5
- interface MetaItem {
6
- /**
7
- * The kind of metadata item.
8
- */
9
- kind?: "builtin" | "entry" | string;
10
- /**
11
- * Whether to skip formatting for this output.
12
- */
13
- skipFormat?: boolean;
14
- /**
15
- * The storage preset or adapter name for the output files.
16
- *
17
- * @remarks
18
- * If not specified, the output mode will be determined by the provided `output.mode` value.
19
- */
20
- storage?: StoragePreset | string;
21
- [key: string]: any;
22
- }
23
- /**
24
- * The Powerlines meta context used to determine metadata of files generated during rendering.
25
- */
26
- declare const MetaContext: ComponentContext<Record<string, MetaItem>>;
27
- /**
28
- * Hook to access the Powerlines Context.
29
- *
30
- * @returns The Context.
31
- */
32
- declare function useMetaContext(): Record<string, MetaItem> | undefined;
33
- /**
34
- * Hook to safely access the render context's metadata.
35
- *
36
- * @returns The Powerlines context or undefined if not set.
37
- */
38
- declare function useMetaSafe(): Record<string, MetaItem> | undefined;
39
- /**
40
- * Hook to access the render context's metadata.
41
- *
42
- * @returns The Powerlines context.
43
- */
44
- declare function useMeta(): Record<string, MetaItem>;
45
- declare type __ΩMetaItem = any[];
46
- //#endregion
47
- export { MetaContext, MetaItem, __ΩMetaItem, useMeta, useMetaContext, useMetaSafe };
48
- //# sourceMappingURL=meta.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.cts","names":[],"sources":["../../../src/core/contexts/meta.ts"],"sourcesContent":[],"mappings":";;;;UAyBiB,QAAA;;AAAjB;AAyBA;EAA0D,IAAA,CAAA,EAAA,SAAA,GAAA,OAAA,GAAA,MAAA;EAAf;;;EAQ3B,UAAA,CAAA,EAAA,OAAc;EASd;AAWhB;;;;;YApCY;;;;;;cAQC,aAAa,iBAAiB,eAAe;;;;;;iBAQ1C,cAAA,CAAA,GAAkB,eAAe;;;;;;iBASjC,WAAA,CAAA,GAAe,eAAe;;;;;;iBAW9B,OAAA,CAAA,GAAW,eAAe"}
@@ -1,48 +0,0 @@
1
- import { ComponentContext } from "@alloy-js/core";
2
- import { StoragePreset } from "powerlines";
3
-
4
- //#region src/core/contexts/meta.d.ts
5
- interface MetaItem {
6
- /**
7
- * The kind of metadata item.
8
- */
9
- kind?: "builtin" | "entry" | string;
10
- /**
11
- * Whether to skip formatting for this output.
12
- */
13
- skipFormat?: boolean;
14
- /**
15
- * The storage preset or adapter name for the output files.
16
- *
17
- * @remarks
18
- * If not specified, the output mode will be determined by the provided `output.mode` value.
19
- */
20
- storage?: StoragePreset | string;
21
- [key: string]: any;
22
- }
23
- /**
24
- * The Powerlines meta context used to determine metadata of files generated during rendering.
25
- */
26
- declare const MetaContext: ComponentContext<Record<string, MetaItem>>;
27
- /**
28
- * Hook to access the Powerlines Context.
29
- *
30
- * @returns The Context.
31
- */
32
- declare function useMetaContext(): Record<string, MetaItem> | undefined;
33
- /**
34
- * Hook to safely access the render context's metadata.
35
- *
36
- * @returns The Powerlines context or undefined if not set.
37
- */
38
- declare function useMetaSafe(): Record<string, MetaItem> | undefined;
39
- /**
40
- * Hook to access the render context's metadata.
41
- *
42
- * @returns The Powerlines context.
43
- */
44
- declare function useMeta(): Record<string, MetaItem>;
45
- declare type __ΩMetaItem = any[];
46
- //#endregion
47
- export { MetaContext, MetaItem, __ΩMetaItem, useMeta, useMetaContext, useMetaSafe };
48
- //# sourceMappingURL=meta.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.mts","names":[],"sources":["../../../src/core/contexts/meta.ts"],"sourcesContent":[],"mappings":";;;;UAyBiB,QAAA;;AAAjB;AAyBA;EAA0D,IAAA,CAAA,EAAA,SAAA,GAAA,OAAA,GAAA,MAAA;EAAf;;;EAQ3B,UAAA,CAAA,EAAA,OAAc;EASd;AAWhB;;;;;YApCY;;;;;;cAQC,aAAa,iBAAiB,eAAe;;;;;;iBAQ1C,cAAA,CAAA,GAAkB,eAAe;;;;;;iBASjC,WAAA,CAAA,GAAe,eAAe;;;;;;iBAW9B,OAAA,CAAA,GAAW,eAAe"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.mjs","names":["createNamedContext","useContext","MetaContext","useMetaContext","useMetaSafe","meta","undefined","useMeta","Error"],"sources":["../../../src/core/contexts/meta.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 {\n ComponentContext,\n createNamedContext,\n useContext\n} from \"@alloy-js/core\";\nimport type { StoragePreset } from \"powerlines\";\n\nexport interface MetaItem {\n /**\n * The kind of metadata item.\n */\n kind?: \"builtin\" | \"entry\" | string;\n\n /**\n * Whether to skip formatting for this output.\n */\n skipFormat?: boolean;\n\n /**\n * The storage preset or adapter name for the output files.\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided `output.mode` value.\n */\n storage?: StoragePreset | string;\n\n [key: string]: any;\n}\n\n/**\n * The Powerlines meta context used to determine metadata of files generated during rendering.\n */\nexport const MetaContext: ComponentContext<Record<string, MetaItem>> =\n createNamedContext<Record<string, MetaItem>>(\"Meta\");\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMetaContext(): Record<string, MetaItem> | undefined {\n return useContext(MetaContext);\n}\n\n/**\n * Hook to safely access the render context's metadata.\n *\n * @returns The Powerlines context or undefined if not set.\n */\nexport function useMetaSafe(): Record<string, MetaItem> | undefined {\n const meta = useMetaContext();\n\n return meta ?? undefined;\n}\n\n/**\n * Hook to access the render context's metadata.\n *\n * @returns The Powerlines context.\n */\nexport function useMeta(): Record<string, MetaItem> {\n const meta = useMetaSafe();\n if (!meta) {\n throw new Error(\n \"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`.\"\n );\n }\n\n return meta;\n}\n"],"mappings":""}
@@ -1,53 +0,0 @@
1
- import { ReflectionOverrideInterface } from "../../types/components.cjs";
2
- import { ComponentContext } from "@alloy-js/core";
3
- import { ReflectionClass, ReflectionMethod, ReflectionParameter, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
4
-
5
- //#region src/core/contexts/reflection.d.ts
6
- interface ReflectionClassContextInterface<T extends Record<string, any> = Record<string, any>> {
7
- reflection: ReflectionClass<T>;
8
- override?: ReflectionOverrideInterface<T>;
9
- }
10
- /**
11
- * The reflection class context used in template rendering.
12
- */
13
- declare const ReflectionClassContext: ComponentContext<ReflectionClassContextInterface<any>>;
14
- /**
15
- * Hook to access the Reflection context.
16
- *
17
- * @returns A reactive version of the current reflection.
18
- */
19
- declare function useReflectionClass<T extends Record<string, any> = Record<string, any>>(): ReflectionClassContextInterface<T>;
20
- /**
21
- * The reflection property context used in template rendering.
22
- */
23
- declare const ReflectionPropertyContext: ComponentContext<ReflectionProperty>;
24
- /**
25
- * Hook to access the Reflection Property context.
26
- *
27
- * @returns A reactive version of the current reflection.
28
- */
29
- declare function useReflectionProperty(): ReflectionProperty;
30
- /**
31
- * The reflection method context used in template rendering.
32
- */
33
- declare const ReflectionMethodContext: ComponentContext<ReflectionMethod>;
34
- /**
35
- * Hook to access the Reflection Method context.
36
- *
37
- * @returns A reactive version of the current reflection.
38
- */
39
- declare function useReflectionMethod(): ReflectionMethod;
40
- /**
41
- * The reflection parameter context used in template rendering.
42
- */
43
- declare const ReflectionParameterContext: ComponentContext<ReflectionParameter>;
44
- /**
45
- * Hook to access the Reflection Parameter context.
46
- *
47
- * @returns A reactive version of the current reflection.
48
- */
49
- declare function useReflectionParameter(): ReflectionParameter;
50
- declare type __ΩReflectionClassContextInterface = any[];
51
- //#endregion
52
- export { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
53
- //# sourceMappingURL=reflection.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reflection.d.cts","names":[],"sources":["../../../src/core/contexts/reflection.ts"],"sourcesContent":[],"mappings":";;;;;UA4BiB,0CACL,sBAAsB;cAEpB,gBAAgB;EAHb,QAAA,CAAA,EAIJ,2BAJmC,CAIP,CAJO,CAAA;;;;;AAIP,cAM5B,sBAN4B,EAMJ,gBANI,CAOvC,+BAPuC,CAAA,GAAA,CAAA,CAAA;;;AAMzC;AASA;;AACkC,iBADlB,kBACkB,CAAA,UAAtB,MAAsB,CAAA,MAAA,EAAA,GAAA,CAAA,GAAA,MAAA,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,CAAA,EAAmB,+BAAnB,CAAmB,CAAnB,CAAA;;;;AAkBrB,cAAA,yBAA4C,EAAjB,gBAAA,CAAiB,kBAAD,CAAA;AAQxD;AAeA;AAQA;AAeA;AAQA;iBA9CgB,qBAAA,CAAA,GAAqB;;;;cAexB,yBAAyB,iBAAiB;;;;;;iBAQvC,mBAAA,CAAA,GAAmB;;;;cAetB,4BAA4B,iBAAiB;;;;;;iBAQ1C,sBAAA,CAAA,GAAsB"}
@@ -1,53 +0,0 @@
1
- import { ReflectionOverrideInterface } from "../../types/components.mjs";
2
- import { ComponentContext } from "@alloy-js/core";
3
- import { ReflectionClass, ReflectionMethod, ReflectionParameter, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
4
-
5
- //#region src/core/contexts/reflection.d.ts
6
- interface ReflectionClassContextInterface<T extends Record<string, any> = Record<string, any>> {
7
- reflection: ReflectionClass<T>;
8
- override?: ReflectionOverrideInterface<T>;
9
- }
10
- /**
11
- * The reflection class context used in template rendering.
12
- */
13
- declare const ReflectionClassContext: ComponentContext<ReflectionClassContextInterface<any>>;
14
- /**
15
- * Hook to access the Reflection context.
16
- *
17
- * @returns A reactive version of the current reflection.
18
- */
19
- declare function useReflectionClass<T extends Record<string, any> = Record<string, any>>(): ReflectionClassContextInterface<T>;
20
- /**
21
- * The reflection property context used in template rendering.
22
- */
23
- declare const ReflectionPropertyContext: ComponentContext<ReflectionProperty>;
24
- /**
25
- * Hook to access the Reflection Property context.
26
- *
27
- * @returns A reactive version of the current reflection.
28
- */
29
- declare function useReflectionProperty(): ReflectionProperty;
30
- /**
31
- * The reflection method context used in template rendering.
32
- */
33
- declare const ReflectionMethodContext: ComponentContext<ReflectionMethod>;
34
- /**
35
- * Hook to access the Reflection Method context.
36
- *
37
- * @returns A reactive version of the current reflection.
38
- */
39
- declare function useReflectionMethod(): ReflectionMethod;
40
- /**
41
- * The reflection parameter context used in template rendering.
42
- */
43
- declare const ReflectionParameterContext: ComponentContext<ReflectionParameter>;
44
- /**
45
- * Hook to access the Reflection Parameter context.
46
- *
47
- * @returns A reactive version of the current reflection.
48
- */
49
- declare function useReflectionParameter(): ReflectionParameter;
50
- declare type __ΩReflectionClassContextInterface = any[];
51
- //#endregion
52
- export { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
53
- //# sourceMappingURL=reflection.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reflection.d.mts","names":[],"sources":["../../../src/core/contexts/reflection.ts"],"sourcesContent":[],"mappings":";;;;;UA4BiB,0CACL,sBAAsB;cAEpB,gBAAgB;EAHb,QAAA,CAAA,EAIJ,2BAJmC,CAIP,CAJO,CAAA;;;;;AAIP,cAM5B,sBAN4B,EAMJ,gBANI,CAOvC,+BAPuC,CAAA,GAAA,CAAA,CAAA;;;AAMzC;AASA;;AACkC,iBADlB,kBACkB,CAAA,UAAtB,MAAsB,CAAA,MAAA,EAAA,GAAA,CAAA,GAAA,MAAA,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,CAAA,EAAmB,+BAAnB,CAAmB,CAAnB,CAAA;;;;AAkBrB,cAAA,yBAA4C,EAAjB,gBAAiB,CAAA,kBAAD,CAAA;AAQxD;AAeA;AAQA;AAeA;AAQA;iBA9CgB,qBAAA,CAAA,GAAqB;;;;cAexB,yBAAyB,iBAAiB;;;;;;iBAQvC,mBAAA,CAAA,GAAmB;;;;cAetB,4BAA4B,iBAAiB;;;;;;iBAQ1C,sBAAA,CAAA,GAAsB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"reflection.mjs","names":["createContext","createNamedContext","useContext","ReflectionClassContext","useReflectionClass","context","Error","ReflectionPropertyContext","useReflectionProperty","ReflectionMethodContext","useReflectionMethod","ReflectionParameterContext","useReflectionParameter"],"sources":["../../../src/core/contexts/reflection.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\";\nimport type {\n ReflectionClass,\n ReflectionMethod,\n ReflectionParameter,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { ReflectionOverrideInterface } from \"../../types/components\";\n\nexport interface ReflectionClassContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n reflection: ReflectionClass<T>;\n override?: ReflectionOverrideInterface<T>;\n}\n\n/**\n * The reflection class context used in template rendering.\n */\nexport const ReflectionClassContext: ComponentContext<\n ReflectionClassContextInterface<any>\n> = createContext<ReflectionClassContextInterface<any>>();\n\n/**\n * Hook to access the Reflection context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionClass<\n T extends Record<string, any> = Record<string, any>\n>() {\n const context = useContext<ReflectionClassContextInterface<T>>(\n ReflectionClassContext\n )!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - ReflectionClass Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection property context used in template rendering.\n */\nexport const ReflectionPropertyContext: ComponentContext<ReflectionProperty> =\n createNamedContext<ReflectionProperty>(\"ReflectionProperty\");\n\n/**\n * Hook to access the Reflection Property context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionProperty() {\n const context = useContext<ReflectionProperty>(ReflectionPropertyContext)!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection method context used in template rendering.\n */\nexport const ReflectionMethodContext: ComponentContext<ReflectionMethod> =\n createNamedContext<ReflectionMethod>(\"ReflectionMethod\");\n\n/**\n * Hook to access the Reflection Method context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionMethod() {\n const context = useContext<ReflectionMethod>(ReflectionMethodContext)!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - Reflection Method Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection parameter context used in template rendering.\n */\nexport const ReflectionParameterContext: ComponentContext<ReflectionParameter> =\n createNamedContext<ReflectionParameter>(\"ReflectionParameter\");\n\n/**\n * Hook to access the Reflection Parameter context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionParameter() {\n return useContext<ReflectionParameter>(ReflectionParameterContext)!;\n}\n"],"mappings":""}
@@ -1,30 +0,0 @@
1
- import { Children } from "@alloy-js/core";
2
-
3
- //#region src/core/helpers/code.d.ts
4
-
5
- /**
6
- * Turn the provided string template into Children by replacing literal line
7
- * breaks with hardlines and automatically indenting indented content. Similar
8
- * in spirit to the `<code>` element in HTML.
9
- *
10
- * @see {@link text} for a similar function which treats whitespace similar to
11
- * JSX template bodies.
12
- *
13
- * @example
14
- * ```ts
15
- * code`
16
- * function greet(name: string) {
17
- * console.log("Hello, " + name + "!");
18
- * }
19
- * `
20
- * ```
21
- *
22
- * @param template - The template string to be processed into Children.
23
- * @param substitutions - Any interpolated values within the template, which will be treated as Children and properly indented.
24
- * @returns A Children representation of the provided template string, with proper handling of line breaks and indentation.
25
- * @throws Will throw an error if the provided template contains only whitespace, as this is likely a mistake and would cause a less recognizable "Cannot read properties of undefined" exception later in the processing.
26
- */
27
- declare function code(template: TemplateStringsArray, ...substitutions: Children[]): Children;
28
- //#endregion
29
- export { code };
30
- //# sourceMappingURL=code.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"code.d.cts","names":[],"sources":["../../../src/core/helpers/code.ts"],"sourcesContent":[],"mappings":";;;;;;AA0CA;;;;;;;;;;;;;;;;;;;;iBAAgB,IAAA,WACJ,wCACQ,aACjB"}
@@ -1,30 +0,0 @@
1
- import { Children } from "@alloy-js/core";
2
-
3
- //#region src/core/helpers/code.d.ts
4
-
5
- /**
6
- * Turn the provided string template into Children by replacing literal line
7
- * breaks with hardlines and automatically indenting indented content. Similar
8
- * in spirit to the `<code>` element in HTML.
9
- *
10
- * @see {@link text} for a similar function which treats whitespace similar to
11
- * JSX template bodies.
12
- *
13
- * @example
14
- * ```ts
15
- * code`
16
- * function greet(name: string) {
17
- * console.log("Hello, " + name + "!");
18
- * }
19
- * `
20
- * ```
21
- *
22
- * @param template - The template string to be processed into Children.
23
- * @param substitutions - Any interpolated values within the template, which will be treated as Children and properly indented.
24
- * @returns A Children representation of the provided template string, with proper handling of line breaks and indentation.
25
- * @throws Will throw an error if the provided template contains only whitespace, as this is likely a mistake and would cause a less recognizable "Cannot read properties of undefined" exception later in the processing.
26
- */
27
- declare function code(template: TemplateStringsArray, ...substitutions: Children[]): Children;
28
- //#endregion
29
- export { code };
30
- //# sourceMappingURL=code.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"code.d.mts","names":[],"sources":["../../../src/core/helpers/code.ts"],"sourcesContent":[],"mappings":";;;;;;AA0CA;;;;;;;;;;;;;;;;;;;;iBAAgB,IAAA,WACJ,wCACQ,aACjB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"code.mjs","names":["code","baseCode","template","substitutions","filter","seg","trim","length","Error"],"sources":["../../../src/core/helpers/code.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 { code as baseCode, Children } from \"@alloy-js/core\";\n\n/**\n * Turn the provided string template into Children by replacing literal line\n * breaks with hardlines and automatically indenting indented content. Similar\n * in spirit to the `<code>` element in HTML.\n *\n * @see {@link text} for a similar function which treats whitespace similar to\n * JSX template bodies.\n *\n * @example\n * ```ts\n * code`\n * function greet(name: string) {\n * console.log(\"Hello, \" + name + \"!\");\n * }\n * `\n * ```\n *\n * @param template - The template string to be processed into Children.\n * @param substitutions - Any interpolated values within the template, which will be treated as Children and properly indented.\n * @returns A Children representation of the provided template string, with proper handling of line breaks and indentation.\n * @throws Will throw an error if the provided template contains only whitespace, as this is likely a mistake and would cause a less recognizable \"Cannot read properties of undefined\" exception later in the processing.\n */\nexport function code(\n template: TemplateStringsArray,\n ...substitutions: Children[]\n): Children {\n if (\n template.filter(seg => seg.trim()).length === 0 &&\n substitutions.length === 0\n ) {\n throw new Error(\n \"The `code` function cannot be used with a template that contains only whitespace. Please provide a non-empty template.\"\n );\n }\n\n return baseCode(template, ...substitutions);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,SAAgBA"}
@@ -1,2 +0,0 @@
1
- import { code } from "./code.cjs";
2
- export { code };
@@ -1,2 +0,0 @@
1
- import { code } from "./code.mjs";
2
- export { code };
@@ -1,12 +0,0 @@
1
- import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.cjs";
2
- import { MetaContext, MetaItem, __ΩMetaItem, useMeta, useMetaContext, useMetaSafe } from "./contexts/meta.cjs";
3
- import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./contexts/reflection.cjs";
4
- import "./contexts/index.cjs";
5
- import { Output, OutputProps, __ΩOutputProps } from "./components/output.cjs";
6
- import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant } from "./components/single-line-comment.cjs";
7
- import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./components/source-file.cjs";
8
- import { Spacing, SpacingProps, __ΩSpacingProps } from "./components/spacing.cjs";
9
- import "./components/index.cjs";
10
- import { code } from "./helpers/code.cjs";
11
- import "./helpers/index.cjs";
12
- export { MetaContext, MetaItem, Output, OutputProps, PowerlinesContext, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, __ΩMetaItem, __ΩOutputProps, __ΩReflectionClassContextInterface, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, __ΩSpacingProps, code, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,12 +0,0 @@
1
- import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.mjs";
2
- import { MetaContext, MetaItem, __ΩMetaItem, useMeta, useMetaContext, useMetaSafe } from "./contexts/meta.mjs";
3
- import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./contexts/reflection.mjs";
4
- import "./contexts/index.mjs";
5
- import { Output, OutputProps, __ΩOutputProps } from "./components/output.mjs";
6
- import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant } from "./components/single-line-comment.mjs";
7
- import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./components/source-file.mjs";
8
- import { Spacing, SpacingProps, __ΩSpacingProps } from "./components/spacing.mjs";
9
- import "./components/index.mjs";
10
- import { code } from "./helpers/code.mjs";
11
- import "./helpers/index.mjs";
12
- export { MetaContext, MetaItem, Output, OutputProps, PowerlinesContext, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, __ΩMetaItem, __ΩOutputProps, __ΩReflectionClassContextInterface, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, __ΩSpacingProps, code, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,88 +0,0 @@
1
- import { Context, PluginContext } from "powerlines";
2
- import { ReflectionClass, ReflectionMethod, ReflectionParameter, ReflectionProperty, Type, TypeEnum, TypeUnion } from "@powerlines/deepkit/vendor/type";
3
- import { CapnpcOptions, CapnpcResult } from "@stryke/capnp/types";
4
-
5
- //#region src/helpers/capnp.d.ts
6
-
7
- /**
8
- * Compiles a Cap'n Proto schema into TypeScript definitions.
9
- *
10
- * @param context - The context containing the project and workspace information.
11
- * @param options - The options for compiling the schema.
12
- * @returns A promise that resolves to the compiled schema.
13
- */
14
- declare function compile(context: Context, options?: Partial<CapnpcOptions>): Promise<CapnpcResult>;
15
- /**
16
- * Converts any {@link ReflectionProperty} or {@link ReflectionParameter}'s value to string representation.
17
- *
18
- * @param property - The {@link ReflectionProperty} or {@link ReflectionParameter} containing the value to stringify.
19
- * @param value - The value to stringify.
20
- * @returns A string representation of the value.
21
- */
22
- declare function stringifyCapnpDefaultValue(property: ReflectionProperty | ReflectionParameter, value?: any): string;
23
- /**
24
- * Converts any {@link Type}'s actual value to string representation.
25
- *
26
- * @param type - The {@link Type} of the value to stringify.
27
- * @param value - The value to stringify.
28
- * @returns A string representation of the value.
29
- */
30
- declare function stringifyCapnpValue(type: Type, value: any): string;
31
- /**
32
- * Converts a ReflectionProperty's default value to a Cap'n Proto schema string representation.
33
- *
34
- * @param type - The TypeEnum to evaluate.
35
- * @returns A string representation of the property.
36
- */
37
- declare function getCapnpEnumTypes(type: Type): "Text" | "Float32" | null;
38
- /**
39
- * Determines if a Type is a `Void` type in a Cap'n Proto schema.
40
- *
41
- * @param type - The Type to check.
42
- * @returns True if the Type is a `Void` type, false otherwise.
43
- */
44
- declare function isVoidType(type: Type): boolean;
45
- /**
46
- * Converts a {@link TypeUnion} to an array of its underlying Cap'n Proto primitive type representation.
47
- *
48
- * @param type - The {@link TypeUnion} to convert.
49
- * @returns A string representation of the Cap'n Proto primitive type.
50
- */
51
- declare function getCapnpUnionTypes(type: Type): Type[];
52
- /**
53
- * Converts a {@link TypeUnion} to an array of its underlying Cap'n Proto primitive type representation.
54
- *
55
- * @param type - The {@link TypeUnion} to convert.
56
- * @returns An array of Cap'n Proto primitive types.
57
- */
58
- declare function isCapnpStringUnion(type: Type): boolean;
59
- declare const LARGE_BUFFER: number;
60
- type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
61
- type StdioOptions = IOType | Array<IOType | "ipc" | number | null | undefined>;
62
- declare function generateCapnpId(): Promise<string>;
63
- interface GenerateCapnpOptions {
64
- name?: string;
65
- }
66
- declare function generateCapnp(context: PluginContext, reflection: ReflectionClass<any>, options: GenerateCapnpOptions): Promise<string>;
67
- interface GenerateCapnpStructOptions extends GenerateCapnpOptions {
68
- indexCounter?: () => number;
69
- }
70
- declare function generateCapnpStruct(reflection: ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
71
- declare function generateCapnpInterface(reflection: ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
72
- declare function generateCapnpSchema(reflection: ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
73
- declare function generateCapnpMethodSchema(reflection: ReflectionMethod, indexCounter: () => number): string;
74
- declare function generateCapnpEnumSchema(type: TypeEnum | TypeUnion, name: string): string;
75
- /**
76
- * Generates a string representation of Cap'n Proto primitive types from a Deepkit Type.
77
- *
78
- * @param type - The Deepkit Type to convert.
79
- * @returns A string representation of the Cap'n Proto primitive type.
80
- */
81
- declare function generateCapnpPrimitive(type: Type): string;
82
- declare type __ΩIOType = any[];
83
- declare type __ΩStdioOptions = any[];
84
- declare type __ΩGenerateCapnpOptions = any[];
85
- declare type __ΩGenerateCapnpStructOptions = any[];
86
- //#endregion
87
- export { GenerateCapnpOptions, GenerateCapnpStructOptions, IOType, LARGE_BUFFER, StdioOptions, __ΩGenerateCapnpOptions, __ΩGenerateCapnpStructOptions, __ΩIOType, __ΩStdioOptions, compile, generateCapnp, generateCapnpEnumSchema, generateCapnpId, generateCapnpInterface, generateCapnpMethodSchema, generateCapnpPrimitive, generateCapnpSchema, generateCapnpStruct, getCapnpEnumTypes, getCapnpUnionTypes, isCapnpStringUnion, isVoidType, stringifyCapnpDefaultValue, stringifyCapnpValue };
88
- //# sourceMappingURL=capnp.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capnp.d.cts","names":[],"sources":["../../src/helpers/capnp.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA8DA;;;;;AAGG,iBAHmB,OAAA,CAGnB,OAAA,EAFQ,OAER,EAAA,OAAA,CAAA,EADQ,OACR,CADgB,aAChB,CAAA,CAAA,EAAA,OAAA,CAAQ,YAAR,CAAA;;AA+BH;AAiBA;AAoBA;AAsBA;AAgBA;AAUA;AAMa,iBA3FG,0BAAA,CA2F0B,QAAA,EA1F9B,kBA0F8B,GA1FT,mBA0FS,EAAA,KAAA,CAAA,EAAA,GAAA,CAAA,EAAA,MAAA;AAC1C;AACA;;;;;AAMA;AAUiB,iBA5FD,mBAAA,CA4FqB,IAAA,EA5FK,IA4FL,EAAA,KAAA,EAAA,GAAA,CAAA,EAAA,MAAA;AAIrC;;;;;;AAmBiB,iBA/FD,iBAAA,CA+F4B,IAAQ,EA/FZ,IA+FY,CAAA,EAAA,MAAA,GAAA,SAAoB,GAAA,IAAA;AAIxE;AAkBA;AA2DA;AA8EA;AA4MA;AAoEA;iBAxfgB,UAAA,OAAiB;;;;;;;iBAgBjB,kBAAA,OAAyB,OAAO;;;;;;;iBAUhC,kBAAA,OAAyB;cAM5B;KACD,MAAA;KACA,YAAA,GACR,SACA,MAAM;iBAIY,eAAA,CAAA,GAAe;UAUpB,oBAAA;;;iBAIK,aAAA,UACX,2BACG,+BACH,uBAAoB;UAgBd,0BAAA,SAAmC;;;iBAIpC,mBAAA,aACF,gCACH;iBAgBK,sBAAA,aACF,gCACH;iBAyDK,mBAAA,aACF,gCACH;iBA4EK,yBAAA,aACF;iBA2ME,uBAAA,OACR,WAAW;;;;;;;iBAmEH,sBAAA,OAA6B"}