@antheo/morph 0.0.0-stage → 0.3.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 (464) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +266 -2
  3. package/SKILL.md +61 -0
  4. package/dist/ai/cli-provider.d.ts +80 -0
  5. package/dist/ai/cli-provider.js +250 -0
  6. package/dist/ai/gate.d.ts +39 -0
  7. package/dist/ai/gate.js +124 -0
  8. package/dist/ai/provider.d.ts +36 -0
  9. package/dist/ai/provider.js +168 -0
  10. package/dist/ai/repair.d.ts +90 -0
  11. package/dist/ai/repair.js +172 -0
  12. package/dist/analyzer/deps.d.ts +30 -0
  13. package/dist/analyzer/deps.js +265 -0
  14. package/dist/analyzer/manifest.d.ts +5 -0
  15. package/dist/analyzer/manifest.js +119 -0
  16. package/dist/analyzer/parse.d.ts +21 -0
  17. package/dist/analyzer/parse.js +29 -0
  18. package/dist/batch-worker.d.ts +16 -0
  19. package/dist/batch-worker.js +10 -0
  20. package/dist/batch.d.ts +26 -0
  21. package/dist/batch.js +227 -0
  22. package/dist/bridge/index.d.ts +26 -0
  23. package/dist/bridge/index.js +138 -0
  24. package/dist/bridge/props.d.ts +56 -0
  25. package/dist/bridge/props.js +191 -0
  26. package/dist/bridge/wrappers.d.ts +24 -0
  27. package/dist/bridge/wrappers.js +276 -0
  28. package/dist/cli/format.d.ts +7 -0
  29. package/dist/cli/format.js +30 -0
  30. package/dist/cli.d.ts +2 -0
  31. package/dist/cli.js +492 -0
  32. package/dist/fonts/carry.d.ts +34 -0
  33. package/dist/fonts/carry.js +113 -0
  34. package/dist/fonts/fallback.d.ts +11 -0
  35. package/dist/fonts/fallback.js +21 -0
  36. package/dist/fonts/google.d.ts +65 -0
  37. package/dist/fonts/google.js +343 -0
  38. package/dist/fonts/index.d.ts +27 -0
  39. package/dist/fonts/index.js +48 -0
  40. package/dist/fonts/local.d.ts +46 -0
  41. package/dist/fonts/local.js +150 -0
  42. package/dist/fonts/sfnt.d.ts +19 -0
  43. package/dist/fonts/sfnt.js +174 -0
  44. package/dist/fonts/shim.d.ts +14 -0
  45. package/dist/fonts/shim.js +96 -0
  46. package/dist/gate.d.ts +105 -0
  47. package/dist/gate.js +157 -0
  48. package/dist/index.d.ts +55 -0
  49. package/dist/index.js +74 -0
  50. package/dist/ir/annotate.d.ts +16 -0
  51. package/dist/ir/annotate.js +145 -0
  52. package/dist/ir/as-child.d.ts +18 -0
  53. package/dist/ir/as-child.js +239 -0
  54. package/dist/ir/compounds.d.ts +27 -0
  55. package/dist/ir/compounds.js +183 -0
  56. package/dist/ir/contexts.d.ts +26 -0
  57. package/dist/ir/contexts.js +185 -0
  58. package/dist/ir/dom.d.ts +11 -0
  59. package/dist/ir/dom.js +60 -0
  60. package/dist/ir/effect-returns.d.ts +10 -0
  61. package/dist/ir/effect-returns.js +25 -0
  62. package/dist/ir/extract-ui-types.d.ts +33 -0
  63. package/dist/ir/extract-ui-types.js +224 -0
  64. package/dist/ir/extract-ui.d.ts +34 -0
  65. package/dist/ir/extract-ui.js +567 -0
  66. package/dist/ir/falsy.d.ts +13 -0
  67. package/dist/ir/falsy.js +66 -0
  68. package/dist/ir/forward-refs.d.ts +11 -0
  69. package/dist/ir/forward-refs.js +155 -0
  70. package/dist/ir/fragment-source.d.ts +4 -0
  71. package/dist/ir/fragment-source.js +13 -0
  72. package/dist/ir/fragments.d.ts +32 -0
  73. package/dist/ir/fragments.js +192 -0
  74. package/dist/ir/helper-snippets.d.ts +30 -0
  75. package/dist/ir/helper-snippets.js +550 -0
  76. package/dist/ir/latest-refs.d.ts +11 -0
  77. package/dist/ir/latest-refs.js +187 -0
  78. package/dist/ir/live-args.d.ts +26 -0
  79. package/dist/ir/live-args.js +335 -0
  80. package/dist/ir/lower.d.ts +83 -0
  81. package/dist/ir/lower.js +6016 -0
  82. package/dist/ir/markup-values.d.ts +16 -0
  83. package/dist/ir/markup-values.js +188 -0
  84. package/dist/ir/model.d.ts +605 -0
  85. package/dist/ir/model.js +1 -0
  86. package/dist/ir/oracle.d.ts +91 -0
  87. package/dist/ir/oracle.js +610 -0
  88. package/dist/ir/radix.d.ts +122 -0
  89. package/dist/ir/radix.js +344 -0
  90. package/dist/ir/rename.d.ts +15 -0
  91. package/dist/ir/rename.js +151 -0
  92. package/dist/ir/render-props.d.ts +31 -0
  93. package/dist/ir/render-props.js +67 -0
  94. package/dist/ir/rewrite.d.ts +44 -0
  95. package/dist/ir/rewrite.js +381 -0
  96. package/dist/ir/running-index.d.ts +11 -0
  97. package/dist/ir/running-index.js +217 -0
  98. package/dist/ir/snapshots.d.ts +12 -0
  99. package/dist/ir/snapshots.js +140 -0
  100. package/dist/ir/style.d.ts +19 -0
  101. package/dist/ir/style.js +76 -0
  102. package/dist/ir/types.d.ts +42 -0
  103. package/dist/ir/types.js +271 -0
  104. package/dist/ir/walk.d.ts +11 -0
  105. package/dist/ir/walk.js +18 -0
  106. package/dist/mcp/server.d.ts +81 -0
  107. package/dist/mcp/server.js +518 -0
  108. package/dist/pipeline.d.ts +26 -0
  109. package/dist/pipeline.js +750 -0
  110. package/dist/registry/add.d.ts +91 -0
  111. package/dist/registry/add.js +273 -0
  112. package/dist/registry/fetch.d.ts +40 -0
  113. package/dist/registry/fetch.js +186 -0
  114. package/dist/registry/ip.d.ts +18 -0
  115. package/dist/registry/ip.js +153 -0
  116. package/dist/registry/item.d.ts +39 -0
  117. package/dist/registry/item.js +131 -0
  118. package/dist/registry/load.d.ts +35 -0
  119. package/dist/registry/load.js +106 -0
  120. package/dist/registry/paths.d.ts +8 -0
  121. package/dist/registry/paths.js +43 -0
  122. package/dist/registry/publish.d.ts +119 -0
  123. package/dist/registry/publish.js +439 -0
  124. package/dist/targets/angular/bank/bank.d.ts +39 -0
  125. package/dist/targets/angular/bank/bank.js +61 -0
  126. package/dist/targets/angular/bank/helpers.d.ts +64 -0
  127. package/dist/targets/angular/bank/helpers.js +246 -0
  128. package/dist/targets/angular/bank/kept.d.ts +98 -0
  129. package/dist/targets/angular/bank/kept.js +791 -0
  130. package/dist/targets/angular/bank/plan-helpers.d.ts +17 -0
  131. package/dist/targets/angular/bank/plan-helpers.js +286 -0
  132. package/dist/targets/angular/bank/plan.d.ts +22 -0
  133. package/dist/targets/angular/bank/plan.js +152 -0
  134. package/dist/targets/angular/bank/receivers.d.ts +66 -0
  135. package/dist/targets/angular/bank/receivers.js +293 -0
  136. package/dist/targets/angular/bank/runtime.d.ts +14 -0
  137. package/dist/targets/angular/bank/runtime.js +152 -0
  138. package/dist/targets/angular/controlled.d.ts +7 -0
  139. package/dist/targets/angular/controlled.js +37 -0
  140. package/dist/targets/angular/dynamic-tags.d.ts +34 -0
  141. package/dist/targets/angular/dynamic-tags.js +192 -0
  142. package/dist/targets/angular/emit.d.ts +41 -0
  143. package/dist/targets/angular/emit.js +5970 -0
  144. package/dist/targets/angular/exports.d.ts +48 -0
  145. package/dist/targets/angular/exports.js +243 -0
  146. package/dist/targets/angular/helpers.d.ts +15 -0
  147. package/dist/targets/angular/helpers.js +33 -0
  148. package/dist/targets/angular/host-boundary.d.ts +5 -0
  149. package/dist/targets/angular/host-boundary.js +166 -0
  150. package/dist/targets/angular/host-form.d.ts +150 -0
  151. package/dist/targets/angular/host-form.js +727 -0
  152. package/dist/targets/angular/markup-values.d.ts +58 -0
  153. package/dist/targets/angular/markup-values.js +661 -0
  154. package/dist/targets/angular/motion-directive.d.ts +12 -0
  155. package/dist/targets/angular/motion-directive.js +257 -0
  156. package/dist/targets/angular/motion-hooks.d.ts +73 -0
  157. package/dist/targets/angular/motion-hooks.js +293 -0
  158. package/dist/targets/angular/motion-layout.d.ts +14 -0
  159. package/dist/targets/angular/motion-layout.js +74 -0
  160. package/dist/targets/angular/motion-templates.d.ts +10 -0
  161. package/dist/targets/angular/motion-templates.js +65 -0
  162. package/dist/targets/angular/motion.d.ts +57 -0
  163. package/dist/targets/angular/motion.js +202 -0
  164. package/dist/targets/angular/narrowing.d.ts +24 -0
  165. package/dist/targets/angular/narrowing.js +205 -0
  166. package/dist/targets/angular/ngc.d.ts +23 -0
  167. package/dist/targets/angular/ngc.js +134 -0
  168. package/dist/targets/angular/passed-handle.d.ts +39 -0
  169. package/dist/targets/angular/passed-handle.js +154 -0
  170. package/dist/targets/angular/projected.d.ts +9 -0
  171. package/dist/targets/angular/projected.js +63 -0
  172. package/dist/targets/angular/radix/cores/alert-dialog.d.ts +13 -0
  173. package/dist/targets/angular/radix/cores/alert-dialog.js +388 -0
  174. package/dist/targets/angular/radix/cores/index.d.ts +17 -0
  175. package/dist/targets/angular/radix/cores/index.js +50 -0
  176. package/dist/targets/angular/radix/cores/slider.d.ts +8 -0
  177. package/dist/targets/angular/radix/cores/slider.js +202 -0
  178. package/dist/targets/angular/radix/index.d.ts +21 -0
  179. package/dist/targets/angular/radix/index.js +35 -0
  180. package/dist/targets/angular/radix/packages.d.ts +3 -0
  181. package/dist/targets/angular/radix/packages.js +558 -0
  182. package/dist/targets/angular/radix/part.d.ts +236 -0
  183. package/dist/targets/angular/radix/part.js +71 -0
  184. package/dist/targets/angular/radix/prepare.d.ts +66 -0
  185. package/dist/targets/angular/radix/prepare.js +548 -0
  186. package/dist/targets/angular/radix/template.d.ts +43 -0
  187. package/dist/targets/angular/radix/template.js +172 -0
  188. package/dist/targets/angular/refs.d.ts +68 -0
  189. package/dist/targets/angular/refs.js +443 -0
  190. package/dist/targets/angular/slots.d.ts +22 -0
  191. package/dist/targets/angular/slots.js +60 -0
  192. package/dist/targets/angular/source-types.d.ts +10 -0
  193. package/dist/targets/angular/source-types.js +45 -0
  194. package/dist/targets/angular/spread-forward.d.ts +24 -0
  195. package/dist/targets/angular/spread-forward.js +72 -0
  196. package/dist/targets/angular/spread.d.ts +32 -0
  197. package/dist/targets/angular/spread.js +182 -0
  198. package/dist/targets/angular/svg-hosts.d.ts +25 -0
  199. package/dist/targets/angular/svg-hosts.js +107 -0
  200. package/dist/targets/angular/template-expr.d.ts +36 -0
  201. package/dist/targets/angular/template-expr.js +287 -0
  202. package/dist/targets/angular/types.d.ts +9 -0
  203. package/dist/targets/angular/types.js +63 -0
  204. package/dist/targets/angular/walk.d.ts +11 -0
  205. package/dist/targets/angular/walk.js +26 -0
  206. package/dist/targets/react-native/emit.d.ts +14 -0
  207. package/dist/targets/react-native/emit.js +585 -0
  208. package/dist/targets/react-native/fidelity.d.ts +5 -0
  209. package/dist/targets/react-native/fidelity.js +43 -0
  210. package/dist/targets/react-native/motion.d.ts +10 -0
  211. package/dist/targets/react-native/motion.js +290 -0
  212. package/dist/targets/react-native/skia.d.ts +30 -0
  213. package/dist/targets/react-native/skia.js +358 -0
  214. package/dist/targets/shared/context.d.ts +47 -0
  215. package/dist/targets/shared/context.js +195 -0
  216. package/dist/targets/shared/foreign.d.ts +10 -0
  217. package/dist/targets/shared/foreign.js +72 -0
  218. package/dist/targets/shared/fragments.d.ts +21 -0
  219. package/dist/targets/shared/fragments.js +309 -0
  220. package/dist/targets/shared/handles.d.ts +65 -0
  221. package/dist/targets/shared/handles.js +299 -0
  222. package/dist/targets/shared/inline.d.ts +53 -0
  223. package/dist/targets/shared/inline.js +524 -0
  224. package/dist/targets/shared/layout.d.ts +70 -0
  225. package/dist/targets/shared/layout.js +224 -0
  226. package/dist/targets/shared/markup.d.ts +26 -0
  227. package/dist/targets/shared/markup.js +65 -0
  228. package/dist/targets/shared/module.d.ts +84 -0
  229. package/dist/targets/shared/module.js +468 -0
  230. package/dist/targets/shared/motion-hooks.d.ts +37 -0
  231. package/dist/targets/shared/motion-hooks.js +87 -0
  232. package/dist/targets/shared/motion-layout.d.ts +70 -0
  233. package/dist/targets/shared/motion-layout.js +392 -0
  234. package/dist/targets/shared/portal.d.ts +10 -0
  235. package/dist/targets/shared/portal.js +23 -0
  236. package/dist/targets/shared/prop-writes.d.ts +11 -0
  237. package/dist/targets/shared/prop-writes.js +32 -0
  238. package/dist/targets/shared/prune.d.ts +54 -0
  239. package/dist/targets/shared/prune.js +405 -0
  240. package/dist/targets/shared/react-libs.d.ts +25 -0
  241. package/dist/targets/shared/react-libs.js +142 -0
  242. package/dist/targets/shared/react-types.d.ts +16 -0
  243. package/dist/targets/shared/react-types.js +374 -0
  244. package/dist/targets/shared/react-values.d.ts +20 -0
  245. package/dist/targets/shared/react-values.js +145 -0
  246. package/dist/targets/shared/ref-callback.d.ts +16 -0
  247. package/dist/targets/shared/ref-callback.js +114 -0
  248. package/dist/targets/shared/script.d.ts +65 -0
  249. package/dist/targets/shared/script.js +406 -0
  250. package/dist/targets/shared/unused.d.ts +12 -0
  251. package/dist/targets/shared/unused.js +146 -0
  252. package/dist/targets/svelte/dom-spread.d.ts +27 -0
  253. package/dist/targets/svelte/dom-spread.js +146 -0
  254. package/dist/targets/svelte/emit.d.ts +15 -0
  255. package/dist/targets/svelte/emit.js +3784 -0
  256. package/dist/targets/svelte/handle-branches.d.ts +22 -0
  257. package/dist/targets/svelte/handle-branches.js +146 -0
  258. package/dist/targets/svelte/html-keys.d.ts +9 -0
  259. package/dist/targets/svelte/html-keys.js +40 -0
  260. package/dist/targets/svelte/markup-data/data.d.ts +51 -0
  261. package/dist/targets/svelte/markup-data/data.js +305 -0
  262. package/dist/targets/svelte/markup-data/helper.d.ts +12 -0
  263. package/dist/targets/svelte/markup-data/helper.js +81 -0
  264. package/dist/targets/svelte/markup-data/module-data.d.ts +21 -0
  265. package/dist/targets/svelte/markup-data/module-data.js +473 -0
  266. package/dist/targets/svelte/markup-data/sites.d.ts +52 -0
  267. package/dist/targets/svelte/markup-data/sites.js +303 -0
  268. package/dist/targets/svelte/motion-layout.d.ts +13 -0
  269. package/dist/targets/svelte/motion-layout.js +70 -0
  270. package/dist/targets/svelte/motion-table.d.ts +14 -0
  271. package/dist/targets/svelte/motion-table.js +308 -0
  272. package/dist/targets/svelte/motion.d.ts +46 -0
  273. package/dist/targets/svelte/motion.js +405 -0
  274. package/dist/targets/svelte/presence.d.ts +71 -0
  275. package/dist/targets/svelte/presence.js +318 -0
  276. package/dist/targets/svelte/radix/accordion.d.ts +9 -0
  277. package/dist/targets/svelte/radix/accordion.js +24 -0
  278. package/dist/targets/svelte/radix/aspect-ratio.d.ts +6 -0
  279. package/dist/targets/svelte/radix/aspect-ratio.js +8 -0
  280. package/dist/targets/svelte/radix/avatar.d.ts +6 -0
  281. package/dist/targets/svelte/radix/avatar.js +10 -0
  282. package/dist/targets/svelte/radix/checkbox.d.ts +10 -0
  283. package/dist/targets/svelte/radix/checkbox.js +24 -0
  284. package/dist/targets/svelte/radix/collapsible.d.ts +7 -0
  285. package/dist/targets/svelte/radix/collapsible.js +16 -0
  286. package/dist/targets/svelte/radix/context-menu.d.ts +8 -0
  287. package/dist/targets/svelte/radix/context-menu.js +49 -0
  288. package/dist/targets/svelte/radix/cores/alert-dialog.d.ts +17 -0
  289. package/dist/targets/svelte/radix/cores/alert-dialog.js +449 -0
  290. package/dist/targets/svelte/radix/cores/collapsible.d.ts +12 -0
  291. package/dist/targets/svelte/radix/cores/collapsible.js +214 -0
  292. package/dist/targets/svelte/radix/cores/core.d.ts +32 -0
  293. package/dist/targets/svelte/radix/cores/core.js +80 -0
  294. package/dist/targets/svelte/radix/cores/direction.d.ts +10 -0
  295. package/dist/targets/svelte/radix/cores/direction.js +64 -0
  296. package/dist/targets/svelte/radix/cores/index.d.ts +19 -0
  297. package/dist/targets/svelte/radix/cores/index.js +85 -0
  298. package/dist/targets/svelte/radix/cores/modal-layer.d.ts +11 -0
  299. package/dist/targets/svelte/radix/cores/modal-layer.js +244 -0
  300. package/dist/targets/svelte/radix/cores/presence.d.ts +12 -0
  301. package/dist/targets/svelte/radix/cores/presence.js +129 -0
  302. package/dist/targets/svelte/radix/cores/slider-logic.d.ts +10 -0
  303. package/dist/targets/svelte/radix/cores/slider-logic.js +287 -0
  304. package/dist/targets/svelte/radix/cores/slider.d.ts +13 -0
  305. package/dist/targets/svelte/radix/cores/slider.js +267 -0
  306. package/dist/targets/svelte/radix/dialog.d.ts +8 -0
  307. package/dist/targets/svelte/radix/dialog.js +20 -0
  308. package/dist/targets/svelte/radix/dropdown-menu.d.ts +9 -0
  309. package/dist/targets/svelte/radix/dropdown-menu.js +38 -0
  310. package/dist/targets/svelte/radix/emit.d.ts +12 -0
  311. package/dist/targets/svelte/radix/emit.js +1339 -0
  312. package/dist/targets/svelte/radix/hover-card.d.ts +7 -0
  313. package/dist/targets/svelte/radix/hover-card.js +22 -0
  314. package/dist/targets/svelte/radix/index.d.ts +12 -0
  315. package/dist/targets/svelte/radix/index.js +28 -0
  316. package/dist/targets/svelte/radix/label.d.ts +3 -0
  317. package/dist/targets/svelte/radix/label.js +5 -0
  318. package/dist/targets/svelte/radix/menubar.d.ts +7 -0
  319. package/dist/targets/svelte/radix/menubar.js +34 -0
  320. package/dist/targets/svelte/radix/navigation-menu.d.ts +8 -0
  321. package/dist/targets/svelte/radix/navigation-menu.js +25 -0
  322. package/dist/targets/svelte/radix/packages.d.ts +34 -0
  323. package/dist/targets/svelte/radix/packages.js +100 -0
  324. package/dist/targets/svelte/radix/part.d.ts +161 -0
  325. package/dist/targets/svelte/radix/part.js +85 -0
  326. package/dist/targets/svelte/radix/popover.d.ts +7 -0
  327. package/dist/targets/svelte/radix/popover.js +15 -0
  328. package/dist/targets/svelte/radix/progress.d.ts +11 -0
  329. package/dist/targets/svelte/radix/progress.js +27 -0
  330. package/dist/targets/svelte/radix/radio-group.d.ts +9 -0
  331. package/dist/targets/svelte/radix/radio-group.js +26 -0
  332. package/dist/targets/svelte/radix/scroll-area.d.ts +7 -0
  333. package/dist/targets/svelte/radix/scroll-area.js +19 -0
  334. package/dist/targets/svelte/radix/select.d.ts +13 -0
  335. package/dist/targets/svelte/radix/select.js +81 -0
  336. package/dist/targets/svelte/radix/separator.d.ts +3 -0
  337. package/dist/targets/svelte/radix/separator.js +5 -0
  338. package/dist/targets/svelte/radix/slider.d.ts +6 -0
  339. package/dist/targets/svelte/radix/slider.js +8 -0
  340. package/dist/targets/svelte/radix/switch.d.ts +6 -0
  341. package/dist/targets/svelte/radix/switch.js +10 -0
  342. package/dist/targets/svelte/radix/tabs.d.ts +8 -0
  343. package/dist/targets/svelte/radix/tabs.js +15 -0
  344. package/dist/targets/svelte/radix/toggle-group.d.ts +9 -0
  345. package/dist/targets/svelte/radix/toggle-group.js +17 -0
  346. package/dist/targets/svelte/radix/toggle.d.ts +6 -0
  347. package/dist/targets/svelte/radix/toggle.js +9 -0
  348. package/dist/targets/svelte/radix/tooltip.d.ts +6 -0
  349. package/dist/targets/svelte/radix/tooltip.js +24 -0
  350. package/dist/targets/svelte/strip.d.ts +2 -0
  351. package/dist/targets/svelte/strip.js +5 -0
  352. package/dist/targets/vue/emit.d.ts +15 -0
  353. package/dist/targets/vue/emit.js +4092 -0
  354. package/dist/targets/vue/events.d.ts +11 -0
  355. package/dist/targets/vue/events.js +13 -0
  356. package/dist/targets/vue/module-builders.d.ts +28 -0
  357. package/dist/targets/vue/module-builders.js +258 -0
  358. package/dist/targets/vue/motion-layout.d.ts +19 -0
  359. package/dist/targets/vue/motion-layout.js +79 -0
  360. package/dist/targets/vue/motion.d.ts +12 -0
  361. package/dist/targets/vue/motion.js +46 -0
  362. package/dist/targets/vue/radix/accordion.d.ts +3 -0
  363. package/dist/targets/vue/radix/accordion.js +12 -0
  364. package/dist/targets/vue/radix/alert-dialog.d.ts +6 -0
  365. package/dist/targets/vue/radix/alert-dialog.js +18 -0
  366. package/dist/targets/vue/radix/aspect-ratio.d.ts +6 -0
  367. package/dist/targets/vue/radix/aspect-ratio.js +8 -0
  368. package/dist/targets/vue/radix/avatar.d.ts +3 -0
  369. package/dist/targets/vue/radix/avatar.js +7 -0
  370. package/dist/targets/vue/radix/checkbox.d.ts +3 -0
  371. package/dist/targets/vue/radix/checkbox.js +9 -0
  372. package/dist/targets/vue/radix/collapsible.d.ts +7 -0
  373. package/dist/targets/vue/radix/collapsible.js +11 -0
  374. package/dist/targets/vue/radix/context-menu.d.ts +3 -0
  375. package/dist/targets/vue/radix/context-menu.js +30 -0
  376. package/dist/targets/vue/radix/dialog.d.ts +3 -0
  377. package/dist/targets/vue/radix/dialog.js +12 -0
  378. package/dist/targets/vue/radix/direction.d.ts +7 -0
  379. package/dist/targets/vue/radix/direction.js +9 -0
  380. package/dist/targets/vue/radix/dropdown-menu.d.ts +3 -0
  381. package/dist/targets/vue/radix/dropdown-menu.js +29 -0
  382. package/dist/targets/vue/radix/hover-card.d.ts +3 -0
  383. package/dist/targets/vue/radix/hover-card.js +11 -0
  384. package/dist/targets/vue/radix/index.d.ts +65 -0
  385. package/dist/targets/vue/radix/index.js +225 -0
  386. package/dist/targets/vue/radix/label.d.ts +3 -0
  387. package/dist/targets/vue/radix/label.js +5 -0
  388. package/dist/targets/vue/radix/menubar.d.ts +6 -0
  389. package/dist/targets/vue/radix/menubar.js +29 -0
  390. package/dist/targets/vue/radix/navigation-menu.d.ts +6 -0
  391. package/dist/targets/vue/radix/navigation-menu.js +21 -0
  392. package/dist/targets/vue/radix/part.d.ts +41 -0
  393. package/dist/targets/vue/radix/part.js +46 -0
  394. package/dist/targets/vue/radix/popover.d.ts +3 -0
  395. package/dist/targets/vue/radix/popover.js +11 -0
  396. package/dist/targets/vue/radix/progress.d.ts +3 -0
  397. package/dist/targets/vue/radix/progress.js +6 -0
  398. package/dist/targets/vue/radix/radio-group.d.ts +3 -0
  399. package/dist/targets/vue/radix/radio-group.js +10 -0
  400. package/dist/targets/vue/radix/scroll-area.d.ts +3 -0
  401. package/dist/targets/vue/radix/scroll-area.js +11 -0
  402. package/dist/targets/vue/radix/select.d.ts +3 -0
  403. package/dist/targets/vue/radix/select.js +29 -0
  404. package/dist/targets/vue/radix/separator.d.ts +3 -0
  405. package/dist/targets/vue/radix/separator.js +5 -0
  406. package/dist/targets/vue/radix/slider.d.ts +3 -0
  407. package/dist/targets/vue/radix/slider.js +13 -0
  408. package/dist/targets/vue/radix/switch.d.ts +3 -0
  409. package/dist/targets/vue/radix/switch.js +9 -0
  410. package/dist/targets/vue/radix/tabs.d.ts +3 -0
  411. package/dist/targets/vue/radix/tabs.js +12 -0
  412. package/dist/targets/vue/radix/toggle-group.d.ts +3 -0
  413. package/dist/targets/vue/radix/toggle-group.js +10 -0
  414. package/dist/targets/vue/radix/toggle.d.ts +3 -0
  415. package/dist/targets/vue/radix/toggle.js +8 -0
  416. package/dist/targets/vue/radix/tooltip.d.ts +3 -0
  417. package/dist/targets/vue/radix/tooltip.js +14 -0
  418. package/dist/targets/vue/render-fn/h.d.ts +52 -0
  419. package/dist/targets/vue/render-fn/h.js +442 -0
  420. package/dist/targets/vue/render-fn.d.ts +21 -0
  421. package/dist/targets/vue/render-fn.js +357 -0
  422. package/dist/targets/vue/slot.d.ts +9 -0
  423. package/dist/targets/vue/slot.js +57 -0
  424. package/dist/typecheck/host.d.ts +45 -0
  425. package/dist/typecheck/host.js +309 -0
  426. package/dist/typecheck/index.d.ts +16 -0
  427. package/dist/typecheck/index.js +17 -0
  428. package/dist/typecheck/lucide.d.ts +8 -0
  429. package/dist/typecheck/lucide.js +45 -0
  430. package/dist/typecheck/sourcemap.d.ts +9 -0
  431. package/dist/typecheck/sourcemap.js +54 -0
  432. package/dist/typecheck/svelte.d.ts +9 -0
  433. package/dist/typecheck/svelte.js +116 -0
  434. package/dist/typecheck/vue.d.ts +8 -0
  435. package/dist/typecheck/vue.js +78 -0
  436. package/dist/types.d.ts +446 -0
  437. package/dist/types.js +11 -0
  438. package/dist/utils/cleanup.d.ts +32 -0
  439. package/dist/utils/cleanup.js +119 -0
  440. package/dist/utils/errors.d.ts +7 -0
  441. package/dist/utils/errors.js +15 -0
  442. package/dist/utils/fs-safe.d.ts +14 -0
  443. package/dist/utils/fs-safe.js +64 -0
  444. package/dist/validate.d.ts +16 -0
  445. package/dist/validate.js +204 -0
  446. package/dist/verify/auto-steps.d.ts +107 -0
  447. package/dist/verify/auto-steps.js +471 -0
  448. package/dist/verify/bundle.d.ts +68 -0
  449. package/dist/verify/bundle.js +548 -0
  450. package/dist/verify/diff.d.ts +31 -0
  451. package/dist/verify/diff.js +133 -0
  452. package/dist/verify/leaks.d.ts +25 -0
  453. package/dist/verify/leaks.js +261 -0
  454. package/dist/verify/link-worker.d.ts +1 -0
  455. package/dist/verify/link-worker.js +27 -0
  456. package/dist/verify/runner.d.ts +57 -0
  457. package/dist/verify/runner.js +867 -0
  458. package/dist/verify/sandbox.d.ts +40 -0
  459. package/dist/verify/sandbox.js +496 -0
  460. package/dist/verify/steps.d.ts +42 -0
  461. package/dist/verify/steps.js +475 -0
  462. package/dist/verify/verdict.d.ts +15 -0
  463. package/dist/verify/verdict.js +19 -0
  464. package/package.json +118 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Antheo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,267 @@
1
- # Temporary Holding Version
1
+ <h1 align="center">Antheo Morph</h1>
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <p align="center">
4
+ <b>React components in. Vue 3, Svelte 5 and Angular out.</b><br />
5
+ Each result is checked by the target's own compiler and compared with React in a real browser.
6
+ </p>
7
+
8
+ <p align="center">
9
+ <a href="https://www.npmjs.com/package/@antheo/morph"><img alt="npm version" src="https://img.shields.io/npm/v/@antheo/morph.svg" /></a>
10
+ <a href="LICENSE"><img alt="Licence: MIT" src="https://img.shields.io/badge/licence-MIT-blue.svg" /></a>
11
+ <img alt="1,282 tests passing" src="https://img.shields.io/badge/tests-1%2C282%20passing-brightgreen.svg" />
12
+ <img alt="Targets: Vue 3, Svelte 5, Angular" src="https://img.shields.io/badge/targets-Vue%203%20%C2%B7%20Svelte%205%20%C2%B7%20Angular-8A2BE2.svg" />
13
+ </p>
14
+
15
+ ## Overview
16
+
17
+ `@antheo/morph` is a compiler. You give it the React component you already have (function components, TypeScript, Tailwind, Framer Motion, Radix, shadcn/ui) and it writes the same component in Vue 3, Svelte 5 and Angular, using each framework's own features. There is no new authoring format to learn, and the output needs no runtime package from this project.
18
+
19
+ What sets it apart is that it does not guess:
20
+
21
+ - **Exact, or refused.** A file that converts is `clean`. A file with a known difference from React is `partial`, and every difference is a located warning. A file that has no faithful form is `unsupported`, with the exact line. Nothing is emitted as if it worked.
22
+ - **Checked by the real tools.** Every output file goes through the target's own compiler (`@vue/compiler-sfc`, `svelte/compiler`, Angular's `ngc`) and a strict type check.
23
+ - **Proven in a browser.** `verify` renders the React original and the converted component side by side in a sandboxed headless Chromium and compares them pixel by pixel: at rest, on hover, while pressed and through scripted interactions. The pass bar is 99 percent. It also checks that nothing is left running after unmount.
24
+
25
+ ## Example
26
+
27
+ React in:
28
+
29
+ ```tsx
30
+ import { useState } from 'react';
31
+
32
+ export function Counter({ label, step = 1 }: { label: string; step?: number }) {
33
+ const [count, setCount] = useState(0);
34
+ const doubled = count * 2;
35
+ return (
36
+ <button type="button" className="rounded bg-black px-3 py-1 text-white" onClick={() => setCount((c) => c + step)}>
37
+ {label}: {count} ({doubled})
38
+ </button>
39
+ );
40
+ }
41
+ ```
42
+
43
+ Vue 3 out (`Counter.vue`):
44
+
45
+ ```vue
46
+ <script setup lang="ts">
47
+ import { computed, ref } from 'vue';
48
+ type Props = {
49
+ label: string;
50
+ step?: number;
51
+ };
52
+ const { label, step = 1 } = defineProps<Props>();
53
+ const count = ref(0);
54
+ const doubled = computed(() => count.value * 2);
55
+ function handleClick() {
56
+ count.value = count.value + step;
57
+ }
58
+ </script>
59
+
60
+ <template>
61
+ <button type="button" class="rounded bg-black px-3 py-1 text-white" @click="handleClick">
62
+ {{ label }}: {{ count }} ({{ doubled }})
63
+ </button>
64
+ </template>
65
+ ```
66
+
67
+ <details>
68
+ <summary>Svelte 5 out (<code>Counter.svelte</code>)</summary>
69
+
70
+ ```svelte
71
+ <script lang="ts">
72
+ type Props = {
73
+ label: string;
74
+ step?: number;
75
+ };
76
+ let { label, step = 1 }: Props = $props();
77
+ let count = $state(0);
78
+ const doubled = $derived(count * 2);
79
+ </script>
80
+
81
+ <button
82
+ type="button"
83
+ class="rounded bg-black px-3 py-1 text-white"
84
+ onclick={() => count = count + step}
85
+ >{label}: {count} ({doubled})</button>
86
+ ```
87
+
88
+ </details>
89
+
90
+ <details>
91
+ <summary>Angular out (<code>counter.ts</code>)</summary>
92
+
93
+ ```ts
94
+ import { ChangeDetectionStrategy, Component, computed, input, signal } from '@angular/core';
95
+ @Component({
96
+ selector: 'ui-counter',
97
+ changeDetection: ChangeDetectionStrategy.OnPush,
98
+ host: {
99
+ style: 'display: contents',
100
+ },
101
+ template: `<button
102
+ type="button"
103
+ class="rounded bg-black px-3 py-1 text-white"
104
+ (click)="count.update((c) => c + step())"
105
+ >
106
+ <ng-container>{{ label() }}</ng-container>: <ng-container>{{ count() }}</ng-container> (<ng-container>{{ doubled() }}</ng-container>)
107
+ </button>`,
108
+ })
109
+ export class Counter {
110
+ public readonly label = input.required<string>();
111
+ public readonly step = input<number>(1);
112
+ protected readonly count = signal(0);
113
+ protected readonly doubled = computed(() => this.count() * 2);
114
+ }
115
+ ```
116
+
117
+ </details>
118
+
119
+ ## Quick start
120
+
121
+ Needs Node 20 or later.
122
+
123
+ ```sh
124
+ npm i -D @antheo/morph
125
+
126
+ # convert one component (Vue and Svelte by default; add Angular by name)
127
+ npx antheo-morph convert src/components/Button.tsx --out morph-out
128
+ npx antheo-morph convert src/components/Button.tsx --target vue,svelte,angular --out morph-out
129
+
130
+ # render it beside React in a headless browser and compare
131
+ npx antheo-morph verify src/components/Button.tsx --auto-steps
132
+
133
+ # convert a whole folder and get your own numbers
134
+ npx antheo-morph batch src/components --out morph-out --report report.json
135
+ ```
136
+
137
+ Two things to know:
138
+
139
+ - `verify` needs an installed Chrome or Edge.
140
+ - Angular output needs the Node version Angular's own packages ask for: 22.22.3 or later in the 22 line, 24.15 or later in the 24 line, or 26 and later. On an older Node, npm leaves those optional packages out without an error; Vue and Svelte still work, and asking for Angular gives a message that says what is missing.
141
+
142
+ More in [Command line and API](docs/cli-and-api.md). To build from source, see [Development](docs/development.md).
143
+
144
+ From code:
145
+
146
+ ```ts
147
+ import { compile } from '@antheo/morph';
148
+
149
+ const result = await compile('src/components/Button.tsx', { targets: ['vue', 'svelte', 'angular'] });
150
+ for (const t of result.targets) console.log(t.target, t.status, t.validated, t.diagnostics);
151
+ ```
152
+
153
+ ## Commands
154
+
155
+ | Command | What it does |
156
+ |---|---|
157
+ | `analyze <file>` | says what is in a component, without converting it |
158
+ | `convert <file>` | converts one component and the local files it imports |
159
+ | `batch <folder>` | converts a folder and writes a report |
160
+ | `verify <file>` | renders React and each target in a headless browser and compares them |
161
+ | `gate <file> --candidate <file>` | runs the four checks on a file you or an agent wrote by hand |
162
+ | `add <url-or-file>` | converts a shadcn-format registry item into your Vue, Svelte or Angular project |
163
+ | `publish <folder>` | writes shadcn-format registries for Vue, Svelte and Angular, with a scorecard |
164
+ | `mcp` | serves convert, verify and gate to an AI editor over the Model Context Protocol |
165
+
166
+ Every command takes `--json`. Exit codes: 2 when a file is `unsupported`, 3 when a check fails, 1 for any other failure. Details: [Command line and API](docs/cli-and-api.md).
167
+
168
+ ## How results are reported
169
+
170
+ | Status | Meaning |
171
+ |---|---|
172
+ | `clean` | converted with nothing lost; passes the target's compiler and the type check |
173
+ | `partial` | works, with warnings that each state a difference from React |
174
+ | `unsupported` | an error names exactly what has no faithful form, or the output failed its compiler |
175
+ | `bridged` | opt-in: a thin wrapper mounts the React original inside the target. Not a conversion |
176
+ | `assisted` | opt-in: a model wrote the file the compiler refused, and it passed every check |
177
+
178
+ The four checks, in order: the target's compiler, a strict type check, the browser comparison with React, and the unmount check. More in [How results are reported](docs/results.md) and [Verification](docs/verification.md).
179
+
180
+ ## What converts
181
+
182
+ - **React itself:** function components, hooks, context, refs and `forwardRef`, compound components, controlled and uncontrolled state.
183
+ - **Styling:** Tailwind classes, CSS and JSON imports, variant maps, `clsx` and `tailwind-merge`.
184
+ - **Radix UI and shadcn/ui:** mapped to reka-ui on Vue, bits-ui on Svelte and radix-ng on Angular. Where a library behaves differently from Radix, morph writes the part itself or refuses it and says why.
185
+ - **Framer Motion:** mapped to motion-v on Vue and to the `motion` package on Svelte and Angular, including `layout`, `layoutId` and `drag`.
186
+ - **Markup built in code:** lists filled in loops, render helpers, helpers that call themselves, tables of elements.
187
+ - **`next/font`:** local fonts carried over, Google fonts on request.
188
+
189
+ Each of these has shapes it does not cover, and they are listed where the feature is described: [What converts](docs/what-converts.md).
190
+
191
+ When the compiler refuses a file, three opt-in modes can still get you there:
192
+
193
+ - **[Bridge mode](docs/bridge-mode.md)** mounts the React original inside a thin target wrapper.
194
+ - **[Extract-UI mode](docs/extract-ui.md)** slices a component that reads its app (router, store, server action) into a pure UI component with a typed contract.
195
+ - **[Assisted mode](docs/assisted-mode.md)** asks a model to write the file, and keeps it only if it passes all four checks.
196
+
197
+ ## Use it from your AI editor
198
+
199
+ You do not need an API key to use a model with morph. The agent already in your editor does the writing, and morph does the judging:
200
+
201
+ 1. `convert --json` tells the agent what was refused and where.
202
+ 2. The agent writes a candidate file.
203
+ 3. `gate --auto-steps --unmount` runs the four checks and names the failing check, line and score.
204
+
205
+ [`SKILL.md`](SKILL.md) teaches that loop to any agent, and `antheo-morph mcp` exposes it as three tools. For CI there are key-based providers (Anthropic, OpenAI, Gemini, OpenRouter, local Ollama) and providers that run your own installed `claude`, `codex` or `gemini` command line. morph never reads a sign-in token. Details: [Gate, SKILL.md and the MCP server](docs/gate.md), [Assisted mode and providers](docs/assisted-mode.md).
206
+
207
+ ## Registries
208
+
209
+ `add` takes a shadcn-format registry item, by URL or file, and converts it into your project. It detects the framework from your `package.json`, rewrites the aliases, and prints the `npm install` line for the target's packages without running it. Remote items are fetched over HTTPS from public addresses only, with size and time limits.
210
+
211
+ `publish` goes the other way: one folder of React components becomes a registry per target, plus a scorecard of what converted. Details: [Registries: add and publish](docs/registry.md).
212
+
213
+ ## Measured results
214
+
215
+ Each cell is clean / partial / unsupported.
216
+
217
+ | | Vue 3 | Svelte 5 | Angular |
218
+ |---|---|---|---|
219
+ | The maintainers' own library, 380 files | 253 / 85 / 42 | 263 / 81 / 36 | 244 / 78 / 58 |
220
+ | shadcn/ui, 61 components, unchanged | 42 / 4 / 15 | 26 / 14 / 21 | 19 / 6 / 36 |
221
+ | Magic UI, 81 components, unchanged | 45 / 23 / 13 | 44 / 20 / 17 | 43 / 16 / 22 |
222
+
223
+ | | Vue 3 | Svelte 5 | Angular |
224
+ |---|---|---|---|
225
+ | Benchmark: of 41 product components, the same as React in every state and step | 41 | 37, and 4 with a noted difference | 37, and 4 with a noted difference |
226
+ | Unmount sweep: of 55 components, those that leave nothing running that React does not | 55 | 55 | 55 |
227
+
228
+ How to read this: the first row is the best case, because the compiler was built against that code. The two outside libraries show what to expect on code written by other people. These counts were measured on 0.1 and have not been measured again for 0.2 or 0.3. The test suite, 1,282 tests, passes on 0.3. Full tables and method: [Measured results](docs/measured-results.md).
229
+
230
+ Run `batch` on your own components to get your own number.
231
+
232
+ ## Known limits
233
+
234
+ - React-only libraries other than Radix (cmdk, vaul, react-hook-form, recharts and similar) are refused as conversions. [Bridge mode](docs/bridge-mode.md) can mount the React original inside the target instead.
235
+ - Redux, jotai, styled-components and Emotion are refused. Next.js app APIs (the router, route and search params, server actions) and zustand stores are refused by default, and since 0.2 [Extract-UI mode](docs/extract-ui.md) can slice them out.
236
+ - Class components are refused. An `async` server component is refused by default; since 0.2 Extract-UI mode can turn the data it awaits into a prop.
237
+ - Angular covers fewer Radix packages than Vue and Svelte: the six mapped to radix-ng, plus slider and alert-dialog, which morph writes itself since 0.2. It cannot convert `asChild`.
238
+ - React Native output is experimental and is not verified in a browser.
239
+ - A passing `verify` means the component matched React in the states and steps that were run, not in every situation. Since 0.2, `--auto-steps` finds and runs the interactions a click, a key or typing reaches; a state behind a drag or a timer still needs a steps file.
240
+ - The providers, the vendor command lines, `add` from an outside registry and the MCP server are new in 0.3 and have been tested with stand-ins only. None has been run against the real service yet.
241
+
242
+ The full list: [Known limits](docs/known-limits.md).
243
+
244
+ ## Documentation
245
+
246
+ | Page | What is in it |
247
+ |---|---|
248
+ | [Command line and API](docs/cli-and-api.md) | every command, option and exit code |
249
+ | [What converts](docs/what-converts.md) | React, Radix and shadcn/ui, animation, markup built in code, fonts |
250
+ | [How results are reported](docs/results.md) | statuses and every diagnostic code |
251
+ | [Verification](docs/verification.md) | the browser comparison, steps, `--auto-steps`, the unmount check |
252
+ | [Bridge mode](docs/bridge-mode.md), [Extract-UI mode](docs/extract-ui.md), [Assisted mode](docs/assisted-mode.md) | the three opt-in modes |
253
+ | [Gate, SKILL.md and the MCP server](docs/gate.md) | morph inside an AI editor |
254
+ | [Registries](docs/registry.md) | `add` and `publish` |
255
+ | [Measured results](docs/measured-results.md), [Known limits](docs/known-limits.md) | what was measured, and what does not work |
256
+ | [Development](docs/development.md) | building, testing, optional dependencies |
257
+ | [Changelog](CHANGELOG.md) | 0.1, 0.2 and 0.3 |
258
+
259
+ ## Contributing
260
+
261
+ Issues and pull requests are welcome. Before a pull request, run `npm run build` and `npm test`. The project's own rules are short: no skipped tests, no `any`, no weakened checks, and a difference from React is a located warning, never silence. See [Development](docs/development.md).
262
+
263
+ ## Licence
264
+
265
+ MIT. See [LICENSE](LICENSE).
266
+
267
+ The direct dependencies are under MIT, Apache-2.0, ISC or 0BSD licences. One test fixture, `tests/fixtures/fonts/local/Geist-Regular.ttf`, is a third-party font under the SIL Open Font License 1.1 (see the notice beside it). It is used only by tests and is not part of the published package.
package/SKILL.md ADDED
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: antheo-morph
3
+ description: Convert a React component to Vue 3, Svelte 5 or Angular with @antheo/morph, and when the compiler refuses it, write the conversion yourself and prove it with `antheo-morph gate` (compiler, strict type check, browser match against React, unmount check). No API key needed.
4
+ ---
5
+
6
+ # Converting a React component with antheo-morph
7
+
8
+ You (the agent in the editor) write what the compiler cannot; morph judges it. A file counts as converted only when
9
+ the compiler's own output is `clean`, or when `gate` exits 0 on your file. Install morph in the project once
10
+ (`npm install --save-dev @antheo/morph`) so that `npx antheo-morph` runs that copy. The browser gate needs
11
+ `playwright-core` and an installed Chrome or Edge.
12
+
13
+ ## The loop
14
+
15
+ 1. Convert and read the result:
16
+ `npx antheo-morph convert src/Card.tsx --target vue --out morph-out --json`
17
+ - exit 0: status `clean` or `partial`. For `clean`, stop. For `partial`, read every warning; each states a
18
+ difference from React. If one matters, go to step 2 with the file it names.
19
+ - exit 2: status `unsupported`. Read each error diagnostic (`code`, `file`, `line`, `message`) and go to step 2.
20
+ 2. Write the candidate: edit the generated file under `morph-out/<target>/` (its path is the JSON's `files[].path`),
21
+ or write it from scratch with the same file name. Use only the target framework and the packages the generated
22
+ files already import. Convert the code behind every `antheo-morph: not converted` comment and remove the comment.
23
+ 3. Gate it:
24
+ `npx antheo-morph gate src/Card.tsx --candidate morph-out/vue/Card.vue --target vue --auto-steps --unmount --json`
25
+ - More than one file: repeat `--candidate`. Each replaces the generated file with the same name.
26
+ - Props the component needs to render: `--props '{"title":"Hi"}'`. A named export: `--export Card`.
27
+ - A script of the user's instead of `--auto-steps`: `--steps steps.json`.
28
+ 4. Exit 3: read `failedGate`, `reason` and `gates[].details` in the JSON, fix the candidate, gate again.
29
+ 5. At most three gate runs per file. After the third failure, stop. Report the file, the gate that fails, its reason
30
+ and the scores, and keep the compiler's own output. Do not start a fourth try under another name.
31
+
32
+ ## Exit codes
33
+
34
+ | Command | 0 | 1 | 2 | 3 |
35
+ | - | - | - | - | - |
36
+ | `convert` | clean or partial | bad arguments, missing file, crash | unsupported | |
37
+ | `verify` | 99% or more everywhere, no leak | bad arguments, missing file, crash | | a match under 99%, or a leak |
38
+ | `gate` | all four gates pass | bad arguments, missing file, a check that could not run | | a gate fails |
39
+
40
+ ## The four gates (in order; the first failure stops the run)
41
+
42
+ 1. `compiler`: the target's real compiler (`@vue/compiler-sfc`, `svelte/compiler` in runes mode, `ngtsc` strict) and no
43
+ `antheo-morph: not converted` mark in any output file.
44
+ 2. `typecheck`: the strict type check (vue-tsc's, svelte-check's; Angular's strict compile covers it). `details` lists
45
+ `path:line: message`.
46
+ 3. `browser`: React and your file render in a sandboxed headless Chrome. Every state (idle, hover, active) and every
47
+ step must match React at 99% or more (pixelmatch threshold 0.1), no DOM fact may differ after a step, no page error.
48
+ 4. `unmount`: after unmount, nothing may keep running (frames, timers, listeners, observers) that React does not leave.
49
+ `gate` always runs it.
50
+
51
+ ## Rules
52
+
53
+ - Never weaken, skip or work around a gate: no lower threshold, no removed state or step, no hidden element, no
54
+ different props than the ones the user gave, no edit to the React original, no `@ts-ignore`, no `any`.
55
+ - A passing gate covers only the states and steps it compared. Say which ones in your report.
56
+ - When a gate keeps failing, report it plainly. Do not call the file converted.
57
+
58
+ ## MCP
59
+
60
+ `npx antheo-morph mcp --root .` serves the same steps as tools: `morph_convert`, `morph_verify`, `morph_gate`
61
+ (paths relative to the root; anything outside it is refused). `morph_gate` returns the same JSON as `gate --json`.
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Local official CLI providers (v0.3 Milestone A): assisted mode asks the user's own installed, unmodified vendor CLI
3
+ * (Claude Code, Codex, Gemini CLI) for one text answer, as a separate program, for personal local use. morph never
4
+ * reads, locates, copies or logs any login, token or credential file of these CLIs and passes no flag that changes how
5
+ * they sign in (no `--bare` on claude: the docs say bare mode does not use the subscription login). The child inherits
6
+ * the environment like every child process; nothing is added to it.
7
+ *
8
+ * Facts used (notes v03/web-facts.md, read 4 Dec 2026), and what was NOT CONFIRMED there:
9
+ * - claude: `-p` prints one answer and exits; piped stdin is read in -p mode (capped at 10 MB by Claude Code); with
10
+ * both stdin and a prompt argument, the argument is the instruction. Whether `-p` with no argument takes the whole
11
+ * prompt from stdin is NOT CONFIRMED, so a fixed instruction (never file content) is passed as the -p argument.
12
+ * `--tools ""` disables built-in tools, `--disallowedTools "mcp__*"` MCP tools; failures inside the run (no login)
13
+ * are printed on stdout with a non-zero exit.
14
+ * - codex: `codex exec -` reads the whole prompt from stdin and prints only the final message on stdout; `--sandbox
15
+ * read-only`; exec needs a Git repo unless `--skip-git-repo-check`; `--ephemeral` writes no session files. Its exit
16
+ * codes are NOT CONFIRMED (any non-zero is reported as a failure with its number).
17
+ * - gemini: `-p` text "Appended to stdin input if provided. Forces non-interactive mode"; exit codes 0, 1, 42 (input
18
+ * error), 53 (turn limit exceeded). Unpaid and Google One users were moved to Antigravity CLI (`agy`) on 18 June 2026.
19
+ * A flag that a future CLI version drops makes the CLI exit non-zero: reported as an error naming the CLI and its exit
20
+ * code, never as an empty or partial answer.
21
+ */
22
+ export declare const CLI_PROVIDERS: readonly ["claude-cli", "codex-cli", "gemini-cli"];
23
+ export type CliProviderName = (typeof CLI_PROVIDERS)[number];
24
+ /**
25
+ * For tests only (programmatic, never read from a flag, a file or an MCP argument): run this program in place of the
26
+ * vendor CLI, with `args` before the provider's own arguments (a test passes the Node binary and a script path).
27
+ */
28
+ export interface CliExecutable {
29
+ file: string;
30
+ args?: readonly string[];
31
+ }
32
+ export declare function isCliProvider(name: string): name is CliProviderName;
33
+ /** The largest prompt sent on stdin (Claude Code itself refuses piped stdin over 10 MB). */
34
+ export declare const MAX_CLI_PROMPT_BYTES: number;
35
+ /** The most stdout kept: more than that stops the run. */
36
+ export declare const MAX_CLI_STDOUT_BYTES: number;
37
+ /** Where to look for an executable: the platform, PATH and PATHEXT, and how to read the disk (tests pass fixtures). */
38
+ export interface ResolveEnv {
39
+ platform: NodeJS.Platform;
40
+ path: string;
41
+ pathExt: string;
42
+ /** the Node binary that runs an npm shim's script */
43
+ nodePath: string;
44
+ }
45
+ export interface ResolvedExecutable {
46
+ file: string;
47
+ args: string[];
48
+ /** the file found on PATH (the shim itself, for an npm .cmd shim) */
49
+ found: string;
50
+ }
51
+ /**
52
+ * Finds `bin` on PATH without a shell. On Windows each folder is tried with each PATHEXT extension in order, as cmd
53
+ * does. An .exe or .com is started directly. A .cmd or .bat cannot be started without a shell, which morph never uses:
54
+ * an npm shim (`"%dp0%\node_modules\...\cli.js" %*`) is run as Node with its script; any other script shim is an error
55
+ * that says so. Returns null when nothing is found.
56
+ */
57
+ export declare function resolveExecutable(bin: string, env: ResolveEnv): ResolvedExecutable | null;
58
+ export interface CliCallOptions {
59
+ provider: CliProviderName;
60
+ model?: string;
61
+ timeoutMs?: number;
62
+ /** tests only: the program to run in place of the vendor CLI */
63
+ executable?: CliExecutable;
64
+ /** for error messages: values to redact */
65
+ redact: (text: string) => string;
66
+ }
67
+ /**
68
+ * One answer from a local official CLI: the prompt on stdin only, an argument array, `shell: false`, a fresh empty
69
+ * working folder (so no project's hooks or MCP config there run), a bounded run that ends the whole process tree, a
70
+ * cap on what is kept. Errors name the CLI; what it printed is redacted and cut short before it is shown.
71
+ */
72
+ export declare function completeCli(opts: CliCallOptions, system: string, user: string): Promise<string>;
73
+ /** The executable name and install hint of a CLI provider (for docs and messages). */
74
+ export declare function cliInfo(name: CliProviderName): {
75
+ bin: string;
76
+ label: string;
77
+ install: string;
78
+ };
79
+ /** The arguments morph passes to a CLI provider (tests check that no prompt text is ever among them). */
80
+ export declare function cliArgs(name: CliProviderName, model?: string): string[];