hyper-html-api 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (449) hide show
  1. package/README.md +4 -1
  2. package/conformance/MANIFEST.json +2 -2
  3. package/conformance/cases/all-matches-read-quoted.expected.json +3 -0
  4. package/conformance/cases/all-matches-read-quoted.html +5 -0
  5. package/conformance/cases/all-matches-read-quoted.meta +7 -0
  6. package/conformance/cases/all-matches-read-quoted.parsed.json +3 -0
  7. package/conformance/cases/all-matches-read.expected.json +3 -0
  8. package/conformance/cases/all-matches-read.html +6 -0
  9. package/conformance/cases/all-matches-read.meta +7 -0
  10. package/conformance/cases/all-matches-read.parsed.json +3 -0
  11. package/conformance/cases/codec-form-nested.error.json +5 -0
  12. package/conformance/cases/codec-form-nested.html +4 -0
  13. package/conformance/cases/codec-form-nested.meta +6 -0
  14. package/conformance/cases/codec-form-nested.parsed.json +5 -0
  15. package/conformance/cases/codec-form-star.error.json +5 -0
  16. package/conformance/cases/codec-form-star.html +4 -0
  17. package/conformance/cases/codec-form-star.meta +6 -0
  18. package/conformance/cases/codec-form-star.parsed.json +3 -0
  19. package/conformance/cases/codec-form-under-v1.error.json +5 -0
  20. package/conformance/cases/codec-form-under-v1.html +4 -0
  21. package/conformance/cases/codec-form-under-v1.meta +6 -0
  22. package/conformance/cases/codec-form-under-v1.parsed.json +3 -0
  23. package/conformance/cases/codec-unknown-name.error.json +5 -0
  24. package/conformance/cases/codec-unknown-name.html +4 -0
  25. package/conformance/cases/codec-unknown-name.meta +6 -0
  26. package/conformance/cases/codec-unknown-name.parsed.json +3 -0
  27. package/conformance/cases/tag-version-2-plain.expected.json +7 -0
  28. package/conformance/cases/tag-version-2-plain.html +5 -0
  29. package/conformance/cases/tag-version-2-plain.meta +6 -0
  30. package/conformance/cases/tag-version-2-plain.parsed.json +4 -0
  31. package/conformance/cases/tag-wrong-version.error.json +1 -1
  32. package/conformance/cases/tag-wrong-version.html +1 -1
  33. package/conformance/cases/write-all-matches-attr.after.html +1 -0
  34. package/conformance/cases/write-all-matches-attr.after.json +3 -0
  35. package/conformance/cases/write-all-matches-attr.data.json +1 -0
  36. package/conformance/cases/write-all-matches-attr.html +1 -0
  37. package/conformance/cases/write-all-matches-attr.meta +6 -0
  38. package/conformance/cases/write-all-matches-attr.write.json +4 -0
  39. package/conformance/cases/write-all-matches-group.after.html +1 -0
  40. package/conformance/cases/write-all-matches-group.after.json +3 -0
  41. package/conformance/cases/write-all-matches-group.data.json +1 -0
  42. package/conformance/cases/write-all-matches-group.html +1 -0
  43. package/conformance/cases/write-all-matches-group.meta +6 -0
  44. package/conformance/cases/write-all-matches-group.write.json +4 -0
  45. package/conformance/cases/write-all-matches-text.after.html +1 -0
  46. package/conformance/cases/write-all-matches-text.after.json +3 -0
  47. package/conformance/cases/write-all-matches-text.data.json +1 -0
  48. package/conformance/cases/write-all-matches-text.html +1 -0
  49. package/conformance/cases/write-all-matches-text.meta +6 -0
  50. package/conformance/cases/write-all-matches-text.write.json +4 -0
  51. package/conformance/cases/write-all-matches-unmatched.data.json +1 -0
  52. package/conformance/cases/write-all-matches-unmatched.error.json +14 -0
  53. package/conformance/cases/write-all-matches-unmatched.html +1 -0
  54. package/conformance/cases/write-all-matches-unmatched.meta +6 -0
  55. package/conformance/sheet/body-data-write.body.json +3 -0
  56. package/conformance/sheet/body-data-write.data.json +3 -0
  57. package/conformance/sheet/body-data-write.html +25 -0
  58. package/conformance/sheet/body-data-write.meta +5 -0
  59. package/conformance/sheet/body-patch-key-in-rules.body.json +3 -0
  60. package/conformance/sheet/body-patch-key-in-rules.data.json +13 -0
  61. package/conformance/sheet/body-patch-key-in-rules.html +18 -0
  62. package/conformance/sheet/body-patch-key-in-rules.meta +5 -0
  63. package/conformance/sheet/body-patch-not-array.body.json +3 -0
  64. package/conformance/sheet/body-patch-not-array.data.json +3 -0
  65. package/conformance/sheet/body-patch-not-array.html +25 -0
  66. package/conformance/sheet/body-patch-not-array.meta +5 -0
  67. package/conformance/sheet/body-patch-on-sheet.body.json +3 -0
  68. package/conformance/sheet/body-patch-on-sheet.data.json +14 -0
  69. package/conformance/sheet/body-patch-on-sheet.html +25 -0
  70. package/conformance/sheet/body-patch-on-sheet.meta +5 -0
  71. package/conformance/sheet/body-patch-version-1.body.json +3 -0
  72. package/conformance/sheet/body-patch-version-1.data.json +13 -0
  73. package/conformance/sheet/body-patch-version-1.html +4 -0
  74. package/conformance/sheet/body-patch-version-1.meta +5 -0
  75. package/conformance/sheet/body-patch-with-other-key.body.json +3 -0
  76. package/conformance/sheet/body-patch-with-other-key.data.json +14 -0
  77. package/conformance/sheet/body-patch-with-other-key.html +25 -0
  78. package/conformance/sheet/body-patch-with-other-key.meta +5 -0
  79. package/conformance/sheet/body-patch-without-operation-id.body.json +3 -0
  80. package/conformance/sheet/body-patch-without-operation-id.data.json +13 -0
  81. package/conformance/sheet/body-patch-without-operation-id.html +25 -0
  82. package/conformance/sheet/body-patch-without-operation-id.meta +5 -0
  83. package/conformance/sheet/params-bad-range.error.json +6 -0
  84. package/conformance/sheet/params-bad-range.html +25 -0
  85. package/conformance/sheet/params-bad-range.meta +6 -0
  86. package/conformance/sheet/params-bad-render.error.json +6 -0
  87. package/conformance/sheet/params-bad-render.html +25 -0
  88. package/conformance/sheet/params-bad-render.meta +6 -0
  89. package/conformance/sheet/params-bad-shape.error.json +6 -0
  90. package/conformance/sheet/params-bad-shape.html +25 -0
  91. package/conformance/sheet/params-bad-shape.meta +6 -0
  92. package/conformance/sheet/params-cache-buster.expected.json +128 -0
  93. package/conformance/sheet/params-cache-buster.html +25 -0
  94. package/conformance/sheet/params-cache-buster.meta +6 -0
  95. package/conformance/sheet/params-data-alone.expected.json +128 -0
  96. package/conformance/sheet/params-data-alone.html +25 -0
  97. package/conformance/sheet/params-data-alone.meta +6 -0
  98. package/conformance/sheet/params-empty.error.json +6 -0
  99. package/conformance/sheet/params-empty.html +25 -0
  100. package/conformance/sheet/params-empty.meta +6 -0
  101. package/conformance/sheet/params-index.expected.json +19 -0
  102. package/conformance/sheet/params-index.html +25 -0
  103. package/conformance/sheet/params-index.meta +6 -0
  104. package/conformance/sheet/params-none.expected.json +128 -0
  105. package/conformance/sheet/params-none.html +25 -0
  106. package/conformance/sheet/params-none.meta +6 -0
  107. package/conformance/sheet/params-range.expected.json +17 -0
  108. package/conformance/sheet/params-range.html +25 -0
  109. package/conformance/sheet/params-range.meta +6 -0
  110. package/conformance/sheet/params-render-without-range.error.json +6 -0
  111. package/conformance/sheet/params-render-without-range.html +25 -0
  112. package/conformance/sheet/params-render-without-range.meta +6 -0
  113. package/conformance/sheet/params-repeated.error.json +6 -0
  114. package/conformance/sheet/params-repeated.html +25 -0
  115. package/conformance/sheet/params-repeated.meta +6 -0
  116. package/conformance/sheet/params-unknown-sheet.error.json +6 -0
  117. package/conformance/sheet/params-unknown-sheet.html +25 -0
  118. package/conformance/sheet/params-unknown-sheet.meta +6 -0
  119. package/conformance/sheet/params-with-data.error.json +6 -0
  120. package/conformance/sheet/params-with-data.html +25 -0
  121. package/conformance/sheet/params-with-data.meta +6 -0
  122. package/conformance/sheet/sheet-contract-cells.expected.json +57 -0
  123. package/conformance/sheet/sheet-contract-cells.html +10 -0
  124. package/conformance/sheet/sheet-contract-cells.meta +6 -0
  125. package/conformance/sheet/sheet-contract-formulas.expected.json +29 -0
  126. package/conformance/sheet/sheet-contract-formulas.html +10 -0
  127. package/conformance/sheet/sheet-contract-formulas.meta +6 -0
  128. package/conformance/sheet/sheet-contract-values.expected.json +29 -0
  129. package/conformance/sheet/sheet-contract-values.html +10 -0
  130. package/conformance/sheet/sheet-contract-values.meta +6 -0
  131. package/conformance/sheet/sheet-contract-whole.expected.json +59 -0
  132. package/conformance/sheet/sheet-contract-whole.html +10 -0
  133. package/conformance/sheet/sheet-contract-whole.meta +5 -0
  134. package/conformance/sheet/sheet-hostile-01.expected.json +18 -0
  135. package/conformance/sheet/sheet-hostile-01.html +6 -0
  136. package/conformance/sheet/sheet-hostile-01.meta +5 -0
  137. package/conformance/sheet/sheet-hostile-02.expected.json +18 -0
  138. package/conformance/sheet/sheet-hostile-02.html +6 -0
  139. package/conformance/sheet/sheet-hostile-02.meta +5 -0
  140. package/conformance/sheet/sheet-hostile-03.expected.json +18 -0
  141. package/conformance/sheet/sheet-hostile-03.html +6 -0
  142. package/conformance/sheet/sheet-hostile-03.meta +5 -0
  143. package/conformance/sheet/sheet-hostile-04.expected.json +18 -0
  144. package/conformance/sheet/sheet-hostile-04.html +6 -0
  145. package/conformance/sheet/sheet-hostile-04.meta +5 -0
  146. package/conformance/sheet/sheet-hostile-05.expected.json +18 -0
  147. package/conformance/sheet/sheet-hostile-05.html +6 -0
  148. package/conformance/sheet/sheet-hostile-05.meta +5 -0
  149. package/conformance/sheet/sheet-hostile-06.expected.json +21 -0
  150. package/conformance/sheet/sheet-hostile-06.html +6 -0
  151. package/conformance/sheet/sheet-hostile-06.meta +5 -0
  152. package/conformance/sheet/sheet-hostile-07.expected.json +21 -0
  153. package/conformance/sheet/sheet-hostile-07.html +6 -0
  154. package/conformance/sheet/sheet-hostile-07.meta +5 -0
  155. package/conformance/sheet/sheet-hostile-08.expected.json +21 -0
  156. package/conformance/sheet/sheet-hostile-08.html +6 -0
  157. package/conformance/sheet/sheet-hostile-08.meta +5 -0
  158. package/conformance/sheet/sheet-hostile-09.expected.json +21 -0
  159. package/conformance/sheet/sheet-hostile-09.html +6 -0
  160. package/conformance/sheet/sheet-hostile-09.meta +5 -0
  161. package/conformance/sheet/sheet-hostile-10.expected.json +21 -0
  162. package/conformance/sheet/sheet-hostile-10.html +6 -0
  163. package/conformance/sheet/sheet-hostile-10.meta +5 -0
  164. package/conformance/sheet/sheet-hostile-11.expected.json +22 -0
  165. package/conformance/sheet/sheet-hostile-11.html +6 -0
  166. package/conformance/sheet/sheet-hostile-11.meta +5 -0
  167. package/conformance/sheet/sheet-hostile-12.expected.json +18 -0
  168. package/conformance/sheet/sheet-hostile-12.html +6 -0
  169. package/conformance/sheet/sheet-hostile-12.meta +5 -0
  170. package/conformance/sheet/sheet-hostile-13.expected.json +18 -0
  171. package/conformance/sheet/sheet-hostile-13.html +6 -0
  172. package/conformance/sheet/sheet-hostile-13.meta +5 -0
  173. package/conformance/sheet/sheet-hostile-14.expected.json +21 -0
  174. package/conformance/sheet/sheet-hostile-14.html +6 -0
  175. package/conformance/sheet/sheet-hostile-14.meta +5 -0
  176. package/conformance/sheet/sheet-hostile-15.expected.json +18 -0
  177. package/conformance/sheet/sheet-hostile-15.html +0 -0
  178. package/conformance/sheet/sheet-hostile-15.meta +5 -0
  179. package/conformance/sheet/sheet-hostile-16.expected.json +18 -0
  180. package/conformance/sheet/sheet-hostile-16.html +6 -0
  181. package/conformance/sheet/sheet-hostile-16.meta +5 -0
  182. package/conformance/sheet/sheet-hostile-17.expected.json +18 -0
  183. package/conformance/sheet/sheet-hostile-17.html +6 -0
  184. package/conformance/sheet/sheet-hostile-17.meta +5 -0
  185. package/conformance/sheet/sheet-hostile-18.expected.json +18 -0
  186. package/conformance/sheet/sheet-hostile-18.html +6 -0
  187. package/conformance/sheet/sheet-hostile-18.meta +5 -0
  188. package/conformance/sheet/sheet-hostile-19.expected.json +18 -0
  189. package/conformance/sheet/sheet-hostile-19.html +6 -0
  190. package/conformance/sheet/sheet-hostile-19.meta +5 -0
  191. package/conformance/sheet/sheet-hostile-20.expected.json +16 -0
  192. package/conformance/sheet/sheet-hostile-20.html +6 -0
  193. package/conformance/sheet/sheet-hostile-20.meta +5 -0
  194. package/conformance/sheet/sheet-hostile-21.expected.json +18 -0
  195. package/conformance/sheet/sheet-hostile-21.html +6 -0
  196. package/conformance/sheet/sheet-hostile-21.meta +5 -0
  197. package/conformance/sheet/sheet-hostile-22.expected.json +21 -0
  198. package/conformance/sheet/sheet-hostile-22.html +6 -0
  199. package/conformance/sheet/sheet-hostile-22.meta +5 -0
  200. package/conformance/sheet/sheet-hostile-23.expected.json +18 -0
  201. package/conformance/sheet/sheet-hostile-23.html +6 -0
  202. package/conformance/sheet/sheet-hostile-23.meta +5 -0
  203. package/conformance/sheet/sheet-hostile-24.expected.json +18 -0
  204. package/conformance/sheet/sheet-hostile-24.html +6 -0
  205. package/conformance/sheet/sheet-hostile-24.meta +5 -0
  206. package/conformance/sheet/sheet-hostile-25.expected.json +18 -0
  207. package/conformance/sheet/sheet-hostile-25.html +6 -0
  208. package/conformance/sheet/sheet-hostile-25.meta +5 -0
  209. package/conformance/sheet/sheet-hostile-26.expected.json +18 -0
  210. package/conformance/sheet/sheet-hostile-26.html +6 -0
  211. package/conformance/sheet/sheet-hostile-26.meta +5 -0
  212. package/conformance/sheet/sheet-hostile-27.expected.json +24 -0
  213. package/conformance/sheet/sheet-hostile-27.html +7 -0
  214. package/conformance/sheet/sheet-hostile-27.meta +5 -0
  215. package/conformance/sheet/sheet-hostile-28.expected.json +18 -0
  216. package/conformance/sheet/sheet-hostile-28.html +6 -0
  217. package/conformance/sheet/sheet-hostile-28.meta +5 -0
  218. package/conformance/sheet/sheet-hostile-29.expected.json +18 -0
  219. package/conformance/sheet/sheet-hostile-29.html +6 -0
  220. package/conformance/sheet/sheet-hostile-29.meta +5 -0
  221. package/conformance/sheet/sheet-hostile-30.expected.json +18 -0
  222. package/conformance/sheet/sheet-hostile-30.html +6 -0
  223. package/conformance/sheet/sheet-hostile-30.meta +5 -0
  224. package/conformance/sheet/sheet-hostile-31.expected.json +19 -0
  225. package/conformance/sheet/sheet-hostile-31.html +6 -0
  226. package/conformance/sheet/sheet-hostile-31.meta +5 -0
  227. package/conformance/sheet/sheet-hostile-32.expected.json +24 -0
  228. package/conformance/sheet/sheet-hostile-32.html +6 -0
  229. package/conformance/sheet/sheet-hostile-32.meta +5 -0
  230. package/conformance/sheet/sheet-hostile-33.expected.json +18 -0
  231. package/conformance/sheet/sheet-hostile-33.html +6 -0
  232. package/conformance/sheet/sheet-hostile-33.meta +5 -0
  233. package/conformance/sheet/sheet-hostile-34.expected.json +24 -0
  234. package/conformance/sheet/sheet-hostile-34.html +8 -0
  235. package/conformance/sheet/sheet-hostile-34.meta +5 -0
  236. package/conformance/sheet/sheet-hostile-35.expected.json +24 -0
  237. package/conformance/sheet/sheet-hostile-35.html +8 -0
  238. package/conformance/sheet/sheet-hostile-35.meta +5 -0
  239. package/conformance/sheet/sheet-patch-append.after.html +27 -0
  240. package/conformance/sheet/sheet-patch-append.after.json +143 -0
  241. package/conformance/sheet/sheet-patch-append.data.json +15 -0
  242. package/conformance/sheet/sheet-patch-append.html +25 -0
  243. package/conformance/sheet/sheet-patch-append.meta +5 -0
  244. package/conformance/sheet/sheet-patch-append.write.json +7 -0
  245. package/conformance/sheet/sheet-patch-bad-range.data.json +11 -0
  246. package/conformance/sheet/sheet-patch-bad-range.error.json +6 -0
  247. package/conformance/sheet/sheet-patch-bad-range.html +25 -0
  248. package/conformance/sheet/sheet-patch-bad-range.meta +5 -0
  249. package/conformance/sheet/sheet-patch-bad-value.data.json +13 -0
  250. package/conformance/sheet/sheet-patch-bad-value.error.json +6 -0
  251. package/conformance/sheet/sheet-patch-bad-value.html +25 -0
  252. package/conformance/sheet/sheet-patch-bad-value.meta +5 -0
  253. package/conformance/sheet/sheet-patch-clean-tab-beside-edited.after.html +25 -0
  254. package/conformance/sheet/sheet-patch-clean-tab-beside-edited.after.json +129 -0
  255. package/conformance/sheet/sheet-patch-clean-tab-beside-edited.data.json +11 -0
  256. package/conformance/sheet/sheet-patch-clean-tab-beside-edited.html +25 -0
  257. package/conformance/sheet/sheet-patch-clean-tab-beside-edited.meta +5 -0
  258. package/conformance/sheet/sheet-patch-clean-tab-beside-edited.write.json +7 -0
  259. package/conformance/sheet/sheet-patch-covered-cell.data.json +10 -0
  260. package/conformance/sheet/sheet-patch-covered-cell.error.json +6 -0
  261. package/conformance/sheet/sheet-patch-covered-cell.html +10 -0
  262. package/conformance/sheet/sheet-patch-covered-cell.meta +5 -0
  263. package/conformance/sheet/sheet-patch-empty.data.json +1 -0
  264. package/conformance/sheet/sheet-patch-empty.error.json +6 -0
  265. package/conformance/sheet/sheet-patch-empty.html +25 -0
  266. package/conformance/sheet/sheet-patch-empty.meta +5 -0
  267. package/conformance/sheet/sheet-patch-fallback-route.after.html +24 -0
  268. package/conformance/sheet/sheet-patch-fallback-route.after.json +86 -0
  269. package/conformance/sheet/sheet-patch-fallback-route.data.json +10 -0
  270. package/conformance/sheet/sheet-patch-fallback-route.html +24 -0
  271. package/conformance/sheet/sheet-patch-fallback-route.meta +5 -0
  272. package/conformance/sheet/sheet-patch-fallback-route.write.json +7 -0
  273. package/conformance/sheet/sheet-patch-first-tab.after.html +25 -0
  274. package/conformance/sheet/sheet-patch-first-tab.after.json +129 -0
  275. package/conformance/sheet/sheet-patch-first-tab.data.json +10 -0
  276. package/conformance/sheet/sheet-patch-first-tab.html +25 -0
  277. package/conformance/sheet/sheet-patch-first-tab.meta +5 -0
  278. package/conformance/sheet/sheet-patch-first-tab.write.json +7 -0
  279. package/conformance/sheet/sheet-patch-formula.after.html +25 -0
  280. package/conformance/sheet/sheet-patch-formula.after.json +128 -0
  281. package/conformance/sheet/sheet-patch-formula.data.json +11 -0
  282. package/conformance/sheet/sheet-patch-formula.html +25 -0
  283. package/conformance/sheet/sheet-patch-formula.meta +5 -0
  284. package/conformance/sheet/sheet-patch-formula.write.json +7 -0
  285. package/conformance/sheet/sheet-patch-no-sheet-rule.data.json +10 -0
  286. package/conformance/sheet/sheet-patch-no-sheet-rule.error.json +6 -0
  287. package/conformance/sheet/sheet-patch-no-sheet-rule.html +18 -0
  288. package/conformance/sheet/sheet-patch-no-sheet-rule.meta +5 -0
  289. package/conformance/sheet/sheet-patch-no-values.data.json +6 -0
  290. package/conformance/sheet/sheet-patch-no-values.error.json +6 -0
  291. package/conformance/sheet/sheet-patch-no-values.html +25 -0
  292. package/conformance/sheet/sheet-patch-no-values.meta +5 -0
  293. package/conformance/sheet/sheet-patch-not-canonical.data.json +11 -0
  294. package/conformance/sheet/sheet-patch-not-canonical.error.json +6 -0
  295. package/conformance/sheet/sheet-patch-not-canonical.html +25 -0
  296. package/conformance/sheet/sheet-patch-not-canonical.meta +5 -0
  297. package/conformance/sheet/sheet-patch-outside-sheet.data.json +11 -0
  298. package/conformance/sheet/sheet-patch-outside-sheet.error.json +6 -0
  299. package/conformance/sheet/sheet-patch-outside-sheet.html +25 -0
  300. package/conformance/sheet/sheet-patch-outside-sheet.meta +5 -0
  301. package/conformance/sheet/sheet-patch-range.after.html +25 -0
  302. package/conformance/sheet/sheet-patch-range.after.json +126 -0
  303. package/conformance/sheet/sheet-patch-range.data.json +11 -0
  304. package/conformance/sheet/sheet-patch-range.html +25 -0
  305. package/conformance/sheet/sheet-patch-range.meta +5 -0
  306. package/conformance/sheet/sheet-patch-range.write.json +7 -0
  307. package/conformance/sheet/sheet-patch-two-tabs.after.html +25 -0
  308. package/conformance/sheet/sheet-patch-two-tabs.after.json +130 -0
  309. package/conformance/sheet/sheet-patch-two-tabs.data.json +20 -0
  310. package/conformance/sheet/sheet-patch-two-tabs.html +25 -0
  311. package/conformance/sheet/sheet-patch-two-tabs.meta +5 -0
  312. package/conformance/sheet/sheet-patch-two-tabs.write.json +7 -0
  313. package/conformance/sheet/sheet-patch-typed.after.html +25 -0
  314. package/conformance/sheet/sheet-patch-typed.after.json +121 -0
  315. package/conformance/sheet/sheet-patch-typed.data.json +13 -0
  316. package/conformance/sheet/sheet-patch-typed.html +25 -0
  317. package/conformance/sheet/sheet-patch-typed.meta +5 -0
  318. package/conformance/sheet/sheet-patch-typed.write.json +7 -0
  319. package/conformance/sheet/sheet-patch-unknown-sheet.data.json +11 -0
  320. package/conformance/sheet/sheet-patch-unknown-sheet.error.json +6 -0
  321. package/conformance/sheet/sheet-patch-unknown-sheet.html +25 -0
  322. package/conformance/sheet/sheet-patch-unknown-sheet.meta +5 -0
  323. package/conformance/sheet/sheet-read-bad-range.error.json +6 -0
  324. package/conformance/sheet/sheet-read-bad-range.html +25 -0
  325. package/conformance/sheet/sheet-read-bad-range.meta +6 -0
  326. package/conformance/sheet/sheet-read-bad-render.error.json +6 -0
  327. package/conformance/sheet/sheet-read-bad-render.html +25 -0
  328. package/conformance/sheet/sheet-read-bad-render.meta +6 -0
  329. package/conformance/sheet/sheet-read-digest.expected.json +91 -0
  330. package/conformance/sheet/sheet-read-digest.html +25 -0
  331. package/conformance/sheet/sheet-read-digest.meta +6 -0
  332. package/conformance/sheet/sheet-read-empty.expected.json +11 -0
  333. package/conformance/sheet/sheet-read-empty.html +6 -0
  334. package/conformance/sheet/sheet-read-empty.meta +5 -0
  335. package/conformance/sheet/sheet-read-escapes.expected.json +108 -0
  336. package/conformance/sheet/sheet-read-escapes.html +22 -0
  337. package/conformance/sheet/sheet-read-escapes.meta +5 -0
  338. package/conformance/sheet/sheet-read-formulas-formatted.expected.json +298 -0
  339. package/conformance/sheet/sheet-read-formulas-formatted.html +16 -0
  340. package/conformance/sheet/sheet-read-formulas-formatted.meta +5 -0
  341. package/conformance/sheet/sheet-read-grid-in-comment.expected.json +85 -0
  342. package/conformance/sheet/sheet-read-grid-in-comment.html +24 -0
  343. package/conformance/sheet/sheet-read-grid-in-comment.meta +5 -0
  344. package/conformance/sheet/sheet-read-grid-in-script.expected.json +85 -0
  345. package/conformance/sheet/sheet-read-grid-in-script.html +24 -0
  346. package/conformance/sheet/sheet-read-grid-in-script.meta +5 -0
  347. package/conformance/sheet/sheet-read-grid-in-template.expected.json +85 -0
  348. package/conformance/sheet/sheet-read-grid-in-template.html +24 -0
  349. package/conformance/sheet/sheet-read-grid-in-template.meta +5 -0
  350. package/conformance/sheet/sheet-read-grid-in-textarea.expected.json +85 -0
  351. package/conformance/sheet/sheet-read-grid-in-textarea.html +24 -0
  352. package/conformance/sheet/sheet-read-grid-in-textarea.meta +5 -0
  353. package/conformance/sheet/sheet-read-grid-outside-read-by-rule.expected.json +94 -0
  354. package/conformance/sheet/sheet-read-grid-outside-read-by-rule.html +24 -0
  355. package/conformance/sheet/sheet-read-grid-outside-read-by-rule.meta +5 -0
  356. package/conformance/sheet/sheet-read-grid-outside-sheet.expected.json +85 -0
  357. package/conformance/sheet/sheet-read-grid-outside-sheet.html +24 -0
  358. package/conformance/sheet/sheet-read-grid-outside-sheet.meta +5 -0
  359. package/conformance/sheet/sheet-read-hand-edited.expected.json +85 -0
  360. package/conformance/sheet/sheet-read-hand-edited.html +18 -0
  361. package/conformance/sheet/sheet-read-hand-edited.meta +5 -0
  362. package/conformance/sheet/sheet-read-index.expected.json +19 -0
  363. package/conformance/sheet/sheet-read-index.html +25 -0
  364. package/conformance/sheet/sheet-read-index.meta +6 -0
  365. package/conformance/sheet/sheet-read-merged.expected.json +59 -0
  366. package/conformance/sheet/sheet-read-merged.html +10 -0
  367. package/conformance/sheet/sheet-read-merged.meta +5 -0
  368. package/conformance/sheet/sheet-read-no-tag.error.json +5 -0
  369. package/conformance/sheet/sheet-read-no-tag.html +18 -0
  370. package/conformance/sheet/sheet-read-no-tag.meta +5 -0
  371. package/conformance/sheet/sheet-read-padded-name-index.expected.json +19 -0
  372. package/conformance/sheet/sheet-read-padded-name-index.html +25 -0
  373. package/conformance/sheet/sheet-read-padded-name-index.meta +6 -0
  374. package/conformance/sheet/sheet-read-padded-name-lookup.expected.json +83 -0
  375. package/conformance/sheet/sheet-read-padded-name-lookup.html +25 -0
  376. package/conformance/sheet/sheet-read-padded-name-lookup.meta +6 -0
  377. package/conformance/sheet/sheet-read-padded-name-trimmed-lookup.error.json +6 -0
  378. package/conformance/sheet/sheet-read-padded-name-trimmed-lookup.html +25 -0
  379. package/conformance/sheet/sheet-read-padded-name-trimmed-lookup.meta +6 -0
  380. package/conformance/sheet/sheet-read-padded-name.expected.json +128 -0
  381. package/conformance/sheet/sheet-read-padded-name.html +25 -0
  382. package/conformance/sheet/sheet-read-padded-name.meta +5 -0
  383. package/conformance/sheet/sheet-read-range-cells.expected.json +55 -0
  384. package/conformance/sheet/sheet-read-range-cells.html +25 -0
  385. package/conformance/sheet/sheet-read-range-cells.meta +6 -0
  386. package/conformance/sheet/sheet-read-range-first-tab.expected.json +12 -0
  387. package/conformance/sheet/sheet-read-range-first-tab.html +25 -0
  388. package/conformance/sheet/sheet-read-range-first-tab.meta +6 -0
  389. package/conformance/sheet/sheet-read-range-formulas.expected.json +24 -0
  390. package/conformance/sheet/sheet-read-range-formulas.html +25 -0
  391. package/conformance/sheet/sheet-read-range-formulas.meta +6 -0
  392. package/conformance/sheet/sheet-read-range-values.expected.json +24 -0
  393. package/conformance/sheet/sheet-read-range-values.html +25 -0
  394. package/conformance/sheet/sheet-read-range-values.meta +6 -0
  395. package/conformance/sheet/sheet-read-sheet-by-id.expected.json +46 -0
  396. package/conformance/sheet/sheet-read-sheet-by-id.html +25 -0
  397. package/conformance/sheet/sheet-read-sheet-by-id.meta +6 -0
  398. package/conformance/sheet/sheet-read-sheet-by-name.expected.json +46 -0
  399. package/conformance/sheet/sheet-read-sheet-by-name.html +25 -0
  400. package/conformance/sheet/sheet-read-sheet-by-name.meta +6 -0
  401. package/conformance/sheet/sheet-read-styled.expected.json +48 -0
  402. package/conformance/sheet/sheet-read-styled.html +10 -0
  403. package/conformance/sheet/sheet-read-styled.meta +5 -0
  404. package/conformance/sheet/sheet-read-tiny.expected.json +85 -0
  405. package/conformance/sheet/sheet-read-tiny.html +18 -0
  406. package/conformance/sheet/sheet-read-tiny.meta +5 -0
  407. package/conformance/sheet/sheet-read-two-tabs.expected.json +128 -0
  408. package/conformance/sheet/sheet-read-two-tabs.html +25 -0
  409. package/conformance/sheet/sheet-read-two-tabs.meta +5 -0
  410. package/conformance/sheet/sheet-read-unknown-sheet.error.json +6 -0
  411. package/conformance/sheet/sheet-read-unknown-sheet.html +25 -0
  412. package/conformance/sheet/sheet-read-unknown-sheet.meta +6 -0
  413. package/conformance/sheet/sheet-read-version-1-codec.error.json +5 -0
  414. package/conformance/sheet/sheet-read-version-1-codec.html +25 -0
  415. package/conformance/sheet/sheet-read-version-1-codec.meta +5 -0
  416. package/conformance/sheet/sheet-write-whole-refused.data.json +3 -0
  417. package/conformance/sheet/sheet-write-whole-refused.error.json +7 -0
  418. package/conformance/sheet/sheet-write-whole-refused.html +25 -0
  419. package/conformance/sheet/sheet-write-whole-refused.meta +5 -0
  420. package/conformance/sheet-guard-extraction.json +616 -0
  421. package/conformance/sheet-guard.json +32362 -0
  422. package/conformance/sheet-read-shapes.json +1 -0
  423. package/dist/hyper-html-api.engine.esm.js +1 -1
  424. package/dist/hyper-html-api.engine.min.js +1 -1
  425. package/dist/hyper-html-api.min.js +8 -8
  426. package/dist/hyper-html-api.upgrade.min.js +2 -2
  427. package/package.json +6 -3
  428. package/src/codecs/sheet.js +127 -0
  429. package/src/codecs/sheet.vendor.js +887 -0
  430. package/src/dom-api.js +20 -11
  431. package/src/engine/apply.js +17 -7
  432. package/src/engine/codecs.js +80 -0
  433. package/src/engine/errors.js +20 -1
  434. package/src/engine/extract.js +17 -3
  435. package/src/engine/index.js +9 -5
  436. package/src/engine/round-trip.js +24 -10
  437. package/src/engine/rule-syntax.js +29 -3
  438. package/src/engine/rules-tag.js +3 -2
  439. package/src/engine/write-plan.js +4 -3
  440. package/src/page.js +15 -5
  441. package/src/patch-document.js +122 -0
  442. package/src/read.js +163 -0
  443. package/src/site.js +164 -0
  444. package/src/upgrade/codec-carry.js +23 -0
  445. package/src/upgrade/extract-all.js +12 -3
  446. package/src/upgrade/migrate.js +31 -3
  447. package/src/upgrade/rules-tags.js +4 -4
  448. package/src/upgrade/shape-match.js +32 -13
  449. package/src/write.js +44 -5
package/README.md CHANGED
@@ -91,7 +91,10 @@ HyperHtmlApi.upgrade.run({ sourceUrl?, dataByName?, fromVersion? })
91
91
 
92
92
  The join is name-match per rules tag: fields present in both carry over, fields
93
93
  only in the old data are discarded (and counted in `summary`), fields only in
94
- the new template keep its defaults, and list counts follow the old data. For
94
+ the new template keep its defaults, and list counts follow the old data. A list
95
+ item is the exception to defaults: it is the owner's own row, so a field the new
96
+ template adds inside a list item starts empty (a list starts with no items)
97
+ instead of taking the value of the template's sample item. For
95
98
  richer migrations (renames, splits, computed fields) the source declares a
96
99
  transform as a non-executing script tag in its own HTML:
97
100
 
@@ -1,6 +1,6 @@
1
1
  {
2
- "engine": "0.12.0",
2
+ "engine": "0.15.0",
3
3
  "cheerio": "1.2.0",
4
- "cases": 83,
4
+ "cases": 202,
5
5
  "note": "Versions the expectations were generated against. Parity means parity with THIS pair; regenerate deliberately, never as a side effect of an install."
6
6
  }
@@ -0,0 +1,3 @@
1
+ {
2
+ "name": "Hyper"
3
+ }
@@ -0,0 +1,5 @@
1
+ <!doctype html><html><body>
2
+ <header><span class="site-name">Hyper</span></header>
3
+ <footer><span class="site-name">Old Hyper</span></footer>
4
+ <script data-rules-name="api" data-rules-version="1">{"name": "span.site-name[*]"}</script>
5
+ </body></html>
@@ -0,0 +1,7 @@
1
+ tier: 1
2
+ face: tag
3
+ token: api
4
+ expect: ok
5
+ skip: htmlclay=all-matches form not ported yet (multi-page sites release 1, step G1)
6
+ note: The [*] marker is not a quote-level token: a strict JSON quoted rule value lands on the
7
+ note: same parse tree as the relaxed unquoted spelling in all-matches-read.
@@ -0,0 +1,3 @@
1
+ {
2
+ "name": "span.site-name[*]"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "name": "Hyper"
3
+ }
@@ -0,0 +1,6 @@
1
+ <!doctype html><html><body>
2
+ <header><span class="site-name">Hyper</span></header>
3
+ <main><h1>Hello</h1></main>
4
+ <footer><span class="site-name">Old Hyper</span></footer>
5
+ <script data-rules-name="api" data-rules-version="1">{name:"span.site-name[*]"}</script>
6
+ </body></html>
@@ -0,0 +1,7 @@
1
+ tier: 1
2
+ face: tag
3
+ token: api
4
+ expect: ok
5
+ skip: htmlclay=all-matches form not ported yet (multi-page sites release 1, step G1)
6
+ note: The [*] marker belongs to the write face: extraction still reports the first match under
7
+ note: an ordinary key, so a [*] rule reads like the same rule without the marker.
@@ -0,0 +1,3 @@
1
+ {
2
+ "name": "span.site-name[*]"
3
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "type": "RulesParseError",
3
+ "message": "A @codec(name) rule must be the value of a top level key.",
4
+ "status": 400
5
+ }
@@ -0,0 +1,4 @@
1
+ <!doctype html><html><body>
2
+ <h1>Hello</h1>
3
+ <script data-rules-name="api" data-rules-version="2">{post:{shout:"h1@codec(upper)"}}</script>
4
+ </body></html>
@@ -0,0 +1,6 @@
1
+ tier: 1
2
+ face: tag
3
+ token: api
4
+ expect: error
5
+ note: RulesParseError. A codec rule must be the value of a top level key, so one nested inside
6
+ note: an object or a list shape refuses instead of being read as an attribute.
@@ -0,0 +1,5 @@
1
+ {
2
+ "post": {
3
+ "shout": "h1@codec(upper)"
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "type": "RulesParseError",
3
+ "message": "A @codec(name) rule cannot use [*].",
4
+ "status": 400
5
+ }
@@ -0,0 +1,4 @@
1
+ <!doctype html><html><body>
2
+ <h1>Hello</h1>
3
+ <script data-rules-name="api" data-rules-version="2">{shout:"h1[*]@codec(upper)"}</script>
4
+ </body></html>
@@ -0,0 +1,6 @@
1
+ tier: 1
2
+ face: tag
3
+ token: api
4
+ expect: error
5
+ note: RulesParseError. A codec owns one element's whole value, so it cannot be spread over
6
+ note: every match of a [*] rule.
@@ -0,0 +1,3 @@
1
+ {
2
+ "shout": "h1[*]@codec(upper)"
3
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "type": "RulesParseError",
3
+ "message": "The @codec(name) rule form needs a rules tag with data-rules-version=\"2\".",
4
+ "status": 400
5
+ }
@@ -0,0 +1,4 @@
1
+ <!doctype html><html><body>
2
+ <h1>Hello</h1>
3
+ <script data-rules-name="api" data-rules-version="1">{shout:"h1@codec(upper)"}</script>
4
+ </body></html>
@@ -0,0 +1,6 @@
1
+ tier: 1
2
+ face: tag
3
+ token: api
4
+ expect: error
5
+ note: RulesParseError. The codec form is reserved in every version, so a version 1 tag refuses
6
+ note: it instead of reading an attribute named codec(upper) and returning null unnoticed.
@@ -0,0 +1,3 @@
1
+ {
2
+ "shout": "h1@codec(upper)"
3
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "type": "UnknownCodec",
3
+ "message": "unknown codec \"nope\": no codec by that name is given to this call",
4
+ "status": 400
5
+ }
@@ -0,0 +1,4 @@
1
+ <!doctype html><html><body>
2
+ <h1>Hello</h1>
3
+ <script data-rules-name="api" data-rules-version="2">{shout:"h1@codec(nope)"}</script>
4
+ </body></html>
@@ -0,0 +1,6 @@
1
+ tier: 1
2
+ face: tag
3
+ token: api
4
+ expect: error
5
+ note: UnknownCodec. The reference runner passes no codecs, so any codec name is unknown here;
6
+ note: a host that does not know the codec refuses rather than returning null.
@@ -0,0 +1,3 @@
1
+ {
2
+ "shout": "h1@codec(nope)"
3
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "title": "Hello",
3
+ "items": [
4
+ "one",
5
+ "two"
6
+ ]
7
+ }
@@ -0,0 +1,5 @@
1
+ <!doctype html><html><body>
2
+ <h1>Hello</h1>
3
+ <ul><li class="i">one</li><li class="i">two</li></ul>
4
+ <script data-rules-name="api" data-rules-version="2">{title:"h1",items:".i[]"}</script>
5
+ </body></html>
@@ -0,0 +1,6 @@
1
+ tier: 1
2
+ face: tag
3
+ token: api
4
+ expect: ok
5
+ note: A version 2 tag with only ordinary rules reads exactly as version 1 does. The version
6
+ note: gates the @codec(name) form, it does not change how selectors or lists are read.
@@ -0,0 +1,4 @@
1
+ {
2
+ "title": "h1",
3
+ "items": ".i[]"
4
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "type": "UnknownRulesVersion",
3
- "message": "unknown rules version: 2. Library supports \"1\".",
3
+ "message": "unknown rules version: 3. Library supports \"1\" and \"2\".",
4
4
  "status": 400
5
5
  }
@@ -1,4 +1,4 @@
1
1
  <!doctype html><html><body>
2
2
  <h1>Hello</h1>
3
- <script data-rules-name="api" data-rules-version="2">{title:"h1"}</script>
3
+ <script data-rules-name="api" data-rules-version="3">{title:"h1"}</script>
4
4
  </body></html>
@@ -0,0 +1 @@
1
+ <script data-rules-name="api" data-rules-version="1">{home:"a.home[*]@href"}</script><nav><a class="home" href="/start">Home</a><a class="home" href="/start">About</a></nav>
@@ -0,0 +1,3 @@
1
+ {
2
+ "home": "/start"
3
+ }
@@ -0,0 +1 @@
1
+ {"home":"/start"}
@@ -0,0 +1 @@
1
+ <script data-rules-name="api" data-rules-version="1">{home:"a.home[*]@href"}</script><nav><a class="home" href="/">Home</a><a class="home" href="/about">About</a></nav>
@@ -0,0 +1,6 @@
1
+ tier: 1
2
+ face: write
3
+ expect: ok
4
+ skip: htmlclay=all-matches form not ported yet (multi-page sites release 1, step G1)
5
+ note: The marker goes on the selector, before the @prop separator, and every match's attribute
6
+ note: is written.
@@ -0,0 +1,4 @@
1
+ {
2
+ "changed": true,
3
+ "spliced": true
4
+ }
@@ -0,0 +1 @@
1
+ <script data-rules-name="api" data-rules-version="1">{title:"title, span.site-name[*]"}</script><title>New title</title><header><span class="site-name">New title</span></header><footer><span class="site-name">New title</span></footer>
@@ -0,0 +1,3 @@
1
+ {
2
+ "title": "New title"
3
+ }
@@ -0,0 +1 @@
1
+ {"title":"New title"}
@@ -0,0 +1 @@
1
+ <script data-rules-name="api" data-rules-version="1">{title:"title, span.site-name[*]"}</script><title>Old title</title><header><span class="site-name">Old name</span></header><footer><span class="site-name">Old name</span></footer>
@@ -0,0 +1,6 @@
1
+ tier: 1
2
+ face: write
3
+ expect: ok
4
+ skip: htmlclay=all-matches form not ported yet (multi-page sites release 1, step G1)
5
+ note: The marker does not cover the whole group: it covers only the last selector in it, so
6
+ note: title is written once and both .site-name matches are written.
@@ -0,0 +1,4 @@
1
+ {
2
+ "changed": true,
3
+ "spliced": true
4
+ }
@@ -0,0 +1 @@
1
+ <script data-rules-name="api" data-rules-version="1">{name:"span.site-name[*]"}</script><header><span class="site-name">Hyper</span></header><footer><span class="site-name">Hyper</span></footer>
@@ -0,0 +1,3 @@
1
+ {
2
+ "name": "Hyper"
3
+ }
@@ -0,0 +1 @@
1
+ {"name":"Hyper"}
@@ -0,0 +1 @@
1
+ <script data-rules-name="api" data-rules-version="1">{name:"span.site-name[*]"}</script><header><span class="site-name">Old name</span></header><footer><span class="site-name">Old name</span></footer>
@@ -0,0 +1,6 @@
1
+ tier: 1
2
+ face: write
3
+ expect: ok
4
+ skip: htmlclay=all-matches form not ported yet (multi-page sites release 1, step G1)
5
+ note: A [*] text rule writes every match of its selector, not just the first: this is how a
6
+ note: site's shared value reaches every page element that shows it.
@@ -0,0 +1,4 @@
1
+ {
2
+ "changed": true,
3
+ "spliced": true
4
+ }
@@ -0,0 +1 @@
1
+ {"name":"Hyper"}
@@ -0,0 +1,14 @@
1
+ {
2
+ "type": "WriteRejected",
3
+ "message": "write rejected: 0 unknown key(s), 1 rule(s) with no matching element",
4
+ "status": 400,
5
+ "details": {
6
+ "unknownKeys": [],
7
+ "unmatched": [
8
+ {
9
+ "path": "name",
10
+ "selector": ".missing"
11
+ }
12
+ ]
13
+ }
14
+ }
@@ -0,0 +1 @@
1
+ <script data-rules-name="api" data-rules-version="1">{name:".missing[*]"}</script><header><span class="site-name">Old name</span></header>
@@ -0,0 +1,6 @@
1
+ tier: 1
2
+ face: write
3
+ expect: error
4
+ skip: htmlclay=all-matches form not ported yet (multi-page sites release 1, step G1)
5
+ note: Zero matches is still zero matches: the marker says "all of them", not "at least one",
6
+ note: and the rejection reports the selector without the marker.
@@ -0,0 +1,3 @@
1
+ {
2
+ "kind": "data"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "title": "New"
3
+ }
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html><head><script type="application/json" data-rules-name="api" data-rules-version="2">{"title":"h1","sheets":"[items=sheets]@codec(sheet)"}</script></head><body><h1>Book</h1><main sap data-rev="12"><div items="sheets">
3
+ <section item data-id="s1" data-pos="V"><h2 bind="name">Budget</h2><table grid freeze-cols="1"><colgroup><col data-id="ca" data-pos="G" style="width:180px"><col data-id="cb" data-pos="V" fmt="$#,##0.00"><col data-id="cc" data-pos="l" fmt="0%"></colgroup>
4
+ <thead>
5
+ <tr data-id="r1" data-pos="8"><td style="font-weight:bold">Item</td><td>Cost</td><td>Share</td></tr>
6
+ </thead><tbody>
7
+ <tr data-id="r2" data-pos="G"><td>Rent</td><td n v="1200">$1,200.00</td><td n f="=B2/B$5" v="0.8">80%</td></tr>
8
+ <tr data-id="r3" data-pos="O"><td>Food</td><td n v="300">$300.00</td><td n f="=B3/B$5" v="0.2">20%</td></tr>
9
+ <tr data-id="r4" data-pos="V"></tr>
10
+ <tr data-id="r5" data-pos="d"><td style="font-weight:bold">Total</td><td n f="=SUM(B2:B3)" v="1500">$1,500.00</td></tr>
11
+ <tr data-id="r6" data-pos="l"><td colspan="3" style="text-align:center">Prices as of November</td><td hidden></td><td hidden></td></tr>
12
+ </tbody></table>
13
+ <table grid><colgroup><col data-id="cd" data-pos="G"><col data-id="ce" data-pos="V"></colgroup>
14
+ <tbody>
15
+ <tr data-id="r7" data-pos="G"><td>Lisbon</td><td n v="46095" fmt="mmm d, yyyy">Mar 14, 2026</td></tr>
16
+ <tr data-id="r8" data-pos="V"><td>Budget left</td><td n f="=5000-Budget!B5" v="3500" fmt="$#,##0.00">$3,500.00</td></tr>
17
+ </tbody></table></section>
18
+ <section item data-id="s2" data-pos="V"><h2 bind="name">Styled</h2><table grid freeze-cols="2"><colgroup><col data-id="st-c0" data-pos="G" style="width:120px"><col data-id="st-c1" data-pos="V" fmt="0.0%"><col data-id="st-c2" data-pos="l"></colgroup>
19
+ <thead>
20
+ <tr data-id="st-r1" data-pos="G" style="font-weight:bold;background:#eef"><td>Name</td><td>Share</td><td>Note</td></tr>
21
+ </thead><tbody>
22
+ <tr data-id="st-r2" data-pos="V"><td style="color:#c00">Red</td><td n v="0.125" style="text-align:right;font-style:italic">12.5%</td><td style="text-decoration:underline;white-space:nowrap">underlined</td></tr>
23
+ <tr data-id="st-r3" data-pos="l" style="border-bottom:1px solid #999"><td>last</td></tr>
24
+ </tbody></table></section>
25
+ </div></main></body></html>
@@ -0,0 +1,5 @@
1
+ tier: 1
2
+ face: body
3
+ token: api
4
+ expect: ok
5
+ note: an ordinary data body is a data write
@@ -0,0 +1,3 @@
1
+ {
2
+ "kind": "data"
3
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "patch": [
3
+ {
4
+ "sheet": "Budget",
5
+ "range": "B3",
6
+ "values": [
7
+ [
8
+ 450
9
+ ]
10
+ ]
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html>
2
+ <html><head><script type="application/json" data-rules-name="api" data-rules-version="2">{"title":"h1","patch":"#patch","sheets":"[items=sheets]@codec(sheet)"}</script></head><body><h1>Book</h1><p id="patch">notes</p><main sap data-rev="12"><div items="sheets">
3
+ <section item data-id="s1" data-pos="V"><h2 bind="name">Budget</h2><table grid freeze-cols="1"><colgroup><col data-id="ca" data-pos="G" style="width:180px"><col data-id="cb" data-pos="V" fmt="$#,##0.00"><col data-id="cc" data-pos="l" fmt="0%"></colgroup>
4
+ <thead>
5
+ <tr data-id="r1" data-pos="8"><td style="font-weight:bold">Item</td><td>Cost</td><td>Share</td></tr>
6
+ </thead><tbody>
7
+ <tr data-id="r2" data-pos="G"><td>Rent</td><td n v="1200">$1,200.00</td><td n f="=B2/B$5" v="0.8">80%</td></tr>
8
+ <tr data-id="r3" data-pos="O"><td>Food</td><td n v="300">$300.00</td><td n f="=B3/B$5" v="0.2">20%</td></tr>
9
+ <tr data-id="r4" data-pos="V"></tr>
10
+ <tr data-id="r5" data-pos="d"><td style="font-weight:bold">Total</td><td n f="=SUM(B2:B3)" v="1500">$1,500.00</td></tr>
11
+ <tr data-id="r6" data-pos="l"><td colspan="3" style="text-align:center">Prices as of November</td><td hidden></td><td hidden></td></tr>
12
+ </tbody></table>
13
+ <table grid><colgroup><col data-id="cd" data-pos="G"><col data-id="ce" data-pos="V"></colgroup>
14
+ <tbody>
15
+ <tr data-id="r7" data-pos="G"><td>Lisbon</td><td n v="46095" fmt="mmm d, yyyy">Mar 14, 2026</td></tr>
16
+ <tr data-id="r8" data-pos="V"><td>Budget left</td><td n f="=5000-Budget!B5" v="3500" fmt="$#,##0.00">$3,500.00</td></tr>
17
+ </tbody></table></section>
18
+ </div></main></body></html>
@@ -0,0 +1,5 @@
1
+ tier: 1
2
+ face: body
3
+ token: api
4
+ expect: ok
5
+ note: rules with a top level patch key make the body a data write
@@ -0,0 +1,3 @@
1
+ {
2
+ "kind": "data"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "patch": "x"
3
+ }
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html><head><script type="application/json" data-rules-name="api" data-rules-version="2">{"title":"h1","sheets":"[items=sheets]@codec(sheet)"}</script></head><body><h1>Book</h1><main sap data-rev="12"><div items="sheets">
3
+ <section item data-id="s1" data-pos="V"><h2 bind="name">Budget</h2><table grid freeze-cols="1"><colgroup><col data-id="ca" data-pos="G" style="width:180px"><col data-id="cb" data-pos="V" fmt="$#,##0.00"><col data-id="cc" data-pos="l" fmt="0%"></colgroup>
4
+ <thead>
5
+ <tr data-id="r1" data-pos="8"><td style="font-weight:bold">Item</td><td>Cost</td><td>Share</td></tr>
6
+ </thead><tbody>
7
+ <tr data-id="r2" data-pos="G"><td>Rent</td><td n v="1200">$1,200.00</td><td n f="=B2/B$5" v="0.8">80%</td></tr>
8
+ <tr data-id="r3" data-pos="O"><td>Food</td><td n v="300">$300.00</td><td n f="=B3/B$5" v="0.2">20%</td></tr>
9
+ <tr data-id="r4" data-pos="V"></tr>
10
+ <tr data-id="r5" data-pos="d"><td style="font-weight:bold">Total</td><td n f="=SUM(B2:B3)" v="1500">$1,500.00</td></tr>
11
+ <tr data-id="r6" data-pos="l"><td colspan="3" style="text-align:center">Prices as of November</td><td hidden></td><td hidden></td></tr>
12
+ </tbody></table>
13
+ <table grid><colgroup><col data-id="cd" data-pos="G"><col data-id="ce" data-pos="V"></colgroup>
14
+ <tbody>
15
+ <tr data-id="r7" data-pos="G"><td>Lisbon</td><td n v="46095" fmt="mmm d, yyyy">Mar 14, 2026</td></tr>
16
+ <tr data-id="r8" data-pos="V"><td>Budget left</td><td n f="=5000-Budget!B5" v="3500" fmt="$#,##0.00">$3,500.00</td></tr>
17
+ </tbody></table></section>
18
+ <section item data-id="s2" data-pos="V"><h2 bind="name">Styled</h2><table grid freeze-cols="2"><colgroup><col data-id="st-c0" data-pos="G" style="width:120px"><col data-id="st-c1" data-pos="V" fmt="0.0%"><col data-id="st-c2" data-pos="l"></colgroup>
19
+ <thead>
20
+ <tr data-id="st-r1" data-pos="G" style="font-weight:bold;background:#eef"><td>Name</td><td>Share</td><td>Note</td></tr>
21
+ </thead><tbody>
22
+ <tr data-id="st-r2" data-pos="V"><td style="color:#c00">Red</td><td n v="0.125" style="text-align:right;font-style:italic">12.5%</td><td style="text-decoration:underline;white-space:nowrap">underlined</td></tr>
23
+ <tr data-id="st-r3" data-pos="l" style="border-bottom:1px solid #999"><td>last</td></tr>
24
+ </tbody></table></section>
25
+ </div></main></body></html>
@@ -0,0 +1,5 @@
1
+ tier: 1
2
+ face: body
3
+ token: api
4
+ expect: ok
5
+ note: a patch value that is not an array is a data write
@@ -0,0 +1,3 @@
1
+ {
2
+ "kind": "patch"
3
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "operationId": "op-1",
3
+ "patch": [
4
+ {
5
+ "sheet": "Budget",
6
+ "range": "B3",
7
+ "values": [
8
+ [
9
+ 450
10
+ ]
11
+ ]
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html><head><script type="application/json" data-rules-name="api" data-rules-version="2">{"title":"h1","sheets":"[items=sheets]@codec(sheet)"}</script></head><body><h1>Book</h1><main sap data-rev="12"><div items="sheets">
3
+ <section item data-id="s1" data-pos="V"><h2 bind="name">Budget</h2><table grid freeze-cols="1"><colgroup><col data-id="ca" data-pos="G" style="width:180px"><col data-id="cb" data-pos="V" fmt="$#,##0.00"><col data-id="cc" data-pos="l" fmt="0%"></colgroup>
4
+ <thead>
5
+ <tr data-id="r1" data-pos="8"><td style="font-weight:bold">Item</td><td>Cost</td><td>Share</td></tr>
6
+ </thead><tbody>
7
+ <tr data-id="r2" data-pos="G"><td>Rent</td><td n v="1200">$1,200.00</td><td n f="=B2/B$5" v="0.8">80%</td></tr>
8
+ <tr data-id="r3" data-pos="O"><td>Food</td><td n v="300">$300.00</td><td n f="=B3/B$5" v="0.2">20%</td></tr>
9
+ <tr data-id="r4" data-pos="V"></tr>
10
+ <tr data-id="r5" data-pos="d"><td style="font-weight:bold">Total</td><td n f="=SUM(B2:B3)" v="1500">$1,500.00</td></tr>
11
+ <tr data-id="r6" data-pos="l"><td colspan="3" style="text-align:center">Prices as of November</td><td hidden></td><td hidden></td></tr>
12
+ </tbody></table>
13
+ <table grid><colgroup><col data-id="cd" data-pos="G"><col data-id="ce" data-pos="V"></colgroup>
14
+ <tbody>
15
+ <tr data-id="r7" data-pos="G"><td>Lisbon</td><td n v="46095" fmt="mmm d, yyyy">Mar 14, 2026</td></tr>
16
+ <tr data-id="r8" data-pos="V"><td>Budget left</td><td n f="=5000-Budget!B5" v="3500" fmt="$#,##0.00">$3,500.00</td></tr>
17
+ </tbody></table></section>
18
+ <section item data-id="s2" data-pos="V"><h2 bind="name">Styled</h2><table grid freeze-cols="2"><colgroup><col data-id="st-c0" data-pos="G" style="width:120px"><col data-id="st-c1" data-pos="V" fmt="0.0%"><col data-id="st-c2" data-pos="l"></colgroup>
19
+ <thead>
20
+ <tr data-id="st-r1" data-pos="G" style="font-weight:bold;background:#eef"><td>Name</td><td>Share</td><td>Note</td></tr>
21
+ </thead><tbody>
22
+ <tr data-id="st-r2" data-pos="V"><td style="color:#c00">Red</td><td n v="0.125" style="text-align:right;font-style:italic">12.5%</td><td style="text-decoration:underline;white-space:nowrap">underlined</td></tr>
23
+ <tr data-id="st-r3" data-pos="l" style="border-bottom:1px solid #999"><td>last</td></tr>
24
+ </tbody></table></section>
25
+ </div></main></body></html>
@@ -0,0 +1,5 @@
1
+ tier: 1
2
+ face: body
3
+ token: api
4
+ expect: ok
5
+ note: a patch list with an operation id is a patch
@@ -0,0 +1,3 @@
1
+ {
2
+ "kind": "patch"
3
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "patch": [
3
+ {
4
+ "sheet": "Budget",
5
+ "range": "B3",
6
+ "values": [
7
+ [
8
+ 450
9
+ ]
10
+ ]
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,4 @@
1
+ <!DOCTYPE html>
2
+ <html><head><script type="application/json" data-rules-name="api" data-rules-version="1">{"title":"h1"}</script></head><body><h1>Book</h1><main sap data-rev="12"><div items="sheets">
3
+
4
+ </div></main></body></html>
@@ -0,0 +1,5 @@
1
+ tier: 1
2
+ face: body
3
+ token: api
4
+ expect: ok
5
+ note: the classifier is the same on a version 1 document: patchDocument then refuses it
@@ -0,0 +1,3 @@
1
+ {
2
+ "kind": "data"
3
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "patch": [
3
+ {
4
+ "sheet": "Budget",
5
+ "range": "B3",
6
+ "values": [
7
+ [
8
+ 450
9
+ ]
10
+ ]
11
+ }
12
+ ],
13
+ "other": 1
14
+ }