@elaraai/e3-ui 1.0.94 → 1.0.96

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
@@ -0,0 +1,171 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import { ArrayType, DateTimeType, DictType, East, IntegerType, OptionType, SortedMap, StringType, StructType, compareFor, example, none, some, variant, } from "@elaraai/east";
6
+ import { Allocation } from "@elaraai/e3-ui";
7
+ /** A bin of a small yard's own: its bay, its time and its load, and the grade measured on arrival, which the board carries but never reads. */
8
+ export const GradeBin = StructType({ bay: StringType, at: DateTimeType, load: OptionType(StringType), grade: StringType });
9
+ /** One day of the yard's bins as the board reads them, and one of its bins. */
10
+ export const GradeDay = Allocation.Types.Day(GradeBin);
11
+ export const GradeBoardBin = Allocation.Types.Bin(GradeBin);
12
+ const byString = compareFor(StringType);
13
+ /** The plan day: Tue 11 May 2027. */
14
+ export const planDay = new Date("2027-05-11T00:00:00Z");
15
+ /** A small yard: two bays, three loads, and three kilns — K-1 with its next charge from Fri 21, K-2 free, K-3 drying until Fri 14. */
16
+ export const context = {
17
+ lanes: [{ key: "B-1", label: "B-1", offset: variant("minutes", 15) }, { key: "B-2", label: "B-2", offset: variant("minutes", 35) }],
18
+ every: variant("hours", 1),
19
+ arrivals: new SortedMap([
20
+ ["L-1", { key: "L-1", label: "L-1", meta: none, quantity: 12, hold: variant("days", 8), kind: some("MC12"), due: none, window: none, details: [] }],
21
+ ["L-2", { key: "L-2", label: "L-2", meta: none, quantity: 30, hold: variant("days", 6), kind: some("MC14"), due: none, window: none, details: [] }],
22
+ ["L-3", { key: "L-3", label: "L-3", meta: none, quantity: 8, hold: variant("days", 9), kind: some("MC12"), due: none, window: none, details: [] }],
23
+ ], byString),
24
+ resources: new SortedMap([
25
+ ["K-1", { key: "K-1", label: "K-1", group: some("Hall A"), meta: none, note: none, min: 10, max: 24, hold: variant("days", 8),
26
+ jobs: [{ label: "planned", start: new Date("2027-05-21T00:00:00Z"), end: new Date("2027-05-29T00:00:00Z") }] }],
27
+ ["K-2", { key: "K-2", label: "K-2", group: some("Bulk"), meta: none, note: none, min: 20, max: 32, hold: variant("days", 8), jobs: [] }],
28
+ ["K-3", { key: "K-3", label: "K-3", group: some("Hall A"), meta: none, note: none, min: 10, max: 24, hold: variant("days", 8),
29
+ jobs: [{ label: "C-1", start: new Date("2027-05-01T00:00:00Z"), end: new Date("2027-05-14T00:00:00Z") }] }],
30
+ ], byString),
31
+ rules: { under: true }, unit: "m³",
32
+ };
33
+ /** Tue 11's plan: L-1's 12 m³ in B-1 at 06:15, on K-1. */
34
+ export const plan = {
35
+ status: variant("draft", null),
36
+ bins: new SortedMap([
37
+ ["b1", { lane: "B-1", at: new Date("2027-05-11T06:15:00Z"), arrival: some("L-1"), quantity: 12, kind: some("MC12"), hold: variant("days", 8),
38
+ parts: new SortedMap([["K-1", 12]], byString), row: { bay: "B-1", at: new Date("2027-05-11T06:15:00Z"), load: some("L-1"), grade: "R1" } }],
39
+ ], byString),
40
+ };
41
+ /** The same day with two more bins drafted: L-2's 30 m³ with 26 on K-2, and L-3's 8 m³ on no kiln yet. */
42
+ export const drafted = {
43
+ status: variant("draft", null),
44
+ bins: new SortedMap([
45
+ ["b1", { lane: "B-1", at: new Date("2027-05-11T06:15:00Z"), arrival: some("L-1"), quantity: 12, kind: some("MC12"), hold: variant("days", 8),
46
+ parts: new SortedMap([["K-1", 12]], byString), row: { bay: "B-1", at: new Date("2027-05-11T06:15:00Z"), load: some("L-1"), grade: "R1" } }],
47
+ ["b2", { lane: "B-2", at: new Date("2027-05-11T07:35:00Z"), arrival: some("L-2"), quantity: 30, kind: some("MC14"), hold: variant("days", 6),
48
+ parts: new SortedMap([["K-2", 26]], byString), row: { bay: "B-2", at: new Date("2027-05-11T07:35:00Z"), load: some("L-2"), grade: "U1" } }],
49
+ ["b3", { lane: "B-1", at: new Date("2027-05-11T09:15:00Z"), arrival: some("L-3"), quantity: 8, kind: some("MC12"), hold: variant("days", 9),
50
+ parts: new SortedMap([], byString), row: { bay: "B-1", at: new Date("2027-05-11T09:15:00Z"), load: some("L-3"), grade: "P2" } }],
51
+ ], byString),
52
+ };
53
+ export const allocationDayLoads = example({
54
+ description: "Allocation.loads: every resource's load on the plan day — K-1 loading 12 m³, held to Wed 19 by its bin's 8-day hold; K-2 free; K-3 busy, a job covering the day's start",
55
+ keywords: ["Allocation", "Allocation.loads", "load", "fill", "hold", "free", "loading", "busy"], inputs: [plan, context],
56
+ returns: new SortedMap([
57
+ ["K-1", { resource: "K-1", fill: 12, bins: 1n, hold: some({ from: new Date("2027-05-11T00:00:00Z"), to: new Date("2027-05-19T00:00:00Z") }), state: variant("loading", null) }],
58
+ ["K-2", { resource: "K-2", fill: 0, bins: 0n, hold: none, state: variant("free", null) }],
59
+ ["K-3", { resource: "K-3", fill: 0, bins: 0n, hold: none, state: variant("busy", null) }],
60
+ ], byString),
61
+ fn: East.function([GradeDay, Allocation.Types.Context], DictType(StringType, Allocation.Types.Load), ($, plan, context) => {
62
+ const loads = $.const(Allocation.loads(GradeBin));
63
+ return loads(planDay, plan, context);
64
+ }),
65
+ });
66
+ export const allocationRules = example({
67
+ description: "Allocation.fit, the built-in rules, over the candidates of placing L-2's 30 m³ (Allocation.candidates: one per resource, in key order) — K-1 refused over its max, K-2 fits with an open gap, K-3 refused busy",
68
+ keywords: ["Allocation", "Allocation.fit", "Allocation.candidates", "candidate", "rules", "over max", "busy", "refused", "score"], inputs: [plan, context],
69
+ returns: [
70
+ variant("refused", { group: "Over max", reason: "over max by 18 m³", measure: variant("amount", { lead: "by", value: 18 }) }),
71
+ variant("fits", { score: 0.6975, why: "open gap · leaves 30 m³ · takes 20–32", warn: none }),
72
+ variant("refused", { group: "Busy", reason: "busy until Fri 14", measure: variant("day", { lead: "until", at: new Date("2027-05-14T00:00:00Z") }) }),
73
+ ],
74
+ fn: East.function([GradeDay, Allocation.Types.Context], ArrayType(Allocation.Types.Fit), ($, plan, context) => {
75
+ const candidates = $.const(Allocation.candidates(GradeBin));
76
+ const rule = $.const(Allocation.fit);
77
+ const request = $.const({ day: planDay, plan, ask: variant("place", { subject: variant("arrival", "L-2"), quantity: 30 }), context }, Allocation.Types.FitRequest(GradeBin));
78
+ return candidates(request).map(($2, candidate) => rule(candidate));
79
+ }),
80
+ });
81
+ export const allocationAnswerPlace = example({
82
+ description: "Allocation.answer over the built-in rules, placing L-3's 8 m³: a verdict per resource — K-1 fits best, beside a bin of its kind with a day spare before its next charge; K-2 fits under its minimum, a warning; K-3 refused busy",
83
+ keywords: ["Allocation", "Allocation.answer", "Allocation.fit", "fit", "place", "FitRequest", "FitResult", "under min", "e3.function"], inputs: [plan, context],
84
+ returns: {
85
+ ask: variant("place", { subject: variant("arrival", "L-3"), quantity: 8 }),
86
+ resources: new SortedMap([
87
+ ["K-1", variant("fits", { score: 1.0433333333333334, why: "1 d spare to Fri 21 · leaves 20 m³ · takes 10–24", warn: none })],
88
+ ["K-2", variant("fits", { score: -0.49, why: "open gap · leaves 8 m³ · min 20 · 12 short", warn: some("under min") })],
89
+ ["K-3", variant("refused", { group: "Busy", reason: "busy until Fri 14", measure: variant("day", { lead: "until", at: new Date("2027-05-14T00:00:00Z") }) })],
90
+ ], byString),
91
+ bins: new SortedMap([], byString),
92
+ arrivals: new SortedMap([], byString),
93
+ reserve: none, basis: "ranked by load, kind and spare days",
94
+ },
95
+ fn: East.function([GradeDay, Allocation.Types.Context], Allocation.Types.FitResult, ($, plan, context) => {
96
+ const answer = $.const(Allocation.answer(GradeBin));
97
+ const rule = $.const(Allocation.fit);
98
+ const request = $.const({ day: planDay, plan, ask: variant("place", { subject: variant("arrival", "L-3"), quantity: 8 }), context }, Allocation.Types.FitRequest(GradeBin));
99
+ return answer(request, rule, "ranked by load, kind and spare days");
100
+ }),
101
+ });
102
+ export const allocationAnswerTake = example({
103
+ description: "Allocation.answer for a take — what can K-1 take: a verdict for its bin, one for each arrival the plan has not booked (L-2 over its max, L-3 beside a bin of its kind) and one for reserving an empty slot",
104
+ keywords: ["Allocation", "Allocation.answer", "Allocation.fit", "fit", "take", "reserve", "FitResult", "bins", "arrivals"], inputs: [plan, context],
105
+ returns: {
106
+ ask: variant("take", { resource: "K-1" }),
107
+ resources: new SortedMap([], byString),
108
+ bins: new SortedMap([
109
+ ["b1", variant("fits", { score: 0.42, why: "2 d spare to Fri 21 · leaves 12 m³ · takes 10–24", warn: none })],
110
+ ], byString),
111
+ arrivals: new SortedMap([
112
+ ["L-2", variant("refused", { group: "Over max", reason: "over max by 18 m³", measure: variant("amount", { lead: "by", value: 18 }) })],
113
+ ["L-3", variant("fits", { score: 1.0433333333333334, why: "1 d spare to Fri 21 · leaves 20 m³ · takes 10–24", warn: none })],
114
+ ], byString),
115
+ reserve: some(variant("fits", { score: 0.32, why: "2 d spare to Fri 21 · leaves 12 m³ · takes 10–24", warn: none })),
116
+ basis: "ranked by load, kind and spare days",
117
+ },
118
+ fn: East.function([GradeDay, Allocation.Types.Context], Allocation.Types.FitResult, ($, plan, context) => {
119
+ const answer = $.const(Allocation.answer(GradeBin));
120
+ const rule = $.const(Allocation.fit);
121
+ const request = $.const({ day: planDay, plan, ask: variant("take", { resource: "K-1" }), context }, Allocation.Types.FitRequest(GradeBin));
122
+ return answer(request, rule, "ranked by load, kind and spare days");
123
+ }),
124
+ });
125
+ export const allocationLookahead = example({
126
+ description: "Allocation.lookahead over the built-in rules, as a fit's body: placing L-3 on K-2 would leave L-2 with nowhere to go, so that fit drops by one and says so; K-1's leaves room for L-2 on K-2 and stands",
127
+ keywords: ["Allocation", "Allocation.lookahead", "Allocation.answer", "Allocation.fit", "greedy", "look-ahead", "fit", "e3.function"], inputs: [plan, context],
128
+ returns: {
129
+ ask: variant("place", { subject: variant("arrival", "L-3"), quantity: 8 }),
130
+ resources: new SortedMap([
131
+ ["K-1", variant("fits", { score: 1.0433333333333334, why: "1 d spare to Fri 21 · leaves 20 m³ · takes 10–24", warn: none })],
132
+ ["K-2", variant("fits", { score: -1.49, why: "open gap · leaves 8 m³ · min 20 · 12 short · leaves 1 load with no fit", warn: some("under min") })],
133
+ ["K-3", variant("refused", { group: "Busy", reason: "busy until Fri 14", measure: variant("day", { lead: "until", at: new Date("2027-05-14T00:00:00Z") }) })],
134
+ ], byString),
135
+ bins: new SortedMap([], byString),
136
+ arrivals: new SortedMap([], byString),
137
+ reserve: none, basis: "ranked by load, kind and spare days, and what it leaves for the day's other loads",
138
+ },
139
+ fn: East.function([GradeDay, Allocation.Types.Context], Allocation.Types.FitResult, ($, plan, context) => {
140
+ const answer = $.const(Allocation.answer(GradeBin));
141
+ const rule = $.const(Allocation.fit);
142
+ const ahead = $.const(Allocation.lookahead(GradeBin));
143
+ const request = $.const({ day: planDay, plan, ask: variant("place", { subject: variant("arrival", "L-3"), quantity: 8 }), context }, Allocation.Types.FitRequest(GradeBin));
144
+ return answer(request, East.function([Allocation.Types.Candidate], Allocation.Types.Fit, (_$2, c) => ahead(request, c, rule)), "ranked by load, kind and spare days, and what it leaves for the day's other loads");
145
+ }),
146
+ });
147
+ export const allocationChecks = example({
148
+ description: "Allocation.check, the built-in checks, over a drafted day: L-3's bin on no resource yet, with its fix Choose a resource; L-2's with 4 m³ unallocated, with its fix Find a fit",
149
+ keywords: ["Allocation", "Allocation.check", "issues", "not linked", "unallocated", "split", "fix"], inputs: [drafted, context],
150
+ returns: [
151
+ { kind: variant("unlinked", null), tone: variant("warning", null), title: "L-3 · 8 m³", detail: "B-1 09:15 · no resource yet",
152
+ bin: some("b3"), resource: none, flag: none, fix: some(variant("choose", null)) },
153
+ { kind: variant("unallocated", null), tone: variant("warning", null), title: "L-2 · 30 m³", detail: "4 m³ unallocated · B-2 07:35",
154
+ bin: some("b2"), resource: none, flag: none, fix: some(variant("find", null)) },
155
+ ],
156
+ fn: East.function([GradeDay, Allocation.Types.Context], ArrayType(Allocation.Types.Issue), ($, plan, context) => {
157
+ const check = $.const(Allocation.check(GradeBin));
158
+ return check(planDay, plan, context);
159
+ }),
160
+ });
161
+ export const allocationSlots = example({
162
+ description: "Allocation.slots: the day's lane slots, one per lane per hour at its offset, in time then lane order — 48 for two bays — each free, booked or reserved; B-1 06:15 is booked with bin b1",
163
+ keywords: ["Allocation", "Allocation.slots", "slots", "lanes", "booked", "free", "reserved"], inputs: [plan, context],
164
+ returns: { slots: 48n, held: [{ lane: "B-1", at: new Date("2027-05-11T06:15:00Z"), status: variant("booked", null), bins: ["b1"] }] },
165
+ fn: East.function([GradeDay, Allocation.Types.Context], StructType({ slots: IntegerType, held: ArrayType(Allocation.Types.Slot) }), ($, plan, context) => {
166
+ const slots = $.const(Allocation.slots(GradeBin));
167
+ const all = $.const(slots(planDay, plan, context));
168
+ return { slots: all.size(), held: all.filter(($2, slot) => slot.status.hasTag("free").not()) };
169
+ }),
170
+ });
171
+ //# sourceMappingURL=fit.examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fit.examples.js","sourceRoot":"","sources":["../../../test/allocation/fit.examples.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACH,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,GAEhJ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,+IAA+I;AAC/I,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AAC3H,+EAA+E;AAC/E,MAAM,CAAC,MAAM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M,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;IACnG,CAAC,CAAC;CACL,CAAC,CAAC"}
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * The kiln yard, transcribed from docs/proposals/Allocation Spec.html into
7
+ * records of its own (#1371, `Builder Interfaces Spec.md` §6.5): its bins and
8
+ * the days of its plan, which the board writes, and its kilns, its loads and
9
+ * its bays, which it reads — three unloading bays in two areas, 33 drying
10
+ * kilns in six groups, the day's loads and Tue 11 May 2027's plan. Every name,
11
+ * code and figure is generated. Beside them, the board's reading of the plan
12
+ * day (`Allocation.Types.Day(KilnBin)`), each bin its roles and the yard's own
13
+ * row, which the pure functions' specs hold to the spec's worked facts (§0).
14
+ */
15
+ import { ArrayType, DateTimeType, DictType, FloatType, NullType, OptionType, SortedMap, StringType, StructType, VariantType, type ValueTypeOf } from "@elaraai/east";
16
+ /**
17
+ * A bin, the yard's own: where it is booked (its bay and its time), the load
18
+ * it books (none: a reservation), its m³, its spec, how long it dries and its
19
+ * split across kilns — the board's roles — and the yard's own fields beside
20
+ * them: the moisture target and grade booked, and as measured on arrival, and
21
+ * its loading instruction.
22
+ */
23
+ export declare const KilnBin: StructType<{
24
+ readonly bay: StringType;
25
+ readonly at: DateTimeType;
26
+ readonly load: OptionType<StringType>;
27
+ readonly m3: FloatType;
28
+ readonly spec: OptionType<StringType>;
29
+ readonly dryFor: VariantType<{
30
+ readonly minutes: FloatType;
31
+ readonly hours: FloatType;
32
+ readonly days: FloatType;
33
+ readonly weeks: FloatType;
34
+ readonly months: FloatType;
35
+ }>;
36
+ readonly kilns: DictType<StringType, FloatType>;
37
+ readonly specBooked: StringType;
38
+ readonly specMeasured: StringType;
39
+ readonly gradeBooked: StringType;
40
+ readonly gradeMeasured: StringType;
41
+ readonly instruction: OptionType<StringType>;
42
+ }>;
43
+ /** A day of the yard's plan: a draft, or issued and when. */
44
+ export declare const YardDay: StructType<{
45
+ readonly state: VariantType<{
46
+ readonly draft: NullType;
47
+ readonly issued: StructType<{
48
+ readonly at: DateTimeType;
49
+ }>;
50
+ }>;
51
+ }>;
52
+ /** A bin of the smallest board's: the board's roles alone — its bay, its time, its load, its m³, its split across kilns and how long it dries. */
53
+ export declare const MinimalBin: StructType<{
54
+ readonly bay: StringType;
55
+ readonly at: DateTimeType;
56
+ readonly load: OptionType<StringType>;
57
+ readonly m3: FloatType;
58
+ readonly kilns: DictType<StringType, FloatType>;
59
+ readonly dryFor: VariantType<{
60
+ readonly minutes: FloatType;
61
+ readonly hours: FloatType;
62
+ readonly days: FloatType;
63
+ readonly weeks: FloatType;
64
+ readonly months: FloatType;
65
+ }>;
66
+ }>;
67
+ /** A drying kiln: its range, the days it usually dries for, and its charges — the one drying now and the next planned. */
68
+ export declare const Kiln: StructType<{
69
+ readonly name: StringType;
70
+ readonly group: StringType;
71
+ readonly min: FloatType;
72
+ readonly max: FloatType;
73
+ readonly days: FloatType;
74
+ readonly note: OptionType<StringType>;
75
+ readonly charges: ArrayType<StructType<{
76
+ readonly label: StringType;
77
+ readonly start: DateTimeType;
78
+ readonly end: DateTimeType;
79
+ }>>;
80
+ }>;
81
+ /** An unloading bay: its name, the yard area it stands in, whether it is covered or open, and how far past each hour it takes its bin. */
82
+ export declare const Bay: StructType<{
83
+ readonly name: StringType;
84
+ readonly area: StringType;
85
+ readonly cover: StringType;
86
+ readonly offset: VariantType<{
87
+ readonly minutes: FloatType;
88
+ readonly hours: FloatType;
89
+ readonly days: FloatType;
90
+ readonly weeks: FloatType;
91
+ readonly months: FloatType;
92
+ }>;
93
+ }>;
94
+ /** A load of sawn timber on its way from a mill. */
95
+ export declare const TimberLoad: StructType<{
96
+ readonly code: StringType;
97
+ readonly mill: StringType;
98
+ readonly spec: StringType;
99
+ readonly grade: StringType;
100
+ readonly m3: FloatType;
101
+ readonly dryingDays: FloatType;
102
+ readonly due: DateTimeType;
103
+ readonly from: DateTimeType;
104
+ readonly to: DateTimeType;
105
+ readonly schedule: StringType;
106
+ readonly instruction: OptionType<StringType>;
107
+ }>;
108
+ /** The board's reading of a bin of the yard's: its roles, and the yard's own row. */
109
+ export declare const YardBin: import("../../src/internal.js").AllocationBinType<StructType<{
110
+ readonly bay: StringType;
111
+ readonly at: DateTimeType;
112
+ readonly load: OptionType<StringType>;
113
+ readonly m3: FloatType;
114
+ readonly spec: OptionType<StringType>;
115
+ readonly dryFor: VariantType<{
116
+ readonly minutes: FloatType;
117
+ readonly hours: FloatType;
118
+ readonly days: FloatType;
119
+ readonly weeks: FloatType;
120
+ readonly months: FloatType;
121
+ }>;
122
+ readonly kilns: DictType<StringType, FloatType>;
123
+ readonly specBooked: StringType;
124
+ readonly specMeasured: StringType;
125
+ readonly gradeBooked: StringType;
126
+ readonly gradeMeasured: StringType;
127
+ readonly instruction: OptionType<StringType>;
128
+ }>>;
129
+ /** The board's reading of a day of the yard's: its status, and its bins. */
130
+ export declare const YardPlan: import("../../src/internal.js").AllocationDayType<StructType<{
131
+ readonly bay: StringType;
132
+ readonly at: DateTimeType;
133
+ readonly load: OptionType<StringType>;
134
+ readonly m3: FloatType;
135
+ readonly spec: OptionType<StringType>;
136
+ readonly dryFor: VariantType<{
137
+ readonly minutes: FloatType;
138
+ readonly hours: FloatType;
139
+ readonly days: FloatType;
140
+ readonly weeks: FloatType;
141
+ readonly months: FloatType;
142
+ }>;
143
+ readonly kilns: DictType<StringType, FloatType>;
144
+ readonly specBooked: StringType;
145
+ readonly specMeasured: StringType;
146
+ readonly gradeBooked: StringType;
147
+ readonly gradeMeasured: StringType;
148
+ readonly instruction: OptionType<StringType>;
149
+ }>>;
150
+ /** The plan day the mock opens on: Tue 11 May 2027. */
151
+ export declare const yardDay: Date;
152
+ /** The week before's day, published: Tue 4 May 2027. */
153
+ export declare const yardPublishedDay: Date;
154
+ /** When Tue 4 May was issued. */
155
+ export declare const yardIssuedAt: Date;
156
+ /** A day of loads split across kilns: Wed 12 May 2027. */
157
+ export declare const yardSplitDay: Date;
158
+ /** The unloading bays, by key: two in the north yard, one in the south, B-2 the open one; each takes one bin an hour, at its offset past the hour. */
159
+ export declare const yardBayRows: SortedMap<string, ValueTypeOf<typeof Bay>>;
160
+ export declare const yardKilns: SortedMap<string, ValueTypeOf<typeof Kiln>>;
161
+ export declare const yardArrivals: SortedMap<string, ValueTypeOf<typeof TimberLoad>>;
162
+ type Row = ValueTypeOf<typeof KilnBin>;
163
+ /** The yard's bins, every day's, by key: Tue 4 May's four, published; Tue 11's 26, the mock's day; and Wed 12's three, split across kilns. */
164
+ export declare const yardBinRows: SortedMap<string, Row>;
165
+ /** The days of the yard's plan: Tue 4 May issued, Tue 11 and Wed 12 drafts. */
166
+ export declare const yardDayRows: SortedMap<Date, ValueTypeOf<typeof YardDay>>;
167
+ /** The smallest board's bins: the plan day's, their roles alone. */
168
+ export declare const yardMinimalBinRows: SortedMap<string, ValueTypeOf<typeof MinimalBin>>;
169
+ /**
170
+ * Two years of the yard's bins to Tue 11 May 2027, for the board read a day
171
+ * at a time through its slice: on each day before it, four of the plan day's
172
+ * bins at their times on that day, keyed by how many days before; and the plan
173
+ * day's own.
174
+ */
175
+ export declare const yardBinHistoryRows: SortedMap<string, Row>;
176
+ /** The days of those two years: each issued six hours before it starts, and the plan day a draft. */
177
+ export declare const yardDayHistoryRows: SortedMap<Date, ValueTypeOf<typeof YardDay>>;
178
+ /** Tue 11 May 2027 as the board reads it: a draft, its 26 bins. */
179
+ export declare const yardPlanDay: ValueTypeOf<typeof YardPlan>;
180
+ export {};
181
+ //# sourceMappingURL=kiln-yard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kiln-yard.d.ts","sourceRoot":"","sources":["../../../test/allocation/kiln-yard.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;;;;;;;GASG;AACH,OAAO,EACH,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,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