@velarscript/web 0.31.0 → 0.32.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 (385) hide show
  1. package/README.md +1 -1
  2. package/dist/analysis/calls/intrinsics/config.d.ts +10 -0
  3. package/dist/analysis/calls/intrinsics/config.d.ts.map +1 -0
  4. package/dist/analysis/calls/intrinsics/config.js +19 -0
  5. package/dist/analysis/calls/intrinsics/config.js.map +1 -0
  6. package/dist/analysis/calls/intrinsics/forms.d.ts +10 -0
  7. package/dist/analysis/calls/intrinsics/forms.d.ts.map +1 -0
  8. package/dist/analysis/calls/intrinsics/forms.js +38 -0
  9. package/dist/analysis/calls/intrinsics/forms.js.map +1 -0
  10. package/dist/analysis/calls/intrinsics/http.d.ts +10 -0
  11. package/dist/analysis/calls/intrinsics/http.d.ts.map +1 -0
  12. package/dist/analysis/calls/intrinsics/http.js +37 -0
  13. package/dist/analysis/calls/intrinsics/http.js.map +1 -0
  14. package/dist/analysis/calls/intrinsics/reactive.d.ts +10 -0
  15. package/dist/analysis/calls/intrinsics/reactive.d.ts.map +1 -0
  16. package/dist/analysis/calls/intrinsics/reactive.js +30 -0
  17. package/dist/analysis/calls/intrinsics/reactive.js.map +1 -0
  18. package/dist/analysis/calls/intrinsics/storage.d.ts +12 -0
  19. package/dist/analysis/calls/intrinsics/storage.d.ts.map +1 -0
  20. package/dist/analysis/calls/intrinsics/storage.js +86 -0
  21. package/dist/analysis/calls/intrinsics/storage.js.map +1 -0
  22. package/dist/analysis/calls/intrinsics/web.d.ts +10 -0
  23. package/dist/analysis/calls/intrinsics/web.d.ts.map +1 -0
  24. package/dist/analysis/calls/intrinsics/web.js +100 -0
  25. package/dist/analysis/calls/intrinsics/web.js.map +1 -0
  26. package/dist/analysis/calls/intrinsics.d.ts +13 -0
  27. package/dist/analysis/calls/intrinsics.d.ts.map +1 -0
  28. package/dist/analysis/calls/intrinsics.js +31 -0
  29. package/dist/analysis/calls/intrinsics.js.map +1 -0
  30. package/dist/analysis/components/contracts.d.ts +19 -0
  31. package/dist/analysis/components/contracts.d.ts.map +1 -0
  32. package/dist/analysis/components/contracts.js +83 -0
  33. package/dist/analysis/components/contracts.js.map +1 -0
  34. package/dist/analysis/components/declaration.d.ts +4 -0
  35. package/dist/analysis/components/declaration.d.ts.map +1 -0
  36. package/dist/analysis/components/declaration.js +163 -0
  37. package/dist/analysis/components/declaration.js.map +1 -0
  38. package/dist/analysis/components/host.d.ts +61 -0
  39. package/dist/analysis/components/host.d.ts.map +1 -0
  40. package/dist/analysis/components/host.js +22 -0
  41. package/dist/analysis/components/host.js.map +1 -0
  42. package/dist/analysis/components/lifecycle.d.ts +22 -0
  43. package/dist/analysis/components/lifecycle.d.ts.map +1 -0
  44. package/dist/analysis/components/lifecycle.js +33 -0
  45. package/dist/analysis/components/lifecycle.js.map +1 -0
  46. package/dist/analysis/components/ownership.d.ts +74 -0
  47. package/dist/analysis/components/ownership.d.ts.map +1 -0
  48. package/dist/analysis/components/ownership.js +106 -0
  49. package/dist/analysis/components/ownership.js.map +1 -0
  50. package/dist/analysis/declarations.d.ts +99 -0
  51. package/dist/analysis/declarations.d.ts.map +1 -0
  52. package/dist/analysis/declarations.js +176 -0
  53. package/dist/analysis/declarations.js.map +1 -0
  54. package/dist/analysis/inference.d.ts +67 -0
  55. package/dist/analysis/inference.d.ts.map +1 -0
  56. package/dist/analysis/inference.js +236 -0
  57. package/dist/analysis/inference.js.map +1 -0
  58. package/dist/analysis/jsx/attributes.d.ts +103 -0
  59. package/dist/analysis/jsx/attributes.d.ts.map +1 -0
  60. package/dist/analysis/jsx/attributes.js +601 -0
  61. package/dist/analysis/jsx/attributes.js.map +1 -0
  62. package/dist/analysis/jsx/elements.d.ts +17 -0
  63. package/dist/analysis/jsx/elements.d.ts.map +1 -0
  64. package/dist/analysis/jsx/elements.js +213 -0
  65. package/dist/analysis/jsx/elements.js.map +1 -0
  66. package/dist/analysis/jsx/host.d.ts +61 -0
  67. package/dist/analysis/jsx/host.d.ts.map +1 -0
  68. package/dist/analysis/jsx/host.js +15 -0
  69. package/dist/analysis/jsx/host.js.map +1 -0
  70. package/dist/analysis/jsx/keys.d.ts +15 -0
  71. package/dist/analysis/jsx/keys.d.ts.map +1 -0
  72. package/dist/analysis/jsx/keys.js +67 -0
  73. package/dist/analysis/jsx/keys.js.map +1 -0
  74. package/dist/analysis/jsx/security.d.ts +29 -0
  75. package/dist/analysis/jsx/security.d.ts.map +1 -0
  76. package/dist/analysis/jsx/security.js +61 -0
  77. package/dist/analysis/jsx/security.js.map +1 -0
  78. package/dist/analysis/jsx-detection.d.ts +49 -0
  79. package/dist/analysis/jsx-detection.d.ts.map +1 -0
  80. package/dist/analysis/jsx-detection.js +196 -0
  81. package/dist/analysis/jsx-detection.js.map +1 -0
  82. package/dist/analysis/keyed-rebuild.d.ts +148 -0
  83. package/dist/analysis/keyed-rebuild.d.ts.map +1 -0
  84. package/dist/analysis/keyed-rebuild.js +299 -0
  85. package/dist/analysis/keyed-rebuild.js.map +1 -0
  86. package/dist/analysis/keyframes-analysis.d.ts +6 -0
  87. package/dist/analysis/keyframes-analysis.d.ts.map +1 -0
  88. package/dist/analysis/keyframes-analysis.js +79 -0
  89. package/dist/analysis/keyframes-analysis.js.map +1 -0
  90. package/dist/analysis/look/builders.d.ts +29 -0
  91. package/dist/analysis/look/builders.d.ts.map +1 -0
  92. package/dist/analysis/look/builders.js +168 -0
  93. package/dist/analysis/look/builders.js.map +1 -0
  94. package/dist/analysis/look/conditions.d.ts +13 -0
  95. package/dist/analysis/look/conditions.d.ts.map +1 -0
  96. package/dist/analysis/look/conditions.js +84 -0
  97. package/dist/analysis/look/conditions.js.map +1 -0
  98. package/dist/analysis/look/edits.d.ts +25 -0
  99. package/dist/analysis/look/edits.d.ts.map +1 -0
  100. package/dist/analysis/look/edits.js +57 -0
  101. package/dist/analysis/look/edits.js.map +1 -0
  102. package/dist/analysis/look/entries.d.ts +56 -0
  103. package/dist/analysis/look/entries.d.ts.map +1 -0
  104. package/dist/analysis/look/entries.js +223 -0
  105. package/dist/analysis/look/entries.js.map +1 -0
  106. package/dist/analysis/look/host.d.ts +47 -0
  107. package/dist/analysis/look/host.d.ts.map +1 -0
  108. package/dist/analysis/look/host.js +16 -0
  109. package/dist/analysis/look/host.js.map +1 -0
  110. package/dist/analysis/look/tokens.d.ts +75 -0
  111. package/dist/analysis/look/tokens.d.ts.map +1 -0
  112. package/dist/analysis/look/tokens.js +151 -0
  113. package/dist/analysis/look/tokens.js.map +1 -0
  114. package/dist/analysis/look/values.d.ts +45 -0
  115. package/dist/analysis/look/values.d.ts.map +1 -0
  116. package/dist/analysis/look/values.js +148 -0
  117. package/dist/analysis/look/values.js.map +1 -0
  118. package/dist/analysis/look-conditions.d.ts +47 -0
  119. package/dist/analysis/look-conditions.d.ts.map +1 -0
  120. package/dist/analysis/look-conditions.js +157 -0
  121. package/dist/analysis/look-conditions.js.map +1 -0
  122. package/dist/analysis/look-sites.d.ts +54 -0
  123. package/dist/analysis/look-sites.d.ts.map +1 -0
  124. package/dist/analysis/look-sites.js +104 -0
  125. package/dist/analysis/look-sites.js.map +1 -0
  126. package/dist/analysis/look-vocabulary-guidance.d.ts +76 -0
  127. package/dist/analysis/look-vocabulary-guidance.d.ts.map +1 -0
  128. package/dist/analysis/look-vocabulary-guidance.js +338 -0
  129. package/dist/analysis/look-vocabulary-guidance.js.map +1 -0
  130. package/dist/analysis/media-conditions.d.ts +33 -0
  131. package/dist/analysis/media-conditions.d.ts.map +1 -0
  132. package/dist/analysis/media-conditions.js +92 -0
  133. package/dist/analysis/media-conditions.js.map +1 -0
  134. package/dist/analysis/program-passes.d.ts +106 -0
  135. package/dist/analysis/program-passes.d.ts.map +1 -0
  136. package/dist/analysis/program-passes.js +149 -0
  137. package/dist/analysis/program-passes.js.map +1 -0
  138. package/dist/analysis/reactivity/bindings.d.ts +37 -0
  139. package/dist/analysis/reactivity/bindings.d.ts.map +1 -0
  140. package/dist/analysis/reactivity/bindings.js +88 -0
  141. package/dist/analysis/reactivity/bindings.js.map +1 -0
  142. package/dist/analysis/reactivity/derived.d.ts +39 -0
  143. package/dist/analysis/reactivity/derived.d.ts.map +1 -0
  144. package/dist/analysis/reactivity/derived.js +80 -0
  145. package/dist/analysis/reactivity/derived.js.map +1 -0
  146. package/dist/analysis/reactivity/host.d.ts +38 -0
  147. package/dist/analysis/reactivity/host.d.ts.map +1 -0
  148. package/dist/analysis/reactivity/host.js +14 -0
  149. package/dist/analysis/reactivity/host.js.map +1 -0
  150. package/dist/analysis/reactivity/retired-accessors.d.ts +82 -0
  151. package/dist/analysis/reactivity/retired-accessors.d.ts.map +1 -0
  152. package/dist/analysis/reactivity/retired-accessors.js +118 -0
  153. package/dist/analysis/reactivity/retired-accessors.js.map +1 -0
  154. package/dist/analysis/renderable.d.ts +47 -0
  155. package/dist/analysis/renderable.d.ts.map +1 -0
  156. package/dist/analysis/renderable.js +105 -0
  157. package/dist/analysis/renderable.js.map +1 -0
  158. package/dist/analysis/routes.d.ts +64 -0
  159. package/dist/analysis/routes.d.ts.map +1 -0
  160. package/dist/analysis/routes.js +182 -0
  161. package/dist/analysis/routes.js.map +1 -0
  162. package/dist/analysis/url-attributes.d.ts +12 -0
  163. package/dist/analysis/url-attributes.d.ts.map +1 -0
  164. package/dist/analysis/url-attributes.js +48 -0
  165. package/dist/analysis/url-attributes.js.map +1 -0
  166. package/dist/analysis/watch-cycles.d.ts +102 -0
  167. package/dist/analysis/watch-cycles.d.ts.map +1 -1
  168. package/dist/analysis/watch-cycles.js +240 -1
  169. package/dist/analysis/watch-cycles.js.map +1 -1
  170. package/dist/analysis/watch-subject.d.ts +45 -0
  171. package/dist/analysis/watch-subject.d.ts.map +1 -0
  172. package/dist/analysis/watch-subject.js +272 -0
  173. package/dist/analysis/watch-subject.js.map +1 -0
  174. package/dist/analysis/web-types.d.ts +27 -0
  175. package/dist/analysis/web-types.d.ts.map +1 -0
  176. package/dist/analysis/web-types.js +170 -0
  177. package/dist/analysis/web-types.js.map +1 -0
  178. package/dist/analyzer.d.ts +18 -617
  179. package/dist/analyzer.d.ts.map +1 -1
  180. package/dist/analyzer.js +208 -4853
  181. package/dist/analyzer.js.map +1 -1
  182. package/dist/compiler.d.ts +20 -0
  183. package/dist/compiler.d.ts.map +1 -1
  184. package/dist/compiler.js +29 -864
  185. package/dist/compiler.js.map +1 -1
  186. package/dist/documentation.d.ts +28 -0
  187. package/dist/documentation.d.ts.map +1 -0
  188. package/dist/documentation.js +67 -0
  189. package/dist/documentation.js.map +1 -0
  190. package/dist/editor/completions.d.ts +12 -0
  191. package/dist/editor/completions.d.ts.map +1 -0
  192. package/dist/editor/completions.js +6 -0
  193. package/dist/editor/completions.js.map +1 -0
  194. package/dist/editor/jsx-completion.d.ts +12 -0
  195. package/dist/editor/jsx-completion.d.ts.map +1 -0
  196. package/dist/editor/jsx-completion.js +137 -0
  197. package/dist/editor/jsx-completion.js.map +1 -0
  198. package/dist/editor/look-completion.d.ts +29 -0
  199. package/dist/editor/look-completion.d.ts.map +1 -0
  200. package/dist/editor/look-completion.js +159 -0
  201. package/dist/editor/look-completion.js.map +1 -0
  202. package/dist/editor.d.ts.map +1 -1
  203. package/dist/editor.js +12 -288
  204. package/dist/editor.js.map +1 -1
  205. package/dist/emit/components.d.ts +33 -0
  206. package/dist/emit/components.d.ts.map +1 -0
  207. package/dist/emit/components.js +135 -0
  208. package/dist/emit/components.js.map +1 -0
  209. package/dist/emit/jsx.d.ts +57 -0
  210. package/dist/emit/jsx.d.ts.map +1 -0
  211. package/dist/emit/jsx.js +384 -0
  212. package/dist/emit/jsx.js.map +1 -0
  213. package/dist/emit/look-css.d.ts +44 -0
  214. package/dist/emit/look-css.d.ts.map +1 -0
  215. package/dist/emit/look-css.js +177 -0
  216. package/dist/emit/look-css.js.map +1 -0
  217. package/dist/emit/look.d.ts +39 -0
  218. package/dist/emit/look.d.ts.map +1 -0
  219. package/dist/emit/look.js +218 -0
  220. package/dist/emit/look.js.map +1 -0
  221. package/dist/emit/runtime-imports.d.ts +40 -0
  222. package/dist/emit/runtime-imports.d.ts.map +1 -0
  223. package/dist/emit/runtime-imports.js +184 -0
  224. package/dist/emit/runtime-imports.js.map +1 -0
  225. package/dist/emitter.d.ts +15 -68
  226. package/dist/emitter.d.ts.map +1 -1
  227. package/dist/emitter.js +79 -1008
  228. package/dist/emitter.js.map +1 -1
  229. package/dist/look/animation.d.ts +7 -0
  230. package/dist/look/animation.d.ts.map +1 -0
  231. package/dist/look/animation.js +13 -0
  232. package/dist/look/animation.js.map +1 -0
  233. package/dist/look/builders.d.ts +35 -0
  234. package/dist/look/builders.d.ts.map +1 -0
  235. package/dist/look/builders.js +74 -0
  236. package/dist/look/builders.js.map +1 -0
  237. package/dist/look/css-functions.d.ts +28 -0
  238. package/dist/look/css-functions.d.ts.map +1 -0
  239. package/dist/look/css-functions.js +54 -0
  240. package/dist/look/css-functions.js.map +1 -0
  241. package/dist/look/keyword-sets.d.ts +41 -0
  242. package/dist/look/keyword-sets.d.ts.map +1 -0
  243. package/dist/look/keyword-sets.js +117 -0
  244. package/dist/look/keyword-sets.js.map +1 -0
  245. package/dist/look/keywords.d.ts +55 -0
  246. package/dist/look/keywords.d.ts.map +1 -0
  247. package/dist/look/keywords.js +387 -0
  248. package/dist/look/keywords.js.map +1 -0
  249. package/dist/look/media.d.ts +19 -0
  250. package/dist/look/media.d.ts.map +1 -0
  251. package/dist/look/media.js +27 -0
  252. package/dist/look/media.js.map +1 -0
  253. package/dist/look/naming.d.ts +9 -0
  254. package/dist/look/naming.d.ts.map +1 -0
  255. package/dist/look/naming.js +45 -0
  256. package/dist/look/naming.js.map +1 -0
  257. package/dist/look/properties.d.ts +16 -0
  258. package/dist/look/properties.d.ts.map +1 -0
  259. package/dist/look/properties.js +52 -0
  260. package/dist/look/properties.js.map +1 -0
  261. package/dist/look/shorthands.d.ts +25 -0
  262. package/dist/look/shorthands.d.ts.map +1 -0
  263. package/dist/look/shorthands.js +130 -0
  264. package/dist/look/shorthands.js.map +1 -0
  265. package/dist/look/tokens.d.ts +38 -0
  266. package/dist/look/tokens.d.ts.map +1 -0
  267. package/dist/look/tokens.js +59 -0
  268. package/dist/look/tokens.js.map +1 -0
  269. package/dist/look/units.d.ts +24 -0
  270. package/dist/look/units.d.ts.map +1 -0
  271. package/dist/look/units.js +33 -0
  272. package/dist/look/units.js.map +1 -0
  273. package/dist/look.d.ts +32 -227
  274. package/dist/look.d.ts.map +1 -1
  275. package/dist/look.js +28 -933
  276. package/dist/look.js.map +1 -1
  277. package/dist/module-roster.d.ts +16 -0
  278. package/dist/module-roster.d.ts.map +1 -0
  279. package/dist/module-roster.js +28 -0
  280. package/dist/module-roster.js.map +1 -0
  281. package/dist/modules/app.d.ts +9 -0
  282. package/dist/modules/app.d.ts.map +1 -0
  283. package/dist/modules/app.js +20 -0
  284. package/dist/modules/app.js.map +1 -0
  285. package/dist/modules/browser-test.d.ts +9 -0
  286. package/dist/modules/browser-test.d.ts.map +1 -0
  287. package/dist/modules/browser-test.js +67 -0
  288. package/dist/modules/browser-test.js.map +1 -0
  289. package/dist/modules/browser.d.ts +10 -0
  290. package/dist/modules/browser.d.ts.map +1 -0
  291. package/dist/modules/browser.js +89 -0
  292. package/dist/modules/browser.js.map +1 -0
  293. package/dist/modules/config.d.ts +9 -0
  294. package/dist/modules/config.d.ts.map +1 -0
  295. package/dist/modules/config.js +14 -0
  296. package/dist/modules/config.js.map +1 -0
  297. package/dist/modules/files.d.ts +9 -0
  298. package/dist/modules/files.d.ts.map +1 -0
  299. package/dist/modules/files.js +16 -0
  300. package/dist/modules/files.js.map +1 -0
  301. package/dist/modules/forms.d.ts +9 -0
  302. package/dist/modules/forms.d.ts.map +1 -0
  303. package/dist/modules/forms.js +26 -0
  304. package/dist/modules/forms.js.map +1 -0
  305. package/dist/modules/http.d.ts +9 -0
  306. package/dist/modules/http.d.ts.map +1 -0
  307. package/dist/modules/http.js +127 -0
  308. package/dist/modules/http.js.map +1 -0
  309. package/dist/modules/look.d.ts +9 -0
  310. package/dist/modules/look.d.ts.map +1 -0
  311. package/dist/modules/look.js +58 -0
  312. package/dist/modules/look.js.map +1 -0
  313. package/dist/modules/realtime.d.ts +9 -0
  314. package/dist/modules/realtime.d.ts.map +1 -0
  315. package/dist/modules/realtime.js +163 -0
  316. package/dist/modules/realtime.js.map +1 -0
  317. package/dist/modules/storage.d.ts +9 -0
  318. package/dist/modules/storage.d.ts.map +1 -0
  319. package/dist/modules/storage.js +59 -0
  320. package/dist/modules/storage.js.map +1 -0
  321. package/dist/modules/types.d.ts +78 -0
  322. package/dist/modules/types.d.ts.map +1 -0
  323. package/dist/modules/types.js +154 -0
  324. package/dist/modules/types.js.map +1 -0
  325. package/dist/modules/web.d.ts +9 -0
  326. package/dist/modules/web.d.ts.map +1 -0
  327. package/dist/modules/web.js +63 -0
  328. package/dist/modules/web.js.map +1 -0
  329. package/dist/modules/websocket.d.ts +11 -0
  330. package/dist/modules/websocket.d.ts.map +1 -0
  331. package/dist/modules/websocket.js +75 -0
  332. package/dist/modules/websocket.js.map +1 -0
  333. package/dist/parser/expressions/jsx.d.ts +17 -0
  334. package/dist/parser/expressions/jsx.d.ts.map +1 -0
  335. package/dist/parser/expressions/jsx.js +43 -0
  336. package/dist/parser/expressions/jsx.js.map +1 -0
  337. package/dist/parser/expressions/keyframes.d.ts +15 -0
  338. package/dist/parser/expressions/keyframes.d.ts.map +1 -0
  339. package/dist/parser/expressions/keyframes.js +33 -0
  340. package/dist/parser/expressions/keyframes.js.map +1 -0
  341. package/dist/parser/expressions/look.d.ts +16 -0
  342. package/dist/parser/expressions/look.d.ts.map +1 -0
  343. package/dist/parser/expressions/look.js +37 -0
  344. package/dist/parser/expressions/look.js.map +1 -0
  345. package/dist/parser/expressions/visual-block.d.ts +17 -0
  346. package/dist/parser/expressions/visual-block.d.ts.map +1 -0
  347. package/dist/parser/expressions/visual-block.js +21 -0
  348. package/dist/parser/expressions/visual-block.js.map +1 -0
  349. package/dist/parser/keyframes-source.d.ts +24 -0
  350. package/dist/parser/keyframes-source.d.ts.map +1 -0
  351. package/dist/parser/keyframes-source.js +133 -0
  352. package/dist/parser/keyframes-source.js.map +1 -0
  353. package/dist/parser/look-source.d.ts +25 -0
  354. package/dist/parser/look-source.d.ts.map +1 -0
  355. package/dist/parser/look-source.js +189 -0
  356. package/dist/parser/look-source.js.map +1 -0
  357. package/dist/parser/spans.d.ts +24 -0
  358. package/dist/parser/spans.d.ts.map +1 -0
  359. package/dist/parser/spans.js +113 -0
  360. package/dist/parser/spans.js.map +1 -0
  361. package/dist/parser/statements/components.d.ts +37 -0
  362. package/dist/parser/statements/components.d.ts.map +1 -0
  363. package/dist/parser/statements/components.js +185 -0
  364. package/dist/parser/statements/components.js.map +1 -0
  365. package/dist/parser/statements/heads.d.ts +38 -0
  366. package/dist/parser/statements/heads.d.ts.map +1 -0
  367. package/dist/parser/statements/heads.js +55 -0
  368. package/dist/parser/statements/heads.js.map +1 -0
  369. package/dist/parser/statements/imports.d.ts +9 -0
  370. package/dist/parser/statements/imports.d.ts.map +1 -0
  371. package/dist/parser/statements/imports.js +31 -0
  372. package/dist/parser/statements/imports.js.map +1 -0
  373. package/dist/parser/statements/reactive.d.ts +31 -0
  374. package/dist/parser/statements/reactive.d.ts.map +1 -0
  375. package/dist/parser/statements/reactive.js +68 -0
  376. package/dist/parser/statements/reactive.js.map +1 -0
  377. package/dist/parser/statements/unsafe-css.d.ts +21 -0
  378. package/dist/parser/statements/unsafe-css.d.ts.map +1 -0
  379. package/dist/parser/statements/unsafe-css.js +42 -0
  380. package/dist/parser/statements/unsafe-css.js.map +1 -0
  381. package/dist/parser.d.ts +37 -50
  382. package/dist/parser.d.ts.map +1 -1
  383. package/dist/parser.js +98 -882
  384. package/dist/parser.js.map +1 -1
  385. package/package.json +2 -2
@@ -1,7 +1,8 @@
1
1
  import { type Diagnostic, type Span } from "@velarscript/compiler";
2
- import { Analyzer, type AnalysisContext, type CompilerAnalysisExtension, type CompilerIntrinsicAnalysisContext, type Expression, type Program, type Statement, type TypeReference, type ValueType } from "@velarscript/compiler/extension";
3
- export declare const routeContextIdentity = "@velarscript/web:velar/web#type:RouteContext";
4
- export declare function inferWebIntrinsic(context: CompilerIntrinsicAnalysisContext): ValueType | undefined;
2
+ import { Analyzer, type AnalysisContext, type CompilerAnalysisExtension, type Expression, type Program, type Statement, type TypeReference, type ValueType } from "@velarscript/compiler/extension";
3
+ import { inferWebIntrinsic } from "./analysis/calls/intrinsics.ts";
4
+ import { routeContextIdentity } from "./analysis/web-types.ts";
5
+ export { inferWebIntrinsic, routeContextIdentity };
5
6
  export declare class VelarWebAnalyzer extends Analyzer {
6
7
  private componentStates;
7
8
  private mountedDepth;
@@ -80,643 +81,43 @@ export declare class VelarWebAnalyzer extends Analyzer {
80
81
  private publicConfigNames;
81
82
  /** velar/look builder calls this compile refused on their own arguments (D114 0.29.0 LK-I2). */
82
83
  private readonly refusedBuilderCalls;
84
+ /** The one object every `analysis/` collaborator reads this analyzer through. */
85
+ private readonly host;
83
86
  constructor(context?: AnalysisContext, extensions?: readonly CompilerAnalysisExtension[]);
84
87
  analyze(program: Program): readonly Diagnostic[];
85
- /**
86
- * D57 rule 138: `velar/web-test` only has a runtime under `velar test
87
- * --browser`, so an import of it anywhere else compiles a call that cannot
88
- * succeed. D51 rule 109 puts the refusal at the declaration rather than at the
89
- * eventual use, so the error lands on the `import` line — including the
90
- * JavaScript-bridge and re-export spellings, which reach the same runtime.
91
- */
92
- private reportBrowserTestImports;
93
- /**
94
- * D72 rule 186: a Web module publishes its own type names, and a user
95
- * declaration of one used to be accepted at the declaration and then lose at
96
- * every use — `type Event:` compiled, and `describe({kind: "charge"})` was
97
- * told it could not assign to `Event`, naming a type the author had just
98
- * written. D51 rule 109 already settled where that refusal belongs: at the
99
- * declaration, which is the only place a rename is cheap.
100
- *
101
- * The names come from the extension's own published table, so adding a type
102
- * to `WEB_OWNED_TYPE_NAMES` extends this protection with it. The last time
103
- * this family was repaired by listing names instead of deriving them, the
104
- * list drifted; D57 rule 135 is the same repair on the Core roster.
105
- *
106
- * Core now says the same sentence about its own built-in type names —
107
- * `builtinTypeNameDeclarationMessage` in packages/compiler/src/analyzer.ts,
108
- * reported as VEL3007. The rosters differ; the wording is meant to read
109
- * alike, so a change to either sentence belongs in both.
110
- *
111
- * `Duration` is on both rosters — Core owns it as a primitive and
112
- * `velar/look` republishes it — so a Web module used to report it twice. This
113
- * refusal is the more specific of the two, because it names the surface the
114
- * author is writing against, so it marks the name refused and Core's stays
115
- * unsaid. The mark is Core's own hook, which is what lets this pass take
116
- * precedence without either side learning the other's roster.
117
- */
118
- private rejectWebOwnedTypeNames;
119
- /**
120
- * WEB-C1: charter §14 promises that a key outside a keyed shape is a
121
- * diagnostic rather than a silent no-op. Interpolated positions report while
122
- * their interpolation is walked; static positions are collected during JSX
123
- * inference and reported once every keyed interpolation is known.
124
- */
125
- private reportStaticJsxKeys;
126
88
  protected predeclareExtensionStatement(statement: Statement): boolean;
127
89
  protected analyzeExtensionStatement(statement: Statement): boolean;
128
90
  protected analyzeStatement(statement: Statement): void;
129
- private directReadonlyPropMutation;
130
- private rootBindingName;
131
91
  protected prescanExtensionScopeDeclaration(statement: Statement): {
132
92
  readonly name: string;
133
93
  readonly span: Span;
134
94
  } | null;
135
- /**
136
- * D71 rule 182: a derived value is reactive and read-only, which is exactly
137
- * the reactive identity a component prop already carries — a bare read lowers
138
- * through `.get()`, and nothing may write it. Registering that identity
139
- * rather than `state` is what keeps `bind={doubled}` and every other writable
140
- * position refusing a derived name for free.
141
- */
142
- private analyzeComputedDeclaration;
143
- /**
144
- * True when `name` resolves to a `computed` declaration or to an imported one.
145
- * The question is asked of the *binding* the name resolves to, never of the
146
- * spelling: a local `state` may shadow an imported derived name, and that
147
- * shadow is writable state.
148
- */
149
- private isComputedBinding;
150
- /**
151
- * True when `name` resolves to a `resource` declaration. Asked of the binding
152
- * rather than of the spelling, for the reason `isComputedBinding` is: a local
153
- * `state` may shadow a resource's name, and the shadow is not a resource.
154
- */
155
- private isResourceBinding;
156
- private isImportedComputedBinding;
157
- /**
158
- * D71 rule 184: a cross-module `computed` travels through `reactiveExports`
159
- * so its bare read lowers through `.get()` like an exported `state` — but it
160
- * is not writable, and the imported binding must not inherit the writable
161
- * identity that carries `bind={...}` and `event => name = ...`. The Web
162
- * extension publishes which exported names are derived, so the import is
163
- * demoted to the read-only reactive identity here.
164
- */
165
95
  protected markDeclaredBindingReactive(name: string, kind?: "state" | "prop"): void;
166
96
  protected inferExtensionExpression(expression: Expression, _contextualType: ValueType): ValueType | undefined;
167
97
  protected inferExpression(expression: Expression, contextualType?: ValueType): ValueType;
168
- /** Infers one builder slot and parks the answer in the probe cache, so the call's own analysis reads it back. */
169
- private probedSlotType;
170
- private writableStateName;
171
- /**
172
- * P2b-5: a `def` that answers markup and answers it with a component element.
173
- *
174
- * Everything about the shape is legal one step out. A component element is a
175
- * legal module-level expression — `const root = <App />` is the instantiation
176
- * site D90 R4-b rules on, and `mount` takes exactly the instance it evaluates
177
- * to. A `def` answering markup is a legal markup helper — dispatch over a
178
- * closed vocabulary is what the P2b wave was writing. The defect is only
179
- * where the two meet, and it is a representation split the type does not
180
- * carry: a component element in a *child* position lowers to `__velarChild`,
181
- * which owns a scope and answers a DOM node, while the same element standing
182
- * alone lowers to `__velarInstantiate`, which answers an instance. Both are
183
- * typed `WebNode`; only one is one. Returned from a helper and handed to a
184
- * render, the instance reaches `__velarAppend` and takes the whole subtree
185
- * down with "JSX can render only text, finite numbers, bool, enums, WebNode
186
- * values, and Lists of those values" — the check-green, runtime-dead shape.
187
- *
188
- * The walk stops at every JSX element, which is exactly where the emitter
189
- * stops: inside one, every position is a child position and every component
190
- * element there is already correct — `return <div><Badge /></div>` and an
191
- * interpolated `{cond ? <Badge /> : ...}` both work today and must keep
192
- * working. Only a component element the returned markup *starts* with is the
193
- * defect, including one reached through a `.map(...)` answering a row per
194
- * item, which fails the same way for the same reason.
195
- */
196
- private rejectUnownedComponentElement;
197
- /**
198
- * The audit's seventh root cause: a `def` that declares reactive state and
199
- * answers `WebNode` is a component wearing a function's clothes, and calling
200
- * it bypasses exactly what the charter already refuses `View(...)` for. Two
201
- * things follow from the call, both reproduced: every call runs the `state`
202
- * declaration again, so the value resets on every re-render; and the
203
- * observers the returned markup registers bind to whatever scope the call
204
- * site was building — at module scope the global one, which is never
205
- * destroyed, so they are never cleaned up.
206
- *
207
- * Only DECLARATION is refused. A `def -> WebNode` that merely reads state or a
208
- * prop is a legitimate markup helper — examples/app has two — and a `def`
209
- * nested inside a component binds its observers to that component's scope, so
210
- * nothing about reading is defective.
211
- *
212
- * What answers "this `def` returns markup" is the sink, not one spelling of
213
- * it: `-> WebNode?` and `-> List<WebNode>` are the shapes markup travels in,
214
- * and a `def` may carry no return type at all — all three reached the same
215
- * defect with the same body while only the bare annotation was read.
216
- */
217
- private rejectStatefulWebNodeFunction;
218
- /**
219
- * D71 rule 182: a declared derived value is read bare, exactly like state.
220
- * Calling one is the habit the retired `computed(...)` accessor taught, and it
221
- * is also what a half-migrated project looks like from the importing side — so
222
- * the answer names the one spelling and carries the edit that reaches it,
223
- * which is what lets `velar fix` finish a migration that crosses modules.
224
- */
225
- private calledComputedBinding;
226
- /**
227
- * D69 rule 178: a `watch` body that can never run is a block of statements
228
- * the compile silently drops — the same defect a bare `5` is already rejected
229
- * for (VEL4030), reached from a position the rule could not see.
230
- *
231
- * D90 R15(a) adds the third refusal and fixes the order the three are asked
232
- * in. A frozen subject is answered before the shape rule so that one shape
233
- * never draws two messages: a subject built only from frozen parts has no
234
- * reactive source at all, and telling its author to declare a `computed`
235
- * would only buy him a dead one. What survives both is either a path — the
236
- * name of a reactive binding, or a member/index read out of one — or a
237
- * computation, and a computation has a spelling of its own.
238
- *
239
- * The three refusals are separate because their causes are: a reader that was
240
- * not called names a value that never moves, a frozen value has no reactive
241
- * source behind it at all, and a computed subject has one but hides which.
242
- */
243
- private rejectFrozenWatchSubject;
244
- /**
245
- * D114 W: the three watch shapes a compile can prove re-trigger the watch
246
- * itself. D90 R21 removed the analysis of *who writes what* across calls, and
247
- * nothing here brings it back: two watches writing one state are still an
248
- * ordinary program, a write reached through an ordinary helper is still
249
- * silent, and a write under `if`, `match`, a loop, `try`, a nested `def` or an
250
- * arrow is still the author's converging correction to make.
251
- *
252
- * What is refused is only what is decided at the top of the body, with no
253
- * condition to end it:
254
- *
255
- * - **B** the body writes the watched place itself (`watch count: count =
256
- * count + 1`), assignment, compound assignment, or a mutating collection
257
- * call on the watched collection;
258
- * - **A2(a)** the subject is a `resource` field and the body reloads that
259
- * same resource — a reload writes exactly those fields, so every completed
260
- * load re-triggers the watch;
261
- * - **A2(b)** the body starts an `action` or an `async def` of this module
262
- * whose own top level writes the watched place. One hop, one module, no
263
- * condition on either end; anything further is the runtime budget's.
264
- *
265
- * One diagnostic per watch, at the first statement that earns it. A watch with
266
- * two of these has two mistakes, and the second is read after the first is
267
- * fixed, exactly as two errors on one line are.
268
- */
269
- private rejectWatchCycle;
270
- /**
271
- * D114 0.28.0 H-D1: the type of the place `steps` below the watched subject,
272
- * or null when the walk cannot reach one.
273
- *
274
- * Only the steps the reactive graph publishes as part of the subject are
275
- * walked — a record field and a collection element — because those are the
276
- * writes a watch on the containing value is woken by. A step that leaves them
277
- * (a class instance, a capability handle, a field the record does not declare)
278
- * is not provably part of the subject, and a refusal that must be right every
279
- * time answers no there rather than guessing.
280
- */
281
- /**
282
- * Whether a write `steps` below the watched subject, made the given way, is a
283
- * write of the subject — the one definition both the body scan (VEL5077) and
284
- * the one-hop writer scan (VEL5079) read. An assignment to a place the walk
285
- * can reach is a write; a call is one only when the type at that depth is a
286
- * collection and the call is on its own mutating roster.
287
- */
288
- private watchSubjectWrite;
289
- private reactivePlaceType;
290
- /**
291
- * D89 A4: records `list = list.map(item => {…})`, React's immutable update,
292
- * where the callback builds a new record rather than changing a field.
293
- *
294
- * D90 R2 stands — `__velarKeyed` compares identity and that does not move,
295
- * and the framework does not accommodate the idiom. This channel is not the
296
- * framework taking responsibility; it is the compiler telling the author that
297
- * the row he is typing into is about to be destroyed. Nothing is reported
298
- * yet: the advisory is owed only if the rewritten list is what a keyed list
299
- * renders, and the render usually sits below the update.
300
- */
301
- private recordKeyedListRebuild;
302
- /**
303
- * D89 A4, the wider proven shape: the same churn written as a derived value.
304
- * `computed rows = source.map(item => {…})` and `computed rows = build(...)`
305
- * over a `for`/`append` builder both hand a keyed position a fresh record for
306
- * every row on every recompute, which is exactly what the assignment shape
307
- * does — the reconciliation wave compiled both and found only one of them
308
- * named. It is one advisory with a wider proof, not a second code: the defect,
309
- * the consequence, and the suppression are the same.
310
- *
311
- * A `const` in a component body is deliberately not here. It is constructed
312
- * once, so its records never move, and advising it would be a guess rather
313
- * than a proof.
314
- */
315
- private recordDerivedKeyedListRebuild;
316
- /**
317
- * Whether a derived initializer constructs one fresh record per source
318
- * element. Two spellings are proven and everything else is silent: a `map`
319
- * whose callback answers a record literal — the same recognizer the
320
- * assignment shape uses — and a call to a `def` this module declares whose
321
- * whole answer is a list it filled with record literals.
322
- */
323
- private rebuildsRecordsPerElement;
324
- /**
325
- * D89 A4: raises the advisory for the rebuilds whose list a keyed position
326
- * really renders. The advisory channel cannot reach `this.diagnostics`, so
327
- * nothing here fails a build, changes an emitted byte, or moves a semantic
328
- * rule; `// velar-allow A4: <reason>` suppresses it where building the rows is
329
- * the only spelling, which a `readonly` list or one API response makes it.
330
- */
331
- private adviseKeyedListRebuilds;
332
- /** A value that is read by calling it and takes no arguments to do so. */
333
- private zeroArgumentReader;
334
- /**
335
- * True only for subjects built entirely from values the compile can see are
336
- * frozen: literals, and non-reactive bindings whose type is a primitive, so no
337
- * deep-reactive object can be hiding behind the name. Every member access,
338
- * index, and call is excluded on purpose — `alias.done` on a const bound to a
339
- * reactive element does track, and a call can read anything.
340
- */
341
- private frozenWatchSubject;
342
- /** A primitive holds no reactive identity, so a non-reactive binding of one is a snapshot. */
343
- private frozenValueType;
344
- /**
345
- * D71 rule 182: a derived value has no writable location behind it, so the
346
- * const message ("cannot assign to const binding") would name the wrong
347
- * reason. Answering here means the reader is told what a derived value is and
348
- * which spelling holds a value that is written.
349
- */
350
- private rejectComputedAssignment;
351
- /**
352
- * D71 rule 183: `computed(...)` the function — the shape Vue and the signals
353
- * libraries teach — is not how a derived value is written here; the `computed`
354
- * declaration is. The declaration is recorded before the core walks the module
355
- * so its reads can be matched against it — the rewrite that removes the call
356
- * parentheses is only offered when every read is a plain `x()`.
357
- */
358
- private recordRetiredAccessorDeclaration;
359
- /** Returns true when the name is one of the retired accessor globals this pass owns. */
360
- private recordRetiredAccessorRead;
361
- /**
362
- * D71 migration: one message per site, and a mechanical rewrite only where
363
- * the compile can prove the rewrite. Where the
364
- * accessor is used as a value there is no second spelling left to offer, so
365
- * that site is told to declare the value and write an ordinary `def` where a
366
- * callable is what the caller wants — and it gets no edit, because moving a
367
- * reader out of a value position is the author's decision.
368
- */
369
- private reportRetiredComputedFunction;
370
98
  protected extensionFieldsOf(name: string): ReadonlyMap<string, ValueType> | null;
371
99
  protected inferExtensionCall(callee: import("@velarscript/compiler/extension").ExtensionValueType, arguments_: readonly Expression[], argumentNames: readonly (string | null)[] | undefined, callSpan: Span): ValueType | undefined;
372
100
  protected validateExtensionTypeSyntax(syntax: import("@velarscript/compiler/extension").TypeSyntax, validate: (syntax: import("@velarscript/compiler/extension").TypeSyntax) => boolean, resolve: (reference: TypeReference) => ValueType): boolean | undefined;
373
- /**
374
- * D43 item 69: a component body is a construction section, not a scope with
375
- * an exit — its resources live until unmount. Ownership belongs to the
376
- * lifecycle hook or to a function inside the component, so the setup section
377
- * says so instead of releasing at the wrong moment.
378
- */
379
101
  protected ownershipScopeRejection(): string | null;
380
- /**
381
- * D114 0.29.0 JX-I2: a component body has no function frame, so a `return` nested
382
- * inside it — in a `match` arm, an `if`, a `for` — used to earn VEL3003 next to
383
- * VEL5008 ("exactly one top-level return"), two rules its author can only read as
384
- * contradicting each other. A lifecycle hook and a watch body are inside the same
385
- * component and are *not* it: neither returns anything, so a `return` there keeps
386
- * VEL3003.
387
- */
388
102
  protected extensionOwnsFunctionlessReturn(): boolean;
389
103
  protected invalidExtensionAwaitContext(): boolean;
390
104
  protected invalidExtensionAwaitMessage(): string | null;
391
- private componentType;
392
- private analyzeResourceDeclaration;
393
- private actionType;
394
- private analyzeActionDeclaration;
395
- private analyzeComponent;
396
- private containsReadonlyView;
397
- private validateComponentHandleType;
398
105
  protected resolveAnnotation(reference: TypeReference | null): ValueType;
399
- private normalizeComponentContracts;
400
- private validateComponentHost;
401
- private analyzeLookEntries;
402
- /**
403
- * LOK-D1: a `look:` literal is constructed once, where it is written. Its
404
- * conditions and its values are snapshot positions — a reactive read inside
405
- * one compiles cleanly and then never updates, which is the quietest trap in
406
- * the visual language. The two spellings that stay live are the JSX
407
- * expression position and the `look:property` directive, so the read is
408
- * rejected here and both are taught.
409
- */
410
- private reportLookSnapshotReads;
411
- /**
412
- * True when a name both belongs to a derived reactive declaration and still
413
- * resolves to one here: a computed accessor is a zero-argument function, and a
414
- * resource or action handle is a record with its reactive fields. An ordinary
415
- * binding that happens to share the name — a function parameter, a local — is
416
- * not a reactive read.
417
- */
418
- private derivedReactiveRead;
419
- /**
420
- * LOK-U8: the velar/look builders check their numeric domains at run time, so
421
- * a literal out-of-range colour used to compile clean and blank the page on
422
- * the first paint. Literal arguments are checked in the same terms while the
423
- * module compiles; dynamic arguments keep the runtime guard.
424
- */
425
- private checkLookBuilderCall;
426
- /**
427
- * D103 rules 1 and 5 — what a checked token reference has to be at the site
428
- * that writes it.
429
- *
430
- * The compiler cannot see a design system's values: no token stylesheet is an
431
- * input to this compile, and the whole point of the contract is that the
432
- * theme swaps values under the same names. So the reference itself is the
433
- * only thing there is to check, and it is checked completely — a literal
434
- * name, spelled as a CSS custom property identifier, and nothing else in the
435
- * call. A computed name would leave a Look value with no checked part at all,
436
- * which is the surface D50 rule 92 says is worse than none.
437
- */
438
- private checkLookTokenCall;
439
- /**
440
- * D103 rule 4 — the migration off the one passthrough that used to work.
441
- *
442
- * The rewrite carries the `token` import when the module does not already
443
- * have one, because a fix that leaves a module naming an unimported builder
444
- * is not mechanical. A `var(--x, fallback)` reference has no rewrite: rule 5
445
- * closed the contract against per-site fallbacks, so the message says that
446
- * rather than offering a migration that would silently drop the fallback.
447
- */
448
- private reportLookColorVarReference;
449
- /** The one edit that gives this module a `token` import, in the shape D103's migration needs. */
450
- private lookTokenImportEdit;
451
- private checkAnimateBuilderCall;
452
- private checkAnimationKeyword;
453
- private analyzeKeyframes;
454
- /** Whether a builder call this compile refused on its own arguments lies inside `sourceSpan`. */
455
- private refusedBuilderCallWithin;
456
- private reportKeyframeSnapshotReads;
457
- /**
458
- * D104 rule 2 — the wider half of the promise VEL5039 already made. A
459
- * repeated property name is refused because the second entry overwrites the
460
- * first and Look has no source order to settle which is meant; a shorthand
461
- * beside a longhand it writes is the same defect with two spellings, and it
462
- * is the one that hid thirty-six dead declarations in a consumer's shell.
463
- * Reports once against the entry that completes the pair.
464
- */
465
- private reportLookShorthandOverlap;
466
- /**
467
- * The same rule where the properties are written as element directives. A
468
- * `look:` directive lowers to exactly the rule a block entry does, so an
469
- * element carrying `look:padding` and `look:paddingTop` has the pair in the
470
- * same scope as surely as a block does. The `style:` directives are not
471
- * checked here: they compose one inline style object, where the browser's own
472
- * source order settles the pair.
473
- */
474
- private reportLookDirectiveOverlap;
475
- /**
476
- * Records one entry in its lowered scope (condition signature plus target) so
477
- * two sibling blocks with the same condition report the property they both
478
- * set. Returns false when the entry repeats. LOK-I4: the charter's duplicate
479
- * promise used to hold only inside a single indented scope.
480
- */
481
- private recordLookEntry;
482
- /**
483
- * The vocabulary checks a Look property shares between the block spelling and
484
- * the `look:`/`style:` directives. Returns false when the entry is already
485
- * reported and its value needs no further checking. LOK-I1: an unrecognized
486
- * property no longer co-reports a `stringType` fallback assignment error.
487
- */
488
- private analyzeLookValue;
489
- /** Whether this value is written as a call to the module's `token` builder, alias included. */
490
- private isLookTokenCall;
491
- /**
492
- * A complete CSS filter function whose arguments fit the checked Look
493
- * builders has one equivalent source spelling. The parser deliberately
494
- * stops at the first function or argument grammar it cannot prove, leaving
495
- * arbitrary CSS and externally defined filter functions as ordinary text.
496
- */
497
- private adviseLookFilterSpelling;
498
- /** Uses an existing alias when present and lists only builders the fix must import. */
499
- private localizeLookBuilderCall;
500
- /** Rewrites either a Look entry expression or the synthetic value of a JSX Look directive. */
501
- private lookBuilderRewrite;
502
- /** Adds missing builders to the module's one velar/look import in stable order. */
503
- private lookBuilderImportEdit;
504
- /** How this module spells a call to the token builder, honouring an aliased import. */
505
- private lookTokenCallText;
506
- /**
507
- * The edits that replace one written Look value with the checked token call,
508
- * in the spelling of the site that wrote it.
509
- *
510
- * A `look:property="text"` directive is analyzed through a synthetic literal
511
- * standing for the whole attribute, so the rewrite replaces the attribute:
512
- * splicing a call between an attribute's quotes is not JSX, and a fix that
513
- * produces a parse error is not a mechanical fix. The `look:property={...}`
514
- * spelling carries a real expression whose span is the value alone, and is
515
- * rewritten in place like a block entry.
516
- */
517
- private lookTokenRewrite;
518
- /**
519
- * D103 rule 4, free-text half — an advisory rather than a refusal.
520
- *
521
- * `fontFamily`, `backdropFilter` and the other free-text kinds accept
522
- * arbitrary CSS text by construction, and a `var()` inside a larger value is
523
- * a legitimate spelling with no single token to rewrite it to: the tail of a
524
- * font stack, one layer of a filter list. Refusing there would refuse real
525
- * CSS. What is advised is the narrow case where the *whole* value is one
526
- * reference, because there `token("--name")` is the checked spelling of the
527
- * same thing and the rewrite is unambiguous — which is the bar the `A`
528
- * roster is written to.
529
- */
530
- private adviseLookTokenSpelling;
531
- /**
532
- * `subject` names the position in the message. It is the property itself
533
- * everywhere except the `transition(...)` builder, whose first argument takes
534
- * `transitionProperty`'s vocabulary but is not written as that property — a
535
- * refusal that named the longhand there would name a spelling the author
536
- * never wrote.
537
- */
538
- private validateLookStringVocabulary;
539
- /**
540
- * D65 rule 168 closed the closed sets against misspelled literals, and D65
541
- * item 3 makes a `const` string a first-class design token — so the two have
542
- * to agree. A name or a record field that folds to a bare CSS keyword is
543
- * checked exactly as the literal spelling of it is; anything that folds to
544
- * composed CSS text (a builder result, a unit, a gradient) is not a keyword
545
- * and is left to the type and to the builder's own checks.
546
- */
547
- private foldedLookKeyword;
548
- /**
549
- * LOK-D3: a bare number on a length property reaches CSS as a declaration the
550
- * browser discards. The union already rejects it; this diagnostic replaces the
551
- * union dump with the unit the author meant to write.
552
- */
553
- private reportLookNumberWithoutUnit;
554
- private inferLookCondition;
555
- private checkViewportThreshold;
556
- private inferJsx;
557
- /**
558
- * WEB-S3: `srcdoc` builds a whole document out of a string, and that document
559
- * inherits this page's origin — so it is a second raw-HTML boundary next to
560
- * the one the charter names (`unsafe:html`), reachable with no marker at all.
561
- * The marker this one gets is `sandbox`, because sandbox is what actually
562
- * takes the origin away; requiring it makes the boundary visible where it is
563
- * crossed. `allow-scripts allow-same-origin` together hands the origin back,
564
- * so the pair is refused by name rather than accepted as a sandbox.
565
- */
566
- private reportIframeSrcdocSandbox;
567
- /**
568
- * WEB-S2: the analyzer already refuses an anchor that opens a window without
569
- * 'noopener', so a URL attribute whose value is a script scheme cannot be the
570
- * one URL question it declines to ask. A written-down URL is answered here; a
571
- * value that arrives at run time is answered by the runtime attribute check.
572
- */
573
- private reportUrlAttributeScheme;
574
- private checkKeyedInterpolation;
575
- private reportIneffectiveJsxKeys;
576
- private analyzeComponentElement;
577
- /**
578
- * The `look=` attribute on either host kind. A Look block written inline is
579
- * reported without inferring its entries, so the one directive-level message
580
- * stands alone; an empty list names the accepted family rather than rendering
581
- * `List<unknown>` (LOK-I3, LOK-I6).
582
- */
583
- private analyzeJsxLookAttribute;
584
- /**
585
- * Composition is how a Look overrides another one: `...baseLook` puts the two
586
- * in an order the reader can see, and everything after it wins. Two looks
587
- * placed side by side on one element state no order at all, so a property both
588
- * of them set has no answer the source gives — the winner used to fall out of
589
- * whichever rule the stylesheet happened to carry last. The shape is refused
590
- * rather than ordered by fiat, and the refusal names the spelling that states
591
- * the order the author meant.
592
- */
593
- private reportIndependentLookCollisions;
594
- private analyzeComponentRef;
595
- private analyzeNativeJsxAttribute;
596
- /**
597
- * A14: `condition ? "true" : "false"` is the expanded spelling of the Core
598
- * text conversion `str(condition)`. Keep that conversion explicit at a DOM
599
- * text boundary instead of teaching every attribute its own coercion rule.
600
- *
601
- * The rule does not reach component props or HTML bool-presence attributes.
602
- * A string "false" keeps such an attribute present; accepting that spelling
603
- * as canonical would hide a likely presence bug whose direct expression is
604
- * the bool itself.
605
- */
606
- private adviseNativeBooleanTextConversion;
607
- /** Directives and compiler-owned control attributes do not use DOM text conversion. */
608
- private plainNativeTextAttribute;
609
- /**
610
- * D90 coherence-3: DOM attribute names and ARIA are documented as checked
611
- * surfaces, and nothing checked them — `className="panel"` compiled clean and
612
- * emitted a dead attribute, while the sibling React reflex `onClick=` on the
613
- * same element was already refused. So a model got a clean bill of health on
614
- * exactly the half of its React habit that silently breaks the page.
615
- *
616
- * The rule diagnoses names that are KNOWN wrong, never names that are merely
617
- * unknown. HTML lets a document carry attributes no roster can enumerate, so
618
- * `foo="bar"`, `data-*`, and a framework's own prefixes stay legal; a false
619
- * positive there would block a correct program, which is worse than the
620
- * silence it replaces. Three closed rosters answer three closed questions:
621
- * the React / JavaScript-property spellings, the ARIA attribute names (ARIA,
622
- * unlike HTML, admits no custom names), and the ARIA and role vocabularies.
623
- *
624
- * D61 bounds the value half. Every native attribute uses the same presence
625
- * rule: false/null remove it, true writes an empty value, and strings carry
626
- * literal text. A token vocabulary is therefore read only against a string
627
- * literal; expression values are runtime questions. A14 separately shortens
628
- * an explicit bool-to-text conditional to `str(bool)` when that rewrite is
629
- * provably equivalent.
630
- *
631
- * Returns true when it reported, so the caller does not stack a value-shape
632
- * message on an attribute whose name is already answered.
633
- */
634
- private reportNativeAttributeSpelling;
635
- /**
636
- * GRM-A4: an event handler runs for effect and returns null. The hole this
637
- * closes is `on:click={() => {}}`: after a fat arrow, braces build a record,
638
- * never a block, so the empty-record factory used to be accepted as a handler
639
- * and silently did nothing on every click.
640
- */
641
- private checkEventHandlerResult;
642
- /**
643
- * D47 rule 84(A): a bind target is a writable reactive location — a state
644
- * name, or a record-field / List-index / Map-key path rooted in one. A
645
- * computed accessor, a const, and a function result stay rejected: nothing
646
- * would receive the write.
647
- */
648
- private isWritableBindTarget;
649
- /**
650
- * Walks a member/index path inward to its root state binding, checking every
651
- * segment is a writable location: a declared record field, a List element, or
652
- * a Map value. Returns the root state name, or null when the path is not a
653
- * writable reactive location.
654
- */
655
- private bindPathRoot;
656
- /**
657
- * D47 rule 84: `bind:group` binds a set of inputs that share one decision.
658
- * A radio group holds the selected input's `value`; a checkbox group holds the
659
- * checked values as a List<string>, so checking and unchecking are membership
660
- * changes.
661
- */
662
- private analyzeBindGroup;
663
- private eventAssignedStateBinding;
664
- private isLookInput;
665
- private isClassInput;
666
- private isJsxRenderable;
667
106
  /**
668
- * F1's qualifying rule, and the whole of it: the types whose rendering is
669
- * *exactly* one text node.
670
- *
671
- * `string` and `number` are the two. `__velarAppend` answers a string with one
672
- * text node carrying it — the empty string included, which is why `""` is not
673
- * a special case — and a number with one text node carrying `String(value)`,
674
- * or refuses a non-finite number. An enum member is text at runtime and is
675
- * assignable to `string`, so it rides the same branch it always did.
676
- *
677
- * Everything else stays on the full dynamic region, and the reason is always
678
- * the same one: it does not render as *one* node.
679
- * - `bool` renders **zero** nodes (`__velarAppend` returns on `true`/`false`),
680
- * so a text node would be an added child where an element previously had
681
- * none — observable to `:empty`, to `childNodes`, and to anything that
682
- * walks them.
683
- * - An optional of either renders zero nodes when null and one when present,
684
- * so it needs an anchor to come back to.
685
- * - `WebNode`, lists, unions, `any` and every named type can hold markup or
686
- * several nodes, which is what the comment pair exists to bracket.
687
- *
688
- * Widening this set is a semantic ruling, not an optimisation: it would
689
- * change the node count of a rendered document.
107
+ * The one host the `analysis/` collaborators read this analyzer through,
108
+ * built here because a `private` member cannot be read outside the class it is
109
+ * declared in (TS2341, D114 line 512). Every table the walk replaces once per
110
+ * program and every depth a collaborator moves arrives as an accessor pair, so
111
+ * a collaborator reads the live value and keeps its own `host.jsxDepth += 1`
112
+ * text.
690
113
  */
691
- private isScalarTextType;
692
- private isJsxAttributeValue;
693
- private isOptionalString;
114
+ private analysisHost;
694
115
  /**
695
- * The elements of a `<Router routes={...}>` list literal, one at a time.
696
- *
697
- * A route written as `route("/a", Panel)` is checked at that call; the record
698
- * that call returns `{path: "/a", component: Panel}` is a legal spelling
699
- * of the same value, reaches the same runtime position, and until now was
700
- * checked by nothing: `{path: "no-leading-slash", component: 5}` compiled
701
- * clean and handed `5` to the Router as a component. Closing the sink rather
702
- * than the spelling means asking the same questions wherever a route arrives,
703
- * so this reports exactly what `route(...)` reports, word for word.
704
- *
705
- * The runtime is already the second referee (D90 R19): `routerTable`
706
- * validates every path and refuses a component that is not callable. Nothing
707
- * here changes which programs run — it moves a refusal the author would have
708
- * met at mount to the place the source shows the mistake.
709
- *
710
- * The `any` component slot is skipped here rather than inside
711
- * `checkWebRouteComponent`, which is why that method carries no `any` arm:
712
- * this loop and the Router `fallback` attribute are its only two callers, and
713
- * both filter first. An `any` reaches this slot for real — `web.lazy` answers
714
- * `anyType` from each of its error paths — and it arrives with the author's
715
- * real message already reported, so a second "received any" would be a
716
- * cascade. The `route(...)` twin skips it for the same reason.
116
+ * The base-analyzer operations the collaborators perform, bound to this
117
+ * analyzer. They are their own object because they are plain function values:
118
+ * spreading them into the host above copies the bindings, while an accessor
119
+ * has to be written in the literal that becomes the host.
717
120
  */
718
- private checkWebRouteRecords;
719
- private checkWebRouteComponent;
720
- private analyzeInlineVisualAttribute;
121
+ private analyzerOperations;
721
122
  }
722
123
  //# sourceMappingURL=analyzer.d.ts.map