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