@powerlines/plugin-alloy 0.15.1 → 0.15.2

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 (148) hide show
  1. package/dist/builtin-file-BDc5-4_L.mjs +43 -0
  2. package/dist/{builtin-file-CIBzJ6jy.d.mts → builtin-file-CUUY0eVB.d.cts} +4 -4
  3. package/dist/{builtin-file-DLVCgiye.cjs → builtin-file-Cey2cJy9.cjs} +20 -14
  4. package/dist/{builtin-file-C-AX3Zai.d.cts → builtin-file-EfQHLZ8F.d.mts} +2 -2
  5. package/dist/{capnp-CbBwObRD.d.mts → capnp-DkidugOV.d.mts} +1 -1
  6. package/dist/{components-IB9A7YaB.d.mts → components-ixU_ICbr.d.mts} +5 -5
  7. package/dist/{context-D-UHaRnr.d.mts → context-BApo1nhP.d.mts} +1 -1
  8. package/dist/{context-0Spyyas6.d.mts → context-DXy7MPku.d.mts} +0 -2
  9. package/dist/core/components/index.cjs +3 -3
  10. package/dist/core/components/index.d.cts +3 -3
  11. package/dist/core/components/index.d.mts +5 -5
  12. package/dist/core/components/index.mjs +3 -3
  13. package/dist/core/components/output.cjs +1 -1
  14. package/dist/core/components/output.d.cts +1 -1
  15. package/dist/core/components/output.d.mts +2 -2
  16. package/dist/core/components/output.mjs +1 -1
  17. package/dist/core/components/single-line-comment.cjs +1 -1
  18. package/dist/core/components/single-line-comment.d.cts +1 -1
  19. package/dist/core/components/single-line-comment.d.mts +3 -3
  20. package/dist/core/components/single-line-comment.mjs +1 -1
  21. package/dist/core/components/source-file.cjs +1 -1
  22. package/dist/core/components/source-file.d.cts +1 -1
  23. package/dist/core/components/source-file.d.mts +3 -3
  24. package/dist/core/components/source-file.mjs +1 -1
  25. package/dist/core/contexts/context.d.mts +2 -2
  26. package/dist/core/contexts/index.d.mts +4 -4
  27. package/dist/core/contexts/reflection.d.mts +3 -3
  28. package/dist/core/index.cjs +3 -3
  29. package/dist/core/index.d.cts +3 -3
  30. package/dist/core/index.d.mts +7 -7
  31. package/dist/core/index.mjs +3 -3
  32. package/dist/{dynamic-import-statement-DO0ewx0l.d.cts → dynamic-import-statement-BhY2a13r.d.cts} +2 -2
  33. package/dist/{dynamic-import-statement-DoTHSt57.mjs → dynamic-import-statement-CWK5I_yt.mjs} +2 -6
  34. package/dist/{dynamic-import-statement-tQyMvDe7.d.mts → dynamic-import-statement-D6f1SnIf.d.mts} +2 -2
  35. package/dist/{dynamic-import-statement-JVLyMPXr.cjs → dynamic-import-statement-DVGp5Cvq.cjs} +2 -6
  36. package/dist/{entry-file-BgTZY0YN.d.mts → entry-file-B46yUHra.d.mts} +4 -4
  37. package/dist/{entry-file-BEHDg4dR.d.cts → entry-file-DSW6oClr.d.cts} +3 -3
  38. package/dist/{entry-file-BA75rAwb.cjs → entry-file-DijEelFv.cjs} +10 -7
  39. package/dist/{entry-file-Bw1mgMP3.mjs → entry-file-DtjJPVZY.mjs} +10 -7
  40. package/dist/helpers/capnp.d.mts +2 -2
  41. package/dist/helpers/index.d.mts +2 -2
  42. package/dist/index.cjs +61 -230
  43. package/dist/index.d.cts +9 -9
  44. package/dist/index.d.mts +19 -19
  45. package/dist/index.mjs +60 -224
  46. package/dist/markdown/components/index.cjs +4 -4
  47. package/dist/markdown/components/index.d.cts +3 -3
  48. package/dist/markdown/components/index.d.mts +5 -5
  49. package/dist/markdown/components/index.mjs +4 -4
  50. package/dist/markdown/components/markdown-file.cjs +3 -3
  51. package/dist/markdown/components/markdown-file.d.cts +2 -2
  52. package/dist/markdown/components/markdown-file.d.mts +4 -4
  53. package/dist/markdown/components/markdown-file.mjs +3 -3
  54. package/dist/markdown/components/markdown-table.cjs +1 -1
  55. package/dist/markdown/components/markdown-table.d.cts +1 -1
  56. package/dist/markdown/components/markdown-table.d.mts +3 -3
  57. package/dist/markdown/components/markdown-table.mjs +1 -1
  58. package/dist/markdown/index.cjs +4 -4
  59. package/dist/markdown/index.d.cts +3 -3
  60. package/dist/markdown/index.d.mts +5 -5
  61. package/dist/markdown/index.mjs +4 -4
  62. package/dist/markdown-file-BVSRcpXO.cjs +128 -0
  63. package/dist/{markdown-file-BjhcGybj.d.cts → markdown-file-C72aDdPi.d.cts} +4 -4
  64. package/dist/markdown-file-Clh5iU1_.mjs +116 -0
  65. package/dist/{markdown-file-BhMk-_1z.d.mts → markdown-file-DIkSXG43.d.mts} +5 -5
  66. package/dist/{markdown-table-DxL06EFD.d.mts → markdown-table-3trTm6Ef.d.mts} +5 -5
  67. package/dist/{markdown-table-DFaNSBRn.cjs → markdown-table-B40X-Kp1.cjs} +49 -28
  68. package/dist/{markdown-table-BUxH6aRh.mjs → markdown-table-D-YnljE7.mjs} +49 -28
  69. package/dist/{markdown-table-DhDqQVt_.d.cts → markdown-table-ZiuZZY5T.d.cts} +4 -4
  70. package/dist/{output-Cos2Dz1j.d.mts → output-BKZklKl1.d.mts} +1 -1
  71. package/dist/{output-CnofBsl0.cjs → output-BlHZS50Y.cjs} +19 -12
  72. package/dist/{output-C2C9L6Ho.d.cts → output-BmJnrELo.d.cts} +2 -2
  73. package/dist/{output-DEdXZ94G.mjs → output-CNnPjQlW.mjs} +19 -12
  74. package/dist/{plugin-DmLCIqx0.d.mts → plugin-LknisCLa.d.mts} +3 -3
  75. package/dist/{reflection-BiWgd3An.d.mts → reflection-DLJST1Z7.d.mts} +1 -1
  76. package/dist/{single-line-comment-C5CtHQhi.mjs → single-line-comment-Biwa95Py.mjs} +6 -4
  77. package/dist/{single-line-comment-CuFhTxLD.d.cts → single-line-comment-CYYKKXc2.d.cts} +2 -2
  78. package/dist/{single-line-comment-DRU3a4Qy.d.mts → single-line-comment-DGby6ABI.d.mts} +1 -1
  79. package/dist/{single-line-comment-BMPq6OR0.cjs → single-line-comment-DvU69OGj.cjs} +6 -4
  80. package/dist/{source-file-dpP3BrmV.d.mts → source-file-B2MkzzGR.d.mts} +4 -4
  81. package/dist/{source-file-DK_PJbR-.d.cts → source-file-BrxGhMOh.d.cts} +2 -2
  82. package/dist/{source-file-DTd1KgD5.cjs → source-file-DK_nFwAK.cjs} +10 -6
  83. package/dist/{source-file-CCYwl5pI.mjs → source-file-Dna2E0ro.mjs} +10 -6
  84. package/dist/tsdoc-B0TNs3dK.cjs +576 -0
  85. package/dist/{tsdoc-DzCqaUAX.d.mts → tsdoc-QH5nHvck.d.mts} +1 -1
  86. package/dist/tsdoc-XXdq_9iS.mjs +456 -0
  87. package/dist/{tsdoc-reflection-BbLwFCUm.d.mts → tsdoc-reflection-Bhk9KvVe.d.mts} +1 -1
  88. package/dist/tsdoc-reflection-BizVi_gn.cjs +188 -0
  89. package/dist/tsdoc-reflection-IWtPMJjw.mjs +170 -0
  90. package/dist/types/components.d.mts +2 -2
  91. package/dist/types/index.d.mts +3 -3
  92. package/dist/types/plugin.d.mts +2 -2
  93. package/dist/typescript/components/builtin-file.cjs +5 -5
  94. package/dist/typescript/components/builtin-file.d.cts +3 -3
  95. package/dist/typescript/components/builtin-file.d.mts +6 -6
  96. package/dist/typescript/components/builtin-file.mjs +5 -5
  97. package/dist/typescript/components/dynamic-import-statement.cjs +1 -1
  98. package/dist/typescript/components/dynamic-import-statement.d.cts +1 -1
  99. package/dist/typescript/components/dynamic-import-statement.d.mts +1 -1
  100. package/dist/typescript/components/dynamic-import-statement.mjs +1 -1
  101. package/dist/typescript/components/entry-file.cjs +4 -4
  102. package/dist/typescript/components/entry-file.d.cts +3 -3
  103. package/dist/typescript/components/entry-file.d.mts +5 -5
  104. package/dist/typescript/components/entry-file.mjs +4 -4
  105. package/dist/typescript/components/index.cjs +10 -10
  106. package/dist/typescript/components/index.d.cts +5 -5
  107. package/dist/typescript/components/index.d.mts +11 -11
  108. package/dist/typescript/components/index.mjs +10 -10
  109. package/dist/typescript/components/tsdoc-reflection.cjs +2 -2
  110. package/dist/typescript/components/tsdoc-reflection.d.mts +4 -4
  111. package/dist/typescript/components/tsdoc-reflection.mjs +2 -2
  112. package/dist/typescript/components/tsdoc.cjs +1 -1
  113. package/dist/typescript/components/tsdoc.d.mts +3 -3
  114. package/dist/typescript/components/tsdoc.mjs +1 -1
  115. package/dist/typescript/components/typescript-file.cjs +3 -3
  116. package/dist/typescript/components/typescript-file.d.cts +2 -2
  117. package/dist/typescript/components/typescript-file.d.mts +4 -4
  118. package/dist/typescript/components/typescript-file.mjs +3 -3
  119. package/dist/typescript/components/typescript-interface.cjs +3 -3
  120. package/dist/typescript/components/typescript-interface.d.mts +3 -3
  121. package/dist/typescript/components/typescript-interface.mjs +3 -3
  122. package/dist/typescript/components/typescript-object.cjs +3 -3
  123. package/dist/typescript/components/typescript-object.d.mts +3 -3
  124. package/dist/typescript/components/typescript-object.mjs +3 -3
  125. package/dist/typescript/index.cjs +10 -10
  126. package/dist/typescript/index.d.cts +5 -5
  127. package/dist/typescript/index.d.mts +11 -11
  128. package/dist/typescript/index.mjs +10 -10
  129. package/dist/{typescript-file-BjpHsTUl.d.cts → typescript-file-BK8Ohw9s.d.cts} +1 -1
  130. package/dist/{typescript-file-CxHfiE2u.d.mts → typescript-file-CFNjXsdz.d.mts} +2 -2
  131. package/dist/typescript-file-CLL-ELi0.mjs +190 -0
  132. package/dist/typescript-file-HsAUWnQY.cjs +208 -0
  133. package/dist/{typescript-interface-Codd49Sl.cjs → typescript-interface-DwHJ9in_.cjs} +38 -23
  134. package/dist/{typescript-interface-AydoCmGY.mjs → typescript-interface-FVDsEsu0.mjs} +38 -23
  135. package/dist/{typescript-interface-D8u8bgxN.d.mts → typescript-interface-XIwwFVdf.d.mts} +1 -1
  136. package/dist/{typescript-object-qZFhyXJU.d.mts → typescript-object-BTawaBJa.d.mts} +1 -1
  137. package/dist/{typescript-object-DOrJkpcM.cjs → typescript-object-D8MHeFId.cjs} +75 -45
  138. package/dist/{typescript-object-C-BmpHfk.mjs → typescript-object-Ju07nQg9.mjs} +75 -45
  139. package/package.json +11 -11
  140. package/dist/builtin-file-CkwxD4el.mjs +0 -37
  141. package/dist/markdown-file-BFbbzD59.mjs +0 -90
  142. package/dist/markdown-file-CzGNj_Ex.cjs +0 -102
  143. package/dist/tsdoc-BFPYF-Fh.cjs +0 -487
  144. package/dist/tsdoc-BmyOQBxT.mjs +0 -367
  145. package/dist/tsdoc-reflection-3hSdGY1e.mjs +0 -97
  146. package/dist/tsdoc-reflection-BQN8iUG1.cjs +0 -115
  147. package/dist/typescript-file-6Y81yLyB.cjs +0 -157
  148. package/dist/typescript-file-y6oF016h.mjs +0 -139
@@ -1,367 +0,0 @@
1
- import { r as stringifyDefaultValue } from "./utilities-CnaPrauh.mjs";
2
- import { n as usePowerlines } from "./context-Cx38_mgI.mjs";
3
- import { For, List, Prose, Show, childrenArray, splitProps } from "@alloy-js/core";
4
- import { isUndefined } from "@stryke/type-checks/is-undefined";
5
- import { isSetString } from "@stryke/type-checks/is-set-string";
6
- import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
7
-
8
- //#region src/typescript/components/tsdoc.tsx
9
- /**
10
- * Generates a TypeScript interface for the given reflection class.
11
- */
12
- function TSDoc(props) {
13
- const [{ children, heading }] = splitProps(props, ["children", "heading"]);
14
- return /* @__PURE__ */ jsxs(Fragment, { children: [
15
- "/**",
16
- /* @__PURE__ */ jsxs("align", {
17
- string: " * ",
18
- children: [
19
- /* @__PURE__ */ jsx("hbr", {}),
20
- /* @__PURE__ */ jsxs(Show, {
21
- when: !isUndefined(heading),
22
- children: [
23
- heading,
24
- /* @__PURE__ */ jsx("hbr", {}),
25
- /* @__PURE__ */ jsx(Show, {
26
- when: !isUndefined(children) && childrenArray(() => children).length > 0,
27
- children: /* @__PURE__ */ jsx("hbr", {})
28
- })
29
- ]
30
- }),
31
- /* @__PURE__ */ jsx(Show, {
32
- when: !isUndefined(children) && childrenArray(() => children).length > 0,
33
- children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
34
- })
35
- ]
36
- }),
37
- /* @__PURE__ */ jsx("hbr", {}),
38
- ` */`,
39
- /* @__PURE__ */ jsx("hbr", {})
40
- ] });
41
- }
42
- /**
43
- * Create a TSDoc `@<props.tag>` tag.
44
- */
45
- function TSDocTag(props) {
46
- const [{ children, tag }] = splitProps(props, ["children", "tag"]);
47
- return /* @__PURE__ */ jsxs(Fragment, { children: [
48
- `@${tag} `,
49
- /* @__PURE__ */ jsx(Show, {
50
- when: Boolean(children),
51
- children: /* @__PURE__ */ jsx("align", {
52
- width: 2,
53
- children: /* @__PURE__ */ jsx(Prose, { children })
54
- })
55
- }),
56
- /* @__PURE__ */ jsx("hbr", {})
57
- ] });
58
- }
59
- /**
60
- * A component that creates a TSDoc block with `@param` tags for each parameter.
61
- */
62
- function TSDocParams(props) {
63
- return /* @__PURE__ */ jsx(For, {
64
- each: normalizeParametersForDoc(props.parameters),
65
- children: (param) => /* @__PURE__ */ jsx(TSDocParam, {
66
- name: param.name,
67
- optional: param.optional,
68
- children: param.doc
69
- })
70
- });
71
- }
72
- function normalizeParametersForDoc(parameters) {
73
- if (parameters.some((p) => typeof p === "string")) return [];
74
- return parameters;
75
- }
76
- /**
77
- * Create a TSDoc `@title` tag.
78
- */
79
- function TSDocTitle(props) {
80
- const [{ children }, rest] = splitProps(props, ["children"]);
81
- return /* @__PURE__ */ jsx(TSDocTag, {
82
- ...rest,
83
- tag: "title",
84
- children
85
- });
86
- }
87
- /**
88
- * Create a TSDoc `@domain` tag.
89
- */
90
- function TSDocDomain(props) {
91
- const [{ children }, rest] = splitProps(props, ["children"]);
92
- return /* @__PURE__ */ jsx(TSDocTag, {
93
- ...rest,
94
- tag: "domain",
95
- children
96
- });
97
- }
98
- /**
99
- * Create a TSDoc `@alias` tag.
100
- */
101
- function TSDocAlias(props) {
102
- const [{ children }, rest] = splitProps(props, ["children"]);
103
- return /* @__PURE__ */ jsx(TSDocTag, {
104
- ...rest,
105
- tag: "alias",
106
- children
107
- });
108
- }
109
- /**
110
- * Create a TSDoc `@permission` tag.
111
- */
112
- function TSDocPermission(props) {
113
- const [{ children }, rest] = splitProps(props, ["children"]);
114
- return /* @__PURE__ */ jsx(TSDocTag, {
115
- ...rest,
116
- tag: "permission",
117
- children
118
- });
119
- }
120
- /**
121
- * Create a TSDoc `@defaultValue` tag.
122
- */
123
- function TSDocDefaultValue(props) {
124
- return /* @__PURE__ */ jsxs(Fragment, { children: [
125
- "@defaultValue ",
126
- /* @__PURE__ */ jsx(Show, {
127
- when: !isUndefined(props.value),
128
- children: /* @__PURE__ */ jsx("align", {
129
- width: 2,
130
- children: /* @__PURE__ */ jsx(Prose, { children: stringifyDefaultValue(props.value) })
131
- })
132
- }),
133
- /* @__PURE__ */ jsx("hbr", {})
134
- ] });
135
- }
136
- /**
137
- * Create a TSDoc `@remarks` tag.
138
- */
139
- function TSDocRemarks(props) {
140
- return /* @__PURE__ */ jsxs(Fragment, { children: [
141
- "@remarks ",
142
- /* @__PURE__ */ jsx("hbr", {}),
143
- /* @__PURE__ */ jsx(List, {
144
- hardline: true,
145
- children: childrenArray(() => props.children)
146
- })
147
- ] });
148
- }
149
- /**
150
- * Create a TSDoc `@see` tag.
151
- */
152
- function TSDocLink(props) {
153
- return /* @__PURE__ */ jsx(TSDocTag, {
154
- ...props,
155
- tag: "see"
156
- });
157
- }
158
- /**
159
- * Create a TSDoc `@example` tag.
160
- */
161
- function TSDocExample(props) {
162
- const [{ tsx, fenced = true, language, children }] = splitProps(props, [
163
- "tsx",
164
- "fenced",
165
- "language",
166
- "children"
167
- ]);
168
- return /* @__PURE__ */ jsxs(Fragment, { children: [
169
- "@example ",
170
- /* @__PURE__ */ jsx("hbr", {}),
171
- /* @__PURE__ */ jsxs(Show, {
172
- when: fenced,
173
- children: [
174
- "```",
175
- language || (tsx ? "tsx" : "ts"),
176
- /* @__PURE__ */ jsx("hbr", {})
177
- ]
178
- }),
179
- children,
180
- /* @__PURE__ */ jsxs(Show, {
181
- when: fenced,
182
- children: [/* @__PURE__ */ jsx("hbr", {}), "```"]
183
- })
184
- ] });
185
- }
186
- /**
187
- * Create a TSDoc `@readonly` tag.
188
- */
189
- function TSDocReadonly() {
190
- return /* @__PURE__ */ jsx(TSDocTag, { tag: "readonly" });
191
- }
192
- /**
193
- * Create a TSDoc `@internal` tag.
194
- */
195
- function TSDocInternal() {
196
- return /* @__PURE__ */ jsx(TSDocTag, { tag: "internal" });
197
- }
198
- /**
199
- * Create a TSDoc `@ignore` tag.
200
- */
201
- function TSDocIgnore() {
202
- return /* @__PURE__ */ jsx(TSDocTag, { tag: "ignore" });
203
- }
204
- /**
205
- * Create a TSDoc `@hidden` tag.
206
- */
207
- function TSDocHidden() {
208
- return /* @__PURE__ */ jsx(TSDocTag, { tag: "hidden" });
209
- }
210
- /**
211
- * Generates a TypeScript interface property for the given reflection class.
212
- */
213
- function TSDocAttributesTags(props) {
214
- const [{ title, alias, permission, domain, readonly, internal, ignore, hidden, defaultValue }] = splitProps(props, [
215
- "title",
216
- "alias",
217
- "permission",
218
- "domain",
219
- "readonly",
220
- "internal",
221
- "ignore",
222
- "hidden",
223
- "defaultValue"
224
- ]);
225
- return /* @__PURE__ */ jsxs(Fragment, { children: [
226
- /* @__PURE__ */ jsx(Show, {
227
- when: isSetString(title),
228
- children: /* @__PURE__ */ jsx(TSDocTitle, { children: title })
229
- }),
230
- /* @__PURE__ */ jsx(Show, {
231
- when: !isUndefined(alias) && alias.length > 0,
232
- children: /* @__PURE__ */ jsx(For, {
233
- each: alias ?? [],
234
- children: (alias$1) => /* @__PURE__ */ jsx(TSDocAlias, { children: alias$1 })
235
- })
236
- }),
237
- /* @__PURE__ */ jsx(Show, {
238
- when: isSetString(domain),
239
- children: /* @__PURE__ */ jsx(TSDocDomain, { children: domain })
240
- }),
241
- /* @__PURE__ */ jsx(Show, {
242
- when: !isUndefined(permission) && permission.length > 0,
243
- children: /* @__PURE__ */ jsx(For, {
244
- each: permission ?? [],
245
- children: (permission$1) => /* @__PURE__ */ jsx(TSDocPermission, { children: permission$1 })
246
- })
247
- }),
248
- /* @__PURE__ */ jsx(Show, {
249
- when: readonly === true,
250
- children: /* @__PURE__ */ jsx(TSDocReadonly, {})
251
- }),
252
- /* @__PURE__ */ jsx(Show, {
253
- when: internal === true,
254
- children: /* @__PURE__ */ jsx(TSDocInternal, {})
255
- }),
256
- /* @__PURE__ */ jsx(Show, {
257
- when: ignore === true,
258
- children: /* @__PURE__ */ jsx(TSDocIgnore, {})
259
- }),
260
- /* @__PURE__ */ jsx(Show, {
261
- when: hidden === true,
262
- children: /* @__PURE__ */ jsx(TSDocHidden, {})
263
- }),
264
- /* @__PURE__ */ jsx(Show, {
265
- when: !isUndefined(defaultValue),
266
- children: /* @__PURE__ */ jsx(TSDocDefaultValue, { value: defaultValue })
267
- })
268
- ] });
269
- }
270
- /**
271
- * Create a TSDoc parameter set off with `@param`.
272
- */
273
- function TSDocParam(props) {
274
- return /* @__PURE__ */ jsxs(Fragment, { children: [
275
- "@param ",
276
- /* @__PURE__ */ jsx(TSDocParamName, {
277
- name: props.name,
278
- optional: props.optional,
279
- defaultValue: props.defaultValue
280
- }),
281
- /* @__PURE__ */ jsx(TSDocParamDescription, { children: props.children })
282
- ] });
283
- }
284
- function TSDocParamName(props) {
285
- return /* @__PURE__ */ jsxs(Fragment, { children: [
286
- /* @__PURE__ */ jsx(Show, {
287
- when: props.optional,
288
- children: "["
289
- }),
290
- props.name,
291
- /* @__PURE__ */ jsxs(Show, {
292
- when: Boolean(props.defaultValue),
293
- children: ["=", props.defaultValue]
294
- }),
295
- /* @__PURE__ */ jsx(Show, {
296
- when: props.optional,
297
- children: "]"
298
- })
299
- ] });
300
- }
301
- function TSDocParamDescription(props) {
302
- return /* @__PURE__ */ jsxs(Show, {
303
- when: Boolean(props.children),
304
- children: [" - ", /* @__PURE__ */ jsx("align", {
305
- width: 2,
306
- children: /* @__PURE__ */ jsx(Prose, { children: props.children })
307
- })]
308
- });
309
- }
310
- /**
311
- * Create a TSDoc `@returns` tag.
312
- */
313
- function TSDocReturns(props) {
314
- return /* @__PURE__ */ jsx(TSDocTag, {
315
- ...props,
316
- tag: "returns"
317
- });
318
- }
319
- /**
320
- * Create a TSDoc `@throws` tag.
321
- */
322
- function TSDocThrows(props) {
323
- return /* @__PURE__ */ jsx(TSDocTag, {
324
- ...props,
325
- tag: "throws"
326
- });
327
- }
328
- /**
329
- * Generates a TSDoc `@module` tag for the given module name.
330
- */
331
- function TSDocModule(props) {
332
- const [{ children, name, prefix }] = splitProps(props, [
333
- "children",
334
- "name",
335
- "prefix"
336
- ]);
337
- const context = usePowerlines();
338
- return /* @__PURE__ */ jsxs(Fragment, { children: [
339
- "/**",
340
- /* @__PURE__ */ jsxs("align", {
341
- string: " * ",
342
- children: [
343
- /* @__PURE__ */ jsx("hbr", {}),
344
- /* @__PURE__ */ jsxs(Show, {
345
- when: Boolean(children),
346
- children: [
347
- /* @__PURE__ */ jsx(List, {
348
- hardline: true,
349
- children: childrenArray(() => children)
350
- }),
351
- /* @__PURE__ */ jsx("hbr", {}),
352
- /* @__PURE__ */ jsx("hbr", {})
353
- ]
354
- }),
355
- "@module ",
356
- prefix || context?.config.output.builtinPrefix,
357
- ":",
358
- name
359
- ]
360
- }),
361
- /* @__PURE__ */ jsx("hbr", {}),
362
- ` */`
363
- ] });
364
- }
365
-
366
- //#endregion
367
- export { TSDocReturns as _, TSDocDomain as a, TSDocTitle as b, TSDocIgnore as c, TSDocModule as d, TSDocParam as f, TSDocRemarks as g, TSDocReadonly as h, TSDocDefaultValue as i, TSDocInternal as l, TSDocPermission as m, TSDocAlias as n, TSDocExample as o, TSDocParams as p, TSDocAttributesTags as r, TSDocHidden as s, TSDoc as t, TSDocLink as u, TSDocTag as v, TSDocThrows as y };
@@ -1,97 +0,0 @@
1
- import { r as TSDocAttributesTags, t as TSDoc } from "./tsdoc-BmyOQBxT.mjs";
2
- import { a as useReflectionClass, c as useReflectionProperty, o as useReflectionMethod } from "./reflection-CBMQ1FQo.mjs";
3
- import { List, Show, childrenArray, code, computed, splitProps } from "@alloy-js/core";
4
- import { isString } from "@stryke/type-checks/is-string";
5
- import { isUndefined } from "@stryke/type-checks/is-undefined";
6
- import { isSetString } from "@stryke/type-checks/is-set-string";
7
- import { jsx, jsxs } from "@alloy-js/core/jsx-runtime";
8
- import { titleCase } from "@stryke/string-format/title-case";
9
-
10
- //#region src/typescript/components/tsdoc-reflection.tsx
11
- /**
12
- * Generates a TypeScript interface property for the given reflection class.
13
- */
14
- function TSDocReflectionClass(props) {
15
- const [{ children }, rest] = splitProps(props, ["children"]);
16
- const reflectionClass = useReflectionClass();
17
- const title = computed(() => reflectionClass.reflection.getTitle() || titleCase(reflectionClass.reflection.getName()));
18
- const alias = computed(() => reflectionClass.reflection.getAlias());
19
- const domain = computed(() => reflectionClass.reflection.getDomain());
20
- const permission = computed(() => reflectionClass.reflection.getPermission());
21
- const readonly = computed(() => reflectionClass.reflection.isReadonly());
22
- const internal = computed(() => reflectionClass.reflection.isInternal());
23
- const ignore = computed(() => reflectionClass.reflection.isIgnored());
24
- const hidden = computed(() => reflectionClass.reflection.isHidden());
25
- if (!reflectionClass.reflection.getName()) return null;
26
- return /* @__PURE__ */ jsxs(TSDoc, {
27
- ...rest,
28
- heading: reflectionClass.reflection.getDescription(),
29
- children: [/* @__PURE__ */ jsx(Show, {
30
- when: isSetString(title.value) || !isUndefined(alias.value) && alias.value.length > 0 || !isUndefined(permission.value) && permission.value.length > 0 || isSetString(domain.value) || !isUndefined(readonly.value) || !isUndefined(internal.value) || !isUndefined(ignore.value) || !isUndefined(hidden.value),
31
- children: /* @__PURE__ */ jsx(TSDocAttributesTags, {
32
- title: title.value,
33
- alias: alias.value,
34
- domain: domain.value,
35
- permission: permission.value,
36
- readonly: readonly.value,
37
- internal: internal.value,
38
- ignore: ignore.value,
39
- hidden: hidden.value
40
- })
41
- }), /* @__PURE__ */ jsx(Show, {
42
- when: Boolean(children) && childrenArray(() => children).length > 0,
43
- children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
44
- })]
45
- });
46
- }
47
- /**
48
- * Generates a TypeScript interface property for the given reflection class.
49
- */
50
- function TSDocReflectionProperty(props) {
51
- const [{ children }, rest] = splitProps(props, ["children"]);
52
- const context = useReflectionProperty();
53
- return /* @__PURE__ */ jsxs(TSDoc, {
54
- heading: context.getDescription(),
55
- ...rest,
56
- children: [/* @__PURE__ */ jsx(TSDocAttributesTags, {
57
- title: context.getTitle(),
58
- alias: context.getAlias(),
59
- domain: context.getDomain(),
60
- permission: context.getPermission(),
61
- readonly: context.isReadonly(),
62
- internal: context.isInternal(),
63
- ignore: context.isIgnored(),
64
- hidden: context.isHidden()
65
- }), /* @__PURE__ */ jsx(Show, {
66
- when: Boolean(children) && childrenArray(() => children).length > 0,
67
- children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
68
- })]
69
- });
70
- }
71
- /**
72
- * Generates a TypeScript interface property for the given reflection class.
73
- */
74
- function TSDocReflectionMethod(props) {
75
- const [{ children }, rest] = splitProps(props, ["children"]);
76
- const context = useReflectionMethod();
77
- return /* @__PURE__ */ jsxs(TSDoc, {
78
- heading: context.getDescription() || (isString(context.getName()) ? code`${String(context.getName())} method definition` : void 0),
79
- ...rest,
80
- children: [/* @__PURE__ */ jsx(TSDocAttributesTags, {
81
- title: context.getTitle(),
82
- alias: context.getAlias(),
83
- domain: context.getDomain(),
84
- permission: context.getPermission(),
85
- readonly: context.isReadonly(),
86
- internal: context.isInternal(),
87
- ignore: context.isIgnored(),
88
- hidden: context.isHidden()
89
- }), /* @__PURE__ */ jsx(Show, {
90
- when: Boolean(children) && childrenArray(() => children).length > 0,
91
- children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
92
- })]
93
- });
94
- }
95
-
96
- //#endregion
97
- export { TSDocReflectionMethod as n, TSDocReflectionProperty as r, TSDocReflectionClass as t };
@@ -1,115 +0,0 @@
1
- const require_chunk = require('./chunk-CbDLau6x.cjs');
2
- const require_tsdoc = require('./tsdoc-BFPYF-Fh.cjs');
3
- const require_reflection = require('./reflection-BSbFFYZO.cjs');
4
- let __alloy_js_core = require("@alloy-js/core");
5
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
6
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
7
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
8
- let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
9
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
10
-
11
- //#region src/typescript/components/tsdoc-reflection.tsx
12
- /**
13
- * Generates a TypeScript interface property for the given reflection class.
14
- */
15
- function TSDocReflectionClass(props) {
16
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
17
- const reflectionClass = require_reflection.useReflectionClass();
18
- const title = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getTitle() || (0, __stryke_string_format_title_case.titleCase)(reflectionClass.reflection.getName()));
19
- const alias = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getAlias());
20
- const domain = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getDomain());
21
- const permission = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.getPermission());
22
- const readonly = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isReadonly());
23
- const internal = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isInternal());
24
- const ignore = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isIgnored());
25
- const hidden = (0, __alloy_js_core.computed)(() => reflectionClass.reflection.isHidden());
26
- if (!reflectionClass.reflection.getName()) return null;
27
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(require_tsdoc.TSDoc, {
28
- ...rest,
29
- heading: reflectionClass.reflection.getDescription(),
30
- children: [/* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
31
- when: (0, __stryke_type_checks_is_set_string.isSetString)(title.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(alias.value) && alias.value.length > 0 || !(0, __stryke_type_checks_is_undefined.isUndefined)(permission.value) && permission.value.length > 0 || (0, __stryke_type_checks_is_set_string.isSetString)(domain.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(readonly.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(internal.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(ignore.value) || !(0, __stryke_type_checks_is_undefined.isUndefined)(hidden.value),
32
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(require_tsdoc.TSDocAttributesTags, {
33
- title: title.value,
34
- alias: alias.value,
35
- domain: domain.value,
36
- permission: permission.value,
37
- readonly: readonly.value,
38
- internal: internal.value,
39
- ignore: ignore.value,
40
- hidden: hidden.value
41
- })
42
- }), /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
43
- when: Boolean(children) && (0, __alloy_js_core.childrenArray)(() => children).length > 0,
44
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.List, { children: (0, __alloy_js_core.childrenArray)(() => children) })
45
- })]
46
- });
47
- }
48
- /**
49
- * Generates a TypeScript interface property for the given reflection class.
50
- */
51
- function TSDocReflectionProperty(props) {
52
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
53
- const context = require_reflection.useReflectionProperty();
54
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(require_tsdoc.TSDoc, {
55
- heading: context.getDescription(),
56
- ...rest,
57
- children: [/* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(require_tsdoc.TSDocAttributesTags, {
58
- title: context.getTitle(),
59
- alias: context.getAlias(),
60
- domain: context.getDomain(),
61
- permission: context.getPermission(),
62
- readonly: context.isReadonly(),
63
- internal: context.isInternal(),
64
- ignore: context.isIgnored(),
65
- hidden: context.isHidden()
66
- }), /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
67
- when: Boolean(children) && (0, __alloy_js_core.childrenArray)(() => children).length > 0,
68
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.List, { children: (0, __alloy_js_core.childrenArray)(() => children) })
69
- })]
70
- });
71
- }
72
- /**
73
- * Generates a TypeScript interface property for the given reflection class.
74
- */
75
- function TSDocReflectionMethod(props) {
76
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
77
- const context = require_reflection.useReflectionMethod();
78
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(require_tsdoc.TSDoc, {
79
- heading: context.getDescription() || ((0, __stryke_type_checks_is_string.isString)(context.getName()) ? __alloy_js_core.code`${String(context.getName())} method definition` : void 0),
80
- ...rest,
81
- children: [/* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(require_tsdoc.TSDocAttributesTags, {
82
- title: context.getTitle(),
83
- alias: context.getAlias(),
84
- domain: context.getDomain(),
85
- permission: context.getPermission(),
86
- readonly: context.isReadonly(),
87
- internal: context.isInternal(),
88
- ignore: context.isIgnored(),
89
- hidden: context.isHidden()
90
- }), /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
91
- when: Boolean(children) && (0, __alloy_js_core.childrenArray)(() => children).length > 0,
92
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.List, { children: (0, __alloy_js_core.childrenArray)(() => children) })
93
- })]
94
- });
95
- }
96
-
97
- //#endregion
98
- Object.defineProperty(exports, 'TSDocReflectionClass', {
99
- enumerable: true,
100
- get: function () {
101
- return TSDocReflectionClass;
102
- }
103
- });
104
- Object.defineProperty(exports, 'TSDocReflectionMethod', {
105
- enumerable: true,
106
- get: function () {
107
- return TSDocReflectionMethod;
108
- }
109
- });
110
- Object.defineProperty(exports, 'TSDocReflectionProperty', {
111
- enumerable: true,
112
- get: function () {
113
- return TSDocReflectionProperty;
114
- }
115
- });