@powerlines/plugin-alloy 0.25.49 → 0.25.52

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 (334) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +29 -0
  2. package/dist/_virtual/_rolldown/runtime.mjs +3 -0
  3. package/dist/core/components/index.cjs +10 -0
  4. package/dist/core/components/index.d.cts +5 -0
  5. package/dist/core/components/index.d.mts +5 -0
  6. package/dist/core/components/index.mjs +6 -0
  7. package/dist/core/components/output.cjs +41 -0
  8. package/dist/core/components/output.d.cts +24 -0
  9. package/dist/core/components/output.d.cts.map +1 -0
  10. package/dist/core/components/output.d.mts +24 -0
  11. package/dist/core/components/output.d.mts.map +1 -0
  12. package/dist/core/components/output.mjs +40 -0
  13. package/dist/core/components/output.mjs.map +1 -0
  14. package/dist/core/components/single-line-comment.cjs +23 -0
  15. package/dist/core/components/single-line-comment.d.cts +23 -0
  16. package/dist/core/components/single-line-comment.d.cts.map +1 -0
  17. package/dist/core/components/single-line-comment.d.mts +23 -0
  18. package/dist/core/components/single-line-comment.d.mts.map +1 -0
  19. package/dist/core/components/single-line-comment.mjs +22 -0
  20. package/dist/core/components/single-line-comment.mjs.map +1 -0
  21. package/dist/core/components/source-file.cjs +64 -0
  22. package/dist/core/components/source-file.d.cts +33 -0
  23. package/dist/core/components/source-file.d.cts.map +1 -0
  24. package/dist/core/components/source-file.d.mts +33 -0
  25. package/dist/core/components/source-file.d.mts.map +1 -0
  26. package/dist/core/components/source-file.mjs +62 -0
  27. package/dist/core/components/source-file.mjs.map +1 -0
  28. package/dist/core/components/spacing.cjs +20 -0
  29. package/dist/core/components/spacing.d.cts +24 -0
  30. package/dist/core/components/spacing.d.cts.map +1 -0
  31. package/dist/core/components/spacing.d.mts +24 -0
  32. package/dist/core/components/spacing.d.mts.map +1 -0
  33. package/dist/core/components/spacing.mjs +19 -0
  34. package/dist/core/components/spacing.mjs.map +1 -0
  35. package/dist/core/contexts/context.cjs +41 -0
  36. package/dist/core/contexts/context.d.cts +29 -0
  37. package/dist/core/contexts/context.d.cts.map +1 -0
  38. package/dist/core/contexts/context.d.mts +29 -0
  39. package/dist/core/contexts/context.d.mts.map +1 -0
  40. package/dist/core/contexts/context.mjs +37 -0
  41. package/dist/core/contexts/context.mjs.map +1 -0
  42. package/dist/core/contexts/index.cjs +21 -0
  43. package/dist/core/contexts/index.d.cts +4 -0
  44. package/dist/core/contexts/index.d.mts +4 -0
  45. package/dist/core/contexts/index.mjs +5 -0
  46. package/dist/core/contexts/meta.cjs +41 -0
  47. package/dist/core/contexts/meta.d.cts +48 -0
  48. package/dist/core/contexts/meta.d.cts.map +1 -0
  49. package/dist/core/contexts/meta.d.mts +48 -0
  50. package/dist/core/contexts/meta.d.mts.map +1 -0
  51. package/dist/core/contexts/meta.mjs +37 -0
  52. package/dist/core/contexts/meta.mjs.map +1 -0
  53. package/dist/core/contexts/reflection.cjs +69 -0
  54. package/dist/core/contexts/reflection.d.cts +53 -0
  55. package/dist/core/contexts/reflection.d.cts.map +1 -0
  56. package/dist/core/contexts/reflection.d.mts +53 -0
  57. package/dist/core/contexts/reflection.d.mts.map +1 -0
  58. package/dist/core/contexts/reflection.mjs +61 -0
  59. package/dist/core/contexts/reflection.mjs.map +1 -0
  60. package/dist/core/helpers/code.cjs +34 -0
  61. package/dist/core/helpers/code.d.cts +29 -0
  62. package/dist/core/helpers/code.d.cts.map +1 -0
  63. package/dist/core/helpers/code.d.mts +29 -0
  64. package/dist/core/helpers/code.d.mts.map +1 -0
  65. package/dist/core/helpers/code.mjs +33 -0
  66. package/dist/core/helpers/code.mjs.map +1 -0
  67. package/dist/core/helpers/index.cjs +4 -0
  68. package/dist/core/helpers/index.d.cts +2 -0
  69. package/dist/core/helpers/index.d.mts +2 -0
  70. package/dist/core/helpers/index.mjs +3 -0
  71. package/dist/core/index.cjs +34 -0
  72. package/dist/core/index.d.cts +9 -0
  73. package/dist/core/index.d.mts +9 -0
  74. package/dist/core/index.mjs +13 -0
  75. package/dist/helpers/capnp.cjs +277 -0
  76. package/dist/helpers/capnp.d.cts +87 -0
  77. package/dist/helpers/capnp.d.cts.map +1 -0
  78. package/dist/helpers/capnp.d.mts +87 -0
  79. package/dist/helpers/capnp.d.mts.map +1 -0
  80. package/dist/helpers/capnp.mjs +260 -0
  81. package/dist/helpers/capnp.mjs.map +1 -0
  82. package/dist/helpers/create-builtin.cjs +20 -0
  83. package/dist/helpers/create-builtin.d.cts +16 -0
  84. package/dist/helpers/create-builtin.d.cts.map +1 -0
  85. package/dist/helpers/create-builtin.d.mts +16 -0
  86. package/dist/helpers/create-builtin.d.mts.map +1 -0
  87. package/dist/helpers/create-builtin.mjs +19 -0
  88. package/dist/helpers/create-builtin.mjs.map +1 -0
  89. package/dist/helpers/index.cjs +25 -0
  90. package/dist/helpers/index.d.cts +5 -0
  91. package/dist/helpers/index.d.mts +5 -0
  92. package/dist/helpers/index.mjs +6 -0
  93. package/dist/helpers/refkey.cjs +17 -0
  94. package/dist/helpers/refkey.d.cts +13 -0
  95. package/dist/helpers/refkey.d.cts.map +1 -0
  96. package/dist/helpers/refkey.d.mts +13 -0
  97. package/dist/helpers/refkey.d.mts.map +1 -0
  98. package/dist/helpers/refkey.mjs +16 -0
  99. package/dist/helpers/refkey.mjs.map +1 -0
  100. package/dist/helpers/typescript.cjs +47 -0
  101. package/dist/helpers/typescript.d.cts +26 -0
  102. package/dist/helpers/typescript.d.cts.map +1 -0
  103. package/dist/helpers/typescript.d.mts +26 -0
  104. package/dist/helpers/typescript.d.mts.map +1 -0
  105. package/dist/helpers/typescript.mjs +46 -0
  106. package/dist/helpers/typescript.mjs.map +1 -0
  107. package/dist/index.cjs +48 -0
  108. package/dist/index.d.cts +19 -0
  109. package/dist/index.d.cts.map +1 -0
  110. package/dist/index.d.mts +19 -0
  111. package/dist/index.d.mts.map +1 -0
  112. package/dist/index.mjs +45 -0
  113. package/dist/index.mjs.map +1 -0
  114. package/dist/markdown/components/front-matter.cjs +29 -0
  115. package/dist/markdown/components/front-matter.d.cts +16 -0
  116. package/dist/markdown/components/front-matter.d.cts.map +1 -0
  117. package/dist/markdown/components/front-matter.d.mts +16 -0
  118. package/dist/markdown/components/front-matter.d.mts.map +1 -0
  119. package/dist/markdown/components/front-matter.mjs +28 -0
  120. package/dist/markdown/components/front-matter.mjs.map +1 -0
  121. package/dist/markdown/components/index.cjs +11 -0
  122. package/dist/markdown/components/index.d.cts +4 -0
  123. package/dist/markdown/components/index.d.mts +4 -0
  124. package/dist/markdown/components/index.mjs +5 -0
  125. package/dist/markdown/components/markdown-file.cjs +135 -0
  126. package/dist/markdown/components/markdown-file.d.cts +29 -0
  127. package/dist/markdown/components/markdown-file.d.cts.map +1 -0
  128. package/dist/markdown/components/markdown-file.d.mts +29 -0
  129. package/dist/markdown/components/markdown-file.d.mts.map +1 -0
  130. package/dist/markdown/components/markdown-file.mjs +133 -0
  131. package/dist/markdown/components/markdown-file.mjs.map +1 -0
  132. package/dist/markdown/components/markdown-table.cjs +102 -0
  133. package/dist/markdown/components/markdown-table.d.cts +28 -0
  134. package/dist/markdown/components/markdown-table.d.cts.map +1 -0
  135. package/dist/markdown/components/markdown-table.d.mts +28 -0
  136. package/dist/markdown/components/markdown-table.d.mts.map +1 -0
  137. package/dist/markdown/components/markdown-table.mjs +99 -0
  138. package/dist/markdown/components/markdown-table.mjs.map +1 -0
  139. package/dist/markdown/contexts/index.cjs +7 -0
  140. package/dist/markdown/contexts/index.d.cts +2 -0
  141. package/dist/markdown/contexts/index.d.mts +2 -0
  142. package/dist/markdown/contexts/index.mjs +3 -0
  143. package/dist/markdown/contexts/markdown-table.cjs +38 -0
  144. package/dist/markdown/contexts/markdown-table.d.cts +38 -0
  145. package/dist/markdown/contexts/markdown-table.d.cts.map +1 -0
  146. package/dist/markdown/contexts/markdown-table.d.mts +38 -0
  147. package/dist/markdown/contexts/markdown-table.d.mts.map +1 -0
  148. package/dist/markdown/contexts/markdown-table.mjs +34 -0
  149. package/dist/markdown/contexts/markdown-table.mjs.map +1 -0
  150. package/dist/markdown/index.cjs +18 -0
  151. package/dist/markdown/index.d.cts +5 -0
  152. package/dist/markdown/index.d.mts +5 -0
  153. package/dist/markdown/index.mjs +8 -0
  154. package/dist/render.cjs +91 -0
  155. package/dist/render.d.cts +38 -0
  156. package/dist/render.d.cts.map +1 -0
  157. package/dist/render.d.mts +38 -0
  158. package/dist/render.d.mts.map +1 -0
  159. package/dist/render.mjs +89 -0
  160. package/dist/render.mjs.map +1 -0
  161. package/dist/types/components.cjs +0 -0
  162. package/dist/types/components.d.cts +142 -0
  163. package/dist/types/components.d.cts.map +1 -0
  164. package/dist/types/components.d.mts +142 -0
  165. package/dist/types/components.d.mts.map +1 -0
  166. package/dist/types/components.mjs +1 -0
  167. package/dist/types/index.cjs +0 -0
  168. package/dist/types/index.d.cts +3 -0
  169. package/dist/types/index.d.mts +3 -0
  170. package/dist/types/index.mjs +1 -0
  171. package/dist/types/plugin.cjs +0 -0
  172. package/dist/types/plugin.d.cts +39 -0
  173. package/dist/types/plugin.d.cts.map +1 -0
  174. package/dist/types/plugin.d.mts +39 -0
  175. package/dist/types/plugin.d.mts.map +1 -0
  176. package/dist/types/plugin.mjs +1 -0
  177. package/dist/typescript/components/builtin-file.cjs +63 -0
  178. package/dist/typescript/components/builtin-file.d.cts +35 -0
  179. package/dist/typescript/components/builtin-file.d.cts.map +1 -0
  180. package/dist/typescript/components/builtin-file.d.mts +35 -0
  181. package/dist/typescript/components/builtin-file.d.mts.map +1 -0
  182. package/dist/typescript/components/builtin-file.mjs +62 -0
  183. package/dist/typescript/components/builtin-file.mjs.map +1 -0
  184. package/dist/typescript/components/class-declaration.cjs +291 -0
  185. package/dist/typescript/components/class-declaration.d.cts +145 -0
  186. package/dist/typescript/components/class-declaration.d.cts.map +1 -0
  187. package/dist/typescript/components/class-declaration.d.mts +145 -0
  188. package/dist/typescript/components/class-declaration.d.mts.map +1 -0
  189. package/dist/typescript/components/class-declaration.mjs +285 -0
  190. package/dist/typescript/components/class-declaration.mjs.map +1 -0
  191. package/dist/typescript/components/dynamic-import-statement.cjs +26 -0
  192. package/dist/typescript/components/dynamic-import-statement.d.cts +33 -0
  193. package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -0
  194. package/dist/typescript/components/dynamic-import-statement.d.mts +33 -0
  195. package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -0
  196. package/dist/typescript/components/dynamic-import-statement.mjs +25 -0
  197. package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -0
  198. package/dist/typescript/components/entry-file.cjs +43 -0
  199. package/dist/typescript/components/entry-file.d.cts +28 -0
  200. package/dist/typescript/components/entry-file.d.cts.map +1 -0
  201. package/dist/typescript/components/entry-file.d.mts +28 -0
  202. package/dist/typescript/components/entry-file.d.mts.map +1 -0
  203. package/dist/typescript/components/entry-file.mjs +41 -0
  204. package/dist/typescript/components/entry-file.mjs.map +1 -0
  205. package/dist/typescript/components/index.cjs +65 -0
  206. package/dist/typescript/components/index.d.cts +15 -0
  207. package/dist/typescript/components/index.d.mts +15 -0
  208. package/dist/typescript/components/index.mjs +16 -0
  209. package/dist/typescript/components/infrastructure-file.cjs +40 -0
  210. package/dist/typescript/components/infrastructure-file.d.cts +21 -0
  211. package/dist/typescript/components/infrastructure-file.d.cts.map +1 -0
  212. package/dist/typescript/components/infrastructure-file.d.mts +21 -0
  213. package/dist/typescript/components/infrastructure-file.d.mts.map +1 -0
  214. package/dist/typescript/components/infrastructure-file.mjs +38 -0
  215. package/dist/typescript/components/infrastructure-file.mjs.map +1 -0
  216. package/dist/typescript/components/interface-declaration.cjs +229 -0
  217. package/dist/typescript/components/interface-declaration.d.cts +86 -0
  218. package/dist/typescript/components/interface-declaration.d.cts.map +1 -0
  219. package/dist/typescript/components/interface-declaration.d.mts +86 -0
  220. package/dist/typescript/components/interface-declaration.d.mts.map +1 -0
  221. package/dist/typescript/components/interface-declaration.mjs +225 -0
  222. package/dist/typescript/components/interface-declaration.mjs.map +1 -0
  223. package/dist/typescript/components/object-declaration.cjs +128 -0
  224. package/dist/typescript/components/object-declaration.d.cts +30 -0
  225. package/dist/typescript/components/object-declaration.d.cts.map +1 -0
  226. package/dist/typescript/components/object-declaration.d.mts +30 -0
  227. package/dist/typescript/components/object-declaration.d.mts.map +1 -0
  228. package/dist/typescript/components/object-declaration.mjs +126 -0
  229. package/dist/typescript/components/object-declaration.mjs.map +1 -0
  230. package/dist/typescript/components/property-name.cjs +32 -0
  231. package/dist/typescript/components/property-name.d.cts +24 -0
  232. package/dist/typescript/components/property-name.d.cts.map +1 -0
  233. package/dist/typescript/components/property-name.d.mts +24 -0
  234. package/dist/typescript/components/property-name.d.mts.map +1 -0
  235. package/dist/typescript/components/property-name.mjs +31 -0
  236. package/dist/typescript/components/property-name.mjs.map +1 -0
  237. package/dist/typescript/components/record-expression.cjs +13 -0
  238. package/dist/typescript/components/record-expression.d.cts +13 -0
  239. package/dist/typescript/components/record-expression.d.cts.map +1 -0
  240. package/dist/typescript/components/record-expression.d.mts +13 -0
  241. package/dist/typescript/components/record-expression.d.mts.map +1 -0
  242. package/dist/typescript/components/record-expression.mjs +12 -0
  243. package/dist/typescript/components/record-expression.mjs.map +1 -0
  244. package/dist/typescript/components/tsdoc-reflection.cjs +310 -0
  245. package/dist/typescript/components/tsdoc-reflection.d.cts +44 -0
  246. package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -0
  247. package/dist/typescript/components/tsdoc-reflection.d.mts +44 -0
  248. package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -0
  249. package/dist/typescript/components/tsdoc-reflection.mjs +304 -0
  250. package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -0
  251. package/dist/typescript/components/tsdoc.cjs +477 -0
  252. package/dist/typescript/components/tsdoc.d.cts +164 -0
  253. package/dist/typescript/components/tsdoc.d.cts.map +1 -0
  254. package/dist/typescript/components/tsdoc.d.mts +164 -0
  255. package/dist/typescript/components/tsdoc.d.mts.map +1 -0
  256. package/dist/typescript/components/tsdoc.mjs +457 -0
  257. package/dist/typescript/components/tsdoc.mjs.map +1 -0
  258. package/dist/typescript/components/type-declaration.cjs +39 -0
  259. package/dist/typescript/components/type-declaration.d.cts +18 -0
  260. package/dist/typescript/components/type-declaration.d.cts.map +1 -0
  261. package/dist/typescript/components/type-declaration.d.mts +18 -0
  262. package/dist/typescript/components/type-declaration.d.mts.map +1 -0
  263. package/dist/typescript/components/type-declaration.mjs +38 -0
  264. package/dist/typescript/components/type-declaration.mjs.map +1 -0
  265. package/dist/typescript/components/type-parameters.cjs +82 -0
  266. package/dist/typescript/components/type-parameters.d.cts +24 -0
  267. package/dist/typescript/components/type-parameters.d.cts.map +1 -0
  268. package/dist/typescript/components/type-parameters.d.mts +24 -0
  269. package/dist/typescript/components/type-parameters.d.mts.map +1 -0
  270. package/dist/typescript/components/type-parameters.mjs +81 -0
  271. package/dist/typescript/components/type-parameters.mjs.map +1 -0
  272. package/dist/typescript/components/typescript-file.cjs +221 -0
  273. package/dist/typescript/components/typescript-file.d.cts +50 -0
  274. package/dist/typescript/components/typescript-file.d.cts.map +1 -0
  275. package/dist/typescript/components/typescript-file.d.mts +50 -0
  276. package/dist/typescript/components/typescript-file.d.mts.map +1 -0
  277. package/dist/typescript/components/typescript-file.mjs +218 -0
  278. package/dist/typescript/components/typescript-file.mjs.map +1 -0
  279. package/dist/typescript/contexts/index.cjs +4 -0
  280. package/dist/typescript/contexts/index.d.cts +2 -0
  281. package/dist/typescript/contexts/index.d.mts +2 -0
  282. package/dist/typescript/contexts/index.mjs +3 -0
  283. package/dist/typescript/contexts/lexical-scope.cjs +26 -0
  284. package/dist/typescript/contexts/lexical-scope.d.cts +17 -0
  285. package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -0
  286. package/dist/typescript/contexts/lexical-scope.d.mts +17 -0
  287. package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -0
  288. package/dist/typescript/contexts/lexical-scope.mjs +25 -0
  289. package/dist/typescript/contexts/lexical-scope.mjs.map +1 -0
  290. package/dist/typescript/contexts/member-scope.cjs +24 -0
  291. package/dist/typescript/contexts/member-scope.d.cts +20 -0
  292. package/dist/typescript/contexts/member-scope.d.cts.map +1 -0
  293. package/dist/typescript/contexts/member-scope.d.mts +20 -0
  294. package/dist/typescript/contexts/member-scope.d.mts.map +1 -0
  295. package/dist/typescript/contexts/member-scope.mjs +23 -0
  296. package/dist/typescript/contexts/member-scope.mjs.map +1 -0
  297. package/dist/typescript/helpers/get-call-signature-props.cjs +26 -0
  298. package/dist/typescript/helpers/get-call-signature-props.d.cts +14 -0
  299. package/dist/typescript/helpers/get-call-signature-props.d.cts.map +1 -0
  300. package/dist/typescript/helpers/get-call-signature-props.d.mts +14 -0
  301. package/dist/typescript/helpers/get-call-signature-props.d.mts.map +1 -0
  302. package/dist/typescript/helpers/get-call-signature-props.mjs +25 -0
  303. package/dist/typescript/helpers/get-call-signature-props.mjs.map +1 -0
  304. package/dist/typescript/helpers/index.cjs +6 -0
  305. package/dist/typescript/helpers/index.d.cts +3 -0
  306. package/dist/typescript/helpers/index.d.mts +3 -0
  307. package/dist/typescript/helpers/index.mjs +4 -0
  308. package/dist/typescript/helpers/utilities.cjs +15 -0
  309. package/dist/typescript/helpers/utilities.d.cts +11 -0
  310. package/dist/typescript/helpers/utilities.d.cts.map +1 -0
  311. package/dist/typescript/helpers/utilities.d.mts +11 -0
  312. package/dist/typescript/helpers/utilities.d.mts.map +1 -0
  313. package/dist/typescript/helpers/utilities.mjs +14 -0
  314. package/dist/typescript/helpers/utilities.mjs.map +1 -0
  315. package/dist/typescript/index.cjs +74 -0
  316. package/dist/typescript/index.d.cts +18 -0
  317. package/dist/typescript/index.d.mts +18 -0
  318. package/dist/typescript/index.mjs +22 -0
  319. package/dist/yaml/components/index.cjs +5 -0
  320. package/dist/yaml/components/index.d.cts +2 -0
  321. package/dist/yaml/components/index.d.mts +2 -0
  322. package/dist/yaml/components/index.mjs +3 -0
  323. package/dist/yaml/components/yaml-file.cjs +149 -0
  324. package/dist/yaml/components/yaml-file.d.cts +34 -0
  325. package/dist/yaml/components/yaml-file.d.cts.map +1 -0
  326. package/dist/yaml/components/yaml-file.d.mts +34 -0
  327. package/dist/yaml/components/yaml-file.d.mts.map +1 -0
  328. package/dist/yaml/components/yaml-file.mjs +147 -0
  329. package/dist/yaml/components/yaml-file.mjs.map +1 -0
  330. package/dist/yaml/index.cjs +6 -0
  331. package/dist/yaml/index.d.cts +2 -0
  332. package/dist/yaml/index.d.mts +2 -0
  333. package/dist/yaml/index.mjs +4 -0
  334. package/package.json +7 -7
@@ -0,0 +1,13 @@
1
+ import { Refkey } from "@alloy-js/core";
2
+
3
+ //#region src/helpers/refkey.d.ts
4
+ /**
5
+ * Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.
6
+ *
7
+ * @remarks
8
+ * Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`
9
+ */
10
+ declare function refkey(...args: unknown[]): Refkey;
11
+ //#endregion
12
+ export { refkey };
13
+ //# sourceMappingURL=refkey.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refkey.d.mts","names":[],"sources":["../../src/helpers/refkey.ts"],"mappings":";;;;;AA0BA;;;;iBAAgB,MAAA,CAAA,GAAU,IAAA,cAAkB,MAAA"}
@@ -0,0 +1,16 @@
1
+ import { refkey as refkey$1 } from "@alloy-js/core";
2
+
3
+ //#region src/helpers/refkey.ts
4
+ /**
5
+ * Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.
6
+ *
7
+ * @remarks
8
+ * Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`
9
+ */
10
+ function refkey(...args) {
11
+ return refkey$1("powerlines", ...args);
12
+ }
13
+
14
+ //#endregion
15
+ export { refkey };
16
+ //# sourceMappingURL=refkey.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refkey.mjs","names":["refkeyExternal"],"sources":["../../src/helpers/refkey.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 { Refkey, refkey as refkeyExternal } from \"@alloy-js/core\";\n\n/**\n * Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.\n *\n * @remarks\n * Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`\n */\nexport function refkey(...args: unknown[]): Refkey {\n return refkeyExternal(\"powerlines\", ...args);\n}\n"],"mappings":";;;;;;;;;AA0BA,SAAgB,OAAO,GAAG,MAAyB;AACjD,QAAOA,SAAe,cAAc,GAAG,KAAK"}
@@ -0,0 +1,47 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let _powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
4
+ let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
5
+ let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
6
+ let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
7
+
8
+ //#region src/helpers/typescript.ts
9
+ /**
10
+ * Generates a TypeScript object for the given reflection class.
11
+ *
12
+ * @param reflection - The reflection class to generate the object for.
13
+ * @param options - Options for generating the object.
14
+ * @returns A string containing the TypeScript object definition.
15
+ */
16
+ function generateObjectDeclaration(reflection, options = {}) {
17
+ if (!reflection) return "";
18
+ return `
19
+ /**
20
+ * ${reflection.getDescription() || `${(0, _stryke_string_format_title_case.titleCase)(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`}.
21
+ */
22
+ export const ${(0, _stryke_string_format_camel_case.camelCase)(options.overrideName || reflection.getName())}${options.overrideExtends !== false && (options.overrideExtends || reflection.getSuperReflectionClass()?.getName()) ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}` : ""} = {
23
+ ${reflection.getProperties().filter((item) => !item.isIgnored() && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
24
+ if ((0, _stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
25
+ return ret;
26
+ }, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1).map((item) => ` /**
27
+ * ${item.getDescription() || item.getTitle() || (0, _stryke_string_format_title_case.titleCase)(item.getNameAsString())}
28
+ *
29
+ * @title ${item.getTitle() || (0, _stryke_string_format_title_case.titleCase)(item.getNameAsString())}${item.getAlias().length ? `
30
+ ${item.getAlias().map((alias) => ` * @alias ${alias}`).join("\n")}` : ""}${item.getDomain() ? `
31
+ * @domain ${item.getDomain()}` : ""}${item.getPermission().length ? `
32
+ ${item.getPermission().map((permission) => ` * @permission ${permission}`).join("\n")}` : ""}${item.isInternal() ? `
33
+ * @internal` : ""}${item.isReadonly() ? `
34
+ * @readonly` : ""}${item.isIgnored() ? `
35
+ * @ignored` : ""}${item.isHidden() ? `
36
+ * @hidden` : ""}
37
+ */
38
+ ${item.getNameAsString()}: ${(0, _powerlines_deepkit_utilities.stringifyValue)(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
39
+ if ((0, _stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
40
+ return ret;
41
+ }, void 0) ?? item.getDefaultValue())}`).join(", \n")}
42
+ };
43
+ `;
44
+ }
45
+
46
+ //#endregion
47
+ exports.generateObjectDeclaration = generateObjectDeclaration;
@@ -0,0 +1,26 @@
1
+ import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
2
+
3
+ //#region src/helpers/typescript.d.ts
4
+ interface GenerateInterfaceDeclarationOptions<T> {
5
+ overrideName?: string;
6
+ overrideExtends?: string | false;
7
+ defaultValues?: Partial<T>;
8
+ }
9
+ interface GenerateObjectDeclarationOptions<T> {
10
+ overrideName?: string;
11
+ overrideExtends?: string | false;
12
+ defaultValues?: Partial<T>;
13
+ }
14
+ /**
15
+ * Generates a TypeScript object for the given reflection class.
16
+ *
17
+ * @param reflection - The reflection class to generate the object for.
18
+ * @param options - Options for generating the object.
19
+ * @returns A string containing the TypeScript object definition.
20
+ */
21
+ declare function generateObjectDeclaration<T extends Record<string, any>>(reflection: ReflectionClass<T>, options?: GenerateObjectDeclarationOptions<T>): string;
22
+ declare type __ΩGenerateInterfaceDeclarationOptions = any[];
23
+ declare type __ΩGenerateObjectDeclarationOptions = any[];
24
+ //#endregion
25
+ export { GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, __ΩGenerateInterfaceDeclarationOptions, __ΩGenerateObjectDeclarationOptions, generateObjectDeclaration };
26
+ //# sourceMappingURL=typescript.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.d.cts","names":[],"sources":["../../src/helpers/typescript.ts"],"mappings":";;;UAwBiB,mCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;AAAA,UAqJT,gCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;;;;;AAH1B;;;iBAagB,yBAAA,WAAoC,MAAA,cAAA,CAClD,UAAA,EAAY,eAAA,CAAgB,CAAA,GAC5B,OAAA,GAAS,gCAAA,CAAiC,CAAA;AAAA"}
@@ -0,0 +1,26 @@
1
+ import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
2
+
3
+ //#region src/helpers/typescript.d.ts
4
+ interface GenerateInterfaceDeclarationOptions<T> {
5
+ overrideName?: string;
6
+ overrideExtends?: string | false;
7
+ defaultValues?: Partial<T>;
8
+ }
9
+ interface GenerateObjectDeclarationOptions<T> {
10
+ overrideName?: string;
11
+ overrideExtends?: string | false;
12
+ defaultValues?: Partial<T>;
13
+ }
14
+ /**
15
+ * Generates a TypeScript object for the given reflection class.
16
+ *
17
+ * @param reflection - The reflection class to generate the object for.
18
+ * @param options - Options for generating the object.
19
+ * @returns A string containing the TypeScript object definition.
20
+ */
21
+ declare function generateObjectDeclaration<T extends Record<string, any>>(reflection: ReflectionClass<T>, options?: GenerateObjectDeclarationOptions<T>): string;
22
+ declare type __ΩGenerateInterfaceDeclarationOptions = any[];
23
+ declare type __ΩGenerateObjectDeclarationOptions = any[];
24
+ //#endregion
25
+ export { GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, __ΩGenerateInterfaceDeclarationOptions, __ΩGenerateObjectDeclarationOptions, generateObjectDeclaration };
26
+ //# sourceMappingURL=typescript.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.d.mts","names":[],"sources":["../../src/helpers/typescript.ts"],"mappings":";;;UAwBiB,mCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;AAAA,UAqJT,gCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;;;;;AAH1B;;;iBAagB,yBAAA,WAAoC,MAAA,cAAA,CAClD,UAAA,EAAY,eAAA,CAAgB,CAAA,GAC5B,OAAA,GAAS,gCAAA,CAAiC,CAAA;AAAA"}
@@ -0,0 +1,46 @@
1
+ import { stringifyValue } from "@powerlines/deepkit/utilities";
2
+ import { camelCase } from "@stryke/string-format/camel-case";
3
+ import { titleCase } from "@stryke/string-format/title-case";
4
+ import { isUndefined } from "@stryke/type-checks/is-undefined";
5
+
6
+ //#region src/helpers/typescript.ts
7
+ /**
8
+ * Generates a TypeScript object for the given reflection class.
9
+ *
10
+ * @param reflection - The reflection class to generate the object for.
11
+ * @param options - Options for generating the object.
12
+ * @returns A string containing the TypeScript object definition.
13
+ */
14
+ function generateObjectDeclaration(reflection, options = {}) {
15
+ if (!reflection) return "";
16
+ return `
17
+ /**
18
+ * ${reflection.getDescription() || `${titleCase(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`}.
19
+ */
20
+ export const ${camelCase(options.overrideName || reflection.getName())}${options.overrideExtends !== false && (options.overrideExtends || reflection.getSuperReflectionClass()?.getName()) ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}` : ""} = {
21
+ ${reflection.getProperties().filter((item) => !item.isIgnored() && !isUndefined(options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
22
+ if (isUndefined(ret) && !isUndefined(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
23
+ return ret;
24
+ }, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1).map((item) => ` /**
25
+ * ${item.getDescription() || item.getTitle() || titleCase(item.getNameAsString())}
26
+ *
27
+ * @title ${item.getTitle() || titleCase(item.getNameAsString())}${item.getAlias().length ? `
28
+ ${item.getAlias().map((alias) => ` * @alias ${alias}`).join("\n")}` : ""}${item.getDomain() ? `
29
+ * @domain ${item.getDomain()}` : ""}${item.getPermission().length ? `
30
+ ${item.getPermission().map((permission) => ` * @permission ${permission}`).join("\n")}` : ""}${item.isInternal() ? `
31
+ * @internal` : ""}${item.isReadonly() ? `
32
+ * @readonly` : ""}${item.isIgnored() ? `
33
+ * @ignored` : ""}${item.isHidden() ? `
34
+ * @hidden` : ""}
35
+ */
36
+ ${item.getNameAsString()}: ${stringifyValue(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
37
+ if (isUndefined(ret) && !isUndefined(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
38
+ return ret;
39
+ }, void 0) ?? item.getDefaultValue())}`).join(", \n")}
40
+ };
41
+ `;
42
+ }
43
+
44
+ //#endregion
45
+ export { generateObjectDeclaration };
46
+ //# sourceMappingURL=typescript.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.mjs","names":[],"sources":["../../src/helpers/typescript.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 { stringifyValue } from \"@powerlines/deepkit/utilities\";\nimport type { ReflectionClass } from \"@powerlines/deepkit/vendor/type\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\n\nexport interface GenerateInterfaceDeclarationOptions<T> {\n overrideName?: string;\n overrideExtends?: string | false;\n defaultValues?: Partial<T>;\n}\n\n// /**\n// * Generates a TypeScript interface for the given reflection class.\n// *\n// * @param reflection - The reflection class to generate the interface for.\n// * @returns A string containing the TypeScript interface definition.\n// */\n// export function InterfaceDeclaration<T>(\n// reflection: ReflectionClass<T>,\n// options: GenerateInterfaceDeclarationOptions<T> = {}\n// ): string {\n// if (!reflection) {\n// return \"\";\n// }\n\n// return `\n// /**\n// * Interface for ${reflection.getTitle() || titleCase(options.overrideName || reflection.getName())}.\n// *\n// * @title ${reflection.getTitle() || titleCase(reflection.getName())}${\n// reflection.getAlias().length\n// ? ` ${reflection\n// .getAlias()\n// .map(alias => ` * @alias ${alias}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${reflection.getDomain() ? ` * @domain ${reflection.getDomain()}` : \"\"}${\n// reflection.getPermission().length\n// ? `\n// ${reflection\n// .getPermission()\n// .map(permission => ` * @permission ${permission}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${\n// reflection.isInternal()\n// ? `\n// * @internal`\n// : \"\"\n// }${\n// reflection.isReadonly()\n// ? `\n// * @readonly`\n// : \"\"\n// }${\n// reflection.isIgnored()\n// ? `\n// * @ignored`\n// : \"\"\n// }${\n// reflection.isHidden()\n// ? `\n// * @hidden`\n// : \"\"\n// }\n// */\n// export interface ${pascalCase(options.overrideName || reflection.getName())}${\n// options.overrideExtends !== false &&\n// (options.overrideExtends || reflection.getSuperReflectionClass()?.getName())\n// ? ` extends ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}`\n// : \"\"\n// } {\n// ${reflection\n// .getProperties()\n// .filter(item => !item.isIgnored())\n// .sort((a, b) =>\n// (a.isReadonly() && b.isReadonly()) || (!a.isReadonly() && !b.isReadonly())\n// ? a.getNameAsString().localeCompare(b.getNameAsString())\n// : a.isReadonly()\n// ? 1\n// : -1\n// )\n// .map(\n// item =>\n// ` /**\n// * ${\n// item.getDescription() ||\n// item.getTitle() ||\n// titleCase(item.getNameAsString())\n// }\n// *\n// * @title ${item.getTitle() || titleCase(item.getNameAsString())}${\n// item.getAlias().length\n// ? `\n// ${item\n// .getAlias()\n// .map(alias => ` * @alias ${alias}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${\n// item.getDomain()\n// ? `\n// * @domain ${item.getDomain()}`\n// : \"\"\n// }${\n// item.getPermission().length\n// ? `\n// ${item\n// .getPermission()\n// .map(permission => ` * @permission ${permission}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${\n// !isUndefined(item.getDefaultValue()) && item.getDefaultValue() !== \"\"\n// ? `\n// * @defaultValue ${item.getDefaultValue()}`\n// : \"\"\n// }${\n// item.isInternal()\n// ? `\n// * @internal`\n// : \"\"\n// }${\n// item.isReadonly()\n// ? `\n// * @readonly`\n// : \"\"\n// }${\n// item.isHidden()\n// ? `\n// * @hidden`\n// : \"\"\n// }\n// */\n// ${item.isReadonly() ? \"readonly \" : \"\"}${item.getNameAsString()}${\n// isUndefined(\n// (options.defaultValues as Record<string, any>)?.[item.getNameAsString()]\n// ) &&\n// isUndefined(item.getDefaultValue()) &&\n// !item\n// .getAlias()\n// .some(\n// alias =>\n// !isUndefined(\n// (options.defaultValues as Record<string, any>)?.[alias]\n// )\n// ) &&\n// item.isOptional()\n// ? \"?\"\n// : \"\"\n// }: ${stringifyType(item.getType())}`\n// )\n// .join(\", \\n\")}\n// }\n// `;\n// }\n\nexport interface GenerateObjectDeclarationOptions<T> {\n overrideName?: string;\n overrideExtends?: string | false;\n defaultValues?: Partial<T>;\n}\n\n/**\n * Generates a TypeScript object for the given reflection class.\n *\n * @param reflection - The reflection class to generate the object for.\n * @param options - Options for generating the object.\n * @returns A string containing the TypeScript object definition.\n */\nexport function generateObjectDeclaration<T extends Record<string, any>>(\n reflection: ReflectionClass<T>,\n options: GenerateObjectDeclarationOptions<T> = {}\n) {\n if (!reflection) {\n return \"\";\n }\n\n return `\n/**\n * ${\n reflection.getDescription() ||\n `${titleCase(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`\n }.\n */\nexport const ${camelCase(options.overrideName || reflection.getName())}${\n options.overrideExtends !== false &&\n (options.overrideExtends || reflection.getSuperReflectionClass()?.getName())\n ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}`\n : \"\"\n } = {\n ${reflection\n .getProperties()\n .filter(\n item =>\n !item.isIgnored() &&\n !isUndefined(\n options.defaultValues?.[item.getNameAsString()] ??\n item.getAlias().reduce((ret, alias) => {\n if (\n isUndefined(ret) &&\n !isUndefined(\n (options.defaultValues as Record<string, any>)?.[alias]\n )\n ) {\n return (options.defaultValues as Record<string, any>)?.[alias];\n }\n\n return ret;\n }, undefined) ??\n item.getDefaultValue()\n )\n )\n .sort((a, b) =>\n (a.isReadonly() && b.isReadonly()) || (!a.isReadonly() && !b.isReadonly())\n ? a.getNameAsString().localeCompare(b.getNameAsString())\n : a.isReadonly()\n ? 1\n : -1\n )\n .map(\n item =>\n ` /**\n * ${\n item.getDescription() ||\n item.getTitle() ||\n titleCase(item.getNameAsString())\n }\n *\n * @title ${item.getTitle() || titleCase(item.getNameAsString())}${\n item.getAlias().length\n ? `\n ${item\n .getAlias()\n .map(alias => ` * @alias ${alias}`)\n .join(\"\\n\")}`\n : \"\"\n }${\n item.getDomain()\n ? `\n * @domain ${item.getDomain()}`\n : \"\"\n }${\n item.getPermission().length\n ? `\n ${item\n .getPermission()\n .map(permission => ` * @permission ${permission}`)\n .join(\"\\n\")}`\n : \"\"\n }${\n item.isInternal()\n ? `\n * @internal`\n : \"\"\n }${\n item.isReadonly()\n ? `\n * @readonly`\n : \"\"\n }${\n item.isIgnored()\n ? `\n * @ignored`\n : \"\"\n }${\n item.isHidden()\n ? `\n * @hidden`\n : \"\"\n }\n */\n ${item.getNameAsString()}: ${stringifyValue(\n item.getType(),\n options.defaultValues?.[item.getNameAsString()] ??\n item.getAlias().reduce((ret, alias) => {\n if (\n isUndefined(ret) &&\n !isUndefined((options.defaultValues as Record<string, any>)?.[alias])\n ) {\n return (options.defaultValues as Record<string, any>)?.[alias];\n }\n\n return ret;\n }, undefined) ??\n item.getDefaultValue()\n )}`\n )\n .join(\", \\n\")}\n};\n`;\n}\n"],"mappings":";;;;;;;;;;;;;AA6LA,SAAgB,0BACd,YACA,UAA+C,EAAE,EACjD;AACA,KAAI,CAAC,WACH,QAAO;AAGT,QAAO;;KAGN,WAAW,gBAAgB,IAC3B,GAAG,UAAU,QAAQ,gBAAgB,WAAW,cAAc,IAAI,WAAW,SAAS,CAAC,CAAC,kBACzF;;eAEa,UAAU,QAAQ,gBAAgB,WAAW,SAAS,CAAC,GAClE,QAAQ,oBAAoB,UAC3B,QAAQ,mBAAmB,WAAW,yBAAyB,EAAE,SAAS,IACvE,KAAK,QAAQ,mBAAmB,WAAW,yBAAyB,EAAE,SAAS,KAC/E,GACL;IACC,WACC,eAAe,CACf,QACC,SACE,CAAC,KAAK,WAAW,IACjB,CAAC,YACC,QAAQ,gBAAgB,KAAK,iBAAiB,KAC5C,KAAK,UAAU,CAAC,QAAQ,KAAK,UAAU;AACrC,MACE,YAAY,IAAI,IAChB,CAAC,YACE,QAAQ,gBAAwC,OAClD,CAED,QAAQ,QAAQ,gBAAwC;AAG1D,SAAO;IACN,OAAU,IACb,KAAK,iBAAiB,CACzB,CACJ,CACA,MAAM,GAAG,MACP,EAAE,YAAY,IAAI,EAAE,YAAY,IAAM,CAAC,EAAE,YAAY,IAAI,CAAC,EAAE,YAAY,GACrE,EAAE,iBAAiB,CAAC,cAAc,EAAE,iBAAiB,CAAC,GACtD,EAAE,YAAY,GACZ,IACA,GACP,CACA,KACC,SACE;MAEJ,KAAK,gBAAgB,IACrB,KAAK,UAAU,IACf,UAAU,KAAK,iBAAiB,CAAC,CAClC;;aAEU,KAAK,UAAU,IAAI,UAAU,KAAK,iBAAiB,CAAC,GAC7D,KAAK,UAAU,CAAC,SACZ;IACJ,KACC,UAAU,CACV,KAAI,UAAS,aAAa,QAAQ,CAClC,KAAK,KAAK,KACP,KAEJ,KAAK,WAAW,GACZ;cACM,KAAK,WAAW,KACtB,KAEJ,KAAK,eAAe,CAAC,SACjB;IACJ,KACC,eAAe,CACf,KAAI,eAAc,mBAAmB,aAAa,CAClD,KAAK,KAAK,KACP,KAEJ,KAAK,YAAY,GACb;iBAEA,KAEJ,KAAK,YAAY,GACb;iBAEA,KAEJ,KAAK,WAAW,GACZ;gBAEA,KAEJ,KAAK,UAAU,GACX;eAEA,GACL;;IAEC,KAAK,iBAAiB,CAAC,IAAI,eAC3B,KAAK,SAAS,EACd,QAAQ,gBAAgB,KAAK,iBAAiB,KAC5C,KAAK,UAAU,CAAC,QAAQ,KAAK,UAAU;AACrC,MACE,YAAY,IAAI,IAChB,CAAC,YAAa,QAAQ,gBAAwC,OAAO,CAErE,QAAQ,QAAQ,gBAAwC;AAG1D,SAAO;IACN,OAAU,IACb,KAAK,iBAAiB,CACzB,GACE,CACA,KAAK,OAAO,CAAC"}
package/dist/index.cjs ADDED
@@ -0,0 +1,48 @@
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ let _powerlines_plugin_babel = require("@powerlines/plugin-babel");
4
+ _powerlines_plugin_babel = require_runtime.__toESM(_powerlines_plugin_babel);
5
+ let _stryke_json_storm_json = require("@stryke/json/storm-json");
6
+ let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
7
+
8
+ //#region src/index.tsx
9
+ /**
10
+ * Alloy-js plugin for Powerlines.
11
+ *
12
+ * @param options - The Alloy-js plugin user configuration options.
13
+ * @returns A Powerlines plugin that integrates Alloy-js transformations.
14
+ */
15
+ const plugin = (options = {}) => {
16
+ return [(0, _powerlines_plugin_babel.default)(), {
17
+ name: "alloy",
18
+ config() {
19
+ this.debug("Updating configuration options to support Alloy-js builds.");
20
+ return {
21
+ alloy: {
22
+ typescript: true,
23
+ ...options
24
+ },
25
+ babel: { presets: [[
26
+ "@alloy-js/babel-preset",
27
+ {},
28
+ (_, id) => (0, _stryke_path_file_path_fns.findFileExtension)(id) === "tsx" || (0, _stryke_path_file_path_fns.findFileExtension)(id) === "jsx"
29
+ ]] },
30
+ tsdown: { inputOptions: { transform: { jsx: "preserve" } } },
31
+ resolve: { external: [/^@alloy-js\//] }
32
+ };
33
+ },
34
+ async configResolved() {
35
+ this.debug("Ensuring TypeScript configuration is set up for Alloy-js.");
36
+ if (this.tsconfig.tsconfigJson.compilerOptions?.jsx !== "preserve" || this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !== "@alloy-js/core") {
37
+ this.tsconfig.tsconfigJson.compilerOptions ??= {};
38
+ if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== "preserve") this.tsconfig.tsconfigJson.compilerOptions.jsx = "preserve";
39
+ if (this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !== "@alloy-js/core") this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource = "@alloy-js/core";
40
+ await this.fs.write(this.tsconfig.tsconfigFilePath, _stryke_json_storm_json.StormJSON.stringify(this.tsconfig.tsconfigJson));
41
+ }
42
+ }
43
+ }];
44
+ };
45
+
46
+ //#endregion
47
+ exports.default = plugin;
48
+ exports.plugin = plugin;
@@ -0,0 +1,19 @@
1
+ import { AlloyPluginContext, AlloyPluginOptions } from "./types/plugin.cjs";
2
+ import { Plugin } from "powerlines";
3
+
4
+ //#region src/index.d.ts
5
+ declare module "powerlines" {
6
+ interface Config {
7
+ alloy?: AlloyPluginOptions;
8
+ }
9
+ }
10
+ /**
11
+ * Alloy-js plugin for Powerlines.
12
+ *
13
+ * @param options - The Alloy-js plugin user configuration options.
14
+ * @returns A Powerlines plugin that integrates Alloy-js transformations.
15
+ */
16
+ declare const plugin: <TContext extends AlloyPluginContext = AlloyPluginContext>(options?: AlloyPluginOptions) => Plugin<TContext>[];
17
+ //#endregion
18
+ export { plugin as default, plugin };
19
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;YAyBY,MAAA;IACR,KAAA,GAAQ,kBAAA;EAAA;AAAA;;;;;;;cAUC,MAAA,oBACM,kBAAA,GAAqB,kBAAA,EAEtC,OAAA,GAAS,kBAAA,KAoEJ,MAAA,CAAO,QAAA"}
@@ -0,0 +1,19 @@
1
+ import { AlloyPluginContext, AlloyPluginOptions } from "./types/plugin.mjs";
2
+ import { Plugin } from "powerlines";
3
+
4
+ //#region src/index.d.ts
5
+ declare module "powerlines" {
6
+ interface Config {
7
+ alloy?: AlloyPluginOptions;
8
+ }
9
+ }
10
+ /**
11
+ * Alloy-js plugin for Powerlines.
12
+ *
13
+ * @param options - The Alloy-js plugin user configuration options.
14
+ * @returns A Powerlines plugin that integrates Alloy-js transformations.
15
+ */
16
+ declare const plugin: <TContext extends AlloyPluginContext = AlloyPluginContext>(options?: AlloyPluginOptions) => Plugin<TContext>[];
17
+ //#endregion
18
+ export { plugin as default, plugin };
19
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;YAyBY,MAAA;IACR,KAAA,GAAQ,kBAAA;EAAA;AAAA;;;;;;;cAUC,MAAA,oBACM,kBAAA,GAAqB,kBAAA,EAEtC,OAAA,GAAS,kBAAA,KAoEJ,MAAA,CAAO,QAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,45 @@
1
+ import babel from "@powerlines/plugin-babel";
2
+ import { StormJSON } from "@stryke/json/storm-json";
3
+ import { findFileExtension } from "@stryke/path/file-path-fns";
4
+
5
+ //#region src/index.tsx
6
+ /**
7
+ * Alloy-js plugin for Powerlines.
8
+ *
9
+ * @param options - The Alloy-js plugin user configuration options.
10
+ * @returns A Powerlines plugin that integrates Alloy-js transformations.
11
+ */
12
+ const plugin = (options = {}) => {
13
+ return [babel(), {
14
+ name: "alloy",
15
+ config() {
16
+ this.debug("Updating configuration options to support Alloy-js builds.");
17
+ return {
18
+ alloy: {
19
+ typescript: true,
20
+ ...options
21
+ },
22
+ babel: { presets: [[
23
+ "@alloy-js/babel-preset",
24
+ {},
25
+ (_, id) => findFileExtension(id) === "tsx" || findFileExtension(id) === "jsx"
26
+ ]] },
27
+ tsdown: { inputOptions: { transform: { jsx: "preserve" } } },
28
+ resolve: { external: [/^@alloy-js\//] }
29
+ };
30
+ },
31
+ async configResolved() {
32
+ this.debug("Ensuring TypeScript configuration is set up for Alloy-js.");
33
+ if (this.tsconfig.tsconfigJson.compilerOptions?.jsx !== "preserve" || this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !== "@alloy-js/core") {
34
+ this.tsconfig.tsconfigJson.compilerOptions ??= {};
35
+ if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== "preserve") this.tsconfig.tsconfigJson.compilerOptions.jsx = "preserve";
36
+ if (this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !== "@alloy-js/core") this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource = "@alloy-js/core";
37
+ await this.fs.write(this.tsconfig.tsconfigFilePath, StormJSON.stringify(this.tsconfig.tsconfigJson));
38
+ }
39
+ }
40
+ }];
41
+ };
42
+
43
+ //#endregion
44
+ export { plugin as default, plugin };
45
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.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 babel from \"@powerlines/plugin-babel\";\nimport { StormJSON } from \"@stryke/json/storm-json\";\nimport { findFileExtension } from \"@stryke/path/file-path-fns\";\nimport type { Plugin } from \"powerlines\";\nimport type { AlloyPluginContext, AlloyPluginOptions } from \"./types/plugin\";\n\ndeclare module \"powerlines\" {\n interface Config {\n alloy?: AlloyPluginOptions;\n }\n}\n\n/**\n * Alloy-js plugin for Powerlines.\n *\n * @param options - The Alloy-js plugin user configuration options.\n * @returns A Powerlines plugin that integrates Alloy-js transformations.\n */\nexport const plugin = <\n TContext extends AlloyPluginContext = AlloyPluginContext\n>(\n options: AlloyPluginOptions = {}\n) => {\n return [\n babel(),\n {\n name: \"alloy\",\n config() {\n this.debug(\n \"Updating configuration options to support Alloy-js builds.\"\n );\n\n return {\n alloy: {\n typescript: true,\n ...options\n },\n babel: {\n presets: [\n [\n \"@alloy-js/babel-preset\",\n {},\n (_: string, id: string) =>\n findFileExtension(id) === \"tsx\" ||\n findFileExtension(id) === \"jsx\"\n ]\n ]\n },\n tsdown: {\n inputOptions: {\n transform: {\n jsx: \"preserve\"\n }\n }\n },\n resolve: {\n external: [/^@alloy-js\\//]\n }\n };\n },\n async configResolved() {\n this.debug(\"Ensuring TypeScript configuration is set up for Alloy-js.\");\n\n if (\n this.tsconfig.tsconfigJson.compilerOptions?.jsx !== \"preserve\" ||\n this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !==\n \"@alloy-js/core\"\n ) {\n this.tsconfig.tsconfigJson.compilerOptions ??= {};\n\n if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== \"preserve\") {\n this.tsconfig.tsconfigJson.compilerOptions.jsx = \"preserve\";\n }\n\n if (\n this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !==\n \"@alloy-js/core\"\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource =\n \"@alloy-js/core\";\n }\n\n await this.fs.write(\n this.tsconfig.tsconfigFilePath,\n StormJSON.stringify(this.tsconfig.tsconfigJson)\n );\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAmCA,MAAE,UAAA,UAAA,EAAA,KAAA;AACF,QAAO,CAAA,OAAM,EAAM;EACjB,MAAQ;EACT,SAAA;AACC,QAAS,MAAA,6DAAsB;AAC5B,UAAA;IACG,OAAC;KACC,YAAC;KACP,GAAA;KACE;IACA,OAAS,EACP,SAAU,CAAA;KAAA;KAAA,EAAA;MAAA,GAAA,OAAA,kBAAA,GAAA,KAAA,SAAA,kBAAA,GAAA,KAAA;KAAA,CAAA,EACT;IACD,QAAC,kBAED,WAAO,EACL,KAAO,YACL,EACD,EACF;IACD,SAAS,EACP,UAAU,CAAC,eAAA,EACZ;IACF;;EAEH,MAAM,iBAAiB;AACrB,QAAK,MAAM,4DAAkC;AAC7C,OAAI,KAAK,SAAG,aAAkB,iBAAY,QAAA,cAAA,KAAA,SAAA,aAAA,iBAAA,oBAAA,kBAAA;AACxC,SAAK,SAAC,aAAA,oBAAA,EAAA;AACN,QAAI,KAAA,SAAA,aAAA,gBAAA,QAAA,WACF,MAAC,SAAA,aAAA,gBAAA,MAAA;AAEH,QAAI,KAAA,SAAc,aAAA,gBAAA,oBAAA,iBAChB,MAAI,SAAU,aAAC,gBAAA,kBAAA;AAEjB,UAAM,KAAA,GAAA,MAAA,KAAA,SAAA,kBAAA,UAAA,UAAA,KAAA,SAAA,aAAA,CAAA;;;EAGX,CAAC"}
@@ -0,0 +1,29 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
+ let _alloy_js_core = require("@alloy-js/core");
5
+
6
+ //#region src/markdown/components/front-matter.tsx
7
+ /**
8
+ * Renders YAML front matter for a markdown file.
9
+ *
10
+ * @see https://jekyllrb.com/docs/front-matter/
11
+ */
12
+ function FrontMatter(props) {
13
+ return [
14
+ "---",
15
+ (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
16
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
17
+ get each() {
18
+ return Object.entries(props.data);
19
+ },
20
+ hardline: true,
21
+ children: ([key, value]) => _alloy_js_core.code`${key}: ${JSON.stringify(value)}`
22
+ }),
23
+ "---",
24
+ (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
25
+ ];
26
+ }
27
+
28
+ //#endregion
29
+ exports.FrontMatter = FrontMatter;
@@ -0,0 +1,16 @@
1
+ import * as _alloy_js_core0 from "@alloy-js/core";
2
+
3
+ //#region src/markdown/components/front-matter.d.ts
4
+ interface FrontMatterProps {
5
+ data: Record<string, any>;
6
+ }
7
+ /**
8
+ * Renders YAML front matter for a markdown file.
9
+ *
10
+ * @see https://jekyllrb.com/docs/front-matter/
11
+ */
12
+ declare function FrontMatter(props: FrontMatterProps): _alloy_js_core0.Children;
13
+ declare type __ΩFrontMatterProps = any[];
14
+ //#endregion
15
+ export { FrontMatter, FrontMatterProps, __ΩFrontMatterProps };
16
+ //# sourceMappingURL=front-matter.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"front-matter.d.cts","names":[],"sources":["../../../src/markdown/components/front-matter.tsx"],"mappings":";;;UAoBiB,gBAAA;EACf,IAAA,EAAM,MAAA;AAAA;AADR;;;;;AAAA,iBASgB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,eAAA,CAAA,QAAA;AAAA"}
@@ -0,0 +1,16 @@
1
+ import * as _alloy_js_core0 from "@alloy-js/core";
2
+
3
+ //#region src/markdown/components/front-matter.d.ts
4
+ interface FrontMatterProps {
5
+ data: Record<string, any>;
6
+ }
7
+ /**
8
+ * Renders YAML front matter for a markdown file.
9
+ *
10
+ * @see https://jekyllrb.com/docs/front-matter/
11
+ */
12
+ declare function FrontMatter(props: FrontMatterProps): _alloy_js_core0.Children;
13
+ declare type __ΩFrontMatterProps = any[];
14
+ //#endregion
15
+ export { FrontMatter, FrontMatterProps, __ΩFrontMatterProps };
16
+ //# sourceMappingURL=front-matter.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"front-matter.d.mts","names":[],"sources":["../../../src/markdown/components/front-matter.tsx"],"mappings":";;;UAoBiB,gBAAA;EACf,IAAA,EAAM,MAAA;AAAA;AADR;;;;;AAAA,iBASgB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,eAAA,CAAA,QAAA;AAAA"}
@@ -0,0 +1,28 @@
1
+ import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
+ import { For, code } from "@alloy-js/core";
3
+
4
+ //#region src/markdown/components/front-matter.tsx
5
+ /**
6
+ * Renders YAML front matter for a markdown file.
7
+ *
8
+ * @see https://jekyllrb.com/docs/front-matter/
9
+ */
10
+ function FrontMatter(props) {
11
+ return [
12
+ "---",
13
+ createIntrinsic("hbr", {}),
14
+ createComponent(For, {
15
+ get each() {
16
+ return Object.entries(props.data);
17
+ },
18
+ hardline: true,
19
+ children: ([key, value]) => code`${key}: ${JSON.stringify(value)}`
20
+ }),
21
+ "---",
22
+ createIntrinsic("hbr", {})
23
+ ];
24
+ }
25
+
26
+ //#endregion
27
+ export { FrontMatter };
28
+ //# sourceMappingURL=front-matter.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"front-matter.mjs","names":[],"sources":["../../../src/markdown/components/front-matter.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, For } from \"@alloy-js/core\";\n\nexport interface FrontMatterProps {\n data: Record<string, any>;\n}\n\n/**\n * Renders YAML front matter for a markdown file.\n *\n * @see https://jekyllrb.com/docs/front-matter/\n */\nexport function FrontMatter(props: FrontMatterProps) {\n return (\n <>\n {\"---\"}\n <hbr />\n <For each={Object.entries(props.data)} hardline>\n {([key, value]) => code`${key}: ${JSON.stringify(value)}`}\n </For>\n {\"---\"}\n <hbr />\n </>\n );\n}\n"],"mappings":";;;;;;;;;AA6BA,SAAgB,YAAY,OAAyB;AACnD,QAAO;EAAA;EAAA,gBAAA,OAAA,EAAA,CAAA;EAAA,gBAAA,KAAA;GACL,IAAC,OAAA;AACC,WAAM,OAAA,QAAA,MAAA,KAAA;;GAER,UAAO;GACP,WAAW,CAAC,KAAK,WAAW,IAAE,GAAK,IAAG,IAAK,KAAA,UAAe,MAAG;GAC9D,CAAC;EAAE;EAAK,gBAAA,OAAA,EAAA,CAAA;EAAA"}
@@ -0,0 +1,11 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_markdown_components_front_matter = require('./front-matter.cjs');
3
+ const require_markdown_components_markdown_file = require('./markdown-file.cjs');
4
+ const require_markdown_components_markdown_table = require('./markdown-table.cjs');
5
+
6
+ exports.FrontMatter = require_markdown_components_front_matter.FrontMatter;
7
+ exports.MarkdownFile = require_markdown_components_markdown_file.MarkdownFile;
8
+ exports.MarkdownFileHeader = require_markdown_components_markdown_file.MarkdownFileHeader;
9
+ exports.MarkdownTable = require_markdown_components_markdown_table.MarkdownTable;
10
+ exports.MarkdownTableColumn = require_markdown_components_markdown_table.MarkdownTableColumn;
11
+ exports.MarkdownTableColumnHeader = require_markdown_components_markdown_table.MarkdownTableColumnHeader;
@@ -0,0 +1,4 @@
1
+ import { FrontMatter, FrontMatterProps, __ΩFrontMatterProps } from "./front-matter.cjs";
2
+ import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps } from "./markdown-file.cjs";
3
+ import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps } from "./markdown-table.cjs";
4
+ export { FrontMatter, FrontMatterProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩFrontMatterProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps };
@@ -0,0 +1,4 @@
1
+ import { FrontMatter, FrontMatterProps, __ΩFrontMatterProps } from "./front-matter.mjs";
2
+ import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps } from "./markdown-file.mjs";
3
+ import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps } from "./markdown-table.mjs";
4
+ export { FrontMatter, FrontMatterProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩFrontMatterProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps };
@@ -0,0 +1,5 @@
1
+ import { FrontMatter } from "./front-matter.mjs";
2
+ import { MarkdownFile, MarkdownFileHeader } from "./markdown-file.mjs";
3
+ import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader } from "./markdown-table.mjs";
4
+
5
+ export { FrontMatter, MarkdownFile, MarkdownFileHeader, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader };