@elaraai/e3-ui 1.0.96 → 1.0.98

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 (304) hide show
  1. package/dist/src/allocation/index.d.ts +258 -7
  2. package/dist/src/allocation/index.d.ts.map +1 -1
  3. package/dist/src/allocation/index.js +30 -1
  4. package/dist/src/allocation/index.js.map +1 -1
  5. package/dist/src/allocation/types.d.ts +41 -0
  6. package/dist/src/allocation/types.d.ts.map +1 -1
  7. package/dist/src/allocation/types.js +35 -0
  8. package/dist/src/allocation/types.js.map +1 -1
  9. package/dist/src/bind/data-indexed.d.ts +31 -4
  10. package/dist/src/bind/data-indexed.d.ts.map +1 -1
  11. package/dist/src/bind/data-indexed.js +54 -10
  12. package/dist/src/bind/data-indexed.js.map +1 -1
  13. package/dist/src/calendar/index.d.ts +540 -14
  14. package/dist/src/calendar/index.d.ts.map +1 -1
  15. package/dist/src/calendar/index.js +43 -7
  16. package/dist/src/calendar/index.js.map +1 -1
  17. package/dist/src/calendar/paged.d.ts +89 -0
  18. package/dist/src/calendar/paged.d.ts.map +1 -0
  19. package/dist/src/calendar/paged.js +148 -0
  20. package/dist/src/calendar/paged.js.map +1 -0
  21. package/dist/src/flowchart/payload.d.ts +156 -0
  22. package/dist/src/flowchart/payload.d.ts.map +1 -1
  23. package/dist/src/flowchart/window.d.ts +12 -0
  24. package/dist/src/flowchart/window.d.ts.map +1 -1
  25. package/dist/src/index.d.ts +11 -2
  26. package/dist/src/index.d.ts.map +1 -1
  27. package/dist/src/index.js +19 -0
  28. package/dist/src/index.js.map +1 -1
  29. package/dist/src/internal.d.ts +11 -5
  30. package/dist/src/internal.d.ts.map +1 -1
  31. package/dist/src/internal.js +28 -7
  32. package/dist/src/internal.js.map +1 -1
  33. package/dist/src/plan/builders.d.ts +12 -8
  34. package/dist/src/plan/builders.d.ts.map +1 -1
  35. package/dist/src/plan/builders.js +12 -8
  36. package/dist/src/plan/builders.js.map +1 -1
  37. package/dist/src/plan/event-rows.d.ts +228 -156
  38. package/dist/src/plan/event-rows.d.ts.map +1 -1
  39. package/dist/src/plan/event-rows.js +239 -54
  40. package/dist/src/plan/event-rows.js.map +1 -1
  41. package/dist/src/plan/index.d.ts +5 -0
  42. package/dist/src/plan/index.d.ts.map +1 -1
  43. package/dist/src/plan/index.js +3 -0
  44. package/dist/src/plan/index.js.map +1 -1
  45. package/dist/src/plan/ir.d.ts +70 -0
  46. package/dist/src/plan/ir.d.ts.map +1 -1
  47. package/dist/src/plan/ordered-source.d.ts +2038 -1
  48. package/dist/src/plan/ordered-source.d.ts.map +1 -1
  49. package/dist/src/plan/ordered-source.js +19 -11
  50. package/dist/src/plan/ordered-source.js.map +1 -1
  51. package/dist/src/plan/plan.d.ts +513 -32
  52. package/dist/src/plan/plan.d.ts.map +1 -1
  53. package/dist/src/plan/plan.js +119 -32
  54. package/dist/src/plan/plan.js.map +1 -1
  55. package/dist/src/plan/root.d.ts +4 -2
  56. package/dist/src/plan/root.d.ts.map +1 -1
  57. package/dist/src/plan/root.js +6 -4
  58. package/dist/src/plan/root.js.map +1 -1
  59. package/dist/src/plan/series.d.ts +13 -0
  60. package/dist/src/plan/series.d.ts.map +1 -1
  61. package/dist/src/plan/series.js +61 -7
  62. package/dist/src/plan/series.js.map +1 -1
  63. package/dist/src/plan/types.d.ts +14 -0
  64. package/dist/src/plan/types.d.ts.map +1 -1
  65. package/dist/src/plan/types.js +8 -0
  66. package/dist/src/plan/types.js.map +1 -1
  67. package/dist/src/roster/index.d.ts +608 -20
  68. package/dist/src/roster/index.d.ts.map +1 -1
  69. package/dist/src/roster/index.js +103 -29
  70. package/dist/src/roster/index.js.map +1 -1
  71. package/dist/src/roster/library.d.ts +12 -2
  72. package/dist/src/roster/library.d.ts.map +1 -1
  73. package/dist/src/roster/library.js +8 -0
  74. package/dist/src/roster/library.js.map +1 -1
  75. package/dist/src/roster/lists.d.ts +59 -12
  76. package/dist/src/roster/lists.d.ts.map +1 -1
  77. package/dist/src/roster/lists.js +51 -58
  78. package/dist/src/roster/lists.js.map +1 -1
  79. package/dist/src/roster/times.d.ts +402 -0
  80. package/dist/src/roster/times.d.ts.map +1 -1
  81. package/dist/src/roster/types.d.ts +913 -1
  82. package/dist/src/roster/types.d.ts.map +1 -1
  83. package/dist/src/roster/types.js +43 -3
  84. package/dist/src/roster/types.js.map +1 -1
  85. package/dist/src/schedule/cell-checks.d.ts +85 -0
  86. package/dist/src/schedule/cell-checks.d.ts.map +1 -0
  87. package/dist/src/schedule/cell-checks.js +211 -0
  88. package/dist/src/schedule/cell-checks.js.map +1 -0
  89. package/dist/src/schedule/events.d.ts +42 -10
  90. package/dist/src/schedule/events.d.ts.map +1 -1
  91. package/dist/src/schedule/events.js +349 -155
  92. package/dist/src/schedule/events.js.map +1 -1
  93. package/dist/src/schedule/fields.d.ts +134 -0
  94. package/dist/src/schedule/fields.d.ts.map +1 -0
  95. package/dist/src/schedule/fields.js +207 -0
  96. package/dist/src/schedule/fields.js.map +1 -0
  97. package/dist/src/schedule/library.d.ts +11 -3
  98. package/dist/src/schedule/library.d.ts.map +1 -1
  99. package/dist/src/schedule/library.js +9 -6
  100. package/dist/src/schedule/library.js.map +1 -1
  101. package/dist/src/schedule/optimise.d.ts +124 -0
  102. package/dist/src/schedule/optimise.d.ts.map +1 -0
  103. package/dist/src/schedule/optimise.js +140 -0
  104. package/dist/src/schedule/optimise.js.map +1 -0
  105. package/dist/src/schedule/pages.d.ts +76 -0
  106. package/dist/src/schedule/pages.d.ts.map +1 -0
  107. package/dist/src/schedule/pages.js +86 -0
  108. package/dist/src/schedule/pages.js.map +1 -0
  109. package/dist/src/schedule/record-window.d.ts +119 -6
  110. package/dist/src/schedule/record-window.d.ts.map +1 -1
  111. package/dist/src/schedule/record-window.js +139 -60
  112. package/dist/src/schedule/record-window.js.map +1 -1
  113. package/dist/src/schedule/resources.d.ts +8 -4
  114. package/dist/src/schedule/resources.d.ts.map +1 -1
  115. package/dist/src/schedule/resources.js +35 -15
  116. package/dist/src/schedule/resources.js.map +1 -1
  117. package/dist/src/schedule/session.d.ts +14 -0
  118. package/dist/src/schedule/session.d.ts.map +1 -1
  119. package/dist/src/schedule/session.js +29 -17
  120. package/dist/src/schedule/session.js.map +1 -1
  121. package/dist/src/schedule/types.d.ts +426 -36
  122. package/dist/src/schedule/types.d.ts.map +1 -1
  123. package/dist/src/schedule/types.js +63 -17
  124. package/dist/src/schedule/types.js.map +1 -1
  125. package/dist/src/schedule/window.d.ts +30 -9
  126. package/dist/src/schedule/window.d.ts.map +1 -1
  127. package/dist/src/schedule/window.js +101 -49
  128. package/dist/src/schedule/window.js.map +1 -1
  129. package/dist/src/schematic/index.d.ts +277 -0
  130. package/dist/src/schematic/index.d.ts.map +1 -0
  131. package/dist/src/schematic/index.js +206 -0
  132. package/dist/src/schematic/index.js.map +1 -0
  133. package/dist/src/schematic/kinds.d.ts +501 -0
  134. package/dist/src/schematic/kinds.d.ts.map +1 -0
  135. package/dist/src/schematic/kinds.js +1027 -0
  136. package/dist/src/schematic/kinds.js.map +1 -0
  137. package/dist/src/schematic/layers.d.ts +74 -0
  138. package/dist/src/schematic/layers.d.ts.map +1 -0
  139. package/dist/src/schematic/layers.js +99 -0
  140. package/dist/src/schematic/layers.js.map +1 -0
  141. package/dist/src/schematic/library.d.ts +202 -0
  142. package/dist/src/schematic/library.d.ts.map +1 -0
  143. package/dist/src/schematic/library.js +244 -0
  144. package/dist/src/schematic/library.js.map +1 -0
  145. package/dist/src/schematic/payload.d.ts +8360 -0
  146. package/dist/src/schematic/payload.d.ts.map +1 -0
  147. package/dist/src/schematic/payload.js +446 -0
  148. package/dist/src/schematic/payload.js.map +1 -0
  149. package/dist/src/schematic/schematic.d.ts +27 -0
  150. package/dist/src/schematic/schematic.d.ts.map +1 -0
  151. package/dist/src/schematic/schematic.js +17 -0
  152. package/dist/src/schematic/schematic.js.map +1 -0
  153. package/dist/src/schematic/shapes.d.ts +150 -0
  154. package/dist/src/schematic/shapes.d.ts.map +1 -0
  155. package/dist/src/schematic/shapes.js +171 -0
  156. package/dist/src/schematic/shapes.js.map +1 -0
  157. package/dist/src/schematic/templates.d.ts +96 -0
  158. package/dist/src/schematic/templates.d.ts.map +1 -0
  159. package/dist/src/schematic/templates.js +91 -0
  160. package/dist/src/schematic/templates.js.map +1 -0
  161. package/dist/src/schematic/types.d.ts +5766 -0
  162. package/dist/src/schematic/types.d.ts.map +1 -0
  163. package/dist/src/schematic/types.js +688 -0
  164. package/dist/src/schematic/types.js.map +1 -0
  165. package/dist/src/schematic/window.d.ts +212 -0
  166. package/dist/src/schematic/window.d.ts.map +1 -0
  167. package/dist/src/schematic/window.js +337 -0
  168. package/dist/src/schematic/window.js.map +1 -0
  169. package/dist/src/sheet/editing-bridge.d.ts +4 -2
  170. package/dist/src/sheet/editing-bridge.d.ts.map +1 -1
  171. package/dist/src/sheet/editing-bridge.js +8 -2
  172. package/dist/src/sheet/editing-bridge.js.map +1 -1
  173. package/dist/src/sheet/editing-types.d.ts +9 -5
  174. package/dist/src/sheet/editing-types.d.ts.map +1 -1
  175. package/dist/src/sheet/editing-types.js +9 -5
  176. package/dist/src/sheet/editing-types.js.map +1 -1
  177. package/dist/src/sheet/index.d.ts +18 -8
  178. package/dist/src/sheet/index.d.ts.map +1 -1
  179. package/dist/src/sheet/index.js +15 -7
  180. package/dist/src/sheet/index.js.map +1 -1
  181. package/dist/src/sheet/optimise.d.ts +69 -0
  182. package/dist/src/sheet/optimise.d.ts.map +1 -0
  183. package/dist/src/sheet/optimise.js +81 -0
  184. package/dist/src/sheet/optimise.js.map +1 -0
  185. package/dist/src/sheet/registers.d.ts +5 -5
  186. package/dist/src/sheet/registers.js +5 -5
  187. package/dist/src/sheet/root.d.ts +2 -0
  188. package/dist/src/sheet/root.d.ts.map +1 -1
  189. package/dist/src/sheet/root.js +2 -2
  190. package/dist/src/sheet/root.js.map +1 -1
  191. package/dist/src/sheet/sheet.d.ts +753 -573
  192. package/dist/src/sheet/sheet.d.ts.map +1 -1
  193. package/dist/src/sheet/sheet.js +45 -13
  194. package/dist/src/sheet/sheet.js.map +1 -1
  195. package/dist/src/sheet/types.d.ts +92 -12
  196. package/dist/src/sheet/types.d.ts.map +1 -1
  197. package/dist/src/sheet/types.js +4 -8
  198. package/dist/src/sheet/types.js.map +1 -1
  199. package/dist/src/utils/keyed-rows.d.ts +41 -0
  200. package/dist/src/utils/keyed-rows.d.ts.map +1 -0
  201. package/dist/src/utils/keyed-rows.js +64 -0
  202. package/dist/src/utils/keyed-rows.js.map +1 -0
  203. package/dist/src/utils/optimise.d.ts +79 -0
  204. package/dist/src/utils/optimise.d.ts.map +1 -0
  205. package/dist/src/utils/optimise.js +46 -0
  206. package/dist/src/utils/optimise.js.map +1 -0
  207. package/dist/test/allocation/allocation.examples.d.ts +6 -18
  208. package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
  209. package/dist/test/allocation/allocation.examples.js +3 -3
  210. package/dist/test/allocation/allocation.examples.js.map +1 -1
  211. package/dist/test/allocation/optimise.examples.d.ts +109 -0
  212. package/dist/test/allocation/optimise.examples.d.ts.map +1 -0
  213. package/dist/test/allocation/optimise.examples.js +223 -0
  214. package/dist/test/allocation/optimise.examples.js.map +1 -0
  215. package/dist/test/bind/data/data.examples.d.ts +540 -36
  216. package/dist/test/bind/data/data.examples.d.ts.map +1 -1
  217. package/dist/test/bind/data/data.examples.js +66 -2
  218. package/dist/test/bind/data/data.examples.js.map +1 -1
  219. package/dist/test/bind/record/record.examples.d.ts +1 -3
  220. package/dist/test/bind/record/record.examples.d.ts.map +1 -1
  221. package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
  222. package/dist/test/calendar/calendar-records.examples.js +3 -3
  223. package/dist/test/calendar/calendar-records.examples.js.map +1 -1
  224. package/dist/test/calendar/calendar-windows.examples.d.ts +9 -0
  225. package/dist/test/calendar/calendar-windows.examples.d.ts.map +1 -0
  226. package/dist/test/calendar/calendar-windows.examples.js +111 -0
  227. package/dist/test/calendar/calendar-windows.examples.js.map +1 -0
  228. package/dist/test/calendar/calendar.examples.d.ts +7 -21
  229. package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
  230. package/dist/test/calendar/calendar.examples.js +7 -7
  231. package/dist/test/calendar/calendar.examples.js.map +1 -1
  232. package/dist/test/calendar/optimise.examples.d.ts +132 -0
  233. package/dist/test/calendar/optimise.examples.d.ts.map +1 -0
  234. package/dist/test/calendar/optimise.examples.js +75 -0
  235. package/dist/test/calendar/optimise.examples.js.map +1 -0
  236. package/dist/test/examples-package.d.ts +46 -10
  237. package/dist/test/examples-package.d.ts.map +1 -1
  238. package/dist/test/examples-package.js +142 -32
  239. package/dist/test/examples-package.js.map +1 -1
  240. package/dist/test/flowchart/flowchart.examples.d.ts +10 -30
  241. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
  242. package/dist/test/plan/optimise.examples.d.ts +207 -0
  243. package/dist/test/plan/optimise.examples.d.ts.map +1 -0
  244. package/dist/test/plan/optimise.examples.js +98 -0
  245. package/dist/test/plan/optimise.examples.js.map +1 -0
  246. package/dist/test/plan/plan-events.examples.d.ts +8 -24
  247. package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
  248. package/dist/test/plan/plan-events.examples.js +3 -3
  249. package/dist/test/plan/plan-events.examples.js.map +1 -1
  250. package/dist/test/plan/plan-records.examples.d.ts +200 -19
  251. package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
  252. package/dist/test/plan/plan-records.examples.js +125 -28
  253. package/dist/test/plan/plan-records.examples.js.map +1 -1
  254. package/dist/test/plan/plan-windows.examples.d.ts +853 -36
  255. package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
  256. package/dist/test/plan/plan-windows.examples.js +166 -29
  257. package/dist/test/plan/plan-windows.examples.js.map +1 -1
  258. package/dist/test/plan/plan.examples.d.ts +7 -21
  259. package/dist/test/plan/plan.examples.d.ts.map +1 -1
  260. package/dist/test/plan/plan.examples.js +11 -9
  261. package/dist/test/plan/plan.examples.js.map +1 -1
  262. package/dist/test/roster/domain.examples.d.ts +804 -0
  263. package/dist/test/roster/domain.examples.d.ts.map +1 -1
  264. package/dist/test/roster/domain.examples.js +3 -3
  265. package/dist/test/roster/domain.examples.js.map +1 -1
  266. package/dist/test/roster/optimise.examples.d.ts +485 -0
  267. package/dist/test/roster/optimise.examples.d.ts.map +1 -0
  268. package/dist/test/roster/optimise.examples.js +155 -0
  269. package/dist/test/roster/optimise.examples.js.map +1 -0
  270. package/dist/test/roster/roster-records.examples.d.ts +6 -18
  271. package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
  272. package/dist/test/roster/roster-records.examples.js +1 -1
  273. package/dist/test/roster/roster-records.examples.js.map +1 -1
  274. package/dist/test/roster/roster.examples.d.ts +3391 -21
  275. package/dist/test/roster/roster.examples.d.ts.map +1 -1
  276. package/dist/test/roster/roster.examples.js +54 -7
  277. package/dist/test/roster/roster.examples.js.map +1 -1
  278. package/dist/test/roster/warehouse.d.ts +150 -7
  279. package/dist/test/roster/warehouse.d.ts.map +1 -1
  280. package/dist/test/roster/warehouse.js +36 -11
  281. package/dist/test/roster/warehouse.js.map +1 -1
  282. package/dist/test/schedule/schedule.examples.d.ts +1 -3
  283. package/dist/test/schedule/schedule.examples.d.ts.map +1 -1
  284. package/dist/test/schematic/schematic-records.examples.d.ts +444 -0
  285. package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -0
  286. package/dist/test/schematic/schematic-records.examples.js +205 -0
  287. package/dist/test/schematic/schematic-records.examples.js.map +1 -0
  288. package/dist/test/schematic/schematic.examples.d.ts +2289 -0
  289. package/dist/test/schematic/schematic.examples.d.ts.map +1 -0
  290. package/dist/test/schematic/schematic.examples.js +453 -0
  291. package/dist/test/schematic/schematic.examples.js.map +1 -0
  292. package/dist/test/sheet/optimise.examples.d.ts +177 -0
  293. package/dist/test/sheet/optimise.examples.d.ts.map +1 -0
  294. package/dist/test/sheet/optimise.examples.js +75 -0
  295. package/dist/test/sheet/optimise.examples.js.map +1 -0
  296. package/dist/test/sheet/sheet-records.examples.d.ts +95 -204
  297. package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
  298. package/dist/test/sheet/sheet-records.examples.js +42 -17
  299. package/dist/test/sheet/sheet-records.examples.js.map +1 -1
  300. package/dist/test/sheet/sheet.examples.d.ts +17 -33
  301. package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
  302. package/dist/test/sheet/sheet.examples.js +18 -15
  303. package/dist/test/sheet/sheet.examples.js.map +1 -1
  304. package/package.json +11 -11
@@ -184,6 +184,7 @@ export type AllocationSettingsType = typeof AllocationSettingsType;
184
184
  * @property periods - The app's days: their status, and Publish; `none`, no status chip and no Publish
185
185
  * @property narrowed - Each narrowed source's keys, paged through its part of `slice`: the lanes, the resources and the arrivals that show
186
186
  * @property fit - The app's fit, by its `e3.function`'s name
187
+ * @property optimise - The app's optimiser, by its `e3.function`'s name: what the Elara eye calls over the day in view, its result one edit of the session; `none`, no eye (#1409)
187
188
  * @property check - The app's issues, from a `CheckContext(R)` as bytes
188
189
  * @property columns - The app's bin fields as columns and inspector rows
189
190
  * @property rules - The built-in rules
@@ -318,7 +319,7 @@ export declare const AllocationPayloadType: StructType<{
318
319
  readonly readonly: NullType;
319
320
  }>;
320
321
  }>>;
321
- readonly items: FunctionType<[DateTimeType, DateTimeType, import("@elaraai/east").DictType<StringType, BlobType>], OptionType<ArrayType<StructType<{
322
+ readonly items: FunctionType<[DateTimeType, DateTimeType, import("@elaraai/east").DictType<StringType, BlobType>, OptionType<BlobType>], OptionType<ArrayType<StructType<{
322
323
  readonly kind: StringType;
323
324
  readonly key: StringType;
324
325
  readonly title: StringType;
@@ -342,7 +343,7 @@ export declare const AllocationPayloadType: StructType<{
342
343
  readonly minutes: import("@elaraai/east").IntegerType;
343
344
  readonly due: OptionType<DateTimeType>;
344
345
  }>>>>;
345
- readonly unscheduled: FunctionType<[DateTimeType, DateTimeType, import("@elaraai/east").DictType<StringType, BlobType>], OptionType<ArrayType<StructType<{
346
+ readonly unscheduled: FunctionType<[DateTimeType, DateTimeType, import("@elaraai/east").DictType<StringType, BlobType>, OptionType<BlobType>], OptionType<ArrayType<StructType<{
346
347
  readonly kind: StringType;
347
348
  readonly key: StringType;
348
349
  readonly title: StringType;
@@ -597,7 +598,7 @@ export declare const AllocationPayloadType: StructType<{
597
598
  readonly at: DateTimeType;
598
599
  readonly delta: OptionType<StringType>;
599
600
  }>>>>;
600
- readonly event: FunctionType<[StringType, import("@elaraai/east").DictType<StringType, BlobType>, DateTimeType, DateTimeType], OptionType<StructType<{
601
+ readonly event: FunctionType<[StringType, import("@elaraai/east").DictType<StringType, BlobType>, DateTimeType, DateTimeType, OptionType<OptionType<BlobType>>], OptionType<StructType<{
601
602
  readonly item: StructType<{
602
603
  readonly kind: StringType;
603
604
  readonly key: StringType;
@@ -636,6 +637,54 @@ export declare const AllocationPayloadType: StructType<{
636
637
  readonly allow: NullType;
637
638
  }>;
638
639
  readonly inspector: OptionType<FunctionType<[BlobType, FunctionType<[BlobType], NullType>], import("@elaraai/east").RecursiveType<import("@elaraai/east-ui").UIComponentNode>>>;
640
+ readonly seriesKey: FunctionType<[OptionType<StructType<{
641
+ readonly kind: StringType;
642
+ readonly key: StringType;
643
+ }>>], OptionType<StringType>>;
644
+ readonly cellsType: import("@elaraai/east").RecursiveType<VariantType<{
645
+ readonly Never: NullType;
646
+ readonly Null: NullType;
647
+ readonly Boolean: NullType;
648
+ readonly Integer: NullType;
649
+ readonly Float: NullType;
650
+ readonly String: NullType;
651
+ readonly DateTime: NullType;
652
+ readonly Blob: NullType;
653
+ readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
654
+ readonly Array: import("@elaraai/east").RecursiveTypeMarker;
655
+ readonly Set: import("@elaraai/east").RecursiveTypeMarker;
656
+ readonly Dict: StructType<{
657
+ readonly key: import("@elaraai/east").RecursiveTypeMarker;
658
+ readonly value: import("@elaraai/east").RecursiveTypeMarker;
659
+ }>;
660
+ readonly Struct: ArrayType<StructType<{
661
+ readonly name: StringType;
662
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
663
+ }>>;
664
+ readonly Variant: ArrayType<StructType<{
665
+ readonly name: StringType;
666
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
667
+ }>>;
668
+ readonly Recursive: VariantType<{
669
+ readonly ref: import("@elaraai/east").IntegerType;
670
+ readonly wrapper: StructType<{
671
+ readonly id: import("@elaraai/east").IntegerType;
672
+ readonly inner: import("@elaraai/east").RecursiveTypeMarker;
673
+ }>;
674
+ }>;
675
+ readonly Function: StructType<{
676
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
677
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
678
+ }>;
679
+ readonly AsyncFunction: StructType<{
680
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
681
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
682
+ }>;
683
+ readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
684
+ readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
685
+ }>>;
686
+ readonly count: FunctionType<[DateTimeType, DateTimeType], OptionType<import("@elaraai/east").IntegerType>>;
687
+ readonly countExact: BooleanType;
639
688
  }>;
640
689
  readonly rows: FunctionType<[DateTimeType, DateTimeType], OptionType<import("@elaraai/east").DictType<StringType, StructType<{
641
690
  readonly roles: StructType<{
@@ -1109,6 +1158,9 @@ export declare const AllocationPayloadType: StructType<{
1109
1158
  readonly fit: StructType<{
1110
1159
  readonly name: StringType;
1111
1160
  }>;
1161
+ readonly optimise: OptionType<StructType<{
1162
+ readonly name: StringType;
1163
+ }>>;
1112
1164
  readonly check: OptionType<FunctionType<[BlobType], ArrayType<StructType<{
1113
1165
  readonly kind: VariantType<{
1114
1166
  readonly unlinked: NullType;
@@ -1276,6 +1328,39 @@ export declare const AllocationPayloadType: StructType<{
1276
1328
  readonly to: import("@elaraai/east").StringType;
1277
1329
  readonly optional: import("@elaraai/east").BooleanType;
1278
1330
  }>>;
1331
+ readonly area: OptionType<StructType<{
1332
+ readonly x: import("@elaraai/east").StringType;
1333
+ readonly y: import("@elaraai/east").StringType;
1334
+ readonly width: OptionType<import("@elaraai/east").StringType>;
1335
+ readonly height: OptionType<import("@elaraai/east").StringType>;
1336
+ readonly centre: import("@elaraai/east").BooleanType;
1337
+ readonly cell: import("@elaraai/east").FloatType;
1338
+ readonly optional: import("@elaraai/east").BooleanType;
1339
+ }>>;
1340
+ readonly series: OptionType<StructType<{
1341
+ readonly key: import("@elaraai/east").StringType;
1342
+ readonly from: import("@elaraai/east").StringType;
1343
+ readonly to: import("@elaraai/east").StringType;
1344
+ readonly tile: VariantType<{
1345
+ readonly day: NullType;
1346
+ readonly week: NullType;
1347
+ readonly month: NullType;
1348
+ readonly quarter: NullType;
1349
+ readonly year: NullType;
1350
+ }>;
1351
+ }>>;
1352
+ readonly summary: OptionType<StructType<{
1353
+ readonly key: import("@elaraai/east").StringType;
1354
+ readonly from: import("@elaraai/east").StringType;
1355
+ readonly to: import("@elaraai/east").StringType;
1356
+ readonly tile: VariantType<{
1357
+ readonly day: NullType;
1358
+ readonly week: NullType;
1359
+ readonly month: NullType;
1360
+ readonly quarter: NullType;
1361
+ readonly year: NullType;
1362
+ }>;
1363
+ }>>;
1279
1364
  }>>;
1280
1365
  readonly range: OptionType<import("@elaraai/east").StringType>;
1281
1366
  readonly search: ArrayType<import("@elaraai/east").StringType>;
@@ -1289,6 +1374,12 @@ export declare const AllocationPayloadType: StructType<{
1289
1374
  readonly to: import("@elaraai/east").StringType;
1290
1375
  }>;
1291
1376
  readonly prefix: import("@elaraai/east").StringType;
1377
+ readonly window: StructType<{
1378
+ readonly minX: import("@elaraai/east").FloatType;
1379
+ readonly minY: import("@elaraai/east").FloatType;
1380
+ readonly maxX: import("@elaraai/east").FloatType;
1381
+ readonly maxY: import("@elaraai/east").FloatType;
1382
+ }>;
1292
1383
  }>>;
1293
1384
  }>>;
1294
1385
  }>;
@@ -1300,6 +1391,12 @@ export declare const AllocationPayloadType: StructType<{
1300
1391
  readonly to: import("@elaraai/east").StringType;
1301
1392
  }>;
1302
1393
  readonly prefix: import("@elaraai/east").StringType;
1394
+ readonly window: StructType<{
1395
+ readonly minX: import("@elaraai/east").FloatType;
1396
+ readonly minY: import("@elaraai/east").FloatType;
1397
+ readonly maxX: import("@elaraai/east").FloatType;
1398
+ readonly maxY: import("@elaraai/east").FloatType;
1399
+ }>;
1303
1400
  }>>;
1304
1401
  readonly preset: OptionType<import("@elaraai/east").StringType>;
1305
1402
  readonly resolution: OptionType<VariantType<{
@@ -1320,6 +1417,12 @@ export declare const AllocationPayloadType: StructType<{
1320
1417
  readonly to: import("@elaraai/east").StringType;
1321
1418
  }>;
1322
1419
  readonly prefix: import("@elaraai/east").StringType;
1420
+ readonly window: StructType<{
1421
+ readonly minX: import("@elaraai/east").FloatType;
1422
+ readonly minY: import("@elaraai/east").FloatType;
1423
+ readonly maxX: import("@elaraai/east").FloatType;
1424
+ readonly maxY: import("@elaraai/east").FloatType;
1425
+ }>;
1323
1426
  }>>;
1324
1427
  readonly preset: OptionType<import("@elaraai/east").StringType>;
1325
1428
  readonly resolution: OptionType<VariantType<{
@@ -1345,6 +1448,12 @@ export declare const AllocationPayloadType: StructType<{
1345
1448
  readonly to: import("@elaraai/east").StringType;
1346
1449
  }>;
1347
1450
  readonly prefix: import("@elaraai/east").StringType;
1451
+ readonly window: StructType<{
1452
+ readonly minX: import("@elaraai/east").FloatType;
1453
+ readonly minY: import("@elaraai/east").FloatType;
1454
+ readonly maxX: import("@elaraai/east").FloatType;
1455
+ readonly maxY: import("@elaraai/east").FloatType;
1456
+ }>;
1348
1457
  }>>], OptionType<import("@elaraai/east").IntegerType>>;
1349
1458
  readonly total: import("@elaraai/east").FunctionType<[], OptionType<import("@elaraai/east").IntegerType>>;
1350
1459
  readonly domain: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType], OptionType<StructType<{
@@ -1386,6 +1495,12 @@ export declare const AllocationPayloadType: StructType<{
1386
1495
  readonly to: import("@elaraai/east").StringType;
1387
1496
  }>;
1388
1497
  readonly prefix: import("@elaraai/east").StringType;
1498
+ readonly window: StructType<{
1499
+ readonly minX: import("@elaraai/east").FloatType;
1500
+ readonly minY: import("@elaraai/east").FloatType;
1501
+ readonly maxX: import("@elaraai/east").FloatType;
1502
+ readonly maxY: import("@elaraai/east").FloatType;
1503
+ }>;
1389
1504
  }>>, import("@elaraai/east").StringType], OptionType<import("@elaraai/east").BooleanType>>;
1390
1505
  readonly containsRow: import("@elaraai/east").FunctionType<[import("@elaraai/east").DictType<import("@elaraai/east").StringType, VariantType<{
1391
1506
  readonly values: ArrayType<import("@elaraai/east").StringType>;
@@ -1394,6 +1509,12 @@ export declare const AllocationPayloadType: StructType<{
1394
1509
  readonly to: import("@elaraai/east").StringType;
1395
1510
  }>;
1396
1511
  readonly prefix: import("@elaraai/east").StringType;
1512
+ readonly window: StructType<{
1513
+ readonly minX: import("@elaraai/east").FloatType;
1514
+ readonly minY: import("@elaraai/east").FloatType;
1515
+ readonly maxX: import("@elaraai/east").FloatType;
1516
+ readonly maxY: import("@elaraai/east").FloatType;
1517
+ }>;
1397
1518
  }>>, import("@elaraai/east").StringType, import("@elaraai/east").BlobType], OptionType<import("@elaraai/east").BooleanType>>;
1398
1519
  }>;
1399
1520
  }>>;
@@ -1596,7 +1717,7 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
1596
1717
  readonly readonly: NullType;
1597
1718
  }>;
1598
1719
  }>>;
1599
- readonly items: FunctionType<[DateTimeType, DateTimeType, import("@elaraai/east").DictType<StringType, BlobType>], OptionType<ArrayType<StructType<{
1720
+ readonly items: FunctionType<[DateTimeType, DateTimeType, import("@elaraai/east").DictType<StringType, BlobType>, OptionType<BlobType>], OptionType<ArrayType<StructType<{
1600
1721
  readonly kind: StringType;
1601
1722
  readonly key: StringType;
1602
1723
  readonly title: StringType;
@@ -1620,7 +1741,7 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
1620
1741
  readonly minutes: import("@elaraai/east").IntegerType;
1621
1742
  readonly due: OptionType<DateTimeType>;
1622
1743
  }>>>>;
1623
- readonly unscheduled: FunctionType<[DateTimeType, DateTimeType, import("@elaraai/east").DictType<StringType, BlobType>], OptionType<ArrayType<StructType<{
1744
+ readonly unscheduled: FunctionType<[DateTimeType, DateTimeType, import("@elaraai/east").DictType<StringType, BlobType>, OptionType<BlobType>], OptionType<ArrayType<StructType<{
1624
1745
  readonly kind: StringType;
1625
1746
  readonly key: StringType;
1626
1747
  readonly title: StringType;
@@ -1875,7 +1996,7 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
1875
1996
  readonly at: DateTimeType;
1876
1997
  readonly delta: OptionType<StringType>;
1877
1998
  }>>>>;
1878
- readonly event: FunctionType<[StringType, import("@elaraai/east").DictType<StringType, BlobType>, DateTimeType, DateTimeType], OptionType<StructType<{
1999
+ readonly event: FunctionType<[StringType, import("@elaraai/east").DictType<StringType, BlobType>, DateTimeType, DateTimeType, OptionType<OptionType<BlobType>>], OptionType<StructType<{
1879
2000
  readonly item: StructType<{
1880
2001
  readonly kind: StringType;
1881
2002
  readonly key: StringType;
@@ -1914,6 +2035,54 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
1914
2035
  readonly allow: NullType;
1915
2036
  }>;
1916
2037
  readonly inspector: OptionType<FunctionType<[BlobType, FunctionType<[BlobType], NullType>], import("@elaraai/east").RecursiveType<import("@elaraai/east-ui").UIComponentNode>>>;
2038
+ readonly seriesKey: FunctionType<[OptionType<StructType<{
2039
+ readonly kind: StringType;
2040
+ readonly key: StringType;
2041
+ }>>], OptionType<StringType>>;
2042
+ readonly cellsType: import("@elaraai/east").RecursiveType<VariantType<{
2043
+ readonly Never: NullType;
2044
+ readonly Null: NullType;
2045
+ readonly Boolean: NullType;
2046
+ readonly Integer: NullType;
2047
+ readonly Float: NullType;
2048
+ readonly String: NullType;
2049
+ readonly DateTime: NullType;
2050
+ readonly Blob: NullType;
2051
+ readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
2052
+ readonly Array: import("@elaraai/east").RecursiveTypeMarker;
2053
+ readonly Set: import("@elaraai/east").RecursiveTypeMarker;
2054
+ readonly Dict: StructType<{
2055
+ readonly key: import("@elaraai/east").RecursiveTypeMarker;
2056
+ readonly value: import("@elaraai/east").RecursiveTypeMarker;
2057
+ }>;
2058
+ readonly Struct: ArrayType<StructType<{
2059
+ readonly name: StringType;
2060
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
2061
+ }>>;
2062
+ readonly Variant: ArrayType<StructType<{
2063
+ readonly name: StringType;
2064
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
2065
+ }>>;
2066
+ readonly Recursive: VariantType<{
2067
+ readonly ref: import("@elaraai/east").IntegerType;
2068
+ readonly wrapper: StructType<{
2069
+ readonly id: import("@elaraai/east").IntegerType;
2070
+ readonly inner: import("@elaraai/east").RecursiveTypeMarker;
2071
+ }>;
2072
+ }>;
2073
+ readonly Function: StructType<{
2074
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
2075
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
2076
+ }>;
2077
+ readonly AsyncFunction: StructType<{
2078
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
2079
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
2080
+ }>;
2081
+ readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
2082
+ readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
2083
+ }>>;
2084
+ readonly count: FunctionType<[DateTimeType, DateTimeType], OptionType<import("@elaraai/east").IntegerType>>;
2085
+ readonly countExact: BooleanType;
1917
2086
  }>;
1918
2087
  readonly rows: FunctionType<[DateTimeType, DateTimeType], OptionType<import("@elaraai/east").DictType<StringType, StructType<{
1919
2088
  readonly roles: StructType<{
@@ -2387,6 +2556,9 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
2387
2556
  readonly fit: StructType<{
2388
2557
  readonly name: StringType;
2389
2558
  }>;
2559
+ readonly optimise: OptionType<StructType<{
2560
+ readonly name: StringType;
2561
+ }>>;
2390
2562
  readonly check: OptionType<FunctionType<[BlobType], ArrayType<StructType<{
2391
2563
  readonly kind: VariantType<{
2392
2564
  readonly unlinked: NullType;
@@ -2554,6 +2726,39 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
2554
2726
  readonly to: import("@elaraai/east").StringType;
2555
2727
  readonly optional: import("@elaraai/east").BooleanType;
2556
2728
  }>>;
2729
+ readonly area: OptionType<StructType<{
2730
+ readonly x: import("@elaraai/east").StringType;
2731
+ readonly y: import("@elaraai/east").StringType;
2732
+ readonly width: OptionType<import("@elaraai/east").StringType>;
2733
+ readonly height: OptionType<import("@elaraai/east").StringType>;
2734
+ readonly centre: import("@elaraai/east").BooleanType;
2735
+ readonly cell: import("@elaraai/east").FloatType;
2736
+ readonly optional: import("@elaraai/east").BooleanType;
2737
+ }>>;
2738
+ readonly series: OptionType<StructType<{
2739
+ readonly key: import("@elaraai/east").StringType;
2740
+ readonly from: import("@elaraai/east").StringType;
2741
+ readonly to: import("@elaraai/east").StringType;
2742
+ readonly tile: VariantType<{
2743
+ readonly day: NullType;
2744
+ readonly week: NullType;
2745
+ readonly month: NullType;
2746
+ readonly quarter: NullType;
2747
+ readonly year: NullType;
2748
+ }>;
2749
+ }>>;
2750
+ readonly summary: OptionType<StructType<{
2751
+ readonly key: import("@elaraai/east").StringType;
2752
+ readonly from: import("@elaraai/east").StringType;
2753
+ readonly to: import("@elaraai/east").StringType;
2754
+ readonly tile: VariantType<{
2755
+ readonly day: NullType;
2756
+ readonly week: NullType;
2757
+ readonly month: NullType;
2758
+ readonly quarter: NullType;
2759
+ readonly year: NullType;
2760
+ }>;
2761
+ }>>;
2557
2762
  }>>;
2558
2763
  readonly range: OptionType<import("@elaraai/east").StringType>;
2559
2764
  readonly search: ArrayType<import("@elaraai/east").StringType>;
@@ -2567,6 +2772,12 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
2567
2772
  readonly to: import("@elaraai/east").StringType;
2568
2773
  }>;
2569
2774
  readonly prefix: import("@elaraai/east").StringType;
2775
+ readonly window: StructType<{
2776
+ readonly minX: import("@elaraai/east").FloatType;
2777
+ readonly minY: import("@elaraai/east").FloatType;
2778
+ readonly maxX: import("@elaraai/east").FloatType;
2779
+ readonly maxY: import("@elaraai/east").FloatType;
2780
+ }>;
2570
2781
  }>>;
2571
2782
  }>>;
2572
2783
  }>;
@@ -2578,6 +2789,12 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
2578
2789
  readonly to: import("@elaraai/east").StringType;
2579
2790
  }>;
2580
2791
  readonly prefix: import("@elaraai/east").StringType;
2792
+ readonly window: StructType<{
2793
+ readonly minX: import("@elaraai/east").FloatType;
2794
+ readonly minY: import("@elaraai/east").FloatType;
2795
+ readonly maxX: import("@elaraai/east").FloatType;
2796
+ readonly maxY: import("@elaraai/east").FloatType;
2797
+ }>;
2581
2798
  }>>;
2582
2799
  readonly preset: OptionType<import("@elaraai/east").StringType>;
2583
2800
  readonly resolution: OptionType<VariantType<{
@@ -2598,6 +2815,12 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
2598
2815
  readonly to: import("@elaraai/east").StringType;
2599
2816
  }>;
2600
2817
  readonly prefix: import("@elaraai/east").StringType;
2818
+ readonly window: StructType<{
2819
+ readonly minX: import("@elaraai/east").FloatType;
2820
+ readonly minY: import("@elaraai/east").FloatType;
2821
+ readonly maxX: import("@elaraai/east").FloatType;
2822
+ readonly maxY: import("@elaraai/east").FloatType;
2823
+ }>;
2601
2824
  }>>;
2602
2825
  readonly preset: OptionType<import("@elaraai/east").StringType>;
2603
2826
  readonly resolution: OptionType<VariantType<{
@@ -2623,6 +2846,12 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
2623
2846
  readonly to: import("@elaraai/east").StringType;
2624
2847
  }>;
2625
2848
  readonly prefix: import("@elaraai/east").StringType;
2849
+ readonly window: StructType<{
2850
+ readonly minX: import("@elaraai/east").FloatType;
2851
+ readonly minY: import("@elaraai/east").FloatType;
2852
+ readonly maxX: import("@elaraai/east").FloatType;
2853
+ readonly maxY: import("@elaraai/east").FloatType;
2854
+ }>;
2626
2855
  }>>], OptionType<import("@elaraai/east").IntegerType>>;
2627
2856
  readonly total: import("@elaraai/east").FunctionType<[], OptionType<import("@elaraai/east").IntegerType>>;
2628
2857
  readonly domain: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType], OptionType<StructType<{
@@ -2664,6 +2893,12 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
2664
2893
  readonly to: import("@elaraai/east").StringType;
2665
2894
  }>;
2666
2895
  readonly prefix: import("@elaraai/east").StringType;
2896
+ readonly window: StructType<{
2897
+ readonly minX: import("@elaraai/east").FloatType;
2898
+ readonly minY: import("@elaraai/east").FloatType;
2899
+ readonly maxX: import("@elaraai/east").FloatType;
2900
+ readonly maxY: import("@elaraai/east").FloatType;
2901
+ }>;
2667
2902
  }>>, import("@elaraai/east").StringType], OptionType<import("@elaraai/east").BooleanType>>;
2668
2903
  readonly containsRow: import("@elaraai/east").FunctionType<[import("@elaraai/east").DictType<import("@elaraai/east").StringType, VariantType<{
2669
2904
  readonly values: ArrayType<import("@elaraai/east").StringType>;
@@ -2672,6 +2907,12 @@ export declare const AllocationComponent: import("@elaraai/east-ui").UIComponent
2672
2907
  readonly to: import("@elaraai/east").StringType;
2673
2908
  }>;
2674
2909
  readonly prefix: import("@elaraai/east").StringType;
2910
+ readonly window: StructType<{
2911
+ readonly minX: import("@elaraai/east").FloatType;
2912
+ readonly minY: import("@elaraai/east").FloatType;
2913
+ readonly maxX: import("@elaraai/east").FloatType;
2914
+ readonly maxY: import("@elaraai/east").FloatType;
2915
+ }>;
2675
2916
  }>>, import("@elaraai/east").StringType, import("@elaraai/east").BlobType], OptionType<import("@elaraai/east").BooleanType>>;
2676
2917
  }>;
2677
2918
  }>>;
@@ -2802,6 +3043,13 @@ export interface AllocationProps<R extends EastType = EastType> {
2802
3043
  periods?: SchedulePeriods;
2803
3044
  /** The fit: `Func.bind` of the app's `e3.function` from `Allocation.Types.FitRequest(R)` to `Allocation.Types.FitResult`. The board has no fit of its own. */
2804
3045
  fit: BoundFunc<[T.AllocationFitRequestType<R>], T.AllocationFitResultType>;
3046
+ /**
3047
+ * The app's optimiser (#1409): `Func.bind` of its `e3.function` from `Allocation.Types.OptimiseRequest(R)` — the day in view, the run
3048
+ * number, the day's bins as drafted, every arrival and the board's context — to `Allocation.Types.OptimiseResult(R)`, the day's bins
3049
+ * complete. The Elara eye in the toolbar calls it once per run; the result lands in the session as one edit, which one Undo
3050
+ * reverts and Save commits with everything else. Omitted, no eye.
3051
+ */
3052
+ optimise?: BoundFunc<[T.AllocationOptimiseRequestType<R>], T.AllocationOptimiseResultType<R>>;
2805
3053
  /** The app's issues, after the built-in ones wherever issues show: an East function from `Allocation.Types.CheckContext(R)` to `Array<Allocation.Types.Issue>`. */
2806
3054
  check?: SubtypeExprOrValue<FunctionType<[T.AllocationCheckContextType<R>], ArrayType<T.AllocationIssueType>>>;
2807
3055
  /** The app's bin fields as Table columns (after Quantity) and inspector rows, over the bin's row. */
@@ -2899,7 +3147,8 @@ export declare function allocationBands(bands: readonly {
2899
3147
  * by anything but String, or a resources kind with no `min` or `max`; `arrivals` that is not `Allocation.arrivals`, and
2900
3148
  * its `values` returning another struct than the bin kind's own fields; `periods` that is not `Schedule.periods`; a
2901
3149
  * `fit` that is not `Func.bind` of a function from `FitRequest(R)` to `FitResult`, one over another row type naming
2902
- * both; a `check` of another type; a library tab or a column key listed twice; a label that is empty; the Table's
3150
+ * both; an `optimise` that is not `Func.bind` of a function from `OptimiseRequest(R)` to `OptimiseResult(R)`, one over
3151
+ * another row type naming both (#1409); a `check` of another type; a library tab or a column key listed twice; a label that is empty; the Table's
2903
3152
  * bands not starting at 0 and rising within the day; and as `Schedule`'s checks, the bin kind's build
2904
3153
  * (`buildAllocation`) and the slice's (`recordSources`) do
2905
3154
  * @internal
@@ -2970,6 +3219,8 @@ export interface AllocationNamespace {
2970
3219
  SlotStatus: typeof T.AllocationSlotStatusType;
2971
3220
  Slot: typeof T.AllocationSlotType;
2972
3221
  Layout: typeof T.AllocationLayoutType;
3222
+ OptimiseRequest: typeof T.AllocationOptimiseRequestTypeFor;
3223
+ OptimiseResult: typeof T.AllocationOptimiseResultTypeFor;
2973
3224
  };
2974
3225
  }
2975
3226
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/allocation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACH,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAc,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAE9I,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAC1E,MAAM,eAAe,CAAC;AACvB,OAAO,EAAU,eAAe,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAA0B,aAAa,EAAE,KAAK,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAClH,OAAO,EAAuC,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAgB,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EACH,kBAAkB,EAA2G,KAAK,kBAAkB,EACvJ,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,gBAAgB,EAAE,oBAAoB,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAA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QACxH,OAAO,EAAE,OAAO,CAAC,CAAC,qBAAqB,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC,CAAC,uBAAuB,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC,CAAC,kBAAkB,CAAC;QACxH,SAAS,EAAE,OAAO,CAAC,CAAC,uBAAuB,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC,CAAC,qBAAqB,CAAC;QAAC,GAAG,EAAE,OAAO,CAAC,CAAC,iBAAiB,CAAC;QACtH,MAAM,EAAE,OAAO,CAAC,CAAC,oBAAoB,CAAC;QAAC,UAAU,EAAE,OAAO,CAAC,CAAC,2BAA2B,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC,CAAC,uBAAuB,CAAC;QACrI,GAAG,EAAE,OAAO,CAAC,CAAC,iBAAiB,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC,CAAC,uBAAuB,CAAC;QAAC,KAAK,EAAE,OAAO,CAAC,CAAC,mBAAmB,CAAC;QAClH,YAAY,EAAE,OAAO,CAAC,CAAC,6BAA6B,CAAC;QAAC,UAAU,EAAE,OAAO,CAAC,CAAC,wBAAwB,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC,CAAC,kBAAkB,CAAC;QACvI,MAAM,EAAE,OAAO,CAAC,CAAC,oBAAoB,CAAC;QACtC,eAAe,EAAE,OAAO,CAAC,CAAC,gCAAgC,CAAC;QAAC,cAAc,EAAE,OAAO,CAAC,CAAC,+BAA+B,CAAC;KACxH,CAAC;CACL;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,mBAyBxB,CAAC"}
@@ -29,6 +29,7 @@ import { FuncBindingType, boundFuncSignature } from "../bind/func.js";
29
29
  import { scheduleCheck } from "../schedule/index.js";
30
30
  import { SCHEDULE_DEF } from "../schedule/resources.js";
31
31
  import { ScheduleAllocationKindType, SchedulePeriodsKindType } from "../schedule/types.js";
32
+ import { optimiseBinding } from "../utils/optimise.js";
32
33
  import { recordSources } from "../utils/record-sources.js";
33
34
  import { allocationArrivals, allocationArrivalsOf, allocationInitial, allocationLanesOf, allocationResourcesOf, isAllocationArrivals, } from "./adapters.js";
34
35
  import { allocationAnswer, allocationCandidates, allocationCheck, allocationFit, allocationLoads, allocationLookahead, allocationSlots, } from "./functions.js";
@@ -112,6 +113,7 @@ export const AllocationSettingsType = StructType({
112
113
  * @property periods - The app's days: their status, and Publish; `none`, no status chip and no Publish
113
114
  * @property narrowed - Each narrowed source's keys, paged through its part of `slice`: the lanes, the resources and the arrivals that show
114
115
  * @property fit - The app's fit, by its `e3.function`'s name
116
+ * @property optimise - The app's optimiser, by its `e3.function`'s name: what the Elara eye calls over the day in view, its result one edit of the session; `none`, no eye (#1409)
115
117
  * @property check - The app's issues, from a `CheckContext(R)` as bytes
116
118
  * @property columns - The app's bin fields as columns and inspector rows
117
119
  * @property rules - The built-in rules
@@ -136,6 +138,7 @@ export const AllocationPayloadType = StructType({
136
138
  arrivals: OptionType(RowSourceType(ArrayType(StringType))),
137
139
  }),
138
140
  fit: FuncBindingType,
141
+ optimise: OptionType(FuncBindingType),
139
142
  check: OptionType(FunctionType([BlobType], ArrayType(T.AllocationIssueType))),
140
143
  columns: ArrayType(AllocationColumnType),
141
144
  rules: T.AllocationRulesType,
@@ -265,6 +268,28 @@ function fitBinding(fit, rowType) {
265
268
  }
266
269
  return fit.binding;
267
270
  }
271
+ /**
272
+ * What the Allocation holds `optimise` to (#1409): `Func.bind` of an `e3.function` from `Allocation.Types.OptimiseRequest(R)` to
273
+ * `Allocation.Types.OptimiseResult(R)`, R the bins' row type — a request over another row named by its bins' row.
274
+ *
275
+ * @param rowType - The bin kind's row type
276
+ * @returns The contract, for {@link optimiseBinding}
277
+ */
278
+ function allocationOptimiseContract(rowType) {
279
+ const rows = printType(rowType);
280
+ return {
281
+ builder: "Allocation", request: T.AllocationOptimiseRequestTypeFor(rowType), result: T.AllocationOptimiseResultTypeFor(rowType),
282
+ signature: "from Allocation.Types.OptimiseRequest(R) to Allocation.Types.OptimiseResult(R), R the bins' row type",
283
+ names: { request: "Allocation.Types.OptimiseRequest", result: "Allocation.Types.OptimiseResult" },
284
+ rows: { request: rows, result: rows }, noun: { theirs: "bin rows", ours: "the bin kind's rows" }, of: "the bins' row type",
285
+ otherRows: (asked) => {
286
+ // An OptimiseRequest over another row: its bins' row.
287
+ const bins = asked.type === "Struct" ? asked.fields["bins"] : undefined;
288
+ const theirs = bins?.type === "Dict" ? bins.value : undefined;
289
+ return theirs !== undefined && isTypeEqual(asked, T.AllocationOptimiseRequestTypeFor(theirs)) ? printType(theirs) : undefined;
290
+ },
291
+ };
292
+ }
268
293
  /**
269
294
  * Validates the declarations and assembles the Allocation's interface. View
270
295
  * and interaction behaviour belong to the renderer, not this factory.
@@ -279,7 +304,8 @@ function fitBinding(fit, rowType) {
279
304
  * by anything but String, or a resources kind with no `min` or `max`; `arrivals` that is not `Allocation.arrivals`, and
280
305
  * its `values` returning another struct than the bin kind's own fields; `periods` that is not `Schedule.periods`; a
281
306
  * `fit` that is not `Func.bind` of a function from `FitRequest(R)` to `FitResult`, one over another row type naming
282
- * both; a `check` of another type; a library tab or a column key listed twice; a label that is empty; the Table's
307
+ * both; an `optimise` that is not `Func.bind` of a function from `OptimiseRequest(R)` to `OptimiseResult(R)`, one over
308
+ * another row type naming both (#1409); a `check` of another type; a library tab or a column key listed twice; a label that is empty; the Table's
283
309
  * bands not starting at 0 and rising within the day; and as `Schedule`'s checks, the bin kind's build
284
310
  * (`buildAllocation`) and the slice's (`recordSources`) do
285
311
  * @internal
@@ -374,6 +400,7 @@ export function createAllocationPayload(props) {
374
400
  // The app's functions over the bin row type.
375
401
  const rowType = kind.rowType;
376
402
  const fit = fitBinding(props.fit, rowType);
403
+ const optimise = props.optimise === undefined ? undefined : optimiseBinding(props.optimise, allocationOptimiseContract(rowType));
377
404
  const check = props.check === undefined ? undefined : overBytes(props.check, T.AllocationCheckContextTypeFor(rowType), ArrayType(T.AllocationIssueType), `Allocation: \`check\` is an East function from Allocation.Types.CheckContext(${printType(rowType)}) to Array<Allocation.Types.Issue>`);
378
405
  // A booked bin's own fields, the ones no role maps: each arrival's `values`, at the bin kind's (B13).
379
406
  const initial = allocationInitial(arrivals, kind.allocationValues);
@@ -433,6 +460,7 @@ export function createAllocationPayload(props) {
433
460
  periods: periods === undefined ? none : some(periods.build()),
434
461
  narrowed: { lanes: shown(lanesSlot), resources: shown(partsSlot), arrivals: shown("arrivals") },
435
462
  fit,
463
+ optimise: optimise === undefined ? none : some(optimise),
436
464
  check: check === undefined ? none : some(check),
437
465
  columns,
438
466
  rules: { under: props.rules?.under ?? true },
@@ -494,6 +522,7 @@ export const Allocation = Object.assign((props) => AllocationComponent.Root(crea
494
522
  FitAsk: T.AllocationFitAskType, FitRequest: T.AllocationFitRequestTypeFor, FitResult: T.AllocationFitResultType, Fix: T.AllocationFixType,
495
523
  IssueKind: T.AllocationIssueKindType, Issue: T.AllocationIssueType, CheckContext: T.AllocationCheckContextTypeFor,
496
524
  SlotStatus: T.AllocationSlotStatusType, Slot: T.AllocationSlotType, Layout: T.AllocationLayoutType,
525
+ OptimiseRequest: T.AllocationOptimiseRequestTypeFor, OptimiseResult: T.AllocationOptimiseResultTypeFor,
497
526
  },
498
527
  });
499
528
  //# sourceMappingURL=index.js.map