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