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