@powerlines/plugin-alloy 0.25.27 → 0.25.28
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.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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
|
|
2
2
|
import { Spacing } from "../../core/components/spacing.mjs";
|
|
3
|
-
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
4
3
|
import { For, List, Prose, Show, childrenArray, computed, splitProps } from "@alloy-js/core";
|
|
5
4
|
import { stringifyDefaultValue } from "@powerlines/deepkit/utilities";
|
|
6
5
|
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
@@ -12,85 +11,48 @@ import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
|
12
11
|
*/
|
|
13
12
|
function TSDoc(props) {
|
|
14
13
|
const [{ children, heading }] = splitProps(props, ["children", "heading"]);
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
get children() {
|
|
33
|
-
return [createComponent(Show, {
|
|
34
|
-
get when() {
|
|
35
|
-
return !isUndefined(heading);
|
|
36
|
-
},
|
|
37
|
-
get children() {
|
|
38
|
-
return createComponent(Spacing, {});
|
|
39
|
-
}
|
|
40
|
-
}), createComponent(List, { get children() {
|
|
41
|
-
return childrenArray(() => children);
|
|
42
|
-
} })];
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
];
|
|
46
|
-
}
|
|
47
|
-
}),
|
|
48
|
-
createIntrinsic("hbr", {}),
|
|
49
|
-
`*/`,
|
|
50
|
-
createIntrinsic("hbr", {})
|
|
51
|
-
];
|
|
14
|
+
return <>
|
|
15
|
+
/**
|
|
16
|
+
<align string=" * ">
|
|
17
|
+
<hbr />
|
|
18
|
+
<Show when={!isUndefined(heading)}>{heading}</Show>
|
|
19
|
+
<Show when={!isUndefined(children) && childrenArray(() => children).filter(Boolean).length > 0}>
|
|
20
|
+
<Show when={!isUndefined(heading)}>
|
|
21
|
+
<Spacing />
|
|
22
|
+
</Show>
|
|
23
|
+
<List>{childrenArray(() => children)}</List>
|
|
24
|
+
</Show>
|
|
25
|
+
</align>
|
|
26
|
+
<hbr />
|
|
27
|
+
{`*/`}
|
|
28
|
+
<hbr />
|
|
29
|
+
</>;
|
|
52
30
|
}
|
|
53
31
|
/**
|
|
54
32
|
* Create a TSDoc `@<props.tag>` tag.
|
|
55
33
|
*/
|
|
56
34
|
function TSDocTag(props) {
|
|
57
35
|
const [{ children, tag }] = splitProps(props, ["children", "tag"]);
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
get children() {
|
|
68
|
-
return createComponent(Prose, { children });
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
}),
|
|
73
|
-
createIntrinsic("sbr", {})
|
|
74
|
-
];
|
|
36
|
+
return <>
|
|
37
|
+
{`@${tag} `}
|
|
38
|
+
<Show when={Boolean(children)}>
|
|
39
|
+
<align width={2}>
|
|
40
|
+
<Prose>{children}</Prose>
|
|
41
|
+
</align>
|
|
42
|
+
</Show>
|
|
43
|
+
<sbr />
|
|
44
|
+
</>;
|
|
75
45
|
}
|
|
76
46
|
/**
|
|
77
47
|
* A component that creates a TSDoc block with `@param` tags for each parameter.
|
|
78
48
|
*/
|
|
79
49
|
function TSDocParams(props) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
get optional() {
|
|
87
|
-
return param.optional;
|
|
88
|
-
},
|
|
89
|
-
get children() {
|
|
90
|
-
return param.doc;
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
});
|
|
50
|
+
const parameters = normalizeParametersForDoc(props.parameters);
|
|
51
|
+
return <For each={parameters}>
|
|
52
|
+
{(param) => <TSDocParam name={param.name} optional={param.optional}>
|
|
53
|
+
{param.doc}
|
|
54
|
+
</TSDocParam>}
|
|
55
|
+
</For>;
|
|
94
56
|
}
|
|
95
57
|
function normalizeParametersForDoc(parameters) {
|
|
96
58
|
if (parameters.some((p) => typeof p === "string")) return [];
|
|
@@ -101,82 +63,66 @@ function normalizeParametersForDoc(parameters) {
|
|
|
101
63
|
*/
|
|
102
64
|
function TSDocTitle(props) {
|
|
103
65
|
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}));
|
|
66
|
+
return <TSDocTag {...rest} tag="title">
|
|
67
|
+
{children}
|
|
68
|
+
</TSDocTag>;
|
|
108
69
|
}
|
|
109
70
|
/**
|
|
110
71
|
* Create a TSDoc `@domain` tag.
|
|
111
72
|
*/
|
|
112
73
|
function TSDocDomain(props) {
|
|
113
74
|
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
114
|
-
return
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}));
|
|
75
|
+
return <TSDocTag {...rest} tag="domain">
|
|
76
|
+
{children}
|
|
77
|
+
</TSDocTag>;
|
|
118
78
|
}
|
|
119
79
|
/**
|
|
120
80
|
* Create a TSDoc `@alias` tag.
|
|
121
81
|
*/
|
|
122
82
|
function TSDocAlias(props) {
|
|
123
83
|
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}));
|
|
84
|
+
return <TSDocTag {...rest} tag="alias">
|
|
85
|
+
{children}
|
|
86
|
+
</TSDocTag>;
|
|
128
87
|
}
|
|
129
88
|
/**
|
|
130
89
|
* Create a TSDoc `@permission` tag.
|
|
131
90
|
*/
|
|
132
91
|
function TSDocPermission(props) {
|
|
133
92
|
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
134
|
-
return
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}));
|
|
93
|
+
return <TSDocTag {...rest} tag="permission">
|
|
94
|
+
{children}
|
|
95
|
+
</TSDocTag>;
|
|
138
96
|
}
|
|
139
97
|
/**
|
|
140
98
|
* Create a TSDoc `@defaultValue` tag.
|
|
141
99
|
*/
|
|
142
100
|
function TSDocDefaultValue(props) {
|
|
143
101
|
const [{ type, defaultValue }] = splitProps(props, ["type", "defaultValue"]);
|
|
144
|
-
return
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
return createComponent(Prose, { get children() {
|
|
153
|
-
return stringifyDefaultValue(type, defaultValue);
|
|
154
|
-
} });
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
})];
|
|
102
|
+
return <>
|
|
103
|
+
{"@defaultValue "}
|
|
104
|
+
<Show when={!isUndefined(defaultValue)}>
|
|
105
|
+
<align width={2}>
|
|
106
|
+
<Prose>{stringifyDefaultValue(type, defaultValue)}</Prose>
|
|
107
|
+
</align>
|
|
108
|
+
</Show>
|
|
109
|
+
</>;
|
|
159
110
|
}
|
|
160
111
|
/**
|
|
161
112
|
* Create a TSDoc `@remarks` tag.
|
|
162
113
|
*/
|
|
163
114
|
function TSDocRemarks(props) {
|
|
164
|
-
return
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
get children() {
|
|
170
|
-
return childrenArray(() => props.children);
|
|
171
|
-
}
|
|
172
|
-
})
|
|
173
|
-
];
|
|
115
|
+
return <>
|
|
116
|
+
{"@remarks "}
|
|
117
|
+
<hbr />
|
|
118
|
+
<List hardline={true}>{childrenArray(() => props.children)}</List>
|
|
119
|
+
</>;
|
|
174
120
|
}
|
|
175
121
|
/**
|
|
176
122
|
* Create a TSDoc `@see` tag.
|
|
177
123
|
*/
|
|
178
124
|
function TSDocLink(props) {
|
|
179
|
-
return
|
|
125
|
+
return <TSDocTag {...props} tag="see" />;
|
|
180
126
|
}
|
|
181
127
|
/**
|
|
182
128
|
* Create a TSDoc `@example` tag.
|
|
@@ -188,51 +134,43 @@ function TSDocExample(props) {
|
|
|
188
134
|
"language",
|
|
189
135
|
"children"
|
|
190
136
|
]);
|
|
191
|
-
return
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
children,
|
|
205
|
-
createComponent(Show, {
|
|
206
|
-
when: fenced,
|
|
207
|
-
get children() {
|
|
208
|
-
return [createIntrinsic("hbr", {}), "```"];
|
|
209
|
-
}
|
|
210
|
-
})
|
|
211
|
-
];
|
|
137
|
+
return <>
|
|
138
|
+
{"@example "}
|
|
139
|
+
<hbr />
|
|
140
|
+
<Show when={fenced}>
|
|
141
|
+
```{language || (tsx ? "tsx" : "ts")}
|
|
142
|
+
<hbr />
|
|
143
|
+
</Show>
|
|
144
|
+
{children}
|
|
145
|
+
<Show when={fenced}>
|
|
146
|
+
<hbr />
|
|
147
|
+
```
|
|
148
|
+
</Show>
|
|
149
|
+
</>;
|
|
212
150
|
}
|
|
213
151
|
/**
|
|
214
152
|
* Create a TSDoc `@readonly` tag.
|
|
215
153
|
*/
|
|
216
154
|
function TSDocReadonly() {
|
|
217
|
-
return
|
|
155
|
+
return <TSDocTag tag="readonly" />;
|
|
218
156
|
}
|
|
219
157
|
/**
|
|
220
158
|
* Create a TSDoc `@internal` tag.
|
|
221
159
|
*/
|
|
222
160
|
function TSDocInternal() {
|
|
223
|
-
return
|
|
161
|
+
return <TSDocTag tag="internal" />;
|
|
224
162
|
}
|
|
225
163
|
/**
|
|
226
164
|
* Create a TSDoc `@ignore` tag.
|
|
227
165
|
*/
|
|
228
166
|
function TSDocIgnore() {
|
|
229
|
-
return
|
|
167
|
+
return <TSDocTag tag="ignore" />;
|
|
230
168
|
}
|
|
231
169
|
/**
|
|
232
170
|
* Create a TSDoc `@hidden` tag.
|
|
233
171
|
*/
|
|
234
172
|
function TSDocHidden() {
|
|
235
|
-
return
|
|
173
|
+
return <TSDocTag tag="hidden" />;
|
|
236
174
|
}
|
|
237
175
|
/**
|
|
238
176
|
* Generates a TypeScript interface property for the given reflection class.
|
|
@@ -250,165 +188,77 @@ function TSDocAttributesTags(props) {
|
|
|
250
188
|
]);
|
|
251
189
|
const title = computed(() => props.title?.trim() || "");
|
|
252
190
|
const domain = computed(() => props.domain?.trim() || "");
|
|
253
|
-
return
|
|
254
|
-
|
|
255
|
-
|
|
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
|
-
createComponent(Show, {
|
|
288
|
-
get when() {
|
|
289
|
-
return memo(() => !!(!isUndefined(permission) && permission.length > 0))() && permission.some((p) => isSetString(p?.trim()));
|
|
290
|
-
},
|
|
291
|
-
get children() {
|
|
292
|
-
return createComponent(For, {
|
|
293
|
-
get each() {
|
|
294
|
-
return permission?.filter((p) => isSetString(p?.trim())) ?? [];
|
|
295
|
-
},
|
|
296
|
-
children: (permission) => createComponent(TSDocPermission, { children: permission })
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
}),
|
|
300
|
-
createComponent(Show, {
|
|
301
|
-
when: readonly === true,
|
|
302
|
-
get children() {
|
|
303
|
-
return createComponent(TSDocReadonly, {});
|
|
304
|
-
}
|
|
305
|
-
}),
|
|
306
|
-
createComponent(Show, {
|
|
307
|
-
when: internal === true,
|
|
308
|
-
get children() {
|
|
309
|
-
return createComponent(TSDocInternal, {});
|
|
310
|
-
}
|
|
311
|
-
}),
|
|
312
|
-
createComponent(Show, {
|
|
313
|
-
when: ignore === true,
|
|
314
|
-
get children() {
|
|
315
|
-
return createComponent(TSDocIgnore, {});
|
|
316
|
-
}
|
|
317
|
-
}),
|
|
318
|
-
createComponent(Show, {
|
|
319
|
-
when: hidden === true,
|
|
320
|
-
get children() {
|
|
321
|
-
return createComponent(TSDocHidden, {});
|
|
322
|
-
}
|
|
323
|
-
}),
|
|
324
|
-
createComponent(Show, {
|
|
325
|
-
get when() {
|
|
326
|
-
return memo(() => !!!isUndefined(type))() && !isUndefined(defaultValue);
|
|
327
|
-
},
|
|
328
|
-
get children() {
|
|
329
|
-
return createComponent(TSDocDefaultValue, {
|
|
330
|
-
type,
|
|
331
|
-
defaultValue
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
})
|
|
335
|
-
];
|
|
191
|
+
return <>
|
|
192
|
+
<Show when={isSetString(title.value)}>
|
|
193
|
+
<TSDocTitle>{title.value}</TSDocTitle>
|
|
194
|
+
</Show>
|
|
195
|
+
<Show when={!isUndefined(alias) && alias.length > 0 && alias.some((a) => isSetString(a?.trim()))}>
|
|
196
|
+
<For each={alias?.filter((a) => isSetString(a?.trim())) ?? []}>
|
|
197
|
+
{(alias) => <TSDocAlias>{alias}</TSDocAlias>}
|
|
198
|
+
</For>
|
|
199
|
+
</Show>
|
|
200
|
+
<Show when={isSetString(domain.value)}>
|
|
201
|
+
<TSDocDomain>{domain.value}</TSDocDomain>
|
|
202
|
+
</Show>
|
|
203
|
+
<Show when={!isUndefined(permission) && permission.length > 0 && permission.some((p) => isSetString(p?.trim()))}>
|
|
204
|
+
<For each={permission?.filter((p) => isSetString(p?.trim())) ?? []}>
|
|
205
|
+
{(permission) => <TSDocPermission>{permission}</TSDocPermission>}
|
|
206
|
+
</For>
|
|
207
|
+
</Show>
|
|
208
|
+
<Show when={readonly === true}>
|
|
209
|
+
<TSDocReadonly />
|
|
210
|
+
</Show>
|
|
211
|
+
<Show when={internal === true}>
|
|
212
|
+
<TSDocInternal />
|
|
213
|
+
</Show>
|
|
214
|
+
<Show when={ignore === true}>
|
|
215
|
+
<TSDocIgnore />
|
|
216
|
+
</Show>
|
|
217
|
+
<Show when={hidden === true}>
|
|
218
|
+
<TSDocHidden />
|
|
219
|
+
</Show>
|
|
220
|
+
<Show when={!isUndefined(type) && !isUndefined(defaultValue)}>
|
|
221
|
+
<TSDocDefaultValue type={type} defaultValue={defaultValue} />
|
|
222
|
+
</Show>
|
|
223
|
+
</>;
|
|
336
224
|
}
|
|
337
225
|
/**
|
|
338
226
|
* Create a TSDoc parameter set off with `@param`.
|
|
339
227
|
*/
|
|
340
228
|
function TSDocParam(props) {
|
|
341
|
-
return
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
},
|
|
347
|
-
get optional() {
|
|
348
|
-
return props.optional;
|
|
349
|
-
},
|
|
350
|
-
get defaultValue() {
|
|
351
|
-
return props.defaultValue;
|
|
352
|
-
}
|
|
353
|
-
}),
|
|
354
|
-
createComponent(TSDocParamDescription, { get children() {
|
|
355
|
-
return props.children;
|
|
356
|
-
} })
|
|
357
|
-
];
|
|
229
|
+
return <>
|
|
230
|
+
{"@param "}
|
|
231
|
+
<TSDocParamName name={props.name} optional={props.optional} defaultValue={props.defaultValue} />
|
|
232
|
+
<TSDocParamDescription children={props.children} />
|
|
233
|
+
</>;
|
|
358
234
|
}
|
|
359
235
|
function TSDocParamName(props) {
|
|
360
|
-
return
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}),
|
|
367
|
-
memo(() => props.name),
|
|
368
|
-
createComponent(Show, {
|
|
369
|
-
get when() {
|
|
370
|
-
return Boolean(props.defaultValue);
|
|
371
|
-
},
|
|
372
|
-
get children() {
|
|
373
|
-
return ["=", memo(() => props.defaultValue)];
|
|
374
|
-
}
|
|
375
|
-
}),
|
|
376
|
-
createComponent(Show, {
|
|
377
|
-
get when() {
|
|
378
|
-
return props.optional;
|
|
379
|
-
},
|
|
380
|
-
children: "]"
|
|
381
|
-
})
|
|
382
|
-
];
|
|
236
|
+
return <>
|
|
237
|
+
<Show when={props.optional}>{"["}</Show>
|
|
238
|
+
{props.name}
|
|
239
|
+
<Show when={Boolean(props.defaultValue)}>={props.defaultValue}</Show>
|
|
240
|
+
<Show when={props.optional}>{"]"}</Show>
|
|
241
|
+
</>;
|
|
383
242
|
}
|
|
384
243
|
function TSDocParamDescription(props) {
|
|
385
|
-
return
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
width: 2,
|
|
392
|
-
get children() {
|
|
393
|
-
return createComponent(Prose, { get children() {
|
|
394
|
-
return props.children;
|
|
395
|
-
} });
|
|
396
|
-
}
|
|
397
|
-
})];
|
|
398
|
-
}
|
|
399
|
-
});
|
|
244
|
+
return <Show when={Boolean(props.children)}>
|
|
245
|
+
{" - "}
|
|
246
|
+
<align width={2}>
|
|
247
|
+
<Prose>{props.children}</Prose>
|
|
248
|
+
</align>
|
|
249
|
+
</Show>;
|
|
400
250
|
}
|
|
401
251
|
/**
|
|
402
252
|
* Create a TSDoc `@returns` tag.
|
|
403
253
|
*/
|
|
404
254
|
function TSDocReturns(props) {
|
|
405
|
-
return
|
|
255
|
+
return <TSDocTag {...props} tag="returns" />;
|
|
406
256
|
}
|
|
407
257
|
/**
|
|
408
258
|
* Create a TSDoc `@throws` tag.
|
|
409
259
|
*/
|
|
410
260
|
function TSDocThrows(props) {
|
|
411
|
-
return
|
|
261
|
+
return <TSDocTag {...props} tag="throws" />;
|
|
412
262
|
}
|
|
413
263
|
/**
|
|
414
264
|
* Generates a TSDoc `@module` tag for the given module name.
|
|
@@ -420,36 +270,20 @@ function TSDocModule(props) {
|
|
|
420
270
|
"prefix"
|
|
421
271
|
]);
|
|
422
272
|
const context = usePowerlinesSafe();
|
|
423
|
-
return
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
get children() {
|
|
438
|
-
return childrenArray(() => children);
|
|
439
|
-
}
|
|
440
|
-
}), createComponent(Spacing, {})];
|
|
441
|
-
}
|
|
442
|
-
}),
|
|
443
|
-
"@module ",
|
|
444
|
-
memo(() => prefix || context?.config?.framework || "powerlines"),
|
|
445
|
-
":",
|
|
446
|
-
name
|
|
447
|
-
];
|
|
448
|
-
}
|
|
449
|
-
}),
|
|
450
|
-
createIntrinsic("hbr", {}),
|
|
451
|
-
` */`
|
|
452
|
-
];
|
|
273
|
+
return <>
|
|
274
|
+
/**
|
|
275
|
+
<align string=" * ">
|
|
276
|
+
<hbr />
|
|
277
|
+
<Show when={Boolean(children)}>
|
|
278
|
+
<List hardline={true}>{childrenArray(() => children)}</List>
|
|
279
|
+
<Spacing />
|
|
280
|
+
</Show>
|
|
281
|
+
{"@module "}
|
|
282
|
+
{prefix || context?.config?.framework || "powerlines"}:{name}
|
|
283
|
+
</align>
|
|
284
|
+
<hbr />
|
|
285
|
+
{` */`}
|
|
286
|
+
</>;
|
|
453
287
|
}
|
|
454
288
|
|
|
455
289
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc.mjs","names":["childrenArray","computed","For","List","Prose","Show","splitProps","stringifyDefaultValue","isSetString","isUndefined","Spacing","usePowerlinesSafe","TSDoc","props","children","heading","_$createIntrinsic","string","_$createComponent","when","_$memo","filter","Boolean","length","TSDocTag","tag","width","TSDocParams","parameters","normalizeParametersForDoc","each","param","TSDocParam","name","optional","doc","some","p","TSDocTitle","rest","_$mergeProps","TSDocDomain","TSDocAlias","TSDocPermission","TSDocDefaultValue","type","defaultValue","TSDocRemarks","hardline","TSDocLink","TSDocExample","tsx","fenced","language","TSDocReadonly","TSDocInternal","TSDocIgnore","TSDocHidden","TSDocAttributesTags","alias","permission","readonly","internal","ignore","hidden","title","trim","domain","value","a","TSDocParamName","TSDocParamDescription","TSDocReturns","TSDocThrows","TSDocModule","prefix","context","config","framework"],"sources":["../../../src/typescript/components/tsdoc.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n childrenArray,\n computed,\n For,\n List,\n Prose,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { JSDocExampleProps, ParameterDescriptor } from \"@alloy-js/typescript\";\nimport { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\nimport {\n ReflectionKind,\n ReflectionParameter,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { ComponentProps } from \"../../types/components\";\n\nexport interface TSDocProps extends ComponentProps {\n heading?: Children;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TSDoc(props: TSDocProps) {\n const [{ children, heading }] = splitProps(props, [\"children\", \"heading\"]);\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={!isUndefined(heading)}>{heading}</Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={!isUndefined(heading)}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </align>\n <hbr />\n {`*/`}\n <hbr />\n </>\n );\n}\n\nexport interface TSDocTagProps extends ComponentProps {\n tag: string;\n}\n\n/**\n * Create a TSDoc `@<props.tag>` tag.\n */\nexport function TSDocTag(props: TSDocTagProps) {\n const [{ children, tag }] = splitProps(props, [\"children\", \"tag\"]);\n\n return (\n <>\n {`@${tag} `}\n <Show when={Boolean(children)}>\n <align width={2}>\n <Prose>{children}</Prose>\n </align>\n </Show>\n <sbr />\n </>\n );\n}\n\nexport interface TSDocParamsProps {\n parameters: ParameterDescriptor[] | string[];\n}\n\n/**\n * A component that creates a TSDoc block with `@param` tags for each parameter.\n */\nexport function TSDocParams(props: TSDocParamsProps) {\n const parameters = normalizeParametersForDoc(props.parameters);\n\n return (\n <For each={parameters}>\n {param => (\n <TSDocParam name={param.name} optional={param.optional}>\n {param.doc}\n </TSDocParam>\n )}\n </For>\n );\n}\n\nfunction normalizeParametersForDoc(\n parameters: ParameterDescriptor[] | string[]\n): ParameterDescriptor[] {\n if (parameters.some(p => typeof p === \"string\")) {\n return [];\n }\n\n return parameters as ParameterDescriptor[];\n}\n\n/**\n * Create a TSDoc `@title` tag.\n */\nexport function TSDocTitle(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"title\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@domain` tag.\n */\nexport function TSDocDomain(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"domain\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@alias` tag.\n */\nexport function TSDocAlias(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"alias\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@permission` tag.\n */\nexport function TSDocPermission(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"permission\">\n {children}\n </TSDocTag>\n );\n}\n\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type: ReflectionKind | ReflectionProperty | ReflectionParameter;\n defaultValue: any;\n}\n\n/**\n * Create a TSDoc `@defaultValue` tag.\n */\nexport function TSDocDefaultValue(props: TSDocDefaultValueProps) {\n const [{ type, defaultValue }] = splitProps(props, [\"type\", \"defaultValue\"]);\n\n return (\n <>\n {\"@defaultValue \"}\n <Show when={!isUndefined(defaultValue)}>\n <align width={2}>\n <Prose>{stringifyDefaultValue(type, defaultValue)}</Prose>\n </align>\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@remarks` tag.\n */\nexport function TSDocRemarks(props: ComponentProps) {\n return (\n <>\n {\"@remarks \"}\n <hbr />\n <List hardline={true}>{childrenArray(() => props.children)}</List>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@see` tag.\n */\nexport function TSDocLink(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"see\" />;\n}\n\nexport interface TSDocExampleProps extends JSDocExampleProps {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n}\n\n/**\n * Create a TSDoc `@example` tag.\n */\nexport function TSDocExample(props: TSDocExampleProps) {\n const [{ tsx, fenced = true, language, children }] = splitProps(props, [\n \"tsx\",\n \"fenced\",\n \"language\",\n \"children\"\n ]);\n\n return (\n <>\n {\"@example \"}\n <hbr />\n <Show when={fenced}>\n ```{language || (tsx ? \"tsx\" : \"ts\")}\n <hbr />\n </Show>\n {children}\n <Show when={fenced}>\n <hbr />\n ```\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@readonly` tag.\n */\nexport function TSDocReadonly() {\n return <TSDocTag tag=\"readonly\" />;\n}\n\n/**\n * Create a TSDoc `@internal` tag.\n */\nexport function TSDocInternal() {\n return <TSDocTag tag=\"internal\" />;\n}\n\n/**\n * Create a TSDoc `@ignore` tag.\n */\nexport function TSDocIgnore() {\n return <TSDocTag tag=\"ignore\" />;\n}\n\n/**\n * Create a TSDoc `@hidden` tag.\n */\nexport function TSDocHidden() {\n return <TSDocTag tag=\"hidden\" />;\n}\n\nexport interface TSDocAttributesTagsProps {\n type?: ReflectionKind | ReflectionProperty | ReflectionParameter;\n title?: string;\n alias?: string[];\n permission?: string[];\n domain?: string;\n readonly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n defaultValue?: any;\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocAttributesTags(props: TSDocAttributesTagsProps) {\n const [\n {\n type,\n alias,\n permission,\n readonly,\n internal,\n ignore,\n hidden,\n defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"permission\",\n \"readonly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"defaultValue\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n const domain = computed(() => props.domain?.trim() || \"\");\n\n return (\n <>\n <Show when={isSetString(title.value)}>\n <TSDocTitle>{title.value}</TSDocTitle>\n </Show>\n <Show\n when={\n !isUndefined(alias) &&\n alias.length > 0 &&\n alias.some(a => isSetString(a?.trim()))\n }>\n <For each={alias?.filter(a => isSetString(a?.trim())) ?? []}>\n {alias => <TSDocAlias>{alias}</TSDocAlias>}\n </For>\n </Show>\n <Show when={isSetString(domain.value)}>\n <TSDocDomain>{domain.value}</TSDocDomain>\n </Show>\n <Show\n when={\n !isUndefined(permission) &&\n permission.length > 0 &&\n permission.some(p => isSetString(p?.trim()))\n }>\n <For each={permission?.filter(p => isSetString(p?.trim())) ?? []}>\n {permission => <TSDocPermission>{permission}</TSDocPermission>}\n </For>\n </Show>\n <Show when={readonly === true}>\n <TSDocReadonly />\n </Show>\n <Show when={internal === true}>\n <TSDocInternal />\n </Show>\n <Show when={ignore === true}>\n <TSDocIgnore />\n </Show>\n <Show when={hidden === true}>\n <TSDocHidden />\n </Show>\n <Show when={!isUndefined(type) && !isUndefined(defaultValue)}>\n <TSDocDefaultValue\n type={\n type as ReflectionKind | ReflectionProperty | ReflectionParameter\n }\n defaultValue={defaultValue}\n />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\n/**\n * Create a TSDoc parameter set off with `@param`.\n */\nexport function TSDocParam(props: TSDocParamProps) {\n return (\n <>\n {\"@param \"}\n <TSDocParamName\n name={props.name}\n optional={props.optional}\n defaultValue={props.defaultValue}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.defaultValue)}>={props.defaultValue}</Show>\n <Show when={props.optional}>{\"]\"}</Show>\n </>\n );\n}\n\ninterface TSDocParamDescriptionProps {\n children?: Children;\n}\n\nfunction TSDocParamDescription(props: TSDocParamDescriptionProps) {\n return (\n <Show when={Boolean(props.children)}>\n {\" - \"}\n <align width={2}>\n <Prose>{props.children}</Prose>\n </align>\n </Show>\n );\n}\n\n/**\n * Create a TSDoc `@returns` tag.\n */\nexport function TSDocReturns(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"returns\" />;\n}\n\n/**\n * Create a TSDoc `@throws` tag.\n */\nexport function TSDocThrows(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"throws\" />;\n}\n\nexport interface TSDocModuleProps extends ComponentProps {\n /**\n * The prefix for the builtin module name\n *\n * @remarks\n * This value is populated from the Powerlines configuration output builtin prefix by default.\n *\n * @example\n * ```ts\n * /**\n * @module powerlines:my-module\n * \\/\n * ```\n */\n prefix?: string;\n\n /**\n * The name of the module\n *\n * @remarks\n * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.\n *\n * @example\n * ```ts\n * import { MyModule } from \"powerlines:my-module\";\n * ```\n */\n name: Children;\n}\n\n/**\n * Generates a TSDoc `@module` tag for the given module name.\n */\nexport function TSDocModule(props: TSDocModuleProps) {\n const [{ children, name, prefix }] = splitProps(props, [\n \"children\",\n \"name\",\n \"prefix\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={Boolean(children)}>\n <List hardline={true}>{childrenArray(() => children)}</List>\n <Spacing />\n </Show>\n {\"@module \"}\n {prefix || context?.config?.framework || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiIA;EAAA,gBAAA,OAAA,EAAA,CAAA;EAAA;;;;;SAeA,SAAA,OAAA;OAAA,CAAA,EAAA,UAAA,SAAA,WAAA,OAAA,CAAA,YAAA,MAAA,CAAA;AAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;wBAgCe,KAAA;EAAA;EAAA,WAAA,UAAA;;;;;;;;;;;;;SA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;;kBAOA,MAAA;GAAA,IAAA,OAAA;AAAA,WAAA,WAAA,CAAA,CAAA,CAAA,YAAA,KAAA,CAAA,EAAA,IAAA,CAAA,YAAA,aAAA;;GAAA,IAAA,WAAA;AAAA,WAAA,gBAAA,mBAAA;KAAA;KAAA;KAAA,CAAA;;GAAA,CAAA;EAAA;;;;;SAqCd,WAAA,OAAA;AAAA,QAAA;EAAA;EAAA,gBAAA,gBAAA;GAAA,IAAA,OAAA;AAAA,WAAA,MAAA;;GAAA,IAAA,WAAA;AAAA,WAAA,MAAA;;GAAA,IAAA,eAAA;AAAA,WAAA,MAAA;;GAAA,CAAA;EAAA,uCAAA,EAAA,IAAA,WAAA;AAAA,UAAA,MAAA;KAAA,CAAA;EAAA"}
|
|
1
|
+
{"version":3,"file":"tsdoc.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n childrenArray,\n computed,\n For,\n List,\n Prose,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { JSDocExampleProps, ParameterDescriptor } from \"@alloy-js/typescript\";\nimport { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\nimport {\n ReflectionKind,\n ReflectionParameter,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { ComponentProps } from \"../../types/components\";\n\nexport interface TSDocProps extends ComponentProps {\n heading?: Children;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TSDoc(props: TSDocProps) {\n const [{ children, heading }] = splitProps(props, [\"children\", \"heading\"]);\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={!isUndefined(heading)}>{heading}</Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={!isUndefined(heading)}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </align>\n <hbr />\n {`*/`}\n <hbr />\n </>\n );\n}\n\nexport interface TSDocTagProps extends ComponentProps {\n tag: string;\n}\n\n/**\n * Create a TSDoc `@<props.tag>` tag.\n */\nexport function TSDocTag(props: TSDocTagProps) {\n const [{ children, tag }] = splitProps(props, [\"children\", \"tag\"]);\n\n return (\n <>\n {`@${tag} `}\n <Show when={Boolean(children)}>\n <align width={2}>\n <Prose>{children}</Prose>\n </align>\n </Show>\n <sbr />\n </>\n );\n}\n\nexport interface TSDocParamsProps {\n parameters: ParameterDescriptor[] | string[];\n}\n\n/**\n * A component that creates a TSDoc block with `@param` tags for each parameter.\n */\nexport function TSDocParams(props: TSDocParamsProps) {\n const parameters = normalizeParametersForDoc(props.parameters);\n\n return (\n <For each={parameters}>\n {param => (\n <TSDocParam name={param.name} optional={param.optional}>\n {param.doc}\n </TSDocParam>\n )}\n </For>\n );\n}\n\nfunction normalizeParametersForDoc(\n parameters: ParameterDescriptor[] | string[]\n): ParameterDescriptor[] {\n if (parameters.some(p => typeof p === \"string\")) {\n return [];\n }\n\n return parameters as ParameterDescriptor[];\n}\n\n/**\n * Create a TSDoc `@title` tag.\n */\nexport function TSDocTitle(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"title\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@domain` tag.\n */\nexport function TSDocDomain(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"domain\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@alias` tag.\n */\nexport function TSDocAlias(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"alias\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@permission` tag.\n */\nexport function TSDocPermission(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"permission\">\n {children}\n </TSDocTag>\n );\n}\n\nexport interface TSDocDefaultValueProps extends ComponentProps {\n type: ReflectionKind | ReflectionProperty | ReflectionParameter;\n defaultValue: any;\n}\n\n/**\n * Create a TSDoc `@defaultValue` tag.\n */\nexport function TSDocDefaultValue(props: TSDocDefaultValueProps) {\n const [{ type, defaultValue }] = splitProps(props, [\"type\", \"defaultValue\"]);\n\n return (\n <>\n {\"@defaultValue \"}\n <Show when={!isUndefined(defaultValue)}>\n <align width={2}>\n <Prose>{stringifyDefaultValue(type, defaultValue)}</Prose>\n </align>\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@remarks` tag.\n */\nexport function TSDocRemarks(props: ComponentProps) {\n return (\n <>\n {\"@remarks \"}\n <hbr />\n <List hardline={true}>{childrenArray(() => props.children)}</List>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@see` tag.\n */\nexport function TSDocLink(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"see\" />;\n}\n\nexport interface TSDocExampleProps extends JSDocExampleProps {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n}\n\n/**\n * Create a TSDoc `@example` tag.\n */\nexport function TSDocExample(props: TSDocExampleProps) {\n const [{ tsx, fenced = true, language, children }] = splitProps(props, [\n \"tsx\",\n \"fenced\",\n \"language\",\n \"children\"\n ]);\n\n return (\n <>\n {\"@example \"}\n <hbr />\n <Show when={fenced}>\n ```{language || (tsx ? \"tsx\" : \"ts\")}\n <hbr />\n </Show>\n {children}\n <Show when={fenced}>\n <hbr />\n ```\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@readonly` tag.\n */\nexport function TSDocReadonly() {\n return <TSDocTag tag=\"readonly\" />;\n}\n\n/**\n * Create a TSDoc `@internal` tag.\n */\nexport function TSDocInternal() {\n return <TSDocTag tag=\"internal\" />;\n}\n\n/**\n * Create a TSDoc `@ignore` tag.\n */\nexport function TSDocIgnore() {\n return <TSDocTag tag=\"ignore\" />;\n}\n\n/**\n * Create a TSDoc `@hidden` tag.\n */\nexport function TSDocHidden() {\n return <TSDocTag tag=\"hidden\" />;\n}\n\nexport interface TSDocAttributesTagsProps {\n type?: ReflectionKind | ReflectionProperty | ReflectionParameter;\n title?: string;\n alias?: string[];\n permission?: string[];\n domain?: string;\n readonly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n defaultValue?: any;\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocAttributesTags(props: TSDocAttributesTagsProps) {\n const [\n {\n type,\n alias,\n permission,\n readonly,\n internal,\n ignore,\n hidden,\n defaultValue\n }\n ] = splitProps(props, [\n \"type\",\n \"alias\",\n \"permission\",\n \"readonly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"defaultValue\"\n ]);\n\n const title = computed(() => props.title?.trim() || \"\");\n const domain = computed(() => props.domain?.trim() || \"\");\n\n return (\n <>\n <Show when={isSetString(title.value)}>\n <TSDocTitle>{title.value}</TSDocTitle>\n </Show>\n <Show\n when={\n !isUndefined(alias) &&\n alias.length > 0 &&\n alias.some(a => isSetString(a?.trim()))\n }>\n <For each={alias?.filter(a => isSetString(a?.trim())) ?? []}>\n {alias => <TSDocAlias>{alias}</TSDocAlias>}\n </For>\n </Show>\n <Show when={isSetString(domain.value)}>\n <TSDocDomain>{domain.value}</TSDocDomain>\n </Show>\n <Show\n when={\n !isUndefined(permission) &&\n permission.length > 0 &&\n permission.some(p => isSetString(p?.trim()))\n }>\n <For each={permission?.filter(p => isSetString(p?.trim())) ?? []}>\n {permission => <TSDocPermission>{permission}</TSDocPermission>}\n </For>\n </Show>\n <Show when={readonly === true}>\n <TSDocReadonly />\n </Show>\n <Show when={internal === true}>\n <TSDocInternal />\n </Show>\n <Show when={ignore === true}>\n <TSDocIgnore />\n </Show>\n <Show when={hidden === true}>\n <TSDocHidden />\n </Show>\n <Show when={!isUndefined(type) && !isUndefined(defaultValue)}>\n <TSDocDefaultValue\n type={\n type as ReflectionKind | ReflectionProperty | ReflectionParameter\n }\n defaultValue={defaultValue}\n />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\n/**\n * Create a TSDoc parameter set off with `@param`.\n */\nexport function TSDocParam(props: TSDocParamProps) {\n return (\n <>\n {\"@param \"}\n <TSDocParamName\n name={props.name}\n optional={props.optional}\n defaultValue={props.defaultValue}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.defaultValue)}>={props.defaultValue}</Show>\n <Show when={props.optional}>{\"]\"}</Show>\n </>\n );\n}\n\ninterface TSDocParamDescriptionProps {\n children?: Children;\n}\n\nfunction TSDocParamDescription(props: TSDocParamDescriptionProps) {\n return (\n <Show when={Boolean(props.children)}>\n {\" - \"}\n <align width={2}>\n <Prose>{props.children}</Prose>\n </align>\n </Show>\n );\n}\n\n/**\n * Create a TSDoc `@returns` tag.\n */\nexport function TSDocReturns(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"returns\" />;\n}\n\n/**\n * Create a TSDoc `@throws` tag.\n */\nexport function TSDocThrows(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"throws\" />;\n}\n\nexport interface TSDocModuleProps extends ComponentProps {\n /**\n * The prefix for the builtin module name\n *\n * @remarks\n * This value is populated from the Powerlines configuration output builtin prefix by default.\n *\n * @example\n * ```ts\n * /**\n * @module powerlines:my-module\n * \\/\n * ```\n */\n prefix?: string;\n\n /**\n * The name of the module\n *\n * @remarks\n * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.\n *\n * @example\n * ```ts\n * import { MyModule } from \"powerlines:my-module\";\n * ```\n */\n name: Children;\n}\n\n/**\n * Generates a TSDoc `@module` tag for the given module name.\n */\nexport function TSDocModule(props: TSDocModuleProps) {\n const [{ children, name, prefix }] = splitProps(props, [\n \"children\",\n \"name\",\n \"prefix\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={Boolean(children)}>\n <List hardline={true}>{childrenArray(() => children)}</List>\n <Spacing />\n </Show>\n {\"@module \"}\n {prefix || context?.config?.framework || \"powerlines\"}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;AAgDA,SAAgB,MAAM,OAAmB;CACvC,MAAM,CAAC,EAAE,UAAU,aAAa,WAAW,OAAO,CAAC,YAAY,UAAU,CAAC;AAE1E,QACE,EAAE;;MAEA,CAAC,MAAM,aAAa;QAClB,CAAC,MAAM;QACP,CAAC,KAAK,MAAM,CAAC,YAAY,QAAQ,GAAG,QAAQ,EAAE,KAAK;QACnD,CAAC,KACC,MACE,CAAC,YAAY,SAAS,IACtB,oBAAoB,SAAS,CAAC,OAAO,QAAQ,CAAC,SAAS,GACvD;UACF,CAAC,KAAK,MAAM,CAAC,YAAY,QAAQ,EAAE;YACjC,CAAC,UAAU;UACb,EAAE,KAAK;UACP,CAAC,MAAM,oBAAoB,SAAS,CAAC,EAAE,KAAK;QA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