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