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