@elaraai/e3-ui 1.0.94 → 1.0.95

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 (303) hide show
  1. package/dist/src/allocation/adapters.d.ts +159 -0
  2. package/dist/src/allocation/adapters.d.ts.map +1 -0
  3. package/dist/src/allocation/adapters.js +241 -0
  4. package/dist/src/allocation/adapters.js.map +1 -0
  5. package/dist/src/allocation/functions.d.ts +664 -0
  6. package/dist/src/allocation/functions.d.ts.map +1 -0
  7. package/dist/src/allocation/functions.js +782 -0
  8. package/dist/src/allocation/functions.js.map +1 -0
  9. package/dist/src/allocation/index.d.ts +2985 -0
  10. package/dist/src/allocation/index.d.ts.map +1 -0
  11. package/dist/src/allocation/index.js +499 -0
  12. package/dist/src/allocation/index.js.map +1 -0
  13. package/dist/src/allocation/types.d.ts +832 -0
  14. package/dist/src/allocation/types.d.ts.map +1 -0
  15. package/dist/src/allocation/types.js +360 -0
  16. package/dist/src/allocation/types.js.map +1 -0
  17. package/dist/src/bind/func.d.ts +14 -0
  18. package/dist/src/bind/func.d.ts.map +1 -1
  19. package/dist/src/bind/func.js +22 -1
  20. package/dist/src/bind/func.js.map +1 -1
  21. package/dist/src/calendar/index.d.ts +510 -1639
  22. package/dist/src/calendar/index.d.ts.map +1 -1
  23. package/dist/src/calendar/index.js +56 -29
  24. package/dist/src/calendar/index.js.map +1 -1
  25. package/dist/src/flowchart/canvas.d.ts +9 -21
  26. package/dist/src/flowchart/canvas.d.ts.map +1 -1
  27. package/dist/src/flowchart/canvas.js +10 -22
  28. package/dist/src/flowchart/canvas.js.map +1 -1
  29. package/dist/src/flowchart/flowchart.d.ts +19 -13
  30. package/dist/src/flowchart/flowchart.d.ts.map +1 -1
  31. package/dist/src/flowchart/flowchart.js.map +1 -1
  32. package/dist/src/flowchart/index.d.ts +44 -21
  33. package/dist/src/flowchart/index.d.ts.map +1 -1
  34. package/dist/src/flowchart/index.js +43 -20
  35. package/dist/src/flowchart/index.js.map +1 -1
  36. package/dist/src/flowchart/library.d.ts +166 -81
  37. package/dist/src/flowchart/library.d.ts.map +1 -1
  38. package/dist/src/flowchart/library.js +232 -105
  39. package/dist/src/flowchart/library.js.map +1 -1
  40. package/dist/src/flowchart/over.d.ts +9 -16
  41. package/dist/src/flowchart/over.d.ts.map +1 -1
  42. package/dist/src/flowchart/over.js +9 -16
  43. package/dist/src/flowchart/over.js.map +1 -1
  44. package/dist/src/flowchart/payload.d.ts +710 -508
  45. package/dist/src/flowchart/payload.d.ts.map +1 -1
  46. package/dist/src/flowchart/payload.js +128 -74
  47. package/dist/src/flowchart/payload.js.map +1 -1
  48. package/dist/src/flowchart/window.d.ts +132 -347
  49. package/dist/src/flowchart/window.d.ts.map +1 -1
  50. package/dist/src/flowchart/window.js +48 -55
  51. package/dist/src/flowchart/window.js.map +1 -1
  52. package/dist/src/index.d.ts +11 -7
  53. package/dist/src/index.d.ts.map +1 -1
  54. package/dist/src/index.js +14 -6
  55. package/dist/src/index.js.map +1 -1
  56. package/dist/src/internal.d.ts +18 -7
  57. package/dist/src/internal.d.ts.map +1 -1
  58. package/dist/src/internal.js +28 -9
  59. package/dist/src/internal.js.map +1 -1
  60. package/dist/src/plan/event-rows.d.ts +26 -10
  61. package/dist/src/plan/event-rows.d.ts.map +1 -1
  62. package/dist/src/plan/event-rows.js +39 -13
  63. package/dist/src/plan/event-rows.js.map +1 -1
  64. package/dist/src/plan/ir.d.ts +244 -815
  65. package/dist/src/plan/ir.d.ts.map +1 -1
  66. package/dist/src/plan/ir.js +8 -6
  67. package/dist/src/plan/ir.js.map +1 -1
  68. package/dist/src/plan/library.d.ts +3 -0
  69. package/dist/src/plan/library.d.ts.map +1 -1
  70. package/dist/src/plan/library.js +1 -1
  71. package/dist/src/plan/library.js.map +1 -1
  72. package/dist/src/plan/ordered-source.d.ts +1 -0
  73. package/dist/src/plan/ordered-source.d.ts.map +1 -1
  74. package/dist/src/plan/plan.d.ts +559 -1667
  75. package/dist/src/plan/plan.d.ts.map +1 -1
  76. package/dist/src/plan/plan.js +123 -45
  77. package/dist/src/plan/plan.js.map +1 -1
  78. package/dist/src/plan/root.d.ts +16 -20
  79. package/dist/src/plan/root.d.ts.map +1 -1
  80. package/dist/src/plan/root.js +23 -33
  81. package/dist/src/plan/root.js.map +1 -1
  82. package/dist/src/roster/coverage.d.ts +17 -231
  83. package/dist/src/roster/coverage.d.ts.map +1 -1
  84. package/dist/src/roster/coverage.js +94 -90
  85. package/dist/src/roster/coverage.js.map +1 -1
  86. package/dist/src/roster/fit.d.ts +59 -0
  87. package/dist/src/roster/fit.d.ts.map +1 -0
  88. package/dist/src/roster/fit.js +155 -0
  89. package/dist/src/roster/fit.js.map +1 -0
  90. package/dist/src/roster/index.d.ts +2862 -3662
  91. package/dist/src/roster/index.d.ts.map +1 -1
  92. package/dist/src/roster/index.js +383 -81
  93. package/dist/src/roster/index.js.map +1 -1
  94. package/dist/src/roster/library.d.ts +37 -92
  95. package/dist/src/roster/library.d.ts.map +1 -1
  96. package/dist/src/roster/library.js +25 -64
  97. package/dist/src/roster/library.js.map +1 -1
  98. package/dist/src/roster/lists.d.ts +195 -0
  99. package/dist/src/roster/lists.d.ts.map +1 -0
  100. package/dist/src/roster/lists.js +233 -0
  101. package/dist/src/roster/lists.js.map +1 -0
  102. package/dist/src/roster/rules.d.ts +17 -260
  103. package/dist/src/roster/rules.d.ts.map +1 -1
  104. package/dist/src/roster/rules.js +135 -132
  105. package/dist/src/roster/rules.js.map +1 -1
  106. package/dist/src/roster/targets.d.ts +115 -0
  107. package/dist/src/roster/targets.d.ts.map +1 -0
  108. package/dist/src/roster/targets.js +213 -0
  109. package/dist/src/roster/targets.js.map +1 -0
  110. package/dist/src/roster/times.d.ts +251 -0
  111. package/dist/src/roster/times.d.ts.map +1 -0
  112. package/dist/src/roster/times.js +174 -0
  113. package/dist/src/roster/times.js.map +1 -0
  114. package/dist/src/roster/types.d.ts +828 -183
  115. package/dist/src/roster/types.d.ts.map +1 -1
  116. package/dist/src/roster/types.js +224 -97
  117. package/dist/src/roster/types.js.map +1 -1
  118. package/dist/src/schedule/accessor.d.ts +28 -0
  119. package/dist/src/schedule/accessor.d.ts.map +1 -0
  120. package/dist/src/schedule/accessor.js +39 -0
  121. package/dist/src/schedule/accessor.js.map +1 -0
  122. package/dist/src/schedule/events.d.ts +170 -42
  123. package/dist/src/schedule/events.d.ts.map +1 -1
  124. package/dist/src/schedule/events.js +431 -171
  125. package/dist/src/schedule/events.js.map +1 -1
  126. package/dist/src/schedule/index.d.ts +41 -4
  127. package/dist/src/schedule/index.d.ts.map +1 -1
  128. package/dist/src/schedule/index.js +35 -3
  129. package/dist/src/schedule/index.js.map +1 -1
  130. package/dist/src/schedule/library.d.ts +13 -3
  131. package/dist/src/schedule/library.d.ts.map +1 -1
  132. package/dist/src/schedule/library.js +11 -4
  133. package/dist/src/schedule/library.js.map +1 -1
  134. package/dist/src/schedule/periods.d.ts +115 -0
  135. package/dist/src/schedule/periods.d.ts.map +1 -0
  136. package/dist/src/schedule/periods.js +215 -0
  137. package/dist/src/schedule/periods.js.map +1 -0
  138. package/dist/src/schedule/record-window.d.ts +25 -3
  139. package/dist/src/schedule/record-window.d.ts.map +1 -1
  140. package/dist/src/schedule/record-window.js +31 -18
  141. package/dist/src/schedule/record-window.js.map +1 -1
  142. package/dist/src/schedule/resources.d.ts +82 -4
  143. package/dist/src/schedule/resources.d.ts.map +1 -1
  144. package/dist/src/schedule/resources.js +44 -14
  145. package/dist/src/schedule/resources.js.map +1 -1
  146. package/dist/src/schedule/session.d.ts +69 -0
  147. package/dist/src/schedule/session.d.ts.map +1 -0
  148. package/dist/src/schedule/session.js +121 -0
  149. package/dist/src/schedule/session.js.map +1 -0
  150. package/dist/src/schedule/templates.d.ts +14 -2
  151. package/dist/src/schedule/templates.d.ts.map +1 -1
  152. package/dist/src/schedule/templates.js +5 -3
  153. package/dist/src/schedule/templates.js.map +1 -1
  154. package/dist/src/schedule/types.d.ts +1671 -37
  155. package/dist/src/schedule/types.d.ts.map +1 -1
  156. package/dist/src/schedule/types.js +196 -5
  157. package/dist/src/schedule/types.js.map +1 -1
  158. package/dist/src/schedule/window.d.ts +14 -0
  159. package/dist/src/schedule/window.d.ts.map +1 -1
  160. package/dist/src/schedule/window.js +14 -4
  161. package/dist/src/schedule/window.js.map +1 -1
  162. package/dist/src/schedule/words.d.ts +22 -0
  163. package/dist/src/schedule/words.d.ts.map +1 -0
  164. package/dist/src/schedule/words.js +25 -0
  165. package/dist/src/schedule/words.js.map +1 -0
  166. package/dist/src/sheet/index.d.ts +61 -27
  167. package/dist/src/sheet/index.d.ts.map +1 -1
  168. package/dist/src/sheet/index.js +59 -25
  169. package/dist/src/sheet/index.js.map +1 -1
  170. package/dist/src/sheet/library.d.ts +21 -3
  171. package/dist/src/sheet/library.d.ts.map +1 -1
  172. package/dist/src/sheet/library.js +23 -6
  173. package/dist/src/sheet/library.js.map +1 -1
  174. package/dist/src/sheet/registers.d.ts +100 -85
  175. package/dist/src/sheet/registers.d.ts.map +1 -1
  176. package/dist/src/sheet/registers.js +100 -85
  177. package/dist/src/sheet/registers.js.map +1 -1
  178. package/dist/src/sheet/root.d.ts +8 -12
  179. package/dist/src/sheet/root.d.ts.map +1 -1
  180. package/dist/src/sheet/root.js +6 -40
  181. package/dist/src/sheet/root.js.map +1 -1
  182. package/dist/src/sheet/sheet.d.ts +598 -2349
  183. package/dist/src/sheet/sheet.d.ts.map +1 -1
  184. package/dist/src/sheet/sheet.js +124 -37
  185. package/dist/src/sheet/sheet.js.map +1 -1
  186. package/dist/src/sheet/sub-rows.d.ts +74 -28
  187. package/dist/src/sheet/sub-rows.d.ts.map +1 -1
  188. package/dist/src/sheet/sub-rows.js +74 -28
  189. package/dist/src/sheet/sub-rows.js.map +1 -1
  190. package/dist/src/sheet/templates.d.ts +98 -34
  191. package/dist/src/sheet/templates.d.ts.map +1 -1
  192. package/dist/src/sheet/templates.js +102 -58
  193. package/dist/src/sheet/templates.js.map +1 -1
  194. package/dist/src/sheet/types.d.ts +289 -1359
  195. package/dist/src/sheet/types.d.ts.map +1 -1
  196. package/dist/src/sheet/types.js +20 -26
  197. package/dist/src/sheet/types.js.map +1 -1
  198. package/dist/src/sheet/views.d.ts +10 -11
  199. package/dist/src/sheet/views.d.ts.map +1 -1
  200. package/dist/src/sheet/views.js +15 -20
  201. package/dist/src/sheet/views.js.map +1 -1
  202. package/dist/src/{roster/visibility.d.ts → utils/key-visibility.d.ts} +42 -7
  203. package/dist/src/utils/key-visibility.d.ts.map +1 -0
  204. package/dist/src/utils/key-visibility.js +36 -0
  205. package/dist/src/utils/key-visibility.js.map +1 -0
  206. package/dist/src/utils/ordered-source.d.ts +1 -0
  207. package/dist/src/utils/ordered-source.d.ts.map +1 -1
  208. package/dist/src/utils/ordered-source.js +8 -3
  209. package/dist/src/utils/ordered-source.js.map +1 -1
  210. package/dist/src/utils/record-sources.d.ts +107 -0
  211. package/dist/src/utils/record-sources.d.ts.map +1 -0
  212. package/dist/src/utils/record-sources.js +132 -0
  213. package/dist/src/utils/record-sources.js.map +1 -0
  214. package/dist/test/allocation/allocation.examples.d.ts +2902 -0
  215. package/dist/test/allocation/allocation.examples.d.ts.map +1 -0
  216. package/dist/test/allocation/allocation.examples.js +643 -0
  217. package/dist/test/allocation/allocation.examples.js.map +1 -0
  218. package/dist/test/allocation/fit.examples.d.ts +546 -0
  219. package/dist/test/allocation/fit.examples.d.ts.map +1 -0
  220. package/dist/test/allocation/fit.examples.js +171 -0
  221. package/dist/test/allocation/fit.examples.js.map +1 -0
  222. package/dist/test/allocation/kiln-yard.d.ts +181 -0
  223. package/dist/test/allocation/kiln-yard.d.ts.map +1 -0
  224. package/dist/test/allocation/kiln-yard.js +228 -0
  225. package/dist/test/allocation/kiln-yard.js.map +1 -0
  226. package/dist/test/bind/data/data.examples.d.ts +651 -1
  227. package/dist/test/bind/data/data.examples.d.ts.map +1 -1
  228. package/dist/test/bind/data/data.examples.js +140 -2
  229. package/dist/test/bind/data/data.examples.js.map +1 -1
  230. package/dist/test/bind/func/func.examples.d.ts +10 -1
  231. package/dist/test/bind/func/func.examples.d.ts.map +1 -1
  232. package/dist/test/bind/func/func.examples.js +8 -1
  233. package/dist/test/bind/func/func.examples.js.map +1 -1
  234. package/dist/test/bind/record/record.examples.d.ts +633 -1
  235. package/dist/test/bind/record/record.examples.d.ts.map +1 -1
  236. package/dist/test/bind/record/record.examples.js +26 -2
  237. package/dist/test/bind/record/record.examples.js.map +1 -1
  238. package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
  239. package/dist/test/calendar/calendar-records.examples.js +18 -14
  240. package/dist/test/calendar/calendar-records.examples.js.map +1 -1
  241. package/dist/test/calendar/calendar.examples.d.ts +521 -16
  242. package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
  243. package/dist/test/calendar/calendar.examples.js +182 -135
  244. package/dist/test/calendar/calendar.examples.js.map +1 -1
  245. package/dist/test/examples-package.d.ts +75 -0
  246. package/dist/test/examples-package.d.ts.map +1 -0
  247. package/dist/test/examples-package.js +263 -0
  248. package/dist/test/examples-package.js.map +1 -0
  249. package/dist/test/flowchart/flowchart.examples.d.ts +211 -19
  250. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
  251. package/dist/test/flowchart/flowchart.examples.js +102 -75
  252. package/dist/test/flowchart/flowchart.examples.js.map +1 -1
  253. package/dist/test/plan/plan-events.examples.d.ts +1439 -209
  254. package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
  255. package/dist/test/plan/plan-events.examples.js +199 -59
  256. package/dist/test/plan/plan-events.examples.js.map +1 -1
  257. package/dist/test/plan/plan-records.examples.d.ts +420 -0
  258. package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
  259. package/dist/test/plan/plan-records.examples.js +70 -19
  260. package/dist/test/plan/plan-records.examples.js.map +1 -1
  261. package/dist/test/plan/plan-windows.examples.d.ts +636 -55
  262. package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
  263. package/dist/test/plan/plan-windows.examples.js +69 -33
  264. package/dist/test/plan/plan-windows.examples.js.map +1 -1
  265. package/dist/test/plan/plan.examples.d.ts +153 -31
  266. package/dist/test/plan/plan.examples.d.ts.map +1 -1
  267. package/dist/test/plan/plan.examples.js +178 -101
  268. package/dist/test/plan/plan.examples.js.map +1 -1
  269. package/dist/test/roster/domain.examples.d.ts +467 -250
  270. package/dist/test/roster/domain.examples.d.ts.map +1 -1
  271. package/dist/test/roster/domain.examples.js +92 -29
  272. package/dist/test/roster/domain.examples.js.map +1 -1
  273. package/dist/test/roster/roster-records.examples.d.ts +430 -586
  274. package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
  275. package/dist/test/roster/roster-records.examples.js +102 -43
  276. package/dist/test/roster/roster-records.examples.js.map +1 -1
  277. package/dist/test/roster/roster.examples.d.ts +2319 -606
  278. package/dist/test/roster/roster.examples.d.ts.map +1 -1
  279. package/dist/test/roster/roster.examples.js +456 -148
  280. package/dist/test/roster/roster.examples.js.map +1 -1
  281. package/dist/test/roster/warehouse.d.ts +172 -63
  282. package/dist/test/roster/warehouse.d.ts.map +1 -1
  283. package/dist/test/roster/warehouse.js +172 -39
  284. package/dist/test/roster/warehouse.js.map +1 -1
  285. package/dist/test/schedule/schedule.examples.d.ts +3499 -0
  286. package/dist/test/schedule/schedule.examples.d.ts.map +1 -0
  287. package/dist/test/schedule/schedule.examples.js +192 -0
  288. package/dist/test/schedule/schedule.examples.js.map +1 -0
  289. package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
  290. package/dist/test/sheet/sheet-records.examples.js +22 -18
  291. package/dist/test/sheet/sheet-records.examples.js.map +1 -1
  292. package/dist/test/sheet/sheet.examples.d.ts +715 -26
  293. package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
  294. package/dist/test/sheet/sheet.examples.js +204 -130
  295. package/dist/test/sheet/sheet.examples.js.map +1 -1
  296. package/package.json +17 -10
  297. package/dist/src/roster/people.d.ts +0 -50
  298. package/dist/src/roster/people.d.ts.map +0 -1
  299. package/dist/src/roster/people.js +0 -32
  300. package/dist/src/roster/people.js.map +0 -1
  301. package/dist/src/roster/visibility.d.ts.map +0 -1
  302. package/dist/src/roster/visibility.js +0 -25
  303. package/dist/src/roster/visibility.js.map +0 -1
@@ -44,18 +44,14 @@ import e3 from "@elaraai/e3";
44
44
  // planTargetState — the data flagship: series over ONE raw source, every row
45
45
  // kind, every series option, on a bounded canvas
46
46
  // ============================================================================
47
- /** A delivery on the horizon — the rows the slice narrows: when, which
48
- * hall, whether it is at risk of running late, and the sheets booked so far
49
- * (0 = nothing yet). */
47
+ /** A delivery on the horizon — the rows the slice's `deliveries` source
48
+ * narrows: when, which hall, whether it is at risk of running late, and the
49
+ * sheets booked so far (0 = nothing yet). */
50
50
  export const TargetHorizonRow = StructType({ key: StringType, at: DateTimeType, hall: StringType, risk: StringType, sheets: FloatType });
51
- /** How many deliveries the horizon holds — a small authored constant;
52
- * {@link planTargetHorizon} makes the rows. */
53
- export const planTargetHorizonCount = e3.input("plan_target_horizon_count", IntegerType, variant("value", 36n));
54
51
  /**
55
52
  * The horizon's deliveries, generated from their count and spread over
56
53
  * the 27 weeks from W21: every third at risk of running late (the `Late
57
- * risk` cohort counts 12 of 36), every seventh with no sheets booked yet (the
58
- * `Empty` cohort).
54
+ * risk` preset narrows to 12 of 36), every seventh with no sheets booked yet.
59
55
  */
60
56
  export const generateTargetHorizon = East.function([IntegerType], ArrayType(TargetHorizonRow), ($, count) => {
61
57
  // Monday of ISO week 1, 2026.
@@ -68,8 +64,21 @@ export const generateTargetHorizon = East.function([IntegerType], ArrayType(Targ
68
64
  sheets: i.remainder(7n).equal(6n).ifElse(() => 0.0, () => i.multiply(11n).remainder(40n).toFloat().add(20.0)),
69
65
  }));
70
66
  });
71
- /** The task that generates the horizon — its output is the rows the slice narrows. */
72
- export const planTargetHorizon = e3.task("plan_target_horizon", [planTargetHorizonCount], generateTargetHorizon);
67
+ /**
68
+ * The horizon's 36 deliveries, a record seeded from the generator: what the
69
+ * flagship's Deliveries tab lists, the rail's `deliveries` source narrowing
70
+ * them by hall and risk, its range the canvas's window (#1344).
71
+ */
72
+ export const planTargetDeliveries = e3.record("plan_target_deliveries", DictType(StringType, TargetHorizonRow), East.compile(East.function([IntegerType], DictType(StringType, TargetHorizonRow), ($, count) => {
73
+ const generate = $.const(generateTargetHorizon);
74
+ return generate(count).toDict((_$2, delivery) => delivery.key, (_$2, delivery) => delivery);
75
+ }), [])(36n));
76
+ // The deliveries through their indexes, each ending at the delivery's instant, so every narrowing — a hall, a
77
+ // risk, both — holds the window too.
78
+ export const planTargetDeliveriesByAt = e3.recordIndex("plan_target_deliveries_by_at", planTargetDeliveries, { on: ["at"] });
79
+ export const planTargetDeliveriesByRiskAt = e3.recordIndex("plan_target_deliveries_by_risk_at", planTargetDeliveries, { on: ["risk", "at"] });
80
+ export const planTargetDeliveriesByHallAt = e3.recordIndex("plan_target_deliveries_by_hall_at", planTargetDeliveries, { on: ["hall", "at"] });
81
+ export const planTargetDeliveriesByHallRiskAt = e3.recordIndex("plan_target_deliveries_by_hall_risk_at", planTargetDeliveries, { on: ["hall", "risk", "at"] });
73
82
  /** A job on a press — the RAW record an ops dataset stores: its phase and
74
83
  * optional job ticket, its window, optional sheets, lifecycle state and alert. */
75
84
  export const TargetJob = StructType({
@@ -395,8 +404,12 @@ export const planTargetOps = e3.input("plan_target_ops", DictType(StringType, Ta
395
404
  * expand the KPI, and a readout says what the state holds.
396
405
  * - **Popover, hover and every callback** over the element refs and row ids,
397
406
  * a section's strip among them (`Plan.sectionRef`).
398
- * - **The slice** over a horizon an e3 task generates (cohort, filter, search,
399
- * range, resolution, brush, summary), and the status footer.
407
+ * - **One rail** (`Slice.bindRecords`, #1344) over the horizon's deliveries, a
408
+ * record of their own: its `deliveries` source narrows the library's
409
+ * Deliveries tab by hall and risk, under two presets, and its range is the
410
+ * canvas's window — the toolbar's dates, the resolution and the horizon
411
+ * brush write it, and the summary counts the deliveries in it. The status
412
+ * footer.
400
413
  * - **A bounded host**: the Plan fills it (`style.height: "fill"`), and the
401
414
  * canvas scrolls its own rows in main.
402
415
  * - **Its narrow layout**: below 480px of CONTAINER width — a phone, a pane, a
@@ -410,7 +423,7 @@ export const planTargetState = example({
410
423
  "span", "run", "group", "groups", "strip", "section", "heat", "buckets", "cards", "chip", "events", "mark", "chart",
411
424
  "table", "views", "rows", "layers", "rollup", "union", "byStatus", "bands", "footer", "milestone",
412
425
  "decision", "exception", "pinned", "port", "hovercard", "popover", "hover",
413
- "slice", "brush", "horizon", "toolbar", "affordances", "cohort", "filter", "search", "summary",
426
+ "slice", "Slice.bindRecords", "source", "Data.bindPaged", "recordIndex", "presets", "brush", "horizon", "toolbar", "affordances", "summary", "#1344",
414
427
  "expand", "expandRender", "expandGutter", "keep", "dim", "off", "collapse", "context strip",
415
428
  "resolver", "data-driven", "accessor", "raw", "target state", "flagship",
416
429
  "layout", "row id", "Plan.ref", "Plan.sectionRef", "links", "link", "focus", "quantity", "Plan.quantity", "unit",
@@ -425,7 +438,7 @@ export const planTargetState = example({
425
438
  "ui", "UiState", "Plan.uiState", "State.bind", "controlled", "selected", "fold", "open", "charts",
426
439
  "scroll to row", "external", "write back", "Select", "Button",
427
440
  "fill", "height", "bounded", "Box", "scroll", "virtual", "virtualization", "id",
428
- "Reactive", "Data.bind", "bound", "e3.input", "e3.task", "generated", "dataset", "#822", "#824", "#590", "#320",
441
+ "Reactive", "Data.bind", "bound", "e3.input", "e3.record", "generated", "dataset", "#822", "#824", "#590", "#320",
429
442
  "state", "event", "label", "format", "readings", "variant", "row", "sub", "spark", "expanded", "R2", "markKind", "applied",
430
443
  "Planner", "Roster", "mixed", "unbucketed", "sum per unit", "Series", "one source", "one-off", "subtree", "parent",
431
444
  "step down", "nesting", "Pick", "Panel", "panel", "pickItems", "kind icon", "toggle", "show", "hide", "choose",
@@ -434,15 +447,15 @@ export const planTargetState = example({
434
447
  "narrow", "mobile", "phone", "responsive", "compact", "container", "breakpoint", "tabs", "Groups", "Rows", "Measures",
435
448
  "hottest", "two-finger", "pan", "review", "§10",
436
449
  ],
437
- description: "The data flagship — every row kind on one axis from one raw ops source bound from e3, grouped by hall in one data step: a pinned KPI, bucket rows derived and stored in lanes, a group strip per hall, span rows with proposal flavours, decisions and ports, contracts rolling up by union and by status, links weighed by quantity, a collapsed section, cards and event rows, a table, a views series and literal rows; expand in place on a row of every kind, the series picked in the library's Series tab, a bound ui state the host drives beside the frame, popover, hover and every callback, slice chrome over a horizon an e3 task generates, and the Plan filling a bounded host; in a box under 480px the same canvas is its narrow layout (Groups · Rows · Measures)",
450
+ description: "The data flagship — every row kind on one axis from one raw ops source bound from e3, grouped by hall in one data step: a pinned KPI, bucket rows derived and stored in lanes, a group strip per hall, span rows with proposal flavours, decisions and ports, contracts rolling up by union and by status, links weighed by quantity, a collapsed section, cards and event rows, a table, a views series and literal rows; expand in place on a row of every kind, the series picked in the library's Series tab, a bound ui state the host drives beside the frame, popover, hover and every callback, one Slice.bindRecords rail whose deliveries source narrows the Deliveries tab and holds the window, and the Plan filling a bounded host; in a box under 480px the same canvas is its narrow layout (Groups · Rows · Measures)",
438
451
  fn: East.function([], UIComponentType, (_$) => {
439
452
  return (_jsx(Reactive, { children: $ => {
440
453
  // The ONE ops source, bound from e3 — every series reads it.
441
454
  const ops = $.let(Data.bind(planTargetOps));
442
- // The horizon the slice narrows — the deliveries a task
443
- // generates (the canvas rows are the ops source; the slice is
444
- // chrome over THESE).
445
- const horizon = $.let(Data.bind(planTargetHorizon));
455
+ // The horizon's deliveries — a record of their own, which the
456
+ // library's Deliveries tab lists, read whole beside the rail's
457
+ // pages of them (the canvas rows are the ops source).
458
+ const deliveries = $.let(Data.bind(planTargetDeliveries));
446
459
  // Monday of ISO week n, 2026 (W1 Monday = 2025-12-29). The
447
460
  // window is W27–W38 (half-open at W39); now = W31.
448
461
  const week = $.const(East.function([IntegerType], DateTimeType, ($2, n) => {
@@ -744,24 +757,26 @@ export const planTargetState = example({
744
757
  window: { min: week(27n), max: week(39n) },
745
758
  resolution: "week", resolutions: ["month", "week", "day"], now: week(31n),
746
759
  }));
747
- // The toolbar is SEEDED slice state: the applied window is the
748
- // range chip (`JUN 29 – SEP 20 · 84d`), and two saved cohorts sit
749
- // beside the filter builder with `Late risk` active — their
750
- // counts are live over the horizon, never printed. A slice range
751
- // is CLOSED — both ends inclusive — so the twelve weeks W27–W38
752
- // end the millisecond before W39.
753
- const slice = $.let(Slice.bind("ex.plan.target", horizon.read(), {
754
- fields: {
755
- at: { label: "Delivered", format: { date: "MMM D" } },
756
- hall: { label: "Hall" },
757
- risk: { label: "Risk", hints: ["late", "on-time"] },
758
- sheets: { label: "Sheets" },
760
+ // One rail (#1344): its `deliveries` source narrows the
761
+ // Deliveries tab by hall and risk, each through the record's
762
+ // index, and its range — the delivery's instant — is the canvas's
763
+ // window, W27 to W39 (half-open) as the axis states it. The two
764
+ // presets narrow the deliveries and keep the window.
765
+ const slice = $.let(Slice.bindRecords("ex.plan.target", {
766
+ deliveries: {
767
+ source: Data.bindPaged(planTargetDeliveries, { indexes: [planTargetDeliveriesByAt, planTargetDeliveriesByRiskAt, planTargetDeliveriesByHallAt, planTargetDeliveriesByHallRiskAt] }),
768
+ label: "Deliveries", icon: { prefix: "fas", name: "truck" },
769
+ fields: {
770
+ hall: { label: "Hall", hints: ["Hall 1", "Hall 2"] },
771
+ risk: { label: "Risk", hints: ["late", "on-time"] },
772
+ at: { label: "Delivered", format: { date: "MMM D" } },
773
+ },
774
+ range: "at", search: [],
759
775
  },
760
- range: "at", search: "hall",
761
- initial: { at: { from: week(27n), to: week(39n).addMilliseconds(-1n) } },
776
+ }, {
762
777
  presets: [
763
- { id: "late", name: "Late risk", where: { risk: ["late"] }, active: true },
764
- { id: "empty", name: "Empty", where: { sheets: { lte: 0.0 } } },
778
+ { id: "late", name: "Late risk", where: { deliveries: { risk: ["late"] } } },
779
+ { id: "hall2", name: "Hall 2", where: { deliveries: { hall: ["Hall 2"] } } },
765
780
  ],
766
781
  }));
767
782
  // ── Expand in place ────────────────────────────────────────
@@ -876,7 +891,7 @@ export const planTargetState = example({
876
891
  some: (_$2, id) => East.print(id),
877
892
  none: (_$2) => "nothing",
878
893
  }), StringType);
879
- return (_jsxs(VStack, { gap: "2", align: "stretch", children: [_jsxs(HStack, { gap: "2", children: [_jsx(Select, { value: "H3-P22", onChange: goTo, size: "sm", items: keys.map((_$2, k) => Select.Item(k, East.str `Go to ${k}`)) }), _jsx(Button, { size: "xs", onClick: foldAll, children: "Fold halls" }), _jsx(Button, { size: "xs", onClick: openAll, children: "Open halls" }), _jsx(Button, { size: "xs", onClick: chart, children: "On-time chart" })] }), _jsx(Box, { height: "720px", children: _jsx(Plan, { id: "target", slice: { slice, affordances: ["cohort", "filter", "search", "range", "resolution", "brush", "summary"] }, axis: axis,
894
+ return (_jsxs(VStack, { gap: "2", align: "stretch", children: [_jsxs(HStack, { gap: "2", children: [_jsx(Select, { value: "H3-P22", onChange: goTo, size: "sm", items: keys.map((_$2, k) => Select.Item(k, East.str `Go to ${k}`)) }), _jsx(Button, { size: "xs", onClick: foldAll, children: "Fold halls" }), _jsx(Button, { size: "xs", onClick: openAll, children: "Open halls" }), _jsx(Button, { size: "xs", onClick: chart, children: "On-time chart" })] }), _jsx(Box, { height: "720px", children: _jsx(Plan, { id: "target", slice: { slice }, axis: axis,
880
895
  // The link graph (R1) — the edges cover the routing
881
896
  // permutations: forward, a same-row seam feed,
882
897
  // loopbacks, a rising loop and a landing past the
@@ -898,7 +913,19 @@ export const planTargetState = example({
898
913
  to: Plan.ref("presses", "Hall 1", "H1-P04"), toRun: "proof",
899
914
  quantity: Plan.quantity(24, { unit: "k sheets", text: "−24 k sheets" }),
900
915
  }),
901
- ], data: rows, pick: shown, library: [Plan.library.series()], ui: ui, expandRender: expandRender, expandGutter: expandGutter, popover: popover, hover: hover, onSelect: onRow, onElementClick: onElementClick, onGroupToggle: onGroupToggle, onGrainChange: onGrainChange, footer: [
916
+ ], data: rows, pick: shown,
917
+ // The series, and the deliveries in the window: the
918
+ // tab follows the rail's `deliveries` source.
919
+ library: [
920
+ Plan.library.series(),
921
+ Plan.library.tab(deliveries.read(), {
922
+ name: "Deliveries", icon: "truck",
923
+ label: d => East.str `Delivery ${d.key}`,
924
+ meta: d => some(East.str `${d.hall} · ${d.risk}`),
925
+ group: d => d.hall,
926
+ source: "deliveries",
927
+ }),
928
+ ], ui: ui, expandRender: expandRender, expandGutter: expandGutter, popover: popover, hover: hover, onSelect: onRow, onElementClick: onElementClick, onGroupToggle: onGroupToggle, onGrainChange: onGrainChange, footer: [
902
929
  { text: "512 RESOURCES · 12 GROUPS · 3 IN VIEW" },
903
930
  { text: "318 OBSERVED · 966 PLANNED" },
904
931
  { text: "3 EXCEPTIONS", tone: "warning" },
@@ -1350,8 +1377,29 @@ export const planMeasureReadings = e3.input("plan_measure_readings", DictType(St
1350
1377
  readings: [some(420.0), some(398.0), some(376.0), some(354.0), some(332.0), some(310.0), some(288.0), some(266.0), some(244.0), some(222.0), some(200.0), some(178.0)],
1351
1378
  second: [], lo: [], hi: [], segments: [], children: new Map() }],
1352
1379
  ])));
1353
- /** A week the canvas shows — the rows its slice narrows. */
1354
- export const MeasureWeek = StructType({ week: DateTimeType });
1380
+ /** A week the readings cover: its first instant, and its name. */
1381
+ export const MeasureWeek = StructType({ week: DateTimeType, label: StringType });
1382
+ /**
1383
+ * The twelve weeks the readings cover, W23–W34 — a record of their own, which
1384
+ * the library's Weeks tab lists, the rail's `weeks` source holding the
1385
+ * canvas's window in its range (#1344).
1386
+ */
1387
+ export const planMeasureWeeks = e3.record("plan_measure_weeks", DictType(StringType, MeasureWeek), new Map([
1388
+ ["W23", { week: new Date("2026-06-01T00:00:00Z"), label: "W23 · 1 Jun" }],
1389
+ ["W24", { week: new Date("2026-06-08T00:00:00Z"), label: "W24 · 8 Jun" }],
1390
+ ["W25", { week: new Date("2026-06-15T00:00:00Z"), label: "W25 · 15 Jun" }],
1391
+ ["W26", { week: new Date("2026-06-22T00:00:00Z"), label: "W26 · 22 Jun" }],
1392
+ ["W27", { week: new Date("2026-06-29T00:00:00Z"), label: "W27 · 29 Jun" }],
1393
+ ["W28", { week: new Date("2026-07-06T00:00:00Z"), label: "W28 · 6 Jul" }],
1394
+ ["W29", { week: new Date("2026-07-13T00:00:00Z"), label: "W29 · 13 Jul" }],
1395
+ ["W30", { week: new Date("2026-07-20T00:00:00Z"), label: "W30 · 20 Jul" }],
1396
+ ["W31", { week: new Date("2026-07-27T00:00:00Z"), label: "W31 · 27 Jul" }],
1397
+ ["W32", { week: new Date("2026-08-03T00:00:00Z"), label: "W32 · 3 Aug" }],
1398
+ ["W33", { week: new Date("2026-08-10T00:00:00Z"), label: "W33 · 10 Aug" }],
1399
+ ["W34", { week: new Date("2026-08-17T00:00:00Z"), label: "W34 · 17 Aug" }],
1400
+ ]));
1401
+ /** The weeks by their first instant: what the window narrows them through. */
1402
+ export const planMeasureWeeksByWeek = e3.recordIndex("plan_measure_weeks_by_week", planMeasureWeeks, { on: ["week"] });
1355
1403
  /**
1356
1404
  * Measure rows — the chart, heat and table grammars over weekly readings, and
1357
1405
  * the temporal fold (#824) that shows them at whatever resolution the slice
@@ -1377,11 +1425,12 @@ export const MeasureWeek = StructType({ week: DateTimeType });
1377
1425
  * emphasis with a negative and the em-dash, and multi-value positions —
1378
1426
  * strong and muted, signed, `rollup` — in every split × gutter combination.
1379
1427
  *
1380
- * The switch is the toolbar's (#1258): a slice bound over the weeks the
1381
- * canvas shows declares the `resolution` affordance, and the axis the
1382
- * resolutions it offers, so the toolbar's segment switches MONTH and WEEK. A
1383
- * switch keeps the canvas's column count — three months, then the first three
1384
- * weeks — and the horizon brush moves the window across the twelve.
1428
+ * The switch is the toolbar's (#1258): the axis declares the resolutions it
1429
+ * offers, so the toolbar's segment switches MONTH and WEEK, folding the
1430
+ * window's weeks again. The window is one rail's (`Slice.bindRecords`,
1431
+ * #1344): its `weeks` source — the weeks the readings cover, a record of
1432
+ * their own, which the library's Weeks tab lists — holds it in its range, so
1433
+ * the horizon brush moves it across the twelve, and holds the resolution.
1385
1434
  */
1386
1435
  export const planMeasures = example({
1387
1436
  keywords: [
@@ -1393,13 +1442,15 @@ export const planMeasures = example({
1393
1442
  "em-dash", "neg", "tableSeries", "split", "horizontal", "vertical", "multi-value", "multi-cell", "two-line",
1394
1443
  "strong", "muted", "rollup", "mirror", "position", "fold", "temporal fold", "resolution", "week", "month",
1395
1444
  "rebucket", "bucket", "max", "last", "count", "default", "override", "layer", "Plan.layer", "column",
1396
- "line", "Slice", "Slice.bind", "affordances", "toolbar", "range", "brush", "section", "match", "gutter",
1397
- "raw", "readings", "Reactive", "Data.bind", "bound", "e3.input", "#824", "#1258",
1445
+ "line", "Slice", "Slice.bindRecords", "source", "Data.bindPaged", "recordIndex", "toolbar", "range", "brush", "section", "match", "gutter",
1446
+ "raw", "readings", "Reactive", "Data.bind", "bound", "e3.input", "e3.record", "library", "Plan.library.tab", "#824", "#1258", "#1344",
1398
1447
  ],
1399
- description: "Measure rows over weekly readings bound from e3, at MONTH to start — chart rows (a line with its breach, an area, stacked columns, a scatter, every annotation, and a fixed dual-axis composition with its band and swatches), heat rows (colour depth under a hall averaging its presses on its scale with the no-data hatch, weight bars with a planned tail, status segments) and table rows (subtotals at every depth, footer emphasis with a negative and the em-dash, multi-value positions in every split × gutter combination); each row folds a month's weeks by what its values mean, or by its override (peak load by max, a running total and the paper stock by last, the dual chart's columns by mean), and the toolbar's resolution segment, over a slice of the weeks shown, switches MONTH and WEEK",
1448
+ description: "Measure rows over weekly readings bound from e3, at MONTH to start — chart rows (a line with its breach, an area, stacked columns, a scatter, every annotation, and a fixed dual-axis composition with its band and swatches), heat rows (colour depth under a hall averaging its presses on its scale with the no-data hatch, weight bars with a planned tail, status segments) and table rows (subtotals at every depth, footer emphasis with a negative and the em-dash, multi-value positions in every split × gutter combination); each row folds a month's weeks by what its values mean, or by its override (peak load by max, a running total and the paper stock by last, the dual chart's columns by mean), the toolbar's resolution segment switches MONTH and WEEK, and one Slice.bindRecords rail's weeks source, which the Weeks tab lists, holds the window the horizon brush moves",
1400
1449
  fn: East.function([], UIComponentType, (_$) => {
1401
1450
  return (_jsx(Reactive, { children: $ => {
1402
1451
  const measures = $.let(Data.bind(planMeasureReadings));
1452
+ // The weeks the readings cover, which the Weeks tab lists, read whole beside the rail's pages of them.
1453
+ const weeks = $.let(Data.bind(planMeasureWeeks));
1403
1454
  // Monday of ISO week n, 2026 — twelve weeks, W23–W34.
1404
1455
  const week = $.const(East.function([IntegerType], DateTimeType, ($, n) => {
1405
1456
  const w1 = $.const(new Date("2025-12-29T00:00:00Z"), DateTimeType);
@@ -1665,22 +1716,20 @@ export const planMeasures = example({
1665
1716
  }),
1666
1717
  ]),
1667
1718
  ], ArrayType(Plan.Types.Series(Measure)));
1668
- // The weeks the canvas shows — the rows its slice narrows.
1669
- const weeks = $.let(East.Array.generate(12n, MeasureWeek, (_$2, i) => ({ week: week(i.add(23n)) })));
1670
- // The resolution is the slice's, MONTH to start, and the window
1671
- // its range. A slice range is CLOSED — both ends inclusive — so
1672
- // the twelve weeks W23–W34 end the millisecond before W35.
1673
- const slice = $.let(Slice.bind("ex.plan.measures", weeks, {
1674
- fields: { week: { label: "Week", format: { date: "MMM D" } } },
1675
- range: "week",
1676
- initial: { week: { from: week(23n), to: week(35n).addMilliseconds(-1n) } },
1677
- view: { resolution: some(variant("month", null)) },
1719
+ // One rail (#1344): its `weeks` source holds the window, W23 to
1720
+ // W35 (half-open) as the axis states it, in its range, and the
1721
+ // resolution, MONTH to start; the Weeks tab lists the weeks in it.
1722
+ const slice = $.let(Slice.bindRecords("ex.plan.measures", {
1723
+ weeks: {
1724
+ source: Data.bindPaged(planMeasureWeeks, { indexes: [planMeasureWeeksByWeek] }),
1725
+ label: "Weeks", fields: { week: { label: "Week", format: { date: "MMM D" } } }, range: "week",
1726
+ },
1678
1727
  }));
1679
1728
  const axis = $.const(Plan.axis({
1680
1729
  window: { min: week(23n), max: week(35n) },
1681
1730
  resolution: "month", resolutions: ["month", "week"], now: week(27n),
1682
1731
  }));
1683
- return (_jsx(Plan, { axis: axis, data: measures, series: series, slice: { slice, affordances: ["range", "resolution", "brush"] } }));
1732
+ return (_jsx(Plan, { axis: axis, data: measures, series: series, slice: { slice }, library: [Plan.library.tab(weeks.read(), { name: "Weeks", icon: "calendar-week", label: w => w.label, source: "weeks" })] }));
1684
1733
  } }));
1685
1734
  }),
1686
1735
  inputs: [],
@@ -2086,8 +2135,6 @@ export const planRowDrop = example({
2086
2135
  // ============================================================================
2087
2136
  /** An order on the horizon — its day (an integer day index) and its hall. */
2088
2137
  export const NumberHorizonRow = StructType({ key: StringType, day: IntegerType, hall: StringType });
2089
- /** How many orders the horizon holds; {@link planNumberHorizon} makes them. */
2090
- export const planNumberHorizonCount = e3.input("plan_number_horizon_count", IntegerType, variant("value", 24n));
2091
2138
  /** The horizon's orders, generated from their count — two a day from day 1,
2092
2139
  * the halls in turn: twelve days behind an eight-day window. */
2093
2140
  export const generateNumberHorizon = East.function([IntegerType], ArrayType(NumberHorizonRow), (_$, count) => East.Array.generate(count, NumberHorizonRow, (_$2, i) => ({
@@ -2095,8 +2142,18 @@ export const generateNumberHorizon = East.function([IntegerType], ArrayType(Numb
2095
2142
  day: i.divide(2n).add(1n),
2096
2143
  hall: i.remainder(2n).equal(0n).ifElse(() => "Hall 1", () => "Hall 2"),
2097
2144
  })));
2098
- /** The task that generates the horizon. */
2099
- export const planNumberHorizon = e3.task("plan_number_horizon", [planNumberHorizonCount], generateNumberHorizon);
2145
+ /**
2146
+ * The horizon's 24 orders, a record seeded from the generator: what the
2147
+ * number axis's Orders tab lists, the rail's `orders` source narrowing them by
2148
+ * hall, its integer range the canvas's window (#1344).
2149
+ */
2150
+ export const planNumberOrders = e3.record("plan_number_orders", DictType(StringType, NumberHorizonRow), East.compile(East.function([IntegerType], DictType(StringType, NumberHorizonRow), ($, count) => {
2151
+ const generate = $.const(generateNumberHorizon);
2152
+ return generate(count).toDict((_$2, order) => order.key, (_$2, order) => order);
2153
+ }), [])(24n));
2154
+ // The orders by their day, alone and after their hall: a hall's narrowing holds the window too.
2155
+ export const planNumberOrdersByDay = e3.recordIndex("plan_number_orders_by_day", planNumberOrders, { on: ["day"] });
2156
+ export const planNumberOrdersByHallDay = e3.recordIndex("plan_number_orders_by_hall_day", planNumberOrders, { on: ["hall", "day"] });
2100
2157
  /** A van drop — its day (a plain number), lane and lifecycle state. */
2101
2158
  export const NumberAlloc = StructType({ key: StringType, day: FloatType, lane: StringType, state: EventStateType });
2102
2159
  /** A job — its days. */
@@ -2198,24 +2255,28 @@ export const planNumberOps = e3.input("plan_number_ops", DictType(StringType, Nu
2198
2255
  * through the element builders (`Plan.run({ start: j.start })`), a chart
2199
2256
  * layer's numeric x accessor lands its columns on the same arm, `Plan.tableCells`
2200
2257
  * reads a numeric `at`, and the heat cells stored as RECORDS spell it out with
2201
- * the `number` arm. The slice's range field is an integer day, so the horizon
2202
- * brush and the range chip ride the slice's `integer` arm exactly as they ride
2203
- * `datetime` on a time axis — a closed range, so the eight days `[1, 9)` read
2204
- * `1–8`; there is no resolution segment — `step` is the declaration.
2258
+ * the `number` arm. One rail (`Slice.bindRecords`, #1344): its `orders`
2259
+ * source — twelve days of orders behind the eight-day window, a record of
2260
+ * their own — narrows the library's Orders tab by hall, and its range field is
2261
+ * an integer day, so the horizon brush and the range chip ride its `integer`
2262
+ * arm exactly as they ride `datetime` on a time axis — a half-open range, the
2263
+ * eight days `[1, 9)`; there is no resolution segment — `step` is the
2264
+ * declaration.
2205
2265
  */
2206
2266
  export const planNumberAxis = example({
2207
2267
  keywords: [
2208
2268
  "Plan", "axis", "number", "numeric", "step", "Plan.axis.number", "Plan.at", "instant",
2209
- "day", "AM", "PM", "lanes", "buckets", "Planner", "plannerPoint", "brush", "integer", "range", "inclusive",
2210
- "format", "now", "typed axis", "#631", "raw", "Data.bind", "bound", "e3.input", "e3.task",
2269
+ "day", "AM", "PM", "lanes", "buckets", "Planner", "plannerPoint", "brush", "integer", "range", "half-open",
2270
+ "format", "now", "typed axis", "#631", "raw", "Data.bind", "bound", "e3.input", "e3.record",
2271
+ "Slice.bindRecords", "source", "Data.bindPaged", "recordIndex", "library", "Plan.library.tab", "#1344",
2211
2272
  ],
2212
- description: "The number axis over rows bound from e3 — day 1..8 at step 1 with AM/PM lanes (the retired Planner's plannerPoint), every row kind on the numeric scale, the horizon brush over the slice's integer range, read inclusive",
2273
+ description: "The number axis over rows bound from e3 — day 1..8 at step 1 with AM/PM lanes (the retired Planner's plannerPoint), every row kind on the numeric scale; one Slice.bindRecords rail whose orders source narrows the Orders tab by hall and holds the window, the horizon brush over its integer range",
2213
2274
  fn: East.function([], UIComponentType, (_$) => {
2214
2275
  return (_jsx(Reactive, { children: $ => {
2215
2276
  const ops = $.let(Data.bind(planNumberOps));
2216
- // The slice's horizon — twelve days of orders behind an eight-day
2217
- // window, which a task generates.
2218
- const horizon = $.let(Data.bind(planNumberHorizon));
2277
+ // The horizon's orders — twelve days of them behind an eight-day
2278
+ // window, a record of their own, which the Orders tab lists.
2279
+ const orders = $.let(Data.bind(planNumberOrders));
2219
2280
  const series = $.const([
2220
2281
  Plan.series.section(NumberOpsRow, { key: "vans-local", title: "Deliveries · Local", meta: "2 rows" }, [
2221
2282
  Plan.series.buckets(NumberOpsRow, {
@@ -2271,19 +2332,30 @@ export const planNumberAxis = example({
2271
2332
  marks: r => r.marks.map((_$, m) => Plan.mark({ key: m.key, at: m.day, kind: "milestone", label: m.label })),
2272
2333
  }),
2273
2334
  ], ArrayType(Plan.Types.Series(NumberOpsRow)));
2274
- // The horizon's range field is an INTEGER day, so the brush, the
2275
- // range chip and the window keys write the slice's `integer` arm:
2276
- // a closed range, both ends inclusive — the eight days `[1, 9)`
2277
- // are `1–8`.
2278
- const slice = $.let(Slice.bind("ex.plan.number", horizon.read(), {
2279
- fields: { day: { label: "Day" }, hall: { label: "Hall" } },
2280
- range: "day", initial: { day: { from: 1n, to: 8n } },
2335
+ // The orders' range field is an INTEGER day, so the brush, the
2336
+ // range chip and the window keys write its `integer` arm: a
2337
+ // half-open range — the eight days `[1, 9)`.
2338
+ const slice = $.let(Slice.bindRecords("ex.plan.number", {
2339
+ orders: {
2340
+ source: Data.bindPaged(planNumberOrders, { indexes: [planNumberOrdersByDay, planNumberOrdersByHallDay] }),
2341
+ label: "Orders", icon: { prefix: "fas", name: "box" },
2342
+ fields: { hall: { label: "Hall", hints: ["Hall 1", "Hall 2"] }, day: { label: "Day" } },
2343
+ range: "day", search: [],
2344
+ },
2281
2345
  }));
2282
2346
  // The declaration: `[1, 9)` ÷ 1 = eight day columns, the divider at 5.
2283
2347
  const axis = $.const(Plan.axis.number({
2284
2348
  window: { min: 1, max: 9 }, step: 1, now: 5, format: Chart.format.number(),
2285
2349
  }));
2286
- return (_jsx(Plan, { axis: axis, data: ops, series: series, slice: { slice, affordances: ["filter", "range", "brush", "summary"] }, footer: [{ text: "8 STEPS · NOW 5" }] }));
2350
+ return (_jsx(Plan, { axis: axis, data: ops, series: series, slice: { slice },
2351
+ // The orders in the window: the tab follows the rail's `orders` source.
2352
+ library: [Plan.library.tab(orders.read(), {
2353
+ name: "Orders", icon: "box",
2354
+ label: o => East.str `Order ${o.key}`,
2355
+ meta: o => some(East.str `Day ${East.print(o.day)} · ${o.hall}`),
2356
+ group: o => o.hall,
2357
+ source: "orders",
2358
+ })], footer: [{ text: "8 STEPS · NOW 5" }] }));
2287
2359
  } }));
2288
2360
  }),
2289
2361
  inputs: [],
@@ -2449,34 +2521,39 @@ export const planOrdinalAxis = example({
2449
2521
  inputs: [],
2450
2522
  });
2451
2523
  // ============================================================================
2452
- // slicePlanChrome — a Plan with the `slice` chrome option
2453
- // Exercises: the rail on the timeline canvas (filter · search · range
2454
- // over the row type's datetime field) plus the horizon brush.
2524
+ // slicePlanChrome — a Plan narrowed through its one rail
2525
+ // Exercises: the rail on the timeline canvas — its `rows` source the
2526
+ // canvas's rows, by owner, over the tasks' interval index — plus the
2527
+ // horizon brush over its range.
2455
2528
  // ============================================================================
2456
2529
  /** A task on the plan — its owner and its window. */
2457
2530
  export const SliceJob = StructType({ task: StringType, owner: StringType, start: DateTimeType, end: DateTimeType });
2458
- /** The plan's tasks — the rows the slice narrows. */
2459
- export const planSliceJobs = e3.input("plan_slice_jobs", ArrayType(SliceJob), variant("value", [
2460
- { task: "Planning", owner: "Team A", start: new Date("2024-01-01T00:00:00Z"), end: new Date("2024-01-15T00:00:00Z") },
2461
- { task: "Design", owner: "Team B", start: new Date("2024-01-10T00:00:00Z"), end: new Date("2024-02-01T00:00:00Z") },
2462
- { task: "Development", owner: "Team C", start: new Date("2024-01-20T00:00:00Z"), end: new Date("2024-03-15T00:00:00Z") },
2463
- { task: "Testing", owner: "Team A", start: new Date("2024-03-01T00:00:00Z"), end: new Date("2024-03-30T00:00:00Z") },
2531
+ /** The plan's tasks, by name — a record of their own, the rows the slice's `rows` source narrows (#1344). */
2532
+ export const planSliceJobs = e3.record("plan_slice_jobs", DictType(StringType, SliceJob), new Map([
2533
+ ["Planning", { task: "Planning", owner: "Team A", start: new Date("2024-01-01T00:00:00Z"), end: new Date("2024-01-15T00:00:00Z") }],
2534
+ ["Design", { task: "Design", owner: "Team B", start: new Date("2024-01-10T00:00:00Z"), end: new Date("2024-02-01T00:00:00Z") }],
2535
+ ["Development", { task: "Development", owner: "Team C", start: new Date("2024-01-20T00:00:00Z"), end: new Date("2024-03-15T00:00:00Z") }],
2536
+ ["Testing", { task: "Testing", owner: "Team A", start: new Date("2024-03-01T00:00:00Z"), end: new Date("2024-03-30T00:00:00Z") }],
2464
2537
  ]));
2538
+ // The tasks over the interval each runs, alone and after its owner: the window reads every task overlapping it once,
2539
+ // and an owner's narrowing holds the window too.
2540
+ export const planSliceJobsByTime = e3.recordIndex("plan_slice_jobs_by_time", planSliceJobs, { interval: { from: "start", to: "end" } });
2541
+ export const planSliceJobsByOwnerTime = e3.recordIndex("plan_slice_jobs_by_owner_time", planSliceJobs, { on: ["owner"], interval: { from: "start", to: "end" } });
2465
2542
  export const slicePlanChrome = example({
2466
- keywords: ["Slice", "Plan", "slice", "chrome", "filter", "search", "range", "brush", "timeline", "Data.bind", "bound", "e3.input"],
2467
- description: "Ops plan — Plan with the `slice` chrome option over tasks bound from e3: a header rail (`filter`, `search`, `range`) plus the `brush` affordance — drag a window on the horizon strip to set the slice's range; rows fed explicitly via `Slice.rows` and re-keyed into the canvas's keyed collection",
2543
+ keywords: ["Slice", "Slice.bindRecords", "rows", "Plan", "slice", "rail", "filter", "range", "brush", "timeline", "Data.bindPaged", "recordIndex", "interval", "e3.record", "#1344"],
2544
+ description: "Ops plan — a Plan narrowed through one Slice.bindRecords rail over tasks bound from e3: its `rows` source gives the canvas its rows, paged through the tasks' interval index and narrowed by owner, and its range is the window — the toolbar's dates and the horizon brush write it",
2468
2545
  fn: East.function([], UIComponentType, (_$) => {
2469
2546
  return (_jsx(Reactive, { children: $ => {
2470
- const tasks = $.let(Data.bind(planSliceJobs));
2471
- const slice = $.let(Slice.bind("ex.slice.plan.chrome", tasks.read(), {
2472
- fields: { task: { label: "Task" }, owner: { label: "Owner" }, start: { label: "Start" } },
2473
- search: ["task", "owner"], range: "start",
2474
- initial: { owner: ["Team A"] },
2547
+ // One rail: its `rows` source pages the tasks onto the canvas, each task overlapping the window once.
2548
+ const slice = $.let(Slice.bindRecords("ex.slice.plan.chrome", {
2549
+ rows: {
2550
+ source: Data.bindPaged(planSliceJobs, { indexes: [planSliceJobsByTime, planSliceJobsByOwnerTime] }),
2551
+ label: "Tasks",
2552
+ fields: { owner: { label: "Owner", hints: ["Team A", "Team B", "Team C"] }, start: { label: "Start" } },
2553
+ range: "start", search: [],
2554
+ initial: { owner: ["Team A"] },
2555
+ },
2475
2556
  }));
2476
- // The narrowed rows re-key into the canvas's keyed collection
2477
- // (#568) — the task name is the row identity here.
2478
- const narrowed = $.let(Slice.rows(slice));
2479
- const jobs = $.let(narrowed.toDict((_$, j) => j.task, (_$, j) => j));
2480
2557
  const series = $.const([
2481
2558
  Plan.series.span(SliceJob, {
2482
2559
  key: "jobs", title: "Jobs",
@@ -2492,7 +2569,7 @@ export const slicePlanChrome = example({
2492
2569
  window: { min: new Date("2024-01-01"), max: new Date("2024-04-01") },
2493
2570
  resolution: "week", now: new Date("2024-01-20"),
2494
2571
  }));
2495
- return (_jsx(Plan, { axis: axis, data: jobs, series: series, slice: { slice, affordances: ["filter", "search", "range", "brush"] } }));
2572
+ return (_jsx(Plan, { axis: axis, series: series, slice: { slice, affordances: ["fields", "brush"] } }));
2496
2573
  } }));
2497
2574
  }),
2498
2575
  inputs: [],