@powerlines/plugin-alloy 0.25.27 → 0.25.29
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/output.cjs +7 -19
- package/dist/core/components/output.mjs +7 -19
- package/dist/core/components/output.mjs.map +1 -1
- package/dist/core/components/single-line-comment.cjs +8 -7
- package/dist/core/components/single-line-comment.mjs +8 -7
- package/dist/core/components/single-line-comment.mjs.map +1 -1
- package/dist/core/components/source-file.cjs +7 -12
- package/dist/core/components/source-file.mjs +7 -12
- package/dist/core/components/source-file.mjs.map +1 -1
- package/dist/core/components/spacing.cjs +6 -7
- package/dist/core/components/spacing.mjs +6 -7
- 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/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 +6 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +6 -3
- package/dist/index.mjs.map +1 -1
- package/dist/markdown/components/front-matter.cjs +9 -14
- package/dist/markdown/components/front-matter.mjs +9 -14
- package/dist/markdown/components/front-matter.mjs.map +1 -1
- package/dist/markdown/components/markdown-file.cjs +41 -89
- package/dist/markdown/components/markdown-file.mjs +41 -89
- package/dist/markdown/components/markdown-file.mjs.map +1 -1
- package/dist/markdown/components/markdown-table.cjs +20 -52
- package/dist/markdown/components/markdown-table.mjs +20 -52
- package/dist/markdown/components/markdown-table.mjs.map +1 -1
- package/dist/markdown/contexts/markdown-table.mjs.map +1 -1
- package/dist/render.cjs +4 -10
- package/dist/render.mjs +4 -10
- package/dist/render.mjs.map +1 -1
- package/dist/typescript/components/builtin-file.cjs +9 -31
- package/dist/typescript/components/builtin-file.mjs +9 -31
- package/dist/typescript/components/builtin-file.mjs.map +1 -1
- package/dist/typescript/components/class-declaration.cjs +80 -193
- package/dist/typescript/components/class-declaration.mjs +80 -193
- package/dist/typescript/components/class-declaration.mjs.map +1 -1
- package/dist/typescript/components/dynamic-import-statement.cjs +1 -2
- package/dist/typescript/components/dynamic-import-statement.mjs +1 -2
- package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -1
- package/dist/typescript/components/entry-file.cjs +3 -10
- package/dist/typescript/components/entry-file.mjs +3 -10
- package/dist/typescript/components/entry-file.mjs.map +1 -1
- package/dist/typescript/components/infrastructure-file.cjs +3 -10
- package/dist/typescript/components/infrastructure-file.mjs +3 -10
- package/dist/typescript/components/infrastructure-file.mjs.map +1 -1
- package/dist/typescript/components/interface-declaration.cjs +47 -134
- package/dist/typescript/components/interface-declaration.mjs +47 -134
- package/dist/typescript/components/interface-declaration.mjs.map +1 -1
- package/dist/typescript/components/object-declaration.cjs +35 -79
- package/dist/typescript/components/object-declaration.mjs +35 -79
- 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 +53 -232
- package/dist/typescript/components/tsdoc-reflection.mjs +53 -232
- package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -1
- package/dist/typescript/components/tsdoc.cjs +140 -306
- package/dist/typescript/components/tsdoc.mjs +140 -306
- package/dist/typescript/components/tsdoc.mjs.map +1 -1
- package/dist/typescript/components/type-declaration.cjs +9 -22
- package/dist/typescript/components/type-declaration.mjs +9 -22
- package/dist/typescript/components/type-declaration.mjs.map +1 -1
- package/dist/typescript/components/type-parameters.cjs +33 -60
- package/dist/typescript/components/type-parameters.mjs +33 -60
- package/dist/typescript/components/type-parameters.mjs.map +1 -1
- package/dist/typescript/components/typescript-file.cjs +65 -155
- package/dist/typescript/components/typescript-file.mjs +65 -155
- package/dist/typescript/components/typescript-file.mjs.map +1 -1
- package/dist/typescript/contexts/lexical-scope.cjs +1 -7
- package/dist/typescript/contexts/lexical-scope.mjs +1 -7
- package/dist/typescript/contexts/lexical-scope.mjs.map +1 -1
- package/dist/typescript/contexts/member-scope.cjs +2 -7
- package/dist/typescript/contexts/member-scope.mjs +2 -7
- 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 +48 -103
- package/dist/yaml/components/yaml-file.mjs +48 -103
- package/dist/yaml/components/yaml-file.mjs.map +1 -1
- package/package.json +7 -7
- package/dist/_virtual/_rolldown/runtime.mjs +0 -3
|
@@ -2,7 +2,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_core_contexts_context = require('../../core/contexts/context.cjs');
|
|
4
4
|
const require_core_components_spacing = require('../../core/components/spacing.cjs');
|
|
5
|
-
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
5
|
let _alloy_js_core = require("@alloy-js/core");
|
|
7
6
|
let _powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
|
|
8
7
|
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
@@ -14,85 +13,48 @@ let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-stri
|
|
|
14
13
|
*/
|
|
15
14
|
function TSDoc(props) {
|
|
16
15
|
const [{ children, heading }] = (0, _alloy_js_core.splitProps)(props, ["children", "heading"]);
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
get children() {
|
|
35
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
36
|
-
get when() {
|
|
37
|
-
return !(0, _stryke_type_checks_is_undefined.isUndefined)(heading);
|
|
38
|
-
},
|
|
39
|
-
get children() {
|
|
40
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
|
|
41
|
-
}
|
|
42
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
43
|
-
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
44
|
-
} })];
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
];
|
|
48
|
-
}
|
|
49
|
-
}),
|
|
50
|
-
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
51
|
-
`*/`,
|
|
52
|
-
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
53
|
-
];
|
|
16
|
+
return <>
|
|
17
|
+
/**
|
|
18
|
+
<align string=" * ">
|
|
19
|
+
<hbr />
|
|
20
|
+
<_alloy_js_core.Show when={!(0, _stryke_type_checks_is_undefined.isUndefined)(heading)}>{heading}</_alloy_js_core.Show>
|
|
21
|
+
<_alloy_js_core.Show when={!(0, _stryke_type_checks_is_undefined.isUndefined)(children) && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0}>
|
|
22
|
+
<_alloy_js_core.Show when={!(0, _stryke_type_checks_is_undefined.isUndefined)(heading)}>
|
|
23
|
+
<require_core_components_spacing.Spacing />
|
|
24
|
+
</_alloy_js_core.Show>
|
|
25
|
+
<_alloy_js_core.List>{(0, _alloy_js_core.childrenArray)(() => children)}</_alloy_js_core.List>
|
|
26
|
+
</_alloy_js_core.Show>
|
|
27
|
+
</align>
|
|
28
|
+
<hbr />
|
|
29
|
+
{`*/`}
|
|
30
|
+
<hbr />
|
|
31
|
+
</>;
|
|
54
32
|
}
|
|
55
33
|
/**
|
|
56
34
|
* Create a TSDoc `@<props.tag>` tag.
|
|
57
35
|
*/
|
|
58
36
|
function TSDocTag(props) {
|
|
59
37
|
const [{ children, tag }] = (0, _alloy_js_core.splitProps)(props, ["children", "tag"]);
|
|
60
|
-
return
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
get children() {
|
|
70
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { children });
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}),
|
|
75
|
-
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("sbr", {})
|
|
76
|
-
];
|
|
38
|
+
return <>
|
|
39
|
+
{`@${tag} `}
|
|
40
|
+
<_alloy_js_core.Show when={Boolean(children)}>
|
|
41
|
+
<align width={2}>
|
|
42
|
+
<_alloy_js_core.Prose>{children}</_alloy_js_core.Prose>
|
|
43
|
+
</align>
|
|
44
|
+
</_alloy_js_core.Show>
|
|
45
|
+
<sbr />
|
|
46
|
+
</>;
|
|
77
47
|
}
|
|
78
48
|
/**
|
|
79
49
|
* A component that creates a TSDoc block with `@param` tags for each parameter.
|
|
80
50
|
*/
|
|
81
51
|
function TSDocParams(props) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
get optional() {
|
|
89
|
-
return param.optional;
|
|
90
|
-
},
|
|
91
|
-
get children() {
|
|
92
|
-
return param.doc;
|
|
93
|
-
}
|
|
94
|
-
})
|
|
95
|
-
});
|
|
52
|
+
const parameters = normalizeParametersForDoc(props.parameters);
|
|
53
|
+
return <_alloy_js_core.For each={parameters}>
|
|
54
|
+
{(param) => <TSDocParam name={param.name} optional={param.optional}>
|
|
55
|
+
{param.doc}
|
|
56
|
+
</TSDocParam>}
|
|
57
|
+
</_alloy_js_core.For>;
|
|
96
58
|
}
|
|
97
59
|
function normalizeParametersForDoc(parameters) {
|
|
98
60
|
if (parameters.some((p) => typeof p === "string")) return [];
|
|
@@ -103,82 +65,66 @@ function normalizeParametersForDoc(parameters) {
|
|
|
103
65
|
*/
|
|
104
66
|
function TSDocTitle(props) {
|
|
105
67
|
const [{ children }, rest] = (0, _alloy_js_core.splitProps)(props, ["children"]);
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}));
|
|
68
|
+
return <TSDocTag {...rest} tag="title">
|
|
69
|
+
{children}
|
|
70
|
+
</TSDocTag>;
|
|
110
71
|
}
|
|
111
72
|
/**
|
|
112
73
|
* Create a TSDoc `@domain` tag.
|
|
113
74
|
*/
|
|
114
75
|
function TSDocDomain(props) {
|
|
115
76
|
const [{ children }, rest] = (0, _alloy_js_core.splitProps)(props, ["children"]);
|
|
116
|
-
return
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}));
|
|
77
|
+
return <TSDocTag {...rest} tag="domain">
|
|
78
|
+
{children}
|
|
79
|
+
</TSDocTag>;
|
|
120
80
|
}
|
|
121
81
|
/**
|
|
122
82
|
* Create a TSDoc `@alias` tag.
|
|
123
83
|
*/
|
|
124
84
|
function TSDocAlias(props) {
|
|
125
85
|
const [{ children }, rest] = (0, _alloy_js_core.splitProps)(props, ["children"]);
|
|
126
|
-
return
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}));
|
|
86
|
+
return <TSDocTag {...rest} tag="alias">
|
|
87
|
+
{children}
|
|
88
|
+
</TSDocTag>;
|
|
130
89
|
}
|
|
131
90
|
/**
|
|
132
91
|
* Create a TSDoc `@permission` tag.
|
|
133
92
|
*/
|
|
134
93
|
function TSDocPermission(props) {
|
|
135
94
|
const [{ children }, rest] = (0, _alloy_js_core.splitProps)(props, ["children"]);
|
|
136
|
-
return
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}));
|
|
95
|
+
return <TSDocTag {...rest} tag="permission">
|
|
96
|
+
{children}
|
|
97
|
+
</TSDocTag>;
|
|
140
98
|
}
|
|
141
99
|
/**
|
|
142
100
|
* Create a TSDoc `@defaultValue` tag.
|
|
143
101
|
*/
|
|
144
102
|
function TSDocDefaultValue(props) {
|
|
145
103
|
const [{ type, defaultValue }] = (0, _alloy_js_core.splitProps)(props, ["type", "defaultValue"]);
|
|
146
|
-
return
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { get children() {
|
|
155
|
-
return (0, _powerlines_deepkit_utilities.stringifyDefaultValue)(type, defaultValue);
|
|
156
|
-
} });
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
})];
|
|
104
|
+
return <>
|
|
105
|
+
{"@defaultValue "}
|
|
106
|
+
<_alloy_js_core.Show when={!(0, _stryke_type_checks_is_undefined.isUndefined)(defaultValue)}>
|
|
107
|
+
<align width={2}>
|
|
108
|
+
<_alloy_js_core.Prose>{(0, _powerlines_deepkit_utilities.stringifyDefaultValue)(type, defaultValue)}</_alloy_js_core.Prose>
|
|
109
|
+
</align>
|
|
110
|
+
</_alloy_js_core.Show>
|
|
111
|
+
</>;
|
|
161
112
|
}
|
|
162
113
|
/**
|
|
163
114
|
* Create a TSDoc `@remarks` tag.
|
|
164
115
|
*/
|
|
165
116
|
function TSDocRemarks(props) {
|
|
166
|
-
return
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
get children() {
|
|
172
|
-
return (0, _alloy_js_core.childrenArray)(() => props.children);
|
|
173
|
-
}
|
|
174
|
-
})
|
|
175
|
-
];
|
|
117
|
+
return <>
|
|
118
|
+
{"@remarks "}
|
|
119
|
+
<hbr />
|
|
120
|
+
<_alloy_js_core.List hardline={true}>{(0, _alloy_js_core.childrenArray)(() => props.children)}</_alloy_js_core.List>
|
|
121
|
+
</>;
|
|
176
122
|
}
|
|
177
123
|
/**
|
|
178
124
|
* Create a TSDoc `@see` tag.
|
|
179
125
|
*/
|
|
180
126
|
function TSDocLink(props) {
|
|
181
|
-
return
|
|
127
|
+
return <TSDocTag {...props} tag="see" />;
|
|
182
128
|
}
|
|
183
129
|
/**
|
|
184
130
|
* Create a TSDoc `@example` tag.
|
|
@@ -190,51 +136,43 @@ function TSDocExample(props) {
|
|
|
190
136
|
"language",
|
|
191
137
|
"children"
|
|
192
138
|
]);
|
|
193
|
-
return
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
children,
|
|
207
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
208
|
-
when: fenced,
|
|
209
|
-
get children() {
|
|
210
|
-
return [(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}), "```"];
|
|
211
|
-
}
|
|
212
|
-
})
|
|
213
|
-
];
|
|
139
|
+
return <>
|
|
140
|
+
{"@example "}
|
|
141
|
+
<hbr />
|
|
142
|
+
<_alloy_js_core.Show when={fenced}>
|
|
143
|
+
```{language || (tsx ? "tsx" : "ts")}
|
|
144
|
+
<hbr />
|
|
145
|
+
</_alloy_js_core.Show>
|
|
146
|
+
{children}
|
|
147
|
+
<_alloy_js_core.Show when={fenced}>
|
|
148
|
+
<hbr />
|
|
149
|
+
```
|
|
150
|
+
</_alloy_js_core.Show>
|
|
151
|
+
</>;
|
|
214
152
|
}
|
|
215
153
|
/**
|
|
216
154
|
* Create a TSDoc `@readonly` tag.
|
|
217
155
|
*/
|
|
218
156
|
function TSDocReadonly() {
|
|
219
|
-
return
|
|
157
|
+
return <TSDocTag tag="readonly" />;
|
|
220
158
|
}
|
|
221
159
|
/**
|
|
222
160
|
* Create a TSDoc `@internal` tag.
|
|
223
161
|
*/
|
|
224
162
|
function TSDocInternal() {
|
|
225
|
-
return
|
|
163
|
+
return <TSDocTag tag="internal" />;
|
|
226
164
|
}
|
|
227
165
|
/**
|
|
228
166
|
* Create a TSDoc `@ignore` tag.
|
|
229
167
|
*/
|
|
230
168
|
function TSDocIgnore() {
|
|
231
|
-
return
|
|
169
|
+
return <TSDocTag tag="ignore" />;
|
|
232
170
|
}
|
|
233
171
|
/**
|
|
234
172
|
* Create a TSDoc `@hidden` tag.
|
|
235
173
|
*/
|
|
236
174
|
function TSDocHidden() {
|
|
237
|
-
return
|
|
175
|
+
return <TSDocTag tag="hidden" />;
|
|
238
176
|
}
|
|
239
177
|
/**
|
|
240
178
|
* Generates a TypeScript interface property for the given reflection class.
|
|
@@ -252,165 +190,77 @@ function TSDocAttributesTags(props) {
|
|
|
252
190
|
]);
|
|
253
191
|
const title = (0, _alloy_js_core.computed)(() => props.title?.trim() || "");
|
|
254
192
|
const domain = (0, _alloy_js_core.computed)(() => props.domain?.trim() || "");
|
|
255
|
-
return
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}),
|
|
289
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
290
|
-
get when() {
|
|
291
|
-
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!(!(0, _stryke_type_checks_is_undefined.isUndefined)(permission) && permission.length > 0))() && permission.some((p) => (0, _stryke_type_checks_is_set_string.isSetString)(p?.trim()));
|
|
292
|
-
},
|
|
293
|
-
get children() {
|
|
294
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
295
|
-
get each() {
|
|
296
|
-
return permission?.filter((p) => (0, _stryke_type_checks_is_set_string.isSetString)(p?.trim())) ?? [];
|
|
297
|
-
},
|
|
298
|
-
children: (permission) => (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocPermission, { children: permission })
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
}),
|
|
302
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
303
|
-
when: readonly === true,
|
|
304
|
-
get children() {
|
|
305
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReadonly, {});
|
|
306
|
-
}
|
|
307
|
-
}),
|
|
308
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
309
|
-
when: internal === true,
|
|
310
|
-
get children() {
|
|
311
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocInternal, {});
|
|
312
|
-
}
|
|
313
|
-
}),
|
|
314
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
315
|
-
when: ignore === true,
|
|
316
|
-
get children() {
|
|
317
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocIgnore, {});
|
|
318
|
-
}
|
|
319
|
-
}),
|
|
320
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
321
|
-
when: hidden === true,
|
|
322
|
-
get children() {
|
|
323
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocHidden, {});
|
|
324
|
-
}
|
|
325
|
-
}),
|
|
326
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
327
|
-
get when() {
|
|
328
|
-
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(type))() && !(0, _stryke_type_checks_is_undefined.isUndefined)(defaultValue);
|
|
329
|
-
},
|
|
330
|
-
get children() {
|
|
331
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocDefaultValue, {
|
|
332
|
-
type,
|
|
333
|
-
defaultValue
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
})
|
|
337
|
-
];
|
|
193
|
+
return <>
|
|
194
|
+
<_alloy_js_core.Show when={(0, _stryke_type_checks_is_set_string.isSetString)(title.value)}>
|
|
195
|
+
<TSDocTitle>{title.value}</TSDocTitle>
|
|
196
|
+
</_alloy_js_core.Show>
|
|
197
|
+
<_alloy_js_core.Show when={!(0, _stryke_type_checks_is_undefined.isUndefined)(alias) && alias.length > 0 && alias.some((a) => (0, _stryke_type_checks_is_set_string.isSetString)(a?.trim()))}>
|
|
198
|
+
<_alloy_js_core.For each={alias?.filter((a) => (0, _stryke_type_checks_is_set_string.isSetString)(a?.trim())) ?? []}>
|
|
199
|
+
{(alias) => <TSDocAlias>{alias}</TSDocAlias>}
|
|
200
|
+
</_alloy_js_core.For>
|
|
201
|
+
</_alloy_js_core.Show>
|
|
202
|
+
<_alloy_js_core.Show when={(0, _stryke_type_checks_is_set_string.isSetString)(domain.value)}>
|
|
203
|
+
<TSDocDomain>{domain.value}</TSDocDomain>
|
|
204
|
+
</_alloy_js_core.Show>
|
|
205
|
+
<_alloy_js_core.Show when={!(0, _stryke_type_checks_is_undefined.isUndefined)(permission) && permission.length > 0 && permission.some((p) => (0, _stryke_type_checks_is_set_string.isSetString)(p?.trim()))}>
|
|
206
|
+
<_alloy_js_core.For each={permission?.filter((p) => (0, _stryke_type_checks_is_set_string.isSetString)(p?.trim())) ?? []}>
|
|
207
|
+
{(permission) => <TSDocPermission>{permission}</TSDocPermission>}
|
|
208
|
+
</_alloy_js_core.For>
|
|
209
|
+
</_alloy_js_core.Show>
|
|
210
|
+
<_alloy_js_core.Show when={readonly === true}>
|
|
211
|
+
<TSDocReadonly />
|
|
212
|
+
</_alloy_js_core.Show>
|
|
213
|
+
<_alloy_js_core.Show when={internal === true}>
|
|
214
|
+
<TSDocInternal />
|
|
215
|
+
</_alloy_js_core.Show>
|
|
216
|
+
<_alloy_js_core.Show when={ignore === true}>
|
|
217
|
+
<TSDocIgnore />
|
|
218
|
+
</_alloy_js_core.Show>
|
|
219
|
+
<_alloy_js_core.Show when={hidden === true}>
|
|
220
|
+
<TSDocHidden />
|
|
221
|
+
</_alloy_js_core.Show>
|
|
222
|
+
<_alloy_js_core.Show when={!(0, _stryke_type_checks_is_undefined.isUndefined)(type) && !(0, _stryke_type_checks_is_undefined.isUndefined)(defaultValue)}>
|
|
223
|
+
<TSDocDefaultValue type={type} defaultValue={defaultValue} />
|
|
224
|
+
</_alloy_js_core.Show>
|
|
225
|
+
</>;
|
|
338
226
|
}
|
|
339
227
|
/**
|
|
340
228
|
* Create a TSDoc parameter set off with `@param`.
|
|
341
229
|
*/
|
|
342
230
|
function TSDocParam(props) {
|
|
343
|
-
return
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
},
|
|
349
|
-
get optional() {
|
|
350
|
-
return props.optional;
|
|
351
|
-
},
|
|
352
|
-
get defaultValue() {
|
|
353
|
-
return props.defaultValue;
|
|
354
|
-
}
|
|
355
|
-
}),
|
|
356
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(TSDocParamDescription, { get children() {
|
|
357
|
-
return props.children;
|
|
358
|
-
} })
|
|
359
|
-
];
|
|
231
|
+
return <>
|
|
232
|
+
{"@param "}
|
|
233
|
+
<TSDocParamName name={props.name} optional={props.optional} defaultValue={props.defaultValue} />
|
|
234
|
+
<TSDocParamDescription children={props.children} />
|
|
235
|
+
</>;
|
|
360
236
|
}
|
|
361
237
|
function TSDocParamName(props) {
|
|
362
|
-
return
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}),
|
|
369
|
-
(0, _alloy_js_core_jsx_runtime.memo)(() => props.name),
|
|
370
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
371
|
-
get when() {
|
|
372
|
-
return Boolean(props.defaultValue);
|
|
373
|
-
},
|
|
374
|
-
get children() {
|
|
375
|
-
return ["=", (0, _alloy_js_core_jsx_runtime.memo)(() => props.defaultValue)];
|
|
376
|
-
}
|
|
377
|
-
}),
|
|
378
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
379
|
-
get when() {
|
|
380
|
-
return props.optional;
|
|
381
|
-
},
|
|
382
|
-
children: "]"
|
|
383
|
-
})
|
|
384
|
-
];
|
|
238
|
+
return <>
|
|
239
|
+
<_alloy_js_core.Show when={props.optional}>{"["}</_alloy_js_core.Show>
|
|
240
|
+
{props.name}
|
|
241
|
+
<_alloy_js_core.Show when={Boolean(props.defaultValue)}>={props.defaultValue}</_alloy_js_core.Show>
|
|
242
|
+
<_alloy_js_core.Show when={props.optional}>{"]"}</_alloy_js_core.Show>
|
|
243
|
+
</>;
|
|
385
244
|
}
|
|
386
245
|
function TSDocParamDescription(props) {
|
|
387
|
-
return
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
width: 2,
|
|
394
|
-
get children() {
|
|
395
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { get children() {
|
|
396
|
-
return props.children;
|
|
397
|
-
} });
|
|
398
|
-
}
|
|
399
|
-
})];
|
|
400
|
-
}
|
|
401
|
-
});
|
|
246
|
+
return <_alloy_js_core.Show when={Boolean(props.children)}>
|
|
247
|
+
{" - "}
|
|
248
|
+
<align width={2}>
|
|
249
|
+
<_alloy_js_core.Prose>{props.children}</_alloy_js_core.Prose>
|
|
250
|
+
</align>
|
|
251
|
+
</_alloy_js_core.Show>;
|
|
402
252
|
}
|
|
403
253
|
/**
|
|
404
254
|
* Create a TSDoc `@returns` tag.
|
|
405
255
|
*/
|
|
406
256
|
function TSDocReturns(props) {
|
|
407
|
-
return
|
|
257
|
+
return <TSDocTag {...props} tag="returns" />;
|
|
408
258
|
}
|
|
409
259
|
/**
|
|
410
260
|
* Create a TSDoc `@throws` tag.
|
|
411
261
|
*/
|
|
412
262
|
function TSDocThrows(props) {
|
|
413
|
-
return
|
|
263
|
+
return <TSDocTag {...props} tag="throws" />;
|
|
414
264
|
}
|
|
415
265
|
/**
|
|
416
266
|
* Generates a TSDoc `@module` tag for the given module name.
|
|
@@ -422,36 +272,20 @@ function TSDocModule(props) {
|
|
|
422
272
|
"prefix"
|
|
423
273
|
]);
|
|
424
274
|
const context = require_core_contexts_context.usePowerlinesSafe();
|
|
425
|
-
return
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
get children() {
|
|
440
|
-
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
441
|
-
}
|
|
442
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {})];
|
|
443
|
-
}
|
|
444
|
-
}),
|
|
445
|
-
"@module ",
|
|
446
|
-
(0, _alloy_js_core_jsx_runtime.memo)(() => prefix || context?.config?.framework || "powerlines"),
|
|
447
|
-
":",
|
|
448
|
-
name
|
|
449
|
-
];
|
|
450
|
-
}
|
|
451
|
-
}),
|
|
452
|
-
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
453
|
-
` */`
|
|
454
|
-
];
|
|
275
|
+
return <>
|
|
276
|
+
/**
|
|
277
|
+
<align string=" * ">
|
|
278
|
+
<hbr />
|
|
279
|
+
<_alloy_js_core.Show when={Boolean(children)}>
|
|
280
|
+
<_alloy_js_core.List hardline={true}>{(0, _alloy_js_core.childrenArray)(() => children)}</_alloy_js_core.List>
|
|
281
|
+
<require_core_components_spacing.Spacing />
|
|
282
|
+
</_alloy_js_core.Show>
|
|
283
|
+
{"@module "}
|
|
284
|
+
{prefix || context?.config?.framework || "powerlines"}:{name}
|
|
285
|
+
</align>
|
|
286
|
+
<hbr />
|
|
287
|
+
{` */`}
|
|
288
|
+
</>;
|
|
455
289
|
}
|
|
456
290
|
|
|
457
291
|
//#endregion
|