@agentshouse/mdmodel 0.1.0-alpha.8 → 0.1.0-c001b4068d4dc

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 (561) hide show
  1. package/API.md +434 -0
  2. package/README.md +42 -183
  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 +90 -31
  10. package/dist/definition.d.ts.map +1 -1
  11. package/dist/definition.js +859 -135
  12. package/dist/divide.d.ts +3 -0
  13. package/dist/divide.d.ts.map +1 -0
  14. package/dist/divide.js +321 -0
  15. package/dist/document.d.ts +19 -3
  16. package/dist/document.d.ts.map +1 -1
  17. package/dist/document.js +1033 -188
  18. package/dist/event.d.ts +77 -0
  19. package/dist/event.d.ts.map +1 -0
  20. package/dist/event.js +200 -0
  21. package/dist/facts.d.ts +15 -0
  22. package/dist/facts.d.ts.map +1 -0
  23. package/dist/facts.js +41 -0
  24. package/dist/fields.d.ts +6 -0
  25. package/dist/fields.d.ts.map +1 -0
  26. package/dist/fields.js +10 -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 +870 -0
  31. package/dist/house-model.d.ts.map +1 -0
  32. package/dist/house-model.js +472 -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 +9 -0
  37. package/dist/house-references/patterns.d.ts.map +1 -0
  38. package/dist/house-references/patterns.js +13 -0
  39. package/dist/index.d.ts +47 -4
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +29 -5
  42. package/dist/indexed.d.ts +9 -0
  43. package/dist/indexed.d.ts.map +1 -0
  44. package/dist/indexed.js +55 -0
  45. package/dist/kinds.d.ts +21 -0
  46. package/dist/kinds.d.ts.map +1 -0
  47. package/dist/kinds.js +210 -0
  48. package/dist/markdown.d.ts +75 -0
  49. package/dist/markdown.d.ts.map +1 -0
  50. package/dist/markdown.js +265 -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 +7 -0
  55. package/dist/moment.d.ts.map +1 -0
  56. package/dist/moment.js +18 -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 +30 -5
  61. package/dist/paths.d.ts.map +1 -1
  62. package/dist/paths.js +220 -35
  63. package/dist/pattern.d.ts +10 -0
  64. package/dist/pattern.d.ts.map +1 -0
  65. package/dist/pattern.js +356 -0
  66. package/dist/project.d.ts +20 -1
  67. package/dist/project.d.ts.map +1 -1
  68. package/dist/project.js +83 -78
  69. package/dist/query/language.d.ts +255 -0
  70. package/dist/query/language.d.ts.map +1 -0
  71. package/dist/query/language.js +620 -0
  72. package/dist/query/match.d.ts +14 -0
  73. package/dist/query/match.d.ts.map +1 -0
  74. package/dist/query/match.js +150 -0
  75. package/dist/query/rows.d.ts +32 -0
  76. package/dist/query/rows.d.ts.map +1 -0
  77. package/dist/query/rows.js +158 -0
  78. package/dist/query/sql.d.ts +39 -0
  79. package/dist/query/sql.d.ts.map +1 -0
  80. package/dist/query/sql.js +285 -0
  81. package/dist/query/walk.d.ts +57 -0
  82. package/dist/query/walk.d.ts.map +1 -0
  83. package/dist/query/walk.js +183 -0
  84. package/dist/references.d.ts +4 -0
  85. package/dist/references.d.ts.map +1 -0
  86. package/dist/references.js +30 -0
  87. package/dist/refuse.d.ts +1 -0
  88. package/dist/refuse.d.ts.map +1 -1
  89. package/dist/refuse.js +3 -10
  90. package/dist/reserved.d.ts +6 -0
  91. package/dist/reserved.d.ts.map +1 -0
  92. package/dist/reserved.js +21 -0
  93. package/dist/room-types.d.ts +7 -0
  94. package/dist/room-types.d.ts.map +1 -0
  95. package/dist/room-types.js +136 -0
  96. package/dist/schema.d.ts +6 -5
  97. package/dist/schema.d.ts.map +1 -1
  98. package/dist/schema.js +143 -41
  99. package/dist/types.d.ts +101 -3
  100. package/dist/types.d.ts.map +1 -1
  101. package/dist/types.js +1 -3
  102. package/dist/validate.d.ts +37 -2
  103. package/dist/validate.d.ts.map +1 -1
  104. package/dist/validate.js +392 -153
  105. package/dist/version.d.ts +1 -1
  106. package/dist/version.d.ts.map +1 -1
  107. package/dist/version.js +1 -3
  108. package/dist/yaml.d.ts +9 -3
  109. package/dist/yaml.d.ts.map +1 -1
  110. package/dist/yaml.js +327 -202
  111. package/fixtures/README.md +136 -55
  112. package/fixtures/cases/absent-link-dangles/library/item.md +8 -0
  113. package/fixtures/cases/absent-link-dangles/schema.yaml +5 -0
  114. package/fixtures/cases/absent-optional-field/expected.json +1 -0
  115. package/fixtures/cases/absent-optional-field/library/companies/acme.md +4 -0
  116. package/fixtures/cases/absent-optional-field/library/deals/lead.md +6 -0
  117. package/fixtures/cases/absent-optional-field/schema.yaml +55 -0
  118. package/fixtures/cases/absolute-link/context.json +1 -0
  119. package/fixtures/cases/absolute-link/expected.json +5 -0
  120. package/fixtures/cases/absolute-link/library/item.md +8 -0
  121. package/fixtures/cases/absolute-link/schema.yaml +5 -0
  122. package/fixtures/cases/attachment-reference-any-file/context.json +1 -0
  123. package/fixtures/cases/attachment-reference-any-file/expected.json +1 -0
  124. package/fixtures/cases/attachment-reference-any-file/library/companies/acme.md +4 -0
  125. package/fixtures/cases/attachment-reference-any-file/library/deals/renewal.md +18 -0
  126. package/fixtures/cases/attachment-reference-any-file/library/places/depot.md +4 -0
  127. package/fixtures/cases/attachment-reference-any-file/library/products/seats.md +4 -0
  128. package/fixtures/cases/attachment-reference-any-file/library/products/support.md +4 -0
  129. package/fixtures/cases/attachment-reference-any-file/schema.yaml +32 -0
  130. package/fixtures/cases/attachment-reference-dangles/context.json +1 -0
  131. package/fixtures/cases/attachment-reference-dangles/expected.json +1 -0
  132. package/fixtures/cases/attachment-reference-dangles/library/companies/acme.md +4 -0
  133. package/fixtures/cases/attachment-reference-dangles/library/deals/renewal.md +18 -0
  134. package/fixtures/cases/attachment-reference-dangles/library/places/depot.md +4 -0
  135. package/fixtures/cases/attachment-reference-dangles/library/products/seats.md +4 -0
  136. package/fixtures/cases/attachment-reference-dangles/library/products/support.md +4 -0
  137. package/fixtures/cases/attachment-reference-dangles/schema.yaml +32 -0
  138. package/fixtures/cases/attachment-reference-outside/context.json +1 -0
  139. package/fixtures/cases/attachment-reference-outside/expected.json +7 -0
  140. package/fixtures/cases/attachment-reference-outside/library/companies/acme.md +4 -0
  141. package/fixtures/cases/attachment-reference-outside/library/deals/renewal.md +18 -0
  142. package/fixtures/cases/attachment-reference-outside/library/places/depot.md +4 -0
  143. package/fixtures/cases/attachment-reference-outside/library/products/seats.md +4 -0
  144. package/fixtures/cases/attachment-reference-outside/library/products/support.md +4 -0
  145. package/fixtures/cases/attachment-reference-outside/schema.yaml +32 -0
  146. package/fixtures/cases/binary-any-reference/expected.json +2 -2
  147. package/fixtures/cases/binary-any-reference/library/notes/draft.md +1 -1
  148. package/fixtures/cases/binary-any-reference/schema.yaml +4 -0
  149. package/fixtures/cases/binary-document-collision/expected.json +1 -2
  150. package/fixtures/cases/binary-document-collision/schema.yaml +1 -0
  151. package/fixtures/cases/binary-image-dangles/expected.json +1 -0
  152. package/fixtures/cases/binary-image-dangles/schema.yaml +1 -0
  153. package/fixtures/cases/binary-link-dangles/expected.json +1 -0
  154. package/fixtures/cases/binary-link-dangles/schema.yaml +1 -0
  155. package/fixtures/cases/binary-link-outside-collection/expected.json +1 -2
  156. package/fixtures/cases/binary-link-outside-collection/schema.yaml +1 -0
  157. package/fixtures/cases/binary-prototype-reference/expected.json +2 -2
  158. package/fixtures/cases/binary-prototype-reference/library/notes/draft.md +1 -1
  159. package/fixtures/cases/binary-prototype-reference/schema.yaml +4 -0
  160. package/fixtures/cases/binary-typed-reference/expected.json +2 -2
  161. package/fixtures/cases/binary-typed-reference/library/notes/draft.md +1 -1
  162. package/fixtures/cases/binary-typed-reference/schema.yaml +5 -0
  163. package/fixtures/cases/boolean-field/context.json +1 -0
  164. package/fixtures/cases/boolean-field/expected.json +7 -0
  165. package/fixtures/cases/boolean-field/library/companies/acme.md +4 -0
  166. package/fixtures/cases/boolean-field/library/deals/renewal.md +56 -0
  167. package/fixtures/cases/boolean-field/schema.yaml +55 -0
  168. package/fixtures/cases/bracketed-link-definition/library/item.md +1 -1
  169. package/fixtures/cases/bracketed-link-definition/schema.yaml +5 -0
  170. package/fixtures/cases/closed-nested-object/context.json +1 -0
  171. package/fixtures/cases/closed-nested-object/expected.json +7 -0
  172. package/fixtures/cases/closed-nested-object/library/companies/acme.md +4 -0
  173. package/fixtures/cases/closed-nested-object/library/deals/renewal.md +57 -0
  174. package/fixtures/cases/closed-nested-object/schema.yaml +55 -0
  175. package/fixtures/cases/composed-root-reference/context.json +1 -0
  176. package/fixtures/cases/composed-root-reference/expected.json +6 -0
  177. package/fixtures/cases/composed-root-reference/library/a.md +5 -0
  178. package/fixtures/cases/composed-root-reference/schema.yaml +13 -0
  179. package/fixtures/cases/conditional-long-text/context.json +1 -0
  180. package/fixtures/cases/conditional-long-text/expected.json +7 -0
  181. package/fixtures/cases/conditional-long-text/library/questions/hosting.md +9 -0
  182. package/fixtures/cases/conditional-long-text/library/questions/payments.md +12 -0
  183. package/fixtures/cases/conditional-long-text/schema.yaml +13 -0
  184. package/fixtures/cases/cross-room-link/context.json +1 -0
  185. package/fixtures/cases/cross-room-link/expected.json +1 -0
  186. package/fixtures/cases/cross-room-link/library/clients/acme.md +6 -0
  187. package/fixtures/cases/cross-room-link/schema.yaml +3 -0
  188. package/fixtures/cases/cross-room-reference/context.json +1 -0
  189. package/fixtures/cases/cross-room-reference/expected.json +1 -0
  190. package/fixtures/cases/cross-room-reference/library/clients/acme.md +9 -0
  191. package/fixtures/cases/cross-room-reference/schema.yaml +8 -0
  192. package/fixtures/cases/date-time-format/context.json +1 -0
  193. package/fixtures/cases/date-time-format/expected.json +7 -0
  194. package/fixtures/cases/date-time-format/library/companies/acme.md +4 -0
  195. package/fixtures/cases/date-time-format/library/deals/renewal.md +56 -0
  196. package/fixtures/cases/date-time-format/schema.yaml +55 -0
  197. package/fixtures/cases/declared-binary-links/schema.yaml +1 -0
  198. package/fixtures/cases/default-unfilled/context.json +1 -0
  199. package/fixtures/cases/default-unfilled/expected.json +6 -0
  200. package/fixtures/cases/default-unfilled/library/companies/acme.md +4 -0
  201. package/fixtures/cases/default-unfilled/library/deals/renewal.md +54 -0
  202. package/fixtures/cases/default-unfilled/schema.yaml +55 -0
  203. package/fixtures/cases/defs-pattern/context.json +1 -0
  204. package/fixtures/cases/defs-pattern/expected.json +7 -0
  205. package/fixtures/cases/defs-pattern/library/companies/acme.md +4 -0
  206. package/fixtures/cases/defs-pattern/library/deals/renewal.md +56 -0
  207. package/fixtures/cases/defs-pattern/schema.yaml +55 -0
  208. package/fixtures/cases/dependent-rule/context.json +1 -0
  209. package/fixtures/cases/dependent-rule/expected.json +6 -0
  210. package/fixtures/cases/dependent-rule/library/companies/acme.md +4 -0
  211. package/fixtures/cases/dependent-rule/library/deals/renewal.md +55 -0
  212. package/fixtures/cases/dependent-rule/schema.yaml +55 -0
  213. package/fixtures/cases/duplicate-link-definition/library/item.md +1 -1
  214. package/fixtures/cases/duplicate-link-definition/schema.yaml +5 -0
  215. package/fixtures/cases/email-format/context.json +1 -0
  216. package/fixtures/cases/email-format/expected.json +7 -0
  217. package/fixtures/cases/email-format/library/companies/acme.md +4 -0
  218. package/fixtures/cases/email-format/library/deals/renewal.md +56 -0
  219. package/fixtures/cases/email-format/schema.yaml +55 -0
  220. package/fixtures/cases/equal-labels/context.json +1 -0
  221. package/fixtures/cases/equal-labels/expected.json +5 -0
  222. package/fixtures/cases/equal-labels/schema.yaml +4 -0
  223. package/fixtures/cases/fenced-link-definition/library/item.md +1 -1
  224. package/fixtures/cases/fenced-link-definition/schema.yaml +5 -0
  225. package/fixtures/cases/field-enum/expected.json +3 -3
  226. package/fixtures/cases/field-enum/library/item.md +2 -2
  227. package/fixtures/cases/field-enum/schema.yaml +6 -0
  228. package/fixtures/cases/frontmatter-schema/context.json +1 -0
  229. package/fixtures/cases/frontmatter-schema/expected.json +5 -0
  230. package/fixtures/cases/frontmatter-schema/schema.yaml +5 -0
  231. package/fixtures/cases/integer-field/context.json +1 -0
  232. package/fixtures/cases/integer-field/expected.json +7 -0
  233. package/fixtures/cases/integer-field/library/companies/acme.md +4 -0
  234. package/fixtures/cases/integer-field/library/deals/renewal.md +56 -0
  235. package/fixtures/cases/integer-field/schema.yaml +55 -0
  236. package/fixtures/cases/interrupted-link-definition/schema.yaml +1 -0
  237. package/fixtures/cases/json-schema-constructs/context.json +1 -0
  238. package/fixtures/cases/json-schema-constructs/expected.json +1 -0
  239. package/fixtures/cases/json-schema-constructs/library/companies/acme.md +4 -0
  240. package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +56 -0
  241. package/fixtures/cases/json-schema-constructs/schema.yaml +55 -0
  242. package/fixtures/cases/labels-in-the-rooms-language/context.json +1 -0
  243. package/fixtures/cases/labels-in-the-rooms-language/expected.json +1 -0
  244. package/fixtures/cases/labels-in-the-rooms-language/library/deals/atlas.md +7 -0
  245. package/fixtures/cases/labels-in-the-rooms-language/schema.yaml +9 -0
  246. package/fixtures/cases/lazy-list-item/context.json +1 -0
  247. package/fixtures/cases/lazy-list-item/expected.json +3 -0
  248. package/fixtures/cases/lazy-list-item/library/item.md +10 -0
  249. package/fixtures/cases/lazy-list-item/schema.yaml +3 -0
  250. package/fixtures/cases/link-into-a-reserved-name/context.json +1 -0
  251. package/fixtures/cases/link-into-a-reserved-name/expected.json +5 -0
  252. package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +6 -0
  253. package/fixtures/cases/link-into-a-reserved-name/schema.yaml +3 -0
  254. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/context.json +1 -0
  255. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/expected.json +5 -0
  256. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/library/notes/b.md +5 -0
  257. package/fixtures/cases/list-item-enum/context.json +1 -0
  258. package/fixtures/cases/list-item-enum/expected.json +7 -0
  259. package/fixtures/cases/list-item-enum/library/task.md +7 -0
  260. package/fixtures/cases/list-item-enum/schema.yaml +3 -0
  261. package/fixtures/cases/list-item-kind/context.json +1 -0
  262. package/fixtures/cases/list-item-kind/expected.json +7 -0
  263. package/fixtures/cases/list-item-kind/library/task.md +6 -0
  264. package/fixtures/cases/list-item-kind/schema.yaml +3 -0
  265. package/fixtures/cases/list-items/context.json +1 -0
  266. package/fixtures/cases/list-items/expected.json +1 -0
  267. package/fixtures/cases/list-items/library/other.md +3 -0
  268. package/fixtures/cases/list-items/library/page.md +26 -0
  269. package/fixtures/cases/list-items/schema.yaml +10 -0
  270. package/fixtures/cases/list-of-objects-closed/context.json +1 -0
  271. package/fixtures/cases/list-of-objects-closed/expected.json +7 -0
  272. package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +4 -0
  273. package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +56 -0
  274. package/fixtures/cases/list-of-objects-closed/schema.yaml +55 -0
  275. package/fixtures/cases/list-of-objects-item/context.json +1 -0
  276. package/fixtures/cases/list-of-objects-item/expected.json +7 -0
  277. package/fixtures/cases/list-of-objects-item/library/companies/acme.md +4 -0
  278. package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +56 -0
  279. package/fixtures/cases/list-of-objects-item/schema.yaml +55 -0
  280. package/fixtures/cases/list-of-objects-reference/context.json +1 -0
  281. package/fixtures/cases/list-of-objects-reference/expected.json +7 -0
  282. package/fixtures/cases/list-of-objects-reference/library/companies/acme.md +4 -0
  283. package/fixtures/cases/list-of-objects-reference/library/deals/renewal.md +17 -0
  284. package/fixtures/cases/list-of-objects-reference/library/places/depot.md +4 -0
  285. package/fixtures/cases/list-of-objects-reference/library/products/seats.md +4 -0
  286. package/fixtures/cases/list-of-objects-reference/library/products/support.md +4 -0
  287. package/fixtures/cases/list-of-objects-reference/schema.yaml +32 -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/other.md +3 -0
  291. package/fixtures/cases/list-reference-path/library/page.md +5 -0
  292. package/fixtures/cases/list-reference-path/schema.yaml +3 -0
  293. package/fixtures/cases/list-reference-type/context.json +1 -0
  294. package/fixtures/cases/list-reference-type/expected.json +7 -0
  295. package/fixtures/cases/list-reference-type/library/note.md +1 -0
  296. package/fixtures/cases/list-reference-type/library/page.md +6 -0
  297. package/fixtures/cases/list-reference-type/schema.yaml +3 -0
  298. package/fixtures/cases/list-size/context.json +1 -0
  299. package/fixtures/cases/list-size/expected.json +7 -0
  300. package/fixtures/cases/list-size/library/companies/acme.md +4 -0
  301. package/fixtures/cases/list-size/library/deals/renewal.md +58 -0
  302. package/fixtures/cases/list-size/schema.yaml +55 -0
  303. package/fixtures/cases/long-fence-link-definition/schema.yaml +1 -0
  304. package/fixtures/cases/long-value-past-six-levels/context.json +1 -0
  305. package/fixtures/cases/long-value-past-six-levels/expected.json +5 -0
  306. package/fixtures/cases/long-value-past-six-levels/schema.yaml +15 -0
  307. package/fixtures/cases/malformed-definition/expected.json +2 -4
  308. package/fixtures/cases/malformed-definition/schema.yaml +3 -0
  309. package/fixtures/cases/malformed-list/context.json +1 -0
  310. package/fixtures/cases/malformed-list/expected.json +7 -0
  311. package/fixtures/cases/{structured-section → malformed-list}/library/item.md +1 -1
  312. package/fixtures/cases/malformed-list/schema.yaml +6 -0
  313. package/fixtures/cases/member-document/context.json +1 -0
  314. package/fixtures/cases/member-document/expected.json +1 -0
  315. package/fixtures/cases/member-document/library/people/ana.md +5 -0
  316. package/fixtures/cases/member-document/schema.yaml +5 -0
  317. package/fixtures/cases/member-on-an-untyped-document/context.json +1 -0
  318. package/fixtures/cases/member-on-an-untyped-document/expected.json +6 -0
  319. package/fixtures/cases/member-on-an-untyped-document/library/note.md +4 -0
  320. package/fixtures/cases/member-on-another-type/context.json +1 -0
  321. package/fixtures/cases/member-on-another-type/expected.json +6 -0
  322. package/fixtures/cases/member-on-another-type/library/note.md +4 -0
  323. package/fixtures/cases/member-on-another-type/schema.yaml +7 -0
  324. package/fixtures/cases/missing-required-field/expected.json +2 -3
  325. package/fixtures/cases/missing-required-field/library/item.md +1 -1
  326. package/fixtures/cases/missing-required-field/schema.yaml +6 -0
  327. package/fixtures/cases/misspelled-key/context.json +1 -0
  328. package/fixtures/cases/misspelled-key/expected.json +7 -0
  329. package/fixtures/cases/misspelled-key/library/companies/acme.md +4 -0
  330. package/fixtures/cases/misspelled-key/library/deals/renewal.md +57 -0
  331. package/fixtures/cases/misspelled-key/schema.yaml +55 -0
  332. package/fixtures/cases/name-not-a-string/context.json +1 -0
  333. package/fixtures/cases/name-not-a-string/expected.json +5 -0
  334. package/fixtures/cases/name-not-a-string/schema.yaml +5 -0
  335. package/fixtures/cases/nested-defs/context.json +1 -0
  336. package/fixtures/cases/nested-defs/expected.json +7 -0
  337. package/fixtures/cases/nested-defs/library/deal.md +6 -0
  338. package/fixtures/cases/nested-defs/schema.yaml +11 -0
  339. package/fixtures/cases/nested-object-reference/context.json +1 -0
  340. package/fixtures/cases/nested-object-reference/expected.json +7 -0
  341. package/fixtures/cases/nested-object-reference/library/companies/acme.md +4 -0
  342. package/fixtures/cases/nested-object-reference/library/deals/renewal.md +17 -0
  343. package/fixtures/cases/nested-object-reference/library/places/depot.md +4 -0
  344. package/fixtures/cases/nested-object-reference/library/products/seats.md +4 -0
  345. package/fixtures/cases/nested-object-reference/library/products/support.md +4 -0
  346. package/fixtures/cases/nested-object-reference/schema.yaml +32 -0
  347. package/fixtures/cases/nested-reference/context.json +1 -0
  348. package/fixtures/cases/nested-reference/expected.json +1 -0
  349. package/fixtures/cases/nested-reference/library/companies/acme.md +4 -0
  350. package/fixtures/cases/nested-reference/library/deals/renewal.md +18 -0
  351. package/fixtures/cases/nested-reference/library/places/depot.md +4 -0
  352. package/fixtures/cases/nested-reference/library/products/seats.md +4 -0
  353. package/fixtures/cases/nested-reference/library/products/support.md +4 -0
  354. package/fixtures/cases/nested-reference/schema.yaml +32 -0
  355. package/fixtures/cases/nested-required-field/context.json +1 -0
  356. package/fixtures/cases/nested-required-field/expected.json +7 -0
  357. package/fixtures/cases/nested-required-field/library/companies/acme.md +4 -0
  358. package/fixtures/cases/nested-required-field/library/deals/renewal.md +55 -0
  359. package/fixtures/cases/nested-required-field/schema.yaml +55 -0
  360. package/fixtures/cases/numeric-range/context.json +1 -0
  361. package/fixtures/cases/numeric-range/expected.json +7 -0
  362. package/fixtures/cases/numeric-range/library/companies/acme.md +4 -0
  363. package/fixtures/cases/numeric-range/library/deals/renewal.md +56 -0
  364. package/fixtures/cases/numeric-range/schema.yaml +55 -0
  365. package/fixtures/cases/one-key-two-labels/context.json +1 -0
  366. package/fixtures/cases/one-key-two-labels/expected.json +5 -0
  367. package/fixtures/cases/one-key-two-labels/schema.yaml +5 -0
  368. package/fixtures/cases/one-key-two-types/context.json +1 -0
  369. package/fixtures/cases/one-key-two-types/expected.json +5 -0
  370. package/fixtures/cases/one-key-two-types/schema.yaml +4 -0
  371. package/fixtures/cases/one-of-variant/context.json +1 -0
  372. package/fixtures/cases/one-of-variant/expected.json +7 -0
  373. package/fixtures/cases/one-of-variant/library/companies/acme.md +4 -0
  374. package/fixtures/cases/one-of-variant/library/deals/renewal.md +56 -0
  375. package/fixtures/cases/one-of-variant/schema.yaml +55 -0
  376. package/fixtures/cases/other-room-reference/context.json +1 -0
  377. package/fixtures/cases/other-room-reference/expected.json +7 -0
  378. package/fixtures/cases/other-room-reference/library/companies/acme.md +4 -0
  379. package/fixtures/cases/other-room-reference/library/deals/renewal.md +17 -0
  380. package/fixtures/cases/other-room-reference/library/places/depot.md +4 -0
  381. package/fixtures/cases/other-room-reference/library/products/seats.md +4 -0
  382. package/fixtures/cases/other-room-reference/library/products/support.md +4 -0
  383. package/fixtures/cases/other-room-reference/schema.yaml +32 -0
  384. package/fixtures/cases/paragraph-link-definition/schema.yaml +1 -0
  385. package/fixtures/cases/prototype-field/context.json +1 -0
  386. package/fixtures/cases/prototype-field/expected.json +7 -0
  387. package/fixtures/cases/prototype-field/library/item.md +9 -0
  388. package/fixtures/cases/prototype-field/schema.yaml +5 -0
  389. package/fixtures/cases/quoted-link-definition/expected.json +1 -2
  390. package/fixtures/cases/quoted-link-definition/library/notes/draft.md +1 -1
  391. package/fixtures/cases/quoted-link-definition/schema.yaml +1 -0
  392. package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
  393. package/fixtures/cases/reference-into-a-reserved-name/expected.json +7 -0
  394. package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +4 -0
  395. package/fixtures/cases/reference-into-a-reserved-name/library/settings/brief.md +1 -0
  396. package/fixtures/cases/reference-into-a-reserved-name/schema.yaml +3 -0
  397. package/fixtures/cases/referenced-missing-file/expected.json +0 -1
  398. package/fixtures/cases/referenced-missing-file/library/a.md +2 -2
  399. package/fixtures/cases/referenced-missing-file/library/b.md +2 -2
  400. package/fixtures/cases/referenced-missing-file/schema.yaml +10 -0
  401. package/fixtures/cases/remote-ref/context.json +1 -0
  402. package/fixtures/cases/remote-ref/expected.json +5 -0
  403. package/fixtures/cases/remote-ref/schema.yaml +3 -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/second-member-document/context.json +1 -0
  408. package/fixtures/cases/second-member-document/expected.json +5 -0
  409. package/fixtures/cases/second-member-document/schema.yaml +4 -0
  410. package/fixtures/cases/sections-keyword-refused/context.json +1 -0
  411. package/fixtures/cases/sections-keyword-refused/expected.json +5 -0
  412. package/fixtures/cases/sections-keyword-refused/schema.yaml +6 -0
  413. package/fixtures/cases/shortcut-reference-link/context.json +1 -0
  414. package/fixtures/cases/shortcut-reference-link/expected.json +5 -0
  415. package/fixtures/cases/shortcut-reference-link/library/item.md +10 -0
  416. package/fixtures/cases/shortcut-reference-link/schema.yaml +5 -0
  417. package/fixtures/cases/string-length/context.json +1 -0
  418. package/fixtures/cases/string-length/expected.json +7 -0
  419. package/fixtures/cases/string-length/library/companies/acme.md +4 -0
  420. package/fixtures/cases/string-length/library/deals/renewal.md +56 -0
  421. package/fixtures/cases/string-length/schema.yaml +55 -0
  422. package/fixtures/cases/submission-keys/context.json +1 -0
  423. package/fixtures/cases/submission-keys/expected.json +1 -0
  424. package/fixtures/cases/submission-keys/library/notes/visitor.md +8 -0
  425. package/fixtures/cases/submission-keys/schema.yaml +4 -0
  426. package/fixtures/cases/text-field-kind/context.json +1 -0
  427. package/fixtures/cases/text-field-kind/expected.json +3 -0
  428. package/fixtures/cases/text-field-kind/library/page.md +4 -0
  429. package/fixtures/cases/text-field-kind/schema.yaml +4 -0
  430. package/fixtures/cases/thematic-break-ends-the-values/context.json +1 -0
  431. package/fixtures/cases/thematic-break-ends-the-values/expected.json +1 -0
  432. package/fixtures/cases/thematic-break-ends-the-values/library/item.md +10 -0
  433. package/fixtures/cases/thematic-break-ends-the-values/schema.yaml +3 -0
  434. package/fixtures/cases/truncated-link-definition/expected.json +1 -2
  435. package/fixtures/cases/truncated-link-definition/library/notes/draft.md +1 -1
  436. package/fixtures/cases/truncated-link-definition/schema.yaml +1 -0
  437. package/fixtures/cases/typed-path-names-another-type/context.json +11 -0
  438. package/fixtures/cases/typed-path-names-another-type/expected.json +6 -0
  439. package/fixtures/cases/typed-path-names-another-type/library/settings/prefs/one.md +3 -0
  440. package/fixtures/cases/typed-path-names-another-type/schema.yaml +6 -0
  441. package/fixtures/cases/typed-path-names-its-type/context.json +11 -0
  442. package/fixtures/cases/typed-path-names-its-type/expected.json +3 -0
  443. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/deeper/two.md +1 -0
  444. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +4 -0
  445. package/fixtures/cases/typed-path-names-its-type/schema.yaml +6 -0
  446. package/fixtures/cases/typed-path-names-no-type/context.json +11 -0
  447. package/fixtures/cases/typed-path-names-no-type/expected.json +6 -0
  448. package/fixtures/cases/typed-path-names-no-type/library/settings/prefs/one.md +1 -0
  449. package/fixtures/cases/typed-path-names-no-type/schema.yaml +6 -0
  450. package/fixtures/cases/types-folder-content/context.json +1 -0
  451. package/fixtures/cases/types-folder-content/expected.json +1 -0
  452. package/fixtures/cases/types-folder-content/library/types/task.md +4 -0
  453. package/fixtures/cases/types-folder-content/schema.yaml +4 -0
  454. package/fixtures/cases/unclosed-frontmatter/expected.json +1 -2
  455. package/fixtures/cases/undeclared-field/context.json +1 -0
  456. package/fixtures/cases/undeclared-field/expected.json +7 -0
  457. package/fixtures/cases/undeclared-field/library/item.md +9 -0
  458. package/fixtures/cases/undeclared-field/schema.yaml +5 -0
  459. package/fixtures/cases/unevaluated-items-closed/context.json +1 -0
  460. package/fixtures/cases/unevaluated-items-closed/expected.json +7 -0
  461. package/fixtures/cases/unevaluated-items-closed/library/trip.md +16 -0
  462. package/fixtures/cases/unevaluated-items-closed/schema.yaml +10 -0
  463. package/fixtures/cases/unknown-type/context.json +1 -0
  464. package/fixtures/cases/unknown-type/expected.json +6 -0
  465. package/fixtures/cases/unknown-type/library/item.md +3 -0
  466. package/fixtures/cases/unknown-type/schema.yaml +3 -0
  467. package/fixtures/cases/unlisted-reference-type/context.json +1 -0
  468. package/fixtures/cases/unlisted-reference-type/expected.json +5 -0
  469. package/fixtures/cases/unlisted-reference-type/schema.yaml +3 -0
  470. package/fixtures/cases/unnamed-typed-path-checks-its-fields/context.json +11 -0
  471. package/fixtures/cases/unnamed-typed-path-checks-its-fields/expected.json +6 -0
  472. package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +5 -0
  473. package/fixtures/cases/unnamed-typed-path-checks-its-fields/schema.yaml +5 -0
  474. package/fixtures/cases/unnamed-typed-path-names-a-type/context.json +11 -0
  475. package/fixtures/cases/unnamed-typed-path-names-a-type/expected.json +6 -0
  476. package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +7 -0
  477. package/fixtures/cases/unnamed-typed-path-names-a-type/schema.yaml +5 -0
  478. package/fixtures/cases/unnamed-typed-path-reads-its-type/context.json +11 -0
  479. package/fixtures/cases/unnamed-typed-path-reads-its-type/expected.json +3 -0
  480. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/plan.md +1 -0
  481. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +6 -0
  482. package/fixtures/cases/unnamed-typed-path-reads-its-type/schema.yaml +5 -0
  483. package/fixtures/cases/unnamed-typed-path-without-a-body/context.json +11 -0
  484. package/fixtures/cases/unnamed-typed-path-without-a-body/expected.json +5 -0
  485. package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +5 -0
  486. package/fixtures/cases/unnamed-typed-path-without-a-body/schema.yaml +5 -0
  487. package/fixtures/cases/unresolved-link/expected.json +1 -2
  488. package/fixtures/cases/unresolved-link/library/item.md +2 -2
  489. package/fixtures/cases/unresolved-link/schema.yaml +5 -0
  490. package/fixtures/cases/valid-typed-document/library/people/ada.md +1 -1
  491. package/fixtures/cases/valid-typed-document/library/tasks/one.md +11 -10
  492. package/fixtures/cases/valid-typed-document/schema.yaml +15 -0
  493. package/fixtures/cases/wide-item-fence-link/schema.yaml +1 -0
  494. package/fixtures/division.json +454 -0
  495. package/fixtures/forms.json +347 -0
  496. package/fixtures/preamble.json +29 -8
  497. package/fixtures/projection.json +216 -32
  498. package/fixtures/queries.json +1359 -0
  499. package/package.json +20 -13
  500. package/dist/definition.js.map +0 -1
  501. package/dist/document.js.map +0 -1
  502. package/dist/index.js.map +0 -1
  503. package/dist/links.d.ts +0 -25
  504. package/dist/links.d.ts.map +0 -1
  505. package/dist/links.js +0 -380
  506. package/dist/links.js.map +0 -1
  507. package/dist/paths.js.map +0 -1
  508. package/dist/profile.d.ts +0 -6
  509. package/dist/profile.d.ts.map +0 -1
  510. package/dist/profile.js +0 -7
  511. package/dist/profile.js.map +0 -1
  512. package/dist/project.js.map +0 -1
  513. package/dist/refuse.js.map +0 -1
  514. package/dist/schema.js.map +0 -1
  515. package/dist/sections.d.ts +0 -10
  516. package/dist/sections.d.ts.map +0 -1
  517. package/dist/sections.js +0 -79
  518. package/dist/sections.js.map +0 -1
  519. package/dist/types.js.map +0 -1
  520. package/dist/validate.js.map +0 -1
  521. package/dist/version.js.map +0 -1
  522. package/dist/yaml.js.map +0 -1
  523. package/fixtures/cases/binary-any-reference/library/types/note.md +0 -5
  524. package/fixtures/cases/binary-document-collision/library/types/note.md +0 -3
  525. package/fixtures/cases/binary-link-outside-collection/library/types/note.md +0 -3
  526. package/fixtures/cases/binary-prototype-reference/library/types/note.md +0 -5
  527. package/fixtures/cases/binary-typed-reference/library/types/note.md +0 -5
  528. package/fixtures/cases/binary-typed-reference/library/types/person.md +0 -3
  529. package/fixtures/cases/bracketed-link-definition/library/types/task.md +0 -7
  530. package/fixtures/cases/declared-binary-links/library/types/note.md +0 -3
  531. package/fixtures/cases/duplicate-link-definition/library/types/task.md +0 -7
  532. package/fixtures/cases/fenced-link-definition/library/types/task.md +0 -7
  533. package/fixtures/cases/field-enum/library/types/task.md +0 -8
  534. package/fixtures/cases/interrupted-link-definition/library/types/note.md +0 -3
  535. package/fixtures/cases/long-fence-link-definition/library/types/note.md +0 -3
  536. package/fixtures/cases/malformed-definition/library/types/task.md +0 -5
  537. package/fixtures/cases/missing-binary-image/expected.json +0 -6
  538. package/fixtures/cases/missing-binary-image/library/types/note.md +0 -3
  539. package/fixtures/cases/missing-binary-link/expected.json +0 -6
  540. package/fixtures/cases/missing-binary-link/library/types/note.md +0 -3
  541. package/fixtures/cases/missing-required-field/library/types/task.md +0 -8
  542. package/fixtures/cases/paragraph-link-definition/library/types/note.md +0 -3
  543. package/fixtures/cases/prd-definition/library/types/task.md +0 -15
  544. package/fixtures/cases/quoted-link-definition/library/types/note.md +0 -3
  545. package/fixtures/cases/referenced-missing-file/library/types/person.md +0 -5
  546. package/fixtures/cases/referenced-missing-file/library/types/task.md +0 -8
  547. package/fixtures/cases/structured-section/expected.json +0 -7
  548. package/fixtures/cases/structured-section/library/types/task.md +0 -8
  549. package/fixtures/cases/truncated-link-definition/library/types/note.md +0 -3
  550. package/fixtures/cases/unresolved-link/library/types/task.md +0 -7
  551. package/fixtures/cases/valid-typed-document/library/types/person.md +0 -5
  552. package/fixtures/cases/valid-typed-document/library/types/task.md +0 -12
  553. package/fixtures/cases/wide-item-fence-link/library/types/note.md +0 -3
  554. package/markdown-syntax-profile.md +0 -9
  555. /package/fixtures/cases/{prd-definition → absent-link-dangles}/context.json +0 -0
  556. /package/fixtures/cases/{prd-definition → absent-link-dangles}/expected.json +0 -0
  557. /package/fixtures/cases/{structured-section → absent-optional-field}/context.json +0 -0
  558. /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/context.json +0 -0
  559. /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/library/notes/draft.md +0 -0
  560. /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/context.json +0 -0
  561. /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/library/notes/draft.md +0 -0
@@ -0,0 +1,1359 @@
1
+ {
2
+ "schema": "task:\n type: object\n properties:\n title: { type: string }\n status: { enum: [open, done] }\n due: { type: string, format: date }\n at: { type: string, format: date-time }\n ends: { type: [string, \"null\"], format: date-time }\n place:\n type: object\n properties:\n city: { type: string }\n starts: { type: string, format: time }\n points: { type: number }\n count: { type: integer }\n done: { type: boolean }\n priority: { type: integer, enum: [1, 2, 3] }\n flagged: { enum: [true, false] }\n tier: { enum: [1, 2, null] }\n rank: { enum: [1, high] }\n code: { type: string, maxLength: 12 }\n owner: { type: string, reference: person }\n labels: { type: array, items: { type: string } }\n times: { type: array, items: { type: string, format: date-time } }\n steps:\n type: array\n items:\n type: object\n properties:\n name: { type: string }\n at: { type: string, format: date-time }\n indexed: [status, due, at, ends, starts, points, count, done, tier, code]\nperson:\n type: object\n properties:\n name: { type: string }\n",
3
+ "documents": {
4
+ "task": {
5
+ "path": "tasks/one.md",
6
+ "type": "task",
7
+ "fileId": "file-one",
8
+ "text": "# One\n\nShip the release on Friday.\n",
9
+ "fields": {
10
+ "title": "Ship the release",
11
+ "status": "open",
12
+ "due": "2026-10-30",
13
+ "at": "2026-10-30T10:00:00+02:00",
14
+ "starts": "09:30:00Z",
15
+ "points": 3,
16
+ "count": 2,
17
+ "done": false,
18
+ "owner": "../people/ada.md",
19
+ "labels": [
20
+ "urgent",
21
+ "home"
22
+ ],
23
+ "times": [
24
+ "2026-10-30T07:00:00Z",
25
+ "2026-10-31T09:00:00+01:00"
26
+ ],
27
+ "steps": [
28
+ {
29
+ "name": "draft",
30
+ "at": "2026-10-29T23:30:00-01:00"
31
+ }
32
+ ]
33
+ }
34
+ },
35
+ "bare-task": {
36
+ "path": "tasks/two.md",
37
+ "type": "task",
38
+ "fileId": "file-two",
39
+ "text": null,
40
+ "fields": {
41
+ "title": "Two",
42
+ "status": "done",
43
+ "ends": null,
44
+ "labels": [],
45
+ "code": "Zeta"
46
+ }
47
+ },
48
+ "spaced-task": {
49
+ "path": "tasks/three.md",
50
+ "type": "task",
51
+ "fileId": "file-three",
52
+ "text": null,
53
+ "fields": {
54
+ "title": "Three",
55
+ "status": "open",
56
+ "at": "2026-10-30 08:00:00Z",
57
+ "times": [
58
+ "2026-10-30T09:00:00+0100",
59
+ "2026-10-30T12:00:00+02",
60
+ "2026-12-31T23:59:60Z"
61
+ ]
62
+ }
63
+ },
64
+ "note": {
65
+ "path": "notes/loose.md",
66
+ "type": "any",
67
+ "fileId": null,
68
+ "text": "Loose note\n",
69
+ "fields": {
70
+ "at": "2026-10-30T10:00:00+02:00",
71
+ "title": "Loose"
72
+ }
73
+ },
74
+ "export": {
75
+ "path": "data/export.csv",
76
+ "type": null,
77
+ "fileId": null,
78
+ "text": "path,status\n",
79
+ "fields": {}
80
+ },
81
+ "task-four": {
82
+ "path": "tasks/four.md",
83
+ "type": "task",
84
+ "fileId": "file-four",
85
+ "text": null,
86
+ "fields": {
87
+ "title": "Four",
88
+ "status": "done",
89
+ "due": "2025-12-31",
90
+ "at": "2026-10-29T23:30:00-10:00",
91
+ "ends": "2026-10-30T07:00:00Z",
92
+ "starts": "09:30:00+01:00",
93
+ "points": -0,
94
+ "count": 2,
95
+ "done": true,
96
+ "tier": 2,
97
+ "code": "\ufffd"
98
+ }
99
+ },
100
+ "task-five": {
101
+ "path": "tasks/five.md",
102
+ "type": "task",
103
+ "fileId": "file-five",
104
+ "text": null,
105
+ "fields": {
106
+ "title": "Five",
107
+ "status": "open",
108
+ "due": "2026-01-05",
109
+ "at": "2026-10-30T07:59:59.999999999Z",
110
+ "ends": "2026-10-30T09:00:00+01:00",
111
+ "starts": "08:00:00Z",
112
+ "points": 0,
113
+ "count": -1,
114
+ "done": false,
115
+ "tier": null,
116
+ "code": "alpha"
117
+ }
118
+ },
119
+ "task-six": {
120
+ "path": "tasks/six.md",
121
+ "type": "task",
122
+ "fileId": "file-six",
123
+ "text": null,
124
+ "fields": {
125
+ "title": "Six",
126
+ "status": "done",
127
+ "due": "2026-10-30",
128
+ "at": "2026-10-30T09:00:00Z",
129
+ "ends": null,
130
+ "starts": "23:59:60Z",
131
+ "points": 2.5,
132
+ "count": 10,
133
+ "done": null,
134
+ "tier": 1,
135
+ "code": "\ud835\udc9c"
136
+ }
137
+ },
138
+ "task-seven": {
139
+ "path": "tasks/seven.md",
140
+ "type": "task",
141
+ "fileId": "file-seven",
142
+ "text": null,
143
+ "fields": {
144
+ "title": "Seven",
145
+ "ends": "2026-10-30T08:00:00.000000001Z",
146
+ "starts": "09:30:00Z",
147
+ "points": null,
148
+ "count": -1000000,
149
+ "done": true,
150
+ "tier": 2,
151
+ "code": "alpha"
152
+ }
153
+ }
154
+ },
155
+ "cases": [
156
+ {
157
+ "name": "a type names its Documents",
158
+ "query": {
159
+ "types": [
160
+ "task"
161
+ ]
162
+ },
163
+ "document": "task",
164
+ "matches": true
165
+ },
166
+ {
167
+ "name": "a type leaves an untyped Document out",
168
+ "query": {
169
+ "types": [
170
+ "task"
171
+ ]
172
+ },
173
+ "document": "note",
174
+ "matches": false
175
+ },
176
+ {
177
+ "name": "any names an untyped Markdown Document",
178
+ "query": {
179
+ "types": [
180
+ "any"
181
+ ]
182
+ },
183
+ "document": "note",
184
+ "matches": true
185
+ },
186
+ {
187
+ "name": "any leaves a non-Markdown Document out",
188
+ "query": {
189
+ "types": [
190
+ "any"
191
+ ]
192
+ },
193
+ "document": "export",
194
+ "matches": false
195
+ },
196
+ {
197
+ "name": "a string equals itself",
198
+ "query": {
199
+ "where": {
200
+ "/title": "Ship the release"
201
+ }
202
+ },
203
+ "document": "task",
204
+ "matches": true
205
+ },
206
+ {
207
+ "name": "a string never equals its own prefix",
208
+ "query": {
209
+ "where": {
210
+ "/title": "Ship"
211
+ }
212
+ },
213
+ "document": "task",
214
+ "matches": false
215
+ },
216
+ {
217
+ "name": "a date-time equals the same instant in another offset",
218
+ "query": {
219
+ "where": {
220
+ "/at": "2026-10-30T08:00:00Z"
221
+ }
222
+ },
223
+ "document": "task",
224
+ "matches": true
225
+ },
226
+ {
227
+ "name": "an untyped value equals text, not an instant",
228
+ "query": {
229
+ "where": {
230
+ "/at": "2026-10-30T08:00:00Z"
231
+ }
232
+ },
233
+ "document": "note",
234
+ "matches": false
235
+ },
236
+ {
237
+ "name": "an untyped value equals its own text",
238
+ "query": {
239
+ "where": {
240
+ "/at": "2026-10-30T10:00:00+02:00"
241
+ }
242
+ },
243
+ "document": "note",
244
+ "matches": true
245
+ },
246
+ {
247
+ "name": "a date-time written with a space equals the same instant",
248
+ "query": {
249
+ "where": {
250
+ "/at": "2026-10-30T10:00:00+02:00"
251
+ }
252
+ },
253
+ "document": "spaced-task",
254
+ "matches": true
255
+ },
256
+ {
257
+ "name": "a date-time with a space orders as an instant, not as its text",
258
+ "query": {
259
+ "where": {
260
+ "/at": {
261
+ "$gt": "2026-10-30T09:59:00+02:00"
262
+ }
263
+ }
264
+ },
265
+ "document": "spaced-task",
266
+ "matches": true
267
+ },
268
+ {
269
+ "name": "a date-time whose offset has no colon equals the same instant",
270
+ "query": {
271
+ "where": {
272
+ "/times": "2026-10-30T08:00:00Z"
273
+ }
274
+ },
275
+ "document": "spaced-task",
276
+ "matches": true
277
+ },
278
+ {
279
+ "name": "a date-time whose offset is hours alone equals the same instant",
280
+ "query": {
281
+ "where": {
282
+ "/times": "2026-10-30T10:00:00Z"
283
+ }
284
+ },
285
+ "document": "spaced-task",
286
+ "matches": true
287
+ },
288
+ {
289
+ "name": "a query may write the instant with a space",
290
+ "query": {
291
+ "where": {
292
+ "/at": "2026-10-30 08:00:00Z"
293
+ }
294
+ },
295
+ "document": "task",
296
+ "matches": true
297
+ },
298
+ {
299
+ "name": "a query may write the offset with no colon",
300
+ "query": {
301
+ "where": {
302
+ "/at": "2026-10-30T09:00:00+0100"
303
+ }
304
+ },
305
+ "document": "task",
306
+ "matches": true
307
+ },
308
+ {
309
+ "name": "a query may write the offset as hours alone",
310
+ "query": {
311
+ "where": {
312
+ "/at": "2026-10-30T09:00:00+01"
313
+ }
314
+ },
315
+ "document": "task",
316
+ "matches": true
317
+ },
318
+ {
319
+ "name": "a leap second is the instant after it",
320
+ "query": {
321
+ "where": {
322
+ "/times": "2027-01-01T00:00:00Z"
323
+ }
324
+ },
325
+ "document": "spaced-task",
326
+ "matches": true
327
+ },
328
+ {
329
+ "name": "an explicit null equals null",
330
+ "query": {
331
+ "where": {
332
+ "/ends": null
333
+ }
334
+ },
335
+ "document": "bare-task",
336
+ "matches": true
337
+ },
338
+ {
339
+ "name": "a missing value does not equal null",
340
+ "query": {
341
+ "where": {
342
+ "/ends": null
343
+ }
344
+ },
345
+ "document": "task",
346
+ "matches": false
347
+ },
348
+ {
349
+ "name": "an explicit null exists",
350
+ "query": {
351
+ "where": {
352
+ "/ends": {
353
+ "$exists": true
354
+ }
355
+ }
356
+ },
357
+ "document": "bare-task",
358
+ "matches": true
359
+ },
360
+ {
361
+ "name": "an explicit null fails not-equal to null",
362
+ "query": {
363
+ "where": {
364
+ "/ends": {
365
+ "$ne": null
366
+ }
367
+ }
368
+ },
369
+ "document": "bare-task",
370
+ "matches": false
371
+ },
372
+ {
373
+ "name": "a missing value passes not-equal to null",
374
+ "query": {
375
+ "where": {
376
+ "/ends": {
377
+ "$ne": null
378
+ }
379
+ }
380
+ },
381
+ "document": "task",
382
+ "matches": true
383
+ },
384
+ {
385
+ "name": "an explicit null passes not-equal to a value",
386
+ "query": {
387
+ "where": {
388
+ "/ends": {
389
+ "$ne": "2026-10-30T08:00:00Z"
390
+ }
391
+ }
392
+ },
393
+ "document": "bare-task",
394
+ "matches": true
395
+ },
396
+ {
397
+ "name": "an explicit null fails a range",
398
+ "query": {
399
+ "where": {
400
+ "/ends": {
401
+ "$gte": "2026-01-01T00:00:00Z"
402
+ }
403
+ }
404
+ },
405
+ "document": "bare-task",
406
+ "matches": false
407
+ },
408
+ {
409
+ "name": "an explicit null is in a list naming null",
410
+ "query": {
411
+ "where": {
412
+ "/ends": {
413
+ "$in": [
414
+ null,
415
+ "2026-10-30T08:00:00Z"
416
+ ]
417
+ }
418
+ }
419
+ },
420
+ "document": "bare-task",
421
+ "matches": true
422
+ },
423
+ {
424
+ "name": "a date-time one nanosecond later is another instant",
425
+ "query": {
426
+ "where": {
427
+ "/at": "2026-10-30T08:00:00.000000001Z"
428
+ }
429
+ },
430
+ "document": "task",
431
+ "matches": false
432
+ },
433
+ {
434
+ "name": "a date-time orders as an instant, not as its text",
435
+ "query": {
436
+ "where": {
437
+ "/at": {
438
+ "$lt": "2026-10-30T09:00:00Z"
439
+ }
440
+ }
441
+ },
442
+ "document": "task",
443
+ "matches": true
444
+ },
445
+ {
446
+ "name": "an untyped value orders as text",
447
+ "query": {
448
+ "where": {
449
+ "/at": {
450
+ "$lt": "2026-10-30T09:00:00Z"
451
+ }
452
+ }
453
+ },
454
+ "document": "note",
455
+ "matches": false
456
+ },
457
+ {
458
+ "name": "a later instant written earlier as text is later",
459
+ "query": {
460
+ "where": {
461
+ "/at": {
462
+ "$gt": "2026-10-30T07:59:59-00:30"
463
+ }
464
+ }
465
+ },
466
+ "document": "task",
467
+ "matches": false
468
+ },
469
+ {
470
+ "name": "a closed range holds its one instant",
471
+ "query": {
472
+ "where": {
473
+ "/at": {
474
+ "$gte": "2026-10-30T08:00:00Z",
475
+ "$lte": "2026-10-30T08:00:00Z"
476
+ }
477
+ }
478
+ },
479
+ "document": "task",
480
+ "matches": true
481
+ },
482
+ {
483
+ "name": "a list of date-times holds an item at the same instant",
484
+ "query": {
485
+ "where": {
486
+ "/times": "2026-10-31T08:00:00Z"
487
+ }
488
+ },
489
+ "document": "task",
490
+ "matches": true
491
+ },
492
+ {
493
+ "name": "a list of date-times holds every instant named",
494
+ "query": {
495
+ "where": {
496
+ "/times": {
497
+ "$all": [
498
+ "2026-10-30T07:00:00Z",
499
+ "2026-10-31T08:00:00Z"
500
+ ]
501
+ }
502
+ }
503
+ },
504
+ "document": "task",
505
+ "matches": true
506
+ },
507
+ {
508
+ "name": "a date-time reached through a list orders as an instant",
509
+ "query": {
510
+ "where": {
511
+ "/steps/at": {
512
+ "$gt": "2026-10-30T00:00:00Z"
513
+ }
514
+ }
515
+ },
516
+ "document": "task",
517
+ "matches": true
518
+ },
519
+ {
520
+ "name": "a date orders within its month",
521
+ "query": {
522
+ "where": {
523
+ "/due": {
524
+ "$gte": "2026-10-01",
525
+ "$lt": "2026-11-01"
526
+ }
527
+ }
528
+ },
529
+ "document": "task",
530
+ "matches": true
531
+ },
532
+ {
533
+ "name": "a missing value does not exist",
534
+ "query": {
535
+ "where": {
536
+ "/due": {
537
+ "$exists": false
538
+ }
539
+ }
540
+ },
541
+ "document": "bare-task",
542
+ "matches": true
543
+ },
544
+ {
545
+ "name": "a missing value fails exists",
546
+ "query": {
547
+ "where": {
548
+ "/due": {
549
+ "$exists": true
550
+ }
551
+ }
552
+ },
553
+ "document": "bare-task",
554
+ "matches": false
555
+ },
556
+ {
557
+ "name": "a missing value fails equality",
558
+ "query": {
559
+ "where": {
560
+ "/due": "2026-10-30"
561
+ }
562
+ },
563
+ "document": "bare-task",
564
+ "matches": false
565
+ },
566
+ {
567
+ "name": "a missing value passes not-equal",
568
+ "query": {
569
+ "where": {
570
+ "/due": {
571
+ "$ne": "2026-10-30"
572
+ }
573
+ }
574
+ },
575
+ "document": "bare-task",
576
+ "matches": true
577
+ },
578
+ {
579
+ "name": "a missing value passes not-in",
580
+ "query": {
581
+ "where": {
582
+ "/due": {
583
+ "$nin": [
584
+ "2026-10-30"
585
+ ]
586
+ }
587
+ }
588
+ },
589
+ "document": "bare-task",
590
+ "matches": true
591
+ },
592
+ {
593
+ "name": "a missing value fails a range",
594
+ "query": {
595
+ "where": {
596
+ "/at": {
597
+ "$lt": "2027-01-01T00:00:00Z"
598
+ }
599
+ }
600
+ },
601
+ "document": "bare-task",
602
+ "matches": false
603
+ },
604
+ {
605
+ "name": "a missing value fails a prefix",
606
+ "query": {
607
+ "where": {
608
+ "/owner": {
609
+ "$prefix": "people/"
610
+ }
611
+ }
612
+ },
613
+ "document": "bare-task",
614
+ "matches": false
615
+ },
616
+ {
617
+ "name": "a present value fails not-equal to itself",
618
+ "query": {
619
+ "where": {
620
+ "/status": {
621
+ "$ne": "open"
622
+ }
623
+ }
624
+ },
625
+ "document": "task",
626
+ "matches": false
627
+ },
628
+ {
629
+ "name": "a present value passes not-equal to another",
630
+ "query": {
631
+ "where": {
632
+ "/status": {
633
+ "$ne": "open"
634
+ }
635
+ }
636
+ },
637
+ "document": "bare-task",
638
+ "matches": true
639
+ },
640
+ {
641
+ "name": "a date-time fails not-equal to the same instant",
642
+ "query": {
643
+ "where": {
644
+ "/at": {
645
+ "$ne": "2026-10-30T08:00:00Z"
646
+ }
647
+ }
648
+ },
649
+ "document": "task",
650
+ "matches": false
651
+ },
652
+ {
653
+ "name": "a list holds one of the values named",
654
+ "query": {
655
+ "where": {
656
+ "/labels": {
657
+ "$in": [
658
+ "home",
659
+ "away"
660
+ ]
661
+ }
662
+ }
663
+ },
664
+ "document": "task",
665
+ "matches": true
666
+ },
667
+ {
668
+ "name": "a list holding a value fails not-in it",
669
+ "query": {
670
+ "where": {
671
+ "/labels": {
672
+ "$nin": [
673
+ "home"
674
+ ]
675
+ }
676
+ }
677
+ },
678
+ "document": "task",
679
+ "matches": false
680
+ },
681
+ {
682
+ "name": "a list lacking a value passes not-in it",
683
+ "query": {
684
+ "where": {
685
+ "/labels": {
686
+ "$nin": [
687
+ "away"
688
+ ]
689
+ }
690
+ }
691
+ },
692
+ "document": "task",
693
+ "matches": true
694
+ },
695
+ {
696
+ "name": "a list must hold every value of all",
697
+ "query": {
698
+ "where": {
699
+ "/labels": {
700
+ "$all": [
701
+ "urgent",
702
+ "away"
703
+ ]
704
+ }
705
+ }
706
+ },
707
+ "document": "task",
708
+ "matches": false
709
+ },
710
+ {
711
+ "name": "an empty list has size zero",
712
+ "query": {
713
+ "where": {
714
+ "/labels": {
715
+ "$size": 0
716
+ }
717
+ }
718
+ },
719
+ "document": "bare-task",
720
+ "matches": true
721
+ },
722
+ {
723
+ "name": "a list of two has no size zero",
724
+ "query": {
725
+ "where": {
726
+ "/labels": {
727
+ "$size": 0
728
+ }
729
+ }
730
+ },
731
+ "document": "task",
732
+ "matches": false
733
+ },
734
+ {
735
+ "name": "a number orders against a fraction",
736
+ "query": {
737
+ "where": {
738
+ "/points": {
739
+ "$gt": 2.5
740
+ }
741
+ }
742
+ },
743
+ "document": "task",
744
+ "matches": true
745
+ },
746
+ {
747
+ "name": "an integer equals itself",
748
+ "query": {
749
+ "where": {
750
+ "/count": 2
751
+ }
752
+ },
753
+ "document": "task",
754
+ "matches": true
755
+ },
756
+ {
757
+ "name": "a boolean equals itself",
758
+ "query": {
759
+ "where": {
760
+ "/done": false
761
+ }
762
+ },
763
+ "document": "task",
764
+ "matches": true
765
+ },
766
+ {
767
+ "name": "a string starts with its prefix",
768
+ "query": {
769
+ "where": {
770
+ "/title": {
771
+ "$prefix": "Ship"
772
+ }
773
+ }
774
+ },
775
+ "document": "task",
776
+ "matches": true
777
+ },
778
+ {
779
+ "name": "a prefix compares case",
780
+ "query": {
781
+ "where": {
782
+ "/title": {
783
+ "$prefix": "ship"
784
+ }
785
+ }
786
+ },
787
+ "document": "task",
788
+ "matches": false
789
+ },
790
+ {
791
+ "name": "a list item starts with a prefix",
792
+ "query": {
793
+ "where": {
794
+ "/labels": {
795
+ "$prefix": "urg"
796
+ }
797
+ }
798
+ },
799
+ "document": "task",
800
+ "matches": true
801
+ },
802
+ {
803
+ "name": "a reference starts with the folder of its target",
804
+ "query": {
805
+ "where": {
806
+ "/owner": {
807
+ "$prefix": "people/"
808
+ }
809
+ }
810
+ },
811
+ "document": "task",
812
+ "matches": true
813
+ },
814
+ {
815
+ "name": "a date starts with its month",
816
+ "query": {
817
+ "where": {
818
+ "/due": {
819
+ "$prefix": "2026-10"
820
+ }
821
+ }
822
+ },
823
+ "document": "task",
824
+ "matches": true
825
+ },
826
+ {
827
+ "name": "a reference equals the Path of its target",
828
+ "query": {
829
+ "where": {
830
+ "/owner": "people/ada.md"
831
+ }
832
+ },
833
+ "document": "task",
834
+ "matches": true
835
+ },
836
+ {
837
+ "name": "a time equals its text",
838
+ "query": {
839
+ "where": {
840
+ "/starts": "09:30:00Z"
841
+ }
842
+ },
843
+ "document": "task",
844
+ "matches": true
845
+ },
846
+ {
847
+ "name": "a file ID names its Document",
848
+ "query": {
849
+ "fileIds": [
850
+ "file-one"
851
+ ]
852
+ },
853
+ "document": "task",
854
+ "matches": true
855
+ },
856
+ {
857
+ "name": "a file ID names no other Document",
858
+ "query": {
859
+ "fileIds": [
860
+ "file-one"
861
+ ]
862
+ },
863
+ "document": "bare-task",
864
+ "matches": false
865
+ },
866
+ {
867
+ "name": "a file ID names no Document without one",
868
+ "query": {
869
+ "fileIds": [
870
+ "file-one"
871
+ ]
872
+ },
873
+ "document": "note",
874
+ "matches": false
875
+ },
876
+ {
877
+ "name": "a named Path is read",
878
+ "query": {
879
+ "paths": [
880
+ "tasks/one.md"
881
+ ]
882
+ },
883
+ "document": "task",
884
+ "matches": true
885
+ },
886
+ {
887
+ "name": "a folder holds its own Documents",
888
+ "query": {
889
+ "folder": "tasks"
890
+ },
891
+ "document": "task",
892
+ "matches": true
893
+ },
894
+ {
895
+ "name": "a folder holds no other folder's Documents",
896
+ "query": {
897
+ "folder": "tasks"
898
+ },
899
+ "document": "note",
900
+ "matches": false
901
+ },
902
+ {
903
+ "name": "a Path prefix holds what lies beneath it",
904
+ "query": {
905
+ "pathPrefix": "tasks"
906
+ },
907
+ "document": "task",
908
+ "matches": true
909
+ },
910
+ {
911
+ "name": "a Path prefix is a whole directory",
912
+ "query": {
913
+ "pathPrefix": "task"
914
+ },
915
+ "document": "task",
916
+ "matches": false
917
+ },
918
+ {
919
+ "name": "a Document outside a named directory is read",
920
+ "query": {
921
+ "outside": [
922
+ "notes"
923
+ ]
924
+ },
925
+ "document": "task",
926
+ "matches": true
927
+ },
928
+ {
929
+ "name": "a Document under a named directory is left out",
930
+ "query": {
931
+ "outside": [
932
+ "tasks"
933
+ ]
934
+ },
935
+ "document": "task",
936
+ "matches": false
937
+ },
938
+ {
939
+ "name": "a Document that is not Markdown is left out under a named directory",
940
+ "query": {
941
+ "outside": [
942
+ "data"
943
+ ]
944
+ },
945
+ "document": "export",
946
+ "matches": false
947
+ },
948
+ {
949
+ "name": "a directory left out is a whole directory",
950
+ "query": {
951
+ "outside": [
952
+ "task"
953
+ ]
954
+ },
955
+ "document": "task",
956
+ "matches": true
957
+ },
958
+ {
959
+ "name": "a Document under any of the directories named is left out",
960
+ "query": {
961
+ "outside": [
962
+ "data",
963
+ "tasks"
964
+ ]
965
+ },
966
+ "document": "task",
967
+ "matches": false
968
+ },
969
+ {
970
+ "name": "a phrase is found ignoring case",
971
+ "query": {
972
+ "text": "FRIDAY"
973
+ },
974
+ "document": "task",
975
+ "matches": true
976
+ },
977
+ {
978
+ "name": "a phrase is never found in a document holding no text",
979
+ "query": {
980
+ "text": "friday"
981
+ },
982
+ "document": "bare-task",
983
+ "matches": false
984
+ },
985
+ {
986
+ "name": "or holds when one part holds",
987
+ "query": {
988
+ "where": {
989
+ "$or": [
990
+ {
991
+ "/status": "done"
992
+ },
993
+ {
994
+ "/points": {
995
+ "$gt": 2
996
+ }
997
+ }
998
+ ]
999
+ }
1000
+ },
1001
+ "document": "task",
1002
+ "matches": true
1003
+ },
1004
+ {
1005
+ "name": "and fails when one part fails",
1006
+ "query": {
1007
+ "where": {
1008
+ "$and": [
1009
+ {
1010
+ "/status": "open"
1011
+ },
1012
+ {
1013
+ "/due": {
1014
+ "$exists": false
1015
+ }
1016
+ }
1017
+ ]
1018
+ }
1019
+ },
1020
+ "document": "task",
1021
+ "matches": false
1022
+ },
1023
+ {
1024
+ "name": "a type, a Path prefix and a field test hold together",
1025
+ "query": {
1026
+ "types": [
1027
+ "task"
1028
+ ],
1029
+ "pathPrefix": "tasks",
1030
+ "where": {
1031
+ "/status": "done"
1032
+ }
1033
+ },
1034
+ "document": "bare-task",
1035
+ "matches": true
1036
+ },
1037
+ {
1038
+ "name": "a list holds the value an indexed field holds",
1039
+ "query": {
1040
+ "where": {
1041
+ "/status": {
1042
+ "$in": [
1043
+ "done",
1044
+ "open"
1045
+ ]
1046
+ }
1047
+ }
1048
+ },
1049
+ "document": "task",
1050
+ "matches": true
1051
+ },
1052
+ {
1053
+ "name": "a list naming null holds an explicit null",
1054
+ "query": {
1055
+ "where": {
1056
+ "/tier": {
1057
+ "$in": [
1058
+ 2,
1059
+ null
1060
+ ]
1061
+ }
1062
+ }
1063
+ },
1064
+ "document": "task-five",
1065
+ "matches": true
1066
+ },
1067
+ {
1068
+ "name": "a list naming only null leaves a missing value out",
1069
+ "query": {
1070
+ "where": {
1071
+ "/tier": {
1072
+ "$in": [
1073
+ null
1074
+ ]
1075
+ }
1076
+ }
1077
+ },
1078
+ "document": "task",
1079
+ "matches": false
1080
+ },
1081
+ {
1082
+ "name": "a list holds a date-time at the same instant in another offset",
1083
+ "query": {
1084
+ "where": {
1085
+ "/at": {
1086
+ "$in": [
1087
+ "2026-10-30T08:00:00Z",
1088
+ "2026-10-31T00:00:00Z"
1089
+ ]
1090
+ }
1091
+ }
1092
+ },
1093
+ "document": "task",
1094
+ "matches": true
1095
+ },
1096
+ {
1097
+ "name": "a list of booleans holds true",
1098
+ "query": {
1099
+ "where": {
1100
+ "/done": {
1101
+ "$in": [
1102
+ true
1103
+ ]
1104
+ }
1105
+ }
1106
+ },
1107
+ "document": "task-four",
1108
+ "matches": true
1109
+ },
1110
+ {
1111
+ "name": "an explicit null boolean equals null",
1112
+ "query": {
1113
+ "where": {
1114
+ "/done": null
1115
+ }
1116
+ },
1117
+ "document": "task-six",
1118
+ "matches": true
1119
+ },
1120
+ {
1121
+ "name": "a range holds its inclusive lower bound",
1122
+ "query": {
1123
+ "where": {
1124
+ "/count": {
1125
+ "$gte": -1,
1126
+ "$lt": 2
1127
+ }
1128
+ }
1129
+ },
1130
+ "document": "task-five",
1131
+ "matches": true
1132
+ },
1133
+ {
1134
+ "name": "a range leaves its exclusive upper bound out",
1135
+ "query": {
1136
+ "where": {
1137
+ "/count": {
1138
+ "$gte": -1,
1139
+ "$lt": 2
1140
+ }
1141
+ }
1142
+ },
1143
+ "document": "task",
1144
+ "matches": false
1145
+ },
1146
+ {
1147
+ "name": "an exclusive lower bound leaves its own value out",
1148
+ "query": {
1149
+ "where": {
1150
+ "/count": {
1151
+ "$gt": -1000000
1152
+ }
1153
+ }
1154
+ },
1155
+ "document": "task-seven",
1156
+ "matches": false
1157
+ },
1158
+ {
1159
+ "name": "a negative zero lies in a range closed at zero",
1160
+ "query": {
1161
+ "where": {
1162
+ "/points": {
1163
+ "$gte": 0,
1164
+ "$lte": 0
1165
+ }
1166
+ }
1167
+ },
1168
+ "document": "task-four",
1169
+ "matches": true
1170
+ },
1171
+ {
1172
+ "name": "a date range leaves its exclusive upper day out",
1173
+ "query": {
1174
+ "where": {
1175
+ "/due": {
1176
+ "$gte": "2025-12-31",
1177
+ "$lt": "2026-01-05"
1178
+ }
1179
+ }
1180
+ },
1181
+ "document": "task-five",
1182
+ "matches": false
1183
+ },
1184
+ {
1185
+ "name": "a time orders as its text",
1186
+ "query": {
1187
+ "where": {
1188
+ "/starts": {
1189
+ "$gte": "23:59:60Z"
1190
+ }
1191
+ }
1192
+ },
1193
+ "document": "task-six",
1194
+ "matches": true
1195
+ },
1196
+ {
1197
+ "name": "a date-time one nanosecond past an inclusive upper bound lies outside it",
1198
+ "query": {
1199
+ "where": {
1200
+ "/ends": {
1201
+ "$lte": "2026-10-30T08:00:00Z"
1202
+ }
1203
+ }
1204
+ },
1205
+ "document": "task-seven",
1206
+ "matches": false
1207
+ },
1208
+ {
1209
+ "name": "text past U+FFFD holds a letter beyond the Basic Multilingual Plane",
1210
+ "query": {
1211
+ "where": {
1212
+ "/code": {
1213
+ "$gt": "\ufffd"
1214
+ }
1215
+ }
1216
+ },
1217
+ "document": "task-six",
1218
+ "matches": true
1219
+ },
1220
+ {
1221
+ "name": "a closed text range holds its one value",
1222
+ "query": {
1223
+ "where": {
1224
+ "/code": {
1225
+ "$gte": "alpha",
1226
+ "$lte": "alpha"
1227
+ }
1228
+ }
1229
+ },
1230
+ "document": "task-five",
1231
+ "matches": true
1232
+ },
1233
+ {
1234
+ "name": "an equality and a range on two indexed fields hold together",
1235
+ "query": {
1236
+ "where": {
1237
+ "/status": "open",
1238
+ "/points": {
1239
+ "$gt": 2
1240
+ }
1241
+ }
1242
+ },
1243
+ "document": "task",
1244
+ "matches": true
1245
+ }
1246
+ ],
1247
+ "orders": [
1248
+ {
1249
+ "name": "numbers ascend with nulls first, a negative zero tied with zero by Path",
1250
+ "orderBy": { "by": { "field": "/points" }, "direction": "asc", "nulls": "first" },
1251
+ "order": ["task-seven", "spaced-task", "bare-task", "task-five", "task-four", "task-six", "task"]
1252
+ },
1253
+ {
1254
+ "name": "numbers descend with nulls first, ties still by Path",
1255
+ "orderBy": { "by": { "field": "/points" }, "direction": "desc", "nulls": "first" },
1256
+ "order": ["task-seven", "spaced-task", "bare-task", "task", "task-six", "task-five", "task-four"]
1257
+ },
1258
+ {
1259
+ "name": "numbers ascend with nulls last",
1260
+ "orderBy": { "by": { "field": "/points" }, "direction": "asc", "nulls": "last" },
1261
+ "order": ["task-five", "task-four", "task-six", "task", "task-seven", "spaced-task", "bare-task"]
1262
+ },
1263
+ {
1264
+ "name": "numbers descend with nulls last",
1265
+ "orderBy": { "by": { "field": "/points" }, "direction": "desc", "nulls": "last" },
1266
+ "order": ["task", "task-six", "task-five", "task-four", "task-seven", "spaced-task", "bare-task"]
1267
+ },
1268
+ {
1269
+ "name": "integers ascend through negatives, ties by Path",
1270
+ "orderBy": { "by": { "field": "/count" }, "direction": "asc", "nulls": "first" },
1271
+ "order": ["spaced-task", "bare-task", "task-seven", "task-five", "task-four", "task", "task-six"]
1272
+ },
1273
+ {
1274
+ "name": "integers descend, ties by Path",
1275
+ "orderBy": { "by": { "field": "/count" }, "direction": "desc", "nulls": "first" },
1276
+ "order": ["spaced-task", "bare-task", "task-six", "task-four", "task", "task-five", "task-seven"]
1277
+ },
1278
+ {
1279
+ "name": "booleans ascend false before true, null with the missing",
1280
+ "orderBy": { "by": { "field": "/done" }, "direction": "asc", "nulls": "first" },
1281
+ "order": ["task-six", "spaced-task", "bare-task", "task-five", "task", "task-four", "task-seven"]
1282
+ },
1283
+ {
1284
+ "name": "booleans descend with nulls last",
1285
+ "orderBy": { "by": { "field": "/done" }, "direction": "desc", "nulls": "last" },
1286
+ "order": ["task-four", "task-seven", "task-five", "task", "task-six", "spaced-task", "bare-task"]
1287
+ },
1288
+ {
1289
+ "name": "a choice ascends by code point",
1290
+ "orderBy": { "by": { "field": "/status" }, "direction": "asc", "nulls": "first", "stringSort": "lexical" },
1291
+ "order": ["task-seven", "task-four", "task-six", "bare-task", "task-five", "task", "spaced-task"]
1292
+ },
1293
+ {
1294
+ "name": "a choice descends by code point",
1295
+ "orderBy": { "by": { "field": "/status" }, "direction": "desc", "nulls": "first", "stringSort": "lexical" },
1296
+ "order": ["task-seven", "task-five", "task", "spaced-task", "task-four", "task-six", "bare-task"]
1297
+ },
1298
+ {
1299
+ "name": "a choice of integers ascends with its null among the missing",
1300
+ "orderBy": { "by": { "field": "/tier" }, "direction": "asc", "nulls": "first" },
1301
+ "order": ["task-five", "task", "spaced-task", "bare-task", "task-six", "task-four", "task-seven"]
1302
+ },
1303
+ {
1304
+ "name": "a choice of integers descends with nulls last",
1305
+ "orderBy": { "by": { "field": "/tier" }, "direction": "desc", "nulls": "last" },
1306
+ "order": ["task-four", "task-seven", "task-six", "task-five", "task", "spaced-task", "bare-task"]
1307
+ },
1308
+ {
1309
+ "name": "dates ascend, ties by Path",
1310
+ "orderBy": { "by": { "field": "/due" }, "direction": "asc", "nulls": "first", "stringSort": "lexical" },
1311
+ "order": ["task-seven", "spaced-task", "bare-task", "task-four", "task-five", "task", "task-six"]
1312
+ },
1313
+ {
1314
+ "name": "dates descend, ties by Path",
1315
+ "orderBy": { "by": { "field": "/due" }, "direction": "desc", "nulls": "first", "stringSort": "lexical" },
1316
+ "order": ["task-seven", "spaced-task", "bare-task", "task", "task-six", "task-five", "task-four"]
1317
+ },
1318
+ {
1319
+ "name": "date-times ascend by instant whatever their offset, the same instant tied by Path",
1320
+ "orderBy": { "by": { "field": "/at" }, "direction": "asc", "nulls": "first", "stringSort": "lexical" },
1321
+ "order": ["task-seven", "bare-task", "task-five", "task", "spaced-task", "task-six", "task-four"]
1322
+ },
1323
+ {
1324
+ "name": "date-times descend by instant",
1325
+ "orderBy": { "by": { "field": "/at" }, "direction": "desc", "nulls": "first", "stringSort": "lexical" },
1326
+ "order": ["task-seven", "bare-task", "task-four", "task-six", "task", "spaced-task", "task-five"]
1327
+ },
1328
+ {
1329
+ "name": "nullable date-times ascend by instant with nulls last",
1330
+ "orderBy": { "by": { "field": "/ends" }, "direction": "asc", "nulls": "last", "stringSort": "lexical" },
1331
+ "order": ["task-four", "task-five", "task-seven", "task", "task-six", "spaced-task", "bare-task"]
1332
+ },
1333
+ {
1334
+ "name": "nullable date-times descend by instant with nulls first",
1335
+ "orderBy": { "by": { "field": "/ends" }, "direction": "desc", "nulls": "first", "stringSort": "lexical" },
1336
+ "order": ["task", "task-six", "spaced-task", "bare-task", "task-seven", "task-five", "task-four"]
1337
+ },
1338
+ {
1339
+ "name": "times ascend as text, ties by Path",
1340
+ "orderBy": { "by": { "field": "/starts" }, "direction": "asc", "nulls": "first", "stringSort": "lexical" },
1341
+ "order": ["spaced-task", "bare-task", "task-five", "task-four", "task", "task-seven", "task-six"]
1342
+ },
1343
+ {
1344
+ "name": "times descend as text, ties by Path",
1345
+ "orderBy": { "by": { "field": "/starts" }, "direction": "desc", "nulls": "first", "stringSort": "lexical" },
1346
+ "order": ["spaced-task", "bare-task", "task-six", "task", "task-seven", "task-four", "task-five"]
1347
+ },
1348
+ {
1349
+ "name": "bounded text ascends by code point, upper case first and past the basic plane last",
1350
+ "orderBy": { "by": { "field": "/code" }, "direction": "asc", "nulls": "first", "stringSort": "lexical" },
1351
+ "order": ["task", "spaced-task", "bare-task", "task-five", "task-seven", "task-four", "task-six"]
1352
+ },
1353
+ {
1354
+ "name": "bounded text descends by code point with nulls last",
1355
+ "orderBy": { "by": { "field": "/code" }, "direction": "desc", "nulls": "last", "stringSort": "lexical" },
1356
+ "order": ["task-six", "task-four", "task-five", "task-seven", "bare-task", "task", "spaced-task"]
1357
+ }
1358
+ ]
1359
+ }