@powerlines/plugin-alloy 0.25.33 → 0.25.35

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 (80) hide show
  1. package/README.md +1 -1
  2. package/dist/core/components/output.cjs +17 -10
  3. package/dist/core/components/output.mjs +17 -10
  4. package/dist/core/components/output.mjs.map +1 -1
  5. package/dist/core/components/single-line-comment.cjs +6 -4
  6. package/dist/core/components/single-line-comment.mjs +6 -4
  7. package/dist/core/components/single-line-comment.mjs.map +1 -1
  8. package/dist/core/components/source-file.cjs +10 -6
  9. package/dist/core/components/source-file.mjs +10 -6
  10. package/dist/core/components/source-file.mjs.map +1 -1
  11. package/dist/core/components/spacing.cjs +6 -4
  12. package/dist/core/components/spacing.mjs +6 -4
  13. package/dist/core/components/spacing.mjs.map +1 -1
  14. package/dist/index.cjs +13 -18
  15. package/dist/index.d.cts.map +1 -1
  16. package/dist/index.d.mts.map +1 -1
  17. package/dist/index.mjs +12 -17
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/markdown/components/front-matter.cjs +9 -7
  20. package/dist/markdown/components/front-matter.mjs +9 -7
  21. package/dist/markdown/components/front-matter.mjs.map +1 -1
  22. package/dist/markdown/components/markdown-file.cjs +76 -44
  23. package/dist/markdown/components/markdown-file.mjs +76 -44
  24. package/dist/markdown/components/markdown-file.mjs.map +1 -1
  25. package/dist/markdown/components/markdown-table.cjs +49 -28
  26. package/dist/markdown/components/markdown-table.mjs +49 -28
  27. package/dist/markdown/components/markdown-table.mjs.map +1 -1
  28. package/dist/render.cjs +3 -3
  29. package/dist/render.mjs +4 -4
  30. package/dist/render.mjs.map +1 -1
  31. package/dist/typescript/components/builtin-file.cjs +29 -19
  32. package/dist/typescript/components/builtin-file.mjs +30 -20
  33. package/dist/typescript/components/builtin-file.mjs.map +1 -1
  34. package/dist/typescript/components/class-declaration.cjs +165 -100
  35. package/dist/typescript/components/class-declaration.mjs +165 -100
  36. package/dist/typescript/components/class-declaration.mjs.map +1 -1
  37. package/dist/typescript/components/dynamic-import-statement.cjs +2 -6
  38. package/dist/typescript/components/dynamic-import-statement.mjs +2 -6
  39. package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -1
  40. package/dist/typescript/components/entry-file.cjs +9 -6
  41. package/dist/typescript/components/entry-file.mjs +10 -7
  42. package/dist/typescript/components/entry-file.mjs.map +1 -1
  43. package/dist/typescript/components/infrastructure-file.cjs +9 -6
  44. package/dist/typescript/components/infrastructure-file.mjs +10 -7
  45. package/dist/typescript/components/infrastructure-file.mjs.map +1 -1
  46. package/dist/typescript/components/interface-declaration.cjs +121 -70
  47. package/dist/typescript/components/interface-declaration.mjs +121 -70
  48. package/dist/typescript/components/interface-declaration.mjs.map +1 -1
  49. package/dist/typescript/components/object-declaration.cjs +76 -44
  50. package/dist/typescript/components/object-declaration.mjs +76 -44
  51. package/dist/typescript/components/object-declaration.mjs.map +1 -1
  52. package/dist/typescript/components/property-name.cjs +3 -3
  53. package/dist/typescript/components/property-name.mjs +3 -3
  54. package/dist/typescript/components/property-name.mjs.map +1 -1
  55. package/dist/typescript/components/record-expression.mjs.map +1 -1
  56. package/dist/typescript/components/tsdoc-reflection.cjs +225 -104
  57. package/dist/typescript/components/tsdoc-reflection.mjs +225 -104
  58. package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -1
  59. package/dist/typescript/components/tsdoc.cjs +255 -160
  60. package/dist/typescript/components/tsdoc.mjs +255 -160
  61. package/dist/typescript/components/tsdoc.mjs.map +1 -1
  62. package/dist/typescript/components/type-declaration.cjs +20 -15
  63. package/dist/typescript/components/type-declaration.mjs +20 -15
  64. package/dist/typescript/components/type-declaration.mjs.map +1 -1
  65. package/dist/typescript/components/type-parameters.cjs +55 -29
  66. package/dist/typescript/components/type-parameters.mjs +55 -29
  67. package/dist/typescript/components/type-parameters.mjs.map +1 -1
  68. package/dist/typescript/components/typescript-file.cjs +145 -80
  69. package/dist/typescript/components/typescript-file.mjs +145 -80
  70. package/dist/typescript/components/typescript-file.mjs.map +1 -1
  71. package/dist/typescript/contexts/lexical-scope.cjs +5 -3
  72. package/dist/typescript/contexts/lexical-scope.mjs +5 -3
  73. package/dist/typescript/contexts/lexical-scope.mjs.map +1 -1
  74. package/dist/typescript/contexts/member-scope.cjs +5 -3
  75. package/dist/typescript/contexts/member-scope.mjs +5 -3
  76. package/dist/typescript/contexts/member-scope.mjs.map +1 -1
  77. package/dist/yaml/components/yaml-file.cjs +92 -47
  78. package/dist/yaml/components/yaml-file.mjs +92 -47
  79. package/dist/yaml/components/yaml-file.mjs.map +1 -1
  80. package/package.json +16 -17
@@ -3,8 +3,8 @@ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
3
  const require_core_contexts_reflection = require('../../core/contexts/reflection.cjs');
4
4
  const require_core_components_spacing = require('../../core/components/spacing.cjs');
5
5
  const require_typescript_components_tsdoc = require('./tsdoc.cjs');
6
- let _alloy_js_core = require("@alloy-js/core");
7
6
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
+ let _alloy_js_core = require("@alloy-js/core");
8
8
  let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
9
9
  let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
10
10
  let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
@@ -34,41 +34,77 @@ function TSDocReflectionClass(props) {
34
34
  const hidden = (0, _alloy_js_core.computed)(() => reflection.isHidden());
35
35
  if (!computedHeading.value || (0, _stryke_type_checks_is_set_string.isSetString)(computedHeading.value) && computedHeading.value.trim() === "") return null;
36
36
  const hasAttributes = (0, _alloy_js_core.computed)(() => (0, _stryke_type_checks_is_set_string.isSetString)(title.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(alias.value) && alias.value.length > 0 || !(0, _stryke_type_checks_is_undefined.isUndefined)(permission.value) && permission.value.length > 0 || (0, _stryke_type_checks_is_set_string.isSetString)(domain.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(readonly.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(internal.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(ignore.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(hidden.value));
37
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(require_typescript_components_tsdoc.TSDoc, {
38
- ...rest,
39
- heading: (0, _stryke_type_checks_is_set_string.isSetString)(computedHeading.value) ? computedHeading.value.trim() : computedHeading.value,
40
- children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
41
- when: hasAttributes.value,
42
- children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_typescript_components_tsdoc.TSDocAttributesTags, {
43
- title: title.value,
44
- alias: alias.value,
45
- domain: domain.value,
46
- permission: permission.value,
47
- readonly: readonly.value,
48
- internal: internal.value,
49
- ignore: ignore.value,
50
- hidden: hidden.value
51
- })
52
- }), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
53
- when: !(0, _stryke_type_checks_is_undefined.isUndefined)(children) && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0,
54
- children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
55
- when: hasAttributes.value,
56
- children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_spacing.Spacing, {})
57
- }), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.List, { children: (0, _alloy_js_core.childrenArray)(() => children) })]
58
- })]
59
- });
37
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
38
+ get heading() {
39
+ return (0, _alloy_js_core_jsx_runtime.memo)(() => !!(0, _stryke_type_checks_is_set_string.isSetString)(computedHeading.value))() ? computedHeading.value.trim() : computedHeading.value;
40
+ },
41
+ get children() {
42
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
43
+ get when() {
44
+ return hasAttributes.value;
45
+ },
46
+ get children() {
47
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
48
+ get title() {
49
+ return title.value;
50
+ },
51
+ get alias() {
52
+ return alias.value;
53
+ },
54
+ get domain() {
55
+ return domain.value;
56
+ },
57
+ get permission() {
58
+ return permission.value;
59
+ },
60
+ get readonly() {
61
+ return readonly.value;
62
+ },
63
+ get internal() {
64
+ return internal.value;
65
+ },
66
+ get ignore() {
67
+ return ignore.value;
68
+ },
69
+ get hidden() {
70
+ return hidden.value;
71
+ }
72
+ });
73
+ }
74
+ }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
75
+ get when() {
76
+ return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(children))() && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0;
77
+ },
78
+ get children() {
79
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
80
+ get when() {
81
+ return hasAttributes.value;
82
+ },
83
+ get children() {
84
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
85
+ }
86
+ }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
87
+ return (0, _alloy_js_core.childrenArray)(() => children);
88
+ } })];
89
+ }
90
+ })];
91
+ }
92
+ }));
60
93
  }
61
94
  /**
62
95
  * 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.
63
96
  */
64
97
  function TSDocContextClass(props) {
65
98
  const reflectionClass = require_core_contexts_reflection.useReflectionClass();
66
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
67
- when: (0, _stryke_type_checks.isSetObject)(reflectionClass.reflection),
68
- children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(TSDocReflectionClass, {
69
- ...props,
70
- reflection: reflectionClass.reflection
71
- })
99
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
100
+ get when() {
101
+ return (0, _stryke_type_checks.isSetObject)(reflectionClass.reflection);
102
+ },
103
+ get children() {
104
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionClass, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { get reflection() {
105
+ return reflectionClass.reflection;
106
+ } }));
107
+ }
72
108
  });
73
109
  }
74
110
  /**
@@ -78,43 +114,76 @@ function TSDocReflectionProperty(props) {
78
114
  const [{ children, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "reflection"]);
79
115
  if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
80
116
  const hasAttributes = (0, _alloy_js_core.computed)(() => (0, _stryke_type_checks_is_set_string.isSetString)(reflection.getTitle()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getAlias()) && reflection.getAlias().length > 0 || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getPermission()) && reflection.getPermission().length > 0 || (0, _stryke_type_checks_is_set_string.isSetString)(reflection.getDomain()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isReadonly()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isInternal()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isIgnored()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isHidden()) || reflection.hasDefault() && !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getDefaultValue()));
81
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(require_typescript_components_tsdoc.TSDoc, {
82
- heading: reflection.getDescription(),
83
- ...rest,
84
- children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
85
- when: hasAttributes.value,
86
- children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_typescript_components_tsdoc.TSDocAttributesTags, {
87
- type: reflection,
88
- title: reflection.getTitle(),
89
- alias: reflection.getAlias(),
90
- domain: reflection.getDomain(),
91
- permission: reflection.getPermission(),
92
- readonly: reflection.isReadonly(),
93
- internal: reflection.isInternal(),
94
- ignore: reflection.isIgnored(),
95
- hidden: reflection.isHidden(),
96
- defaultValue: reflection.getDefaultValue()
97
- })
98
- }), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
99
- when: !(0, _stryke_type_checks_is_undefined.isUndefined)(children) && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0,
100
- children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
101
- when: hasAttributes.value,
102
- children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_spacing.Spacing, {})
103
- }), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.List, { children: (0, _alloy_js_core.childrenArray)(() => children) })]
104
- })]
105
- });
117
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get heading() {
118
+ return reflection.getDescription();
119
+ } }, rest, { get children() {
120
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
121
+ get when() {
122
+ return hasAttributes.value;
123
+ },
124
+ get children() {
125
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
126
+ type: reflection,
127
+ get title() {
128
+ return reflection.getTitle();
129
+ },
130
+ get alias() {
131
+ return reflection.getAlias();
132
+ },
133
+ get domain() {
134
+ return reflection.getDomain();
135
+ },
136
+ get permission() {
137
+ return reflection.getPermission();
138
+ },
139
+ get readonly() {
140
+ return reflection.isReadonly();
141
+ },
142
+ get internal() {
143
+ return reflection.isInternal();
144
+ },
145
+ get ignore() {
146
+ return reflection.isIgnored();
147
+ },
148
+ get hidden() {
149
+ return reflection.isHidden();
150
+ },
151
+ get defaultValue() {
152
+ return reflection.getDefaultValue();
153
+ }
154
+ });
155
+ }
156
+ }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
157
+ get when() {
158
+ return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(children))() && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0;
159
+ },
160
+ get children() {
161
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
162
+ get when() {
163
+ return hasAttributes.value;
164
+ },
165
+ get children() {
166
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
167
+ }
168
+ }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
169
+ return (0, _alloy_js_core.childrenArray)(() => children);
170
+ } })];
171
+ }
172
+ })];
173
+ } }));
106
174
  }
107
175
  /**
108
176
  * 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.
109
177
  */
110
178
  function TSDocContextProperty(props) {
111
179
  const reflection = require_core_contexts_reflection.useReflectionProperty();
112
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
113
- when: (0, _stryke_type_checks.isSetObject)(reflection),
114
- children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(TSDocReflectionProperty, {
115
- ...props,
116
- reflection
117
- })
180
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
181
+ get when() {
182
+ return (0, _stryke_type_checks.isSetObject)(reflection);
183
+ },
184
+ get children() {
185
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionProperty, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { reflection }));
186
+ }
118
187
  });
119
188
  }
120
189
  /**
@@ -123,60 +192,112 @@ function TSDocContextProperty(props) {
123
192
  function TSDocReflectionMethod(props) {
124
193
  const [{ children, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "reflection"]);
125
194
  if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
126
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(require_typescript_components_tsdoc.TSDoc, {
127
- heading: (0, _alloy_js_core.computed)(() => reflection.getDescription() || ((0, _stryke_type_checks_is_string.isString)(reflection.getName()) ? _alloy_js_core.code`${String(reflection.getName())} method definition` : void 0)).value,
128
- ...rest,
129
- children: [
130
- /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_typescript_components_tsdoc.TSDocAttributesTags, {
131
- title: reflection.getTitle(),
132
- alias: reflection.getAlias(),
133
- domain: reflection.getDomain(),
134
- permission: reflection.getPermission(),
135
- readonly: reflection.isReadonly(),
136
- internal: reflection.isInternal(),
137
- ignore: reflection.isIgnored(),
138
- hidden: reflection.isHidden()
195
+ const heading = (0, _alloy_js_core.computed)(() => reflection.getDescription() || ((0, _stryke_type_checks_is_string.isString)(reflection.getName()) ? _alloy_js_core.code`${String(reflection.getName())} method definition` : void 0));
196
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get heading() {
197
+ return heading.value;
198
+ } }, rest, { get children() {
199
+ return [
200
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
201
+ get title() {
202
+ return reflection.getTitle();
203
+ },
204
+ get alias() {
205
+ return reflection.getAlias();
206
+ },
207
+ get domain() {
208
+ return reflection.getDomain();
209
+ },
210
+ get permission() {
211
+ return reflection.getPermission();
212
+ },
213
+ get readonly() {
214
+ return reflection.isReadonly();
215
+ },
216
+ get internal() {
217
+ return reflection.isInternal();
218
+ },
219
+ get ignore() {
220
+ return reflection.isIgnored();
221
+ },
222
+ get hidden() {
223
+ return reflection.isHidden();
224
+ }
139
225
  }),
140
- /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
141
- when: Boolean(children) && (0, _alloy_js_core.childrenArray)(() => children).length > 0,
142
- children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.List, { children: (0, _alloy_js_core.childrenArray)(() => children) })
226
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
227
+ get when() {
228
+ return (0, _alloy_js_core_jsx_runtime.memo)(() => !!Boolean(children))() && (0, _alloy_js_core.childrenArray)(() => children).length > 0;
229
+ },
230
+ get children() {
231
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
232
+ return (0, _alloy_js_core.childrenArray)(() => children);
233
+ } });
234
+ }
143
235
  }),
144
- /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
145
- when: reflection.getParameters().length > 0,
146
- children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_spacing.Spacing, {}), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.For, {
147
- each: reflection.getParameters(),
148
- hardline: true,
149
- ender: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {}),
150
- children: (param) => /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_typescript_components_tsdoc.TSDocParam, {
151
- name: param.getName(),
152
- optional: param.isOptional(),
153
- defaultValue: param.hasDefault() ? param.getDefaultValue() : void 0,
154
- children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
155
- when: Boolean(param.parameter.description),
156
- fallback: _alloy_js_core.code`A parameter to provide a ${param.getName()} value to the function.`,
157
- children: param.parameter.description
236
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
237
+ get when() {
238
+ return reflection.getParameters().length > 0;
239
+ },
240
+ get children() {
241
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
242
+ get each() {
243
+ return reflection.getParameters();
244
+ },
245
+ hardline: true,
246
+ get ender() {
247
+ return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
248
+ },
249
+ children: (param) => (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocParam, {
250
+ get name() {
251
+ return param.getName();
252
+ },
253
+ get optional() {
254
+ return param.isOptional();
255
+ },
256
+ get defaultValue() {
257
+ return (0, _alloy_js_core_jsx_runtime.memo)(() => !!param.hasDefault())() ? param.getDefaultValue() : void 0;
258
+ },
259
+ get children() {
260
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
261
+ get when() {
262
+ return Boolean(param.parameter.description);
263
+ },
264
+ get fallback() {
265
+ return _alloy_js_core.code`A parameter to provide a ${param.getName()} value to the function.`;
266
+ },
267
+ get children() {
268
+ return param.parameter.description;
269
+ }
270
+ });
271
+ }
158
272
  })
159
- })
160
- })]
273
+ })];
274
+ }
161
275
  }),
162
- /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
163
- when: reflection.getReturnType().kind !== _powerlines_deepkit_vendor_type.ReflectionKind.void,
164
- children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_spacing.Spacing, {}), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_typescript_components_tsdoc.TSDocReturns, { children: _alloy_js_core.code`The return value of the function, which is of type ${(0, _powerlines_deepkit_vendor_type.stringifyType)(reflection.getReturnType())}.` })]
276
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
277
+ get when() {
278
+ return reflection.getReturnType().kind !== _powerlines_deepkit_vendor_type.ReflectionKind.void;
279
+ },
280
+ get children() {
281
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocReturns, { get children() {
282
+ return _alloy_js_core.code`The return value of the function, which is of type ${(0, _powerlines_deepkit_vendor_type.stringifyType)(reflection.getReturnType())}.`;
283
+ } })];
284
+ }
165
285
  })
166
- ]
167
- });
286
+ ];
287
+ } }));
168
288
  }
169
289
  /**
170
290
  * 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.
171
291
  */
172
292
  function TSDocContextMethod(props) {
173
293
  const reflection = require_core_contexts_reflection.useReflectionMethod();
174
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
175
- when: (0, _stryke_type_checks.isSetObject)(reflection),
176
- children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(TSDocReflectionMethod, {
177
- ...props,
178
- reflection
179
- })
294
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
295
+ get when() {
296
+ return (0, _stryke_type_checks.isSetObject)(reflection);
297
+ },
298
+ get children() {
299
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionMethod, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { reflection }));
300
+ }
180
301
  });
181
302
  }
182
303