@powerlines/plugin-alloy 0.25.34 → 0.25.36

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 (267) hide show
  1. package/dist/core/components/index.d.cts +5 -0
  2. package/dist/core/components/index.d.mts +5 -0
  3. package/dist/core/components/output.d.cts +24 -0
  4. package/dist/core/components/output.d.cts.map +1 -0
  5. package/dist/core/components/output.d.mts +24 -0
  6. package/dist/core/components/output.d.mts.map +1 -0
  7. package/dist/core/components/output.mjs +2 -1
  8. package/dist/core/components/output.mjs.map +1 -0
  9. package/dist/core/components/single-line-comment.d.cts +23 -0
  10. package/dist/core/components/single-line-comment.d.cts.map +1 -0
  11. package/dist/core/components/single-line-comment.d.mts +23 -0
  12. package/dist/core/components/single-line-comment.d.mts.map +1 -0
  13. package/dist/core/components/single-line-comment.mjs +2 -1
  14. package/dist/core/components/single-line-comment.mjs.map +1 -0
  15. package/dist/core/components/source-file.d.cts +33 -0
  16. package/dist/core/components/source-file.d.cts.map +1 -0
  17. package/dist/core/components/source-file.d.mts +33 -0
  18. package/dist/core/components/source-file.d.mts.map +1 -0
  19. package/dist/core/components/source-file.mjs +2 -1
  20. package/dist/core/components/source-file.mjs.map +1 -0
  21. package/dist/core/components/spacing.d.cts +24 -0
  22. package/dist/core/components/spacing.d.cts.map +1 -0
  23. package/dist/core/components/spacing.d.mts +24 -0
  24. package/dist/core/components/spacing.d.mts.map +1 -0
  25. package/dist/core/components/spacing.mjs +2 -1
  26. package/dist/core/components/spacing.mjs.map +1 -0
  27. package/dist/core/contexts/context.d.cts +29 -0
  28. package/dist/core/contexts/context.d.cts.map +1 -0
  29. package/dist/core/contexts/context.d.mts +29 -0
  30. package/dist/core/contexts/context.d.mts.map +1 -0
  31. package/dist/core/contexts/context.mjs +2 -1
  32. package/dist/core/contexts/context.mjs.map +1 -0
  33. package/dist/core/contexts/index.d.cts +4 -0
  34. package/dist/core/contexts/index.d.mts +4 -0
  35. package/dist/core/contexts/meta.d.cts +48 -0
  36. package/dist/core/contexts/meta.d.cts.map +1 -0
  37. package/dist/core/contexts/meta.d.mts +48 -0
  38. package/dist/core/contexts/meta.d.mts.map +1 -0
  39. package/dist/core/contexts/meta.mjs +2 -1
  40. package/dist/core/contexts/meta.mjs.map +1 -0
  41. package/dist/core/contexts/reflection.d.cts +53 -0
  42. package/dist/core/contexts/reflection.d.cts.map +1 -0
  43. package/dist/core/contexts/reflection.d.mts +53 -0
  44. package/dist/core/contexts/reflection.d.mts.map +1 -0
  45. package/dist/core/contexts/reflection.mjs +2 -1
  46. package/dist/core/contexts/reflection.mjs.map +1 -0
  47. package/dist/core/helpers/code.d.cts +29 -0
  48. package/dist/core/helpers/code.d.cts.map +1 -0
  49. package/dist/core/helpers/code.d.mts +29 -0
  50. package/dist/core/helpers/code.d.mts.map +1 -0
  51. package/dist/core/helpers/code.mjs +2 -1
  52. package/dist/core/helpers/code.mjs.map +1 -0
  53. package/dist/core/helpers/index.d.cts +2 -0
  54. package/dist/core/helpers/index.d.mts +2 -0
  55. package/dist/core/index.d.cts +9 -0
  56. package/dist/core/index.d.mts +9 -0
  57. package/dist/helpers/capnp.d.cts +87 -0
  58. package/dist/helpers/capnp.d.cts.map +1 -0
  59. package/dist/helpers/capnp.d.mts +87 -0
  60. package/dist/helpers/capnp.d.mts.map +1 -0
  61. package/dist/helpers/capnp.mjs +2 -1
  62. package/dist/helpers/capnp.mjs.map +1 -0
  63. package/dist/helpers/create-builtin.d.cts +16 -0
  64. package/dist/helpers/create-builtin.d.cts.map +1 -0
  65. package/dist/helpers/create-builtin.d.mts +16 -0
  66. package/dist/helpers/create-builtin.d.mts.map +1 -0
  67. package/dist/helpers/create-builtin.mjs +2 -1
  68. package/dist/helpers/create-builtin.mjs.map +1 -0
  69. package/dist/helpers/index.d.cts +5 -0
  70. package/dist/helpers/index.d.mts +5 -0
  71. package/dist/helpers/refkey.d.cts +13 -0
  72. package/dist/helpers/refkey.d.cts.map +1 -0
  73. package/dist/helpers/refkey.d.mts +13 -0
  74. package/dist/helpers/refkey.d.mts.map +1 -0
  75. package/dist/helpers/refkey.mjs +2 -1
  76. package/dist/helpers/refkey.mjs.map +1 -0
  77. package/dist/helpers/typescript.d.cts +26 -0
  78. package/dist/helpers/typescript.d.cts.map +1 -0
  79. package/dist/helpers/typescript.d.mts +26 -0
  80. package/dist/helpers/typescript.d.mts.map +1 -0
  81. package/dist/helpers/typescript.mjs +2 -1
  82. package/dist/helpers/typescript.mjs.map +1 -0
  83. package/dist/index.cjs +6 -1
  84. package/dist/index.d.cts +19 -0
  85. package/dist/index.d.cts.map +1 -0
  86. package/dist/index.d.mts +19 -0
  87. package/dist/index.d.mts.map +1 -0
  88. package/dist/index.mjs +8 -2
  89. package/dist/index.mjs.map +1 -0
  90. package/dist/markdown/components/front-matter.d.cts +16 -0
  91. package/dist/markdown/components/front-matter.d.cts.map +1 -0
  92. package/dist/markdown/components/front-matter.d.mts +16 -0
  93. package/dist/markdown/components/front-matter.d.mts.map +1 -0
  94. package/dist/markdown/components/front-matter.mjs +2 -1
  95. package/dist/markdown/components/front-matter.mjs.map +1 -0
  96. package/dist/markdown/components/index.d.cts +4 -0
  97. package/dist/markdown/components/index.d.mts +4 -0
  98. package/dist/markdown/components/markdown-file.d.cts +29 -0
  99. package/dist/markdown/components/markdown-file.d.cts.map +1 -0
  100. package/dist/markdown/components/markdown-file.d.mts +29 -0
  101. package/dist/markdown/components/markdown-file.d.mts.map +1 -0
  102. package/dist/markdown/components/markdown-file.mjs +2 -1
  103. package/dist/markdown/components/markdown-file.mjs.map +1 -0
  104. package/dist/markdown/components/markdown-table.d.cts +28 -0
  105. package/dist/markdown/components/markdown-table.d.cts.map +1 -0
  106. package/dist/markdown/components/markdown-table.d.mts +28 -0
  107. package/dist/markdown/components/markdown-table.d.mts.map +1 -0
  108. package/dist/markdown/components/markdown-table.mjs +2 -1
  109. package/dist/markdown/components/markdown-table.mjs.map +1 -0
  110. package/dist/markdown/contexts/index.d.cts +2 -0
  111. package/dist/markdown/contexts/index.d.mts +2 -0
  112. package/dist/markdown/contexts/markdown-table.d.cts +38 -0
  113. package/dist/markdown/contexts/markdown-table.d.cts.map +1 -0
  114. package/dist/markdown/contexts/markdown-table.d.mts +38 -0
  115. package/dist/markdown/contexts/markdown-table.d.mts.map +1 -0
  116. package/dist/markdown/contexts/markdown-table.mjs +2 -1
  117. package/dist/markdown/contexts/markdown-table.mjs.map +1 -0
  118. package/dist/markdown/index.d.cts +5 -0
  119. package/dist/markdown/index.d.mts +5 -0
  120. package/dist/render.cjs +1 -1
  121. package/dist/render.d.cts +38 -0
  122. package/dist/render.d.cts.map +1 -0
  123. package/dist/render.d.mts +38 -0
  124. package/dist/render.d.mts.map +1 -0
  125. package/dist/render.mjs +3 -2
  126. package/dist/render.mjs.map +1 -0
  127. package/dist/types/components.d.cts +142 -0
  128. package/dist/types/components.d.cts.map +1 -0
  129. package/dist/types/components.d.mts +142 -0
  130. package/dist/types/components.d.mts.map +1 -0
  131. package/dist/types/index.d.cts +3 -0
  132. package/dist/types/index.d.mts +3 -0
  133. package/dist/types/plugin.d.cts +39 -0
  134. package/dist/types/plugin.d.cts.map +1 -0
  135. package/dist/types/plugin.d.mts +39 -0
  136. package/dist/types/plugin.d.mts.map +1 -0
  137. package/dist/typescript/components/builtin-file.cjs +1 -1
  138. package/dist/typescript/components/builtin-file.d.cts +35 -0
  139. package/dist/typescript/components/builtin-file.d.cts.map +1 -0
  140. package/dist/typescript/components/builtin-file.d.mts +35 -0
  141. package/dist/typescript/components/builtin-file.d.mts.map +1 -0
  142. package/dist/typescript/components/builtin-file.mjs +3 -2
  143. package/dist/typescript/components/builtin-file.mjs.map +1 -0
  144. package/dist/typescript/components/class-declaration.d.cts +145 -0
  145. package/dist/typescript/components/class-declaration.d.cts.map +1 -0
  146. package/dist/typescript/components/class-declaration.d.mts +145 -0
  147. package/dist/typescript/components/class-declaration.d.mts.map +1 -0
  148. package/dist/typescript/components/class-declaration.mjs +2 -1
  149. package/dist/typescript/components/class-declaration.mjs.map +1 -0
  150. package/dist/typescript/components/dynamic-import-statement.d.cts +33 -0
  151. package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -0
  152. package/dist/typescript/components/dynamic-import-statement.d.mts +33 -0
  153. package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -0
  154. package/dist/typescript/components/dynamic-import-statement.mjs +2 -1
  155. package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -0
  156. package/dist/typescript/components/entry-file.cjs +1 -1
  157. package/dist/typescript/components/entry-file.d.cts +28 -0
  158. package/dist/typescript/components/entry-file.d.cts.map +1 -0
  159. package/dist/typescript/components/entry-file.d.mts +28 -0
  160. package/dist/typescript/components/entry-file.d.mts.map +1 -0
  161. package/dist/typescript/components/entry-file.mjs +3 -2
  162. package/dist/typescript/components/entry-file.mjs.map +1 -0
  163. package/dist/typescript/components/index.d.cts +15 -0
  164. package/dist/typescript/components/index.d.mts +15 -0
  165. package/dist/typescript/components/infrastructure-file.cjs +1 -1
  166. package/dist/typescript/components/infrastructure-file.d.cts +21 -0
  167. package/dist/typescript/components/infrastructure-file.d.cts.map +1 -0
  168. package/dist/typescript/components/infrastructure-file.d.mts +21 -0
  169. package/dist/typescript/components/infrastructure-file.d.mts.map +1 -0
  170. package/dist/typescript/components/infrastructure-file.mjs +3 -2
  171. package/dist/typescript/components/infrastructure-file.mjs.map +1 -0
  172. package/dist/typescript/components/interface-declaration.d.cts +86 -0
  173. package/dist/typescript/components/interface-declaration.d.cts.map +1 -0
  174. package/dist/typescript/components/interface-declaration.d.mts +86 -0
  175. package/dist/typescript/components/interface-declaration.d.mts.map +1 -0
  176. package/dist/typescript/components/interface-declaration.mjs +2 -1
  177. package/dist/typescript/components/interface-declaration.mjs.map +1 -0
  178. package/dist/typescript/components/object-declaration.d.cts +30 -0
  179. package/dist/typescript/components/object-declaration.d.cts.map +1 -0
  180. package/dist/typescript/components/object-declaration.d.mts +30 -0
  181. package/dist/typescript/components/object-declaration.d.mts.map +1 -0
  182. package/dist/typescript/components/object-declaration.mjs +2 -1
  183. package/dist/typescript/components/object-declaration.mjs.map +1 -0
  184. package/dist/typescript/components/property-name.d.cts +24 -0
  185. package/dist/typescript/components/property-name.d.cts.map +1 -0
  186. package/dist/typescript/components/property-name.d.mts +24 -0
  187. package/dist/typescript/components/property-name.d.mts.map +1 -0
  188. package/dist/typescript/components/property-name.mjs +2 -1
  189. package/dist/typescript/components/property-name.mjs.map +1 -0
  190. package/dist/typescript/components/record-expression.d.cts +13 -0
  191. package/dist/typescript/components/record-expression.d.cts.map +1 -0
  192. package/dist/typescript/components/record-expression.d.mts +13 -0
  193. package/dist/typescript/components/record-expression.d.mts.map +1 -0
  194. package/dist/typescript/components/record-expression.mjs +2 -1
  195. package/dist/typescript/components/record-expression.mjs.map +1 -0
  196. package/dist/typescript/components/tsdoc-reflection.d.cts +44 -0
  197. package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -0
  198. package/dist/typescript/components/tsdoc-reflection.d.mts +44 -0
  199. package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -0
  200. package/dist/typescript/components/tsdoc-reflection.mjs +2 -1
  201. package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -0
  202. package/dist/typescript/components/tsdoc.d.cts +164 -0
  203. package/dist/typescript/components/tsdoc.d.cts.map +1 -0
  204. package/dist/typescript/components/tsdoc.d.mts +164 -0
  205. package/dist/typescript/components/tsdoc.d.mts.map +1 -0
  206. package/dist/typescript/components/tsdoc.mjs +2 -1
  207. package/dist/typescript/components/tsdoc.mjs.map +1 -0
  208. package/dist/typescript/components/type-declaration.d.cts +18 -0
  209. package/dist/typescript/components/type-declaration.d.cts.map +1 -0
  210. package/dist/typescript/components/type-declaration.d.mts +18 -0
  211. package/dist/typescript/components/type-declaration.d.mts.map +1 -0
  212. package/dist/typescript/components/type-declaration.mjs +2 -1
  213. package/dist/typescript/components/type-declaration.mjs.map +1 -0
  214. package/dist/typescript/components/type-parameters.d.cts +24 -0
  215. package/dist/typescript/components/type-parameters.d.cts.map +1 -0
  216. package/dist/typescript/components/type-parameters.d.mts +24 -0
  217. package/dist/typescript/components/type-parameters.d.mts.map +1 -0
  218. package/dist/typescript/components/type-parameters.mjs +2 -1
  219. package/dist/typescript/components/type-parameters.mjs.map +1 -0
  220. package/dist/typescript/components/typescript-file.cjs +4 -15
  221. package/dist/typescript/components/typescript-file.d.cts +50 -0
  222. package/dist/typescript/components/typescript-file.d.cts.map +1 -0
  223. package/dist/typescript/components/typescript-file.d.mts +50 -0
  224. package/dist/typescript/components/typescript-file.d.mts.map +1 -0
  225. package/dist/typescript/components/typescript-file.mjs +6 -16
  226. package/dist/typescript/components/typescript-file.mjs.map +1 -0
  227. package/dist/typescript/contexts/index.d.cts +2 -0
  228. package/dist/typescript/contexts/index.d.mts +2 -0
  229. package/dist/typescript/contexts/lexical-scope.d.cts +17 -0
  230. package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -0
  231. package/dist/typescript/contexts/lexical-scope.d.mts +17 -0
  232. package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -0
  233. package/dist/typescript/contexts/lexical-scope.mjs +2 -1
  234. package/dist/typescript/contexts/lexical-scope.mjs.map +1 -0
  235. package/dist/typescript/contexts/member-scope.d.cts +20 -0
  236. package/dist/typescript/contexts/member-scope.d.cts.map +1 -0
  237. package/dist/typescript/contexts/member-scope.d.mts +20 -0
  238. package/dist/typescript/contexts/member-scope.d.mts.map +1 -0
  239. package/dist/typescript/contexts/member-scope.mjs +2 -1
  240. package/dist/typescript/contexts/member-scope.mjs.map +1 -0
  241. package/dist/typescript/helpers/get-call-signature-props.d.cts +14 -0
  242. package/dist/typescript/helpers/get-call-signature-props.d.cts.map +1 -0
  243. package/dist/typescript/helpers/get-call-signature-props.d.mts +14 -0
  244. package/dist/typescript/helpers/get-call-signature-props.d.mts.map +1 -0
  245. package/dist/typescript/helpers/get-call-signature-props.mjs +2 -1
  246. package/dist/typescript/helpers/get-call-signature-props.mjs.map +1 -0
  247. package/dist/typescript/helpers/index.d.cts +3 -0
  248. package/dist/typescript/helpers/index.d.mts +3 -0
  249. package/dist/typescript/helpers/utilities.d.cts +11 -0
  250. package/dist/typescript/helpers/utilities.d.cts.map +1 -0
  251. package/dist/typescript/helpers/utilities.d.mts +11 -0
  252. package/dist/typescript/helpers/utilities.d.mts.map +1 -0
  253. package/dist/typescript/helpers/utilities.mjs +2 -1
  254. package/dist/typescript/helpers/utilities.mjs.map +1 -0
  255. package/dist/typescript/index.d.cts +18 -0
  256. package/dist/typescript/index.d.mts +18 -0
  257. package/dist/yaml/components/index.d.cts +2 -0
  258. package/dist/yaml/components/index.d.mts +2 -0
  259. package/dist/yaml/components/yaml-file.d.cts +34 -0
  260. package/dist/yaml/components/yaml-file.d.cts.map +1 -0
  261. package/dist/yaml/components/yaml-file.d.mts +34 -0
  262. package/dist/yaml/components/yaml-file.d.mts.map +1 -0
  263. package/dist/yaml/components/yaml-file.mjs +2 -1
  264. package/dist/yaml/components/yaml-file.mjs.map +1 -0
  265. package/dist/yaml/index.d.cts +2 -0
  266. package/dist/yaml/index.d.mts +2 -0
  267. package/package.json +5 -5
@@ -300,4 +300,5 @@ function TSDocContextMethod(props) {
300
300
  }
301
301
 
302
302
  //#endregion
303
- export { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty };
303
+ export { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty };
304
+ //# sourceMappingURL=tsdoc-reflection.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsdoc-reflection.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n childrenArray,\n code,\n computed,\n For,\n List,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n ReflectionClass,\n ReflectionKind,\n ReflectionMethod,\n ReflectionProperty,\n stringifyType\n} from \"@powerlines/deepkit/vendor/type\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport {\n useReflectionClass,\n useReflectionMethod,\n useReflectionProperty\n} from \"../../core/contexts/reflection\";\nimport {\n TSDoc,\n TSDocAttributesTags,\n TSDocParam,\n TSDocProps,\n TSDocReturns\n} from \"./tsdoc\";\n\nexport interface TSDocReflectionClassProps<\n T extends Record<string, any> = Record<string, any>\n> extends TSDocProps {\n reflection: ReflectionClass<T>;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection class. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about properties or methods of a class.\n */\nexport function TSDocReflectionClass<\n T extends Record<string, any> = Record<string, any>\n>(props: TSDocReflectionClassProps<T>) {\n const [{ children, heading, reflection }, rest] = splitProps(props, [\n \"heading\",\n \"children\",\n \"reflection\"\n ]);\n\n if (!isSetObject(reflection)) {\n return null;\n }\n\n const title = computed(\n () => reflection.getTitle() || titleCase(reflection.getName())\n );\n const computedHeading = computed(\n () => heading || reflection.getDescription() || title.value\n );\n\n const alias = computed(() => reflection.getAlias());\n const domain = computed(() => reflection.getDomain());\n const permission = computed(() => reflection.getPermission());\n const readonly = computed(() => reflection.isReadonly());\n const internal = computed(() => reflection.isInternal());\n const ignore = computed(() => reflection.isIgnored());\n const hidden = computed(() => reflection.isHidden());\n\n if (\n !computedHeading.value ||\n (isSetString(computedHeading.value) && computedHeading.value.trim() === \"\")\n ) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(title.value) ||\n (!isUndefined(alias.value) && alias.value.length > 0) ||\n (!isUndefined(permission.value) && permission.value.length > 0) ||\n isSetString(domain.value) ||\n !isUndefined(readonly.value) ||\n !isUndefined(internal.value) ||\n !isUndefined(ignore.value) ||\n !isUndefined(hidden.value)\n );\n\n return (\n <TSDoc\n {...rest}\n heading={\n isSetString(computedHeading.value)\n ? computedHeading.value.trim()\n : computedHeading.value\n }>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n title={title.value}\n alias={alias.value}\n domain={domain.value}\n permission={permission.value}\n readonly={readonly.value}\n internal={internal.value}\n ignore={ignore.value}\n hidden={hidden.value}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n/**\n * Uses the `useReflectionClass` hook to retrieve the reflection class from the context, and then renders a `TSDocReflectionClass` component with the retrieved reflection class. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection class without having to manually retrieve the reflection class from the context.\n */\nexport function TSDocContextClass<\n T extends Record<string, any> = Record<string, any>\n>(props: TSDocProps) {\n const reflectionClass = useReflectionClass<T>();\n\n return (\n <Show when={isSetObject(reflectionClass.reflection)}>\n <TSDocReflectionClass\n {...props}\n reflection={reflectionClass.reflection}\n />\n </Show>\n );\n}\n\nexport interface TSDocReflectionPropertyProps extends TSDocProps {\n reflection: ReflectionProperty;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection property. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about parameters of a method or properties of a class.\n */\nexport function TSDocReflectionProperty(props: TSDocReflectionPropertyProps) {\n const [{ children, reflection }, rest] = splitProps(props, [\n \"children\",\n \"reflection\"\n ]);\n\n if (!isSetObject(reflection)) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(reflection.getTitle()) ||\n (!isUndefined(reflection.getAlias()) &&\n reflection.getAlias().length > 0) ||\n (!isUndefined(reflection.getPermission()) &&\n reflection.getPermission().length > 0) ||\n isSetString(reflection.getDomain()) ||\n !isUndefined(reflection.isReadonly()) ||\n !isUndefined(reflection.isInternal()) ||\n !isUndefined(reflection.isIgnored()) ||\n !isUndefined(reflection.isHidden()) ||\n (reflection.hasDefault() && !isUndefined(reflection.getDefaultValue()))\n );\n\n return (\n <TSDoc heading={reflection.getDescription()} {...rest}>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={reflection}\n title={reflection.getTitle()}\n alias={reflection.getAlias()}\n domain={reflection.getDomain()}\n permission={reflection.getPermission()}\n readonly={reflection.isReadonly()}\n internal={reflection.isInternal()}\n ignore={reflection.isIgnored()}\n hidden={reflection.isHidden()}\n defaultValue={reflection.getDefaultValue()}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n/**\n * Uses the `useReflectionProperty` hook to retrieve the reflection property from the context, and then renders a `TSDocReflectionProperty` component with the retrieved reflection property. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection property without having to manually retrieve the reflection property from the context.\n */\nexport function TSDocContextProperty(props: TSDocProps) {\n const reflection = useReflectionProperty();\n\n return (\n <Show when={isSetObject(reflection)}>\n <TSDocReflectionProperty {...props} reflection={reflection} />\n </Show>\n );\n}\n\nexport interface TSDocReflectionMethodProps extends TSDocProps {\n reflection: ReflectionMethod;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection method. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. Additionally, this component will render information about the parameters and return type of the method, if available.\n */\nexport function TSDocReflectionMethod(props: TSDocReflectionMethodProps) {\n const [{ children, reflection }, rest] = splitProps(props, [\n \"children\",\n \"reflection\"\n ]);\n\n if (!isSetObject(reflection)) {\n return null;\n }\n\n const heading = computed(\n () =>\n reflection.getDescription() ||\n (isString(reflection.getName())\n ? code`${String(reflection.getName())} method definition`\n : undefined)\n );\n\n return (\n <TSDoc heading={heading.value} {...rest}>\n <TSDocAttributesTags\n title={reflection.getTitle()}\n alias={reflection.getAlias()}\n domain={reflection.getDomain()}\n permission={reflection.getPermission()}\n readonly={reflection.isReadonly()}\n internal={reflection.isInternal()}\n ignore={reflection.isIgnored()}\n hidden={reflection.isHidden()}\n />\n <Show\n when={Boolean(children) && childrenArray(() => children).length > 0}>\n <List>{childrenArray(() => children)}</List>\n </Show>\n <Show when={reflection.getParameters().length > 0}>\n <Spacing />\n <For each={reflection.getParameters()} hardline ender={<hbr />}>\n {param => (\n <TSDocParam\n name={param.getName()}\n optional={param.isOptional()}\n defaultValue={\n param.hasDefault() ? param.getDefaultValue() : undefined\n }>\n <Show\n when={Boolean(param.parameter.description)}\n fallback={code`A parameter to provide a ${param.getName()} value to the function.`}>\n {param.parameter.description}\n </Show>\n </TSDocParam>\n )}\n </For>\n </Show>\n <Show when={reflection.getReturnType().kind !== ReflectionKind.void}>\n <Spacing />\n <TSDocReturns>\n {code`The return value of the function, which is of type ${stringifyType(\n reflection.getReturnType()\n )}.`}\n </TSDocReturns>\n </Show>\n </TSDoc>\n );\n}\n\n/**\n * Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.\n */\nexport function TSDocContextMethod(props: TSDocProps) {\n const reflection = useReflectionMethod();\n\n return (\n <Show when={isSetObject(reflection)}>\n <TSDocReflectionMethod {...props} reflection={reflection} />\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAoCA,SAAS,qBAAsD,OAAA;CAC/D,MAAQ,CAAC,EACT,UACA,SACA,cACE,QAAA,WAAkB,OAAA;EAAA;EAAA;EAAA;EAAA,CAAA;AAClB,KAAA,CAAA,YAAA,WAAmB,CACnB,QAAA;CAEF,MAAO,QAAA,eAAA,WAAA,UAAA,IAAA,UAAA,WAAA,SAAA,CAAA,CAAA;CACL,MAAK,kBAAA,eAAA,WAAA,WAAA,gBAAA,IAAA,MAAA,MAAA;CACL,MAAA,QAAA,eAAmB,WAAA,UAAA,CAAA;CACnB,MAAA,SAAU,eAAA,WAAA,WAAA,CAAA;CACV,MAAA,aAAU,eAAA,WAAA,eAAA,CAAA;CACV,MAAA,WAAA,eAAA,WAAA,YAAA,CAAA;CACA,MAAM,WAAQ,eAAA,WAAA,YAAA,CAAA;;CAEhB,MAAO,SAAU,eAAA,WAAyB,UAAA,CAAA;AACxC,KAAE,CAAA,gBAAe,SAAa,YAAS,gBAAW,MAAA,IAAA,gBAAA,MAAA,MAAA,KAAA,GAClD,QAAQ;CAEV,MAAA,gBAAA,eAAA,YAAA,MAAA,MAAA,IAAA,CAAA,YAAA,MAAA,MAAA,IAAA,MAAA,MAAA,SAAA,KAAA,CAAA,YAAA,WAAA,MAAA,IAAA,WAAA,MAAA,SAAA,KAAA,YAAA,OAAA,MAAA,IAAA,CAAA,YAAA,SAAA,MAAA,IAAA,CAAA,YAAA,SAAA,MAAA,IAAA,CAAA,YAAA,OAAA,MAAA,IAAA,CAAA,YAAA,O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AA,EAAA,IAAA,oBAAA,SAAA,CAAA,SAAA;;IAE3B,IAAI,WAAE;AACJ,YAAM,gBAAmB,MAAE,EACzB,IAAG,WAAA;AACD,aAAC,oBAAA,SAAA;QAEJ,CAAC;;IAEL,CAAC;GAAE,gBAAU,MAAA;IACZ,IAAI,OAAE;AACJ,YAAC,WAAA,eAAA,CAAA,SAAA;;IAEH,IAAI,WAAA;AACL,YAAU,CAAC,gBAAW,SAAgB,EAAA,CAAA,EAAK,gBAAkB,KAAK;MAChE,IAAO,OAAE;AACT,cAAY,WAAA,eAAA;;MAET,UAAU;MACV,IAAE,QAAA;AACJ,cAAA,gBAAY,OAAA,EAAA,CAAA;;MAEX,WAAA,UAAA,gBAAA,YAAA;OACR,IAAA,OAAA;AACH,eAAA,MAAA,SAAA;;OAEE,IAAA,WAAA;AACW,eAAA,MAAA,YAA4B;;OAElC,IAAS,eAAA;AACR,eAAa,WAAA,CAAA,CAAA,MAAqB,YAAA,CAAA,EAAA,GAAA,MAAA,iBAAA,GAAA;;OAEjC,IAAA,WAAA;AACO,eAAA,gBAAwB,MAAA;SACjC,IAAA,OAAsB;AACnB,iBAAA,QAAA,MAAA,UAAA,YAAA;;SAEV,IAAA,WAAA"}
@@ -0,0 +1,164 @@
1
+ import { ComponentProps } from "../../types/components.cjs";
2
+ import { Children } from "@alloy-js/core";
3
+ import { ReflectionKind, ReflectionParameter, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
4
+ import { JSDocExampleProps, ParameterDescriptor } from "@alloy-js/typescript";
5
+
6
+ //#region src/typescript/components/tsdoc.d.ts
7
+ interface TSDocProps extends ComponentProps {
8
+ heading?: Children;
9
+ }
10
+ /**
11
+ * Generates a TypeScript interface for the given reflection class.
12
+ */
13
+ declare function TSDoc(props: TSDocProps): Children;
14
+ interface TSDocTagProps extends ComponentProps {
15
+ tag: string;
16
+ }
17
+ /**
18
+ * Create a TSDoc `@<props.tag>` tag.
19
+ */
20
+ declare function TSDocTag(props: TSDocTagProps): Children;
21
+ interface TSDocParamsProps {
22
+ parameters: ParameterDescriptor[] | string[];
23
+ }
24
+ /**
25
+ * A component that creates a TSDoc block with `@param` tags for each parameter.
26
+ */
27
+ declare function TSDocParams(props: TSDocParamsProps): Children;
28
+ /**
29
+ * Create a TSDoc `@title` tag.
30
+ */
31
+ declare function TSDocTitle(props: ComponentProps): Children;
32
+ /**
33
+ * Create a TSDoc `@domain` tag.
34
+ */
35
+ declare function TSDocDomain(props: ComponentProps): Children;
36
+ /**
37
+ * Create a TSDoc `@alias` tag.
38
+ */
39
+ declare function TSDocAlias(props: ComponentProps): Children;
40
+ /**
41
+ * Create a TSDoc `@permission` tag.
42
+ */
43
+ declare function TSDocPermission(props: ComponentProps): Children;
44
+ interface TSDocDefaultValueProps extends ComponentProps {
45
+ type: ReflectionKind | ReflectionProperty | ReflectionParameter;
46
+ defaultValue: any;
47
+ }
48
+ /**
49
+ * Create a TSDoc `@defaultValue` tag.
50
+ */
51
+ declare function TSDocDefaultValue(props: TSDocDefaultValueProps): Children;
52
+ /**
53
+ * Create a TSDoc `@remarks` tag.
54
+ */
55
+ declare function TSDocRemarks(props: ComponentProps): Children;
56
+ /**
57
+ * Create a TSDoc `@see` tag.
58
+ */
59
+ declare function TSDocLink(props: ComponentProps): Children;
60
+ interface TSDocExampleProps extends JSDocExampleProps {
61
+ /**
62
+ * Whether the file is a TSX file.
63
+ *
64
+ * @defaultValue false
65
+ */
66
+ tsx?: boolean;
67
+ }
68
+ /**
69
+ * Create a TSDoc `@example` tag.
70
+ */
71
+ declare function TSDocExample(props: TSDocExampleProps): Children;
72
+ /**
73
+ * Create a TSDoc `@readonly` tag.
74
+ */
75
+ declare function TSDocReadonly(): Children;
76
+ /**
77
+ * Create a TSDoc `@internal` tag.
78
+ */
79
+ declare function TSDocInternal(): Children;
80
+ /**
81
+ * Create a TSDoc `@ignore` tag.
82
+ */
83
+ declare function TSDocIgnore(): Children;
84
+ /**
85
+ * Create a TSDoc `@hidden` tag.
86
+ */
87
+ declare function TSDocHidden(): Children;
88
+ interface TSDocAttributesTagsProps {
89
+ type?: ReflectionKind | ReflectionProperty | ReflectionParameter;
90
+ title?: string;
91
+ alias?: string[];
92
+ permission?: string[];
93
+ domain?: string;
94
+ readonly?: boolean;
95
+ internal?: boolean;
96
+ ignore?: boolean;
97
+ hidden?: boolean;
98
+ defaultValue?: any;
99
+ }
100
+ /**
101
+ * Generates a TypeScript interface property for the given reflection class.
102
+ */
103
+ declare function TSDocAttributesTags(props: TSDocAttributesTagsProps): Children;
104
+ interface TSDocParamProps {
105
+ name: Children;
106
+ children?: Children;
107
+ optional?: boolean;
108
+ defaultValue?: Children;
109
+ }
110
+ /**
111
+ * Create a TSDoc parameter set off with `@param`.
112
+ */
113
+ declare function TSDocParam(props: TSDocParamProps): Children;
114
+ /**
115
+ * Create a TSDoc `@returns` tag.
116
+ */
117
+ declare function TSDocReturns(props: ComponentProps): Children;
118
+ /**
119
+ * Create a TSDoc `@throws` tag.
120
+ */
121
+ declare function TSDocThrows(props: ComponentProps): Children;
122
+ interface TSDocModuleProps extends ComponentProps {
123
+ /**
124
+ * The prefix for the builtin module name
125
+ *
126
+ * @remarks
127
+ * This value is populated from the Powerlines configuration output builtin prefix by default.
128
+ *
129
+ * @example
130
+ * ```ts
131
+ * /**
132
+ * @module powerlines:my-module
133
+ * \/
134
+ * ```
135
+ */
136
+ prefix?: string;
137
+ /**
138
+ * The name of the module
139
+ *
140
+ * @remarks
141
+ * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.
142
+ *
143
+ * @example
144
+ * ```ts
145
+ * import { MyModule } from "powerlines:my-module";
146
+ * ```
147
+ */
148
+ name: Children;
149
+ }
150
+ /**
151
+ * Generates a TSDoc `@module` tag for the given module name.
152
+ */
153
+ declare function TSDocModule(props: TSDocModuleProps): Children;
154
+ declare type __ΩTSDocProps = any[];
155
+ declare type __ΩTSDocTagProps = any[];
156
+ declare type __ΩTSDocParamsProps = any[];
157
+ declare type __ΩTSDocDefaultValueProps = any[];
158
+ declare type __ΩTSDocExampleProps = any[];
159
+ declare type __ΩTSDocAttributesTagsProps = any[];
160
+ declare type __ΩTSDocParamProps = any[];
161
+ declare type __ΩTSDocModuleProps = any[];
162
+ //#endregion
163
+ export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps };
164
+ //# sourceMappingURL=tsdoc.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsdoc.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"mappings":";;;;;;UAyCiB,UAAA,SAAmB,cAAA;EAClC,OAAA,GAAU,QAAA;AAAA;;;;iBAMI,KAAA,CAAM,KAAA,EAAO,UAAA,GAAU,QAAA;AAAA,UA2BtB,aAAA,SAAsB,cAAA;EACrC,GAAA;AAAA;;AA5BF;;iBAkCgB,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,QAAA;AAAA,UAgB5B,gBAAA;EACf,UAAA,EAAY,mBAAA;AAAA;;;;iBAME,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;;;;iBA2BnC,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QAAA;AAlDhD;;;AAAA,iBA+DgB,WAAA,CAAY,KAAA,EAAO,cAAA,GAAc,QAAA;;;;iBAajC,UAAA,CAAW,KAAA,EAAO,cAAA,GAAc,QAAA;;AA5Dh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M,QAAA;AAAA;;;;iBAMQ,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;AAAA"}
@@ -0,0 +1,164 @@
1
+ import { ComponentProps } from "../../types/components.mjs";
2
+ import { Children } from "@alloy-js/core";
3
+ import { ReflectionKind, ReflectionParameter, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
4
+ import { JSDocExampleProps, ParameterDescriptor } from "@alloy-js/typescript";
5
+
6
+ //#region src/typescript/components/tsdoc.d.ts
7
+ interface TSDocProps extends ComponentProps {
8
+ heading?: Children;
9
+ }
10
+ /**
11
+ * Generates a TypeScript interface for the given reflection class.
12
+ */
13
+ declare function TSDoc(props: TSDocProps): Children;
14
+ interface TSDocTagProps extends ComponentProps {
15
+ tag: string;
16
+ }
17
+ /**
18
+ * Create a TSDoc `@<props.tag>` tag.
19
+ */
20
+ declare function TSDocTag(props: TSDocTagProps): Children;
21
+ interface TSDocParamsProps {
22
+ parameters: ParameterDescriptor[] | string[];
23
+ }
24
+ /**
25
+ * A component that creates a TSDoc block with `@param` tags for each parameter.
26
+ */
27
+ declare function TSDocParams(props: TSDocParamsProps): Children;
28
+ /**
29
+ * Create a TSDoc `@title` tag.
30
+ */
31
+ declare function TSDocTitle(props: ComponentProps): Children;
32
+ /**
33
+ * Create a TSDoc `@domain` tag.
34
+ */
35
+ declare function TSDocDomain(props: ComponentProps): Children;
36
+ /**
37
+ * Create a TSDoc `@alias` tag.
38
+ */
39
+ declare function TSDocAlias(props: ComponentProps): Children;
40
+ /**
41
+ * Create a TSDoc `@permission` tag.
42
+ */
43
+ declare function TSDocPermission(props: ComponentProps): Children;
44
+ interface TSDocDefaultValueProps extends ComponentProps {
45
+ type: ReflectionKind | ReflectionProperty | ReflectionParameter;
46
+ defaultValue: any;
47
+ }
48
+ /**
49
+ * Create a TSDoc `@defaultValue` tag.
50
+ */
51
+ declare function TSDocDefaultValue(props: TSDocDefaultValueProps): Children;
52
+ /**
53
+ * Create a TSDoc `@remarks` tag.
54
+ */
55
+ declare function TSDocRemarks(props: ComponentProps): Children;
56
+ /**
57
+ * Create a TSDoc `@see` tag.
58
+ */
59
+ declare function TSDocLink(props: ComponentProps): Children;
60
+ interface TSDocExampleProps extends JSDocExampleProps {
61
+ /**
62
+ * Whether the file is a TSX file.
63
+ *
64
+ * @defaultValue false
65
+ */
66
+ tsx?: boolean;
67
+ }
68
+ /**
69
+ * Create a TSDoc `@example` tag.
70
+ */
71
+ declare function TSDocExample(props: TSDocExampleProps): Children;
72
+ /**
73
+ * Create a TSDoc `@readonly` tag.
74
+ */
75
+ declare function TSDocReadonly(): Children;
76
+ /**
77
+ * Create a TSDoc `@internal` tag.
78
+ */
79
+ declare function TSDocInternal(): Children;
80
+ /**
81
+ * Create a TSDoc `@ignore` tag.
82
+ */
83
+ declare function TSDocIgnore(): Children;
84
+ /**
85
+ * Create a TSDoc `@hidden` tag.
86
+ */
87
+ declare function TSDocHidden(): Children;
88
+ interface TSDocAttributesTagsProps {
89
+ type?: ReflectionKind | ReflectionProperty | ReflectionParameter;
90
+ title?: string;
91
+ alias?: string[];
92
+ permission?: string[];
93
+ domain?: string;
94
+ readonly?: boolean;
95
+ internal?: boolean;
96
+ ignore?: boolean;
97
+ hidden?: boolean;
98
+ defaultValue?: any;
99
+ }
100
+ /**
101
+ * Generates a TypeScript interface property for the given reflection class.
102
+ */
103
+ declare function TSDocAttributesTags(props: TSDocAttributesTagsProps): Children;
104
+ interface TSDocParamProps {
105
+ name: Children;
106
+ children?: Children;
107
+ optional?: boolean;
108
+ defaultValue?: Children;
109
+ }
110
+ /**
111
+ * Create a TSDoc parameter set off with `@param`.
112
+ */
113
+ declare function TSDocParam(props: TSDocParamProps): Children;
114
+ /**
115
+ * Create a TSDoc `@returns` tag.
116
+ */
117
+ declare function TSDocReturns(props: ComponentProps): Children;
118
+ /**
119
+ * Create a TSDoc `@throws` tag.
120
+ */
121
+ declare function TSDocThrows(props: ComponentProps): Children;
122
+ interface TSDocModuleProps extends ComponentProps {
123
+ /**
124
+ * The prefix for the builtin module name
125
+ *
126
+ * @remarks
127
+ * This value is populated from the Powerlines configuration output builtin prefix by default.
128
+ *
129
+ * @example
130
+ * ```ts
131
+ * /**
132
+ * @module powerlines:my-module
133
+ * \/
134
+ * ```
135
+ */
136
+ prefix?: string;
137
+ /**
138
+ * The name of the module
139
+ *
140
+ * @remarks
141
+ * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.
142
+ *
143
+ * @example
144
+ * ```ts
145
+ * import { MyModule } from "powerlines:my-module";
146
+ * ```
147
+ */
148
+ name: Children;
149
+ }
150
+ /**
151
+ * Generates a TSDoc `@module` tag for the given module name.
152
+ */
153
+ declare function TSDocModule(props: TSDocModuleProps): Children;
154
+ declare type __ΩTSDocProps = any[];
155
+ declare type __ΩTSDocTagProps = any[];
156
+ declare type __ΩTSDocParamsProps = any[];
157
+ declare type __ΩTSDocDefaultValueProps = any[];
158
+ declare type __ΩTSDocExampleProps = any[];
159
+ declare type __ΩTSDocAttributesTagsProps = any[];
160
+ declare type __ΩTSDocParamProps = any[];
161
+ declare type __ΩTSDocModuleProps = any[];
162
+ //#endregion
163
+ export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps };
164
+ //# sourceMappingURL=tsdoc.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsdoc.d.mts","names":[],"sources":["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BAAA;EAC7C,KAAA;EACA,KAAA;EACA,UAAA;EACA,MAAA;EACA,QAAA;EACA,QAAA;EACA,MAAA;EACA,MAAA;EACA,YAAA;AAAA;;;;iBAMc,mBAAA,CAAoB,KAAA,EAAO,wBAAA,GAAwB,QAAA;AAAA,UA8ElD,eAAA;EACf,IAAA,EAAM,QAAA;EACN,QAAA,GAAW,QAAA;EACX,QAAA;EACA,YAAA,GAAe,QAAA;AAAA;;;;iBAMD,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA;;;;iBAiDjC,YAAA,CAAa,KAAA,EAAO,cAAA,GAAc,QAAA;;;;iBAOlC,WAAA,CAAY,KAAA,EAAO,cAAA,GAAc,QAAA;AAAA,UAIhC,gBAAA,SAAyB,cAAA;EAtPQ;;;AAalD;;;;;;;;;AAIA;EAmPE,MAAA;;;;AAvOF;;;;;;;;EAoPE,IAAA,EAAM,QAAA;AAAA;;;;iBAMQ,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;AAAA"}
@@ -453,4 +453,5 @@ function TSDocModule(props) {
453
453
  }
454
454
 
455
455
  //#endregion
456
- export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle };
456
+ export { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle };
457
+ //# sourceMappingURL=tsdoc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsdoc.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n childrenArray,\n computed,\n For,\n List,\n Prose,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { JSDocExampleProps, ParameterDescriptor } from \"@alloy-js/typescript\";\nimport { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\nimport {\n ReflectionKind,\n ReflectionParameter,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { ComponentProps } from \"../../types/components\";\n\nexport interface TSDocProps extends ComponentProps {\n heading?: Children;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TSDoc(props: TSDocProps) {\n const [{ children, heading }] = splitProps(props, [\"children\", \"heading\"]);\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={!isUndefined(heading)}>{heading}</Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={!isUndefined(heading)}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </align>\n <hbr />\n {`*/`}\n <hbr />\n </>\n );\n}\n\nexport interface TSDocTagProps extends ComponentProps {\n tag: string;\n}\n\n/**\n * Create a TSDoc `@<props.tag>` tag.\n */\nexport function TSDocTag(props: TSDocTagProps) {\n const [{ children, tag }] = splitProps(props, [\"children\", \"tag\"]);\n\n return (\n <>\n {`@${tag} `}\n <Show when={Boolean(children)}>\n <align width={2}>\n <Prose>{children}</Prose>\n </align>\n </Show>\n <sbr />\n </>\n );\n}\n\nexport interface TSDocParamsProps {\n parameters: ParameterDescriptor[] | string[];\n}\n\n/**\n * A component that creates a TSDoc block with `@param` tags for each parameter.\n */\nexport function TSDocParams(props: TSDocParamsProps) {\n const parameters = normalizeParametersForDoc(props.parameters);\n\n return (\n <For each={parameters}>\n {param => (\n <TSDocParam name={param.name} optional={param.optional}>\n {param.doc}\n </TSDocParam>\n )}\n </For>\n );\n}\n\nfunction normalizeParametersForDoc(\n parameters: ParameterDescriptor[] | string[]\n): ParameterDescriptor[] {\n if (parameters.some(p => typeof p === \"string\")) {\n return [];\n }\n\n return parameters as ParameterDescriptor[];\n}\n\n/**\n * Create a TSDoc `@title` tag.\n */\nexport function TSDocTitle(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"title\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@domain` tag.\n */\nexport function TSDocDomain(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"domain\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@alias` tag.\n */\nexport function TSDocAlias(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"alias\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@permission` tag.\n */\nexport function TSDocPermission(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"permission\">\n {children}\n </TSDocTag>\n );\n}\n\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type: ReflectionKind | ReflectionProperty | ReflectionParameter;\n defaultValue: any;\n}\n\n/**\n * Create a TSDoc `@defaultValue` tag.\n */\nexport function TSDocDefaultValue(props: TSDocDefaultValueProps) {\n const [{ type, defaultValue }] = splitProps(props, [\"type\", \"defaultValue\"]);\n\n return (\n <>\n {\"@defaultValue \"}\n <Show when={!isUndefined(defaultValue)}>\n <align width={2}>\n <Prose>{stringifyDefaultValue(type, defaultValue)}</Prose>\n </align>\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@remarks` tag.\n */\nexport function TSDocRemarks(props: ComponentProps) {\n return (\n <>\n {\"@remarks \"}\n <hbr />\n <List hardline={true}>{childrenArray(() => props.children)}</List>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@see` tag.\n */\nexport function TSDocLink(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"see\" />;\n}\n\nexport interface TSDocExampleProps extends JSDocExampleProps {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n}\n\n/**\n * Create a TSDoc `@example` tag.\n */\nexport function TSDocExample(props: TSDocExampleProps) {\n const [{ tsx, fenced = true, language, children }] = splitProps(props, [\n \"tsx\",\n \"fenced\",\n \"language\",\n \"children\"\n ]);\n\n return (\n <>\n {\"@example \"}\n <hbr />\n <Show when={fenced}>\n ```{language || (tsx ? \"tsx\" : \"ts\")}\n <hbr />\n </Show>\n {children}\n <Show when={fenced}>\n <hbr />\n ```\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@readonly` tag.\n */\nexport function TSDocReadonly() {\n return <TSDocTag tag=\"readonly\" />;\n}\n\n/**\n * Create a TSDoc `@internal` tag.\n */\nexport function TSDocInternal() {\n return <TSDocTag tag=\"internal\" />;\n}\n\n/**\n * Create a TSDoc `@ignore` tag.\n */\nexport function TSDocIgnore() {\n return <TSDocTag tag=\"ignore\" />;\n}\n\n/**\n * Create a TSDoc `@hidden` tag.\n */\nexport function TSDocHidden() {\n return <TSDocTag tag=\"hidden\" />;\n}\n\nexport interface TSDocAttributesTagsProps {\n type?: ReflectionKind | ReflectionProperty | ReflectionParameter;\n title?: string;\n alias?: string[];\n permission?: string[];\n domain?: string;\n readonly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n defaultValue?: any;\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocAttributesTags(props: TSDocAttributesTagsProps) {\n const [\n {\n type,\n alias,\n permission,\n readonly,\n internal,\n ignore,\n hidden,\n defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"permission\",\n \"readonly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"defaultValue\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n const domain = computed(() => props.domain?.trim() || \"\");\n\n return (\n <>\n <Show when={isSetString(title.value)}>\n <TSDocTitle>{title.value}</TSDocTitle>\n </Show>\n <Show\n when={\n !isUndefined(alias) &&\n alias.length > 0 &&\n alias.some(a => isSetString(a?.trim()))\n }>\n <For each={alias?.filter(a => isSetString(a?.trim())) ?? []}>\n {alias => <TSDocAlias>{alias}</TSDocAlias>}\n </For>\n </Show>\n <Show when={isSetString(domain.value)}>\n <TSDocDomain>{domain.value}</TSDocDomain>\n </Show>\n <Show\n when={\n !isUndefined(permission) &&\n permission.length > 0 &&\n permission.some(p => isSetString(p?.trim()))\n }>\n <For each={permission?.filter(p => isSetString(p?.trim())) ?? []}>\n {permission => <TSDocPermission>{permission}</TSDocPermission>}\n </For>\n </Show>\n <Show when={readonly === true}>\n <TSDocReadonly />\n </Show>\n <Show when={internal === true}>\n <TSDocInternal />\n </Show>\n <Show when={ignore === true}>\n <TSDocIgnore />\n </Show>\n <Show when={hidden === true}>\n <TSDocHidden />\n </Show>\n <Show when={!isUndefined(type) && !isUndefined(defaultValue)}>\n <TSDocDefaultValue\n type={\n type as ReflectionKind | ReflectionProperty | ReflectionParameter\n }\n defaultValue={defaultValue}\n />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\n/**\n * Create a TSDoc parameter set off with `@param`.\n */\nexport function TSDocParam(props: TSDocParamProps) {\n return (\n <>\n {\"@param \"}\n <TSDocParamName\n name={props.name}\n optional={props.optional}\n defaultValue={props.defaultValue}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.defaultValue)}>={props.defaultValue}</Show>\n <Show when={props.optional}>{\"]\"}</Show>\n </>\n );\n}\n\ninterface TSDocParamDescriptionProps {\n children?: Children;\n}\n\nfunction TSDocParamDescription(props: TSDocParamDescriptionProps) {\n return (\n <Show when={Boolean(props.children)}>\n {\" - \"}\n <align width={2}>\n <Prose>{props.children}</Prose>\n </align>\n </Show>\n );\n}\n\n/**\n * Create a TSDoc `@returns` tag.\n */\nexport function TSDocReturns(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"returns\" />;\n}\n\n/**\n * Create a TSDoc `@throws` tag.\n */\nexport function TSDocThrows(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"throws\" />;\n}\n\nexport interface TSDocModuleProps extends ComponentProps {\n /**\n * The prefix for the builtin module name\n *\n * @remarks\n * This value is populated from the Powerlines configuration output builtin prefix by default.\n *\n * @example\n * ```ts\n * /**\n * @module powerlines:my-module\n * \\/\n * ```\n */\n prefix?: string;\n\n /**\n * The name of the module\n *\n * @remarks\n * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.\n *\n * @example\n * ```ts\n * import { MyModule } from \"powerlines:my-module\";\n * ```\n */\n name: Children;\n}\n\n/**\n * Generates a TSDoc `@module` tag for the given module name.\n */\nexport function TSDocModule(props: TSDocModuleProps) {\n const [{ children, name, prefix }] = splitProps(props, [\n \"children\",\n \"name\",\n \"prefix\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={Boolean(children)}>\n <List hardline={true}>{childrenArray(() => children)}</List>\n <Spacing />\n </Show>\n {\"@module \"}\n {prefix || context?.config?.framework || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAmCA,SAAS,MAAa,OAAmB;CACzC,MAAQ,CAAC,EACT,UACA,aACO,WAAE,OAAgB,CAAC,YAAY,UAAM,CAAA;;;;GAE5C,QAAO;GACL,IAAA,WAAU;AACZ,WAAA;KAAA,gBAAA,OAAA,EAAA,CAAA;KAAA,gBAAA,MAAA;;AAEE,cAAA,CAAA,YAAA,QAAA;;MAEA,UAAA;MACK,CAAA;KAAA,gBAAqB,MAAC;MACrB,IAAG,OAAQ;;;MAGd,IAAA,WAAA;AACG,cAAA,CAAA,gBAAA,MAAA;QACI,IAAC,OAAU;AACT,gBAAA,CAAA,YAAA,QAAA;;QAEL,IAAA,WAAA;AACK,gBAAC,gBAAA,SAAA,EAAA,CAAA;;QAEJ,CAAC,EAAA,gBAAoB,MAAA,EACrB,IAAA,WAAA;AACA,eAAU,oBAAc,SAAS;UAEjC,CAAC,CAAA;;MAEL,CAAC;KAAC;;GAEN,CAAC;EAAE,gBAAM,OAAA,EAAA,CAAA;EAAA;EAAA,gBAAA,OAAA,EAAA,CAAA;EAAA;;;;;AASZ,SAAA,SAAA,OAAA;UAEE,UACC,SACD,WAAA,OAAA,CAAA,YAAA,MAAA,CAAA;AACF,QAAO;EAAA,IAAA,IAAS;EAAA,gBAAgB,MAAc;GAC5C,IAAM,OAAG;;;GAGP,IAAC,WAAA;AACC,WAAK,gBAAM,SAAA;KACV,OAAK;KACJ,IAAC,WAAc;AACb,aAAO,gBAAiB,OAAA,EACnB,UACP,CAAI;;KAEN,CAAA;;GAEN,CAAA;EAAA,gBAAA,OAAA,EAAA,CAAA;EAAA;;;;;AASA,SAAgB,YAAY,OAAyB;;EAGnD,M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A,CAAC,CAAA;;;;;;;AAQR,SAAc,aAAA,OAAA;AACZ,QAAO,gBAAC,UAAA,WAAA,OAAA,EACN,KAAC,WACF,CAAC,CAAA;;;;;AAMJ,SAAQ,YAAA,OAAA;AACN,QAAK,gBAAkB,UAAA,WAAA,OAAA,EACrB,KAAK,UACN,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import * as _alloy_js_core0 from "@alloy-js/core";
2
+ import { CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
3
+
4
+ //#region src/typescript/components/type-declaration.d.ts
5
+ interface TypeDeclarationProps extends CommonDeclarationProps {
6
+ /**
7
+ * The generic type parameters of the interface.
8
+ */
9
+ typeParameters?: TypeParameterDescriptor[] | string[];
10
+ }
11
+ /**
12
+ * Renders a TypeScript type declaration, including its name, optional TSDoc comment, and generic type parameters.
13
+ */
14
+ declare const TypeDeclaration: _alloy_js_core0.Component<TypeDeclarationProps>;
15
+ declare type __ΩTypeDeclarationProps = any[];
16
+ //#endregion
17
+ export { TypeDeclaration, TypeDeclarationProps, __ΩTypeDeclarationProps };
18
+ //# sourceMappingURL=type-declaration.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-declaration.d.cts","names":[],"sources":["../../../src/typescript/components/type-declaration.tsx"],"mappings":";;;;UA4BiB,oBAAA,SAA6B,sBAAA;;;AAA9C;EAIE,cAAA,GAAiB,uBAAA;AAAA;;;;cAMN,eAAA,EAAe,eAAA,CAAA,SAAA,CAAA,oBAAA;AAAA"}
@@ -0,0 +1,18 @@
1
+ import * as _alloy_js_core0 from "@alloy-js/core";
2
+ import { CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
3
+
4
+ //#region src/typescript/components/type-declaration.d.ts
5
+ interface TypeDeclarationProps extends CommonDeclarationProps {
6
+ /**
7
+ * The generic type parameters of the interface.
8
+ */
9
+ typeParameters?: TypeParameterDescriptor[] | string[];
10
+ }
11
+ /**
12
+ * Renders a TypeScript type declaration, including its name, optional TSDoc comment, and generic type parameters.
13
+ */
14
+ declare const TypeDeclaration: _alloy_js_core0.Component<TypeDeclarationProps>;
15
+ declare type __ΩTypeDeclarationProps = any[];
16
+ //#endregion
17
+ export { TypeDeclaration, TypeDeclarationProps, __ΩTypeDeclarationProps };
18
+ //# sourceMappingURL=type-declaration.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/type-declaration.tsx"],"mappings":";;;;UA4BiB,oBAAA,SAA6B,sBAAA;;;AAA9C;EAIE,cAAA,GAAiB,uBAAA;AAAA;;;;cAMN,eAAA,EAAe,eAAA,CAAA,SAAA,CAAA,oBAAA;AAAA"}
@@ -34,4 +34,5 @@ const TypeDeclaration = ensureTypeRefContext(function TypeDeclaration(props) {
34
34
  });
35
35
 
36
36
  //#endregion
37
- export { TypeDeclaration };
37
+ export { TypeDeclaration };
38
+ //# sourceMappingURL=type-declaration.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-declaration.mjs","names":[],"sources":["../../../src/typescript/components/type-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Name, Show } from \"@alloy-js/core\";\nimport {\n CommonDeclarationProps,\n Declaration,\n ensureTypeRefContext,\n TypeParameterDescriptor\n} from \"@alloy-js/typescript\";\nimport { TSDoc } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\nexport interface TypeDeclarationProps extends CommonDeclarationProps {\n /**\n * The generic type parameters of the interface.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Renders a TypeScript type declaration, including its name, optional TSDoc comment, and generic type parameters.\n */\nexport const TypeDeclaration = ensureTypeRefContext(function TypeDeclaration(\n props: TypeDeclarationProps\n) {\n const { children, doc, typeParameters, ...rest } = props;\n\n return (\n <>\n <Show when={Boolean(doc)}>\n <TSDoc heading={doc} />\n </Show>\n <Declaration {...rest} kind=\"type\" nameKind=\"type\">\n type <Name />\n {typeParameters && (\n <TypeParameters parameters={typeParameters} />\n )} = {children};\n </Declaration>\n </>\n );\n});\n"],"mappings":";;;;;;;;;;AAiCA,MAAA,kBAAA,qBAAA,SAAA,gBAAA,OAAA;SAEE,UACC,KACD,gBACF,GAAO,SACL;AACA,QAAA,CAAA,gBAAA,MAAA;EACA,IAAM,OAAE;;;EAGN,IAAC,WAAA;AACC,UAAM,gBAAmB,OAAA,EACvB,SAAO,KACR,CAAC;;EAEL,CAAC,EAAE,gBAAc,eAAA,WAAA,MAAA;EAChB,MAAK;EACL,UAAO;EACP,IAAI,WAAM;AACR,UAAE;IAAA;IAAW,gBAAA,MAAA,EAAA,CAAA;IAAA,WAAA,kBAAA,gBAAA,gBAAA,EACb,YAAA,gBACH,CAAA,CAAA;IAAA;IAAA;IAAA;IAAA"}
@@ -0,0 +1,24 @@
1
+ import { Children } from "@alloy-js/core";
2
+ import { TypeParameterDescriptor } from "@alloy-js/typescript";
3
+
4
+ //#region src/typescript/components/type-parameters.d.ts
5
+ /** Props for type parameters */
6
+ interface TypeParametersProps {
7
+ /** Parameters */
8
+ parameters?: TypeParameterDescriptor[] | string[];
9
+ /** Jsx Children */
10
+ children?: Children;
11
+ }
12
+ /**
13
+ * Represent type parameters
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * <A, B extends string>
18
+ * ```
19
+ */
20
+ declare function TypeParameters(props: TypeParametersProps): Children;
21
+ declare type __ΩTypeParametersProps = any[];
22
+ //#endregion
23
+ export { TypeParameters, TypeParametersProps, __ΩTypeParametersProps };
24
+ //# sourceMappingURL=type-parameters.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-parameters.d.cts","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"mappings":";;;;;UAsBiB,mBAAA;EAAA;EAEf,UAAA,GAAa,uBAAA;;EAEb,QAAA,GAAW,QAAA;AAAA;;;;;;AAqCb;;;iBAAgB,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,QAAA;AAAA"}
@@ -0,0 +1,24 @@
1
+ import { Children } from "@alloy-js/core";
2
+ import { TypeParameterDescriptor } from "@alloy-js/typescript";
3
+
4
+ //#region src/typescript/components/type-parameters.d.ts
5
+ /** Props for type parameters */
6
+ interface TypeParametersProps {
7
+ /** Parameters */
8
+ parameters?: TypeParameterDescriptor[] | string[];
9
+ /** Jsx Children */
10
+ children?: Children;
11
+ }
12
+ /**
13
+ * Represent type parameters
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * <A, B extends string>
18
+ * ```
19
+ */
20
+ declare function TypeParameters(props: TypeParametersProps): Children;
21
+ declare type __ΩTypeParametersProps = any[];
22
+ //#endregion
23
+ export { TypeParameters, TypeParametersProps, __ΩTypeParametersProps };
24
+ //# sourceMappingURL=type-parameters.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-parameters.d.mts","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"mappings":";;;;;UAsBiB,mBAAA;EAAA;EAEf,UAAA,GAAa,uBAAA;;EAEb,QAAA,GAAW,QAAA;AAAA;;;;;;AAqCb;;;iBAAgB,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,QAAA;AAAA"}
@@ -77,4 +77,5 @@ function TypeParameters(props) {
77
77
  }
78
78
 
79
79
  //#endregion
80
- export { TypeParameters };
80
+ export { TypeParameters };
81
+ //# sourceMappingURL=type-parameters.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-parameters.mjs","names":[],"sources":["../../../src/typescript/components/type-parameters.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 { Children, For, Indent, Show } from \"@alloy-js/core\";\nimport { TypeParameterDescriptor, TypeRefContext } from \"@alloy-js/typescript\";\n\n/** Props for type parameters */\nexport interface TypeParametersProps {\n /** Parameters */\n parameters?: TypeParameterDescriptor[] | string[];\n /** Jsx Children */\n children?: Children;\n}\n\nfunction typeParameter(param: TypeParameterDescriptor | string) {\n return (\n <Show when={typeof param === \"object\"} fallback={<>{param}</>}>\n <group>\n {(param as TypeParameterDescriptor).name}\n <Show when={!!(param as TypeParameterDescriptor).extends}>\n {\" \"}\n extends\n <indent>\n {\" \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).extends}\n </TypeRefContext>\n </indent>\n </Show>\n <Show when={!!(param as TypeParameterDescriptor).default}>\n {\" = \"}\n <TypeRefContext>\n {(param as TypeParameterDescriptor).default}\n </TypeRefContext>\n </Show>\n </group>{\" \"}\n </Show>\n );\n}\n\n/**\n * Represent type parameters\n *\n * @example\n * ```ts\n * <A, B extends string>\n * ```\n */\nexport function TypeParameters(props: TypeParametersProps) {\n if (props.children) {\n return props.children;\n }\n\n if (!props.parameters) {\n return undefined;\n }\n\n return (\n <>\n {\"<\"}\n <group>\n <Indent softline>\n <For each={props.parameters} comma line>\n {param => typeParameter(param)}\n </For>\n <ifBreak>,</ifBreak>\n </Indent>\n </group>\n {\">\"}\n </>\n );\n}\n"],"mappings":";;;;;AA6BA,SAAS,cAAc,OAAyC;AAC9D,QAAO,gBAAA,MAAA;EACL,MAAM,OAAM,UAAO;EACnB,IAAG,WAAK;AACN,UAAI,CAAA,MAAS;;EAEf,IAAI,WAAM;AACR,UAAI,CAAA,gBAAA,SAAA,EACF,IAAG,WAAM;AACP,WAAM;KAAA,WAAA,MAAA,KAAA;KAAA,gBAAA,MAAA;MACJ,IAAC,OAAA;AACC,cAAO,CAAC,CAAE,MAAiC;;MAE7C,IAAA,WAAM;AACJ,cAAA;QAAA;QAAA;QAAA,gBAAA,UAAA,EACA,IAAM,WAAW;AACf,gBAAA,CAAA,KAAA,gBAAA,gBAAA,EACL,IAAA,WAAc;AACH,iBAAC,MAAgC;YAEzC,CAAA,CAAA;WAEJ,CAAA;QAAA;;MAEV,CAAA;KAAA,gBAAA,MAAA;;AAEE,cAAA,CAAA,CAAA,MAAA;;MAED,IAAA,WAAA;AACG,cAAA,CAAA,OAAA,gBAAA,gBAAA,EACE,IAAA,WAAA;AACW,eAAM,MAAA;UAErB,CAAA,CAAA;;MAES,CAAC;KAAA;MAEV,CAAA,EAAA,IAAA;;EAEA,CAAE;;;;;;;;;;AAWJ,SAAe,eAAA,OAAA;AACb,KAAI,MAAK,SACP,QAAM,MAAM;AAEd,KAAI,CAAC,MAAG,WACN;AAEJ,QAAA;EAAA;EAAA,gBAAA,SAAA"}
@@ -77,7 +77,7 @@ function TypescriptFile(props) {
77
77
  * @returns The rendered source file header.
78
78
  */
79
79
  function TypescriptFileHeader(props) {
80
- const { header, hashbang, disableEslint = true, disableBiome = true, disablePrettier = false, children } = props;
80
+ const { header, hashbang, disableEslint = true, disableBiome = true, children } = props;
81
81
  const context = require_core_contexts_context.usePowerlinesSafe();
82
82
  return [
83
83
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
@@ -108,17 +108,6 @@ function TypescriptFileHeader(props) {
108
108
  }), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
109
109
  }
110
110
  }),
111
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
112
- get when() {
113
- return Boolean(disablePrettier);
114
- },
115
- get children() {
116
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_single_line_comment.SingleLineComment, {
117
- variant: "slash-star",
118
- children: "prettier-ignore"
119
- }), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
120
- }
121
- }),
122
111
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
123
112
  get when() {
124
113
  return Boolean(disableBiome);
@@ -129,7 +118,7 @@ function TypescriptFileHeader(props) {
129
118
  }),
130
119
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
131
120
  get when() {
132
- return Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome);
121
+ return Boolean(disableEslint) || Boolean(disableBiome);
133
122
  },
134
123
  get children() {
135
124
  return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
@@ -189,7 +178,7 @@ function TypescriptFileHeaderImports(props) {
189
178
  get ender() {
190
179
  return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
191
180
  },
192
- children: ([module, importItem]) => require_core_helpers_code.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module}";`
181
+ children: ([module, importItem]) => require_core_helpers_code.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => `${i.type ? "type " : ""}${i.alias ? i.alias : i.name}`).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : `${i.type ? "type " : ""}${i.alias ? `${i.name} as ${i.alias}` : i.name}`).join(", ")} }` : "")}`} from "${module}";`
193
182
  });
194
183
  }
195
184
  }),
@@ -206,7 +195,7 @@ function TypescriptFileHeaderImports(props) {
206
195
  get ender() {
207
196
  return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
208
197
  },
209
- children: ([module, importItem]) => require_core_helpers_code.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module.includes(":") ? module : `${context?.config?.framework || "powerlines"}:${module}`}";`
198
+ children: ([module, importItem]) => require_core_helpers_code.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => `${i.type ? "type " : ""}${i.alias ? i.alias : i.name}`).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : `${i.type ? "type " : ""}${i.alias ? `${i.name} as ${i.alias}` : i.name}`).join(", ")} }` : "")}`} from "${module.includes(":") ? module : `${context?.config?.framework || "powerlines"}:${module}`}";`
210
199
  });
211
200
  }
212
201
  }),