@powerlines/plugin-alloy 0.25.25 → 0.25.26
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/README.md +14 -16
- package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -1
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/core/components/index.cjs +1 -0
- package/dist/core/components/output.cjs +9 -8
- package/dist/core/components/output.d.cts +2 -3
- package/dist/core/components/output.d.cts.map +1 -1
- package/dist/core/components/output.d.mts +2 -3
- package/dist/core/components/output.d.mts.map +1 -1
- package/dist/core/components/single-line-comment.cjs +6 -5
- package/dist/core/components/single-line-comment.d.cts +2 -2
- package/dist/core/components/single-line-comment.d.cts.map +1 -1
- package/dist/core/components/single-line-comment.d.mts.map +1 -1
- package/dist/core/components/source-file.cjs +14 -13
- package/dist/core/components/source-file.d.cts +2 -2
- package/dist/core/components/source-file.d.cts.map +1 -1
- package/dist/core/components/source-file.d.mts +2 -2
- package/dist/core/components/source-file.d.mts.map +1 -1
- package/dist/core/components/spacing.cjs +6 -5
- package/dist/core/components/spacing.d.cts +2 -2
- package/dist/core/components/spacing.d.cts.map +1 -1
- package/dist/core/components/spacing.d.mts.map +1 -1
- package/dist/core/contexts/context.cjs +5 -4
- package/dist/core/contexts/context.d.cts +0 -1
- package/dist/core/contexts/context.d.cts.map +1 -1
- package/dist/core/contexts/context.d.mts +0 -1
- package/dist/core/contexts/context.d.mts.map +1 -1
- package/dist/core/contexts/index.cjs +1 -0
- package/dist/core/contexts/meta.cjs +5 -4
- package/dist/core/contexts/meta.d.cts.map +1 -1
- package/dist/core/contexts/meta.d.mts.map +1 -1
- package/dist/core/contexts/reflection.cjs +11 -10
- package/dist/core/contexts/reflection.d.cts.map +1 -1
- package/dist/core/contexts/reflection.d.mts.map +1 -1
- package/dist/core/helpers/code.cjs +4 -3
- package/dist/core/helpers/code.d.cts +0 -1
- package/dist/core/helpers/code.d.cts.map +1 -1
- package/dist/core/helpers/code.d.mts +0 -1
- package/dist/core/helpers/code.d.mts.map +1 -1
- package/dist/core/helpers/index.cjs +1 -0
- package/dist/core/index.cjs +1 -0
- package/dist/core/index.d.cts +0 -3
- package/dist/core/index.d.mts +0 -3
- package/dist/helpers/capnp.cjs +65 -64
- package/dist/helpers/capnp.d.cts +0 -1
- package/dist/helpers/capnp.d.cts.map +1 -1
- package/dist/helpers/capnp.d.mts +0 -1
- package/dist/helpers/capnp.d.mts.map +1 -1
- package/dist/helpers/capnp.mjs +3 -3
- package/dist/helpers/create-builtin.cjs +4 -3
- package/dist/helpers/create-builtin.d.cts.map +1 -1
- package/dist/helpers/create-builtin.d.mts.map +1 -1
- package/dist/helpers/index.cjs +1 -0
- package/dist/helpers/refkey.cjs +4 -3
- package/dist/helpers/refkey.d.cts +0 -1
- package/dist/helpers/refkey.d.cts.map +1 -1
- package/dist/helpers/refkey.d.mts +0 -1
- package/dist/helpers/refkey.d.mts.map +1 -1
- package/dist/helpers/typescript.cjs +14 -13
- package/dist/helpers/typescript.d.cts.map +1 -1
- package/dist/helpers/typescript.d.mts.map +1 -1
- package/dist/index.cjs +8 -9
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -2
- package/dist/markdown/components/front-matter.cjs +8 -7
- package/dist/markdown/components/front-matter.d.cts +2 -2
- package/dist/markdown/components/front-matter.d.cts.map +1 -1
- package/dist/markdown/components/front-matter.d.mts +2 -2
- package/dist/markdown/components/front-matter.d.mts.map +1 -1
- package/dist/markdown/components/index.cjs +1 -0
- package/dist/markdown/components/markdown-file.cjs +34 -33
- package/dist/markdown/components/markdown-file.d.cts +3 -3
- package/dist/markdown/components/markdown-file.d.cts.map +1 -1
- package/dist/markdown/components/markdown-file.d.mts +3 -3
- package/dist/markdown/components/markdown-file.d.mts.map +1 -1
- package/dist/markdown/components/markdown-table.cjs +26 -25
- package/dist/markdown/components/markdown-table.d.cts +4 -4
- package/dist/markdown/components/markdown-table.d.cts.map +1 -1
- package/dist/markdown/components/markdown-table.d.mts +4 -4
- package/dist/markdown/components/markdown-table.d.mts.map +1 -1
- package/dist/markdown/contexts/index.cjs +1 -0
- package/dist/markdown/contexts/markdown-table.cjs +7 -6
- package/dist/markdown/contexts/markdown-table.d.cts.map +1 -1
- package/dist/markdown/contexts/markdown-table.d.mts.map +1 -1
- package/dist/markdown/index.cjs +1 -0
- package/dist/markdown/index.d.cts +0 -2
- package/dist/markdown/index.d.mts +0 -2
- package/dist/render.cjs +10 -9
- package/dist/render.d.cts +0 -1
- package/dist/render.d.cts.map +1 -1
- package/dist/render.d.mts +0 -1
- package/dist/render.d.mts.map +1 -1
- package/dist/types/components.d.cts.map +1 -1
- package/dist/types/components.d.mts.map +1 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/typescript/components/builtin-file.cjs +14 -13
- package/dist/typescript/components/builtin-file.d.cts +2 -2
- package/dist/typescript/components/builtin-file.d.cts.map +1 -1
- package/dist/typescript/components/builtin-file.d.mts +2 -2
- package/dist/typescript/components/builtin-file.d.mts.map +1 -1
- package/dist/typescript/components/class-declaration.cjs +57 -56
- package/dist/typescript/components/class-declaration.d.cts.map +1 -1
- package/dist/typescript/components/class-declaration.d.mts.map +1 -1
- package/dist/typescript/components/dynamic-import-statement.cjs +6 -5
- package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -1
- package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
- package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -1
- package/dist/typescript/components/entry-file.cjs +12 -11
- package/dist/typescript/components/entry-file.d.cts +2 -2
- package/dist/typescript/components/entry-file.d.cts.map +1 -1
- package/dist/typescript/components/entry-file.d.mts +2 -2
- package/dist/typescript/components/entry-file.d.mts.map +1 -1
- package/dist/typescript/components/index.cjs +1 -0
- package/dist/typescript/components/infrastructure-file.cjs +11 -10
- package/dist/typescript/components/infrastructure-file.d.cts +2 -2
- package/dist/typescript/components/infrastructure-file.d.cts.map +1 -1
- package/dist/typescript/components/infrastructure-file.d.mts +2 -2
- package/dist/typescript/components/infrastructure-file.d.mts.map +1 -1
- package/dist/typescript/components/interface-declaration.cjs +59 -58
- package/dist/typescript/components/interface-declaration.d.cts +2 -2
- package/dist/typescript/components/interface-declaration.d.cts.map +1 -1
- package/dist/typescript/components/interface-declaration.d.mts +2 -2
- package/dist/typescript/components/interface-declaration.d.mts.map +1 -1
- package/dist/typescript/components/interface-declaration.mjs +2 -2
- package/dist/typescript/components/object-declaration.cjs +40 -39
- package/dist/typescript/components/object-declaration.d.cts +3 -3
- package/dist/typescript/components/object-declaration.d.cts.map +1 -1
- package/dist/typescript/components/object-declaration.d.mts +3 -3
- package/dist/typescript/components/object-declaration.d.mts.map +1 -1
- package/dist/typescript/components/property-name.cjs +8 -7
- package/dist/typescript/components/property-name.d.cts +2 -2
- package/dist/typescript/components/property-name.d.cts.map +1 -1
- package/dist/typescript/components/property-name.d.mts +2 -2
- package/dist/typescript/components/property-name.d.mts.map +1 -1
- package/dist/typescript/components/record-expression.cjs +4 -3
- package/dist/typescript/components/record-expression.d.cts.map +1 -1
- package/dist/typescript/components/record-expression.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc-reflection.cjs +74 -73
- package/dist/typescript/components/tsdoc-reflection.d.cts +7 -7
- package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -1
- package/dist/typescript/components/tsdoc-reflection.d.mts +7 -7
- package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc.cjs +107 -106
- package/dist/typescript/components/tsdoc.d.cts.map +1 -1
- package/dist/typescript/components/tsdoc.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc.mjs +2 -2
- package/dist/typescript/components/tsdoc.mjs.map +1 -1
- package/dist/typescript/components/type-declaration.cjs +11 -10
- package/dist/typescript/components/type-declaration.d.cts.map +1 -1
- package/dist/typescript/components/type-declaration.d.mts +2 -2
- package/dist/typescript/components/type-declaration.d.mts.map +1 -1
- package/dist/typescript/components/type-declaration.mjs +1 -1
- package/dist/typescript/components/type-parameters.cjs +17 -16
- package/dist/typescript/components/type-parameters.d.cts.map +1 -1
- package/dist/typescript/components/type-parameters.d.mts.map +1 -1
- package/dist/typescript/components/typescript-file.cjs +63 -62
- package/dist/typescript/components/typescript-file.d.cts.map +1 -1
- package/dist/typescript/components/typescript-file.d.mts.map +1 -1
- package/dist/typescript/contexts/index.cjs +1 -0
- package/dist/typescript/contexts/lexical-scope.cjs +8 -7
- package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -1
- package/dist/typescript/contexts/lexical-scope.d.mts +2 -2
- package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -1
- package/dist/typescript/contexts/member-scope.cjs +8 -7
- package/dist/typescript/contexts/member-scope.d.cts.map +1 -1
- package/dist/typescript/contexts/member-scope.d.mts.map +1 -1
- package/dist/typescript/helpers/get-call-signature-props.cjs +5 -4
- package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -1
- package/dist/typescript/helpers/get-call-signature-props.d.cts.map +1 -1
- package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -1
- package/dist/typescript/helpers/get-call-signature-props.d.mts.map +1 -1
- package/dist/typescript/helpers/index.cjs +1 -0
- package/dist/typescript/helpers/utilities.cjs +1 -0
- package/dist/typescript/helpers/utilities.d.cts.map +1 -1
- package/dist/typescript/helpers/utilities.d.mts.map +1 -1
- package/dist/typescript/index.cjs +1 -0
- package/dist/typescript/index.d.cts +0 -3
- package/dist/typescript/index.d.mts +0 -3
- package/dist/yaml/components/index.cjs +1 -0
- package/dist/yaml/components/yaml-file.cjs +34 -33
- package/dist/yaml/components/yaml-file.d.cts.map +1 -1
- package/dist/yaml/components/yaml-file.d.mts.map +1 -1
- package/dist/yaml/index.cjs +1 -0
- package/dist/yaml/index.d.cts +0 -1
- package/dist/yaml/index.d.mts +0 -1
- package/package.json +8 -8
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
const require_core_contexts_reflection = require('../../core/contexts/reflection.cjs');
|
|
3
4
|
const require_core_components_spacing = require('../../core/components/spacing.cjs');
|
|
4
5
|
const require_typescript_components_tsdoc = require('./tsdoc.cjs');
|
|
5
|
-
let
|
|
6
|
-
let
|
|
7
|
-
let
|
|
8
|
-
let
|
|
9
|
-
let
|
|
10
|
-
let
|
|
11
|
-
let
|
|
12
|
-
let
|
|
6
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
7
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
8
|
+
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
9
|
+
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
10
|
+
let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
11
|
+
let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
12
|
+
let _stryke_type_checks = require("@stryke/type-checks");
|
|
13
|
+
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
13
14
|
|
|
14
15
|
//#region src/typescript/components/tsdoc-reflection.tsx
|
|
15
16
|
/**
|
|
16
17
|
* 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.
|
|
17
18
|
*/
|
|
18
19
|
function TSDocReflectionClass(props) {
|
|
19
|
-
const [{ children, heading, reflection }, rest] = (0,
|
|
20
|
+
const [{ children, heading, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, [
|
|
20
21
|
"heading",
|
|
21
22
|
"children",
|
|
22
23
|
"reflection"
|
|
23
24
|
]);
|
|
24
|
-
if (!(0,
|
|
25
|
-
const title = (0,
|
|
26
|
-
const computedHeading = (0,
|
|
27
|
-
const alias = (0,
|
|
28
|
-
const domain = (0,
|
|
29
|
-
const permission = (0,
|
|
30
|
-
const readonly = (0,
|
|
31
|
-
const internal = (0,
|
|
32
|
-
const ignore = (0,
|
|
33
|
-
const hidden = (0,
|
|
34
|
-
if (!computedHeading.value || (0,
|
|
35
|
-
const hasAttributes = (0,
|
|
36
|
-
return (0,
|
|
25
|
+
if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
|
|
26
|
+
const title = (0, _alloy_js_core.computed)(() => reflection.getTitle() || (0, _stryke_string_format_title_case.titleCase)(reflection.getName()));
|
|
27
|
+
const computedHeading = (0, _alloy_js_core.computed)(() => heading || reflection.getDescription() || title.value);
|
|
28
|
+
const alias = (0, _alloy_js_core.computed)(() => reflection.getAlias());
|
|
29
|
+
const domain = (0, _alloy_js_core.computed)(() => reflection.getDomain());
|
|
30
|
+
const permission = (0, _alloy_js_core.computed)(() => reflection.getPermission());
|
|
31
|
+
const readonly = (0, _alloy_js_core.computed)(() => reflection.isReadonly());
|
|
32
|
+
const internal = (0, _alloy_js_core.computed)(() => reflection.isInternal());
|
|
33
|
+
const ignore = (0, _alloy_js_core.computed)(() => reflection.isIgnored());
|
|
34
|
+
const hidden = (0, _alloy_js_core.computed)(() => reflection.isHidden());
|
|
35
|
+
if (!computedHeading.value || (0, _stryke_type_checks_is_set_string.isSetString)(computedHeading.value) && computedHeading.value.trim() === "") return null;
|
|
36
|
+
const hasAttributes = (0, _alloy_js_core.computed)(() => (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));
|
|
37
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
37
38
|
get heading() {
|
|
38
|
-
return (0,
|
|
39
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!(0, _stryke_type_checks_is_set_string.isSetString)(computedHeading.value))() ? computedHeading.value.trim() : computedHeading.value;
|
|
39
40
|
},
|
|
40
41
|
get children() {
|
|
41
|
-
return [(0,
|
|
42
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
42
43
|
get when() {
|
|
43
44
|
return hasAttributes.value;
|
|
44
45
|
},
|
|
45
46
|
get children() {
|
|
46
|
-
return (0,
|
|
47
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
47
48
|
get title() {
|
|
48
49
|
return title.value;
|
|
49
50
|
},
|
|
@@ -70,20 +71,20 @@ function TSDocReflectionClass(props) {
|
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
|
-
}), (0,
|
|
74
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
74
75
|
get when() {
|
|
75
|
-
return (0,
|
|
76
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(children))() && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0;
|
|
76
77
|
},
|
|
77
78
|
get children() {
|
|
78
|
-
return [(0,
|
|
79
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
79
80
|
get when() {
|
|
80
81
|
return hasAttributes.value;
|
|
81
82
|
},
|
|
82
83
|
get children() {
|
|
83
|
-
return (0,
|
|
84
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
|
|
84
85
|
}
|
|
85
|
-
}), (0,
|
|
86
|
-
return (0,
|
|
86
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
87
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
87
88
|
} })];
|
|
88
89
|
}
|
|
89
90
|
})];
|
|
@@ -95,12 +96,12 @@ function TSDocReflectionClass(props) {
|
|
|
95
96
|
*/
|
|
96
97
|
function TSDocContextClass(props) {
|
|
97
98
|
const reflectionClass = require_core_contexts_reflection.useReflectionClass();
|
|
98
|
-
return (0,
|
|
99
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
99
100
|
get when() {
|
|
100
|
-
return (0,
|
|
101
|
+
return (0, _stryke_type_checks.isSetObject)(reflectionClass.reflection);
|
|
101
102
|
},
|
|
102
103
|
get children() {
|
|
103
|
-
return (0,
|
|
104
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionClass, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { get reflection() {
|
|
104
105
|
return reflectionClass.reflection;
|
|
105
106
|
} }));
|
|
106
107
|
}
|
|
@@ -110,18 +111,18 @@ function TSDocContextClass(props) {
|
|
|
110
111
|
* 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.
|
|
111
112
|
*/
|
|
112
113
|
function TSDocReflectionProperty(props) {
|
|
113
|
-
const [{ children, reflection }, rest] = (0,
|
|
114
|
-
if (!(0,
|
|
115
|
-
const hasAttributes = (0,
|
|
116
|
-
return (0,
|
|
114
|
+
const [{ children, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "reflection"]);
|
|
115
|
+
if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
|
|
116
|
+
const hasAttributes = (0, _alloy_js_core.computed)(() => (0, _stryke_type_checks_is_set_string.isSetString)(reflection.getTitle()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getAlias()) && reflection.getAlias().length > 0 || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getPermission()) && reflection.getPermission().length > 0 || (0, _stryke_type_checks_is_set_string.isSetString)(reflection.getDomain()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isReadonly()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isInternal()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isIgnored()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isHidden()) || reflection.hasDefault() && !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getDefaultValue()));
|
|
117
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get heading() {
|
|
117
118
|
return reflection.getDescription();
|
|
118
119
|
} }, rest, { get children() {
|
|
119
|
-
return [(0,
|
|
120
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
120
121
|
get when() {
|
|
121
122
|
return hasAttributes.value;
|
|
122
123
|
},
|
|
123
124
|
get children() {
|
|
124
|
-
return (0,
|
|
125
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
125
126
|
type: reflection,
|
|
126
127
|
get title() {
|
|
127
128
|
return reflection.getTitle();
|
|
@@ -152,20 +153,20 @@ function TSDocReflectionProperty(props) {
|
|
|
152
153
|
}
|
|
153
154
|
});
|
|
154
155
|
}
|
|
155
|
-
}), (0,
|
|
156
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
156
157
|
get when() {
|
|
157
|
-
return (0,
|
|
158
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(children))() && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0;
|
|
158
159
|
},
|
|
159
160
|
get children() {
|
|
160
|
-
return [(0,
|
|
161
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
161
162
|
get when() {
|
|
162
163
|
return hasAttributes.value;
|
|
163
164
|
},
|
|
164
165
|
get children() {
|
|
165
|
-
return (0,
|
|
166
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
|
|
166
167
|
}
|
|
167
|
-
}), (0,
|
|
168
|
-
return (0,
|
|
168
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
169
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
169
170
|
} })];
|
|
170
171
|
}
|
|
171
172
|
})];
|
|
@@ -176,12 +177,12 @@ function TSDocReflectionProperty(props) {
|
|
|
176
177
|
*/
|
|
177
178
|
function TSDocContextProperty(props) {
|
|
178
179
|
const reflection = require_core_contexts_reflection.useReflectionProperty();
|
|
179
|
-
return (0,
|
|
180
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
180
181
|
get when() {
|
|
181
|
-
return (0,
|
|
182
|
+
return (0, _stryke_type_checks.isSetObject)(reflection);
|
|
182
183
|
},
|
|
183
184
|
get children() {
|
|
184
|
-
return (0,
|
|
185
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionProperty, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { reflection }));
|
|
185
186
|
}
|
|
186
187
|
});
|
|
187
188
|
}
|
|
@@ -189,14 +190,14 @@ function TSDocContextProperty(props) {
|
|
|
189
190
|
* 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.
|
|
190
191
|
*/
|
|
191
192
|
function TSDocReflectionMethod(props) {
|
|
192
|
-
const [{ children, reflection }, rest] = (0,
|
|
193
|
-
if (!(0,
|
|
194
|
-
const heading = (0,
|
|
195
|
-
return (0,
|
|
193
|
+
const [{ children, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "reflection"]);
|
|
194
|
+
if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
|
|
195
|
+
const heading = (0, _alloy_js_core.computed)(() => reflection.getDescription() || ((0, _stryke_type_checks_is_string.isString)(reflection.getName()) ? _alloy_js_core.code`${String(reflection.getName())} method definition` : void 0));
|
|
196
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get heading() {
|
|
196
197
|
return heading.value;
|
|
197
198
|
} }, rest, { get children() {
|
|
198
199
|
return [
|
|
199
|
-
(0,
|
|
200
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
200
201
|
get title() {
|
|
201
202
|
return reflection.getTitle();
|
|
202
203
|
},
|
|
@@ -222,30 +223,30 @@ function TSDocReflectionMethod(props) {
|
|
|
222
223
|
return reflection.isHidden();
|
|
223
224
|
}
|
|
224
225
|
}),
|
|
225
|
-
(0,
|
|
226
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
226
227
|
get when() {
|
|
227
|
-
return (0,
|
|
228
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!Boolean(children))() && (0, _alloy_js_core.childrenArray)(() => children).length > 0;
|
|
228
229
|
},
|
|
229
230
|
get children() {
|
|
230
|
-
return (0,
|
|
231
|
-
return (0,
|
|
231
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
232
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
232
233
|
} });
|
|
233
234
|
}
|
|
234
235
|
}),
|
|
235
|
-
(0,
|
|
236
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
236
237
|
get when() {
|
|
237
238
|
return reflection.getParameters().length > 0;
|
|
238
239
|
},
|
|
239
240
|
get children() {
|
|
240
|
-
return [(0,
|
|
241
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
241
242
|
get each() {
|
|
242
243
|
return reflection.getParameters();
|
|
243
244
|
},
|
|
244
245
|
hardline: true,
|
|
245
246
|
get ender() {
|
|
246
|
-
return (0,
|
|
247
|
+
return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
|
|
247
248
|
},
|
|
248
|
-
children: (param) => (0,
|
|
249
|
+
children: (param) => (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocParam, {
|
|
249
250
|
get name() {
|
|
250
251
|
return param.getName();
|
|
251
252
|
},
|
|
@@ -253,15 +254,15 @@ function TSDocReflectionMethod(props) {
|
|
|
253
254
|
return param.isOptional();
|
|
254
255
|
},
|
|
255
256
|
get defaultValue() {
|
|
256
|
-
return (0,
|
|
257
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!param.hasDefault())() ? param.getDefaultValue() : void 0;
|
|
257
258
|
},
|
|
258
259
|
get children() {
|
|
259
|
-
return (0,
|
|
260
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
260
261
|
get when() {
|
|
261
262
|
return Boolean(param.parameter.description);
|
|
262
263
|
},
|
|
263
264
|
get fallback() {
|
|
264
|
-
return
|
|
265
|
+
return _alloy_js_core.code`A parameter to provide a ${param.getName()} value to the function.`;
|
|
265
266
|
},
|
|
266
267
|
get children() {
|
|
267
268
|
return param.parameter.description;
|
|
@@ -272,13 +273,13 @@ function TSDocReflectionMethod(props) {
|
|
|
272
273
|
})];
|
|
273
274
|
}
|
|
274
275
|
}),
|
|
275
|
-
(0,
|
|
276
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
276
277
|
get when() {
|
|
277
|
-
return reflection.getReturnType().kind !==
|
|
278
|
+
return reflection.getReturnType().kind !== _powerlines_deepkit_vendor_type.ReflectionKind.void;
|
|
278
279
|
},
|
|
279
280
|
get children() {
|
|
280
|
-
return [(0,
|
|
281
|
-
return
|
|
281
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocReturns, { get children() {
|
|
282
|
+
return _alloy_js_core.code`The return value of the function, which is of type ${(0, _powerlines_deepkit_vendor_type.stringifyType)(reflection.getReturnType())}.`;
|
|
282
283
|
} })];
|
|
283
284
|
}
|
|
284
285
|
})
|
|
@@ -290,12 +291,12 @@ function TSDocReflectionMethod(props) {
|
|
|
290
291
|
*/
|
|
291
292
|
function TSDocContextMethod(props) {
|
|
292
293
|
const reflection = require_core_contexts_reflection.useReflectionMethod();
|
|
293
|
-
return (0,
|
|
294
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
294
295
|
get when() {
|
|
295
|
-
return (0,
|
|
296
|
+
return (0, _stryke_type_checks.isSetObject)(reflection);
|
|
296
297
|
},
|
|
297
298
|
get children() {
|
|
298
|
-
return (0,
|
|
299
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionMethod, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { reflection }));
|
|
299
300
|
}
|
|
300
301
|
});
|
|
301
302
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TSDocProps } from "./tsdoc.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
3
3
|
import { ReflectionClass, ReflectionMethod, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
4
|
|
|
5
5
|
//#region src/typescript/components/tsdoc-reflection.d.ts
|
|
@@ -9,33 +9,33 @@ interface TSDocReflectionClassProps<T extends Record<string, any> = Record<strin
|
|
|
9
9
|
/**
|
|
10
10
|
* 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.
|
|
11
11
|
*/
|
|
12
|
-
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocReflectionClassProps<T>):
|
|
12
|
+
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocReflectionClassProps<T>): _alloy_js_core0.Children;
|
|
13
13
|
/**
|
|
14
14
|
* 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.
|
|
15
15
|
*/
|
|
16
|
-
declare function TSDocContextClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps):
|
|
16
|
+
declare function TSDocContextClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core0.Children;
|
|
17
17
|
interface TSDocReflectionPropertyProps extends TSDocProps {
|
|
18
18
|
reflection: ReflectionProperty;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* 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.
|
|
22
22
|
*/
|
|
23
|
-
declare function TSDocReflectionProperty(props: TSDocReflectionPropertyProps):
|
|
23
|
+
declare function TSDocReflectionProperty(props: TSDocReflectionPropertyProps): _alloy_js_core0.Children;
|
|
24
24
|
/**
|
|
25
25
|
* 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.
|
|
26
26
|
*/
|
|
27
|
-
declare function TSDocContextProperty(props: TSDocProps):
|
|
27
|
+
declare function TSDocContextProperty(props: TSDocProps): _alloy_js_core0.Children;
|
|
28
28
|
interface TSDocReflectionMethodProps extends TSDocProps {
|
|
29
29
|
reflection: ReflectionMethod;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* 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.
|
|
33
33
|
*/
|
|
34
|
-
declare function TSDocReflectionMethod(props: TSDocReflectionMethodProps):
|
|
34
|
+
declare function TSDocReflectionMethod(props: TSDocReflectionMethodProps): _alloy_js_core0.Children;
|
|
35
35
|
/**
|
|
36
36
|
* 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.
|
|
37
37
|
*/
|
|
38
|
-
declare function TSDocContextMethod(props: TSDocProps):
|
|
38
|
+
declare function TSDocContextMethod(props: TSDocProps): _alloy_js_core0.Children;
|
|
39
39
|
declare type __ΩTSDocReflectionClassProps = any[];
|
|
40
40
|
declare type __ΩTSDocReflectionPropertyProps = any[];
|
|
41
41
|
declare type __ΩTSDocReflectionMethodProps = any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc-reflection.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"
|
|
1
|
+
{"version":3,"file":"tsdoc-reflection.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"mappings":";;;;;UAqDiB,yBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,UAAA;EACR,UAAA,EAAY,eAAA,CAAgB,CAAA;AAAA;AAH9B;;;AAAA,iBASgB,oBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,yBAAA,CAA0B,CAAA,IAAD,eAAA,CAAG,QAAA;;;;iBAkFrB,iBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA,UAaF,4BAAA,SAAqC,UAAA;EACpD,UAAA,EAAY,kBAAA;AAAA;;;;iBAME,uBAAA,CAAwB,KAAA,EAAO,4BAAA,GAA4B,eAAA,CAAA,QAAA;;;;iBA0D3D,oBAAA,CAAqB,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA,UAUrC,0BAAA,SAAmC,UAAA;EAClD,UAAA,EAAY,gBAAA;AAAA;;;;iBAME,qBAAA,CAAsB,KAAA,EAAO,0BAAA,GAA0B,eAAA,CAAA,QAAA;;;;iBAoEvD,kBAAA,CAAmB,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TSDocProps } from "./tsdoc.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
3
3
|
import { ReflectionClass, ReflectionMethod, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
4
4
|
|
|
5
5
|
//#region src/typescript/components/tsdoc-reflection.d.ts
|
|
@@ -9,33 +9,33 @@ interface TSDocReflectionClassProps<T extends Record<string, any> = Record<strin
|
|
|
9
9
|
/**
|
|
10
10
|
* 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.
|
|
11
11
|
*/
|
|
12
|
-
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocReflectionClassProps<T>):
|
|
12
|
+
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocReflectionClassProps<T>): _alloy_js_core0.Children;
|
|
13
13
|
/**
|
|
14
14
|
* 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.
|
|
15
15
|
*/
|
|
16
|
-
declare function TSDocContextClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps):
|
|
16
|
+
declare function TSDocContextClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core0.Children;
|
|
17
17
|
interface TSDocReflectionPropertyProps extends TSDocProps {
|
|
18
18
|
reflection: ReflectionProperty;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* 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.
|
|
22
22
|
*/
|
|
23
|
-
declare function TSDocReflectionProperty(props: TSDocReflectionPropertyProps):
|
|
23
|
+
declare function TSDocReflectionProperty(props: TSDocReflectionPropertyProps): _alloy_js_core0.Children;
|
|
24
24
|
/**
|
|
25
25
|
* 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.
|
|
26
26
|
*/
|
|
27
|
-
declare function TSDocContextProperty(props: TSDocProps):
|
|
27
|
+
declare function TSDocContextProperty(props: TSDocProps): _alloy_js_core0.Children;
|
|
28
28
|
interface TSDocReflectionMethodProps extends TSDocProps {
|
|
29
29
|
reflection: ReflectionMethod;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* 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.
|
|
33
33
|
*/
|
|
34
|
-
declare function TSDocReflectionMethod(props: TSDocReflectionMethodProps):
|
|
34
|
+
declare function TSDocReflectionMethod(props: TSDocReflectionMethodProps): _alloy_js_core0.Children;
|
|
35
35
|
/**
|
|
36
36
|
* 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.
|
|
37
37
|
*/
|
|
38
|
-
declare function TSDocContextMethod(props: TSDocProps):
|
|
38
|
+
declare function TSDocContextMethod(props: TSDocProps): _alloy_js_core0.Children;
|
|
39
39
|
declare type __ΩTSDocReflectionClassProps = any[];
|
|
40
40
|
declare type __ΩTSDocReflectionPropertyProps = any[];
|
|
41
41
|
declare type __ΩTSDocReflectionMethodProps = any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc-reflection.d.mts","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"
|
|
1
|
+
{"version":3,"file":"tsdoc-reflection.d.mts","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"mappings":";;;;;UAqDiB,yBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,UAAA;EACR,UAAA,EAAY,eAAA,CAAgB,CAAA;AAAA;AAH9B;;;AAAA,iBASgB,oBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,yBAAA,CAA0B,CAAA,IAAD,eAAA,CAAG,QAAA;;;;iBAkFrB,iBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA,UAaF,4BAAA,SAAqC,UAAA;EACpD,UAAA,EAAY,kBAAA;AAAA;;;;iBAME,uBAAA,CAAwB,KAAA,EAAO,4BAAA,GAA4B,eAAA,CAAA,QAAA;;;;iBA0D3D,oBAAA,CAAqB,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA,UAUrC,0BAAA,SAAmC,UAAA;EAClD,UAAA,EAAY,gBAAA;AAAA;;;;iBAME,qBAAA,CAAsB,KAAA,EAAO,0BAAA,GAA0B,eAAA,CAAA,QAAA;;;;iBAoEvD,kBAAA,CAAmB,KAAA,EAAO,UAAA,GAAU,eAAA,CAAA,QAAA;AAAA"}
|