@alloy-js/typescript 0.1.0

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 (251) hide show
  1. package/LICENSE.txt +7 -0
  2. package/api-extractor.json +4 -0
  3. package/babel.config.cjs +4 -0
  4. package/dist/src/builtins/index.d.ts +2 -0
  5. package/dist/src/builtins/index.d.ts.map +1 -0
  6. package/dist/src/builtins/index.js +1 -0
  7. package/dist/src/builtins/index.js.map +1 -0
  8. package/dist/src/builtins/node.d.ts +183 -0
  9. package/dist/src/builtins/node.d.ts.map +1 -0
  10. package/dist/src/builtins/node.js +39 -0
  11. package/dist/src/builtins/node.js.map +1 -0
  12. package/dist/src/components/ArrayExpression.d.ts +7 -0
  13. package/dist/src/components/ArrayExpression.d.ts.map +1 -0
  14. package/dist/src/components/ArrayExpression.js +37 -0
  15. package/dist/src/components/ArrayExpression.js.map +1 -0
  16. package/dist/src/components/BarrelFile.d.ts +49 -0
  17. package/dist/src/components/BarrelFile.d.ts.map +1 -0
  18. package/dist/src/components/BarrelFile.js +73 -0
  19. package/dist/src/components/BarrelFile.js.map +1 -0
  20. package/dist/src/components/Block.d.ts +6 -0
  21. package/dist/src/components/Block.d.ts.map +1 -0
  22. package/dist/src/components/Block.js +11 -0
  23. package/dist/src/components/Block.js.map +1 -0
  24. package/dist/src/components/ClassDeclaration.d.ts +64 -0
  25. package/dist/src/components/ClassDeclaration.d.ts.map +1 -0
  26. package/dist/src/components/ClassDeclaration.js +122 -0
  27. package/dist/src/components/ClassDeclaration.js.map +1 -0
  28. package/dist/src/components/Declaration.d.ts +53 -0
  29. package/dist/src/components/Declaration.d.ts.map +1 -0
  30. package/dist/src/components/Declaration.js +60 -0
  31. package/dist/src/components/Declaration.js.map +1 -0
  32. package/dist/src/components/EnumDeclaration.d.ts +12 -0
  33. package/dist/src/components/EnumDeclaration.d.ts.map +1 -0
  34. package/dist/src/components/EnumDeclaration.js +48 -0
  35. package/dist/src/components/EnumDeclaration.js.map +1 -0
  36. package/dist/src/components/EnumMember.d.ts +28 -0
  37. package/dist/src/components/EnumMember.d.ts.map +1 -0
  38. package/dist/src/components/EnumMember.js +28 -0
  39. package/dist/src/components/EnumMember.js.map +1 -0
  40. package/dist/src/components/ExportStatement.d.ts +7 -0
  41. package/dist/src/components/ExportStatement.d.ts.map +1 -0
  42. package/dist/src/components/ExportStatement.js +15 -0
  43. package/dist/src/components/ExportStatement.js.map +1 -0
  44. package/dist/src/components/FunctionCallExpression.d.ts +7 -0
  45. package/dist/src/components/FunctionCallExpression.d.ts.map +1 -0
  46. package/dist/src/components/FunctionCallExpression.js +14 -0
  47. package/dist/src/components/FunctionCallExpression.js.map +1 -0
  48. package/dist/src/components/FunctionDeclaration.d.ts +29 -0
  49. package/dist/src/components/FunctionDeclaration.d.ts.map +1 -0
  50. package/dist/src/components/FunctionDeclaration.js +91 -0
  51. package/dist/src/components/FunctionDeclaration.js.map +1 -0
  52. package/dist/src/components/ImportStatement.d.ts +11 -0
  53. package/dist/src/components/ImportStatement.d.ts.map +1 -0
  54. package/dist/src/components/ImportStatement.js +92 -0
  55. package/dist/src/components/ImportStatement.js.map +1 -0
  56. package/dist/src/components/Interface.d.ts +32 -0
  57. package/dist/src/components/Interface.d.ts.map +1 -0
  58. package/dist/src/components/Interface.js +50 -0
  59. package/dist/src/components/Interface.js.map +1 -0
  60. package/dist/src/components/ObjectExpression.d.ts +16 -0
  61. package/dist/src/components/ObjectExpression.d.ts.map +1 -0
  62. package/dist/src/components/ObjectExpression.js +101 -0
  63. package/dist/src/components/ObjectExpression.js.map +1 -0
  64. package/dist/src/components/PackageDirectory.d.ts +23 -0
  65. package/dist/src/components/PackageDirectory.d.ts.map +1 -0
  66. package/dist/src/components/PackageDirectory.js +62 -0
  67. package/dist/src/components/PackageDirectory.js.map +1 -0
  68. package/dist/src/components/PackageJson.d.ts +16 -0
  69. package/dist/src/components/PackageJson.d.ts.map +1 -0
  70. package/dist/src/components/PackageJson.js +36 -0
  71. package/dist/src/components/PackageJson.js.map +1 -0
  72. package/dist/src/components/Reference.d.ts +6 -0
  73. package/dist/src/components/Reference.d.ts.map +1 -0
  74. package/dist/src/components/Reference.js +8 -0
  75. package/dist/src/components/Reference.js.map +1 -0
  76. package/dist/src/components/SourceFile.d.ts +15 -0
  77. package/dist/src/components/SourceFile.d.ts.map +1 -0
  78. package/dist/src/components/SourceFile.js +62 -0
  79. package/dist/src/components/SourceFile.js.map +1 -0
  80. package/dist/src/components/TsConfigJson.d.ts +5 -0
  81. package/dist/src/components/TsConfigJson.d.ts.map +1 -0
  82. package/dist/src/components/TsConfigJson.js +53 -0
  83. package/dist/src/components/TsConfigJson.js.map +1 -0
  84. package/dist/src/components/TypeDeclaration.d.ts +5 -0
  85. package/dist/src/components/TypeDeclaration.d.ts.map +1 -0
  86. package/dist/src/components/TypeDeclaration.js +14 -0
  87. package/dist/src/components/TypeDeclaration.js.map +1 -0
  88. package/dist/src/components/ValueExpression.d.ts +5 -0
  89. package/dist/src/components/ValueExpression.d.ts.map +1 -0
  90. package/dist/src/components/ValueExpression.js +32 -0
  91. package/dist/src/components/ValueExpression.js.map +1 -0
  92. package/dist/src/components/VarDeclaration.d.ts +11 -0
  93. package/dist/src/components/VarDeclaration.d.ts.map +1 -0
  94. package/dist/src/components/VarDeclaration.js +29 -0
  95. package/dist/src/components/VarDeclaration.js.map +1 -0
  96. package/dist/src/components/index.d.ts +22 -0
  97. package/dist/src/components/index.d.ts.map +1 -0
  98. package/dist/src/components/index.js +22 -0
  99. package/dist/src/components/index.js.map +1 -0
  100. package/dist/src/components/stc/index.d.ts +102 -0
  101. package/dist/src/components/stc/index.d.ts.map +1 -0
  102. package/dist/src/components/stc/index.js +28 -0
  103. package/dist/src/components/stc/index.js.map +1 -0
  104. package/dist/src/create-package.d.ts +33 -0
  105. package/dist/src/create-package.d.ts.map +1 -0
  106. package/dist/src/create-package.js +50 -0
  107. package/dist/src/create-package.js.map +1 -0
  108. package/dist/src/index.d.ts +7 -0
  109. package/dist/src/index.d.ts.map +1 -0
  110. package/dist/src/index.js +7 -0
  111. package/dist/src/index.js.map +1 -0
  112. package/dist/src/name-conflict-resolver.d.ts +3 -0
  113. package/dist/src/name-conflict-resolver.d.ts.map +1 -0
  114. package/dist/src/name-conflict-resolver.js +15 -0
  115. package/dist/src/name-conflict-resolver.js.map +1 -0
  116. package/dist/src/name-policy.d.ts +5 -0
  117. package/dist/src/name-policy.d.ts.map +1 -0
  118. package/dist/src/name-policy.js +23 -0
  119. package/dist/src/name-policy.js.map +1 -0
  120. package/dist/src/source-directory-data.d.ts +7 -0
  121. package/dist/src/source-directory-data.d.ts.map +1 -0
  122. package/dist/src/source-directory-data.js +13 -0
  123. package/dist/src/source-directory-data.js.map +1 -0
  124. package/dist/src/symbols/index.d.ts +7 -0
  125. package/dist/src/symbols/index.d.ts.map +1 -0
  126. package/dist/src/symbols/index.js +7 -0
  127. package/dist/src/symbols/index.js.map +1 -0
  128. package/dist/src/symbols/reference.d.ts +3 -0
  129. package/dist/src/symbols/reference.d.ts.map +1 -0
  130. package/dist/src/symbols/reference.js +75 -0
  131. package/dist/src/symbols/reference.js.map +1 -0
  132. package/dist/src/symbols/scopes.d.ts +16 -0
  133. package/dist/src/symbols/scopes.d.ts.map +1 -0
  134. package/dist/src/symbols/scopes.js +5 -0
  135. package/dist/src/symbols/scopes.js.map +1 -0
  136. package/dist/src/symbols/ts-member-scope.d.ts +9 -0
  137. package/dist/src/symbols/ts-member-scope.d.ts.map +1 -0
  138. package/dist/src/symbols/ts-member-scope.js +10 -0
  139. package/dist/src/symbols/ts-member-scope.js.map +1 -0
  140. package/dist/src/symbols/ts-module-scope.d.ts +19 -0
  141. package/dist/src/symbols/ts-module-scope.d.ts.map +1 -0
  142. package/dist/src/symbols/ts-module-scope.js +36 -0
  143. package/dist/src/symbols/ts-module-scope.js.map +1 -0
  144. package/dist/src/symbols/ts-output-symbol.d.ts +28 -0
  145. package/dist/src/symbols/ts-output-symbol.d.ts.map +1 -0
  146. package/dist/src/symbols/ts-output-symbol.js +30 -0
  147. package/dist/src/symbols/ts-output-symbol.js.map +1 -0
  148. package/dist/src/symbols/ts-package-scope.d.ts +54 -0
  149. package/dist/src/symbols/ts-package-scope.d.ts.map +1 -0
  150. package/dist/src/symbols/ts-package-scope.js +40 -0
  151. package/dist/src/symbols/ts-package-scope.js.map +1 -0
  152. package/dist/src/utils.d.ts +2 -0
  153. package/dist/src/utils.d.ts.map +1 -0
  154. package/dist/src/utils.js +7 -0
  155. package/dist/src/utils.js.map +1 -0
  156. package/dist/test/array.test.d.ts +2 -0
  157. package/dist/test/array.test.d.ts.map +1 -0
  158. package/dist/test/barrel.test.d.ts +2 -0
  159. package/dist/test/barrel.test.d.ts.map +1 -0
  160. package/dist/test/basic.test.d.ts +2 -0
  161. package/dist/test/basic.test.d.ts.map +1 -0
  162. package/dist/test/class.test.d.ts +2 -0
  163. package/dist/test/class.test.d.ts.map +1 -0
  164. package/dist/test/enum.test.d.ts +2 -0
  165. package/dist/test/enum.test.d.ts.map +1 -0
  166. package/dist/test/externals.test.d.ts +2 -0
  167. package/dist/test/externals.test.d.ts.map +1 -0
  168. package/dist/test/function-call-expression.test.d.ts +2 -0
  169. package/dist/test/function-call-expression.test.d.ts.map +1 -0
  170. package/dist/test/function-declaration.test.d.ts +2 -0
  171. package/dist/test/function-declaration.test.d.ts.map +1 -0
  172. package/dist/test/imports.test.d.ts +2 -0
  173. package/dist/test/imports.test.d.ts.map +1 -0
  174. package/dist/test/interface.test.d.ts +2 -0
  175. package/dist/test/interface.test.d.ts.map +1 -0
  176. package/dist/test/name-policy.test.d.ts +2 -0
  177. package/dist/test/name-policy.test.d.ts.map +1 -0
  178. package/dist/test/package-external.test.d.ts +2 -0
  179. package/dist/test/package-external.test.d.ts.map +1 -0
  180. package/dist/test/package.test.d.ts +2 -0
  181. package/dist/test/package.test.d.ts.map +1 -0
  182. package/dist/test/reference.test.d.ts +2 -0
  183. package/dist/test/reference.test.d.ts.map +1 -0
  184. package/dist/test/utils.d.ts +5 -0
  185. package/dist/test/utils.d.ts.map +1 -0
  186. package/dist/test/values.test.d.ts +2 -0
  187. package/dist/test/values.test.d.ts.map +1 -0
  188. package/dist/test/var-declaration.test.d.ts +2 -0
  189. package/dist/test/var-declaration.test.d.ts.map +1 -0
  190. package/dist/tsconfig.tsbuildinfo +1 -0
  191. package/package.json +49 -0
  192. package/src/builtins/index.ts +1 -0
  193. package/src/builtins/node.ts +219 -0
  194. package/src/components/ArrayExpression.tsx +41 -0
  195. package/src/components/BarrelFile.tsx +96 -0
  196. package/src/components/Block.tsx +12 -0
  197. package/src/components/ClassDeclaration.tsx +145 -0
  198. package/src/components/Declaration.tsx +105 -0
  199. package/src/components/EnumDeclaration.tsx +53 -0
  200. package/src/components/EnumMember.tsx +52 -0
  201. package/src/components/ExportStatement.tsx +21 -0
  202. package/src/components/FunctionCallExpression.tsx +15 -0
  203. package/src/components/FunctionDeclaration.tsx +132 -0
  204. package/src/components/ImportStatement.tsx +131 -0
  205. package/src/components/Interface.tsx +62 -0
  206. package/src/components/ObjectExpression.tsx +130 -0
  207. package/src/components/PackageDirectory.tsx +104 -0
  208. package/src/components/PackageJson.tsx +69 -0
  209. package/src/components/Reference.tsx +12 -0
  210. package/src/components/SourceFile.tsx +71 -0
  211. package/src/components/TsConfigJson.tsx +62 -0
  212. package/src/components/TypeDeclaration.tsx +10 -0
  213. package/src/components/ValueExpression.tsx +32 -0
  214. package/src/components/VarDeclaration.tsx +42 -0
  215. package/src/components/index.ts +21 -0
  216. package/src/components/stc/index.ts +28 -0
  217. package/src/create-package.ts +108 -0
  218. package/src/index.ts +6 -0
  219. package/src/name-conflict-resolver.ts +22 -0
  220. package/src/name-policy.ts +39 -0
  221. package/src/source-directory-data.ts +25 -0
  222. package/src/symbols/index.ts +6 -0
  223. package/src/symbols/reference.ts +120 -0
  224. package/src/symbols/scopes.ts +28 -0
  225. package/src/symbols/ts-member-scope.ts +23 -0
  226. package/src/symbols/ts-module-scope.ts +66 -0
  227. package/src/symbols/ts-output-symbol.ts +63 -0
  228. package/src/symbols/ts-package-scope.ts +112 -0
  229. package/src/utils.ts +7 -0
  230. package/temp/api.json +9866 -0
  231. package/test/array.test.tsx +14 -0
  232. package/test/barrel.test.tsx +46 -0
  233. package/test/basic.test.tsx +78 -0
  234. package/test/class.test.tsx +181 -0
  235. package/test/enum.test.tsx +132 -0
  236. package/test/externals.test.tsx +139 -0
  237. package/test/function-call-expression.test.tsx +49 -0
  238. package/test/function-declaration.test.tsx +201 -0
  239. package/test/imports.test.tsx +213 -0
  240. package/test/interface.test.tsx +124 -0
  241. package/test/name-policy.test.tsx +62 -0
  242. package/test/package-external.test.tsx +75 -0
  243. package/test/package.test.tsx +68 -0
  244. package/test/reference.test.tsx +59 -0
  245. package/test/utils.tsx +59 -0
  246. package/test/values.test.tsx +292 -0
  247. package/test/var-declaration.test.tsx +45 -0
  248. package/test/vitest.d.ts +10 -0
  249. package/tsconfig.json +11 -0
  250. package/tsdoc-metadata.json +11 -0
  251. package/vitest.config.ts +18 -0
@@ -0,0 +1,122 @@
1
+ import { mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
2
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
3
+ import { Indent as _$Indent } from "@alloy-js/core";
4
+ import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
5
+ import { MemberDeclaration, MemberName, Name, OutputSymbolFlags, Scope } from "@alloy-js/core";
6
+ import { useTSNamePolicy } from "../name-policy.js";
7
+ import { createTSSymbol } from "../symbols/ts-output-symbol.js";
8
+ import { Declaration } from "./Declaration.js";
9
+ import { FunctionDeclaration } from "./FunctionDeclaration.js";
10
+ /**
11
+ * Create a TypeScript class declaration.
12
+ *
13
+ * @remarks
14
+ *
15
+ * @example
16
+ *
17
+ * ```tsx
18
+ * const myPetRefkey = refkey();
19
+ * const Animal = refkey();
20
+ * const staticMember = refkey();
21
+ * const instanceMember = refkey();
22
+ *
23
+ * <ClassDeclaration name="Animal" refkey={Animal}>
24
+ * <ClassMember public static name="something" type="string" refkey={staticMember}>
25
+ * "hello"
26
+ * </ClassMember>
27
+ * <ClassMember public name="kind" type="string" />
28
+ * <ClassMember public name="name" type="string" refkey={instanceMember} />
29
+ * <ClassConstructor parameters="name: string">
30
+ * this.name = name;
31
+ * </ClassConstructor>
32
+ * </ClassDeclaration>
33
+ *
34
+ * <VarDeclaration const name="myPet" refkey={myPetRefkey}>
35
+ * new {Animal}();
36
+ * </VarDeclaration>
37
+ *
38
+ * {staticMember}; // Animal.something
39
+ * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name
40
+ * {member(myPetRefkey, instanceMember)} // other option?
41
+ * ```
42
+ */
43
+ export function ClassDeclaration(props) {
44
+ const extendsPart = props.extends && [" extends ", _$memo(() => props.extends)];
45
+ const flags = OutputSymbolFlags.MemberContainer;
46
+ return _$createComponent(Declaration, _$mergeProps(props, {
47
+ flags: flags,
48
+ nameKind: "class",
49
+ get children() {
50
+ return ["class ", _$createComponent(Name, {}), extendsPart, " ", "{", _$createComponent(_$Indent, {
51
+ get children() {
52
+ return ["\n", _$memo(() => props.children)];
53
+ }
54
+ }), "\n", "}"];
55
+ }
56
+ }));
57
+ }
58
+ export function ClassMember(props) {
59
+ let sym;
60
+ const namer = useTSNamePolicy();
61
+ let name = namer.getName(props.name, "class-member-data");
62
+ if (props.refkey) {
63
+ let flags = OutputSymbolFlags.None;
64
+ if (props.static) {
65
+ flags |= OutputSymbolFlags.StaticMember;
66
+ } else {
67
+ flags |= OutputSymbolFlags.InstanceMember;
68
+ }
69
+ sym = createTSSymbol({
70
+ name: props.jsPrivate ? `#${name}` : name,
71
+ refkey: props.refkey,
72
+ flags
73
+ });
74
+ } else if (props.jsPrivate) {
75
+ // we won't be using the symbol name, so munge the name
76
+ name = `#${name}`;
77
+ }
78
+ return _$createComponent(MemberDeclaration, {
79
+ symbol: sym,
80
+ name: name,
81
+ get refkey() {
82
+ return props.refkey;
83
+ },
84
+ get children() {
85
+ return [_$memo(() => props.public && "public "), _$memo(() => props.private && "private "), _$memo(() => props.protected && "protected "), _$memo(() => props.static && "static "), _$memo(() => props.children)];
86
+ }
87
+ });
88
+ }
89
+ export function ClassField(props) {
90
+ const typeSection = props.type && [": ", _$memo(() => props.type)];
91
+ const initializerSection = props.children && [" = ", _$memo(() => props.children)];
92
+ return _$createComponent(ClassMember, _$mergeProps(props, {
93
+ get children() {
94
+ return [_$createComponent(MemberName, {}), typeSection, initializerSection, ";"];
95
+ }
96
+ }));
97
+ }
98
+ export function ClassMethod(props) {
99
+ const returnType = props.returnType && [": ", _$memo(() => props.returnType)];
100
+ return _$createComponent(ClassMember, _$mergeProps(props, {
101
+ get children() {
102
+ return [_$memo(() => props.async && "async "), _$createComponent(MemberName, {}), _$createComponent(Scope, {
103
+ get name() {
104
+ return props.name;
105
+ },
106
+ kind: "function",
107
+ get children() {
108
+ return ["(", _$createComponent(FunctionDeclaration.Parameters, {
109
+ get parameters() {
110
+ return props.parameters;
111
+ }
112
+ }), ")", returnType, " ", "{", _$createComponent(_$Indent, {
113
+ get children() {
114
+ return ["\n", _$memo(() => props.children)];
115
+ }
116
+ }), "\n", "}"];
117
+ }
118
+ })];
119
+ }
120
+ }));
121
+ }
122
+ //# sourceMappingURL=ClassDeclaration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClassDeclaration.js","names":["MemberDeclaration","MemberName","Name","OutputSymbolFlags","Scope","useTSNamePolicy","createTSSymbol","Declaration","FunctionDeclaration","ClassDeclaration","props","extendsPart","extends","_$memo","flags","MemberContainer","_$createComponent","_$mergeProps","nameKind","children","_$Indent","ClassMember","sym","namer","name","getName","refkey","None","static","StaticMember","InstanceMember","jsPrivate","symbol","public","private","protected","ClassField","typeSection","type","initializerSection","ClassMethod","returnType","async","kind","Parameters","parameters"],"sources":["../../../src/components/ClassDeclaration.tsx"],"sourcesContent":[null],"mappings":";;;;AAAA,SAEEA,iBAAiB,EACjBC,UAAU,EACVC,IAAI,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AG/B,KAAK,CAAC+B,UAAU,WAAA5B,MAAA,OAASH,KAAK,CAAC+B,UAAU,EAAI;EAChE,OAAAzB,iBAAA,CAAQK,WAAW,EAAAJ,YAAA,CAAKP,KAAK;IAAA,IAAAS,SAAA;MAAA,QAAAN,MAAA,OAEzBH,KAAK,CAACgC,KAAK,IAAI,QAAQ,GAAA1B,iBAAA,CACvBf,UAAU,OAAAe,iBAAA,CAAIZ,KAAK;QAAA,IAACoB,IAAIA,CAAA;UAAA,OAAEd,KAAK,CAACc,IAAI;QAAA;QAAEmB,IAAI;QAAA,IAAAxB,SAAA;UAAA,aAAAH,iBAAA,CACxCR,mBAAmB,CAACoC,UAAU;YAAA,IAACC,UAAUA,CAAA;cAAA,OAAEnC,KAAK,CAACmC,UAAU;YAAA;UAAA,SAAMJ,UAAU,OAAG,GAAG,EAAAzB,iBAAA,CAAAI,QAAA;YAAA,IAAAD,SAAA;cAAA,cAAAN,MAAA,OAChFH,KAAK,CAACS,QAAQ;YAAA;UAAA,UAChB,GAAG;QAAA;MAAA;IAAA;EAAA;AAGV","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ import { Children, OutputSymbolFlags, Refkey } from "@alloy-js/core";
2
+ import { TypeScriptElements } from "../name-policy.js";
3
+ export interface BaseDeclarationProps {
4
+ /**
5
+ * The base name of this declaration. May change depending on naming policy
6
+ * and any conflicts.
7
+ */
8
+ name: string;
9
+ /**
10
+ * The unique key for this declaration.
11
+ */
12
+ refkey?: Refkey;
13
+ /**
14
+ * Whether to export this declaration from the module.
15
+ */
16
+ export?: boolean;
17
+ /**
18
+ * Whether this is the default export of the module.
19
+ */
20
+ default?: boolean;
21
+ /**
22
+ * Flags for the symbol created by this component.
23
+ */
24
+ flags?: OutputSymbolFlags;
25
+ children?: Children;
26
+ /**
27
+ * Whether this is a declaration of a type (e.g. interface, type alias) or a
28
+ * value (e.g. var, const, let).
29
+ */
30
+ kind?: "type" | "value";
31
+ }
32
+ export interface DeclarationProps extends BaseDeclarationProps {
33
+ /**
34
+ * The name policy kind to apply to the declaration.
35
+ */
36
+ nameKind: TypeScriptElements;
37
+ }
38
+ /**
39
+ * Create a TypeScript declaration. Generally, this component shouldn't be used
40
+ * directly, and instead prefer components for specific declarations, e.g.
41
+ * {@link EnumDeclaration}, {@link InterfaceDeclaration},
42
+ * {@link TypeDeclaration}, etc.
43
+ *
44
+ * @remarks
45
+ *
46
+ * This component will wrap its contents in a {@link @alloy-js/core#Declaration} component,
47
+ * so children can make use of declaration context. Additionally, if the
48
+ * provided symbol flags have {@link @alloy-js/core#OutputSymbolFlags.MemberContainer}, this
49
+ * component will create a {@link @alloy-js/core#MemberScope}.
50
+ *
51
+ */
52
+ export declare function Declaration(props: DeclarationProps): any;
53
+ //# sourceMappingURL=Declaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Declaration.d.ts","sourceRoot":"","sources":["../../../src/components/Declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAGR,iBAAiB,EAEjB,MAAM,EACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAmB,MAAM,mBAAmB,CAAC;AAWxE,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAE1B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D;;OAEG;IACH,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,OA4BlD"}
@@ -0,0 +1,60 @@
1
+ import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
3
+ import { Declaration as CoreDeclaration, MemberScope, OutputSymbolFlags, refkey } from "@alloy-js/core";
4
+ import { useTSNamePolicy } from "../name-policy.js";
5
+ import { createTSSymbol, TSSymbolFlags } from "../symbols/index.js";
6
+
7
+ // imports for documentation
8
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
9
+
10
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11
+
12
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
+
14
+ /**
15
+ * Create a TypeScript declaration. Generally, this component shouldn't be used
16
+ * directly, and instead prefer components for specific declarations, e.g.
17
+ * {@link EnumDeclaration}, {@link InterfaceDeclaration},
18
+ * {@link TypeDeclaration}, etc.
19
+ *
20
+ * @remarks
21
+ *
22
+ * This component will wrap its contents in a {@link @alloy-js/core#Declaration} component,
23
+ * so children can make use of declaration context. Additionally, if the
24
+ * provided symbol flags have {@link @alloy-js/core#OutputSymbolFlags.MemberContainer}, this
25
+ * component will create a {@link @alloy-js/core#MemberScope}.
26
+ *
27
+ */
28
+ export function Declaration(props) {
29
+ const namePolicy = useTSNamePolicy();
30
+ let tsFlags = TSSymbolFlags.None;
31
+ if (props.kind && props.kind === "type") {
32
+ tsFlags &= TSSymbolFlags.TypeSymbol;
33
+ }
34
+ const sym = createTSSymbol({
35
+ name: namePolicy.getName(props.name, props.nameKind),
36
+ refkey: props.refkey ?? refkey(props.name),
37
+ export: props.export,
38
+ default: props.default,
39
+ flags: props.flags,
40
+ tsFlags
41
+ });
42
+ let children;
43
+ if (sym.flags & OutputSymbolFlags.MemberContainer) {
44
+ children = _$createComponent(MemberScope, {
45
+ owner: sym,
46
+ get children() {
47
+ return props.children;
48
+ }
49
+ });
50
+ } else {
51
+ children = () => props.children;
52
+ }
53
+ return _$createComponent(CoreDeclaration, {
54
+ symbol: sym,
55
+ get children() {
56
+ return [_$memo(() => props.export ? "export " : ""), _$memo(() => props.default ? "default " : ""), children];
57
+ }
58
+ });
59
+ }
60
+ //# sourceMappingURL=Declaration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Declaration.js","names":["Declaration","CoreDeclaration","MemberScope","OutputSymbolFlags","refkey","useTSNamePolicy","createTSSymbol","TSSymbolFlags","props","namePolicy","tsFlags","None","kind","TypeSymbol","sym","name","getName","nameKind","export","default","flags","children","MemberContainer","_$createComponent","owner","symbol","_$memo"],"sources":["../../../src/components/Declaration.tsx"],"sourcesContent":[null],"mappings":";;AAAA,SAEEA,WAAW,IAAIC,eAAe,EAC9BC,WAAW,EACXC,iBAAiB,EACjBC,MAAM,QAED,gBAAgB;AACvB,SAA6BC,eAAe,QAAQ,mBAAmB;AACvE,SAASC,cAAc,EAAEC,aAAa,QAAQ,qBAAqB;;AAEnE;AACA;;AAEA;;AAEA;;AA8CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASP,WAAWA,CAACQ,KAAuB,EAAE;EACnD,MAAMC,UAAU,GAAGJ,eAAe,CAAC,CAAC;EAEpC,IAAIK,OAAsB,GAAGH,aAAa,CAACI,IAAI;EAC/C,IAAIH,KAAK,CAACI,IAAI,IAAIJ,KAAK,CAACI,IAAI,KAAK,MAAM,EAAE;IACvCF,OAAO,IAAIH,aAAa,CAACM,UAAU;EACrC;EAEA,MAAMC,GAAG,GAAGR,cAAc,CAAC;IACzBS,IAAI,EAAEN,UAAU,CAACO,OAAO,CAACR,KAAK,CAACO,IAAI,EAAEP,KAAK,CAACS,QAAQ,CAAC;IACpDb,MAAM,EAAEI,KAAK,CAACJ,MAAM,IAAIA,MAAM,CAACI,KAAK,CAACO,IAAI,CAAC;IAC1CG,MAAM,EAAEV,KAAK,CAACU,MAAM;IACpBC,OAAO,EAAEX,KAAK,CAACW,OAAO;IACtBC,KAAK,EAAEZ,KAAK,CAACY,KAAK;IAClBV;EACF,CAAC,CAAC;EAEF,IAAIW,QAAkB;EAEtB,IAAIP,GAAG,CAACM,KAAK,GAAGjB,iBAAiB,CAACmB,eAAe,EAAE;IACjDD,QAAQ,GAAAE,iBAAA,CAAIrB,WAAW;MAACsB,KAAK,EAAEV,GAAG;MAAA,IAAAO,SAAA;QAAA,OAAGb,KAAK,CAACa,QAAQ;MAAA;IAAA,EAAe;EACpE,CAAC,MAAM;IACLA,QAAQ,GAAGA,CAAA,KAAMb,KAAK,CAACa,QAAQ;EACjC;EAEA,OAAAE,iBAAA,CAAQtB,eAAe;IAACwB,MAAM,EAAEX,GAAG;IAAA,IAAAO,SAAA;MAAA,QAAAK,MAAA,OAChClB,KAAK,CAACU,MAAM,GAAG,SAAS,GAAG,EAAE,GAAAQ,MAAA,OAAElB,KAAK,CAACW,OAAO,GAAG,UAAU,GAAG,EAAE,GAAEE,QAAQ;IAAA;EAAA;AAE7E","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ import { BaseDeclarationProps } from "./Declaration.js";
2
+ export interface EnumDeclarationProps extends BaseDeclarationProps {
3
+ /**
4
+ * A JS object representing the enum member names and values.
5
+ */
6
+ jsValue?: Record<string, string | number>;
7
+ }
8
+ /**
9
+ * A TypeScript enum declaration.
10
+ */
11
+ export declare function EnumDeclaration(props: EnumDeclarationProps): any;
12
+ //# sourceMappingURL=EnumDeclaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnumDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/EnumDeclaration.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,OA6B1D"}
@@ -0,0 +1,48 @@
1
+ import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
+ import { Indent as _$Indent } from "@alloy-js/core";
3
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
4
+ import { Declaration as CoreDeclaration, MemberScope, Name, OutputSymbolFlags, mapJoin, refkey, useBinder } from "@alloy-js/core";
5
+ import { useTSNamePolicy } from "../name-policy.js";
6
+ import { createTSSymbol, useTSScope } from "../symbols/index.js";
7
+ import { EnumMember } from "./EnumMember.js";
8
+ /**
9
+ * A TypeScript enum declaration.
10
+ */
11
+ export function EnumDeclaration(props) {
12
+ const name = useTSNamePolicy().getName(props.name, "enum");
13
+ const binder = useBinder();
14
+ const scope = useTSScope();
15
+ const sym = createTSSymbol({
16
+ binder,
17
+ scope,
18
+ name: name,
19
+ refkey: props.refkey ?? refkey(name),
20
+ default: props.default,
21
+ export: props.export,
22
+ flags: OutputSymbolFlags.StaticMemberContainer
23
+ });
24
+ const jsValueMembers = mapJoin(Object.entries(props.jsValue ?? {}), ([name, value]) => {
25
+ return _$createComponent(EnumMember, {
26
+ name: name,
27
+ jsValue: value
28
+ });
29
+ }, {
30
+ joiner: ",\n"
31
+ });
32
+ return _$createComponent(CoreDeclaration, {
33
+ symbol: sym,
34
+ get children() {
35
+ return [_$memo(() => props.export ? "export " : ""), _$memo(() => props.default ? "default " : ""), "enum ", _$createComponent(Name, {}), " ", "{", _$createComponent(_$Indent, {
36
+ get children() {
37
+ return ["\n", _$createComponent(MemberScope, {
38
+ owner: sym,
39
+ get children() {
40
+ return [jsValueMembers, _$memo(() => jsValueMembers.length > 0 && props.children && ",\n"), _$memo(() => props.children)];
41
+ }
42
+ })];
43
+ }
44
+ }), "\n", "}"];
45
+ }
46
+ });
47
+ }
48
+ //# sourceMappingURL=EnumDeclaration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnumDeclaration.js","names":["Declaration","CoreDeclaration","MemberScope","Name","OutputSymbolFlags","mapJoin","refkey","useBinder","useTSNamePolicy","createTSSymbol","useTSScope","EnumMember","EnumDeclaration","props","name","getName","binder","scope","sym","default","export","flags","StaticMemberContainer","jsValueMembers","Object","entries","jsValue","value","_$createComponent","joiner","symbol","children","_$memo","_$Indent","owner","length"],"sources":["../../../src/components/EnumDeclaration.tsx"],"sourcesContent":[null],"mappings":";;;AAAA,SACEA,WAAW,IAAIC,eAAe,EAC9BC,WAAW,EACXC,IAAI,EACJC,iBAAiB,EACjBC,OAAO,EACPC,MAAM,EACNC,SAAS,QACJ,gBAAgB;AACvB,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,cAAc,EAAEC,UAAU,QAAQ,qBAAqB;AAEhE,SAASC,UAAU;AAQnB;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAACC,KAA2B,EAAE;EAC3D,MAAMC,IAAI,GAAGN,eAAe,CAAC,CAAC,CAACO,OAAO,CAACF,KAAK,CAACC,IAAI,EAAE,MAAM,CAAC;EAC1D,MAAME,MAAM,GAAGT,SAAS,CAAC,CAAC;EAC1B,MAAMU,KAAK,GAAGP,UAAU,CAAC,CAAC;EAC1B,MAAMQ,GAAG,GAAGT,cAAc,CAAC;IACzBO,MAAM;IACNC,KAAK;IACLH,IAAI,EAAEA,IAAI;IACVR,MAAM,EAAEO,KAAK,CAACP,MAAM,IAAIA,MAAM,CAACQ,IAAI,CAAC;IACpCK,OAAO,EAAEN,KAAK,CAACM,OAAO;IACtBC,MAAM,EAAEP,KAAK,CAACO,MAAM;IACpBC,KAAK,EAAEjB,iBAAiB,CAACkB;EAC3B,CAAC,CAAC;EAEF,MAAMC,cAAc,GAAGlB,OAAO,CAC5BmB,MAAM,CAACC,OAAO,CAACZ,KAAK,CAACa,OAAO,IAAI,CAAC,CAAC,CAAC,EACnC,CAAC,CAACZ,IAAI,EAAEa,KAAK,CAAC,KAAK;IACjB,OAAAC,iBAAA,CAAQjB,UAAU;MAACG,IAAI,EAAEA,IAAI;MAAEY,OAAO,EAAEC;IAAK;EAC/C,CAAC,EACD;IAAEE,MAAM,EAAE;EAAM,CAClB,CAAC;EAED,OAAAD,iBAAA,CAAQ3B,eAAe;IAAC6B,MAAM,EAAEZ,GAAG;IAAA,IAAAa,SAAA;MAAA,QAAAC,MAAA,OAChCnB,KAAK,CAACO,MAAM,GAAG,SAAS,GAAG,EAAE,GAAAY,MAAA,OAAEnB,KAAK,CAACM,OAAO,GAAG,UAAU,GAAG,EAAE,YAAAS,iBAAA,CAAOzB,IAAI,YAAK,GAAG,EAAAyB,iBAAA,CAAAK,QAAA;QAAA,IAAAF,SAAA;UAAA,cAAAH,iBAAA,CAC/E1B,WAAW;YAACgC,KAAK,EAAEhB,GAAG;YAAA,IAAAa,SAAA;cAAA,QACpBR,cAAc,EAAAS,MAAA,OAAET,cAAc,CAACY,MAAM,GAAG,CAAC,IAAItB,KAAK,CAACkB,QAAQ,IAAI,KAAK,GAAAC,MAAA,OAAEnB,KAAK,CAACkB,QAAQ;YAAA;UAAA;QAAA;MAAA,UAExF,GAAG;IAAA;EAAA;AAER","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ import { Children, Refkey } from "@alloy-js/core";
2
+ export interface EnumMemberProps {
3
+ /**
4
+ * The name of the member.
5
+ *
6
+ * If a naming policy is provided in context, the policy name "enum-member" is
7
+ * used.
8
+ */
9
+ name: string;
10
+ /**
11
+ * Refkey for the enum member symbol. If the refkey is not provided, a symbol
12
+ * is not created and the member cannot be referenced by refkey.
13
+ */
14
+ refkey?: Refkey;
15
+ /**
16
+ * The value of the enum member.
17
+ */
18
+ value?: Children;
19
+ /**
20
+ * The JS value of the enum member.
21
+ */
22
+ jsValue?: string | number;
23
+ }
24
+ /**
25
+ * A TypeScript enum member.
26
+ */
27
+ export declare function EnumMember(props: EnumMemberProps): any;
28
+ //# sourceMappingURL=EnumMember.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnumMember.d.ts","sourceRoot":"","sources":["../../../src/components/EnumMember.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAKrE,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,OAiBhD"}
@@ -0,0 +1,28 @@
1
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
+ import { OutputSymbolFlags } from "@alloy-js/core";
3
+ import { useTSNamePolicy } from "../name-policy.js";
4
+ import { createTSSymbol } from "../symbols/ts-output-symbol.js";
5
+ import { ValueExpression } from "./ValueExpression.js";
6
+ /**
7
+ * A TypeScript enum member.
8
+ */
9
+ export function EnumMember(props) {
10
+ const namer = useTSNamePolicy();
11
+ const name = namer.getName(props.name, "enum-member");
12
+ let sym = undefined;
13
+ if (props.refkey) {
14
+ sym = createTSSymbol({
15
+ name,
16
+ refkey: props.refkey,
17
+ flags: OutputSymbolFlags.StaticMember
18
+ });
19
+ }
20
+ const nameCode = sym ? sym.name : name;
21
+ const valueCode = props.jsValue ? _$createComponent(ValueExpression, {
22
+ get jsValue() {
23
+ return props.jsValue;
24
+ }
25
+ }) : props.value;
26
+ return [nameCode, " = ", valueCode];
27
+ }
28
+ //# sourceMappingURL=EnumMember.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnumMember.js","names":["OutputSymbolFlags","useTSNamePolicy","createTSSymbol","ValueExpression","EnumMember","props","namer","name","getName","sym","undefined","refkey","flags","StaticMember","nameCode","valueCode","jsValue","_$createComponent","value"],"sources":["../../../src/components/EnumMember.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAAmBA,iBAAiB,QAAgB,gBAAgB;AACpE,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,cAAc,QAAwB,gCAAgC;AAC/E,SAASC,eAAe;AA4BxB;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAACC,KAAsB,EAAE;EACjD,MAAMC,KAAK,GAAGL,eAAe,CAAC,CAAC;EAC/B,MAAMM,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACH,KAAK,CAACE,IAAI,EAAE,aAAa,CAAC;EACrD,IAAIE,GAA+B,GAAGC,SAAS;EAC/C,IAAIL,KAAK,CAACM,MAAM,EAAE;IAChBF,GAAG,GAAGP,cAAc,CAAC;MACnBK,IAAI;MACJI,MAAM,EAAEN,KAAK,CAACM,MAAM;MACpBC,KAAK,EAAEZ,iBAAiB,CAACa;IAC3B,CAAC,CAAC;EACJ;EACA,MAAMC,QAAQ,GAAGL,GAAG,GAAGA,GAAG,CAACF,IAAI,GAAGA,IAAI;EACtC,MAAMQ,SAAS,GAAGV,KAAK,CAACW,OAAO,GAAAC,iBAAA,CAC5Bd,eAAe;IAAA,IAACa,OAAOA,CAAA;MAAA,OAAEX,KAAK,CAACW,OAAO;IAAA;EAAA,KACvCX,KAAK,CAACa,KAAK;EAEb,QAAUJ,QAAQ,SAAKC,SAAS;AAClC","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import { TSModuleScope } from "../symbols/index.js";
2
+ export interface ExportStatementProps {
3
+ star?: boolean;
4
+ from?: TSModuleScope;
5
+ }
6
+ export declare function ExportStatement(props: ExportStatementProps): any;
7
+ //# sourceMappingURL=ExportStatement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportStatement.d.ts","sourceRoot":"","sources":["../../../src/components/ExportStatement.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAkB,MAAM,qBAAqB,CAAC;AAIpE,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,OAU1D"}
@@ -0,0 +1,15 @@
1
+ import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
+ import { dirname, relative } from "pathe";
3
+ import { modulePath } from "../utils.js";
4
+ import { useSourceFile } from "./SourceFile.js";
5
+ export function ExportStatement(props) {
6
+ if (props.star) {
7
+ const module = useSourceFile();
8
+ for (const symbol of props.from.symbols.values()) {
9
+ module.scope.exportedSymbols.set(symbol.refkey, symbol);
10
+ }
11
+ return ["export * from \"", _$memo(() => modulePath(relative(dirname(module.scope.name), props.from.name))), "\";"];
12
+ }
13
+ return "";
14
+ }
15
+ //# sourceMappingURL=ExportStatement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportStatement.js","names":["dirname","relative","modulePath","useSourceFile","ExportStatement","props","star","module","symbol","from","symbols","values","scope","exportedSymbols","set","refkey","_$memo","name"],"sources":["../../../src/components/ExportStatement.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAEzC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,aAAa,QAAQ,iBAAiB;AAO/C,OAAO,SAASC,eAAeA,CAACC,KAA2B,EAAE;EAC3D,IAAIA,KAAK,CAACC,IAAI,EAAE;IACd,MAAMC,MAAM,GAAGJ,aAAa,CAAC,CAAC;IAC9B,KAAK,MAAMK,MAAM,IAAIH,KAAK,CAACI,IAAI,CAAEC,OAAO,CAACC,MAAM,CAAC,CAAC,EAAE;MACjDJ,MAAM,CAACK,KAAK,CAACC,eAAe,CAACC,GAAG,CAACN,MAAM,CAACO,MAAM,EAAEP,MAAwB,CAAC;IAC3E;IACA,4BAAAQ,MAAA,OAAyBd,UAAU,CAACD,QAAQ,CAACD,OAAO,CAACO,MAAM,CAACK,KAAK,CAACK,IAAI,CAAC,EAAEZ,KAAK,CAACI,IAAI,CAAEQ,IAAI,CAAC,CAAC;EAC7F;EAEA,OAAO,EAAE;AACX","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import { Children, Refkey } from "@alloy-js/core";
2
+ export interface FunctionCallExpressionProps {
3
+ refkey: Refkey;
4
+ args?: Children[];
5
+ }
6
+ export declare function FunctionCallExpression(props: FunctionCallExpressionProps): any;
7
+ //# sourceMappingURL=FunctionCallExpression.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionCallExpression.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionCallExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAW,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG3D,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;CACnB;AACD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,OAOxE"}
@@ -0,0 +1,14 @@
1
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
+ import { mapJoin } from "@alloy-js/core";
3
+ import { Reference } from "./Reference.js";
4
+ export function FunctionCallExpression(props) {
5
+ const args = props.args && props.args.length ? mapJoin(props.args, arg => arg, {
6
+ joiner: ", "
7
+ }) : null;
8
+ return [_$createComponent(Reference, {
9
+ get refkey() {
10
+ return props.refkey;
11
+ }
12
+ }), "(", args, ")"];
13
+ }
14
+ //# sourceMappingURL=FunctionCallExpression.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionCallExpression.js","names":["mapJoin","Reference","FunctionCallExpression","props","args","length","arg","joiner","_$createComponent","refkey"],"sources":["../../../src/components/FunctionCallExpression.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAAmBA,OAAO,QAAgB,gBAAgB;AAC1D,SAASC,SAAS,QAAQ,gBAAgB;AAM1C,OAAO,SAASC,sBAAsBA,CAACC,KAAkC,EAAE;EACzE,MAAMC,IAAI,GAAGD,KAAK,CAACC,IAAI,IAAID,KAAK,CAACC,IAAI,CAACC,MAAM,GAC1CL,OAAO,CAACG,KAAK,CAACC,IAAI,EAAGE,GAAG,IAAKA,GAAG,EAAE;IAAEC,MAAM,EAAE;EAAK,CAAC,CAAC,GACnD,IAAI;EACN,QAAAC,iBAAA,CACOP,SAAS;IAAA,IAACQ,MAAMA,CAAA;MAAA,OAAEN,KAAK,CAACM,MAAM;IAAA;EAAA,SAAML,IAAI;AAEjD","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ import { Refkey } from "@alloy-js/core";
2
+ import { Children } from "@alloy-js/core/jsx-runtime";
3
+ import { BaseDeclarationProps } from "./Declaration.js";
4
+ export interface ParameterDescriptor {
5
+ type: Children;
6
+ refkey: Refkey;
7
+ optional?: boolean;
8
+ }
9
+ export interface FunctionDeclarationProps extends BaseDeclarationProps {
10
+ async?: boolean;
11
+ parameters?: Record<string, Children | ParameterDescriptor>;
12
+ returnType?: Children;
13
+ children?: Children;
14
+ }
15
+ export declare const functionParametersTag: unique symbol;
16
+ export declare const functionBodyTag: unique symbol;
17
+ export declare function FunctionDeclaration(props: FunctionDeclarationProps): any;
18
+ export declare namespace FunctionDeclaration {
19
+ var Parameters: import("@alloy-js/core").Component<FunctionParametersProps>;
20
+ var Body: import("@alloy-js/core").Component<FunctionBodyProps>;
21
+ }
22
+ export interface FunctionParametersProps {
23
+ parameters?: Record<string, Children | ParameterDescriptor>;
24
+ children?: Children;
25
+ }
26
+ export interface FunctionBodyProps {
27
+ children?: Children;
28
+ }
29
+ //# sourceMappingURL=FunctionDeclaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,MAAM,EAIP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAGtD,OAAO,EAAE,oBAAoB,EAAe,MAAM,kBAAkB,CAAC;AAErE,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AASD,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,GAAG,mBAAmB,CAAC,CAAC;IAC5D,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,eAAO,MAAM,qBAAqB,eAAW,CAAC;AAC9C,eAAO,MAAM,eAAe,eAAW,CAAC;AAExC,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,OAuBlE;yBAvBe,mBAAmB;;;;AAiCnC,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,GAAG,mBAAmB,CAAC,CAAC;IAC5D,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AA+CD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB"}
@@ -0,0 +1,91 @@
1
+ import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
+ import { mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
3
+ import { Indent as _$Indent } from "@alloy-js/core";
4
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
5
+ import { childrenArray, code, findKeyedChild, findUnkeyedChildren, mapJoin, Name, refkey, Scope, taggedComponent } from "@alloy-js/core";
6
+ import { useTSNamePolicy } from "../name-policy.js";
7
+ import { createTSSymbol, TSSymbolFlags, useTSScope } from "../symbols/index.js";
8
+ import { Declaration } from "./Declaration.js";
9
+ function isParameterDescriptor(value) {
10
+ return typeof value === "object" && value !== null && Object.hasOwn(value, "type");
11
+ }
12
+ export const functionParametersTag = Symbol();
13
+ export const functionBodyTag = Symbol();
14
+ export function FunctionDeclaration(props) {
15
+ const children = childrenArray(() => props.children);
16
+ const parametersChild = findKeyedChild(children, functionParametersTag);
17
+ const bodyChild = findKeyedChild(children, functionBodyTag);
18
+ const filteredChildren = findUnkeyedChildren(children);
19
+ const returnType = getReturnType(props.returnType, {
20
+ async: props.async
21
+ });
22
+ const sReturnType = returnType ? [": ", returnType] : undefined;
23
+ const sParams = parametersChild ?? _$createComponent(FunctionDeclaration.Parameters, {
24
+ get parameters() {
25
+ return props.parameters;
26
+ }
27
+ });
28
+ const sBody = bodyChild ?? _$createComponent(FunctionDeclaration.Body, {
29
+ children: filteredChildren
30
+ });
31
+ const asyncKwd = props.async ? "async " : "";
32
+ return _$createComponent(Declaration, _$mergeProps(props, {
33
+ nameKind: "function",
34
+ get children() {
35
+ return [asyncKwd, "function ", _$createComponent(Name, {}), _$createComponent(Scope, {
36
+ get name() {
37
+ return props.name;
38
+ },
39
+ kind: "function",
40
+ get children() {
41
+ return ["(", sParams, ")", sReturnType, " ", "{", _$createComponent(_$Indent, {
42
+ get children() {
43
+ return ["\n", sBody];
44
+ }
45
+ }), "\n", "}"];
46
+ }
47
+ })];
48
+ }
49
+ }));
50
+ }
51
+ function getReturnType(returnType, options = {
52
+ async: false
53
+ }) {
54
+ if (returnType) {
55
+ return options.async ? code`Promise<${returnType}>` : returnType;
56
+ }
57
+ }
58
+ FunctionDeclaration.Parameters = taggedComponent(functionParametersTag, function Parameters(props) {
59
+ const namePolicy = useTSNamePolicy();
60
+ let value;
61
+ if (props.children) {
62
+ value = props.children;
63
+ } else if (props.parameters) {
64
+ const scope = useTSScope();
65
+ if (scope.kind !== "function") {
66
+ throw new Error("Can't declare function parameter in non-function scope");
67
+ }
68
+ value = mapJoin(new Map(Object.entries(props.parameters)), (key, value) => {
69
+ const descriptor = isParameterDescriptor(value) ? value : {
70
+ refkey: refkey(),
71
+ type: value
72
+ };
73
+ const optionality = descriptor.optional ? "?" : "";
74
+ const sym = createTSSymbol({
75
+ name: key,
76
+ refkey: descriptor.refkey,
77
+ tsFlags: TSSymbolFlags.ParameterSymbol
78
+ });
79
+ return [_$memo(() => namePolicy.getName(sym.name, "parameter")), optionality, ": ", _$memo(() => descriptor.type)];
80
+ }, {
81
+ joiner: ", "
82
+ });
83
+ } else {
84
+ value = undefined;
85
+ }
86
+ return value;
87
+ });
88
+ FunctionDeclaration.Body = taggedComponent(functionBodyTag, function Body(props) {
89
+ return props.children;
90
+ });
91
+ //# sourceMappingURL=FunctionDeclaration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionDeclaration.js","names":["childrenArray","code","findKeyedChild","findUnkeyedChildren","mapJoin","Name","refkey","Scope","taggedComponent","useTSNamePolicy","createTSSymbol","TSSymbolFlags","useTSScope","Declaration","isParameterDescriptor","value","Object","hasOwn","functionParametersTag","Symbol","functionBodyTag","FunctionDeclaration","props","children","parametersChild","bodyChild","filteredChildren","returnType","getReturnType","async","sReturnType","undefined","sParams","_$createComponent","Parameters","parameters","sBody","Body","asyncKwd","_$mergeProps","nameKind","name","kind","_$Indent","options","namePolicy","scope","Error","Map","entries","key","descriptor","type","optionality","optional","sym","tsFlags","ParameterSymbol","_$memo","getName","joiner"],"sources":["../../../src/components/FunctionDeclaration.tsx"],"sourcesContent":[null],"mappings":";;;;AAAA,SACEA,aAAa,EACbC,IAAI,EACJC,cAAc,EACdC,mBAAmB,EACnBC,OAAO,EACPC,IAAI,EAEJC,MAAM,EACNC,KAAK,EACLC,eAAe,QACV,gBAAgB;AAEvB,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,cAAc,EAAEC,aAAa,EAAEC,UAAU,QAAQ,qBAAqB;AAC/E,SAA+BC,WAAW,QAAQ,kBAAkB;AAQpE,SAASC,qBAAqBA,CAC5BC,KAAqC,EACP;EAC9B,OACE,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,IAAIC,MAAM,CAACC,MAAM,CAACF,KA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B+B,IAAI,EAAES,GAAG;QACT5C,MAAM,EAAE6C,UAAU,CAAC7C,MAAM;QACzBkD,OAAO,EAAE7C,aAAa,CAAC8C;MACzB,CAAC,CAAC;MAEF,QAAAC,MAAA,OAAUb,UAAU,CAACc,OAAO,CAACJ,GAAG,CAACd,IAAI,EAAE,WAAW,CAAC,GAAEY,WAAW,QAAAK,MAAA,OAAIP,UAAU,CAACC,IAAI;IACrF,CAAC,EACD;MAAEQ,MAAM,EAAE;IAAK,CACjB,CAAC;EACH,CAAC,MAAM;IACL7C,KAAK,GAAGgB,SAAS;EACnB;EAEA,OAAOhB,KAAK;AACd,CACF,CAAC;AAMDM,mBAAmB,CAACgB,IAAI,GAAG7B,eAAe,CAACY,eAAe,EAAE,SAASiB,IAAIA,CACvEf,KAAwB,EACxB;EACA,OAAOA,KAAK,CAACC,QAAQ;AACvB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ import { ImportedSymbol, ImportRecords } from "../symbols/index.js";
2
+ export interface ImportStatementsProps {
3
+ records: ImportRecords;
4
+ }
5
+ export declare function ImportStatements(props: ImportStatementsProps): () => any[];
6
+ export interface ImportStatementProps {
7
+ path: string;
8
+ symbols: Set<ImportedSymbol>;
9
+ }
10
+ export declare function ImportStatement(props: ImportStatementProps): () => any[];
11
+ //# sourceMappingURL=ImportStatement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImportStatement.d.ts","sourceRoot":"","sources":["../../../src/components/ImportStatement.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,cAAc,EACd,aAAa,EAEd,MAAM,qBAAqB,CAAC;AAI7B,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,eA6C5D;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC9B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,eAsC1D"}