@elaraai/east-ui 1.0.67 → 1.0.69

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 (306) hide show
  1. package/README.md +2 -2
  2. package/dist/src/charts/chart/index.d.ts +39 -4
  3. package/dist/src/charts/chart/index.d.ts.map +1 -1
  4. package/dist/src/charts/chart/index.js +3 -3
  5. package/dist/src/charts/chart/index.js.map +1 -1
  6. package/dist/src/charts/spec/index.d.ts +61 -3
  7. package/dist/src/charts/spec/index.d.ts.map +1 -1
  8. package/dist/src/charts/spec/types.d.ts +1 -1
  9. package/dist/src/charts/spec/types.js +1 -1
  10. package/dist/src/collections/blend/index.d.ts +1 -1
  11. package/dist/src/collections/blend/index.d.ts.map +1 -1
  12. package/dist/src/collections/blend/index.js +1 -1
  13. package/dist/src/collections/blend/index.js.map +1 -1
  14. package/dist/src/collections/blend/types.js +1 -1
  15. package/dist/src/collections/blend/types.js.map +1 -1
  16. package/dist/src/collections/board/index.d.ts +4 -4
  17. package/dist/src/collections/board/index.d.ts.map +1 -1
  18. package/dist/src/collections/board/index.js +1 -1
  19. package/dist/src/collections/board/index.js.map +1 -1
  20. package/dist/src/collections/board/types.js +1 -1
  21. package/dist/src/collections/board/types.js.map +1 -1
  22. package/dist/src/collections/calendar/index.d.ts +1 -1
  23. package/dist/src/collections/calendar/index.d.ts.map +1 -1
  24. package/dist/src/collections/deck/index.d.ts +58 -0
  25. package/dist/src/collections/deck/index.d.ts.map +1 -1
  26. package/dist/src/collections/index.d.ts +1 -2
  27. package/dist/src/collections/index.d.ts.map +1 -1
  28. package/dist/src/collections/index.js +1 -2
  29. package/dist/src/collections/index.js.map +1 -1
  30. package/dist/src/collections/library/index.d.ts +29 -0
  31. package/dist/src/collections/library/index.d.ts.map +1 -1
  32. package/dist/src/collections/library/types.d.ts +29 -0
  33. package/dist/src/collections/library/types.d.ts.map +1 -1
  34. package/dist/src/collections/matrix/index.d.ts +1 -1
  35. package/dist/src/collections/matrix/index.d.ts.map +1 -1
  36. package/dist/src/collections/plan/assemble.d.ts +3732 -0
  37. package/dist/src/collections/plan/assemble.d.ts.map +1 -0
  38. package/dist/src/collections/plan/assemble.js +187 -0
  39. package/dist/src/collections/plan/assemble.js.map +1 -0
  40. package/dist/src/collections/plan/builders.d.ts +612 -0
  41. package/dist/src/collections/plan/builders.d.ts.map +1 -0
  42. package/dist/src/collections/plan/builders.js +543 -0
  43. package/dist/src/collections/plan/builders.js.map +1 -0
  44. package/dist/src/collections/plan/data-forms.d.ts +332 -0
  45. package/dist/src/collections/plan/data-forms.d.ts.map +1 -0
  46. package/dist/src/collections/plan/data-forms.js +212 -0
  47. package/dist/src/collections/plan/data-forms.js.map +1 -0
  48. package/dist/src/collections/plan/factories.d.ts +338 -0
  49. package/dist/src/collections/plan/factories.d.ts.map +1 -0
  50. package/dist/src/collections/plan/factories.js +414 -0
  51. package/dist/src/collections/plan/factories.js.map +1 -0
  52. package/dist/src/collections/plan/index.d.ts +271 -0
  53. package/dist/src/collections/plan/index.d.ts.map +1 -0
  54. package/dist/src/collections/plan/index.js +162 -0
  55. package/dist/src/collections/plan/index.js.map +1 -0
  56. package/dist/src/collections/plan/ir.d.ts +3496 -0
  57. package/dist/src/collections/plan/ir.d.ts.map +1 -0
  58. package/dist/src/collections/plan/ir.js +83 -0
  59. package/dist/src/collections/plan/ir.js.map +1 -0
  60. package/dist/src/collections/plan/pick.d.ts +115 -0
  61. package/dist/src/collections/plan/pick.d.ts.map +1 -0
  62. package/dist/src/collections/plan/pick.js +193 -0
  63. package/dist/src/collections/plan/pick.js.map +1 -0
  64. package/dist/src/collections/plan/root.d.ts +210 -0
  65. package/dist/src/collections/plan/root.d.ts.map +1 -0
  66. package/dist/src/collections/plan/root.js +146 -0
  67. package/dist/src/collections/plan/root.js.map +1 -0
  68. package/dist/src/collections/plan/series.d.ts +11890 -0
  69. package/dist/src/collections/plan/series.d.ts.map +1 -0
  70. package/dist/src/collections/plan/series.js +412 -0
  71. package/dist/src/collections/plan/series.js.map +1 -0
  72. package/dist/src/collections/plan/types.d.ts +9291 -0
  73. package/dist/src/collections/plan/types.d.ts.map +1 -0
  74. package/dist/src/collections/plan/types.js +940 -0
  75. package/dist/src/collections/plan/types.js.map +1 -0
  76. package/dist/src/collections/roster/index.d.ts +4 -4
  77. package/dist/src/collections/roster/index.d.ts.map +1 -1
  78. package/dist/src/collections/roster/index.js +1 -1
  79. package/dist/src/collections/roster/index.js.map +1 -1
  80. package/dist/src/collections/roster/types.d.ts +1 -1
  81. package/dist/src/collections/roster/types.d.ts.map +1 -1
  82. package/dist/src/collections/roster/types.js +4 -3
  83. package/dist/src/collections/roster/types.js.map +1 -1
  84. package/dist/src/collections/table/index.d.ts +70 -2
  85. package/dist/src/collections/table/index.d.ts.map +1 -1
  86. package/dist/src/collections/table/index.js +55 -11
  87. package/dist/src/collections/table/index.js.map +1 -1
  88. package/dist/src/collections/table/types.d.ts +1 -1
  89. package/dist/src/collections/table/types.d.ts.map +1 -1
  90. package/dist/src/component.d.ts +3898 -1339
  91. package/dist/src/component.d.ts.map +1 -1
  92. package/dist/src/component.js +83 -146
  93. package/dist/src/component.js.map +1 -1
  94. package/dist/src/container/card/types.d.ts +1 -1
  95. package/dist/src/container/card/types.d.ts.map +1 -1
  96. package/dist/src/contracts/approval.d.ts +117 -0
  97. package/dist/src/contracts/approval.d.ts.map +1 -0
  98. package/dist/src/contracts/approval.js +105 -0
  99. package/dist/src/contracts/approval.js.map +1 -0
  100. package/dist/src/contracts/drag.d.ts +3 -3
  101. package/dist/src/contracts/drag.d.ts.map +1 -1
  102. package/dist/src/contracts/drag.js +23 -10
  103. package/dist/src/contracts/drag.js.map +1 -1
  104. package/dist/src/contracts/index.d.ts +4 -1
  105. package/dist/src/contracts/index.d.ts.map +1 -1
  106. package/dist/src/contracts/index.js +4 -1
  107. package/dist/src/contracts/index.js.map +1 -1
  108. package/dist/src/contracts/pick.d.ts +705 -0
  109. package/dist/src/contracts/pick.d.ts.map +1 -0
  110. package/dist/src/contracts/pick.js +360 -0
  111. package/dist/src/contracts/pick.js.map +1 -0
  112. package/dist/src/contracts/review.d.ts +7 -99
  113. package/dist/src/contracts/review.d.ts.map +1 -1
  114. package/dist/src/contracts/review.js +11 -85
  115. package/dist/src/contracts/review.js.map +1 -1
  116. package/dist/src/contracts/slice-affordances.d.ts +13 -4
  117. package/dist/src/contracts/slice-affordances.d.ts.map +1 -1
  118. package/dist/src/contracts/slice-affordances.js +13 -3
  119. package/dist/src/contracts/slice-affordances.js.map +1 -1
  120. package/dist/src/contracts/source.d.ts +432 -0
  121. package/dist/src/contracts/source.d.ts.map +1 -0
  122. package/dist/src/contracts/source.js +505 -0
  123. package/dist/src/contracts/source.js.map +1 -0
  124. package/dist/src/contracts/states.d.ts +130 -0
  125. package/dist/src/contracts/states.d.ts.map +1 -1
  126. package/dist/src/contracts/states.js +122 -0
  127. package/dist/src/contracts/states.js.map +1 -1
  128. package/dist/src/contracts/time.d.ts +76 -0
  129. package/dist/src/contracts/time.d.ts.map +1 -0
  130. package/dist/src/contracts/time.js +78 -0
  131. package/dist/src/contracts/time.js.map +1 -0
  132. package/dist/src/display/trace/types.d.ts +1 -1
  133. package/dist/src/display/trace/types.d.ts.map +1 -1
  134. package/dist/src/index.d.ts +10 -2
  135. package/dist/src/index.d.ts.map +1 -1
  136. package/dist/src/index.js +22 -2
  137. package/dist/src/index.js.map +1 -1
  138. package/dist/src/internal.d.ts +5 -3
  139. package/dist/src/internal.d.ts.map +1 -1
  140. package/dist/src/internal.js +4 -3
  141. package/dist/src/internal.js.map +1 -1
  142. package/dist/src/layout/dock/index.d.ts +1 -1
  143. package/dist/src/layout/dock/index.js +1 -1
  144. package/dist/src/layout/index.d.ts +0 -1
  145. package/dist/src/layout/index.d.ts.map +1 -1
  146. package/dist/src/layout/index.js +0 -1
  147. package/dist/src/layout/index.js.map +1 -1
  148. package/dist/src/overlays/drawer/types.d.ts +1 -1
  149. package/dist/src/overlays/drawer/types.d.ts.map +1 -1
  150. package/dist/src/pick/index.d.ts +443 -0
  151. package/dist/src/pick/index.d.ts.map +1 -0
  152. package/dist/src/pick/index.js +64 -0
  153. package/dist/src/pick/index.js.map +1 -0
  154. package/dist/src/pick/panel/index.d.ts +64 -0
  155. package/dist/src/pick/panel/index.d.ts.map +1 -0
  156. package/dist/src/pick/panel/index.js +61 -0
  157. package/dist/src/pick/panel/index.js.map +1 -0
  158. package/dist/src/platform/slice/index.d.ts +291 -0
  159. package/dist/src/platform/slice/index.d.ts.map +1 -1
  160. package/dist/src/platform/slice/index.js +16 -0
  161. package/dist/src/platform/slice/index.js.map +1 -1
  162. package/dist/src/runtime/collections/deck.d.ts +29 -0
  163. package/dist/src/runtime/collections/deck.d.ts.map +1 -1
  164. package/dist/src/runtime/collections/index.d.ts +1 -2
  165. package/dist/src/runtime/collections/index.d.ts.map +1 -1
  166. package/dist/src/runtime/collections/index.js +1 -2
  167. package/dist/src/runtime/collections/index.js.map +1 -1
  168. package/dist/src/runtime/collections/library.d.ts +1 -1
  169. package/dist/src/runtime/collections/library.js +1 -1
  170. package/dist/src/runtime/collections/plan.d.ts +98 -0
  171. package/dist/src/runtime/collections/plan.d.ts.map +1 -0
  172. package/dist/src/runtime/collections/plan.js +98 -0
  173. package/dist/src/runtime/collections/plan.js.map +1 -0
  174. package/dist/src/runtime/collections/schematic.d.ts +1 -1
  175. package/dist/src/runtime/collections/schematic.js +1 -1
  176. package/dist/src/runtime/collections/table.d.ts +9 -1
  177. package/dist/src/runtime/collections/table.d.ts.map +1 -1
  178. package/dist/src/runtime/collections/table.js +1 -7
  179. package/dist/src/runtime/collections/table.js.map +1 -1
  180. package/dist/src/runtime/layout/dock.d.ts +2 -2
  181. package/dist/src/runtime/layout/dock.js +2 -2
  182. package/dist/src/runtime/layout/index.d.ts +0 -1
  183. package/dist/src/runtime/layout/index.d.ts.map +1 -1
  184. package/dist/src/runtime/layout/index.js +0 -1
  185. package/dist/src/runtime/layout/index.js.map +1 -1
  186. package/dist/src/shared/plot-gutter.d.ts +6 -23
  187. package/dist/src/shared/plot-gutter.d.ts.map +1 -1
  188. package/dist/src/shared/plot-gutter.js +6 -19
  189. package/dist/src/shared/plot-gutter.js.map +1 -1
  190. package/dist/src/shared/reify.d.ts +47 -4
  191. package/dist/src/shared/reify.d.ts.map +1 -1
  192. package/dist/src/shared/reify.js +62 -4
  193. package/dist/src/shared/reify.js.map +1 -1
  194. package/dist/src/slice/breakdown/index.d.ts +27 -0
  195. package/dist/src/slice/breakdown/index.d.ts.map +1 -1
  196. package/dist/src/slice/breakdown/types.d.ts +27 -0
  197. package/dist/src/slice/breakdown/types.d.ts.map +1 -1
  198. package/dist/src/slice/cohort/index.d.ts +54 -0
  199. package/dist/src/slice/cohort/index.d.ts.map +1 -1
  200. package/dist/src/slice/cohort/types.d.ts +27 -0
  201. package/dist/src/slice/cohort/types.d.ts.map +1 -1
  202. package/dist/src/slice/filter/index.d.ts +27 -0
  203. package/dist/src/slice/filter/index.d.ts.map +1 -1
  204. package/dist/src/slice/filter/types.d.ts +27 -0
  205. package/dist/src/slice/filter/types.d.ts.map +1 -1
  206. package/dist/src/slice/index.d.ts +405 -0
  207. package/dist/src/slice/index.d.ts.map +1 -1
  208. package/dist/src/slice/legend/index.d.ts +27 -0
  209. package/dist/src/slice/legend/index.d.ts.map +1 -1
  210. package/dist/src/slice/legend/types.d.ts +27 -0
  211. package/dist/src/slice/legend/types.d.ts.map +1 -1
  212. package/dist/src/slice/range/index.d.ts +60 -18
  213. package/dist/src/slice/range/index.d.ts.map +1 -1
  214. package/dist/src/slice/range/index.js +9 -1
  215. package/dist/src/slice/range/index.js.map +1 -1
  216. package/dist/src/slice/range/types.d.ts +63 -22
  217. package/dist/src/slice/range/types.d.ts.map +1 -1
  218. package/dist/src/slice/range/types.js +12 -5
  219. package/dist/src/slice/range/types.js.map +1 -1
  220. package/dist/src/slice/search/index.d.ts +27 -0
  221. package/dist/src/slice/search/index.d.ts.map +1 -1
  222. package/dist/src/slice/search/types.d.ts +27 -0
  223. package/dist/src/slice/search/types.d.ts.map +1 -1
  224. package/dist/src/slice/summary/index.d.ts +27 -0
  225. package/dist/src/slice/summary/index.d.ts.map +1 -1
  226. package/dist/src/slice/summary/types.d.ts +27 -0
  227. package/dist/src/slice/summary/types.d.ts.map +1 -1
  228. package/dist/src/style/content.d.ts +4 -6
  229. package/dist/src/style/content.d.ts.map +1 -1
  230. package/dist/src/style/content.js +4 -6
  231. package/dist/src/style/content.js.map +1 -1
  232. package/dist/src/style/scheme.js +1 -1
  233. package/dist/src/style/scheme.js.map +1 -1
  234. package/dist/test/collections/index.d.ts +2 -2
  235. package/dist/test/collections/index.d.ts.map +1 -1
  236. package/dist/test/collections/index.js +2 -2
  237. package/dist/test/collections/index.js.map +1 -1
  238. package/dist/test/collections/paged-source.examples.d.ts +9 -0
  239. package/dist/test/collections/paged-source.examples.d.ts.map +1 -0
  240. package/dist/test/collections/paged-source.examples.js +136 -0
  241. package/dist/test/collections/paged-source.examples.js.map +1 -0
  242. package/dist/test/collections/plan.examples.d.ts +125 -0
  243. package/dist/test/collections/plan.examples.d.ts.map +1 -0
  244. package/dist/test/collections/plan.examples.js +2939 -0
  245. package/dist/test/collections/plan.examples.js.map +1 -0
  246. package/dist/test/contracts/pick.examples.d.ts +6 -0
  247. package/dist/test/contracts/pick.examples.d.ts.map +1 -0
  248. package/dist/test/contracts/pick.examples.js +89 -0
  249. package/dist/test/contracts/pick.examples.js.map +1 -0
  250. package/dist/test/layout/dock.examples.d.ts +4 -4
  251. package/dist/test/layout/dock.examples.d.ts.map +1 -1
  252. package/dist/test/layout/dock.examples.js +34 -16
  253. package/dist/test/layout/dock.examples.js.map +1 -1
  254. package/dist/test/slice/slice.examples.d.ts +2 -1
  255. package/dist/test/slice/slice.examples.d.ts.map +1 -1
  256. package/dist/test/slice/slice.examples.js +67 -9
  257. package/dist/test/slice/slice.examples.js.map +1 -1
  258. package/package.json +3 -3
  259. package/dist/src/collections/gantt/index.d.ts +0 -377
  260. package/dist/src/collections/gantt/index.d.ts.map +0 -1
  261. package/dist/src/collections/gantt/index.js +0 -896
  262. package/dist/src/collections/gantt/index.js.map +0 -1
  263. package/dist/src/collections/gantt/types.d.ts +0 -353
  264. package/dist/src/collections/gantt/types.d.ts.map +0 -1
  265. package/dist/src/collections/gantt/types.js +0 -207
  266. package/dist/src/collections/gantt/types.js.map +0 -1
  267. package/dist/src/collections/planner/index.d.ts +0 -624
  268. package/dist/src/collections/planner/index.d.ts.map +0 -1
  269. package/dist/src/collections/planner/index.js +0 -941
  270. package/dist/src/collections/planner/index.js.map +0 -1
  271. package/dist/src/collections/planner/types.d.ts +0 -615
  272. package/dist/src/collections/planner/types.d.ts.map +0 -1
  273. package/dist/src/collections/planner/types.js +0 -423
  274. package/dist/src/collections/planner/types.js.map +0 -1
  275. package/dist/src/layout/aligned-stack/index.d.ts +0 -101
  276. package/dist/src/layout/aligned-stack/index.d.ts.map +0 -1
  277. package/dist/src/layout/aligned-stack/index.js +0 -105
  278. package/dist/src/layout/aligned-stack/index.js.map +0 -1
  279. package/dist/src/layout/aligned-stack/types.d.ts +0 -50
  280. package/dist/src/layout/aligned-stack/types.d.ts.map +0 -1
  281. package/dist/src/layout/aligned-stack/types.js +0 -24
  282. package/dist/src/layout/aligned-stack/types.js.map +0 -1
  283. package/dist/src/runtime/collections/gantt.d.ts +0 -67
  284. package/dist/src/runtime/collections/gantt.d.ts.map +0 -1
  285. package/dist/src/runtime/collections/gantt.js +0 -58
  286. package/dist/src/runtime/collections/gantt.js.map +0 -1
  287. package/dist/src/runtime/collections/planner.d.ts +0 -80
  288. package/dist/src/runtime/collections/planner.d.ts.map +0 -1
  289. package/dist/src/runtime/collections/planner.js +0 -76
  290. package/dist/src/runtime/collections/planner.js.map +0 -1
  291. package/dist/src/runtime/layout/aligned-stack.d.ts +0 -38
  292. package/dist/src/runtime/layout/aligned-stack.d.ts.map +0 -1
  293. package/dist/src/runtime/layout/aligned-stack.js +0 -36
  294. package/dist/src/runtime/layout/aligned-stack.js.map +0 -1
  295. package/dist/test/collections/gantt.examples.d.ts +0 -33
  296. package/dist/test/collections/gantt.examples.d.ts.map +0 -1
  297. package/dist/test/collections/gantt.examples.js +0 -359
  298. package/dist/test/collections/gantt.examples.js.map +0 -1
  299. package/dist/test/collections/planner.examples.d.ts +0 -47
  300. package/dist/test/collections/planner.examples.d.ts.map +0 -1
  301. package/dist/test/collections/planner.examples.js +0 -546
  302. package/dist/test/collections/planner.examples.js.map +0 -1
  303. package/dist/test/layout/aligned-stack.examples.d.ts +0 -25
  304. package/dist/test/layout/aligned-stack.examples.d.ts.map +0 -1
  305. package/dist/test/layout/aligned-stack.examples.js +0 -294
  306. package/dist/test/layout/aligned-stack.examples.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ir.d.ts","sourceRoot":"","sources":["../../../../src/collections/plan/ir.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EACH,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGhF,OAAO,EAMH,cAAc,EASjB,MAAM,YAAY,CAAC;AAMpB;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,cAAc,EAAE,eAAe,CAA+C,CAAC;AAC7H,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCvB,CAAC;AACH,2CAA2C;AAC3C,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * The Plan's resolved UIComponent-coupled IR — since the data-interface
7
+ * redesign only the ROOT and the review config touch `UIComponentType`; the
8
+ * whole row vocabulary (elements, kinds, rows, templates) is pure
9
+ * data in `./types.ts`. These are the named twins of the `Plan` arm in
10
+ * `component.ts` (which spells the SAME shapes inline with the recursion
11
+ * `node`). Keep the two in lockstep: every factory builds values of these
12
+ * types and `Plan.Root` constructs the variant against the arm, so any
13
+ * drift fails the specs at build time.
14
+ *
15
+ * @packageDocumentation
16
+ */
17
+ import { ArrayType, FunctionType, NullType, OptionType, StringType, StructType, } from "@elaraai/east";
18
+ import { UIComponentType } from "../../component.js";
19
+ import { PickBindType } from "../../contracts/pick.js";
20
+ import { reviewType } from "../../contracts/approval.js";
21
+ import { CanDropFnType, DragEventType } from "../../contracts/drag.js";
22
+ import { SliceChromeType } from "../../platform/slice/index.js";
23
+ import { PlanAxisType, PlanGrainType, PlanLinkType, PlanRowsType, PlanElementRefType, PlanRowRefType, PlanRunClickEventType, PlanEventClickEventType, PlanMarkClickEventType, PlanChipClickEventType, PlanCellClickEventType, PlanGroupToggleEventType, PlanFooterItemType, PlanStyleType, } from "./types.js";
24
+ // ============================================================================
25
+ // Resolved types — the UIComponent-coupled shapes at `UIComponentType`
26
+ // ============================================================================
27
+ /**
28
+ * The Plan review config — the shared review contract at the Plan's
29
+ * keyed-row subject (`{ key }`).
30
+ */
31
+ export const PlanReviewType = reviewType(PlanRowRefType, UIComponentType);
32
+ /**
33
+ * The Plan root IR — the whole canvas.
34
+ *
35
+ * @remarks
36
+ * Window and resolution deliberately have **no callbacks**: they are slice
37
+ * writes (`setRange` / `setResolution`) — hosts observe the slice. Row
38
+ * order is data (no sort callback), and element detail lives in the root
39
+ * RESOLVERS: `popover` / `hover` over {@link PlanElementRefType} (a `none`
40
+ * result opens nothing) and `expandRender` over the row ref (the R2
41
+ * developer render for rows declaring `expand`) — one stored function per
42
+ * surface instead of UI embedded per element.
43
+ */
44
+ export const PlanRootType = StructType({
45
+ rows: PlanRowsType,
46
+ // The link graph (R1) — run-edge to run-edge quantity links; the
47
+ // links-focus control gathers a row's transitive family over it.
48
+ links: ArrayType(PlanLinkType),
49
+ axis: PlanAxisType,
50
+ grain: OptionType(PlanGrainType),
51
+ // The generalized element resolvers (Plan Data Interface.md §3.3) —
52
+ // invoked lazily at interaction time; naming per the Schematic /
53
+ // Flowchart `*Hover` resolver convention (never `on*` — that prefix is
54
+ // the action callbacks below).
55
+ popover: OptionType(FunctionType([PlanElementRefType], OptionType(UIComponentType))),
56
+ hover: OptionType(FunctionType([PlanElementRefType], OptionType(UIComponentType))),
57
+ expandRender: OptionType(FunctionType([PlanRowRefType], UIComponentType)),
58
+ // The GUTTER half of R2. An expanded row's gutter cell grows with the row
59
+ // (one tall cell, top-aligned), and the space that opens up is the
60
+ // author's — identity that only earns its place when the row has the
61
+ // canvas. Same shape as `expandRender`, over the same row ref.
62
+ expandGutter: OptionType(FunctionType([PlanRowRefType], UIComponentType)),
63
+ review: OptionType(PlanReviewType),
64
+ pick: OptionType(PickBindType),
65
+ slice: OptionType(SliceChromeType),
66
+ footer: ArrayType(PlanFooterItemType),
67
+ // DnD target role — the shared grammar verbatim (contracts/drag.ts).
68
+ id: StringType,
69
+ sources: ArrayType(StringType),
70
+ onDrag: OptionType(FunctionType([DragEventType], NullType)),
71
+ canDrop: OptionType(CanDropFnType),
72
+ // Selection + per-element clicks.
73
+ onSelect: OptionType(FunctionType([PlanRowRefType], NullType)),
74
+ onRunClick: OptionType(FunctionType([PlanRunClickEventType], NullType)),
75
+ onEventClick: OptionType(FunctionType([PlanEventClickEventType], NullType)),
76
+ onMarkClick: OptionType(FunctionType([PlanMarkClickEventType], NullType)),
77
+ onChipClick: OptionType(FunctionType([PlanChipClickEventType], NullType)),
78
+ onCellClick: OptionType(FunctionType([PlanCellClickEventType], NullType)),
79
+ onGroupToggle: OptionType(FunctionType([PlanGroupToggleEventType], NullType)),
80
+ onGrainChange: OptionType(FunctionType([PlanGrainType], NullType)),
81
+ style: OptionType(PlanStyleType),
82
+ });
83
+ //# sourceMappingURL=ir.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ir.js","sourceRoot":"","sources":["../../../../src/collections/plan/ir.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EACH,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAyB,MAAM,6BAA6B,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EACH,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EACl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AC,CAAC;IAC3D,OAAO,EAAE,UAAU,CAAC,aAAa,CAAC;IAClC,kCAAkC;IAClC,QAAQ,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC9D,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,qBAAqB,CAAC,EAAE,QAAQ,CAAC,CAAC;IACvE,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,uBAAuB,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC3E,WAAW,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,sBAAsB,CAAC,EAAE,QAAQ,CAAC,CAAC;IACzE,WAAW,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,sBAAsB,CAAC,EAAE,QAAQ,CAAC,CAAC;IACzE,WAAW,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,sBAAsB,CAAC,EAAE,QAAQ,CAAC,CAAC;IACzE,aAAa,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,wBAAwB,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC7E,aAAa,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC,EAAE,QAAQ,CAAC,CAAC;IAClE,KAAK,EAAE,UAAU,CAAC,aAAa,CAAC;CACnC,CAAC,CAAC"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * `Plan.pick` — the Plan's façade over the shared pick contract (#590).
7
+ *
8
+ * The contract holds identified things and does not know what they are, so an
9
+ * adopter supplies the two things it cannot: how to read identity off one item,
10
+ * and what a useful count is. For a Plan that is a nine-arm match over the
11
+ * series variant, plus the row count that series would contribute.
12
+ *
13
+ * Nothing here is Plan-specific machinery — it is ~40 lines of accessors. The
14
+ * façade exists so an author writes `Plan.pick(key, all)` instead of restating
15
+ * the match at every call site, not because the Plan needs its own contract.
16
+ *
17
+ * @packageDocumentation
18
+ */
19
+ import { type ExprType, type SubtypeExprOrValue, ArrayType, DictType, StringType, StructType } from "@elaraai/east";
20
+ import { type PickHandle, type PickItemType } from "../../contracts/pick.js";
21
+ import { PlanSeriesType, type PlanSeriesInput } from "./series.js";
22
+ /** Options for {@link createPlanPick}. */
23
+ export interface PlanPickOptions {
24
+ /**
25
+ * The canvas data. Supplying it gives each library entry its row COUNT,
26
+ * derived by running that series' own pipeline — which is what turns "this
27
+ * series is on" into "this series contributes 18 rows", and what surfaces
28
+ * the `0 rs` case where a series is switched on to no visible effect.
29
+ *
30
+ * Omit it for a paged canvas: a window cannot know the total, and a wrong
31
+ * count is worse than none.
32
+ */
33
+ data?: SubtypeExprOrValue<DictType<StringType, StructType>>;
34
+ /** Series switched off to begin with; omit ⇒ everything shows. */
35
+ hidden?: readonly string[];
36
+ }
37
+ /**
38
+ * Bind a Plan's row series to a persisted pick.
39
+ *
40
+ * @remarks
41
+ * A GROUP is the unit a person picks — "add Machines" — and hiding one takes
42
+ * its whole subtree with it, because the members are built by the group's own
43
+ * `derive`. That is why every arm carries identity (#590 §6.1): without it the
44
+ * library could only offer top-level series, which on a grouped canvas is
45
+ * almost nothing.
46
+ *
47
+ * Identity is read through ONE nine-arm match rather than one match per
48
+ * accessor — every arm carries the same four fields, so matching four times
49
+ * would build four copies of the same traversal.
50
+ *
51
+ * @param key - The store key; also the persistence key
52
+ * @param all - Every series that COULD show
53
+ * @param options - Data for counts, and the initial hidden set ({@link PlanPickOptions})
54
+ * @returns A pick handle over the series type
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * const shown = $.let(Plan.pick("ops.series", all, { data: ops }));
59
+ *
60
+ * <Pick.Panel value={shown} title="Series" />
61
+ * <Plan axis={axis} data={ops} series={Pick.active(shown)} />
62
+ * ```
63
+ */
64
+ export declare function createPlanPick(key: string, all: PlanSeriesInput, options?: PlanPickOptions): PickHandle<ReturnType<typeof PlanSeriesType>>;
65
+ /**
66
+ * The library entries for a Plan's series — described, with NO state binding.
67
+ *
68
+ * @remarks
69
+ * {@link createPlanPick} builds its `items` from the same accessors, so proving
70
+ * this proves the bound path too. Split out because `State.bind` is not
71
+ * runnable in a `describeEast` spec (`TestImpl` carries no State runtime), and
72
+ * identity / kind icons / counts are exactly the part worth asserting.
73
+ *
74
+ * @param all - Every series that COULD show
75
+ * @param options - Data for counts ({@link PlanPickOptions})
76
+ * @returns One descriptor per series, in declaration order
77
+ */
78
+ /**
79
+ * A stable signature of WHICH series a canvas is built from.
80
+ *
81
+ * @remarks
82
+ * Exists for the paged arm. `PagedSourceType` requires that "two sources with
83
+ * the same `id` must serve the same rows", and a derived source built from a
84
+ * SUBSET of the series serves different rows than one built from all of them —
85
+ * so its id has to say so.
86
+ *
87
+ * That requirement is not theoretical: the window cache invalidates on
88
+ * `source.id` alone (`use-plan-paging.ts`), and resident windows are immutable
89
+ * and served without re-calling `page`. Without a signature, toggling a series
90
+ * off leaves the previous rows on screen indefinitely
91
+ * (`use-plan-paging.dom.test.tsx` pins both halves of this).
92
+ *
93
+ * **This makes the key a load-bearing identity on a paged canvas.** The
94
+ * signature is the joined keys, so it assumes a key NAMES a series: same keys ⇒
95
+ * same rows. Two consequences worth knowing:
96
+ *
97
+ * - Two series sharing a key are safe HERE, because they share one entry in the
98
+ * hidden set and so toggle together — the active list is both-in or both-out,
99
+ * and the signature moves either way. They break the LIBRARY instead (one
100
+ * switch, two labels — `Pick.Panel` reports it).
101
+ * - A key that stays put while the series it names CHANGES is the real hazard:
102
+ * the id does not move, the cache is not dropped, and resident windows keep
103
+ * serving rows built by the previous pipeline. Keys must be stable AND
104
+ * identifying, which is what they were for.
105
+ *
106
+ * Row keys are a separate layer with its own rule: two series emitting the same
107
+ * ROW key resolve LAST_WINS inside `applySeries`, deterministically by series
108
+ * order, and identically in every window (#568).
109
+ *
110
+ * @param all - The series the canvas is built from
111
+ * @returns The series' keys, joined — stable for a given active set
112
+ */
113
+ export declare function seriesSignature(all: PlanSeriesInput): ExprType<StringType>;
114
+ export declare function createPlanPickItems(all: PlanSeriesInput, options?: PlanPickOptions): ExprType<ArrayType<PickItemType>>;
115
+ //# sourceMappingURL=pick.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pick.d.ts","sourceRoot":"","sources":["../../../../src/collections/plan/pick.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAEH,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,SAAS,EACT,QAAQ,EAKR,UAAU,EACV,UAAU,EAGb,MAAM,eAAe,CAAC;AAGvB,OAAO,EAA6B,KAAK,UAAU,EAAE,KAAK,YAAY,EAAoB,MAAM,yBAAyB,CAAC;AAC1H,OAAO,EAAE,cAAc,EAAoB,KAAK,eAAe,EAAwB,MAAM,aAAa,CAAC;AAmC3G,0CAA0C;AAC1C,MAAM,WAAW,eAAe;IAC5B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;IAC5D,kEAAkE;IAClE,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B;AAyDD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,cAAc,CAC1B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,eAAe,EACpB,OAAO,CAAC,EAAE,eAAe,GAC1B,UAAU,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAM/C;AAED;;;;;;;;;;;;GAYG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,eAAe,GAAG,QAAQ,CAAC,UAAU,CAAC,CAa1E;AAED,wBAAgB,mBAAmB,CAC/B,GAAG,EAAE,eAAe,EACpB,OAAO,CAAC,EAAE,eAAe,GAC1B,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAGnC"}
@@ -0,0 +1,193 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * `Plan.pick` — the Plan's façade over the shared pick contract (#590).
7
+ *
8
+ * The contract holds identified things and does not know what they are, so an
9
+ * adopter supplies the two things it cannot: how to read identity off one item,
10
+ * and what a useful count is. For a Plan that is a nine-arm match over the
11
+ * series variant, plus the row count that series would contribute.
12
+ *
13
+ * Nothing here is Plan-specific machinery — it is ~40 lines of accessors. The
14
+ * façade exists so an author writes `Plan.pick(key, all)` instead of restating
15
+ * the match at every call site, not because the Plan needs its own contract.
16
+ *
17
+ * @packageDocumentation
18
+ */
19
+ import { ArrayType, DictType, East, Expr, IntegerType, OptionType, StringType, StructType, some, none, } from "@elaraai/east";
20
+ import { IconType } from "../../display/icon/types.js";
21
+ import { createPickBind, pickItems } from "../../contracts/pick.js";
22
+ import { PlanSeriesType, applySeriesValue } from "./series.js";
23
+ /**
24
+ * The FA glyph each row kind declares.
25
+ *
26
+ * @remarks
27
+ * `PlanTemplateKindType` has documented this set since the template model, and
28
+ * nothing has ever rendered it — the library is the first surface that does.
29
+ * `group` and `rows` are not template kinds and so are not in that set; they
30
+ * take the marks that read as "a section" and "a hand-built list".
31
+ */
32
+ const KIND_ICONS = {
33
+ span: "bars-staggered",
34
+ // `border-all` was a 2x2 grid of squares — the same mark `table-cells-large`
35
+ // draws for heat, and at 12px the two were indistinguishable (#590 §6.3).
36
+ // Buckets quantise into COLUMNS with lanes inside them, so a columns mark
37
+ // says what the row is and separates cleanly from heat's grid.
38
+ buckets: "table-columns",
39
+ chart: "chart-line",
40
+ heat: "table-cells-large",
41
+ table: "table-list",
42
+ cards: "user-group",
43
+ events: "flag",
44
+ group: "layer-group",
45
+ rows: "list",
46
+ };
47
+ /** Identity read off ONE series — the whole of what the library needs. */
48
+ const PlanSeriesIdentityType = StructType({
49
+ key: StringType,
50
+ title: StringType,
51
+ subtitle: OptionType(StringType),
52
+ icon: OptionType(IconType),
53
+ });
54
+ /** The shared accessors — see {@link createPlanPick}. */
55
+ function planPickOptions(allExpr, options) {
56
+ const itemType = Expr.type(allExpr).value;
57
+ /** One arm's identity, with the KIND's glyph when the series declares none. */
58
+ const ident = (v, tag) => East.value({
59
+ key: v["key"],
60
+ title: v["title"],
61
+ subtitle: v["subtitle"],
62
+ icon: v["icon"].match({
63
+ some: (_$, ic) => East.value(some(ic), OptionType(IconType)),
64
+ none: (_$) => East.value(some({ name: KIND_ICONS[tag], prefix: "fas", label: none, style: none }), OptionType(IconType)),
65
+ }),
66
+ }, PlanSeriesIdentityType);
67
+ // ONE reified match, CALLED by each accessor — every arm carries the same
68
+ // four fields, so matching per accessor would build four copies of the same
69
+ // traversal (`shared/reify.ts`: reify once, then call). The arms are spelled
70
+ // out rather than generated, mirroring `applySeriesValue` — an arm added to
71
+ // the variant should fail this match, not fall through a computed map.
72
+ const identityOf = East.function([itemType], PlanSeriesIdentityType, (_$, s) => s.match({
73
+ span: (_$2, v) => ident(v, "span"),
74
+ buckets: (_$2, v) => ident(v, "buckets"),
75
+ chart: (_$2, v) => ident(v, "chart"),
76
+ heat: (_$2, v) => ident(v, "heat"),
77
+ table: (_$2, v) => ident(v, "table"),
78
+ cards: (_$2, v) => ident(v, "cards"),
79
+ events: (_$2, v) => ident(v, "events"),
80
+ group: (_$2, v) => ident(v, "group"),
81
+ rows: (_$2, v) => ident(v, "rows"),
82
+ }));
83
+ // The row count this series contributes — its own pipeline, run over the
84
+ // canvas data. Absent for a paged canvas, which cannot know a total.
85
+ const data = options?.data;
86
+ const countOf = data === undefined ? undefined : East.function([itemType], IntegerType, (_$, s) => applySeriesValue(s, East.value(data)).size());
87
+ return {
88
+ id: (s) => identityOf(s).key,
89
+ title: (s) => identityOf(s).title,
90
+ subtitle: (s) => identityOf(s).subtitle,
91
+ icon: (s) => identityOf(s).icon,
92
+ ...(countOf !== undefined ? { count: (s) => some(countOf(s)) } : {}),
93
+ ...(options?.hidden !== undefined ? { hidden: options.hidden } : {}),
94
+ };
95
+ }
96
+ /**
97
+ * Bind a Plan's row series to a persisted pick.
98
+ *
99
+ * @remarks
100
+ * A GROUP is the unit a person picks — "add Machines" — and hiding one takes
101
+ * its whole subtree with it, because the members are built by the group's own
102
+ * `derive`. That is why every arm carries identity (#590 §6.1): without it the
103
+ * library could only offer top-level series, which on a grouped canvas is
104
+ * almost nothing.
105
+ *
106
+ * Identity is read through ONE nine-arm match rather than one match per
107
+ * accessor — every arm carries the same four fields, so matching four times
108
+ * would build four copies of the same traversal.
109
+ *
110
+ * @param key - The store key; also the persistence key
111
+ * @param all - Every series that COULD show
112
+ * @param options - Data for counts, and the initial hidden set ({@link PlanPickOptions})
113
+ * @returns A pick handle over the series type
114
+ *
115
+ * @example
116
+ * ```tsx
117
+ * const shown = $.let(Plan.pick("ops.series", all, { data: ops }));
118
+ *
119
+ * <Pick.Panel value={shown} title="Series" />
120
+ * <Plan axis={axis} data={ops} series={Pick.active(shown)} />
121
+ * ```
122
+ */
123
+ export function createPlanPick(key, all, options) {
124
+ const allExpr = East.value(all);
125
+ // Typed at the SERIES shape, not the erased element type: that is what
126
+ // makes `Pick.active(shown)` assignable straight back to the `series` prop.
127
+ return createPickBind(key, allExpr, planPickOptions(allExpr, options));
128
+ }
129
+ /**
130
+ * The library entries for a Plan's series — described, with NO state binding.
131
+ *
132
+ * @remarks
133
+ * {@link createPlanPick} builds its `items` from the same accessors, so proving
134
+ * this proves the bound path too. Split out because `State.bind` is not
135
+ * runnable in a `describeEast` spec (`TestImpl` carries no State runtime), and
136
+ * identity / kind icons / counts are exactly the part worth asserting.
137
+ *
138
+ * @param all - Every series that COULD show
139
+ * @param options - Data for counts ({@link PlanPickOptions})
140
+ * @returns One descriptor per series, in declaration order
141
+ */
142
+ /**
143
+ * A stable signature of WHICH series a canvas is built from.
144
+ *
145
+ * @remarks
146
+ * Exists for the paged arm. `PagedSourceType` requires that "two sources with
147
+ * the same `id` must serve the same rows", and a derived source built from a
148
+ * SUBSET of the series serves different rows than one built from all of them —
149
+ * so its id has to say so.
150
+ *
151
+ * That requirement is not theoretical: the window cache invalidates on
152
+ * `source.id` alone (`use-plan-paging.ts`), and resident windows are immutable
153
+ * and served without re-calling `page`. Without a signature, toggling a series
154
+ * off leaves the previous rows on screen indefinitely
155
+ * (`use-plan-paging.dom.test.tsx` pins both halves of this).
156
+ *
157
+ * **This makes the key a load-bearing identity on a paged canvas.** The
158
+ * signature is the joined keys, so it assumes a key NAMES a series: same keys ⇒
159
+ * same rows. Two consequences worth knowing:
160
+ *
161
+ * - Two series sharing a key are safe HERE, because they share one entry in the
162
+ * hidden set and so toggle together — the active list is both-in or both-out,
163
+ * and the signature moves either way. They break the LIBRARY instead (one
164
+ * switch, two labels — `Pick.Panel` reports it).
165
+ * - A key that stays put while the series it names CHANGES is the real hazard:
166
+ * the id does not move, the cache is not dropped, and resident windows keep
167
+ * serving rows built by the previous pipeline. Keys must be stable AND
168
+ * identifying, which is what they were for.
169
+ *
170
+ * Row keys are a separate layer with its own rule: two series emitting the same
171
+ * ROW key resolve LAST_WINS inside `applySeries`, deterministically by series
172
+ * order, and identically in every window (#568).
173
+ *
174
+ * @param all - The series the canvas is built from
175
+ * @returns The series' keys, joined — stable for a given active set
176
+ */
177
+ export function seriesSignature(all) {
178
+ const allExpr = East.value(all);
179
+ const itemType = Expr.type(allExpr).value;
180
+ // An EMPTY series list has no element type (`Never`), so there is no
181
+ // variant to match on — and nothing to distinguish either. A canvas with no
182
+ // series is legal (`Plan.Root({ …, series: [] })`).
183
+ if (itemType.type !== "Variant")
184
+ return East.value("", StringType);
185
+ const keyOf = planPickOptions(allExpr).id;
186
+ const keyFn = East.function([itemType], StringType, (_$, s) => keyOf(s));
187
+ return allExpr.reduce((_$, acc, s) => East.str `${acc}/${keyFn(s)}`, East.value("", StringType));
188
+ }
189
+ export function createPlanPickItems(all, options) {
190
+ const allExpr = East.value(all);
191
+ return pickItems(allExpr, planPickOptions(allExpr, options));
192
+ }
193
+ //# sourceMappingURL=pick.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pick.js","sourceRoot":"","sources":["../../../../src/collections/plan/pick.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAIH,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,EACV,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAwD,MAAM,yBAAyB,CAAC;AAC1H,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAA8C,MAAM,aAAa,CAAC;AAE3G;;;;;;;;GAQG;AACH,MAAM,UAAU,GAA2B;IACvC,IAAI,EAAK,gBAAgB;IACzB,6EAA6E;IAC7E,0EAA0E;IAC1E,0EAA0E;IAC1E,+DAA+D;IAC/D,OAAO,EAAE,eAAe;IACxB,KAAK,EAAI,YAAY;IACrB,IAAI,EAAK,mBAAmB;IAC5B,KAAK,EAAI,YAAY;IACrB,KAAK,EAAI,YAAY;IACrB,MAAM,EAAG,MAAM;IACf,KAAK,EAAI,aAAa;IACtB,IAAI,EAAK,MAAM;CAClB,CAAC;AAEF,0EAA0E;AAC1E,MAAM,sBAAsB,GAAG,UAAU,CAAC;IACtC,GAAG,EAAO,UAAU;IACpB,KAAK,EAAK,UAAU;IACpB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAChC,IAAI,EAAM,UAAU,CAAC,QAAQ,CAAC;CACjC,CAAC,CAAC;AAkBH,yDAAyD;AACzD,SAAS,eAAe,CACpB,OAAsC,EACtC,OAAyB;IAEzB,MAAM,QAAQ,GAAc,IAAI,CAAC,IAAI,CAAC,OAAO,CAAyB,CAAC,KA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F,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,OAAO,OAAO,CAAC,MAAM,CACjB,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAA,GAAG,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,EAC5C,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,UAAU,CAAC,CACL,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,mBAAmB,CAC/B,GAAoB,EACpB,OAAyB;IAEzB,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAA8C,CAAkC,CAAC;IAC5G,OAAO,SAAS,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACjE,CAAC"}
@@ -0,0 +1,210 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * The Plan root — `Plan.Root`, which assembles the whole canvas value against
7
+ * the `component.ts` arm.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+ import { type ExprType, type SubtypeExprOrValue, ArrayType, BooleanType, DictType, FunctionType, NullType, OptionType, StringType, StructType } from "@elaraai/east";
12
+ import { UIComponentType } from "../../component.js";
13
+ import { StatusValueType, type StatusValueLiteral } from "../../feedback/status/types.js";
14
+ import { DensityType, type DensityLiteral } from "../../style/interaction.js";
15
+ import { type ReviewConfig } from "../../contracts/review.js";
16
+ import { DragEventType } from "../../contracts/drag.js";
17
+ import { SliceBindType } from "../../platform/slice/index.js";
18
+ import { type SliceAffordanceLiteral } from "../../contracts/slice-affordances.js";
19
+ import { PlanGrainType, type PlanGrainLiteral, PlanLinkType, PlanRowRefType, PlanRunClickEventType, PlanEventClickEventType, PlanMarkClickEventType, PlanChipClickEventType, PlanCellClickEventType, PlanGroupToggleEventType, PlanElementRefType, type PlanAxisKindLiteral, type PlanAxisInput } from "./types.js";
20
+ import { PlanSeriesType, type PlanSeriesInput } from "./series.js";
21
+ import { type PickHandle } from "../../contracts/pick.js";
22
+ import { type PagedSourceLike } from "../../contracts/source.js";
23
+ /**
24
+ * The Plan review config — the shared {@link ReviewConfig} at the keyed-row
25
+ * subject (`{ key }`).
26
+ */
27
+ export type PlanReviewConfig = ReviewConfig<PlanRowRefType>;
28
+ /**
29
+ * Configuration for {@link Plan.Root} (the `<Plan>` tag's props).
30
+ *
31
+ * @remarks
32
+ * `K` is the canvas's axis kind, inferred from `axis` ALONE (`series` is a
33
+ * `NoInfer` site): a `Plan.axis.number(...)` fixes `K = "number"`, and every
34
+ * series in the array must then carry a kind within it — a `"time"` series
35
+ * is a compile error at the tag. An erased axis (a `$.let`-bound expression,
36
+ * a variant value) leaves `K` at every kind, so the render-time diagnostic
37
+ * decides; an erased series (`$.const`-bound list, East expression) is
38
+ * accepted on any axis for the same reason.
39
+ *
40
+ * @typeParam K - The canvas's axis kind — inferred from `axis`
41
+ * @property axis - The shared axis declaration (`Plan.axis` / `.time` / `.number` / `.ordinal`)
42
+ * @property rows - The canvas rows — kind-factory results (flattened subtrees); exclusive with `data`/`series`
43
+ * @property data - The raw data source (a `Dict<String, R>` value/expression, or a paged source of one); pairs with `series`
44
+ * @property series - The row series over `data` — `Plan.series.*` values (declared order resolves key collisions; rows sit in KEY order); exclusive with `pick`
45
+ * @property pick - A bound series library (`Plan.pick`) — the canvas shows the picked series and mounts the library panel; exclusive with `series`
46
+ * @property grain - Initial grain (`"group"` / `"resource"`; default resource)
47
+ * @property popover - Generalized click-popover resolver over the element ref (`none` result ⇒ no surface)
48
+ * @property hover - Generalized hovercard resolver over the element ref (`none` result ⇒ no surface)
49
+ * @property expandRender - The R2 developer render for rows declaring `expand` (called with the row ref)
50
+ * @property expandGutter - The R2 gutter render — fills the expanded row's grown gutter cell (called with the row ref)
51
+ * @property review - The shared review chrome (decision column + batch foot)
52
+ * @property slice - Bound slice chrome (toolbar affordances)
53
+ * @property footer - Status-footer items
54
+ * @property id - DnD target identity
55
+ * @property sources - Library ids accepted for `add` drags
56
+ * @property onDrag - The shared drag funnel (every drag kind)
57
+ * @property canDrop - IR-level drop veto (the ⊘ stage)
58
+ * @property onSelect - Row click (selection)
59
+ * @property onRunClick - Span bar click
60
+ * @property onEventClick - Bucket tile click
61
+ * @property onMarkClick - Event mark / decision diamond click
62
+ * @property onChipClick - Cards chip click
63
+ * @property onCellClick - Heat / table / weight / segment cell click
64
+ * @property onGroupToggle - Group strip ↔ rows toggle
65
+ * @property onGrainChange - Grain segment change
66
+ * @property style - Sizing, density and gutter width
67
+ */
68
+ export interface PlanConfig<K extends PlanAxisKindLiteral = PlanAxisKindLiteral> {
69
+ /** The shared axis declaration (`Plan.axis` / `.time` / `.number` / `.ordinal`) — fixes the canvas kind `K`. */
70
+ axis: PlanAxisInput<K>;
71
+ /** The raw data source — a KEYED collection: a `Dict<String, R>` value or
72
+ * expression (a `$.let`-bound map, `Data.bind(...).read()`) for the INLINE
73
+ * arm, or a `$.let`-bound paged handle over one (`Data.bindPaged(ops)`)
74
+ * for the PAGED arm; the East type is the discriminant.
75
+ *
76
+ * The keys are load-bearing: a leaf row's key IS its data key, so the
77
+ * canvas is ordered and addressed by the same keys the source is
78
+ * (`datasetGetPage` windows and `datasetFindKey` searches that key order).
79
+ * A positional collection is refused — key it at the call site with
80
+ * `rows.toDict((_$, r) => r.id)`, which makes the choice explicit.
81
+ *
82
+ * A PAGED canvas must also declare `axis.window` (or bind a slice range):
83
+ * fitting the axis to whatever prefix has landed would re-fit it on every
84
+ * window (#567 D8). */
85
+ data: SubtypeExprOrValue<DictType<StringType, StructType>> | PagedSourceLike;
86
+ /** The row series over `data` — `Plan.series.*` values, applied in DECLARED
87
+ * order (a TS array or an East expression of
88
+ * `ArrayType(Plan.Types.Series(R))`).
89
+ *
90
+ * Declared order resolves KEY COLLISIONS only (last wins). It does NOT
91
+ * set row order on screen: the canvas is one keyed collection
92
+ * (`PlanRowsCollectionType` is a `Dict`, decoded as a `SortedMap`), so
93
+ * rows sit in canonical KEY order however the series are listed. Order
94
+ * rows by keying them for it — a `prefix` per series, or ordered data
95
+ * keys (`"10-line1"`, `"20-line2"`).
96
+ *
97
+ * Literal one-off chrome rides a `Plan.series.rows` entry.
98
+ *
99
+ * Every series' axis kind must lie within the axis's (`K`): a `"time"`
100
+ * series on a `"number"` axis fails to compile here. */
101
+ series?: PlanSeriesInput<NoInfer<K>>;
102
+ /**
103
+ * A bound series library from `Plan.pick` — the pickable form of `series`.
104
+ *
105
+ * @remarks
106
+ * Exclusive with `series`, because the handle already CARRIES the series
107
+ * list; passing both would say it twice and leave the two free to disagree.
108
+ * Give one or the other: `series` for a fixed canvas, `pick` for a canvas
109
+ * whose rows the user chooses.
110
+ *
111
+ * The Plan does the rest — it feeds itself the picked series and mounts the
112
+ * library panel as chrome, the way `slice` mounts the rail. Nothing is left
113
+ * for the author to wire, because a Plan already holds both things a pick
114
+ * needs: `series` IS the item list and `data` IS what the counts derive from.
115
+ *
116
+ * A pick is STATE, so a Plan carrying one must sit inside a `Reactive` —
117
+ * `Plan.pick` binds through `State.bind`, and a bind outside a reactive
118
+ * evaluation promotes the enclosing function to async.
119
+ */
120
+ pick?: PickHandle<ReturnType<typeof PlanSeriesType>>;
121
+ /** The link graph (R1) — run-edge quantity links (`Plan.link` values, map-derivable
122
+ * from data); the links-focus control gathers a row's transitive family over it. */
123
+ links?: SubtypeExprOrValue<ArrayType<PlanLinkType>>;
124
+ /** Initial grain (default `"resource"`). */
125
+ grain?: PlanGrainLiteral | SubtypeExprOrValue<PlanGrainType>;
126
+ /** Generalized click-popover resolver — called with the clicked element's
127
+ * ref (`run` / `event` / `chip` / `mark` / `cell` arm, each carrying the
128
+ * row key); returning `none` opens no surface. */
129
+ popover?: SubtypeExprOrValue<FunctionType<[PlanElementRefType], OptionType<UIComponentType>>>;
130
+ /** Generalized hovercard resolver — the hover twin of `popover`. */
131
+ hover?: SubtypeExprOrValue<FunctionType<[PlanElementRefType], OptionType<UIComponentType>>>;
132
+ /** The R2 developer render — called with the row ref when a row declaring
133
+ * `expand` focuses; builds the mounted body from captured data /
134
+ * bind-handles. */
135
+ expandRender?: SubtypeExprOrValue<FunctionType<[PlanRowRefType], UIComponentType>>;
136
+ /** The R2 GUTTER render — an expanded row's gutter cell grows with the row
137
+ * (one tall cell, top-aligned under the row's name), and this fills the
138
+ * space that opens up: the identity, measures or controls that only earn
139
+ * their place once the row has the canvas. Called with the same row ref
140
+ * as `expandRender`. */
141
+ expandGutter?: SubtypeExprOrValue<FunctionType<[PlanRowRefType], UIComponentType>>;
142
+ /** The shared review chrome (decision column + batch foot); callbacks receive `{ key }`. */
143
+ review?: PlanReviewConfig;
144
+ /** Bound slice chrome — the handle + toolbar affordances (default `["cohort","filter","search","range","resolution","brush","summary"]`). */
145
+ slice?: {
146
+ /** The bound handle from `Slice.bind`. */
147
+ slice: SubtypeExprOrValue<SliceBindType>;
148
+ /** The toolbar affordances, in order. */
149
+ affordances?: SliceAffordanceLiteral[];
150
+ };
151
+ /** Status-footer items (`end: true` right-aligns). */
152
+ footer?: {
153
+ /** The footer text. */
154
+ text: SubtypeExprOrValue<StringType>;
155
+ /** Optional status tint. */
156
+ tone?: StatusValueLiteral | SubtypeExprOrValue<StatusValueType>;
157
+ /** Right-align the item. */
158
+ end?: boolean;
159
+ }[];
160
+ /** DnD target identity — names the Plan in drag-grammar cell refs. */
161
+ id?: string;
162
+ /** Library ids accepted for `add` drags (omit = no adds). */
163
+ sources?: string[];
164
+ /** The shared drag funnel — runs, chips, tiles, templates and reorders all report through it. */
165
+ onDrag?: SubtypeExprOrValue<FunctionType<[DragEventType], NullType>>;
166
+ /** IR-level drop veto — `false` ⇒ the ⊘ invalid stage; a throwing predicate fails open. */
167
+ canDrop?: SubtypeExprOrValue<FunctionType<[DragEventType], BooleanType>>;
168
+ /** Row click (selection). */
169
+ onSelect?: SubtypeExprOrValue<FunctionType<[PlanRowRefType], NullType>>;
170
+ /** Span bar click (`{ row, run }`). */
171
+ onRunClick?: SubtypeExprOrValue<FunctionType<[PlanRunClickEventType], NullType>>;
172
+ /** Bucket tile click (`{ row, event }`). */
173
+ onEventClick?: SubtypeExprOrValue<FunctionType<[PlanEventClickEventType], NullType>>;
174
+ /** Event mark / span decision-diamond click (`{ row, mark }`). */
175
+ onMarkClick?: SubtypeExprOrValue<FunctionType<[PlanMarkClickEventType], NullType>>;
176
+ /** Cards chip click (`{ row, chip }`). */
177
+ onChipClick?: SubtypeExprOrValue<FunctionType<[PlanChipClickEventType], NullType>>;
178
+ /** Bucket-cell click (`{ row, at }` — the bucket instant, not an index). */
179
+ onCellClick?: SubtypeExprOrValue<FunctionType<[PlanCellClickEventType], NullType>>;
180
+ /** Group strip ↔ rows toggle (fires after the in-place swap). */
181
+ onGroupToggle?: SubtypeExprOrValue<FunctionType<[PlanGroupToggleEventType], NullType>>;
182
+ /** Grain segment change (grain is Plan-local state; initial via `grain`). */
183
+ onGrainChange?: SubtypeExprOrValue<FunctionType<[PlanGrainType], NullType>>;
184
+ /** Sizing (#320), density, gutter width. */
185
+ style?: {
186
+ /** Definite height (`"fill"` fills the parent). */
187
+ height?: SubtypeExprOrValue<StringType>;
188
+ /** Max-height cap. */
189
+ maxHeight?: SubtypeExprOrValue<StringType>;
190
+ /** Row rhythm. */
191
+ density?: DensityLiteral | SubtypeExprOrValue<DensityType>;
192
+ /** Gutter width — a CSS px size (`"168px"`; default 168). */
193
+ gutterWidth?: SubtypeExprOrValue<StringType>;
194
+ };
195
+ }
196
+ /**
197
+ * Creates the Plan root — the whole canvas.
198
+ *
199
+ * @typeParam K - The canvas's axis kind, inferred from `config.axis`; every series must lie within it
200
+ * @param config - The Plan configuration ({@link PlanConfig})
201
+ * @returns An East expression of `UIComponentType`
202
+ *
203
+ * @remarks
204
+ * Window and resolution have no callbacks by design: they are slice writes
205
+ * (`setRange` / `setResolution`) — hosts observe the slice. Dragging a
206
+ * proposal is a Modify on its decision, not a free edit — host semantics
207
+ * behind `onDrag`; the surface only reports.
208
+ */
209
+ export declare function createPlanRoot<K extends PlanAxisKindLiteral = PlanAxisKindLiteral>(config: PlanConfig<K>): ExprType<UIComponentType>;
210
+ //# sourceMappingURL=root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../../src/collections/plan/root.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAEvB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EAIb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,KAAK,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAmB,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAuB,KAAK,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACxG,OAAO,EAEH,aAAa,EACb,KAAK,gBAAgB,EACrB,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EAGxB,kBAAkB,EAGlB,KAAK,mB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