@driftsys/markspec 0.10.3 → 0.12.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 (458) hide show
  1. package/README.md +11 -2
  2. package/esm/ast/normalize.d.ts +4 -5
  3. package/esm/ast/normalize.d.ts.map +1 -1
  4. package/esm/ast/normalize.js +6 -37
  5. package/esm/collect/mod.d.ts +29 -9
  6. package/esm/collect/mod.d.ts.map +1 -1
  7. package/esm/collect/mod.js +36 -10
  8. package/esm/compiler/deserialize.d.ts +49 -0
  9. package/esm/compiler/deserialize.d.ts.map +1 -0
  10. package/esm/compiler/deserialize.js +139 -0
  11. package/esm/compiler/manifest.d.ts +3 -0
  12. package/esm/compiler/manifest.d.ts.map +1 -1
  13. package/esm/compiler/manifest.js +9 -3
  14. package/esm/compiler/mod.d.ts.map +1 -1
  15. package/esm/compiler/mod.js +18 -13
  16. package/esm/config/markspec.d.ts +40 -1
  17. package/esm/config/markspec.d.ts.map +1 -1
  18. package/esm/config/markspec.js +127 -2
  19. package/esm/config/mod.d.ts.map +1 -1
  20. package/esm/config/mod.js +143 -147
  21. package/esm/decl/duplicates.d.ts +29 -0
  22. package/esm/decl/duplicates.d.ts.map +1 -0
  23. package/esm/decl/duplicates.js +28 -0
  24. package/esm/decl/mod.d.ts +4 -2
  25. package/esm/decl/mod.d.ts.map +1 -1
  26. package/esm/decl/mod.js +2 -1
  27. package/esm/decl/surfaces.d.ts +29 -7
  28. package/esm/decl/surfaces.d.ts.map +1 -1
  29. package/esm/decl/surfaces.js +31 -18
  30. package/esm/discovery/mod.d.ts +24 -8
  31. package/esm/discovery/mod.d.ts.map +1 -1
  32. package/esm/discovery/mod.js +57 -21
  33. package/esm/discovery/projects.d.ts +109 -0
  34. package/esm/discovery/projects.d.ts.map +1 -0
  35. package/esm/discovery/projects.js +232 -0
  36. package/esm/formatter/entry_body.d.ts +86 -0
  37. package/esm/formatter/entry_body.d.ts.map +1 -0
  38. package/esm/formatter/entry_body.js +287 -0
  39. package/esm/formatter/mod.d.ts +13 -9
  40. package/esm/formatter/mod.d.ts.map +1 -1
  41. package/esm/formatter/mod.js +126 -50
  42. package/esm/gates/mod.d.ts +13 -2
  43. package/esm/gates/mod.d.ts.map +1 -1
  44. package/esm/gates/mod.js +41 -13
  45. package/esm/lint/runner.d.ts.map +1 -1
  46. package/esm/lint/runner.js +7 -5
  47. package/esm/lock/acquire_compile.d.ts +31 -0
  48. package/esm/lock/acquire_compile.d.ts.map +1 -0
  49. package/esm/lock/acquire_compile.js +83 -0
  50. package/esm/lock/cache_check.d.ts +28 -0
  51. package/esm/lock/cache_check.d.ts.map +1 -0
  52. package/esm/lock/cache_check.js +51 -0
  53. package/esm/lock/check.d.ts +14 -3
  54. package/esm/lock/check.d.ts.map +1 -1
  55. package/esm/lock/check.js +43 -4
  56. package/esm/lock/edge_drift.d.ts +2 -0
  57. package/esm/lock/edge_drift.d.ts.map +1 -1
  58. package/esm/lock/edge_drift.js +4 -0
  59. package/esm/lock/git_intent.d.ts +46 -0
  60. package/esm/lock/git_intent.d.ts.map +1 -0
  61. package/esm/lock/git_intent.js +111 -0
  62. package/esm/lock/mod.d.ts +11 -4
  63. package/esm/lock/mod.d.ts.map +1 -1
  64. package/esm/lock/mod.js +8 -2
  65. package/esm/lock/model.d.ts +24 -1
  66. package/esm/lock/model.d.ts.map +1 -1
  67. package/esm/lock/parser.d.ts.map +1 -1
  68. package/esm/lock/parser.js +32 -0
  69. package/esm/lock/pin_assurance.d.ts +20 -0
  70. package/esm/lock/pin_assurance.d.ts.map +1 -0
  71. package/esm/lock/pin_assurance.js +34 -0
  72. package/esm/lock/resolve.d.ts +8 -17
  73. package/esm/lock/resolve.d.ts.map +1 -1
  74. package/esm/lock/resolve.js +7 -67
  75. package/esm/lock/serializer.d.ts.map +1 -1
  76. package/esm/lock/serializer.js +23 -0
  77. package/esm/lock/upstream_common.d.ts +29 -0
  78. package/esm/lock/upstream_common.d.ts.map +1 -0
  79. package/esm/lock/upstream_common.js +38 -0
  80. package/esm/lock/upstream_deps.d.ts +63 -0
  81. package/esm/lock/upstream_deps.d.ts.map +1 -0
  82. package/esm/lock/upstream_deps.js +172 -0
  83. package/esm/lock/upstream_refs.d.ts +69 -0
  84. package/esm/lock/upstream_refs.d.ts.map +1 -0
  85. package/esm/lock/upstream_refs.js +238 -0
  86. package/esm/mod.d.ts +23 -11
  87. package/esm/mod.d.ts.map +1 -1
  88. package/esm/mod.js +20 -8
  89. package/esm/model/mod.d.ts +114 -28
  90. package/esm/model/mod.d.ts.map +1 -1
  91. package/esm/model/mod.js +76 -13
  92. package/esm/model/profile.d.ts +13 -0
  93. package/esm/model/profile.d.ts.map +1 -1
  94. package/esm/parser/code_regions.d.ts +29 -0
  95. package/esm/parser/code_regions.d.ts.map +1 -0
  96. package/esm/parser/code_regions.js +38 -0
  97. package/esm/parser/markdown.d.ts.map +1 -1
  98. package/esm/parser/markdown.js +110 -91
  99. package/esm/parser/mod.d.ts.map +1 -1
  100. package/esm/parser/mod.js +7 -1
  101. package/esm/parser/translate.d.ts.map +1 -1
  102. package/esm/parser/translate.js +5 -0
  103. package/esm/profile/manifest.d.ts.map +1 -1
  104. package/esm/profile/manifest.js +20 -3
  105. package/esm/profile/merge.js +7 -0
  106. package/esm/refs/mod.d.ts.map +1 -1
  107. package/esm/refs/mod.js +8 -19
  108. package/esm/reporter/mod.d.ts +11 -0
  109. package/esm/reporter/mod.d.ts.map +1 -1
  110. package/esm/reporter/mod.js +20 -9
  111. package/esm/typl/assemble.d.ts +53 -0
  112. package/esm/typl/assemble.d.ts.map +1 -0
  113. package/esm/typl/assemble.js +238 -0
  114. package/esm/typl/ast.d.ts +7 -1
  115. package/esm/typl/ast.d.ts.map +1 -1
  116. package/esm/typl/ast.js +3 -0
  117. package/esm/typl/bullet.d.ts +9 -7
  118. package/esm/typl/bullet.d.ts.map +1 -1
  119. package/esm/typl/bullet.js +6 -4
  120. package/esm/typl/citations.d.ts +27 -0
  121. package/esm/typl/citations.d.ts.map +1 -0
  122. package/esm/typl/citations.js +16 -0
  123. package/esm/typl/diagnostics.d.ts +2 -2
  124. package/esm/typl/diagnostics.d.ts.map +1 -1
  125. package/esm/typl/diagnostics.js +18 -0
  126. package/esm/typl/grammar.d.ts.map +1 -1
  127. package/esm/typl/grammar.js +6 -0
  128. package/esm/typl/lexer.d.ts.map +1 -1
  129. package/esm/typl/lexer.js +25 -4
  130. package/esm/typl/mod.d.ts +8 -2
  131. package/esm/typl/mod.d.ts.map +1 -1
  132. package/esm/typl/mod.js +5 -1
  133. package/esm/typl/recognize.js +2 -2
  134. package/esm/typl/registry.d.ts +1 -1
  135. package/esm/typl/resolve.d.ts +31 -0
  136. package/esm/typl/resolve.d.ts.map +1 -0
  137. package/esm/typl/resolve.js +27 -0
  138. package/esm/typl/table.d.ts +52 -0
  139. package/esm/typl/table.d.ts.map +1 -0
  140. package/esm/typl/table.js +69 -0
  141. package/esm/typl/validator.d.ts +24 -5
  142. package/esm/typl/validator.d.ts.map +1 -1
  143. package/esm/typl/validator.js +55 -75
  144. package/esm/upstream/mod.d.ts +45 -0
  145. package/esm/upstream/mod.d.ts.map +1 -0
  146. package/esm/upstream/mod.js +98 -0
  147. package/esm/upstream/project.d.ts +33 -0
  148. package/esm/upstream/project.d.ts.map +1 -0
  149. package/esm/upstream/project.js +38 -0
  150. package/esm/upstream/refs.d.ts +23 -0
  151. package/esm/upstream/refs.d.ts.map +1 -0
  152. package/esm/upstream/refs.js +71 -0
  153. package/esm/util/fence.d.ts +20 -29
  154. package/esm/util/fence.d.ts.map +1 -1
  155. package/esm/util/fence.js +42 -50
  156. package/esm/util/modals.d.ts +6 -0
  157. package/esm/util/modals.d.ts.map +1 -1
  158. package/esm/util/modals.js +37 -0
  159. package/esm/util/paths.d.ts +14 -0
  160. package/esm/util/paths.d.ts.map +1 -0
  161. package/esm/util/paths.js +22 -0
  162. package/esm/uxil/assemble.d.ts +38 -0
  163. package/esm/uxil/assemble.d.ts.map +1 -0
  164. package/esm/uxil/assemble.js +268 -0
  165. package/esm/uxil/ast.d.ts +63 -0
  166. package/esm/uxil/ast.d.ts.map +1 -0
  167. package/esm/uxil/ast.js +9 -0
  168. package/esm/uxil/citations.d.ts +27 -0
  169. package/esm/uxil/citations.d.ts.map +1 -0
  170. package/esm/uxil/citations.js +25 -0
  171. package/esm/uxil/diagnostics.d.ts +39 -0
  172. package/esm/uxil/diagnostics.d.ts.map +1 -0
  173. package/esm/uxil/diagnostics.js +135 -0
  174. package/esm/uxil/grammar.d.ts +72 -0
  175. package/esm/uxil/grammar.d.ts.map +1 -0
  176. package/esm/uxil/grammar.js +505 -0
  177. package/esm/uxil/lexer.d.ts +23 -0
  178. package/esm/uxil/lexer.d.ts.map +1 -0
  179. package/esm/uxil/lexer.js +58 -0
  180. package/esm/uxil/mod.d.ts +32 -0
  181. package/esm/uxil/mod.d.ts.map +1 -0
  182. package/esm/uxil/mod.js +11 -0
  183. package/esm/uxil/projection.d.ts +40 -0
  184. package/esm/uxil/projection.d.ts.map +1 -0
  185. package/esm/uxil/projection.js +41 -0
  186. package/esm/uxil/recognize.d.ts +16 -0
  187. package/esm/uxil/recognize.d.ts.map +1 -0
  188. package/esm/uxil/recognize.js +28 -0
  189. package/esm/uxil/registry.d.ts +37 -0
  190. package/esm/uxil/registry.d.ts.map +1 -0
  191. package/esm/uxil/registry.js +29 -0
  192. package/esm/uxil/surfaces.d.ts +36 -0
  193. package/esm/uxil/surfaces.d.ts.map +1 -0
  194. package/esm/uxil/surfaces.js +34 -0
  195. package/esm/uxil/validator.d.ts +36 -0
  196. package/esm/uxil/validator.d.ts.map +1 -0
  197. package/esm/uxil/validator.js +139 -0
  198. package/esm/uxil/vocab.d.ts +33 -0
  199. package/esm/uxil/vocab.d.ts.map +1 -0
  200. package/esm/uxil/vocab.js +36 -0
  201. package/esm/validator/body_blocks.d.ts +2 -1
  202. package/esm/validator/body_blocks.d.ts.map +1 -1
  203. package/esm/validator/body_blocks.js +80 -2
  204. package/esm/validator/caption_convention.d.ts +2 -1
  205. package/esm/validator/caption_convention.d.ts.map +1 -1
  206. package/esm/validator/caption_convention.js +2 -1
  207. package/esm/validator/corpus.d.ts +6 -0
  208. package/esm/validator/corpus.d.ts.map +1 -1
  209. package/esm/validator/corpus.js +55 -20
  210. package/esm/validator/discipline.d.ts +6 -4
  211. package/esm/validator/discipline.d.ts.map +1 -1
  212. package/esm/validator/discipline.js +6 -4
  213. package/esm/validator/mod.d.ts +1 -1
  214. package/esm/validator/mod.d.ts.map +1 -1
  215. package/esm/validator/mod.js +29 -16
  216. package/esm/validator/pipeline.d.ts +11 -1
  217. package/esm/validator/pipeline.d.ts.map +1 -1
  218. package/esm/validator/pipeline.js +76 -23
  219. package/esm/validator/trace_types.d.ts +9 -2
  220. package/esm/validator/trace_types.d.ts.map +1 -1
  221. package/esm/validator/trace_types.js +21 -5
  222. package/esm/validator/traceability.d.ts +15 -3
  223. package/esm/validator/traceability.d.ts.map +1 -1
  224. package/esm/validator/traceability.js +39 -4
  225. package/esm/validator/types.d.ts.map +1 -1
  226. package/esm/validator/types.js +11 -1
  227. package/esm/validator/uxil_family.d.ts +43 -0
  228. package/esm/validator/uxil_family.d.ts.map +1 -0
  229. package/esm/validator/uxil_family.js +52 -0
  230. package/package.json +1 -1
  231. package/script/ast/normalize.d.ts +4 -5
  232. package/script/ast/normalize.d.ts.map +1 -1
  233. package/script/ast/normalize.js +5 -36
  234. package/script/collect/mod.d.ts +29 -9
  235. package/script/collect/mod.d.ts.map +1 -1
  236. package/script/collect/mod.js +38 -10
  237. package/script/compiler/deserialize.d.ts +49 -0
  238. package/script/compiler/deserialize.d.ts.map +1 -0
  239. package/script/compiler/deserialize.js +144 -0
  240. package/script/compiler/manifest.d.ts +3 -0
  241. package/script/compiler/manifest.d.ts.map +1 -1
  242. package/script/compiler/manifest.js +10 -3
  243. package/script/compiler/mod.d.ts.map +1 -1
  244. package/script/compiler/mod.js +16 -11
  245. package/script/config/markspec.d.ts +40 -1
  246. package/script/config/markspec.d.ts.map +1 -1
  247. package/script/config/markspec.js +129 -3
  248. package/script/config/mod.d.ts.map +1 -1
  249. package/script/config/mod.js +143 -147
  250. package/script/decl/duplicates.d.ts +29 -0
  251. package/script/decl/duplicates.d.ts.map +1 -0
  252. package/script/decl/duplicates.js +31 -0
  253. package/script/decl/mod.d.ts +4 -2
  254. package/script/decl/mod.d.ts.map +1 -1
  255. package/script/decl/mod.js +4 -2
  256. package/script/decl/surfaces.d.ts +29 -7
  257. package/script/decl/surfaces.d.ts.map +1 -1
  258. package/script/decl/surfaces.js +32 -19
  259. package/script/discovery/mod.d.ts +24 -8
  260. package/script/discovery/mod.d.ts.map +1 -1
  261. package/script/discovery/mod.js +56 -20
  262. package/script/discovery/projects.d.ts +109 -0
  263. package/script/discovery/projects.d.ts.map +1 -0
  264. package/script/discovery/projects.js +240 -0
  265. package/script/formatter/entry_body.d.ts +86 -0
  266. package/script/formatter/entry_body.d.ts.map +1 -0
  267. package/script/formatter/entry_body.js +292 -0
  268. package/script/formatter/mod.d.ts +13 -9
  269. package/script/formatter/mod.d.ts.map +1 -1
  270. package/script/formatter/mod.js +124 -48
  271. package/script/gates/mod.d.ts +13 -2
  272. package/script/gates/mod.d.ts.map +1 -1
  273. package/script/gates/mod.js +50 -22
  274. package/script/lint/runner.d.ts.map +1 -1
  275. package/script/lint/runner.js +6 -4
  276. package/script/lock/acquire_compile.d.ts +31 -0
  277. package/script/lock/acquire_compile.d.ts.map +1 -0
  278. package/script/lock/acquire_compile.js +86 -0
  279. package/script/lock/cache_check.d.ts +28 -0
  280. package/script/lock/cache_check.d.ts.map +1 -0
  281. package/script/lock/cache_check.js +54 -0
  282. package/script/lock/check.d.ts +14 -3
  283. package/script/lock/check.d.ts.map +1 -1
  284. package/script/lock/check.js +43 -4
  285. package/script/lock/edge_drift.d.ts +2 -0
  286. package/script/lock/edge_drift.d.ts.map +1 -1
  287. package/script/lock/edge_drift.js +5 -0
  288. package/script/lock/git_intent.d.ts +46 -0
  289. package/script/lock/git_intent.d.ts.map +1 -0
  290. package/script/lock/git_intent.js +115 -0
  291. package/script/lock/mod.d.ts +11 -4
  292. package/script/lock/mod.d.ts.map +1 -1
  293. package/script/lock/mod.js +17 -2
  294. package/script/lock/model.d.ts +24 -1
  295. package/script/lock/model.d.ts.map +1 -1
  296. package/script/lock/parser.d.ts.map +1 -1
  297. package/script/lock/parser.js +32 -0
  298. package/script/lock/pin_assurance.d.ts +20 -0
  299. package/script/lock/pin_assurance.d.ts.map +1 -0
  300. package/script/lock/pin_assurance.js +37 -0
  301. package/script/lock/resolve.d.ts +8 -17
  302. package/script/lock/resolve.d.ts.map +1 -1
  303. package/script/lock/resolve.js +7 -68
  304. package/script/lock/serializer.d.ts.map +1 -1
  305. package/script/lock/serializer.js +23 -0
  306. package/script/lock/upstream_common.d.ts +29 -0
  307. package/script/lock/upstream_common.d.ts.map +1 -0
  308. package/script/lock/upstream_common.js +42 -0
  309. package/script/lock/upstream_deps.d.ts +63 -0
  310. package/script/lock/upstream_deps.d.ts.map +1 -0
  311. package/script/lock/upstream_deps.js +175 -0
  312. package/script/lock/upstream_refs.d.ts +69 -0
  313. package/script/lock/upstream_refs.d.ts.map +1 -0
  314. package/script/lock/upstream_refs.js +244 -0
  315. package/script/mod.d.ts +23 -11
  316. package/script/mod.d.ts.map +1 -1
  317. package/script/mod.js +55 -7
  318. package/script/model/mod.d.ts +114 -28
  319. package/script/model/mod.d.ts.map +1 -1
  320. package/script/model/mod.js +81 -14
  321. package/script/model/profile.d.ts +13 -0
  322. package/script/model/profile.d.ts.map +1 -1
  323. package/script/parser/code_regions.d.ts +29 -0
  324. package/script/parser/code_regions.d.ts.map +1 -0
  325. package/script/parser/code_regions.js +41 -0
  326. package/script/parser/markdown.d.ts.map +1 -1
  327. package/script/parser/markdown.js +108 -89
  328. package/script/parser/mod.d.ts.map +1 -1
  329. package/script/parser/mod.js +7 -1
  330. package/script/parser/translate.d.ts.map +1 -1
  331. package/script/parser/translate.js +5 -0
  332. package/script/profile/manifest.d.ts.map +1 -1
  333. package/script/profile/manifest.js +20 -3
  334. package/script/profile/merge.js +7 -0
  335. package/script/refs/mod.d.ts.map +1 -1
  336. package/script/refs/mod.js +7 -18
  337. package/script/reporter/mod.d.ts +11 -0
  338. package/script/reporter/mod.d.ts.map +1 -1
  339. package/script/reporter/mod.js +19 -8
  340. package/script/typl/assemble.d.ts +53 -0
  341. package/script/typl/assemble.d.ts.map +1 -0
  342. package/script/typl/assemble.js +241 -0
  343. package/script/typl/ast.d.ts +7 -1
  344. package/script/typl/ast.d.ts.map +1 -1
  345. package/script/typl/ast.js +3 -0
  346. package/script/typl/bullet.d.ts +9 -7
  347. package/script/typl/bullet.d.ts.map +1 -1
  348. package/script/typl/bullet.js +6 -4
  349. package/script/typl/citations.d.ts +27 -0
  350. package/script/typl/citations.d.ts.map +1 -0
  351. package/script/typl/citations.js +20 -0
  352. package/script/typl/diagnostics.d.ts +2 -2
  353. package/script/typl/diagnostics.d.ts.map +1 -1
  354. package/script/typl/diagnostics.js +18 -0
  355. package/script/typl/grammar.d.ts.map +1 -1
  356. package/script/typl/grammar.js +6 -0
  357. package/script/typl/lexer.d.ts.map +1 -1
  358. package/script/typl/lexer.js +25 -4
  359. package/script/typl/mod.d.ts +8 -2
  360. package/script/typl/mod.d.ts.map +1 -1
  361. package/script/typl/mod.js +14 -2
  362. package/script/typl/recognize.js +2 -2
  363. package/script/typl/registry.d.ts +1 -1
  364. package/script/typl/resolve.d.ts +31 -0
  365. package/script/typl/resolve.d.ts.map +1 -0
  366. package/script/typl/resolve.js +33 -0
  367. package/script/typl/table.d.ts +52 -0
  368. package/script/typl/table.d.ts.map +1 -0
  369. package/script/typl/table.js +75 -0
  370. package/script/typl/validator.d.ts +24 -5
  371. package/script/typl/validator.d.ts.map +1 -1
  372. package/script/typl/validator.js +55 -75
  373. package/script/upstream/mod.d.ts +45 -0
  374. package/script/upstream/mod.d.ts.map +1 -0
  375. package/script/upstream/mod.js +101 -0
  376. package/script/upstream/project.d.ts +33 -0
  377. package/script/upstream/project.d.ts.map +1 -0
  378. package/script/upstream/project.js +41 -0
  379. package/script/upstream/refs.d.ts +23 -0
  380. package/script/upstream/refs.d.ts.map +1 -0
  381. package/script/upstream/refs.js +74 -0
  382. package/script/util/fence.d.ts +20 -29
  383. package/script/util/fence.d.ts.map +1 -1
  384. package/script/util/fence.js +47 -54
  385. package/script/util/modals.d.ts +6 -0
  386. package/script/util/modals.d.ts.map +1 -1
  387. package/script/util/modals.js +38 -0
  388. package/script/util/paths.d.ts +14 -0
  389. package/script/util/paths.d.ts.map +1 -0
  390. package/script/util/paths.js +25 -0
  391. package/script/uxil/assemble.d.ts +38 -0
  392. package/script/uxil/assemble.d.ts.map +1 -0
  393. package/script/uxil/assemble.js +272 -0
  394. package/script/uxil/ast.d.ts +63 -0
  395. package/script/uxil/ast.d.ts.map +1 -0
  396. package/script/uxil/ast.js +10 -0
  397. package/script/uxil/citations.d.ts +27 -0
  398. package/script/uxil/citations.d.ts.map +1 -0
  399. package/script/uxil/citations.js +29 -0
  400. package/script/uxil/diagnostics.d.ts +39 -0
  401. package/script/uxil/diagnostics.d.ts.map +1 -0
  402. package/script/uxil/diagnostics.js +140 -0
  403. package/script/uxil/grammar.d.ts +72 -0
  404. package/script/uxil/grammar.d.ts.map +1 -0
  405. package/script/uxil/grammar.js +511 -0
  406. package/script/uxil/lexer.d.ts +23 -0
  407. package/script/uxil/lexer.d.ts.map +1 -0
  408. package/script/uxil/lexer.js +61 -0
  409. package/script/uxil/mod.d.ts +32 -0
  410. package/script/uxil/mod.d.ts.map +1 -0
  411. package/script/uxil/mod.js +37 -0
  412. package/script/uxil/projection.d.ts +40 -0
  413. package/script/uxil/projection.d.ts.map +1 -0
  414. package/script/uxil/projection.js +44 -0
  415. package/script/uxil/recognize.d.ts +16 -0
  416. package/script/uxil/recognize.d.ts.map +1 -0
  417. package/script/uxil/recognize.js +31 -0
  418. package/script/uxil/registry.d.ts +37 -0
  419. package/script/uxil/registry.d.ts.map +1 -0
  420. package/script/uxil/registry.js +32 -0
  421. package/script/uxil/surfaces.d.ts +36 -0
  422. package/script/uxil/surfaces.d.ts.map +1 -0
  423. package/script/uxil/surfaces.js +39 -0
  424. package/script/uxil/validator.d.ts +36 -0
  425. package/script/uxil/validator.d.ts.map +1 -0
  426. package/script/uxil/validator.js +142 -0
  427. package/script/uxil/vocab.d.ts +33 -0
  428. package/script/uxil/vocab.d.ts.map +1 -0
  429. package/script/uxil/vocab.js +41 -0
  430. package/script/validator/body_blocks.d.ts +2 -1
  431. package/script/validator/body_blocks.d.ts.map +1 -1
  432. package/script/validator/body_blocks.js +80 -2
  433. package/script/validator/caption_convention.d.ts +2 -1
  434. package/script/validator/caption_convention.d.ts.map +1 -1
  435. package/script/validator/caption_convention.js +2 -1
  436. package/script/validator/corpus.d.ts +6 -0
  437. package/script/validator/corpus.d.ts.map +1 -1
  438. package/script/validator/corpus.js +55 -19
  439. package/script/validator/discipline.d.ts +6 -4
  440. package/script/validator/discipline.d.ts.map +1 -1
  441. package/script/validator/discipline.js +6 -4
  442. package/script/validator/mod.d.ts +1 -1
  443. package/script/validator/mod.d.ts.map +1 -1
  444. package/script/validator/mod.js +29 -15
  445. package/script/validator/pipeline.d.ts +11 -1
  446. package/script/validator/pipeline.d.ts.map +1 -1
  447. package/script/validator/pipeline.js +75 -22
  448. package/script/validator/trace_types.d.ts +9 -2
  449. package/script/validator/trace_types.d.ts.map +1 -1
  450. package/script/validator/trace_types.js +20 -4
  451. package/script/validator/traceability.d.ts +15 -3
  452. package/script/validator/traceability.d.ts.map +1 -1
  453. package/script/validator/traceability.js +38 -3
  454. package/script/validator/types.d.ts.map +1 -1
  455. package/script/validator/types.js +10 -0
  456. package/script/validator/uxil_family.d.ts +43 -0
  457. package/script/validator/uxil_family.d.ts.map +1 -0
  458. package/script/validator/uxil_family.js +56 -0
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @module uxil/projection
3
+ *
4
+ * Deterministic machine projection of a {@linkcode UxRegistry} (S8 #726):
5
+ * the seam downstream codegen (and the S11 payload bridge) build on. Pure
6
+ * transform — no timestamps or run metadata, every collection sorted by a
7
+ * stable key so `projectUxRegistry(registry)` is byte-identical across
8
+ * runs. A duplicated surface id uses only its first-declared record
9
+ * (mirrors the first-declaration-wins convention used elsewhere in S8);
10
+ * the duplicate itself is a separate validator concern (UXIL-015).
11
+ */
12
+ import type { UxRegistry } from "./registry.js";
13
+ /** One projected interaction element. */
14
+ export interface ProjectedElement {
15
+ readonly name: string;
16
+ readonly verbs: readonly string[];
17
+ readonly keyTemplate: string | null;
18
+ readonly nav: string | null;
19
+ readonly states: readonly string[];
20
+ }
21
+ /** One projected surface. */
22
+ export interface ProjectedSurface {
23
+ readonly id: string;
24
+ readonly kind: string;
25
+ readonly states: readonly string[];
26
+ readonly parent: string | null;
27
+ readonly elements: readonly ProjectedElement[];
28
+ }
29
+ /** The full deterministic projection. */
30
+ export interface UxProjection {
31
+ readonly surfaces: readonly ProjectedSurface[];
32
+ }
33
+ /**
34
+ * Project a {@linkcode UxRegistry} into a deterministic, JSON-serialisable
35
+ * manifest. Surfaces sorted by id; elements within a surface sorted by
36
+ * name; states sorted; verbs kept in declaration order (still
37
+ * deterministic — load-bearing for compound controls).
38
+ */
39
+ export declare function projectUxRegistry(registry: UxRegistry): UxProjection;
40
+ //# sourceMappingURL=projection.d.ts.map
@@ -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,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.projectUxRegistry = projectUxRegistry;
4
+ function projectElement(element) {
5
+ return {
6
+ name: element.name,
7
+ verbs: element.verbs,
8
+ // keyTemplate is always the "template" form — parseElementBullet only
9
+ // ever assigns a UxKey here when it parsed as `{name}` (grammar.ts's K1
10
+ // clause), never a concrete key.
11
+ keyTemplate: element.keyTemplate?.kind === "template"
12
+ ? element.keyTemplate.name
13
+ : null,
14
+ nav: element.navTarget ?? null,
15
+ states: [...element.states].sort(),
16
+ };
17
+ }
18
+ /**
19
+ * Project a {@linkcode UxRegistry} into a deterministic, JSON-serialisable
20
+ * manifest. Surfaces sorted by id; elements within a surface sorted by
21
+ * name; states sorted; verbs kept in declaration order (still
22
+ * deterministic — load-bearing for compound controls).
23
+ */
24
+ function projectUxRegistry(registry) {
25
+ const paths = [...registry.surfaces.keys()].sort();
26
+ const surfaces = paths.map((path) => {
27
+ const record = registry.surfaces.get(path)[0]; // first declaration wins
28
+ const dot = path.lastIndexOf(".");
29
+ const parentPath = dot < 0 ? undefined : path.slice(0, dot);
30
+ const parent = parentPath !== undefined && registry.surfaces.has(parentPath)
31
+ ? parentPath
32
+ : null;
33
+ return {
34
+ id: path,
35
+ kind: record.kind,
36
+ states: [...record.states].sort(),
37
+ parent,
38
+ elements: [...record.elements]
39
+ .sort((a, b) => a.name.localeCompare(b.name))
40
+ .map(projectElement),
41
+ };
42
+ });
43
+ return { surfaces };
44
+ }
@@ -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,31 @@
1
+ "use strict";
2
+ /**
3
+ * @module uxil/recognize
4
+ *
5
+ * Form-classification predicate — the DSL-specific routing S8's surface walk
6
+ * uses to send a code span to the right parser. Pure string inspection on the
7
+ * span-inner text (the caller strips backticks). A citation ref
8
+ * (`ux:surface/element…`) or non-uxil text returns `undefined`.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.classifyUxilForm = classifyUxilForm;
12
+ /**
13
+ * Classify a uxil code span. `/`-led → element; `.`-led → child surface; a
14
+ * surface followed by a `:` kind *before* any `/` → root declaration.
15
+ * Everything else (a citation ref, plain prose) → `undefined`.
16
+ */
17
+ function classifyUxilForm(spanText) {
18
+ const t = spanText.trim();
19
+ if (t.startsWith("/"))
20
+ return "element";
21
+ if (t.startsWith("."))
22
+ return "child";
23
+ const body = t.startsWith("ux:") ? t.slice(3) : t;
24
+ const slash = body.indexOf("/");
25
+ const colon = body.indexOf(":");
26
+ // A `:` before any `/` is the kind clause of a root declaration; a `:` after
27
+ // a `/` is a ref key (a citation), and no `:` at all is a bare citation.
28
+ if (colon >= 0 && (slash < 0 || colon < slash))
29
+ return "root";
30
+ return undefined;
31
+ }
@@ -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,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildUxRegistry = buildUxRegistry;
4
+ const assemble_js_1 = require("./assemble.js");
5
+ /**
6
+ * Build the corpus uxil registry from the entries. Entries whose assembly
7
+ * yields no surfaces are skipped. Source order is preserved within each
8
+ * path's list (first declaration first).
9
+ */
10
+ function buildUxRegistry(entries) {
11
+ const surfaces = new Map();
12
+ for (const entry of entries) {
13
+ const tree = (0, assemble_js_1.assembleUxSurface)(entry);
14
+ for (const surface of tree.surfaces) {
15
+ const record = {
16
+ path: surface.path,
17
+ kind: surface.kind,
18
+ states: surface.states,
19
+ owningEntryDisplayId: entry.displayId,
20
+ owningEntryFile: entry.location.file,
21
+ elements: surface.elements,
22
+ location: surface.location,
23
+ };
24
+ const list = surfaces.get(surface.path);
25
+ if (list)
26
+ list.push(record);
27
+ else
28
+ surfaces.set(surface.path, [record]);
29
+ }
30
+ }
31
+ return { surfaces };
32
+ }
@@ -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,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripUxilLeadingSpan = stripUxilLeadingSpan;
4
+ exports.extractUxRootSpans = extractUxRootSpans;
5
+ exports.extractUxBullets = extractUxBullets;
6
+ const mod_js_1 = require("../decl/mod.js");
7
+ const recognize_js_1 = require("./recognize.js");
8
+ /**
9
+ * Extract the leading inline-code span's inner text from a bullet
10
+ * paragraph, backticks stripped, ignoring any trailing prose. Returns
11
+ * `undefined` when the paragraph does not begin with a (closed) code
12
+ * span. Handles both single- and double-backtick delimiters.
13
+ */
14
+ function stripUxilLeadingSpan(text) {
15
+ const t = text.replace(/^\s+/, "");
16
+ if (t.startsWith("``")) {
17
+ const end = t.indexOf("``", 2);
18
+ return end < 0 ? undefined : t.slice(2, end);
19
+ }
20
+ if (t.startsWith("`")) {
21
+ const end = t.indexOf("`", 1);
22
+ return end < 0 ? undefined : t.slice(1, end);
23
+ }
24
+ return undefined;
25
+ }
26
+ /** Inline code spans whose text is a uxil root declaration. */
27
+ function extractUxRootSpans(bodyTokens) {
28
+ return (0, mod_js_1.extractInlineDeclarations)(bodyTokens, (text) => (0, recognize_js_1.classifyUxilForm)(text) === "root");
29
+ }
30
+ /** Bullet declarations (element or child surface), with parent links. */
31
+ function extractUxBullets(blocks) {
32
+ return (0, mod_js_1.extractNestedBulletDeclarations)(blocks, (text) => {
33
+ const span = stripUxilLeadingSpan(text);
34
+ if (span === undefined)
35
+ return false;
36
+ const form = (0, recognize_js_1.classifyUxilForm)(span);
37
+ return form === "element" || form === "child";
38
+ });
39
+ }
@@ -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,142 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateUxil = validateUxil;
4
+ const assemble_js_1 = require("./assemble.js");
5
+ const citations_js_1 = require("./citations.js");
6
+ const mod_js_1 = require("../decl/mod.js");
7
+ const diagnostics_js_1 = require("./diagnostics.js");
8
+ const registry_js_1 = require("./registry.js");
9
+ const vocab_js_1 = require("./vocab.js");
10
+ /**
11
+ * Validate the uxil declarations across all entries: per-entry structural
12
+ * and vocabulary checks (Pass 1), corpus structural checks over the
13
+ * registry (Pass 2), and citation resolution (Pass 3). Returns the built
14
+ * registry even when diagnostics are present, so callers can still use it
15
+ * for navigation/projection.
16
+ */
17
+ function validateUxil(entries, opts = {}) {
18
+ const diagnostics = [];
19
+ // ── Pass 1: per-entry structural + vocabulary ────────────────────────────
20
+ for (const entry of entries) {
21
+ const tree = (0, assemble_js_1.assembleUxSurface)(entry);
22
+ diagnostics.push(...tree.diagnostics);
23
+ for (const surface of tree.surfaces) {
24
+ const kindInfo = (0, vocab_js_1.isKnownKind)(surface.kind)
25
+ ? vocab_js_1.UX_KINDS.get(surface.kind)
26
+ : undefined;
27
+ if (kindInfo === undefined) {
28
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-009", { kind: surface.kind }, surface.location));
29
+ }
30
+ else if (!kindInfo.stateful && surface.states.length > 0) {
31
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-013", { kind: surface.kind }, surface.location));
32
+ }
33
+ for (const element of surface.elements) {
34
+ for (const verb of element.verbs) {
35
+ if (!(0, vocab_js_1.isKnownVerb)(verb)) {
36
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-010", { verb }, element.location));
37
+ }
38
+ }
39
+ if (element.verbs.includes("observe") && element.verbs.length > 1) {
40
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-014", { element: element.name }, element.location));
41
+ }
42
+ // UXIL-025 (#727): 'observe' anchors a visibility assertion — the
43
+ // issue's "visibility of a non-screen". Only when the kind is known
44
+ // (an unknown kind is already UXIL-009; don't cascade).
45
+ if (kindInfo !== undefined && !kindInfo.visual &&
46
+ element.verbs.includes("observe")) {
47
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-025", {
48
+ element: element.name,
49
+ surface: surface.path,
50
+ kind: surface.kind,
51
+ }, element.location));
52
+ }
53
+ // UXIL-026 (#727): vocab's requiresNavTarget, previously unenforced.
54
+ if (element.verbs.includes("navigate") && element.navTarget === undefined) {
55
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-026", { element: element.name }, element.location));
56
+ }
57
+ }
58
+ }
59
+ }
60
+ // ── Pass 2: corpus structural, over the registry ─────────────────────────
61
+ const registry = (0, registry_js_1.buildUxRegistry)(entries);
62
+ for (const { first, duplicates } of (0, mod_js_1.findDuplicateDeclarations)(registry.surfaces)) {
63
+ for (const dup of duplicates) {
64
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-015", {
65
+ surface: dup.path,
66
+ otherFile: first.owningEntryFile,
67
+ otherLine: first.location.line,
68
+ }, dup.location));
69
+ }
70
+ }
71
+ for (const [path, records] of registry.surfaces) {
72
+ const dot = path.lastIndexOf(".");
73
+ if (dot < 0)
74
+ continue;
75
+ const parent = path.slice(0, dot);
76
+ // A single-segment parent (e.g. "media" in "media.home") is an
77
+ // ordinary namespace prefix a root can use freely — it is never
78
+ // itself required to be a separately declared surface (the design's
79
+ // own worked examples name roots this way: "media.home",
80
+ // "controls.hvac"). Only a surface nested 2+ levels deep, whose
81
+ // parent is itself dotted, plausibly represents a promoted child
82
+ // surface (design §6) whose intermediate ancestor is expected to
83
+ // exist somewhere in the corpus. A genuinely-nested same-entry child
84
+ // never reaches this branch — assembleUxSurface always registers its
85
+ // resolved ancestor alongside it — so this only ever fires across
86
+ // entries, exactly the promoted-surface scenario it targets.
87
+ if (!parent.includes("."))
88
+ continue;
89
+ if (registry.surfaces.has(parent))
90
+ continue;
91
+ for (const record of records) {
92
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-016", { surface: path, parent }, record.location));
93
+ }
94
+ }
95
+ for (const records of registry.surfaces.values()) {
96
+ for (const record of records) {
97
+ for (const element of record.elements) {
98
+ if (element.navTarget === undefined)
99
+ continue;
100
+ const targets = registry.surfaces.get(element.navTarget);
101
+ const targetKind = targets?.[0]?.kind;
102
+ const navigable = targetKind !== undefined &&
103
+ vocab_js_1.UX_KINDS.get(targetKind)?.navigable === true;
104
+ if (!navigable) {
105
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-017", { target: element.navTarget }, element.location));
106
+ }
107
+ }
108
+ }
109
+ }
110
+ // ── Pass 3: citation resolution ──────────────────────────────────────────
111
+ for (const entry of opts.citationEntries ?? entries) {
112
+ for (const citation of (0, citations_js_1.extractUxCitations)(entry.bodyTokens)) {
113
+ const { ref, location } = citation;
114
+ const surfacePath = ref.surface.join(".");
115
+ const records = registry.surfaces.get(surfacePath);
116
+ if (!records || records.length === 0) {
117
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-018", { surface: surfacePath }, location));
118
+ continue;
119
+ }
120
+ // First-declaration-wins, matching the navigate-resolution check above.
121
+ const surface = records[0];
122
+ if (ref.state !== undefined && !surface.states.includes(ref.state)) {
123
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-021", { state: ref.state, surface: surfacePath }, location));
124
+ }
125
+ if (ref.element !== undefined) {
126
+ const element = surface.elements.find((e) => e.name === ref.element);
127
+ if (!element) {
128
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-019", { element: ref.element, surface: surfacePath }, location));
129
+ }
130
+ else {
131
+ if (ref.verb !== undefined && !element.verbs.includes(ref.verb)) {
132
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-020", { verb: ref.verb, element: element.name }, location));
133
+ }
134
+ if (ref.key?.kind === "concrete" && element.keyTemplate !== undefined) {
135
+ diagnostics.push((0, diagnostics_js_1.uxilDiagnosticAt)("UXIL-022", { element: element.name }, location));
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ return { registry, diagnostics };
142
+ }
@@ -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,41 @@
1
+ "use strict";
2
+ /**
3
+ * @module uxil/vocab
4
+ *
5
+ * The two closed, core-owned uxil vocabularies (design §2/§3): three surface
6
+ * kinds and eleven interaction verbs, each with the semantics diagnostics and
7
+ * codegen rely on. Extension is a markspec release decision — not a profile
8
+ * concern (ADR-009).
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.UX_VERBS = exports.UX_KINDS = void 0;
12
+ exports.isKnownKind = isKnownKind;
13
+ exports.isKnownVerb = isKnownVerb;
14
+ /** The three closed, core-owned surface kinds. */
15
+ exports.UX_KINDS = new Map([
16
+ ["screen", { navigable: true, stateful: true, visual: true }],
17
+ ["panel", { navigable: false, stateful: false, visual: true }],
18
+ ["agent", { navigable: false, stateful: true, visual: false }],
19
+ ]);
20
+ /** The eleven closed, core-owned interaction verbs. */
21
+ exports.UX_VERBS = new Map([
22
+ ["activate", { requiresNavTarget: false, exclusive: false }],
23
+ ["toggle", { requiresNavTarget: false, exclusive: false }],
24
+ ["select", { requiresNavTarget: false, exclusive: false }],
25
+ ["adjust", { requiresNavTarget: false, exclusive: false }],
26
+ ["input", { requiresNavTarget: false, exclusive: false }],
27
+ ["scroll", { requiresNavTarget: false, exclusive: false }],
28
+ ["drag", { requiresNavTarget: false, exclusive: false }],
29
+ ["navigate", { requiresNavTarget: true, exclusive: false }],
30
+ ["dismiss", { requiresNavTarget: false, exclusive: false }],
31
+ ["ask", { requiresNavTarget: false, exclusive: false }],
32
+ ["observe", { requiresNavTarget: false, exclusive: true }],
33
+ ]);
34
+ /** True when `kind` is one of the three closed surface kinds. */
35
+ function isKnownKind(kind) {
36
+ return exports.UX_KINDS.has(kind);
37
+ }
38
+ /** True when `verb` is one of the eleven closed interaction verbs. */
39
+ function isKnownVerb(verb) {
40
+ return exports.UX_VERBS.has(verb);
41
+ }
@@ -20,7 +20,8 @@
20
20
  * - Inline HTML — remains inside `ParagraphNode.content.text` (remark
21
21
  * does not extract inline HTML nodes into block-level nodes); each
22
22
  * paragraph's text is scanned line-by-line using the same regex
23
- * approach as the old walkProseLines path, but bounded to prose-only
23
+ * approach as the old walkProseLines path (with inline code spans
24
+ * masked out first — they are literal text, never HTML), bounded to prose-only
24
25
  * nodes (code/feature/math blocks are automatically excluded because
25
26
  * the builder does not emit prose-bearing nodes for verbatim content).
26
27
  *
@@ -1 +1 @@
1
- {"version":3,"file":"body_blocks.d.ts","sourceRoot":"","sources":["../../src/validator/body_blocks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AA2LzD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,UAAU,EAAE,CAsBtE"}
1
+ {"version":3,"file":"body_blocks.d.ts","sourceRoot":"","sources":["../../src/validator/body_blocks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AA0QzD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,UAAU,EAAE,CAsBtE"}