@driftsys/markspec 0.10.3 → 0.11.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 (376) hide show
  1. package/README.md +2 -2
  2. package/esm/compiler/deserialize.d.ts +49 -0
  3. package/esm/compiler/deserialize.d.ts.map +1 -0
  4. package/esm/compiler/deserialize.js +139 -0
  5. package/esm/compiler/manifest.d.ts +3 -0
  6. package/esm/compiler/manifest.d.ts.map +1 -1
  7. package/esm/compiler/manifest.js +9 -3
  8. package/esm/compiler/mod.d.ts.map +1 -1
  9. package/esm/compiler/mod.js +16 -7
  10. package/esm/config/markspec.d.ts +38 -1
  11. package/esm/config/markspec.d.ts.map +1 -1
  12. package/esm/config/markspec.js +127 -2
  13. package/esm/config/mod.d.ts.map +1 -1
  14. package/esm/config/mod.js +143 -147
  15. package/esm/decl/duplicates.d.ts +29 -0
  16. package/esm/decl/duplicates.d.ts.map +1 -0
  17. package/esm/decl/duplicates.js +28 -0
  18. package/esm/decl/mod.d.ts +4 -2
  19. package/esm/decl/mod.d.ts.map +1 -1
  20. package/esm/decl/mod.js +2 -1
  21. package/esm/decl/surfaces.d.ts +29 -7
  22. package/esm/decl/surfaces.d.ts.map +1 -1
  23. package/esm/decl/surfaces.js +31 -18
  24. package/esm/gates/mod.d.ts +13 -2
  25. package/esm/gates/mod.d.ts.map +1 -1
  26. package/esm/gates/mod.js +38 -11
  27. package/esm/lint/runner.d.ts.map +1 -1
  28. package/esm/lint/runner.js +3 -1
  29. package/esm/lock/acquire_compile.d.ts +31 -0
  30. package/esm/lock/acquire_compile.d.ts.map +1 -0
  31. package/esm/lock/acquire_compile.js +83 -0
  32. package/esm/lock/cache_check.d.ts +28 -0
  33. package/esm/lock/cache_check.d.ts.map +1 -0
  34. package/esm/lock/cache_check.js +51 -0
  35. package/esm/lock/check.d.ts +14 -3
  36. package/esm/lock/check.d.ts.map +1 -1
  37. package/esm/lock/check.js +41 -3
  38. package/esm/lock/git_intent.d.ts +46 -0
  39. package/esm/lock/git_intent.d.ts.map +1 -0
  40. package/esm/lock/git_intent.js +111 -0
  41. package/esm/lock/mod.d.ts +10 -3
  42. package/esm/lock/mod.d.ts.map +1 -1
  43. package/esm/lock/mod.js +7 -1
  44. package/esm/lock/model.d.ts +24 -1
  45. package/esm/lock/model.d.ts.map +1 -1
  46. package/esm/lock/parser.d.ts.map +1 -1
  47. package/esm/lock/parser.js +32 -0
  48. package/esm/lock/pin_assurance.d.ts +20 -0
  49. package/esm/lock/pin_assurance.d.ts.map +1 -0
  50. package/esm/lock/pin_assurance.js +34 -0
  51. package/esm/lock/resolve.d.ts +8 -17
  52. package/esm/lock/resolve.d.ts.map +1 -1
  53. package/esm/lock/resolve.js +7 -67
  54. package/esm/lock/serializer.d.ts.map +1 -1
  55. package/esm/lock/serializer.js +23 -0
  56. package/esm/lock/upstream_common.d.ts +29 -0
  57. package/esm/lock/upstream_common.d.ts.map +1 -0
  58. package/esm/lock/upstream_common.js +38 -0
  59. package/esm/lock/upstream_deps.d.ts +63 -0
  60. package/esm/lock/upstream_deps.d.ts.map +1 -0
  61. package/esm/lock/upstream_deps.js +172 -0
  62. package/esm/lock/upstream_refs.d.ts +69 -0
  63. package/esm/lock/upstream_refs.d.ts.map +1 -0
  64. package/esm/lock/upstream_refs.js +238 -0
  65. package/esm/mod.d.ts +16 -8
  66. package/esm/mod.d.ts.map +1 -1
  67. package/esm/mod.js +15 -5
  68. package/esm/model/mod.d.ts +93 -28
  69. package/esm/model/mod.d.ts.map +1 -1
  70. package/esm/model/mod.js +66 -13
  71. package/esm/model/profile.d.ts +13 -0
  72. package/esm/model/profile.d.ts.map +1 -1
  73. package/esm/parser/markdown.d.ts.map +1 -1
  74. package/esm/parser/markdown.js +7 -51
  75. package/esm/profile/manifest.d.ts.map +1 -1
  76. package/esm/profile/manifest.js +20 -3
  77. package/esm/profile/merge.js +7 -0
  78. package/esm/reporter/mod.d.ts +11 -0
  79. package/esm/reporter/mod.d.ts.map +1 -1
  80. package/esm/reporter/mod.js +19 -8
  81. package/esm/typl/assemble.d.ts +53 -0
  82. package/esm/typl/assemble.d.ts.map +1 -0
  83. package/esm/typl/assemble.js +238 -0
  84. package/esm/typl/ast.d.ts +7 -1
  85. package/esm/typl/ast.d.ts.map +1 -1
  86. package/esm/typl/ast.js +3 -0
  87. package/esm/typl/bullet.d.ts +9 -7
  88. package/esm/typl/bullet.d.ts.map +1 -1
  89. package/esm/typl/bullet.js +6 -4
  90. package/esm/typl/citations.d.ts +27 -0
  91. package/esm/typl/citations.d.ts.map +1 -0
  92. package/esm/typl/citations.js +16 -0
  93. package/esm/typl/diagnostics.d.ts +2 -2
  94. package/esm/typl/diagnostics.d.ts.map +1 -1
  95. package/esm/typl/diagnostics.js +18 -0
  96. package/esm/typl/grammar.d.ts.map +1 -1
  97. package/esm/typl/grammar.js +6 -0
  98. package/esm/typl/lexer.d.ts.map +1 -1
  99. package/esm/typl/lexer.js +25 -4
  100. package/esm/typl/mod.d.ts +8 -2
  101. package/esm/typl/mod.d.ts.map +1 -1
  102. package/esm/typl/mod.js +5 -1
  103. package/esm/typl/recognize.js +2 -2
  104. package/esm/typl/registry.d.ts +1 -1
  105. package/esm/typl/resolve.d.ts +31 -0
  106. package/esm/typl/resolve.d.ts.map +1 -0
  107. package/esm/typl/resolve.js +27 -0
  108. package/esm/typl/table.d.ts +52 -0
  109. package/esm/typl/table.d.ts.map +1 -0
  110. package/esm/typl/table.js +69 -0
  111. package/esm/typl/validator.d.ts +24 -5
  112. package/esm/typl/validator.d.ts.map +1 -1
  113. package/esm/typl/validator.js +55 -75
  114. package/esm/upstream/mod.d.ts +45 -0
  115. package/esm/upstream/mod.d.ts.map +1 -0
  116. package/esm/upstream/mod.js +98 -0
  117. package/esm/upstream/project.d.ts +33 -0
  118. package/esm/upstream/project.d.ts.map +1 -0
  119. package/esm/upstream/project.js +38 -0
  120. package/esm/upstream/refs.d.ts +23 -0
  121. package/esm/upstream/refs.d.ts.map +1 -0
  122. package/esm/upstream/refs.js +71 -0
  123. package/esm/util/paths.d.ts +14 -0
  124. package/esm/util/paths.d.ts.map +1 -0
  125. package/esm/util/paths.js +22 -0
  126. package/esm/uxil/assemble.d.ts +38 -0
  127. package/esm/uxil/assemble.d.ts.map +1 -0
  128. package/esm/uxil/assemble.js +268 -0
  129. package/esm/uxil/ast.d.ts +63 -0
  130. package/esm/uxil/ast.d.ts.map +1 -0
  131. package/esm/uxil/ast.js +9 -0
  132. package/esm/uxil/citations.d.ts +27 -0
  133. package/esm/uxil/citations.d.ts.map +1 -0
  134. package/esm/uxil/citations.js +25 -0
  135. package/esm/uxil/diagnostics.d.ts +39 -0
  136. package/esm/uxil/diagnostics.d.ts.map +1 -0
  137. package/esm/uxil/diagnostics.js +135 -0
  138. package/esm/uxil/grammar.d.ts +72 -0
  139. package/esm/uxil/grammar.d.ts.map +1 -0
  140. package/esm/uxil/grammar.js +505 -0
  141. package/esm/uxil/lexer.d.ts +23 -0
  142. package/esm/uxil/lexer.d.ts.map +1 -0
  143. package/esm/uxil/lexer.js +58 -0
  144. package/esm/uxil/mod.d.ts +32 -0
  145. package/esm/uxil/mod.d.ts.map +1 -0
  146. package/esm/uxil/mod.js +11 -0
  147. package/esm/uxil/projection.d.ts +40 -0
  148. package/esm/uxil/projection.d.ts.map +1 -0
  149. package/esm/uxil/projection.js +41 -0
  150. package/esm/uxil/recognize.d.ts +16 -0
  151. package/esm/uxil/recognize.d.ts.map +1 -0
  152. package/esm/uxil/recognize.js +28 -0
  153. package/esm/uxil/registry.d.ts +37 -0
  154. package/esm/uxil/registry.d.ts.map +1 -0
  155. package/esm/uxil/registry.js +29 -0
  156. package/esm/uxil/surfaces.d.ts +36 -0
  157. package/esm/uxil/surfaces.d.ts.map +1 -0
  158. package/esm/uxil/surfaces.js +34 -0
  159. package/esm/uxil/validator.d.ts +36 -0
  160. package/esm/uxil/validator.d.ts.map +1 -0
  161. package/esm/uxil/validator.js +139 -0
  162. package/esm/uxil/vocab.d.ts +33 -0
  163. package/esm/uxil/vocab.d.ts.map +1 -0
  164. package/esm/uxil/vocab.js +36 -0
  165. package/esm/validator/caption_convention.d.ts +2 -1
  166. package/esm/validator/caption_convention.d.ts.map +1 -1
  167. package/esm/validator/caption_convention.js +2 -1
  168. package/esm/validator/corpus.d.ts.map +1 -1
  169. package/esm/validator/corpus.js +40 -17
  170. package/esm/validator/discipline.d.ts +6 -4
  171. package/esm/validator/discipline.d.ts.map +1 -1
  172. package/esm/validator/discipline.js +6 -4
  173. package/esm/validator/mod.d.ts.map +1 -1
  174. package/esm/validator/mod.js +28 -15
  175. package/esm/validator/pipeline.d.ts +11 -1
  176. package/esm/validator/pipeline.d.ts.map +1 -1
  177. package/esm/validator/pipeline.js +68 -18
  178. package/esm/validator/trace_types.d.ts +9 -2
  179. package/esm/validator/trace_types.d.ts.map +1 -1
  180. package/esm/validator/trace_types.js +21 -5
  181. package/esm/validator/traceability.d.ts +15 -3
  182. package/esm/validator/traceability.d.ts.map +1 -1
  183. package/esm/validator/traceability.js +39 -4
  184. package/esm/validator/types.d.ts.map +1 -1
  185. package/esm/validator/types.js +11 -1
  186. package/esm/validator/uxil_family.d.ts +43 -0
  187. package/esm/validator/uxil_family.d.ts.map +1 -0
  188. package/esm/validator/uxil_family.js +52 -0
  189. package/package.json +1 -1
  190. package/script/compiler/deserialize.d.ts +49 -0
  191. package/script/compiler/deserialize.d.ts.map +1 -0
  192. package/script/compiler/deserialize.js +144 -0
  193. package/script/compiler/manifest.d.ts +3 -0
  194. package/script/compiler/manifest.d.ts.map +1 -1
  195. package/script/compiler/manifest.js +10 -3
  196. package/script/compiler/mod.d.ts.map +1 -1
  197. package/script/compiler/mod.js +15 -6
  198. package/script/config/markspec.d.ts +38 -1
  199. package/script/config/markspec.d.ts.map +1 -1
  200. package/script/config/markspec.js +129 -3
  201. package/script/config/mod.d.ts.map +1 -1
  202. package/script/config/mod.js +143 -147
  203. package/script/decl/duplicates.d.ts +29 -0
  204. package/script/decl/duplicates.d.ts.map +1 -0
  205. package/script/decl/duplicates.js +31 -0
  206. package/script/decl/mod.d.ts +4 -2
  207. package/script/decl/mod.d.ts.map +1 -1
  208. package/script/decl/mod.js +4 -2
  209. package/script/decl/surfaces.d.ts +29 -7
  210. package/script/decl/surfaces.d.ts.map +1 -1
  211. package/script/decl/surfaces.js +32 -19
  212. package/script/gates/mod.d.ts +13 -2
  213. package/script/gates/mod.d.ts.map +1 -1
  214. package/script/gates/mod.js +37 -10
  215. package/script/lint/runner.d.ts.map +1 -1
  216. package/script/lint/runner.js +3 -1
  217. package/script/lock/acquire_compile.d.ts +31 -0
  218. package/script/lock/acquire_compile.d.ts.map +1 -0
  219. package/script/lock/acquire_compile.js +86 -0
  220. package/script/lock/cache_check.d.ts +28 -0
  221. package/script/lock/cache_check.d.ts.map +1 -0
  222. package/script/lock/cache_check.js +54 -0
  223. package/script/lock/check.d.ts +14 -3
  224. package/script/lock/check.d.ts.map +1 -1
  225. package/script/lock/check.js +41 -3
  226. package/script/lock/git_intent.d.ts +46 -0
  227. package/script/lock/git_intent.d.ts.map +1 -0
  228. package/script/lock/git_intent.js +115 -0
  229. package/script/lock/mod.d.ts +10 -3
  230. package/script/lock/mod.d.ts.map +1 -1
  231. package/script/lock/mod.js +16 -2
  232. package/script/lock/model.d.ts +24 -1
  233. package/script/lock/model.d.ts.map +1 -1
  234. package/script/lock/parser.d.ts.map +1 -1
  235. package/script/lock/parser.js +32 -0
  236. package/script/lock/pin_assurance.d.ts +20 -0
  237. package/script/lock/pin_assurance.d.ts.map +1 -0
  238. package/script/lock/pin_assurance.js +37 -0
  239. package/script/lock/resolve.d.ts +8 -17
  240. package/script/lock/resolve.d.ts.map +1 -1
  241. package/script/lock/resolve.js +7 -68
  242. package/script/lock/serializer.d.ts.map +1 -1
  243. package/script/lock/serializer.js +23 -0
  244. package/script/lock/upstream_common.d.ts +29 -0
  245. package/script/lock/upstream_common.d.ts.map +1 -0
  246. package/script/lock/upstream_common.js +42 -0
  247. package/script/lock/upstream_deps.d.ts +63 -0
  248. package/script/lock/upstream_deps.d.ts.map +1 -0
  249. package/script/lock/upstream_deps.js +175 -0
  250. package/script/lock/upstream_refs.d.ts +69 -0
  251. package/script/lock/upstream_refs.d.ts.map +1 -0
  252. package/script/lock/upstream_refs.js +244 -0
  253. package/script/mod.d.ts +16 -8
  254. package/script/mod.d.ts.map +1 -1
  255. package/script/mod.js +40 -7
  256. package/script/model/mod.d.ts +93 -28
  257. package/script/model/mod.d.ts.map +1 -1
  258. package/script/model/mod.js +70 -14
  259. package/script/model/profile.d.ts +13 -0
  260. package/script/model/profile.d.ts.map +1 -1
  261. package/script/parser/markdown.d.ts.map +1 -1
  262. package/script/parser/markdown.js +6 -50
  263. package/script/profile/manifest.d.ts.map +1 -1
  264. package/script/profile/manifest.js +20 -3
  265. package/script/profile/merge.js +7 -0
  266. package/script/reporter/mod.d.ts +11 -0
  267. package/script/reporter/mod.d.ts.map +1 -1
  268. package/script/reporter/mod.js +18 -7
  269. package/script/typl/assemble.d.ts +53 -0
  270. package/script/typl/assemble.d.ts.map +1 -0
  271. package/script/typl/assemble.js +241 -0
  272. package/script/typl/ast.d.ts +7 -1
  273. package/script/typl/ast.d.ts.map +1 -1
  274. package/script/typl/ast.js +3 -0
  275. package/script/typl/bullet.d.ts +9 -7
  276. package/script/typl/bullet.d.ts.map +1 -1
  277. package/script/typl/bullet.js +6 -4
  278. package/script/typl/citations.d.ts +27 -0
  279. package/script/typl/citations.d.ts.map +1 -0
  280. package/script/typl/citations.js +20 -0
  281. package/script/typl/diagnostics.d.ts +2 -2
  282. package/script/typl/diagnostics.d.ts.map +1 -1
  283. package/script/typl/diagnostics.js +18 -0
  284. package/script/typl/grammar.d.ts.map +1 -1
  285. package/script/typl/grammar.js +6 -0
  286. package/script/typl/lexer.d.ts.map +1 -1
  287. package/script/typl/lexer.js +25 -4
  288. package/script/typl/mod.d.ts +8 -2
  289. package/script/typl/mod.d.ts.map +1 -1
  290. package/script/typl/mod.js +14 -2
  291. package/script/typl/recognize.js +2 -2
  292. package/script/typl/registry.d.ts +1 -1
  293. package/script/typl/resolve.d.ts +31 -0
  294. package/script/typl/resolve.d.ts.map +1 -0
  295. package/script/typl/resolve.js +33 -0
  296. package/script/typl/table.d.ts +52 -0
  297. package/script/typl/table.d.ts.map +1 -0
  298. package/script/typl/table.js +75 -0
  299. package/script/typl/validator.d.ts +24 -5
  300. package/script/typl/validator.d.ts.map +1 -1
  301. package/script/typl/validator.js +55 -75
  302. package/script/upstream/mod.d.ts +45 -0
  303. package/script/upstream/mod.d.ts.map +1 -0
  304. package/script/upstream/mod.js +101 -0
  305. package/script/upstream/project.d.ts +33 -0
  306. package/script/upstream/project.d.ts.map +1 -0
  307. package/script/upstream/project.js +41 -0
  308. package/script/upstream/refs.d.ts +23 -0
  309. package/script/upstream/refs.d.ts.map +1 -0
  310. package/script/upstream/refs.js +74 -0
  311. package/script/util/paths.d.ts +14 -0
  312. package/script/util/paths.d.ts.map +1 -0
  313. package/script/util/paths.js +25 -0
  314. package/script/uxil/assemble.d.ts +38 -0
  315. package/script/uxil/assemble.d.ts.map +1 -0
  316. package/script/uxil/assemble.js +272 -0
  317. package/script/uxil/ast.d.ts +63 -0
  318. package/script/uxil/ast.d.ts.map +1 -0
  319. package/script/uxil/ast.js +10 -0
  320. package/script/uxil/citations.d.ts +27 -0
  321. package/script/uxil/citations.d.ts.map +1 -0
  322. package/script/uxil/citations.js +29 -0
  323. package/script/uxil/diagnostics.d.ts +39 -0
  324. package/script/uxil/diagnostics.d.ts.map +1 -0
  325. package/script/uxil/diagnostics.js +140 -0
  326. package/script/uxil/grammar.d.ts +72 -0
  327. package/script/uxil/grammar.d.ts.map +1 -0
  328. package/script/uxil/grammar.js +511 -0
  329. package/script/uxil/lexer.d.ts +23 -0
  330. package/script/uxil/lexer.d.ts.map +1 -0
  331. package/script/uxil/lexer.js +61 -0
  332. package/script/uxil/mod.d.ts +32 -0
  333. package/script/uxil/mod.d.ts.map +1 -0
  334. package/script/uxil/mod.js +37 -0
  335. package/script/uxil/projection.d.ts +40 -0
  336. package/script/uxil/projection.d.ts.map +1 -0
  337. package/script/uxil/projection.js +44 -0
  338. package/script/uxil/recognize.d.ts +16 -0
  339. package/script/uxil/recognize.d.ts.map +1 -0
  340. package/script/uxil/recognize.js +31 -0
  341. package/script/uxil/registry.d.ts +37 -0
  342. package/script/uxil/registry.d.ts.map +1 -0
  343. package/script/uxil/registry.js +32 -0
  344. package/script/uxil/surfaces.d.ts +36 -0
  345. package/script/uxil/surfaces.d.ts.map +1 -0
  346. package/script/uxil/surfaces.js +39 -0
  347. package/script/uxil/validator.d.ts +36 -0
  348. package/script/uxil/validator.d.ts.map +1 -0
  349. package/script/uxil/validator.js +142 -0
  350. package/script/uxil/vocab.d.ts +33 -0
  351. package/script/uxil/vocab.d.ts.map +1 -0
  352. package/script/uxil/vocab.js +41 -0
  353. package/script/validator/caption_convention.d.ts +2 -1
  354. package/script/validator/caption_convention.d.ts.map +1 -1
  355. package/script/validator/caption_convention.js +2 -1
  356. package/script/validator/corpus.d.ts.map +1 -1
  357. package/script/validator/corpus.js +39 -16
  358. package/script/validator/discipline.d.ts +6 -4
  359. package/script/validator/discipline.d.ts.map +1 -1
  360. package/script/validator/discipline.js +6 -4
  361. package/script/validator/mod.d.ts.map +1 -1
  362. package/script/validator/mod.js +27 -14
  363. package/script/validator/pipeline.d.ts +11 -1
  364. package/script/validator/pipeline.d.ts.map +1 -1
  365. package/script/validator/pipeline.js +67 -17
  366. package/script/validator/trace_types.d.ts +9 -2
  367. package/script/validator/trace_types.d.ts.map +1 -1
  368. package/script/validator/trace_types.js +20 -4
  369. package/script/validator/traceability.d.ts +15 -3
  370. package/script/validator/traceability.d.ts.map +1 -1
  371. package/script/validator/traceability.js +38 -3
  372. package/script/validator/types.d.ts.map +1 -1
  373. package/script/validator/types.js +10 -0
  374. package/script/validator/uxil_family.d.ts +43 -0
  375. package/script/validator/uxil_family.d.ts.map +1 -0
  376. package/script/validator/uxil_family.js +56 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../src/uxil/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAiB,UAAU,EAAE,MAAM,eAAe,CAAC;AAE/D,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED,6BAA6B;AAC7B,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAChD;AAED,yCAAyC;AACzC,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAChD;AAmBD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,UAAU,GAAG,YAAY,CAoBpE"}
@@ -0,0 +1,41 @@
1
+ function projectElement(element) {
2
+ return {
3
+ name: element.name,
4
+ verbs: element.verbs,
5
+ // keyTemplate is always the "template" form — parseElementBullet only
6
+ // ever assigns a UxKey here when it parsed as `{name}` (grammar.ts's K1
7
+ // clause), never a concrete key.
8
+ keyTemplate: element.keyTemplate?.kind === "template"
9
+ ? element.keyTemplate.name
10
+ : null,
11
+ nav: element.navTarget ?? null,
12
+ states: [...element.states].sort(),
13
+ };
14
+ }
15
+ /**
16
+ * Project a {@linkcode UxRegistry} into a deterministic, JSON-serialisable
17
+ * manifest. Surfaces sorted by id; elements within a surface sorted by
18
+ * name; states sorted; verbs kept in declaration order (still
19
+ * deterministic — load-bearing for compound controls).
20
+ */
21
+ export function projectUxRegistry(registry) {
22
+ const paths = [...registry.surfaces.keys()].sort();
23
+ const surfaces = paths.map((path) => {
24
+ const record = registry.surfaces.get(path)[0]; // first declaration wins
25
+ const dot = path.lastIndexOf(".");
26
+ const parentPath = dot < 0 ? undefined : path.slice(0, dot);
27
+ const parent = parentPath !== undefined && registry.surfaces.has(parentPath)
28
+ ? parentPath
29
+ : null;
30
+ return {
31
+ id: path,
32
+ kind: record.kind,
33
+ states: [...record.states].sort(),
34
+ parent,
35
+ elements: [...record.elements]
36
+ .sort((a, b) => a.name.localeCompare(b.name))
37
+ .map(projectElement),
38
+ };
39
+ });
40
+ return { surfaces };
41
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @module uxil/recognize
3
+ *
4
+ * Form-classification predicate — the DSL-specific routing S8's surface walk
5
+ * uses to send a code span to the right parser. Pure string inspection on the
6
+ * span-inner text (the caller strips backticks). A citation ref
7
+ * (`ux:surface/element…`) or non-uxil text returns `undefined`.
8
+ */
9
+ export type UxilForm = "root" | "element" | "child";
10
+ /**
11
+ * Classify a uxil code span. `/`-led → element; `.`-led → child surface; a
12
+ * surface followed by a `:` kind *before* any `/` → root declaration.
13
+ * Everything else (a citation ref, plain prose) → `undefined`.
14
+ */
15
+ export declare function classifyUxilForm(spanText: string): UxilForm | undefined;
16
+ //# sourceMappingURL=recognize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recognize.d.ts","sourceRoot":"","sources":["../../src/uxil/recognize.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAWvE"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @module uxil/recognize
3
+ *
4
+ * Form-classification predicate — the DSL-specific routing S8's surface walk
5
+ * uses to send a code span to the right parser. Pure string inspection on the
6
+ * span-inner text (the caller strips backticks). A citation ref
7
+ * (`ux:surface/element…`) or non-uxil text returns `undefined`.
8
+ */
9
+ /**
10
+ * Classify a uxil code span. `/`-led → element; `.`-led → child surface; a
11
+ * surface followed by a `:` kind *before* any `/` → root declaration.
12
+ * Everything else (a citation ref, plain prose) → `undefined`.
13
+ */
14
+ export function classifyUxilForm(spanText) {
15
+ const t = spanText.trim();
16
+ if (t.startsWith("/"))
17
+ return "element";
18
+ if (t.startsWith("."))
19
+ return "child";
20
+ const body = t.startsWith("ux:") ? t.slice(3) : t;
21
+ const slash = body.indexOf("/");
22
+ const colon = body.indexOf(":");
23
+ // A `:` before any `/` is the kind clause of a root declaration; a `:` after
24
+ // a `/` is a ref key (a citation), and no `:` at all is a bare citation.
25
+ if (colon >= 0 && (slash < 0 || colon < slash))
26
+ return "root";
27
+ return undefined;
28
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @module uxil/registry
3
+ *
4
+ * Corpus-level index of every declared uxil surface across all entries.
5
+ * Built by {@linkcode buildUxRegistry}; consumed by validateUxil
6
+ * (declared-once / dangling-parent / navigate-resolution checks) and
7
+ * projectUxRegistry (machine projection). Mirrors typl/registry.ts,
8
+ * keyed by absolute surface path instead of `$Name`.
9
+ */
10
+ import type { Entry, SourceLocation } from "../model/mod.js";
11
+ import { type UxElement } from "./assemble.js";
12
+ /** One surface declaration record, with backref to its host entry. */
13
+ export interface SurfaceRecord {
14
+ readonly path: string;
15
+ readonly kind: string;
16
+ readonly states: readonly string[];
17
+ readonly owningEntryDisplayId: string;
18
+ readonly owningEntryFile: string;
19
+ readonly elements: readonly UxElement[];
20
+ readonly location: SourceLocation;
21
+ }
22
+ /**
23
+ * Corpus-wide index. Each surface path maps to ALL declarations found —
24
+ * collisions are NOT collapsed; the validator surfaces duplicate
25
+ * declarations via UXIL-015 (mirrors typl's TYPL-009 treatment).
26
+ */
27
+ export interface UxRegistry {
28
+ /** Keyed by absolute surface path (no `ux:` scheme). */
29
+ readonly surfaces: ReadonlyMap<string, readonly SurfaceRecord[]>;
30
+ }
31
+ /**
32
+ * Build the corpus uxil registry from the entries. Entries whose assembly
33
+ * yields no surfaces are skipped. Source order is preserved within each
34
+ * path's list (first declaration first).
35
+ */
36
+ export declare function buildUxRegistry(entries: readonly Entry[]): UxRegistry;
37
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/uxil/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAElE,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,SAAS,EAAE,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,wDAAwD;IACxD,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC,CAAC;CAClE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,GAAG,UAAU,CAsBrE"}
@@ -0,0 +1,29 @@
1
+ import { assembleUxSurface } from "./assemble.js";
2
+ /**
3
+ * Build the corpus uxil registry from the entries. Entries whose assembly
4
+ * yields no surfaces are skipped. Source order is preserved within each
5
+ * path's list (first declaration first).
6
+ */
7
+ export function buildUxRegistry(entries) {
8
+ const surfaces = new Map();
9
+ for (const entry of entries) {
10
+ const tree = assembleUxSurface(entry);
11
+ for (const surface of tree.surfaces) {
12
+ const record = {
13
+ path: surface.path,
14
+ kind: surface.kind,
15
+ states: surface.states,
16
+ owningEntryDisplayId: entry.displayId,
17
+ owningEntryFile: entry.location.file,
18
+ elements: surface.elements,
19
+ location: surface.location,
20
+ };
21
+ const list = surfaces.get(surface.path);
22
+ if (list)
23
+ list.push(record);
24
+ else
25
+ surfaces.set(surface.path, [record]);
26
+ }
27
+ }
28
+ return { surfaces };
29
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @module uxil/surfaces
3
+ *
4
+ * Thin uxil adapters over the shared declaration-surface machinery
5
+ * (core/decl). Each supplies a `classifyUxilForm`-based recognizer and
6
+ * re-uses the DSL-agnostic walkers — mirrors typl/bullet.ts + the inline
7
+ * half of typl/citations.ts.
8
+ *
9
+ * Bullet paragraphs keep their literal backtick delimiters and any
10
+ * trailing prose in one string (e.g. `` `/play : activate` — starts
11
+ * playback. ``) — {@linkcode extractNestedBulletDeclarations} hands the
12
+ * whole paragraph to the recognizer, unlike the inline surface (whose
13
+ * tokens are span-only, already backtick-stripped by
14
+ * {@linkcode extractInlineDeclarations}). Classification therefore needs
15
+ * the *leading span* extracted first; {@linkcode stripUxilLeadingSpan}
16
+ * does that (mirroring grammar.ts's private `splitLeadingCodeSpan`,
17
+ * span-only). The declaration's `source` field stays the raw paragraph —
18
+ * `parseElementBullet` wants exactly that (it splits the span itself);
19
+ * assembly strips the span again for `parseChildSurfaceDecl`, which
20
+ * expects bare span text.
21
+ */
22
+ import type { BodyBlock } from "../ast/nodes.js";
23
+ import type { BodyToken } from "../model/mod.js";
24
+ import { type InlineDeclaration, type NestedBlockDeclaration } from "../decl/mod.js";
25
+ /**
26
+ * Extract the leading inline-code span's inner text from a bullet
27
+ * paragraph, backticks stripped, ignoring any trailing prose. Returns
28
+ * `undefined` when the paragraph does not begin with a (closed) code
29
+ * span. Handles both single- and double-backtick delimiters.
30
+ */
31
+ export declare function stripUxilLeadingSpan(text: string): string | undefined;
32
+ /** Inline code spans whose text is a uxil root declaration. */
33
+ export declare function extractUxRootSpans(bodyTokens: readonly BodyToken[]): readonly InlineDeclaration[];
34
+ /** Bullet declarations (element or child surface), with parent links. */
35
+ export declare function extractUxBullets(blocks: readonly BodyBlock[]): readonly NestedBlockDeclaration[];
36
+ //# sourceMappingURL=surfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../src/uxil/surfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAGxB;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWrE;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,SAAS,SAAS,EAAE,GAC/B,SAAS,iBAAiB,EAAE,CAK9B;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,SAAS,SAAS,EAAE,GAC3B,SAAS,sBAAsB,EAAE,CAOnC"}
@@ -0,0 +1,34 @@
1
+ import { extractInlineDeclarations, extractNestedBulletDeclarations, } from "../decl/mod.js";
2
+ import { classifyUxilForm } from "./recognize.js";
3
+ /**
4
+ * Extract the leading inline-code span's inner text from a bullet
5
+ * paragraph, backticks stripped, ignoring any trailing prose. Returns
6
+ * `undefined` when the paragraph does not begin with a (closed) code
7
+ * span. Handles both single- and double-backtick delimiters.
8
+ */
9
+ export function stripUxilLeadingSpan(text) {
10
+ const t = text.replace(/^\s+/, "");
11
+ if (t.startsWith("``")) {
12
+ const end = t.indexOf("``", 2);
13
+ return end < 0 ? undefined : t.slice(2, end);
14
+ }
15
+ if (t.startsWith("`")) {
16
+ const end = t.indexOf("`", 1);
17
+ return end < 0 ? undefined : t.slice(1, end);
18
+ }
19
+ return undefined;
20
+ }
21
+ /** Inline code spans whose text is a uxil root declaration. */
22
+ export function extractUxRootSpans(bodyTokens) {
23
+ return extractInlineDeclarations(bodyTokens, (text) => classifyUxilForm(text) === "root");
24
+ }
25
+ /** Bullet declarations (element or child surface), with parent links. */
26
+ export function extractUxBullets(blocks) {
27
+ return extractNestedBulletDeclarations(blocks, (text) => {
28
+ const span = stripUxilLeadingSpan(text);
29
+ if (span === undefined)
30
+ return false;
31
+ const form = classifyUxilForm(span);
32
+ return form === "element" || form === "child";
33
+ });
34
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @module uxil/validator
3
+ *
4
+ * Enforced uxil semantics (S8 #726): closed-vocabulary checks, corpus
5
+ * structural rules (declared-once, dangling namespace parent, navigate
6
+ * resolution), and citation resolution (Pass 3, added alongside Task 9).
7
+ * Mirrors typl/validator.ts's shape. Diagnostics are file-anchored as of
8
+ * S9 (#727).
9
+ */
10
+ import type { Diagnostic, Entry } from "../model/mod.js";
11
+ import { type UxRegistry } from "./registry.js";
12
+ /** Result of {@linkcode validateUxil}: the corpus registry plus diagnostics. */
13
+ export interface UxilValidation {
14
+ readonly registry: UxRegistry;
15
+ readonly diagnostics: readonly Diagnostic[];
16
+ }
17
+ /** Options for {@linkcode validateUxil}. */
18
+ export interface UxilValidateOptions {
19
+ /**
20
+ * Entries whose `ux:` citations resolve against the registry (Pass 3).
21
+ * Defaults to `entries`. The family orchestrator (S9 #727) passes every
22
+ * non-upstream project entry here while `entries` carries only the
23
+ * declaring-type entries — citations are legal from any entry type;
24
+ * declarations are not.
25
+ */
26
+ readonly citationEntries?: readonly Entry[];
27
+ }
28
+ /**
29
+ * Validate the uxil declarations across all entries: per-entry structural
30
+ * and vocabulary checks (Pass 1), corpus structural checks over the
31
+ * registry (Pass 2), and citation resolution (Pass 3). Returns the built
32
+ * registry even when diagnostics are present, so callers can still use it
33
+ * for navigation/projection.
34
+ */
35
+ export declare function validateUxil(entries: readonly Entry[], opts?: UxilValidateOptions): UxilValidation;
36
+ //# sourceMappingURL=validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/uxil/validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAKzD,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAGjE,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,IAAI,GAAE,mBAAwB,GAC7B,cAAc,CA6MhB"}
@@ -0,0 +1,139 @@
1
+ import { assembleUxSurface } from "./assemble.js";
2
+ import { extractUxCitations } from "./citations.js";
3
+ import { findDuplicateDeclarations } from "../decl/mod.js";
4
+ import { uxilDiagnosticAt } from "./diagnostics.js";
5
+ import { buildUxRegistry } from "./registry.js";
6
+ import { isKnownKind, isKnownVerb, UX_KINDS } from "./vocab.js";
7
+ /**
8
+ * Validate the uxil declarations across all entries: per-entry structural
9
+ * and vocabulary checks (Pass 1), corpus structural checks over the
10
+ * registry (Pass 2), and citation resolution (Pass 3). Returns the built
11
+ * registry even when diagnostics are present, so callers can still use it
12
+ * for navigation/projection.
13
+ */
14
+ export function validateUxil(entries, opts = {}) {
15
+ const diagnostics = [];
16
+ // ── Pass 1: per-entry structural + vocabulary ────────────────────────────
17
+ for (const entry of entries) {
18
+ const tree = assembleUxSurface(entry);
19
+ diagnostics.push(...tree.diagnostics);
20
+ for (const surface of tree.surfaces) {
21
+ const kindInfo = isKnownKind(surface.kind)
22
+ ? UX_KINDS.get(surface.kind)
23
+ : undefined;
24
+ if (kindInfo === undefined) {
25
+ diagnostics.push(uxilDiagnosticAt("UXIL-009", { kind: surface.kind }, surface.location));
26
+ }
27
+ else if (!kindInfo.stateful && surface.states.length > 0) {
28
+ diagnostics.push(uxilDiagnosticAt("UXIL-013", { kind: surface.kind }, surface.location));
29
+ }
30
+ for (const element of surface.elements) {
31
+ for (const verb of element.verbs) {
32
+ if (!isKnownVerb(verb)) {
33
+ diagnostics.push(uxilDiagnosticAt("UXIL-010", { verb }, element.location));
34
+ }
35
+ }
36
+ if (element.verbs.includes("observe") && element.verbs.length > 1) {
37
+ diagnostics.push(uxilDiagnosticAt("UXIL-014", { element: element.name }, element.location));
38
+ }
39
+ // UXIL-025 (#727): 'observe' anchors a visibility assertion — the
40
+ // issue's "visibility of a non-screen". Only when the kind is known
41
+ // (an unknown kind is already UXIL-009; don't cascade).
42
+ if (kindInfo !== undefined && !kindInfo.visual &&
43
+ element.verbs.includes("observe")) {
44
+ diagnostics.push(uxilDiagnosticAt("UXIL-025", {
45
+ element: element.name,
46
+ surface: surface.path,
47
+ kind: surface.kind,
48
+ }, element.location));
49
+ }
50
+ // UXIL-026 (#727): vocab's requiresNavTarget, previously unenforced.
51
+ if (element.verbs.includes("navigate") && element.navTarget === undefined) {
52
+ diagnostics.push(uxilDiagnosticAt("UXIL-026", { element: element.name }, element.location));
53
+ }
54
+ }
55
+ }
56
+ }
57
+ // ── Pass 2: corpus structural, over the registry ─────────────────────────
58
+ const registry = buildUxRegistry(entries);
59
+ for (const { first, duplicates } of findDuplicateDeclarations(registry.surfaces)) {
60
+ for (const dup of duplicates) {
61
+ diagnostics.push(uxilDiagnosticAt("UXIL-015", {
62
+ surface: dup.path,
63
+ otherFile: first.owningEntryFile,
64
+ otherLine: first.location.line,
65
+ }, dup.location));
66
+ }
67
+ }
68
+ for (const [path, records] of registry.surfaces) {
69
+ const dot = path.lastIndexOf(".");
70
+ if (dot < 0)
71
+ continue;
72
+ const parent = path.slice(0, dot);
73
+ // A single-segment parent (e.g. "media" in "media.home") is an
74
+ // ordinary namespace prefix a root can use freely — it is never
75
+ // itself required to be a separately declared surface (the design's
76
+ // own worked examples name roots this way: "media.home",
77
+ // "controls.hvac"). Only a surface nested 2+ levels deep, whose
78
+ // parent is itself dotted, plausibly represents a promoted child
79
+ // surface (design §6) whose intermediate ancestor is expected to
80
+ // exist somewhere in the corpus. A genuinely-nested same-entry child
81
+ // never reaches this branch — assembleUxSurface always registers its
82
+ // resolved ancestor alongside it — so this only ever fires across
83
+ // entries, exactly the promoted-surface scenario it targets.
84
+ if (!parent.includes("."))
85
+ continue;
86
+ if (registry.surfaces.has(parent))
87
+ continue;
88
+ for (const record of records) {
89
+ diagnostics.push(uxilDiagnosticAt("UXIL-016", { surface: path, parent }, record.location));
90
+ }
91
+ }
92
+ for (const records of registry.surfaces.values()) {
93
+ for (const record of records) {
94
+ for (const element of record.elements) {
95
+ if (element.navTarget === undefined)
96
+ continue;
97
+ const targets = registry.surfaces.get(element.navTarget);
98
+ const targetKind = targets?.[0]?.kind;
99
+ const navigable = targetKind !== undefined &&
100
+ UX_KINDS.get(targetKind)?.navigable === true;
101
+ if (!navigable) {
102
+ diagnostics.push(uxilDiagnosticAt("UXIL-017", { target: element.navTarget }, element.location));
103
+ }
104
+ }
105
+ }
106
+ }
107
+ // ── Pass 3: citation resolution ──────────────────────────────────────────
108
+ for (const entry of opts.citationEntries ?? entries) {
109
+ for (const citation of extractUxCitations(entry.bodyTokens)) {
110
+ const { ref, location } = citation;
111
+ const surfacePath = ref.surface.join(".");
112
+ const records = registry.surfaces.get(surfacePath);
113
+ if (!records || records.length === 0) {
114
+ diagnostics.push(uxilDiagnosticAt("UXIL-018", { surface: surfacePath }, location));
115
+ continue;
116
+ }
117
+ // First-declaration-wins, matching the navigate-resolution check above.
118
+ const surface = records[0];
119
+ if (ref.state !== undefined && !surface.states.includes(ref.state)) {
120
+ diagnostics.push(uxilDiagnosticAt("UXIL-021", { state: ref.state, surface: surfacePath }, location));
121
+ }
122
+ if (ref.element !== undefined) {
123
+ const element = surface.elements.find((e) => e.name === ref.element);
124
+ if (!element) {
125
+ diagnostics.push(uxilDiagnosticAt("UXIL-019", { element: ref.element, surface: surfacePath }, location));
126
+ }
127
+ else {
128
+ if (ref.verb !== undefined && !element.verbs.includes(ref.verb)) {
129
+ diagnostics.push(uxilDiagnosticAt("UXIL-020", { verb: ref.verb, element: element.name }, location));
130
+ }
131
+ if (ref.key?.kind === "concrete" && element.keyTemplate !== undefined) {
132
+ diagnostics.push(uxilDiagnosticAt("UXIL-022", { element: element.name }, location));
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ return { registry, diagnostics };
139
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @module uxil/vocab
3
+ *
4
+ * The two closed, core-owned uxil vocabularies (design §2/§3): three surface
5
+ * kinds and eleven interaction verbs, each with the semantics diagnostics and
6
+ * codegen rely on. Extension is a markspec release decision — not a profile
7
+ * concern (ADR-009).
8
+ */
9
+ /** Semantics carried by a surface kind. */
10
+ export interface KindInfo {
11
+ /** A valid `navigate ->` target (only `screen`). */
12
+ readonly navigable: boolean;
13
+ /** May declare `@` states. */
14
+ readonly stateful: boolean;
15
+ /** Subject of visibility assertions / `observe` anchors. */
16
+ readonly visual: boolean;
17
+ }
18
+ /** Semantics carried by an interaction verb. */
19
+ export interface VerbInfo {
20
+ /** Requires a declared `-> target` (only `navigate`). */
21
+ readonly requiresNavTarget: boolean;
22
+ /** Exclusive on an element — interactive or anchor, never both (only `observe`). */
23
+ readonly exclusive: boolean;
24
+ }
25
+ /** The three closed, core-owned surface kinds. */
26
+ export declare const UX_KINDS: ReadonlyMap<string, KindInfo>;
27
+ /** The eleven closed, core-owned interaction verbs. */
28
+ export declare const UX_VERBS: ReadonlyMap<string, VerbInfo>;
29
+ /** True when `kind` is one of the three closed surface kinds. */
30
+ export declare function isKnownKind(kind: string): boolean;
31
+ /** True when `verb` is one of the eleven closed interaction verbs. */
32
+ export declare function isKnownVerb(verb: string): boolean;
33
+ //# sourceMappingURL=vocab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vocab.d.ts","sourceRoot":"","sources":["../../src/uxil/vocab.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,2CAA2C;AAC3C,MAAM,WAAW,QAAQ;IACvB,oDAAoD;IACpD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,8BAA8B;IAC9B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,gDAAgD;AAChD,MAAM,WAAW,QAAQ;IACvB,yDAAyD;IACzD,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,oFAAoF;IACpF,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED,kDAAkD;AAClD,eAAO,MAAM,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAIjD,CAAC;AAEH,uDAAuD;AACvD,eAAO,MAAM,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAYjD,CAAC;AAEH,iEAAiE;AACjE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @module uxil/vocab
3
+ *
4
+ * The two closed, core-owned uxil vocabularies (design §2/§3): three surface
5
+ * kinds and eleven interaction verbs, each with the semantics diagnostics and
6
+ * codegen rely on. Extension is a markspec release decision — not a profile
7
+ * concern (ADR-009).
8
+ */
9
+ /** The three closed, core-owned surface kinds. */
10
+ export const UX_KINDS = new Map([
11
+ ["screen", { navigable: true, stateful: true, visual: true }],
12
+ ["panel", { navigable: false, stateful: false, visual: true }],
13
+ ["agent", { navigable: false, stateful: true, visual: false }],
14
+ ]);
15
+ /** The eleven closed, core-owned interaction verbs. */
16
+ export const UX_VERBS = new Map([
17
+ ["activate", { requiresNavTarget: false, exclusive: false }],
18
+ ["toggle", { requiresNavTarget: false, exclusive: false }],
19
+ ["select", { requiresNavTarget: false, exclusive: false }],
20
+ ["adjust", { requiresNavTarget: false, exclusive: false }],
21
+ ["input", { requiresNavTarget: false, exclusive: false }],
22
+ ["scroll", { requiresNavTarget: false, exclusive: false }],
23
+ ["drag", { requiresNavTarget: false, exclusive: false }],
24
+ ["navigate", { requiresNavTarget: true, exclusive: false }],
25
+ ["dismiss", { requiresNavTarget: false, exclusive: false }],
26
+ ["ask", { requiresNavTarget: false, exclusive: false }],
27
+ ["observe", { requiresNavTarget: false, exclusive: true }],
28
+ ]);
29
+ /** True when `kind` is one of the three closed surface kinds. */
30
+ export function isKnownKind(kind) {
31
+ return UX_KINDS.has(kind);
32
+ }
33
+ /** True when `verb` is one of the eleven closed interaction verbs. */
34
+ export function isKnownVerb(verb) {
35
+ return UX_VERBS.has(verb);
36
+ }
@@ -22,7 +22,8 @@ import type { CaptionConventions, Diagnostic, Entry } from "../model/mod.js";
22
22
  *
23
23
  * @param entry - The entry whose body AST is scanned for captions.
24
24
  * @param conventions - The configured position conventions from
25
- * `ProjectConfig.captionConventions`. An empty record means no
25
+ * `.markspec.yaml` `caption-conventions:` (`ToolConfig.captionConventions`).
26
+ * An empty record means no
26
27
  * conventions are set and the function returns immediately.
27
28
  */
28
29
  export declare function validateCaptionConvention(entry: Entry, conventions: CaptionConventions): readonly Diagnostic[];
@@ -1 +1 @@
1
- {"version":3,"file":"caption_convention.d.ts","sourceRoot":"","sources":["../../src/validator/caption_convention.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,kBAAkB,GAC9B,SAAS,UAAU,EAAE,CAmCvB"}
1
+ {"version":3,"file":"caption_convention.d.ts","sourceRoot":"","sources":["../../src/validator/caption_convention.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,kBAAkB,GAC9B,SAAS,UAAU,EAAE,CAmCvB"}
@@ -21,7 +21,8 @@
21
21
  *
22
22
  * @param entry - The entry whose body AST is scanned for captions.
23
23
  * @param conventions - The configured position conventions from
24
- * `ProjectConfig.captionConventions`. An empty record means no
24
+ * `.markspec.yaml` `caption-conventions:` (`ToolConfig.captionConventions`).
25
+ * An empty record means no
25
26
  * conventions are set and the function returns immediately.
26
27
  */
27
28
  export function validateCaptionConvention(entry, conventions) {
@@ -1 +1 @@
1
- {"version":3,"file":"corpus.d.ts","sourceRoot":"","sources":["../../src/validator/corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAWzD,oDAAoD;AACpD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5C,qEAAqE;IACrE,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,SAAS,KAAK,EAAE,GAC3B,qBAAqB,CAoFvB;AAED,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,UAAU,EAAE,SAAS,KAAK,EAAE,EAC5B,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,GAClC,UAAU,EAAE,CAmCd"}
1
+ {"version":3,"file":"corpus.d.ts","sourceRoot":"","sources":["../../src/validator/corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAe,MAAM,iBAAiB,CAAC;AA4BtE,oDAAoD;AACpD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5C,qEAAqE;IACrE,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,SAAS,KAAK,EAAE,GAC3B,qBAAqB,CAsFvB;AAED,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,UAAU,EAAE,SAAS,KAAK,EAAE,EAC5B,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,GAClC,UAAU,EAAE,CAyCd"}