@elaraai/e3-ui 1.0.98 → 1.0.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/README.md +0 -2
  2. package/dist/src/allocation/adapters.d.ts +1 -1
  3. package/dist/src/allocation/adapters.js +1 -1
  4. package/dist/src/allocation/index.d.ts +46 -90
  5. package/dist/src/allocation/index.d.ts.map +1 -1
  6. package/dist/src/allocation/index.js +5 -5
  7. package/dist/src/allocation/index.js.map +1 -1
  8. package/dist/src/bind/data-indexed.d.ts +273 -51
  9. package/dist/src/bind/data-indexed.d.ts.map +1 -1
  10. package/dist/src/bind/data-indexed.js +233 -56
  11. package/dist/src/bind/data-indexed.js.map +1 -1
  12. package/dist/src/bind/data.d.ts +48 -9
  13. package/dist/src/bind/data.d.ts.map +1 -1
  14. package/dist/src/bind/data.js +48 -3
  15. package/dist/src/bind/data.js.map +1 -1
  16. package/dist/src/bind/record.d.ts +61 -24
  17. package/dist/src/bind/record.d.ts.map +1 -1
  18. package/dist/src/bind/record.js +17 -57
  19. package/dist/src/bind/record.js.map +1 -1
  20. package/dist/src/calendar/index.d.ts +55 -95
  21. package/dist/src/calendar/index.d.ts.map +1 -1
  22. package/dist/src/calendar/index.js +10 -6
  23. package/dist/src/calendar/index.js.map +1 -1
  24. package/dist/src/flowchart/index.d.ts +35 -31
  25. package/dist/src/flowchart/index.d.ts.map +1 -1
  26. package/dist/src/flowchart/index.js +35 -31
  27. package/dist/src/flowchart/index.js.map +1 -1
  28. package/dist/src/flowchart/library.d.ts +108 -84
  29. package/dist/src/flowchart/library.d.ts.map +1 -1
  30. package/dist/src/flowchart/library.js +108 -84
  31. package/dist/src/flowchart/library.js.map +1 -1
  32. package/dist/src/flowchart/payload.d.ts +39 -107
  33. package/dist/src/flowchart/payload.d.ts.map +1 -1
  34. package/dist/src/flowchart/payload.js +3 -3
  35. package/dist/src/flowchart/payload.js.map +1 -1
  36. package/dist/src/flowchart/values.d.ts +35 -31
  37. package/dist/src/flowchart/values.d.ts.map +1 -1
  38. package/dist/src/flowchart/values.js +35 -31
  39. package/dist/src/flowchart/values.js.map +1 -1
  40. package/dist/src/flowchart/window.d.ts +0 -12
  41. package/dist/src/flowchart/window.d.ts.map +1 -1
  42. package/dist/src/flowchart/window.js +3 -2
  43. package/dist/src/flowchart/window.js.map +1 -1
  44. package/dist/src/index.d.ts +2 -2
  45. package/dist/src/index.d.ts.map +1 -1
  46. package/dist/src/index.js +1 -1
  47. package/dist/src/index.js.map +1 -1
  48. package/dist/src/internal.d.ts +7 -3
  49. package/dist/src/internal.d.ts.map +1 -1
  50. package/dist/src/internal.js +12 -3
  51. package/dist/src/internal.js.map +1 -1
  52. package/dist/src/plan/assemble.d.ts +8 -0
  53. package/dist/src/plan/assemble.d.ts.map +1 -1
  54. package/dist/src/plan/assemble.js +1 -1
  55. package/dist/src/plan/assemble.js.map +1 -1
  56. package/dist/src/plan/builders.d.ts +1518 -2
  57. package/dist/src/plan/builders.d.ts.map +1 -1
  58. package/dist/src/plan/builders.js +248 -114
  59. package/dist/src/plan/builders.js.map +1 -1
  60. package/dist/src/plan/event-rows.d.ts +9 -14
  61. package/dist/src/plan/event-rows.d.ts.map +1 -1
  62. package/dist/src/plan/event-rows.js +6 -46
  63. package/dist/src/plan/event-rows.js.map +1 -1
  64. package/dist/src/plan/factories.d.ts +72 -4
  65. package/dist/src/plan/factories.d.ts.map +1 -1
  66. package/dist/src/plan/factories.js +147 -1
  67. package/dist/src/plan/factories.js.map +1 -1
  68. package/dist/src/plan/index.d.ts +147 -125
  69. package/dist/src/plan/index.d.ts.map +1 -1
  70. package/dist/src/plan/index.js +135 -122
  71. package/dist/src/plan/index.js.map +1 -1
  72. package/dist/src/plan/ir.d.ts +1105 -44
  73. package/dist/src/plan/ir.d.ts.map +1 -1
  74. package/dist/src/plan/ir.js +5 -0
  75. package/dist/src/plan/ir.js.map +1 -1
  76. package/dist/src/plan/library.d.ts +65 -42
  77. package/dist/src/plan/library.d.ts.map +1 -1
  78. package/dist/src/plan/library.js +65 -42
  79. package/dist/src/plan/library.js.map +1 -1
  80. package/dist/src/plan/nested-checks.d.ts +146 -0
  81. package/dist/src/plan/nested-checks.d.ts.map +1 -0
  82. package/dist/src/plan/nested-checks.js +468 -0
  83. package/dist/src/plan/nested-checks.js.map +1 -0
  84. package/dist/src/plan/nested-patch.d.ts +35 -0
  85. package/dist/src/plan/nested-patch.d.ts.map +1 -0
  86. package/dist/src/plan/nested-patch.js +143 -0
  87. package/dist/src/plan/nested-patch.js.map +1 -0
  88. package/dist/src/plan/nested-read.d.ts +3250 -0
  89. package/dist/src/plan/nested-read.d.ts.map +1 -0
  90. package/dist/src/plan/nested-read.js +163 -0
  91. package/dist/src/plan/nested-read.js.map +1 -0
  92. package/dist/src/plan/nested.d.ts +280 -0
  93. package/dist/src/plan/nested.d.ts.map +1 -0
  94. package/dist/src/plan/nested.js +6 -0
  95. package/dist/src/plan/nested.js.map +1 -0
  96. package/dist/src/plan/ordered-source.d.ts +1030 -1
  97. package/dist/src/plan/ordered-source.d.ts.map +1 -1
  98. package/dist/src/plan/ordered-source.js +48 -6
  99. package/dist/src/plan/ordered-source.js.map +1 -1
  100. package/dist/src/plan/over.d.ts +111 -75
  101. package/dist/src/plan/over.d.ts.map +1 -1
  102. package/dist/src/plan/over.js +111 -75
  103. package/dist/src/plan/over.js.map +1 -1
  104. package/dist/src/plan/pick.d.ts +15 -3
  105. package/dist/src/plan/pick.d.ts.map +1 -1
  106. package/dist/src/plan/pick.js +75 -36
  107. package/dist/src/plan/pick.js.map +1 -1
  108. package/dist/src/plan/plan.d.ts +2719 -558
  109. package/dist/src/plan/plan.d.ts.map +1 -1
  110. package/dist/src/plan/plan.js +14 -2
  111. package/dist/src/plan/plan.js.map +1 -1
  112. package/dist/src/plan/reads.d.ts +421 -0
  113. package/dist/src/plan/reads.d.ts.map +1 -0
  114. package/dist/src/plan/reads.js +143 -0
  115. package/dist/src/plan/reads.js.map +1 -0
  116. package/dist/src/plan/refs.d.ts +111 -75
  117. package/dist/src/plan/refs.d.ts.map +1 -1
  118. package/dist/src/plan/refs.js +111 -75
  119. package/dist/src/plan/refs.js.map +1 -1
  120. package/dist/src/plan/root.d.ts +10 -5
  121. package/dist/src/plan/root.d.ts.map +1 -1
  122. package/dist/src/plan/root.js +76 -13
  123. package/dist/src/plan/root.js.map +1 -1
  124. package/dist/src/plan/series.d.ts +5140 -4331
  125. package/dist/src/plan/series.d.ts.map +1 -1
  126. package/dist/src/plan/series.js +1026 -264
  127. package/dist/src/plan/series.js.map +1 -1
  128. package/dist/src/plan/shade.d.ts +981 -0
  129. package/dist/src/plan/shade.d.ts.map +1 -0
  130. package/dist/src/plan/shade.js +60 -0
  131. package/dist/src/plan/shade.js.map +1 -0
  132. package/dist/src/plan/types.d.ts +178 -18
  133. package/dist/src/plan/types.d.ts.map +1 -1
  134. package/dist/src/plan/types.js +69 -19
  135. package/dist/src/plan/types.js.map +1 -1
  136. package/dist/src/query/builder.d.ts +3 -3
  137. package/dist/src/query/builder.d.ts.map +1 -1
  138. package/dist/src/query/builder.js +1 -1
  139. package/dist/src/query/library.d.ts +3 -3
  140. package/dist/src/query/library.d.ts.map +1 -1
  141. package/dist/src/query/library.js +1 -1
  142. package/dist/src/query/queries.d.ts +2 -2
  143. package/dist/src/query/queries.js +1 -1
  144. package/dist/src/query/saved.d.ts +8 -4
  145. package/dist/src/query/saved.d.ts.map +1 -1
  146. package/dist/src/query/saved.js +8 -4
  147. package/dist/src/query/saved.js.map +1 -1
  148. package/dist/src/query/types.d.ts +8 -3
  149. package/dist/src/query/types.d.ts.map +1 -1
  150. package/dist/src/query/types.js +8 -3
  151. package/dist/src/query/types.js.map +1 -1
  152. package/dist/src/roster/index.d.ts +47 -91
  153. package/dist/src/roster/index.d.ts.map +1 -1
  154. package/dist/src/roster/index.js +6 -6
  155. package/dist/src/roster/index.js.map +1 -1
  156. package/dist/src/roster/targets.d.ts +8 -4
  157. package/dist/src/roster/targets.d.ts.map +1 -1
  158. package/dist/src/roster/targets.js +9 -5
  159. package/dist/src/roster/targets.js.map +1 -1
  160. package/dist/src/schedule/cell-checks.js +3 -3
  161. package/dist/src/schedule/cell-checks.js.map +1 -1
  162. package/dist/src/schedule/days.d.ts +1 -1
  163. package/dist/src/schedule/days.js +1 -1
  164. package/dist/src/schedule/events.d.ts +10 -6
  165. package/dist/src/schedule/events.d.ts.map +1 -1
  166. package/dist/src/schedule/events.js +252 -228
  167. package/dist/src/schedule/events.js.map +1 -1
  168. package/dist/src/schedule/patch.d.ts +1 -1
  169. package/dist/src/schedule/patch.js +1 -1
  170. package/dist/src/schedule/periods.d.ts +8 -4
  171. package/dist/src/schedule/periods.d.ts.map +1 -1
  172. package/dist/src/schedule/periods.js +1 -1
  173. package/dist/src/schedule/periods.js.map +1 -1
  174. package/dist/src/schedule/record-window.d.ts +38 -58
  175. package/dist/src/schedule/record-window.d.ts.map +1 -1
  176. package/dist/src/schedule/record-window.js +15 -16
  177. package/dist/src/schedule/record-window.js.map +1 -1
  178. package/dist/src/schedule/resources.d.ts +1 -1
  179. package/dist/src/schedule/session.d.ts +1 -1
  180. package/dist/src/schedule/session.js +1 -1
  181. package/dist/src/schedule/types.d.ts +29 -1
  182. package/dist/src/schedule/types.d.ts.map +1 -1
  183. package/dist/src/schedule/types.js +16 -1
  184. package/dist/src/schedule/types.js.map +1 -1
  185. package/dist/src/schematic/index.d.ts +19 -9
  186. package/dist/src/schematic/index.d.ts.map +1 -1
  187. package/dist/src/schematic/index.js +19 -9
  188. package/dist/src/schematic/index.js.map +1 -1
  189. package/dist/src/schematic/kinds.d.ts +4 -4
  190. package/dist/src/schematic/kinds.js +9 -9
  191. package/dist/src/schematic/kinds.js.map +1 -1
  192. package/dist/src/schematic/payload.d.ts +38 -88
  193. package/dist/src/schematic/payload.d.ts.map +1 -1
  194. package/dist/src/schematic/payload.js +4 -4
  195. package/dist/src/schematic/payload.js.map +1 -1
  196. package/dist/src/schematic/window.d.ts +8 -7
  197. package/dist/src/schematic/window.d.ts.map +1 -1
  198. package/dist/src/schematic/window.js +22 -19
  199. package/dist/src/schematic/window.js.map +1 -1
  200. package/dist/src/sheet/bridge.d.ts +19 -0
  201. package/dist/src/sheet/bridge.d.ts.map +1 -1
  202. package/dist/src/sheet/bridge.js +28 -21
  203. package/dist/src/sheet/bridge.js.map +1 -1
  204. package/dist/src/sheet/index.d.ts +66 -46
  205. package/dist/src/sheet/index.d.ts.map +1 -1
  206. package/dist/src/sheet/index.js +66 -46
  207. package/dist/src/sheet/index.js.map +1 -1
  208. package/dist/src/sheet/library.d.ts +13 -8
  209. package/dist/src/sheet/library.d.ts.map +1 -1
  210. package/dist/src/sheet/library.js +13 -8
  211. package/dist/src/sheet/library.js.map +1 -1
  212. package/dist/src/sheet/record.d.ts +1 -1
  213. package/dist/src/sheet/record.js +2 -2
  214. package/dist/src/sheet/record.js.map +1 -1
  215. package/dist/src/sheet/registers.d.ts +152 -128
  216. package/dist/src/sheet/registers.d.ts.map +1 -1
  217. package/dist/src/sheet/registers.js +152 -128
  218. package/dist/src/sheet/registers.js.map +1 -1
  219. package/dist/src/sheet/root.d.ts +4 -1
  220. package/dist/src/sheet/root.d.ts.map +1 -1
  221. package/dist/src/sheet/root.js +15 -3
  222. package/dist/src/sheet/root.js.map +1 -1
  223. package/dist/src/sheet/sheet.d.ts +39 -113
  224. package/dist/src/sheet/sheet.d.ts.map +1 -1
  225. package/dist/src/sheet/sheet.js +7 -5
  226. package/dist/src/sheet/sheet.js.map +1 -1
  227. package/dist/src/sheet/sub-rows.d.ts +106 -76
  228. package/dist/src/sheet/sub-rows.d.ts.map +1 -1
  229. package/dist/src/sheet/sub-rows.js +106 -76
  230. package/dist/src/sheet/sub-rows.js.map +1 -1
  231. package/dist/src/sheet/types.d.ts +19 -62
  232. package/dist/src/sheet/types.d.ts.map +1 -1
  233. package/dist/src/studio/builder.d.ts +3 -153
  234. package/dist/src/studio/builder.d.ts.map +1 -1
  235. package/dist/src/studio/builder.js +1 -1
  236. package/dist/src/studio/canvas.d.ts +5 -4
  237. package/dist/src/studio/canvas.d.ts.map +1 -1
  238. package/dist/src/studio/canvas.js +8 -7
  239. package/dist/src/studio/canvas.js.map +1 -1
  240. package/dist/src/studio/component.d.ts +30 -20
  241. package/dist/src/studio/component.d.ts.map +1 -1
  242. package/dist/src/studio/component.js +26 -61
  243. package/dist/src/studio/component.js.map +1 -1
  244. package/dist/src/studio/index.d.ts +2 -2
  245. package/dist/src/studio/index.d.ts.map +1 -1
  246. package/dist/src/studio/index.js +1 -1
  247. package/dist/src/studio/index.js.map +1 -1
  248. package/dist/src/studio/inspector.d.ts +10 -39
  249. package/dist/src/studio/inspector.d.ts.map +1 -1
  250. package/dist/src/studio/inspector.js +11 -31
  251. package/dist/src/studio/inspector.js.map +1 -1
  252. package/dist/src/studio/library.d.ts +3 -169
  253. package/dist/src/studio/library.d.ts.map +1 -1
  254. package/dist/src/studio/library.js +1 -1
  255. package/dist/src/studio/page.d.ts +0 -8
  256. package/dist/src/studio/page.d.ts.map +1 -1
  257. package/dist/src/studio/pages.d.ts +17 -591
  258. package/dist/src/studio/pages.d.ts.map +1 -1
  259. package/dist/src/studio/pages.js +17 -44
  260. package/dist/src/studio/pages.js.map +1 -1
  261. package/dist/src/studio/palette.d.ts +2 -7
  262. package/dist/src/studio/palette.d.ts.map +1 -1
  263. package/dist/src/studio/palette.js +4 -5
  264. package/dist/src/studio/palette.js.map +1 -1
  265. package/dist/src/studio/publish.d.ts +8 -18
  266. package/dist/src/studio/publish.d.ts.map +1 -1
  267. package/dist/src/studio/publish.js +10 -36
  268. package/dist/src/studio/publish.js.map +1 -1
  269. package/dist/src/utils/derive.d.ts +12 -12
  270. package/dist/src/utils/derive.d.ts.map +1 -1
  271. package/dist/src/utils/derive.js +5 -2
  272. package/dist/src/utils/derive.js.map +1 -1
  273. package/dist/src/utils/ordered-source.d.ts.map +1 -1
  274. package/dist/src/utils/ordered-source.js +14 -5
  275. package/dist/src/utils/ordered-source.js.map +1 -1
  276. package/dist/test/allocation/allocation.examples.d.ts +1900 -1598
  277. package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
  278. package/dist/test/allocation/allocation.examples.js +179 -89
  279. package/dist/test/allocation/allocation.examples.js.map +1 -1
  280. package/dist/test/allocation/optimise.examples.d.ts.map +1 -1
  281. package/dist/test/allocation/optimise.examples.js +7 -7
  282. package/dist/test/allocation/optimise.examples.js.map +1 -1
  283. package/dist/test/bind/data/data.examples.d.ts +1057 -903
  284. package/dist/test/bind/data/data.examples.d.ts.map +1 -1
  285. package/dist/test/bind/data/data.examples.js +260 -204
  286. package/dist/test/bind/data/data.examples.js.map +1 -1
  287. package/dist/test/bind/record/record.examples.d.ts +457 -426
  288. package/dist/test/bind/record/record.examples.d.ts.map +1 -1
  289. package/dist/test/bind/record/record.examples.js +41 -21
  290. package/dist/test/bind/record/record.examples.js.map +1 -1
  291. package/dist/test/calendar/calendar-records.examples.d.ts +162 -170
  292. package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
  293. package/dist/test/calendar/calendar-records.examples.js +20 -12
  294. package/dist/test/calendar/calendar-records.examples.js.map +1 -1
  295. package/dist/test/calendar/calendar-windows.examples.d.ts.map +1 -1
  296. package/dist/test/calendar/calendar-windows.examples.js +12 -12
  297. package/dist/test/calendar/calendar-windows.examples.js.map +1 -1
  298. package/dist/test/calendar/calendar.examples.d.ts +1172 -901
  299. package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
  300. package/dist/test/calendar/calendar.examples.js +211 -124
  301. package/dist/test/calendar/calendar.examples.js.map +1 -1
  302. package/dist/test/calendar/optimise.examples.js +2 -2
  303. package/dist/test/calendar/optimise.examples.js.map +1 -1
  304. package/dist/test/examples-package.d.ts +6 -9
  305. package/dist/test/examples-package.d.ts.map +1 -1
  306. package/dist/test/examples-package.js +11 -32
  307. package/dist/test/examples-package.js.map +1 -1
  308. package/dist/test/flowchart/flowchart.examples.d.ts +3841 -2820
  309. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
  310. package/dist/test/flowchart/flowchart.examples.js +211 -121
  311. package/dist/test/flowchart/flowchart.examples.js.map +1 -1
  312. package/dist/test/plan/optimise.examples.js +2 -2
  313. package/dist/test/plan/optimise.examples.js.map +1 -1
  314. package/dist/test/plan/plan-events.examples.d.ts +4055 -3263
  315. package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
  316. package/dist/test/plan/plan-events.examples.js +492 -319
  317. package/dist/test/plan/plan-events.examples.js.map +1 -1
  318. package/dist/test/plan/plan-nested.examples.d.ts +1829 -0
  319. package/dist/test/plan/plan-nested.examples.d.ts.map +1 -0
  320. package/dist/test/plan/plan-nested.examples.js +321 -0
  321. package/dist/test/plan/plan-nested.examples.js.map +1 -0
  322. package/dist/test/plan/plan-records.examples.d.ts +328 -362
  323. package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
  324. package/dist/test/plan/plan-records.examples.js +81 -57
  325. package/dist/test/plan/plan-records.examples.js.map +1 -1
  326. package/dist/test/plan/plan-windows.examples.d.ts +1756 -1398
  327. package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
  328. package/dist/test/plan/plan-windows.examples.js +161 -128
  329. package/dist/test/plan/plan-windows.examples.js.map +1 -1
  330. package/dist/test/plan/plan.examples.d.ts +2238 -5712
  331. package/dist/test/plan/plan.examples.d.ts.map +1 -1
  332. package/dist/test/plan/plan.examples.js +839 -968
  333. package/dist/test/plan/plan.examples.js.map +1 -1
  334. package/dist/test/query/query.examples.d.ts +5221 -3005
  335. package/dist/test/query/query.examples.d.ts.map +1 -1
  336. package/dist/test/query/query.examples.js +169 -118
  337. package/dist/test/query/query.examples.js.map +1 -1
  338. package/dist/test/roster/optimise.examples.d.ts.map +1 -1
  339. package/dist/test/roster/optimise.examples.js +7 -7
  340. package/dist/test/roster/optimise.examples.js.map +1 -1
  341. package/dist/test/roster/roster-records.examples.d.ts +364 -392
  342. package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
  343. package/dist/test/roster/roster-records.examples.js +40 -26
  344. package/dist/test/roster/roster-records.examples.js.map +1 -1
  345. package/dist/test/roster/roster.examples.d.ts +4605 -4308
  346. package/dist/test/roster/roster.examples.d.ts.map +1 -1
  347. package/dist/test/roster/roster.examples.js +212 -113
  348. package/dist/test/roster/roster.examples.js.map +1 -1
  349. package/dist/test/schedule/schedule.examples.d.ts +2646 -2471
  350. package/dist/test/schedule/schedule.examples.d.ts.map +1 -1
  351. package/dist/test/schedule/schedule.examples.js +144 -88
  352. package/dist/test/schedule/schedule.examples.js.map +1 -1
  353. package/dist/test/schematic/schematic-records.examples.d.ts +286 -276
  354. package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -1
  355. package/dist/test/schematic/schematic-records.examples.js +52 -38
  356. package/dist/test/schematic/schematic-records.examples.js.map +1 -1
  357. package/dist/test/schematic/schematic.examples.d.ts +1842 -1491
  358. package/dist/test/schematic/schematic.examples.d.ts.map +1 -1
  359. package/dist/test/schematic/schematic.examples.js +240 -134
  360. package/dist/test/schematic/schematic.examples.js.map +1 -1
  361. package/dist/test/sheet/optimise.examples.d.ts +102 -95
  362. package/dist/test/sheet/optimise.examples.d.ts.map +1 -1
  363. package/dist/test/sheet/optimise.examples.js +7 -3
  364. package/dist/test/sheet/optimise.examples.js.map +1 -1
  365. package/dist/test/sheet/sheet-records.examples.d.ts +175 -214
  366. package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
  367. package/dist/test/sheet/sheet-records.examples.js +29 -17
  368. package/dist/test/sheet/sheet-records.examples.js.map +1 -1
  369. package/dist/test/sheet/sheet.examples.d.ts +3642 -3353
  370. package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
  371. package/dist/test/sheet/sheet.examples.js +389 -282
  372. package/dist/test/sheet/sheet.examples.js.map +1 -1
  373. package/dist/test/studio/component.examples.js +2 -2
  374. package/dist/test/studio/component.examples.js.map +1 -1
  375. package/dist/test/studio/page.examples.js +6 -6
  376. package/dist/test/studio/page.examples.js.map +1 -1
  377. package/dist/test/studio/studio.examples.d.ts +2329 -873
  378. package/dist/test/studio/studio.examples.d.ts.map +1 -1
  379. package/dist/test/studio/studio.examples.js +155 -107
  380. package/dist/test/studio/studio.examples.js.map +1 -1
  381. package/package.json +15 -11
@@ -1 +1 @@
1
- {"version":3,"file":"schematic.examples.d.ts","sourceRoot":"","sources":["../../../test/schematic/schematic.examples.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,sCAAsC;AACtC,OAAO,EACH,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAQ,SAAS,EAAgB,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAa,UAAU,EAAE,UAAU,EAAE,WAAW,EACtI,OAAO,EACtB,MAAM,eAAe,CAAC;AAavB,4GAA4G;AAC5G,eAAO,MAAM,QAAQ;;;;;;EAAgH,CAAC;AACtI,eAAO,MAAM,gBAAgB;;;;;;0EAK1B,CAAC;AACJ,gHAAgH;AAChH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAsC,CAAC;AAOzE,eAAO,MAAM,SAAS;;;;;;;;;EAAkJ,CAAC;AACzK,eAAO,MAAM,mBAAmB;;;;;;;;;8EAO7B,CAAC;AACJ,0HAA0H;AAC1H,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAyC,CAAC;AAE/E,eAAO,MAAM,cAAc,6CAyBzB,CAAC;AAMH;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,6CA2B5B,CAAC;AAMH,iEAAiE;AACjE,eAAO,MAAM,UAAU;;;EAA6C,CAAC;AACrE,uIAAuI;AACvI,eA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AC;AAEH,eAAO,MAAM,mBAAmB,6CAyK9B,CAAC;AAMH,8GAA8G;AAC9G,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiBjC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,6CAkC7B,CAAC"}
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@elaraai/e3-ui/jsx-runtime";
5
5
  */
6
6
  /** @jsxImportSource @elaraai/e3-ui */
7
7
  import { ArrayType, BooleanType, DictType, East, FloatType, FunctionType, IntegerType, NullType, OptionType, PatchType, StringType, StructType, VariantType, example, none, some, variant, } from "@elaraai/east";
8
- import { Box, Button, Reactive, Slice, State, Text, UIComponentType, VStack } from "@elaraai/east-ui";
8
+ import { Box, Button, HStack, Reactive, Slice, State, Text, UIComponentType, VStack } from "@elaraai/east-ui";
9
9
  import { Data, Record, Schematic } from "@elaraai/e3-ui";
10
10
  import e3 from "@elaraai/e3";
11
11
  // ============================================================================
@@ -17,29 +17,41 @@ import e3 from "@elaraai/e3";
17
17
  // the row's own fields (D35), and the layers are a record of the app's (D36).
18
18
  /** A system the floor's equipment and areas belong to: a layer of the drawing, its colour a theme token. */
19
19
  export const DcSystem = StructType({ label: StringType, colour: StringType, order: IntegerType, fixed: BooleanType, dim: FloatType });
20
- export const schematicSystems = e3.record("schematic_systems", DictType(StringType, DcSystem), new Map([
21
- ["structure", { label: "Structure", colour: "fg.muted", order: 1n, fixed: true, dim: 0.6 }],
22
- ["power", { label: "Power", colour: "status.warn", order: 2n, fixed: false, dim: 1.0 }],
23
- ["cooling", { label: "Cooling", colour: "brand.solid", order: 3n, fixed: false, dim: 1.0 }],
24
- ["network", { label: "Network", colour: "status.pos", order: 4n, fixed: false, dim: 1.0 }],
25
- ]));
26
- /** The systems' patch door: another session's change of a layer — its colour, say — which the floor redraws. */
27
- export const schematicSystemsPatch = e3.mutation.patch(schematicSystems);
20
+ export const schematicSystems = e3.record("schematic_systems", DictType(StringType, DcSystem), {
21
+ initial: new Map([
22
+ ["structure", { label: "Structure", colour: "fg.muted", order: 1n, fixed: true, dim: 0.6 }],
23
+ ["power", { label: "Power", colour: "status.warn", order: 2n, fixed: false, dim: 1.0 }],
24
+ ["cooling", { label: "Cooling", colour: "brand.solid", order: 3n, fixed: false, dim: 1.0 }],
25
+ ["network", { label: "Network", colour: "status.pos", order: 4n, fixed: false, dim: 1.0 }],
26
+ ]),
27
+ mutations: (mutation) => ({
28
+ // The systems' patch door: another session's change of a layer — its colour, say — which the floor redraws.
29
+ patch: mutation.patch(),
30
+ }),
31
+ });
28
32
  // ============================================================================
29
33
  // ----------------------------------------------------------------------------
30
34
  // The smallest: one hall's racks, read only
31
35
  // ----------------------------------------------------------------------------
32
36
  export const FloorRack = StructType({ name: StringType, x: FloatType, y: FloatType, w: FloatType, h: FloatType, model: StringType, kw: FloatType, capacity: FloatType });
33
- export const schematicFloorRacks = e3.record("schematic_floor_racks", DictType(StringType, FloorRack), new Map([
34
- ["A01", { name: "A01", x: 2.4, y: 2.9, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 5.2, capacity: 8.0 }],
35
- ["A02", { name: "A02", x: 6.0, y: 2.9, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 7.4, capacity: 8.0 }],
36
- ["A03", { name: "A03", x: 9.6, y: 2.9, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 3.9, capacity: 8.0 }],
37
- ["A04", { name: "A04", x: 13.2, y: 2.9, w: 3.2, h: 1.2, model: "48U · 12 kW", kw: 9.6, capacity: 12.0 }],
38
- ["B01", { name: "B01", x: 2.4, y: 8.6, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 6.1, capacity: 8.0 }],
39
- ["B02", { name: "B02", x: 6.0, y: 8.6, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 2.8, capacity: 8.0 }],
40
- ]));
41
- /** The floor's racks' patch door: the handover's Save, and another session's moves of a rack, which the floor redraws. */
42
- export const schematicFloorRacksPatch = e3.mutation.patch(schematicFloorRacks);
37
+ export const schematicFloorRacks = e3.record("schematic_floor_racks", DictType(StringType, FloorRack), {
38
+ initial: new Map([
39
+ ["A01", { name: "A01", x: 2.4, y: 2.9, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 5.2, capacity: 8.0 }],
40
+ ["A02", { name: "A02", x: 6.0, y: 2.9, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 7.4, capacity: 8.0 }],
41
+ ["A03", { name: "A03", x: 9.6, y: 2.9, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 3.9, capacity: 8.0 }],
42
+ ["A04", { name: "A04", x: 13.2, y: 2.9, w: 3.2, h: 1.2, model: "48U · 12 kW", kw: 9.6, capacity: 12.0 }],
43
+ ["B01", { name: "B01", x: 2.4, y: 8.6, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 6.1, capacity: 8.0 }],
44
+ ["B02", { name: "B02", x: 6.0, y: 8.6, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 2.8, capacity: 8.0 }],
45
+ ]),
46
+ indexes: (index) => ({
47
+ // The racks by their model: what the binding matrix's source reads them through, built and never run.
48
+ schematic_floor_racks_by_model: index.on(["model"]),
49
+ }),
50
+ mutations: (mutation) => ({
51
+ // The floor's racks' patch door: the handover's Save, and another session's moves of a rack, which the floor redraws.
52
+ patch: mutation.patch(),
53
+ }),
54
+ });
43
55
  export const schematicFloor = example({
44
56
  keywords: ["Schematic", "Schematic.items", "Data.bind", "records", "racks", "meter", "read only", "canvas", "id"],
45
57
  description: "One hall's racks, read only, with no panes: a record of racks bound with Data.bind, each rack's fields mapped to the Schematic's roles — its centre, its box, its name, its model and its power as a meter",
@@ -71,7 +83,7 @@ export const schematicHandover = example({
71
83
  ],
72
84
  description: "The same hall handed over to its install crew, who move its racks into place: the racks bound with their patch door, so Move moves them and Del deletes them, each a step of the history Save writes through it; with no pane — no library and no inspector — its frame is its toolbar, its canvas and its footer",
73
85
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
74
- const racks = $.let(Record.bind(schematicFloorRacks, [schematicFloorRacksPatch]));
86
+ const racks = $.let(Record.bind(schematicFloorRacks));
75
87
  return (_jsx(Box, { height: "440px", children: _jsx(Schematic, { id: "handover", extent: { width: 18, height: 12 }, scaleUnit: "m", items: {
76
88
  racks: Schematic.items(racks, {
77
89
  name: "Rack", icon: "server", x: "x", y: "y", width: "w", height: "h", label: "name",
@@ -100,20 +112,24 @@ export const ShapeAreaKind = VariantType({ hall: NullType, duct: StructType({ wi
100
112
  export const ShapeArea = StructType({
101
113
  name: StringType, x: FloatType, y: FloatType, w: FloatType, h: FloatType, kind: ShapeAreaKind, corners: ArrayType(ShapeCorner), system: StringType,
102
114
  });
103
- export const schematicShapeUnits = e3.record("schematic_shape_units", DictType(StringType, ShapeUnit), new Map([
104
- ["CRAH-1", { name: "CRAH-1", x: 6.2, y: 4.6, w: 5.0, h: 3.4, kind: "cooling unit", system: "cooling", tint: some("status.info"), radius: none,
105
- outline: [{ x: -2.2, y: -1.6 }, { x: 2.4, y: -1.1 }, { x: 2.1, y: 1.6 }, { x: -2.5, y: 1.1 }] }],
106
- ["CT-2", { name: "CT-2", x: 16.4, y: 4.8, w: 4.6, h: 4.6, kind: "cooling tower", system: "cooling", tint: some("heat.3"), radius: some(2.3), outline: [] }],
107
- ["PDU-3", { name: "PDU-3", x: 22.0, y: 4.6, w: 1.2, h: 0.8, kind: "power distribution unit", system: "power", tint: none, radius: none, outline: [] }],
108
- ]));
109
- export const schematicShapeAreas = e3.record("schematic_shape_areas", DictType(StringType, ShapeArea), new Map([
110
- ["hall-3", { name: "Hall 3", x: 1.6, y: 1.4, w: 9.3, h: 6.6, system: "structure", kind: variant("hall", null),
111
- corners: [{ x: -4.65, y: -2.5, bulge: 0.0 }, { x: 4.15, y: -3.3, bulge: 0.0 }, { x: 4.65, y: 2.7, bulge: 0.0 }, { x: -4.25, y: 3.3, bulge: 0.0 }] }],
112
- ["duct", { name: "Duct bank", x: 1.0, y: 9.1, w: 23.8, h: 3.4, system: "power", kind: variant("duct", { width: 1.4 }),
113
- corners: [
114
- { x: -11.7, y: 1.0, bulge: 0.0 }, { x: -6.3, y: -0.8, bulge: 0.45 }, { x: -0.1, y: 0.8, bulge: -0.45 }, { x: 5.7, y: -1.0, bulge: 0.35 }, { x: 11.5, y: 0.2, bulge: 0.0 },
115
- ] }],
116
- ]));
115
+ export const schematicShapeUnits = e3.record("schematic_shape_units", DictType(StringType, ShapeUnit), {
116
+ initial: new Map([
117
+ ["CRAH-1", { name: "CRAH-1", x: 6.2, y: 4.6, w: 5.0, h: 3.4, kind: "cooling unit", system: "cooling", tint: some("status.info"), radius: none,
118
+ outline: [{ x: -2.2, y: -1.6 }, { x: 2.4, y: -1.1 }, { x: 2.1, y: 1.6 }, { x: -2.5, y: 1.1 }] }],
119
+ ["CT-2", { name: "CT-2", x: 16.4, y: 4.8, w: 4.6, h: 4.6, kind: "cooling tower", system: "cooling", tint: some("heat.3"), radius: some(2.3), outline: [] }],
120
+ ["PDU-3", { name: "PDU-3", x: 22.0, y: 4.6, w: 1.2, h: 0.8, kind: "power distribution unit", system: "power", tint: none, radius: none, outline: [] }],
121
+ ]),
122
+ });
123
+ export const schematicShapeAreas = e3.record("schematic_shape_areas", DictType(StringType, ShapeArea), {
124
+ initial: new Map([
125
+ ["hall-3", { name: "Hall 3", x: 1.6, y: 1.4, w: 9.3, h: 6.6, system: "structure", kind: variant("hall", null),
126
+ corners: [{ x: -4.65, y: -2.5, bulge: 0.0 }, { x: 4.15, y: -3.3, bulge: 0.0 }, { x: 4.65, y: 2.7, bulge: 0.0 }, { x: -4.25, y: 3.3, bulge: 0.0 }] }],
127
+ ["duct", { name: "Duct bank", x: 1.0, y: 9.1, w: 23.8, h: 3.4, system: "power", kind: variant("duct", { width: 1.4 }),
128
+ corners: [
129
+ { x: -11.7, y: 1.0, bulge: 0.0 }, { x: -6.3, y: -0.8, bulge: 0.45 }, { x: -0.1, y: 0.8, bulge: -0.45 }, { x: 5.7, y: -1.0, bulge: 0.35 }, { x: 11.5, y: 0.2, bulge: 0.0 },
130
+ ] }],
131
+ ]),
132
+ });
117
133
  export const schematicShapes = example({
118
134
  keywords: [
119
135
  "Schematic", "Schematic.items", "Schematic.zones", "Schematic.layers", "footprint", "geometry", "accessor", "Schematic.circle", "Schematic.polygon",
@@ -202,61 +218,79 @@ export const DcFibreValues = StructType({
202
218
  export const DcFibreTemplate = StructType({ name: StringType, system: StringType, values: DcFibreValues });
203
219
  /** A tenant of the floor: the owner a rack is let to, and who looks after its racks. */
204
220
  export const DcOwner = StructType({ name: StringType, contact: StringType });
205
- export const schematicRacks = e3.record("schematic_racks", DictType(StringType, DcRack), new Map([
206
- ["A01", { name: "A01", x: some(2.4), y: some(2.9), w: 3.2, h: 1.2, model: "42U · 8 kW", hall: "Cage A", system: "power", owner: "Harbour Labs" }],
207
- ["A02", { name: "A02", x: some(6.0), y: some(2.9), w: 3.2, h: 1.2, model: "42U · 8 kW", hall: "Cage A", system: "power", owner: "Harbour Labs" }],
208
- ["A03", { name: "A03", x: some(9.6), y: some(2.9), w: 3.2, h: 1.2, model: "42U · 8 kW", hall: "Cage A", system: "power", owner: "Northwind Media" }],
209
- ["A04", { name: "A04", x: some(13.2), y: some(2.9), w: 3.2, h: 1.2, model: "48U · 12 kW", hall: "Cage A", system: "power", owner: "Northwind Media" }],
210
- ["A05", { name: "A05", x: some(16.8), y: some(2.9), w: 3.2, h: 1.2, model: "48U · 12 kW", hall: "Cage A", system: "power", owner: "Elmway College" }],
211
- ["A06", { name: "A06", x: none, y: none, w: 3.2, h: 1.2, model: "48U · 12 kW", hall: "Cage A", system: "power", owner: "Elmway College" }],
212
- ["A07", { name: "A07", x: none, y: none, w: 3.2, h: 1.2, model: "42U · 8 kW", hall: "Cage A", system: "power", owner: "" }],
213
- ]));
214
- export const schematicRacksPatch = e3.mutation.patch(schematicRacks);
215
- export const schematicRacksByName = e3.recordIndex("schematic_racks_by_name", schematicRacks, { on: ["name"] });
216
- export const schematicRacksByHall = e3.recordIndex("schematic_racks_by_hall", schematicRacks, { on: ["hall"] });
217
- export const schematicRacksByOwner = e3.recordIndex("schematic_racks_by_owner", schematicRacks, { on: ["owner"] });
218
- /**
219
- * The racks filed by their boxes at a 1 cm cell, for a floor read a window at a time (#1393): what a window reads whatever
220
- * the rail chooses, and the racks with no position, under its unplaced clause, which the Backlog pages.
221
- */
222
- export const schematicRacksByArea = e3.recordIndex.area("schematic_racks_by_area", schematicRacks, {
223
- x: "x", y: "y", width: "w", height: "h", at: "centre", cell: 0.01,
221
+ export const schematicRacks = e3.record("schematic_racks", DictType(StringType, DcRack), {
222
+ initial: new Map([
223
+ ["A01", { name: "A01", x: some(2.4), y: some(2.9), w: 3.2, h: 1.2, model: "42U · 8 kW", hall: "Cage A", system: "power", owner: "Harbour Labs" }],
224
+ ["A02", { name: "A02", x: some(6.0), y: some(2.9), w: 3.2, h: 1.2, model: "42U · 8 kW", hall: "Cage A", system: "power", owner: "Harbour Labs" }],
225
+ ["A03", { name: "A03", x: some(9.6), y: some(2.9), w: 3.2, h: 1.2, model: "42U · 8 kW", hall: "Cage A", system: "power", owner: "Northwind Media" }],
226
+ ["A04", { name: "A04", x: some(13.2), y: some(2.9), w: 3.2, h: 1.2, model: "48U · 12 kW", hall: "Cage A", system: "power", owner: "Northwind Media" }],
227
+ ["A05", { name: "A05", x: some(16.8), y: some(2.9), w: 3.2, h: 1.2, model: "48U · 12 kW", hall: "Cage A", system: "power", owner: "Elmway College" }],
228
+ ["A06", { name: "A06", x: none, y: none, w: 3.2, h: 1.2, model: "48U · 12 kW", hall: "Cage A", system: "power", owner: "Elmway College" }],
229
+ ["A07", { name: "A07", x: none, y: none, w: 3.2, h: 1.2, model: "42U · 8 kW", hall: "Cage A", system: "power", owner: "" }],
230
+ ]),
231
+ indexes: (index) => ({
232
+ schematic_racks_by_name: index.on(["name"]),
233
+ schematic_racks_by_hall: index.on(["hall"]),
234
+ schematic_racks_by_owner: index.on(["owner"]),
235
+ // The racks filed by their boxes at a 1 cm cell, for a floor read a window at a time (#1393): what a window reads whatever
236
+ // the rail chooses, and the racks with no position, under its unplaced clause, which the Backlog pages.
237
+ schematic_racks_by_area: index.area({
238
+ x: "x", y: "y", width: "w", height: "h", at: "centre", cell: 0.01,
239
+ }),
240
+ // Beside it, a choice of owners and the window — or the racks with no position — in one read.
241
+ schematic_racks_by_owner_area: index.area({
242
+ on: ["owner"], x: "x", y: "y", width: "w", height: "h", at: "centre", cell: 0.01,
243
+ }),
244
+ }),
245
+ mutations: (mutation) => ({
246
+ patch: mutation.patch(),
247
+ }),
248
+ });
249
+ export const schematicRackLoads = e3.record("schematic_rack_loads", DictType(StringType, DcLoad), {
250
+ initial: new Map([
251
+ ["A01", { kw: 5.2, capacity: 8.0, alarm: variant("ok", null) }],
252
+ ["A02", { kw: 7.4, capacity: 8.0, alarm: variant("warm", null) }],
253
+ ["A03", { kw: 3.9, capacity: 8.0, alarm: variant("ok", null) }],
254
+ ["A04", { kw: 11.6, capacity: 12.0, alarm: variant("hot", null) }],
255
+ ["A05", { kw: 0.0, capacity: 12.0, alarm: variant("ok", null) }],
256
+ ]),
257
+ mutations: (mutation) => ({
258
+ // The racks' loads' patch door: a rack's capacity edited in the inspector's details.
259
+ patch: mutation.patch(),
260
+ }),
224
261
  });
225
- /** Beside it, a choice of owners and the window — or the racks with no position — in one read. */
226
- export const schematicRacksByOwnerArea = e3.recordIndex.area("schematic_racks_by_owner_area", schematicRacks, {
227
- on: ["owner"], x: "x", y: "y", width: "w", height: "h", at: "centre", cell: 0.01,
262
+ export const schematicFrames = e3.record("schematic_frames", DictType(StringType, DcUnit), {
263
+ initial: new Map([
264
+ ["MMR-1", { name: "MMR-1", x: 24.2, y: 2.9, w: 4.0, h: 1.2, kind: "demarc · 48 ports", system: "network" }],
265
+ ["ODF-1", { name: "ODF-1", x: 8.4, y: 9.6, w: 12.8, h: 1.0, kind: "fibre frame · 288 F", system: "network" }],
266
+ ["CORE-1", { name: "CORE-1", x: 23.2, y: 9.7, w: 4.0, h: 1.2, kind: "core · 64 ports", system: "network" }],
267
+ ]),
268
+ });
269
+ export const schematicPdus = e3.record("schematic_pdus", DictType(StringType, DcUnit), {
270
+ initial: new Map([
271
+ ["PDU-A", { name: "PDU-A", x: 1.6, y: 4.2, w: 1.2, h: 0.6, kind: "PDU · 32 A", system: "power" }],
272
+ ["PDU-B", { name: "PDU-B", x: 18.6, y: 4.2, w: 1.2, h: 0.6, kind: "PDU · 32 A", system: "power" }],
273
+ ]),
274
+ });
275
+ export const schematicCooling = e3.record("schematic_cooling", DictType(StringType, DcCooling), {
276
+ initial: new Map([
277
+ ["CRAH-1", { name: "CRAH-1", x: 3.0, y: 11.9, w: 1.4, h: 1.4, radius: 0.7, setpoint: 22.0, system: "cooling" }],
278
+ ["CRAH-2", { name: "CRAH-2", x: 9.0, y: 11.9, w: 1.4, h: 1.4, radius: 0.7, setpoint: 22.0, system: "cooling" }],
279
+ ["CRAH-3", { name: "CRAH-3", x: 15.0, y: 11.9, w: 1.4, h: 1.4, radius: 0.7, setpoint: 23.0, system: "cooling" }],
280
+ ]),
281
+ mutations: (mutation) => ({
282
+ patch: mutation.patch(),
283
+ }),
284
+ });
285
+ export const schematicAreas = e3.record("schematic_areas", DictType(StringType, DcArea), {
286
+ initial: new Map([
287
+ ["cage-a", { name: "Cage A", x: 0.6, y: 0.6, w: 19.6, h: 4.6, kind: variant("room", null), system: "structure" }],
288
+ ["mmr", { name: "Meet-me room", x: 21.0, y: 0.6, w: 6.4, h: 4.6, kind: variant("room", null), system: "structure" }],
289
+ ["cold-a", { name: "Cold aisle A · 1.2 m", x: 0.6, y: 6.0, w: 26.8, h: 1.2, kind: variant("cold", null), system: "cooling" }],
290
+ ["net-room", { name: "Network room", x: 19.0, y: 7.8, w: 8.4, h: 3.8, kind: variant("room", null), system: "structure" }],
291
+ ["hot-a", { name: "Hot aisle A · 1.0 m", x: 0.6, y: 12.9, w: 18.0, h: 0.9, kind: variant("hot", null), system: "cooling" }],
292
+ ]),
228
293
  });
229
- export const schematicRackLoads = e3.record("schematic_rack_loads", DictType(StringType, DcLoad), new Map([
230
- ["A01", { kw: 5.2, capacity: 8.0, alarm: variant("ok", null) }],
231
- ["A02", { kw: 7.4, capacity: 8.0, alarm: variant("warm", null) }],
232
- ["A03", { kw: 3.9, capacity: 8.0, alarm: variant("ok", null) }],
233
- ["A04", { kw: 11.6, capacity: 12.0, alarm: variant("hot", null) }],
234
- ["A05", { kw: 0.0, capacity: 12.0, alarm: variant("ok", null) }],
235
- ]));
236
- /** The racks' loads' patch door: a rack's capacity edited in the inspector's details. */
237
- export const schematicRackLoadsPatch = e3.mutation.patch(schematicRackLoads);
238
- export const schematicFrames = e3.record("schematic_frames", DictType(StringType, DcUnit), new Map([
239
- ["MMR-1", { name: "MMR-1", x: 24.2, y: 2.9, w: 4.0, h: 1.2, kind: "demarc · 48 ports", system: "network" }],
240
- ["ODF-1", { name: "ODF-1", x: 8.4, y: 9.6, w: 12.8, h: 1.0, kind: "fibre frame · 288 F", system: "network" }],
241
- ["CORE-1", { name: "CORE-1", x: 23.2, y: 9.7, w: 4.0, h: 1.2, kind: "core · 64 ports", system: "network" }],
242
- ]));
243
- export const schematicPdus = e3.record("schematic_pdus", DictType(StringType, DcUnit), new Map([
244
- ["PDU-A", { name: "PDU-A", x: 1.6, y: 4.2, w: 1.2, h: 0.6, kind: "PDU · 32 A", system: "power" }],
245
- ["PDU-B", { name: "PDU-B", x: 18.6, y: 4.2, w: 1.2, h: 0.6, kind: "PDU · 32 A", system: "power" }],
246
- ]));
247
- export const schematicCooling = e3.record("schematic_cooling", DictType(StringType, DcCooling), new Map([
248
- ["CRAH-1", { name: "CRAH-1", x: 3.0, y: 11.9, w: 1.4, h: 1.4, radius: 0.7, setpoint: 22.0, system: "cooling" }],
249
- ["CRAH-2", { name: "CRAH-2", x: 9.0, y: 11.9, w: 1.4, h: 1.4, radius: 0.7, setpoint: 22.0, system: "cooling" }],
250
- ["CRAH-3", { name: "CRAH-3", x: 15.0, y: 11.9, w: 1.4, h: 1.4, radius: 0.7, setpoint: 23.0, system: "cooling" }],
251
- ]));
252
- export const schematicCoolingPatch = e3.mutation.patch(schematicCooling);
253
- export const schematicAreas = e3.record("schematic_areas", DictType(StringType, DcArea), new Map([
254
- ["cage-a", { name: "Cage A", x: 0.6, y: 0.6, w: 19.6, h: 4.6, kind: variant("room", null), system: "structure" }],
255
- ["mmr", { name: "Meet-me room", x: 21.0, y: 0.6, w: 6.4, h: 4.6, kind: variant("room", null), system: "structure" }],
256
- ["cold-a", { name: "Cold aisle A · 1.2 m", x: 0.6, y: 6.0, w: 26.8, h: 1.2, kind: variant("cold", null), system: "cooling" }],
257
- ["net-room", { name: "Network room", x: 19.0, y: 7.8, w: 8.4, h: 3.8, kind: variant("room", null), system: "structure" }],
258
- ["hot-a", { name: "Hot aisle A · 1.0 m", x: 0.6, y: 12.9, w: 18.0, h: 0.9, kind: variant("hot", null), system: "cooling" }],
259
- ]));
260
294
  /** The floor's fibre runs, as its record and the frozen floor's hold them. */
261
295
  const dcFibreRuns = new Map([
262
296
  ["u1", { from: variant("rack", "A01"), to: variant("frame", "ODF-1"), path: [], label: some("uplink"), speed: some("100G"), cable: variant("fibre", null), system: "network" }],
@@ -266,46 +300,72 @@ const dcFibreRuns = new Map([
266
300
  ["u4", { from: variant("rack", "A04"), to: variant("frame", "ODF-1"), path: [], label: none, speed: some("2 × 100G"), cable: variant("fibre", null), system: "network" }],
267
301
  ["x1", { from: variant("frame", "MMR-1"), to: variant("frame", "CORE-1"), path: [{ x: 26.0, y: 6.6 }], label: none, speed: some("2 × 10G"), cable: variant("logical", null), system: "network" }],
268
302
  ]);
269
- export const schematicFibre = e3.record("schematic_fibre", DictType(StringType, DcFibre), dcFibreRuns);
270
- export const schematicFibrePatch = e3.mutation.patch(schematicFibre);
271
- /**
272
- * The fibre runs by system, for a floor whose rail narrows its runs through a source of their own: a run read complete
273
- * through its narrowing, a run a draft changed that a choice leaves out waiting in its session (#1391).
274
- */
275
- export const schematicFibreBySystem = e3.recordIndex("schematic_fibre_by_system", schematicFibre, { on: ["system"] });
303
+ export const schematicFibre = e3.record("schematic_fibre", DictType(StringType, DcFibre), {
304
+ initial: dcFibreRuns,
305
+ indexes: (index) => ({
306
+ // The fibre runs by system, for a floor whose rail narrows its runs through a source of their own: a run read complete
307
+ // through its narrowing, a run a draft changed that a choice leaves out waiting in its session (#1391).
308
+ schematic_fibre_by_system: index.on(["system"]),
309
+ }),
310
+ mutations: (mutation) => ({
311
+ patch: mutation.patch(),
312
+ }),
313
+ });
276
314
  /** The fibre runs of a floor whose cabling is frozen: the same runs, which no Save changes. */
277
- export const schematicFrozenFibre = e3.record("schematic_frozen_fibre", DictType(StringType, DcFibre), dcFibreRuns);
278
- /** The frozen floor's door, a checked one: it refuses every change, naming why — what a Save over it is answered. */
279
- export const schematicFrozenFibrePatch = e3.mutation.reduce("patch", schematicFrozenFibre, East.function([DictType(StringType, DcFibre), PatchType(DictType(StringType, DcFibre))], DictType(StringType, DcFibre), ($, runs, _patch) => {
280
- $.error("the fibre runs are frozen");
281
- return runs;
282
- }));
283
- export const schematicFeeds = e3.record("schematic_feeds", DictType(StringType, DcFeed), new Map([
284
- ["feed-a", { supply: ["PDU-A"], racks: ["A01", "A02", "A03"], label: "PDU-A · A side", load: "16.5 kW", system: "power" }],
285
- ["feed-b", { supply: ["PDU-B"], racks: ["A04", "A05"], label: "PDU-B · A side", load: "11.6 kW", system: "power" }],
286
- ]));
287
- export const schematicFeedsPatch = e3.mutation.patch(schematicFeeds);
315
+ export const schematicFrozenFibre = e3.record("schematic_frozen_fibre", DictType(StringType, DcFibre), {
316
+ initial: dcFibreRuns,
317
+ mutations: (mutation) => ({
318
+ // The frozen floor's door, a checked one: it refuses every change, naming why — what a Save over it is answered.
319
+ patch: mutation.reduce(East.function([DictType(StringType, DcFibre), PatchType(DictType(StringType, DcFibre))], DictType(StringType, DcFibre), ($, runs, _patch) => {
320
+ $.error("the fibre runs are frozen");
321
+ return runs;
322
+ })),
323
+ }),
324
+ });
325
+ export const schematicFeeds = e3.record("schematic_feeds", DictType(StringType, DcFeed), {
326
+ initial: new Map([
327
+ ["feed-a", { supply: ["PDU-A"], racks: ["A01", "A02", "A03"], label: "PDU-A · A side", load: "16.5 kW", system: "power" }],
328
+ ["feed-b", { supply: ["PDU-B"], racks: ["A04", "A05"], label: "PDU-B · A side", load: "11.6 kW", system: "power" }],
329
+ ]),
330
+ mutations: (mutation) => ({
331
+ patch: mutation.patch(),
332
+ }),
333
+ });
288
334
  /** The floor's fibre trunks: none yet — a Shift-connect from racks to a frame gathers their runs into one. */
289
- export const schematicTrunks = e3.record("schematic_trunks", DictType(StringType, DcTrunk), new Map());
290
- export const schematicTrunksPatch = e3.mutation.patch(schematicTrunks);
291
- export const schematicRackTemplates = e3.record("schematic_rack_templates", DictType(StringType, DcRackTemplate), new Map([
292
- ["r42", { name: "42U rack · 8 kW", group: "Racks", values: { name: "New 42U rack", w: 3.2, h: 1.2, model: "42U · 8 kW", hall: "Cage A", system: "power", owner: "" } }],
293
- ["r48", { name: "48U rack · 12 kW", group: "Racks", values: { name: "New 48U rack", w: 3.2, h: 1.2, model: "48U · 12 kW", hall: "Cage A", system: "power", owner: "" } }],
294
- ["half", { name: "Half rack · 4 kW", group: "Half racks", values: { name: "New half rack", w: 1.6, h: 1.2, model: "24U · 4 kW", hall: "Cage A", system: "power", owner: "" } }],
295
- ]));
296
- export const schematicRackTemplatesByGroup = e3.recordIndex("schematic_rack_templates_by_group", schematicRackTemplates, { on: ["group"] });
297
- export const schematicFibreTemplates = e3.record("schematic_fibre_templates", DictType(StringType, DcFibreTemplate), new Map([
298
- ["uplink", { name: "Uplink · 100G", system: "network",
299
- values: { path: [], label: some("uplink"), speed: some("100G"), cable: variant("fibre", null), system: "network" } }],
300
- ["oob", { name: "Out-of-band management", system: "network",
301
- values: { path: [], label: some("OOB mgmt"), speed: none, cable: variant("logical", null), system: "network" } }],
302
- ]));
303
- export const schematicFibreTemplatesBySystem = e3.recordIndex("schematic_fibre_templates_by_system", schematicFibreTemplates, { on: ["system"] });
304
- export const schematicOwners = e3.record("schematic_owners", DictType(StringType, DcOwner), new Map([
305
- ["elmway", { name: "Elmway College", contact: "IT services" }],
306
- ["harbour", { name: "Harbour Labs", contact: "Network desk" }],
307
- ["northwind", { name: "Northwind Media", contact: "Facilities" }],
308
- ]));
335
+ export const schematicTrunks = e3.record("schematic_trunks", DictType(StringType, DcTrunk), {
336
+ initial: new Map(),
337
+ mutations: (mutation) => ({
338
+ patch: mutation.patch(),
339
+ }),
340
+ });
341
+ export const schematicRackTemplates = e3.record("schematic_rack_templates", DictType(StringType, DcRackTemplate), {
342
+ initial: new Map([
343
+ ["r42", { name: "42U rack · 8 kW", group: "Racks", values: { name: "New 42U rack", w: 3.2, h: 1.2, model: "42U · 8 kW", hall: "Cage A", system: "power", owner: "" } }],
344
+ ["r48", { name: "48U rack · 12 kW", group: "Racks", values: { name: "New 48U rack", w: 3.2, h: 1.2, model: "48U · 12 kW", hall: "Cage A", system: "power", owner: "" } }],
345
+ ["half", { name: "Half rack · 4 kW", group: "Half racks", values: { name: "New half rack", w: 1.6, h: 1.2, model: "24U · 4 kW", hall: "Cage A", system: "power", owner: "" } }],
346
+ ]),
347
+ indexes: (index) => ({
348
+ schematic_rack_templates_by_group: index.on(["group"]),
349
+ }),
350
+ });
351
+ export const schematicFibreTemplates = e3.record("schematic_fibre_templates", DictType(StringType, DcFibreTemplate), {
352
+ initial: new Map([
353
+ ["uplink", { name: "Uplink · 100G", system: "network",
354
+ values: { path: [], label: some("uplink"), speed: some("100G"), cable: variant("fibre", null), system: "network" } }],
355
+ ["oob", { name: "Out-of-band management", system: "network",
356
+ values: { path: [], label: some("OOB mgmt"), speed: none, cable: variant("logical", null), system: "network" } }],
357
+ ]),
358
+ indexes: (index) => ({
359
+ schematic_fibre_templates_by_system: index.on(["system"]),
360
+ }),
361
+ });
362
+ export const schematicOwners = e3.record("schematic_owners", DictType(StringType, DcOwner), {
363
+ initial: new Map([
364
+ ["elmway", { name: "Elmway College", contact: "IT services" }],
365
+ ["harbour", { name: "Harbour Labs", contact: "Network desk" }],
366
+ ["northwind", { name: "Northwind Media", contact: "Facilities" }],
367
+ ]),
368
+ });
309
369
  export const schematicDataCentre = example({
310
370
  keywords: [
311
371
  "Schematic", "Schematic.items", "Schematic.zones", "Schematic.links", "Schematic.nets", "Schematic.details", "Schematic.templates",
@@ -315,18 +375,18 @@ export const schematicDataCentre = example({
315
375
  ],
316
376
  description: "A data centre floor over the app's records, each holding its own fields: racks read through their source of the slice, editable with their patch door, their loads as details on each card, editable in the inspector; network frames, round cooling units with their own Details and power distribution units; halls, cages and aisles, outlined or hatched by what they are; fibre runs between racks and frames, solid or dashed by their cable, a run between two frames refused in the veto's words; power feeds, and fibre trunks a Shift-connect gathers runs into, none onto the core; every gesture a step of one history, Save writing each record through its patch door; the inspector; the whole selection kept by the host; and in the library every kind's templates, dropped on the canvas or on a fibre run, the racks with no position, a drop placing one, the zones' index, the layers, a systems record, and the floor's owners, an owner's card dropped on a rack making it the rack's owner",
317
377
  fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
318
- const racks = $.let(Record.bind(schematicRacks, [schematicRacksPatch]));
378
+ const racks = $.let(Record.bind(schematicRacks));
319
379
  const rackEntries = $.let(Data.bindPaged(schematicRacks));
320
380
  // The racks' loads, edited in the inspector: their patch door, read by key beside the racks' source.
321
- const loads = $.let(Record.bind(schematicRackLoads, [schematicRackLoadsPatch]));
381
+ const loads = $.let(Record.bind(schematicRackLoads));
322
382
  const loadEntries = $.let(Data.bindPaged(schematicRackLoads));
323
383
  const frames = $.let(Data.bind(schematicFrames));
324
384
  const pdus = $.let(Data.bind(schematicPdus));
325
- const cooling = $.let(Record.bind(schematicCooling, [schematicCoolingPatch]));
385
+ const cooling = $.let(Record.bind(schematicCooling));
326
386
  const areas = $.let(Data.bind(schematicAreas));
327
- const fibre = $.let(Record.bind(schematicFibre, [schematicFibrePatch]));
328
- const feeds = $.let(Record.bind(schematicFeeds, [schematicFeedsPatch]));
329
- const trunks = $.let(Record.bind(schematicTrunks, [schematicTrunksPatch]));
387
+ const fibre = $.let(Record.bind(schematicFibre));
388
+ const feeds = $.let(Record.bind(schematicFeeds));
389
+ const trunks = $.let(Record.bind(schematicTrunks));
330
390
  const systems = $.let(Data.bind(schematicSystems));
331
391
  const rackTemplates = $.let(Data.bind(schematicRackTemplates));
332
392
  const fibreTemplates = $.let(Data.bind(schematicFibreTemplates));
@@ -363,12 +423,12 @@ export const schematicDataCentre = example({
363
423
  }));
364
424
  // One rail: the racks by name, hall and owner, and each templates list by its group or system.
365
425
  const slice = $.let(Slice.bindRecords("ex.schematicDataCentre", {
366
- racks: { source: Data.bindPaged(schematicRacks, { indexes: [schematicRacksByName, schematicRacksByHall, schematicRacksByOwner] }), icon: { prefix: "fas", name: "server" },
426
+ racks: { source: Data.bindPaged(schematicRacks, { indexes: ["schematic_racks_by_name", "schematic_racks_by_hall", "schematic_racks_by_owner"] }), icon: { prefix: "fas", name: "server" },
367
427
  search: ["name", "owner"], fields: {
368
428
  name: { label: "Rack" }, hall: { label: "Hall", hints: ["Cage A"] }, owner: { label: "Owner", hints: ["Harbour Labs", "Northwind Media", "Elmway College"] },
369
429
  } },
370
- rackTemplates: { source: Data.bindPaged(schematicRackTemplates, { indexes: [schematicRackTemplatesByGroup] }), fields: { group: { label: "Group", hints: ["Racks", "Half racks"] } } },
371
- fibreTemplates: { source: Data.bindPaged(schematicFibreTemplates, { indexes: [schematicFibreTemplatesBySystem] }), fields: { system: { label: "System", hints: ["network"] } } },
430
+ rackTemplates: { source: Data.bindPaged(schematicRackTemplates, { indexes: ["schematic_rack_templates_by_group"] }), fields: { group: { label: "Group", hints: ["Racks", "Half racks"] } } },
431
+ fibreTemplates: { source: Data.bindPaged(schematicFibreTemplates, { indexes: ["schematic_fibre_templates_by_system"] }), fields: { system: { label: "System", hints: ["network"] } } },
372
432
  }));
373
433
  return (_jsx(Box, { height: "640px", children: _jsx(Schematic, { id: "dataCentre", inspector: true, extent: { width: 28, height: 14 }, scaleUnit: "m", slice: { slice }, narrowed: "dim", onSelect: onSelect, canConnect: canConnect, items: {
374
434
  racks: Schematic.items(racks, {
@@ -450,4 +510,50 @@ export const schematicDataCentre = example({
450
510
  } }))),
451
511
  inputs: [],
452
512
  });
513
+ // ----------------------------------------------------------------------------
514
+ // Conflicts: your edits meeting someone else's save
515
+ // ----------------------------------------------------------------------------
516
+ /** The racks the conflicts example edits, in a record of their own, so no other example's edits meet them. */
517
+ export const schematicConflictRacks = e3.record("schematic_conflict_racks", DictType(StringType, FloorRack), {
518
+ initial: new Map([
519
+ ["A01", { name: "A01", x: 2.4, y: 2.9, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 5.2, capacity: 8.0 }],
520
+ ["A02", { name: "A02", x: 6.0, y: 2.9, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 7.4, capacity: 8.0 }],
521
+ ["A03", { name: "A03", x: 9.6, y: 2.9, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 3.9, capacity: 8.0 }],
522
+ ["B01", { name: "B01", x: 2.4, y: 8.6, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 6.1, capacity: 8.0 }],
523
+ ["B02", { name: "B02", x: 6.0, y: 8.6, w: 3.2, h: 1.2, model: "42U · 8 kW", kw: 2.8, capacity: 8.0 }],
524
+ ]),
525
+ mutations: (mutation) => ({
526
+ // The racks' patch door — every Save commits through it.
527
+ patch: mutation.patch(),
528
+ // Someone else's save: every rack half a metre to the right, its other fields as they were.
529
+ elsewhere: mutation.reduce(East.function([DictType(StringType, FloorRack)], DictType(StringType, FloorRack), (_$, racks) => racks.map((_$2, rack) => ({
530
+ name: rack.name, x: rack.x.add(0.5), y: rack.y, w: rack.w, h: rack.h, model: rack.model, kw: rack.kw, capacity: rack.capacity,
531
+ })))),
532
+ }),
533
+ });
534
+ /**
535
+ * Your edits meeting someone else's save, in one window: edit, then press
536
+ * Someone else saves, which saves another person's change to the same racks —
537
+ * every rack half a metre to the right. A rack you moved sideways too is a
538
+ * conflict, waiting for you to choose; a rack you moved only up or down, or
539
+ * whose fields you changed in the panel, combines with theirs. Each press
540
+ * saves their change again.
541
+ */
542
+ export const schematicConflicts = example({
543
+ keywords: ["Schematic", "conflict", "conflicts", "combine", "someone else", "Choose", "Move", "Schematic.items", "Record.bind", "mutate", "Button", "inspector", "Save"],
544
+ description: "Your edits meeting someone else's save, in one window — move a rack sideways, then press Someone else saves, which saves another person's change to the same racks (every rack half a metre to the right), so yours conflict and wait to be chosen; a rack moved only up or down, or a field changed in the panel, combines with theirs",
545
+ fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
546
+ const racks = $.let(Record.bind(schematicConflictRacks, ["patch"]));
547
+ const others = $.let(Record.bind(schematicConflictRacks, ["elsewhere"]));
548
+ const theirs = $.const(East.function([], NullType, ($) => { $(others.mutate.elsewhere()); }));
549
+ return (_jsxs(VStack, { gap: "3", align: "stretch", children: [_jsxs(HStack, { gap: "3", children: [_jsx(Button, { variant: "outline", onClick: theirs, loading: others.mutate.pending(), children: "Someone else saves" }), _jsx(Text, { color: "fg.muted", children: "Their change: every rack half a metre to the right" })] }), _jsx(Box, { height: "440px", children: _jsx(Schematic, { id: "conflicts", extent: { width: 18, height: 12 }, scaleUnit: "m", items: {
550
+ racks: Schematic.items(racks, {
551
+ name: "Rack", icon: "server", x: "x", y: "y", width: "w", height: "h", label: "name",
552
+ sublabel: (r) => r.model,
553
+ meter: (r) => ({ value: r.kw, max: r.capacity }),
554
+ }),
555
+ }, inspector: true }) })] }));
556
+ } }))),
557
+ inputs: [],
558
+ });
453
559
  //# sourceMappingURL=schematic.examples.js.map