@specverse/engine-realize 3.5.3

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 (420) hide show
  1. package/assets/examples/09-api/ai-spec.yaml +194 -0
  2. package/assets/examples/09-api/converted.yaml +95 -0
  3. package/assets/examples/09-api/diagram-architecture.mmd +10 -0
  4. package/assets/examples/09-api/diagram-er.mmd +10 -0
  5. package/assets/examples/09-api/documentation.html +104 -0
  6. package/assets/examples/09-api/documentation.md +95 -0
  7. package/assets/examples/09-api/inferred-spec.yaml +420 -0
  8. package/assets/examples/09-api/openapi.json +61 -0
  9. package/assets/examples/10-api/README.md +216 -0
  10. package/assets/examples/10-api/ai-spec.yaml +194 -0
  11. package/assets/examples/10-api/converted.yaml +96 -0
  12. package/assets/examples/10-api/diagram-architecture.mmd +10 -0
  13. package/assets/examples/10-api/diagram-er.mmd +10 -0
  14. package/assets/examples/10-api/documentation.html +104 -0
  15. package/assets/examples/10-api/documentation.md +95 -0
  16. package/assets/examples/10-api/inferred-spec.yaml +7 -0
  17. package/assets/examples/10-api/metadata.yaml +89 -0
  18. package/assets/examples/10-api/openapi.json +61 -0
  19. package/assets/examples/10-api/package-integration-test.js +177 -0
  20. package/assets/examples/10-api/usage-example.js +323 -0
  21. package/assets/examples/10-api/usage-example.ts +363 -0
  22. package/assets/examples/10-api/workflow-test.js +113 -0
  23. package/assets/examples/manifests/01-simple-default-mappings.yaml +36 -0
  24. package/assets/examples/manifests/02-capability-mappings.yaml +55 -0
  25. package/assets/examples/manifests/03-hybrid-mappings.yaml +109 -0
  26. package/assets/examples/manifests/README.md +245 -0
  27. package/assets/examples/manifests/backend-only.yaml +43 -0
  28. package/assets/examples/manifests/blog-api.md +78 -0
  29. package/assets/examples/manifests/blog-api.specly +79 -0
  30. package/assets/examples/manifests/frontend-only.yaml +27 -0
  31. package/assets/examples/manifests/fullstack-app.yaml +44 -0
  32. package/assets/examples/manifests/fullstack-monorepo.yaml +62 -0
  33. package/assets/examples/validate-examples-with-expected-failures.cjs +328 -0
  34. package/assets/examples/validate-examples.cjs +225 -0
  35. package/assets/examples-decomposed/cloud-native-manifest.example.yaml +8 -0
  36. package/assets/examples-decomposed/cloud-native-manifest.md +379 -0
  37. package/assets/examples-decomposed/cloud-native-manifest.specly +60 -0
  38. package/assets/examples-decomposed/docker-compose-manifest.example.yaml +8 -0
  39. package/assets/examples-decomposed/docker-compose-manifest.md +326 -0
  40. package/assets/examples-decomposed/docker-compose-manifest.specly +40 -0
  41. package/assets/examples-decomposed/kubernetes-deployment-manifest.example.yaml +8 -0
  42. package/assets/examples-decomposed/kubernetes-deployment-manifest.md +237 -0
  43. package/assets/examples-decomposed/kubernetes-deployment-manifest.specly +41 -0
  44. package/assets/templates/README.md +559 -0
  45. package/assets/templates/TEMPLATE-ENHANCEMENTS-V33.md +462 -0
  46. package/assets/templates/backend-only/CLAUDE.md +73 -0
  47. package/assets/templates/backend-only/README.md +197 -0
  48. package/assets/templates/backend-only/deployments/README.md +149 -0
  49. package/assets/templates/backend-only/deployments/development.specly +53 -0
  50. package/assets/templates/backend-only/deployments/production.specly +87 -0
  51. package/assets/templates/backend-only/docs/README.md +50 -0
  52. package/assets/templates/backend-only/docs/api/README.md +7 -0
  53. package/assets/templates/backend-only/docs/diagrams/README.md +85 -0
  54. package/assets/templates/backend-only/docs/example-documentation-template.md +269 -0
  55. package/assets/templates/backend-only/docs/guides/README.md +15 -0
  56. package/assets/templates/backend-only/dot.env.example +18 -0
  57. package/assets/templates/backend-only/generated/README.md +56 -0
  58. package/assets/templates/backend-only/generated/code/integration-test.template.js +320 -0
  59. package/assets/templates/backend-only/generated/code/package.json.template +34 -0
  60. package/assets/templates/backend-only/generated/docs/README.md +49 -0
  61. package/assets/templates/backend-only/gitignore +54 -0
  62. package/assets/templates/backend-only/manifests/README.md +72 -0
  63. package/assets/templates/backend-only/manifests/docker-compose.specly +91 -0
  64. package/assets/templates/backend-only/manifests/implementation.yaml +100 -0
  65. package/assets/templates/backend-only/manifests/kubernetes.specly +140 -0
  66. package/assets/templates/backend-only/package.json +59 -0
  67. package/assets/templates/backend-only/scripts/test-all.sh +160 -0
  68. package/assets/templates/backend-only/scripts/test-generated-code.sh +165 -0
  69. package/assets/templates/backend-only/specs/main.specly +67 -0
  70. package/assets/templates/default/CLAUDE.md +141 -0
  71. package/assets/templates/default/README.md +404 -0
  72. package/assets/templates/default/deployments/README.md +149 -0
  73. package/assets/templates/default/deployments/development.specly +53 -0
  74. package/assets/templates/default/deployments/production.specly +87 -0
  75. package/assets/templates/default/docs/README.md +50 -0
  76. package/assets/templates/default/docs/api/README.md +7 -0
  77. package/assets/templates/default/docs/diagrams/README.md +85 -0
  78. package/assets/templates/default/docs/example-documentation-template.md +269 -0
  79. package/assets/templates/default/docs/guides/README.md +15 -0
  80. package/assets/templates/default/dot.env.example +18 -0
  81. package/assets/templates/default/generated/README.md +56 -0
  82. package/assets/templates/default/generated/code/integration-test.template.js +320 -0
  83. package/assets/templates/default/generated/code/package.json.template +34 -0
  84. package/assets/templates/default/generated/docs/README.md +49 -0
  85. package/assets/templates/default/gitignore +54 -0
  86. package/assets/templates/default/manifests/README.md +72 -0
  87. package/assets/templates/default/manifests/docker-compose.specly +91 -0
  88. package/assets/templates/default/manifests/implementation.yaml +176 -0
  89. package/assets/templates/default/manifests/kubernetes.specly +140 -0
  90. package/assets/templates/default/package.json +61 -0
  91. package/assets/templates/default/scripts/test-all.sh +160 -0
  92. package/assets/templates/default/scripts/test-generated-code.sh +165 -0
  93. package/assets/templates/default/specs/main.specly +67 -0
  94. package/assets/templates/frontend-only/CLAUDE.md +75 -0
  95. package/assets/templates/frontend-only/README.md +231 -0
  96. package/assets/templates/frontend-only/deployments/README.md +149 -0
  97. package/assets/templates/frontend-only/deployments/development.specly +53 -0
  98. package/assets/templates/frontend-only/deployments/production.specly +87 -0
  99. package/assets/templates/frontend-only/docs/README.md +50 -0
  100. package/assets/templates/frontend-only/docs/api/README.md +7 -0
  101. package/assets/templates/frontend-only/docs/diagrams/README.md +85 -0
  102. package/assets/templates/frontend-only/docs/example-documentation-template.md +269 -0
  103. package/assets/templates/frontend-only/docs/guides/README.md +15 -0
  104. package/assets/templates/frontend-only/dot.env.example +18 -0
  105. package/assets/templates/frontend-only/generated/README.md +56 -0
  106. package/assets/templates/frontend-only/generated/code/integration-test.template.js +320 -0
  107. package/assets/templates/frontend-only/generated/code/package.json.template +34 -0
  108. package/assets/templates/frontend-only/generated/docs/README.md +49 -0
  109. package/assets/templates/frontend-only/gitignore +54 -0
  110. package/assets/templates/frontend-only/manifests/README.md +72 -0
  111. package/assets/templates/frontend-only/manifests/docker-compose.specly +91 -0
  112. package/assets/templates/frontend-only/manifests/implementation.yaml +58 -0
  113. package/assets/templates/frontend-only/manifests/kubernetes.specly +140 -0
  114. package/assets/templates/frontend-only/package.json +59 -0
  115. package/assets/templates/frontend-only/scripts/test-all.sh +160 -0
  116. package/assets/templates/frontend-only/scripts/test-generated-code.sh +165 -0
  117. package/assets/templates/frontend-only/specs/main.specly +57 -0
  118. package/assets/templates/full-stack/AI-GUIDE.md +60 -0
  119. package/assets/templates/full-stack/CLAUDE.md +141 -0
  120. package/assets/templates/full-stack/README.md +382 -0
  121. package/assets/templates/full-stack/archive/AI-GUIDE-legacy.md +392 -0
  122. package/assets/templates/full-stack/deployments/README.md +149 -0
  123. package/assets/templates/full-stack/deployments/development.specly +53 -0
  124. package/assets/templates/full-stack/deployments/production.specly +87 -0
  125. package/assets/templates/full-stack/docs/README.md +51 -0
  126. package/assets/templates/full-stack/docs/api/README.md +7 -0
  127. package/assets/templates/full-stack/docs/diagrams/README.md +85 -0
  128. package/assets/templates/full-stack/docs/example-documentation-template.md +269 -0
  129. package/assets/templates/full-stack/docs/guides/README.md +15 -0
  130. package/assets/templates/full-stack/generated/README.md +56 -0
  131. package/assets/templates/full-stack/generated/code/integration-test.template.js +320 -0
  132. package/assets/templates/full-stack/generated/code/package.json.template +34 -0
  133. package/assets/templates/full-stack/generated/docs/README.md +49 -0
  134. package/assets/templates/full-stack/gitignore +54 -0
  135. package/assets/templates/full-stack/manifests/README.md +72 -0
  136. package/assets/templates/full-stack/manifests/docker-compose.specly +91 -0
  137. package/assets/templates/full-stack/manifests/implementation.yaml +155 -0
  138. package/assets/templates/full-stack/manifests/kubernetes.specly +140 -0
  139. package/assets/templates/full-stack/package.json +45 -0
  140. package/assets/templates/full-stack/scripts/test-all.sh +160 -0
  141. package/assets/templates/full-stack/scripts/test-generated-code.sh +165 -0
  142. package/assets/templates/full-stack/specs/example-v33.specly +297 -0
  143. package/assets/templates/full-stack/specs/main-simple.specly +73 -0
  144. package/assets/templates/full-stack/specs/main.specly +408 -0
  145. package/dist/engines/code-generator.d.ts +86 -0
  146. package/dist/engines/code-generator.d.ts.map +1 -0
  147. package/dist/engines/code-generator.js +159 -0
  148. package/dist/engines/code-generator.js.map +1 -0
  149. package/dist/engines/engine-registry.d.ts +94 -0
  150. package/dist/engines/engine-registry.d.ts.map +1 -0
  151. package/dist/engines/engine-registry.js +163 -0
  152. package/dist/engines/engine-registry.js.map +1 -0
  153. package/dist/engines/index.d.ts +10 -0
  154. package/dist/engines/index.d.ts.map +1 -0
  155. package/dist/engines/index.js +12 -0
  156. package/dist/engines/index.js.map +1 -0
  157. package/dist/engines/typescript-engine.d.ts +74 -0
  158. package/dist/engines/typescript-engine.d.ts.map +1 -0
  159. package/dist/engines/typescript-engine.js +288 -0
  160. package/dist/engines/typescript-engine.js.map +1 -0
  161. package/dist/generators/index.d.ts +11 -0
  162. package/dist/generators/index.d.ts.map +1 -0
  163. package/dist/generators/index.js +11 -0
  164. package/dist/generators/index.js.map +1 -0
  165. package/dist/index.d.ts +48 -0
  166. package/dist/index.d.ts.map +1 -0
  167. package/dist/index.js +434 -0
  168. package/dist/index.js.map +1 -0
  169. package/dist/library/index.d.ts +12 -0
  170. package/dist/library/index.d.ts.map +1 -0
  171. package/dist/library/index.js +15 -0
  172. package/dist/library/index.js.map +1 -0
  173. package/dist/library/library.d.ts +132 -0
  174. package/dist/library/library.d.ts.map +1 -0
  175. package/dist/library/library.js +343 -0
  176. package/dist/library/library.js.map +1 -0
  177. package/dist/library/loader.d.ts +73 -0
  178. package/dist/library/loader.d.ts.map +1 -0
  179. package/dist/library/loader.js +150 -0
  180. package/dist/library/loader.js.map +1 -0
  181. package/dist/library/resolver.d.ts +104 -0
  182. package/dist/library/resolver.d.ts.map +1 -0
  183. package/dist/library/resolver.js +299 -0
  184. package/dist/library/resolver.js.map +1 -0
  185. package/dist/library/validator.d.ts +65 -0
  186. package/dist/library/validator.d.ts.map +1 -0
  187. package/dist/library/validator.js +203 -0
  188. package/dist/library/validator.js.map +1 -0
  189. package/dist/types/index.d.ts +7 -0
  190. package/dist/types/index.d.ts.map +1 -0
  191. package/dist/types/index.js +7 -0
  192. package/dist/types/index.js.map +1 -0
  193. package/dist/types/instance-factory.d.ts +289 -0
  194. package/dist/types/instance-factory.d.ts.map +1 -0
  195. package/dist/types/instance-factory.js +8 -0
  196. package/dist/types/instance-factory.js.map +1 -0
  197. package/dist/types/unified-mappings.d.ts +163 -0
  198. package/dist/types/unified-mappings.d.ts.map +1 -0
  199. package/dist/types/unified-mappings.js +110 -0
  200. package/dist/types/unified-mappings.js.map +1 -0
  201. package/dist/utils/ai-spec-loader.d.ts +77 -0
  202. package/dist/utils/ai-spec-loader.d.ts.map +1 -0
  203. package/dist/utils/ai-spec-loader.js +138 -0
  204. package/dist/utils/ai-spec-loader.js.map +1 -0
  205. package/dist/utils/index.d.ts +9 -0
  206. package/dist/utils/index.d.ts.map +1 -0
  207. package/dist/utils/index.js +9 -0
  208. package/dist/utils/index.js.map +1 -0
  209. package/dist/utils/manifest-loader.d.ts +107 -0
  210. package/dist/utils/manifest-loader.d.ts.map +1 -0
  211. package/dist/utils/manifest-loader.js +168 -0
  212. package/dist/utils/manifest-loader.js.map +1 -0
  213. package/dist/utils/mapping-migration.d.ts +53 -0
  214. package/dist/utils/mapping-migration.d.ts.map +1 -0
  215. package/dist/utils/mapping-migration.js +194 -0
  216. package/dist/utils/mapping-migration.js.map +1 -0
  217. package/libs/instance-factories/CURVED-INTERFACE.md +278 -0
  218. package/libs/instance-factories/README.md +433 -0
  219. package/libs/instance-factories/applications/generic-app.yaml +52 -0
  220. package/libs/instance-factories/applications/react-app.yaml +186 -0
  221. package/libs/instance-factories/applications/templates/generic/backend-env-generator.ts +31 -0
  222. package/libs/instance-factories/applications/templates/generic/backend-package-json-generator.ts +80 -0
  223. package/libs/instance-factories/applications/templates/generic/backend-tsconfig-generator.ts +69 -0
  224. package/libs/instance-factories/applications/templates/generic/main-generator.ts +308 -0
  225. package/libs/instance-factories/applications/templates/react/_view-components-source.ts +555 -0
  226. package/libs/instance-factories/applications/templates/react/api-client-generator.ts +436 -0
  227. package/libs/instance-factories/applications/templates/react/api-types-generator.ts +153 -0
  228. package/libs/instance-factories/applications/templates/react/app-tsx-generator.ts +94 -0
  229. package/libs/instance-factories/applications/templates/react/env-example-generator.ts +24 -0
  230. package/libs/instance-factories/applications/templates/react/field-helpers-generator.ts +106 -0
  231. package/libs/instance-factories/applications/templates/react/gitignore-generator.ts +38 -0
  232. package/libs/instance-factories/applications/templates/react/index-css-generator.ts +85 -0
  233. package/libs/instance-factories/applications/templates/react/index-html-generator.ts +30 -0
  234. package/libs/instance-factories/applications/templates/react/main-tsx-generator.ts +34 -0
  235. package/libs/instance-factories/applications/templates/react/package-json-generator.ts +54 -0
  236. package/libs/instance-factories/applications/templates/react/pattern-adapter-generator.ts +179 -0
  237. package/libs/instance-factories/applications/templates/react/react-pattern-adapter.tsx +1347 -0
  238. package/libs/instance-factories/applications/templates/react/relationship-field-generator.ts +150 -0
  239. package/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.ts +704 -0
  240. package/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.ts +84 -0
  241. package/libs/instance-factories/applications/templates/react/tsconfig-generator.ts +35 -0
  242. package/libs/instance-factories/applications/templates/react/use-api-hooks-generator.ts +121 -0
  243. package/libs/instance-factories/applications/templates/react/view-dashboard-generator.ts +150 -0
  244. package/libs/instance-factories/applications/templates/react/view-detail-generator.ts +150 -0
  245. package/libs/instance-factories/applications/templates/react/view-form-generator.ts +362 -0
  246. package/libs/instance-factories/applications/templates/react/view-list-generator.ts +98 -0
  247. package/libs/instance-factories/applications/templates/react/view-router-generator.ts +89 -0
  248. package/libs/instance-factories/applications/templates/react/vite-config-generator.ts +49 -0
  249. package/libs/instance-factories/archived/fastify-prisma.yaml +104 -0
  250. package/libs/instance-factories/cli/commander-js.yaml +55 -0
  251. package/libs/instance-factories/cli/templates/commander/cli-entry-generator.d.ts +12 -0
  252. package/libs/instance-factories/cli/templates/commander/cli-entry-generator.d.ts.map +1 -0
  253. package/libs/instance-factories/cli/templates/commander/cli-entry-generator.js +115 -0
  254. package/libs/instance-factories/cli/templates/commander/cli-entry-generator.js.map +1 -0
  255. package/libs/instance-factories/cli/templates/commander/cli-entry-generator.ts +145 -0
  256. package/libs/instance-factories/cli/templates/commander/command-generator.d.ts +14 -0
  257. package/libs/instance-factories/cli/templates/commander/command-generator.d.ts.map +1 -0
  258. package/libs/instance-factories/cli/templates/commander/command-generator.js +182 -0
  259. package/libs/instance-factories/cli/templates/commander/command-generator.js.map +1 -0
  260. package/libs/instance-factories/cli/templates/commander/command-generator.ts +992 -0
  261. package/libs/instance-factories/communication/event-emitter.yaml +56 -0
  262. package/libs/instance-factories/communication/rabbitmq-events.yaml +87 -0
  263. package/libs/instance-factories/communication/templates/eventemitter/bus-generator.ts +93 -0
  264. package/libs/instance-factories/communication/templates/eventemitter/publisher-generator.ts +117 -0
  265. package/libs/instance-factories/communication/templates/eventemitter/subscriber-generator.ts +101 -0
  266. package/libs/instance-factories/controllers/fastify.yaml +127 -0
  267. package/libs/instance-factories/controllers/templates/fastify/meta-routes-generator.ts +103 -0
  268. package/libs/instance-factories/controllers/templates/fastify/routes-generator.ts +389 -0
  269. package/libs/instance-factories/controllers/templates/fastify/server-generator.ts +76 -0
  270. package/libs/instance-factories/infrastructure/docker-k8s.yaml +61 -0
  271. package/libs/instance-factories/infrastructure/templates/docker-k8s/infrastructure-generator.ts +46 -0
  272. package/libs/instance-factories/orms/prisma.yaml +89 -0
  273. package/libs/instance-factories/orms/templates/prisma/schema-generator.ts +563 -0
  274. package/libs/instance-factories/orms/templates/prisma/services-generator.ts +408 -0
  275. package/libs/instance-factories/scaffolding/generic-scaffold.yaml +65 -0
  276. package/libs/instance-factories/scaffolding/templates/generic/env-example-generator.ts +73 -0
  277. package/libs/instance-factories/scaffolding/templates/generic/env-generator.ts +85 -0
  278. package/libs/instance-factories/scaffolding/templates/generic/gitignore-generator.ts +69 -0
  279. package/libs/instance-factories/scaffolding/templates/generic/package-json-generator.ts +176 -0
  280. package/libs/instance-factories/scaffolding/templates/generic/readme-generator.ts +207 -0
  281. package/libs/instance-factories/scaffolding/templates/generic/tsconfig-generator.ts +78 -0
  282. package/libs/instance-factories/scaffolding/templates/generic/tsconfig-react-generator.ts +41 -0
  283. package/libs/instance-factories/sdks/python-sdk.yaml +66 -0
  284. package/libs/instance-factories/sdks/templates/python/sdk-generator.ts +50 -0
  285. package/libs/instance-factories/sdks/templates/typescript/sdk-generator.ts +49 -0
  286. package/libs/instance-factories/sdks/typescript-sdk.yaml +59 -0
  287. package/libs/instance-factories/services/prisma-services.yaml +71 -0
  288. package/libs/instance-factories/services/templates/prisma/behavior-generator.ts +303 -0
  289. package/libs/instance-factories/services/templates/prisma/controller-generator.ts +532 -0
  290. package/libs/instance-factories/services/templates/prisma/service-generator.ts +315 -0
  291. package/libs/instance-factories/shared/path-resolver.ts +111 -0
  292. package/libs/instance-factories/storage/mongodb.yaml +79 -0
  293. package/libs/instance-factories/storage/postgresql.yaml +75 -0
  294. package/libs/instance-factories/storage/redis.yaml +79 -0
  295. package/libs/instance-factories/storage/templates/mongodb/config-generator.ts +15 -0
  296. package/libs/instance-factories/storage/templates/mongodb/docker-generator.ts +18 -0
  297. package/libs/instance-factories/storage/templates/postgresql/config-generator.ts +54 -0
  298. package/libs/instance-factories/storage/templates/postgresql/docker-generator.ts +55 -0
  299. package/libs/instance-factories/storage/templates/redis/config-generator.ts +16 -0
  300. package/libs/instance-factories/storage/templates/redis/docker-generator.ts +18 -0
  301. package/libs/instance-factories/test-generation.ts +192 -0
  302. package/libs/instance-factories/testing/templates/vitest/tests-generator.ts +51 -0
  303. package/libs/instance-factories/testing/vitest-tests.yaml +63 -0
  304. package/libs/instance-factories/tools/templates/mcp/mcp-server-generator.ts +136 -0
  305. package/libs/instance-factories/tools/templates/mcp/static/docs/DEPLOYMENT_GUIDE.md +630 -0
  306. package/libs/instance-factories/tools/templates/mcp/static/docs/HYBRID_RESOURCE_SYSTEM.md +330 -0
  307. package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/EXTENSION_DEPLOYMENT.md +552 -0
  308. package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/LOCAL_DEPLOYMENT.md +164 -0
  309. package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/WEB_DEPLOYMENT.md +247 -0
  310. package/libs/instance-factories/tools/templates/mcp/static/package.json +92 -0
  311. package/libs/instance-factories/tools/templates/mcp/static/scripts/build-enterprise.js +284 -0
  312. package/libs/instance-factories/tools/templates/mcp/static/scripts/build-extension.js +139 -0
  313. package/libs/instance-factories/tools/templates/mcp/static/scripts/build-local.js +74 -0
  314. package/libs/instance-factories/tools/templates/mcp/static/scripts/build-web.js +156 -0
  315. package/libs/instance-factories/tools/templates/mcp/static/scripts/copy-canonical-files.js +41 -0
  316. package/libs/instance-factories/tools/templates/mcp/static/scripts/test-deployments.js +259 -0
  317. package/libs/instance-factories/tools/templates/mcp/static/scripts/test-hybrid-resources.js +231 -0
  318. package/libs/instance-factories/tools/templates/mcp/static/scripts/test-hybrid-simple.js +196 -0
  319. package/libs/instance-factories/tools/templates/mcp/static/src/controllers/MCPServerController.ts +293 -0
  320. package/libs/instance-factories/tools/templates/mcp/static/src/events/EventEmitter.ts +90 -0
  321. package/libs/instance-factories/tools/templates/mcp/static/src/index.ts +24 -0
  322. package/libs/instance-factories/tools/templates/mcp/static/src/interfaces/ResourceProvider.ts +15 -0
  323. package/libs/instance-factories/tools/templates/mcp/static/src/models/LibrarySuggestion.ts +106 -0
  324. package/libs/instance-factories/tools/templates/mcp/static/src/models/SpecVerseResource.ts +75 -0
  325. package/libs/instance-factories/tools/templates/mcp/static/src/server/mcp-server.ts +239 -0
  326. package/libs/instance-factories/tools/templates/mcp/static/src/services/CLIProxyService.ts +1501 -0
  327. package/libs/instance-factories/tools/templates/mcp/static/src/services/EmbeddedResourcesAdapter.ts +211 -0
  328. package/libs/instance-factories/tools/templates/mcp/static/src/services/EntityModuleService.ts +308 -0
  329. package/libs/instance-factories/tools/templates/mcp/static/src/services/HybridResourcesProvider.ts +210 -0
  330. package/libs/instance-factories/tools/templates/mcp/static/src/services/LibraryToolsService.ts +356 -0
  331. package/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorBridge.ts +524 -0
  332. package/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorToolsService.ts +530 -0
  333. package/libs/instance-factories/tools/templates/mcp/static/src/services/PromptToolsService.ts +594 -0
  334. package/libs/instance-factories/tools/templates/mcp/static/src/services/ResourcesProviderService.ts +170 -0
  335. package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/CLIProxyService.init.test.ts +544 -0
  336. package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/CLIProxyService.test.ts +189 -0
  337. package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/ResourcesProviderService.test.ts +89 -0
  338. package/libs/instance-factories/tools/templates/mcp/static/src/types/index.ts +110 -0
  339. package/libs/instance-factories/tools/templates/mcp/static/tsconfig.json +28 -0
  340. package/libs/instance-factories/tools/templates/vscode/static/extension.ts +1195 -0
  341. package/libs/instance-factories/tools/templates/vscode/static/language-configuration.json +34 -0
  342. package/libs/instance-factories/tools/templates/vscode/static/schemas/specverse-v3-schema.json +4279 -0
  343. package/libs/instance-factories/tools/templates/vscode/static/syntaxes/specverse.tmLanguage.json +138 -0
  344. package/libs/instance-factories/tools/templates/vscode/static/themes/README.md +74 -0
  345. package/libs/instance-factories/tools/templates/vscode/static/themes/complete-specverse-colors.json +122 -0
  346. package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-basic-theme.json +65 -0
  347. package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-complete-theme.json +123 -0
  348. package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-theme-colors.json +64 -0
  349. package/libs/instance-factories/tools/templates/vscode/vscode-extension-generator.ts +214 -0
  350. package/libs/instance-factories/validation/templates/zod/validation-generator.ts +46 -0
  351. package/libs/instance-factories/validation/zod.yaml +56 -0
  352. package/libs/instance-factories/views/index.d.ts +13 -0
  353. package/libs/instance-factories/views/index.d.ts.map +1 -0
  354. package/libs/instance-factories/views/index.js +18 -0
  355. package/libs/instance-factories/views/index.js.map +1 -0
  356. package/libs/instance-factories/views/index.ts +45 -0
  357. package/libs/instance-factories/views/react-components.yaml +129 -0
  358. package/libs/instance-factories/views/templates/ARCHITECTURE.md +198 -0
  359. package/libs/instance-factories/views/templates/react/adapters/antd-adapter.ts +869 -0
  360. package/libs/instance-factories/views/templates/react/adapters/mui-adapter.ts +953 -0
  361. package/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.ts +806 -0
  362. package/libs/instance-factories/views/templates/react/app-generator.ts +55 -0
  363. package/libs/instance-factories/views/templates/react/components-generator.ts +391 -0
  364. package/libs/instance-factories/views/templates/react/forms-generator.ts +343 -0
  365. package/libs/instance-factories/views/templates/react/frontend-package-json-generator.ts +54 -0
  366. package/libs/instance-factories/views/templates/react/hooks-generator.ts +122 -0
  367. package/libs/instance-factories/views/templates/react/index-css-generator.ts +209 -0
  368. package/libs/instance-factories/views/templates/react/index-html-generator.ts +34 -0
  369. package/libs/instance-factories/views/templates/react/main-tsx-generator.ts +29 -0
  370. package/libs/instance-factories/views/templates/react/react-component-generator.d.ts +152 -0
  371. package/libs/instance-factories/views/templates/react/react-component-generator.d.ts.map +1 -0
  372. package/libs/instance-factories/views/templates/react/react-component-generator.js +398 -0
  373. package/libs/instance-factories/views/templates/react/react-component-generator.js.map +1 -0
  374. package/libs/instance-factories/views/templates/react/react-component-generator.ts +533 -0
  375. package/libs/instance-factories/views/templates/react/router-generator.ts +197 -0
  376. package/libs/instance-factories/views/templates/react/router-generic-generator.ts +103 -0
  377. package/libs/instance-factories/views/templates/react/spec-json-generator.ts +17 -0
  378. package/libs/instance-factories/views/templates/react/types-generator.ts +76 -0
  379. package/libs/instance-factories/views/templates/react/views-metadata-generator.ts +42 -0
  380. package/libs/instance-factories/views/templates/react/vite-config-generator.ts +38 -0
  381. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.d.ts.map +1 -0
  382. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js.map +1 -0
  383. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.ts +474 -0
  384. package/libs/instance-factories/views/templates/shared/__tests__/composite-patterns.test.ts +242 -0
  385. package/libs/instance-factories/views/templates/shared/adapter-types.d.ts +77 -0
  386. package/libs/instance-factories/views/templates/shared/adapter-types.d.ts.map +1 -0
  387. package/libs/instance-factories/views/templates/shared/adapter-types.js +47 -0
  388. package/libs/instance-factories/views/templates/shared/adapter-types.js.map +1 -0
  389. package/libs/instance-factories/views/templates/shared/adapter-types.ts +142 -0
  390. package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts +63 -0
  391. package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts.map +1 -0
  392. package/libs/instance-factories/views/templates/shared/atomic-components-registry.js +822 -0
  393. package/libs/instance-factories/views/templates/shared/atomic-components-registry.js.map +1 -0
  394. package/libs/instance-factories/views/templates/shared/atomic-components-registry.ts +908 -0
  395. package/libs/instance-factories/views/templates/shared/base-generator.d.ts +247 -0
  396. package/libs/instance-factories/views/templates/shared/base-generator.d.ts.map +1 -0
  397. package/libs/instance-factories/views/templates/shared/base-generator.js +363 -0
  398. package/libs/instance-factories/views/templates/shared/base-generator.js.map +1 -0
  399. package/libs/instance-factories/views/templates/shared/base-generator.ts +608 -0
  400. package/libs/instance-factories/views/templates/shared/component-metadata.d.ts +254 -0
  401. package/libs/instance-factories/views/templates/shared/component-metadata.d.ts.map +1 -0
  402. package/libs/instance-factories/views/templates/shared/component-metadata.js +602 -0
  403. package/libs/instance-factories/views/templates/shared/component-metadata.js.map +1 -0
  404. package/libs/instance-factories/views/templates/shared/component-metadata.ts +803 -0
  405. package/libs/instance-factories/views/templates/shared/composite-pattern-types.ts +250 -0
  406. package/libs/instance-factories/views/templates/shared/composite-patterns.ts +535 -0
  407. package/libs/instance-factories/views/templates/shared/index.ts +68 -0
  408. package/libs/instance-factories/views/templates/shared/pattern-validator.ts +279 -0
  409. package/libs/instance-factories/views/templates/shared/property-mapper.d.ts +149 -0
  410. package/libs/instance-factories/views/templates/shared/property-mapper.d.ts.map +1 -0
  411. package/libs/instance-factories/views/templates/shared/property-mapper.js +580 -0
  412. package/libs/instance-factories/views/templates/shared/property-mapper.js.map +1 -0
  413. package/libs/instance-factories/views/templates/shared/property-mapper.ts +700 -0
  414. package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts +143 -0
  415. package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts.map +1 -0
  416. package/libs/instance-factories/views/templates/shared/syntax-mapper.js +420 -0
  417. package/libs/instance-factories/views/templates/shared/syntax-mapper.js.map +1 -0
  418. package/libs/instance-factories/views/templates/shared/syntax-mapper.ts +539 -0
  419. package/package.json +42 -0
  420. package/schema/SPECVERSE-SCHEMA.json +4274 -0
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Syntax Mapper - Framework Syntax Patterns
3
+ *
4
+ * Maps universal programming patterns to framework-specific syntax.
5
+ * Enables consistent code generation across React, Vue, Svelte, Angular, and runtime.
6
+ *
7
+ * Architecture:
8
+ * - SyntaxPattern: Template strings for each framework
9
+ * - SYNTAX_PATTERNS: Universal patterns (state, loops, events, conditions, imports)
10
+ * - getSyntaxPattern(): Template variable replacement
11
+ *
12
+ * Example:
13
+ * getSyntaxPattern('stateDeclaration', 'react', {name: 'count', initial: '0'})
14
+ * → "const [count, setCount] = useState(0);"
15
+ */
16
+ /**
17
+ * All supported framework targets for syntax generation
18
+ */
19
+ export type FrameworkTarget = 'react' | 'vue' | 'svelte' | 'angular' | 'runtime';
20
+ /**
21
+ * Syntax pattern definition for a single programming pattern
22
+ * Maps each framework to its specific syntax template
23
+ */
24
+ export interface SyntaxPattern {
25
+ react: string;
26
+ vue: string;
27
+ svelte: string;
28
+ angular: string;
29
+ runtime: string;
30
+ }
31
+ /**
32
+ * Available syntax pattern categories
33
+ */
34
+ export type SyntaxPatternKey = 'stateDeclaration' | 'stateUpdate' | 'stateGetter' | 'loopRender' | 'conditionalRender' | 'componentRender' | 'eventHandler' | 'eventBinding' | 'onMount' | 'onUnmount' | 'onUpdate' | 'propDeclaration' | 'propAccess' | 'propBinding' | 'componentImport' | 'hookImport' | 'libraryImport';
35
+ /**
36
+ * State Management Patterns
37
+ */
38
+ export declare const STATE_PATTERNS: Record<string, SyntaxPattern>;
39
+ /**
40
+ * Rendering Patterns
41
+ */
42
+ export declare const RENDER_PATTERNS: Record<string, SyntaxPattern>;
43
+ /**
44
+ * Event Handling Patterns
45
+ */
46
+ export declare const EVENT_PATTERNS: Record<string, SyntaxPattern>;
47
+ /**
48
+ * Lifecycle Patterns
49
+ */
50
+ export declare const LIFECYCLE_PATTERNS: Record<string, SyntaxPattern>;
51
+ /**
52
+ * Props/Attributes Patterns
53
+ */
54
+ export declare const PROP_PATTERNS: Record<string, SyntaxPattern>;
55
+ /**
56
+ * Import Patterns
57
+ */
58
+ export declare const IMPORT_PATTERNS: Record<string, SyntaxPattern>;
59
+ /**
60
+ * All syntax patterns organized by category
61
+ */
62
+ export declare const SYNTAX_PATTERNS: Record<SyntaxPatternKey, SyntaxPattern>;
63
+ /**
64
+ * Replaces template variables in a pattern string
65
+ *
66
+ * Template variables use ${variableName} syntax.
67
+ * Special handling for capitalization: ${Name} will capitalize first letter
68
+ *
69
+ * @param template - Template string with ${variables}
70
+ * @param variables - Object mapping variable names to values
71
+ * @returns String with variables replaced
72
+ */
73
+ export declare function replaceTemplateVariables(template: string, variables: Record<string, any>): string;
74
+ /**
75
+ * Gets a syntax pattern for a specific framework with variable replacement
76
+ *
77
+ * @param pattern - The syntax pattern key to use
78
+ * @param framework - Target framework
79
+ * @param variables - Variables to replace in template
80
+ * @returns Generated code string for the framework
81
+ */
82
+ export declare function getSyntaxPattern(pattern: SyntaxPatternKey, framework: FrameworkTarget, variables: Record<string, any>): string;
83
+ /**
84
+ * Gets all framework implementations of a pattern
85
+ *
86
+ * Useful for documentation or comparison
87
+ *
88
+ * @param pattern - The syntax pattern key
89
+ * @param variables - Variables to replace in templates
90
+ * @returns Object mapping frameworks to generated code
91
+ */
92
+ export declare function getAllFrameworkSyntax(pattern: SyntaxPatternKey, variables: Record<string, any>): Record<FrameworkTarget, string>;
93
+ /**
94
+ * Checks if a pattern is available for a framework
95
+ *
96
+ * @param pattern - The syntax pattern key
97
+ * @param framework - Target framework
98
+ * @returns True if pattern exists for framework
99
+ */
100
+ export declare function hasPattern(pattern: SyntaxPatternKey, framework: FrameworkTarget): boolean;
101
+ /**
102
+ * Gets all available pattern keys
103
+ *
104
+ * @returns Array of all syntax pattern keys
105
+ */
106
+ export declare function getAllPatternKeys(): SyntaxPatternKey[];
107
+ /**
108
+ * Gets pattern keys by category
109
+ *
110
+ * @param category - Pattern category
111
+ * @returns Array of pattern keys in that category
112
+ */
113
+ export declare function getPatternsByCategory(category: 'state' | 'render' | 'event' | 'lifecycle' | 'prop' | 'import'): SyntaxPatternKey[];
114
+ /**
115
+ * Generate state management code for a framework
116
+ * Convenience function that combines declaration and update patterns
117
+ *
118
+ * @param framework - Target framework
119
+ * @param stateName - Name of state variable
120
+ * @param stateType - TypeScript type
121
+ * @param initialValue - Initial value
122
+ * @returns Object with declaration and updater syntax
123
+ */
124
+ export declare function generateStateCode(framework: FrameworkTarget, stateName: string, stateType: string, initialValue: string): {
125
+ declaration: string;
126
+ update: (value: string) => string;
127
+ get: string;
128
+ };
129
+ /**
130
+ * Generate event handler code for a framework
131
+ *
132
+ * @param framework - Target framework
133
+ * @param eventName - Name of event (e.g., 'click', 'submit')
134
+ * @param handlerName - Name of handler function
135
+ * @param params - Handler parameters
136
+ * @param body - Handler body code
137
+ * @returns Object with handler function and binding syntax
138
+ */
139
+ export declare function generateEventCode(framework: FrameworkTarget, eventName: string, handlerName: string, params: string, body: string): {
140
+ handler: string;
141
+ binding: string;
142
+ };
143
+ //# sourceMappingURL=syntax-mapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syntax-mapper.d.ts","sourceRoot":"","sources":["syntax-mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAExB,kBAAkB,GAClB,aAAa,GACb,aAAa,GAEb,YAAY,GACZ,mBAAmB,GACnB,iBAAiB,GAEjB,cAAc,GACd,cAAc,GAEd,SAAS,GACT,WAAW,GACX,UAAU,GAEV,iBAAiB,GACjB,YAAY,GACZ,aAAa,GAEb,iBAAiB,GACjB,YAAY,GACZ,eAAe,CAAC;AAMpB;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAoCxD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eA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,WAAW,GAAG,MAAM,GAAG,QAAQ,GACvE,gBAAgB,EAAE,CAWpB;AAMD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,eAAe,EAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAiBzE;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,eAAe,EAC1B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CActC"}
@@ -0,0 +1,420 @@
1
+ /**
2
+ * Syntax Mapper - Framework Syntax Patterns
3
+ *
4
+ * Maps universal programming patterns to framework-specific syntax.
5
+ * Enables consistent code generation across React, Vue, Svelte, Angular, and runtime.
6
+ *
7
+ * Architecture:
8
+ * - SyntaxPattern: Template strings for each framework
9
+ * - SYNTAX_PATTERNS: Universal patterns (state, loops, events, conditions, imports)
10
+ * - getSyntaxPattern(): Template variable replacement
11
+ *
12
+ * Example:
13
+ * getSyntaxPattern('stateDeclaration', 'react', {name: 'count', initial: '0'})
14
+ * → "const [count, setCount] = useState(0);"
15
+ */
16
+ // ============================================================================
17
+ // Syntax Pattern Definitions
18
+ // ============================================================================
19
+ /**
20
+ * State Management Patterns
21
+ */
22
+ export const STATE_PATTERNS = {
23
+ /**
24
+ * Declare a state variable
25
+ * Variables: name, Name (capitalized), type (optional), initial
26
+ */
27
+ stateDeclaration: {
28
+ react: 'const [${name}, set${Name}] = useState<${type}>(${initial});',
29
+ vue: 'const ${name} = ref<${type}>(${initial});',
30
+ svelte: 'let ${name}: ${type} = ${initial};',
31
+ angular: '${name}: ${type} = ${initial};',
32
+ runtime: 'const [${name}, set${Name}] = useState<${type}>(${initial});'
33
+ },
34
+ /**
35
+ * Update a state variable
36
+ * Variables: name, Name (capitalized), value
37
+ */
38
+ stateUpdate: {
39
+ react: 'set${Name}(${value});',
40
+ vue: '${name}.value = ${value};',
41
+ svelte: '${name} = ${value};',
42
+ angular: 'this.${name} = ${value};',
43
+ runtime: 'set${Name}(${value});'
44
+ },
45
+ /**
46
+ * Access a state variable value
47
+ * Variables: name
48
+ */
49
+ stateGetter: {
50
+ react: '${name}',
51
+ vue: '${name}.value',
52
+ svelte: '${name}',
53
+ angular: 'this.${name}',
54
+ runtime: '${name}'
55
+ }
56
+ };
57
+ /**
58
+ * Rendering Patterns
59
+ */
60
+ export const RENDER_PATTERNS = {
61
+ /**
62
+ * Render array of items with loop
63
+ * Variables: array, item, key, Component
64
+ */
65
+ loopRender: {
66
+ react: '{${array}.map((${item}) => <${Component} key={${item}.${key}} ${item}={${item}} />)}',
67
+ vue: '<${Component} v-for="${item} in ${array}" :key="${item}.${key}" :${item}="${item}" />',
68
+ svelte: '{#each ${array} as ${item} (${item}.${key})}<${Component} ${item}={${item}} />{/each}',
69
+ angular: '<${component} *ngFor="let ${item} of ${array}; trackBy: track${Item}" [${item}]="${item}"></${component}>',
70
+ runtime: '{${array}.map((${item}) => createElement(${Component}, { key: ${item}.${key}, ${item} }))}'
71
+ },
72
+ /**
73
+ * Conditional rendering
74
+ * Variables: condition, Component, props (optional)
75
+ */
76
+ conditionalRender: {
77
+ react: '{${condition} && <${Component} ${props} />}',
78
+ vue: '<${Component} v-if="${condition}" ${props} />',
79
+ svelte: '{#if ${condition}}<${Component} ${props} />{/if}',
80
+ angular: '<${component} *ngIf="${condition}" ${props}></${component}>',
81
+ runtime: '{${condition} && createElement(${Component}, ${props})}'
82
+ },
83
+ /**
84
+ * Render a component with props
85
+ * Variables: Component, props
86
+ */
87
+ componentRender: {
88
+ react: '<${Component} ${props} />',
89
+ vue: '<${Component} ${props} />',
90
+ svelte: '<${Component} ${props} />',
91
+ angular: '<${component} ${props}></${component}>',
92
+ runtime: 'createElement(${Component}, ${props})'
93
+ }
94
+ };
95
+ /**
96
+ * Event Handling Patterns
97
+ */
98
+ export const EVENT_PATTERNS = {
99
+ /**
100
+ * Declare event handler function
101
+ * Variables: name, Name (capitalized), params, body
102
+ */
103
+ eventHandler: {
104
+ react: 'const handle${Name} = (${params}) => {\n ${body}\n};',
105
+ vue: 'const handle${Name} = (${params}) => {\n ${body}\n};',
106
+ svelte: 'function handle${Name}(${params}) {\n ${body}\n}',
107
+ angular: 'handle${Name}(${params}): void {\n ${body}\n}',
108
+ runtime: 'const handle${Name} = (${params}) => {\n ${body}\n};'
109
+ },
110
+ /**
111
+ * Bind event to handler
112
+ * Variables: event, handler
113
+ */
114
+ eventBinding: {
115
+ react: '${event}={${handler}}',
116
+ vue: '@${event}="${handler}"',
117
+ svelte: 'on:${event}={${handler}}',
118
+ angular: '(${event})="${handler}($event)"',
119
+ runtime: '${event}: ${handler}'
120
+ }
121
+ };
122
+ /**
123
+ * Lifecycle Patterns
124
+ */
125
+ export const LIFECYCLE_PATTERNS = {
126
+ /**
127
+ * Component mount lifecycle
128
+ * Variables: body
129
+ */
130
+ onMount: {
131
+ react: 'useEffect(() => {\n ${body}\n}, []);',
132
+ vue: 'onMounted(() => {\n ${body}\n});',
133
+ svelte: 'onMount(() => {\n ${body}\n});',
134
+ angular: 'ngOnInit(): void {\n ${body}\n}',
135
+ runtime: 'useEffect(() => {\n ${body}\n}, []);'
136
+ },
137
+ /**
138
+ * Component unmount lifecycle
139
+ * Variables: body
140
+ */
141
+ onUnmount: {
142
+ react: 'useEffect(() => {\n return () => {\n ${body}\n };\n}, []);',
143
+ vue: 'onUnmounted(() => {\n ${body}\n});',
144
+ svelte: 'onDestroy(() => {\n ${body}\n});',
145
+ angular: 'ngOnDestroy(): void {\n ${body}\n}',
146
+ runtime: 'useEffect(() => {\n return () => {\n ${body}\n };\n}, []);'
147
+ },
148
+ /**
149
+ * Value change/update lifecycle
150
+ * Variables: dependencies, body
151
+ */
152
+ onUpdate: {
153
+ react: 'useEffect(() => {\n ${body}\n}, [${dependencies}]);',
154
+ vue: 'watch([${dependencies}], () => {\n ${body}\n});',
155
+ svelte: '$: if (${dependencies}) {\n ${body}\n}',
156
+ angular: 'ngOnChanges(changes: SimpleChanges): void {\n ${body}\n}',
157
+ runtime: 'useEffect(() => {\n ${body}\n}, [${dependencies}]);'
158
+ }
159
+ };
160
+ /**
161
+ * Props/Attributes Patterns
162
+ */
163
+ export const PROP_PATTERNS = {
164
+ /**
165
+ * Declare component props/properties
166
+ * Variables: name, type, required (boolean)
167
+ */
168
+ propDeclaration: {
169
+ react: '${name}${required ? "" : "?"}: ${type}',
170
+ vue: '${name}: { type: ${type}, required: ${required} }',
171
+ svelte: 'export let ${name}: ${type}${required ? "" : " | undefined"};',
172
+ angular: '@Input() ${name}${required ? "!" : "?"}: ${type};',
173
+ runtime: '${name}${required ? "" : "?"}: ${type}'
174
+ },
175
+ /**
176
+ * Access props inside component
177
+ * Variables: name
178
+ */
179
+ propAccess: {
180
+ react: '${name}',
181
+ vue: 'props.${name}',
182
+ svelte: '${name}',
183
+ angular: 'this.${name}',
184
+ runtime: '${name}'
185
+ },
186
+ /**
187
+ * Bind prop value to component
188
+ * Variables: name, value
189
+ */
190
+ propBinding: {
191
+ react: '${name}={${value}}',
192
+ vue: ':${name}="${value}"',
193
+ svelte: '${name}={${value}}',
194
+ angular: '[${name}]="${value}"',
195
+ runtime: '${name}: ${value}'
196
+ }
197
+ };
198
+ /**
199
+ * Import Patterns
200
+ */
201
+ export const IMPORT_PATTERNS = {
202
+ /**
203
+ * Import a component
204
+ * Variables: Component, path
205
+ */
206
+ componentImport: {
207
+ react: "import ${Component} from '${path}';",
208
+ vue: "import ${Component} from '${path}';",
209
+ svelte: "import ${Component} from '${path}';",
210
+ angular: "import { ${Component} } from '${path}';",
211
+ runtime: "import ${Component} from '${path}';"
212
+ },
213
+ /**
214
+ * Import hooks/composables
215
+ * Variables: hooks (comma-separated), source
216
+ */
217
+ hookImport: {
218
+ react: "import { ${hooks} } from '${source}';",
219
+ vue: "import { ${hooks} } from '${source}';",
220
+ svelte: "import { ${hooks} } from '${source}';",
221
+ angular: "import { ${hooks} } from '${source}';",
222
+ runtime: "import { ${hooks} } from '${source}';"
223
+ },
224
+ /**
225
+ * Import from library
226
+ * Variables: exports, library
227
+ */
228
+ libraryImport: {
229
+ react: "import { ${exports} } from '${library}';",
230
+ vue: "import { ${exports} } from '${library}';",
231
+ svelte: "import { ${exports} } from '${library}';",
232
+ angular: "import { ${exports} } from '${library}';",
233
+ runtime: "import { ${exports} } from '${library}';"
234
+ }
235
+ };
236
+ /**
237
+ * All syntax patterns organized by category
238
+ */
239
+ export const SYNTAX_PATTERNS = {
240
+ // State
241
+ stateDeclaration: STATE_PATTERNS.stateDeclaration,
242
+ stateUpdate: STATE_PATTERNS.stateUpdate,
243
+ stateGetter: STATE_PATTERNS.stateGetter,
244
+ // Rendering
245
+ loopRender: RENDER_PATTERNS.loopRender,
246
+ conditionalRender: RENDER_PATTERNS.conditionalRender,
247
+ componentRender: RENDER_PATTERNS.componentRender,
248
+ // Events
249
+ eventHandler: EVENT_PATTERNS.eventHandler,
250
+ eventBinding: EVENT_PATTERNS.eventBinding,
251
+ // Lifecycle
252
+ onMount: LIFECYCLE_PATTERNS.onMount,
253
+ onUnmount: LIFECYCLE_PATTERNS.onUnmount,
254
+ onUpdate: LIFECYCLE_PATTERNS.onUpdate,
255
+ // Props
256
+ propDeclaration: PROP_PATTERNS.propDeclaration,
257
+ propAccess: PROP_PATTERNS.propAccess,
258
+ propBinding: PROP_PATTERNS.propBinding,
259
+ // Imports
260
+ componentImport: IMPORT_PATTERNS.componentImport,
261
+ hookImport: IMPORT_PATTERNS.hookImport,
262
+ libraryImport: IMPORT_PATTERNS.libraryImport
263
+ };
264
+ // ============================================================================
265
+ // Template Replacement Functions
266
+ // ============================================================================
267
+ /**
268
+ * Replaces template variables in a pattern string
269
+ *
270
+ * Template variables use ${variableName} syntax.
271
+ * Special handling for capitalization: ${Name} will capitalize first letter
272
+ *
273
+ * @param template - Template string with ${variables}
274
+ * @param variables - Object mapping variable names to values
275
+ * @returns String with variables replaced
276
+ */
277
+ export function replaceTemplateVariables(template, variables) {
278
+ let result = template;
279
+ // Replace all ${variable} patterns
280
+ for (const [key, value] of Object.entries(variables)) {
281
+ // Handle capitalized version (e.g., ${Name} from ${name})
282
+ const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
283
+ const capitalizedPattern = new RegExp(`\\$\\{${capitalizedKey}\\}`, 'g');
284
+ result = result.replace(capitalizedPattern, String(value).charAt(0).toUpperCase() + String(value).slice(1));
285
+ // Handle normal version (e.g., ${name})
286
+ const normalPattern = new RegExp(`\\$\\{${key}\\}`, 'g');
287
+ result = result.replace(normalPattern, String(value));
288
+ }
289
+ // Handle conditional expressions in template (e.g., ${required ? "" : "?"})
290
+ // This is a simple evaluator for common patterns
291
+ result = result.replace(/\$\{(\w+)\s*\?\s*"([^"]*)"\s*:\s*"([^"]*)"\}/g, (match, varName, trueVal, falseVal) => {
292
+ const varValue = variables[varName];
293
+ return varValue ? trueVal : falseVal;
294
+ });
295
+ return result;
296
+ }
297
+ /**
298
+ * Gets a syntax pattern for a specific framework with variable replacement
299
+ *
300
+ * @param pattern - The syntax pattern key to use
301
+ * @param framework - Target framework
302
+ * @param variables - Variables to replace in template
303
+ * @returns Generated code string for the framework
304
+ */
305
+ export function getSyntaxPattern(pattern, framework, variables) {
306
+ const syntaxPattern = SYNTAX_PATTERNS[pattern];
307
+ if (!syntaxPattern) {
308
+ throw new Error(`Unknown syntax pattern: ${pattern}`);
309
+ }
310
+ const template = syntaxPattern[framework];
311
+ if (!template) {
312
+ throw new Error(`Framework ${framework} not supported for pattern ${pattern}`);
313
+ }
314
+ return replaceTemplateVariables(template, variables);
315
+ }
316
+ /**
317
+ * Gets all framework implementations of a pattern
318
+ *
319
+ * Useful for documentation or comparison
320
+ *
321
+ * @param pattern - The syntax pattern key
322
+ * @param variables - Variables to replace in templates
323
+ * @returns Object mapping frameworks to generated code
324
+ */
325
+ export function getAllFrameworkSyntax(pattern, variables) {
326
+ const frameworks = ['react', 'vue', 'svelte', 'angular', 'runtime'];
327
+ const result = {};
328
+ for (const framework of frameworks) {
329
+ result[framework] = getSyntaxPattern(pattern, framework, variables);
330
+ }
331
+ return result;
332
+ }
333
+ /**
334
+ * Checks if a pattern is available for a framework
335
+ *
336
+ * @param pattern - The syntax pattern key
337
+ * @param framework - Target framework
338
+ * @returns True if pattern exists for framework
339
+ */
340
+ export function hasPattern(pattern, framework) {
341
+ const syntaxPattern = SYNTAX_PATTERNS[pattern];
342
+ return Boolean(syntaxPattern && syntaxPattern[framework] !== undefined);
343
+ }
344
+ /**
345
+ * Gets all available pattern keys
346
+ *
347
+ * @returns Array of all syntax pattern keys
348
+ */
349
+ export function getAllPatternKeys() {
350
+ return Object.keys(SYNTAX_PATTERNS);
351
+ }
352
+ /**
353
+ * Gets pattern keys by category
354
+ *
355
+ * @param category - Pattern category
356
+ * @returns Array of pattern keys in that category
357
+ */
358
+ export function getPatternsByCategory(category) {
359
+ const categoryMap = {
360
+ state: ['stateDeclaration', 'stateUpdate', 'stateGetter'],
361
+ render: ['loopRender', 'conditionalRender', 'componentRender'],
362
+ event: ['eventHandler', 'eventBinding'],
363
+ lifecycle: ['onMount', 'onUnmount', 'onUpdate'],
364
+ prop: ['propDeclaration', 'propAccess', 'propBinding'],
365
+ import: ['componentImport', 'hookImport', 'libraryImport']
366
+ };
367
+ return categoryMap[category] || [];
368
+ }
369
+ // ============================================================================
370
+ // Framework-Specific Helpers
371
+ // ============================================================================
372
+ /**
373
+ * Generate state management code for a framework
374
+ * Convenience function that combines declaration and update patterns
375
+ *
376
+ * @param framework - Target framework
377
+ * @param stateName - Name of state variable
378
+ * @param stateType - TypeScript type
379
+ * @param initialValue - Initial value
380
+ * @returns Object with declaration and updater syntax
381
+ */
382
+ export function generateStateCode(framework, stateName, stateType, initialValue) {
383
+ const declaration = getSyntaxPattern('stateDeclaration', framework, {
384
+ name: stateName,
385
+ Name: stateName.charAt(0).toUpperCase() + stateName.slice(1),
386
+ type: stateType,
387
+ initial: initialValue
388
+ });
389
+ const update = (value) => getSyntaxPattern('stateUpdate', framework, {
390
+ name: stateName,
391
+ Name: stateName.charAt(0).toUpperCase() + stateName.slice(1),
392
+ value
393
+ });
394
+ const get = getSyntaxPattern('stateGetter', framework, { name: stateName });
395
+ return { declaration, update, get };
396
+ }
397
+ /**
398
+ * Generate event handler code for a framework
399
+ *
400
+ * @param framework - Target framework
401
+ * @param eventName - Name of event (e.g., 'click', 'submit')
402
+ * @param handlerName - Name of handler function
403
+ * @param params - Handler parameters
404
+ * @param body - Handler body code
405
+ * @returns Object with handler function and binding syntax
406
+ */
407
+ export function generateEventCode(framework, eventName, handlerName, params, body) {
408
+ const handler = getSyntaxPattern('eventHandler', framework, {
409
+ name: handlerName,
410
+ Name: handlerName.charAt(0).toUpperCase() + handlerName.slice(1),
411
+ params,
412
+ body
413
+ });
414
+ const binding = getSyntaxPattern('eventBinding', framework, {
415
+ event: eventName,
416
+ handler: `handle${handlerName.charAt(0).toUpperCase() + handlerName.slice(1)}`
417
+ });
418
+ return { handler, binding };
419
+ }
420
+ //# sourceMappingURL=syntax-mapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syntax-mapper.js","sourceRoot":"","sources":["syntax-mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAmDH,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkC;IAC3D;;;OAGG;IACH,gBAAgB,EAAE;QAChB,KAAK,EAAE,8DAA8D;QACrE,GAAG,EAAE,2CAA2C;QAChD,MAAM,EAAE,oCAAoC;QAC5C,OAAO,EAAE,gCAA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