@agentshouse/mdmodel 0.1.0-cf26f43c2e4d9 → 0.1.0-cf46fc494ee20

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 (453) hide show
  1. package/API.md +234 -237
  2. package/README.md +27 -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 +19 -0
  9. package/dist/definition.d.ts +24 -11
  10. package/dist/definition.d.ts.map +1 -1
  11. package/dist/definition.js +188 -128
  12. package/dist/document.d.ts +15 -8
  13. package/dist/document.d.ts.map +1 -1
  14. package/dist/document.js +769 -140
  15. package/dist/event.d.ts +77 -0
  16. package/dist/event.d.ts.map +1 -0
  17. package/dist/event.js +200 -0
  18. package/dist/facts.d.ts +15 -0
  19. package/dist/facts.d.ts.map +1 -0
  20. package/dist/facts.js +41 -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/form.d.ts +4 -0
  25. package/dist/form.d.ts.map +1 -0
  26. package/dist/form.js +153 -0
  27. package/dist/house-model.d.ts +920 -0
  28. package/dist/house-model.d.ts.map +1 -0
  29. package/dist/house-model.js +504 -0
  30. package/dist/house-references/crockford.d.ts +4 -0
  31. package/dist/house-references/crockford.d.ts.map +1 -0
  32. package/dist/house-references/crockford.js +3 -0
  33. package/dist/house-references/patterns.d.ts +9 -0
  34. package/dist/house-references/patterns.d.ts.map +1 -0
  35. package/dist/house-references/patterns.js +13 -0
  36. package/dist/index.d.ts +44 -17
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +27 -11
  39. package/dist/indexed.d.ts +9 -0
  40. package/dist/indexed.d.ts.map +1 -0
  41. package/dist/indexed.js +55 -0
  42. package/dist/kinds.d.ts +21 -0
  43. package/dist/kinds.d.ts.map +1 -0
  44. package/dist/kinds.js +210 -0
  45. package/dist/markdown.d.ts +71 -0
  46. package/dist/markdown.d.ts.map +1 -0
  47. package/dist/markdown.js +232 -0
  48. package/dist/media-type.d.ts +72 -0
  49. package/dist/media-type.d.ts.map +1 -0
  50. package/dist/media-type.js +157 -0
  51. package/dist/moment.d.ts +7 -0
  52. package/dist/moment.d.ts.map +1 -0
  53. package/dist/moment.js +18 -0
  54. package/dist/not-ready.d.ts +2 -0
  55. package/dist/not-ready.d.ts.map +1 -0
  56. package/dist/not-ready.js +5 -0
  57. package/dist/paths.d.ts +16 -1
  58. package/dist/paths.d.ts.map +1 -1
  59. package/dist/paths.js +107 -22
  60. package/dist/pattern.d.ts.map +1 -1
  61. package/dist/pattern.js +4 -3
  62. package/dist/query/language.d.ts +257 -0
  63. package/dist/query/language.d.ts.map +1 -0
  64. package/dist/query/language.js +621 -0
  65. package/dist/query/match.d.ts +14 -0
  66. package/dist/query/match.d.ts.map +1 -0
  67. package/dist/query/match.js +150 -0
  68. package/dist/query/rows.d.ts +32 -0
  69. package/dist/query/rows.d.ts.map +1 -0
  70. package/dist/query/rows.js +158 -0
  71. package/dist/query/sql.d.ts +45 -0
  72. package/dist/query/sql.d.ts.map +1 -0
  73. package/dist/query/sql.js +296 -0
  74. package/dist/query/walk.d.ts +63 -0
  75. package/dist/query/walk.d.ts.map +1 -0
  76. package/dist/query/walk.js +263 -0
  77. package/dist/references.d.ts +2 -2
  78. package/dist/references.d.ts.map +1 -1
  79. package/dist/references.js +1 -1
  80. package/dist/refuse.d.ts +1 -0
  81. package/dist/refuse.d.ts.map +1 -1
  82. package/dist/refuse.js +1 -0
  83. package/dist/reserved.d.ts +7 -0
  84. package/dist/reserved.d.ts.map +1 -0
  85. package/dist/reserved.js +32 -0
  86. package/dist/room-types.d.ts +7 -0
  87. package/dist/room-types.d.ts.map +1 -0
  88. package/dist/room-types.js +137 -0
  89. package/dist/schema.d.ts +1 -3
  90. package/dist/schema.d.ts.map +1 -1
  91. package/dist/schema.js +9 -73
  92. package/dist/types.d.ts +22 -38
  93. package/dist/types.d.ts.map +1 -1
  94. package/dist/validate.d.ts +12 -6
  95. package/dist/validate.d.ts.map +1 -1
  96. package/dist/validate.js +227 -179
  97. package/dist/yaml.d.ts +7 -5
  98. package/dist/yaml.d.ts.map +1 -1
  99. package/dist/yaml.js +166 -45
  100. package/fixtures/README.md +92 -69
  101. package/fixtures/cases/absent-link-dangles/library/item.md +1 -1
  102. package/fixtures/cases/absent-link-dangles/schema.yaml +2 -3
  103. package/fixtures/cases/absent-optional-field/library/companies/acme.md +1 -1
  104. package/fixtures/cases/absent-optional-field/library/deals/lead.md +3 -3
  105. package/fixtures/cases/absent-optional-field/schema.yaml +10 -11
  106. package/fixtures/cases/absolute-link/library/item.md +1 -1
  107. package/fixtures/cases/absolute-link/schema.yaml +2 -3
  108. package/fixtures/cases/attachment-reference-any-file/library/companies/acme.md +1 -1
  109. package/fixtures/cases/attachment-reference-any-file/library/deals/renewal.md +13 -10
  110. package/fixtures/cases/attachment-reference-any-file/library/places/depot.md +1 -1
  111. package/fixtures/cases/attachment-reference-any-file/library/products/seats.md +1 -1
  112. package/fixtures/cases/attachment-reference-any-file/library/products/support.md +1 -1
  113. package/fixtures/cases/attachment-reference-dangles/library/companies/acme.md +1 -1
  114. package/fixtures/cases/attachment-reference-dangles/library/deals/renewal.md +13 -10
  115. package/fixtures/cases/attachment-reference-dangles/library/places/depot.md +1 -1
  116. package/fixtures/cases/attachment-reference-dangles/library/products/seats.md +1 -1
  117. package/fixtures/cases/attachment-reference-dangles/library/products/support.md +1 -1
  118. package/fixtures/cases/attachment-reference-outside/expected.json +2 -1
  119. package/fixtures/cases/attachment-reference-outside/library/companies/acme.md +1 -1
  120. package/fixtures/cases/attachment-reference-outside/library/deals/renewal.md +13 -10
  121. package/fixtures/cases/attachment-reference-outside/library/places/depot.md +1 -1
  122. package/fixtures/cases/attachment-reference-outside/library/products/seats.md +1 -1
  123. package/fixtures/cases/attachment-reference-outside/library/products/support.md +1 -1
  124. package/fixtures/cases/binary-any-reference/expected.json +2 -1
  125. package/fixtures/cases/binary-any-reference/library/notes/draft.md +1 -1
  126. package/fixtures/cases/binary-prototype-reference/expected.json +2 -1
  127. package/fixtures/cases/binary-prototype-reference/library/notes/draft.md +1 -1
  128. package/fixtures/cases/binary-typed-reference/expected.json +2 -1
  129. package/fixtures/cases/binary-typed-reference/library/notes/draft.md +1 -1
  130. package/fixtures/cases/block-scalar-frontmatter/library/notes/literal.md +17 -0
  131. package/fixtures/cases/block-scalar-frontmatter/library/skills/notes/SKILL.md +10 -0
  132. package/fixtures/cases/boolean-field/expected.json +2 -1
  133. package/fixtures/cases/boolean-field/library/companies/acme.md +1 -1
  134. package/fixtures/cases/boolean-field/library/deals/renewal.md +49 -24
  135. package/fixtures/cases/boolean-field/schema.yaml +10 -11
  136. package/fixtures/cases/bracketed-link-definition/library/item.md +1 -1
  137. package/fixtures/cases/bracketed-link-definition/schema.yaml +2 -3
  138. package/fixtures/cases/closed-nested-object/expected.json +2 -1
  139. package/fixtures/cases/closed-nested-object/library/companies/acme.md +1 -1
  140. package/fixtures/cases/closed-nested-object/library/deals/renewal.md +50 -25
  141. package/fixtures/cases/closed-nested-object/schema.yaml +10 -11
  142. package/fixtures/cases/composed-root-reference/library/a.md +2 -2
  143. package/fixtures/cases/{conditional-section → conditional-long-text}/expected.json +3 -2
  144. package/fixtures/cases/{conditional-section → conditional-long-text}/library/questions/hosting.md +2 -2
  145. package/fixtures/cases/{conditional-section → conditional-long-text}/library/questions/payments.md +2 -2
  146. package/fixtures/cases/conditional-long-text/schema.yaml +13 -0
  147. package/fixtures/cases/cross-room-link/library/clients/acme.md +1 -1
  148. package/fixtures/cases/cross-room-reference/library/clients/acme.md +4 -4
  149. package/fixtures/cases/cross-room-reference/schema.yaml +1 -2
  150. package/fixtures/cases/date-time-format/expected.json +2 -1
  151. package/fixtures/cases/date-time-format/library/companies/acme.md +1 -1
  152. package/fixtures/cases/date-time-format/library/deals/renewal.md +49 -24
  153. package/fixtures/cases/date-time-format/schema.yaml +10 -11
  154. package/fixtures/cases/default-unfilled/library/companies/acme.md +1 -1
  155. package/fixtures/cases/default-unfilled/library/deals/renewal.md +47 -22
  156. package/fixtures/cases/default-unfilled/schema.yaml +10 -11
  157. package/fixtures/cases/defs-pattern/expected.json +2 -1
  158. package/fixtures/cases/defs-pattern/library/companies/acme.md +1 -1
  159. package/fixtures/cases/defs-pattern/library/deals/renewal.md +49 -24
  160. package/fixtures/cases/defs-pattern/schema.yaml +10 -11
  161. package/fixtures/cases/dependent-rule/library/companies/acme.md +1 -1
  162. package/fixtures/cases/dependent-rule/library/deals/renewal.md +48 -23
  163. package/fixtures/cases/dependent-rule/schema.yaml +10 -11
  164. package/fixtures/cases/duplicate-link-definition/library/item.md +1 -1
  165. package/fixtures/cases/duplicate-link-definition/schema.yaml +2 -3
  166. package/fixtures/cases/email-format/expected.json +2 -1
  167. package/fixtures/cases/email-format/library/companies/acme.md +1 -1
  168. package/fixtures/cases/email-format/library/deals/renewal.md +49 -24
  169. package/fixtures/cases/email-format/schema.yaml +10 -11
  170. package/fixtures/cases/equal-labels/expected.json +5 -0
  171. package/fixtures/cases/equal-labels/schema.yaml +4 -0
  172. package/fixtures/cases/fenced-link-definition/library/item.md +1 -1
  173. package/fixtures/cases/fenced-link-definition/schema.yaml +2 -3
  174. package/fixtures/cases/field-enum/expected.json +2 -1
  175. package/fixtures/cases/field-enum/library/item.md +2 -2
  176. package/fixtures/cases/field-enum/schema.yaml +3 -4
  177. package/fixtures/cases/frontmatter-construct/expected.json +7 -0
  178. package/fixtures/cases/frontmatter-construct/library/note.md +6 -0
  179. package/fixtures/cases/integer-field/expected.json +2 -1
  180. package/fixtures/cases/integer-field/library/companies/acme.md +1 -1
  181. package/fixtures/cases/integer-field/library/deals/renewal.md +49 -24
  182. package/fixtures/cases/integer-field/schema.yaml +10 -11
  183. package/fixtures/cases/json-schema-constructs/library/companies/acme.md +1 -1
  184. package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +49 -24
  185. package/fixtures/cases/json-schema-constructs/schema.yaml +10 -11
  186. package/fixtures/cases/labels-in-the-rooms-language/expected.json +1 -0
  187. package/fixtures/cases/labels-in-the-rooms-language/library/deals/atlas.md +7 -0
  188. package/fixtures/cases/labels-in-the-rooms-language/schema.yaml +9 -0
  189. package/fixtures/cases/lazy-list-item/expected.json +3 -0
  190. package/fixtures/cases/lazy-list-item/library/item.md +10 -0
  191. package/fixtures/cases/lazy-list-item/schema.yaml +3 -0
  192. package/fixtures/cases/link-into-a-reserved-name/expected.json +5 -0
  193. package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +6 -0
  194. package/fixtures/cases/link-into-a-reserved-name/schema.yaml +3 -0
  195. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/expected.json +5 -0
  196. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/library/notes/b.md +5 -0
  197. package/fixtures/cases/list-item-enum/expected.json +7 -0
  198. package/fixtures/cases/list-item-enum/library/task.md +7 -0
  199. package/fixtures/cases/list-item-enum/schema.yaml +3 -0
  200. package/fixtures/cases/list-item-kind/expected.json +7 -0
  201. package/fixtures/cases/list-item-kind/library/task.md +6 -0
  202. package/fixtures/cases/list-item-kind/schema.yaml +3 -0
  203. package/fixtures/cases/list-items/context.json +1 -0
  204. package/fixtures/cases/list-items/expected.json +1 -0
  205. package/fixtures/cases/list-items/library/page.md +26 -0
  206. package/fixtures/cases/list-items/schema.yaml +10 -0
  207. package/fixtures/cases/list-of-objects-closed/expected.json +2 -1
  208. package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +1 -1
  209. package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +49 -25
  210. package/fixtures/cases/list-of-objects-closed/schema.yaml +10 -11
  211. package/fixtures/cases/list-of-objects-item/expected.json +2 -1
  212. package/fixtures/cases/list-of-objects-item/library/companies/acme.md +1 -1
  213. package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +49 -24
  214. package/fixtures/cases/list-of-objects-item/schema.yaml +10 -11
  215. package/fixtures/cases/list-of-objects-reference/expected.json +2 -1
  216. package/fixtures/cases/list-of-objects-reference/library/companies/acme.md +1 -1
  217. package/fixtures/cases/list-of-objects-reference/library/deals/renewal.md +12 -9
  218. package/fixtures/cases/list-of-objects-reference/library/places/depot.md +1 -1
  219. package/fixtures/cases/list-of-objects-reference/library/products/seats.md +1 -1
  220. package/fixtures/cases/list-of-objects-reference/library/products/support.md +1 -1
  221. package/fixtures/cases/list-reference-path/context.json +1 -0
  222. package/fixtures/cases/list-reference-path/expected.json +7 -0
  223. package/fixtures/cases/list-reference-path/library/page.md +5 -0
  224. package/fixtures/cases/list-reference-path/schema.yaml +3 -0
  225. package/fixtures/cases/list-reference-type/context.json +1 -0
  226. package/fixtures/cases/list-reference-type/expected.json +7 -0
  227. package/fixtures/cases/list-reference-type/library/page.md +6 -0
  228. package/fixtures/cases/list-reference-type/schema.yaml +3 -0
  229. package/fixtures/cases/list-size/expected.json +2 -1
  230. package/fixtures/cases/list-size/library/companies/acme.md +1 -1
  231. package/fixtures/cases/list-size/library/deals/renewal.md +51 -24
  232. package/fixtures/cases/list-size/schema.yaml +10 -11
  233. package/fixtures/cases/long-value-past-six-levels/context.json +1 -0
  234. package/fixtures/cases/long-value-past-six-levels/expected.json +5 -0
  235. package/fixtures/cases/long-value-past-six-levels/schema.yaml +15 -0
  236. package/fixtures/cases/malformed-list/context.json +1 -0
  237. package/fixtures/cases/malformed-list/expected.json +7 -0
  238. package/fixtures/cases/{structured-section → malformed-list}/library/item.md +1 -1
  239. package/fixtures/cases/malformed-list/schema.yaml +6 -0
  240. package/fixtures/cases/member-document/library/people/ana.md +2 -2
  241. package/fixtures/cases/member-on-an-untyped-document/context.json +1 -0
  242. package/fixtures/cases/member-on-an-untyped-document/expected.json +6 -0
  243. package/fixtures/cases/member-on-an-untyped-document/library/note.md +4 -0
  244. package/fixtures/cases/member-on-another-type/context.json +1 -0
  245. package/fixtures/cases/member-on-another-type/expected.json +6 -0
  246. package/fixtures/cases/member-on-another-type/library/note.md +4 -0
  247. package/fixtures/cases/member-on-another-type/schema.yaml +7 -0
  248. package/fixtures/cases/missing-required-field/library/item.md +1 -1
  249. package/fixtures/cases/missing-required-field/schema.yaml +3 -4
  250. package/fixtures/cases/misspelled-key/expected.json +2 -1
  251. package/fixtures/cases/misspelled-key/library/companies/acme.md +1 -1
  252. package/fixtures/cases/misspelled-key/library/deals/renewal.md +50 -25
  253. package/fixtures/cases/misspelled-key/schema.yaml +10 -11
  254. package/fixtures/cases/name-not-a-string/context.json +1 -0
  255. package/fixtures/cases/name-not-a-string/expected.json +5 -0
  256. package/fixtures/cases/name-not-a-string/schema.yaml +5 -0
  257. package/fixtures/cases/nested-defs/expected.json +2 -1
  258. package/fixtures/cases/nested-defs/library/deal.md +3 -3
  259. package/fixtures/cases/nested-object-reference/expected.json +2 -1
  260. package/fixtures/cases/nested-object-reference/library/companies/acme.md +1 -1
  261. package/fixtures/cases/nested-object-reference/library/deals/renewal.md +12 -9
  262. package/fixtures/cases/nested-object-reference/library/places/depot.md +1 -1
  263. package/fixtures/cases/nested-object-reference/library/products/seats.md +1 -1
  264. package/fixtures/cases/nested-object-reference/library/products/support.md +1 -1
  265. package/fixtures/cases/nested-reference/library/companies/acme.md +1 -1
  266. package/fixtures/cases/nested-reference/library/deals/renewal.md +13 -10
  267. package/fixtures/cases/nested-reference/library/places/depot.md +1 -1
  268. package/fixtures/cases/nested-reference/library/products/seats.md +1 -1
  269. package/fixtures/cases/nested-reference/library/products/support.md +1 -1
  270. package/fixtures/cases/nested-required-field/expected.json +2 -1
  271. package/fixtures/cases/nested-required-field/library/companies/acme.md +1 -1
  272. package/fixtures/cases/nested-required-field/library/deals/renewal.md +48 -23
  273. package/fixtures/cases/nested-required-field/schema.yaml +10 -11
  274. package/fixtures/cases/numeric-range/expected.json +2 -1
  275. package/fixtures/cases/numeric-range/library/companies/acme.md +1 -1
  276. package/fixtures/cases/numeric-range/library/deals/renewal.md +49 -24
  277. package/fixtures/cases/numeric-range/schema.yaml +10 -11
  278. package/fixtures/cases/one-key-two-labels/context.json +1 -0
  279. package/fixtures/cases/one-key-two-labels/expected.json +5 -0
  280. package/fixtures/cases/one-key-two-labels/schema.yaml +5 -0
  281. package/fixtures/cases/one-key-two-types/context.json +1 -0
  282. package/fixtures/cases/one-key-two-types/expected.json +5 -0
  283. package/fixtures/cases/one-key-two-types/schema.yaml +4 -0
  284. package/fixtures/cases/one-of-variant/expected.json +2 -1
  285. package/fixtures/cases/one-of-variant/library/companies/acme.md +1 -1
  286. package/fixtures/cases/one-of-variant/library/deals/renewal.md +49 -24
  287. package/fixtures/cases/one-of-variant/schema.yaml +10 -11
  288. package/fixtures/cases/other-room-reference/expected.json +2 -1
  289. package/fixtures/cases/other-room-reference/library/companies/acme.md +1 -1
  290. package/fixtures/cases/other-room-reference/library/deals/renewal.md +12 -9
  291. package/fixtures/cases/other-room-reference/library/places/depot.md +1 -1
  292. package/fixtures/cases/other-room-reference/library/products/seats.md +1 -1
  293. package/fixtures/cases/other-room-reference/library/products/support.md +1 -1
  294. package/fixtures/cases/prototype-field/expected.json +2 -1
  295. package/fixtures/cases/prototype-field/library/item.md +2 -2
  296. package/fixtures/cases/prototype-field/schema.yaml +2 -3
  297. package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
  298. package/fixtures/cases/reference-into-a-reserved-name/expected.json +7 -0
  299. package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +4 -0
  300. package/fixtures/cases/reference-into-a-reserved-name/library/settings/brief.md +1 -0
  301. package/fixtures/cases/reference-into-a-reserved-name/schema.yaml +3 -0
  302. package/fixtures/cases/reference-to-any-file-name/context.json +1 -0
  303. package/fixtures/cases/reference-to-any-file-name/expected.json +1 -0
  304. package/fixtures/cases/reference-to-any-file-name/library/people/100%.md +4 -0
  305. package/fixtures/cases/reference-to-any-file-name/library/people/C#.md +4 -0
  306. package/fixtures/cases/reference-to-any-file-name/library/people/My notes.md +4 -0
  307. package/fixtures/cases/reference-to-any-file-name/library/people/[draft].md +4 -0
  308. package/fixtures/cases/reference-to-any-file-name/library/people/c (d).md +4 -0
  309. package/fixtures/cases/reference-to-any-file-name/library/people/caf/303/251.md +4 -0
  310. package/fixtures/cases/reference-to-any-file-name/library/people//320/236/321/202/321/207/321/221/321/202.md +4 -0
  311. package/fixtures/cases/reference-to-any-file-name/library/tasks/bracket.md +9 -0
  312. package/fixtures/cases/reference-to-any-file-name/library/tasks/cyrillic.md +9 -0
  313. package/fixtures/cases/reference-to-any-file-name/library/tasks/decomposed.md +9 -0
  314. package/fixtures/cases/reference-to-any-file-name/library/tasks/hash.md +9 -0
  315. package/fixtures/cases/reference-to-any-file-name/library/tasks/parenthesis.md +9 -0
  316. package/fixtures/cases/reference-to-any-file-name/library/tasks/percent.md +9 -0
  317. package/fixtures/cases/reference-to-any-file-name/library/tasks/spaced.md +9 -0
  318. package/fixtures/cases/reference-to-any-file-name/schema.yaml +10 -0
  319. package/fixtures/cases/referenced-missing-file/library/a.md +2 -2
  320. package/fixtures/cases/referenced-missing-file/library/b.md +2 -2
  321. package/fixtures/cases/referenced-missing-file/schema.yaml +3 -4
  322. package/fixtures/cases/referenced-missing-non-latin-file/context.json +1 -0
  323. package/fixtures/cases/referenced-missing-non-latin-file/expected.json +6 -0
  324. package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/a.md +9 -0
  325. package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/b.md +9 -0
  326. package/fixtures/cases/referenced-missing-non-latin-file/schema.yaml +10 -0
  327. package/fixtures/cases/room-md-declares-a-type/context.json +1 -0
  328. package/fixtures/cases/room-md-declares-a-type/expected.json +6 -0
  329. package/fixtures/cases/room-md-declares-a-type/library/ROOM.md +5 -0
  330. package/fixtures/cases/sections-keyword-refused/context.json +1 -0
  331. package/fixtures/cases/sections-keyword-refused/expected.json +5 -0
  332. package/fixtures/cases/{structured-section → sections-keyword-refused}/schema.yaml +1 -2
  333. package/fixtures/cases/shortcut-reference-link/library/item.md +1 -1
  334. package/fixtures/cases/shortcut-reference-link/schema.yaml +2 -3
  335. package/fixtures/cases/string-length/expected.json +2 -1
  336. package/fixtures/cases/string-length/library/companies/acme.md +1 -1
  337. package/fixtures/cases/string-length/library/deals/renewal.md +49 -24
  338. package/fixtures/cases/string-length/schema.yaml +10 -11
  339. package/fixtures/cases/submission-keys/library/notes/visitor.md +2 -2
  340. package/fixtures/cases/text-field-kind/expected.json +1 -4
  341. package/fixtures/cases/text-field-kind/library/page.md +1 -1
  342. package/fixtures/cases/thematic-break-ends-the-values/context.json +1 -0
  343. package/fixtures/cases/thematic-break-ends-the-values/expected.json +1 -0
  344. package/fixtures/cases/thematic-break-ends-the-values/library/item.md +10 -0
  345. package/fixtures/cases/thematic-break-ends-the-values/schema.yaml +3 -0
  346. package/fixtures/cases/typed-path-names-another-type/context.json +11 -0
  347. package/fixtures/cases/typed-path-names-another-type/expected.json +6 -0
  348. package/fixtures/cases/typed-path-names-another-type/library/settings/prefs/one.md +3 -0
  349. package/fixtures/cases/typed-path-names-another-type/schema.yaml +6 -0
  350. package/fixtures/cases/typed-path-names-its-type/context.json +11 -0
  351. package/fixtures/cases/typed-path-names-its-type/expected.json +3 -0
  352. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/deeper/two.md +1 -0
  353. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +4 -0
  354. package/fixtures/cases/typed-path-names-its-type/schema.yaml +6 -0
  355. package/fixtures/cases/typed-path-names-no-type/context.json +11 -0
  356. package/fixtures/cases/typed-path-names-no-type/expected.json +6 -0
  357. package/fixtures/cases/typed-path-names-no-type/library/settings/prefs/one.md +1 -0
  358. package/fixtures/cases/typed-path-names-no-type/schema.yaml +6 -0
  359. package/fixtures/cases/types-folder-content/library/types/task.md +1 -1
  360. package/fixtures/cases/undeclared-field/expected.json +2 -1
  361. package/fixtures/cases/undeclared-field/library/item.md +2 -2
  362. package/fixtures/cases/undeclared-field/schema.yaml +2 -3
  363. package/fixtures/cases/unevaluated-items-closed/expected.json +2 -1
  364. package/fixtures/cases/unevaluated-items-closed/library/trip.md +13 -3
  365. package/fixtures/cases/unnamed-typed-path-checks-its-fields/context.json +11 -0
  366. package/fixtures/cases/unnamed-typed-path-checks-its-fields/expected.json +6 -0
  367. package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +5 -0
  368. package/fixtures/cases/unnamed-typed-path-checks-its-fields/schema.yaml +5 -0
  369. package/fixtures/cases/unnamed-typed-path-names-a-type/context.json +11 -0
  370. package/fixtures/cases/unnamed-typed-path-names-a-type/expected.json +6 -0
  371. package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +7 -0
  372. package/fixtures/cases/unnamed-typed-path-names-a-type/schema.yaml +5 -0
  373. package/fixtures/cases/unnamed-typed-path-reads-its-type/context.json +11 -0
  374. package/fixtures/cases/unnamed-typed-path-reads-its-type/expected.json +3 -0
  375. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/plan.md +1 -0
  376. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +6 -0
  377. package/fixtures/cases/unnamed-typed-path-reads-its-type/schema.yaml +5 -0
  378. package/fixtures/cases/unnamed-typed-path-without-a-body/context.json +11 -0
  379. package/fixtures/cases/unnamed-typed-path-without-a-body/expected.json +5 -0
  380. package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +5 -0
  381. package/fixtures/cases/unnamed-typed-path-without-a-body/schema.yaml +5 -0
  382. package/fixtures/cases/unresolved-link/library/item.md +1 -1
  383. package/fixtures/cases/unresolved-link/schema.yaml +2 -3
  384. package/fixtures/cases/valid-typed-document/library/people/ada.md +1 -1
  385. package/fixtures/cases/valid-typed-document/library/tasks/one.md +11 -11
  386. package/fixtures/cases/valid-typed-document/schema.yaml +5 -6
  387. package/fixtures/forms.json +371 -0
  388. package/fixtures/preamble.json +29 -8
  389. package/fixtures/queries.json +1562 -0
  390. package/package.json +10 -1
  391. package/dist/blocks.d.ts +0 -11
  392. package/dist/blocks.d.ts.map +0 -1
  393. package/dist/blocks.js +0 -91
  394. package/dist/condition.d.ts +0 -163
  395. package/dist/condition.d.ts.map +0 -1
  396. package/dist/condition.js +0 -617
  397. package/dist/divide.d.ts +0 -3
  398. package/dist/divide.d.ts.map +0 -1
  399. package/dist/divide.js +0 -320
  400. package/dist/links.d.ts +0 -29
  401. package/dist/links.d.ts.map +0 -1
  402. package/dist/links.js +0 -831
  403. package/dist/profile.d.ts +0 -6
  404. package/dist/profile.d.ts.map +0 -1
  405. package/dist/profile.js +0 -5
  406. package/dist/project.d.ts +0 -22
  407. package/dist/project.d.ts.map +0 -1
  408. package/dist/project.js +0 -128
  409. package/dist/sections.d.ts +0 -11
  410. package/dist/sections.d.ts.map +0 -1
  411. package/dist/sections.js +0 -57
  412. package/fixtures/cases/conditional-section/schema.yaml +0 -14
  413. package/fixtures/cases/missing-section-item-kind/expected.json +0 -5
  414. package/fixtures/cases/missing-section-item-kind/schema.yaml +0 -6
  415. package/fixtures/cases/null-refused/expected.json +0 -6
  416. package/fixtures/cases/null-refused/library/companies/acme.md +0 -4
  417. package/fixtures/cases/null-refused/library/deals/renewal.md +0 -31
  418. package/fixtures/cases/null-refused/schema.yaml +0 -56
  419. package/fixtures/cases/open-map-value/expected.json +0 -6
  420. package/fixtures/cases/open-map-value/library/companies/acme.md +0 -4
  421. package/fixtures/cases/open-map-value/library/deals/renewal.md +0 -31
  422. package/fixtures/cases/open-map-value/schema.yaml +0 -56
  423. package/fixtures/cases/section-item-enum/expected.json +0 -6
  424. package/fixtures/cases/section-item-enum/library/task.md +0 -8
  425. package/fixtures/cases/section-item-enum/schema.yaml +0 -3
  426. package/fixtures/cases/section-item-kind/expected.json +0 -6
  427. package/fixtures/cases/section-item-kind/library/task.md +0 -8
  428. package/fixtures/cases/section-item-kind/schema.yaml +0 -3
  429. package/fixtures/cases/section-items/library/page.md +0 -42
  430. package/fixtures/cases/section-items/schema.yaml +0 -10
  431. package/fixtures/cases/section-reference-path/expected.json +0 -6
  432. package/fixtures/cases/section-reference-path/library/page.md +0 -7
  433. package/fixtures/cases/section-reference-path/schema.yaml +0 -3
  434. package/fixtures/cases/section-reference-type/expected.json +0 -6
  435. package/fixtures/cases/section-reference-type/library/page.md +0 -7
  436. package/fixtures/cases/section-reference-type/schema.yaml +0 -3
  437. package/fixtures/cases/structured-section/expected.json +0 -6
  438. package/fixtures/division.json +0 -409
  439. package/fixtures/projection.json +0 -255
  440. /package/fixtures/cases/{conditional-section → block-scalar-frontmatter}/context.json +0 -0
  441. /package/fixtures/cases/{section-items → block-scalar-frontmatter}/expected.json +0 -0
  442. /package/fixtures/cases/{missing-section-item-kind → conditional-long-text}/context.json +0 -0
  443. /package/fixtures/cases/{null-refused → equal-labels}/context.json +0 -0
  444. /package/fixtures/cases/{open-map-value → frontmatter-construct}/context.json +0 -0
  445. /package/fixtures/cases/{section-item-enum → labels-in-the-rooms-language}/context.json +0 -0
  446. /package/fixtures/cases/{section-item-kind → lazy-list-item}/context.json +0 -0
  447. /package/fixtures/cases/{section-reference-path → link-into-a-reserved-name}/context.json +0 -0
  448. /package/fixtures/cases/{section-items → link-into-a-reserved-name-from-an-untyped-document}/context.json +0 -0
  449. /package/fixtures/cases/{section-reference-type → list-item-enum}/context.json +0 -0
  450. /package/fixtures/cases/{structured-section → list-item-kind}/context.json +0 -0
  451. /package/fixtures/cases/{section-items → list-items}/library/other.md +0 -0
  452. /package/fixtures/cases/{section-reference-path → list-reference-path}/library/other.md +0 -0
  453. /package/fixtures/cases/{section-reference-type → list-reference-type}/library/note.md +0 -0
@@ -1,409 +0,0 @@
1
- {
2
- "schema": "task:\n type: object\n properties:\n name: { type: string }\n status: { enum: [open, done] }\n required: [status]\n sections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, items: { type: string, reference: person } }\nperson: {}\n",
3
- "cases": [
4
- {
5
- "name": "a Document whose whole input fits the bound is one Span carrying its projection",
6
- "file": "tasks/one.md",
7
- "source": "---\ntype: task\nname: Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Acceptance\n\n- people/ana.md\n",
8
- "documentTargets": [],
9
- "definition": "task",
10
- "bound": 4096,
11
- "expected": {
12
- "ok": true,
13
- "spans": [
14
- {
15
- "text": "Ship the release\n\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n",
16
- "source": "Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n"
17
- }
18
- ]
19
- }
20
- },
21
- {
22
- "name": "an input over the bound descends to whole heading nodes and packs adjacent siblings",
23
- "file": "tasks/one.md",
24
- "source": "---\ntype: task\nname: Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Notes\n\nNotes prose.\n\n## Acceptance\n\n- people/ana.md\n",
25
- "documentTargets": [],
26
- "definition": "task",
27
- "bound": 45,
28
- "expected": {
29
- "ok": true,
30
- "spans": [
31
- {
32
- "text": "Ship the release\n\n\nPreamble prose.\n\n",
33
- "source": "Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n"
34
- },
35
- {
36
- "text": "## Description\n\nBody of the description.\n\n",
37
- "source": "## Description\n\nBody of the description.\n\n"
38
- },
39
- {
40
- "text": "## Notes\n\nNotes prose.\n\n",
41
- "source": "## Notes\n\nNotes prose.\n\n"
42
- }
43
- ]
44
- }
45
- },
46
- {
47
- "name": "a heading node over the bound divides into adjacent blocks carrying its own heading",
48
- "file": "tasks/one.md",
49
- "source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nFirst paragraph of the overview.\n\nSecond paragraph of the overview.\n\n## Notes\n\nShort note.\n",
50
- "documentTargets": [],
51
- "definition": "task",
52
- "bound": 50,
53
- "expected": {
54
- "ok": true,
55
- "spans": [
56
- {
57
- "text": "Task\n\n\n",
58
- "source": "Task\nstatus: open\n---\n\n"
59
- },
60
- {
61
- "text": "## Overview\n\nFirst paragraph of the overview.\n\n",
62
- "source": "## Overview\n\nFirst paragraph of the overview.\n\n"
63
- },
64
- {
65
- "text": "## Overview\n\nSecond paragraph of the overview.\n\n",
66
- "source": "Second paragraph of the overview.\n\n"
67
- },
68
- {
69
- "text": "## Notes\n\nShort note.\n",
70
- "source": "## Notes\n\nShort note.\n"
71
- }
72
- ]
73
- }
74
- },
75
- {
76
- "name": "a node continuation and the next whole sibling stay in their own Spans",
77
- "file": "tasks/one.md",
78
- "source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nFirst paragraph of the overview.\n\nSecond paragraph of the overview.\n\n## Notes\n\nShort note.\n",
79
- "documentTargets": [],
80
- "definition": "task",
81
- "bound": 75,
82
- "expected": {
83
- "ok": true,
84
- "spans": [
85
- {
86
- "text": "Task\n\n\n",
87
- "source": "Task\nstatus: open\n---\n\n"
88
- },
89
- {
90
- "text": "## Overview\n\nFirst paragraph of the overview.\n\n",
91
- "source": "## Overview\n\nFirst paragraph of the overview.\n\n"
92
- },
93
- {
94
- "text": "## Overview\n\nSecond paragraph of the overview.\n\n",
95
- "source": "Second paragraph of the overview.\n\n"
96
- },
97
- {
98
- "text": "## Notes\n\nShort note.\n",
99
- "source": "## Notes\n\nShort note.\n"
100
- }
101
- ]
102
- }
103
- },
104
- {
105
- "name": "a continuation Span carries its own node heading and never an ancestor heading",
106
- "file": "tasks/one.md",
107
- "source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nIntro line.\n\n### Detail\n\nDetail paragraph one.\n\nDetail paragraph two.\n",
108
- "documentTargets": [],
109
- "definition": "task",
110
- "bound": 40,
111
- "expected": {
112
- "ok": true,
113
- "spans": [
114
- {
115
- "text": "Task\n\n\n",
116
- "source": "Task\nstatus: open\n---\n\n"
117
- },
118
- {
119
- "text": "## Overview\n\nIntro line.\n\n",
120
- "source": "## Overview\n\nIntro line.\n\n"
121
- },
122
- {
123
- "text": "### Detail\n\nDetail paragraph one.\n\n",
124
- "source": "### Detail\n\nDetail paragraph one.\n\n"
125
- },
126
- {
127
- "text": "### Detail\n\nDetail paragraph two.\n",
128
- "source": "Detail paragraph two.\n"
129
- }
130
- ]
131
- }
132
- },
133
- {
134
- "name": "a block over the bound divides into sentences that repeat their predecessor",
135
- "file": "tasks/one.md",
136
- "source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nOne. Two. Three. Four.\n",
137
- "documentTargets": [],
138
- "definition": "task",
139
- "bound": 30,
140
- "expected": {
141
- "ok": true,
142
- "spans": [
143
- {
144
- "text": "Task\n\n\n",
145
- "source": "Task\nstatus: open\n---\n\n"
146
- },
147
- {
148
- "text": "## Overview\n\nOne. Two. Three. ",
149
- "source": "## Overview\n\nOne. Two. Three. "
150
- },
151
- {
152
- "text": "## Overview\n\nThree. Four.\n",
153
- "source": "Three. Four.\n"
154
- }
155
- ]
156
- }
157
- },
158
- {
159
- "name": "a single sentence over the bound divides at a bound cut inside it",
160
- "file": "tasks/one.md",
161
- "source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\naaaa bbbb cccc dddd eeee\n",
162
- "documentTargets": [],
163
- "definition": "task",
164
- "bound": 20,
165
- "expected": {
166
- "ok": true,
167
- "spans": [
168
- {
169
- "text": "Task\n\n\n",
170
- "source": "Task\nstatus: open\n---\n\n"
171
- },
172
- {
173
- "text": "## Overview\n\naaaa",
174
- "source": "## Overview\n\naaaa"
175
- },
176
- {
177
- "text": "## Overview\n\n bbbb",
178
- "source": " bbbb"
179
- },
180
- {
181
- "text": "## Overview\n\n cccc",
182
- "source": " cccc"
183
- },
184
- {
185
- "text": "## Overview\n\n dddd",
186
- "source": " dddd"
187
- },
188
- {
189
- "text": "## Overview\n\n eeee\n",
190
- "source": " eeee\n"
191
- }
192
- ]
193
- }
194
- },
195
- {
196
- "name": "an untyped input with no definition descends the same ladder",
197
- "file": "notes/one.md",
198
- "source": "# Title\n\nIntro paragraph about the whole thing.\n\n## Alpha\n\nAlpha one. Alpha two.\n\n### Deep\n\nDeep prose here.\n\n## Beta\n\nBeta prose.\n",
199
- "documentTargets": [],
200
- "definition": null,
201
- "bound": 60,
202
- "expected": {
203
- "ok": true,
204
- "spans": [
205
- {
206
- "text": "# Title\n\nIntro paragraph about the whole thing.\n\n",
207
- "source": "# Title\n\nIntro paragraph about the whole thing.\n\n"
208
- },
209
- {
210
- "text": "## Alpha\n\nAlpha one. Alpha two.\n\n",
211
- "source": "## Alpha\n\nAlpha one. Alpha two.\n\n"
212
- },
213
- {
214
- "text": "### Deep\n\nDeep prose here.\n\n",
215
- "source": "### Deep\n\nDeep prose here.\n\n"
216
- },
217
- {
218
- "text": "## Beta\n\nBeta prose.\n",
219
- "source": "## Beta\n\nBeta prose.\n"
220
- }
221
- ]
222
- }
223
- },
224
- {
225
- "name": "a Document that declares the built-in any type divides its body after the fence",
226
- "file": "notes/two.md",
227
- "source": "---\ntype: any\ntitle: Note\n---\n\n## Notes\n\nRead it.\n",
228
- "documentTargets": [],
229
- "definition": null,
230
- "bound": 4096,
231
- "expected": {
232
- "ok": true,
233
- "spans": [
234
- {
235
- "text": "\n## Notes\n\nRead it.\n",
236
- "source": "\n## Notes\n\nRead it.\n"
237
- }
238
- ]
239
- }
240
- },
241
- {
242
- "name": "an internal link embeds its label and addresses the destination the author wrote",
243
- "file": "tasks/one.md",
244
- "source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nRead [the plan](../plans/q3.md) before starting.\n\n## Notes\n\nShort note.\n",
245
- "documentTargets": [
246
- "plans/q3.md"
247
- ],
248
- "definition": "task",
249
- "bound": 50,
250
- "expected": {
251
- "ok": true,
252
- "spans": [
253
- {
254
- "text": "Task\n\n\n",
255
- "source": "Task\nstatus: open\n---\n\n"
256
- },
257
- {
258
- "text": "## Overview\n\nRead the plan before starting.\n\n",
259
- "source": "## Overview\n\nRead [the plan](../plans/q3.md) before starting.\n\n"
260
- },
261
- {
262
- "text": "## Notes\n\nShort note.\n",
263
- "source": "## Notes\n\nShort note.\n"
264
- }
265
- ]
266
- }
267
- },
268
- {
269
- "name": "a declared structured section stays outside the text and inside the extent",
270
- "file": "tasks/one.md",
271
- "source": "---\ntype: task\nname: Task\nstatus: open\n---\n\nPreamble prose.\n\n## Acceptance\n\n- people/ana.md\n\n## Notes\n\nShort note.\n",
272
- "documentTargets": [],
273
- "definition": "task",
274
- "bound": 4096,
275
- "expected": {
276
- "ok": true,
277
- "spans": [
278
- {
279
- "text": "Task\n\n\nPreamble prose.\n\n## Notes\n\nShort note.\n",
280
- "source": "Task\nstatus: open\n---\n\nPreamble prose.\n\n## Acceptance\n\n- people/ana.md\n\n## Notes\n\nShort note.\n"
281
- }
282
- ]
283
- }
284
- },
285
- {
286
- "name": "a Document that declares a type the caller supplies no definition for is refused",
287
- "file": "tasks/one.md",
288
- "source": "---\ntype: task\nname: Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Acceptance\n\n- people/ana.md\n",
289
- "documentTargets": [],
290
- "definition": null,
291
- "bound": 4096,
292
- "expected": {
293
- "ok": false,
294
- "refusal": {
295
- "file": "tasks/one.md",
296
- "rule": "unknown-type",
297
- "location": "type"
298
- }
299
- }
300
- },
301
- {
302
- "name": "a bound that cannot hold one whole character is refused before any division",
303
- "file": "notes/one.md",
304
- "source": "## Notes\n\nShort note.\n",
305
- "documentTargets": [],
306
- "definition": null,
307
- "bound": 1,
308
- "expected": {
309
- "ok": false,
310
- "refusal": {
311
- "file": "notes/one.md",
312
- "rule": "division-bound"
313
- }
314
- }
315
- },
316
- {
317
- "name": "a free-text value the author quoted embeds bare and addresses the quotes it was written with",
318
- "file": "tasks/one.md",
319
- "source": "---\ntype: task\nname: \"Ship: the release\"\nstatus: open\n---\n\nBody prose.\n",
320
- "documentTargets": [],
321
- "definition": "task",
322
- "bound": 4096,
323
- "expected": {
324
- "ok": true,
325
- "spans": [
326
- {
327
- "text": "Ship: the release\n\n\nBody prose.\n",
328
- "source": "\"Ship: the release\"\nstatus: open\n---\n\nBody prose.\n"
329
- }
330
- ]
331
- }
332
- },
333
- {
334
- "name": "sentence division reads every terminator and closer and drops a carry the bound cannot hold",
335
- "file": "notes/three.md",
336
- "source": "## Ask\n\nReady? Go! He said \"no.\" Then (silence.) Done.\n",
337
- "documentTargets": [],
338
- "definition": null,
339
- "bound": 30,
340
- "expected": {
341
- "ok": true,
342
- "spans": [
343
- {
344
- "text": "## Ask\n\nReady? Go! ",
345
- "source": "## Ask\n\nReady? Go! "
346
- },
347
- {
348
- "text": "## Ask\n\nGo! He said \"no.\" ",
349
- "source": "Go! He said \"no.\" "
350
- },
351
- {
352
- "text": "## Ask\n\nThen (silence.) Done.\n",
353
- "source": "Then (silence.) Done.\n"
354
- }
355
- ]
356
- }
357
- },
358
- {
359
- "name": "a heading with no body of its own leads the first child node instead of standing alone",
360
- "file": "notes/four.md",
361
- "source": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n### Beta\n\nBeta prose.\n",
362
- "documentTargets": [],
363
- "definition": null,
364
- "bound": 70,
365
- "expected": {
366
- "ok": true,
367
- "spans": [
368
- {
369
- "text": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n",
370
- "source": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n"
371
- },
372
- {
373
- "text": "### Beta\n\nBeta prose.\n",
374
- "source": "### Beta\n\nBeta prose.\n"
375
- }
376
- ]
377
- }
378
- },
379
- {
380
- "name": "a heading the bound cannot hold beside any text is not repeated",
381
- "file": "notes/five.md",
382
- "source": "## An overview of the release\n\nFirst paragraph here.\n\nSecond paragraph here.\n",
383
- "documentTargets": [],
384
- "definition": null,
385
- "bound": 25,
386
- "expected": {
387
- "ok": true,
388
- "spans": [
389
- {
390
- "text": "## An overview of the",
391
- "source": "## An overview of the"
392
- },
393
- {
394
- "text": " release\n\nFirst paragraph",
395
- "source": " release\n\nFirst paragraph"
396
- },
397
- {
398
- "text": " here.\n\n",
399
- "source": " here.\n\n"
400
- },
401
- {
402
- "text": "Second paragraph here.\n",
403
- "source": "Second paragraph here.\n"
404
- }
405
- ]
406
- }
407
- }
408
- ]
409
- }
@@ -1,255 +0,0 @@
1
- {
2
- "schema": "$defs:\n line: { type: string }\ntask:\n type: object\n properties:\n name: { type: string }\n aliases: { type: array, items: { type: string } }\n title: { type: string, pattern: '\\S' }\n status: { enum: [open, done] }\n owner: { type: string, reference: person }\n reviewers: { type: array, items: { type: string, reference: person } }\n due: { type: string, format: date }\n estimate: { type: number }\n labels: { type: array, items: { type: string, pattern: '^[a-z]+$' } }\n contact:\n type: object\n properties:\n note: { type: string }\n email: { type: string, format: email }\n notes: { type: object, additionalProperties: { type: string } }\n backup: { $ref: '#/$defs/line', format: email }\n memo: { type: [string, 'null'] }\n steps:\n type: array\n items:\n type: object\n properties:\n title: { type: string }\n done: { type: boolean }\n required: [name, title, status]\n sections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, items: { type: string, reference: person } }\n Checklist: { kind: list, items: { type: string } }\nperson: {}\n",
3
- "cases": [
4
- {
5
- "name": "any body keeps labels and leaves every unsupplied destination authored",
6
- "file": "notes/one.md",
7
- "source": "---\ntitle: Note\n---\n\nRead [the plan](../plans/q3.md#goals \"Plan\") and ![the figure](../assets/figure.png).\nSee the [site](https://example.com/x.md) and this [anchor](#here).\nAn [unheld draft](../plans/draft.md) keeps the destination nobody supplied.\nEscaped \\[the plan\\](../plans/q3.md) stays, and so does `[the plan](../plans/q3.md)`.\n\n```sh\ncat [the plan](../plans/q3.md)\n```\n",
8
- "documentTargets": [
9
- "plans/q3.md",
10
- "plans/2026-q3.md"
11
- ],
12
- "definition": null,
13
- "move": {
14
- "href": "../plans/q3.md#goals",
15
- "to": "../plans/2026-q3.md"
16
- },
17
- "expected": {
18
- "ok": true,
19
- "text": "\nRead the plan and ![the figure](../assets/figure.png).\nSee the [site](https://example.com/x.md) and this [anchor](#here).\nAn [unheld draft](../plans/draft.md) keeps the destination nobody supplied.\nEscaped \\[the plan\\](../plans/q3.md) stays, and so does `[the plan](../plans/q3.md)`.\n\n```sh\ncat [the plan](../plans/q3.md)\n```\n"
20
- }
21
- },
22
- {
23
- "name": "any body without frontmatter projects from its first character",
24
- "file": "notes/two.md",
25
- "source": "# Title\n\nSee [the plan](plans/q3.md).\n",
26
- "documentTargets": [
27
- "notes/plans/q3.md",
28
- "notes/plans/2026-q3.md"
29
- ],
30
- "definition": null,
31
- "move": {
32
- "href": "plans/q3.md",
33
- "to": "plans/2026-q3.md"
34
- },
35
- "expected": {
36
- "ok": true,
37
- "text": "# Title\n\nSee the plan.\n"
38
- }
39
- },
40
- {
41
- "name": "a Document that declares the built-in any type projects its body like an undeclared one",
42
- "file": "notes/three.md",
43
- "source": "---\ntype: any\ntitle: Note\n---\n\n## Notes\n\nRead [the plan](../plans/q3.md#goals \"Plan\") and see the [site](https://example.com/x.md).\n",
44
- "documentTargets": [
45
- "plans/q3.md",
46
- "plans/2026-q3.md"
47
- ],
48
- "definition": null,
49
- "move": {
50
- "href": "../plans/q3.md#goals",
51
- "to": "../plans/2026-q3.md"
52
- },
53
- "expected": {
54
- "ok": true,
55
- "text": "\n## Notes\n\nRead the plan and see the [site](https://example.com/x.md).\n"
56
- }
57
- },
58
- {
59
- "name": "a typed Document projects its free-text field values as bare values and no other kind",
60
- "file": "tasks/four.md",
61
- "source": "---\ntype: task\nname: Ship the release\naliases: [\"Launch day\", Cutover]\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\ndue: 2026-09-30\nestimate: 3\nlabels: [core, urgent]\n---\n",
62
- "documentTargets": [],
63
- "definition": "task",
64
- "move": null,
65
- "expected": {
66
- "ok": true,
67
- "text": "Ship the release\n\nLaunch day\n\nCutover\n\n"
68
- }
69
- },
70
- {
71
- "name": "a typed Document projects its prose at any depth in document order and leaves every filtered value out",
72
- "file": "tasks/twelve.md",
73
- "source": "---\ntype: task\nname: Ship the release\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\nreviewers: [../people/bo.md]\ndue: 2026-09-30\ncontact:\n note: Call before noon\n email: ana@example.com\nsteps:\n - title: Tag the build\n done: true\n - title: Announce it\n done: false\n---\n\n## Description\n\nCut the release.\n\n## Acceptance\n\n- [Ana](../people/ana.md)\n\n## Checklist\n\n- Notes written\n",
74
- "documentTargets": [],
75
- "definition": "task",
76
- "move": null,
77
- "filtered": {
78
- "field": "status",
79
- "value": "done"
80
- },
81
- "expected": {
82
- "ok": true,
83
- "text": "Ship the release\n\nCall before noon\n\nTag the build\n\nAnnounce it\n\n\n## Description\n\nCut the release.\n\n## Checklist\n\n- Notes written\n"
84
- }
85
- },
86
- {
87
- "name": "a typed Document projects the prose of an open map and a nullable string and leaves a formatted $ref out",
88
- "file": "tasks/launch.md",
89
- "source": "---\ntype: task\nname: Plan the launch\ntitle: Plan\nstatus: open\nnotes:\n monday: Book the room\n friday: Send the invite\nbackup: ana@example.com\nmemo: Bring slides\n---\n\n## Description\n\nLaunch.\n",
90
- "documentTargets": [],
91
- "definition": "task",
92
- "move": null,
93
- "filtered": {
94
- "field": "backup",
95
- "value": "bo@example.com"
96
- },
97
- "expected": {
98
- "ok": true,
99
- "text": "Plan the launch\n\nBook the room\n\nSend the invite\n\nBring slides\n\n\n## Description\n\nLaunch.\n"
100
- }
101
- },
102
- {
103
- "name": "a typed Document projects its preamble and every section its type does not declare as structure",
104
- "file": "tasks/one.md",
105
- "source": "---\ntype: task\nname: Shipping the release\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\n---\n\nPreamble prose that mentions [the plan](../plans/q3.md).\n\n## Description\n\nFollow [the plan][plan] and [the plan][plan] again, then [read it][].\n\n[plan]: ../plans/q3.md \"Plan\"\n[read it]: ../plans/q3.md\n\n## Acceptance\n\n- [the plan](../plans/q3.md) is linked\n\n## Checklist\n\n- [the plan](../plans/q3.md) is read\n\n## Notes\n\nUndeclared prose about [the plan](../plans/q3.md).\n",
106
- "documentTargets": [
107
- "plans/q3.md",
108
- "plans/2026-q3.md"
109
- ],
110
- "definition": "task",
111
- "move": {
112
- "href": "../plans/q3.md",
113
- "to": "../plans/2026-q3.md"
114
- },
115
- "relabel": {
116
- "from": "[the plan][plan] and",
117
- "to": "[the roadmap][plan] and",
118
- "expected": {
119
- "ok": true,
120
- "text": "Shipping the release\n\n\nPreamble prose that mentions the plan.\n\n## Description\n\nFollow the roadmap and the plan again, then read it.\n\n\n## Checklist\n\n- the plan is read\n\n## Notes\n\nUndeclared prose about the plan.\n"
121
- }
122
- },
123
- "expected": {
124
- "ok": true,
125
- "text": "Shipping the release\n\n\nPreamble prose that mentions the plan.\n\n## Description\n\nFollow the plan and the plan again, then read it.\n\n\n## Checklist\n\n- the plan is read\n\n## Notes\n\nUndeclared prose about the plan.\n"
126
- }
127
- },
128
- {
129
- "name": "a link definition in another section resolves its use and leaves the projection",
130
- "file": "tasks/two.md",
131
- "source": "---\ntype: task\ntitle: Ship it\nstatus: open\n---\n\n## Description\n\nFollow [the plan][plan].\n\n## Notes\n\n[plan]: ../plans/q3.md\n",
132
- "documentTargets": [
133
- "plans/q3.md",
134
- "plans/2026-q3.md"
135
- ],
136
- "definition": "task",
137
- "move": {
138
- "href": "../plans/q3.md",
139
- "to": "../plans/2026-q3.md"
140
- },
141
- "expected": {
142
- "ok": true,
143
- "text": "\n## Description\n\nFollow the plan.\n\n## Notes\n\n"
144
- }
145
- },
146
- {
147
- "name": "every occurrence of a declared free-text section is projected",
148
- "file": "tasks/three.md",
149
- "source": "---\ntype: task\ntitle: Ship it\nstatus: open\n---\n\n## Description\n\nFirst [plan](../plans/q3.md).\n\n## Description\n\nSecond note.\n",
150
- "documentTargets": [
151
- "plans/q3.md",
152
- "plans/2026-q3.md"
153
- ],
154
- "definition": "task",
155
- "move": {
156
- "href": "../plans/q3.md",
157
- "to": "../plans/2026-q3.md"
158
- },
159
- "expected": {
160
- "ok": true,
161
- "text": "\n## Description\n\nFirst plan.\n\n## Description\n\nSecond note.\n"
162
- }
163
- },
164
- {
165
- "name": "a declared type the caller does not supply is refused",
166
- "file": "tasks/one.md",
167
- "source": "---\ntype: task\nname: Shipping the release\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\n---\n\nPreamble prose that mentions [the plan](../plans/q3.md).\n\n## Description\n\nFollow [the plan][plan] and [the plan][plan] again, then [read it][].\n\n[plan]: ../plans/q3.md \"Plan\"\n[read it]: ../plans/q3.md\n\n## Acceptance\n\n- [the plan](../plans/q3.md) is linked\n\n## Checklist\n\n- [the plan](../plans/q3.md) is read\n\n## Notes\n\nUndeclared prose about [the plan](../plans/q3.md).\n",
168
- "documentTargets": [
169
- "plans/q3.md",
170
- "plans/2026-q3.md"
171
- ],
172
- "definition": null,
173
- "move": null,
174
- "expected": {
175
- "ok": false,
176
- "refusal": {
177
- "file": "tasks/one.md",
178
- "rule": "unknown-type",
179
- "location": "type"
180
- }
181
- }
182
- },
183
- {
184
- "name": "an image at a supplied Markdown document target is projected like its link",
185
- "file": "notes/four.md",
186
- "source": "Read [the plan](../plans/q3.md) and ![the chart](../plans/q3.md).\nAlso [the plan][plan] and ![the chart][plan].\n\n[plan]: ../plans/q3.md\n",
187
- "documentTargets": [
188
- "plans/q3.md",
189
- "plans/2026-q3.md"
190
- ],
191
- "definition": null,
192
- "move": {
193
- "href": "../plans/q3.md",
194
- "to": "../plans/2026-q3.md"
195
- },
196
- "expected": {
197
- "ok": true,
198
- "text": "Read the plan and the chart.\nAlso the plan and the chart.\n\n"
199
- }
200
- },
201
- {
202
- "name": "a shortcut reference link projects its label and its definition leaves the projection",
203
- "file": "notes/five.md",
204
- "source": "Read [Plan] and [the draft], then [plan](not a link).\nAlso [[Plan]], [ plan ], \\[Plan] and [Release plan].\n\n[plan]: ../plans/q3.md\n[release plan]: ../plans/q3.md\n",
205
- "documentTargets": [
206
- "plans/q3.md",
207
- "plans/2026-q3.md"
208
- ],
209
- "definition": null,
210
- "move": {
211
- "href": "../plans/q3.md",
212
- "to": "../plans/2026-q3.md"
213
- },
214
- "links": [
215
- {
216
- "href": "../plans/q3.md",
217
- "target": "plans/q3.md"
218
- }
219
- ],
220
- "expected": {
221
- "ok": true,
222
- "text": "Read Plan and [the draft], then plan(not a link).\nAlso [Plan], plan , \\[Plan] and Release plan.\n\n"
223
- }
224
- },
225
- {
226
- "name": "an image whose description holds a link projects both labels",
227
- "file": "notes/six.md",
228
- "source": "Read ![outer [Plan](../plans/q3.md)](../plans/q4.md).\n",
229
- "documentTargets": [
230
- "plans/q3.md",
231
- "plans/2026-q3.md",
232
- "plans/q4.md"
233
- ],
234
- "definition": null,
235
- "move": {
236
- "href": "../plans/q3.md",
237
- "to": "../plans/2026-q3.md"
238
- },
239
- "links": [
240
- {
241
- "href": "../plans/q3.md",
242
- "target": "plans/q3.md"
243
- },
244
- {
245
- "href": "../plans/q4.md",
246
- "target": "plans/q4.md"
247
- }
248
- ],
249
- "expected": {
250
- "ok": true,
251
- "text": "Read outer Plan.\n"
252
- }
253
- }
254
- ]
255
- }