@elaraai/e3-ui 1.0.98 → 1.0.99

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 (381) hide show
  1. package/README.md +0 -2
  2. package/dist/src/allocation/adapters.d.ts +1 -1
  3. package/dist/src/allocation/adapters.js +1 -1
  4. package/dist/src/allocation/index.d.ts +46 -90
  5. package/dist/src/allocation/index.d.ts.map +1 -1
  6. package/dist/src/allocation/index.js +5 -5
  7. package/dist/src/allocation/index.js.map +1 -1
  8. package/dist/src/bind/data-indexed.d.ts +273 -51
  9. package/dist/src/bind/data-indexed.d.ts.map +1 -1
  10. package/dist/src/bind/data-indexed.js +233 -56
  11. package/dist/src/bind/data-indexed.js.map +1 -1
  12. package/dist/src/bind/data.d.ts +48 -9
  13. package/dist/src/bind/data.d.ts.map +1 -1
  14. package/dist/src/bind/data.js +48 -3
  15. package/dist/src/bind/data.js.map +1 -1
  16. package/dist/src/bind/record.d.ts +61 -24
  17. package/dist/src/bind/record.d.ts.map +1 -1
  18. package/dist/src/bind/record.js +17 -57
  19. package/dist/src/bind/record.js.map +1 -1
  20. package/dist/src/calendar/index.d.ts +55 -95
  21. package/dist/src/calendar/index.d.ts.map +1 -1
  22. package/dist/src/calendar/index.js +10 -6
  23. package/dist/src/calendar/index.js.map +1 -1
  24. package/dist/src/flowchart/index.d.ts +35 -31
  25. package/dist/src/flowchart/index.d.ts.map +1 -1
  26. package/dist/src/flowchart/index.js +35 -31
  27. package/dist/src/flowchart/index.js.map +1 -1
  28. package/dist/src/flowchart/library.d.ts +108 -84
  29. package/dist/src/flowchart/library.d.ts.map +1 -1
  30. package/dist/src/flowchart/library.js +108 -84
  31. package/dist/src/flowchart/library.js.map +1 -1
  32. package/dist/src/flowchart/payload.d.ts +39 -107
  33. package/dist/src/flowchart/payload.d.ts.map +1 -1
  34. package/dist/src/flowchart/payload.js +3 -3
  35. package/dist/src/flowchart/payload.js.map +1 -1
  36. package/dist/src/flowchart/values.d.ts +35 -31
  37. package/dist/src/flowchart/values.d.ts.map +1 -1
  38. package/dist/src/flowchart/values.js +35 -31
  39. package/dist/src/flowchart/values.js.map +1 -1
  40. package/dist/src/flowchart/window.d.ts +0 -12
  41. package/dist/src/flowchart/window.d.ts.map +1 -1
  42. package/dist/src/flowchart/window.js +3 -2
  43. package/dist/src/flowchart/window.js.map +1 -1
  44. package/dist/src/index.d.ts +2 -2
  45. package/dist/src/index.d.ts.map +1 -1
  46. package/dist/src/index.js +1 -1
  47. package/dist/src/index.js.map +1 -1
  48. package/dist/src/internal.d.ts +7 -3
  49. package/dist/src/internal.d.ts.map +1 -1
  50. package/dist/src/internal.js +12 -3
  51. package/dist/src/internal.js.map +1 -1
  52. package/dist/src/plan/assemble.d.ts +8 -0
  53. package/dist/src/plan/assemble.d.ts.map +1 -1
  54. package/dist/src/plan/assemble.js +1 -1
  55. package/dist/src/plan/assemble.js.map +1 -1
  56. package/dist/src/plan/builders.d.ts +1518 -2
  57. package/dist/src/plan/builders.d.ts.map +1 -1
  58. package/dist/src/plan/builders.js +248 -114
  59. package/dist/src/plan/builders.js.map +1 -1
  60. package/dist/src/plan/event-rows.d.ts +9 -14
  61. package/dist/src/plan/event-rows.d.ts.map +1 -1
  62. package/dist/src/plan/event-rows.js +6 -46
  63. package/dist/src/plan/event-rows.js.map +1 -1
  64. package/dist/src/plan/factories.d.ts +72 -4
  65. package/dist/src/plan/factories.d.ts.map +1 -1
  66. package/dist/src/plan/factories.js +147 -1
  67. package/dist/src/plan/factories.js.map +1 -1
  68. package/dist/src/plan/index.d.ts +147 -125
  69. package/dist/src/plan/index.d.ts.map +1 -1
  70. package/dist/src/plan/index.js +135 -122
  71. package/dist/src/plan/index.js.map +1 -1
  72. package/dist/src/plan/ir.d.ts +1105 -44
  73. package/dist/src/plan/ir.d.ts.map +1 -1
  74. package/dist/src/plan/ir.js +5 -0
  75. package/dist/src/plan/ir.js.map +1 -1
  76. package/dist/src/plan/library.d.ts +65 -42
  77. package/dist/src/plan/library.d.ts.map +1 -1
  78. package/dist/src/plan/library.js +65 -42
  79. package/dist/src/plan/library.js.map +1 -1
  80. package/dist/src/plan/nested-checks.d.ts +146 -0
  81. package/dist/src/plan/nested-checks.d.ts.map +1 -0
  82. package/dist/src/plan/nested-checks.js +468 -0
  83. package/dist/src/plan/nested-checks.js.map +1 -0
  84. package/dist/src/plan/nested-patch.d.ts +35 -0
  85. package/dist/src/plan/nested-patch.d.ts.map +1 -0
  86. package/dist/src/plan/nested-patch.js +143 -0
  87. package/dist/src/plan/nested-patch.js.map +1 -0
  88. package/dist/src/plan/nested-read.d.ts +3250 -0
  89. package/dist/src/plan/nested-read.d.ts.map +1 -0
  90. package/dist/src/plan/nested-read.js +163 -0
  91. package/dist/src/plan/nested-read.js.map +1 -0
  92. package/dist/src/plan/nested.d.ts +280 -0
  93. package/dist/src/plan/nested.d.ts.map +1 -0
  94. package/dist/src/plan/nested.js +6 -0
  95. package/dist/src/plan/nested.js.map +1 -0
  96. package/dist/src/plan/ordered-source.d.ts +1030 -1
  97. package/dist/src/plan/ordered-source.d.ts.map +1 -1
  98. package/dist/src/plan/ordered-source.js +48 -6
  99. package/dist/src/plan/ordered-source.js.map +1 -1
  100. package/dist/src/plan/over.d.ts +111 -75
  101. package/dist/src/plan/over.d.ts.map +1 -1
  102. package/dist/src/plan/over.js +111 -75
  103. package/dist/src/plan/over.js.map +1 -1
  104. package/dist/src/plan/pick.d.ts +15 -3
  105. package/dist/src/plan/pick.d.ts.map +1 -1
  106. package/dist/src/plan/pick.js +75 -36
  107. package/dist/src/plan/pick.js.map +1 -1
  108. package/dist/src/plan/plan.d.ts +2719 -558
  109. package/dist/src/plan/plan.d.ts.map +1 -1
  110. package/dist/src/plan/plan.js +14 -2
  111. package/dist/src/plan/plan.js.map +1 -1
  112. package/dist/src/plan/reads.d.ts +421 -0
  113. package/dist/src/plan/reads.d.ts.map +1 -0
  114. package/dist/src/plan/reads.js +143 -0
  115. package/dist/src/plan/reads.js.map +1 -0
  116. package/dist/src/plan/refs.d.ts +111 -75
  117. package/dist/src/plan/refs.d.ts.map +1 -1
  118. package/dist/src/plan/refs.js +111 -75
  119. package/dist/src/plan/refs.js.map +1 -1
  120. package/dist/src/plan/root.d.ts +10 -5
  121. package/dist/src/plan/root.d.ts.map +1 -1
  122. package/dist/src/plan/root.js +76 -13
  123. package/dist/src/plan/root.js.map +1 -1
  124. package/dist/src/plan/series.d.ts +5140 -4331
  125. package/dist/src/plan/series.d.ts.map +1 -1
  126. package/dist/src/plan/series.js +1026 -264
  127. package/dist/src/plan/series.js.map +1 -1
  128. package/dist/src/plan/shade.d.ts +981 -0
  129. package/dist/src/plan/shade.d.ts.map +1 -0
  130. package/dist/src/plan/shade.js +60 -0
  131. package/dist/src/plan/shade.js.map +1 -0
  132. package/dist/src/plan/types.d.ts +178 -18
  133. package/dist/src/plan/types.d.ts.map +1 -1
  134. package/dist/src/plan/types.js +69 -19
  135. package/dist/src/plan/types.js.map +1 -1
  136. package/dist/src/query/builder.d.ts +3 -3
  137. package/dist/src/query/builder.d.ts.map +1 -1
  138. package/dist/src/query/builder.js +1 -1
  139. package/dist/src/query/library.d.ts +3 -3
  140. package/dist/src/query/library.d.ts.map +1 -1
  141. package/dist/src/query/library.js +1 -1
  142. package/dist/src/query/queries.d.ts +2 -2
  143. package/dist/src/query/queries.js +1 -1
  144. package/dist/src/query/saved.d.ts +8 -4
  145. package/dist/src/query/saved.d.ts.map +1 -1
  146. package/dist/src/query/saved.js +8 -4
  147. package/dist/src/query/saved.js.map +1 -1
  148. package/dist/src/query/types.d.ts +8 -3
  149. package/dist/src/query/types.d.ts.map +1 -1
  150. package/dist/src/query/types.js +8 -3
  151. package/dist/src/query/types.js.map +1 -1
  152. package/dist/src/roster/index.d.ts +47 -91
  153. package/dist/src/roster/index.d.ts.map +1 -1
  154. package/dist/src/roster/index.js +6 -6
  155. package/dist/src/roster/index.js.map +1 -1
  156. package/dist/src/roster/targets.d.ts +8 -4
  157. package/dist/src/roster/targets.d.ts.map +1 -1
  158. package/dist/src/roster/targets.js +9 -5
  159. package/dist/src/roster/targets.js.map +1 -1
  160. package/dist/src/schedule/cell-checks.js +3 -3
  161. package/dist/src/schedule/cell-checks.js.map +1 -1
  162. package/dist/src/schedule/days.d.ts +1 -1
  163. package/dist/src/schedule/days.js +1 -1
  164. package/dist/src/schedule/events.d.ts +10 -6
  165. package/dist/src/schedule/events.d.ts.map +1 -1
  166. package/dist/src/schedule/events.js +252 -228
  167. package/dist/src/schedule/events.js.map +1 -1
  168. package/dist/src/schedule/patch.d.ts +1 -1
  169. package/dist/src/schedule/patch.js +1 -1
  170. package/dist/src/schedule/periods.d.ts +8 -4
  171. package/dist/src/schedule/periods.d.ts.map +1 -1
  172. package/dist/src/schedule/periods.js +1 -1
  173. package/dist/src/schedule/periods.js.map +1 -1
  174. package/dist/src/schedule/record-window.d.ts +38 -58
  175. package/dist/src/schedule/record-window.d.ts.map +1 -1
  176. package/dist/src/schedule/record-window.js +15 -16
  177. package/dist/src/schedule/record-window.js.map +1 -1
  178. package/dist/src/schedule/resources.d.ts +1 -1
  179. package/dist/src/schedule/session.d.ts +1 -1
  180. package/dist/src/schedule/session.js +1 -1
  181. package/dist/src/schedule/types.d.ts +29 -1
  182. package/dist/src/schedule/types.d.ts.map +1 -1
  183. package/dist/src/schedule/types.js +16 -1
  184. package/dist/src/schedule/types.js.map +1 -1
  185. package/dist/src/schematic/index.d.ts +19 -9
  186. package/dist/src/schematic/index.d.ts.map +1 -1
  187. package/dist/src/schematic/index.js +19 -9
  188. package/dist/src/schematic/index.js.map +1 -1
  189. package/dist/src/schematic/kinds.d.ts +4 -4
  190. package/dist/src/schematic/kinds.js +9 -9
  191. package/dist/src/schematic/kinds.js.map +1 -1
  192. package/dist/src/schematic/payload.d.ts +38 -88
  193. package/dist/src/schematic/payload.d.ts.map +1 -1
  194. package/dist/src/schematic/payload.js +4 -4
  195. package/dist/src/schematic/payload.js.map +1 -1
  196. package/dist/src/schematic/window.d.ts +8 -7
  197. package/dist/src/schematic/window.d.ts.map +1 -1
  198. package/dist/src/schematic/window.js +22 -19
  199. package/dist/src/schematic/window.js.map +1 -1
  200. package/dist/src/sheet/bridge.d.ts +19 -0
  201. package/dist/src/sheet/bridge.d.ts.map +1 -1
  202. package/dist/src/sheet/bridge.js +28 -21
  203. package/dist/src/sheet/bridge.js.map +1 -1
  204. package/dist/src/sheet/index.d.ts +66 -46
  205. package/dist/src/sheet/index.d.ts.map +1 -1
  206. package/dist/src/sheet/index.js +66 -46
  207. package/dist/src/sheet/index.js.map +1 -1
  208. package/dist/src/sheet/library.d.ts +13 -8
  209. package/dist/src/sheet/library.d.ts.map +1 -1
  210. package/dist/src/sheet/library.js +13 -8
  211. package/dist/src/sheet/library.js.map +1 -1
  212. package/dist/src/sheet/record.d.ts +1 -1
  213. package/dist/src/sheet/record.js +2 -2
  214. package/dist/src/sheet/record.js.map +1 -1
  215. package/dist/src/sheet/registers.d.ts +152 -128
  216. package/dist/src/sheet/registers.d.ts.map +1 -1
  217. package/dist/src/sheet/registers.js +152 -128
  218. package/dist/src/sheet/registers.js.map +1 -1
  219. package/dist/src/sheet/root.d.ts +4 -1
  220. package/dist/src/sheet/root.d.ts.map +1 -1
  221. package/dist/src/sheet/root.js +15 -3
  222. package/dist/src/sheet/root.js.map +1 -1
  223. package/dist/src/sheet/sheet.d.ts +39 -113
  224. package/dist/src/sheet/sheet.d.ts.map +1 -1
  225. package/dist/src/sheet/sheet.js +7 -5
  226. package/dist/src/sheet/sheet.js.map +1 -1
  227. package/dist/src/sheet/sub-rows.d.ts +106 -76
  228. package/dist/src/sheet/sub-rows.d.ts.map +1 -1
  229. package/dist/src/sheet/sub-rows.js +106 -76
  230. package/dist/src/sheet/sub-rows.js.map +1 -1
  231. package/dist/src/sheet/types.d.ts +19 -62
  232. package/dist/src/sheet/types.d.ts.map +1 -1
  233. package/dist/src/studio/builder.d.ts +3 -153
  234. package/dist/src/studio/builder.d.ts.map +1 -1
  235. package/dist/src/studio/builder.js +1 -1
  236. package/dist/src/studio/canvas.d.ts +5 -4
  237. package/dist/src/studio/canvas.d.ts.map +1 -1
  238. package/dist/src/studio/canvas.js +8 -7
  239. package/dist/src/studio/canvas.js.map +1 -1
  240. package/dist/src/studio/component.d.ts +30 -20
  241. package/dist/src/studio/component.d.ts.map +1 -1
  242. package/dist/src/studio/component.js +26 -61
  243. package/dist/src/studio/component.js.map +1 -1
  244. package/dist/src/studio/index.d.ts +2 -2
  245. package/dist/src/studio/index.d.ts.map +1 -1
  246. package/dist/src/studio/index.js +1 -1
  247. package/dist/src/studio/index.js.map +1 -1
  248. package/dist/src/studio/inspector.d.ts +10 -39
  249. package/dist/src/studio/inspector.d.ts.map +1 -1
  250. package/dist/src/studio/inspector.js +11 -31
  251. package/dist/src/studio/inspector.js.map +1 -1
  252. package/dist/src/studio/library.d.ts +3 -169
  253. package/dist/src/studio/library.d.ts.map +1 -1
  254. package/dist/src/studio/library.js +1 -1
  255. package/dist/src/studio/page.d.ts +0 -8
  256. package/dist/src/studio/page.d.ts.map +1 -1
  257. package/dist/src/studio/pages.d.ts +17 -591
  258. package/dist/src/studio/pages.d.ts.map +1 -1
  259. package/dist/src/studio/pages.js +17 -44
  260. package/dist/src/studio/pages.js.map +1 -1
  261. package/dist/src/studio/palette.d.ts +2 -7
  262. package/dist/src/studio/palette.d.ts.map +1 -1
  263. package/dist/src/studio/palette.js +4 -5
  264. package/dist/src/studio/palette.js.map +1 -1
  265. package/dist/src/studio/publish.d.ts +8 -18
  266. package/dist/src/studio/publish.d.ts.map +1 -1
  267. package/dist/src/studio/publish.js +10 -36
  268. package/dist/src/studio/publish.js.map +1 -1
  269. package/dist/src/utils/derive.d.ts +12 -12
  270. package/dist/src/utils/derive.d.ts.map +1 -1
  271. package/dist/src/utils/derive.js +5 -2
  272. package/dist/src/utils/derive.js.map +1 -1
  273. package/dist/src/utils/ordered-source.d.ts.map +1 -1
  274. package/dist/src/utils/ordered-source.js +14 -5
  275. package/dist/src/utils/ordered-source.js.map +1 -1
  276. package/dist/test/allocation/allocation.examples.d.ts +1900 -1598
  277. package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
  278. package/dist/test/allocation/allocation.examples.js +179 -89
  279. package/dist/test/allocation/allocation.examples.js.map +1 -1
  280. package/dist/test/allocation/optimise.examples.d.ts.map +1 -1
  281. package/dist/test/allocation/optimise.examples.js +7 -7
  282. package/dist/test/allocation/optimise.examples.js.map +1 -1
  283. package/dist/test/bind/data/data.examples.d.ts +1057 -903
  284. package/dist/test/bind/data/data.examples.d.ts.map +1 -1
  285. package/dist/test/bind/data/data.examples.js +260 -204
  286. package/dist/test/bind/data/data.examples.js.map +1 -1
  287. package/dist/test/bind/record/record.examples.d.ts +457 -426
  288. package/dist/test/bind/record/record.examples.d.ts.map +1 -1
  289. package/dist/test/bind/record/record.examples.js +41 -21
  290. package/dist/test/bind/record/record.examples.js.map +1 -1
  291. package/dist/test/calendar/calendar-records.examples.d.ts +162 -170
  292. package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
  293. package/dist/test/calendar/calendar-records.examples.js +20 -12
  294. package/dist/test/calendar/calendar-records.examples.js.map +1 -1
  295. package/dist/test/calendar/calendar-windows.examples.d.ts.map +1 -1
  296. package/dist/test/calendar/calendar-windows.examples.js +12 -12
  297. package/dist/test/calendar/calendar-windows.examples.js.map +1 -1
  298. package/dist/test/calendar/calendar.examples.d.ts +1172 -901
  299. package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
  300. package/dist/test/calendar/calendar.examples.js +211 -124
  301. package/dist/test/calendar/calendar.examples.js.map +1 -1
  302. package/dist/test/calendar/optimise.examples.js +2 -2
  303. package/dist/test/calendar/optimise.examples.js.map +1 -1
  304. package/dist/test/examples-package.d.ts +6 -9
  305. package/dist/test/examples-package.d.ts.map +1 -1
  306. package/dist/test/examples-package.js +11 -32
  307. package/dist/test/examples-package.js.map +1 -1
  308. package/dist/test/flowchart/flowchart.examples.d.ts +3841 -2820
  309. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
  310. package/dist/test/flowchart/flowchart.examples.js +211 -121
  311. package/dist/test/flowchart/flowchart.examples.js.map +1 -1
  312. package/dist/test/plan/optimise.examples.js +2 -2
  313. package/dist/test/plan/optimise.examples.js.map +1 -1
  314. package/dist/test/plan/plan-events.examples.d.ts +4055 -3263
  315. package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
  316. package/dist/test/plan/plan-events.examples.js +492 -319
  317. package/dist/test/plan/plan-events.examples.js.map +1 -1
  318. package/dist/test/plan/plan-nested.examples.d.ts +1829 -0
  319. package/dist/test/plan/plan-nested.examples.d.ts.map +1 -0
  320. package/dist/test/plan/plan-nested.examples.js +321 -0
  321. package/dist/test/plan/plan-nested.examples.js.map +1 -0
  322. package/dist/test/plan/plan-records.examples.d.ts +328 -362
  323. package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
  324. package/dist/test/plan/plan-records.examples.js +81 -57
  325. package/dist/test/plan/plan-records.examples.js.map +1 -1
  326. package/dist/test/plan/plan-windows.examples.d.ts +1756 -1398
  327. package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
  328. package/dist/test/plan/plan-windows.examples.js +161 -128
  329. package/dist/test/plan/plan-windows.examples.js.map +1 -1
  330. package/dist/test/plan/plan.examples.d.ts +2238 -5712
  331. package/dist/test/plan/plan.examples.d.ts.map +1 -1
  332. package/dist/test/plan/plan.examples.js +839 -968
  333. package/dist/test/plan/plan.examples.js.map +1 -1
  334. package/dist/test/query/query.examples.d.ts +5221 -3005
  335. package/dist/test/query/query.examples.d.ts.map +1 -1
  336. package/dist/test/query/query.examples.js +169 -118
  337. package/dist/test/query/query.examples.js.map +1 -1
  338. package/dist/test/roster/optimise.examples.d.ts.map +1 -1
  339. package/dist/test/roster/optimise.examples.js +7 -7
  340. package/dist/test/roster/optimise.examples.js.map +1 -1
  341. package/dist/test/roster/roster-records.examples.d.ts +364 -392
  342. package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
  343. package/dist/test/roster/roster-records.examples.js +40 -26
  344. package/dist/test/roster/roster-records.examples.js.map +1 -1
  345. package/dist/test/roster/roster.examples.d.ts +4605 -4308
  346. package/dist/test/roster/roster.examples.d.ts.map +1 -1
  347. package/dist/test/roster/roster.examples.js +212 -113
  348. package/dist/test/roster/roster.examples.js.map +1 -1
  349. package/dist/test/schedule/schedule.examples.d.ts +2646 -2471
  350. package/dist/test/schedule/schedule.examples.d.ts.map +1 -1
  351. package/dist/test/schedule/schedule.examples.js +144 -88
  352. package/dist/test/schedule/schedule.examples.js.map +1 -1
  353. package/dist/test/schematic/schematic-records.examples.d.ts +286 -276
  354. package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -1
  355. package/dist/test/schematic/schematic-records.examples.js +52 -38
  356. package/dist/test/schematic/schematic-records.examples.js.map +1 -1
  357. package/dist/test/schematic/schematic.examples.d.ts +1842 -1491
  358. package/dist/test/schematic/schematic.examples.d.ts.map +1 -1
  359. package/dist/test/schematic/schematic.examples.js +240 -134
  360. package/dist/test/schematic/schematic.examples.js.map +1 -1
  361. package/dist/test/sheet/optimise.examples.d.ts +102 -95
  362. package/dist/test/sheet/optimise.examples.d.ts.map +1 -1
  363. package/dist/test/sheet/optimise.examples.js +7 -3
  364. package/dist/test/sheet/optimise.examples.js.map +1 -1
  365. package/dist/test/sheet/sheet-records.examples.d.ts +175 -214
  366. package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
  367. package/dist/test/sheet/sheet-records.examples.js +29 -17
  368. package/dist/test/sheet/sheet-records.examples.js.map +1 -1
  369. package/dist/test/sheet/sheet.examples.d.ts +3642 -3353
  370. package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
  371. package/dist/test/sheet/sheet.examples.js +389 -282
  372. package/dist/test/sheet/sheet.examples.js.map +1 -1
  373. package/dist/test/studio/component.examples.js +2 -2
  374. package/dist/test/studio/component.examples.js.map +1 -1
  375. package/dist/test/studio/page.examples.js +6 -6
  376. package/dist/test/studio/page.examples.js.map +1 -1
  377. package/dist/test/studio/studio.examples.d.ts +2329 -873
  378. package/dist/test/studio/studio.examples.d.ts.map +1 -1
  379. package/dist/test/studio/studio.examples.js +155 -107
  380. package/dist/test/studio/studio.examples.js.map +1 -1
  381. package/package.json +15 -11
@@ -29,7 +29,7 @@ const EVENT_REFS = new WeakMap();
29
29
  * @example
30
30
  * ```tsx
31
31
  * // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
32
- * import { ArrayType, DateTimeType, DictType, East, FloatType, NullType, OptionType, StringType, StructType, VariantType, some, variant } from "@elaraai/east";
32
+ * import { DateTimeType, DictType, East, FloatType, NullType, OptionType, SortedMap, StringType, StructType, VariantType, compareFor, some, variant } from "@elaraai/east";
33
33
  * import { EventStateType, Format, Reactive, UIComponentType } from "@elaraai/east-ui";
34
34
  * import { Data, Plan, Record, Schedule } from "@elaraai/e3-ui";
35
35
  * import e3 from "@elaraai/e3";
@@ -46,76 +46,117 @@ const EVENT_REFS = new WeakMap();
46
46
  * stock: VariantType({ coated: NullType, uncoated: NullType, board: NullType }),
47
47
  * due: OptionType(DateTimeType),
48
48
  * });
49
- * export const PrintStock = StructType({ name: StringType, weekly: ArrayType(FloatType) });
49
+ * export const PrintStock = StructType({ name: StringType, weekly: DictType(DateTimeType, FloatType) });
50
50
  * export const PrintCentre = StructType({ name: StringType });
51
51
  * export const PrintPlates = StructType({ title: StringType, at: DateTimeType, setter: StringType });
52
52
  * export const PrintBinding = StructType({ title: StringType, start: DateTimeType, end: DateTimeType, line: StringType, state: EventStateType });
53
53
  * export const PrintDelivery = StructType({ title: StringType, at: DateTimeType, bay: StringType });
54
- * export const planPrintPresses = e3.record("plan_print_presses", DictType(StringType, PrintPress), new Map([
55
- * ["a1", { name: "Press A1", hall: "Hall A", sheets_per_hour: 12000.0 }],
56
- * ["a2", { name: "Press A2", hall: "Hall A", sheets_per_hour: 10000.0 }],
57
- * ["a3", { name: "Press A3", hall: "Hall A", sheets_per_hour: 8000.0 }],
58
- * ["b1", { name: "Press B1", hall: "Hall B", sheets_per_hour: 15000.0 }],
59
- * ["b2", { name: "Press B2", hall: "Hall B", sheets_per_hour: 12000.0 }],
60
- * ["b3", { name: "Press B3", hall: "Hall B", sheets_per_hour: 6000.0 }],
61
- * ]));
54
+ * export const planPrintPresses = e3.record("plan_print_presses", DictType(StringType, PrintPress), {
55
+ * initial: new Map([
56
+ * ["a1", { name: "Press A1", hall: "Hall A", sheets_per_hour: 12000.0 }],
57
+ * ["a2", { name: "Press A2", hall: "Hall A", sheets_per_hour: 10000.0 }],
58
+ * ["a3", { name: "Press A3", hall: "Hall A", sheets_per_hour: 8000.0 }],
59
+ * ["b1", { name: "Press B1", hall: "Hall B", sheets_per_hour: 15000.0 }],
60
+ * ["b2", { name: "Press B2", hall: "Hall B", sheets_per_hour: 12000.0 }],
61
+ * ["b3", { name: "Press B3", hall: "Hall B", sheets_per_hour: 6000.0 }],
62
+ * ]),
63
+ * indexes: (index) => ({
64
+ * plan_print_presses_by_hall: index.on(["hall"]),
65
+ * }),
66
+ * mutations: (mutation) => ({
67
+ * // The presses' patch door: the works edits its presses elsewhere, and a Plan reads them live.
68
+ * patch: mutation.patch(),
69
+ * }),
70
+ * });
62
71
  * export const planLinkStock = e3.input("plan_link_stock", DictType(StringType, PrintStock), variant("value", new Map([
63
- * ["board", { name: "Board", weekly: [40.0, 22.0, 31.0, 18.0] }],
64
- * ["coated", { name: "Coated", weekly: [520.0, 410.0, 460.0, 380.0] }],
65
- * ["uncoated", { name: "Uncoated", weekly: [300.0, 260.0, 280.0, 240.0] }],
72
+ * ["board", { name: "Board", weekly: new SortedMap([
73
+ * [new Date("2026-10-05T00:00:00Z"), 40.0], [new Date("2026-10-12T00:00:00Z"), 22.0], [new Date("2026-10-19T00:00:00Z"), 31.0], [new Date("2026-10-26T00:00:00Z"), 18.0],
74
+ * ], compareFor(DateTimeType)) }],
75
+ * ["coated", { name: "Coated", weekly: new SortedMap([
76
+ * [new Date("2026-10-05T00:00:00Z"), 520.0], [new Date("2026-10-12T00:00:00Z"), 410.0], [new Date("2026-10-19T00:00:00Z"), 460.0], [new Date("2026-10-26T00:00:00Z"), 380.0],
77
+ * ], compareFor(DateTimeType)) }],
78
+ * ["uncoated", { name: "Uncoated", weekly: new SortedMap([
79
+ * [new Date("2026-10-05T00:00:00Z"), 300.0], [new Date("2026-10-12T00:00:00Z"), 260.0], [new Date("2026-10-19T00:00:00Z"), 280.0], [new Date("2026-10-26T00:00:00Z"), 240.0],
80
+ * ], compareFor(DateTimeType)) }],
66
81
  * ])));
67
- * export const planLinkSetters = e3.record("plan_link_setters", DictType(StringType, PrintCentre), new Map([
68
- * ["ps", { name: "Platesetter" }],
69
- * ]));
70
- * export const planLinkLines = e3.record("plan_link_lines", DictType(StringType, PrintCentre), new Map([
71
- * ["fold", { name: "Folder" }],
72
- * ["bind", { name: "Binder" }],
73
- * ]));
74
- * export const planLinkBays = e3.record("plan_link_bays", DictType(StringType, PrintCentre), new Map([
75
- * ["bay", { name: "Dispatch bay" }],
76
- * ]));
77
- * export const planLinkPlates = e3.record("plan_link_plates", DictType(StringType, PrintPlates), new Map([
78
- * ["P-01", { title: "Catalogue plates", at: new Date("2026-10-05T12:00:00Z"), setter: "ps" }],
79
- * ]));
80
- * export const planLinkPlatesPatch = e3.mutation.patch(planLinkPlates);
81
- * export const planLinkCaseJobs = e3.record("plan_link_case_jobs", DictType(StringType, PrintJob), new Map([
82
- * ["J-2001", { title: "Catalogue covers", start: some(new Date("2026-10-08T06:00:00Z")), end: some(new Date("2026-10-08T08:00:00Z")), press: some("a1"), state: variant("confirmed", null), sheets: 12000.0, customer: "Larkspur Home", stock: variant("board", null), due: some(new Date("2026-10-09T00:00:00Z")) }],
83
- * ["J-2002", { title: "Shop posters", start: some(new Date("2026-10-10T06:00:00Z")), end: some(new Date("2026-10-11T06:00:00Z")), press: some("a1"), state: variant("confirmed", null), sheets: 24000.0, customer: "Orchard Street Market", stock: variant("uncoated", null), due: some(new Date("2026-10-20T00:00:00Z")) }],
84
- * ["J-2003", { title: "Catalogue inserts", start: some(new Date("2026-10-15T06:00:00Z")), end: some(new Date("2026-10-17T18:00:00Z")), press: some("a1"), state: variant("confirmed", null), sheets: 96000.0, customer: "Larkspur Home", stock: variant("coated", null), due: some(new Date("2026-10-19T00:00:00Z")) }],
85
- * ["J-2004", { title: "Price lists", start: some(new Date("2026-10-07T12:00:00Z")), end: some(new Date("2026-10-08T18:00:00Z")), press: some("a2"), state: variant("confirmed", null), sheets: 16000.0, customer: "Northwind Outfitters", stock: variant("uncoated", null), due: some(new Date("2026-10-09T00:00:00Z")) }],
86
- * ["J-2005", { title: "Menu cards", start: some(new Date("2026-10-11T06:00:00Z")), end: some(new Date("2026-10-11T18:00:00Z")), press: some("a2"), state: variant("confirmed", null), sheets: 30000.0, customer: "Copperleaf Cafe", stock: variant("board", null), due: some(new Date("2026-10-13T00:00:00Z")) }],
87
- * ["J-2006", { title: "Gift tags", start: some(new Date("2026-10-25T06:00:00Z")), end: some(new Date("2026-10-25T18:00:00Z")), press: some("a2"), state: variant("proposed", variant("recommended", null)), sheets: 20000.0, customer: "Juniper Toys", stock: variant("board", null), due: some(new Date("2026-10-28T00:00:00Z")) }],
88
- * ["J-2007", { title: "Gift boxes", start: some(new Date("2026-10-27T06:00:00Z")), end: some(new Date("2026-10-27T14:00:00Z")), press: some("a2"), state: variant("proposed", variant("recommended", null)), sheets: 48000.0, customer: "Juniper Toys", stock: variant("board", null), due: some(new Date("2026-10-30T00:00:00Z")) }],
89
- * ["J-2008", { title: "Proof run", start: some(new Date("2026-10-02T06:00:00Z")), end: some(new Date("2026-10-05T18:00:00Z")), press: some("a3"), state: variant("actual", null), sheets: 16000.0, customer: "Meridian Monthly", stock: variant("coated", null), due: some(new Date("2026-10-06T00:00:00Z")) }],
90
- * ["J-2009", { title: "Annual report", start: some(new Date("2026-10-19T18:00:00Z")), end: some(new Date("2026-10-21T06:00:00Z")), press: some("a3"), state: variant("confirmed", null), sheets: 48000.0, customer: "Harbour Arts Society", stock: variant("coated", null), due: some(new Date("2026-10-23T00:00:00Z")) }],
91
- * ["J-2010", { title: "Desk calendars", start: some(new Date("2026-10-28T06:00:00Z")), end: some(new Date("2026-10-29T06:00:00Z")), press: some("a3"), state: variant("proposed", variant("added", null)), sheets: 36000.0, customer: "Foxglove Gardens", stock: variant("board", null), due: some(new Date("2026-11-02T00:00:00Z")) }],
92
- * ["J-2011", { title: "Calendar pads", start: some(new Date("2026-10-29T06:00:00Z")), end: some(new Date("2026-10-30T18:00:00Z")), press: some("a3"), state: variant("proposed", variant("added", null)), sheets: 72000.0, customer: "Foxglove Gardens", stock: variant("uncoated", null), due: some(new Date("2026-11-02T00:00:00Z")) }],
93
- * ["J-2012", { title: "Proof sheets", start: some(new Date("2026-09-28T06:00:00Z")), end: some(new Date("2026-09-30T18:00:00Z")), press: some("b1"), state: variant("actual", null), sheets: 8000.0, customer: "Northwind Outfitters", stock: variant("uncoated", null), due: some(new Date("2026-10-01T00:00:00Z")) }],
94
- * ["J-2013", { title: "Catalogue", start: some(new Date("2026-10-12T06:00:00Z")), end: some(new Date("2026-10-13T18:00:00Z")), press: some("b1"), state: variant("confirmed", null), sheets: 144000.0, customer: "Larkspur Home", stock: variant("coated", null), due: some(new Date("2026-10-16T00:00:00Z")) }],
95
- * ["J-2014", { title: "Seed catalogue", start: some(new Date("2026-10-22T06:00:00Z")), end: some(new Date("2026-10-23T12:00:00Z")), press: some("b1"), state: variant("confirmed", null), sheets: 100000.0, customer: "Foxglove Gardens", stock: variant("coated", null), due: some(new Date("2026-10-26T00:00:00Z")) }],
96
- * ["J-2015", { title: "Night run", start: some(new Date("2026-10-05T00:00:00Z")), end: some(new Date("2026-10-05T08:00:00Z")), press: some("b2"), state: variant("actual", null), sheets: 16000.0, customer: "Meridian Monthly", stock: variant("coated", null), due: some(new Date("2026-10-06T00:00:00Z")) }],
97
- * ["J-2016", { title: "Store flyers", start: some(new Date("2026-10-16T06:00:00Z")), end: some(new Date("2026-10-16T20:00:00Z")), press: some("b2"), state: variant("confirmed", null), sheets: 96000.0, customer: "Larkspur Home", stock: variant("uncoated", null), due: some(new Date("2026-10-19T00:00:00Z")) }],
98
- * ["J-2017", { title: "Seed packets", start: some(new Date("2026-10-23T06:00:00Z")), end: some(new Date("2026-10-24T06:00:00Z")), press: some("b2"), state: variant("confirmed", null), sheets: 72000.0, customer: "Foxglove Gardens", stock: variant("board", null), due: some(new Date("2026-10-27T00:00:00Z")) }],
99
- * ["J-2018", { title: "Exhibition book", start: some(new Date("2026-10-26T06:00:00Z")), end: some(new Date("2026-10-27T18:00:00Z")), press: some("b2"), state: variant("proposed", variant("recommended", null)), sheets: 54000.0, customer: "Driftwood Museum", stock: variant("coated", null), due: some(new Date("2026-10-30T00:00:00Z")) }],
100
- * ["J-2019", { title: "Ticket books", start: some(new Date("2026-10-29T06:00:00Z")), end: some(new Date("2026-10-30T06:00:00Z")), press: some("b2"), state: variant("estimated", null), sheets: 60000.0, customer: "Heathfield Theatre", stock: variant("uncoated", null), due: some(new Date("2026-11-02T00:00:00Z")) }],
101
- * ["J-2020", { title: "Card stock", start: some(new Date("2026-10-06T06:00:00Z")), end: some(new Date("2026-10-06T14:00:00Z")), press: some("b3"), state: variant("actual", null), sheets: 30000.0, customer: "Copperleaf Cafe", stock: variant("board", null), due: some(new Date("2026-10-08T00:00:00Z")) }],
102
- * ["J-2021", { title: "Book sections", start: some(new Date("2026-10-11T06:00:00Z")), end: some(new Date("2026-10-12T12:00:00Z")), press: some("b3"), state: variant("confirmed", null), sheets: 84000.0, customer: "Driftwood Museum", stock: variant("coated", null), due: some(new Date("2026-10-14T00:00:00Z")) }],
103
- * ["J-2022", { title: "Report covers", start: some(new Date("2026-10-19T06:00:00Z")), end: some(new Date("2026-10-20T18:00:00Z")), press: some("b3"), state: variant("confirmed", null), sheets: 48000.0, customer: "Harbour Arts Society", stock: variant("board", null), due: some(new Date("2026-10-21T00:00:00Z")) }],
104
- * ["J-2023", { title: "Spring brochure", start: some(new Date("2026-11-03T06:00:00Z")), end: some(new Date("2026-11-04T18:00:00Z")), press: some("b3"), state: variant("estimated", null), sheets: 60000.0, customer: "Heathfield Theatre", stock: variant("coated", null), due: some(new Date("2026-11-09T00:00:00Z")) }],
105
- * ]));
106
- * export const planLinkCaseJobsPatch = e3.mutation.patch(planLinkCaseJobs);
107
- * export const planLinkBindings = e3.record("plan_link_bindings", DictType(StringType, PrintBinding), new Map([
108
- * ["B-01", { title: "Fold sections", start: new Date("2026-10-15T06:00:00Z"), end: new Date("2026-10-16T06:00:00Z"), line: "fold", state: variant("confirmed", null) }],
109
- * ["B-02", { title: "Fold sections", start: new Date("2026-10-17T06:00:00Z"), end: new Date("2026-10-18T06:00:00Z"), line: "fold", state: variant("confirmed", null) }],
110
- * ["B-03", { title: "Bind books", start: new Date("2026-10-20T18:00:00Z"), end: new Date("2026-10-21T18:00:00Z"), line: "bind", state: variant("confirmed", null) }],
111
- * ["B-04", { title: "Bind exhibition book", start: new Date("2026-10-25T06:00:00Z"), end: new Date("2026-10-26T06:00:00Z"), line: "bind", state: variant("proposed", variant("recommended", null)) }],
112
- * ]));
113
- * export const planLinkBindingsPatch = e3.mutation.patch(planLinkBindings);
114
- * export const planLinkDeliveries = e3.record("plan_link_deliveries", DictType(StringType, PrintDelivery), new Map([
115
- * ["D-01", { title: "Books", at: new Date("2026-10-28T10:00:00Z"), bay: "bay" }],
116
- * ["D-02", { title: "Posters", at: new Date("2026-10-20T10:00:00Z"), bay: "bay" }],
117
- * ]));
118
- * export const planLinkDeliveriesPatch = e3.mutation.patch(planLinkDeliveries);
82
+ * export const planLinkSetters = e3.record("plan_link_setters", DictType(StringType, PrintCentre), {
83
+ * initial: new Map([
84
+ * ["ps", { name: "Platesetter" }],
85
+ * ]),
86
+ * });
87
+ * export const planLinkLines = e3.record("plan_link_lines", DictType(StringType, PrintCentre), {
88
+ * initial: new Map([
89
+ * ["fold", { name: "Folder" }],
90
+ * ["bind", { name: "Binder" }],
91
+ * ]),
92
+ * });
93
+ * export const planLinkBays = e3.record("plan_link_bays", DictType(StringType, PrintCentre), {
94
+ * initial: new Map([
95
+ * ["bay", { name: "Dispatch bay" }],
96
+ * ]),
97
+ * });
98
+ * export const planLinkPlates = e3.record("plan_link_plates", DictType(StringType, PrintPlates), {
99
+ * initial: new Map([
100
+ * ["P-01", { title: "Catalogue plates", at: new Date("2026-10-05T12:00:00Z"), setter: "ps" }],
101
+ * ]),
102
+ * mutations: (mutation) => ({
103
+ * // The plates' patch door.
104
+ * patch: mutation.patch(),
105
+ * }),
106
+ * });
107
+ * export const planLinkCaseJobs = e3.record("plan_link_case_jobs", DictType(StringType, PrintJob), {
108
+ * initial: new Map([
109
+ * ["J-2001", { title: "Catalogue covers", start: some(new Date("2026-10-08T06:00:00Z")), end: some(new Date("2026-10-08T08:00:00Z")), press: some("a1"), state: variant("confirmed", null), sheets: 12000.0, customer: "Larkspur Home", stock: variant("board", null), due: some(new Date("2026-10-09T00:00:00Z")) }],
110
+ * ["J-2002", { title: "Shop posters", start: some(new Date("2026-10-10T06:00:00Z")), end: some(new Date("2026-10-11T06:00:00Z")), press: some("a1"), state: variant("confirmed", null), sheets: 24000.0, customer: "Orchard Street Market", stock: variant("uncoated", null), due: some(new Date("2026-10-20T00:00:00Z")) }],
111
+ * ["J-2003", { title: "Catalogue inserts", start: some(new Date("2026-10-15T06:00:00Z")), end: some(new Date("2026-10-17T18:00:00Z")), press: some("a1"), state: variant("confirmed", null), sheets: 96000.0, customer: "Larkspur Home", stock: variant("coated", null), due: some(new Date("2026-10-19T00:00:00Z")) }],
112
+ * ["J-2004", { title: "Price lists", start: some(new Date("2026-10-07T12:00:00Z")), end: some(new Date("2026-10-08T18:00:00Z")), press: some("a2"), state: variant("confirmed", null), sheets: 16000.0, customer: "Northwind Outfitters", stock: variant("uncoated", null), due: some(new Date("2026-10-09T00:00:00Z")) }],
113
+ * ["J-2005", { title: "Menu cards", start: some(new Date("2026-10-11T06:00:00Z")), end: some(new Date("2026-10-11T18:00:00Z")), press: some("a2"), state: variant("confirmed", null), sheets: 30000.0, customer: "Copperleaf Cafe", stock: variant("board", null), due: some(new Date("2026-10-13T00:00:00Z")) }],
114
+ * ["J-2006", { title: "Gift tags", start: some(new Date("2026-10-25T06:00:00Z")), end: some(new Date("2026-10-25T18:00:00Z")), press: some("a2"), state: variant("proposed", variant("recommended", null)), sheets: 20000.0, customer: "Juniper Toys", stock: variant("board", null), due: some(new Date("2026-10-28T00:00:00Z")) }],
115
+ * ["J-2007", { title: "Gift boxes", start: some(new Date("2026-10-27T06:00:00Z")), end: some(new Date("2026-10-27T14:00:00Z")), press: some("a2"), state: variant("proposed", variant("recommended", null)), sheets: 48000.0, customer: "Juniper Toys", stock: variant("board", null), due: some(new Date("2026-10-30T00:00:00Z")) }],
116
+ * ["J-2008", { title: "Proof run", start: some(new Date("2026-10-02T06:00:00Z")), end: some(new Date("2026-10-05T18:00:00Z")), press: some("a3"), state: variant("actual", null), sheets: 16000.0, customer: "Meridian Monthly", stock: variant("coated", null), due: some(new Date("2026-10-06T00:00:00Z")) }],
117
+ * ["J-2009", { title: "Annual report", start: some(new Date("2026-10-19T18:00:00Z")), end: some(new Date("2026-10-21T06:00:00Z")), press: some("a3"), state: variant("confirmed", null), sheets: 48000.0, customer: "Harbour Arts Society", stock: variant("coated", null), due: some(new Date("2026-10-23T00:00:00Z")) }],
118
+ * ["J-2010", { title: "Desk calendars", start: some(new Date("2026-10-28T06:00:00Z")), end: some(new Date("2026-10-29T06:00:00Z")), press: some("a3"), state: variant("proposed", variant("added", null)), sheets: 36000.0, customer: "Foxglove Gardens", stock: variant("board", null), due: some(new Date("2026-11-02T00:00:00Z")) }],
119
+ * ["J-2011", { title: "Calendar pads", start: some(new Date("2026-10-29T06:00:00Z")), end: some(new Date("2026-10-30T18:00:00Z")), press: some("a3"), state: variant("proposed", variant("added", null)), sheets: 72000.0, customer: "Foxglove Gardens", stock: variant("uncoated", null), due: some(new Date("2026-11-02T00:00:00Z")) }],
120
+ * ["J-2012", { title: "Proof sheets", start: some(new Date("2026-09-28T06:00:00Z")), end: some(new Date("2026-09-30T18:00:00Z")), press: some("b1"), state: variant("actual", null), sheets: 8000.0, customer: "Northwind Outfitters", stock: variant("uncoated", null), due: some(new Date("2026-10-01T00:00:00Z")) }],
121
+ * ["J-2013", { title: "Catalogue", start: some(new Date("2026-10-12T06:00:00Z")), end: some(new Date("2026-10-13T18:00:00Z")), press: some("b1"), state: variant("confirmed", null), sheets: 144000.0, customer: "Larkspur Home", stock: variant("coated", null), due: some(new Date("2026-10-16T00:00:00Z")) }],
122
+ * ["J-2014", { title: "Seed catalogue", start: some(new Date("2026-10-22T06:00:00Z")), end: some(new Date("2026-10-23T12:00:00Z")), press: some("b1"), state: variant("confirmed", null), sheets: 100000.0, customer: "Foxglove Gardens", stock: variant("coated", null), due: some(new Date("2026-10-26T00:00:00Z")) }],
123
+ * ["J-2015", { title: "Night run", start: some(new Date("2026-10-05T00:00:00Z")), end: some(new Date("2026-10-05T08:00:00Z")), press: some("b2"), state: variant("actual", null), sheets: 16000.0, customer: "Meridian Monthly", stock: variant("coated", null), due: some(new Date("2026-10-06T00:00:00Z")) }],
124
+ * ["J-2016", { title: "Store flyers", start: some(new Date("2026-10-16T06:00:00Z")), end: some(new Date("2026-10-16T20:00:00Z")), press: some("b2"), state: variant("confirmed", null), sheets: 96000.0, customer: "Larkspur Home", stock: variant("uncoated", null), due: some(new Date("2026-10-19T00:00:00Z")) }],
125
+ * ["J-2017", { title: "Seed packets", start: some(new Date("2026-10-23T06:00:00Z")), end: some(new Date("2026-10-24T06:00:00Z")), press: some("b2"), state: variant("confirmed", null), sheets: 72000.0, customer: "Foxglove Gardens", stock: variant("board", null), due: some(new Date("2026-10-27T00:00:00Z")) }],
126
+ * ["J-2018", { title: "Exhibition book", start: some(new Date("2026-10-26T06:00:00Z")), end: some(new Date("2026-10-27T18:00:00Z")), press: some("b2"), state: variant("proposed", variant("recommended", null)), sheets: 54000.0, customer: "Driftwood Museum", stock: variant("coated", null), due: some(new Date("2026-10-30T00:00:00Z")) }],
127
+ * ["J-2019", { title: "Ticket books", start: some(new Date("2026-10-29T06:00:00Z")), end: some(new Date("2026-10-30T06:00:00Z")), press: some("b2"), state: variant("estimated", null), sheets: 60000.0, customer: "Heathfield Theatre", stock: variant("uncoated", null), due: some(new Date("2026-11-02T00:00:00Z")) }],
128
+ * ["J-2020", { title: "Card stock", start: some(new Date("2026-10-06T06:00:00Z")), end: some(new Date("2026-10-06T14:00:00Z")), press: some("b3"), state: variant("actual", null), sheets: 30000.0, customer: "Copperleaf Cafe", stock: variant("board", null), due: some(new Date("2026-10-08T00:00:00Z")) }],
129
+ * ["J-2021", { title: "Book sections", start: some(new Date("2026-10-11T06:00:00Z")), end: some(new Date("2026-10-12T12:00:00Z")), press: some("b3"), state: variant("confirmed", null), sheets: 84000.0, customer: "Driftwood Museum", stock: variant("coated", null), due: some(new Date("2026-10-14T00:00:00Z")) }],
130
+ * ["J-2022", { title: "Report covers", start: some(new Date("2026-10-19T06:00:00Z")), end: some(new Date("2026-10-20T18:00:00Z")), press: some("b3"), state: variant("confirmed", null), sheets: 48000.0, customer: "Harbour Arts Society", stock: variant("board", null), due: some(new Date("2026-10-21T00:00:00Z")) }],
131
+ * ["J-2023", { title: "Spring brochure", start: some(new Date("2026-11-03T06:00:00Z")), end: some(new Date("2026-11-04T18:00:00Z")), press: some("b3"), state: variant("estimated", null), sheets: 60000.0, customer: "Heathfield Theatre", stock: variant("coated", null), due: some(new Date("2026-11-09T00:00:00Z")) }],
132
+ * ]),
133
+ * mutations: (mutation) => ({
134
+ * // The jobs' patch door.
135
+ * patch: mutation.patch(),
136
+ * }),
137
+ * });
138
+ * export const planLinkBindings = e3.record("plan_link_bindings", DictType(StringType, PrintBinding), {
139
+ * initial: new Map([
140
+ * ["B-01", { title: "Fold sections", start: new Date("2026-10-15T06:00:00Z"), end: new Date("2026-10-16T06:00:00Z"), line: "fold", state: variant("confirmed", null) }],
141
+ * ["B-02", { title: "Fold sections", start: new Date("2026-10-17T06:00:00Z"), end: new Date("2026-10-18T06:00:00Z"), line: "fold", state: variant("confirmed", null) }],
142
+ * ["B-03", { title: "Bind books", start: new Date("2026-10-20T18:00:00Z"), end: new Date("2026-10-21T18:00:00Z"), line: "bind", state: variant("confirmed", null) }],
143
+ * ["B-04", { title: "Bind exhibition book", start: new Date("2026-10-25T06:00:00Z"), end: new Date("2026-10-26T06:00:00Z"), line: "bind", state: variant("proposed", variant("recommended", null)) }],
144
+ * ]),
145
+ * mutations: (mutation) => ({
146
+ * // The bindery's patch door.
147
+ * patch: mutation.patch(),
148
+ * }),
149
+ * });
150
+ * export const planLinkDeliveries = e3.record("plan_link_deliveries", DictType(StringType, PrintDelivery), {
151
+ * initial: new Map([
152
+ * ["D-01", { title: "Books", at: new Date("2026-10-28T10:00:00Z"), bay: "bay" }],
153
+ * ["D-02", { title: "Posters", at: new Date("2026-10-20T10:00:00Z"), bay: "bay" }],
154
+ * ]),
155
+ * mutations: (mutation) => ({
156
+ * // The deliveries' patch door.
157
+ * patch: mutation.patch(),
158
+ * }),
159
+ * });
119
160
  *
120
161
  * const planEventLinks = East.function([], UIComponentType, (_$) => (
121
162
  * <Reactive>{$ => {
@@ -123,16 +164,11 @@ const EVENT_REFS = new WeakMap();
123
164
  * const presses = $.let(Record.bind(planPrintPresses, []));
124
165
  * const lines = $.let(Record.bind(planLinkLines, []));
125
166
  * const bays = $.let(Record.bind(planLinkBays, []));
126
- * const plates = $.let(Record.bind(planLinkPlates, [planLinkPlatesPatch]));
127
- * const jobs = $.let(Record.bind(planLinkCaseJobs, [planLinkCaseJobsPatch]));
128
- * const bindings = $.let(Record.bind(planLinkBindings, [planLinkBindingsPatch]));
129
- * const deliveries = $.let(Record.bind(planLinkDeliveries, [planLinkDeliveriesPatch]));
167
+ * const plates = $.let(Record.bind(planLinkPlates));
168
+ * const jobs = $.let(Record.bind(planLinkCaseJobs));
169
+ * const bindings = $.let(Record.bind(planLinkBindings));
170
+ * const deliveries = $.let(Record.bind(planLinkDeliveries));
130
171
  * const stock = $.let(Data.bind(planLinkStock));
131
- * // The window's first Monday: each stock reading runs from it, a week apiece.
132
- * const first = $.const(new Date("2026-10-05T00:00:00Z"), DateTimeType);
133
- * const StockWeek = StructType({ at: DateTimeType, value: OptionType(FloatType) });
134
- * const weekly = $.const(East.function([ArrayType(FloatType)], ArrayType(StockWeek), (_$2, readings) =>
135
- * East.Array.generate(readings.size(), StockWeek, (_$3, i) => ({ at: first.addWeeks(i), value: some(readings.get(i)) }))));
136
172
  * const axis = $.let(Plan.axis({
137
173
  * window: { min: new Date("2026-10-05T00:00:00Z"), max: new Date("2026-11-02T00:00:00Z") },
138
174
  * resolution: "week", now: new Date("2026-10-14T09:00:00Z"),
@@ -174,7 +210,7 @@ const EVENT_REFS = new WeakMap();
174
210
  * Plan.over(stock, [
175
211
  * Plan.series.table(PrintStock, {
176
212
  * key: "stock", title: "Paper stock", label: s => s.name,
177
- * cells: s => Plan.tableCells(weekly(s.weekly)),
213
+ * cells: Plan.tableCells(Plan.values("weekly", (level) => ({ value: level }))),
178
214
  * format: Format.Number({ maximumFractionDigits: 0n }),
179
215
  * }),
180
216
  * ]),
@@ -1 +1 @@
1
- {"version":3,"file":"refs.js","sourceRoot":"","sources":["../../../src/plan/refs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAA2D,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,2EAA2E;AAC3E,MAAM,UAAU,GAAG,IAAI,OAAO,EAAkB,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;IACxG,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC1B,OAAO,GAAG,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,GAAY;IACrC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACrF,CAAC"}
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * @packageDocumentation
12
12
  */
13
- import { type EastType, type ExprType, type SubtypeExprOrValue, Expr, ArrayType, BooleanType, DictType, FunctionType, NullType, OptionType, StringType, type option } from "@elaraai/east";
13
+ import { type EastType, type ExprType, type SubtypeExprOrValue, Expr, ArrayType, BooleanType, DictType, FunctionType, NullType, OptionType, StringType, StructType, type option } from "@elaraai/east";
14
14
  import { DensityType, DragEventType, StatusValueType, UIComponentType, type DensityLiteral, type PagedSourceLike, type PickHandle, type StatusValueLiteral } from "@elaraai/east-ui";
15
15
  import { type RecordSlicesChromeType } from "@elaraai/east-ui/internal";
16
16
  import { PlanGrainType, type PlanGrainLiteral, PlanLinkType, PlanRowIdType, PlanGroupToggleEventType, PlanElementRefType, PlanBlocksType, PlanUiBindType, type PlanAxisKindLiteral, type PlanAxisInput } from "./types.js";
@@ -190,9 +190,9 @@ export interface PlanConfig<K extends PlanAxisKindLiteral = PlanAxisKindLiteral>
190
190
  /** DnD target identity — names the Plan in drag-grammar cell refs, which is how a Library beside the Plan
191
191
  * reaches it: its cards land only on a Plan with an `id` whose `sources` lists it. The Plan's own library
192
192
  * panel needs neither — an author's tab's cards land without them (#1259). A card lands only on a row whose
193
- * series declares `edit.create` (where it lands and how it becomes an item). The canvas's own elements
194
- * move whether or not it has an `id` — where their series declares a move's fields (`edit.key` and
195
- * `start` / `end`, or `at`, #825). Each is a draft of the root's `editing` session. */
193
+ * series declares `edit: { create }` (how it becomes an item, under the id the canvas mints, #1436). The
194
+ * canvas's own elements move whether or not it has an `id` — where their series declares `edit`, its elements
195
+ * read with `Plan.items` (#825, #1436). Each is a draft of the root's `editing` session. */
196
196
  id?: string;
197
197
  /** The ids of the Libraries beside the Plan whose cards it takes (`add`), reached by its `id` — its own
198
198
  * library panel's need none (omit = no Library beside it). */
@@ -279,10 +279,15 @@ export type PlanCanvasOptions = Omit<PlanConfig, "data"> & {
279
279
  * @param config - The canvas's configuration, `data` optional
280
280
  * @param extra - The fixed blocks after `data`'s: a Plan's `rows`
281
281
  * @param chrome - The chrome of the Plan's `Slice.bindRecords`; `none` with no slice
282
+ * @param rowsNested - The nested part of the Slice's `rows` source, where it gives the canvas its rows
283
+ * @param rowsBinding - The binding the Slice's `rows` source narrows, there: what its nested index is read through
284
+ * @param pickHeld - The pick, held in a variable of the block the root is built in: what the root's reads of its
285
+ * series read. `config.pick` still says which series it lists; written out at each read, it would copy every series'
286
+ * code into each
282
287
  * @returns An East expression of {@link PlanRootType}
283
288
  * @throws {Error} As {@link createPlanRoot} does — an axis stating no window is taken beside a slice, a source of which
284
289
  * holds the window in its `range`; and with no `data`, a `series`, `pick` or `editing`, each of which reads it
285
290
  * @internal
286
291
  */
287
- export declare function buildPlanRoot(config: PlanCanvasOptions, extra: ExprType<PlanBlocksType> | undefined, chrome: option<ExprType<RecordSlicesChromeType>>): ExprType<PlanRootType>;
292
+ export declare function buildPlanRoot(config: PlanCanvasOptions, extra: ExprType<PlanBlocksType> | undefined, chrome: option<ExprType<RecordSlicesChromeType>>, rowsNested?: EastType, rowsBinding?: ExprType<StructType>, pickHeld?: ExprType<StructType>): ExprType<PlanRootType>;
288
293
  //# sourceMapping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QAC3C,kBAAkB;QAClB,OAAO,CAAC,EAAE,cAAc,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;QAC3D,6DAA6D;QAC7D,WAAW,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;KAChD,CAAC;CACL;AASD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAEjI;AAED;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC;AAEzF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,SAAS,EAChG,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC3G,QAAQ,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAyI3D"}
@@ -16,7 +16,11 @@ import { EditingApplyResultType, EditingChangeSetTypeFor, EditingDraftFieldType,
16
16
  import { PlanAxisType, PlanGrainType, PlanLinkType, PlanRowIdType, PlanGroupToggleEventType, PlanFooterItemType, PlanStyleType, PlanElementRefType, PlanBlocksType, PlanRowsType, PlanUiBindType, PlanEditingType, PlanReadyEntryType, PlanWriteRequestType, PLAN_PAGE_SIZE, } from "./types.js";
17
17
  import { orderedPlanSource } from "./ordered-source.js";
18
18
  import { PlanRootType } from "./ir.js";
19
- import { WINDOWLESS_AXES } from "./builders.js";
19
+ import { WINDOWLESS_AXES, axisKindOf, axisResolutionsOf } from "./builders.js";
20
+ import { checkPlanNested, nestedPartOf, planNestedIndex } from "./nested-checks.js";
21
+ import { planNestedRestatement } from "./nested-patch.js";
22
+ import { PlanNestedType, planNestedUses } from "./nested-read.js";
23
+ import { pickedSeriesOf } from "./pick.js";
20
24
  import { applySeries, checkSeries, seriesWriteFn, PlanCarriedType, PlanSeriesType } from "./series.js";
21
25
  /** The source collection a series list's East type reads — its `derive`'s input, when the list's element is a series variant. */
22
26
  function seriesSourceOf(list) {
@@ -56,12 +60,17 @@ export function createPlanRoot(config) {
56
60
  * @param config - The canvas's configuration, `data` optional
57
61
  * @param extra - The fixed blocks after `data`'s: a Plan's `rows`
58
62
  * @param chrome - The chrome of the Plan's `Slice.bindRecords`; `none` with no slice
63
+ * @param rowsNested - The nested part of the Slice's `rows` source, where it gives the canvas its rows
64
+ * @param rowsBinding - The binding the Slice's `rows` source narrows, there: what its nested index is read through
65
+ * @param pickHeld - The pick, held in a variable of the block the root is built in: what the root's reads of its
66
+ * series read. `config.pick` still says which series it lists; written out at each read, it would copy every series'
67
+ * code into each
59
68
  * @returns An East expression of {@link PlanRootType}
60
69
  * @throws {Error} As {@link createPlanRoot} does — an axis stating no window is taken beside a slice, a source of which
61
70
  * holds the window in its `range`; and with no `data`, a `series`, `pick` or `editing`, each of which reads it
62
71
  * @internal
63
72
  */
64
- export function buildPlanRoot(config, extra, chrome) {
73
+ export function buildPlanRoot(config, extra, chrome, rowsNested, rowsBinding, pickHeld) {
65
74
  // A canvas is DEFINED as data + series (+ the root resolvers) — there
66
75
  // is no rows-authoring channel; the IR's inline arm is what inline
67
76
  // application collapses to. A Plan of event kinds or `rows` alone has no data.
@@ -72,7 +81,7 @@ export function buildPlanRoot(config, extra, chrome) {
72
81
  // lose them silently.
73
82
  if ("onDrag" in config) {
74
83
  throw new Error("Plan: `onDrag` is removed (#880) — a card dropped on a row is a draft of the `editing` session: declare " +
75
- "`edit: { items, create }` on the series it lands on, and commit with `editing.onApply` (or `onUpdate`)");
84
+ "`edit: { create }` on the series it lands on, and commit with `editing.onApply` (or `onUpdate`)");
76
85
  }
77
86
  if ("review" in config) {
78
87
  throw new Error("Plan: `review` is removed (#1260) — a Plan approves and rejects nothing: its changes are drafts of the " +
@@ -99,16 +108,43 @@ export function buildPlanRoot(config, extra, chrome) {
99
108
  "an event kind's, or a tab's: slice={{ slice: Slice.bindRecords(key, { <kind>: { source, range } }) }}. " +
100
109
  "A canvas never fits its axis to the data, so it reads the same inline and paged.");
101
110
  }
111
+ // Over a record's paged rows, each series is held to the rows' nested series index first (#1435): where its slice's
112
+ // `rows` source gives them, or `data` is the record's indexed binding, whose type carries its nested part. Rows paged
113
+ // whole (`Data.bindPaged(dataset)`) are read as #1436 reads them.
114
+ const nested = config.data === undefined ? undefined
115
+ : rowsNested ?? nestedPartOf(Expr.type(East.value(config.data)));
116
+ let reads = [];
117
+ if (nested !== undefined) {
118
+ // What each series reads is known as the Plan is built: from the list it was given, or the one its pick was. A pick
119
+ // read through an East variable is an expression whose series the build cannot see.
120
+ const declared = config.pick !== undefined ? pickedSeriesOf(config.pick) : config.series;
121
+ const index = planNestedIndex(nested);
122
+ if (index !== undefined && !Array.isArray(declared)) {
123
+ throw new Error(config.pick !== undefined
124
+ ? "Plan: its rows are read through a nested series index, a cell at a time, by what each series reads — known as the Plan is " +
125
+ "built — and its pick is an East expression whose series it cannot see. Give `pick` Plan.pick(key, [Plan.series.span(…), …]) " +
126
+ "as it returns it: its series a list, and the pick held in no East variable ($.let)"
127
+ : "Plan: its rows are read through a nested series index, a cell at a time, by what each series reads — known as the Plan is " +
128
+ "built — and its `series` are an East expression of a list. Give `series` the list itself: [Plan.series.span(…), …]");
129
+ }
130
+ reads = checkPlanNested(declared, { index, axisKind: axisKindOf(config.axis), resolutions: axisResolutionsOf(config.axis) });
131
+ }
102
132
  if (config.series !== undefined)
103
- checkSeries(config.series, "Plan");
133
+ checkSeries(config.series, "Plan", axisKindOf(config.axis));
104
134
  const data = config.data;
105
135
  if (data === undefined)
106
- return rootOf(config, East.value(variant("inline", extra), PlanRowsType), undefined, chrome);
136
+ return rootOf(config, East.value(variant("inline", extra), PlanRowsType), undefined, chrome, undefined);
107
137
  // A pick feeds the canvas its SURVIVING series; everything downstream sees
108
138
  // one series input either way.
109
- const seriesInput = config.pick !== undefined
110
- ? pickActive(config.pick)
139
+ const pick = pickHeld ?? config.pick;
140
+ const seriesInput = pick !== undefined
141
+ ? pickActive(pick)
111
142
  : config.series;
143
+ // A gesture writes the data, whichever series show (#1440): the editing session is built over every series a pick
144
+ // holds, so a number written as its series is switched off — its field leaving with its row — lands, never refused.
145
+ const editSeries = pick !== undefined
146
+ ? pick.all
147
+ : seriesInput;
112
148
  // The shared row-source resolution (#567): inline collection, paged
113
149
  // source, or a whole-value bind handle — one dispatch, one vocabulary,
114
150
  // and the series pipeline is the `make` that turns each window's entries
@@ -144,8 +180,21 @@ export function buildPlanRoot(config, extra, chrome) {
144
180
  const blocks = ordered === undefined ? applySeries(seriesInput, source) : ordered.make(seriesInput, source);
145
181
  return extra === undefined ? blocks : blocks.concat(extra);
146
182
  });
147
- const editing = config.editing === undefined ? undefined : buildPlanEditing(resolved, seriesInput, config.editing);
148
- return rootOf(config, rowsValue, editing === undefined ? undefined : ordered?.editing(editing) ?? editing, chrome);
183
+ const editing = config.editing === undefined ? undefined : buildPlanEditing(resolved, editSeries, config.editing, planNestedIndex(nested));
184
+ // Paged beside their nested series index (#1438): the seam the reader reads the index's cells through, and the window
185
+ // its rows are drawn from with what it read — the binding's, or the one the Slice's `rows` source narrows.
186
+ const index = planNestedIndex(nested);
187
+ const binding = (rowsBinding ?? config.data);
188
+ const uses = index === undefined ? [] : planNestedUses(reads, index);
189
+ const nestedSeam = index === undefined || ordered === undefined ? undefined : East.value({
190
+ index: index.name,
191
+ source: binding.id,
192
+ tile: variant(index.tile, null),
193
+ summary: index.summary === undefined ? none : some(variant(index.summary, null)),
194
+ uses,
195
+ rows: ordered.nestedRows(seriesInput, binding.fill.unwrap(), new Set(uses.filter((use) => use.shade.type === "booked").map((use) => use.series))),
196
+ }, PlanNestedType);
197
+ return rootOf(pick === config.pick ? config : { ...config, pick }, rowsValue, editing === undefined ? undefined : ordered?.editing(editing) ?? editing, chrome, nestedSeam);
149
198
  }
150
199
  /**
151
200
  * The canvas's root around its rows, its editing session and its narrowing's chrome.
@@ -154,9 +203,10 @@ export function buildPlanRoot(config, extra, chrome) {
154
203
  * @param rowsValue - Its rows: inline blocks, or a paged source of them
155
204
  * @param editing - Its editing session over `data`, if it has one
156
205
  * @param chrome - The chrome of the Plan's `Slice.bindRecords`; `none` with no slice
206
+ * @param nested - What its paged rows' reader reads of their nested series index, if it reads it (#1438)
157
207
  * @returns An East expression of {@link PlanRootType}
158
208
  */
159
- function rootOf(config, rowsValue, editing, chrome) {
209
+ function rootOf(config, rowsValue, editing, chrome, nested) {
160
210
  const style = config.style;
161
211
  const styleValue = style !== undefined
162
212
  ? some(East.value({
@@ -192,6 +242,7 @@ function rootOf(config, rowsValue, editing, chrome) {
192
242
  ? some(East.value(config.pick.pick, PickBindType))
193
243
  : none,
194
244
  slice: chrome,
245
+ nested: nested !== undefined ? some(nested) : none,
195
246
  footer: (config.footer ?? []).map(f => East.value({
196
247
  text: f.text,
197
248
  tone: f.tone !== undefined ? some(resolveTag(f.tone, StatusValueType)) : none,
@@ -231,7 +282,7 @@ function rootOf(config, rowsValue, editing, chrome) {
231
282
  * @returns The editing declaration, on the wire
232
283
  * @throws {Error} When the declaration is inconsistent, or a callback has another signature
233
284
  */
234
- function buildPlanEditing(resolved, series, input) {
285
+ function buildPlanEditing(resolved, series, input, nested) {
235
286
  const sourceType = resolved.collectionType;
236
287
  const entryType = sourceType.value;
237
288
  const keyType = sourceType.key;
@@ -413,18 +464,30 @@ function buildPlanEditing(resolved, series, input) {
413
464
  }
414
465
  else if (authorApply !== undefined) {
415
466
  const typedBatch = batchType;
467
+ // Over rows read beside their nested series index (#1438), each change's patch restated by key before the author's
468
+ // apply: a collection's whole `replace` the operations it stands for, so a commit names only what it changed.
469
+ const restatement = nested === undefined ? undefined
470
+ : planNestedRestatement(entryType, keyType, nested);
416
471
  if (Expr.type(authorApply).type === "AsyncFunction") {
417
472
  const fn = authorApply;
418
473
  onApply = East.value(variant("async", East.asyncFunction([BlobType], EditingApplyResultType, ($, blob) => {
419
474
  const apply = $.const(fn);
420
- return apply(blob.decodeBeast(typedBatch, "v2"));
475
+ const batch = $.let(blob.decodeBeast(typedBatch, "v2"));
476
+ if (restatement === undefined)
477
+ return apply(batch);
478
+ const restate = $.const(restatement);
479
+ return apply(restate(batch));
421
480
  })), EditingWireApplyType);
422
481
  }
423
482
  else {
424
483
  const fn = authorApply;
425
484
  onApply = East.value(variant("sync", East.function([BlobType], EditingApplyResultType, ($, blob) => {
426
485
  const apply = $.const(fn);
427
- return apply(blob.decodeBeast(typedBatch, "v2"));
486
+ const batch = $.let(blob.decodeBeast(typedBatch, "v2"));
487
+ if (restatement === undefined)
488
+ return apply(batch);
489
+ const restate = $.const(restatement);
490
+ return apply(restate(batch));
428
491
  })), EditingWireApplyType);
429
492
  }
430
493
  }