@powerlines/plugin-alloy 0.25.29 → 0.25.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/components/output.cjs +12 -7
- package/dist/core/components/output.mjs +12 -7
- package/dist/core/components/output.mjs.map +1 -1
- package/dist/core/components/single-line-comment.cjs +5 -8
- package/dist/core/components/single-line-comment.mjs +5 -8
- package/dist/core/components/single-line-comment.mjs.map +1 -1
- package/dist/core/components/source-file.cjs +8 -7
- package/dist/core/components/source-file.mjs +8 -7
- package/dist/core/components/source-file.mjs.map +1 -1
- package/dist/core/components/spacing.cjs +5 -6
- package/dist/core/components/spacing.mjs +5 -6
- package/dist/core/components/spacing.mjs.map +1 -1
- package/dist/index.cjs +5 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -1
- package/dist/markdown/components/front-matter.cjs +12 -9
- package/dist/markdown/components/front-matter.mjs +12 -9
- package/dist/markdown/components/front-matter.mjs.map +1 -1
- package/dist/markdown/components/markdown-file.cjs +57 -41
- package/dist/markdown/components/markdown-file.mjs +57 -41
- package/dist/markdown/components/markdown-file.mjs.map +1 -1
- package/dist/markdown/components/markdown-table.cjs +31 -20
- package/dist/markdown/components/markdown-table.mjs +31 -20
- package/dist/markdown/components/markdown-table.mjs.map +1 -1
- package/dist/render.cjs +10 -4
- package/dist/render.mjs +10 -4
- package/dist/render.mjs.map +1 -1
- package/dist/typescript/components/builtin-file.cjs +21 -9
- package/dist/typescript/components/builtin-file.mjs +21 -9
- package/dist/typescript/components/builtin-file.mjs.map +1 -1
- package/dist/typescript/components/class-declaration.cjs +112 -79
- package/dist/typescript/components/class-declaration.mjs +112 -79
- package/dist/typescript/components/class-declaration.mjs.map +1 -1
- package/dist/typescript/components/dynamic-import-statement.cjs +6 -1
- package/dist/typescript/components/dynamic-import-statement.mjs +6 -1
- package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -1
- package/dist/typescript/components/entry-file.cjs +7 -3
- package/dist/typescript/components/entry-file.mjs +7 -3
- package/dist/typescript/components/entry-file.mjs.map +1 -1
- package/dist/typescript/components/infrastructure-file.cjs +7 -3
- package/dist/typescript/components/infrastructure-file.mjs +7 -3
- package/dist/typescript/components/infrastructure-file.mjs.map +1 -1
- package/dist/typescript/components/interface-declaration.cjs +83 -47
- package/dist/typescript/components/interface-declaration.mjs +83 -47
- package/dist/typescript/components/interface-declaration.mjs.map +1 -1
- package/dist/typescript/components/object-declaration.cjs +48 -36
- package/dist/typescript/components/object-declaration.mjs +48 -36
- package/dist/typescript/components/object-declaration.mjs.map +1 -1
- package/dist/typescript/components/property-name.cjs +2 -2
- package/dist/typescript/components/property-name.mjs +3 -3
- package/dist/typescript/components/property-name.mjs.map +1 -1
- package/dist/typescript/components/tsdoc-reflection.cjs +112 -54
- package/dist/typescript/components/tsdoc-reflection.mjs +112 -54
- package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -1
- package/dist/typescript/components/tsdoc.cjs +211 -140
- package/dist/typescript/components/tsdoc.mjs +211 -140
- package/dist/typescript/components/tsdoc.mjs.map +1 -1
- package/dist/typescript/components/type-declaration.cjs +17 -9
- package/dist/typescript/components/type-declaration.mjs +17 -9
- package/dist/typescript/components/type-declaration.mjs.map +1 -1
- package/dist/typescript/components/type-parameters.cjs +33 -33
- package/dist/typescript/components/type-parameters.mjs +33 -33
- package/dist/typescript/components/type-parameters.mjs.map +1 -1
- package/dist/typescript/components/typescript-file.cjs +90 -65
- package/dist/typescript/components/typescript-file.mjs +90 -65
- package/dist/typescript/components/typescript-file.mjs.map +1 -1
- package/dist/typescript/contexts/lexical-scope.cjs +5 -1
- package/dist/typescript/contexts/lexical-scope.mjs +5 -1
- package/dist/typescript/contexts/lexical-scope.mjs.map +1 -1
- package/dist/typescript/contexts/member-scope.cjs +5 -2
- package/dist/typescript/contexts/member-scope.mjs +5 -2
- package/dist/typescript/contexts/member-scope.mjs.map +1 -1
- package/dist/yaml/components/yaml-file.cjs +58 -48
- package/dist/yaml/components/yaml-file.mjs +58 -48
- package/dist/yaml/components/yaml-file.mjs.map +1 -1
- package/package.json +6 -6
|
@@ -2,6 +2,7 @@ import { useReflectionClass, useReflectionMethod, useReflectionProperty } from "
|
|
|
2
2
|
import { Spacing } from "../../core/components/spacing.mjs";
|
|
3
3
|
import { TSDoc, TSDocAttributesTags, TSDocParam, TSDocReturns } from "./tsdoc.mjs";
|
|
4
4
|
import { For, List, Show, childrenArray, code, computed, splitProps } from "@alloy-js/core";
|
|
5
|
+
import { jsx, jsxs } from "@alloy-js/core/jsx-runtime";
|
|
5
6
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
6
7
|
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
7
8
|
import { ReflectionKind, stringifyType } from "@powerlines/deepkit/vendor/type";
|
|
@@ -31,26 +32,42 @@ function TSDocReflectionClass(props) {
|
|
|
31
32
|
const hidden = computed(() => reflection.isHidden());
|
|
32
33
|
if (!computedHeading.value || isSetString(computedHeading.value) && computedHeading.value.trim() === "") return null;
|
|
33
34
|
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(ignore.value) || !isUndefined(hidden.value));
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
return /* @__PURE__ */ jsxs(TSDoc, {
|
|
36
|
+
...rest,
|
|
37
|
+
heading: isSetString(computedHeading.value) ? computedHeading.value.trim() : computedHeading.value,
|
|
38
|
+
children: [/* @__PURE__ */ jsx(Show, {
|
|
39
|
+
when: hasAttributes.value,
|
|
40
|
+
children: /* @__PURE__ */ jsx(TSDocAttributesTags, {
|
|
41
|
+
title: title.value,
|
|
42
|
+
alias: alias.value,
|
|
43
|
+
domain: domain.value,
|
|
44
|
+
permission: permission.value,
|
|
45
|
+
readonly: readonly.value,
|
|
46
|
+
internal: internal.value,
|
|
47
|
+
ignore: ignore.value,
|
|
48
|
+
hidden: hidden.value
|
|
49
|
+
})
|
|
50
|
+
}), /* @__PURE__ */ jsxs(Show, {
|
|
51
|
+
when: !isUndefined(children) && childrenArray(() => children).filter(Boolean).length > 0,
|
|
52
|
+
children: [/* @__PURE__ */ jsx(Show, {
|
|
53
|
+
when: hasAttributes.value,
|
|
54
|
+
children: /* @__PURE__ */ jsx(Spacing, {})
|
|
55
|
+
}), /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })]
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
45
58
|
}
|
|
46
59
|
/**
|
|
47
60
|
* 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.
|
|
48
61
|
*/
|
|
49
62
|
function TSDocContextClass(props) {
|
|
50
63
|
const reflectionClass = useReflectionClass();
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
return /* @__PURE__ */ jsx(Show, {
|
|
65
|
+
when: isSetObject(reflectionClass.reflection),
|
|
66
|
+
children: /* @__PURE__ */ jsx(TSDocReflectionClass, {
|
|
67
|
+
...props,
|
|
68
|
+
reflection: reflectionClass.reflection
|
|
69
|
+
})
|
|
70
|
+
});
|
|
54
71
|
}
|
|
55
72
|
/**
|
|
56
73
|
* 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.
|
|
@@ -59,26 +76,44 @@ function TSDocReflectionProperty(props) {
|
|
|
59
76
|
const [{ children, reflection }, rest] = splitProps(props, ["children", "reflection"]);
|
|
60
77
|
if (!isSetObject(reflection)) return null;
|
|
61
78
|
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.isIgnored()) || !isUndefined(reflection.isHidden()) || reflection.hasDefault() && !isUndefined(reflection.getDefaultValue()));
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
79
|
+
return /* @__PURE__ */ jsxs(TSDoc, {
|
|
80
|
+
heading: reflection.getDescription(),
|
|
81
|
+
...rest,
|
|
82
|
+
children: [/* @__PURE__ */ jsx(Show, {
|
|
83
|
+
when: hasAttributes.value,
|
|
84
|
+
children: /* @__PURE__ */ jsx(TSDocAttributesTags, {
|
|
85
|
+
type: reflection,
|
|
86
|
+
title: reflection.getTitle(),
|
|
87
|
+
alias: reflection.getAlias(),
|
|
88
|
+
domain: reflection.getDomain(),
|
|
89
|
+
permission: reflection.getPermission(),
|
|
90
|
+
readonly: reflection.isReadonly(),
|
|
91
|
+
internal: reflection.isInternal(),
|
|
92
|
+
ignore: reflection.isIgnored(),
|
|
93
|
+
hidden: reflection.isHidden(),
|
|
94
|
+
defaultValue: reflection.getDefaultValue()
|
|
95
|
+
})
|
|
96
|
+
}), /* @__PURE__ */ jsxs(Show, {
|
|
97
|
+
when: !isUndefined(children) && childrenArray(() => children).filter(Boolean).length > 0,
|
|
98
|
+
children: [/* @__PURE__ */ jsx(Show, {
|
|
99
|
+
when: hasAttributes.value,
|
|
100
|
+
children: /* @__PURE__ */ jsx(Spacing, {})
|
|
101
|
+
}), /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })]
|
|
102
|
+
})]
|
|
103
|
+
});
|
|
73
104
|
}
|
|
74
105
|
/**
|
|
75
106
|
* 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.
|
|
76
107
|
*/
|
|
77
108
|
function TSDocContextProperty(props) {
|
|
78
109
|
const reflection = useReflectionProperty();
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
|
|
110
|
+
return /* @__PURE__ */ jsx(Show, {
|
|
111
|
+
when: isSetObject(reflection),
|
|
112
|
+
children: /* @__PURE__ */ jsx(TSDocReflectionProperty, {
|
|
113
|
+
...props,
|
|
114
|
+
reflection
|
|
115
|
+
})
|
|
116
|
+
});
|
|
82
117
|
}
|
|
83
118
|
/**
|
|
84
119
|
* 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.
|
|
@@ -86,38 +121,61 @@ function TSDocContextProperty(props) {
|
|
|
86
121
|
function TSDocReflectionMethod(props) {
|
|
87
122
|
const [{ children, reflection }, rest] = splitProps(props, ["children", "reflection"]);
|
|
88
123
|
if (!isSetObject(reflection)) return null;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
124
|
+
return /* @__PURE__ */ jsxs(TSDoc, {
|
|
125
|
+
heading: computed(() => reflection.getDescription() || (isString(reflection.getName()) ? code`${String(reflection.getName())} method definition` : void 0)).value,
|
|
126
|
+
...rest,
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ jsx(TSDocAttributesTags, {
|
|
129
|
+
title: reflection.getTitle(),
|
|
130
|
+
alias: reflection.getAlias(),
|
|
131
|
+
domain: reflection.getDomain(),
|
|
132
|
+
permission: reflection.getPermission(),
|
|
133
|
+
readonly: reflection.isReadonly(),
|
|
134
|
+
internal: reflection.isInternal(),
|
|
135
|
+
ignore: reflection.isIgnored(),
|
|
136
|
+
hidden: reflection.isHidden()
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ jsx(Show, {
|
|
139
|
+
when: Boolean(children) && childrenArray(() => children).length > 0,
|
|
140
|
+
children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ jsxs(Show, {
|
|
143
|
+
when: reflection.getParameters().length > 0,
|
|
144
|
+
children: [/* @__PURE__ */ jsx(Spacing, {}), /* @__PURE__ */ jsx(For, {
|
|
145
|
+
each: reflection.getParameters(),
|
|
146
|
+
hardline: true,
|
|
147
|
+
ender: /* @__PURE__ */ jsx("hbr", {}),
|
|
148
|
+
children: (param) => /* @__PURE__ */ jsx(TSDocParam, {
|
|
149
|
+
name: param.getName(),
|
|
150
|
+
optional: param.isOptional(),
|
|
151
|
+
defaultValue: param.hasDefault() ? param.getDefaultValue() : void 0,
|
|
152
|
+
children: /* @__PURE__ */ jsx(Show, {
|
|
153
|
+
when: Boolean(param.parameter.description),
|
|
154
|
+
fallback: code`A parameter to provide a ${param.getName()} value to the function.`,
|
|
155
|
+
children: param.parameter.description
|
|
156
|
+
})
|
|
157
|
+
})
|
|
158
|
+
})]
|
|
159
|
+
}),
|
|
160
|
+
/* @__PURE__ */ jsxs(Show, {
|
|
161
|
+
when: reflection.getReturnType().kind !== ReflectionKind.void,
|
|
162
|
+
children: [/* @__PURE__ */ jsx(Spacing, {}), /* @__PURE__ */ jsx(TSDocReturns, { children: code`The return value of the function, which is of type ${stringifyType(reflection.getReturnType())}.` })]
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
});
|
|
112
166
|
}
|
|
113
167
|
/**
|
|
114
168
|
* 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.
|
|
115
169
|
*/
|
|
116
170
|
function TSDocContextMethod(props) {
|
|
117
171
|
const reflection = useReflectionMethod();
|
|
118
|
-
return
|
|
119
|
-
|
|
120
|
-
|
|
172
|
+
return /* @__PURE__ */ jsx(Show, {
|
|
173
|
+
when: isSetObject(reflection),
|
|
174
|
+
children: /* @__PURE__ */ jsx(TSDocReflectionMethod, {
|
|
175
|
+
...props,
|
|
176
|
+
reflection
|
|
177
|
+
})
|
|
178
|
+
});
|
|
121
179
|
}
|
|
122
180
|
|
|
123
181
|
//#endregion
|
|
@@ -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 useReflectionProperty\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 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(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 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}\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 }, rest] = splitProps(props, [\n \"children\",\n \"reflection\"\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.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 ignore={reflection.isIgnored()}\n hidden={reflection.isHidden()}\n 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 = useReflectionProperty();\n\n return (\n <Show when={isSetObject(reflection)}>\n <TSDocReflectionProperty {...props} reflection={reflection} />\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 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,S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GAAG;QACrE,CAAC,MAAM,oBAAoB,SAAS,CAAC,EAAE,KAAK;MAC9C,EAAE,KAAK;MACP,CAAC,KAAK,MAAM,WAAW,eAAe,CAAC,SAAS,GAAG;QACjD,CAAC,UAAU;QACX,CAAC,IAAI,MAAM,WAAW,eAAe,EAAE,SAAS,OAAO,CAAC,QAAQ;YAC7D,UACC,CAAC,WACC,MAAM,MAAM,SAAS,EACrB,UAAU,MAAM,YAAY,EAC5B,cACE,MAAM,YAAY,GAAG,MAAM,iBAAiB,GAAG,QAC/C;cACF,CAAC,KACC,MAAM,QAAQ,MAAM,UAAU,YAAY,EAC1C,UAAU,IAAI,4BAA4B,MAAM,SAAS,CAAC,0BAA0B;iBACnF,MAAM,UAAU,YAAY;cAC/B,EAAE,KAAK;YACT,EAAE,YACF;QACJ,EAAE,IAAI;MACR,EAAE,KAAK;MACP,CAAC,KAAK,MAAM,WAAW,eAAe,CAAC,SAAS,eAAe,MAAM;QACnE,CAAC,UAAU;QACX,CAAC,aAAa;WACX,IAAI,sDAAsD,cACzD,WAAW,eAAe,CAC3B,CAAC,GAAG;QACP,EAAE,aAAa;MACjB,EAAE,KAAK;IACT,EAAE;;;;;AAON,SAAgB,mBAAmB,OAAmB;CACpD,MAAM,aAAa,qBAAqB;AAExC,QACE,CAAC,KAAK,MAAM,YAAY,WAAW,EAAE;MACnC,CAAC,0BAA0B,OAAO,YAAY,cAAc;IAC9D,EAAE"}
|
|
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 useReflectionProperty\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 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(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 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}\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 }, rest] = splitProps(props, [\n \"children\",\n \"reflection\"\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.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 ignore={reflection.isIgnored()}\n hidden={reflection.isHidden()}\n 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 = useReflectionProperty();\n\n return (\n <Show when={isSetObject(reflection)}>\n <TSDocReflectionProperty {...props} reflection={reflection} />\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 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,CAAC;CACrD,MAAM,aAAa,eAAe,WAAW,eAAe,CAAC;CAC7D,MAAM,WAAW,eAAe,WAAW,YAAY,CAAC;CACxD,MAAM,WAAW,eAAe,WAAW,YAAY,CAAC;CACxD,MAAM,SAAS,eAAe,WAAW,WAAW,CAAC;CACrD,MAAM,SAAS,eAAe,WAAW,UAAU,CAAC;AAEpD,KACE,CAAC,gBAAgB,SAChB,YAAY,gBAAgB,MAAM,IAAI,gBAAgB,MAAM,MAAM,KAAK,GAExE,QAAO;CAGT,MAAM,gBAAgB,eAElB,YAAY,MAAM,MAAM,IACvB,CAAC,YAAY,MAAM,MAAM,IAAI,MAAM,MAAM,SAAS,KAClD,CAAC,YAAY,WAAW,MAAM,IAAI,WAAW,MAAM,SAAS,KAC7D,YAAY,OAAO,MAAM,IACzB,CAAC,YAAY,SAAS,MAAM,IAC5B,CAAC,YAAY,SAAS,MAAM,IAC5B,CAAC,YAAY,OAAO,MAAM,IAC1B,CAAC,YAAY,OAAO,MAAM,CAC7B;AAED,QACE,qBAAC,OAAD;EACE,GAAI;EACJ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