@lynx-js/genui 0.0.1-rc.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 (254) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +170 -0
  3. package/a2ui/README.md +140 -0
  4. package/a2ui/dist/catalog/Button/catalog.json +156 -0
  5. package/a2ui/dist/catalog/Button/index.d.ts +35 -0
  6. package/a2ui/dist/catalog/Button/index.js +35 -0
  7. package/a2ui/dist/catalog/Button/index.js.map +1 -0
  8. package/a2ui/dist/catalog/Card/catalog.json +24 -0
  9. package/a2ui/dist/catalog/Card/index.d.ts +11 -0
  10. package/a2ui/dist/catalog/Card/index.js +19 -0
  11. package/a2ui/dist/catalog/Card/index.js.map +1 -0
  12. package/a2ui/dist/catalog/CheckBox/catalog.json +170 -0
  13. package/a2ui/dist/catalog/CheckBox/index.d.ts +32 -0
  14. package/a2ui/dist/catalog/CheckBox/index.js +24 -0
  15. package/a2ui/dist/catalog/CheckBox/index.js.map +1 -0
  16. package/a2ui/dist/catalog/Column/catalog.json +57 -0
  17. package/a2ui/dist/catalog/Column/index.d.ts +15 -0
  18. package/a2ui/dist/catalog/Column/index.js +55 -0
  19. package/a2ui/dist/catalog/Column/index.js.map +1 -0
  20. package/a2ui/dist/catalog/Divider/catalog.json +14 -0
  21. package/a2ui/dist/catalog/Divider/index.d.ts +9 -0
  22. package/a2ui/dist/catalog/Divider/index.js +8 -0
  23. package/a2ui/dist/catalog/Divider/index.js.map +1 -0
  24. package/a2ui/dist/catalog/Icon/catalog.json +45 -0
  25. package/a2ui/dist/catalog/Icon/index.d.ts +14 -0
  26. package/a2ui/dist/catalog/Icon/index.js +11 -0
  27. package/a2ui/dist/catalog/Icon/index.js.map +1 -0
  28. package/a2ui/dist/catalog/Image/catalog.json +62 -0
  29. package/a2ui/dist/catalog/Image/index.d.ts +16 -0
  30. package/a2ui/dist/catalog/Image/index.js +30 -0
  31. package/a2ui/dist/catalog/Image/index.js.map +1 -0
  32. package/a2ui/dist/catalog/LineChart/catalog.json +98 -0
  33. package/a2ui/dist/catalog/LineChart/index.d.ts +31 -0
  34. package/a2ui/dist/catalog/LineChart/index.js +195 -0
  35. package/a2ui/dist/catalog/LineChart/index.js.map +1 -0
  36. package/a2ui/dist/catalog/List/catalog.json +52 -0
  37. package/a2ui/dist/catalog/List/index.d.ts +15 -0
  38. package/a2ui/dist/catalog/List/index.js +53 -0
  39. package/a2ui/dist/catalog/List/index.js.map +1 -0
  40. package/a2ui/dist/catalog/Modal/catalog.json +18 -0
  41. package/a2ui/dist/catalog/Modal/index.d.ts +12 -0
  42. package/a2ui/dist/catalog/Modal/index.js +33 -0
  43. package/a2ui/dist/catalog/Modal/index.js.map +1 -0
  44. package/a2ui/dist/catalog/PieChart/catalog.json +87 -0
  45. package/a2ui/dist/catalog/PieChart/index.d.ts +37 -0
  46. package/a2ui/dist/catalog/PieChart/index.js +131 -0
  47. package/a2ui/dist/catalog/PieChart/index.js.map +1 -0
  48. package/a2ui/dist/catalog/RadioGroup/catalog.json +184 -0
  49. package/a2ui/dist/catalog/RadioGroup/index.d.ts +36 -0
  50. package/a2ui/dist/catalog/RadioGroup/index.js +36 -0
  51. package/a2ui/dist/catalog/RadioGroup/index.js.map +1 -0
  52. package/a2ui/dist/catalog/Row/catalog.json +57 -0
  53. package/a2ui/dist/catalog/Row/index.d.ts +15 -0
  54. package/a2ui/dist/catalog/Row/index.js +28 -0
  55. package/a2ui/dist/catalog/Row/index.js.map +1 -0
  56. package/a2ui/dist/catalog/Slider/catalog.json +183 -0
  57. package/a2ui/dist/catalog/Slider/index.d.ts +41 -0
  58. package/a2ui/dist/catalog/Slider/index.js +39 -0
  59. package/a2ui/dist/catalog/Slider/index.js.map +1 -0
  60. package/a2ui/dist/catalog/Slider/utils.d.ts +11 -0
  61. package/a2ui/dist/catalog/Slider/utils.js +58 -0
  62. package/a2ui/dist/catalog/Slider/utils.js.map +1 -0
  63. package/a2ui/dist/catalog/Tabs/catalog.json +28 -0
  64. package/a2ui/dist/catalog/Tabs/index.d.ts +12 -0
  65. package/a2ui/dist/catalog/Tabs/index.js +32 -0
  66. package/a2ui/dist/catalog/Tabs/index.js.map +1 -0
  67. package/a2ui/dist/catalog/Text/catalog.json +74 -0
  68. package/a2ui/dist/catalog/Text/index.d.ts +18 -0
  69. package/a2ui/dist/catalog/Text/index.js +27 -0
  70. package/a2ui/dist/catalog/Text/index.js.map +1 -0
  71. package/a2ui/dist/catalog/TextField/catalog.json +147 -0
  72. package/a2ui/dist/catalog/TextField/index.d.ts +35 -0
  73. package/a2ui/dist/catalog/TextField/index.js +43 -0
  74. package/a2ui/dist/catalog/TextField/index.js.map +1 -0
  75. package/a2ui/dist/catalog/TextField/utils.d.ts +7 -0
  76. package/a2ui/dist/catalog/TextField/utils.js +51 -0
  77. package/a2ui/dist/catalog/TextField/utils.js.map +1 -0
  78. package/a2ui/dist/catalog/defineCatalog.d.ts +119 -0
  79. package/a2ui/dist/catalog/defineCatalog.js +196 -0
  80. package/a2ui/dist/catalog/defineCatalog.js.map +1 -0
  81. package/a2ui/dist/catalog/index.d.ts +20 -0
  82. package/a2ui/dist/catalog/index.js +26 -0
  83. package/a2ui/dist/catalog/index.js.map +1 -0
  84. package/a2ui/dist/catalog/utils/chart.d.ts +3 -0
  85. package/a2ui/dist/catalog/utils/chart.js +28 -0
  86. package/a2ui/dist/catalog/utils/chart.js.map +1 -0
  87. package/a2ui/dist/functions/index.d.ts +19 -0
  88. package/a2ui/dist/functions/index.js +87 -0
  89. package/a2ui/dist/functions/index.js.map +1 -0
  90. package/a2ui/dist/index.d.ts +11 -0
  91. package/a2ui/dist/index.js +35 -0
  92. package/a2ui/dist/index.js.map +1 -0
  93. package/a2ui/dist/react/A2UI.d.ts +77 -0
  94. package/a2ui/dist/react/A2UI.js +159 -0
  95. package/a2ui/dist/react/A2UI.js.map +1 -0
  96. package/a2ui/dist/react/A2UIProvider.d.ts +25 -0
  97. package/a2ui/dist/react/A2UIProvider.js +20 -0
  98. package/a2ui/dist/react/A2UIProvider.js.map +1 -0
  99. package/a2ui/dist/react/A2UIRenderer.d.ts +34 -0
  100. package/a2ui/dist/react/A2UIRenderer.js +161 -0
  101. package/a2ui/dist/react/A2UIRenderer.js.map +1 -0
  102. package/a2ui/dist/react/FormContext.d.ts +10 -0
  103. package/a2ui/dist/react/FormContext.js +12 -0
  104. package/a2ui/dist/react/FormContext.js.map +1 -0
  105. package/a2ui/dist/react/index.d.ts +8 -0
  106. package/a2ui/dist/react/index.js +23 -0
  107. package/a2ui/dist/react/index.js.map +1 -0
  108. package/a2ui/dist/react/useA2UIContext.d.ts +7 -0
  109. package/a2ui/dist/react/useA2UIContext.js +19 -0
  110. package/a2ui/dist/react/useA2UIContext.js.map +1 -0
  111. package/a2ui/dist/react/useAction.d.ts +9 -0
  112. package/a2ui/dist/react/useAction.js +38 -0
  113. package/a2ui/dist/react/useAction.js.map +1 -0
  114. package/a2ui/dist/react/useCatalog.d.ts +7 -0
  115. package/a2ui/dist/react/useCatalog.js +13 -0
  116. package/a2ui/dist/react/useCatalog.js.map +1 -0
  117. package/a2ui/dist/react/useChecks.d.ts +27 -0
  118. package/a2ui/dist/react/useChecks.js +76 -0
  119. package/a2ui/dist/react/useChecks.js.map +1 -0
  120. package/a2ui/dist/react/useDataBinding.d.ts +10 -0
  121. package/a2ui/dist/react/useDataBinding.js +175 -0
  122. package/a2ui/dist/react/useDataBinding.js.map +1 -0
  123. package/a2ui/dist/store/FormController.d.ts +23 -0
  124. package/a2ui/dist/store/FormController.js +40 -0
  125. package/a2ui/dist/store/FormController.js.map +1 -0
  126. package/a2ui/dist/store/FunctionRegistry.d.ts +47 -0
  127. package/a2ui/dist/store/FunctionRegistry.js +23 -0
  128. package/a2ui/dist/store/FunctionRegistry.js.map +1 -0
  129. package/a2ui/dist/store/MessageProcessor.d.ts +28 -0
  130. package/a2ui/dist/store/MessageProcessor.js +408 -0
  131. package/a2ui/dist/store/MessageProcessor.js.map +1 -0
  132. package/a2ui/dist/store/MessageStore.d.ts +38 -0
  133. package/a2ui/dist/store/MessageStore.js +37 -0
  134. package/a2ui/dist/store/MessageStore.js.map +1 -0
  135. package/a2ui/dist/store/Resource.d.ts +45 -0
  136. package/a2ui/dist/store/Resource.js +80 -0
  137. package/a2ui/dist/store/Resource.js.map +1 -0
  138. package/a2ui/dist/store/SignalStore.d.ts +10 -0
  139. package/a2ui/dist/store/SignalStore.js +29 -0
  140. package/a2ui/dist/store/SignalStore.js.map +1 -0
  141. package/a2ui/dist/store/index.d.ts +14 -0
  142. package/a2ui/dist/store/index.js +15 -0
  143. package/a2ui/dist/store/index.js.map +1 -0
  144. package/a2ui/dist/store/payloadNormalizer.d.ts +27 -0
  145. package/a2ui/dist/store/payloadNormalizer.js +179 -0
  146. package/a2ui/dist/store/payloadNormalizer.js.map +1 -0
  147. package/a2ui/dist/store/resolveFunctionCall.d.ts +18 -0
  148. package/a2ui/dist/store/resolveFunctionCall.js +131 -0
  149. package/a2ui/dist/store/resolveFunctionCall.js.map +1 -0
  150. package/a2ui/dist/store/types.d.ts +68 -0
  151. package/a2ui/dist/store/types.js +2 -0
  152. package/a2ui/dist/store/types.js.map +1 -0
  153. package/a2ui/dist/tsconfig.build.tsbuildinfo +1 -0
  154. package/a2ui/styles/catalog/Button.css +83 -0
  155. package/a2ui/styles/catalog/Card.css +49 -0
  156. package/a2ui/styles/catalog/CheckBox.css +46 -0
  157. package/a2ui/styles/catalog/Column.css +89 -0
  158. package/a2ui/styles/catalog/Divider.css +20 -0
  159. package/a2ui/styles/catalog/Icon.css +39 -0
  160. package/a2ui/styles/catalog/Image.css +54 -0
  161. package/a2ui/styles/catalog/LineChart.css +116 -0
  162. package/a2ui/styles/catalog/List.css +38 -0
  163. package/a2ui/styles/catalog/Modal.css +60 -0
  164. package/a2ui/styles/catalog/PieChart.css +109 -0
  165. package/a2ui/styles/catalog/RadioGroup.css +123 -0
  166. package/a2ui/styles/catalog/Row.css +83 -0
  167. package/a2ui/styles/catalog/Slider.css +96 -0
  168. package/a2ui/styles/catalog/Tabs.css +46 -0
  169. package/a2ui/styles/catalog/Text.css +121 -0
  170. package/a2ui/styles/catalog/TextField.css +48 -0
  171. package/a2ui/styles/theme.css +62 -0
  172. package/a2ui-catalog-extractor/README.md +605 -0
  173. package/a2ui-catalog-extractor/bin/a2ui-catalog-extractor.js +6 -0
  174. package/a2ui-catalog-extractor/dist/cli.d.ts +12 -0
  175. package/a2ui-catalog-extractor/dist/cli.js +171 -0
  176. package/a2ui-catalog-extractor/dist/cli.js.map +1 -0
  177. package/a2ui-catalog-extractor/dist/index.d.ts +140 -0
  178. package/a2ui-catalog-extractor/dist/index.js +755 -0
  179. package/a2ui-catalog-extractor/dist/index.js.map +1 -0
  180. package/a2ui-catalog-extractor/dist/tsconfig.build.tsbuildinfo +1 -0
  181. package/a2ui-catalog-extractor/skills/a2ui-catalog-extractor/SKILL.md +30 -0
  182. package/a2ui-prompt/README.md +65 -0
  183. package/a2ui-prompt/dist/index.d.ts +91 -0
  184. package/a2ui-prompt/dist/index.js +767 -0
  185. package/cli/README.md +88 -0
  186. package/cli/bin/cli.js +271 -0
  187. package/dist/index.d.ts +10 -0
  188. package/dist/index.js +10 -0
  189. package/dist/index.js.map +1 -0
  190. package/dist/tsconfig.build.tsbuildinfo +1 -0
  191. package/index.ts +114 -0
  192. package/openui/README.md +211 -0
  193. package/openui/dist/catalog/Action/index.d.ts +20 -0
  194. package/openui/dist/catalog/Action/index.js +23 -0
  195. package/openui/dist/catalog/Action/index.js.map +1 -0
  196. package/openui/dist/catalog/Button/index.d.ts +64 -0
  197. package/openui/dist/catalog/Button/index.js +75 -0
  198. package/openui/dist/catalog/Button/index.js.map +1 -0
  199. package/openui/dist/catalog/Card/index.d.ts +34 -0
  200. package/openui/dist/catalog/Card/index.js +69 -0
  201. package/openui/dist/catalog/Card/index.js.map +1 -0
  202. package/openui/dist/catalog/CardHeader/index.d.ts +5 -0
  203. package/openui/dist/catalog/CardHeader/index.js +18 -0
  204. package/openui/dist/catalog/CardHeader/index.js.map +1 -0
  205. package/openui/dist/catalog/Separator/index.d.ts +2 -0
  206. package/openui/dist/catalog/Separator/index.js +13 -0
  207. package/openui/dist/catalog/Separator/index.js.map +1 -0
  208. package/openui/dist/catalog/Stack/index.d.ts +29 -0
  209. package/openui/dist/catalog/Stack/index.js +61 -0
  210. package/openui/dist/catalog/Stack/index.js.map +1 -0
  211. package/openui/dist/catalog/Tag/index.d.ts +4 -0
  212. package/openui/dist/catalog/Tag/index.js +15 -0
  213. package/openui/dist/catalog/Tag/index.js.map +1 -0
  214. package/openui/dist/catalog/TextContent/index.d.ts +11 -0
  215. package/openui/dist/catalog/TextContent/index.js +33 -0
  216. package/openui/dist/catalog/TextContent/index.js.map +1 -0
  217. package/openui/dist/catalog/index.d.ts +7 -0
  218. package/openui/dist/catalog/index.js +11 -0
  219. package/openui/dist/catalog/index.js.map +1 -0
  220. package/openui/dist/catalog/utils.d.ts +2 -0
  221. package/openui/dist/catalog/utils.js +17 -0
  222. package/openui/dist/catalog/utils.js.map +1 -0
  223. package/openui/dist/core/context.d.ts +112 -0
  224. package/openui/dist/core/context.js +99 -0
  225. package/openui/dist/core/context.js.map +1 -0
  226. package/openui/dist/core/createLibrary.d.ts +10 -0
  227. package/openui/dist/core/createLibrary.js +36 -0
  228. package/openui/dist/core/createLibrary.js.map +1 -0
  229. package/openui/dist/core/hooks/index.d.ts +4 -0
  230. package/openui/dist/core/hooks/index.js +6 -0
  231. package/openui/dist/core/hooks/index.js.map +1 -0
  232. package/openui/dist/core/hooks/useFormValidation.d.ts +13 -0
  233. package/openui/dist/core/hooks/useFormValidation.js +76 -0
  234. package/openui/dist/core/hooks/useFormValidation.js.map +1 -0
  235. package/openui/dist/core/hooks/useOpenUIState.d.ts +33 -0
  236. package/openui/dist/core/hooks/useOpenUIState.js +413 -0
  237. package/openui/dist/core/hooks/useOpenUIState.js.map +1 -0
  238. package/openui/dist/core/hooks/useStateField.d.ts +2 -0
  239. package/openui/dist/core/hooks/useStateField.js +11 -0
  240. package/openui/dist/core/hooks/useStateField.js.map +1 -0
  241. package/openui/dist/core/index.d.ts +7 -0
  242. package/openui/dist/core/index.js +8 -0
  243. package/openui/dist/core/index.js.map +1 -0
  244. package/openui/dist/core/library.d.ts +20 -0
  245. package/openui/dist/core/library.js +13 -0
  246. package/openui/dist/core/library.js.map +1 -0
  247. package/openui/dist/core/renderer.css +271 -0
  248. package/openui/dist/core/renderer.d.ts +9 -0
  249. package/openui/dist/core/renderer.js +139 -0
  250. package/openui/dist/core/renderer.js.map +1 -0
  251. package/openui/dist/core/utils.d.ts +1 -0
  252. package/openui/dist/core/utils.js +76 -0
  253. package/openui/dist/core/utils.js.map +1 -0
  254. package/package.json +120 -0
@@ -0,0 +1,755 @@
1
+ // Copyright 2026 The Lynx Authors. All rights reserved.
2
+ // Licensed under the Apache License Version 2.0 that can be found in the
3
+ // LICENSE file in the root directory of this source tree.
4
+ import * as fs from 'node:fs';
5
+ import * as path from 'node:path';
6
+ import { Application, OptionDefaults, ReflectionKind } from 'typedoc';
7
+ const supportedSourceExtensions = new Set([
8
+ '.cts',
9
+ '.js',
10
+ '.jsx',
11
+ '.mts',
12
+ '.ts',
13
+ '.tsx',
14
+ ]);
15
+ export function findCatalogSourceFiles(inputPath) {
16
+ const absoluteInputPath = path.resolve(inputPath);
17
+ if (!fs.existsSync(absoluteInputPath)) {
18
+ return [];
19
+ }
20
+ const stat = fs.statSync(absoluteInputPath);
21
+ if (stat.isFile()) {
22
+ return isSupportedSourceFile(absoluteInputPath) ? [absoluteInputPath] : [];
23
+ }
24
+ const files = [];
25
+ collectSourceFiles(absoluteInputPath, files);
26
+ return files.sort((left, right) => left.localeCompare(right));
27
+ }
28
+ export async function extractCatalogComponents(options) {
29
+ const project = await createTypeDocProject(options);
30
+ return extractCatalogComponentsFromTypeDocProject(project, options.cwd ? { cwd: options.cwd } : {});
31
+ }
32
+ export function extractCatalogComponentsFromTypeDocProject(project, options = {}) {
33
+ const cwd = options.cwd ? path.resolve(options.cwd) : process.cwd();
34
+ const components = [];
35
+ for (const reflection of walkReflections(project)) {
36
+ if (!isInterfaceReflection(reflection)) {
37
+ continue;
38
+ }
39
+ const parsedDoc = parseComment(reflection.comment);
40
+ if (parsedDoc.a2uiCatalogName === undefined) {
41
+ continue;
42
+ }
43
+ components.push({
44
+ filePath: getReflectionFilePath(reflection, cwd),
45
+ interfaceName: reflection.name,
46
+ name: parsedDoc.a2uiCatalogName || inferCatalogName(reflection.name),
47
+ schema: createComponentSchema(reflection, parsedDoc),
48
+ });
49
+ }
50
+ return components;
51
+ }
52
+ export function extractCatalogComponentsFromTypeDocJson(project, options = {}) {
53
+ return extractCatalogComponentsFromTypeDocProject(project, options);
54
+ }
55
+ export async function extractCatalogFunctions(options) {
56
+ const project = await createTypeDocProject(options);
57
+ return extractCatalogFunctionsFromTypeDocProject(project, options.cwd ? { cwd: options.cwd } : {});
58
+ }
59
+ export function extractCatalogFunctionsFromTypeDocProject(project, options = {}) {
60
+ const cwd = options.cwd ? path.resolve(options.cwd) : process.cwd();
61
+ const functions = [];
62
+ for (const reflection of walkReflections(project)) {
63
+ const parsedDoc = parseComment(reflection.comment);
64
+ let docWithSignature = parsedDoc;
65
+ let signature = pickFunctionSignature(reflection);
66
+ if (signature && !docWithSignature.a2uiFunctionName) {
67
+ docWithSignature = parseComment(signature.comment);
68
+ }
69
+ if (docWithSignature.a2uiFunctionName === undefined) {
70
+ continue;
71
+ }
72
+ signature ??= pickFunctionSignature(reflection);
73
+ if (!signature) {
74
+ throw createReflectionError(reflection, `\`@a2uiFunction\` requires a function signature on "${reflection.name}".`);
75
+ }
76
+ functions.push({
77
+ filePath: getReflectionFilePath(reflection, cwd),
78
+ name: docWithSignature.a2uiFunctionName || reflection.name,
79
+ ...(docWithSignature.description
80
+ ? { description: docWithSignature.description }
81
+ : {}),
82
+ parameters: createFunctionParametersSchema(signature, reflection),
83
+ returnType: resolveReturnType(signature, reflection),
84
+ });
85
+ }
86
+ return functions;
87
+ }
88
+ export function extractCatalogFunctionsFromTypeDocJson(project, options = {}) {
89
+ return extractCatalogFunctionsFromTypeDocProject(project, options);
90
+ }
91
+ export async function writeComponentCatalogs(options) {
92
+ const components = await extractCatalogComponents(options);
93
+ writeCatalogComponents(components, options);
94
+ return components;
95
+ }
96
+ export function writeCatalogComponents(components, options) {
97
+ const cwd = options.cwd ? path.resolve(options.cwd) : process.cwd();
98
+ const outDir = path.resolve(cwd, options.outDir);
99
+ for (const component of components) {
100
+ const componentOutDir = path.join(outDir, component.name);
101
+ fs.mkdirSync(componentOutDir, { recursive: true });
102
+ fs.writeFileSync(path.join(componentOutDir, 'catalog.json'), `${JSON.stringify({ [component.name]: component.schema }, null, 2)}\n`);
103
+ }
104
+ }
105
+ export async function writeCatalogFunctionDefinitions(options) {
106
+ const functions = await extractCatalogFunctions(options);
107
+ writeCatalogFunctions(functions, options);
108
+ return functions;
109
+ }
110
+ /**
111
+ * Bootstrap TypeDoc once and emit both component and function catalog files.
112
+ * Preferred entry point for the CLI — running the conversion twice doubles
113
+ * cold-start latency on large catalogs.
114
+ */
115
+ export async function writeCatalogArtifacts(options) {
116
+ const project = await createTypeDocProject(options);
117
+ const cwdOptions = options.cwd ? { cwd: options.cwd } : {};
118
+ const components = extractCatalogComponentsFromTypeDocProject(project, cwdOptions);
119
+ const functions = extractCatalogFunctionsFromTypeDocProject(project, cwdOptions);
120
+ writeCatalogComponents(components, options);
121
+ writeCatalogFunctions(functions, options);
122
+ return { components, functions };
123
+ }
124
+ // Function names must be valid JavaScript identifiers so they're safe to
125
+ // (a) use as filesystem paths without escaping `..` or path separators and
126
+ // (b) survive A2UI 0.9's wire format (`FunctionCall.call` is a bare name).
127
+ const FUNCTION_NAME_RE = /^[a-z_$][\w$]*$/i;
128
+ export function writeCatalogFunctions(functions, options) {
129
+ if (functions.length === 0)
130
+ return;
131
+ const cwd = options.cwd ? path.resolve(options.cwd) : process.cwd();
132
+ const functionsDir = path.join(path.resolve(cwd, options.outDir), 'functions');
133
+ fs.mkdirSync(functionsDir, { recursive: true });
134
+ for (const fn of functions) {
135
+ if (!FUNCTION_NAME_RE.test(fn.name)) {
136
+ throw new Error(`[a2ui-catalog-extractor] Invalid function name "${fn.name}". `
137
+ + 'Names must match /^[A-Za-z_$][A-Za-z0-9_$]*$/ so they can be '
138
+ + 'used as filenames and as FunctionCall.call identifiers.');
139
+ }
140
+ const { filePath: _filePath, ...definition } = fn;
141
+ fs.writeFileSync(path.join(functionsDir, `${fn.name}.json`), `${JSON.stringify({ [fn.name]: definition }, null, 2)}\n`);
142
+ }
143
+ }
144
+ export function createA2UICatalog(options) {
145
+ const catalogComponents = Array.isArray(options.components)
146
+ ? Object.fromEntries(options.components.map(component => [component.name, component.schema]))
147
+ : options.components;
148
+ return {
149
+ catalogId: options.catalogId,
150
+ components: catalogComponents,
151
+ ...(options.functions ? { functions: options.functions } : {}),
152
+ ...(options.theme ? { theme: options.theme } : {}),
153
+ };
154
+ }
155
+ async function createTypeDocProject(options) {
156
+ const cwd = options.cwd ? path.resolve(options.cwd) : process.cwd();
157
+ // TypeDoc treats `entryPoints` as glob patterns and rejects Windows
158
+ // backslashes ("escapes a non-special character"). Force POSIX
159
+ // separators so the same paths work on Windows and *nix.
160
+ const sourceFiles = options.sourceFiles.map(sourceFile => path.resolve(cwd, sourceFile).replace(/\\/g, '/'));
161
+ if (sourceFiles.length === 0) {
162
+ throw new Error('No TypeDoc entry points were provided.');
163
+ }
164
+ const tsconfigPath = getTsconfigPath(cwd, options.tsconfig);
165
+ const bootstrapOptions = {
166
+ blockTags: [
167
+ ...OptionDefaults.blockTags,
168
+ '@a2uiCatalog',
169
+ '@a2uiFunction',
170
+ ],
171
+ entryPoints: sourceFiles,
172
+ excludePrivate: false,
173
+ excludeProtected: false,
174
+ readme: 'none',
175
+ skipErrorChecking: true,
176
+ sort: ['source-order'],
177
+ sortEntryPoints: false,
178
+ };
179
+ if (tsconfigPath) {
180
+ bootstrapOptions.tsconfig = tsconfigPath;
181
+ }
182
+ const app = await Application.bootstrap(bootstrapOptions);
183
+ const project = await app.convert();
184
+ if (!project) {
185
+ throw new Error('TypeDoc did not produce a project reflection.');
186
+ }
187
+ return project;
188
+ }
189
+ function collectSourceFiles(dir, files) {
190
+ for (const dirent of fs.readdirSync(dir, { withFileTypes: true })) {
191
+ const nextPath = path.join(dir, dirent.name);
192
+ if (dirent.isDirectory()) {
193
+ if (dirent.name === 'node_modules' || dirent.name === 'dist'
194
+ || dirent.name === '.turbo') {
195
+ continue;
196
+ }
197
+ collectSourceFiles(nextPath, files);
198
+ }
199
+ else if (dirent.isFile() && isSupportedSourceFile(nextPath)) {
200
+ files.push(nextPath);
201
+ }
202
+ }
203
+ }
204
+ function isSupportedSourceFile(filePath) {
205
+ if (filePath.endsWith('.d.ts')) {
206
+ return false;
207
+ }
208
+ return supportedSourceExtensions.has(path.extname(filePath));
209
+ }
210
+ function* walkReflections(reflection) {
211
+ for (const child of reflection.children ?? []) {
212
+ yield child;
213
+ yield* walkReflections(child);
214
+ }
215
+ }
216
+ function isInterfaceReflection(reflection) {
217
+ return reflection.kind === ReflectionKind.Interface
218
+ || reflection.kindString === 'Interface';
219
+ }
220
+ function pickFunctionSignature(reflection) {
221
+ if (reflection.signatures && reflection.signatures.length > 0) {
222
+ return reflection.signatures[0];
223
+ }
224
+ // Type alias / function-typed variable: `type x = (a: string) => boolean`.
225
+ const declarationSignatures = reflection.type?.declaration?.signatures;
226
+ if (declarationSignatures && declarationSignatures.length > 0) {
227
+ return declarationSignatures[0];
228
+ }
229
+ return undefined;
230
+ }
231
+ function createFunctionParametersSchema(signature, owner) {
232
+ const parameters = signature.parameters ?? [];
233
+ // A2UI 0.9 function calls carry `args: Record<string, any>`. The natural
234
+ // TypeScript convention is `function fn(args: { name: T1, ... }): R`. When
235
+ // we see exactly one inline-object parameter, unwrap it so the emitted
236
+ // schema describes the args record directly rather than nesting it under
237
+ // a synthetic `args` property.
238
+ if (parameters.length === 1) {
239
+ const only = parameters[0];
240
+ if (only.type?.type === 'reflection' && only.type.declaration) {
241
+ return parseFunctionObjectReflection(only.type.declaration, owner);
242
+ }
243
+ }
244
+ const schema = {
245
+ type: 'object',
246
+ properties: {},
247
+ required: [],
248
+ additionalProperties: false,
249
+ };
250
+ for (const parameter of parameters) {
251
+ if (!parameter.type) {
252
+ throw createReflectionError(owner, `Missing type for function parameter "${parameter.name}".`);
253
+ }
254
+ const propertySchema = parseFunctionParamType(parameter.type, parameter);
255
+ applyDocToSchema(propertySchema, parseComment(parameter.comment));
256
+ schema.properties[parameter.name] = propertySchema;
257
+ if (!isOptionalProperty(parameter)) {
258
+ schema.required.push(parameter.name);
259
+ }
260
+ }
261
+ return schema;
262
+ }
263
+ /**
264
+ * A relaxed sibling of `parseObjectReflection` used for function-arg shapes.
265
+ * Permits `any`/`unknown` so validators like `required(value)` and
266
+ * formatters like `formatString({ options })` can accept arbitrary inputs
267
+ * — the agent receives `{}` (no `type`) which is JSON-Schema-equivalent to
268
+ * "any value".
269
+ */
270
+ function parseFunctionObjectReflection(declaration, owner) {
271
+ if (declaration.children === undefined) {
272
+ throw createReflectionError(owner, `Missing object declaration for "${owner.name}".`);
273
+ }
274
+ const schema = {
275
+ type: 'object',
276
+ properties: {},
277
+ required: [],
278
+ additionalProperties: false,
279
+ };
280
+ for (const child of declaration.children) {
281
+ if (!isPropertyReflection(child)) {
282
+ continue;
283
+ }
284
+ if (!child.type) {
285
+ throw createReflectionError(child, `Missing type for "${child.name}".`);
286
+ }
287
+ const propertySchema = parseFunctionParamType(child.type, child);
288
+ applyDocToSchema(propertySchema, parseComment(child.comment));
289
+ schema.properties[child.name] = propertySchema;
290
+ if (!isOptionalProperty(child)) {
291
+ schema.required.push(child.name);
292
+ }
293
+ }
294
+ return schema;
295
+ }
296
+ function parseFunctionParamType(type, owner) {
297
+ if (type.type === 'intrinsic') {
298
+ const name = type.name ?? '';
299
+ if (name === 'unknown' || name === 'any') {
300
+ // JSON Schema for "any value" — drop the type constraint.
301
+ return {};
302
+ }
303
+ }
304
+ if (type.type === 'reflection' && type.declaration) {
305
+ return parseFunctionObjectReflection(type.declaration, owner);
306
+ }
307
+ if (type.type === 'array' && type.elementType) {
308
+ return {
309
+ type: 'array',
310
+ items: parseFunctionParamType(type.elementType, owner),
311
+ };
312
+ }
313
+ if (type.type === 'union' && type.types) {
314
+ const actualTypes = type.types.filter(t => !isUndefinedType(t));
315
+ if (actualTypes.length === 1) {
316
+ return parseFunctionParamType(actualTypes[0], owner);
317
+ }
318
+ if (actualTypes.some(t => t.type === 'intrinsic'
319
+ && (t.name === 'unknown' || t.name === 'any'))) {
320
+ return {};
321
+ }
322
+ }
323
+ if (type.type === 'reference') {
324
+ const referenceName = String(type.name ?? type.qualifiedName ?? '');
325
+ if (referenceName === 'Record' && type.typeArguments?.length === 2) {
326
+ return {
327
+ type: 'object',
328
+ additionalProperties: parseFunctionParamType(type.typeArguments[1], owner),
329
+ };
330
+ }
331
+ }
332
+ return parseTypeDocType(type, owner);
333
+ }
334
+ function resolveReturnType(signature, owner) {
335
+ const type = signature.type;
336
+ if (!type) {
337
+ return 'void';
338
+ }
339
+ return mapTypeToReturnType(type, owner);
340
+ }
341
+ function mapTypeToReturnType(type, owner) {
342
+ switch (type.type) {
343
+ case 'intrinsic': {
344
+ const name = type.name ?? '';
345
+ if (name === 'string' || name === 'number' || name === 'boolean'
346
+ || name === 'void' || name === 'any') {
347
+ return name;
348
+ }
349
+ throw createReflectionError(owner, `Unsupported function return type "${name}" for "${owner.name}". `
350
+ + `Expected string, number, boolean, array, object, any, or void.`);
351
+ }
352
+ case 'array':
353
+ return 'array';
354
+ case 'reflection':
355
+ case 'reference': {
356
+ const referenceName = String(type.name ?? type.qualifiedName ?? '');
357
+ if (referenceName === 'Promise') {
358
+ throw createReflectionError(owner, `Async functions are not supported by A2UI 0.9; "${owner.name}" `
359
+ + `must return a synchronous value.`);
360
+ }
361
+ if (referenceName === 'Array' || referenceName === 'ReadonlyArray') {
362
+ return 'array';
363
+ }
364
+ if (referenceName === 'Record' || type.type === 'reflection') {
365
+ return 'object';
366
+ }
367
+ return 'object';
368
+ }
369
+ case 'union': {
370
+ const actualTypes = (type.types ?? []).filter(candidate => !isUndefinedType(candidate));
371
+ if (actualTypes.length === 1) {
372
+ return mapTypeToReturnType(actualTypes[0], owner);
373
+ }
374
+ const mapped = actualTypes.map(candidate => mapTypeToReturnType(candidate, owner));
375
+ if (mapped.every(value => value === mapped[0])) {
376
+ return mapped[0];
377
+ }
378
+ return 'any';
379
+ }
380
+ case 'literal': {
381
+ switch (typeof type.value) {
382
+ case 'string':
383
+ return 'string';
384
+ case 'number':
385
+ return 'number';
386
+ case 'boolean':
387
+ return 'boolean';
388
+ default:
389
+ return 'any';
390
+ }
391
+ }
392
+ default:
393
+ return 'any';
394
+ }
395
+ }
396
+ function isPropertyReflection(reflection) {
397
+ return reflection.kind === ReflectionKind.Property
398
+ || reflection.kindString === 'Property';
399
+ }
400
+ function createComponentSchema(reflection, parsedDoc) {
401
+ if (reflection.children === undefined) {
402
+ throw createReflectionError(reflection, `Missing interface member declarations for "${reflection.name}".`);
403
+ }
404
+ const schema = { properties: {}, required: [] };
405
+ applyDocToSchema(schema, parsedDoc);
406
+ for (const child of reflection.children) {
407
+ if (child.inheritedFrom) {
408
+ continue;
409
+ }
410
+ if (!isPropertyReflection(child)) {
411
+ continue;
412
+ }
413
+ if (!child.type) {
414
+ throw createReflectionError(child, `Missing type for "${child.name}".`);
415
+ }
416
+ const propertySchema = parseTypeDocType(child.type, child);
417
+ applyDocToSchema(propertySchema, parseComment(child.comment));
418
+ schema.properties[child.name] = propertySchema;
419
+ if (!isOptionalProperty(child)) {
420
+ schema.required.push(child.name);
421
+ }
422
+ }
423
+ return schema;
424
+ }
425
+ function parseTypeDocType(type, owner) {
426
+ switch (type.type) {
427
+ case 'intrinsic':
428
+ return parseIntrinsicType(type.name ?? '', owner);
429
+ case 'literal':
430
+ return parseLiteralType(type.value, owner);
431
+ case 'union':
432
+ if (!type.types) {
433
+ throw createReflectionError(owner, `Missing union members for "${owner.name}".`);
434
+ }
435
+ return parseUnionType(type.types, owner);
436
+ case 'array':
437
+ if (!type.elementType) {
438
+ throw createReflectionError(owner, `Missing array element type for "${owner.name}".`);
439
+ }
440
+ return {
441
+ type: 'array',
442
+ items: parseTypeDocType(type.elementType, owner),
443
+ };
444
+ case 'reflection':
445
+ if (!type.declaration) {
446
+ throw createReflectionError(owner, `Missing reflection declaration for "${owner.name}".`);
447
+ }
448
+ return parseObjectReflection(type.declaration, owner);
449
+ case 'reference':
450
+ return parseReferenceType(type, owner);
451
+ case 'typeOperator':
452
+ if (!type.target) {
453
+ throw createReflectionError(owner, `Missing type operator target for "${owner.name}".`);
454
+ }
455
+ return parseTypeDocType(type.target, owner);
456
+ default:
457
+ if (type.elementType) {
458
+ return parseTypeDocType(type.elementType, owner);
459
+ }
460
+ throw createReflectionError(owner, `Unsupported TypeDoc type "${type.type}" for "${owner.name}".`);
461
+ }
462
+ }
463
+ function parseIntrinsicType(name, owner) {
464
+ switch (name) {
465
+ case 'string':
466
+ case 'number':
467
+ case 'boolean':
468
+ return { type: name };
469
+ case 'any':
470
+ case 'unknown':
471
+ case 'undefined':
472
+ case 'null':
473
+ case 'never':
474
+ case 'void':
475
+ throw createReflectionError(owner, `Unsupported ambiguous intrinsic TypeDoc type "${name}" for "${owner.name}".`);
476
+ default:
477
+ throw createReflectionError(owner, `Unsupported intrinsic TypeDoc type "${name}" for "${owner.name}".`);
478
+ }
479
+ }
480
+ function parseLiteralType(value, owner) {
481
+ switch (typeof value) {
482
+ case 'string':
483
+ return { type: 'string', enum: [value] };
484
+ case 'number':
485
+ return { type: 'number', enum: [value] };
486
+ case 'bigint':
487
+ throw createReflectionError(owner, `Unsupported bigint literal for "${owner.name}".`);
488
+ case 'boolean':
489
+ return { type: 'boolean', enum: [value] };
490
+ default:
491
+ throw createReflectionError(owner, `Unsupported nullish literal for "${owner.name}".`);
492
+ }
493
+ }
494
+ function parseUnionType(types, owner) {
495
+ if (types.length === 0) {
496
+ throw createReflectionError(owner, `Missing union members for "${owner.name}".`);
497
+ }
498
+ if (types.some(type => isNullType(type))) {
499
+ throw createReflectionError(owner, `Unsupported nullable union for "${owner.name}".`);
500
+ }
501
+ const actualTypes = types.filter(type => !isUndefinedType(type));
502
+ if (actualTypes.length === 0) {
503
+ throw createReflectionError(owner, `Unsupported undefined-only union for "${owner.name}".`);
504
+ }
505
+ if (actualTypes.length === 1) {
506
+ return parseTypeDocType(actualTypes[0], owner);
507
+ }
508
+ const stringLiteralValues = actualTypes.map(type => getStringLiteralValue(type));
509
+ if (stringLiteralValues.every(value => value !== undefined)) {
510
+ return { type: 'string', enum: stringLiteralValues };
511
+ }
512
+ if (actualTypes.length === 2
513
+ && actualTypes.every(type => type.type === 'literal' && typeof type.value === 'boolean')) {
514
+ return { type: 'boolean' };
515
+ }
516
+ const oneOf = [];
517
+ for (const childType of actualTypes) {
518
+ const schema = parseTypeDocType(childType, owner);
519
+ if (!oneOf.some(existing => schemasEqual(existing, schema))) {
520
+ oneOf.push(schema);
521
+ }
522
+ }
523
+ return oneOf.length === 1 ? oneOf[0] : { oneOf };
524
+ }
525
+ function parseObjectReflection(declaration, owner) {
526
+ if (declaration.children === undefined) {
527
+ throw createReflectionError(owner, `Missing object declaration for "${owner.name}".`);
528
+ }
529
+ const schema = {
530
+ type: 'object',
531
+ properties: {},
532
+ required: [],
533
+ additionalProperties: false,
534
+ };
535
+ for (const child of declaration.children) {
536
+ if (!isPropertyReflection(child)) {
537
+ continue;
538
+ }
539
+ if (!child.type) {
540
+ throw createReflectionError(child, `Missing type for "${child.name}".`);
541
+ }
542
+ const propertySchema = parseTypeDocType(child.type, child);
543
+ applyDocToSchema(propertySchema, parseComment(child.comment));
544
+ schema.properties[child.name] = propertySchema;
545
+ if (!isOptionalProperty(child)) {
546
+ schema.required.push(child.name);
547
+ }
548
+ }
549
+ return schema;
550
+ }
551
+ function parseReferenceType(type, owner) {
552
+ const typeName = String(type.name ?? type.qualifiedName ?? '');
553
+ const typeArguments = type.typeArguments ?? [];
554
+ if ((typeName === 'Array' || typeName === 'ReadonlyArray')
555
+ && typeArguments.length === 1) {
556
+ return {
557
+ type: 'array',
558
+ items: parseTypeDocType(typeArguments[0], owner),
559
+ };
560
+ }
561
+ if (typeName === 'Record' && typeArguments.length === 2) {
562
+ const keyType = typeArguments[0];
563
+ if (!isStringKeyType(keyType)) {
564
+ throw createReflectionError(owner, 'A2UI catalog Record keys must be string-compatible.');
565
+ }
566
+ const valueType = typeArguments[1];
567
+ if (isAmbiguousIntrinsicType(valueType)) {
568
+ return {
569
+ type: 'object',
570
+ additionalProperties: true,
571
+ };
572
+ }
573
+ return {
574
+ type: 'object',
575
+ additionalProperties: parseTypeDocType(valueType, owner),
576
+ };
577
+ }
578
+ throw createReflectionError(owner, `Unsupported TypeDoc reference "${typeName}" for "${owner.name}". Use an inline type literal, array, union, or Record<string, T>.`);
579
+ }
580
+ function parseComment(comment) {
581
+ if (!comment) {
582
+ return {};
583
+ }
584
+ const parsedDoc = {};
585
+ const summary = normalizeDescription(renderCommentParts(comment.summary));
586
+ if (summary) {
587
+ parsedDoc.description = summary;
588
+ }
589
+ if (hasModifierTag(comment, '@deprecated')) {
590
+ parsedDoc.deprecated = true;
591
+ }
592
+ for (const block of comment.blockTags ?? []) {
593
+ const content = normalizeDescription(renderCommentParts(block.content));
594
+ switch (block.tag) {
595
+ case '@a2uiCatalog':
596
+ parsedDoc.a2uiCatalogName = content;
597
+ break;
598
+ case '@a2uiFunction':
599
+ parsedDoc.a2uiFunctionName = content;
600
+ break;
601
+ case '@remarks':
602
+ if (content) {
603
+ parsedDoc.description = parsedDoc.description
604
+ ? `${parsedDoc.description}\n\n${content}`
605
+ : content;
606
+ }
607
+ break;
608
+ case '@default':
609
+ case '@defaultValue':
610
+ if (content) {
611
+ parsedDoc.defaultValue = parseDefaultValue(content);
612
+ }
613
+ break;
614
+ case '@deprecated':
615
+ parsedDoc.deprecated = true;
616
+ break;
617
+ default:
618
+ break;
619
+ }
620
+ }
621
+ return parsedDoc;
622
+ }
623
+ function applyDocToSchema(schema, parsedDoc) {
624
+ if (parsedDoc.description) {
625
+ schema.description = parsedDoc.description;
626
+ }
627
+ if (parsedDoc.defaultValue !== undefined) {
628
+ schema.default = parsedDoc.defaultValue;
629
+ }
630
+ if (parsedDoc.deprecated) {
631
+ schema.deprecated = true;
632
+ }
633
+ }
634
+ function renderCommentParts(parts) {
635
+ return (parts ?? []).map(part => renderCommentPart(part)).join('');
636
+ }
637
+ function renderCommentPart(part) {
638
+ if (part.text !== undefined) {
639
+ return part.text;
640
+ }
641
+ if (part.code !== undefined) {
642
+ return `\`${part.code}\``;
643
+ }
644
+ if (part.content) {
645
+ return renderCommentParts(part.content);
646
+ }
647
+ if (part.kind === 'softBreak') {
648
+ return ' ';
649
+ }
650
+ return '';
651
+ }
652
+ function normalizeDescription(text) {
653
+ return text.replace(/[ \t\r\n]+/g, ' ').trim();
654
+ }
655
+ function parseDefaultValue(text) {
656
+ const trimmed = unwrapCodeSpan(text.trim());
657
+ if (trimmed === 'undefined') {
658
+ return undefined;
659
+ }
660
+ try {
661
+ return JSON.parse(trimmed);
662
+ }
663
+ catch {
664
+ return trimmed;
665
+ }
666
+ }
667
+ function unwrapCodeSpan(text) {
668
+ if (text.startsWith('`') && text.endsWith('`') && text.length >= 2) {
669
+ return text.slice(1, -1);
670
+ }
671
+ return text;
672
+ }
673
+ function hasModifierTag(comment, tag) {
674
+ const modifierTags = comment.modifierTags;
675
+ if (!modifierTags) {
676
+ return false;
677
+ }
678
+ if (typeof modifierTags.has === 'function') {
679
+ return modifierTags.has(tag);
680
+ }
681
+ return Boolean(modifierTags[tag]);
682
+ }
683
+ function isOptionalProperty(reflection) {
684
+ return reflection.flags?.isOptional === true
685
+ || (reflection.type ? typeIncludesUndefined(reflection.type) : false);
686
+ }
687
+ function typeIncludesUndefined(type) {
688
+ if (type.type !== 'union') {
689
+ return false;
690
+ }
691
+ return (type.types ?? []).some(childType => isUndefinedType(childType));
692
+ }
693
+ function isUndefinedType(type) {
694
+ return type.type === 'intrinsic' && type.name === 'undefined';
695
+ }
696
+ function isNullType(type) {
697
+ return (type.type === 'intrinsic' && type.name === 'null')
698
+ || (type.type === 'literal' && type.value === null);
699
+ }
700
+ function isAmbiguousIntrinsicType(type) {
701
+ return type.type === 'intrinsic'
702
+ && (type.name === 'unknown' || type.name === 'any');
703
+ }
704
+ function getStringLiteralValue(type) {
705
+ if (type.type === 'literal' && typeof type.value === 'string') {
706
+ return type.value;
707
+ }
708
+ return undefined;
709
+ }
710
+ function isStringKeyType(type) {
711
+ if (type.type === 'intrinsic' && type.name === 'string') {
712
+ return true;
713
+ }
714
+ if (type.type === 'union') {
715
+ return (type.types ?? []).every(childType => childType.type === 'literal' && typeof childType.value === 'string');
716
+ }
717
+ return false;
718
+ }
719
+ function getReflectionFilePath(reflection, cwd) {
720
+ const source = reflection.sources?.[0];
721
+ if (!source) {
722
+ return '';
723
+ }
724
+ if (source.fullFileName) {
725
+ return path.resolve(source.fullFileName);
726
+ }
727
+ if (source.fileName) {
728
+ return path.resolve(cwd, source.fileName);
729
+ }
730
+ return '';
731
+ }
732
+ function createReflectionError(reflection, message) {
733
+ const source = reflection.sources?.[0];
734
+ if (!source) {
735
+ return new Error(message);
736
+ }
737
+ const fileName = source.fullFileName ?? source.fileName ?? '';
738
+ const line = source.line ? `:${source.line}` : '';
739
+ const character = source.character ? `:${source.character}` : '';
740
+ return new Error(`${fileName}${line}${character} ${message}`.trim());
741
+ }
742
+ function inferCatalogName(interfaceName) {
743
+ return interfaceName.replace(/(?:Component)?Props$/, '');
744
+ }
745
+ function schemasEqual(left, right) {
746
+ return JSON.stringify(left) === JSON.stringify(right);
747
+ }
748
+ function getTsconfigPath(cwd, tsconfig) {
749
+ if (tsconfig) {
750
+ return path.resolve(cwd, tsconfig);
751
+ }
752
+ const defaultTsconfig = path.join(cwd, 'tsconfig.json');
753
+ return fs.existsSync(defaultTsconfig) ? defaultTsconfig : undefined;
754
+ }
755
+ //# sourceMappingURL=index.js.map