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