@velarscript/web 0.30.1 → 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
@@ -0,0 +1,272 @@
1
+ /**
2
+ * A watch subject as the author wrote it: the allowlist of shapes a subject may
3
+ * be, and the reconstruction of one back into the source text a refusal quotes.
4
+ *
5
+ * D115 P4 R3a: the reconstruction is a total function over an expression, so it
6
+ * reads as a module. Its per-kind renderers are named rather than inlined into
7
+ * one switch, because a reader who arrives asking how a call or an f-string is
8
+ * printed should be able to be sent to the answer.
9
+ */
10
+ import {} from "@velarscript/compiler/extension";
11
+ /**
12
+ * D90 R15(a): a watch subject names a place in the reactive graph — the name of
13
+ * a `state` or a `computed`, or a read path out of one — and never computes a
14
+ * value. The rule is written positively, as this allowlist, because that is
15
+ * what makes the relation between a watch and its source *declared* rather than
16
+ * inferred; every earlier attempt to infer it was defeated by one more
17
+ * indirection. A path is legal at any depth and with any index expression:
18
+ * `rows[i].cells[j]` still selects a place, and whether `i` is a constant or
19
+ * another state changes nothing about that. An operator or a call derives a new
20
+ * value instead, and a derived value already has a spelling that names it,
21
+ * caches it, and declares its dependencies. The conditional is an operator by
22
+ * the charter's own vocabulary, and an f-string builds a new string, so neither
23
+ * needs a clause of its own — they simply are not paths.
24
+ *
25
+ * Whether the root of a legal path is reactive is a different question, and
26
+ * `frozenWatchSubject` keeps it: this answers shape only.
27
+ */
28
+ export function watchSubjectPath(expression) {
29
+ switch (expression.kind) {
30
+ case "IdentifierExpression":
31
+ return true;
32
+ case "MemberExpression":
33
+ case "IndexExpression":
34
+ return watchSubjectPath(expression.object);
35
+ default:
36
+ return false;
37
+ }
38
+ }
39
+ /** The escapes a text literal carries back into source (`scanStringEscape`). */
40
+ const WATCH_SUBJECT_TEXT_ESCAPES = {
41
+ "\\": "\\\\",
42
+ "\"": "\\\"",
43
+ "\n": "\\n",
44
+ "\r": "\\r",
45
+ "\t": "\\t",
46
+ };
47
+ /**
48
+ * A text literal written back as source. `LiteralExpression.raw` holds the
49
+ * decoded content without its quotes, so echoing it would quote an expression
50
+ * the author never wrote and hand him a `computed` line that does not compile —
51
+ * `watch term + "!":` would read back as `term + !`. The quote the author chose
52
+ * is not on the node, so every text literal reads back double-quoted; that is a
53
+ * spelling difference, not a meaning one, and it compiles.
54
+ */
55
+ function renderWatchTextLiteral(value, insideFString) {
56
+ let text = "";
57
+ for (const character of value) {
58
+ const escape = WATCH_SUBJECT_TEXT_ESCAPES[character];
59
+ if (escape !== undefined) {
60
+ text += escape;
61
+ continue;
62
+ }
63
+ // `{{` and `}}` are how an f-string carries a brace that is not a hole.
64
+ if (insideFString && (character === "{" || character === "}")) {
65
+ text += `${character}${character}`;
66
+ continue;
67
+ }
68
+ const code = character.codePointAt(0);
69
+ text += code < 0x20 || code === 0x7f ? `\\u{${code.toString(16)}}` : character;
70
+ }
71
+ return text;
72
+ }
73
+ function renderWatchSubjectLiteral(expression) {
74
+ return typeof expression.value === "string" ? `"${renderWatchTextLiteral(expression.value, false)}"` : expression.raw;
75
+ }
76
+ function renderWatchSubjectMember(expression) {
77
+ const object = renderWatchSubjectOperand(expression.object);
78
+ return object === null ? null : `${object}${expression.optional ? "?." : "."}${expression.property}`;
79
+ }
80
+ function renderWatchSubjectIndex(expression) {
81
+ const object = renderWatchSubjectOperand(expression.object);
82
+ const index = renderWatchSubject(expression.index);
83
+ return object === null || index === null ? null : `${object}${expression.optional ? "?" : ""}[${index}]`;
84
+ }
85
+ function renderWatchSubjectCall(expression) {
86
+ const callee = renderWatchSubjectOperand(expression.callee);
87
+ if (callee === null)
88
+ return null;
89
+ const argumentTexts = [];
90
+ for (const [index, argument] of expression.arguments.entries()) {
91
+ const rendered = renderWatchSubject(argument);
92
+ if (rendered === null)
93
+ return null;
94
+ const name = expression.argumentNames?.[index] ?? null;
95
+ argumentTexts.push(name === null ? rendered : `${name} = ${rendered}`);
96
+ }
97
+ return `${callee}${expression.optional ? "?" : ""}(${argumentTexts.join(", ")})`;
98
+ }
99
+ function renderWatchSubjectList(expression) {
100
+ const elements = expression.elements.map((element) => renderWatchSubject(element));
101
+ if (elements.some((element) => element === null))
102
+ return null;
103
+ return `[${elements.join(", ")}]`;
104
+ }
105
+ function renderWatchSubjectObject(expression) {
106
+ const entries = [];
107
+ for (const property of expression.properties) {
108
+ if (property.kind === "ObjectSpread") {
109
+ const value = renderWatchSubjectOperand(property.value);
110
+ if (value === null)
111
+ return null;
112
+ entries.push(`...${value}`);
113
+ continue;
114
+ }
115
+ if (property.shorthand === true) {
116
+ entries.push(property.name);
117
+ continue;
118
+ }
119
+ const value = renderWatchSubject(property.value);
120
+ if (value === null)
121
+ return null;
122
+ entries.push(`${property.name}: ${value}`);
123
+ }
124
+ return `{${entries.join(", ")}}`;
125
+ }
126
+ function renderWatchSubjectArrow(expression) {
127
+ // An annotated or defaulted parameter would need a type printer this file
128
+ // has no business owning; the callback shapes a subject carries do not.
129
+ if (expression.parameters.some((parameter) => parameter.type !== null || parameter.defaultValue !== null))
130
+ return null;
131
+ const body = renderWatchSubject(expression.body);
132
+ if (body === null)
133
+ return null;
134
+ const parameters = expression.parameters.map((parameter) => `${parameter.rest ? "..." : ""}${parameter.name}`);
135
+ const head = expression.parameters.length === 1 && !expression.parameters[0].rest
136
+ ? parameters[0]
137
+ : `(${parameters.join(", ")})`;
138
+ return `${expression.asynchronous ? "async " : ""}${head} => ${body}`;
139
+ }
140
+ function renderWatchSubjectUnary(expression) {
141
+ const operand = renderWatchSubjectOperand(expression.operand);
142
+ if (operand === null)
143
+ return null;
144
+ const spaced = expression.operator === "not" || expression.operator === "await";
145
+ return `${expression.operator}${spaced ? " " : ""}${operand}`;
146
+ }
147
+ function renderWatchSubjectBinary(expression) {
148
+ const left = renderWatchSubjectOperand(expression.left);
149
+ const right = renderWatchSubjectOperand(expression.right);
150
+ if (left === null || right === null)
151
+ return null;
152
+ return groupWatchSubject(`${left} ${expression.operator} ${right}`, expression.parenthesized);
153
+ }
154
+ function renderWatchSubjectComparisonChain(expression) {
155
+ const operands = expression.operands.map((operand) => renderWatchSubjectOperand(operand));
156
+ const first = operands[0];
157
+ if (first === undefined || first === null || operands.some((operand) => operand === null))
158
+ return null;
159
+ const chain = operands.slice(1).reduce((text, operand, index) => `${text} ${expression.operators[index]} ${operand}`, first);
160
+ return groupWatchSubject(chain, expression.parenthesized);
161
+ }
162
+ function renderWatchSubjectConditional(expression) {
163
+ const condition = renderWatchSubjectOperand(expression.condition);
164
+ const thenValue = renderWatchSubjectOperand(expression.thenValue);
165
+ const elseValue = renderWatchSubject(expression.elseValue);
166
+ if (condition === null || thenValue === null || elseValue === null)
167
+ return null;
168
+ return `${condition} ? ${thenValue} : ${elseValue}`;
169
+ }
170
+ function renderWatchSubjectIs(expression) {
171
+ const value = renderWatchSubjectOperand(expression.value);
172
+ // Only a plain named type reads back as one word; anything generic or
173
+ // optional would need a type printer this file has no business owning.
174
+ if (value === null || expression.type.syntax.kind !== "NamedTypeSyntax")
175
+ return null;
176
+ return groupWatchSubject(`${value} ${expression.operator} ${expression.type.syntax.name}`, expression.parenthesized);
177
+ }
178
+ function renderWatchSubjectFString(expression) {
179
+ let text = "";
180
+ for (const part of expression.parts) {
181
+ if (part.kind === "text") {
182
+ text += renderWatchTextLiteral(part.value, true);
183
+ continue;
184
+ }
185
+ const value = renderWatchSubject(part.value);
186
+ if (value === null)
187
+ return null;
188
+ text += `{${value}}`;
189
+ }
190
+ return `f"${text}"`;
191
+ }
192
+ /**
193
+ * The subject as the author wrote it, reconstructed from the AST for exactly
194
+ * the node kinds a subject can be. The analyzer never sees the module text, and
195
+ * a refusal that cannot quote what it refused teaches nothing — so the message
196
+ * quotes this. It is a reconstruction and stays one: it is used in the message
197
+ * only, never in a `fix`, because rewriting an author's source from a
198
+ * reconstruction is a worse defect than the one being reported. Null means
199
+ * "cannot say faithfully", and the message drops the echo rather than guess.
200
+ *
201
+ * Faithfulness is the whole point, so grouping is carried across rather than
202
+ * re-derived: the three nodes that record the author's own parentheses are
203
+ * printed with them, and the low-precedence nodes that record nothing are
204
+ * parenthesized wherever a bare printing would re-associate. The reconstruction
205
+ * therefore parses back to the tree it came from.
206
+ */
207
+ export function renderWatchSubject(expression) {
208
+ switch (expression.kind) {
209
+ case "IdentifierExpression":
210
+ return expression.name;
211
+ case "LiteralExpression":
212
+ return renderWatchSubjectLiteral(expression);
213
+ case "MemberExpression":
214
+ return renderWatchSubjectMember(expression);
215
+ case "IndexExpression":
216
+ return renderWatchSubjectIndex(expression);
217
+ case "CallExpression":
218
+ return renderWatchSubjectCall(expression);
219
+ case "SpreadExpression": {
220
+ const value = renderWatchSubjectOperand(expression.value);
221
+ return value === null ? null : `...${value}`;
222
+ }
223
+ case "RequiredExpression": {
224
+ const value = renderWatchSubjectOperand(expression.value);
225
+ return value === null ? null : `${value}!`;
226
+ }
227
+ case "TryExpression": {
228
+ const value = renderWatchSubjectOperand(expression.value);
229
+ return value === null ? null : `try ${value}`;
230
+ }
231
+ case "ListExpression":
232
+ return renderWatchSubjectList(expression);
233
+ case "ObjectExpression":
234
+ return renderWatchSubjectObject(expression);
235
+ case "ArrowFunctionExpression":
236
+ return renderWatchSubjectArrow(expression);
237
+ case "UnaryExpression":
238
+ return renderWatchSubjectUnary(expression);
239
+ case "BinaryExpression":
240
+ return renderWatchSubjectBinary(expression);
241
+ case "ComparisonChainExpression":
242
+ return renderWatchSubjectComparisonChain(expression);
243
+ case "ConditionalExpression":
244
+ return renderWatchSubjectConditional(expression);
245
+ case "IsExpression":
246
+ return renderWatchSubjectIs(expression);
247
+ case "FStringExpression":
248
+ return renderWatchSubjectFString(expression);
249
+ default:
250
+ return null;
251
+ }
252
+ }
253
+ /**
254
+ * The same reconstruction in a position where a bare printing would bind
255
+ * differently than the author's source did — a binary operand, the object of a
256
+ * member read, the callee of a call. A conditional or an arrow reaches such a
257
+ * position only through parentheses the author wrote, and neither node records
258
+ * them, so they are restored here.
259
+ */
260
+ function renderWatchSubjectOperand(expression) {
261
+ const rendered = renderWatchSubject(expression);
262
+ if (rendered === null)
263
+ return null;
264
+ return expression.kind === "ConditionalExpression" || expression.kind === "ArrowFunctionExpression"
265
+ ? `(${rendered})`
266
+ : rendered;
267
+ }
268
+ /** Restores the parentheses the author wrote, for the three nodes that record them. */
269
+ function groupWatchSubject(rendered, parenthesized) {
270
+ return parenthesized === true ? `(${rendered})` : rendered;
271
+ }
272
+ //# sourceMappingURL=watch-subject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watch-subject.js","sourceRoot":"","sources":["../../src/analysis/watch-subject.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAmB,MAAM,iCAAiC,CAAC;AAElE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAsB;IACrD,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;QACxB,KAAK,sBAAsB;YACzB,OAAO,IAAI,CAAC;QACd,KAAK,kBAAkB,CAAC;QACxB,KAAK,iBAAiB;YACpB,OAAO,gBAAgB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC7C;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAGD,gFAAgF;AAChF,MAAM,0BAA0B,GAAqC;IACnE,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;CACZ,CAAC;AAEF;;;;;;;GAOG;AACH,SAAS,sBAAsB,CAAC,KAAa,EAAE,aAAsB;IACnE,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,MAAM,SAAS,IAAI,KAAK,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG,0BAA0B,CAAC,SAAS,CAAC,CAAC;QACrD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,IAAI,IAAI,MAAM,CAAC;YACf,SAAS;QACX,CAAC;QACD,wEAAwE;QACxE,IAAI,aAAa,IAAI,CAAC,SAAS,KAAK,GAAG,IAAI,SAAS,KAAK,GAAG,CAAC,EAAE,CAAC;YAC9D,IAAI,IAAI,GAAG,SAAS,GAAG,SAAS,EAAE,CAAC;YACnC,SAAS;QACX,CAAC;QACD,MAAM,IAAI,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC;QACvC,IAAI,IAAI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AG,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAChD,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACnC,OAAO,UAAU,CAAC,IAAI,KAAK,uBAAuB,IAAI,UAAU,CAAC,IAAI,KAAK,yBAAyB;QACjG,CAAC,CAAC,IAAI,QAAQ,GAAG;QACjB,CAAC,CAAC,QAAQ,CAAC;AACf,CAAC;AAED,uFAAuF;AACvF,SAAS,iBAAiB,CAAC,QAAgB,EAAE,aAA+B;IAC1E,OAAO,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The Web surface's own answers about names: which record a runtime type name
3
+ * carries, which event type a DOM event name resolves to, which ValueType each
4
+ * Look property accepts, and the small rosters and sentence builders the
5
+ * analyzer reads beside them.
6
+ *
7
+ * D115 P4 R3a: every one of these is a total function over a name, or the table
8
+ * one reads. None of them needs the analyzer's walk state, so they read as a
9
+ * module rather than as 150 lines standing between the analyzer's imports and
10
+ * its first collaborator.
11
+ */
12
+ import { type Diagnostic, type DiagnosticFix, type Span } from "@velarscript/compiler";
13
+ import { type ValueType } from "@velarscript/compiler/extension";
14
+ export declare const routeContextIdentity = "@velarscript/web:velar/web#type:RouteContext";
15
+ export declare const removedJsxControlAttributes: Set<string>;
16
+ export declare const nativeDomEventNames: Set<string>;
17
+ export declare const htmlEventHandlerAttributes: Set<string>;
18
+ export declare const textualWebPrimitiveNames: Set<string>;
19
+ export declare const webEventTypeNames: ReadonlySet<string>;
20
+ export declare const webEventDeadFields: Set<string>;
21
+ export declare const diagnostic: (code: string, message: string, sourceSpan: Span, fix?: DiagnosticFix) => Diagnostic;
22
+ export declare const bindTargetGuidance: (directive: string) => string;
23
+ export declare const lookLength: ValueType;
24
+ export declare const LOOK_PROPERTY_TYPES: Map<string, ValueType>;
25
+ export declare function webTypeFields(name: string): ReadonlyMap<string, ValueType> | null;
26
+ export declare function webEventType(name: string): ValueType;
27
+ //# sourceMappingURL=web-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-types.d.ts","sourceRoot":"","sources":["../../src/analysis/web-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,iCAAiC,CAAC;AAMzC,eAAO,MAAM,oBAAoB,iDAAiD,CAAC;AAEnF,eAAO,MAAM,2BAA2B,aAAqC,CAAC;AAC9E,eAAO,MAAM,mBAAmB,aAS9B,CAAC;AAWH,eAAO,MAAM,0BAA0B,aAgBrC,CAAC;AACH,eAAO,MAAM,wBAAwB,aAAuG,CAAC;AAE7I,eAAO,MAAM,iBAAiB,qBAAuB,CAAC;AACtD,eAAO,MAAM,kBAAkB,aAA2D,CAAC;AAC3F,eAAO,MAAM,UAAU,SAAU,MAAM,WAAW,MAAM,cAAc,IAAI,QAAQ,aAAa,KAAG,UACZ,CAAC;AACvF,eAAO,MAAM,kBAAkB,cAAe,MAAM,KAAG,MAC0G,CAAC;AAElK,eAAO,MAAM,UAAU,EAAE,SAA6C,CAAC;AAkDvE,eAAO,MAAM,mBAAmB,wBACkC,CAAC;AAEnE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAI,CA2BjF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAOpD"}
@@ -0,0 +1,170 @@
1
+ /**
2
+ * The Web surface's own answers about names: which record a runtime type name
3
+ * carries, which event type a DOM event name resolves to, which ValueType each
4
+ * Look property accepts, and the small rosters and sentence builders the
5
+ * analyzer reads beside them.
6
+ *
7
+ * D115 P4 R3a: every one of these is a total function over a name, or the table
8
+ * one reads. None of them needs the analyzer's walk state, so they read as a
9
+ * module rather than as 150 lines standing between the analyzer's imports and
10
+ * its first collaborator.
11
+ */
12
+ import {} from "@velarscript/compiler";
13
+ import { boolType, nullType, numberType, optionalOf, stringType, unknownType, } from "@velarscript/compiler/extension";
14
+ import { LOOK_PROPERTY_VALUE_KINDS } from "../look.js";
15
+ import { WEB_EVENT_TYPE_NAMES } from "../types.js";
16
+ // probe with this identity so they succeed in modules that use route() without
17
+ // importing RouteContext by name.
18
+ export const routeContextIdentity = "@velarscript/web:velar/web#type:RouteContext";
19
+ export const removedJsxControlAttributes = new Set(["if", "else-if", "else"]);
20
+ export const nativeDomEventNames = new Set([
21
+ "click", "dblclick", "input", "beforeinput", "change", "submit", "reset", "invalid", "select", "toggle", "close",
22
+ "keydown", "keyup", "keypress", "focus", "blur", "focusin", "focusout", "scroll", "wheel",
23
+ "mousedown", "mouseup", "mousemove", "mouseenter", "mouseleave", "mouseover", "mouseout", "contextmenu",
24
+ "pointerdown", "pointerup", "pointermove", "pointerenter", "pointerleave", "pointerover", "pointerout", "pointercancel",
25
+ "touchstart", "touchend", "touchmove", "touchcancel",
26
+ "dragstart", "dragend", "dragover", "dragenter", "dragleave", "drop", "drag",
27
+ "compositionstart", "compositionupdate", "compositionend",
28
+ "copy", "cut", "paste", "load", "error", "transitionend", "animationend", "play", "pause", "ended",
29
+ ]);
30
+ // The attribute names an element really compiles as script: the browser turns
31
+ // the attribute's text into a function body in the document's origin. This is a
32
+ // different roster from `nativeDomEventNames` above, which answers "is there an
33
+ // `on:` directive worth naming for this remainder". The two used to be one set,
34
+ // so `onanimationstart` was told its name is merely reserved while the browser
35
+ // was compiling it, and before that `onward` was told the reverse. Lookups
36
+ // lowercase the written name, because an HTML attribute name is matched
37
+ // ASCII-case-insensitively. Window-reflecting handlers (`onstorage`,
38
+ // `onmessage`, `onunload`) stay out: they take effect only on `<body>`, so the
39
+ // clause would be false of the element the author actually wrote.
40
+ export const htmlEventHandlerAttributes = new Set([
41
+ "onabort", "onauxclick", "onbeforeinput", "onbeforematch", "onbeforetoggle", "onblur", "oncancel",
42
+ "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextlost", "oncontextmenu",
43
+ "oncontextrestored", "oncopy", "oncuechange", "oncut", "ondblclick", "ondrag", "ondragend", "ondragenter",
44
+ "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror",
45
+ "onfocus", "onformdata", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload",
46
+ "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmouseenter", "onmouseleave",
47
+ "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onpaste", "onpause", "onplay", "onplaying",
48
+ "onprogress", "onratechange", "onreset", "onresize", "onscroll", "onscrollend", "onsecuritypolicyviolation",
49
+ "onseeked", "onseeking", "onselect", "onslotchange", "onstalled", "onsubmit", "onsuspend", "ontimeupdate",
50
+ "ontoggle", "onvolumechange", "onwaiting", "onwheel",
51
+ "onanimationstart", "onanimationend", "onanimationiteration", "onanimationcancel",
52
+ "ontransitionrun", "ontransitionstart", "ontransitionend", "ontransitioncancel",
53
+ "onpointerdown", "onpointerup", "onpointermove", "onpointerover", "onpointerout", "onpointerenter",
54
+ "onpointerleave", "onpointercancel", "ongotpointercapture", "onlostpointercapture",
55
+ "ontouchstart", "ontouchend", "ontouchmove", "ontouchcancel",
56
+ ]);
57
+ export const textualWebPrimitiveNames = new Set(["Length", "Percentage", "LengthPercentage", "TrackFraction", "Color", "Duration", "Angle"]);
58
+ // D72 rule 186: derived from the published table, not restated beside it.
59
+ export const webEventTypeNames = WEB_EVENT_TYPE_NAMES;
60
+ export const webEventDeadFields = new Set(["target", "currentTarget", "value", "checked"]);
61
+ export const diagnostic = (code, message, sourceSpan, fix) => fix ? { code, message, span: sourceSpan, fix } : { code, message, span: sourceSpan };
62
+ export const bindTargetGuidance = (directive) => `${directive} requires a writable reactive location: a state name, or a field or index path on one such as ${directive}={form.name} or ${directive}={items[0]}`;
63
+ export const lookLength = { kind: "named", name: "Length" };
64
+ const lookPercentage = { kind: "named", name: "Percentage" };
65
+ const lookLengthPercentage = { kind: "named", name: "LengthPercentage" };
66
+ // LOK-D3: a length property never accepts a bare number. `width = 100` used to
67
+ // compile and reach CSS as the invalid declaration `width: 100`, which computes
68
+ // to `auto`; the unions below carry only spelled units, and the unitless-legal
69
+ // properties (opacity, zIndex, lineHeight, flex*, order, scale, aspectRatio,
70
+ // fontWeight) keep `number` individually.
71
+ const lookMetric = { kind: "union", members: [lookLength, lookPercentage, lookLengthPercentage] };
72
+ const lookColor = { kind: "named", name: "Color" };
73
+ const lookImage = { kind: "named", name: "Image" };
74
+ const lookBorder = { kind: "named", name: "Border" };
75
+ const lookShadow = { kind: "named", name: "Shadow" };
76
+ const lookFilter = { kind: "named", name: "Filter" };
77
+ const lookDuration = { kind: "named", name: "Duration" };
78
+ const lookAngle = { kind: "named", name: "Angle" };
79
+ const lookTrackList = { kind: "named", name: "TrackList" };
80
+ const lookTransition = { kind: "named", name: "Transition" };
81
+ const lookAnimation = { kind: "named", name: "Animation" };
82
+ const lookSpacing = { kind: "named", name: "Spacing" };
83
+ const lookMetricOrSpacing = { kind: "union", members: [lookMetric, lookSpacing] };
84
+ const lookPropertyType = (kind) => {
85
+ switch (kind) {
86
+ case "animation": return { kind: "union", members: [lookAnimation, { kind: "list", element: lookAnimation }] };
87
+ // D73 rule 187: a published keyword must be reachable. These three kinds
88
+ // used to type-refuse every string, so `zIndex = "auto"` -- the CSS initial
89
+ // value -- and the five CSS-wide keywords every other property takes were
90
+ // refused by the type before the closed set could answer. Accepting the
91
+ // string is what makes the set they now publish a surface rather than a
92
+ // promise (D50 rule 92); a value outside the set is still refused, by name.
93
+ case "angle": return { kind: "union", members: [lookAngle, stringType] };
94
+ case "background": return { kind: "union", members: [lookColor, lookImage, stringType] };
95
+ case "border": return { kind: "union", members: [lookBorder, stringType] };
96
+ case "color": return { kind: "union", members: [lookColor, stringType] };
97
+ case "duration": return { kind: "union", members: [lookDuration, stringType] };
98
+ case "image": return { kind: "union", members: [lookImage, stringType] };
99
+ case "line-height": return { kind: "union", members: [numberType, lookLength, stringType] };
100
+ case "metric": return { kind: "union", members: [lookMetricOrSpacing, stringType] };
101
+ case "number": return { kind: "union", members: [numberType, stringType] };
102
+ case "number-keyword": return { kind: "union", members: [numberType, lookSpacing, stringType] };
103
+ case "shadow": return { kind: "union", members: [lookShadow, stringType] };
104
+ case "track": return { kind: "union", members: [lookTrackList, stringType] };
105
+ case "transition": return { kind: "union", members: [lookTransition, stringType] };
106
+ case "filter": return { kind: "union", members: [lookFilter, stringType] };
107
+ case "keyword":
108
+ case "text":
109
+ case "transform":
110
+ return stringType;
111
+ }
112
+ };
113
+ export const LOOK_PROPERTY_TYPES = new Map([...LOOK_PROPERTY_VALUE_KINDS]
114
+ .map(([name, kind]) => [name, lookPropertyType(kind)]));
115
+ export function webTypeFields(name) {
116
+ const functionType = (parameterNames, parameters, result) => ({ kind: "function", parameterNames, parameters, requiredParameters: parameters.length, result });
117
+ const eventFields = () => new Map([
118
+ ["type", stringType], ["defaultPrevented", boolType], ["preventDefault", functionType([], [], nullType)], ["stopPropagation", functionType([], [], nullType)],
119
+ ]);
120
+ if (name === "Event")
121
+ return eventFields();
122
+ // `isComposing` is on `InputEvent` below and belongs here for the same
123
+ // reason: while an input method is composing, a keystroke is aimed at the
124
+ // composer's candidate window rather than at the application. An Enter that
125
+ // commits a candidate arrives as `keydown` with `isComposing` true, and a
126
+ // handler that sends on Enter without asking sends half a word — which is the
127
+ // default for every CJK typist rather than an edge case.
128
+ if (name === "KeyboardEvent")
129
+ return new Map([...eventFields(), ["key", stringType], ["code", stringType], ["repeat", boolType], ["isComposing", boolType], ["altKey", boolType], ["ctrlKey", boolType], ["metaKey", boolType], ["shiftKey", boolType]]);
130
+ if (name === "PointerEvent")
131
+ return new Map([...eventFields(), ["pointerId", numberType], ["pointerType", stringType], ["pressure", numberType], ["button", numberType], ["buttons", numberType], ["clientX", numberType], ["clientY", numberType], ["movementX", numberType], ["movementY", numberType], ["altKey", boolType], ["ctrlKey", boolType], ["metaKey", boolType], ["shiftKey", boolType]]);
132
+ if (name === "InputEvent")
133
+ return new Map([...eventFields(), ["data", optionalOf(stringType)], ["inputType", stringType], ["isComposing", boolType]]);
134
+ if (name === "CompositionEvent")
135
+ return new Map([...eventFields(), ["data", stringType]]);
136
+ if (name === "ClipboardEvent")
137
+ return eventFields();
138
+ if (name === "Blob")
139
+ return new Map();
140
+ if (name === "File")
141
+ return new Map([["name", stringType], ["size", numberType], ["type", stringType], ["modified", numberType]]);
142
+ if (name === "Element" || name === "InputElement" || name === "TextAreaElement" || name === "CanvasElement" || name === "DialogElement") {
143
+ const fields = new Map([["focus", functionType([], [], nullType)], ["remove", functionType([], [], nullType)]]);
144
+ if (name === "InputElement" || name === "TextAreaElement")
145
+ fields.set("value", stringType);
146
+ if (name === "InputElement")
147
+ fields.set("checked", boolType);
148
+ if (name === "CanvasElement") {
149
+ fields.set("width", numberType);
150
+ fields.set("height", numberType);
151
+ fields.set("getContext", functionType(["kind"], [stringType], unknownType));
152
+ }
153
+ return fields;
154
+ }
155
+ return null;
156
+ }
157
+ export function webEventType(name) {
158
+ if (name === "keydown" || name === "keyup" || name === "keypress")
159
+ return { kind: "named", name: "KeyboardEvent" };
160
+ if (["click", "pointerdown", "pointerup", "pointermove", "pointercancel", "pointerover", "pointerout", "pointerenter", "pointerleave"].includes(name))
161
+ return { kind: "named", name: "PointerEvent" };
162
+ if (name === "beforeinput" || name === "input")
163
+ return { kind: "named", name: "InputEvent" };
164
+ if (name === "compositionstart" || name === "compositionupdate" || name === "compositionend")
165
+ return { kind: "named", name: "CompositionEvent" };
166
+ if (name === "copy" || name === "cut" || name === "paste")
167
+ return { kind: "named", name: "ClipboardEvent" };
168
+ return { kind: "named", name: "Event" };
169
+ }
170
+ //# sourceMappingURL=web-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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