@elaraai/e3-ui 1.0.97 → 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 (491) 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 +232 -25
  5. package/dist/src/allocation/index.d.ts.map +1 -1
  6. package/dist/src/allocation/index.js +35 -6
  7. package/dist/src/allocation/index.js.map +1 -1
  8. package/dist/src/allocation/types.d.ts +41 -0
  9. package/dist/src/allocation/types.d.ts.map +1 -1
  10. package/dist/src/allocation/types.js +35 -0
  11. package/dist/src/allocation/types.js.map +1 -1
  12. package/dist/src/bind/data-indexed.d.ts +286 -37
  13. package/dist/src/bind/data-indexed.d.ts.map +1 -1
  14. package/dist/src/bind/data-indexed.js +259 -38
  15. package/dist/src/bind/data-indexed.js.map +1 -1
  16. package/dist/src/bind/data.d.ts +48 -9
  17. package/dist/src/bind/data.d.ts.map +1 -1
  18. package/dist/src/bind/data.js +48 -3
  19. package/dist/src/bind/data.js.map +1 -1
  20. package/dist/src/bind/record.d.ts +61 -24
  21. package/dist/src/bind/record.d.ts.map +1 -1
  22. package/dist/src/bind/record.js +17 -57
  23. package/dist/src/bind/record.js.map +1 -1
  24. package/dist/src/calendar/index.d.ts +522 -36
  25. package/dist/src/calendar/index.d.ts.map +1 -1
  26. package/dist/src/calendar/index.js +53 -13
  27. package/dist/src/calendar/index.js.map +1 -1
  28. package/dist/src/calendar/paged.d.ts +89 -0
  29. package/dist/src/calendar/paged.d.ts.map +1 -0
  30. package/dist/src/calendar/paged.js +148 -0
  31. package/dist/src/calendar/paged.js.map +1 -0
  32. package/dist/src/flowchart/index.d.ts +35 -31
  33. package/dist/src/flowchart/index.d.ts.map +1 -1
  34. package/dist/src/flowchart/index.js +35 -31
  35. package/dist/src/flowchart/index.js.map +1 -1
  36. package/dist/src/flowchart/library.d.ts +108 -84
  37. package/dist/src/flowchart/library.d.ts.map +1 -1
  38. package/dist/src/flowchart/library.js +108 -84
  39. package/dist/src/flowchart/library.js.map +1 -1
  40. package/dist/src/flowchart/payload.d.ts +105 -17
  41. package/dist/src/flowchart/payload.d.ts.map +1 -1
  42. package/dist/src/flowchart/payload.js +3 -3
  43. package/dist/src/flowchart/payload.js.map +1 -1
  44. package/dist/src/flowchart/values.d.ts +35 -31
  45. package/dist/src/flowchart/values.d.ts.map +1 -1
  46. package/dist/src/flowchart/values.js +35 -31
  47. package/dist/src/flowchart/values.js.map +1 -1
  48. package/dist/src/flowchart/window.d.ts.map +1 -1
  49. package/dist/src/flowchart/window.js +3 -2
  50. package/dist/src/flowchart/window.js.map +1 -1
  51. package/dist/src/index.d.ts +13 -4
  52. package/dist/src/index.d.ts.map +1 -1
  53. package/dist/src/index.js +20 -1
  54. package/dist/src/index.js.map +1 -1
  55. package/dist/src/internal.d.ts +18 -8
  56. package/dist/src/internal.d.ts.map +1 -1
  57. package/dist/src/internal.js +40 -10
  58. package/dist/src/internal.js.map +1 -1
  59. package/dist/src/plan/assemble.d.ts +8 -0
  60. package/dist/src/plan/assemble.d.ts.map +1 -1
  61. package/dist/src/plan/assemble.js +1 -1
  62. package/dist/src/plan/assemble.js.map +1 -1
  63. package/dist/src/plan/builders.d.ts +1530 -10
  64. package/dist/src/plan/builders.d.ts.map +1 -1
  65. package/dist/src/plan/builders.js +260 -122
  66. package/dist/src/plan/builders.js.map +1 -1
  67. package/dist/src/plan/event-rows.d.ts +224 -157
  68. package/dist/src/plan/event-rows.d.ts.map +1 -1
  69. package/dist/src/plan/event-rows.js +201 -56
  70. package/dist/src/plan/event-rows.js.map +1 -1
  71. package/dist/src/plan/factories.d.ts +72 -4
  72. package/dist/src/plan/factories.d.ts.map +1 -1
  73. package/dist/src/plan/factories.js +147 -1
  74. package/dist/src/plan/factories.js.map +1 -1
  75. package/dist/src/plan/index.d.ts +152 -125
  76. package/dist/src/plan/index.d.ts.map +1 -1
  77. package/dist/src/plan/index.js +138 -122
  78. package/dist/src/plan/index.js.map +1 -1
  79. package/dist/src/plan/ir.d.ts +1139 -8
  80. package/dist/src/plan/ir.d.ts.map +1 -1
  81. package/dist/src/plan/ir.js +5 -0
  82. package/dist/src/plan/ir.js.map +1 -1
  83. package/dist/src/plan/library.d.ts +65 -42
  84. package/dist/src/plan/library.d.ts.map +1 -1
  85. package/dist/src/plan/library.js +65 -42
  86. package/dist/src/plan/library.js.map +1 -1
  87. package/dist/src/plan/nested-checks.d.ts +146 -0
  88. package/dist/src/plan/nested-checks.d.ts.map +1 -0
  89. package/dist/src/plan/nested-checks.js +468 -0
  90. package/dist/src/plan/nested-checks.js.map +1 -0
  91. package/dist/src/plan/nested-patch.d.ts +35 -0
  92. package/dist/src/plan/nested-patch.d.ts.map +1 -0
  93. package/dist/src/plan/nested-patch.js +143 -0
  94. package/dist/src/plan/nested-patch.js.map +1 -0
  95. package/dist/src/plan/nested-read.d.ts +3250 -0
  96. package/dist/src/plan/nested-read.d.ts.map +1 -0
  97. package/dist/src/plan/nested-read.js +163 -0
  98. package/dist/src/plan/nested-read.js.map +1 -0
  99. package/dist/src/plan/nested.d.ts +280 -0
  100. package/dist/src/plan/nested.d.ts.map +1 -0
  101. package/dist/src/plan/nested.js +6 -0
  102. package/dist/src/plan/nested.js.map +1 -0
  103. package/dist/src/plan/ordered-source.d.ts +3067 -1
  104. package/dist/src/plan/ordered-source.d.ts.map +1 -1
  105. package/dist/src/plan/ordered-source.js +67 -17
  106. package/dist/src/plan/ordered-source.js.map +1 -1
  107. package/dist/src/plan/over.d.ts +111 -75
  108. package/dist/src/plan/over.d.ts.map +1 -1
  109. package/dist/src/plan/over.js +111 -75
  110. package/dist/src/plan/over.js.map +1 -1
  111. package/dist/src/plan/pick.d.ts +15 -3
  112. package/dist/src/plan/pick.d.ts.map +1 -1
  113. package/dist/src/plan/pick.js +75 -36
  114. package/dist/src/plan/pick.js.map +1 -1
  115. package/dist/src/plan/plan.d.ts +3143 -501
  116. package/dist/src/plan/plan.d.ts.map +1 -1
  117. package/dist/src/plan/plan.js +133 -34
  118. package/dist/src/plan/plan.js.map +1 -1
  119. package/dist/src/plan/reads.d.ts +421 -0
  120. package/dist/src/plan/reads.d.ts.map +1 -0
  121. package/dist/src/plan/reads.js +143 -0
  122. package/dist/src/plan/reads.js.map +1 -0
  123. package/dist/src/plan/refs.d.ts +111 -75
  124. package/dist/src/plan/refs.d.ts.map +1 -1
  125. package/dist/src/plan/refs.js +111 -75
  126. package/dist/src/plan/refs.js.map +1 -1
  127. package/dist/src/plan/root.d.ts +14 -7
  128. package/dist/src/plan/root.d.ts.map +1 -1
  129. package/dist/src/plan/root.js +82 -17
  130. package/dist/src/plan/root.js.map +1 -1
  131. package/dist/src/plan/series.d.ts +5153 -4331
  132. package/dist/src/plan/series.d.ts.map +1 -1
  133. package/dist/src/plan/series.js +1082 -266
  134. package/dist/src/plan/series.js.map +1 -1
  135. package/dist/src/plan/shade.d.ts +981 -0
  136. package/dist/src/plan/shade.d.ts.map +1 -0
  137. package/dist/src/plan/shade.js +60 -0
  138. package/dist/src/plan/shade.js.map +1 -0
  139. package/dist/src/plan/types.d.ts +192 -18
  140. package/dist/src/plan/types.d.ts.map +1 -1
  141. package/dist/src/plan/types.js +77 -19
  142. package/dist/src/plan/types.js.map +1 -1
  143. package/dist/src/query/builder.d.ts +3 -3
  144. package/dist/src/query/builder.d.ts.map +1 -1
  145. package/dist/src/query/builder.js +1 -1
  146. package/dist/src/query/library.d.ts +3 -3
  147. package/dist/src/query/library.d.ts.map +1 -1
  148. package/dist/src/query/library.js +1 -1
  149. package/dist/src/query/queries.d.ts +2 -2
  150. package/dist/src/query/queries.js +1 -1
  151. package/dist/src/query/saved.d.ts +8 -4
  152. package/dist/src/query/saved.d.ts.map +1 -1
  153. package/dist/src/query/saved.js +8 -4
  154. package/dist/src/query/saved.js.map +1 -1
  155. package/dist/src/query/types.d.ts +8 -3
  156. package/dist/src/query/types.d.ts.map +1 -1
  157. package/dist/src/query/types.js +8 -3
  158. package/dist/src/query/types.js.map +1 -1
  159. package/dist/src/roster/index.d.ts +583 -39
  160. package/dist/src/roster/index.d.ts.map +1 -1
  161. package/dist/src/roster/index.js +109 -35
  162. package/dist/src/roster/index.js.map +1 -1
  163. package/dist/src/roster/library.d.ts +12 -2
  164. package/dist/src/roster/library.d.ts.map +1 -1
  165. package/dist/src/roster/library.js +8 -0
  166. package/dist/src/roster/library.js.map +1 -1
  167. package/dist/src/roster/lists.d.ts +59 -12
  168. package/dist/src/roster/lists.d.ts.map +1 -1
  169. package/dist/src/roster/lists.js +51 -58
  170. package/dist/src/roster/lists.js.map +1 -1
  171. package/dist/src/roster/targets.d.ts +8 -4
  172. package/dist/src/roster/targets.d.ts.map +1 -1
  173. package/dist/src/roster/targets.js +9 -5
  174. package/dist/src/roster/targets.js.map +1 -1
  175. package/dist/src/roster/times.d.ts +402 -0
  176. package/dist/src/roster/times.d.ts.map +1 -1
  177. package/dist/src/roster/types.d.ts +913 -1
  178. package/dist/src/roster/types.d.ts.map +1 -1
  179. package/dist/src/roster/types.js +43 -3
  180. package/dist/src/roster/types.js.map +1 -1
  181. package/dist/src/schedule/cell-checks.d.ts +85 -0
  182. package/dist/src/schedule/cell-checks.d.ts.map +1 -0
  183. package/dist/src/schedule/cell-checks.js +211 -0
  184. package/dist/src/schedule/cell-checks.js.map +1 -0
  185. package/dist/src/schedule/days.d.ts +1 -1
  186. package/dist/src/schedule/days.js +1 -1
  187. package/dist/src/schedule/events.d.ts +52 -16
  188. package/dist/src/schedule/events.d.ts.map +1 -1
  189. package/dist/src/schedule/events.js +574 -356
  190. package/dist/src/schedule/events.js.map +1 -1
  191. package/dist/src/schedule/fields.d.ts +134 -0
  192. package/dist/src/schedule/fields.d.ts.map +1 -0
  193. package/dist/src/schedule/fields.js +207 -0
  194. package/dist/src/schedule/fields.js.map +1 -0
  195. package/dist/src/schedule/library.d.ts +11 -3
  196. package/dist/src/schedule/library.d.ts.map +1 -1
  197. package/dist/src/schedule/library.js +9 -6
  198. package/dist/src/schedule/library.js.map +1 -1
  199. package/dist/src/schedule/optimise.d.ts +124 -0
  200. package/dist/src/schedule/optimise.d.ts.map +1 -0
  201. package/dist/src/schedule/optimise.js +140 -0
  202. package/dist/src/schedule/optimise.js.map +1 -0
  203. package/dist/src/schedule/pages.d.ts +76 -0
  204. package/dist/src/schedule/pages.d.ts.map +1 -0
  205. package/dist/src/schedule/pages.js +86 -0
  206. package/dist/src/schedule/pages.js.map +1 -0
  207. package/dist/src/schedule/patch.d.ts +1 -1
  208. package/dist/src/schedule/patch.js +1 -1
  209. package/dist/src/schedule/periods.d.ts +8 -4
  210. package/dist/src/schedule/periods.d.ts.map +1 -1
  211. package/dist/src/schedule/periods.js +1 -1
  212. package/dist/src/schedule/periods.js.map +1 -1
  213. package/dist/src/schedule/record-window.d.ts +115 -22
  214. package/dist/src/schedule/record-window.d.ts.map +1 -1
  215. package/dist/src/schedule/record-window.js +140 -62
  216. package/dist/src/schedule/record-window.js.map +1 -1
  217. package/dist/src/schedule/resources.d.ts +9 -5
  218. package/dist/src/schedule/resources.d.ts.map +1 -1
  219. package/dist/src/schedule/resources.js +35 -15
  220. package/dist/src/schedule/resources.js.map +1 -1
  221. package/dist/src/schedule/session.d.ts +15 -1
  222. package/dist/src/schedule/session.d.ts.map +1 -1
  223. package/dist/src/schedule/session.js +30 -18
  224. package/dist/src/schedule/session.js.map +1 -1
  225. package/dist/src/schedule/types.d.ts +455 -37
  226. package/dist/src/schedule/types.d.ts.map +1 -1
  227. package/dist/src/schedule/types.js +79 -18
  228. package/dist/src/schedule/types.js.map +1 -1
  229. package/dist/src/schedule/window.d.ts +30 -9
  230. package/dist/src/schedule/window.d.ts.map +1 -1
  231. package/dist/src/schedule/window.js +101 -49
  232. package/dist/src/schedule/window.js.map +1 -1
  233. package/dist/src/schematic/index.d.ts +287 -0
  234. package/dist/src/schematic/index.d.ts.map +1 -0
  235. package/dist/src/schematic/index.js +216 -0
  236. package/dist/src/schematic/index.js.map +1 -0
  237. package/dist/src/schematic/kinds.d.ts +501 -0
  238. package/dist/src/schematic/kinds.d.ts.map +1 -0
  239. package/dist/src/schematic/kinds.js +1027 -0
  240. package/dist/src/schematic/kinds.js.map +1 -0
  241. package/dist/src/schematic/layers.d.ts +74 -0
  242. package/dist/src/schematic/layers.d.ts.map +1 -0
  243. package/dist/src/schematic/layers.js +99 -0
  244. package/dist/src/schematic/layers.js.map +1 -0
  245. package/dist/src/schematic/library.d.ts +202 -0
  246. package/dist/src/schematic/library.d.ts.map +1 -0
  247. package/dist/src/schematic/library.js +244 -0
  248. package/dist/src/schematic/library.js.map +1 -0
  249. package/dist/src/schematic/payload.d.ts +8310 -0
  250. package/dist/src/schematic/payload.d.ts.map +1 -0
  251. package/dist/src/schematic/payload.js +446 -0
  252. package/dist/src/schematic/payload.js.map +1 -0
  253. package/dist/src/schematic/schematic.d.ts +27 -0
  254. package/dist/src/schematic/schematic.d.ts.map +1 -0
  255. package/dist/src/schematic/schematic.js +17 -0
  256. package/dist/src/schematic/schematic.js.map +1 -0
  257. package/dist/src/schematic/shapes.d.ts +150 -0
  258. package/dist/src/schematic/shapes.d.ts.map +1 -0
  259. package/dist/src/schematic/shapes.js +171 -0
  260. package/dist/src/schematic/shapes.js.map +1 -0
  261. package/dist/src/schematic/templates.d.ts +96 -0
  262. package/dist/src/schematic/templates.d.ts.map +1 -0
  263. package/dist/src/schematic/templates.js +91 -0
  264. package/dist/src/schematic/templates.js.map +1 -0
  265. package/dist/src/schematic/types.d.ts +5766 -0
  266. package/dist/src/schematic/types.d.ts.map +1 -0
  267. package/dist/src/schematic/types.js +688 -0
  268. package/dist/src/schematic/types.js.map +1 -0
  269. package/dist/src/schematic/window.d.ts +213 -0
  270. package/dist/src/schematic/window.d.ts.map +1 -0
  271. package/dist/src/schematic/window.js +340 -0
  272. package/dist/src/schematic/window.js.map +1 -0
  273. package/dist/src/sheet/bridge.d.ts +19 -0
  274. package/dist/src/sheet/bridge.d.ts.map +1 -1
  275. package/dist/src/sheet/bridge.js +28 -21
  276. package/dist/src/sheet/bridge.js.map +1 -1
  277. package/dist/src/sheet/editing-bridge.d.ts +4 -2
  278. package/dist/src/sheet/editing-bridge.d.ts.map +1 -1
  279. package/dist/src/sheet/editing-bridge.js +8 -2
  280. package/dist/src/sheet/editing-bridge.js.map +1 -1
  281. package/dist/src/sheet/editing-types.d.ts +9 -5
  282. package/dist/src/sheet/editing-types.d.ts.map +1 -1
  283. package/dist/src/sheet/editing-types.js +9 -5
  284. package/dist/src/sheet/editing-types.js.map +1 -1
  285. package/dist/src/sheet/index.d.ts +84 -54
  286. package/dist/src/sheet/index.d.ts.map +1 -1
  287. package/dist/src/sheet/index.js +81 -53
  288. package/dist/src/sheet/index.js.map +1 -1
  289. package/dist/src/sheet/library.d.ts +13 -8
  290. package/dist/src/sheet/library.d.ts.map +1 -1
  291. package/dist/src/sheet/library.js +13 -8
  292. package/dist/src/sheet/library.js.map +1 -1
  293. package/dist/src/sheet/optimise.d.ts +69 -0
  294. package/dist/src/sheet/optimise.d.ts.map +1 -0
  295. package/dist/src/sheet/optimise.js +81 -0
  296. package/dist/src/sheet/optimise.js.map +1 -0
  297. package/dist/src/sheet/record.d.ts +1 -1
  298. package/dist/src/sheet/record.js +2 -2
  299. package/dist/src/sheet/record.js.map +1 -1
  300. package/dist/src/sheet/registers.d.ts +157 -133
  301. package/dist/src/sheet/registers.d.ts.map +1 -1
  302. package/dist/src/sheet/registers.js +157 -133
  303. package/dist/src/sheet/registers.js.map +1 -1
  304. package/dist/src/sheet/root.d.ts +6 -1
  305. package/dist/src/sheet/root.d.ts.map +1 -1
  306. package/dist/src/sheet/root.js +17 -5
  307. package/dist/src/sheet/root.js.map +1 -1
  308. package/dist/src/sheet/sheet.d.ts +696 -590
  309. package/dist/src/sheet/sheet.d.ts.map +1 -1
  310. package/dist/src/sheet/sheet.js +49 -15
  311. package/dist/src/sheet/sheet.js.map +1 -1
  312. package/dist/src/sheet/sub-rows.d.ts +106 -76
  313. package/dist/src/sheet/sub-rows.d.ts.map +1 -1
  314. package/dist/src/sheet/sub-rows.js +106 -76
  315. package/dist/src/sheet/sub-rows.js.map +1 -1
  316. package/dist/src/sheet/types.d.ts +57 -20
  317. package/dist/src/sheet/types.d.ts.map +1 -1
  318. package/dist/src/sheet/types.js +4 -8
  319. package/dist/src/sheet/types.js.map +1 -1
  320. package/dist/src/studio/builder.d.ts +3 -153
  321. package/dist/src/studio/builder.d.ts.map +1 -1
  322. package/dist/src/studio/builder.js +1 -1
  323. package/dist/src/studio/canvas.d.ts +5 -4
  324. package/dist/src/studio/canvas.d.ts.map +1 -1
  325. package/dist/src/studio/canvas.js +8 -7
  326. package/dist/src/studio/canvas.js.map +1 -1
  327. package/dist/src/studio/component.d.ts +30 -20
  328. package/dist/src/studio/component.d.ts.map +1 -1
  329. package/dist/src/studio/component.js +26 -61
  330. package/dist/src/studio/component.js.map +1 -1
  331. package/dist/src/studio/index.d.ts +2 -2
  332. package/dist/src/studio/index.d.ts.map +1 -1
  333. package/dist/src/studio/index.js +1 -1
  334. package/dist/src/studio/index.js.map +1 -1
  335. package/dist/src/studio/inspector.d.ts +10 -39
  336. package/dist/src/studio/inspector.d.ts.map +1 -1
  337. package/dist/src/studio/inspector.js +11 -31
  338. package/dist/src/studio/inspector.js.map +1 -1
  339. package/dist/src/studio/library.d.ts +3 -169
  340. package/dist/src/studio/library.d.ts.map +1 -1
  341. package/dist/src/studio/library.js +1 -1
  342. package/dist/src/studio/page.d.ts +0 -8
  343. package/dist/src/studio/page.d.ts.map +1 -1
  344. package/dist/src/studio/pages.d.ts +17 -591
  345. package/dist/src/studio/pages.d.ts.map +1 -1
  346. package/dist/src/studio/pages.js +17 -44
  347. package/dist/src/studio/pages.js.map +1 -1
  348. package/dist/src/studio/palette.d.ts +2 -7
  349. package/dist/src/studio/palette.d.ts.map +1 -1
  350. package/dist/src/studio/palette.js +4 -5
  351. package/dist/src/studio/palette.js.map +1 -1
  352. package/dist/src/studio/publish.d.ts +8 -18
  353. package/dist/src/studio/publish.d.ts.map +1 -1
  354. package/dist/src/studio/publish.js +10 -36
  355. package/dist/src/studio/publish.js.map +1 -1
  356. package/dist/src/utils/derive.d.ts +12 -12
  357. package/dist/src/utils/derive.d.ts.map +1 -1
  358. package/dist/src/utils/derive.js +5 -2
  359. package/dist/src/utils/derive.js.map +1 -1
  360. package/dist/src/utils/keyed-rows.d.ts +41 -0
  361. package/dist/src/utils/keyed-rows.d.ts.map +1 -0
  362. package/dist/src/utils/keyed-rows.js +64 -0
  363. package/dist/src/utils/keyed-rows.js.map +1 -0
  364. package/dist/src/utils/optimise.d.ts +79 -0
  365. package/dist/src/utils/optimise.d.ts.map +1 -0
  366. package/dist/src/utils/optimise.js +46 -0
  367. package/dist/src/utils/optimise.js.map +1 -0
  368. package/dist/src/utils/ordered-source.d.ts.map +1 -1
  369. package/dist/src/utils/ordered-source.js +14 -5
  370. package/dist/src/utils/ordered-source.js.map +1 -1
  371. package/dist/test/allocation/allocation.examples.d.ts +1900 -1610
  372. package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
  373. package/dist/test/allocation/allocation.examples.js +179 -89
  374. package/dist/test/allocation/allocation.examples.js.map +1 -1
  375. package/dist/test/allocation/optimise.examples.d.ts +109 -0
  376. package/dist/test/allocation/optimise.examples.d.ts.map +1 -0
  377. package/dist/test/allocation/optimise.examples.js +223 -0
  378. package/dist/test/allocation/optimise.examples.js.map +1 -0
  379. package/dist/test/bind/data/data.examples.d.ts +1172 -514
  380. package/dist/test/bind/data/data.examples.d.ts.map +1 -1
  381. package/dist/test/bind/data/data.examples.js +284 -164
  382. package/dist/test/bind/data/data.examples.js.map +1 -1
  383. package/dist/test/bind/record/record.examples.d.ts +457 -428
  384. package/dist/test/bind/record/record.examples.d.ts.map +1 -1
  385. package/dist/test/bind/record/record.examples.js +41 -21
  386. package/dist/test/bind/record/record.examples.js.map +1 -1
  387. package/dist/test/calendar/calendar-records.examples.d.ts +162 -170
  388. package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
  389. package/dist/test/calendar/calendar-records.examples.js +20 -12
  390. package/dist/test/calendar/calendar-records.examples.js.map +1 -1
  391. package/dist/test/calendar/calendar-windows.examples.d.ts +9 -0
  392. package/dist/test/calendar/calendar-windows.examples.d.ts.map +1 -0
  393. package/dist/test/calendar/calendar-windows.examples.js +111 -0
  394. package/dist/test/calendar/calendar-windows.examples.js.map +1 -0
  395. package/dist/test/calendar/calendar.examples.d.ts +1172 -915
  396. package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
  397. package/dist/test/calendar/calendar.examples.js +211 -124
  398. package/dist/test/calendar/calendar.examples.js.map +1 -1
  399. package/dist/test/calendar/optimise.examples.d.ts +132 -0
  400. package/dist/test/calendar/optimise.examples.d.ts.map +1 -0
  401. package/dist/test/calendar/optimise.examples.js +75 -0
  402. package/dist/test/calendar/optimise.examples.js.map +1 -0
  403. package/dist/test/examples-package.d.ts +49 -16
  404. package/dist/test/examples-package.d.ts.map +1 -1
  405. package/dist/test/examples-package.js +138 -49
  406. package/dist/test/examples-package.js.map +1 -1
  407. package/dist/test/flowchart/flowchart.examples.d.ts +3841 -2840
  408. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
  409. package/dist/test/flowchart/flowchart.examples.js +211 -121
  410. package/dist/test/flowchart/flowchart.examples.js.map +1 -1
  411. package/dist/test/plan/optimise.examples.d.ts +207 -0
  412. package/dist/test/plan/optimise.examples.d.ts.map +1 -0
  413. package/dist/test/plan/optimise.examples.js +98 -0
  414. package/dist/test/plan/optimise.examples.js.map +1 -0
  415. package/dist/test/plan/plan-events.examples.d.ts +4055 -3279
  416. package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
  417. package/dist/test/plan/plan-events.examples.js +492 -319
  418. package/dist/test/plan/plan-events.examples.js.map +1 -1
  419. package/dist/test/plan/plan-nested.examples.d.ts +1829 -0
  420. package/dist/test/plan/plan-nested.examples.d.ts.map +1 -0
  421. package/dist/test/plan/plan-nested.examples.js +321 -0
  422. package/dist/test/plan/plan-nested.examples.js.map +1 -0
  423. package/dist/test/plan/plan-records.examples.d.ts +391 -244
  424. package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
  425. package/dist/test/plan/plan-records.examples.js +186 -65
  426. package/dist/test/plan/plan-records.examples.js.map +1 -1
  427. package/dist/test/plan/plan-windows.examples.d.ts +1978 -803
  428. package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
  429. package/dist/test/plan/plan-windows.examples.js +269 -99
  430. package/dist/test/plan/plan-windows.examples.js.map +1 -1
  431. package/dist/test/plan/plan.examples.d.ts +2238 -5726
  432. package/dist/test/plan/plan.examples.d.ts.map +1 -1
  433. package/dist/test/plan/plan.examples.js +846 -973
  434. package/dist/test/plan/plan.examples.js.map +1 -1
  435. package/dist/test/query/query.examples.d.ts +5221 -3005
  436. package/dist/test/query/query.examples.d.ts.map +1 -1
  437. package/dist/test/query/query.examples.js +169 -118
  438. package/dist/test/query/query.examples.js.map +1 -1
  439. package/dist/test/roster/domain.examples.d.ts +804 -0
  440. package/dist/test/roster/domain.examples.d.ts.map +1 -1
  441. package/dist/test/roster/domain.examples.js +3 -3
  442. package/dist/test/roster/domain.examples.js.map +1 -1
  443. package/dist/test/roster/optimise.examples.d.ts +485 -0
  444. package/dist/test/roster/optimise.examples.d.ts.map +1 -0
  445. package/dist/test/roster/optimise.examples.js +155 -0
  446. package/dist/test/roster/optimise.examples.js.map +1 -0
  447. package/dist/test/roster/roster-records.examples.d.ts +364 -404
  448. package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
  449. package/dist/test/roster/roster-records.examples.js +40 -26
  450. package/dist/test/roster/roster-records.examples.js.map +1 -1
  451. package/dist/test/roster/roster.examples.d.ts +5091 -1424
  452. package/dist/test/roster/roster.examples.d.ts.map +1 -1
  453. package/dist/test/roster/roster.examples.js +255 -109
  454. package/dist/test/roster/roster.examples.js.map +1 -1
  455. package/dist/test/roster/warehouse.d.ts +150 -7
  456. package/dist/test/roster/warehouse.d.ts.map +1 -1
  457. package/dist/test/roster/warehouse.js +36 -11
  458. package/dist/test/roster/warehouse.js.map +1 -1
  459. package/dist/test/schedule/schedule.examples.d.ts +2646 -2473
  460. package/dist/test/schedule/schedule.examples.d.ts.map +1 -1
  461. package/dist/test/schedule/schedule.examples.js +144 -88
  462. package/dist/test/schedule/schedule.examples.js.map +1 -1
  463. package/dist/test/schematic/schematic-records.examples.d.ts +454 -0
  464. package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -0
  465. package/dist/test/schematic/schematic-records.examples.js +219 -0
  466. package/dist/test/schematic/schematic-records.examples.js.map +1 -0
  467. package/dist/test/schematic/schematic.examples.d.ts +2640 -0
  468. package/dist/test/schematic/schematic.examples.d.ts.map +1 -0
  469. package/dist/test/schematic/schematic.examples.js +559 -0
  470. package/dist/test/schematic/schematic.examples.js.map +1 -0
  471. package/dist/test/sheet/optimise.examples.d.ts +184 -0
  472. package/dist/test/sheet/optimise.examples.d.ts.map +1 -0
  473. package/dist/test/sheet/optimise.examples.js +79 -0
  474. package/dist/test/sheet/optimise.examples.js.map +1 -0
  475. package/dist/test/sheet/sheet-records.examples.d.ts +208 -356
  476. package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
  477. package/dist/test/sheet/sheet-records.examples.js +66 -29
  478. package/dist/test/sheet/sheet-records.examples.js.map +1 -1
  479. package/dist/test/sheet/sheet.examples.d.ts +3650 -3377
  480. package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
  481. package/dist/test/sheet/sheet.examples.js +406 -296
  482. package/dist/test/sheet/sheet.examples.js.map +1 -1
  483. package/dist/test/studio/component.examples.js +2 -2
  484. package/dist/test/studio/component.examples.js.map +1 -1
  485. package/dist/test/studio/page.examples.js +6 -6
  486. package/dist/test/studio/page.examples.js.map +1 -1
  487. package/dist/test/studio/studio.examples.d.ts +2329 -873
  488. package/dist/test/studio/studio.examples.d.ts.map +1 -1
  489. package/dist/test/studio/studio.examples.js +155 -107
  490. package/dist/test/studio/studio.examples.js.map +1 -1
  491. package/package.json +15 -11
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@elaraai/e3-ui/jsx-runtime";
5
5
  */
6
6
  /** @jsxImportSource @elaraai/e3-ui */
7
7
  import { East, ArrayType, BooleanType, DateTimeType, DictType, FloatType, FunctionType, IntegerType, NullType, OptionType, PatchType, SetType, StringType, StructType, VariantType, example, none, some, variant, } from "@elaraai/east";
8
- import { Badge, Box, Configurator, Field, Format, HStack, Input, Reactive, SegmentGroup, Slice, State, StatusValueType, Style, Switch, Text, UIComponentType, VStack, } from "@elaraai/east-ui";
8
+ import { Badge, Box, Button, Configurator, Field, Format, HStack, Input, Reactive, SegmentGroup, Slice, State, StatusValueType, Style, Switch, Text, UIComponentType, VStack, } from "@elaraai/east-ui";
9
9
  import { Data, Record, Sheet } from "@elaraai/e3-ui";
10
10
  import e3 from "@elaraai/e3";
11
11
  // ============================================================================
@@ -17,8 +17,9 @@ import e3 from "@elaraai/e3";
17
17
  // - `sheetBasic`, the smallest: a record's entries as the rows (§3.1);
18
18
  // - `sheetVariants`, THE configurator: the sheet's options as axes, over the
19
19
  // host's rows (`data`), committed through `onApply`;
20
- // - `sheetStress`, two thousand rows of a record, read only, paged through
21
- // the indexes its rail narrows them by, and views over that narrowing;
20
+ // - `sheetStress`, two thousand rows of a record, read only, the narrowing
21
+ // its rail makes through the record's indexes drawn over them as the lens,
22
+ // and views over that narrowing;
22
23
  // - `sheetLibrary`, a library of the author's own (§4.4);
23
24
  // - `sheetWorkshop`, the flagship — the joinery workshop's orders (§3.3):
24
25
  // groups, the driver and registers, the link grammar, the copilot,
@@ -30,7 +31,8 @@ import e3 from "@elaraai/e3";
30
31
  // narrows;
31
32
  // - `sheetLoose`, loose rows between the groups (#846);
32
33
  // - `sheetPaged`, a record read a window at a time;
33
- // - `sheetUpkeep`, the inspector's every field kind (#1220).
34
+ // - `sheetUpkeep`, the inspector's every field kind (#1220);
35
+ // - `sheetConflicts`, your edits meeting someone else's save, in one window.
34
36
  //
35
37
  // Its panes are optional props, and the examples show each combination:
36
38
  // none (`sheetBasic`, `sheetVariants`, `sheetStress`, `sheetLoose`,
@@ -56,29 +58,37 @@ import e3 from "@elaraai/e3";
56
58
  /** A job — what it is, when it starts and how many. */
57
59
  export const SheetJob = StructType({ task: StringType, start: OptionType(DateTimeType), qty: OptionType(FloatType) });
58
60
  /** The jobs, keyed J-0001, J-0002, …: the record's entries are the sheet's rows. */
59
- export const sheetJobs = e3.record("sheet_jobs", DictType(StringType, SheetJob), new Map([
60
- ["J-0001", { task: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0) }],
61
- ["J-0002", { task: "Edge banding", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0) }],
62
- ["J-0003", { task: "CNC routing", start: none, qty: some(48.0) }],
63
- ["J-0004", { task: "Spray finish", start: none, qty: none }],
64
- ]));
65
- /** The jobs' patch door — every Save commits through it. */
66
- export const sheetJobsPatch = e3.mutation.patch(sheetJobs);
61
+ export const sheetJobs = e3.record("sheet_jobs", DictType(StringType, SheetJob), {
62
+ initial: new Map([
63
+ ["J-0001", { task: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0) }],
64
+ ["J-0002", { task: "Edge banding", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0) }],
65
+ ["J-0003", { task: "CNC routing", start: none, qty: some(48.0) }],
66
+ ["J-0004", { task: "Spray finish", start: none, qty: none }],
67
+ ]),
68
+ mutations: (mutation) => ({
69
+ // The jobs' patch door — every Save commits through it.
70
+ patch: mutation.patch(),
71
+ }),
72
+ });
67
73
  /** The jobs again, as the edge bander's week holds them: a Save over them is refused for a reason the record gives. */
68
- export const sheetBookedJobs = e3.record("sheet_booked_jobs", DictType(StringType, SheetJob), new Map([
69
- ["J-0001", { task: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0) }],
70
- ["J-0002", { task: "Edge banding", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0) }],
71
- ["J-0003", { task: "CNC routing", start: none, qty: some(48.0) }],
72
- ["J-0004", { task: "Spray finish", start: none, qty: none }],
73
- ]));
74
- /** The booked jobs' patch door: it commits a patch unless a job it leaves bands both edges — the edge bander is booked that week. */
75
- export const sheetBookedJobsPatch = e3.mutation.reduce("patch", sheetBookedJobs, East.function([DictType(StringType, SheetJob), PatchType(DictType(StringType, SheetJob))], DictType(StringType, SheetJob), ($, jobs, patch) => {
76
- const next = $.let(East.applyPatch(jobs, patch));
77
- $.for(next, ($2, job) => {
78
- $2.if(job.task.endsWith("both edges"), ($3) => { $3.error("the edge bander is booked that week"); });
79
- });
80
- return next;
81
- }));
74
+ export const sheetBookedJobs = e3.record("sheet_booked_jobs", DictType(StringType, SheetJob), {
75
+ initial: new Map([
76
+ ["J-0001", { task: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0) }],
77
+ ["J-0002", { task: "Edge banding", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0) }],
78
+ ["J-0003", { task: "CNC routing", start: none, qty: some(48.0) }],
79
+ ["J-0004", { task: "Spray finish", start: none, qty: none }],
80
+ ]),
81
+ mutations: (mutation) => ({
82
+ // The booked jobs' patch door: it commits a patch unless a job it leaves bands both edges — the edge bander is booked that week.
83
+ patch: mutation.reduce(East.function([DictType(StringType, SheetJob), PatchType(DictType(StringType, SheetJob))], DictType(StringType, SheetJob), ($, jobs, patch) => {
84
+ const next = $.let(East.applyPatch(jobs, patch));
85
+ $.for(next, ($2, job) => {
86
+ $2.if(job.task.endsWith("both edges"), ($3) => { $3.error("the edge bander is booked that week"); });
87
+ });
88
+ return next;
89
+ })),
90
+ }),
91
+ });
82
92
  /**
83
93
  * The smallest sheet (§3.1) — the jobs an e3 record holds, in its frame: one
84
94
  * row per job in key order and a blank tail for the next, three typed
@@ -89,7 +99,7 @@ export const sheetBasic = example({
89
99
  keywords: ["Sheet", "basic", "BuilderFrame", "record", "Record", "Record.bind", "e3.record", "patch", "commit", "column", "date", "text", "quantity", "key order", "Reactive"],
90
100
  description: "The smallest sheet — an e3 record's entries as its rows, in key order, under three typed columns, edited as drafts and saved as one commit through the record's patch door, in its frame with no pane",
91
101
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
92
- const jobs = $.let(Record.bind(sheetJobs, [sheetJobsPatch]));
102
+ const jobs = $.let(Record.bind(sheetJobs));
93
103
  return (_jsx(Box, { height: "560px", children: _jsx(Sheet, { record: jobs, columns: {
94
104
  task: Sheet.column.text(SheetJob, { header: "Task", width: "240px" }),
95
105
  start: Sheet.column.date(SheetJob, { header: "Start", width: "96px" }),
@@ -106,15 +116,19 @@ export const VariantsJob = StructType({ id: StringType, start: OptionType(DateTi
106
116
  /** A plan — its jobs, in the planner's order. */
107
117
  export const VariantsPlan = StructType({ jobs: ArrayType(VariantsJob) });
108
118
  /** The plans — the configurator's sheet edits the week's jobs. */
109
- export const sheetVariantsPlans = e3.record("sheet_variants_plans", DictType(StringType, VariantsPlan), new Map([
110
- ["week", { jobs: [
111
- { id: "j1", start: some(new Date("2026-02-16T00:00:00Z")), task: "Routing", qty: some(1200.0), notes: "Nest the C-18 panels" },
112
- { id: "j2", start: some(new Date("2026-03-09T00:00:00Z")), task: "Spraying", qty: some(250.0), notes: "" },
113
- { id: "j3", start: none, task: "Wrapping", qty: none, notes: "" },
114
- ] }],
115
- ]));
116
- /** The record's patch door — every Save commits through it. */
117
- export const sheetVariantsPlansPatch = e3.mutation.patch(sheetVariantsPlans);
119
+ export const sheetVariantsPlans = e3.record("sheet_variants_plans", DictType(StringType, VariantsPlan), {
120
+ initial: new Map([
121
+ ["week", { jobs: [
122
+ { id: "j1", start: some(new Date("2026-02-16T00:00:00Z")), task: "Routing", qty: some(1200.0), notes: "Nest the C-18 panels" },
123
+ { id: "j2", start: some(new Date("2026-03-09T00:00:00Z")), task: "Spraying", qty: some(250.0), notes: "" },
124
+ { id: "j3", start: none, task: "Wrapping", qty: none, notes: "" },
125
+ ] }],
126
+ ]),
127
+ mutations: (mutation) => ({
128
+ // The record's patch door — every Save commits through it.
129
+ patch: mutation.patch(),
130
+ }),
131
+ });
118
132
  /**
119
133
  * THE Sheet configurator — ONE live sheet in its frame; every axis is an
120
134
  * expression-fed prop on that single instance: density, the blank tail, read
@@ -132,7 +146,7 @@ export const sheetVariants = example({
132
146
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
133
147
  const Ctx = Sheet.Types.DraftContext(VariantsJob);
134
148
  // The jobs, read from an e3 record bound with its patch door.
135
- const plans = $.let(Record.bind(sheetVariantsPlans, [sheetVariantsPlansPatch]));
149
+ const plans = $.let(Record.bind(sheetVariantsPlans));
136
150
  const rows = $.let(plans.read().get("week").jobs);
137
151
  const onApply = $.const(Record.onApply(plans, {
138
152
  entry: "week",
@@ -226,37 +240,42 @@ export const generateStressJobs = East.function([IntegerType], ArrayType(StressJ
226
240
  }));
227
241
  });
228
242
  /** The jobs, keyed by their id — two thousand made by {@link generateStressJobs}: what the stress sheet pages and its rail narrows (#1345). */
229
- export const sheetStressJobs = e3.record("sheet_stress_jobs", DictType(StringType, StressJob), East.compile(East.function([IntegerType], DictType(StringType, StressJob), ($, count) => {
230
- const generate = $.const(generateStressJobs);
231
- return generate(count).toDict((_$, job) => job.id, (_$, job) => job);
232
- }), [])(2000n));
233
- /** The jobs by activity, by status and by their notes: what the rail narrows them by, each choice one index's runs. */
234
- export const sheetStressByActivity = e3.recordIndex("sheet_stress_by_activity", sheetStressJobs, { on: ["activity"] });
235
- export const sheetStressByStatus = e3.recordIndex("sheet_stress_by_status", sheetStressJobs, { on: ["status"] });
236
- export const sheetStressByNotes = e3.recordIndex("sheet_stress_by_notes", sheetStressJobs, { on: ["notes"] });
243
+ export const sheetStressJobs = e3.record("sheet_stress_jobs", DictType(StringType, StressJob), {
244
+ initial: () => East.compile(East.function([IntegerType], DictType(StringType, StressJob), ($, count) => {
245
+ const generate = $.const(generateStressJobs);
246
+ return generate(count).toDict((_$, job) => job.id, (_$, job) => job);
247
+ }), [])(2000n),
248
+ indexes: (index) => ({
249
+ // The jobs by activity, by status and by their notes: what the rail narrows them by, each choice one index's runs.
250
+ sheet_stress_by_activity: index.on(["activity"]),
251
+ sheet_stress_by_status: index.on(["status"]),
252
+ sheet_stress_by_notes: index.on(["notes"]),
253
+ }),
254
+ });
237
255
  /**
238
256
  * Stress (§3.8) — two thousand jobs of an e3 record, read only, every row
239
- * virtualised, paged a window at a time. The rail is the sheet's
257
+ * virtualised, in the record's order. The rail is the sheet's
240
258
  * `Slice.bindRecords`: its `rows` source narrows the jobs by activity, by
241
259
  * status and by a prefix of their notes, each through the record's own index,
242
- * and the sheet pages what it narrows to. Saved views each keep every
243
- * source's narrowing (`Sheet.Types.RecordView`, its values `.east` literals),
244
- * the first one open, kept per viewer through a `State` bind handle. It is
245
- * given no pane.
260
+ * and the sheet draws the narrowing over the jobs as the lens (#1349), a
261
+ * filtered spreadsheet: only the jobs it keeps, one after another, each at
262
+ * its row number. Saved views each keep every source's narrowing
263
+ * (`Sheet.Types.RecordView`, its values `.east` literals), the first one
264
+ * open, kept per viewer through a `State` bind handle. It is given no pane.
246
265
  */
247
266
  export const sheetStress = example({
248
- keywords: ["Sheet", "stress", "virtualization", "2000", "rows", "performance", "readOnly", "slice", "Slice.bindRecords", "rows", "Data.bindPaged", "recordIndex", "record", "search", "filter", "views", "RecordView", "State.bind", "activeView", "set", "register", "concat", "footer", "paged", "Reactive", "State"],
249
- description: "Two thousand jobs of an e3 record, read only and virtualised in the sheet's frame, paged in the order of the rail's narrowing — by activity, by status and by a prefix of their notes, each through the record's index — with saved views kept per viewer, each every source's narrowing",
267
+ keywords: ["Sheet", "stress", "virtualization", "2000", "rows", "performance", "readOnly", "slice", "Slice.bindRecords", "rows", "Data.bindPaged", "indexes", "record", "search", "filter", "lens", "views", "RecordView", "State.bind", "activeView", "set", "register", "concat", "footer", "paged", "Reactive", "State"],
268
+ description: "Two thousand jobs of an e3 record, read only and virtualised in the sheet's frame, in the record's order, the rail's narrowing — by activity, by status and by a prefix of their notes, each through the record's index — drawn over them as the lens, a filtered spreadsheet showing only the jobs it keeps, with saved views kept per viewer, each every source's narrowing",
250
269
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
251
270
  const MachineType = StructType({ code: StringType, family: StringType });
252
271
  const machines = $.const([
253
272
  { code: "R2140", family: "CNC router" }, { code: "R2141", family: "CNC router" }, { code: "R2145", family: "CNC router" },
254
273
  { code: "P3210", family: "4-side planer" }, { code: "A7301", family: "assembly bench" },
255
274
  ], ArrayType(MachineType));
256
- // One rail over the jobs: the sheet's rows are what its `rows` source narrows them to, through the record's indexes.
275
+ // One rail over the jobs: the sheet's rows are the record's, its `rows` source's narrowing drawn over them as the lens.
257
276
  const slice = $.let(Slice.bindRecords("sheet_stress", {
258
277
  rows: {
259
- source: Data.bindPaged(sheetStressJobs, { indexes: [sheetStressByActivity, sheetStressByStatus, sheetStressByNotes] }),
278
+ source: Data.bindPaged(sheetStressJobs, { indexes: ["sheet_stress_by_activity", "sheet_stress_by_status", "sheet_stress_by_notes"] }),
260
279
  fields: {
261
280
  activity: { label: "Activity", hints: ["Routing", "Spraying", "Wrapping", "Set-up", "Maintenance"] },
262
281
  status: { label: "Status", hints: ["PLANNED", "RELEASED", "COMPLETE"] },
@@ -267,11 +286,11 @@ export const sheetStress = example({
267
286
  }));
268
287
  // Each view keeps every source's narrowing, by name: an activity's value is its `.east` literal, a search its prefix.
269
288
  const views = $.let(State.bind([ArrayType(Sheet.Types.RecordView)], "sheet_stress_views", [
270
- { id: "spraying", name: "SPRAYING", context: 1n, reveals: [], folds: new Map(),
289
+ { id: "spraying", name: "SPRAYING", folds: new Map(),
271
290
  narrowing: new Map([["rows", { where: new Map([["activity", variant("values", ["\"Spraying\""])]]), preset: none, resolution: none }]]) },
272
- { id: "routers", name: "ROUTERS", context: 0n, reveals: [], folds: new Map(),
291
+ { id: "routers", name: "ROUTERS", folds: new Map(),
273
292
  narrowing: new Map([["rows", { where: new Map([["activity", variant("values", ["\"Routing\""])]]), preset: none, resolution: none }]]) },
274
- { id: "urgent", name: "URGENT", context: 0n, reveals: [], folds: new Map(),
293
+ { id: "urgent", name: "URGENT", folds: new Map(),
275
294
  narrowing: new Map([["rows", { where: new Map([["notes", variant("prefix", "urgent")]]), preset: none, resolution: none }]]) },
276
295
  ]));
277
296
  return (_jsx(Box, { height: "480px", children: _jsx(Sheet, { slice: { slice }, name: "stress", registers: {
@@ -306,7 +325,7 @@ export const sheetLibrary = example({
306
325
  keywords: ["Sheet", "BuilderFrame", "pane", "library", "Sheet.library", "Sheet.library.tab", "Sheet.library.columns", "tab", "cards", "drop", "Sheet.patch", "group"],
307
326
  description: "A sheet whose library pane lists a tab of the author's own — the tasks a job takes, grouped by stage, a card dropped on a job setting its task — beside the columns",
308
327
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
309
- const jobs = $.let(Record.bind(sheetJobs, [sheetJobsPatch]));
328
+ const jobs = $.let(Record.bind(sheetJobs));
310
329
  const tasks = $.let([
311
330
  { name: "Panel cutting", stage: "Cutting" },
312
331
  { name: "Edge banding", stage: "Cutting" },
@@ -372,134 +391,150 @@ export const sheetWorkshopActivities = e3.input("sheet_workshop_activities", Arr
372
391
  { name: "Delivery", uom: "loads", days: 1n, rate: 1.0, family: "", sides: variant("from", null) },
373
392
  ]));
374
393
  /** The machines, keyed by code — the work centres' register. */
375
- export const sheetWorkshopMachines = e3.record("sheet_workshop_machines", DictType(StringType, WorkshopMachine), new Map([
376
- ["S101", { family: "beam saw", bay: "Bay 1" }],
377
- ["S102", { family: "beam saw", bay: "Bay 1" }],
378
- ["S103", { family: "beam saw", bay: "Bay 1" }],
379
- ["E201", { family: "edge bander", bay: "Bay 2" }],
380
- ["E202", { family: "edge bander", bay: "Bay 2" }],
381
- ["R301", { family: "CNC router", bay: "Bay 3" }],
382
- ["R302", { family: "CNC router", bay: "Bay 3" }],
383
- ["R303", { family: "CNC router", bay: "Bay 3" }],
384
- ["F401", { family: "spray booth", bay: "Bay 4" }],
385
- ["F402", { family: "spray booth", bay: "Bay 4" }],
386
- ["A701", { family: "assembly bench", bay: "Bay 7" }],
387
- ["A702", { family: "assembly bench", bay: "Bay 7" }],
388
- ]));
394
+ export const sheetWorkshopMachines = e3.record("sheet_workshop_machines", DictType(StringType, WorkshopMachine), {
395
+ initial: new Map([
396
+ ["S101", { family: "beam saw", bay: "Bay 1" }],
397
+ ["S102", { family: "beam saw", bay: "Bay 1" }],
398
+ ["S103", { family: "beam saw", bay: "Bay 1" }],
399
+ ["E201", { family: "edge bander", bay: "Bay 2" }],
400
+ ["E202", { family: "edge bander", bay: "Bay 2" }],
401
+ ["R301", { family: "CNC router", bay: "Bay 3" }],
402
+ ["R302", { family: "CNC router", bay: "Bay 3" }],
403
+ ["R303", { family: "CNC router", bay: "Bay 3" }],
404
+ ["F401", { family: "spray booth", bay: "Bay 4" }],
405
+ ["F402", { family: "spray booth", bay: "Bay 4" }],
406
+ ["A701", { family: "assembly bench", bay: "Bay 7" }],
407
+ ["A702", { family: "assembly bench", bay: "Bay 7" }],
408
+ ]),
409
+ });
389
410
  /** The orders, keyed by order number: each a group, its operations its lines. */
390
- export const sheetWorkshopOrders = e3.record("sheet_workshop_orders", DictType(StringType, WorkshopOrder), new Map([
391
- ["WO-2201", { name: "WO-2201 · Kitchen, oak", customer: "Quillfeather Interiors", due: some(new Date("2026-10-23T00:00:00Z")), status: "RELEASED", ops: [
392
- { activity: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), end: some(new Date("2026-10-13T00:00:00Z")), qty: some(48.0),
393
- machines: { from: [variant("identified", { key: "S101" })], to: [variant("identified", { key: "E201" })] }, notes: "Oak veneered board", created_by: "planner" },
394
- { activity: "Edge banding", start: some(new Date("2026-10-14T00:00:00Z")), end: some(new Date("2026-10-15T00:00:00Z")), qty: some(120.0),
395
- machines: { from: [variant("identified", { key: "E201" })], to: [variant("identified", { key: "R301" })] }, notes: "", created_by: "planner" },
396
- { activity: "CNC routing", start: some(new Date("2026-10-15T00:00:00Z")), end: some(new Date("2026-10-17T00:00:00Z")), qty: some(48.0),
397
- machines: { from: [variant("identified", { key: "R301" })], to: [variant("identified", { key: "A701" })] }, notes: "Hinge cups and handle slots", created_by: "planner" },
398
- { activity: "Assembly", start: none, end: none, qty: some(12.0),
399
- machines: { from: [], to: [variant("identified", { key: "A701" })] }, notes: "Twelve carcasses", created_by: "planner" },
400
- { activity: "Spray finish", start: none, end: none, qty: some(24.0),
401
- machines: { from: [], to: [variant("identified", { key: "F401" })] }, notes: "Matt lacquer", created_by: "planner" },
402
- ] }],
403
- ["WO-2202", { name: "WO-2202 · Wardrobes, ash", customer: "Marrowby Lettings", due: some(new Date("2026-10-30T00:00:00Z")), status: "PLANNED", ops: [
404
- { activity: "Panel cutting", start: some(new Date("2026-10-13T00:00:00Z")), end: some(new Date("2026-10-14T00:00:00Z")), qty: some(36.0),
405
- machines: { from: [variant("identified", { key: "S102" })], to: [variant("identified", { key: "E202" })] }, notes: "", created_by: "planner" },
406
- { activity: "Edge banding", start: none, end: none, qty: some(90.0),
407
- machines: { from: [variant("identified", { key: "E202" })], to: [] }, notes: "", created_by: "planner" },
408
- { activity: "Drilling", start: none, end: none, qty: some(36.0),
409
- machines: { from: [], to: [variant("identified", { key: "R302" })] }, notes: "Hinge and shelf pins", created_by: "planner" },
410
- { activity: "Assembly", start: none, end: none, qty: some(6.0),
411
- machines: { from: [], to: [variant("identified", { key: "A702" })] }, notes: "", created_by: "planner" },
412
- ] }],
413
- ["WO-2203", { name: "WO-2203 · Vanity unit, walnut", customer: "Tallowmere Homes", due: some(new Date("2026-11-02T00:00:00Z")), status: "PLANNED", ops: [
414
- { activity: "Panel cutting", start: none, end: none, qty: some(12.0),
415
- machines: { from: [], to: [variant("identified", { key: "S101" })] }, notes: "", created_by: "planner" },
416
- { activity: "CNC routing", start: none, end: none, qty: some(12.0),
417
- machines: { from: [], to: [variant("counted", { n: 1n, key: "CNC router" })] }, notes: "Basin cut-out", created_by: "planner" },
418
- { activity: "Spray finish", start: none, end: none, qty: some(4.0),
419
- machines: { from: [], to: [variant("identified", { key: "F402" })] }, notes: "", created_by: "planner" },
420
- { activity: "Assembly", start: none, end: none, qty: some(2.0),
421
- machines: { from: [], to: [] }, notes: "", created_by: "planner" },
422
- ] }],
423
- ["WO-2204", { name: "WO-2204 · Shelving, birch", customer: "Pebblecombe School", due: some(new Date("2026-10-20T00:00:00Z")), status: "ON HOLD", ops: [
424
- { activity: "Panel cutting", start: none, end: none, qty: some(60.0),
425
- machines: { from: [], to: [variant("counted", { n: 2n, key: "beam saw" })] }, notes: "Awaiting board delivery", created_by: "planner" },
426
- { activity: "Edge banding", start: none, end: none, qty: some(150.0),
427
- machines: { from: [], to: [] }, notes: "", created_by: "planner" },
428
- { activity: "Sanding", start: none, end: none, qty: some(60.0),
429
- machines: { from: [], to: [] }, notes: "", created_by: "planner" },
430
- ] }],
431
- ["WO-2205", { name: "WO-2205 · Office fit-out, maple", customer: "", due: none, status: "PLANNED", ops: [
432
- { activity: "Panel cutting", start: none, end: none, qty: some(80.0),
433
- machines: { from: [], to: [] }, notes: "", created_by: "planner" },
434
- { activity: "CNC routing", start: none, end: none, qty: some(40.0),
435
- machines: { from: [], to: [] }, notes: "Cable ports", created_by: "planner" },
436
- { activity: "Assembly", start: none, end: none, qty: some(10.0),
437
- machines: { from: [], to: [] }, notes: "", created_by: "planner" },
438
- { activity: "Wrapping", start: none, end: none, qty: some(10.0),
439
- machines: { from: [], to: [] }, notes: "", created_by: "planner" },
440
- { activity: "Delivery", start: none, end: none, qty: some(2.0),
441
- machines: { from: [], to: [] }, notes: "", created_by: "planner" },
442
- ] }],
443
- ["WO-2206", { name: "WO-2206 · Kitchen, painted", customer: "Orrisdale Cottages", due: some(new Date("2026-11-06T00:00:00Z")), status: "PLANNED", ops: [
444
- { activity: "Panel cutting", start: none, end: none, qty: some(30.0),
445
- machines: { from: [], to: [variant("identified", { key: "S103" })] }, notes: "", created_by: "planner" },
446
- { activity: "Edge banding", start: none, end: none, qty: some(70.0),
447
- machines: { from: [], to: [variant("counted", { n: 1n, key: "edge bander" })] }, notes: "", created_by: "planner" },
448
- { activity: "Spray finish", start: none, end: none, qty: some(18.0),
449
- machines: { from: [], to: [variant("identified", { key: "F401" })] }, notes: "Primer, then two coats", created_by: "planner" },
450
- { activity: "Assembly", start: none, end: none, qty: some(8.0),
451
- machines: { from: [], to: [] }, notes: "", created_by: "planner" },
452
- { activity: "Wrapping", start: none, end: none, qty: some(8.0),
453
- machines: { from: [], to: [] }, notes: "", created_by: "planner" },
454
- { activity: "Delivery", start: none, end: none, qty: some(1.0),
455
- machines: { from: [], to: [] }, notes: "", created_by: "planner" },
456
- ] }],
457
- ]));
458
- /** The orders' patch door — every Save commits through it. */
459
- export const sheetWorkshopOrdersPatch = e3.mutation.patch(sheetWorkshopOrders);
460
- /** The orders by status and by customer: what the rail narrows them by, each choice one index's runs. */
461
- export const sheetWorkshopOrdersByStatus = e3.recordIndex("sheet_workshop_orders_by_status", sheetWorkshopOrders, { on: ["status"] });
462
- export const sheetWorkshopOrdersByCustomer = e3.recordIndex("sheet_workshop_orders_by_customer", sheetWorkshopOrders, { on: ["customer"] });
411
+ export const sheetWorkshopOrders = e3.record("sheet_workshop_orders", DictType(StringType, WorkshopOrder), {
412
+ initial: new Map([
413
+ ["WO-2201", { name: "WO-2201 · Kitchen, oak", customer: "Quillfeather Interiors", due: some(new Date("2026-10-23T00:00:00Z")), status: "RELEASED", ops: [
414
+ { activity: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), end: some(new Date("2026-10-13T00:00:00Z")), qty: some(48.0),
415
+ machines: { from: [variant("identified", { key: "S101" })], to: [variant("identified", { key: "E201" })] }, notes: "Oak veneered board", created_by: "planner" },
416
+ { activity: "Edge banding", start: some(new Date("2026-10-14T00:00:00Z")), end: some(new Date("2026-10-15T00:00:00Z")), qty: some(120.0),
417
+ machines: { from: [variant("identified", { key: "E201" })], to: [variant("identified", { key: "R301" })] }, notes: "", created_by: "planner" },
418
+ { activity: "CNC routing", start: some(new Date("2026-10-15T00:00:00Z")), end: some(new Date("2026-10-17T00:00:00Z")), qty: some(48.0),
419
+ machines: { from: [variant("identified", { key: "R301" })], to: [variant("identified", { key: "A701" })] }, notes: "Hinge cups and handle slots", created_by: "planner" },
420
+ { activity: "Assembly", start: none, end: none, qty: some(12.0),
421
+ machines: { from: [], to: [variant("identified", { key: "A701" })] }, notes: "Twelve carcasses", created_by: "planner" },
422
+ { activity: "Spray finish", start: none, end: none, qty: some(24.0),
423
+ machines: { from: [], to: [variant("identified", { key: "F401" })] }, notes: "Matt lacquer", created_by: "planner" },
424
+ ] }],
425
+ ["WO-2202", { name: "WO-2202 · Wardrobes, ash", customer: "Marrowby Lettings", due: some(new Date("2026-10-30T00:00:00Z")), status: "PLANNED", ops: [
426
+ { activity: "Panel cutting", start: some(new Date("2026-10-13T00:00:00Z")), end: some(new Date("2026-10-14T00:00:00Z")), qty: some(36.0),
427
+ machines: { from: [variant("identified", { key: "S102" })], to: [variant("identified", { key: "E202" })] }, notes: "", created_by: "planner" },
428
+ { activity: "Edge banding", start: none, end: none, qty: some(90.0),
429
+ machines: { from: [variant("identified", { key: "E202" })], to: [] }, notes: "", created_by: "planner" },
430
+ { activity: "Drilling", start: none, end: none, qty: some(36.0),
431
+ machines: { from: [], to: [variant("identified", { key: "R302" })] }, notes: "Hinge and shelf pins", created_by: "planner" },
432
+ { activity: "Assembly", start: none, end: none, qty: some(6.0),
433
+ machines: { from: [], to: [variant("identified", { key: "A702" })] }, notes: "", created_by: "planner" },
434
+ ] }],
435
+ ["WO-2203", { name: "WO-2203 · Vanity unit, walnut", customer: "Tallowmere Homes", due: some(new Date("2026-11-02T00:00:00Z")), status: "PLANNED", ops: [
436
+ { activity: "Panel cutting", start: none, end: none, qty: some(12.0),
437
+ machines: { from: [], to: [variant("identified", { key: "S101" })] }, notes: "", created_by: "planner" },
438
+ { activity: "CNC routing", start: none, end: none, qty: some(12.0),
439
+ machines: { from: [], to: [variant("counted", { n: 1n, key: "CNC router" })] }, notes: "Basin cut-out", created_by: "planner" },
440
+ { activity: "Spray finish", start: none, end: none, qty: some(4.0),
441
+ machines: { from: [], to: [variant("identified", { key: "F402" })] }, notes: "", created_by: "planner" },
442
+ { activity: "Assembly", start: none, end: none, qty: some(2.0),
443
+ machines: { from: [], to: [] }, notes: "", created_by: "planner" },
444
+ ] }],
445
+ ["WO-2204", { name: "WO-2204 · Shelving, birch", customer: "Pebblecombe School", due: some(new Date("2026-10-20T00:00:00Z")), status: "ON HOLD", ops: [
446
+ { activity: "Panel cutting", start: none, end: none, qty: some(60.0),
447
+ machines: { from: [], to: [variant("counted", { n: 2n, key: "beam saw" })] }, notes: "Awaiting board delivery", created_by: "planner" },
448
+ { activity: "Edge banding", start: none, end: none, qty: some(150.0),
449
+ machines: { from: [], to: [] }, notes: "", created_by: "planner" },
450
+ { activity: "Sanding", start: none, end: none, qty: some(60.0),
451
+ machines: { from: [], to: [] }, notes: "", created_by: "planner" },
452
+ ] }],
453
+ ["WO-2205", { name: "WO-2205 · Office fit-out, maple", customer: "", due: none, status: "PLANNED", ops: [
454
+ { activity: "Panel cutting", start: none, end: none, qty: some(80.0),
455
+ machines: { from: [], to: [] }, notes: "", created_by: "planner" },
456
+ { activity: "CNC routing", start: none, end: none, qty: some(40.0),
457
+ machines: { from: [], to: [] }, notes: "Cable ports", created_by: "planner" },
458
+ { activity: "Assembly", start: none, end: none, qty: some(10.0),
459
+ machines: { from: [], to: [] }, notes: "", created_by: "planner" },
460
+ { activity: "Wrapping", start: none, end: none, qty: some(10.0),
461
+ machines: { from: [], to: [] }, notes: "", created_by: "planner" },
462
+ { activity: "Delivery", start: none, end: none, qty: some(2.0),
463
+ machines: { from: [], to: [] }, notes: "", created_by: "planner" },
464
+ ] }],
465
+ ["WO-2206", { name: "WO-2206 · Kitchen, painted", customer: "Orrisdale Cottages", due: some(new Date("2026-11-06T00:00:00Z")), status: "PLANNED", ops: [
466
+ { activity: "Panel cutting", start: none, end: none, qty: some(30.0),
467
+ machines: { from: [], to: [variant("identified", { key: "S103" })] }, notes: "", created_by: "planner" },
468
+ { activity: "Edge banding", start: none, end: none, qty: some(70.0),
469
+ machines: { from: [], to: [variant("counted", { n: 1n, key: "edge bander" })] }, notes: "", created_by: "planner" },
470
+ { activity: "Spray finish", start: none, end: none, qty: some(18.0),
471
+ machines: { from: [], to: [variant("identified", { key: "F401" })] }, notes: "Primer, then two coats", created_by: "planner" },
472
+ { activity: "Assembly", start: none, end: none, qty: some(8.0),
473
+ machines: { from: [], to: [] }, notes: "", created_by: "planner" },
474
+ { activity: "Wrapping", start: none, end: none, qty: some(8.0),
475
+ machines: { from: [], to: [] }, notes: "", created_by: "planner" },
476
+ { activity: "Delivery", start: none, end: none, qty: some(1.0),
477
+ machines: { from: [], to: [] }, notes: "", created_by: "planner" },
478
+ ] }],
479
+ ]),
480
+ indexes: (index) => ({
481
+ // The orders by status and by customer: what the rail narrows them by, each choice one index's runs.
482
+ sheet_workshop_orders_by_status: index.on(["status"]),
483
+ sheet_workshop_orders_by_customer: index.on(["customer"]),
484
+ }),
485
+ mutations: (mutation) => ({
486
+ // The orders' patch door — every Save commits through it.
487
+ patch: mutation.patch(),
488
+ }),
489
+ });
463
490
  /** An operation template — the Rows tab's card, the group it sits under, and the activity and work centres it drops. */
464
491
  export const WorkshopOperationTemplate = StructType({ name: StringType, group: StringType, activity: StringType, machines: Sheet.Types.Link });
465
492
  /** The operation templates, keyed by their key: a record of their own, the rail's `rowTemplates` source (#1345). */
466
- export const sheetWorkshopOperationTemplates = e3.record("sheet_workshop_operation_templates", DictType(StringType, WorkshopOperationTemplate), new Map([
467
- ["assemble", { name: "Assembly", group: "Operations", activity: "Assembly", machines: { from: [], to: [] } }],
468
- ["cut", { name: "Panel cutting", group: "Operations", activity: "Panel cutting", machines: { from: [], to: [variant("counted", { n: 1n, key: "beam saw" })] } }],
469
- ["deliver", { name: "Delivery", group: "Dispatch", activity: "Delivery", machines: { from: [], to: [] } }],
470
- ["edge", { name: "Edge banding", group: "Operations", activity: "Edge banding", machines: { from: [], to: [variant("counted", { n: 1n, key: "edge bander" })] } }],
471
- ["route", { name: "CNC routing", group: "Operations", activity: "CNC routing", machines: { from: [], to: [variant("counted", { n: 1n, key: "CNC router" })] } }],
472
- ["sand", { name: "Sanding", group: "Operations", activity: "Sanding", machines: { from: [], to: [] } }],
473
- ["spray", { name: "Spray finish", group: "Operations", activity: "Spray finish", machines: { from: [], to: [variant("counted", { n: 1n, key: "spray booth" })] } }],
474
- ["wrap", { name: "Wrapping", group: "Dispatch", activity: "Wrapping", machines: { from: [], to: [] } }],
475
- ]));
476
- /** The operation templates by their group: what the rail narrows them by. */
477
- export const sheetWorkshopOperationTemplatesByGroup = e3.recordIndex("sheet_workshop_operation_templates_by_group", sheetWorkshopOperationTemplates, { on: ["group"] });
493
+ export const sheetWorkshopOperationTemplates = e3.record("sheet_workshop_operation_templates", DictType(StringType, WorkshopOperationTemplate), {
494
+ initial: new Map([
495
+ ["assemble", { name: "Assembly", group: "Operations", activity: "Assembly", machines: { from: [], to: [] } }],
496
+ ["cut", { name: "Panel cutting", group: "Operations", activity: "Panel cutting", machines: { from: [], to: [variant("counted", { n: 1n, key: "beam saw" })] } }],
497
+ ["deliver", { name: "Delivery", group: "Dispatch", activity: "Delivery", machines: { from: [], to: [] } }],
498
+ ["edge", { name: "Edge banding", group: "Operations", activity: "Edge banding", machines: { from: [], to: [variant("counted", { n: 1n, key: "edge bander" })] } }],
499
+ ["route", { name: "CNC routing", group: "Operations", activity: "CNC routing", machines: { from: [], to: [variant("counted", { n: 1n, key: "CNC router" })] } }],
500
+ ["sand", { name: "Sanding", group: "Operations", activity: "Sanding", machines: { from: [], to: [] } }],
501
+ ["spray", { name: "Spray finish", group: "Operations", activity: "Spray finish", machines: { from: [], to: [variant("counted", { n: 1n, key: "spray booth" })] } }],
502
+ ["wrap", { name: "Wrapping", group: "Dispatch", activity: "Wrapping", machines: { from: [], to: [] } }],
503
+ ]),
504
+ indexes: (index) => ({
505
+ // The operation templates by their group: what the rail narrows them by.
506
+ sheet_workshop_operation_templates_by_group: index.on(["group"]),
507
+ }),
508
+ });
478
509
  /** An order template — the Rows tab's card, the group it sits under, and the operations each kind of order starts with. */
479
510
  export const WorkshopOrderTemplate = StructType({ name: StringType, group: StringType, ops: ArrayType(WorkshopOperation) });
480
511
  /** The order templates, keyed by their key: a record of their own, the rail's `groupTemplates` source (#1345). */
481
- export const sheetWorkshopOrderTemplates = e3.record("sheet_workshop_order_templates", DictType(StringType, WorkshopOrderTemplate), new Map([
482
- ["kitchen", { name: "Kitchen order", group: "Orders", ops: [
483
- { activity: "Panel cutting", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
484
- { activity: "Edge banding", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
485
- { activity: "Assembly", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
486
- { activity: "Spray finish", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
487
- ] }],
488
- ["vanity", { name: "Vanity unit", group: "Orders", ops: [
489
- { activity: "Panel cutting", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
490
- { activity: "CNC routing", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
491
- { activity: "Spray finish", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
492
- { activity: "Assembly", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
493
- ] }],
494
- ["wardrobe", { name: "Wardrobe order", group: "Orders", ops: [
495
- { activity: "Panel cutting", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
496
- { activity: "Edge banding", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
497
- { activity: "Drilling", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
498
- { activity: "Assembly", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
499
- ] }],
500
- ]));
501
- /** The order templates by their group: what the rail narrows them by. */
502
- export const sheetWorkshopOrderTemplatesByGroup = e3.recordIndex("sheet_workshop_order_templates_by_group", sheetWorkshopOrderTemplates, { on: ["group"] });
512
+ export const sheetWorkshopOrderTemplates = e3.record("sheet_workshop_order_templates", DictType(StringType, WorkshopOrderTemplate), {
513
+ initial: new Map([
514
+ ["kitchen", { name: "Kitchen order", group: "Orders", ops: [
515
+ { activity: "Panel cutting", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
516
+ { activity: "Edge banding", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
517
+ { activity: "Assembly", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
518
+ { activity: "Spray finish", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
519
+ ] }],
520
+ ["vanity", { name: "Vanity unit", group: "Orders", ops: [
521
+ { activity: "Panel cutting", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
522
+ { activity: "CNC routing", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
523
+ { activity: "Spray finish", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
524
+ { activity: "Assembly", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
525
+ ] }],
526
+ ["wardrobe", { name: "Wardrobe order", group: "Orders", ops: [
527
+ { activity: "Panel cutting", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
528
+ { activity: "Edge banding", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
529
+ { activity: "Drilling", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
530
+ { activity: "Assembly", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
531
+ ] }],
532
+ ]),
533
+ indexes: (index) => ({
534
+ // The order templates by their group: what the rail narrows them by.
535
+ sheet_workshop_order_templates_by_group: index.on(["group"]),
536
+ }),
537
+ });
503
538
  /** The model behind the workshop's async proposer — an e3 function, a service, a notebook; the sheet needs only its types. */
504
539
  const workshopRecommend = East.asyncPlatform("sheet_workshop_recommend", [Sheet.Types.DraftContext(WorkshopOrder, "ops", WorkshopActivity)], ArrayType(Sheet.Types.Proposal(WorkshopOperation)), { optional: true });
505
540
  /**
@@ -517,7 +552,8 @@ const workshopRecommend = East.asyncPlatform("sheet_workshop_recommend", [Sheet.
517
552
  * learned from the order, and an async model. A check on each order, and a
518
553
  * footer counting every operation. One rail, its `Slice.bindRecords` over
519
554
  * three records (#1345): the orders, by status and customer — the sheet's
520
- * rows, paged from it, Save committing through the record's patch door — and
555
+ * rows, the record's own, its narrowing drawn over them as the lens (#1349),
556
+ * Save committing through the record's patch door — and
521
557
  * the operation and order templates, each a record of its own, by their
522
558
  * group; views kept per viewer hold every source's narrowing. Both panes: the
523
559
  * library lists the templates the rail shows, the statuses — a card dropped
@@ -526,15 +562,15 @@ const workshopRecommend = East.asyncPlatform("sheet_workshop_recommend", [Sheet.
526
562
  * and the order with no customer is the batch's issue.
527
563
  */
528
564
  export const sheetWorkshop = example({
529
- keywords: ["Sheet", "BuilderFrame", "record", "Record", "Record.onApply", "group", "driver", "register", "members", "concat", "aliases", "meta", "parent", "Dict", "fold", "duplicate", "link", "multiple", "sides", "locks", "arity", "check", "exists", "uom", "Format", "templates", "Sheet.templates", "library", "Sheet.library", "Sheet.library.tab", "drop", "inspector", "fields", "Sheet.field", "readonly", "views", "RecordView", "slice", "Slice.bindRecords", "Data.bindPaged", "recordIndex", "search", "filter", "copilot", "fill", "provider", "derive", "history", "sequence", "default", "phrase", "capacity", "propose", "proposer", "suggest", "learned", "follower", "asyncFunction", "asyncPlatform", "ready", "newGroup", "newRow", "footer", "joinery"],
565
+ keywords: ["Sheet", "BuilderFrame", "record", "Record", "Record.onApply", "group", "driver", "register", "members", "concat", "aliases", "meta", "parent", "Dict", "fold", "duplicate", "link", "multiple", "sides", "locks", "arity", "check", "exists", "uom", "Format", "templates", "Sheet.templates", "library", "Sheet.library", "Sheet.library.tab", "drop", "inspector", "fields", "Sheet.field", "readonly", "views", "RecordView", "slice", "Slice.bindRecords", "Data.bindPaged", "indexes", "search", "filter", "copilot", "fill", "provider", "derive", "history", "sequence", "default", "phrase", "capacity", "propose", "proposer", "suggest", "learned", "follower", "asyncFunction", "asyncPlatform", "ready", "newGroup", "newRow", "footer", "joinery"],
530
566
  description: "The flagship sheet — the workshop's orders as groups and their operations as lines; an activity driver giving units, durations and live halves; one work-centre register joined from a machines record (Dict), the bays (aliases) and the families (folded), its link grammar counting, locking, implying and checking machines; the copilot's fills (derive, history, sequence, default, phrase, capacity) and proposers (a pattern, a learned follower, an async model); an order check; one rail over the orders and the operation and order templates records, each its own source; a library of the templates, the statuses (dropped on an order to set its status) and the columns; an inspector pane showing every field; views kept per viewer; and a footer",
531
567
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
532
- const orders = $.let(Record.bind(sheetWorkshopOrders, [sheetWorkshopOrdersPatch]));
568
+ const orders = $.let(Record.bind(sheetWorkshopOrders));
533
569
  const machines = $.let(Record.bind(sheetWorkshopMachines, []));
534
570
  const activities = $.let(Data.bind(sheetWorkshopActivities));
535
571
  const operationTemplates = $.let(Data.bind(sheetWorkshopOperationTemplates));
536
572
  const orderTemplates = $.let(Data.bind(sheetWorkshopOrderTemplates));
537
- // The orders read whole, for the footer's count: the sheet pages its rows from the rail's `rows` source,
573
+ // The orders read whole, for the footer's count: the sheet reads its rows through the rail's `rows` source,
538
574
  // so `orders` is the patch door its Save commits through, never read whole.
539
575
  const allOrders = $.let(Data.bind(sheetWorkshopOrders));
540
576
  const views = $.let(State.bind([ArrayType(Sheet.Types.RecordView)], "sheet.workshop.views", []));
@@ -556,18 +592,18 @@ export const sheetWorkshop = example({
556
592
  // One rail over three records: the orders — the sheet's rows — and each templates record, its own source.
557
593
  const slice = $.let(Slice.bindRecords("sheet.workshop", {
558
594
  rows: {
559
- source: Data.bindPaged(sheetWorkshopOrders, { indexes: [sheetWorkshopOrdersByStatus, sheetWorkshopOrdersByCustomer] }),
595
+ source: Data.bindPaged(sheetWorkshopOrders, { indexes: ["sheet_workshop_orders_by_status", "sheet_workshop_orders_by_customer"] }),
560
596
  label: "Orders",
561
597
  fields: { status: { label: "Status", hints: ["PLANNED", "RELEASED", "ON HOLD"] }, customer: { label: "Customer" } },
562
598
  search: ["customer"],
563
599
  },
564
600
  rowTemplates: {
565
- source: Data.bindPaged(sheetWorkshopOperationTemplates, { indexes: [sheetWorkshopOperationTemplatesByGroup] }),
601
+ source: Data.bindPaged(sheetWorkshopOperationTemplates, { indexes: ["sheet_workshop_operation_templates_by_group"] }),
566
602
  label: "Operation templates",
567
603
  fields: { group: { label: "Group", hints: ["Operations", "Dispatch"] } },
568
604
  },
569
605
  groupTemplates: {
570
- source: Data.bindPaged(sheetWorkshopOrderTemplates, { indexes: [sheetWorkshopOrderTemplatesByGroup] }),
606
+ source: Data.bindPaged(sheetWorkshopOrderTemplates, { indexes: ["sheet_workshop_order_templates_by_group"] }),
571
607
  label: "Order templates",
572
608
  fields: { group: { label: "Group", hints: ["Orders"] } },
573
609
  },
@@ -821,29 +857,33 @@ export const WeekRow = StructType({
821
857
  /** One week's plan — when it starts, and its rows in the planner's order. */
822
858
  export const WeekPlan = StructType({ starts: DateTimeType, rows: ArrayType(WeekRow) });
823
859
  /** The plans, one per week, keyed 2026-W42, 2026-W43, … */
824
- export const sheetWeekPlans = e3.record("sheet_week_plans", DictType(StringType, WeekPlan), new Map([
825
- ["2026-W42", { starts: new Date("2026-10-12T00:00:00Z"), rows: [
826
- { id: "w42-1", task: "Cut the kitchen carcasses", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0), setups: some(2n), site: "Machine shop",
827
- status: "PLANNED", code: "", level: variant("day", null), started: none,
828
- machines: { from: [], to: [variant("range", { from: "S101", to: "S103" })] } },
829
- { id: "w42-2", task: "Band the carcass edges", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0), setups: some(1n), site: "Machine shop",
830
- status: "RELEASED", code: "WO-2201", level: variant("day", null), started: some(new Date("2026-10-13T07:30:00Z")),
831
- machines: { from: [], to: [variant("identified", { key: "E201" })] } },
832
- { id: "w42-3", task: "Route the door panels", start: none, qty: some(24.0), setups: none, site: "Bench room",
833
- status: "PLANNED", code: "", level: variant("week", null), started: none,
834
- machines: { from: [], to: [] } },
835
- ] }],
836
- ["2026-W43", { starts: new Date("2026-10-19T00:00:00Z"), rows: [
837
- { id: "w43-1", task: "Assemble the wardrobes", start: some(new Date("2026-10-19T00:00:00Z")), qty: some(6.0), setups: none, site: "Fitting shop",
838
- status: "PLANNED", code: "", level: variant("day", null), started: none,
839
- machines: { from: [], to: [variant("identified", { key: "A701" })] } },
840
- { id: "w43-2", task: "Spray the vanity doors", start: none, qty: some(4.0), setups: none, site: "Spray shop",
841
- status: "PLANNED", code: "", level: variant("time", null), started: none,
842
- machines: { from: [], to: [] } },
843
- ] }],
844
- ]));
845
- /** The plans' patch door — every Save commits through it. */
846
- export const sheetWeekPlansPatch = e3.mutation.patch(sheetWeekPlans);
860
+ export const sheetWeekPlans = e3.record("sheet_week_plans", DictType(StringType, WeekPlan), {
861
+ initial: new Map([
862
+ ["2026-W42", { starts: new Date("2026-10-12T00:00:00Z"), rows: [
863
+ { id: "w42-1", task: "Cut the kitchen carcasses", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0), setups: some(2n), site: "Machine shop",
864
+ status: "PLANNED", code: "", level: variant("day", null), started: none,
865
+ machines: { from: [], to: [variant("range", { from: "S101", to: "S103" })] } },
866
+ { id: "w42-2", task: "Band the carcass edges", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0), setups: some(1n), site: "Machine shop",
867
+ status: "RELEASED", code: "WO-2201", level: variant("day", null), started: some(new Date("2026-10-13T07:30:00Z")),
868
+ machines: { from: [], to: [variant("identified", { key: "E201" })] } },
869
+ { id: "w42-3", task: "Route the door panels", start: none, qty: some(24.0), setups: none, site: "Bench room",
870
+ status: "PLANNED", code: "", level: variant("week", null), started: none,
871
+ machines: { from: [], to: [] } },
872
+ ] }],
873
+ ["2026-W43", { starts: new Date("2026-10-19T00:00:00Z"), rows: [
874
+ { id: "w43-1", task: "Assemble the wardrobes", start: some(new Date("2026-10-19T00:00:00Z")), qty: some(6.0), setups: none, site: "Fitting shop",
875
+ status: "PLANNED", code: "", level: variant("day", null), started: none,
876
+ machines: { from: [], to: [variant("identified", { key: "A701" })] } },
877
+ { id: "w43-2", task: "Spray the vanity doors", start: none, qty: some(4.0), setups: none, site: "Spray shop",
878
+ status: "PLANNED", code: "", level: variant("time", null), started: none,
879
+ machines: { from: [], to: [] } },
880
+ ] }],
881
+ ]),
882
+ mutations: (mutation) => ({
883
+ // The plans' patch door — every Save commits through it.
884
+ patch: mutation.patch(),
885
+ }),
886
+ });
847
887
  /**
848
888
  * One entry's rows (§3.4) — the week the viewer picks, its rows in the
849
889
  * planner's order; each week keeps its own drafts until Save or Discard, and
@@ -864,7 +904,7 @@ export const sheetWeeks = example({
864
904
  keywords: ["Sheet", "BuilderFrame", "record", "entry", "one entry", "rows", "id", "week", "State", "SegmentGroup", "drafts per entry", "inspector", "update", "Field.Slider", "column", "date", "text", "quantity", "integer", "reference", "enum", "set", "stamped", "owned", "register", "options", "level", "actual", "detail", "ranged", "DateLevel", "week", "day", "range", "time", "rule", "ready", "row", "Readiness", "completeness", "validation", "onPatch", "PatchEvent", "provenance", "source", "newRowId", "newRow", "write-back"],
865
905
  description: "A sheet over one entry's rows — the week the viewer picks, its rows in the planner's order, each week its own drafts until Save or Discard — with every column kind and its rules (a date at each row's level with its actual, an integer, a reference, an enum narrowed by an options rule with a detail, a stamped code owning its row, a set of machines in ranges), a row rule, a journal of every gesture, ids minted by a counter, and its own Details in the inspector pane, a row's quantity on a slider written back as one transaction",
866
906
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
867
- const plans = $.let(Record.bind(sheetWeekPlans, [sheetWeekPlansPatch]));
907
+ const plans = $.let(Record.bind(sheetWeekPlans));
868
908
  // The week the viewer picked, the journal and the id counter: a viewer's own state.
869
909
  const week = $.let(State.bind([StringType], "sheet.weeks.week", "2026-W42"));
870
910
  const log = $.let(State.bind([ArrayType(StringType)], "sheet.weeks.journal", []));
@@ -954,50 +994,62 @@ export const Batch = StructType({ id: StringType, name: StringType, steps: Array
954
994
  /** One day's batches, in the planner's order. */
955
995
  export const BatchDay = StructType({ batches: ArrayType(Batch) });
956
996
  /** The days, keyed by date. */
957
- export const sheetBatchDays = e3.record("sheet_batch_days", DictType(StringType, BatchDay), new Map([
958
- ["2026-10-12", { batches: [
959
- { id: "B-101", name: "Doors, oak", steps: [
960
- { task: "Cut doors", qty: some(12.0), parts: [
961
- { id: "B-101-1", code: "CUT", name: "Cut the door blanks", materials: ["Oak veneered board × 6"], station: some("S101") },
962
- ], bookings: [variant("labour", { team: "Cutting", people: 1n, hours: 3.0 })] },
963
- { task: "Band doors", qty: some(48.0), parts: [], bookings: [variant("equipment", { resource: "Edge bander E201" })] },
964
- { task: "Spray doors", qty: some(12.0), parts: [
965
- { id: "B-101-3", code: "SPR", name: "Seal and lacquer", materials: ["Sealer", "Matt lacquer"], station: none },
966
- ], bookings: [] },
967
- ] },
968
- { id: "B-102", name: "Carcasses, birch", steps: [
969
- { task: "Cut carcasses", qty: some(8.0), parts: [], bookings: [] },
970
- { task: "Drill carcasses", qty: some(8.0), parts: [], bookings: [variant("labour", { team: "Machining", people: 2n, hours: 2.5 })] },
971
- ] },
972
- { id: "B-103", name: "Shelves, ash", steps: [
973
- { task: "Cut shelves", qty: some(20.0), parts: [], bookings: [] },
974
- { task: "Sand shelves", qty: some(20.0), parts: [], bookings: [] },
975
- ] },
976
- ] }],
977
- ]));
978
- /** The days' patch door — every Save commits through it. */
979
- export const sheetBatchDaysPatch = e3.mutation.patch(sheetBatchDays);
997
+ export const sheetBatchDays = e3.record("sheet_batch_days", DictType(StringType, BatchDay), {
998
+ initial: new Map([
999
+ ["2026-10-12", { batches: [
1000
+ { id: "B-101", name: "Doors, oak", steps: [
1001
+ { task: "Cut doors", qty: some(12.0), parts: [
1002
+ { id: "B-101-1", code: "CUT", name: "Cut the door blanks", materials: ["Oak veneered board × 6"], station: some("S101") },
1003
+ ], bookings: [variant("labour", { team: "Cutting", people: 1n, hours: 3.0 })] },
1004
+ { task: "Band doors", qty: some(48.0), parts: [], bookings: [variant("equipment", { resource: "Edge bander E201" })] },
1005
+ { task: "Spray doors", qty: some(12.0), parts: [
1006
+ { id: "B-101-3", code: "SPR", name: "Seal and lacquer", materials: ["Sealer", "Matt lacquer"], station: none },
1007
+ ], bookings: [] },
1008
+ ] },
1009
+ { id: "B-102", name: "Carcasses, birch", steps: [
1010
+ { task: "Cut carcasses", qty: some(8.0), parts: [], bookings: [] },
1011
+ { task: "Drill carcasses", qty: some(8.0), parts: [], bookings: [variant("labour", { team: "Machining", people: 2n, hours: 2.5 })] },
1012
+ ] },
1013
+ { id: "B-103", name: "Shelves, ash", steps: [
1014
+ { task: "Cut shelves", qty: some(20.0), parts: [], bookings: [] },
1015
+ { task: "Sand shelves", qty: some(20.0), parts: [], bookings: [] },
1016
+ ] },
1017
+ ] }],
1018
+ ]),
1019
+ mutations: (mutation) => ({
1020
+ // The days' patch door — every Save commits through it.
1021
+ patch: mutation.patch(),
1022
+ }),
1023
+ });
980
1024
  /** A step template — the Rows tab's card, the group it sits under, and the task of the step it drops. */
981
1025
  export const BatchStepTemplate = StructType({ name: StringType, group: StringType, task: StringType });
982
1026
  /** The step templates, keyed by their key: a record of their own, the rail's `rowTemplates` source (#1345). */
983
- export const sheetBatchStepTemplates = e3.record("sheet_batch_step_templates", DictType(StringType, BatchStepTemplate), new Map([
984
- ["sand", { name: "Sand", group: "Steps", task: "Sand" }],
985
- ["seal", { name: "Seal", group: "Steps", task: "Seal" }],
986
- ]));
987
- /** The step templates by their group: what the rail narrows them by. */
988
- export const sheetBatchStepTemplatesByGroup = e3.recordIndex("sheet_batch_step_templates_by_group", sheetBatchStepTemplates, { on: ["group"] });
1027
+ export const sheetBatchStepTemplates = e3.record("sheet_batch_step_templates", DictType(StringType, BatchStepTemplate), {
1028
+ initial: new Map([
1029
+ ["sand", { name: "Sand", group: "Steps", task: "Sand" }],
1030
+ ["seal", { name: "Seal", group: "Steps", task: "Seal" }],
1031
+ ]),
1032
+ indexes: (index) => ({
1033
+ // The step templates by their group: what the rail narrows them by.
1034
+ sheet_batch_step_templates_by_group: index.on(["group"]),
1035
+ }),
1036
+ });
989
1037
  /** A batch template — the Rows tab's card, the group it sits under, the batch's name and the steps it starts with. */
990
1038
  export const BatchTemplate = StructType({ name: StringType, group: StringType, batch: StringType, steps: ArrayType(BatchStep) });
991
1039
  /** The batch templates, keyed by their key: a record of their own, the rail's `groupTemplates` source (#1345). */
992
- export const sheetBatchTemplates = e3.record("sheet_batch_templates", DictType(StringType, BatchTemplate), new Map([
993
- ["finishing", { name: "Finishing batch", group: "Batches", batch: "Finishing", steps: [
994
- { task: "Sand", qty: none, parts: [], bookings: [] },
995
- { task: "Seal", qty: none, parts: [], bookings: [] },
996
- { task: "Spray", qty: none, parts: [], bookings: [] },
997
- ] }],
998
- ]));
999
- /** The batch templates by their group: what the rail narrows them by. */
1000
- export const sheetBatchTemplatesByGroup = e3.recordIndex("sheet_batch_templates_by_group", sheetBatchTemplates, { on: ["group"] });
1040
+ export const sheetBatchTemplates = e3.record("sheet_batch_templates", DictType(StringType, BatchTemplate), {
1041
+ initial: new Map([
1042
+ ["finishing", { name: "Finishing batch", group: "Batches", batch: "Finishing", steps: [
1043
+ { task: "Sand", qty: none, parts: [], bookings: [] },
1044
+ { task: "Seal", qty: none, parts: [], bookings: [] },
1045
+ { task: "Spray", qty: none, parts: [], bookings: [] },
1046
+ ] }],
1047
+ ]),
1048
+ indexes: (index) => ({
1049
+ // The batch templates by their group: what the rail narrows them by.
1050
+ sheet_batch_templates_by_group: index.on(["group"]),
1051
+ }),
1052
+ });
1001
1053
  /**
1002
1054
  * One day's batches, in the planner's order (#1187, SB39, SB40, SB44) — a
1003
1055
  * grouped sheet over one entry's groups, each batch a group of its steps. A
@@ -1016,20 +1068,20 @@ export const sheetBatchTemplatesByGroup = e3.recordIndex("sheet_batch_templates_
1016
1068
  * their group.
1017
1069
  */
1018
1070
  export const sheetBatches = example({
1019
- keywords: ["Sheet", "BuilderFrame", "drag", "drop", "move", "grip", "seam", "templates", "Sheet.templates", "slice", "Slice.bindRecords", "Data.bindPaged", "recordIndex", "group", "grouped", "entry", "order", "Sheet.library.rows", "children", "newGroup", "newRow", "Patch", "defaults", "completeness", "fold", "undo", "redo", "ready", "subRows", "subRow", "sub rows", "SubRow", "Facet", "chips", "facets", "lead", "detail", "noun", "variant", "match", "read-only", "inspector", "Sheet.field", "hidden"],
1071
+ keywords: ["Sheet", "BuilderFrame", "drag", "drop", "move", "grip", "seam", "templates", "Sheet.templates", "slice", "Slice.bindRecords", "Data.bindPaged", "indexes", "group", "grouped", "entry", "order", "Sheet.library.rows", "children", "newGroup", "newRow", "Patch", "defaults", "completeness", "fold", "undo", "redo", "ready", "subRows", "subRow", "sub rows", "SubRow", "Facet", "chips", "facets", "lead", "detail", "noun", "variant", "match", "read-only", "inspector", "Sheet.field", "hidden"],
1020
1072
  description: "A sheet over one day's batches in the planner's order — templates dragged from the library onto a seam, steps and whole batches moved to another seam by their grips, a batch named before Save, new steps and batches from their defaults, and each step's parts and bookings as read-only sub rows under it, declared per array field like columns, beside a library and an inspector pane; its step and batch templates two records, each a source of one rail",
1021
1073
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
1022
- const days = $.let(Record.bind(sheetBatchDays, [sheetBatchDaysPatch]));
1074
+ const days = $.let(Record.bind(sheetBatchDays));
1023
1075
  const stepTemplates = $.let(Data.bind(sheetBatchStepTemplates));
1024
1076
  const batchTemplates = $.let(Data.bind(sheetBatchTemplates));
1025
1077
  // One rail over the templates records, each its own source: they narrow the Rows tab's cards.
1026
1078
  const slice = $.let(Slice.bindRecords("sheet.batches", {
1027
1079
  rowTemplates: {
1028
- source: Data.bindPaged(sheetBatchStepTemplates, { indexes: [sheetBatchStepTemplatesByGroup] }),
1080
+ source: Data.bindPaged(sheetBatchStepTemplates, { indexes: ["sheet_batch_step_templates_by_group"] }),
1029
1081
  label: "Step templates", fields: { group: { label: "Group", hints: ["Steps"] } },
1030
1082
  },
1031
1083
  groupTemplates: {
1032
- source: Data.bindPaged(sheetBatchTemplates, { indexes: [sheetBatchTemplatesByGroup] }),
1084
+ source: Data.bindPaged(sheetBatchTemplates, { indexes: ["sheet_batch_templates_by_group"] }),
1033
1085
  label: "Batch templates", fields: { group: { label: "Group", hints: ["Batches"] } },
1034
1086
  },
1035
1087
  }));
@@ -1080,21 +1132,25 @@ export const LooseEntry = Sheet.Types.Entry(LoosePackage, "tasks");
1080
1132
  /** A week's work — its entries, in the planner's order. */
1081
1133
  export const LooseWork = StructType({ entries: ArrayType(LooseEntry) });
1082
1134
  /** The work, one entry per week. */
1083
- export const sheetLooseWork = e3.record("sheet_loose_work", DictType(StringType, LooseWork), new Map([
1084
- ["2026-W42", { entries: [
1085
- variant("row", { id: "brief", task: "Check the drawings", qty: none, notes: "Before any cutting" }),
1086
- variant("group", { id: "doors", name: "Kitchen doors", tasks: [
1087
- { id: "doors-1", task: "Cut door blanks", qty: some(24.0), notes: "Oak veneered board" },
1088
- { id: "doors-2", task: "Inspect the blanks", qty: some(4.0), notes: "Before finishing" },
1089
- ] }),
1090
- variant("row", { id: "handover", task: "Hand over to finishing", qty: none, notes: "" }),
1091
- variant("group", { id: "finish", name: "Door finishing", tasks: [
1092
- { id: "finish-1", task: "Spray the doors", qty: some(24.0), notes: "Matt lacquer" },
1093
- ] }),
1094
- ] }],
1095
- ]));
1096
- /** The work's patch door — every Save commits through it. */
1097
- export const sheetLooseWorkPatch = e3.mutation.patch(sheetLooseWork);
1135
+ export const sheetLooseWork = e3.record("sheet_loose_work", DictType(StringType, LooseWork), {
1136
+ initial: new Map([
1137
+ ["2026-W42", { entries: [
1138
+ variant("row", { id: "brief", task: "Check the drawings", qty: none, notes: "Before any cutting" }),
1139
+ variant("group", { id: "doors", name: "Kitchen doors", tasks: [
1140
+ { id: "doors-1", task: "Cut door blanks", qty: some(24.0), notes: "Oak veneered board" },
1141
+ { id: "doors-2", task: "Inspect the blanks", qty: some(4.0), notes: "Before finishing" },
1142
+ ] }),
1143
+ variant("row", { id: "handover", task: "Hand over to finishing", qty: none, notes: "" }),
1144
+ variant("group", { id: "finish", name: "Door finishing", tasks: [
1145
+ { id: "finish-1", task: "Spray the doors", qty: some(24.0), notes: "Matt lacquer" },
1146
+ ] }),
1147
+ ] }],
1148
+ ]),
1149
+ mutations: (mutation) => ({
1150
+ // The work's patch door — every Save commits through it.
1151
+ patch: mutation.patch(),
1152
+ }),
1153
+ });
1098
1154
  /**
1099
1155
  * Loose rows between the groups (#846) — the week's entries are
1100
1156
  * `Sheet.Types.Entry(LoosePackage, "tasks")`: a work package with its
@@ -1110,7 +1166,7 @@ export const sheetLoose = example({
1110
1166
  keywords: ["Sheet", "BuilderFrame", "group", "grouped", "loose", "ungrouped", "Entry", "Types.Entry", "variant", "entries", "insert", "move", "newRow", "newGroup", "noun", "entry", "record"],
1111
1167
  description: "A sheet over one week's entries — work packages and loose tasks: a loose task is a plain row numbered in the packages' sequence, inserted at the seam above a package or beside another loose task, and moved between the entries by its grip",
1112
1168
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
1113
- const work = $.let(Record.bind(sheetLooseWork, [sheetLooseWorkPatch]));
1169
+ const work = $.let(Record.bind(sheetLooseWork));
1114
1170
  const newTask = $.const(East.function([Sheet.Types.NewRow], Sheet.Types.Patch(LooseTask), () => Sheet.patch(LooseTask, { qty: none, notes: "" })));
1115
1171
  const newPackage = $.const(East.function([Sheet.Types.NewGroup], Sheet.Types.Patch(LoosePackage), () => Sheet.patch(LoosePackage, { tasks: [] })));
1116
1172
  return (_jsx(Box, { height: "480px", children: _jsx(Sheet, { record: work, entry: { key: "2026-W42", rows: "entries", id: "id" }, group: Sheet.group(LoosePackage, "tasks", { title: "name", noun: { singular: "package", plural: "packages" } }), name: "loose", columns: {
@@ -1135,7 +1191,7 @@ export const sheetPaged = example({
1135
1191
  keywords: ["Sheet", "BuilderFrame", "record", "window", "Data.bindPaged", "paged", "key order", "key search", "edits", "insertRows", "removeRows", "insert", "before", "after", "Undo"],
1136
1192
  description: "A sheet over a large record, read a window at a time in key order — Data.bindPaged over the same record its Save commits to — whose edits add rows (gutter seams, the selection strip, Alt+Insert) and never remove one",
1137
1193
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
1138
- const jobs = $.let(Record.bind(sheetJobs, [sheetJobsPatch]));
1194
+ const jobs = $.let(Record.bind(sheetJobs));
1139
1195
  const page = $.let(Data.bindPaged(sheetJobs));
1140
1196
  return (_jsx(Box, { height: "560px", children: _jsx(Sheet, { record: jobs, window: page, name: "paged", edits: { insertRows: true, removeRows: false }, columns: {
1141
1197
  task: Sheet.column.text(SheetJob, { header: "Task", width: "240px" }),
@@ -1172,32 +1228,36 @@ export const MachineUpkeep = StructType({
1172
1228
  serial: StringType, // a stamped column: read only
1173
1229
  });
1174
1230
  /** The machines' upkeep, keyed by machine code. */
1175
- export const sheetMachineUpkeep = e3.record("sheet_machine_upkeep", DictType(StringType, MachineUpkeep), new Map([
1176
- ["S101", { name: "Beam saw", bay: "Bay 1", hours: 1240n, family: variant("beam_saw", null), wear: some(35.5), crew: some("Cutting crew"),
1177
- tickets: new Set(["Panel saw ticket", "Dust extraction"]),
1178
- checks: [{ text: "Blade sharpened", done: true }, { text: "Fence squared", done: true }, { text: "Extraction cleaned", done: false }],
1179
- supplier: { name: "Kestrelmoor Saw Works", phone: "01632 960 118" },
1180
- in_service: true, guard_checked: some(true),
1181
- serviced: new Date("2026-09-28T07:30:00Z"), next_service: some(new Date("2026-11-09T07:30:00Z")), serial: "BS-4410-0193" }],
1182
- ["E201", { name: "Edge bander", bay: "Bay 2", hours: 860n, family: variant("edge_bander", null), wear: none, crew: none,
1183
- tickets: new Set(), checks: [], supplier: { name: "", phone: "" },
1184
- in_service: true, guard_checked: none,
1185
- serviced: new Date("2026-08-17T06:00:00Z"), next_service: none, serial: "EB-2207-0457" }],
1186
- ["R301", { name: "CNC router", bay: "Bay 3", hours: 2210n, family: variant("cnc_router", null), wear: some(62.0), crew: some("Machining crew"),
1187
- tickets: new Set(["Router ticket"]),
1188
- checks: [{ text: "Spindle greased", done: true }, { text: "Bed vacuum tested", done: false }],
1189
- supplier: { name: "Brindlecote Tooling", phone: "01632 960 342" },
1190
- in_service: false, guard_checked: some(false),
1191
- serviced: new Date("2026-07-06T13:15:00Z"), next_service: none, serial: "CR-5120-0088" }],
1192
- ["F401", { name: "Spray booth", bay: "Bay 4", hours: 540n, family: variant("spray_booth", null), wear: none, crew: some("Finishing crew"),
1193
- tickets: new Set(["Spray ticket", "First aid"]),
1194
- checks: [{ text: "Filters changed", done: true }],
1195
- supplier: { name: "Fennimarsh Coatings", phone: "01632 960 775" },
1196
- in_service: true, guard_checked: some(true),
1197
- serviced: new Date("2026-10-01T08:00:00Z"), next_service: some(new Date("2026-12-01T08:00:00Z")), serial: "SB-0391-0017" }],
1198
- ]));
1199
- /** The upkeep's patch door — every Save commits through it. */
1200
- export const sheetMachineUpkeepPatch = e3.mutation.patch(sheetMachineUpkeep);
1231
+ export const sheetMachineUpkeep = e3.record("sheet_machine_upkeep", DictType(StringType, MachineUpkeep), {
1232
+ initial: new Map([
1233
+ ["S101", { name: "Beam saw", bay: "Bay 1", hours: 1240n, family: variant("beam_saw", null), wear: some(35.5), crew: some("Cutting crew"),
1234
+ tickets: new Set(["Panel saw ticket", "Dust extraction"]),
1235
+ checks: [{ text: "Blade sharpened", done: true }, { text: "Fence squared", done: true }, { text: "Extraction cleaned", done: false }],
1236
+ supplier: { name: "Kestrelmoor Saw Works", phone: "01632 960 118" },
1237
+ in_service: true, guard_checked: some(true),
1238
+ serviced: new Date("2026-09-28T07:30:00Z"), next_service: some(new Date("2026-11-09T07:30:00Z")), serial: "BS-4410-0193" }],
1239
+ ["E201", { name: "Edge bander", bay: "Bay 2", hours: 860n, family: variant("edge_bander", null), wear: none, crew: none,
1240
+ tickets: new Set(), checks: [], supplier: { name: "", phone: "" },
1241
+ in_service: true, guard_checked: none,
1242
+ serviced: new Date("2026-08-17T06:00:00Z"), next_service: none, serial: "EB-2207-0457" }],
1243
+ ["R301", { name: "CNC router", bay: "Bay 3", hours: 2210n, family: variant("cnc_router", null), wear: some(62.0), crew: some("Machining crew"),
1244
+ tickets: new Set(["Router ticket"]),
1245
+ checks: [{ text: "Spindle greased", done: true }, { text: "Bed vacuum tested", done: false }],
1246
+ supplier: { name: "Brindlecote Tooling", phone: "01632 960 342" },
1247
+ in_service: false, guard_checked: some(false),
1248
+ serviced: new Date("2026-07-06T13:15:00Z"), next_service: none, serial: "CR-5120-0088" }],
1249
+ ["F401", { name: "Spray booth", bay: "Bay 4", hours: 540n, family: variant("spray_booth", null), wear: none, crew: some("Finishing crew"),
1250
+ tickets: new Set(["Spray ticket", "First aid"]),
1251
+ checks: [{ text: "Filters changed", done: true }],
1252
+ supplier: { name: "Fennimarsh Coatings", phone: "01632 960 775" },
1253
+ in_service: true, guard_checked: some(true),
1254
+ serviced: new Date("2026-10-01T08:00:00Z"), next_service: some(new Date("2026-12-01T08:00:00Z")), serial: "SB-0391-0017" }],
1255
+ ]),
1256
+ mutations: (mutation) => ({
1257
+ // The upkeep's patch door — every Save commits through it.
1258
+ patch: mutation.patch(),
1259
+ }),
1260
+ });
1201
1261
  /**
1202
1262
  * The inspector's every field kind (#1220) — the workshop's machines' upkeep,
1203
1263
  * a record keyed by machine code. The grid shows four columns: a machine's
@@ -1217,7 +1277,7 @@ export const sheetUpkeep = example({
1217
1277
  keywords: ["Sheet", "BuilderFrame", "inspector", "fields", "Sheet.field", "Fields", "form", "text", "placeholder", "number", "unit", "min", "max", "step", "select", "labels", "reference", "register", "checkbox", "datetime", "Option", "Set", "Clear", "tags", "options", "checklist", "nested", "struct", "stamped", "readonly", "integer", "ready", "row", "Readiness", "record"],
1218
1278
  description: "A sheet whose inspector pane edits one field of every kind over the workshop's machines' upkeep — a number with its unit and bounds, a select of a variant's cases, a reference, a text emptied to none, tags, a checklist, a nested struct's fields under its name, a checkbox, a date and a time, Options set and cleared, and a stamped code read only — the hinted fields leading, with a row rule's issue",
1219
1279
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
1220
- const upkeep = $.let(Record.bind(sheetMachineUpkeep, [sheetMachineUpkeepPatch]));
1280
+ const upkeep = $.let(Record.bind(sheetMachineUpkeep));
1221
1281
  const bays = $.let(["Bay 1", "Bay 2", "Bay 3", "Bay 4", "Bay 7"], ArrayType(StringType));
1222
1282
  // A machine out of service needs its next service booked.
1223
1283
  const readyMachine = $.const(East.function([Sheet.Types.Draft(MachineUpkeep), Sheet.Types.DraftContext(MachineUpkeep)], Sheet.Types.Readiness, ($, row) => {
@@ -1249,4 +1309,54 @@ export const sheetUpkeep = example({
1249
1309
  } }))),
1250
1310
  inputs: [],
1251
1311
  });
1312
+ // ============================================================================
1313
+ // sheetConflicts — your edits meeting someone else's save
1314
+ // ============================================================================
1315
+ /** The jobs the conflicts example edits, in a record of their own, so no other example's edits meet them. */
1316
+ export const sheetConflictJobs = e3.record("sheet_conflict_jobs", DictType(StringType, SheetJob), {
1317
+ initial: new Map([
1318
+ ["J-0001", { task: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0) }],
1319
+ ["J-0002", { task: "Edge banding", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0) }],
1320
+ ["J-0003", { task: "CNC routing", start: some(new Date("2026-10-14T00:00:00Z")), qty: some(48.0) }],
1321
+ ["J-0004", { task: "Spray finish", start: some(new Date("2026-10-15T00:00:00Z")), qty: some(36.0) }],
1322
+ ]),
1323
+ mutations: (mutation) => ({
1324
+ // The jobs' patch door — every Save commits through it.
1325
+ patch: mutation.patch(),
1326
+ // Someone else's save: every job's quantity 12 more and its start a day later, its task as it was.
1327
+ elsewhere: mutation.reduce(East.function([DictType(StringType, SheetJob)], DictType(StringType, SheetJob), (_$, jobs) => jobs.map((_$2, job) => ({
1328
+ task: job.task,
1329
+ start: job.start.match({
1330
+ some: (_$3, at) => East.value(some(at.addDays(1n)), OptionType(DateTimeType)),
1331
+ none: (_$3) => East.value(none, OptionType(DateTimeType)),
1332
+ }),
1333
+ qty: job.qty.match({
1334
+ some: (_$3, n) => East.value(some(n.add(12.0)), OptionType(FloatType)),
1335
+ none: (_$3) => East.value(none, OptionType(FloatType)),
1336
+ }),
1337
+ })))),
1338
+ }),
1339
+ });
1340
+ /**
1341
+ * Your edits meeting someone else's save, in one window: edit, then press
1342
+ * Someone else saves, which saves another person's change to the same jobs —
1343
+ * every Qty 12 more and every Start a day later. A Qty or a Start you changed
1344
+ * too is a conflict, waiting for you to choose; a Task you changed combines
1345
+ * with theirs. Each press saves their change again.
1346
+ */
1347
+ export const sheetConflicts = example({
1348
+ keywords: ["Sheet", "conflict", "conflicts", "combine", "someone else", "carry over", "Choose", "record", "Record.bind", "mutate", "Button", "patch"],
1349
+ description: "Your edits meeting someone else's save, in one window — edit a Qty or a Start, then press Someone else saves, which saves another person's change to the same jobs (every Qty 12 more, every Start a day later), so yours conflict and wait to be chosen; a Task you change combines with theirs",
1350
+ fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
1351
+ const jobs = $.let(Record.bind(sheetConflictJobs, ["patch"]));
1352
+ const others = $.let(Record.bind(sheetConflictJobs, ["elsewhere"]));
1353
+ const theirs = $.const(East.function([], NullType, ($) => { $(others.mutate.elsewhere()); }));
1354
+ return (_jsxs(VStack, { gap: "3", align: "stretch", children: [_jsxs(HStack, { gap: "3", children: [_jsx(Button, { variant: "outline", onClick: theirs, loading: others.mutate.pending(), children: "Someone else saves" }), _jsx(Text, { color: "fg.muted", children: "Their change: every Qty 12 more, every Start a day later" })] }), _jsx(Box, { height: "560px", children: _jsx(Sheet, { name: "conflicts", record: jobs, columns: {
1355
+ task: Sheet.column.text(SheetJob, { header: "Task", width: "240px" }),
1356
+ start: Sheet.column.date(SheetJob, { header: "Start", width: "96px" }),
1357
+ qty: Sheet.column.quantity(SheetJob, { header: "Qty", width: "96px" }),
1358
+ } }) })] }));
1359
+ } }))),
1360
+ inputs: [],
1361
+ });
1252
1362
  //# sourceMappingURL=sheet.examples.js.map