@powerlines/plugin-alloy 0.25.34 → 0.25.35
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.d.cts +5 -0
- package/dist/core/components/index.d.mts +5 -0
- package/dist/core/components/output.d.cts +24 -0
- package/dist/core/components/output.d.cts.map +1 -0
- package/dist/core/components/output.d.mts +24 -0
- package/dist/core/components/output.d.mts.map +1 -0
- package/dist/core/components/output.mjs +2 -1
- package/dist/core/components/output.mjs.map +1 -0
- package/dist/core/components/single-line-comment.d.cts +23 -0
- package/dist/core/components/single-line-comment.d.cts.map +1 -0
- package/dist/core/components/single-line-comment.d.mts +23 -0
- package/dist/core/components/single-line-comment.d.mts.map +1 -0
- package/dist/core/components/single-line-comment.mjs +2 -1
- package/dist/core/components/single-line-comment.mjs.map +1 -0
- package/dist/core/components/source-file.d.cts +33 -0
- package/dist/core/components/source-file.d.cts.map +1 -0
- package/dist/core/components/source-file.d.mts +33 -0
- package/dist/core/components/source-file.d.mts.map +1 -0
- package/dist/core/components/source-file.mjs +2 -1
- package/dist/core/components/source-file.mjs.map +1 -0
- package/dist/core/components/spacing.d.cts +24 -0
- package/dist/core/components/spacing.d.cts.map +1 -0
- package/dist/core/components/spacing.d.mts +24 -0
- package/dist/core/components/spacing.d.mts.map +1 -0
- package/dist/core/components/spacing.mjs +2 -1
- package/dist/core/components/spacing.mjs.map +1 -0
- package/dist/core/contexts/context.d.cts +29 -0
- package/dist/core/contexts/context.d.cts.map +1 -0
- package/dist/core/contexts/context.d.mts +29 -0
- package/dist/core/contexts/context.d.mts.map +1 -0
- package/dist/core/contexts/context.mjs +2 -1
- package/dist/core/contexts/context.mjs.map +1 -0
- package/dist/core/contexts/index.d.cts +4 -0
- package/dist/core/contexts/index.d.mts +4 -0
- package/dist/core/contexts/meta.d.cts +48 -0
- package/dist/core/contexts/meta.d.cts.map +1 -0
- package/dist/core/contexts/meta.d.mts +48 -0
- package/dist/core/contexts/meta.d.mts.map +1 -0
- package/dist/core/contexts/meta.mjs +2 -1
- package/dist/core/contexts/meta.mjs.map +1 -0
- package/dist/core/contexts/reflection.d.cts +53 -0
- package/dist/core/contexts/reflection.d.cts.map +1 -0
- package/dist/core/contexts/reflection.d.mts +53 -0
- package/dist/core/contexts/reflection.d.mts.map +1 -0
- package/dist/core/contexts/reflection.mjs +2 -1
- package/dist/core/contexts/reflection.mjs.map +1 -0
- package/dist/core/helpers/code.d.cts +29 -0
- package/dist/core/helpers/code.d.cts.map +1 -0
- package/dist/core/helpers/code.d.mts +29 -0
- package/dist/core/helpers/code.d.mts.map +1 -0
- package/dist/core/helpers/code.mjs +2 -1
- package/dist/core/helpers/code.mjs.map +1 -0
- package/dist/core/helpers/index.d.cts +2 -0
- package/dist/core/helpers/index.d.mts +2 -0
- package/dist/core/index.d.cts +9 -0
- package/dist/core/index.d.mts +9 -0
- package/dist/helpers/capnp.d.cts +87 -0
- package/dist/helpers/capnp.d.cts.map +1 -0
- package/dist/helpers/capnp.d.mts +87 -0
- package/dist/helpers/capnp.d.mts.map +1 -0
- package/dist/helpers/capnp.mjs +2 -1
- package/dist/helpers/capnp.mjs.map +1 -0
- package/dist/helpers/create-builtin.d.cts +16 -0
- package/dist/helpers/create-builtin.d.cts.map +1 -0
- package/dist/helpers/create-builtin.d.mts +16 -0
- package/dist/helpers/create-builtin.d.mts.map +1 -0
- package/dist/helpers/create-builtin.mjs +2 -1
- package/dist/helpers/create-builtin.mjs.map +1 -0
- package/dist/helpers/index.d.cts +5 -0
- package/dist/helpers/index.d.mts +5 -0
- package/dist/helpers/refkey.d.cts +13 -0
- package/dist/helpers/refkey.d.cts.map +1 -0
- package/dist/helpers/refkey.d.mts +13 -0
- package/dist/helpers/refkey.d.mts.map +1 -0
- package/dist/helpers/refkey.mjs +2 -1
- package/dist/helpers/refkey.mjs.map +1 -0
- package/dist/helpers/typescript.d.cts +26 -0
- package/dist/helpers/typescript.d.cts.map +1 -0
- package/dist/helpers/typescript.d.mts +26 -0
- package/dist/helpers/typescript.d.mts.map +1 -0
- package/dist/helpers/typescript.mjs +2 -1
- package/dist/helpers/typescript.mjs.map +1 -0
- package/dist/index.cjs +6 -1
- package/dist/index.d.cts +19 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +19 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -0
- package/dist/markdown/components/front-matter.d.cts +16 -0
- package/dist/markdown/components/front-matter.d.cts.map +1 -0
- package/dist/markdown/components/front-matter.d.mts +16 -0
- package/dist/markdown/components/front-matter.d.mts.map +1 -0
- package/dist/markdown/components/front-matter.mjs +2 -1
- package/dist/markdown/components/front-matter.mjs.map +1 -0
- package/dist/markdown/components/index.d.cts +4 -0
- package/dist/markdown/components/index.d.mts +4 -0
- package/dist/markdown/components/markdown-file.d.cts +29 -0
- package/dist/markdown/components/markdown-file.d.cts.map +1 -0
- package/dist/markdown/components/markdown-file.d.mts +29 -0
- package/dist/markdown/components/markdown-file.d.mts.map +1 -0
- package/dist/markdown/components/markdown-file.mjs +2 -1
- package/dist/markdown/components/markdown-file.mjs.map +1 -0
- package/dist/markdown/components/markdown-table.d.cts +28 -0
- package/dist/markdown/components/markdown-table.d.cts.map +1 -0
- package/dist/markdown/components/markdown-table.d.mts +28 -0
- package/dist/markdown/components/markdown-table.d.mts.map +1 -0
- package/dist/markdown/components/markdown-table.mjs +2 -1
- package/dist/markdown/components/markdown-table.mjs.map +1 -0
- package/dist/markdown/contexts/index.d.cts +2 -0
- package/dist/markdown/contexts/index.d.mts +2 -0
- package/dist/markdown/contexts/markdown-table.d.cts +38 -0
- package/dist/markdown/contexts/markdown-table.d.cts.map +1 -0
- package/dist/markdown/contexts/markdown-table.d.mts +38 -0
- package/dist/markdown/contexts/markdown-table.d.mts.map +1 -0
- package/dist/markdown/contexts/markdown-table.mjs +2 -1
- package/dist/markdown/contexts/markdown-table.mjs.map +1 -0
- package/dist/markdown/index.d.cts +5 -0
- package/dist/markdown/index.d.mts +5 -0
- package/dist/render.cjs +1 -1
- package/dist/render.d.cts +38 -0
- package/dist/render.d.cts.map +1 -0
- package/dist/render.d.mts +38 -0
- package/dist/render.d.mts.map +1 -0
- package/dist/render.mjs +3 -2
- package/dist/render.mjs.map +1 -0
- package/dist/types/components.d.cts +142 -0
- package/dist/types/components.d.cts.map +1 -0
- package/dist/types/components.d.mts +142 -0
- package/dist/types/components.d.mts.map +1 -0
- package/dist/types/index.d.cts +3 -0
- package/dist/types/index.d.mts +3 -0
- package/dist/types/plugin.d.cts +39 -0
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +39 -0
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/typescript/components/builtin-file.cjs +1 -1
- package/dist/typescript/components/builtin-file.d.cts +35 -0
- package/dist/typescript/components/builtin-file.d.cts.map +1 -0
- package/dist/typescript/components/builtin-file.d.mts +35 -0
- package/dist/typescript/components/builtin-file.d.mts.map +1 -0
- package/dist/typescript/components/builtin-file.mjs +3 -2
- package/dist/typescript/components/builtin-file.mjs.map +1 -0
- package/dist/typescript/components/class-declaration.d.cts +145 -0
- package/dist/typescript/components/class-declaration.d.cts.map +1 -0
- package/dist/typescript/components/class-declaration.d.mts +145 -0
- package/dist/typescript/components/class-declaration.d.mts.map +1 -0
- package/dist/typescript/components/class-declaration.mjs +2 -1
- package/dist/typescript/components/class-declaration.mjs.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.d.cts +33 -0
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.d.mts +33 -0
- package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.mjs +2 -1
- package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -0
- package/dist/typescript/components/entry-file.cjs +1 -1
- package/dist/typescript/components/entry-file.d.cts +28 -0
- package/dist/typescript/components/entry-file.d.cts.map +1 -0
- package/dist/typescript/components/entry-file.d.mts +28 -0
- package/dist/typescript/components/entry-file.d.mts.map +1 -0
- package/dist/typescript/components/entry-file.mjs +3 -2
- package/dist/typescript/components/entry-file.mjs.map +1 -0
- package/dist/typescript/components/index.d.cts +15 -0
- package/dist/typescript/components/index.d.mts +15 -0
- package/dist/typescript/components/infrastructure-file.cjs +1 -1
- package/dist/typescript/components/infrastructure-file.d.cts +21 -0
- package/dist/typescript/components/infrastructure-file.d.cts.map +1 -0
- package/dist/typescript/components/infrastructure-file.d.mts +21 -0
- package/dist/typescript/components/infrastructure-file.d.mts.map +1 -0
- package/dist/typescript/components/infrastructure-file.mjs +3 -2
- package/dist/typescript/components/infrastructure-file.mjs.map +1 -0
- package/dist/typescript/components/interface-declaration.d.cts +86 -0
- package/dist/typescript/components/interface-declaration.d.cts.map +1 -0
- package/dist/typescript/components/interface-declaration.d.mts +86 -0
- package/dist/typescript/components/interface-declaration.d.mts.map +1 -0
- package/dist/typescript/components/interface-declaration.mjs +2 -1
- package/dist/typescript/components/interface-declaration.mjs.map +1 -0
- package/dist/typescript/components/object-declaration.d.cts +30 -0
- package/dist/typescript/components/object-declaration.d.cts.map +1 -0
- package/dist/typescript/components/object-declaration.d.mts +30 -0
- package/dist/typescript/components/object-declaration.d.mts.map +1 -0
- package/dist/typescript/components/object-declaration.mjs +2 -1
- package/dist/typescript/components/object-declaration.mjs.map +1 -0
- package/dist/typescript/components/property-name.d.cts +24 -0
- package/dist/typescript/components/property-name.d.cts.map +1 -0
- package/dist/typescript/components/property-name.d.mts +24 -0
- package/dist/typescript/components/property-name.d.mts.map +1 -0
- package/dist/typescript/components/property-name.mjs +2 -1
- package/dist/typescript/components/property-name.mjs.map +1 -0
- package/dist/typescript/components/record-expression.d.cts +13 -0
- package/dist/typescript/components/record-expression.d.cts.map +1 -0
- package/dist/typescript/components/record-expression.d.mts +13 -0
- package/dist/typescript/components/record-expression.d.mts.map +1 -0
- package/dist/typescript/components/record-expression.mjs +2 -1
- package/dist/typescript/components/record-expression.mjs.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.d.cts +44 -0
- package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.d.mts +44 -0
- package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -0
- package/dist/typescript/components/tsdoc-reflection.mjs +2 -1
- package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -0
- package/dist/typescript/components/tsdoc.d.cts +164 -0
- package/dist/typescript/components/tsdoc.d.cts.map +1 -0
- package/dist/typescript/components/tsdoc.d.mts +164 -0
- package/dist/typescript/components/tsdoc.d.mts.map +1 -0
- package/dist/typescript/components/tsdoc.mjs +2 -1
- package/dist/typescript/components/tsdoc.mjs.map +1 -0
- package/dist/typescript/components/type-declaration.d.cts +18 -0
- package/dist/typescript/components/type-declaration.d.cts.map +1 -0
- package/dist/typescript/components/type-declaration.d.mts +18 -0
- package/dist/typescript/components/type-declaration.d.mts.map +1 -0
- package/dist/typescript/components/type-declaration.mjs +2 -1
- package/dist/typescript/components/type-declaration.mjs.map +1 -0
- package/dist/typescript/components/type-parameters.d.cts +24 -0
- package/dist/typescript/components/type-parameters.d.cts.map +1 -0
- package/dist/typescript/components/type-parameters.d.mts +24 -0
- package/dist/typescript/components/type-parameters.d.mts.map +1 -0
- package/dist/typescript/components/type-parameters.mjs +2 -1
- package/dist/typescript/components/type-parameters.mjs.map +1 -0
- package/dist/typescript/components/typescript-file.d.cts +50 -0
- package/dist/typescript/components/typescript-file.d.cts.map +1 -0
- package/dist/typescript/components/typescript-file.d.mts +50 -0
- package/dist/typescript/components/typescript-file.d.mts.map +1 -0
- package/dist/typescript/components/typescript-file.mjs +2 -1
- package/dist/typescript/components/typescript-file.mjs.map +1 -0
- package/dist/typescript/contexts/index.d.cts +2 -0
- package/dist/typescript/contexts/index.d.mts +2 -0
- package/dist/typescript/contexts/lexical-scope.d.cts +17 -0
- package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -0
- package/dist/typescript/contexts/lexical-scope.d.mts +17 -0
- package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -0
- package/dist/typescript/contexts/lexical-scope.mjs +2 -1
- package/dist/typescript/contexts/lexical-scope.mjs.map +1 -0
- package/dist/typescript/contexts/member-scope.d.cts +20 -0
- package/dist/typescript/contexts/member-scope.d.cts.map +1 -0
- package/dist/typescript/contexts/member-scope.d.mts +20 -0
- package/dist/typescript/contexts/member-scope.d.mts.map +1 -0
- package/dist/typescript/contexts/member-scope.mjs +2 -1
- package/dist/typescript/contexts/member-scope.mjs.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.d.cts +14 -0
- package/dist/typescript/helpers/get-call-signature-props.d.cts.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.d.mts +14 -0
- package/dist/typescript/helpers/get-call-signature-props.d.mts.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.mjs +2 -1
- package/dist/typescript/helpers/get-call-signature-props.mjs.map +1 -0
- package/dist/typescript/helpers/index.d.cts +3 -0
- package/dist/typescript/helpers/index.d.mts +3 -0
- package/dist/typescript/helpers/utilities.d.cts +11 -0
- package/dist/typescript/helpers/utilities.d.cts.map +1 -0
- package/dist/typescript/helpers/utilities.d.mts +11 -0
- package/dist/typescript/helpers/utilities.d.mts.map +1 -0
- package/dist/typescript/helpers/utilities.mjs +2 -1
- package/dist/typescript/helpers/utilities.mjs.map +1 -0
- package/dist/typescript/index.d.cts +18 -0
- package/dist/typescript/index.d.mts +18 -0
- package/dist/yaml/components/index.d.cts +2 -0
- package/dist/yaml/components/index.d.mts +2 -0
- package/dist/yaml/components/yaml-file.d.cts +34 -0
- package/dist/yaml/components/yaml-file.d.cts.map +1 -0
- package/dist/yaml/components/yaml-file.d.mts +34 -0
- package/dist/yaml/components/yaml-file.d.mts.map +1 -0
- package/dist/yaml/components/yaml-file.mjs +2 -1
- package/dist/yaml/components/yaml-file.mjs.map +1 -0
- package/dist/yaml/index.d.cts +2 -0
- package/dist/yaml/index.d.mts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { TypeParameters } from "./type-parameters.cjs";
|
|
2
|
+
import { Children, Namekey, Refkey } from "@alloy-js/core";
|
|
3
|
+
import { CallSignatureProps, CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/class-declaration.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Props for the ClassDeclaration component, which represents a TypeScript class declaration
|
|
8
|
+
*/
|
|
9
|
+
interface ClassDeclarationProps extends CommonDeclarationProps {
|
|
10
|
+
/**
|
|
11
|
+
* An indication of whether this class is abstract
|
|
12
|
+
*/
|
|
13
|
+
abstract?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration
|
|
16
|
+
*/
|
|
17
|
+
extends?: Children;
|
|
18
|
+
/**
|
|
19
|
+
* Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration
|
|
20
|
+
*/
|
|
21
|
+
implements?: Children[];
|
|
22
|
+
/**
|
|
23
|
+
* The generic type parameters of the class.
|
|
24
|
+
*/
|
|
25
|
+
typeParameters?: TypeParameterDescriptor[] | string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Create a TypeScript class declaration.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* const myPetRefkey = refkey();
|
|
33
|
+
* const Animal = refkey();
|
|
34
|
+
* const staticMember = refkey();
|
|
35
|
+
* const instanceMember = refkey();
|
|
36
|
+
*
|
|
37
|
+
* <ClassDeclaration name="Animal" refkey={Animal}>
|
|
38
|
+
* <ClassMember public static name="something" type="string" refkey={staticMember}>
|
|
39
|
+
* "hello"
|
|
40
|
+
* </ClassMember>
|
|
41
|
+
* <ClassMember public name="kind" type="string" />
|
|
42
|
+
* <ClassMember public name="name" type="string" refkey={instanceMember} />
|
|
43
|
+
* <ClassConstructor parameters="name: string">
|
|
44
|
+
* this.name = name;
|
|
45
|
+
* </ClassConstructor>
|
|
46
|
+
* </ClassDeclaration>
|
|
47
|
+
*
|
|
48
|
+
* <VarDeclaration const name="myPet" refkey={myPetRefkey}>
|
|
49
|
+
* new {Animal}();
|
|
50
|
+
* </VarDeclaration>
|
|
51
|
+
*
|
|
52
|
+
* {staticMember}; // Animal.something
|
|
53
|
+
* <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name
|
|
54
|
+
* {memberRefkey(myPetRefkey, instanceMember)}
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
declare function ClassDeclaration(props: ClassDeclarationProps): Children;
|
|
58
|
+
declare namespace ClassDeclaration {
|
|
59
|
+
var TypeParameters: typeof TypeParameters;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Generates a TypeScript class member declaration for the given reflection class.
|
|
63
|
+
*/
|
|
64
|
+
interface ClassMemberProps {
|
|
65
|
+
name: string | Namekey;
|
|
66
|
+
refkey?: Refkey;
|
|
67
|
+
public?: boolean;
|
|
68
|
+
private?: boolean;
|
|
69
|
+
protected?: boolean;
|
|
70
|
+
jsPrivate?: boolean;
|
|
71
|
+
static?: boolean;
|
|
72
|
+
abstract?: boolean;
|
|
73
|
+
children?: Children;
|
|
74
|
+
doc?: Children;
|
|
75
|
+
nullish?: boolean;
|
|
76
|
+
override?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Generates a TypeScript class member declaration for the given reflection class.
|
|
80
|
+
*
|
|
81
|
+
* @param props - The properties of the class member, including its name, visibility, and other modifiers.
|
|
82
|
+
* @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.
|
|
83
|
+
*/
|
|
84
|
+
declare function ClassMember(props: ClassMemberProps): Children;
|
|
85
|
+
/**
|
|
86
|
+
* Props for a class field, which is a specific type of class member that represents a property of the class.
|
|
87
|
+
*/
|
|
88
|
+
interface ClassFieldProps extends ClassMemberProps {
|
|
89
|
+
name: string;
|
|
90
|
+
type?: Children;
|
|
91
|
+
optional?: boolean;
|
|
92
|
+
children?: Children;
|
|
93
|
+
isPrivateMember?: boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Generates a TypeScript class field declaration for the given reflection class.
|
|
97
|
+
*
|
|
98
|
+
* @param props - The properties of the class field, including its name, type, optionality, and other modifiers.
|
|
99
|
+
* @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.
|
|
100
|
+
*/
|
|
101
|
+
declare function ClassField(props: ClassFieldProps): Children;
|
|
102
|
+
/**
|
|
103
|
+
* Props for a class field, which is a specific type of class member that represents a property of the class.
|
|
104
|
+
*/
|
|
105
|
+
interface ClassPropertyProps extends ClassMemberProps {
|
|
106
|
+
name: string;
|
|
107
|
+
type?: Children;
|
|
108
|
+
children?: Children;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Generates a TypeScript class property setter declaration for the given reflection class.
|
|
112
|
+
*
|
|
113
|
+
* @param props - The properties of the class property, including its name, type, and other modifiers.
|
|
114
|
+
* @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.
|
|
115
|
+
*/
|
|
116
|
+
declare function ClassPropertySet(props: ClassPropertyProps): Children;
|
|
117
|
+
/**
|
|
118
|
+
* Generates a TypeScript class property getter declaration for the given reflection class.
|
|
119
|
+
*
|
|
120
|
+
* @param props - The properties of the class property, including its name, type, and other modifiers.
|
|
121
|
+
* @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.
|
|
122
|
+
*/
|
|
123
|
+
declare function ClassPropertyGet(props: ClassPropertyProps): Children;
|
|
124
|
+
/**
|
|
125
|
+
* Props for a class method, which is a specific type of class member that represents a function defined within the class.
|
|
126
|
+
*/
|
|
127
|
+
interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {
|
|
128
|
+
async?: boolean;
|
|
129
|
+
children?: Children;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Generates a TypeScript class method declaration for the given reflection class.
|
|
133
|
+
*
|
|
134
|
+
* @param props - The properties of the class method, including its name, visibility, and other modifiers.
|
|
135
|
+
* @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.
|
|
136
|
+
*/
|
|
137
|
+
declare function ClassMethod(props: ClassMethodProps): Children;
|
|
138
|
+
declare type __ΩClassDeclarationProps = any[];
|
|
139
|
+
declare type __ΩClassMemberProps = any[];
|
|
140
|
+
declare type __ΩClassFieldProps = any[];
|
|
141
|
+
declare type __ΩClassPropertyProps = any[];
|
|
142
|
+
declare type __ΩClassMethodProps = any[];
|
|
143
|
+
//#endregion
|
|
144
|
+
export { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps };
|
|
145
|
+
//# sourceMappingURL=class-declaration.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-declaration.d.cts","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"mappings":";;;;;;;;UAoDiB,qBAAA,SAA8B,sBAAA;EAAR;;;EAIrC,QAAA;EAeiB;;;EAVjB,OAAA,GAAU,QAAA;EATmC;;;EAc7C,UAAA,GAAa,QAAA;EAAb;;;EAKA,cAAA,GAAiB,uBAAA;AAAA;;AAiCnB;;;;;;;;;;;;;;AA4CA;;;;;;;;;;;;;;;iBA5CgB,gBAAA,CAAiB,KAAA,EAAO,qBAAA,GAAqB,QAAA;AAAA,kBAA7C,gBAAA;EAAA,2BAAgB,cAAA;AAAA;;;;UA4Cf,gBAAA;EACf,IAAA,WAAe,OAAA;EACf,MAAA,GAAS,MAAA;EACT,MAAA;EACA,OAAA;EACA,SAAA;EACA,SAAA;EACA,MAAA;EACA,QAAA;EACA,QAAA,GAAW,QAAA;EACX,GAAA,GAAM,QAAA;EACN,OAAA;EACA,QAAA;AAAA;AA0CF;;;;;;AAAA,iBAjCgB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;;;;UAiClC,eAAA,SAAwB,gBAAA;EACvC,IAAA;EACA,IAAA,GAAO,QAAA;EACP,QAAA;EACA,QAAA,GAAW,QAAA;EACX,eAAA;AAAA;;AASF;;;;;iBAAgB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA;;;;UAyBhC,kBAAA,SAA2B,gBAAA;EAC1C,IAAA;EACA,IAAA,GAAO,QAAA;EACP,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,gBAAA,CAAiB,KAAA,EAAO,kBAAA,GAAkB,QAAA;;;;;AAA1D;;iBA4BgB,gBAAA,CAAiB,KAAA,EAAO,kBAAA,GAAkB,QAAA;;;;UAkBzC,gBAAA,SAAyB,gBAAA,EAAkB,kBAAA;EAC1D,KAAA;EACA,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;AAAA"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { TypeParameters } from "./type-parameters.mjs";
|
|
2
|
+
import { Children, Namekey, Refkey } from "@alloy-js/core";
|
|
3
|
+
import { CallSignatureProps, CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/class-declaration.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Props for the ClassDeclaration component, which represents a TypeScript class declaration
|
|
8
|
+
*/
|
|
9
|
+
interface ClassDeclarationProps extends CommonDeclarationProps {
|
|
10
|
+
/**
|
|
11
|
+
* An indication of whether this class is abstract
|
|
12
|
+
*/
|
|
13
|
+
abstract?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration
|
|
16
|
+
*/
|
|
17
|
+
extends?: Children;
|
|
18
|
+
/**
|
|
19
|
+
* Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration
|
|
20
|
+
*/
|
|
21
|
+
implements?: Children[];
|
|
22
|
+
/**
|
|
23
|
+
* The generic type parameters of the class.
|
|
24
|
+
*/
|
|
25
|
+
typeParameters?: TypeParameterDescriptor[] | string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Create a TypeScript class declaration.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* const myPetRefkey = refkey();
|
|
33
|
+
* const Animal = refkey();
|
|
34
|
+
* const staticMember = refkey();
|
|
35
|
+
* const instanceMember = refkey();
|
|
36
|
+
*
|
|
37
|
+
* <ClassDeclaration name="Animal" refkey={Animal}>
|
|
38
|
+
* <ClassMember public static name="something" type="string" refkey={staticMember}>
|
|
39
|
+
* "hello"
|
|
40
|
+
* </ClassMember>
|
|
41
|
+
* <ClassMember public name="kind" type="string" />
|
|
42
|
+
* <ClassMember public name="name" type="string" refkey={instanceMember} />
|
|
43
|
+
* <ClassConstructor parameters="name: string">
|
|
44
|
+
* this.name = name;
|
|
45
|
+
* </ClassConstructor>
|
|
46
|
+
* </ClassDeclaration>
|
|
47
|
+
*
|
|
48
|
+
* <VarDeclaration const name="myPet" refkey={myPetRefkey}>
|
|
49
|
+
* new {Animal}();
|
|
50
|
+
* </VarDeclaration>
|
|
51
|
+
*
|
|
52
|
+
* {staticMember}; // Animal.something
|
|
53
|
+
* <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name
|
|
54
|
+
* {memberRefkey(myPetRefkey, instanceMember)}
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
declare function ClassDeclaration(props: ClassDeclarationProps): Children;
|
|
58
|
+
declare namespace ClassDeclaration {
|
|
59
|
+
var TypeParameters: typeof TypeParameters;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Generates a TypeScript class member declaration for the given reflection class.
|
|
63
|
+
*/
|
|
64
|
+
interface ClassMemberProps {
|
|
65
|
+
name: string | Namekey;
|
|
66
|
+
refkey?: Refkey;
|
|
67
|
+
public?: boolean;
|
|
68
|
+
private?: boolean;
|
|
69
|
+
protected?: boolean;
|
|
70
|
+
jsPrivate?: boolean;
|
|
71
|
+
static?: boolean;
|
|
72
|
+
abstract?: boolean;
|
|
73
|
+
children?: Children;
|
|
74
|
+
doc?: Children;
|
|
75
|
+
nullish?: boolean;
|
|
76
|
+
override?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Generates a TypeScript class member declaration for the given reflection class.
|
|
80
|
+
*
|
|
81
|
+
* @param props - The properties of the class member, including its name, visibility, and other modifiers.
|
|
82
|
+
* @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.
|
|
83
|
+
*/
|
|
84
|
+
declare function ClassMember(props: ClassMemberProps): Children;
|
|
85
|
+
/**
|
|
86
|
+
* Props for a class field, which is a specific type of class member that represents a property of the class.
|
|
87
|
+
*/
|
|
88
|
+
interface ClassFieldProps extends ClassMemberProps {
|
|
89
|
+
name: string;
|
|
90
|
+
type?: Children;
|
|
91
|
+
optional?: boolean;
|
|
92
|
+
children?: Children;
|
|
93
|
+
isPrivateMember?: boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Generates a TypeScript class field declaration for the given reflection class.
|
|
97
|
+
*
|
|
98
|
+
* @param props - The properties of the class field, including its name, type, optionality, and other modifiers.
|
|
99
|
+
* @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.
|
|
100
|
+
*/
|
|
101
|
+
declare function ClassField(props: ClassFieldProps): Children;
|
|
102
|
+
/**
|
|
103
|
+
* Props for a class field, which is a specific type of class member that represents a property of the class.
|
|
104
|
+
*/
|
|
105
|
+
interface ClassPropertyProps extends ClassMemberProps {
|
|
106
|
+
name: string;
|
|
107
|
+
type?: Children;
|
|
108
|
+
children?: Children;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Generates a TypeScript class property setter declaration for the given reflection class.
|
|
112
|
+
*
|
|
113
|
+
* @param props - The properties of the class property, including its name, type, and other modifiers.
|
|
114
|
+
* @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.
|
|
115
|
+
*/
|
|
116
|
+
declare function ClassPropertySet(props: ClassPropertyProps): Children;
|
|
117
|
+
/**
|
|
118
|
+
* Generates a TypeScript class property getter declaration for the given reflection class.
|
|
119
|
+
*
|
|
120
|
+
* @param props - The properties of the class property, including its name, type, and other modifiers.
|
|
121
|
+
* @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.
|
|
122
|
+
*/
|
|
123
|
+
declare function ClassPropertyGet(props: ClassPropertyProps): Children;
|
|
124
|
+
/**
|
|
125
|
+
* Props for a class method, which is a specific type of class member that represents a function defined within the class.
|
|
126
|
+
*/
|
|
127
|
+
interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {
|
|
128
|
+
async?: boolean;
|
|
129
|
+
children?: Children;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Generates a TypeScript class method declaration for the given reflection class.
|
|
133
|
+
*
|
|
134
|
+
* @param props - The properties of the class method, including its name, visibility, and other modifiers.
|
|
135
|
+
* @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.
|
|
136
|
+
*/
|
|
137
|
+
declare function ClassMethod(props: ClassMethodProps): Children;
|
|
138
|
+
declare type __ΩClassDeclarationProps = any[];
|
|
139
|
+
declare type __ΩClassMemberProps = any[];
|
|
140
|
+
declare type __ΩClassFieldProps = any[];
|
|
141
|
+
declare type __ΩClassPropertyProps = any[];
|
|
142
|
+
declare type __ΩClassMethodProps = any[];
|
|
143
|
+
//#endregion
|
|
144
|
+
export { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps };
|
|
145
|
+
//# sourceMappingURL=class-declaration.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"mappings":";;;;;;;;UAoDiB,qBAAA,SAA8B,sBAAA;EAAR;;;EAIrC,QAAA;EAeiB;;;EAVjB,OAAA,GAAU,QAAA;EATmC;;;EAc7C,UAAA,GAAa,QAAA;EAAb;;;EAKA,cAAA,GAAiB,uBAAA;AAAA;;AAiCnB;;;;;;;;;;;;;;AA4CA;;;;;;;;;;;;;;;iBA5CgB,gBAAA,CAAiB,KAAA,EAAO,qBAAA,GAAqB,QAAA;AAAA,kBAA7C,gBAAA;EAAA,2BAAgB,cAAA;AAAA;;;;UA4Cf,gBAAA;EACf,IAAA,WAAe,OAAA;EACf,MAAA,GAAS,MAAA;EACT,MAAA;EACA,OAAA;EACA,SAAA;EACA,SAAA;EACA,MAAA;EACA,QAAA;EACA,QAAA,GAAW,QAAA;EACX,GAAA,GAAM,QAAA;EACN,OAAA;EACA,QAAA;AAAA;AA0CF;;;;;;AAAA,iBAjCgB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;;;;UAiClC,eAAA,SAAwB,gBAAA;EACvC,IAAA;EACA,IAAA,GAAO,QAAA;EACP,QAAA;EACA,QAAA,GAAW,QAAA;EACX,eAAA;AAAA;;AASF;;;;;iBAAgB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA;;;;UAyBhC,kBAAA,SAA2B,gBAAA;EAC1C,IAAA;EACA,IAAA,GAAO,QAAA;EACP,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,gBAAA,CAAiB,KAAA,EAAO,kBAAA,GAAkB,QAAA;;;;;AAA1D;;iBA4BgB,gBAAA,CAAiB,KAAA,EAAO,kBAAA,GAAkB,QAAA;;;;UAkBzC,gBAAA,SAAyB,gBAAA,EAAkB,kBAAA;EAC1D,KAAA;EACA,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;AAAA"}
|
|
@@ -281,4 +281,5 @@ function ClassMethod(props) {
|
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
//#endregion
|
|
284
|
-
export { ClassDeclaration, ClassField, ClassMember, ClassMethod, ClassPropertyGet, ClassPropertySet };
|
|
284
|
+
export { ClassDeclaration, ClassField, ClassMember, ClassMethod, ClassPropertyGet, ClassPropertySet };
|
|
285
|
+
//# sourceMappingURL=class-declaration.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-declaration.mjs","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Block,\n Children,\n code,\n For,\n MemberDeclaration,\n Name,\n Namekey,\n Refkey,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n CallSignature,\n CallSignatureProps,\n CommonDeclarationProps,\n createMemberSymbol,\n createTypeAndValueSymbol,\n Declaration,\n TSSymbolFlags,\n TypeParameterDescriptor,\n TypeRefContext,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\nimport { LexicalScope } from \"../contexts\";\nimport { MemberScope } from \"../contexts/member-scope\";\nimport { getCallSignatureProps } from \"../helpers\";\nimport { PropertyName } from \"./property-name\";\nimport { TSDoc, TSDocParams } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\n/**\n * Props for the ClassDeclaration component, which represents a TypeScript class declaration\n */\nexport interface ClassDeclarationProps extends CommonDeclarationProps {\n /**\n * An indication of whether this class is abstract\n */\n abstract?: boolean;\n\n /**\n * An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration\n */\n extends?: Children;\n\n /**\n * Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration\n */\n implements?: Children[];\n\n /**\n * The generic type parameters of the class.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Create a TypeScript class declaration.\n *\n * @example\n * ```tsx\n * const myPetRefkey = refkey();\n * const Animal = refkey();\n * const staticMember = refkey();\n * const instanceMember = refkey();\n *\n * <ClassDeclaration name=\"Animal\" refkey={Animal}>\n * <ClassMember public static name=\"something\" type=\"string\" refkey={staticMember}>\n * \"hello\"\n * </ClassMember>\n * <ClassMember public name=\"kind\" type=\"string\" />\n * <ClassMember public name=\"name\" type=\"string\" refkey={instanceMember} />\n * <ClassConstructor parameters=\"name: string\">\n * this.name = name;\n * </ClassConstructor>\n * </ClassDeclaration>\n *\n * <VarDeclaration const name=\"myPet\" refkey={myPetRefkey}>\n * new {Animal}();\n * </VarDeclaration>\n *\n * {staticMember}; // Animal.something\n * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name\n * {memberRefkey(myPetRefkey, instanceMember)}\n * ```\n */\nexport function ClassDeclaration(props: ClassDeclarationProps) {\n const extendsPart = props.extends && <> extends {props.extends}</>;\n const implementsPart = props.implements && props.implements.length > 0 && (\n <>\n {\" \"}\n implements{\" \"}\n <For each={props.implements} comma space>\n {implement => implement}\n </For>\n </>\n );\n const sym = createTypeAndValueSymbol(props.name, {\n refkeys: props.refkey,\n export: props.export,\n default: props.default,\n metadata: props.metadata,\n hasInstanceMembers: true,\n namePolicy: useTSNamePolicy().for(\"class\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <Declaration symbol={sym} export={props.export} default={props.default}>\n <MemberScope ownerSymbol={sym}>\n {props.abstract && code`abstract `} class <Name />\n {props.typeParameters && (\n <TypeParameters parameters={props.typeParameters} />\n )}\n {extendsPart}\n {implementsPart} <Block>{props.children}</Block>\n </MemberScope>\n </Declaration>\n </>\n );\n}\n\nClassDeclaration.TypeParameters = TypeParameters;\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n */\nexport interface ClassMemberProps {\n name: string | Namekey;\n refkey?: Refkey;\n public?: boolean;\n private?: boolean;\n protected?: boolean;\n jsPrivate?: boolean;\n static?: boolean;\n abstract?: boolean;\n children?: Children;\n doc?: Children;\n nullish?: boolean;\n override?: boolean;\n}\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n *\n * @param props - The properties of the class member, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMember(props: ClassMemberProps) {\n let tsFlags = TSSymbolFlags.None;\n if (props.nullish) {\n tsFlags |= TSSymbolFlags.Nullish;\n }\n\n const sym = createMemberSymbol(props.name, props, {\n refkeys: props.refkey,\n tsFlags,\n namePolicy: useTSNamePolicy().for(\"class-member-data\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <MemberDeclaration symbol={sym}>\n {props.public && \"public \"}\n {props.private && \"private \"}\n {props.protected && \"protected \"}\n {props.abstract && \"abstract \"}\n {props.override && \"override \"}\n {props.static && \"static \"}\n {props.children}\n </MemberDeclaration>\n </>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassFieldProps extends ClassMemberProps {\n name: string;\n type?: Children;\n optional?: boolean;\n children?: Children;\n isPrivateMember?: boolean;\n}\n\n/**\n * Generates a TypeScript class field declaration for the given reflection class.\n *\n * @param props - The properties of the class field, including its name, type, optionality, and other modifiers.\n * @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassField(props: ClassFieldProps) {\n const optionality = props.optional ? \"?\" : \"\";\n const typeSection = props.type && (\n <>\n {optionality}: <TypeRefContext>{props.type}</TypeRefContext>\n </>\n );\n const initializerSection = props.children && <> = {props.children}</>;\n const nullish = props.nullish ?? props.optional;\n\n return (\n <ClassMember {...props} nullish={nullish}>\n <PropertyName\n private={props.isPrivateMember}\n name={props.isPrivateMember ? props.name : undefined}\n />\n {typeSection}\n {initializerSection}\n </ClassMember>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassPropertyProps extends ClassMemberProps {\n name: string;\n type?: Children;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class property setter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertySet(props: ClassPropertyProps) {\n return (\n <>\n <ClassMember {...props}>\n {\"set \"}\n <PropertyName name={props.name} />\n <LexicalScope>\n <CallSignature\n parameters={[\n {\n name: \"value\",\n type: <TypeRefContext>{props.type}</TypeRefContext>\n }\n ]}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n\n/**\n * Generates a TypeScript class property getter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertyGet(props: ClassPropertyProps) {\n return (\n <ClassMember {...props}>\n {\"get \"}\n <PropertyName name={props.name} />\n <LexicalScope>\n <CallSignature\n returnType={<TypeRefContext>{props.type}</TypeRefContext>}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n );\n}\n\n/**\n * Props for a class method, which is a specific type of class member that represents a function defined within the class.\n */\nexport interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {\n async?: boolean;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class method declaration for the given reflection class.\n *\n * @param props - The properties of the class method, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMethod(props: ClassMethodProps) {\n const callProps = getCallSignatureProps(props);\n const [_, rest] = splitProps(props, [\"doc\"]);\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc}>\n {Array.isArray(rest.parameters) && (\n <TSDocParams parameters={rest.parameters} />\n )}\n </TSDoc>\n </Show>\n <ClassMember {...rest}>\n {props.async && \"async \"}\n <PropertyName />\n <LexicalScope>\n <CallSignature {...callProps} /> <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,SAAC,iBAAA,OAAA;CACC,MAAE,cAAiB,MAAM,WAAQ,CAAA,aAAe,WAAA,MAAA,QAAA,CAAA;CAChD,MAAI,iBAAmB,MAAM,cAAO,MAAW,WAAa,SAAS,KAAA;EAAA;EAAA;EAAa;EAAA,gBAAA,KAAA;GAChF,IAAI,OAAK;AACP,WAAC,MAAW;;GAEd,OAAE;GACF,OAAE;GACF,WAAQ,cAAW;GACpB,CAAC;EAAC;CACH,MAAG,MAAA,yBAAgB,MAAA,MAAA;EACpB,SAAA,MAAA;EACG,QAAA,MAAc;EACd,SAAM,MAAS;EACf,UAAC,MAAc;EAClB,oBAAA;EACG,YAAY,iBAAa,CAAA,IAAA,QAAA;EAC1B,CAAC;AACF,QAAE,CAAA,gBAAwB,MAAE;EAC1B,IAAC,OAAA;AACH,UAAA,QAAA,MAAA,IAAA;;EAEA,IAAM,WAAW;AACjB,UAAM,gBAAuB,OAAA,EAC1B,IAAA,UAAA;AACK,WAAA,MAAA;MAEH,CAAA;;EAEJ,CAAC,EAAE,gBAAK,eAAA;EACP,QAAE;EACH,KAAA,YAAA;AACD,UAAW,MAAC;;EAEV,KAAA,aAAc;AACd,UAAS,MAAM;;EAEf,IAAA,WAAA;AACA,UAAA,gBAA2B,eAAa;IACxC,aAAA;;AAEK,YAAA;MAAA,WAAA,MAAA,YAAA,IAAA,YAAA;MAAA;MAAA,gBAAA,MAAA,EAAA,CAAA;MAAA,WAAA,WAAA,CAAA,CAAA,MAAA,eAAA,EAAA,IAAA,gBAAA,gBAAA,EACJ,IAAA,aAAA;AACO,cAAM,MAAQ;SAElB,CAAI,CAAA;MAAA;MAAA;MAAA;MAAA,gBAAA,OAAA,EACL,IAAA,WAAoB;AAClB,cAAY,MAAA;SAEV,CAAA;MAAA;;IAEJ,CAAC;;EAEL,CAAC,CAAC;;AAEL,iBAAQ,iBAAW;;;;;;;AA0BnB,SAAe,YAAW,OAAyB;CAClD,IAAA,UAAA,cAAA;AACC,KAAE,MAAM,QACN,YAAU,cAAY;CAE1B,MAAO,MAAA,mBAA0B,MAAE,MAAA,OAAiB;EAClD,SAAW,MAAG;EACZ;EACA,YAAW,iBAAc,CAAA,IAAO,oBAAA;EAClC,CAAA;;EAEA,IAAM,OAAM;AACV,UAAS,QAAM,MAAM,IAAA;;EAErB,IAAA,WAAY;AACZ,UAAA,gBAAA,OAAA;AAEK,WAAA,MAAA;MAEF,CAAA;;EAEJ,CAAC,EAAE,gBAAM,mBAAA;EACR,QAAG;EACH,IAAI,WAAO;AACT,UAAG;IAAK,WAAa,MAAA,UAAS,UAAA;IAAA,WAAA,MAAA,WAAA,WAAA;IAAA,WAAA,MAAA,aAAA,aAAA;IAAA,WAAA,MAAA,YAAA,YAAA;IAAA,WAAA,MAAA,YAAA,YAAA;IAAA,WAAA,MAAA,UAAA,UAAA;IAAA,WAAA,MAAA,SAAA;IAAA;;EAEjC,CAAC,CAAC;;;;;;;;AAoBL,SAAE,WAAA,OAAA;CACA,MAAC,cAAY,MAAW,WAAY,MAAA;CACrC,MAAA,cAAA,MAAA,QAAA;EAAA;EAAA;EAAA,gBAAA,gBAAA,EACG,IAAA,WAAc;AACd,UAAS,MAAK;KAElB,CAAA;EAAA;CACE,MAAM,qBAAoB,MAAA,YAAmB,CAAA,OAAA,WAAA,MAAA,SAAA,CAAA;AAE7C,QAAG,gBAAA,aAAA,WAAA,OAAA;EACD,SAFI,MAAc,WAAa,MAAC;EAGhC,IAAE,WAAA;AACH,UAAA;IAAA,gBAAA,cAAA;KACK,KAAA,aAAkB;AAClB,aAAS,MAAM;;KAEf,IAAC,OAAA;AACJ,aAAY,MAAI,kBAAgB,MAAQ,OAAA;;KAEtC,CAAC;IAAA;IAAe;IAAe;;EAEnC,CAAC,CAAC;;;;;;;;AAkBL,SAAC,iBAAA,OAAA;AACC,QAAO,CAAC,gBAAY,aAAkB,WAAc,OAAE,EACpD,IAAA,WAAc;AAChB,SAAA;GAAA;GAAA,gBAAA,cAAA,EACK,IAAA,OAAS;AACP,WAAA,MAAA;MAEF,CAAA;GAAA,gBAAqB,cAAC,EACrB,IAAE,WAAK;AACN,WAAA;KAAA,gBAAyB,eAAO,EAChC,IAAA,aAAY;AACV,aAAA,CAAA;OACC,MAAU;OACR,MAAA,gBAAA,gBAAA,EACE,IAAM,WAAO;AACT,eAAG,MAAA;UAEV,CAAA;OACE,CAAC;QAEN,CAAA;KAAA;KAAA,gBAAY,OAAA,EACd,IAAA,WAAW;AACb,aAAA,MAAA;QAEN,CAAA;KAAA;MAEE,CAAA;GAAA;IAED,CAAA,CAAA,CAAA;;;;;;;;AASD,SAAO,iBAAY,OAAA;AACjB,QAAO,gBAAA,aAAA,WAAA,OAAA,EACL,IAAI,WAAE;AACJ,SAAO;GAAC;GAAA,gBAAA,cAAA,EACN,IAAC,OAAO;AACR,WAAA,MAAY;MAEjB,CAAA;GAAA,gBAAA,cAAA,EACH,IAAA,WAAA;;sCAEE,IAAA,aAAA;AACY,aAAO,gBAAkB,gBAAe,EACpD,IAAA,WAAA;AACe,cAAA,MAAA;SAEJ,CAAA;;;8BAGX,IAAA,WAAA;AACY,aAAC,MAAW;QAEhB,CAAA;KAAA;MAER,CAAA;GAAA;IAEA,CAAA,CAAA;;;;;;;;AAiBF,SAAU,YAAY,OAAA;CACpB,MAAM,YAAW,sBAAA,MAAA;CACjB,MAAI,CAAA,GAAA,QAAA,WAAA,OAAA,CAAA,MAAA,CAAA;AACJ,QAAC,CAAA,gBAAA,MAAA;EACH,IAAA,OAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
+
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
3
|
+
|
|
4
|
+
//#region src/typescript/components/dynamic-import-statement.d.ts
|
|
5
|
+
interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initializer"> {
|
|
6
|
+
/**
|
|
7
|
+
* The path of the module to import.
|
|
8
|
+
*/
|
|
9
|
+
importPath: string;
|
|
10
|
+
/**
|
|
11
|
+
* The name of the export to import from the module.
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue "default"
|
|
14
|
+
*/
|
|
15
|
+
exportName?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Generates a dynamic import statement for a given module path and export name.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <DynamicImportStatement importPath="./my-module" exportName="myExport" const={true} name="myVar" />
|
|
23
|
+
* // const myVar = await import("./my-module").then(m => m.myExport);
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @param props - The properties for the dynamic import statement.
|
|
27
|
+
* @returns A `VarDeclaration` component representing the dynamic import statement.
|
|
28
|
+
*/
|
|
29
|
+
declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core0.Children;
|
|
30
|
+
declare type __ΩDynamicImportStatementProps = any[];
|
|
31
|
+
//#endregion
|
|
32
|
+
export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
|
|
33
|
+
//# sourceMappingURL=dynamic-import-statement.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-import-statement.d.cts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"mappings":";;;;UAqBiB,2BAAA,SAAoC,IAAA,CACnD,mBAAA;;;AADF;EAOE,UAAA;;;;;;EAOA,UAAA;AAAA;;AAeF;;;;;;;;;;;iBAAgB,sBAAA,CAAuB,KAAA,EAAO,2BAAA,GAA2B,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
+
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
3
|
+
|
|
4
|
+
//#region src/typescript/components/dynamic-import-statement.d.ts
|
|
5
|
+
interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initializer"> {
|
|
6
|
+
/**
|
|
7
|
+
* The path of the module to import.
|
|
8
|
+
*/
|
|
9
|
+
importPath: string;
|
|
10
|
+
/**
|
|
11
|
+
* The name of the export to import from the module.
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue "default"
|
|
14
|
+
*/
|
|
15
|
+
exportName?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Generates a dynamic import statement for a given module path and export name.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <DynamicImportStatement importPath="./my-module" exportName="myExport" const={true} name="myVar" />
|
|
23
|
+
* // const myVar = await import("./my-module").then(m => m.myExport);
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @param props - The properties for the dynamic import statement.
|
|
27
|
+
* @returns A `VarDeclaration` component representing the dynamic import statement.
|
|
28
|
+
*/
|
|
29
|
+
declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core0.Children;
|
|
30
|
+
declare type __ΩDynamicImportStatementProps = any[];
|
|
31
|
+
//#endregion
|
|
32
|
+
export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
|
|
33
|
+
//# sourceMappingURL=dynamic-import-statement.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-import-statement.d.mts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"mappings":";;;;UAqBiB,2BAAA,SAAoC,IAAA,CACnD,mBAAA;;;AADF;EAOE,UAAA;;;;;;EAOA,UAAA;AAAA;;AAeF;;;;;;;;;;;iBAAgB,sBAAA,CAAuB,KAAA,EAAO,2BAAA,GAA2B,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-import-statement.mjs","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code } from \"@alloy-js/core\";\nimport { VarDeclaration, VarDeclarationProps } from \"@alloy-js/typescript\";\n\nexport interface DynamicImportStatementProps extends Omit<\n VarDeclarationProps,\n \"initializer\"\n> {\n /**\n * The path of the module to import.\n */\n importPath: string;\n\n /**\n * The name of the export to import from the module.\n *\n * @defaultValue \"default\"\n */\n exportName?: string;\n}\n\n/**\n * Generates a dynamic import statement for a given module path and export name.\n *\n * @example\n * ```tsx\n * <DynamicImportStatement importPath=\"./my-module\" exportName=\"myExport\" const={true} name=\"myVar\" />\n * // const myVar = await import(\"./my-module\").then(m => m.myExport);\n * ```\n *\n * @param props - The properties for the dynamic import statement.\n * @returns A `VarDeclaration` component representing the dynamic import statement.\n */\nexport function DynamicImportStatement(props: DynamicImportStatementProps) {\n const {\n importPath,\n exportName = \"default\",\n const: isConst = true,\n ...rest\n } = props;\n\n return (\n <VarDeclaration\n const={isConst}\n {...rest}\n initializer={code`await import(\"${importPath}\").then(m => m.${exportName});`}></VarDeclaration>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+CA,SAAgB,uBAAqB,OAA4B;CAC/D,MAAE,EACF,YACF,aAAgB,WACd,OAAM,UAAA,MACJ,GAAA,SACA;AACF,QAAO,gBAAgB,gBAAA,WAAA,EACrB,SAAG,SACJ,EAAE,MAAM,gFAET,CAAA,CAAA"}
|
|
@@ -2,9 +2,9 @@ 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_typescript_components_typescript_file = require('./typescript-file.cjs');
|
|
5
|
+
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
5
6
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
7
|
let _alloy_js_core = require("@alloy-js/core");
|
|
7
|
-
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
8
8
|
let _stryke_path_append = require("@stryke/path/append");
|
|
9
9
|
let defu = require("defu");
|
|
10
10
|
defu = require_runtime.__toESM(defu);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TypescriptFileProps } from "./typescript-file.cjs";
|
|
2
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
3
|
+
import { ResolvedEntryTypeDefinition } from "powerlines";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/entry-file.d.ts
|
|
6
|
+
type EntryFileProps = TypescriptFileProps & {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the file is a TSX file.
|
|
9
|
+
*
|
|
10
|
+
* @defaultValue false
|
|
11
|
+
*/
|
|
12
|
+
tsx?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Render metadata information about the entrypoint
|
|
15
|
+
*/
|
|
16
|
+
typeDefinition?: ResolvedEntryTypeDefinition;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A base component representing a Powerlines generated Typescript source file.
|
|
20
|
+
*
|
|
21
|
+
* @param props - The properties for the source file.
|
|
22
|
+
* @returns The rendered source file component.
|
|
23
|
+
*/
|
|
24
|
+
declare function EntryFile(props: EntryFileProps): _alloy_js_core0.Children;
|
|
25
|
+
declare type __ΩEntryFileProps = any[];
|
|
26
|
+
//#endregion
|
|
27
|
+
export { EntryFile, EntryFileProps, __ΩEntryFileProps };
|
|
28
|
+
//# sourceMappingURL=entry-file.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-file.d.cts","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"mappings":";;;;;KA4BY,cAAA,GAAiB,mBAAA;;;AAA7B;;;EAME,GAAA;EAN2B;;;EAW3B,cAAA,GAAiB,2BAAA;AAAA;;AASnB;;;;;iBAAgB,SAAA,CAAU,KAAA,EAAO,cAAA,GAAc,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TypescriptFileProps } from "./typescript-file.mjs";
|
|
2
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
3
|
+
import { ResolvedEntryTypeDefinition } from "powerlines";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/entry-file.d.ts
|
|
6
|
+
type EntryFileProps = TypescriptFileProps & {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the file is a TSX file.
|
|
9
|
+
*
|
|
10
|
+
* @defaultValue false
|
|
11
|
+
*/
|
|
12
|
+
tsx?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Render metadata information about the entrypoint
|
|
15
|
+
*/
|
|
16
|
+
typeDefinition?: ResolvedEntryTypeDefinition;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A base component representing a Powerlines generated Typescript source file.
|
|
20
|
+
*
|
|
21
|
+
* @param props - The properties for the source file.
|
|
22
|
+
* @returns The rendered source file component.
|
|
23
|
+
*/
|
|
24
|
+
declare function EntryFile(props: EntryFileProps): _alloy_js_core0.Children;
|
|
25
|
+
declare type __ΩEntryFileProps = any[];
|
|
26
|
+
//#endregion
|
|
27
|
+
export { EntryFile, EntryFileProps, __ΩEntryFileProps };
|
|
28
|
+
//# sourceMappingURL=entry-file.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-file.d.mts","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"mappings":";;;;;KA4BY,cAAA,GAAiB,mBAAA;;;AAA7B;;;EAME,GAAA;EAN2B;;;EAW3B,cAAA,GAAiB,2BAAA;AAAA;;AASnB;;;;;iBAAgB,SAAA,CAAU,KAAA,EAAO,cAAA,GAAc,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
|
|
2
2
|
import { TypescriptFile } from "./typescript-file.mjs";
|
|
3
|
+
import { hasFileExtension } from "@stryke/path/file-path-fns";
|
|
3
4
|
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
4
5
|
import { computed, splitProps } from "@alloy-js/core";
|
|
5
|
-
import { hasFileExtension } from "@stryke/path/file-path-fns";
|
|
6
6
|
import { appendPath } from "@stryke/path/append";
|
|
7
7
|
import defu from "defu";
|
|
8
8
|
import { replaceExtension, replacePath } from "@stryke/path/replace";
|
|
@@ -37,4 +37,5 @@ function EntryFile(props) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
|
-
export { EntryFile };
|
|
40
|
+
export { EntryFile };
|
|
41
|
+
//# sourceMappingURL=entry-file.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-file.mjs","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { computed, splitProps } from \"@alloy-js/core\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport defu from \"defu\";\nimport { ResolvedEntryTypeDefinition } from \"powerlines\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { TypescriptFile, TypescriptFileProps } from \"./typescript-file\";\n\nexport type EntryFileProps = TypescriptFileProps & {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n\n /**\n * Render metadata information about the entrypoint\n */\n typeDefinition?: ResolvedEntryTypeDefinition;\n};\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function EntryFile(props: EntryFileProps) {\n const [{ children, meta, tsx, path, typeDefinition }, rest] = splitProps(\n props,\n [\"children\", \"meta\", \"tsx\", \"path\", \"typeDefinition\"]\n );\n\n const context = usePowerlinesSafe();\n const fullPath = computed(() =>\n context\n ? appendPath(\n `${\n !isSet(tsx) ? path : replaceExtension(path)\n }${tsx ? \".tsx\" : hasFileExtension(path) ? \"\" : \".ts\"}`,\n replacePath(context.entryPath, context.workspaceConfig.workspaceRoot)\n )\n : path\n );\n\n return (\n <TypescriptFile\n {...rest}\n path={fullPath.value}\n meta={defu(\n {\n kind: \"entry\"\n },\n meta ?? {},\n {\n typeDefinition\n }\n )}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgDA,SAAgB,UAAU,OAAuB;CAC/C,MAAM,CAAC,EACL,UACA,MACD,WAED,kBACA,QAAM,WAAW,OAAY;EAAC;EAAA;EAAA;EAAA;EAAA;EAAA,CAAA;CAC9B,MAAE,UAAA,mBAAA;CACF,MAAM,WAAU,eAAA,UAAA,WAAA,GAAA,CAAA,MAAA,IAAA,GAAA,OAAA,iBAAA,KAAA,GAAA,MAAA,SAAA,iBAAA,KAAA,GAAA,KAAA,SAAA,YAAA,QAAA,WAAA,QAAA,gBAAA,cAAA,CAAA,GAAA,KAAA;AAChB,QAAO,gBAAG,gBAAA,WAAA,MAAA;EACR,IAAI,OAAK;AACP,UAAO,SAAQ;;EAEjB,IAAI,OAAA;AACF,UAAE,KAAA,EACL,MAAA,yBAEK,gBACH,CAAA;;EAEO;EACT,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps } from "./tsdoc.cjs";
|
|
2
|
+
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps } from "./typescript-file.cjs";
|
|
3
|
+
import { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps } from "./builtin-file.cjs";
|
|
4
|
+
import { TypeParameters, TypeParametersProps, __ΩTypeParametersProps } from "./type-parameters.cjs";
|
|
5
|
+
import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps } from "./class-declaration.cjs";
|
|
6
|
+
import { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps } from "./dynamic-import-statement.cjs";
|
|
7
|
+
import { EntryFile, EntryFileProps, __ΩEntryFileProps } from "./entry-file.cjs";
|
|
8
|
+
import { InfrastructureFile, InfrastructureFileProps, __ΩInfrastructureFileProps } from "./infrastructure-file.cjs";
|
|
9
|
+
import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps } from "./interface-declaration.cjs";
|
|
10
|
+
import { ComputedRef, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, __ΩComputedRef, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps } from "./object-declaration.cjs";
|
|
11
|
+
import { PropertyName, PropertyNameProps, __ΩPropertyNameProps } from "./property-name.cjs";
|
|
12
|
+
import { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps } from "./record-expression.cjs";
|
|
13
|
+
import { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, __ΩTSDocReflectionClassProps, __ΩTSDocReflectionMethodProps, __ΩTSDocReflectionPropertyProps } from "./tsdoc-reflection.cjs";
|
|
14
|
+
import { TypeDeclaration, TypeDeclarationProps, __ΩTypeDeclarationProps } from "./type-declaration.cjs";
|
|
15
|
+
export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InfrastructureFile, InfrastructureFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩBuiltinFileProps, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps, __ΩComputedRef, __ΩDynamicImportStatementProps, __ΩEntryFileProps, __ΩInfrastructureFileProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps, __ΩPropertyNameProps, __ΩRecordExpressionProps, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocReflectionClassProps, __ΩTSDocReflectionMethodProps, __ΩTSDocReflectionPropertyProps, __ΩTSDocTagProps, __ΩTypeDeclarationProps, __ΩTypeParametersProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps } from "./tsdoc.mjs";
|
|
2
|
+
import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps } from "./typescript-file.mjs";
|
|
3
|
+
import { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps } from "./builtin-file.mjs";
|
|
4
|
+
import { TypeParameters, TypeParametersProps, __ΩTypeParametersProps } from "./type-parameters.mjs";
|
|
5
|
+
import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps } from "./class-declaration.mjs";
|
|
6
|
+
import { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps } from "./dynamic-import-statement.mjs";
|
|
7
|
+
import { EntryFile, EntryFileProps, __ΩEntryFileProps } from "./entry-file.mjs";
|
|
8
|
+
import { InfrastructureFile, InfrastructureFileProps, __ΩInfrastructureFileProps } from "./infrastructure-file.mjs";
|
|
9
|
+
import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps } from "./interface-declaration.mjs";
|
|
10
|
+
import { ComputedRef, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, __ΩComputedRef, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps } from "./object-declaration.mjs";
|
|
11
|
+
import { PropertyName, PropertyNameProps, __ΩPropertyNameProps } from "./property-name.mjs";
|
|
12
|
+
import { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps } from "./record-expression.mjs";
|
|
13
|
+
import { TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, __ΩTSDocReflectionClassProps, __ΩTSDocReflectionMethodProps, __ΩTSDocReflectionPropertyProps } from "./tsdoc-reflection.mjs";
|
|
14
|
+
import { TypeDeclaration, TypeDeclarationProps, __ΩTypeDeclarationProps } from "./type-declaration.mjs";
|
|
15
|
+
export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InfrastructureFile, InfrastructureFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocContextClass, TSDocContextMethod, TSDocContextProperty, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionClassProps, TSDocReflectionMethod, TSDocReflectionMethodProps, TSDocReflectionProperty, TSDocReflectionPropertyProps, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeDeclaration, TypeDeclarationProps, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩBuiltinFileProps, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps, __ΩComputedRef, __ΩDynamicImportStatementProps, __ΩEntryFileProps, __ΩInfrastructureFileProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps, __ΩPropertyNameProps, __ΩRecordExpressionProps, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocReflectionClassProps, __ΩTSDocReflectionMethodProps, __ΩTSDocReflectionPropertyProps, __ΩTSDocTagProps, __ΩTypeDeclarationProps, __ΩTypeParametersProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps };
|
|
@@ -2,9 +2,9 @@ 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_typescript_components_typescript_file = require('./typescript-file.cjs');
|
|
5
|
+
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
5
6
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
7
|
let _alloy_js_core = require("@alloy-js/core");
|
|
7
|
-
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
8
8
|
let _stryke_path_append = require("@stryke/path/append");
|
|
9
9
|
let defu = require("defu");
|
|
10
10
|
defu = require_runtime.__toESM(defu);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TypescriptFileProps } from "./typescript-file.cjs";
|
|
2
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
3
|
+
|
|
4
|
+
//#region src/typescript/components/infrastructure-file.d.ts
|
|
5
|
+
type InfrastructureFileProps = Omit<TypescriptFileProps, "path"> & {
|
|
6
|
+
/**
|
|
7
|
+
* The infrastructure module identifier.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A base component representing a Powerlines generated Typescript infrastructure file.
|
|
13
|
+
*
|
|
14
|
+
* @param props - The properties for the infrastructure file.
|
|
15
|
+
* @returns The rendered infrastructure file component.
|
|
16
|
+
*/
|
|
17
|
+
declare function InfrastructureFile(props: InfrastructureFileProps): _alloy_js_core0.Children;
|
|
18
|
+
declare type __ΩInfrastructureFileProps = any[];
|
|
19
|
+
//#endregion
|
|
20
|
+
export { InfrastructureFile, InfrastructureFileProps, __ΩInfrastructureFileProps };
|
|
21
|
+
//# sourceMappingURL=infrastructure-file.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infrastructure-file.d.cts","names":[],"sources":["../../../src/typescript/components/infrastructure-file.tsx"],"mappings":";;;;KA0BY,uBAAA,GAA0B,IAAA,CAAK,mBAAA;;;AAA3C;EAIE,EAAA;AAAA;;;;;;;iBASc,kBAAA,CAAmB,KAAA,EAAO,uBAAA,GAAuB,eAAA,CAAA,QAAA;AAAA"}
|