@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,8 +1,8 @@
1
1
  import { useReflectionClass, useReflectionMethod, useReflectionPropertyContext } from "../../core/contexts/reflection.mjs";
2
2
  import { Spacing } from "../../core/components/spacing.mjs";
3
3
  import { TSDoc, TSDocAttributesTags, TSDocParam, TSDocReturns } from "./tsdoc.mjs";
4
+ import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
4
5
  import { For, List, Show, childrenArray, code, computed, splitProps } from "@alloy-js/core";
5
- import { jsx, jsxs } from "@alloy-js/core/jsx-runtime";
6
6
  import { titleCase } from "@stryke/string-format/title-case";
7
7
  import { isUndefined } from "@stryke/type-checks/is-undefined";
8
8
  import { ReflectionKind, stringifyType } from "@powerlines/deepkit/vendor/type";
@@ -33,42 +33,80 @@ function TSDocReflectionClass(props) {
33
33
  const hidden = computed(() => reflection.isHidden());
34
34
  if (!computedHeading.value || isSetString(computedHeading.value) && computedHeading.value.trim() === "") return null;
35
35
  const hasAttributes = computed(() => 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(runtime.value) || !isUndefined(ignore.value) || !isUndefined(hidden.value));
36
- return /* @__PURE__ */ jsxs(TSDoc, {
37
- ...rest,
38
- heading: isSetString(computedHeading.value) ? computedHeading.value.trim() : computedHeading.value,
39
- children: [/* @__PURE__ */ jsx(Show, {
40
- when: hasAttributes.value,
41
- children: /* @__PURE__ */ jsx(TSDocAttributesTags, {
42
- title: title.value,
43
- alias: alias.value,
44
- domain: domain.value,
45
- permission: permission.value,
46
- readonly: readonly.value,
47
- internal: internal.value,
48
- runtime: runtime.value,
49
- ignore: ignore.value,
50
- hidden: hidden.value
51
- })
52
- }), /* @__PURE__ */ jsxs(Show, {
53
- when: !isUndefined(children) && childrenArray(() => children).filter(Boolean).length > 0,
54
- children: [/* @__PURE__ */ jsx(Show, {
55
- when: hasAttributes.value,
56
- children: /* @__PURE__ */ jsx(Spacing, {})
57
- }), /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })]
58
- })]
59
- });
36
+ return createComponent(TSDoc, mergeProps(rest, {
37
+ get heading() {
38
+ return memo(() => !!isSetString(computedHeading.value))() ? computedHeading.value.trim() : computedHeading.value;
39
+ },
40
+ get children() {
41
+ return [createComponent(Show, {
42
+ get when() {
43
+ return hasAttributes.value;
44
+ },
45
+ get children() {
46
+ return createComponent(TSDocAttributesTags, {
47
+ get title() {
48
+ return title.value;
49
+ },
50
+ get alias() {
51
+ return alias.value;
52
+ },
53
+ get domain() {
54
+ return domain.value;
55
+ },
56
+ get permission() {
57
+ return permission.value;
58
+ },
59
+ get readonly() {
60
+ return readonly.value;
61
+ },
62
+ get internal() {
63
+ return internal.value;
64
+ },
65
+ get runtime() {
66
+ return runtime.value;
67
+ },
68
+ get ignore() {
69
+ return ignore.value;
70
+ },
71
+ get hidden() {
72
+ return hidden.value;
73
+ }
74
+ });
75
+ }
76
+ }), createComponent(Show, {
77
+ get when() {
78
+ return memo(() => !!!isUndefined(children))() && childrenArray(() => children).filter(Boolean).length > 0;
79
+ },
80
+ get children() {
81
+ return [createComponent(Show, {
82
+ get when() {
83
+ return hasAttributes.value;
84
+ },
85
+ get children() {
86
+ return createComponent(Spacing, {});
87
+ }
88
+ }), createComponent(List, { get children() {
89
+ return childrenArray(() => children);
90
+ } })];
91
+ }
92
+ })];
93
+ }
94
+ }));
60
95
  }
61
96
  /**
62
97
  * Uses the `useReflectionClass` hook to retrieve the reflection class from the context, and then renders a `TSDocReflectionClass` component with the retrieved reflection class. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection class without having to manually retrieve the reflection class from the context.
63
98
  */
64
99
  function TSDocContextClass(props) {
65
100
  const reflectionClass = useReflectionClass();
66
- return /* @__PURE__ */ jsx(Show, {
67
- when: isSetObject(reflectionClass.reflection),
68
- children: /* @__PURE__ */ jsx(TSDocReflectionClass, {
69
- ...props,
70
- reflection: reflectionClass.reflection
71
- })
101
+ return createComponent(Show, {
102
+ get when() {
103
+ return isSetObject(reflectionClass.reflection);
104
+ },
105
+ get children() {
106
+ return createComponent(TSDocReflectionClass, mergeProps(props, { get reflection() {
107
+ return reflectionClass.reflection;
108
+ } }));
109
+ }
72
110
  });
73
111
  }
74
112
  /**
@@ -82,45 +120,86 @@ function TSDocReflectionProperty(props) {
82
120
  ]);
83
121
  if (!isSetObject(reflection)) return null;
84
122
  const hasAttributes = computed(() => isSetString(reflection.getTitle()) || !isUndefined(reflection.getAlias()) && reflection.getAlias().length > 0 || !isUndefined(reflection.getPermission()) && reflection.getPermission().length > 0 || isSetString(reflection.getDomain()) || !isUndefined(reflection.isReadonly()) || !isUndefined(reflection.isInternal()) || !isUndefined(reflection.isRuntime()) || !isUndefined(reflection.isIgnored()) || !isUndefined(reflection.isHidden()) || reflection.hasDefault() && !isUndefined(reflection.getDefaultValue()));
85
- return /* @__PURE__ */ jsxs(TSDoc, {
86
- heading: reflection.getDescription(),
87
- ...rest,
88
- children: [/* @__PURE__ */ jsx(Show, {
89
- when: hasAttributes.value,
90
- children: /* @__PURE__ */ jsx(TSDocAttributesTags, {
91
- type: reflection,
92
- title: reflection.getTitle(),
93
- alias: reflection.getAlias(),
94
- domain: reflection.getDomain(),
95
- permission: reflection.getPermission(),
96
- readonly: reflection.isReadonly(),
97
- internal: reflection.isInternal(),
98
- runtime: reflection.isRuntime(),
99
- ignore: reflection.isIgnored(),
100
- hidden: reflection.isHidden(),
101
- defaultValue: defaultValue ?? reflection.getDefaultValue()
102
- })
103
- }), /* @__PURE__ */ jsxs(Show, {
104
- when: !isUndefined(children) && childrenArray(() => children).filter(Boolean).length > 0,
105
- children: [/* @__PURE__ */ jsx(Show, {
106
- when: hasAttributes.value,
107
- children: /* @__PURE__ */ jsx(Spacing, {})
108
- }), /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })]
109
- })]
110
- });
123
+ return createComponent(TSDoc, mergeProps({ get heading() {
124
+ return reflection.getDescription();
125
+ } }, rest, { get children() {
126
+ return [createComponent(Show, {
127
+ get when() {
128
+ return hasAttributes.value;
129
+ },
130
+ get children() {
131
+ return createComponent(TSDocAttributesTags, {
132
+ type: reflection,
133
+ get title() {
134
+ return reflection.getTitle();
135
+ },
136
+ get alias() {
137
+ return reflection.getAlias();
138
+ },
139
+ get domain() {
140
+ return reflection.getDomain();
141
+ },
142
+ get permission() {
143
+ return reflection.getPermission();
144
+ },
145
+ get readonly() {
146
+ return reflection.isReadonly();
147
+ },
148
+ get internal() {
149
+ return reflection.isInternal();
150
+ },
151
+ get runtime() {
152
+ return reflection.isRuntime();
153
+ },
154
+ get ignore() {
155
+ return reflection.isIgnored();
156
+ },
157
+ get hidden() {
158
+ return reflection.isHidden();
159
+ },
160
+ get defaultValue() {
161
+ return defaultValue ?? reflection.getDefaultValue();
162
+ }
163
+ });
164
+ }
165
+ }), createComponent(Show, {
166
+ get when() {
167
+ return memo(() => !!!isUndefined(children))() && childrenArray(() => children).filter(Boolean).length > 0;
168
+ },
169
+ get children() {
170
+ return [createComponent(Show, {
171
+ get when() {
172
+ return hasAttributes.value;
173
+ },
174
+ get children() {
175
+ return createComponent(Spacing, {});
176
+ }
177
+ }), createComponent(List, { get children() {
178
+ return childrenArray(() => children);
179
+ } })];
180
+ }
181
+ })];
182
+ } }));
111
183
  }
112
184
  /**
113
185
  * Uses the `useReflectionProperty` hook to retrieve the reflection property from the context, and then renders a `TSDocReflectionProperty` component with the retrieved reflection property. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection property without having to manually retrieve the reflection property from the context.
114
186
  */
115
187
  function TSDocContextProperty(props) {
116
188
  const reflection = useReflectionPropertyContext();
117
- return /* @__PURE__ */ jsx(Show, {
118
- when: isSetObject(reflection),
119
- children: /* @__PURE__ */ jsx(TSDocReflectionProperty, {
120
- ...props,
121
- reflection: reflection.property,
122
- defaultValue: reflection.defaultValue
123
- })
189
+ return createComponent(Show, {
190
+ get when() {
191
+ return isSetObject(reflection);
192
+ },
193
+ get children() {
194
+ return createComponent(TSDocReflectionProperty, mergeProps(props, {
195
+ get reflection() {
196
+ return reflection.property;
197
+ },
198
+ get defaultValue() {
199
+ return reflection.defaultValue;
200
+ }
201
+ }));
202
+ }
124
203
  });
125
204
  }
126
205
  /**
@@ -129,61 +208,115 @@ function TSDocContextProperty(props) {
129
208
  function TSDocReflectionMethod(props) {
130
209
  const [{ children, reflection }, rest] = splitProps(props, ["children", "reflection"]);
131
210
  if (!isSetObject(reflection)) return null;
132
- return /* @__PURE__ */ jsxs(TSDoc, {
133
- heading: computed(() => reflection.getDescription() || (isString(reflection.getName()) ? code`${String(reflection.getName())} method definition` : void 0)).value,
134
- ...rest,
135
- children: [
136
- /* @__PURE__ */ jsx(TSDocAttributesTags, {
137
- title: reflection.getTitle(),
138
- alias: reflection.getAlias(),
139
- domain: reflection.getDomain(),
140
- permission: reflection.getPermission(),
141
- readonly: reflection.isReadonly(),
142
- internal: reflection.isInternal(),
143
- runtime: reflection.isRuntime(),
144
- ignore: reflection.isIgnored(),
145
- hidden: reflection.isHidden()
211
+ const heading = computed(() => reflection.getDescription() || (isString(reflection.getName()) ? code`${String(reflection.getName())} method definition` : void 0));
212
+ return createComponent(TSDoc, mergeProps({ get heading() {
213
+ return heading.value;
214
+ } }, rest, { get children() {
215
+ return [
216
+ createComponent(TSDocAttributesTags, {
217
+ get title() {
218
+ return reflection.getTitle();
219
+ },
220
+ get alias() {
221
+ return reflection.getAlias();
222
+ },
223
+ get domain() {
224
+ return reflection.getDomain();
225
+ },
226
+ get permission() {
227
+ return reflection.getPermission();
228
+ },
229
+ get readonly() {
230
+ return reflection.isReadonly();
231
+ },
232
+ get internal() {
233
+ return reflection.isInternal();
234
+ },
235
+ get runtime() {
236
+ return reflection.isRuntime();
237
+ },
238
+ get ignore() {
239
+ return reflection.isIgnored();
240
+ },
241
+ get hidden() {
242
+ return reflection.isHidden();
243
+ }
146
244
  }),
147
- /* @__PURE__ */ jsx(Show, {
148
- when: Boolean(children) && childrenArray(() => children).length > 0,
149
- children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
245
+ createComponent(Show, {
246
+ get when() {
247
+ return memo(() => !!Boolean(children))() && childrenArray(() => children).length > 0;
248
+ },
249
+ get children() {
250
+ return createComponent(List, { get children() {
251
+ return childrenArray(() => children);
252
+ } });
253
+ }
150
254
  }),
151
- /* @__PURE__ */ jsxs(Show, {
152
- when: reflection.getParameters().length > 0,
153
- children: [/* @__PURE__ */ jsx(Spacing, {}), /* @__PURE__ */ jsx(For, {
154
- each: reflection.getParameters(),
155
- hardline: true,
156
- ender: /* @__PURE__ */ jsx("hbr", {}),
157
- children: (param) => /* @__PURE__ */ jsx(TSDocParam, {
158
- name: param.getName(),
159
- optional: param.isOptional(),
160
- defaultValue: param.hasDefault() ? param.getDefaultValue() : void 0,
161
- children: /* @__PURE__ */ jsx(Show, {
162
- when: Boolean(param.parameter.description),
163
- fallback: code`A parameter to provide a ${param.getName()} value to the function.`,
164
- children: param.parameter.description
255
+ createComponent(Show, {
256
+ get when() {
257
+ return reflection.getParameters().length > 0;
258
+ },
259
+ get children() {
260
+ return [createComponent(Spacing, {}), createComponent(For, {
261
+ get each() {
262
+ return reflection.getParameters();
263
+ },
264
+ hardline: true,
265
+ get ender() {
266
+ return createIntrinsic("hbr", {});
267
+ },
268
+ children: (param) => createComponent(TSDocParam, {
269
+ get name() {
270
+ return param.getName();
271
+ },
272
+ get optional() {
273
+ return param.isOptional();
274
+ },
275
+ get defaultValue() {
276
+ return memo(() => !!param.hasDefault())() ? param.getDefaultValue() : void 0;
277
+ },
278
+ get children() {
279
+ return createComponent(Show, {
280
+ get when() {
281
+ return Boolean(param.parameter.description);
282
+ },
283
+ get fallback() {
284
+ return code`A parameter to provide a ${param.getName()} value to the function.`;
285
+ },
286
+ get children() {
287
+ return param.parameter.description;
288
+ }
289
+ });
290
+ }
165
291
  })
166
- })
167
- })]
292
+ })];
293
+ }
168
294
  }),
169
- /* @__PURE__ */ jsxs(Show, {
170
- when: reflection.getReturnType().kind !== ReflectionKind.void,
171
- children: [/* @__PURE__ */ jsx(Spacing, {}), /* @__PURE__ */ jsx(TSDocReturns, { children: code`The return value of the function, which is of type ${stringifyType(reflection.getReturnType())}.` })]
295
+ createComponent(Show, {
296
+ get when() {
297
+ return reflection.getReturnType().kind !== ReflectionKind.void;
298
+ },
299
+ get children() {
300
+ return [createComponent(Spacing, {}), createComponent(TSDocReturns, { get children() {
301
+ return code`The return value of the function, which is of type ${stringifyType(reflection.getReturnType())}.`;
302
+ } })];
303
+ }
172
304
  })
173
- ]
174
- });
305
+ ];
306
+ } }));
175
307
  }
176
308
  /**
177
309
  * Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.
178
310
  */
179
311
  function TSDocContextMethod(props) {
180
312
  const reflection = useReflectionMethod();
181
- return /* @__PURE__ */ jsx(Show, {
182
- when: isSetObject(reflection),
183
- children: /* @__PURE__ */ jsx(TSDocReflectionMethod, {
184
- ...props,
185
- reflection
186
- })
313
+ return createComponent(Show, {
314
+ get when() {
315
+ return isSetObject(reflection);
316
+ },
317
+ get children() {
318
+ return createComponent(TSDocReflectionMethod, mergeProps(props, { reflection }));
319
+ }
187
320
  });
188
321
  }
189
322
 
@@ -1 +1 @@
1
- {"version":3,"file":"tsdoc-reflection.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n childrenArray,\n code,\n computed,\n For,\n List,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n ReflectionClass,\n ReflectionKind,\n ReflectionMethod,\n ReflectionProperty,\n stringifyType\n} from \"@powerlines/deepkit/vendor/type\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport {\n useReflectionClass,\n useReflectionMethod,\n useReflectionPropertyContext\n} from \"../../core/contexts/reflection\";\nimport {\n TSDoc,\n TSDocAttributesTags,\n TSDocParam,\n TSDocProps,\n TSDocReturns\n} from \"./tsdoc\";\n\nexport interface TSDocReflectionClassProps<\n T extends Record<string, any> = Record<string, any>\n> extends TSDocProps {\n reflection: ReflectionClass<T>;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection class. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about properties or methods of a class.\n */\nexport function TSDocReflectionClass<\n T extends Record<string, any> = Record<string, any>\n>(props: TSDocReflectionClassProps<T>) {\n const [{ children, heading, reflection }, rest] = splitProps(props, [\n \"heading\",\n \"children\",\n \"reflection\"\n ]);\n\n if (!isSetObject(reflection)) {\n return null;\n }\n\n const title = computed(\n () => reflection.getTitle() || titleCase(reflection.getName())\n );\n const computedHeading = computed(\n () => heading || reflection.getDescription() || title.value\n );\n\n const alias = computed(() => reflection.getAlias());\n const domain = computed(() => reflection.getDomain());\n const permission = computed(() => reflection.getPermission());\n const readonly = computed(() => reflection.isReadonly());\n const internal = computed(() => reflection.isInternal());\n const runtime = computed(() => reflection.isRuntime());\n const ignore = computed(() => reflection.isIgnored());\n const hidden = computed(() => reflection.isHidden());\n\n if (\n !computedHeading.value ||\n (isSetString(computedHeading.value) && computedHeading.value.trim() === \"\")\n ) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(title.value) ||\n (!isUndefined(alias.value) && alias.value.length > 0) ||\n (!isUndefined(permission.value) && permission.value.length > 0) ||\n isSetString(domain.value) ||\n !isUndefined(readonly.value) ||\n !isUndefined(internal.value) ||\n !isUndefined(runtime.value) ||\n !isUndefined(ignore.value) ||\n !isUndefined(hidden.value)\n );\n\n return (\n <TSDoc\n {...rest}\n heading={\n isSetString(computedHeading.value)\n ? computedHeading.value.trim()\n : computedHeading.value\n }>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n title={title.value}\n alias={alias.value}\n domain={domain.value}\n permission={permission.value}\n readonly={readonly.value}\n internal={internal.value}\n runtime={runtime.value}\n ignore={ignore.value}\n hidden={hidden.value}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n/**\n * Uses the `useReflectionClass` hook to retrieve the reflection class from the context, and then renders a `TSDocReflectionClass` component with the retrieved reflection class. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection class without having to manually retrieve the reflection class from the context.\n */\nexport function TSDocContextClass<\n T extends Record<string, any> = Record<string, any>\n>(props: TSDocProps) {\n const reflectionClass = useReflectionClass<T>();\n\n return (\n <Show when={isSetObject(reflectionClass.reflection)}>\n <TSDocReflectionClass\n {...props}\n reflection={reflectionClass.reflection}\n />\n </Show>\n );\n}\n\nexport interface TSDocReflectionPropertyProps extends TSDocProps {\n reflection: ReflectionProperty;\n defaultValue?: any;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection property. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about parameters of a method or properties of a class.\n */\nexport function TSDocReflectionProperty(props: TSDocReflectionPropertyProps) {\n const [{ children, reflection, defaultValue }, rest] = splitProps(props, [\n \"children\",\n \"reflection\",\n \"defaultValue\"\n ]);\n\n if (!isSetObject(reflection)) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(reflection.getTitle()) ||\n (!isUndefined(reflection.getAlias()) &&\n reflection.getAlias().length > 0) ||\n (!isUndefined(reflection.getPermission()) &&\n reflection.getPermission().length > 0) ||\n isSetString(reflection.getDomain()) ||\n !isUndefined(reflection.isReadonly()) ||\n !isUndefined(reflection.isInternal()) ||\n !isUndefined(reflection.isRuntime()) ||\n !isUndefined(reflection.isIgnored()) ||\n !isUndefined(reflection.isHidden()) ||\n (reflection.hasDefault() && !isUndefined(reflection.getDefaultValue()))\n );\n\n return (\n <TSDoc heading={reflection.getDescription()} {...rest}>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={reflection}\n title={reflection.getTitle()}\n alias={reflection.getAlias()}\n domain={reflection.getDomain()}\n permission={reflection.getPermission()}\n readonly={reflection.isReadonly()}\n internal={reflection.isInternal()}\n runtime={reflection.isRuntime()}\n ignore={reflection.isIgnored()}\n hidden={reflection.isHidden()}\n defaultValue={defaultValue ?? reflection.getDefaultValue()}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n/**\n * Uses the `useReflectionProperty` hook to retrieve the reflection property from the context, and then renders a `TSDocReflectionProperty` component with the retrieved reflection property. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection property without having to manually retrieve the reflection property from the context.\n */\nexport function TSDocContextProperty(props: TSDocProps) {\n const reflection = useReflectionPropertyContext();\n\n return (\n <Show when={isSetObject(reflection)}>\n <TSDocReflectionProperty\n {...props}\n reflection={reflection.property}\n defaultValue={reflection.defaultValue}\n />\n </Show>\n );\n}\n\nexport interface TSDocReflectionMethodProps extends TSDocProps {\n reflection: ReflectionMethod;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection method. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. Additionally, this component will render information about the parameters and return type of the method, if available.\n */\nexport function TSDocReflectionMethod(props: TSDocReflectionMethodProps) {\n const [{ children, reflection }, rest] = splitProps(props, [\n \"children\",\n \"reflection\"\n ]);\n\n if (!isSetObject(reflection)) {\n return null;\n }\n\n const heading = computed(\n () =>\n reflection.getDescription() ||\n (isString(reflection.getName())\n ? code`${String(reflection.getName())} method definition`\n : undefined)\n );\n\n return (\n <TSDoc heading={heading.value} {...rest}>\n <TSDocAttributesTags\n title={reflection.getTitle()}\n alias={reflection.getAlias()}\n domain={reflection.getDomain()}\n permission={reflection.getPermission()}\n readonly={reflection.isReadonly()}\n internal={reflection.isInternal()}\n runtime={reflection.isRuntime()}\n ignore={reflection.isIgnored()}\n hidden={reflection.isHidden()}\n />\n <Show\n when={Boolean(children) && childrenArray(() => children).length > 0}>\n <List>{childrenArray(() => children)}</List>\n </Show>\n <Show when={reflection.getParameters().length > 0}>\n <Spacing />\n <For each={reflection.getParameters()} hardline ender={<hbr />}>\n {param => (\n <TSDocParam\n name={param.getName()}\n optional={param.isOptional()}\n defaultValue={\n param.hasDefault() ? param.getDefaultValue() : undefined\n }>\n <Show\n when={Boolean(param.parameter.description)}\n fallback={code`A parameter to provide a ${param.getName()} value to the function.`}>\n {param.parameter.description}\n </Show>\n </TSDocParam>\n )}\n </For>\n </Show>\n <Show when={reflection.getReturnType().kind !== ReflectionKind.void}>\n <Spacing />\n <TSDocReturns>\n {code`The return value of the function, which is of type ${stringifyType(\n reflection.getReturnType()\n )}.`}\n </TSDocReturns>\n </Show>\n </TSDoc>\n );\n}\n\n/**\n * Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.\n */\nexport function TSDocContextMethod(props: TSDocProps) {\n const reflection = useReflectionMethod();\n\n return (\n <Show when={isSetObject(reflection)}>\n <TSDocReflectionMethod {...props} reflection={reflection} />\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8DA,SAAgB,qBAEd,OAAqC;CACrC,MAAM,CAAC,EAAE,UAAU,SAAS,cAAc,QAAQ,WAAW,OAAO;EAClE;EACA;EACA;EACD,CAAC;AAEF,KAAI,CAAC,YAAY,WAAW,CAC1B,QAAO;CAGT,MAAM,QAAQ,eACN,WAAW,UAAU,IAAI,UAAU,WAAW,SAAS,CAAC,CAC/D;CACD,MAAM,kBAAkB,eAChB,WAAW,WAAW,gBAAgB,IAAI,MAAM,MACvD;CAED,MAAM,QAAQ,eAAe,WAAW,UAAU,CAAC;CACnD,MAAM,SAAS,eAAe,WAAW,WAAW,C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AAW,GACX,oBAAC,KAAD;KAAK,MAAM,WAAW,eAAe;KAAE;KAAS,OAAO,oBAAC,OAAD,EAAO;gBAC3D,UACC,oBAAC,YAAD;MACE,MAAM,MAAM,SAAS;MACrB,UAAU,MAAM,YAAY;MAC5B,cACE,MAAM,YAAY,GAAG,MAAM,iBAAiB,GAAG;gBAEjD,oBAAC,MAAD;OACE,MAAM,QAAQ,MAAM,UAAU,YAAY;OAC1C,UAAU,IAAI,4BAA4B,MAAM,SAAS,CAAC;iBACzD,MAAM,UAAU;OACZ;MACI;KAEX,EACD;;GACP,qBAAC,MAAD;IAAM,MAAM,WAAW,eAAe,CAAC,SAAS,eAAe;cAA/D,CACE,oBAAC,SAAD,EAAW,GACX,oBAAC,cAAD,YACG,IAAI,sDAAsD,cACzD,WAAW,eAAe,CAC3B,CAAC,IACW,EACV;;GACD;;;;;;AAOZ,SAAgB,mBAAmB,OAAmB;CACpD,MAAM,aAAa,qBAAqB;AAExC,QACE,oBAAC,MAAD;EAAM,MAAM,YAAY,WAAW;YACjC,oBAAC,uBAAD;GAAuB,GAAI;GAAmB;GAAc;EACvD"}
1
+ {"version":3,"file":"tsdoc-reflection.mjs","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n childrenArray,\n code,\n computed,\n For,\n List,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n ReflectionClass,\n ReflectionKind,\n ReflectionMethod,\n ReflectionProperty,\n stringifyType\n} from \"@powerlines/deepkit/vendor/type\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { Spacing } from \"../../core/components/spacing\";\nimport {\n useReflectionClass,\n useReflectionMethod,\n useReflectionPropertyContext\n} from \"../../core/contexts/reflection\";\nimport {\n TSDoc,\n TSDocAttributesTags,\n TSDocParam,\n TSDocProps,\n TSDocReturns\n} from \"./tsdoc\";\n\nexport interface TSDocReflectionClassProps<\n T extends Record<string, any> = Record<string, any>\n> extends TSDocProps {\n reflection: ReflectionClass<T>;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection class. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about properties or methods of a class.\n */\nexport function TSDocReflectionClass<\n T extends Record<string, any> = Record<string, any>\n>(props: TSDocReflectionClassProps<T>) {\n const [{ children, heading, reflection }, rest] = splitProps(props, [\n \"heading\",\n \"children\",\n \"reflection\"\n ]);\n\n if (!isSetObject(reflection)) {\n return null;\n }\n\n const title = computed(\n () => reflection.getTitle() || titleCase(reflection.getName())\n );\n const computedHeading = computed(\n () => heading || reflection.getDescription() || title.value\n );\n\n const alias = computed(() => reflection.getAlias());\n const domain = computed(() => reflection.getDomain());\n const permission = computed(() => reflection.getPermission());\n const readonly = computed(() => reflection.isReadonly());\n const internal = computed(() => reflection.isInternal());\n const runtime = computed(() => reflection.isRuntime());\n const ignore = computed(() => reflection.isIgnored());\n const hidden = computed(() => reflection.isHidden());\n\n if (\n !computedHeading.value ||\n (isSetString(computedHeading.value) && computedHeading.value.trim() === \"\")\n ) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(title.value) ||\n (!isUndefined(alias.value) && alias.value.length > 0) ||\n (!isUndefined(permission.value) && permission.value.length > 0) ||\n isSetString(domain.value) ||\n !isUndefined(readonly.value) ||\n !isUndefined(internal.value) ||\n !isUndefined(runtime.value) ||\n !isUndefined(ignore.value) ||\n !isUndefined(hidden.value)\n );\n\n return (\n <TSDoc\n {...rest}\n heading={\n isSetString(computedHeading.value)\n ? computedHeading.value.trim()\n : computedHeading.value\n }>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n title={title.value}\n alias={alias.value}\n domain={domain.value}\n permission={permission.value}\n readonly={readonly.value}\n internal={internal.value}\n runtime={runtime.value}\n ignore={ignore.value}\n hidden={hidden.value}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n/**\n * Uses the `useReflectionClass` hook to retrieve the reflection class from the context, and then renders a `TSDocReflectionClass` component with the retrieved reflection class. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection class without having to manually retrieve the reflection class from the context.\n */\nexport function TSDocContextClass<\n T extends Record<string, any> = Record<string, any>\n>(props: TSDocProps) {\n const reflectionClass = useReflectionClass<T>();\n\n return (\n <Show when={isSetObject(reflectionClass.reflection)}>\n <TSDocReflectionClass\n {...props}\n reflection={reflectionClass.reflection}\n />\n </Show>\n );\n}\n\nexport interface TSDocReflectionPropertyProps extends TSDocProps {\n reflection: ReflectionProperty;\n defaultValue?: any;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection property. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. This is useful for rendering additional details about the reflection that may not be included in the description, such as information about parameters of a method or properties of a class.\n */\nexport function TSDocReflectionProperty(props: TSDocReflectionPropertyProps) {\n const [{ children, reflection, defaultValue }, rest] = splitProps(props, [\n \"children\",\n \"reflection\",\n \"defaultValue\"\n ]);\n\n if (!isSetObject(reflection)) {\n return null;\n }\n\n const hasAttributes = computed(\n () =>\n isSetString(reflection.getTitle()) ||\n (!isUndefined(reflection.getAlias()) &&\n reflection.getAlias().length > 0) ||\n (!isUndefined(reflection.getPermission()) &&\n reflection.getPermission().length > 0) ||\n isSetString(reflection.getDomain()) ||\n !isUndefined(reflection.isReadonly()) ||\n !isUndefined(reflection.isInternal()) ||\n !isUndefined(reflection.isRuntime()) ||\n !isUndefined(reflection.isIgnored()) ||\n !isUndefined(reflection.isHidden()) ||\n (reflection.hasDefault() && !isUndefined(reflection.getDefaultValue()))\n );\n\n return (\n <TSDoc heading={reflection.getDescription()} {...rest}>\n <Show when={hasAttributes.value}>\n <TSDocAttributesTags\n type={reflection}\n title={reflection.getTitle()}\n alias={reflection.getAlias()}\n domain={reflection.getDomain()}\n permission={reflection.getPermission()}\n readonly={reflection.isReadonly()}\n internal={reflection.isInternal()}\n runtime={reflection.isRuntime()}\n ignore={reflection.isIgnored()}\n hidden={reflection.isHidden()}\n defaultValue={defaultValue ?? reflection.getDefaultValue()}\n />\n </Show>\n <Show\n when={\n !isUndefined(children) &&\n childrenArray(() => children).filter(Boolean).length > 0\n }>\n <Show when={hasAttributes.value}>\n <Spacing />\n </Show>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n/**\n * Uses the `useReflectionProperty` hook to retrieve the reflection property from the context, and then renders a `TSDocReflectionProperty` component with the retrieved reflection property. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection property without having to manually retrieve the reflection property from the context.\n */\nexport function TSDocContextProperty(props: TSDocProps) {\n const reflection = useReflectionPropertyContext();\n\n return (\n <Show when={isSetObject(reflection)}>\n <TSDocReflectionProperty\n {...props}\n reflection={reflection.property}\n defaultValue={reflection.defaultValue}\n />\n </Show>\n );\n}\n\nexport interface TSDocReflectionMethodProps extends TSDocProps {\n reflection: ReflectionMethod;\n}\n\n/**\n * Generates a TSDoc documentation block for the given reflection method. This component will render the description of the reflection as the main content of the documentation block, and will render any additional attributes (such as title, alias, domain, permission, etc.) as tags in the documentation block. If there are child elements provided, they will be rendered as a list below the main content of the documentation block. Additionally, this component will render information about the parameters and return type of the method, if available.\n */\nexport function TSDocReflectionMethod(props: TSDocReflectionMethodProps) {\n const [{ children, reflection }, rest] = splitProps(props, [\n \"children\",\n \"reflection\"\n ]);\n\n if (!isSetObject(reflection)) {\n return null;\n }\n\n const heading = computed(\n () =>\n reflection.getDescription() ||\n (isString(reflection.getName())\n ? code`${String(reflection.getName())} method definition`\n : undefined)\n );\n\n return (\n <TSDoc heading={heading.value} {...rest}>\n <TSDocAttributesTags\n title={reflection.getTitle()}\n alias={reflection.getAlias()}\n domain={reflection.getDomain()}\n permission={reflection.getPermission()}\n readonly={reflection.isReadonly()}\n internal={reflection.isInternal()}\n runtime={reflection.isRuntime()}\n ignore={reflection.isIgnored()}\n hidden={reflection.isHidden()}\n />\n <Show\n when={Boolean(children) && childrenArray(() => children).length > 0}>\n <List>{childrenArray(() => children)}</List>\n </Show>\n <Show when={reflection.getParameters().length > 0}>\n <Spacing />\n <For each={reflection.getParameters()} hardline ender={<hbr />}>\n {param => (\n <TSDocParam\n name={param.getName()}\n optional={param.isOptional()}\n defaultValue={\n param.hasDefault() ? param.getDefaultValue() : undefined\n }>\n <Show\n when={Boolean(param.parameter.description)}\n fallback={code`A parameter to provide a ${param.getName()} value to the function.`}>\n {param.parameter.description}\n </Show>\n </TSDocParam>\n )}\n </For>\n </Show>\n <Show when={reflection.getReturnType().kind !== ReflectionKind.void}>\n <Spacing />\n <TSDocReturns>\n {code`The return value of the function, which is of type ${stringifyType(\n reflection.getReturnType()\n )}.`}\n </TSDocReturns>\n </Show>\n </TSDoc>\n );\n}\n\n/**\n * Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.\n */\nexport function TSDocContextMethod(props: TSDocProps) {\n const reflection = useReflectionMethod();\n\n return (\n <Show when={isSetObject(reflection)}>\n <TSDocReflectionMethod {...props} reflection={reflection} />\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgCA,SAAE,qBAAA,OAAA;CACA,MAAM,CAAC,EACT,UACA,SACA,cACA,QAAS,WAAe,OAAG;EAAA;EAAY;EAAgB;EAAC,CAAA;AACxD,KAAM,CAAC,YAAE,WAAqB,CAC9B,QAAS;CAEP,MAAA,QAAA,eAAkB,WAAA,UAAA,IAAA,UAAA,WAAA,SAAA,CAAA,CAAA;CAClB,MAAA,kBAAmB,eAAA,WAAA,WAAA,gBAAA,IAAA,MAAA,MAAA;CACnB,MAAA,QAAA,eAAA,WAAA,UAAA,CAAA;CACA,MAAM,SAAM,eAAc,WAAW,WAAA,CAAA;CACvC,MAAO,aAAA,eAAA,WAAA,eAAA,CAAA;CACL,MAAK,WAAA,eAAA,WAAA,YAAA,CAAA;CACL,MAAA,WAAA,eAAmB,WAAA,YAAA,CAAA;CACnB,MAAA,UAAU,eAAA,WAAA,WAAA,CAAA;CACV,MAAA,SAAU,eAAA,WAAA,WAAA,CAAA;CACV,MAAA,SAAA,eAAA,WAAA,UAAA,CAAA;AACA,KAAI,CAAC,gBAAS,SAAA,YAAA,gBAAA,MAAA,IAAA,gBAAA,MAAA,MAAA,KAAA;CAGd,MAAE,gBAAe,eAAe,YAAe,MAAG,MAAA,IAAA,CAAA,YAAA,MAAA,MAAA,IAAA,MAAA,MAAA,SAAA,KAAA,CAAA,YAAA,WAAA,MAAA,IAAA,WAAA,MAAA,SAAA,KAAA,YAAA,OAAA,MAAA,IAAA,CAAA,YAAA,SAAA,MAAA,IAAA,CAAA,YAAA,SAAA,MAAA,IAAA,CAAA,YAAA,QAAA,MAAA,IAAA,CAAA,YAAA,OAAA,MAAA,IAAA,CAAA,YAAA,OAAA,M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