@alloy-js/csharp 0.16.0 → 0.18.0-dev.10

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.
Files changed (130) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/src/components/ClassDeclaration.d.ts +57 -0
  3. package/dist/src/components/ClassDeclaration.d.ts.map +1 -0
  4. package/dist/src/components/{Class.js → ClassDeclaration.js} +58 -69
  5. package/dist/src/components/ClassMethod.d.ts +25 -0
  6. package/dist/src/components/ClassMethod.d.ts.map +1 -0
  7. package/dist/src/components/ClassMethod.js +60 -0
  8. package/dist/src/components/Declaration.d.ts.map +1 -1
  9. package/dist/src/components/Declaration.js +4 -2
  10. package/dist/src/components/EnumDeclaration.d.ts +34 -0
  11. package/dist/src/components/EnumDeclaration.d.ts.map +1 -0
  12. package/dist/src/components/{Enum.js → EnumDeclaration.js} +36 -14
  13. package/dist/src/components/Namespace.d.ts.map +1 -1
  14. package/dist/src/components/Namespace.js +2 -2
  15. package/dist/src/components/Parameters.d.ts.map +1 -1
  16. package/dist/src/components/Parameters.js +3 -3
  17. package/dist/src/components/doc/comment.d.ts +70 -0
  18. package/dist/src/components/doc/comment.d.ts.map +1 -0
  19. package/dist/src/components/doc/comment.js +88 -0
  20. package/dist/src/components/doc/comment.test.d.ts +2 -0
  21. package/dist/src/components/doc/comment.test.d.ts.map +1 -0
  22. package/dist/src/components/doc/comment.test.js +348 -0
  23. package/dist/src/components/doc/from-markdown.d.ts +6 -0
  24. package/dist/src/components/doc/from-markdown.d.ts.map +1 -0
  25. package/dist/src/components/doc/from-markdown.js +58 -0
  26. package/dist/src/components/doc/from-markdown.test.d.ts +2 -0
  27. package/dist/src/components/doc/from-markdown.test.d.ts.map +1 -0
  28. package/dist/src/components/doc/from-markdown.test.js +83 -0
  29. package/dist/src/components/index.d.ts +7 -2
  30. package/dist/src/components/index.d.ts.map +1 -1
  31. package/dist/src/components/index.js +7 -2
  32. package/dist/src/components/interface/declaration.d.ts +34 -0
  33. package/dist/src/components/interface/declaration.d.ts.map +1 -0
  34. package/dist/src/components/interface/declaration.js +90 -0
  35. package/dist/src/components/interface/declaration.test.d.ts +2 -0
  36. package/dist/src/components/interface/declaration.test.d.ts.map +1 -0
  37. package/dist/src/components/interface/declaration.test.js +69 -0
  38. package/dist/src/components/interface/method.d.ts +18 -0
  39. package/dist/src/components/interface/method.d.ts.map +1 -0
  40. package/dist/src/components/interface/method.js +59 -0
  41. package/dist/src/components/interface/method.test.d.ts +2 -0
  42. package/dist/src/components/interface/method.test.d.ts.map +1 -0
  43. package/dist/src/components/interface/method.test.js +131 -0
  44. package/dist/src/components/interface/property.d.ts +21 -0
  45. package/dist/src/components/interface/property.d.ts.map +1 -0
  46. package/dist/src/components/interface/property.js +59 -0
  47. package/dist/src/components/interface/property.test.d.ts +2 -0
  48. package/dist/src/components/interface/property.test.d.ts.map +1 -0
  49. package/dist/src/components/interface/property.test.js +165 -0
  50. package/dist/src/components/stc/index.d.ts +2 -2
  51. package/dist/src/components/stc/index.d.ts.map +1 -1
  52. package/dist/src/components/stc/index.js +2 -2
  53. package/dist/src/modifiers.d.ts +13 -4
  54. package/dist/src/modifiers.d.ts.map +1 -1
  55. package/dist/src/modifiers.js +13 -27
  56. package/dist/src/name-policy.d.ts +1 -1
  57. package/dist/src/name-policy.d.ts.map +1 -1
  58. package/dist/src/name-policy.js +1 -0
  59. package/dist/src/symbols/csharp-output-symbol.d.ts +4 -4
  60. package/dist/src/symbols/csharp-output-symbol.d.ts.map +1 -1
  61. package/dist/src/symbols/csharp-output-symbol.js +13 -13
  62. package/dist/src/symbols/scopes.d.ts +6 -8
  63. package/dist/src/symbols/scopes.d.ts.map +1 -1
  64. package/dist/src/symbols/scopes.js +14 -19
  65. package/dist/test/class-declaration.test.d.ts +2 -0
  66. package/dist/test/class-declaration.test.d.ts.map +1 -0
  67. package/dist/test/{class.test.js → class-declaration.test.js} +123 -73
  68. package/dist/test/class-method.test.d.ts +2 -0
  69. package/dist/test/class-method.test.d.ts.map +1 -0
  70. package/dist/test/class-method.test.js +161 -0
  71. package/dist/test/enum.test.js +12 -12
  72. package/dist/test/namespace.test.js +8 -8
  73. package/dist/test/project-directory.test.d.ts +2 -0
  74. package/dist/test/project-directory.test.d.ts.map +1 -0
  75. package/dist/test/{projectdirectory.test.js → project-directory.test.js} +8 -8
  76. package/dist/test/sourcefile.test.js +4 -4
  77. package/dist/test/using.test.js +9 -9
  78. package/dist/test/utils.d.ts +3 -0
  79. package/dist/test/utils.d.ts.map +1 -1
  80. package/dist/test/utils.js +15 -0
  81. package/dist/test/vitest.setup.d.ts +2 -0
  82. package/dist/test/vitest.setup.d.ts.map +1 -0
  83. package/dist/test/vitest.setup.js +1 -0
  84. package/dist/tsconfig.tsbuildinfo +1 -1
  85. package/package.json +8 -7
  86. package/src/components/{Class.tsx → ClassDeclaration.tsx} +84 -98
  87. package/src/components/ClassMethod.tsx +94 -0
  88. package/src/components/Declaration.tsx +5 -2
  89. package/src/components/EnumDeclaration.tsx +99 -0
  90. package/src/components/Namespace.tsx +2 -6
  91. package/src/components/Parameters.tsx +2 -3
  92. package/src/components/doc/comment.test.tsx +337 -0
  93. package/src/components/doc/comment.tsx +152 -0
  94. package/src/components/doc/from-markdown.test.tsx +103 -0
  95. package/src/components/doc/from-markdown.tsx +58 -0
  96. package/src/components/index.ts +7 -2
  97. package/src/components/interface/declaration.test.tsx +56 -0
  98. package/src/components/interface/declaration.tsx +109 -0
  99. package/src/components/interface/method.test.tsx +120 -0
  100. package/src/components/interface/method.tsx +82 -0
  101. package/src/components/interface/property.test.tsx +144 -0
  102. package/src/components/interface/property.tsx +90 -0
  103. package/src/components/stc/index.ts +2 -2
  104. package/src/modifiers.ts +32 -37
  105. package/src/name-policy.ts +2 -0
  106. package/src/symbols/csharp-output-symbol.ts +13 -18
  107. package/src/symbols/reference.ts +1 -1
  108. package/src/symbols/scopes.ts +15 -34
  109. package/temp/api.json +3470 -649
  110. package/test/{class.test.tsx → class-declaration.test.tsx} +103 -99
  111. package/test/class-method.test.tsx +147 -0
  112. package/test/enum.test.tsx +11 -11
  113. package/test/namespace.test.tsx +4 -4
  114. package/test/{projectdirectory.test.tsx → project-directory.test.tsx} +4 -4
  115. package/test/sourcefile.test.tsx +2 -2
  116. package/test/using.test.tsx +9 -9
  117. package/test/utils.tsx +9 -0
  118. package/test/vitest.setup.ts +1 -0
  119. package/tsconfig.json +2 -1
  120. package/tsdoc-metadata.json +1 -1
  121. package/vitest.config.ts +3 -0
  122. package/dist/src/components/Class.d.ts +0 -36
  123. package/dist/src/components/Class.d.ts.map +0 -1
  124. package/dist/src/components/Enum.d.ts +0 -15
  125. package/dist/src/components/Enum.d.ts.map +0 -1
  126. package/dist/test/class.test.d.ts +0 -2
  127. package/dist/test/class.test.d.ts.map +0 -1
  128. package/dist/test/projectdirectory.test.d.ts +0 -2
  129. package/dist/test/projectdirectory.test.d.ts.map +0 -1
  130. package/src/components/Enum.tsx +0 -78
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog - @alloy-js/csharp
2
2
 
3
+ ## 0.17.0
4
+
5
+ No changes, version bump only.
6
+
3
7
  ## 0.16.0
4
8
 
5
9
  No changes, version bump only.
@@ -0,0 +1,57 @@
1
+ import * as core from "@alloy-js/core";
2
+ import { AccessModifiers } from "../modifiers.js";
3
+ import { ParameterProps } from "./Parameters.jsx";
4
+ export interface ClassModifiers {
5
+ readonly abstract?: boolean;
6
+ readonly partial?: boolean;
7
+ readonly sealed?: boolean;
8
+ readonly static?: boolean;
9
+ }
10
+ export interface ClassDeclarationProps extends Omit<core.DeclarationProps, "nameKind">, AccessModifiers, ClassModifiers {
11
+ name: string;
12
+ /** Doc comment */
13
+ doc?: core.Children;
14
+ refkey?: core.Refkey;
15
+ typeParameters?: Record<string, core.Refkey>;
16
+ }
17
+ /**
18
+ * CSharp class declaration.
19
+ * @example
20
+ * ```tsx
21
+ * <ClassDeclaration public name="MyClass">
22
+ * <ClassMember public name="MyField" type="int" />
23
+ * <ClassConstructor>
24
+ * <Parameter name="value" type="int" />
25
+ * this.MyField = value;
26
+ * </ClassConstructor>
27
+ * </ClassDeclaration>
28
+ * ```
29
+ * This will produce:
30
+ * ```csharp
31
+ * public class MyClass
32
+ * {
33
+ * public int MyField;
34
+ * public MyClass(int value)
35
+ * {
36
+ * this.MyField = value;
37
+ * }
38
+ * }
39
+ * ```
40
+ */
41
+ export declare function ClassDeclaration(props: ClassDeclarationProps): core.Children;
42
+ export interface ClassConstructorProps extends AccessModifiers {
43
+ parameters?: Array<ParameterProps>;
44
+ refkey?: core.Refkey;
45
+ symbol?: core.OutputSymbol;
46
+ children?: core.Children;
47
+ }
48
+ export declare function ClassConstructor(props: ClassConstructorProps): core.Children;
49
+ export interface ClassMemberProps extends AccessModifiers {
50
+ name: string;
51
+ type: core.Children;
52
+ refkey?: core.Refkey;
53
+ /** Doc comment */
54
+ doc?: core.Children;
55
+ }
56
+ export declare function ClassMember(props: ClassMemberProps): core.Children;
57
+ //# sourceMappingURL=ClassDeclaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClassDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/ClassDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AACvC,OAAO,EACL,eAAe,EAIhB,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EAAE,cAAc,EAAc,MAAM,kBAAkB,CAAC;AAG9D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAUD,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,EAC7C,eAAe,EACf,cAAc;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB;IAClB,GAAG,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,iBAyD5D;AAED,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC;IAC3B,QAAQ,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;CAC1B;AAGD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,iBAkC5D;AAGD,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;IACrB,kBAAkB;IAClB,GAAG,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;CACrB;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,iBA0BlD"}
@@ -1,28 +1,53 @@
1
1
  import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic, memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
2
  import * as core from "@alloy-js/core";
3
- import { getAccessModifier, getMethodModifier } from "../modifiers.js";
3
+ import { computeModifiersPrefix, getAccessModifier, makeModifiers } from "../modifiers.js";
4
4
  import { useCSharpNamePolicy } from "../name-policy.js";
5
- import { createCSharpMemberScope, useCSharpScope } from "../symbols/scopes.js";
5
+ import { CSharpOutputSymbol } from "../symbols/csharp-output-symbol.js";
6
+ import { CSharpMemberScope, useCSharpScope } from "../symbols/scopes.js";
6
7
  import { Name } from "./Name.js";
7
8
  import { Parameters } from "./Parameters.js";
9
+ import { DocWhen } from "./doc/comment.js";
10
+ const getClassModifiers = makeModifiers(["abstract", "partial", "sealed", "static"]);
8
11
 
9
12
  // properties for creating a class
10
13
 
11
- // a C# class declaration
12
- export function Class(props) {
14
+ /**
15
+ * CSharp class declaration.
16
+ * @example
17
+ * ```tsx
18
+ * <ClassDeclaration public name="MyClass">
19
+ * <ClassMember public name="MyField" type="int" />
20
+ * <ClassConstructor>
21
+ * <Parameter name="value" type="int" />
22
+ * this.MyField = value;
23
+ * </ClassConstructor>
24
+ * </ClassDeclaration>
25
+ * ```
26
+ * This will produce:
27
+ * ```csharp
28
+ * public class MyClass
29
+ * {
30
+ * public int MyField;
31
+ * public MyClass(int value)
32
+ * {
33
+ * this.MyField = value;
34
+ * }
35
+ * }
36
+ * ```
37
+ */
38
+ export function ClassDeclaration(props) {
13
39
  const name = useCSharpNamePolicy().getName(props.name, "class");
14
- const scope = useCSharpScope();
15
- const thisClassSymbol = scope.binder.createSymbol({
16
- name,
17
- scope,
18
- refkey: props.refkey
40
+ const thisClassSymbol = new CSharpOutputSymbol(name, {
41
+ refkeys: props.refkey
19
42
  });
20
43
 
21
44
  // this creates a new scope for the class definition.
22
45
  // members will automatically "inherit" this scope so
23
46
  // that refkeys to them will produce the fully-qualified
24
47
  // name e.g. Foo.Bar.
25
- const thisClassScope = createCSharpMemberScope(scope.binder, scope, thisClassSymbol, "class-decl");
48
+ const thisClassScope = new CSharpMemberScope("class-decl", {
49
+ owner: thisClassSymbol
50
+ });
26
51
  let typeParams;
27
52
  if (props.typeParameters) {
28
53
  const typeParamNames = new Array();
@@ -30,10 +55,9 @@ export function Class(props) {
30
55
  typeParamNames.push(useCSharpNamePolicy().getName(entry[0], "type-parameter"));
31
56
  // create a symbol for each type param so its
32
57
  // refkey resolves to the type param's name
33
- scope.binder.createSymbol({
34
- name: entry[0],
58
+ new CSharpOutputSymbol(entry[0], {
35
59
  scope: thisClassScope,
36
- refkey: entry[1]
60
+ refkeys: entry[1]
37
61
  });
38
62
  }
39
63
  typeParams = _$createIntrinsic("group", {
@@ -47,10 +71,15 @@ export function Class(props) {
47
71
  }
48
72
  });
49
73
  }
74
+ const modifiers = computeModifiersPrefix([getAccessModifier(props), getClassModifiers(props)]);
50
75
  return _$createComponent(core.Declaration, {
51
76
  symbol: thisClassSymbol,
52
77
  get children() {
53
- return [_$memo(() => getAccessModifier(props.accessModifier)), "class ", _$createComponent(Name, {}), typeParams, _$memo(() => !props.children && ";"), _$memo(() => _$memo(() => !!props.children)() && _$createComponent(core.Block, {
78
+ return [_$createComponent(DocWhen, {
79
+ get doc() {
80
+ return props.doc;
81
+ }
82
+ }), modifiers, "class ", _$createComponent(Name, {}), typeParams, _$memo(() => !props.children && ";"), _$memo(() => _$memo(() => !!props.children)() && _$createComponent(core.Block, {
54
83
  newline: true,
55
84
  get children() {
56
85
  return _$createComponent(core.Scope, {
@@ -73,15 +102,16 @@ export function ClassConstructor(props) {
73
102
 
74
103
  // fetch the class name from the scope
75
104
  const name = useCSharpNamePolicy().getName(scope.owner.name, "class-method");
76
- const ctorSymbol = scope.binder.createSymbol({
77
- name: name,
105
+ const ctorSymbol = new CSharpOutputSymbol(name, {
78
106
  scope,
79
- refkey: props.refkey ?? core.refkey(name)
107
+ refkeys: props.refkey ?? core.refkey(name)
80
108
  });
81
109
 
82
110
  // scope for ctor declaration
83
- const ctorDeclScope = createCSharpMemberScope(scope.binder, scope, ctorSymbol, "constructor-decl");
84
- const accessModifier = getAccessModifier(props.accessModifier);
111
+ const ctorDeclScope = new CSharpMemberScope("constructor-decl", {
112
+ owner: ctorSymbol
113
+ });
114
+ const modifiers = computeModifiersPrefix([getAccessModifier(props)]);
85
115
  const params = props.parameters ? _$createComponent(Parameters, {
86
116
  get parameters() {
87
117
  return props.parameters;
@@ -95,7 +125,7 @@ export function ClassConstructor(props) {
95
125
  return _$createComponent(core.Scope, {
96
126
  value: ctorDeclScope,
97
127
  get children() {
98
- return [accessModifier, _$createComponent(Name, {}), "(", params, ")", _$createComponent(core.Block, {
128
+ return [modifiers, _$createComponent(Name, {}), "(", params, ")", _$createComponent(core.Block, {
99
129
  newline: true,
100
130
  get children() {
101
131
  return props.children;
@@ -112,7 +142,7 @@ export function ClassConstructor(props) {
112
142
  // a C# class member (i.e. a field within a class like "private int count")
113
143
  export function ClassMember(props) {
114
144
  let nameElement = "class-member-private";
115
- if (props.accessModifier === "public") {
145
+ if (props.public) {
116
146
  nameElement = "class-member-public";
117
147
  }
118
148
  const name = useCSharpNamePolicy().getName(props.name, nameElement);
@@ -120,60 +150,19 @@ export function ClassMember(props) {
120
150
  if (scope.kind !== "member" || scope.name !== "class-decl") {
121
151
  throw new Error("can't define a class member outside of a class-decl scope");
122
152
  }
123
- const memberSymbol = scope.binder.createSymbol({
124
- name: name,
153
+ const memberSymbol = new CSharpOutputSymbol(name, {
125
154
  scope,
126
- refkey: props.refkey ?? core.refkey(props.name)
155
+ refkeys: props.refkey ?? core.refkey(props.name)
127
156
  });
157
+ const modifiers = computeModifiersPrefix([getAccessModifier(props)]);
128
158
  return _$createComponent(core.Declaration, {
129
159
  symbol: memberSymbol,
130
160
  get children() {
131
- return [_$memo(() => getAccessModifier(props.accessModifier)), _$memo(() => props.type), " ", _$createComponent(Name, {})];
132
- }
133
- });
134
- }
135
-
136
- // properties for creating a method
137
-
138
- // a C# class method
139
- export function ClassMethod(props) {
140
- const name = useCSharpNamePolicy().getName(props.name, "class-method");
141
- const scope = useCSharpScope();
142
- if (scope.kind !== "member" || scope.name !== "class-decl") {
143
- throw new Error("can't define a class method outside of a class scope");
144
- }
145
- const methodSymbol = scope.binder.createSymbol({
146
- name: name,
147
- scope,
148
- refkey: props.refkey ?? core.refkey(props.name)
149
- });
150
-
151
- // scope for method declaration
152
- const methodScope = createCSharpMemberScope(scope.binder, scope, methodSymbol, "method-decl");
153
- const accessModifier = getAccessModifier(props.accessModifier);
154
- const methodModifier = getMethodModifier(props.methodModifier);
155
- const params = props.parameters ? _$createComponent(Parameters, {
156
- get parameters() {
157
- return props.parameters;
158
- }
159
- }) : "";
160
- const returns = props.returns ?? "void";
161
-
162
- // note that scope wraps the method decl so that the params get the correct scope
163
- return _$createComponent(core.Declaration, {
164
- symbol: methodSymbol,
165
- get children() {
166
- return _$createComponent(core.Scope, {
167
- value: methodScope,
168
- get children() {
169
- return [accessModifier, methodModifier, returns, " ", _$createComponent(Name, {}), "(", params, ")", _$createComponent(core.Block, {
170
- newline: true,
171
- get children() {
172
- return props.children;
173
- }
174
- })];
161
+ return [_$createComponent(DocWhen, {
162
+ get doc() {
163
+ return props.doc;
175
164
  }
176
- });
165
+ }), modifiers, _$memo(() => props.type), " ", _$createComponent(Name, {})];
177
166
  }
178
167
  });
179
168
  }
@@ -0,0 +1,25 @@
1
+ import { Children, Refkey } from "@alloy-js/core";
2
+ import { AccessModifiers } from "../modifiers.js";
3
+ import { ParameterProps } from "./Parameters.jsx";
4
+ /** Method modifiers. Can only be one. */
5
+ export interface ClassMethodModifiers {
6
+ readonly abstract?: boolean;
7
+ readonly sealed?: boolean;
8
+ readonly static?: boolean;
9
+ readonly virtual?: boolean;
10
+ }
11
+ export interface ClassMethodProps extends AccessModifiers, ClassMethodModifiers {
12
+ name: string;
13
+ refkey?: Refkey;
14
+ children?: Children;
15
+ parameters?: Array<ParameterProps>;
16
+ returns?: Children;
17
+ /**
18
+ * If true, the method will be declared as an async method.
19
+ */
20
+ async?: boolean;
21
+ /** Doc comment */
22
+ doc?: Children;
23
+ }
24
+ export declare function ClassMethod(props: ClassMethodProps): Children;
25
+ //# sourceMappingURL=ClassMethod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClassMethod.d.ts","sourceRoot":"","sources":["../../../src/components/ClassMethod.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAGR,MAAM,EAEP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,eAAe,EAKhB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAAE,cAAc,EAAc,MAAM,kBAAkB,CAAC;AAG9D,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAUD,MAAM,WAAW,gBACf,SAAQ,eAAe,EACrB,oBAAoB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,QAAQ,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,kBAAkB;IAClB,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YAqClD"}
@@ -0,0 +1,60 @@
1
+ import { createComponent as _$createComponent, memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
+ import { Block, MemberDeclaration, refkey, Scope } from "@alloy-js/core";
3
+ import { computeModifiersPrefix, getAccessModifier, getAsyncModifier, makeModifiers } from "../modifiers.js";
4
+ import { useCSharpNamePolicy } from "../name-policy.js";
5
+ import { CSharpOutputSymbol } from "../symbols/csharp-output-symbol.js";
6
+ import { CSharpMemberScope, useCSharpScope } from "../symbols/scopes.js";
7
+ import { Parameters } from "./Parameters.js";
8
+ import { DocWhen } from "./doc/comment.js";
9
+
10
+ /** Method modifiers. Can only be one. */
11
+
12
+ const getMethodModifier = makeModifiers(["abstract", "sealed", "static", "virtual"]);
13
+
14
+ // properties for creating a method
15
+
16
+ // a C# class method
17
+ export function ClassMethod(props) {
18
+ const name = useCSharpNamePolicy().getName(props.name, "class-method");
19
+ const scope = useCSharpScope();
20
+ if (scope.kind !== "member" || scope.name !== "class-decl") {
21
+ throw new Error("can't define a class method outside of a class scope");
22
+ }
23
+ const methodSymbol = new CSharpOutputSymbol(name, {
24
+ scope,
25
+ refkeys: props.refkey ?? refkey(props.name)
26
+ });
27
+
28
+ // scope for method declaration
29
+ const methodScope = new CSharpMemberScope("method-decl", {
30
+ owner: methodSymbol
31
+ });
32
+ const params = props.parameters ? _$createComponent(Parameters, {
33
+ get parameters() {
34
+ return props.parameters;
35
+ }
36
+ }) : "";
37
+ const returns = props.returns ?? (props.async ? "Task" : "void");
38
+ const modifiers = computeModifiersPrefix([getAccessModifier(props), getMethodModifier(props), getAsyncModifier(props.async)]);
39
+ // note that scope wraps the method decl so that the params get the correct scope
40
+ return _$createComponent(MemberDeclaration, {
41
+ symbol: methodSymbol,
42
+ get children() {
43
+ return _$createComponent(Scope, {
44
+ value: methodScope,
45
+ get children() {
46
+ return [_$createComponent(DocWhen, {
47
+ get doc() {
48
+ return props.doc;
49
+ }
50
+ }), modifiers, returns, " ", name, "(", params, ")", _$memo(() => _$memo(() => !!props.abstract)() ? ";" : _$createComponent(Block, {
51
+ newline: true,
52
+ get children() {
53
+ return props.children;
54
+ }
55
+ }))];
56
+ }
57
+ });
58
+ }
59
+ });
60
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"Declaration.d.ts","sourceRoot":"","sources":["../../../src/components/Declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAIvC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;CAC1B;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,iBAGlD"}
1
+ {"version":3,"file":"Declaration.d.ts","sourceRoot":"","sources":["../../../src/components/Declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAIvC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;CAC1B;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,iBAMlD"}
@@ -1,12 +1,14 @@
1
1
  import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
2
  import * as core from "@alloy-js/core";
3
- import { createCSharpSymbol } from "../symbols/csharp-output-symbol.js";
3
+ import { CSharpOutputSymbol } from "../symbols/csharp-output-symbol.js";
4
4
 
5
5
  // properties for creating a declaration
6
6
 
7
7
  // declares a symbol in the program (class, enum, interface etc)
8
8
  export function Declaration(props) {
9
- const sym = createCSharpSymbol(props);
9
+ const sym = new CSharpOutputSymbol(props.name, {
10
+ refkeys: props.refkey
11
+ });
10
12
  return _$createComponent(core.Declaration, {
11
13
  symbol: sym,
12
14
  get children() {
@@ -0,0 +1,34 @@
1
+ import * as core from "@alloy-js/core";
2
+ import { AccessModifiers } from "../modifiers.js";
3
+ export interface EnumDeclarationProps extends AccessModifiers {
4
+ name: string;
5
+ refkey?: core.Refkey;
6
+ children?: core.Children;
7
+ }
8
+ /**
9
+ * A C# enum declaration
10
+ * @example
11
+ * ```tsx
12
+ * <EnumDeclaration public name="Color">
13
+ * <EnumMember name="Red" />
14
+ * <EnumMember name="Green" />
15
+ * <EnumMember name="Blue" />
16
+ * </EnumDeclaration>
17
+ * ```
18
+ * This will produce:
19
+ * ```csharp
20
+ * public enum Color
21
+ * {
22
+ * Red,
23
+ * Green,
24
+ * Blue
25
+ * }
26
+ * ```
27
+ */
28
+ export declare function EnumDeclaration(props: EnumDeclarationProps): core.Children;
29
+ export interface EnumMemberProps {
30
+ name: string;
31
+ refkey?: core.Refkey;
32
+ }
33
+ export declare function EnumMember(props: EnumMemberProps): core.Children;
34
+ //# sourceMappingURL=EnumDeclaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnumDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/EnumDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AACvC,OAAO,EACL,eAAe,EAGhB,MAAM,iBAAiB,CAAC;AAOzB,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,iBAgC1D;AAGD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;CACtB;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,iBAmBhD"}
@@ -1,31 +1,54 @@
1
- import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
1
+ import { createComponent as _$createComponent, memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
2
  import * as core from "@alloy-js/core";
3
- import { getAccessModifier } from "../modifiers.js";
3
+ import { computeModifiersPrefix, getAccessModifier } from "../modifiers.js";
4
4
  import { useCSharpNamePolicy } from "../name-policy.js";
5
- import { createCSharpMemberScope, useCSharpScope } from "../symbols/scopes.js";
5
+ import { CSharpOutputSymbol } from "../symbols/csharp-output-symbol.js";
6
+ import { CSharpMemberScope, useCSharpScope } from "../symbols/scopes.js";
6
7
  import { Name } from "./Name.js";
7
8
 
8
9
  // properties for creating an enum
9
10
 
10
- // a C# enum declaration
11
- export function Enum(props) {
11
+ /**
12
+ * A C# enum declaration
13
+ * @example
14
+ * ```tsx
15
+ * <EnumDeclaration public name="Color">
16
+ * <EnumMember name="Red" />
17
+ * <EnumMember name="Green" />
18
+ * <EnumMember name="Blue" />
19
+ * </EnumDeclaration>
20
+ * ```
21
+ * This will produce:
22
+ * ```csharp
23
+ * public enum Color
24
+ * {
25
+ * Red,
26
+ * Green,
27
+ * Blue
28
+ * }
29
+ * ```
30
+ */
31
+ export function EnumDeclaration(props) {
12
32
  const name = useCSharpNamePolicy().getName(props.name, "enum");
13
33
  const scope = useCSharpScope();
14
- const thisEnumSymbol = scope.binder.createSymbol({
15
- name: name,
34
+ const thisEnumSymbol = new CSharpOutputSymbol(name, {
16
35
  scope,
17
- refkey: props.refkey ?? core.refkey(props.name)
36
+ refkeys: props.refkey ?? core.refkey(props.name)
18
37
  });
19
38
 
20
39
  // this creates a new scope for the enum definition.
21
40
  // members will automatically "inherit" this scope so
22
41
  // that refkeys to them will produce the fully-qualified
23
42
  // name e.g. Foo.Bar.
24
- const thisEnumScope = createCSharpMemberScope(scope.binder, scope, thisEnumSymbol, "enum-decl");
25
- return _$createComponent(core.Declaration, {
43
+ const thisEnumScope = new CSharpMemberScope("enum-decl", {
44
+ parent: scope,
45
+ owner: thisEnumSymbol
46
+ });
47
+ const modifiers = computeModifiersPrefix([getAccessModifier(props)]);
48
+ if (thisEnumScope.owner) return _$createComponent(core.Declaration, {
26
49
  symbol: thisEnumSymbol,
27
50
  get children() {
28
- return [_$memo(() => getAccessModifier(props.accessModifier)), "enum ", _$createComponent(Name, {}), _$memo(() => !props.children && ";"), _$memo(() => _$memo(() => !!props.children)() && _$createComponent(core.Scope, {
51
+ return [modifiers, "enum ", _$createComponent(Name, {}), _$memo(() => !props.children && ";"), _$memo(() => _$memo(() => !!props.children)() && _$createComponent(core.Scope, {
29
52
  value: thisEnumScope,
30
53
  get children() {
31
54
  return _$createComponent(core.Block, {
@@ -49,10 +72,9 @@ export function EnumMember(props) {
49
72
  throw new Error("can't define an enum member outside of an enum-decl scope");
50
73
  }
51
74
  const name = useCSharpNamePolicy().getName(props.name, "enum-member");
52
- const thisEnumValueSymbol = scope.binder.createSymbol({
53
- name: name,
75
+ const thisEnumValueSymbol = new CSharpOutputSymbol(name, {
54
76
  scope,
55
- refkey: props.refkey ?? core.refkey(props.name)
77
+ refkeys: props.refkey ?? core.refkey(props.name)
56
78
  });
57
79
  return _$createComponent(core.Declaration, {
58
80
  symbol: thisEnumValueSymbol,
@@ -1 +1 @@
1
- {"version":3,"file":"Namespace.d.ts","sourceRoot":"","sources":["../../../src/components/Namespace.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAIvC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAKD,wBAAgB,YAAY,IAAI,gBAAgB,GAAG,SAAS,CAE3D;AAGD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;CAC1B;AAGD,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,iBAgB9C"}
1
+ {"version":3,"file":"Namespace.d.ts","sourceRoot":"","sources":["../../../src/components/Namespace.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAIvC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAKD,wBAAgB,YAAY,IAAI,gBAAgB,GAAG,SAAS,CAE3D;AAGD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;CAC1B;AAGD,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,iBAY9C"}
@@ -1,6 +1,6 @@
1
1
  import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
2
  import * as core from "@alloy-js/core";
3
- import { createCSharpNamespaceScope } from "../symbols/scopes.js";
3
+ import { CSharpNamespaceScope } from "../symbols/scopes.js";
4
4
 
5
5
  // contains the info for the current namespace
6
6
 
@@ -15,7 +15,7 @@ export function useNamespace() {
15
15
 
16
16
  // a C# namespace. contains one or more source files
17
17
  export function Namespace(props) {
18
- const scope = createCSharpNamespaceScope(core.useBinder(), core.useScope(), props.name);
18
+ const scope = new CSharpNamespaceScope(props.name);
19
19
  const namespaceCtx = {
20
20
  name: props.name
21
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Parameters.d.ts","sourceRoot":"","sources":["../../../src/components/Parameters.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAMvC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC;CAC5B;AAGD,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,iBAuB9C;AAED,MAAM,WAAW,eAAe;IAE9B,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;CACnC;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,iBAMhD"}
1
+ {"version":3,"file":"Parameters.d.ts","sourceRoot":"","sources":["../../../src/components/Parameters.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAMvC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC;CAC5B;AAGD,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,iBAsB9C;AAED,MAAM,WAAW,eAAe;IAE9B,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;CACnC;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,iBAMhD"}
@@ -1,6 +1,7 @@
1
1
  import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
2
  import * as core from "@alloy-js/core";
3
3
  import { useCSharpNamePolicy } from "../name-policy.js";
4
+ import { CSharpOutputSymbol } from "../symbols/csharp-output-symbol.js";
4
5
  import { useCSharpScope } from "../symbols/scopes.js";
5
6
  import { Name } from "./Name.js";
6
7
  // a constructor/method parameter
@@ -10,10 +11,9 @@ export function Parameter(props) {
10
11
  if (scope.kind !== "member" || scope.name !== "constructor-decl" && scope.name !== "method-decl") {
11
12
  throw new Error("can't define a parameter outside of a constructor-decl or method-decl scope");
12
13
  }
13
- const memberSymbol = scope.binder.createSymbol({
14
- name: name,
14
+ const memberSymbol = new CSharpOutputSymbol(name, {
15
15
  scope,
16
- refkey: props.refkey ?? core.refkey(props.name)
16
+ refkeys: props.refkey ?? core.refkey(props.name)
17
17
  });
18
18
  return _$createComponent(core.Declaration, {
19
19
  symbol: memberSymbol,
@@ -0,0 +1,70 @@
1
+ import { Children } from "@alloy-js/core";
2
+ export interface DocCommentProps {
3
+ children: Children;
4
+ }
5
+ export declare function DocComment(props: DocCommentProps): Children;
6
+ export interface DocWhenProps {
7
+ doc: Children | undefined;
8
+ }
9
+ /** Conditionally render the given doc in a <DocComment /> component and tail with a line */
10
+ export declare function DocWhen(props: DocWhenProps): Children;
11
+ export interface DocCommentTagProps {
12
+ children: Children;
13
+ }
14
+ export declare function makeDocCommentTag(name: string): (props: DocCommentProps) => Children;
15
+ export declare function makeInlineDocCommentTag(name: string): (props: DocCommentProps) => string;
16
+ export declare const DocSummary: (props: DocCommentProps) => Children;
17
+ export declare const DocCode: (props: DocCommentProps) => Children;
18
+ export declare const DocC: (props: DocCommentProps) => string;
19
+ export declare const DocExample: (props: DocCommentProps) => Children;
20
+ export declare const DocException: (props: DocCommentProps) => Children;
21
+ export interface DocIncludeProps {
22
+ /** is the file name of an external XML file. The file name is interpreted relative to the file that contains the include tag. */
23
+ file: string;
24
+ /** is an XPath expression that selects some of the XML in the external XML file. */
25
+ path?: string;
26
+ }
27
+ export declare const DocInclude: (props: DocIncludeProps) => string;
28
+ export interface DocParamProps {
29
+ name: string;
30
+ children: Children;
31
+ }
32
+ export declare const DocParam: (props: DocParamProps) => Children;
33
+ export interface DocTypeParamProps {
34
+ name: string;
35
+ children: Children;
36
+ }
37
+ export declare const DocTypeParam: (props: DocTypeParamProps) => Children;
38
+ export declare const DocReturns: (props: DocCommentProps) => Children;
39
+ export declare const DocRemarks: (props: DocCommentProps) => Children;
40
+ export declare const DocValue: (props: DocCommentProps) => Children;
41
+ export declare const DocPermission: (props: DocCommentProps) => Children;
42
+ export declare const DocDescription: (props: DocCommentProps) => Children;
43
+ export declare const DocPara: (props: DocCommentProps) => Children;
44
+ export interface DocSeeProps {
45
+ cref?: string;
46
+ href?: string;
47
+ langword?: string;
48
+ children?: Children;
49
+ }
50
+ export declare const DocSee: (props: DocSeeProps) => Children;
51
+ export interface DocSeeAlsoProps {
52
+ cref?: string;
53
+ href?: string;
54
+ children?: Children;
55
+ }
56
+ export declare const DocSeeAlso: (props: DocSeeAlsoProps) => Children;
57
+ export interface DocParamRefProps {
58
+ name: string;
59
+ }
60
+ export declare const DocParamRef: (props: DocParamRefProps) => string;
61
+ export interface DocTypeParamRefProps {
62
+ name: string;
63
+ }
64
+ export declare const DocTypeParamRef: (props: DocTypeParamRefProps) => string;
65
+ export interface DocListProps {
66
+ type?: "bullet" | "number";
67
+ items: Children[];
68
+ }
69
+ export declare function DocList(props: DocListProps): Children;
70
+ //# sourceMappingURL=comment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../src/components/doc/comment.tsx"],"names":[],"mappings":"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"}