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