@agentshouse/mdmodel 0.1.0-cd90851746292 → 0.1.0-cdaa2262b2988

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 (599) hide show
  1. package/API.md +271 -239
  2. package/README.md +28 -25
  3. package/dist/body.d.ts +85 -0
  4. package/dist/body.d.ts.map +1 -0
  5. package/dist/body.js +1083 -0
  6. package/dist/built-in.d.ts +4 -0
  7. package/dist/built-in.d.ts.map +1 -0
  8. package/dist/built-in.js +28 -0
  9. package/dist/definition.d.ts +28 -11
  10. package/dist/definition.d.ts.map +1 -1
  11. package/dist/definition.js +266 -137
  12. package/dist/document.d.ts +16 -8
  13. package/dist/document.d.ts.map +1 -1
  14. package/dist/document.js +792 -140
  15. package/dist/event.d.ts +74 -0
  16. package/dist/event.d.ts.map +1 -0
  17. package/dist/event.js +201 -0
  18. package/dist/facts.d.ts +15 -0
  19. package/dist/facts.d.ts.map +1 -0
  20. package/dist/facts.js +45 -0
  21. package/dist/fields.d.ts +1 -1
  22. package/dist/fields.d.ts.map +1 -1
  23. package/dist/fields.js +2 -2
  24. package/dist/folders.d.ts +5 -0
  25. package/dist/folders.d.ts.map +1 -0
  26. package/dist/folders.js +19 -0
  27. package/dist/form.d.ts +4 -0
  28. package/dist/form.d.ts.map +1 -0
  29. package/dist/form.js +153 -0
  30. package/dist/house-model.d.ts +993 -0
  31. package/dist/house-model.d.ts.map +1 -0
  32. package/dist/house-model.js +543 -0
  33. package/dist/house-references/crockford.d.ts +4 -0
  34. package/dist/house-references/crockford.d.ts.map +1 -0
  35. package/dist/house-references/crockford.js +3 -0
  36. package/dist/house-references/patterns.d.ts +13 -0
  37. package/dist/house-references/patterns.d.ts.map +1 -0
  38. package/dist/house-references/patterns.js +20 -0
  39. package/dist/index.d.ts +45 -17
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +28 -11
  42. package/dist/indexed.d.ts +10 -0
  43. package/dist/indexed.d.ts.map +1 -0
  44. package/dist/indexed.js +63 -0
  45. package/dist/kinds.d.ts +26 -0
  46. package/dist/kinds.d.ts.map +1 -0
  47. package/dist/kinds.js +218 -0
  48. package/dist/markdown.d.ts +71 -0
  49. package/dist/markdown.d.ts.map +1 -0
  50. package/dist/markdown.js +232 -0
  51. package/dist/media-type.d.ts +72 -0
  52. package/dist/media-type.d.ts.map +1 -0
  53. package/dist/media-type.js +157 -0
  54. package/dist/moment.d.ts +9 -0
  55. package/dist/moment.d.ts.map +1 -0
  56. package/dist/moment.js +40 -0
  57. package/dist/not-ready.d.ts +2 -0
  58. package/dist/not-ready.d.ts.map +1 -0
  59. package/dist/not-ready.js +5 -0
  60. package/dist/paths.d.ts +16 -1
  61. package/dist/paths.d.ts.map +1 -1
  62. package/dist/paths.js +107 -22
  63. package/dist/pattern.d.ts.map +1 -1
  64. package/dist/pattern.js +4 -3
  65. package/dist/query/language.d.ts +257 -0
  66. package/dist/query/language.d.ts.map +1 -0
  67. package/dist/query/language.js +621 -0
  68. package/dist/query/match.d.ts +14 -0
  69. package/dist/query/match.d.ts.map +1 -0
  70. package/dist/query/match.js +129 -0
  71. package/dist/query/rows.d.ts +37 -0
  72. package/dist/query/rows.d.ts.map +1 -0
  73. package/dist/query/rows.js +190 -0
  74. package/dist/query/sql.d.ts +48 -0
  75. package/dist/query/sql.d.ts.map +1 -0
  76. package/dist/query/sql.js +304 -0
  77. package/dist/query/walk.d.ts +73 -0
  78. package/dist/query/walk.d.ts.map +1 -0
  79. package/dist/query/walk.js +277 -0
  80. package/dist/references.d.ts +2 -2
  81. package/dist/references.d.ts.map +1 -1
  82. package/dist/references.js +1 -1
  83. package/dist/refuse.d.ts +1 -0
  84. package/dist/refuse.d.ts.map +1 -1
  85. package/dist/refuse.js +1 -0
  86. package/dist/reserved.d.ts +6 -0
  87. package/dist/reserved.d.ts.map +1 -0
  88. package/dist/reserved.js +30 -0
  89. package/dist/room-types.d.ts +8 -0
  90. package/dist/room-types.d.ts.map +1 -0
  91. package/dist/room-types.js +142 -0
  92. package/dist/schema.d.ts +1 -3
  93. package/dist/schema.d.ts.map +1 -1
  94. package/dist/schema.js +9 -73
  95. package/dist/types.d.ts +32 -38
  96. package/dist/types.d.ts.map +1 -1
  97. package/dist/validate.d.ts +16 -8
  98. package/dist/validate.d.ts.map +1 -1
  99. package/dist/validate.js +300 -194
  100. package/dist/view.d.ts +5 -0
  101. package/dist/view.d.ts.map +1 -0
  102. package/dist/view.js +27 -0
  103. package/dist/yaml.d.ts +7 -5
  104. package/dist/yaml.d.ts.map +1 -1
  105. package/dist/yaml.js +158 -44
  106. package/fixtures/README.md +110 -71
  107. package/fixtures/cases/absent-link-dangles/library/item.md +1 -1
  108. package/fixtures/cases/absent-link-dangles/schema.md +7 -0
  109. package/fixtures/cases/absent-optional-field/library/companies/acme.md +1 -1
  110. package/fixtures/cases/absent-optional-field/library/deals/lead.md +3 -3
  111. package/fixtures/cases/{date-time-format/schema.yaml → absent-optional-field/schema.md} +12 -11
  112. package/fixtures/cases/absolute-link/library/item.md +1 -1
  113. package/fixtures/cases/absolute-link/schema.md +7 -0
  114. package/fixtures/cases/attachment-reference-any-file/library/companies/acme.md +1 -1
  115. package/fixtures/cases/attachment-reference-any-file/library/deals/renewal.md +13 -10
  116. package/fixtures/cases/attachment-reference-any-file/library/places/depot.md +1 -1
  117. package/fixtures/cases/attachment-reference-any-file/library/products/seats.md +1 -1
  118. package/fixtures/cases/attachment-reference-any-file/library/products/support.md +1 -1
  119. package/fixtures/cases/attachment-reference-any-file/{schema.yaml → schema.md} +2 -0
  120. package/fixtures/cases/attachment-reference-dangles/library/companies/acme.md +1 -1
  121. package/fixtures/cases/attachment-reference-dangles/library/deals/renewal.md +13 -10
  122. package/fixtures/cases/attachment-reference-dangles/library/places/depot.md +1 -1
  123. package/fixtures/cases/attachment-reference-dangles/library/products/seats.md +1 -1
  124. package/fixtures/cases/attachment-reference-dangles/library/products/support.md +1 -1
  125. package/fixtures/cases/attachment-reference-dangles/{schema.yaml → schema.md} +2 -0
  126. package/fixtures/cases/attachment-reference-outside/expected.json +2 -1
  127. package/fixtures/cases/attachment-reference-outside/library/companies/acme.md +1 -1
  128. package/fixtures/cases/attachment-reference-outside/library/deals/renewal.md +13 -10
  129. package/fixtures/cases/attachment-reference-outside/library/places/depot.md +1 -1
  130. package/fixtures/cases/attachment-reference-outside/library/products/seats.md +1 -1
  131. package/fixtures/cases/attachment-reference-outside/library/products/support.md +1 -1
  132. package/fixtures/cases/attachment-reference-outside/{schema.yaml → schema.md} +2 -0
  133. package/fixtures/cases/binary-any-reference/expected.json +2 -1
  134. package/fixtures/cases/binary-any-reference/library/notes/draft.md +1 -1
  135. package/fixtures/cases/binary-any-reference/{schema.yaml → schema.md} +2 -0
  136. package/fixtures/cases/binary-document-collision/{schema.yaml → schema.md} +2 -0
  137. package/fixtures/cases/binary-image-dangles/{schema.yaml → schema.md} +2 -0
  138. package/fixtures/cases/binary-link-dangles/{schema.yaml → schema.md} +2 -0
  139. package/fixtures/cases/binary-link-outside-collection/{schema.yaml → schema.md} +2 -0
  140. package/fixtures/cases/binary-prototype-reference/expected.json +2 -1
  141. package/fixtures/cases/binary-prototype-reference/library/notes/draft.md +1 -1
  142. package/fixtures/cases/binary-prototype-reference/{schema.yaml → schema.md} +2 -0
  143. package/fixtures/cases/binary-typed-reference/expected.json +2 -1
  144. package/fixtures/cases/binary-typed-reference/library/notes/draft.md +1 -1
  145. package/fixtures/cases/binary-typed-reference/{schema.yaml → schema.md} +2 -0
  146. package/fixtures/cases/block-scalar-frontmatter/library/notes/literal.md +17 -0
  147. package/fixtures/cases/block-scalar-frontmatter/library/skills/notes/SKILL.md +10 -0
  148. package/fixtures/cases/boolean-field/expected.json +2 -1
  149. package/fixtures/cases/boolean-field/library/companies/acme.md +1 -1
  150. package/fixtures/cases/boolean-field/library/deals/renewal.md +49 -24
  151. package/fixtures/cases/{absent-optional-field/schema.yaml → boolean-field/schema.md} +12 -11
  152. package/fixtures/cases/bracketed-link-definition/library/item.md +1 -1
  153. package/fixtures/cases/bracketed-link-definition/schema.md +7 -0
  154. package/fixtures/cases/closed-nested-object/expected.json +2 -1
  155. package/fixtures/cases/closed-nested-object/library/companies/acme.md +1 -1
  156. package/fixtures/cases/closed-nested-object/library/deals/renewal.md +50 -25
  157. package/fixtures/cases/closed-nested-object/{schema.yaml → schema.md} +12 -11
  158. package/fixtures/cases/composed-root-reference/library/a.md +2 -2
  159. package/fixtures/cases/composed-root-reference/{schema.yaml → schema.md} +2 -0
  160. package/fixtures/cases/{conditional-section → conditional-long-text}/expected.json +3 -2
  161. package/fixtures/cases/{conditional-section → conditional-long-text}/library/questions/hosting.md +2 -2
  162. package/fixtures/cases/{conditional-section → conditional-long-text}/library/questions/payments.md +2 -2
  163. package/fixtures/cases/conditional-long-text/schema.md +15 -0
  164. package/fixtures/cases/cross-room-link/library/clients/acme.md +1 -1
  165. package/fixtures/cases/cross-room-link/{schema.yaml → schema.md} +2 -0
  166. package/fixtures/cases/cross-room-reference/library/clients/acme.md +4 -4
  167. package/fixtures/cases/cross-room-reference/{schema.yaml → schema.md} +3 -2
  168. package/fixtures/cases/date-time-format/expected.json +2 -1
  169. package/fixtures/cases/date-time-format/library/companies/acme.md +1 -1
  170. package/fixtures/cases/date-time-format/library/deals/renewal.md +49 -24
  171. package/fixtures/cases/{boolean-field/schema.yaml → date-time-format/schema.md} +12 -11
  172. package/fixtures/cases/declared-binary-links/schema.md +3 -0
  173. package/fixtures/cases/default-unfilled/library/companies/acme.md +1 -1
  174. package/fixtures/cases/default-unfilled/library/deals/renewal.md +47 -22
  175. package/fixtures/cases/default-unfilled/schema.md +57 -0
  176. package/fixtures/cases/defs-pattern/expected.json +2 -1
  177. package/fixtures/cases/defs-pattern/library/companies/acme.md +1 -1
  178. package/fixtures/cases/defs-pattern/library/deals/renewal.md +49 -24
  179. package/fixtures/cases/defs-pattern/schema.md +57 -0
  180. package/fixtures/cases/dependent-rule/library/companies/acme.md +1 -1
  181. package/fixtures/cases/dependent-rule/library/deals/renewal.md +48 -23
  182. package/fixtures/cases/dependent-rule/schema.md +57 -0
  183. package/fixtures/cases/duplicate-link-definition/library/item.md +1 -1
  184. package/fixtures/cases/duplicate-link-definition/schema.md +7 -0
  185. package/fixtures/cases/email-format/expected.json +2 -1
  186. package/fixtures/cases/email-format/library/companies/acme.md +1 -1
  187. package/fixtures/cases/email-format/library/deals/renewal.md +49 -24
  188. package/fixtures/cases/email-format/schema.md +57 -0
  189. package/fixtures/cases/equal-labels/expected.json +5 -0
  190. package/fixtures/cases/equal-labels/schema.md +6 -0
  191. package/fixtures/cases/fenced-link-definition/library/item.md +1 -1
  192. package/fixtures/cases/fenced-link-definition/schema.md +7 -0
  193. package/fixtures/cases/field-enum/expected.json +2 -1
  194. package/fixtures/cases/field-enum/library/item.md +2 -2
  195. package/fixtures/cases/field-enum/schema.md +8 -0
  196. package/fixtures/cases/folder-keeps-a-built-in-type/expected.json +1 -0
  197. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/door.md +3 -0
  198. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/host.md +13 -0
  199. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/map.md +24 -0
  200. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/open.md +13 -0
  201. package/fixtures/cases/folder-keeps-a-built-in-type/schema.md +9 -0
  202. package/fixtures/cases/folder-keeps-a-record/expected.json +1 -0
  203. package/fixtures/cases/folder-keeps-a-record/library/tickets/2026-11-16-d_1.r.md +13 -0
  204. package/fixtures/cases/folder-keeps-a-record/library/tickets/door.md +3 -0
  205. package/fixtures/cases/folder-keeps-a-record/schema.md +9 -0
  206. package/fixtures/cases/folder-names-no-type-of-the-schema/expected.json +5 -0
  207. package/fixtures/cases/folder-names-no-type-of-the-schema/schema.md +7 -0
  208. package/fixtures/cases/folder-nearer-entry-types-a-document/expected.json +6 -0
  209. package/fixtures/cases/folder-nearer-entry-types-a-document/library/tickets/archive/2025/old.md +1 -0
  210. package/fixtures/cases/folder-nearer-entry-types-a-document/schema.md +15 -0
  211. package/fixtures/cases/folder-refuses-a-declared-any/expected.json +6 -0
  212. package/fixtures/cases/folder-refuses-a-declared-any/library/tickets/door.md +5 -0
  213. package/fixtures/cases/folder-refuses-a-declared-any/schema.md +9 -0
  214. package/fixtures/cases/folder-refuses-another-declared-type/expected.json +6 -0
  215. package/fixtures/cases/folder-refuses-another-declared-type/library/tickets/door.md +5 -0
  216. package/fixtures/cases/folder-refuses-another-declared-type/schema.md +12 -0
  217. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/expected.json +1 -0
  218. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/library/notes/plan.md +7 -0
  219. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/library/tickets/door.md +3 -0
  220. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/library/tickets/gate.md +7 -0
  221. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/schema.md +13 -0
  222. package/fixtures/cases/folder-types-a-document-in-a-folder-below-it/expected.json +6 -0
  223. package/fixtures/cases/folder-types-a-document-in-a-folder-below-it/library/tickets/2026/gate.md +1 -0
  224. package/fixtures/cases/folder-types-a-document-in-a-folder-below-it/schema.md +9 -0
  225. package/fixtures/cases/folder-types-a-document-that-names-no-type/context.json +1 -0
  226. package/fixtures/cases/folder-types-a-document-that-names-no-type/expected.json +7 -0
  227. package/fixtures/cases/folder-types-a-document-that-names-no-type/library/tickets/door.md +3 -0
  228. package/fixtures/cases/folder-types-a-document-that-names-no-type/schema.md +9 -0
  229. package/fixtures/cases/folder-under-a-reserved-name/context.json +1 -0
  230. package/fixtures/cases/folder-under-a-reserved-name/expected.json +5 -0
  231. package/fixtures/cases/folder-under-a-reserved-name/schema.md +7 -0
  232. package/fixtures/cases/folder-without-a-trailing-slash/context.json +1 -0
  233. package/fixtures/cases/folder-without-a-trailing-slash/expected.json +5 -0
  234. package/fixtures/cases/folder-without-a-trailing-slash/schema.md +7 -0
  235. package/fixtures/cases/frontmatter-construct/context.json +1 -0
  236. package/fixtures/cases/frontmatter-construct/expected.json +7 -0
  237. package/fixtures/cases/frontmatter-construct/library/note.md +6 -0
  238. package/fixtures/cases/integer-field/expected.json +2 -1
  239. package/fixtures/cases/integer-field/library/companies/acme.md +1 -1
  240. package/fixtures/cases/integer-field/library/deals/renewal.md +49 -24
  241. package/fixtures/cases/integer-field/schema.md +57 -0
  242. package/fixtures/cases/interrupted-link-definition/schema.md +3 -0
  243. package/fixtures/cases/json-schema-constructs/library/companies/acme.md +1 -1
  244. package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +49 -24
  245. package/fixtures/cases/json-schema-constructs/schema.md +57 -0
  246. package/fixtures/cases/labels-in-the-rooms-language/context.json +1 -0
  247. package/fixtures/cases/labels-in-the-rooms-language/expected.json +1 -0
  248. package/fixtures/cases/labels-in-the-rooms-language/library/deals/atlas.md +7 -0
  249. package/fixtures/cases/labels-in-the-rooms-language/schema.md +11 -0
  250. package/fixtures/cases/lazy-list-item/context.json +1 -0
  251. package/fixtures/cases/lazy-list-item/expected.json +3 -0
  252. package/fixtures/cases/lazy-list-item/library/item.md +10 -0
  253. package/fixtures/cases/lazy-list-item/schema.md +5 -0
  254. package/fixtures/cases/link-into-a-reserved-name/context.json +1 -0
  255. package/fixtures/cases/link-into-a-reserved-name/expected.json +5 -0
  256. package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +6 -0
  257. package/fixtures/cases/{unknown-type/schema.yaml → link-into-a-reserved-name/schema.md} +3 -1
  258. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/context.json +1 -0
  259. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/expected.json +5 -0
  260. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/library/notes/b.md +5 -0
  261. package/fixtures/cases/list-item-enum/context.json +1 -0
  262. package/fixtures/cases/list-item-enum/expected.json +7 -0
  263. package/fixtures/cases/list-item-enum/library/task.md +7 -0
  264. package/fixtures/cases/list-item-enum/schema.md +5 -0
  265. package/fixtures/cases/list-item-kind/context.json +1 -0
  266. package/fixtures/cases/list-item-kind/expected.json +7 -0
  267. package/fixtures/cases/list-item-kind/library/task.md +6 -0
  268. package/fixtures/cases/list-item-kind/schema.md +5 -0
  269. package/fixtures/cases/list-items/context.json +1 -0
  270. package/fixtures/cases/list-items/expected.json +1 -0
  271. package/fixtures/cases/list-items/library/page.md +26 -0
  272. package/fixtures/cases/list-items/schema.md +12 -0
  273. package/fixtures/cases/list-of-objects-closed/expected.json +2 -1
  274. package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +1 -1
  275. package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +49 -25
  276. package/fixtures/cases/list-of-objects-closed/schema.md +57 -0
  277. package/fixtures/cases/list-of-objects-item/expected.json +2 -1
  278. package/fixtures/cases/list-of-objects-item/library/companies/acme.md +1 -1
  279. package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +49 -24
  280. package/fixtures/cases/list-of-objects-item/schema.md +57 -0
  281. package/fixtures/cases/list-of-objects-reference/expected.json +2 -1
  282. package/fixtures/cases/list-of-objects-reference/library/companies/acme.md +1 -1
  283. package/fixtures/cases/list-of-objects-reference/library/deals/renewal.md +12 -9
  284. package/fixtures/cases/list-of-objects-reference/library/places/depot.md +1 -1
  285. package/fixtures/cases/list-of-objects-reference/library/products/seats.md +1 -1
  286. package/fixtures/cases/list-of-objects-reference/library/products/support.md +1 -1
  287. package/fixtures/cases/list-of-objects-reference/{schema.yaml → schema.md} +2 -0
  288. package/fixtures/cases/list-reference-path/context.json +1 -0
  289. package/fixtures/cases/list-reference-path/expected.json +7 -0
  290. package/fixtures/cases/list-reference-path/library/page.md +5 -0
  291. package/fixtures/cases/list-reference-path/schema.md +5 -0
  292. package/fixtures/cases/list-reference-type/context.json +1 -0
  293. package/fixtures/cases/list-reference-type/expected.json +7 -0
  294. package/fixtures/cases/list-reference-type/library/page.md +6 -0
  295. package/fixtures/cases/list-reference-type/schema.md +5 -0
  296. package/fixtures/cases/list-size/expected.json +2 -1
  297. package/fixtures/cases/list-size/library/companies/acme.md +1 -1
  298. package/fixtures/cases/list-size/library/deals/renewal.md +51 -24
  299. package/fixtures/cases/list-size/schema.md +57 -0
  300. package/fixtures/cases/long-fence-link-definition/schema.md +3 -0
  301. package/fixtures/cases/long-value-past-six-levels/context.json +1 -0
  302. package/fixtures/cases/long-value-past-six-levels/expected.json +5 -0
  303. package/fixtures/cases/long-value-past-six-levels/schema.md +17 -0
  304. package/fixtures/cases/malformed-definition/{schema.yaml → schema.md} +2 -0
  305. package/fixtures/cases/malformed-list/context.json +1 -0
  306. package/fixtures/cases/malformed-list/expected.json +7 -0
  307. package/fixtures/cases/{structured-section → malformed-list}/library/item.md +1 -1
  308. package/fixtures/cases/malformed-list/schema.md +8 -0
  309. package/fixtures/cases/member-document/library/people/ana.md +2 -2
  310. package/fixtures/cases/member-document/{schema.yaml → schema.md} +2 -0
  311. package/fixtures/cases/member-on-an-untyped-document/context.json +1 -0
  312. package/fixtures/cases/member-on-an-untyped-document/expected.json +6 -0
  313. package/fixtures/cases/member-on-an-untyped-document/library/note.md +4 -0
  314. package/fixtures/cases/member-on-another-type/context.json +1 -0
  315. package/fixtures/cases/member-on-another-type/expected.json +6 -0
  316. package/fixtures/cases/member-on-another-type/library/note.md +4 -0
  317. package/fixtures/cases/member-on-another-type/schema.md +9 -0
  318. package/fixtures/cases/missing-required-field/library/item.md +1 -1
  319. package/fixtures/cases/missing-required-field/schema.md +8 -0
  320. package/fixtures/cases/misspelled-key/expected.json +2 -1
  321. package/fixtures/cases/misspelled-key/library/companies/acme.md +1 -1
  322. package/fixtures/cases/misspelled-key/library/deals/renewal.md +50 -25
  323. package/fixtures/cases/misspelled-key/schema.md +57 -0
  324. package/fixtures/cases/name-not-a-string/context.json +1 -0
  325. package/fixtures/cases/name-not-a-string/expected.json +5 -0
  326. package/fixtures/cases/name-not-a-string/schema.md +7 -0
  327. package/fixtures/cases/nested-defs/expected.json +2 -1
  328. package/fixtures/cases/nested-defs/library/deal.md +3 -3
  329. package/fixtures/cases/nested-defs/{schema.yaml → schema.md} +2 -0
  330. package/fixtures/cases/nested-object-reference/expected.json +2 -1
  331. package/fixtures/cases/nested-object-reference/library/companies/acme.md +1 -1
  332. package/fixtures/cases/nested-object-reference/library/deals/renewal.md +12 -9
  333. package/fixtures/cases/nested-object-reference/library/places/depot.md +1 -1
  334. package/fixtures/cases/nested-object-reference/library/products/seats.md +1 -1
  335. package/fixtures/cases/nested-object-reference/library/products/support.md +1 -1
  336. package/fixtures/cases/nested-object-reference/schema.md +34 -0
  337. package/fixtures/cases/nested-reference/library/companies/acme.md +1 -1
  338. package/fixtures/cases/nested-reference/library/deals/renewal.md +13 -10
  339. package/fixtures/cases/nested-reference/library/places/depot.md +1 -1
  340. package/fixtures/cases/nested-reference/library/products/seats.md +1 -1
  341. package/fixtures/cases/nested-reference/library/products/support.md +1 -1
  342. package/fixtures/cases/nested-reference/schema.md +34 -0
  343. package/fixtures/cases/nested-required-field/expected.json +2 -1
  344. package/fixtures/cases/nested-required-field/library/companies/acme.md +1 -1
  345. package/fixtures/cases/nested-required-field/library/deals/renewal.md +48 -23
  346. package/fixtures/cases/nested-required-field/schema.md +57 -0
  347. package/fixtures/cases/numeric-range/expected.json +2 -1
  348. package/fixtures/cases/numeric-range/library/companies/acme.md +1 -1
  349. package/fixtures/cases/numeric-range/library/deals/renewal.md +49 -24
  350. package/fixtures/cases/numeric-range/schema.md +57 -0
  351. package/fixtures/cases/one-key-two-labels/context.json +1 -0
  352. package/fixtures/cases/one-key-two-labels/expected.json +5 -0
  353. package/fixtures/cases/one-key-two-labels/schema.md +7 -0
  354. package/fixtures/cases/one-key-two-types/context.json +1 -0
  355. package/fixtures/cases/one-key-two-types/expected.json +5 -0
  356. package/fixtures/cases/one-key-two-types/schema.md +6 -0
  357. package/fixtures/cases/one-of-variant/expected.json +2 -1
  358. package/fixtures/cases/one-of-variant/library/companies/acme.md +1 -1
  359. package/fixtures/cases/one-of-variant/library/deals/renewal.md +49 -24
  360. package/fixtures/cases/one-of-variant/schema.md +57 -0
  361. package/fixtures/cases/other-room-reference/expected.json +2 -1
  362. package/fixtures/cases/other-room-reference/library/companies/acme.md +1 -1
  363. package/fixtures/cases/other-room-reference/library/deals/renewal.md +12 -9
  364. package/fixtures/cases/other-room-reference/library/places/depot.md +1 -1
  365. package/fixtures/cases/other-room-reference/library/products/seats.md +1 -1
  366. package/fixtures/cases/other-room-reference/library/products/support.md +1 -1
  367. package/fixtures/cases/other-room-reference/schema.md +34 -0
  368. package/fixtures/cases/paragraph-link-definition/schema.md +3 -0
  369. package/fixtures/cases/prototype-field/expected.json +2 -1
  370. package/fixtures/cases/prototype-field/library/item.md +2 -2
  371. package/fixtures/cases/prototype-field/schema.md +7 -0
  372. package/fixtures/cases/quoted-link-definition/schema.md +3 -0
  373. package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
  374. package/fixtures/cases/reference-into-a-reserved-name/expected.json +7 -0
  375. package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +4 -0
  376. package/fixtures/cases/reference-into-a-reserved-name/library/settings/brief.md +1 -0
  377. package/fixtures/cases/reference-into-a-reserved-name/schema.md +5 -0
  378. package/fixtures/cases/reference-to-any-file-name/context.json +1 -0
  379. package/fixtures/cases/reference-to-any-file-name/expected.json +1 -0
  380. package/fixtures/cases/reference-to-any-file-name/library/people/100%.md +4 -0
  381. package/fixtures/cases/reference-to-any-file-name/library/people/C#.md +4 -0
  382. package/fixtures/cases/reference-to-any-file-name/library/people/My notes.md +4 -0
  383. package/fixtures/cases/reference-to-any-file-name/library/people/[draft].md +4 -0
  384. package/fixtures/cases/reference-to-any-file-name/library/people/c (d).md +4 -0
  385. package/fixtures/cases/reference-to-any-file-name/library/people/caf/303/251.md +4 -0
  386. package/fixtures/cases/reference-to-any-file-name/library/people//320/236/321/202/321/207/321/221/321/202.md +4 -0
  387. package/fixtures/cases/reference-to-any-file-name/library/tasks/bracket.md +9 -0
  388. package/fixtures/cases/reference-to-any-file-name/library/tasks/cyrillic.md +9 -0
  389. package/fixtures/cases/reference-to-any-file-name/library/tasks/decomposed.md +9 -0
  390. package/fixtures/cases/reference-to-any-file-name/library/tasks/hash.md +9 -0
  391. package/fixtures/cases/reference-to-any-file-name/library/tasks/parenthesis.md +9 -0
  392. package/fixtures/cases/reference-to-any-file-name/library/tasks/percent.md +9 -0
  393. package/fixtures/cases/reference-to-any-file-name/library/tasks/spaced.md +9 -0
  394. package/fixtures/cases/reference-to-any-file-name/schema.md +12 -0
  395. package/fixtures/cases/referenced-missing-file/library/a.md +2 -2
  396. package/fixtures/cases/referenced-missing-file/library/b.md +2 -2
  397. package/fixtures/cases/referenced-missing-file/schema.md +12 -0
  398. package/fixtures/cases/referenced-missing-non-latin-file/context.json +1 -0
  399. package/fixtures/cases/referenced-missing-non-latin-file/expected.json +6 -0
  400. package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/a.md +9 -0
  401. package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/b.md +9 -0
  402. package/fixtures/cases/referenced-missing-non-latin-file/schema.md +12 -0
  403. package/fixtures/cases/remote-ref/{schema.yaml → schema.md} +2 -0
  404. package/fixtures/cases/room-md-declares-a-type/context.json +1 -0
  405. package/fixtures/cases/room-md-declares-a-type/expected.json +6 -0
  406. package/fixtures/cases/room-md-declares-a-type/library/ROOM.md +5 -0
  407. package/fixtures/cases/schema-body-ignored/context.json +1 -0
  408. package/fixtures/cases/schema-body-ignored/expected.json +1 -0
  409. package/fixtures/cases/schema-body-ignored/schema.md +9 -0
  410. package/fixtures/cases/schema-type-named-folders/context.json +1 -0
  411. package/fixtures/cases/schema-type-named-folders/expected.json +5 -0
  412. package/fixtures/cases/schema-type-named-folders/schema.md +5 -0
  413. package/fixtures/cases/schema-type-named-type/context.json +1 -0
  414. package/fixtures/cases/schema-type-named-type/expected.json +5 -0
  415. package/fixtures/cases/schema-type-named-type/schema.md +5 -0
  416. package/fixtures/cases/second-member-document/{schema.yaml → schema.md} +2 -0
  417. package/fixtures/cases/sections-keyword-refused/context.json +1 -0
  418. package/fixtures/cases/sections-keyword-refused/expected.json +5 -0
  419. package/fixtures/cases/{structured-section/schema.yaml → sections-keyword-refused/schema.md} +3 -2
  420. package/fixtures/cases/shortcut-reference-link/library/item.md +1 -1
  421. package/fixtures/cases/shortcut-reference-link/schema.md +7 -0
  422. package/fixtures/cases/string-length/expected.json +2 -1
  423. package/fixtures/cases/string-length/library/companies/acme.md +1 -1
  424. package/fixtures/cases/string-length/library/deals/renewal.md +49 -24
  425. package/fixtures/cases/string-length/schema.md +57 -0
  426. package/fixtures/cases/submission-keys/library/notes/visitor.md +2 -2
  427. package/fixtures/cases/submission-keys/{schema.yaml → schema.md} +2 -0
  428. package/fixtures/cases/text-field-kind/expected.json +1 -4
  429. package/fixtures/cases/text-field-kind/library/page.md +1 -1
  430. package/fixtures/cases/text-field-kind/{schema.yaml → schema.md} +2 -0
  431. package/fixtures/cases/thematic-break-ends-the-values/context.json +1 -0
  432. package/fixtures/cases/thematic-break-ends-the-values/expected.json +1 -0
  433. package/fixtures/cases/thematic-break-ends-the-values/library/item.md +10 -0
  434. package/fixtures/cases/thematic-break-ends-the-values/schema.md +5 -0
  435. package/fixtures/cases/truncated-link-definition/schema.md +3 -0
  436. package/fixtures/cases/typed-path-names-another-type/context.json +11 -0
  437. package/fixtures/cases/typed-path-names-another-type/expected.json +6 -0
  438. package/fixtures/cases/typed-path-names-another-type/library/settings/prefs/one.md +3 -0
  439. package/fixtures/cases/typed-path-names-another-type/schema.md +8 -0
  440. package/fixtures/cases/typed-path-names-its-type/context.json +11 -0
  441. package/fixtures/cases/typed-path-names-its-type/expected.json +3 -0
  442. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/deeper/two.md +1 -0
  443. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +4 -0
  444. package/fixtures/cases/typed-path-names-its-type/schema.md +8 -0
  445. package/fixtures/cases/typed-path-names-no-type/context.json +11 -0
  446. package/fixtures/cases/typed-path-names-no-type/expected.json +6 -0
  447. package/fixtures/cases/typed-path-names-no-type/library/settings/prefs/one.md +1 -0
  448. package/fixtures/cases/typed-path-names-no-type/schema.md +8 -0
  449. package/fixtures/cases/types-folder-content/library/types/task.md +1 -1
  450. package/fixtures/cases/types-folder-content/{schema.yaml → schema.md} +2 -0
  451. package/fixtures/cases/undeclared-field/expected.json +2 -1
  452. package/fixtures/cases/undeclared-field/library/item.md +2 -2
  453. package/fixtures/cases/undeclared-field/schema.md +7 -0
  454. package/fixtures/cases/unevaluated-items-closed/expected.json +2 -1
  455. package/fixtures/cases/unevaluated-items-closed/library/trip.md +13 -3
  456. package/fixtures/cases/unevaluated-items-closed/{schema.yaml → schema.md} +2 -0
  457. package/fixtures/cases/unique-in-app-schema/context.json +1 -0
  458. package/fixtures/cases/unique-in-app-schema/expected.json +5 -0
  459. package/fixtures/cases/unique-in-app-schema/schema.yaml +7 -0
  460. package/fixtures/cases/unique-indexed-field/context.json +1 -0
  461. package/fixtures/cases/unique-indexed-field/expected.json +1 -0
  462. package/fixtures/cases/unique-indexed-field/library/tickets/first.md +8 -0
  463. package/fixtures/cases/unique-indexed-field/library/tickets/second.md +8 -0
  464. package/fixtures/cases/unique-indexed-field/schema.md +9 -0
  465. package/fixtures/cases/unique-off-indexed-field/context.json +1 -0
  466. package/fixtures/cases/unique-off-indexed-field/expected.json +5 -0
  467. package/fixtures/cases/unique-off-indexed-field/schema.md +9 -0
  468. package/fixtures/cases/unlisted-reference-type/{schema.yaml → schema.md} +2 -0
  469. package/fixtures/cases/unnamed-typed-path-checks-its-fields/context.json +11 -0
  470. package/fixtures/cases/unnamed-typed-path-checks-its-fields/expected.json +6 -0
  471. package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +5 -0
  472. package/fixtures/cases/unnamed-typed-path-checks-its-fields/schema.md +7 -0
  473. package/fixtures/cases/unnamed-typed-path-names-a-type/context.json +11 -0
  474. package/fixtures/cases/unnamed-typed-path-names-a-type/expected.json +6 -0
  475. package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +7 -0
  476. package/fixtures/cases/unnamed-typed-path-names-a-type/schema.md +7 -0
  477. package/fixtures/cases/unnamed-typed-path-reads-its-type/context.json +11 -0
  478. package/fixtures/cases/unnamed-typed-path-reads-its-type/expected.json +3 -0
  479. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/plan.md +1 -0
  480. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +6 -0
  481. package/fixtures/cases/unnamed-typed-path-reads-its-type/schema.md +7 -0
  482. package/fixtures/cases/unnamed-typed-path-without-a-body/context.json +11 -0
  483. package/fixtures/cases/unnamed-typed-path-without-a-body/expected.json +5 -0
  484. package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +5 -0
  485. package/fixtures/cases/unnamed-typed-path-without-a-body/schema.md +7 -0
  486. package/fixtures/cases/unresolved-link/library/item.md +1 -1
  487. package/fixtures/cases/unresolved-link/schema.md +7 -0
  488. package/fixtures/cases/valid-typed-document/library/people/ada.md +1 -1
  489. package/fixtures/cases/valid-typed-document/library/tasks/one.md +11 -11
  490. package/fixtures/cases/valid-typed-document/schema.md +17 -0
  491. package/fixtures/cases/wide-item-fence-link/schema.md +3 -0
  492. package/fixtures/forms.json +371 -0
  493. package/fixtures/preamble.json +29 -8
  494. package/fixtures/queries.json +1972 -0
  495. package/fixtures/references.json +15 -0
  496. package/package.json +11 -2
  497. package/dist/blocks.d.ts +0 -11
  498. package/dist/blocks.d.ts.map +0 -1
  499. package/dist/blocks.js +0 -91
  500. package/dist/condition.d.ts +0 -180
  501. package/dist/condition.d.ts.map +0 -1
  502. package/dist/condition.js +0 -633
  503. package/dist/divide.d.ts +0 -3
  504. package/dist/divide.d.ts.map +0 -1
  505. package/dist/divide.js +0 -320
  506. package/dist/links.d.ts +0 -29
  507. package/dist/links.d.ts.map +0 -1
  508. package/dist/links.js +0 -831
  509. package/dist/profile.d.ts +0 -6
  510. package/dist/profile.d.ts.map +0 -1
  511. package/dist/profile.js +0 -5
  512. package/dist/project.d.ts +0 -22
  513. package/dist/project.d.ts.map +0 -1
  514. package/dist/project.js +0 -128
  515. package/dist/sections.d.ts +0 -11
  516. package/dist/sections.d.ts.map +0 -1
  517. package/dist/sections.js +0 -57
  518. package/fixtures/cases/absent-link-dangles/schema.yaml +0 -6
  519. package/fixtures/cases/absolute-link/schema.yaml +0 -6
  520. package/fixtures/cases/bracketed-link-definition/schema.yaml +0 -6
  521. package/fixtures/cases/conditional-section/schema.yaml +0 -14
  522. package/fixtures/cases/declared-binary-links/schema.yaml +0 -1
  523. package/fixtures/cases/default-unfilled/schema.yaml +0 -56
  524. package/fixtures/cases/defs-pattern/schema.yaml +0 -56
  525. package/fixtures/cases/dependent-rule/schema.yaml +0 -56
  526. package/fixtures/cases/duplicate-link-definition/schema.yaml +0 -6
  527. package/fixtures/cases/email-format/schema.yaml +0 -56
  528. package/fixtures/cases/fenced-link-definition/schema.yaml +0 -6
  529. package/fixtures/cases/field-enum/schema.yaml +0 -7
  530. package/fixtures/cases/frontmatter-schema/expected.json +0 -5
  531. package/fixtures/cases/integer-field/schema.yaml +0 -56
  532. package/fixtures/cases/interrupted-link-definition/schema.yaml +0 -1
  533. package/fixtures/cases/json-schema-constructs/schema.yaml +0 -56
  534. package/fixtures/cases/list-of-objects-closed/schema.yaml +0 -56
  535. package/fixtures/cases/list-of-objects-item/schema.yaml +0 -56
  536. package/fixtures/cases/list-size/schema.yaml +0 -56
  537. package/fixtures/cases/long-fence-link-definition/schema.yaml +0 -1
  538. package/fixtures/cases/missing-required-field/schema.yaml +0 -7
  539. package/fixtures/cases/missing-section-item-kind/expected.json +0 -5
  540. package/fixtures/cases/missing-section-item-kind/schema.yaml +0 -6
  541. package/fixtures/cases/misspelled-key/schema.yaml +0 -56
  542. package/fixtures/cases/nested-object-reference/schema.yaml +0 -32
  543. package/fixtures/cases/nested-reference/schema.yaml +0 -32
  544. package/fixtures/cases/nested-required-field/schema.yaml +0 -56
  545. package/fixtures/cases/null-refused/expected.json +0 -6
  546. package/fixtures/cases/null-refused/library/companies/acme.md +0 -4
  547. package/fixtures/cases/null-refused/library/deals/renewal.md +0 -31
  548. package/fixtures/cases/null-refused/schema.yaml +0 -56
  549. package/fixtures/cases/numeric-range/schema.yaml +0 -56
  550. package/fixtures/cases/one-of-variant/schema.yaml +0 -56
  551. package/fixtures/cases/open-map-value/expected.json +0 -6
  552. package/fixtures/cases/open-map-value/library/companies/acme.md +0 -4
  553. package/fixtures/cases/open-map-value/library/deals/renewal.md +0 -31
  554. package/fixtures/cases/open-map-value/schema.yaml +0 -56
  555. package/fixtures/cases/other-room-reference/schema.yaml +0 -32
  556. package/fixtures/cases/paragraph-link-definition/schema.yaml +0 -1
  557. package/fixtures/cases/prototype-field/schema.yaml +0 -6
  558. package/fixtures/cases/quoted-link-definition/schema.yaml +0 -1
  559. package/fixtures/cases/referenced-missing-file/schema.yaml +0 -11
  560. package/fixtures/cases/section-item-enum/expected.json +0 -6
  561. package/fixtures/cases/section-item-enum/library/task.md +0 -8
  562. package/fixtures/cases/section-item-enum/schema.yaml +0 -3
  563. package/fixtures/cases/section-item-kind/expected.json +0 -6
  564. package/fixtures/cases/section-item-kind/library/task.md +0 -8
  565. package/fixtures/cases/section-item-kind/schema.yaml +0 -3
  566. package/fixtures/cases/section-items/library/page.md +0 -42
  567. package/fixtures/cases/section-items/schema.yaml +0 -10
  568. package/fixtures/cases/section-reference-path/expected.json +0 -6
  569. package/fixtures/cases/section-reference-path/library/page.md +0 -7
  570. package/fixtures/cases/section-reference-path/schema.yaml +0 -3
  571. package/fixtures/cases/section-reference-type/expected.json +0 -6
  572. package/fixtures/cases/section-reference-type/library/page.md +0 -7
  573. package/fixtures/cases/section-reference-type/schema.yaml +0 -3
  574. package/fixtures/cases/shortcut-reference-link/schema.yaml +0 -6
  575. package/fixtures/cases/string-length/schema.yaml +0 -56
  576. package/fixtures/cases/structured-section/expected.json +0 -6
  577. package/fixtures/cases/truncated-link-definition/schema.yaml +0 -1
  578. package/fixtures/cases/undeclared-field/schema.yaml +0 -6
  579. package/fixtures/cases/unresolved-link/schema.yaml +0 -6
  580. package/fixtures/cases/valid-typed-document/schema.yaml +0 -16
  581. package/fixtures/cases/wide-item-fence-link/schema.yaml +0 -1
  582. package/fixtures/division.json +0 -409
  583. package/fixtures/projection.json +0 -255
  584. /package/fixtures/cases/{conditional-section → block-scalar-frontmatter}/context.json +0 -0
  585. /package/fixtures/cases/{section-items → block-scalar-frontmatter}/expected.json +0 -0
  586. /package/fixtures/cases/{frontmatter-schema → conditional-long-text}/context.json +0 -0
  587. /package/fixtures/cases/{missing-section-item-kind → equal-labels}/context.json +0 -0
  588. /package/fixtures/cases/{null-refused → folder-keeps-a-built-in-type}/context.json +0 -0
  589. /package/fixtures/cases/{open-map-value → folder-keeps-a-record}/context.json +0 -0
  590. /package/fixtures/cases/{section-item-enum → folder-names-no-type-of-the-schema}/context.json +0 -0
  591. /package/fixtures/cases/{section-item-kind → folder-nearer-entry-types-a-document}/context.json +0 -0
  592. /package/fixtures/cases/{section-items → folder-refuses-a-declared-any}/context.json +0 -0
  593. /package/fixtures/cases/{section-reference-path → folder-refuses-another-declared-type}/context.json +0 -0
  594. /package/fixtures/cases/{section-reference-type → folder-type-is-the-type-a-reference-reaches}/context.json +0 -0
  595. /package/fixtures/cases/{structured-section → folder-types-a-document-in-a-folder-below-it}/context.json +0 -0
  596. /package/fixtures/cases/{section-items → list-items}/library/other.md +0 -0
  597. /package/fixtures/cases/{section-reference-path → list-reference-path}/library/other.md +0 -0
  598. /package/fixtures/cases/{section-reference-type → list-reference-type}/library/note.md +0 -0
  599. /package/fixtures/cases/{frontmatter-schema/schema.yaml → unknown-type/schema.md} +0 -0
package/dist/refuse.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { Refusal } from './types.js';
2
2
  export declare function refusal(file: string, rule: string, extra?: {
3
3
  location?: string;
4
+ line?: number;
4
5
  referrers?: readonly string[];
5
6
  }): Refusal;
6
7
  //# sourceMappingURL=refuse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"refuse.d.ts","sourceRoot":"","sources":["../src/refuse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,wBAAgB,OAAO,CACrB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC3D,OAAO,CAOT"}
1
+ {"version":3,"file":"refuse.d.ts","sourceRoot":"","sources":["../src/refuse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,wBAAgB,OAAO,CACrB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC1E,OAAO,CAQT"}
package/dist/refuse.js CHANGED
@@ -3,6 +3,7 @@ export function refusal(file, rule, extra) {
3
3
  file,
4
4
  rule,
5
5
  ...(extra?.location === undefined ? {} : { location: extra.location }),
6
+ ...(extra?.line === undefined ? {} : { line: extra.line }),
6
7
  ...(extra?.referrers === undefined ? {} : { referrers: extra.referrers }),
7
8
  };
8
9
  }
@@ -0,0 +1,6 @@
1
+ export declare const ROOM_DESCRIPTION = "ROOM.md";
2
+ export declare const RESERVED_NAMES: readonly string[];
3
+ export declare function foldedName(name: string): string;
4
+ export declare function isReservedName(name: string): boolean;
5
+ export declare function isDocumentPath(path: string): boolean;
6
+ //# sourceMappingURL=reserved.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reserved.d.ts","sourceRoot":"","sources":["../src/reserved.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAM3C,CAAC;AAYF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI/C;AAID,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGpD"}
@@ -0,0 +1,30 @@
1
+ export const ROOM_DESCRIPTION = 'ROOM.md';
2
+ export const RESERVED_NAMES = [
3
+ ROOM_DESCRIPTION,
4
+ 'settings',
5
+ 'rooms',
6
+ 'agents',
7
+ 'house',
8
+ ];
9
+ const DOTLESS_I = 'ı';
10
+ const CHEROKEE_SMALL = /[\u13F8-\u13FD\uAB70-\uABBF]/u;
11
+ function foldedPoint(point) {
12
+ if (point === DOTLESS_I)
13
+ return point;
14
+ const folded = point.toLowerCase().toUpperCase().toLowerCase();
15
+ return CHEROKEE_SMALL.test(folded) ? folded.toUpperCase() : folded;
16
+ }
17
+ export function foldedName(name) {
18
+ let folded = '';
19
+ for (const point of name.normalize('NFC'))
20
+ folded += foldedPoint(point);
21
+ return folded.normalize('NFC');
22
+ }
23
+ const FOLDED_RESERVED_NAMES = new Set(RESERVED_NAMES.map(foldedName));
24
+ export function isReservedName(name) {
25
+ return FOLDED_RESERVED_NAMES.has(foldedName(name));
26
+ }
27
+ export function isDocumentPath(path) {
28
+ const first = path.split('/', 1)[0];
29
+ return first !== '' && !isReservedName(first);
30
+ }
@@ -0,0 +1,8 @@
1
+ export declare const CHAT_TYPE = "chat";
2
+ export declare const CHAT_MESSAGE_TYPE = "chat-message";
3
+ export declare const INBOX_TYPES: readonly string[];
4
+ export declare const INBOX_CHANNEL_KINDS: readonly ['telegram-bot', 'telegram-business', 'whatsapp', 'messenger', 'instagram', 'tiktok', 'viber'];
5
+ export type InboxChannelKind = (typeof INBOX_CHANNEL_KINDS)[number];
6
+ export declare const VIEW_TYPE = "view";
7
+ export declare const ROOM_TYPES_TEXT: string;
8
+ //# sourceMappingURL=room-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"room-types.d.ts","sourceRoot":"","sources":["../src/room-types.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,SAAS,CAAC;AAEhC,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAEhD,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAAmC,CAAC;AAE7E,eAAO,MAAM,mBAAmB,YAC9B,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,WAAW,EACX,QAAQ,EACR,OAAO,CACC,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAMpE,eAAO,MAAM,SAAS,SAAS,CAAC;AA8BhC,eAAO,MAAM,eAAe,QAsGhB,CAAC"}
@@ -0,0 +1,142 @@
1
+ import { APP_REFERENCE_PATTERN } from './house-references/patterns.js';
2
+ import { MEDIA_TYPES } from './media-type.js';
3
+ export const CHAT_TYPE = 'chat';
4
+ export const CHAT_MESSAGE_TYPE = 'chat-message';
5
+ export const INBOX_TYPES = [CHAT_TYPE, CHAT_MESSAGE_TYPE];
6
+ export const INBOX_CHANNEL_KINDS = [
7
+ 'telegram-bot',
8
+ 'telegram-business',
9
+ 'whatsapp',
10
+ 'messenger',
11
+ 'instagram',
12
+ 'tiktok',
13
+ 'viber',
14
+ ];
15
+ const WAYFINDING_MAP_TYPE = 'wayfinding-map';
16
+ const WAYFINDING_TICKET_TYPE = 'wayfinding-ticket';
17
+ export const VIEW_TYPE = 'view';
18
+ const WAYFINDING_MAP_TEXTS = [
19
+ ['destination', 'Destination'],
20
+ ['notes', 'Notes'],
21
+ ['decisions_so_far', 'Decisions so far'],
22
+ ['not_yet_specified', 'Not yet specified'],
23
+ ['out_of_scope', 'Out of scope'],
24
+ ];
25
+ function markdown(title) {
26
+ return `{ type: string, contentMediaType: ${MEDIA_TYPES.markdown}, title: ${title} }`;
27
+ }
28
+ function identity(title) {
29
+ return `{ type: string, pattern: '^\\S+$', title: ${title} }`;
30
+ }
31
+ const USER = ' user: { type: string, format: uuid, title: User }';
32
+ const NAME = ' name: { type: string, title: Name }';
33
+ const ASSIGNEE = [
34
+ ' type: object',
35
+ ' properties:',
36
+ USER,
37
+ ' agent: { type: string, format: uuid, title: Agent }',
38
+ NAME,
39
+ ];
40
+ export const ROOM_TYPES_TEXT = [
41
+ `${CHAT_TYPE}:`,
42
+ ' properties:',
43
+ ' inbox: { type: string, format: uuid, title: Inbox }',
44
+ ` channel: { enum: [${INBOX_CHANNEL_KINDS.join(', ')}], title: Channel }`,
45
+ ` chat: ${identity('Chat')}`,
46
+ ' customer:',
47
+ ' title: Customer',
48
+ ' type: object',
49
+ ' properties:',
50
+ ' name: { type: string, title: Name }',
51
+ ` username: ${identity('Username')}`,
52
+ ` phone: ${identity('Phone')}`,
53
+ ' assignee:',
54
+ ' title: Assignee',
55
+ ' type: object',
56
+ ' properties:',
57
+ USER,
58
+ NAME,
59
+ ' required: [user, name]',
60
+ ' required: [chat, customer]',
61
+ `${CHAT_MESSAGE_TYPE}:`,
62
+ ' properties:',
63
+ ' direction: { enum: [in, out], title: Direction }',
64
+ ' sender:',
65
+ ' title: Sender',
66
+ ...ASSIGNEE,
67
+ ` username: ${identity('Username')}`,
68
+ ' sent_at: { type: string, format: date-time, title: Sent at }',
69
+ ` channel_message: ${identity('Channel message')}`,
70
+ ' labelled: { const: true, title: Labelled }',
71
+ ' reactions:',
72
+ ' title: Reactions',
73
+ ' type: array',
74
+ ' items:',
75
+ ' type: object',
76
+ ' properties:',
77
+ ' reaction: { type: string, minLength: 1, title: Reaction }',
78
+ ' sender:',
79
+ ' title: Sender',
80
+ ' type: object',
81
+ ' properties:',
82
+ ` id: ${identity('ID')}`,
83
+ ' name: { type: string, title: Name }',
84
+ ` username: ${identity('Username')}`,
85
+ ' count: { type: integer, minimum: 1, title: Count }',
86
+ ' required: [reaction]',
87
+ ` post: ${identity('Post')}`,
88
+ ' assignee:',
89
+ ' title: Assignee',
90
+ ...ASSIGNEE,
91
+ ' sent_outside: { const: true, title: Sent outside }',
92
+ ' template:',
93
+ ' title: Template',
94
+ ' type: object',
95
+ ' properties:',
96
+ ' name: { type: string, minLength: 1, title: Name }',
97
+ ' language: { type: string, minLength: 1, title: Language }',
98
+ ' required: [name, language]',
99
+ ' values:',
100
+ ' title: Values',
101
+ ' type: object',
102
+ ' additionalProperties: { type: string }',
103
+ ' withheld: { const: true, title: Withheld }',
104
+ ' required: [direction]',
105
+ ' if: { properties: { direction: { const: in } } }',
106
+ ' then: { required: [sent_at] }',
107
+ `${WAYFINDING_MAP_TYPE}:`,
108
+ ' properties:',
109
+ ' name: { type: string, title: Name }',
110
+ ...WAYFINDING_MAP_TEXTS.map(([key, title]) => ` ${key}: ${markdown(title)}`),
111
+ ` required: [name, ${WAYFINDING_MAP_TEXTS.map(([key]) => key).join(', ')}]`,
112
+ `${WAYFINDING_TICKET_TYPE}:`,
113
+ ' properties:',
114
+ ' name: { type: string, title: Name }',
115
+ ' kind: { enum: [research, prototype, grilling, task], title: Kind }',
116
+ ' status: { enum: [open, in-progress, done, out-of-scope], title: Status }',
117
+ ` map: { type: string, reference: ${WAYFINDING_MAP_TYPE}, title: Map }`,
118
+ ` blocked_by: { type: array, items: { type: string, reference: ${WAYFINDING_TICKET_TYPE} }, title: Blocked by }`,
119
+ ' assignee:',
120
+ ' title: Assignee',
121
+ ...ASSIGNEE,
122
+ ' conversation: { type: string, format: uuid, title: Conversation }',
123
+ ` app: { type: string, pattern: '${APP_REFERENCE_PATTERN.source}', title: App }`,
124
+ ` question: ${markdown('Question')}`,
125
+ ` answer: ${markdown('Answer')}`,
126
+ ' required: [name, kind, status, map, blocked_by]',
127
+ ' allOf:',
128
+ ' - if: { properties: { status: { enum: [in-progress, done, out-of-scope] } }, required: [status] }',
129
+ ' then: { required: [assignee] }',
130
+ ' else: { properties: { assignee: false } }',
131
+ ' - if: { properties: { assignee: { required: [agent] } }, required: [assignee] }',
132
+ ' else: { properties: { conversation: false } }',
133
+ ' - if: { properties: { status: { enum: [done, out-of-scope] } }, required: [status] }',
134
+ ' then: { required: [answer], properties: { answer: { minLength: 1, title: Answer } } }',
135
+ `${VIEW_TYPE}:`,
136
+ ' properties:',
137
+ ' name: { type: string, title: Name }',
138
+ ' description: { type: string, title: Description }',
139
+ ' query: { type: object, additionalProperties: true, title: Query }',
140
+ ' required: [name, description, query]',
141
+ '',
142
+ ].join('\n');
package/dist/schema.d.ts CHANGED
@@ -3,7 +3,5 @@ export type SchemaRefusal = {
3
3
  readonly rule: string;
4
4
  readonly location: string;
5
5
  };
6
- export declare function frontmatterRefusal(definition: Definition, fields: Readonly<Record<string, unknown>>): SchemaRefusal | undefined;
7
- export declare function conditionedSections(definition: Definition, fields: Readonly<Record<string, unknown>>): readonly string[];
8
- export declare function fitsItem(definition: Definition, section: string, text: string): boolean;
6
+ export declare function schemaRefusal(definition: Definition, fields: Readonly<Record<string, unknown>>): SchemaRefusal | undefined;
9
7
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA0B5E,MAAM,MAAM,aAAa,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AA6NjF,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxC,aAAa,GAAG,SAAS,CAI3B;AAYD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxC,SAAS,MAAM,EAAE,CAGnB;AAED,wBAAgB,QAAQ,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAMvF"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAK5E,MAAM,MAAM,aAAa,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AA8JjF,wBAAgB,aAAa,CAC3B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxC,aAAa,GAAG,SAAS,CAI3B"}
package/dist/schema.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Validator } from '@cfworker/json-schema';
2
2
  import { escapePointer, refTarget } from './definition.js';
3
- import { MEMBER_FIELD, RECEIVED_FIELD, SITE_FIELD, TYPE_FIELD } from './fields.js';
3
+ import { MEMBER_FIELD, SITE_FIELD, SUBMITTED_FIELD, TYPE_FIELD } from './fields.js';
4
4
  import { withLinearRegExp } from './pattern.js';
5
- import { interpretPlain, isRecord } from './yaml.js';
5
+ import { isRecord } from './yaml.js';
6
6
  const STANDING_MAPS = ['properties', 'patternProperties'];
7
7
  const STANDING = [
8
8
  'additionalProperties',
@@ -96,65 +96,19 @@ function closed(node, inPlace, defs, always = false) {
96
96
  function copied(value) {
97
97
  return JSON.parse(JSON.stringify(value));
98
98
  }
99
- function asks(asked) {
100
- return asked.sections.length > 0 || asked.conditions.length > 0;
101
- }
102
- function branchOf(node, defs, closedDefs) {
103
- if (!isRecord(node))
104
- return { schema: node, asked: { sections: [], conditions: [] } };
105
- const { sections, ...rest } = node;
106
- const read = unconditioned(rest, defs, closedDefs);
107
- const required = Object.entries(isRecord(sections) ? sections : {}).flatMap(([name, spec]) => isRecord(spec) && spec.required === true ? [name] : []);
108
- return { schema: read.schema, asked: { sections: required, conditions: read.conditions } };
109
- }
110
- function unconditioned(node, defs, closedDefs) {
111
- if (!isRecord(node))
112
- return { schema: node, conditions: [] };
113
- const schema = { ...node };
114
- const conditions = [];
115
- if (Array.isArray(node.allOf))
116
- schema.allOf = node.allOf.map((entry) => {
117
- const read = unconditioned(entry, defs, closedDefs);
118
- conditions.push(...read.conditions);
119
- return read.schema;
120
- });
121
- if (node.if === undefined)
122
- return { schema, conditions };
123
- const met = branchOf(node.then, defs, closedDefs);
124
- const unmet = branchOf(node.else, defs, closedDefs);
125
- if (node.then !== undefined)
126
- schema.then = met.schema;
127
- if (node.else !== undefined)
128
- schema.else = unmet.schema;
129
- if (!asks(met.asked) && !asks(unmet.asked))
130
- return { schema, conditions };
131
- const test = new Validator(isRecord(node.if)
132
- ? { ...closed(node.if, true, defs), $defs: closedDefs }
133
- : node.if === true, '2020-12', false);
134
- return { schema, conditions: [...conditions, { test, met: met.asked, unmet: unmet.asked }] };
135
- }
136
99
  function compile(definition) {
137
100
  const defs = copied(definition.shape.defs);
138
- const { sections, member_document: _mark, ...written } = copied(definition.shape.schema);
101
+ const { member_document: _mark, ...written } = copied(definition.shape.schema);
139
102
  const closedDefs = mapped(defs, (held) => closed(held, true, defs));
140
- const read = unconditioned(written, defs, closedDefs);
141
- const root = read.schema;
142
- const declared = isRecord(root.properties) ? root.properties : {};
103
+ const declared = isRecord(written.properties) ? written.properties : {};
143
104
  const properties = {
144
105
  [TYPE_FIELD]: true,
145
106
  [SITE_FIELD]: true,
146
- [RECEIVED_FIELD]: true,
107
+ [SUBMITTED_FIELD]: true,
147
108
  ...(definition.memberDocument ? { [MEMBER_FIELD]: { type: 'string' } } : {}),
148
109
  ...declared,
149
110
  };
150
- const frontmatter = new Validator({ ...closed({ ...root, properties }, false, defs, true), $defs: closedDefs }, '2020-12', false);
151
- const lists = new Map();
152
- for (const [name, spec] of Object.entries(isRecord(sections) ? sections : {})) {
153
- if (!isRecord(spec) || spec.kind !== 'list')
154
- continue;
155
- lists.set(name, new Validator({ ...closed(spec.items, false, defs), $defs: closedDefs }, '2020-12', false));
156
- }
157
- return { frontmatter, sections: lists, conditions: read.conditions };
111
+ return new Validator({ ...closed({ ...written, properties }, false, defs, true), $defs: closedDefs }, '2020-12', false);
158
112
  }
159
113
  function compiledOf(definition) {
160
114
  const held = compiled.get(definition);
@@ -189,26 +143,8 @@ function refusalOf(errors) {
189
143
  }
190
144
  return { rule: 'schema', location: '' };
191
145
  }
192
- export function frontmatterRefusal(definition, fields) {
193
- const { frontmatter } = compiledOf(definition);
194
- const result = withLinearRegExp(() => frontmatter.validate(fields));
146
+ export function schemaRefusal(definition, fields) {
147
+ const validator = compiledOf(definition);
148
+ const result = withLinearRegExp(() => validator.validate(fields));
195
149
  return result.valid ? undefined : refusalOf(result.errors);
196
150
  }
197
- function askedOf(conditions, fields) {
198
- return conditions.flatMap((condition) => {
199
- const asked = condition.test.validate(fields).valid ? condition.met : condition.unmet;
200
- return [...asked.sections, ...askedOf(asked.conditions, fields)];
201
- });
202
- }
203
- export function conditionedSections(definition, fields) {
204
- const { conditions } = compiledOf(definition);
205
- return withLinearRegExp(() => askedOf(conditions, fields));
206
- }
207
- export function fitsItem(definition, section, text) {
208
- const spec = definition.sections[section];
209
- const validator = compiledOf(definition).sections.get(section);
210
- if (spec?.kind !== 'list' || validator === undefined)
211
- return false;
212
- const typed = spec.items.type === 'string' ? text : interpretPlain(text);
213
- return withLinearRegExp(() => validator.validate(typed).valid);
214
- }
package/dist/types.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import type { Definition } from './definition.js';
2
2
  export type Library = Readonly<Record<string, string>>;
3
+ export type RoleNeed = 'read' | 'write';
3
4
  export type VerifiedModel = {
4
5
  readonly types: Readonly<Record<string, Definition>>;
5
6
  readonly nameable?: readonly string[];
7
+ readonly roles?: Readonly<Record<string, RoleNeed>>;
6
8
  };
7
9
  export type ModelVerification = {
8
10
  readonly verdict: 'accept';
@@ -12,16 +14,16 @@ export type ModelVerification = {
12
14
  readonly rule: string;
13
15
  readonly location?: string;
14
16
  };
17
+ export type TypedPath = {
18
+ readonly path: string;
19
+ readonly type: string;
20
+ readonly named: boolean;
21
+ readonly body: boolean;
22
+ };
15
23
  export type ValidationContext = {
16
24
  readonly binaryTargets: readonly string[];
17
25
  readonly anyRoom?: true;
18
- };
19
- export type ProjectionContext = {
20
- readonly documentTargets: readonly string[];
21
- readonly definition?: Definition;
22
- };
23
- export type DivisionContext = ProjectionContext & {
24
- readonly bound: number;
26
+ readonly typedPaths?: readonly TypedPath[];
25
27
  };
26
28
  export type Extent = {
27
29
  readonly start: number;
@@ -30,19 +32,22 @@ export type Extent = {
30
32
  export type Span = Extent & {
31
33
  readonly text: string;
32
34
  };
33
- export type Frontmatter = {
35
+ export type Document = {
34
36
  readonly content: string;
35
37
  readonly type: string | undefined;
36
38
  readonly fields: Readonly<Record<string, unknown>>;
37
- };
38
- export type Document = Frontmatter & {
39
39
  readonly preamble: string;
40
40
  readonly sections: Readonly<Record<string, string>>;
41
+ readonly text: string;
42
+ readonly ranges: Readonly<Record<string, Extent>>;
43
+ readonly listEnd: number;
41
44
  };
45
+ export type DefinitionOf = (type: string | undefined) => Definition | undefined;
42
46
  export type Refusal = {
43
47
  readonly file: string;
44
48
  readonly rule: string;
45
49
  readonly location?: string;
50
+ readonly line?: number;
46
51
  readonly referrers?: readonly string[];
47
52
  };
48
53
  export type Reached = {
@@ -66,27 +71,6 @@ export type ValidationStep = {
66
71
  readonly path: string;
67
72
  readonly resolved: number;
68
73
  };
69
- export type Projection = {
70
- readonly ok: true;
71
- readonly text: string;
72
- } | {
73
- readonly ok: false;
74
- readonly refusal: Refusal;
75
- };
76
- export type Division = {
77
- readonly ok: true;
78
- readonly spans: readonly Span[];
79
- } | {
80
- readonly ok: false;
81
- readonly refusal: Refusal;
82
- };
83
- export type FrontmatterResult = {
84
- readonly ok: true;
85
- readonly frontmatter: Frontmatter;
86
- } | {
87
- readonly ok: false;
88
- readonly refusal: Refusal;
89
- };
90
74
  export type ParseResult = {
91
75
  readonly ok: true;
92
76
  readonly document: Document;
@@ -116,12 +100,6 @@ export type RoomReference = {
116
100
  readonly value: string;
117
101
  readonly to: readonly string[];
118
102
  readonly crossRoom?: true;
119
- } | {
120
- readonly kind: 'item';
121
- readonly section: string;
122
- readonly href: string;
123
- readonly to: readonly string[];
124
- readonly crossRoom?: true;
125
103
  });
126
104
  export type Change = {
127
105
  readonly kind: 'field';
@@ -132,11 +110,15 @@ export type Change = {
132
110
  readonly kind: 'section';
133
111
  readonly name: string;
134
112
  readonly value: string;
135
- readonly prior: string;
113
+ readonly prior: string | undefined;
136
114
  } | {
137
115
  readonly kind: 'preamble';
138
116
  readonly value: string;
139
117
  readonly prior: string;
118
+ } | {
119
+ readonly kind: 'text';
120
+ readonly value: string;
121
+ readonly prior: string;
140
122
  } | {
141
123
  readonly kind: 'link';
142
124
  readonly href: string;
@@ -165,4 +147,16 @@ export type BodyResult = {
165
147
  readonly outcome: 'refuse';
166
148
  readonly refusal: Refusal;
167
149
  };
150
+ export type LinkSpan = {
151
+ readonly start: number;
152
+ readonly end: number;
153
+ readonly label: Extent | null;
154
+ readonly href: string;
155
+ readonly destination: Extent;
156
+ readonly bracketed: boolean;
157
+ };
158
+ export type UnlinkedBody = {
159
+ readonly body: string;
160
+ readonly links: ReadonlyMap<string, string>;
161
+ };
168
162
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAA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EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C,CAAC"}
@@ -1,14 +1,21 @@
1
1
  import { type Definition } from './definition.js';
2
- import type { DocumentCheck, Library, ModelVerification, Reached, RoomReference, Validation, ValidationContext, ValidationStep, VerifiedModel } from './types.js';
3
- export declare function resolves(reference: Reached, typeOf: (path: string) => string | undefined, binary: (path: string) => boolean): boolean;
2
+ import { type KeyedLink } from './paths.js';
3
+ import type { DefinitionOf, Document, DocumentCheck, Library, ModelVerification, ParseResult, Reached, RoomReference, TypedPath, Validation, ValidationContext, ValidationStep, VerifiedModel } from './types.js';
4
+ export declare function definitionAt(model: VerifiedModel, file: string, typedPaths?: readonly TypedPath[]): DefinitionOf;
5
+ export declare function resolves(reference: Reached, typeOf: (path: string) => string | undefined, isAttachment: (path: string) => boolean): boolean;
4
6
  export declare function verify(schema: string, provided?: VerifiedModel): ModelVerification;
5
- export declare function checkDocument(file: string, content: string, model: VerifiedModel, context?: Pick<ValidationContext, 'anyRoom'>): DocumentCheck;
6
- export declare function sectionReferences(file: string, content: string, definition: Definition): readonly Reached[];
7
+ export declare function readTypes(schema: string, provided?: VerifiedModel): VerifiedModel;
8
+ export declare function verifySchemaDocument(document: string, provided?: VerifiedModel): ModelVerification;
9
+ export declare function readSchemaDocument(document: string, provided?: VerifiedModel): VerifiedModel;
10
+ type Placing = Pick<ValidationContext, 'anyRoom' | 'typedPaths'>;
11
+ export declare function checkDocument(file: string, content: string, model: VerifiedModel, context?: Placing): DocumentCheck;
7
12
  export declare function bodyRoomLinks(body: string): RoomReference[];
8
- export declare function roomReferences(file: string, content: string, definition?: Definition): readonly RoomReference[];
13
+ export declare function bodyKeyedLinks(body: string): KeyedLink[];
14
+ export declare function roomReferences(document: Document, definition?: Definition): readonly RoomReference[];
9
15
  type Placed = {
10
16
  readonly reference: Reached;
11
17
  readonly location: string;
18
+ readonly line?: number;
12
19
  };
13
20
  export type Assessment = {
14
21
  readonly file: string;
@@ -18,15 +25,16 @@ export type Assessment = {
18
25
  readonly structured: Validation | null;
19
26
  readonly fields: readonly Placed[];
20
27
  readonly linked: boolean;
21
- readonly sections: readonly Placed[];
22
28
  };
23
- export declare function assess(file: string, content: string, binary: boolean, model?: VerifiedModel, context?: Pick<ValidationContext, 'anyRoom'>): Assessment;
29
+ export declare function assess(file: string, parsed: ParseResult, attachment: boolean, model?: VerifiedModel, context?: Placing): Assessment;
30
+ export declare function assessReferences(file: string, parsed: ParseResult, changed: ReadonlySet<string>, model?: VerifiedModel, context?: Placing): Assessment;
24
31
  export type Verdicts = {
25
- add(assessment: Assessment, typeOf: (path: string) => string | undefined, binary: (path: string) => boolean): number;
32
+ add(assessment: Assessment, typeOf: (path: string) => string | undefined, isAttachment: (path: string) => boolean): number;
26
33
  verdict(): Validation;
27
34
  };
28
35
  export declare function verdicts(): Verdicts;
29
36
  export declare function validating(library: ReadonlyMap<string, string>, context?: ValidationContext, model?: VerifiedModel): Generator<ValidationStep, Validation, void>;
30
37
  export declare function validate(library: Library, context?: ValidationContext, model?: VerifiedModel): Validation;
38
+ export declare function validateParsed(library: ReadonlyMap<string, ParseResult>, context?: ValidationContext, model?: VerifiedModel): Validation;
31
39
  export {};
32
40
  //# sourceMappingURL=validate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AASzF,OAAO,KAAK,EAEV,aAAa,EAEb,OAAO,EACP,iBAAiB,EACjB,OAAO,EACP,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACd,MAAM,YAAY,CAAC;AA8CpB,wBAAgB,QAAQ,CACtB,SAAS,EAA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