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