@elaraai/east-ui 1.0.80 → 1.0.82

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 (353) hide show
  1. package/dist/src/charts/chart/index.d.ts +4 -0
  2. package/dist/src/charts/chart/index.d.ts.map +1 -1
  3. package/dist/src/charts/spec/index.d.ts +8 -0
  4. package/dist/src/charts/spec/index.d.ts.map +1 -1
  5. package/dist/src/collections/deck/index.d.ts +8 -0
  6. package/dist/src/collections/deck/index.d.ts.map +1 -1
  7. package/dist/src/collections/index.d.ts +2 -2
  8. package/dist/src/collections/index.d.ts.map +1 -1
  9. package/dist/src/collections/index.js.map +1 -1
  10. package/dist/src/collections/library/index.d.ts +4 -0
  11. package/dist/src/collections/library/index.d.ts.map +1 -1
  12. package/dist/src/collections/library/types.d.ts +4 -0
  13. package/dist/src/collections/library/types.d.ts.map +1 -1
  14. package/dist/src/collections/matrix/index.d.ts +56 -19
  15. package/dist/src/collections/matrix/index.d.ts.map +1 -1
  16. package/dist/src/collections/matrix/index.js +38 -24
  17. package/dist/src/collections/matrix/index.js.map +1 -1
  18. package/dist/src/collections/plan/assemble.d.ts +655 -2113
  19. package/dist/src/collections/plan/assemble.d.ts.map +1 -1
  20. package/dist/src/collections/plan/assemble.js +159 -136
  21. package/dist/src/collections/plan/assemble.js.map +1 -1
  22. package/dist/src/collections/plan/builders.d.ts +193 -40
  23. package/dist/src/collections/plan/builders.d.ts.map +1 -1
  24. package/dist/src/collections/plan/builders.js +162 -32
  25. package/dist/src/collections/plan/builders.js.map +1 -1
  26. package/dist/src/collections/plan/factories.d.ts +290 -116
  27. package/dist/src/collections/plan/factories.d.ts.map +1 -1
  28. package/dist/src/collections/plan/factories.js +281 -156
  29. package/dist/src/collections/plan/factories.js.map +1 -1
  30. package/dist/src/collections/plan/index.d.ts +111 -58
  31. package/dist/src/collections/plan/index.d.ts.map +1 -1
  32. package/dist/src/collections/plan/index.js +62 -31
  33. package/dist/src/collections/plan/index.js.map +1 -1
  34. package/dist/src/collections/plan/ir.d.ts +759 -1769
  35. package/dist/src/collections/plan/ir.d.ts.map +1 -1
  36. package/dist/src/collections/plan/ir.js +51 -27
  37. package/dist/src/collections/plan/ir.js.map +1 -1
  38. package/dist/src/collections/plan/pick.d.ts +89 -71
  39. package/dist/src/collections/plan/pick.d.ts.map +1 -1
  40. package/dist/src/collections/plan/pick.js +101 -86
  41. package/dist/src/collections/plan/pick.js.map +1 -1
  42. package/dist/src/collections/plan/root.d.ts +164 -77
  43. package/dist/src/collections/plan/root.d.ts.map +1 -1
  44. package/dist/src/collections/plan/root.js +350 -42
  45. package/dist/src/collections/plan/root.js.map +1 -1
  46. package/dist/src/collections/plan/series.d.ts +12524 -10527
  47. package/dist/src/collections/plan/series.d.ts.map +1 -1
  48. package/dist/src/collections/plan/series.js +1596 -298
  49. package/dist/src/collections/plan/series.js.map +1 -1
  50. package/dist/src/collections/plan/types.d.ts +6115 -2802
  51. package/dist/src/collections/plan/types.d.ts.map +1 -1
  52. package/dist/src/collections/plan/types.js +575 -170
  53. package/dist/src/collections/plan/types.js.map +1 -1
  54. package/dist/src/collections/sheet/bridge.d.ts +154 -43
  55. package/dist/src/collections/sheet/bridge.d.ts.map +1 -1
  56. package/dist/src/collections/sheet/bridge.js +383 -240
  57. package/dist/src/collections/sheet/bridge.js.map +1 -1
  58. package/dist/src/collections/sheet/columns.d.ts +66 -16
  59. package/dist/src/collections/sheet/columns.d.ts.map +1 -1
  60. package/dist/src/collections/sheet/columns.js +25 -25
  61. package/dist/src/collections/sheet/columns.js.map +1 -1
  62. package/dist/src/collections/sheet/context-bridge.d.ts +48 -0
  63. package/dist/src/collections/sheet/context-bridge.d.ts.map +1 -0
  64. package/dist/src/collections/sheet/context-bridge.js +216 -0
  65. package/dist/src/collections/sheet/context-bridge.js.map +1 -0
  66. package/dist/src/collections/sheet/draft-bridge.d.ts +37 -0
  67. package/dist/src/collections/sheet/draft-bridge.d.ts.map +1 -0
  68. package/dist/src/collections/sheet/draft-bridge.js +153 -0
  69. package/dist/src/collections/sheet/draft-bridge.js.map +1 -0
  70. package/dist/src/collections/sheet/drafts.d.ts +14 -0
  71. package/dist/src/collections/sheet/drafts.d.ts.map +1 -0
  72. package/dist/src/collections/sheet/drafts.js +14 -0
  73. package/dist/src/collections/sheet/drafts.js.map +1 -0
  74. package/dist/src/collections/sheet/editing-bridge.d.ts +36 -0
  75. package/dist/src/collections/sheet/editing-bridge.d.ts.map +1 -0
  76. package/dist/src/collections/sheet/editing-bridge.js +196 -0
  77. package/dist/src/collections/sheet/editing-bridge.js.map +1 -0
  78. package/dist/src/collections/sheet/editing-types.d.ts +268 -0
  79. package/dist/src/collections/sheet/editing-types.d.ts.map +1 -0
  80. package/dist/src/collections/sheet/editing-types.js +34 -0
  81. package/dist/src/collections/sheet/editing-types.js.map +1 -0
  82. package/dist/src/collections/sheet/edits.d.ts +37 -0
  83. package/dist/src/collections/sheet/edits.d.ts.map +1 -0
  84. package/dist/src/collections/sheet/edits.js +31 -0
  85. package/dist/src/collections/sheet/edits.js.map +1 -0
  86. package/dist/src/collections/sheet/group.d.ts +165 -0
  87. package/dist/src/collections/sheet/group.d.ts.map +1 -0
  88. package/dist/src/collections/sheet/group.js +52 -0
  89. package/dist/src/collections/sheet/group.js.map +1 -0
  90. package/dist/src/collections/sheet/index.d.ts +171 -27
  91. package/dist/src/collections/sheet/index.d.ts.map +1 -1
  92. package/dist/src/collections/sheet/index.js +99 -17
  93. package/dist/src/collections/sheet/index.js.map +1 -1
  94. package/dist/src/collections/sheet/link.d.ts +22 -16
  95. package/dist/src/collections/sheet/link.d.ts.map +1 -1
  96. package/dist/src/collections/sheet/link.js +18 -12
  97. package/dist/src/collections/sheet/link.js.map +1 -1
  98. package/dist/src/collections/sheet/registers.d.ts +152 -5
  99. package/dist/src/collections/sheet/registers.d.ts.map +1 -1
  100. package/dist/src/collections/sheet/registers.js +154 -5
  101. package/dist/src/collections/sheet/registers.js.map +1 -1
  102. package/dist/src/collections/sheet/root.d.ts +175 -26
  103. package/dist/src/collections/sheet/root.d.ts.map +1 -1
  104. package/dist/src/collections/sheet/root.js +150 -26
  105. package/dist/src/collections/sheet/root.js.map +1 -1
  106. package/dist/src/collections/sheet/seed-bridge.d.ts +14 -0
  107. package/dist/src/collections/sheet/seed-bridge.d.ts.map +1 -0
  108. package/dist/src/collections/sheet/seed-bridge.js +51 -0
  109. package/dist/src/collections/sheet/seed-bridge.js.map +1 -0
  110. package/dist/src/collections/sheet/sub-rows.d.ts +249 -0
  111. package/dist/src/collections/sheet/sub-rows.d.ts.map +1 -0
  112. package/dist/src/collections/sheet/sub-rows.js +222 -0
  113. package/dist/src/collections/sheet/sub-rows.js.map +1 -0
  114. package/dist/src/collections/sheet/transactions.d.ts +76 -0
  115. package/dist/src/collections/sheet/transactions.d.ts.map +1 -0
  116. package/dist/src/collections/sheet/transactions.js +40 -0
  117. package/dist/src/collections/sheet/transactions.js.map +1 -0
  118. package/dist/src/collections/sheet/types.d.ts +12034 -3651
  119. package/dist/src/collections/sheet/types.d.ts.map +1 -1
  120. package/dist/src/collections/sheet/types.js +365 -48
  121. package/dist/src/collections/sheet/types.js.map +1 -1
  122. package/dist/src/collections/table/index.d.ts +98 -123
  123. package/dist/src/collections/table/index.d.ts.map +1 -1
  124. package/dist/src/collections/table/index.js +97 -111
  125. package/dist/src/collections/table/index.js.map +1 -1
  126. package/dist/src/collections/table/types.d.ts +87 -31
  127. package/dist/src/collections/table/types.d.ts.map +1 -1
  128. package/dist/src/collections/table/types.js +51 -26
  129. package/dist/src/collections/table/types.js.map +1 -1
  130. package/dist/src/collections/value-tree/flatten.d.ts.map +1 -1
  131. package/dist/src/collections/value-tree/flatten.js +4 -1
  132. package/dist/src/collections/value-tree/flatten.js.map +1 -1
  133. package/dist/src/component.d.ts +5075 -4079
  134. package/dist/src/component.d.ts.map +1 -1
  135. package/dist/src/component.js +46 -46
  136. package/dist/src/component.js.map +1 -1
  137. package/dist/src/contracts/approval.d.ts +10 -8
  138. package/dist/src/contracts/approval.d.ts.map +1 -1
  139. package/dist/src/contracts/approval.js +10 -8
  140. package/dist/src/contracts/approval.js.map +1 -1
  141. package/dist/src/contracts/drag.d.ts +11 -9
  142. package/dist/src/contracts/drag.d.ts.map +1 -1
  143. package/dist/src/contracts/drag.js +28 -21
  144. package/dist/src/contracts/drag.js.map +1 -1
  145. package/dist/src/contracts/editing.d.ts +1283 -0
  146. package/dist/src/contracts/editing.d.ts.map +1 -0
  147. package/dist/src/contracts/editing.js +711 -0
  148. package/dist/src/contracts/editing.js.map +1 -0
  149. package/dist/src/contracts/index.d.ts +2 -1
  150. package/dist/src/contracts/index.d.ts.map +1 -1
  151. package/dist/src/contracts/index.js +2 -1
  152. package/dist/src/contracts/index.js.map +1 -1
  153. package/dist/src/contracts/pick.d.ts +6 -7
  154. package/dist/src/contracts/pick.d.ts.map +1 -1
  155. package/dist/src/contracts/pick.js +6 -7
  156. package/dist/src/contracts/pick.js.map +1 -1
  157. package/dist/src/contracts/review.d.ts +3 -1
  158. package/dist/src/contracts/review.d.ts.map +1 -1
  159. package/dist/src/contracts/review.js +3 -1
  160. package/dist/src/contracts/review.js.map +1 -1
  161. package/dist/src/contracts/source.d.ts +270 -80
  162. package/dist/src/contracts/source.d.ts.map +1 -1
  163. package/dist/src/contracts/source.js +357 -58
  164. package/dist/src/contracts/source.js.map +1 -1
  165. package/dist/src/display/chip-rail/index.d.ts.map +1 -1
  166. package/dist/src/display/chip-rail/index.js +10 -10
  167. package/dist/src/display/chip-rail/index.js.map +1 -1
  168. package/dist/src/extension.d.ts +2 -1
  169. package/dist/src/extension.d.ts.map +1 -1
  170. package/dist/src/extension.js +2 -1
  171. package/dist/src/extension.js.map +1 -1
  172. package/dist/src/format/index.d.ts +1 -154
  173. package/dist/src/format/index.d.ts.map +1 -1
  174. package/dist/src/format/types.d.ts +35 -23
  175. package/dist/src/format/types.d.ts.map +1 -1
  176. package/dist/src/format/types.js +16 -14
  177. package/dist/src/format/types.js.map +1 -1
  178. package/dist/src/forms/field/index.js +4 -4
  179. package/dist/src/forms/field/index.js.map +1 -1
  180. package/dist/src/forms/file-upload/index.js +16 -16
  181. package/dist/src/forms/file-upload/index.js.map +1 -1
  182. package/dist/src/index.d.ts +4 -2
  183. package/dist/src/index.d.ts.map +1 -1
  184. package/dist/src/index.js +12 -5
  185. package/dist/src/index.js.map +1 -1
  186. package/dist/src/internal.d.ts +8 -3
  187. package/dist/src/internal.d.ts.map +1 -1
  188. package/dist/src/internal.js +11 -3
  189. package/dist/src/internal.js.map +1 -1
  190. package/dist/src/layout/box/index.d.ts.map +1 -1
  191. package/dist/src/layout/box/index.js +47 -47
  192. package/dist/src/layout/box/index.js.map +1 -1
  193. package/dist/src/layout/flex/index.d.ts.map +1 -1
  194. package/dist/src/layout/flex/index.js +47 -47
  195. package/dist/src/layout/flex/index.js.map +1 -1
  196. package/dist/src/layout/grid/index.js +11 -11
  197. package/dist/src/layout/grid/index.js.map +1 -1
  198. package/dist/src/layout/scroll-area/index.d.ts.map +1 -1
  199. package/dist/src/layout/scroll-area/index.js +8 -8
  200. package/dist/src/layout/scroll-area/index.js.map +1 -1
  201. package/dist/src/layout/separator/index.d.ts.map +1 -1
  202. package/dist/src/layout/separator/index.js +6 -6
  203. package/dist/src/layout/separator/index.js.map +1 -1
  204. package/dist/src/layout/stack/index.d.ts.map +1 -1
  205. package/dist/src/layout/stack/index.js +46 -46
  206. package/dist/src/layout/stack/index.js.map +1 -1
  207. package/dist/src/layout/sticky/index.d.ts.map +1 -1
  208. package/dist/src/layout/sticky/index.js +8 -8
  209. package/dist/src/layout/sticky/index.js.map +1 -1
  210. package/dist/src/overlays/action-bar/index.d.ts.map +1 -1
  211. package/dist/src/overlays/action-bar/index.js +8 -8
  212. package/dist/src/overlays/action-bar/index.js.map +1 -1
  213. package/dist/src/platform/index.d.ts +1 -1
  214. package/dist/src/platform/index.d.ts.map +1 -1
  215. package/dist/src/platform/index.js +1 -1
  216. package/dist/src/platform/index.js.map +1 -1
  217. package/dist/src/platform/slice/impl.d.ts +62 -51
  218. package/dist/src/platform/slice/impl.d.ts.map +1 -1
  219. package/dist/src/platform/slice/impl.js +155 -72
  220. package/dist/src/platform/slice/impl.js.map +1 -1
  221. package/dist/src/platform/slice/index.d.ts +3744 -2226
  222. package/dist/src/platform/slice/index.d.ts.map +1 -1
  223. package/dist/src/platform/slice/index.js +43 -1
  224. package/dist/src/platform/slice/index.js.map +1 -1
  225. package/dist/src/runtime/collections/deck.d.ts +4 -0
  226. package/dist/src/runtime/collections/deck.d.ts.map +1 -1
  227. package/dist/src/runtime/collections/matrix.d.ts +10 -9
  228. package/dist/src/runtime/collections/matrix.d.ts.map +1 -1
  229. package/dist/src/runtime/collections/matrix.js +11 -6
  230. package/dist/src/runtime/collections/matrix.js.map +1 -1
  231. package/dist/src/runtime/collections/plan.d.ts +148 -65
  232. package/dist/src/runtime/collections/plan.d.ts.map +1 -1
  233. package/dist/src/runtime/collections/plan.js +155 -67
  234. package/dist/src/runtime/collections/plan.js.map +1 -1
  235. package/dist/src/runtime/collections/sheet.d.ts +56 -23
  236. package/dist/src/runtime/collections/sheet.d.ts.map +1 -1
  237. package/dist/src/runtime/collections/sheet.js +30 -22
  238. package/dist/src/runtime/collections/sheet.js.map +1 -1
  239. package/dist/src/runtime/collections/table.d.ts +18 -11
  240. package/dist/src/runtime/collections/table.d.ts.map +1 -1
  241. package/dist/src/runtime/collections/table.js +7 -4
  242. package/dist/src/runtime/collections/table.js.map +1 -1
  243. package/dist/src/shared/reify.d.ts +4 -46
  244. package/dist/src/shared/reify.d.ts.map +1 -1
  245. package/dist/src/shared/reify.js +4 -61
  246. package/dist/src/shared/reify.js.map +1 -1
  247. package/dist/src/shared/tree.d.ts +88 -0
  248. package/dist/src/shared/tree.d.ts.map +1 -0
  249. package/dist/src/shared/tree.js +134 -0
  250. package/dist/src/shared/tree.js.map +1 -0
  251. package/dist/src/slice/breakdown/index.d.ts +4 -0
  252. package/dist/src/slice/breakdown/index.d.ts.map +1 -1
  253. package/dist/src/slice/breakdown/types.d.ts +4 -0
  254. package/dist/src/slice/breakdown/types.d.ts.map +1 -1
  255. package/dist/src/slice/cohort/index.d.ts +24 -4
  256. package/dist/src/slice/cohort/index.d.ts.map +1 -1
  257. package/dist/src/slice/cohort/index.js +8 -4
  258. package/dist/src/slice/cohort/index.js.map +1 -1
  259. package/dist/src/slice/cohort/types.d.ts +11 -0
  260. package/dist/src/slice/cohort/types.d.ts.map +1 -1
  261. package/dist/src/slice/cohort/types.js +7 -0
  262. package/dist/src/slice/cohort/types.js.map +1 -1
  263. package/dist/src/slice/filter/index.d.ts +4 -0
  264. package/dist/src/slice/filter/index.d.ts.map +1 -1
  265. package/dist/src/slice/filter/types.d.ts +4 -0
  266. package/dist/src/slice/filter/types.d.ts.map +1 -1
  267. package/dist/src/slice/index.d.ts +736 -0
  268. package/dist/src/slice/index.d.ts.map +1 -1
  269. package/dist/src/slice/legend/index.d.ts +4 -0
  270. package/dist/src/slice/legend/index.d.ts.map +1 -1
  271. package/dist/src/slice/legend/types.d.ts +4 -0
  272. package/dist/src/slice/legend/types.d.ts.map +1 -1
  273. package/dist/src/slice/rail/index.d.ts +8 -4
  274. package/dist/src/slice/rail/index.d.ts.map +1 -1
  275. package/dist/src/slice/rail/index.js.map +1 -1
  276. package/dist/src/slice/range/index.d.ts +4 -0
  277. package/dist/src/slice/range/index.d.ts.map +1 -1
  278. package/dist/src/slice/range/types.d.ts +4 -0
  279. package/dist/src/slice/range/types.d.ts.map +1 -1
  280. package/dist/src/slice/search/index.d.ts +4 -0
  281. package/dist/src/slice/search/index.d.ts.map +1 -1
  282. package/dist/src/slice/search/types.d.ts +4 -0
  283. package/dist/src/slice/search/types.d.ts.map +1 -1
  284. package/dist/src/slice/summary/index.d.ts +4 -0
  285. package/dist/src/slice/summary/index.d.ts.map +1 -1
  286. package/dist/src/slice/summary/types.d.ts +4 -0
  287. package/dist/src/slice/summary/types.d.ts.map +1 -1
  288. package/dist/src/typography/code/index.js +1 -1
  289. package/dist/src/typography/code/index.js.map +1 -1
  290. package/dist/src/typography/code-block/index.js +7 -7
  291. package/dist/src/typography/code-block/index.js.map +1 -1
  292. package/dist/src/typography/heading/index.js +2 -2
  293. package/dist/src/typography/heading/index.js.map +1 -1
  294. package/dist/src/typography/list/index.js +1 -1
  295. package/dist/src/typography/list/index.js.map +1 -1
  296. package/dist/src/typography/mark/index.js +1 -1
  297. package/dist/src/typography/mark/index.js.map +1 -1
  298. package/dist/src/typography/note/index.js +1 -1
  299. package/dist/src/typography/note/index.js.map +1 -1
  300. package/dist/src/typography/numeric/index.d.ts +3 -308
  301. package/dist/src/typography/numeric/index.d.ts.map +1 -1
  302. package/dist/src/typography/numeric/index.js +4 -4
  303. package/dist/src/typography/numeric/index.js.map +1 -1
  304. package/dist/src/typography/numeric/types.d.ts +1 -154
  305. package/dist/src/typography/numeric/types.d.ts.map +1 -1
  306. package/dist/src/typography/text/index.js +1 -1
  307. package/dist/src/typography/text/index.js.map +1 -1
  308. package/dist/test/collections/matrix.examples.d.ts +7 -3
  309. package/dist/test/collections/matrix.examples.d.ts.map +1 -1
  310. package/dist/test/collections/matrix.examples.js +55 -24
  311. package/dist/test/collections/matrix.examples.js.map +1 -1
  312. package/dist/test/collections/paged-source.examples.d.ts +4 -0
  313. package/dist/test/collections/paged-source.examples.d.ts.map +1 -1
  314. package/dist/test/collections/paged-source.examples.js +98 -13
  315. package/dist/test/collections/paged-source.examples.js.map +1 -1
  316. package/dist/test/collections/plan.examples.d.ts +101 -26
  317. package/dist/test/collections/plan.examples.d.ts.map +1 -1
  318. package/dist/test/collections/plan.examples.js +1481 -755
  319. package/dist/test/collections/plan.examples.js.map +1 -1
  320. package/dist/test/collections/sheet-link.examples.d.ts +7 -0
  321. package/dist/test/collections/sheet-link.examples.d.ts.map +1 -0
  322. package/dist/test/collections/sheet-link.examples.js +41 -0
  323. package/dist/test/collections/sheet-link.examples.js.map +1 -0
  324. package/dist/test/collections/sheet-transactions.examples.d.ts +7 -0
  325. package/dist/test/collections/sheet-transactions.examples.d.ts.map +1 -0
  326. package/dist/test/collections/sheet-transactions.examples.js +58 -0
  327. package/dist/test/collections/sheet-transactions.examples.js.map +1 -0
  328. package/dist/test/collections/sheet.examples.d.ts +52 -5
  329. package/dist/test/collections/sheet.examples.d.ts.map +1 -1
  330. package/dist/test/collections/sheet.examples.js +500 -158
  331. package/dist/test/collections/sheet.examples.js.map +1 -1
  332. package/dist/test/collections/table.examples.d.ts +31 -3
  333. package/dist/test/collections/table.examples.d.ts.map +1 -1
  334. package/dist/test/collections/table.examples.js +188 -28
  335. package/dist/test/collections/table.examples.js.map +1 -1
  336. package/dist/test/contracts/editing.examples.d.ts +7 -0
  337. package/dist/test/contracts/editing.examples.d.ts.map +1 -0
  338. package/dist/test/contracts/editing.examples.js +58 -0
  339. package/dist/test/contracts/editing.examples.js.map +1 -0
  340. package/dist/test/layout/splitter.examples.d.ts.map +1 -1
  341. package/dist/test/layout/splitter.examples.js +3 -1
  342. package/dist/test/layout/splitter.examples.js.map +1 -1
  343. package/dist/test/platform/slice.examples.d.ts.map +1 -1
  344. package/dist/test/platform/slice.examples.js +1 -0
  345. package/dist/test/platform/slice.examples.js.map +1 -1
  346. package/dist/test/slice/slice.examples.d.ts.map +1 -1
  347. package/dist/test/slice/slice.examples.js +5 -2
  348. package/dist/test/slice/slice.examples.js.map +1 -1
  349. package/package.json +4 -3
  350. package/dist/src/collections/plan/data-forms.d.ts +0 -332
  351. package/dist/src/collections/plan/data-forms.d.ts.map +0 -1
  352. package/dist/src/collections/plan/data-forms.js +0 -212
  353. package/dist/src/collections/plan/data-forms.js.map +0 -1
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * `<Plan>` tag — see the export's JSDoc.
7
7
  */
8
- import { Plan as PlanFactory, type PlanConfig, type PlanAxisKindLiteral } from "../../collections/plan/index.js";
8
+ import { type PlanConfig, type PlanAxisKindLiteral, type PlanNamespace } from "../../collections/plan/index.js";
9
9
  import type { UIElement } from "../runtime.js";
10
10
  /**
11
11
  * `<Plan>` — the axis-aligned composite canvas: one shared axis
@@ -16,45 +16,160 @@ import type { UIElement } from "../runtime.js";
16
16
  * numerals), cards rows (Roster chips), event marks and group strips —
17
17
  * sliced and reviewed as one surface.
18
18
  *
19
- * Rows are built with the kind factories (`Plan.span` / `buckets` / `chart` /
20
- * `heat` / `table` / `cards` / `events` / `group`, the data-driven
21
- * `Plan.rows`, and the accessor `.of` forms); content with the value builders
22
- * (`Plan.run` / `event` / `chip` / `mark` / `marker` / `decision` / `port` /
23
- * `segment` / cell builders, instants via `Plan.at.*`); the axis with
24
- * `Plan.axis` (`time`) / `Plan.axis.number` / `Plan.axis.ordinal`. Maps to
25
- * `Plan.Root`.
19
+ * A canvas is its `data` — a keyed collection of raw entries, or a paged
20
+ * source of one — and its `series`: one `Plan.series.*` value per row series,
21
+ * whose accessors derive each canvas row from the raw fields (`Plan.pick`
22
+ * makes the list one the user picks from). The list IS the layout — one block
23
+ * per series, top to bottom — and hierarchy comes only from the data's own
24
+ * nesting (#822): a series' `children` walk what an entry holds, to any depth
25
+ * (`Plan.children` steps down to another entry type), and a flat source is
26
+ * grouped in a data step first (`groupToDicts`). `Plan.series.section` titles
27
+ * a block and `Plan.series.views` shows one entry several ways. Every row has
28
+ * a typed id — its series and the path of entry keys to it (`Plan.ref`).
29
+ *
30
+ * Content comes from the value builders (`Plan.run` / `event` / `chip` /
31
+ * `mark` / `marker` / `decision` / `port` / `segment` / the cell builders,
32
+ * instants via `Plan.at.*`), the axis from `Plan.axis` (`time`) /
33
+ * `Plan.axis.number` / `Plan.axis.ordinal` — its window stated, or supplied by
34
+ * a bound slice — and rows no dataset holds from the kind factories
35
+ * (`Plan.span` / `buckets` / `chart` / `heat` / `table` / `cards` / `events` /
36
+ * `group`), placed by a `Plan.series.rows` entry. Props are
37
+ * {@link PlanConfig}; maps to `Plan.Root`.
26
38
  *
27
39
  * @example
28
40
  * ```tsx
29
41
  * // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
30
- * import { East } from "@elaraai/east";
31
- * import { Plan, UIComponentType } from "@elaraai/east-ui";
42
+ * import { ArrayType, DateTimeType, DictType, East, FloatType, IntegerType, StringType, StructType, VariantType, variant } from "@elaraai/east";
43
+ * import { EventStateType, Format, Plan, UIComponentType } from "@elaraai/east-ui";
32
44
  *
33
- * const canvas = East.function([], UIComponentType, _$ => (
34
- * <Plan
35
- * axis={Plan.axis({
36
- * window: { min: new Date("2026-06-29"), max: new Date("2026-09-21") },
37
- * resolution: "week", now: new Date("2026-07-27"),
38
- * })}
39
- * rows={[
40
- * Plan.span({
41
- * key: "m03", label: "L1-M03", id: true, sub: "120 t",
42
- * runs: [
43
- * Plan.run({ key: "set", start: new Date("2026-06-29"), end: new Date("2026-07-06"), label: "SET", state: "actual" }),
44
- * Plan.run({ key: "run", start: new Date("2026-07-06"), end: new Date("2026-07-27"), label: "RUN · B-214", quantity: "96 t", state: "in-progress" }),
45
- * Plan.run({ key: "next", start: new Date("2026-08-03"), end: new Date("2026-08-24"), label: "RUN · B-221", quantity: "88 t", state: "recommended" }),
46
- * ],
47
- * }),
48
- * ]}
49
- * />
50
- * ));
45
+ * const canvas = East.function([], UIComponentType, ($) => {
46
+ * // Monday of ISO week n, 2026 — window W27–W38 (half-open), now W31.
47
+ * const week = $.const(East.function([IntegerType], DateTimeType, ($, n) => {
48
+ * const w1 = $.const(new Date("2025-12-29T00:00:00Z"), DateTimeType);
49
+ * return w1.addWeeks(n.subtract(1n));
50
+ * }));
51
+ * // The RAW domain shape — series discriminated by a variant field
52
+ * // (the natural ops-dataset form; the same rows page from a dataset).
53
+ * const JobRow = StructType({
54
+ * batch: StringType, start: DateTimeType, end: DateTimeType,
55
+ * tonnes: FloatType, state: EventStateType,
56
+ * });
57
+ * const ShiftRow = StructType({
58
+ * key: StringType, from: DateTimeType, to: DateTimeType,
59
+ * hours: FloatType, state: EventStateType,
60
+ * });
61
+ * const OpsRow = StructType({
62
+ * line: StringType,
63
+ * kind: VariantType({
64
+ * machine: StructType({ jobs: ArrayType(JobRow) }),
65
+ * crew: StructType({ shifts: ArrayType(ShiftRow) }),
66
+ * }),
67
+ * });
68
+ * const ops = $.const(new Map([
69
+ * ["L1-M03", { line: "Line 1", kind: variant("machine", { jobs: [
70
+ * { batch: "B-214", start: week(28n), end: week(31n), tonnes: 96.0, state: variant("in-progress", null) },
71
+ * { batch: "B-221", start: week(32n), end: week(35n), tonnes: 88.0, state: variant("proposed", variant("recommended", null)) },
72
+ * ] }) }],
73
+ * ["L1-M04", { line: "Line 1", kind: variant("machine", { jobs: [
74
+ * { batch: "B-208", start: week(27n), end: week(30n), tonnes: 112.0, state: variant("actual", null) },
75
+ * ] }) }],
76
+ * ["L2-M11", { line: "Line 2", kind: variant("machine", { jobs: [
77
+ * { batch: "B-241", start: week(29n), end: week(33n), tonnes: 92.0, state: variant("confirmed", null) },
78
+ * ] }) }],
79
+ * ["crewA", { line: "Line 1", kind: variant("crew", { shifts: [
80
+ * { key: "s1", from: week(27n), to: week(29n), hours: 80.0, state: variant("confirmed", null) },
81
+ * { key: "s2", from: week(31n), to: week(33n), hours: 64.0, state: variant("proposed", variant("recommended", null)) },
82
+ * ] }) }],
83
+ * ]), DictType(StringType, OpsRow));
84
+ * // Hierarchy is the DATA's (#822): one `groupToDicts` groups the rows
85
+ * // into the canvas's blocks — each machine under its line, the crews
86
+ * // under one "Crews" block. An entry of the result holds its rows.
87
+ * const blocks = $.let(ops.groupToDicts(
88
+ * ($, r) => r.kind.hasTag("crew").ifElse(() => "Crews", () => r.line),
89
+ * ($, _r, k) => k));
90
+ * const Block = DictType(StringType, OpsRow);
91
+ * // The series — real East values bound in the body, typed by the
92
+ * // constructor. The list IS the layout: one block per series, top to
93
+ * // bottom. The accessors are where raw fields become canvas vocabulary:
94
+ * // labels, quantity displays and chip text all derive CLIENT-SIDE,
95
+ * // inside each series' `derive`.
96
+ * const series = $.const([
97
+ * // One row per line, its machines stepped down into
98
+ * // (`Plan.children`) and their runs rolled up into its bands —
99
+ * // which sum the runs' quantities, unit by unit.
100
+ * Plan.series.span(Block, {
101
+ * key: "lines", title: "Lines",
102
+ * match: (_b, name) => name.equal("Crews").not(),
103
+ * label: (_b, name) => name,
104
+ * runs: _b => [],
105
+ * rollup: "union",
106
+ * children: Plan.children((b) => b, [
107
+ * Plan.series.span(OpsRow, {
108
+ * key: "machines", title: "Machines",
109
+ * match: r => r.kind.hasTag("machine"),
110
+ * label: (_r, k) => k, id: true,
111
+ * runs: r => r.kind.unwrap("machine").jobs.map((_$, j) => Plan.run({
112
+ * key: j.batch, start: j.start, end: j.end,
113
+ * label: East.str`RUN · ${j.batch}`,
114
+ * // A quantity is one value: the bar prints `96 t`,
115
+ * // and the line's band sums the tonnes.
116
+ * quantity: Plan.quantity(j.tonnes, { unit: "t", format: Format.Number({ maximumFractionDigits: 0n }) }),
117
+ * state: j.state,
118
+ * })),
119
+ * }),
120
+ * ]),
121
+ * }),
122
+ * // One strip per matching block — here the one "Crews" block,
123
+ * // wearing its member count.
124
+ * Plan.series.group(Block, {
125
+ * key: "crews", title: "Crews",
126
+ * match: (_b, name) => name.equal("Crews"),
127
+ * label: (_b, name) => name,
128
+ * children: Plan.children((b) => b, [
129
+ * Plan.series.cards(OpsRow, {
130
+ * key: "crew-shifts", title: "Crew shifts",
131
+ * match: r => r.kind.hasTag("crew"),
132
+ * label: (_r, k) => k,
133
+ * chips: r => r.kind.unwrap("crew").shifts.map(($, s) => {
134
+ * const hrs = $.let(East.Float.printFixed(s.hours, 0n), StringType);
135
+ * // `+` marks ADDED hours — a removed proposal keeps the
136
+ * // plain figure (see planCardRows for the full ladder).
137
+ * const label = $.let(s.state.match({
138
+ * proposed: (_$, p) => p.hasTag("removed").ifElse(
139
+ * () => East.str`${hrs}h`,
140
+ * () => East.str`+${hrs}h`),
141
+ * }, _$ => East.str`${hrs}h`), StringType);
142
+ * return Plan.chip({ key: s.key, from: s.from, to: s.to, label, state: s.state });
143
+ * }),
144
+ * }),
145
+ * ]),
146
+ * }),
147
+ * Plan.series.rows(Block, { key: "chrome", title: "Milestones", subtitle: "one-off chrome" },
148
+ * [Plan.events({ key: "ms", label: "MILESTONES", id: true, marks: [
149
+ * Plan.mark({ key: "kick", at: week(28n), kind: "milestone", label: "KICKOFF" }),
150
+ * Plan.mark({ key: "rel", at: week(33n), kind: "milestone", label: "REL 2.4" }),
151
+ * ] })]),
152
+ * ], ArrayType(Plan.Types.Series(Block)));
153
+ * const axis = $.const(Plan.axis({ window: { min: week(27n), max: week(39n) }, resolution: "week", now: week(31n) }));
154
+ * return (
155
+ * <Plan
156
+ * axis={axis}
157
+ * data={blocks}
158
+ * series={series}
159
+ * />
160
+ * );
161
+ * });
51
162
  * ```
52
163
  *
53
164
  * @remarks
54
- * Carries the whole authoring namespace — `Plan.axis` (+ `.time` / `.number` /
55
- * `.ordinal`), `Plan.at`, the kind factories, the value builders,
56
- * `Plan.layer` / `Plan.fixed` (chart channels), `Plan.markKind`, and
57
- * `Plan.Types.*`. Replaces `Gantt`, `Planner` and `AlignedStack`.
165
+ * Carries the factory namespace except `Root` (the tag is the root):
166
+ * `Plan.axis` (+ `.time` / `.number` / `.ordinal`), `Plan.at`,
167
+ * `Plan.series.*`, `Plan.children`, `Plan.ref` / `Plan.sectionRef`,
168
+ * `Plan.pick` / `Plan.pickItems`, the kind factories, the value and cell
169
+ * builders, `Plan.quantity`, `Plan.link`, `Plan.layer` / `Plan.fixed` (chart
170
+ * channels), `Plan.markKind`, `Plan.uiState` (a bound `ui` state's seed), and
171
+ * `Plan.Types.*`. Replaces `Gantt`, `Planner` and
172
+ * `AlignedStack`.
58
173
  *
59
174
  * The tag is generic in the canvas's axis kind `K`, inferred from `axis`:
60
175
  * a series whose instants ride another arm is a compile error at the tag
@@ -62,37 +177,5 @@ import type { UIElement } from "../runtime.js";
62
177
  */
63
178
  export declare const Plan: {
64
179
  <K extends PlanAxisKindLiteral = PlanAxisKindLiteral>(props: PlanConfig<K>): UIElement;
65
- axis: typeof PlanFactory.axis;
66
- at: typeof PlanFactory.at;
67
- span: typeof PlanFactory.span;
68
- buckets: typeof PlanFactory.buckets;
69
- chart: typeof PlanFactory.chart;
70
- heat: typeof PlanFactory.heat;
71
- table: typeof PlanFactory.table;
72
- cards: typeof PlanFactory.cards;
73
- events: typeof PlanFactory.events;
74
- group: typeof PlanFactory.group;
75
- series: typeof PlanFactory.series;
76
- run: typeof PlanFactory.run;
77
- decision: typeof PlanFactory.decision;
78
- port: typeof PlanFactory.port;
79
- event: typeof PlanFactory.event;
80
- lane: typeof PlanFactory.lane;
81
- marker: typeof PlanFactory.marker;
82
- chip: typeof PlanFactory.chip;
83
- mark: typeof PlanFactory.mark;
84
- link: typeof PlanFactory.link;
85
- markKind: typeof PlanFactory.markKind;
86
- heatCells: typeof PlanFactory.heatCells;
87
- weightCells: typeof PlanFactory.weightCells;
88
- segmentCells: typeof PlanFactory.segmentCells;
89
- segment: typeof PlanFactory.segment;
90
- tableCells: typeof PlanFactory.tableCells;
91
- tableSeries: typeof PlanFactory.tableSeries;
92
- layer: typeof PlanFactory.layer;
93
- fixed: typeof PlanFactory.fixed;
94
- pick: typeof PlanFactory.pick;
95
- pickItems: typeof PlanFactory.pickItems;
96
- Types: typeof PlanFactory.Types;
97
- };
180
+ } & Omit<PlanNamespace, "Root">;
98
181
  //# sourceMappingURL=plan.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../src/runtime/collections/plan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EACH,IAAI,IAAI,WAAW,EACnB,KAAK,UAAU,EACf,KAAK,mBAAmB,EAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,eAAO,MAAM,IAAI,EAAE;IACf,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACvF,IAAI,EAAE,OAAO,WAAW,CAAC,IAAI,CAAC;IAC9B,EAAE,EAAE,OAAO,WAAW,CAAC,EAAE,CAAC;IAC1B,IAAI,EAAE,OAAO,WAAW,CAAC,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,WAAW,CAAC,OAAO,CAAC;IACpC,KAAK,EAAE,OAAO,WAAW,CAAC,KAAK,CAAC;IAChC,IAAI,EAAE,OAAO,WAAW,CAAC,IAAI,CAAC;IAC9B,KAAK,EAAE,OAAO,WAAW,CAAC,KAAK,CAAC;IAChC,KAAK,EAAE,OAAO,WAAW,CAAC,KAAK,CAAC;IAChC,MAAM,EAAE,OAAO,WAAW,CAAC,MAAM,CAAC;IAClC,KAAK,EAAE,OAAO,WAAW,CAAC,KAAK,CAAC;IAChC,MAAM,EAAE,OAAO,WAAW,CAAC,MAAM,CAAC;IAClC,GAAG,EAAE,OAAO,WAAW,CAAC,GAAG,CAAC;IAC5B,QAAQ,EAAE,OAAO,WAAW,CAAC,QAAQ,CAAC;IACtC,IAAI,EAAE,OAAO,WAAW,CAAC,IAAI,CAAC;IAC9B,KAAK,EAAE,OAAO,WAAW,CAAC,KAAK,CAAC;IAChC,IAAI,EAAE,OAAO,WAAW,CAAC,IAAI,CAAC;IAC9B,MAAM,EAAE,OAAO,WAAW,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,OAAO,WAAW,CAAC,IAAI,CAAC;IAC9B,IAAI,EAAE,OAAO,WAAW,CAAC,IAAI,CAAC;IAC9B,IAAI,EAAE,OAAO,WAAW,CAAC,IAAI,CAAC;IAC9B,QAAQ,EAAE,OAAO,WAAW,CAAC,QAAQ,CAAC;IACtC,SAAS,EAAE,OAAO,WAAW,CAAC,SAAS,CAAC;IACxC,WAAW,EAAE,OAAO,WAAW,CAAC,WAAW,CAAC;IAC5C,YAAY,EAAE,OAAO,WAAW,CAAC,YAAY,CAAC;IAC9C,OAAO,EAAE,OAAO,WAAW,CAAC,OAAO,CAAC;IACpC,UAAU,EAAE,OAAO,WAAW,CAAC,UAAU,CAAC;IAC1C,WAAW,EAAE,OAAO,WAAW,CAAC,WAAW,CAAC;IAC5C,KAAK,EAAE,OAAO,WAAW,CAAC,KAAK,CAAC;IAChC,KAAK,EAAE,OAAO,WAAW,CAAC,KAAK,CAAC;IAChC,IAAI,EAAE,OAAO,WAAW,CAAC,IAAI,CAAC;IAC9B,SAAS,EAAE,OAAO,WAAW,CAAC,SAAS,CAAC;IACxC,KAAK,EAAE,OAAO,WAAW,CAAC,KAAK,CAAC;CAuCnC,CAAC"}
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../src/runtime/collections/plan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EAEH,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAY/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuKG;AACH,eAAO,MAAM,IAAI,EAAE;IACf,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;CAC1F,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,CAAqC,CAAC"}
@@ -6,6 +6,14 @@
6
6
  * `<Plan>` tag — see the export's JSDoc.
7
7
  */
8
8
  import { Plan as PlanFactory, } from "../../collections/plan/index.js";
9
+ /** The tag's call — `Plan.Root`, generic in the axis kind `K` that `axis` fixes. */
10
+ function PlanTag(props) {
11
+ return PlanFactory.Root(props);
12
+ }
13
+ // The tag IS the root, so `Root` is the one factory member it does not carry.
14
+ // Derived, never hand-listed: a member added to `PlanNamespace` rides the tag
15
+ // with no edit here (#814).
16
+ const { Root: _root, ...authoring } = PlanFactory;
9
17
  /**
10
18
  * `<Plan>` — the axis-aligned composite canvas: one shared axis
11
19
  * (`{ time | number | ordinal }` — a window ÷ resolution or step, or an
@@ -15,84 +23,164 @@ import { Plan as PlanFactory, } from "../../collections/plan/index.js";
15
23
  * numerals), cards rows (Roster chips), event marks and group strips —
16
24
  * sliced and reviewed as one surface.
17
25
  *
18
- * Rows are built with the kind factories (`Plan.span` / `buckets` / `chart` /
19
- * `heat` / `table` / `cards` / `events` / `group`, the data-driven
20
- * `Plan.rows`, and the accessor `.of` forms); content with the value builders
21
- * (`Plan.run` / `event` / `chip` / `mark` / `marker` / `decision` / `port` /
22
- * `segment` / cell builders, instants via `Plan.at.*`); the axis with
23
- * `Plan.axis` (`time`) / `Plan.axis.number` / `Plan.axis.ordinal`. Maps to
24
- * `Plan.Root`.
26
+ * A canvas is its `data` — a keyed collection of raw entries, or a paged
27
+ * source of one — and its `series`: one `Plan.series.*` value per row series,
28
+ * whose accessors derive each canvas row from the raw fields (`Plan.pick`
29
+ * makes the list one the user picks from). The list IS the layout — one block
30
+ * per series, top to bottom — and hierarchy comes only from the data's own
31
+ * nesting (#822): a series' `children` walk what an entry holds, to any depth
32
+ * (`Plan.children` steps down to another entry type), and a flat source is
33
+ * grouped in a data step first (`groupToDicts`). `Plan.series.section` titles
34
+ * a block and `Plan.series.views` shows one entry several ways. Every row has
35
+ * a typed id — its series and the path of entry keys to it (`Plan.ref`).
36
+ *
37
+ * Content comes from the value builders (`Plan.run` / `event` / `chip` /
38
+ * `mark` / `marker` / `decision` / `port` / `segment` / the cell builders,
39
+ * instants via `Plan.at.*`), the axis from `Plan.axis` (`time`) /
40
+ * `Plan.axis.number` / `Plan.axis.ordinal` — its window stated, or supplied by
41
+ * a bound slice — and rows no dataset holds from the kind factories
42
+ * (`Plan.span` / `buckets` / `chart` / `heat` / `table` / `cards` / `events` /
43
+ * `group`), placed by a `Plan.series.rows` entry. Props are
44
+ * {@link PlanConfig}; maps to `Plan.Root`.
25
45
  *
26
46
  * @example
27
47
  * ```tsx
28
48
  * // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
29
- * import { East } from "@elaraai/east";
30
- * import { Plan, UIComponentType } from "@elaraai/east-ui";
49
+ * import { ArrayType, DateTimeType, DictType, East, FloatType, IntegerType, StringType, StructType, VariantType, variant } from "@elaraai/east";
50
+ * import { EventStateType, Format, Plan, UIComponentType } from "@elaraai/east-ui";
31
51
  *
32
- * const canvas = East.function([], UIComponentType, _$ => (
33
- * <Plan
34
- * axis={Plan.axis({
35
- * window: { min: new Date("2026-06-29"), max: new Date("2026-09-21") },
36
- * resolution: "week", now: new Date("2026-07-27"),
37
- * })}
38
- * rows={[
39
- * Plan.span({
40
- * key: "m03", label: "L1-M03", id: true, sub: "120 t",
41
- * runs: [
42
- * Plan.run({ key: "set", start: new Date("2026-06-29"), end: new Date("2026-07-06"), label: "SET", state: "actual" }),
43
- * Plan.run({ key: "run", start: new Date("2026-07-06"), end: new Date("2026-07-27"), label: "RUN · B-214", quantity: "96 t", state: "in-progress" }),
44
- * Plan.run({ key: "next", start: new Date("2026-08-03"), end: new Date("2026-08-24"), label: "RUN · B-221", quantity: "88 t", state: "recommended" }),
45
- * ],
46
- * }),
47
- * ]}
48
- * />
49
- * ));
52
+ * const canvas = East.function([], UIComponentType, ($) => {
53
+ * // Monday of ISO week n, 2026 — window W27–W38 (half-open), now W31.
54
+ * const week = $.const(East.function([IntegerType], DateTimeType, ($, n) => {
55
+ * const w1 = $.const(new Date("2025-12-29T00:00:00Z"), DateTimeType);
56
+ * return w1.addWeeks(n.subtract(1n));
57
+ * }));
58
+ * // The RAW domain shape — series discriminated by a variant field
59
+ * // (the natural ops-dataset form; the same rows page from a dataset).
60
+ * const JobRow = StructType({
61
+ * batch: StringType, start: DateTimeType, end: DateTimeType,
62
+ * tonnes: FloatType, state: EventStateType,
63
+ * });
64
+ * const ShiftRow = StructType({
65
+ * key: StringType, from: DateTimeType, to: DateTimeType,
66
+ * hours: FloatType, state: EventStateType,
67
+ * });
68
+ * const OpsRow = StructType({
69
+ * line: StringType,
70
+ * kind: VariantType({
71
+ * machine: StructType({ jobs: ArrayType(JobRow) }),
72
+ * crew: StructType({ shifts: ArrayType(ShiftRow) }),
73
+ * }),
74
+ * });
75
+ * const ops = $.const(new Map([
76
+ * ["L1-M03", { line: "Line 1", kind: variant("machine", { jobs: [
77
+ * { batch: "B-214", start: week(28n), end: week(31n), tonnes: 96.0, state: variant("in-progress", null) },
78
+ * { batch: "B-221", start: week(32n), end: week(35n), tonnes: 88.0, state: variant("proposed", variant("recommended", null)) },
79
+ * ] }) }],
80
+ * ["L1-M04", { line: "Line 1", kind: variant("machine", { jobs: [
81
+ * { batch: "B-208", start: week(27n), end: week(30n), tonnes: 112.0, state: variant("actual", null) },
82
+ * ] }) }],
83
+ * ["L2-M11", { line: "Line 2", kind: variant("machine", { jobs: [
84
+ * { batch: "B-241", start: week(29n), end: week(33n), tonnes: 92.0, state: variant("confirmed", null) },
85
+ * ] }) }],
86
+ * ["crewA", { line: "Line 1", kind: variant("crew", { shifts: [
87
+ * { key: "s1", from: week(27n), to: week(29n), hours: 80.0, state: variant("confirmed", null) },
88
+ * { key: "s2", from: week(31n), to: week(33n), hours: 64.0, state: variant("proposed", variant("recommended", null)) },
89
+ * ] }) }],
90
+ * ]), DictType(StringType, OpsRow));
91
+ * // Hierarchy is the DATA's (#822): one `groupToDicts` groups the rows
92
+ * // into the canvas's blocks — each machine under its line, the crews
93
+ * // under one "Crews" block. An entry of the result holds its rows.
94
+ * const blocks = $.let(ops.groupToDicts(
95
+ * ($, r) => r.kind.hasTag("crew").ifElse(() => "Crews", () => r.line),
96
+ * ($, _r, k) => k));
97
+ * const Block = DictType(StringType, OpsRow);
98
+ * // The series — real East values bound in the body, typed by the
99
+ * // constructor. The list IS the layout: one block per series, top to
100
+ * // bottom. The accessors are where raw fields become canvas vocabulary:
101
+ * // labels, quantity displays and chip text all derive CLIENT-SIDE,
102
+ * // inside each series' `derive`.
103
+ * const series = $.const([
104
+ * // One row per line, its machines stepped down into
105
+ * // (`Plan.children`) and their runs rolled up into its bands —
106
+ * // which sum the runs' quantities, unit by unit.
107
+ * Plan.series.span(Block, {
108
+ * key: "lines", title: "Lines",
109
+ * match: (_b, name) => name.equal("Crews").not(),
110
+ * label: (_b, name) => name,
111
+ * runs: _b => [],
112
+ * rollup: "union",
113
+ * children: Plan.children((b) => b, [
114
+ * Plan.series.span(OpsRow, {
115
+ * key: "machines", title: "Machines",
116
+ * match: r => r.kind.hasTag("machine"),
117
+ * label: (_r, k) => k, id: true,
118
+ * runs: r => r.kind.unwrap("machine").jobs.map((_$, j) => Plan.run({
119
+ * key: j.batch, start: j.start, end: j.end,
120
+ * label: East.str`RUN · ${j.batch}`,
121
+ * // A quantity is one value: the bar prints `96 t`,
122
+ * // and the line's band sums the tonnes.
123
+ * quantity: Plan.quantity(j.tonnes, { unit: "t", format: Format.Number({ maximumFractionDigits: 0n }) }),
124
+ * state: j.state,
125
+ * })),
126
+ * }),
127
+ * ]),
128
+ * }),
129
+ * // One strip per matching block — here the one "Crews" block,
130
+ * // wearing its member count.
131
+ * Plan.series.group(Block, {
132
+ * key: "crews", title: "Crews",
133
+ * match: (_b, name) => name.equal("Crews"),
134
+ * label: (_b, name) => name,
135
+ * children: Plan.children((b) => b, [
136
+ * Plan.series.cards(OpsRow, {
137
+ * key: "crew-shifts", title: "Crew shifts",
138
+ * match: r => r.kind.hasTag("crew"),
139
+ * label: (_r, k) => k,
140
+ * chips: r => r.kind.unwrap("crew").shifts.map(($, s) => {
141
+ * const hrs = $.let(East.Float.printFixed(s.hours, 0n), StringType);
142
+ * // `+` marks ADDED hours — a removed proposal keeps the
143
+ * // plain figure (see planCardRows for the full ladder).
144
+ * const label = $.let(s.state.match({
145
+ * proposed: (_$, p) => p.hasTag("removed").ifElse(
146
+ * () => East.str`${hrs}h`,
147
+ * () => East.str`+${hrs}h`),
148
+ * }, _$ => East.str`${hrs}h`), StringType);
149
+ * return Plan.chip({ key: s.key, from: s.from, to: s.to, label, state: s.state });
150
+ * }),
151
+ * }),
152
+ * ]),
153
+ * }),
154
+ * Plan.series.rows(Block, { key: "chrome", title: "Milestones", subtitle: "one-off chrome" },
155
+ * [Plan.events({ key: "ms", label: "MILESTONES", id: true, marks: [
156
+ * Plan.mark({ key: "kick", at: week(28n), kind: "milestone", label: "KICKOFF" }),
157
+ * Plan.mark({ key: "rel", at: week(33n), kind: "milestone", label: "REL 2.4" }),
158
+ * ] })]),
159
+ * ], ArrayType(Plan.Types.Series(Block)));
160
+ * const axis = $.const(Plan.axis({ window: { min: week(27n), max: week(39n) }, resolution: "week", now: week(31n) }));
161
+ * return (
162
+ * <Plan
163
+ * axis={axis}
164
+ * data={blocks}
165
+ * series={series}
166
+ * />
167
+ * );
168
+ * });
50
169
  * ```
51
170
  *
52
171
  * @remarks
53
- * Carries the whole authoring namespace — `Plan.axis` (+ `.time` / `.number` /
54
- * `.ordinal`), `Plan.at`, the kind factories, the value builders,
55
- * `Plan.layer` / `Plan.fixed` (chart channels), `Plan.markKind`, and
56
- * `Plan.Types.*`. Replaces `Gantt`, `Planner` and `AlignedStack`.
172
+ * Carries the factory namespace except `Root` (the tag is the root):
173
+ * `Plan.axis` (+ `.time` / `.number` / `.ordinal`), `Plan.at`,
174
+ * `Plan.series.*`, `Plan.children`, `Plan.ref` / `Plan.sectionRef`,
175
+ * `Plan.pick` / `Plan.pickItems`, the kind factories, the value and cell
176
+ * builders, `Plan.quantity`, `Plan.link`, `Plan.layer` / `Plan.fixed` (chart
177
+ * channels), `Plan.markKind`, `Plan.uiState` (a bound `ui` state's seed), and
178
+ * `Plan.Types.*`. Replaces `Gantt`, `Planner` and
179
+ * `AlignedStack`.
57
180
  *
58
181
  * The tag is generic in the canvas's axis kind `K`, inferred from `axis`:
59
182
  * a series whose instants ride another arm is a compile error at the tag
60
183
  * (see `PlanConfig`).
61
184
  */
62
- export const Plan = Object.assign(function Plan(props) {
63
- return PlanFactory.Root(props);
64
- }, {
65
- axis: PlanFactory.axis,
66
- at: PlanFactory.at,
67
- span: PlanFactory.span,
68
- buckets: PlanFactory.buckets,
69
- chart: PlanFactory.chart,
70
- heat: PlanFactory.heat,
71
- table: PlanFactory.table,
72
- cards: PlanFactory.cards,
73
- events: PlanFactory.events,
74
- group: PlanFactory.group,
75
- series: PlanFactory.series,
76
- run: PlanFactory.run,
77
- decision: PlanFactory.decision,
78
- port: PlanFactory.port,
79
- event: PlanFactory.event,
80
- lane: PlanFactory.lane,
81
- marker: PlanFactory.marker,
82
- chip: PlanFactory.chip,
83
- mark: PlanFactory.mark,
84
- link: PlanFactory.link,
85
- markKind: PlanFactory.markKind,
86
- heatCells: PlanFactory.heatCells,
87
- weightCells: PlanFactory.weightCells,
88
- segmentCells: PlanFactory.segmentCells,
89
- segment: PlanFactory.segment,
90
- tableCells: PlanFactory.tableCells,
91
- tableSeries: PlanFactory.tableSeries,
92
- layer: PlanFactory.layer,
93
- fixed: PlanFactory.fixed,
94
- pick: PlanFactory.pick,
95
- pickItems: PlanFactory.pickItems,
96
- Types: PlanFactory.Types,
97
- });
185
+ export const Plan = Object.assign(PlanTag, authoring);
98
186
  //# sourceMappingURL=plan.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../src/runtime/collections/plan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EACH,IAAI,IAAI,WAAW,GAGtB,MAAM,iCAAiC,CAAC;AAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,CAAC,MAAM,IAAI,GAkCb,MAAM,CAAC,MAAM,CACb,SAAS,IAAI,CAAsD,KAAoB;IACnF,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC,EACD;IACI,IAAI,EAAE,WAAW,CAAC,IAAI;IACtB,EAAE,EAAE,WAAW,CAAC,EAAE;IAClB,IAAI,EAAE,WAAW,CAAC,IAAI;IACtB,OAAO,EAAE,WAAW,CAAC,OAAO;IAC5B,KAAK,EAAE,WAAW,CAAC,KAAK;IACxB,IAAI,EAAE,WAAW,CAAC,IAAI;IACtB,KAAK,EAAE,WAAW,CAAC,KAAK;IACxB,KAAK,EAAE,WAAW,CAAC,KAAK;IACxB,MAAM,EAAE,WAAW,CAAC,MAAM;IAC1B,KAAK,EAAE,WAAW,CAAC,KAAK;IACxB,MAAM,EAAE,WAAW,CAAC,MAAM;IAC1B,GAAG,EAAE,WAAW,CAAC,GAAG;IACpB,QAAQ,EAAE,WAAW,CAAC,QAAQ;IAC9B,IAAI,EAAE,WAAW,CAAC,IAAI;IACtB,KAAK,EAAE,WAAW,CAAC,KAAK;IACxB,IAAI,EAAE,WAAW,CAAC,IAAI;IACtB,MAAM,EAAE,WAAW,CAAC,MAAM;IAC1B,IAAI,EAAE,WAAW,CAAC,IAAI;IACtB,IAAI,EAAE,WAAW,CAAC,IAAI;IACtB,IAAI,EAAE,WAAW,CAAC,IAAI;IACtB,QAAQ,EAAE,WAAW,CAAC,QAAQ;IAC9B,SAAS,EAAE,WAAW,CAAC,SAAS;IAChC,WAAW,EAAE,WAAW,CAAC,WAAW;IACpC,YAAY,EAAE,WAAW,CAAC,YAAY;IACtC,OAAO,EAAE,WAAW,CAAC,OAAO;IAC5B,UAAU,EAAE,WAAW,CAAC,UAAU;IAClC,WAAW,EAAE,WAAW,CAAC,WAAW;IACpC,KAAK,EAAE,WAAW,CAAC,KAAK;IACxB,KAAK,EAAE,WAAW,CAAC,KAAK;IACxB,IAAI,EAAE,WAAW,CAAC,IAAI;IACtB,SAAS,EAAE,WAAW,CAAC,SAAS;IAChC,KAAK,EAAE,WAAW,CAAC,KAAK;CAC3B,CACJ,CAAC"}
1
+ {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../src/runtime/collections/plan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EACH,IAAI,IAAI,WAAW,GAItB,MAAM,iCAAiC,CAAC;AAGzC,oFAAoF;AACpF,SAAS,OAAO,CAAsD,KAAoB;IACtF,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;AAED,8EAA8E;AAC9E,8EAA8E;AAC9E,4BAA4B;AAC5B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,GAAG,WAAW,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuKG;AACH,MAAM,CAAC,MAAM,IAAI,GAEiB,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC"}
@@ -7,9 +7,38 @@
7
7
  */
8
8
  import type { SubtypeExprOrValue, ArrayType, DictType, StringType, StructType } from "@elaraai/east";
9
9
  import type { PagedSource } from "../../contracts/source.js";
10
- import { Sheet as SheetFactory, type SheetColumnSpec, type SheetOptions, type SheetBindHandle } from "../../collections/sheet/index.js";
10
+ import { type SheetColumnSpec, type SheetOptions, type SheetGroupedOptions, type SheetEntriesOptions, type SheetEntryOf, type SheetBindHandle, type SheetLinesField, type SheetLineOf, type SheetNamespace } from "../../collections/sheet/index.js";
11
11
  import type { DataRowType } from "../../collections/table/index.js";
12
12
  import type { UIElement } from "../runtime.js";
13
+ /**
14
+ * `<Sheet data={entries} id="id" group={Sheet.group(P, "lines", …)} columns={{ … }} />`
15
+ * — GROUPED rows with LOOSE rows between the groups (#846): `data` holds
16
+ * `Sheet.Types.Entry(P, "lines")` entries, each a group or a row of the
17
+ * line type; `columns` are declared over the line type.
18
+ */
19
+ declare function SheetTag<P extends StructType, F extends SheetLinesField<P>>(props: {
20
+ data: NoInfer<SubtypeExprOrValue<ArrayType<SheetEntryOf<P, F>>> | SheetBindHandle<SheetEntryOf<P, F>> | PagedSource<ArrayType<SheetEntryOf<P, F>>> | PagedSource<DictType<StringType, SheetEntryOf<P, F>>>>;
21
+ columns: SheetColumnSpec<SheetLineOf<P, F>>;
22
+ } & SheetEntriesOptions<P, F>): UIElement;
23
+ /**
24
+ * `<Sheet data={plans} id="id" group={Sheet.group(P, "lines", …)} columns={{ … }} />`
25
+ * — GROUPED rows (#740): the rows are groups, `columns` are declared over
26
+ * the line type the group's lines field holds.
27
+ */
28
+ declare function SheetTag<T extends SubtypeExprOrValue<ArrayType<StructType>>, F extends SheetLinesField<DataRowType<T>>>(props: {
29
+ data: T;
30
+ columns: SheetColumnSpec<SheetLineOf<DataRowType<T>, F>>;
31
+ } & SheetGroupedOptions<DataRowType<T>, F>): UIElement;
32
+ /** GROUPED rows over a whole-value bind handle of groups. */
33
+ declare function SheetTag<P extends StructType, F extends SheetLinesField<P>>(props: {
34
+ data: SheetBindHandle<P>;
35
+ columns: SheetColumnSpec<SheetLineOf<P, F>>;
36
+ } & SheetGroupedOptions<P, F>): UIElement;
37
+ /** GROUPED rows over a paged source of groups. */
38
+ declare function SheetTag<P extends StructType, F extends SheetLinesField<P>>(props: {
39
+ data: PagedSource<ArrayType<P>> | PagedSource<DictType<StringType, P>>;
40
+ columns: SheetColumnSpec<SheetLineOf<P, F>>;
41
+ } & SheetGroupedOptions<P, F>): UIElement;
13
42
  /**
14
43
  * `<Sheet data={rows} id="id" columns={{ … }} />` — the planning spreadsheet.
15
44
  * Maps to `Sheet.Root`. `columns` is typed as `SheetColumnSpec<R>` (a mapped
@@ -45,24 +74,30 @@ declare function SheetTag<R extends StructType>(props: {
45
74
  * @example
46
75
  * ```tsx
47
76
  * // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
48
- * import { East, ArrayType, DateTimeType, FloatType, OptionType, StringType, StructType, none } from "@elaraai/east";
77
+ * import { ArrayType, DateTimeType, East, FloatType, OptionType, StringType, StructType, none } from "@elaraai/east";
49
78
  * import { Reactive, Sheet, State, UIComponentType } from "@elaraai/east-ui";
50
79
  *
51
- * const JobType = StructType({ id: StringType, start: OptionType(DateTimeType), task: StringType, qty: OptionType(FloatType) });
52
- *
53
- * const jobs = East.function([], UIComponentType, (_$) => (
80
+ * const sheet = East.function([], UIComponentType, (_$) => (
54
81
  * <Reactive>{$ => {
55
- * const rows = $.let(State.bind([ArrayType(JobType)], "jobs", [{ id: "j1", start: none, task: "Machining", qty: none }]));
82
+ * const JobType = StructType({
83
+ * id: StringType,
84
+ * start: OptionType(DateTimeType), // none = blank cell
85
+ * task: StringType, // "" = blank cell
86
+ * qty: OptionType(FloatType),
87
+ * });
88
+ * const jobs = $.let(State.bind([ArrayType(JobType)], "sheet_basic_jobs", [
89
+ * { id: "j1", start: none, task: "Machining", qty: none },
90
+ * ]));
56
91
  * return (
57
92
  * <Sheet
58
- * data={rows.read()}
93
+ * data={jobs}
59
94
  * id="id"
60
95
  * columns={{
61
- * start: Sheet.column.date(JobType, { header: "Start", sub: "d/m · fri · +3d" }),
96
+ * start: Sheet.column.date(JobType, { header: "Start", sub: "dd / mm / yyyy" }),
62
97
  * task: Sheet.column.text(JobType, { header: "Task" }),
63
- * qty: Sheet.column.quantity(JobType, { header: "Qty" }),
98
+ * qty: Sheet.column.quantity(JobType, { header: "Qty" }), // no driver on this sheet — the two-argument form
64
99
  * }}
65
- * onUpdate={rows.write}
100
+ * onUpdate={jobs.write}
66
101
  * />
67
102
  * );
68
103
  * }}</Reactive>
@@ -70,20 +105,18 @@ declare function SheetTag<R extends StructType>(props: {
70
105
  * ```
71
106
  *
72
107
  * @remarks
73
- * Carries the whole authoring namespace — `Sheet.column.*` (the builders),
74
- * `Sheet.register.members` / `.concat`, `Sheet.driver`, `Sheet.link.arity` /
75
- * `.check` / `.parse` / `.print`, `Sheet.patch`, and `Sheet.Types.*` (the
76
- * closed wire types plus the typed constructors `Context(R, D)` / `Fill(T)` /
77
- * `Patch(R)` / `Proposal(R)` / `Edit(R)` / `CheckContext(R)`). Desugars to
108
+ * Carries the factory namespace except `Root` (the tag is the root):
109
+ * `Sheet.column.*` (the builders), `Sheet.register.members` / `.concat`,
110
+ * `Sheet.driver`, `Sheet.link.arity` / `.check` / `.parse` / `.print`,
111
+ * `Sheet.patch`, `Sheet.apply` (a checked batch applied to a collection),
112
+ * `Sheet.group` / `Sheet.group.cell.*` (grouped rows, #740 — with loose rows
113
+ * between the groups over `Sheet.Types.Entry` entries, #846), `Sheet.subRows`
114
+ * / `Sheet.subRow` (sub rows, #844), and `Sheet.Types.*` (the closed wire
115
+ * types plus the typed constructors, among them `DraftContext(R, D)` /
116
+ * `Fill(T)` / `Patch(R)` / `Proposal(R)` / `CheckContext(R)` / `Draft(R)` /
117
+ * `PatchEvent(E)` / `ChangeSet(E)` / `Entry(G, "rows")`). Desugars to
78
118
  * `Sheet.Root(data, columns, options)`.
79
119
  */
80
- export declare const Sheet: typeof SheetTag & {
81
- column: typeof SheetFactory.column;
82
- register: typeof SheetFactory.register;
83
- driver: typeof SheetFactory.driver;
84
- link: typeof SheetFactory.link;
85
- patch: typeof SheetFactory.patch;
86
- Types: typeof SheetFactory.Types;
87
- };
120
+ export declare const Sheet: typeof SheetTag & Omit<SheetNamespace, "Root">;
88
121
  export {};
89
122
  //# sourceMappingURL=sheet.d.ts.map