@elaraai/east-ui 1.0.85 → 1.0.87

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 (561) hide show
  1. package/dist/src/buttons/button/index.d.ts +4 -0
  2. package/dist/src/buttons/button/index.d.ts.map +1 -1
  3. package/dist/src/buttons/button/index.js +8 -1
  4. package/dist/src/buttons/button/index.js.map +1 -1
  5. package/dist/src/buttons/button/types.d.ts +6 -5
  6. package/dist/src/buttons/button/types.d.ts.map +1 -1
  7. package/dist/src/buttons/button/types.js.map +1 -1
  8. package/dist/src/buttons/icon-button/index.d.ts +5 -5
  9. package/dist/src/buttons/icon-button/index.d.ts.map +1 -1
  10. package/dist/src/buttons/icon-button/index.js +8 -2
  11. package/dist/src/buttons/icon-button/index.js.map +1 -1
  12. package/dist/src/buttons/icon-button/types.d.ts +8 -12
  13. package/dist/src/buttons/icon-button/types.d.ts.map +1 -1
  14. package/dist/src/buttons/icon-button/types.js +2 -2
  15. package/dist/src/buttons/icon-button/types.js.map +1 -1
  16. package/dist/src/buttons/toggle/index.d.ts +4 -0
  17. package/dist/src/buttons/toggle/index.d.ts.map +1 -1
  18. package/dist/src/buttons/toggle/index.js +6 -1
  19. package/dist/src/buttons/toggle/index.js.map +1 -1
  20. package/dist/src/buttons/toggle/types.d.ts +3 -2
  21. package/dist/src/buttons/toggle/types.d.ts.map +1 -1
  22. package/dist/src/buttons/toggle/types.js.map +1 -1
  23. package/dist/src/charts/chart/index.d.ts.map +1 -1
  24. package/dist/src/charts/chart/index.js +3 -3
  25. package/dist/src/charts/chart/index.js.map +1 -1
  26. package/dist/src/charts/spec/index.d.ts.map +1 -1
  27. package/dist/src/charts/spec/index.js +5 -2
  28. package/dist/src/charts/spec/index.js.map +1 -1
  29. package/dist/src/collections/deck/index.d.ts.map +1 -1
  30. package/dist/src/collections/deck/index.js +2 -2
  31. package/dist/src/collections/deck/index.js.map +1 -1
  32. package/dist/src/collections/index.d.ts +0 -6
  33. package/dist/src/collections/index.d.ts.map +1 -1
  34. package/dist/src/collections/index.js +0 -6
  35. package/dist/src/collections/index.js.map +1 -1
  36. package/dist/src/collections/library/index.d.ts +1 -1
  37. package/dist/src/collections/library/index.d.ts.map +1 -1
  38. package/dist/src/collections/library/index.js +2 -2
  39. package/dist/src/collections/library/index.js.map +1 -1
  40. package/dist/src/collections/schematic/index.d.ts.map +1 -1
  41. package/dist/src/collections/schematic/index.js +2 -2
  42. package/dist/src/collections/schematic/index.js.map +1 -1
  43. package/dist/src/collections/table/index.d.ts +1 -1
  44. package/dist/src/collections/table/index.d.ts.map +1 -1
  45. package/dist/src/collections/table/index.js +2 -2
  46. package/dist/src/collections/table/index.js.map +1 -1
  47. package/dist/src/collections/tree-view/index.d.ts +11 -32
  48. package/dist/src/collections/tree-view/index.d.ts.map +1 -1
  49. package/dist/src/collections/tree-view/index.js +15 -10
  50. package/dist/src/collections/tree-view/index.js.map +1 -1
  51. package/dist/src/component.d.ts +673 -9344
  52. package/dist/src/component.d.ts.map +1 -1
  53. package/dist/src/component.js +5 -259
  54. package/dist/src/component.js.map +1 -1
  55. package/dist/src/contracts/approval.d.ts +6 -8
  56. package/dist/src/contracts/approval.d.ts.map +1 -1
  57. package/dist/src/contracts/approval.js +6 -8
  58. package/dist/src/contracts/approval.js.map +1 -1
  59. package/dist/src/contracts/drag.d.ts +1 -1
  60. package/dist/src/contracts/drag.d.ts.map +1 -1
  61. package/dist/src/contracts/drag.js +4 -5
  62. package/dist/src/contracts/drag.js.map +1 -1
  63. package/dist/src/contracts/editing.d.ts +19 -19
  64. package/dist/src/contracts/editing.js +14 -14
  65. package/dist/src/contracts/fields.d.ts +471 -0
  66. package/dist/src/contracts/fields.d.ts.map +1 -0
  67. package/dist/src/contracts/fields.js +492 -0
  68. package/dist/src/contracts/fields.js.map +1 -0
  69. package/dist/src/contracts/index.d.ts +1 -0
  70. package/dist/src/contracts/index.d.ts.map +1 -1
  71. package/dist/src/contracts/index.js +1 -0
  72. package/dist/src/contracts/index.js.map +1 -1
  73. package/dist/src/contracts/indexed-source.d.ts +118 -0
  74. package/dist/src/contracts/indexed-source.d.ts.map +1 -0
  75. package/dist/src/contracts/indexed-source.js +89 -0
  76. package/dist/src/contracts/indexed-source.js.map +1 -0
  77. package/dist/src/contracts/pick.d.ts +0 -16
  78. package/dist/src/contracts/pick.d.ts.map +1 -1
  79. package/dist/src/contracts/review.d.ts +4 -6
  80. package/dist/src/contracts/review.d.ts.map +1 -1
  81. package/dist/src/contracts/review.js +4 -6
  82. package/dist/src/contracts/review.js.map +1 -1
  83. package/dist/src/contracts/source.d.ts +2 -2
  84. package/dist/src/contracts/source.d.ts.map +1 -1
  85. package/dist/src/contracts/source.js.map +1 -1
  86. package/dist/src/contracts/states.d.ts +1 -3
  87. package/dist/src/contracts/states.d.ts.map +1 -1
  88. package/dist/src/contracts/states.js +1 -3
  89. package/dist/src/contracts/states.js.map +1 -1
  90. package/dist/src/display/editable-chip/index.d.ts +2 -0
  91. package/dist/src/display/editable-chip/index.d.ts.map +1 -1
  92. package/dist/src/display/editable-chip/index.js +4 -1
  93. package/dist/src/display/editable-chip/index.js.map +1 -1
  94. package/dist/src/display/icon/index.d.ts +14 -31
  95. package/dist/src/display/icon/index.d.ts.map +1 -1
  96. package/dist/src/display/icon/index.js +15 -19
  97. package/dist/src/display/icon/index.js.map +1 -1
  98. package/dist/src/display/icon/solid.d.ts +24 -0
  99. package/dist/src/display/icon/solid.d.ts.map +1 -0
  100. package/dist/src/display/icon/solid.js +39 -0
  101. package/dist/src/display/icon/solid.js.map +1 -0
  102. package/dist/src/display/icon/types.d.ts +14 -38
  103. package/dist/src/display/icon/types.d.ts.map +1 -1
  104. package/dist/src/display/icon/types.js +6 -15
  105. package/dist/src/display/icon/types.js.map +1 -1
  106. package/dist/src/display/metric-chip/index.d.ts +2 -0
  107. package/dist/src/display/metric-chip/index.d.ts.map +1 -1
  108. package/dist/src/display/metric-chip/index.js +4 -1
  109. package/dist/src/display/metric-chip/index.js.map +1 -1
  110. package/dist/src/display/stat/index.d.ts +2 -0
  111. package/dist/src/display/stat/index.d.ts.map +1 -1
  112. package/dist/src/display/stat/index.js +4 -1
  113. package/dist/src/display/stat/index.js.map +1 -1
  114. package/dist/src/display/stat/types.d.ts +3 -5
  115. package/dist/src/display/stat/types.d.ts.map +1 -1
  116. package/dist/src/display/stat/types.js +5 -2
  117. package/dist/src/display/stat/types.js.map +1 -1
  118. package/dist/src/feedback/banner/index.d.ts +5 -3
  119. package/dist/src/feedback/banner/index.d.ts.map +1 -1
  120. package/dist/src/feedback/banner/index.js +4 -1
  121. package/dist/src/feedback/banner/index.js.map +1 -1
  122. package/dist/src/feedback/empty-state/index.d.ts +16 -19
  123. package/dist/src/feedback/empty-state/index.d.ts.map +1 -1
  124. package/dist/src/feedback/empty-state/index.js +17 -10
  125. package/dist/src/feedback/empty-state/index.js.map +1 -1
  126. package/dist/src/feedback/status/index.d.ts +5 -3
  127. package/dist/src/feedback/status/index.d.ts.map +1 -1
  128. package/dist/src/feedback/status/index.js +4 -1
  129. package/dist/src/feedback/status/index.js.map +1 -1
  130. package/dist/src/index.d.ts +5 -6
  131. package/dist/src/index.d.ts.map +1 -1
  132. package/dist/src/index.js +12 -11
  133. package/dist/src/index.js.map +1 -1
  134. package/dist/src/internal.d.ts +23 -16
  135. package/dist/src/internal.d.ts.map +1 -1
  136. package/dist/src/internal.js +29 -13
  137. package/dist/src/internal.js.map +1 -1
  138. package/dist/src/navigation/index.d.ts +0 -2
  139. package/dist/src/navigation/index.d.ts.map +1 -1
  140. package/dist/src/navigation/index.js +0 -2
  141. package/dist/src/navigation/index.js.map +1 -1
  142. package/dist/src/navigation/nav-list/index.d.ts +2 -0
  143. package/dist/src/navigation/nav-list/index.d.ts.map +1 -1
  144. package/dist/src/navigation/nav-list/index.js +4 -1
  145. package/dist/src/navigation/nav-list/index.js.map +1 -1
  146. package/dist/src/navigation/nav-list/types.d.ts +3 -14
  147. package/dist/src/navigation/nav-list/types.d.ts.map +1 -1
  148. package/dist/src/navigation/nav-list/types.js.map +1 -1
  149. package/dist/src/overlays/command-palette/index.d.ts +2 -0
  150. package/dist/src/overlays/command-palette/index.d.ts.map +1 -1
  151. package/dist/src/overlays/command-palette/index.js +5 -0
  152. package/dist/src/overlays/command-palette/index.js.map +1 -1
  153. package/dist/src/overlays/command-palette/types.d.ts +0 -8
  154. package/dist/src/overlays/command-palette/types.d.ts.map +1 -1
  155. package/dist/src/pick/index.d.ts +1 -17
  156. package/dist/src/pick/index.d.ts.map +1 -1
  157. package/dist/src/pick/index.js +1 -1
  158. package/dist/src/platform/slice/index.d.ts +1324 -2039
  159. package/dist/src/platform/slice/index.d.ts.map +1 -1
  160. package/dist/src/platform/slice/index.js +55 -74
  161. package/dist/src/platform/slice/index.js.map +1 -1
  162. package/dist/src/platform/slice/local.d.ts +743 -0
  163. package/dist/src/platform/slice/local.d.ts.map +1 -0
  164. package/dist/src/platform/slice/local.js +133 -0
  165. package/dist/src/platform/slice/local.js.map +1 -0
  166. package/dist/src/platform/slice/record-chrome.d.ts +211 -0
  167. package/dist/src/platform/slice/record-chrome.d.ts.map +1 -0
  168. package/dist/src/platform/slice/record-chrome.js +52 -0
  169. package/dist/src/platform/slice/record-chrome.js.map +1 -0
  170. package/dist/src/platform/slice/record-interval.d.ts +24 -0
  171. package/dist/src/platform/slice/record-interval.d.ts.map +1 -0
  172. package/dist/src/platform/slice/record-interval.js +61 -0
  173. package/dist/src/platform/slice/record-interval.js.map +1 -0
  174. package/dist/src/platform/slice/record-plan.d.ts +54 -0
  175. package/dist/src/platform/slice/record-plan.d.ts.map +1 -0
  176. package/dist/src/platform/slice/record-plan.js +139 -0
  177. package/dist/src/platform/slice/record-plan.js.map +1 -0
  178. package/dist/src/platform/slice/record-types.d.ts +2739 -0
  179. package/dist/src/platform/slice/record-types.d.ts.map +1 -0
  180. package/dist/src/platform/slice/record-types.js +209 -0
  181. package/dist/src/platform/slice/record-types.js.map +1 -0
  182. package/dist/src/platform/slice/record.d.ts +109 -0
  183. package/dist/src/platform/slice/record.d.ts.map +1 -0
  184. package/dist/src/platform/slice/record.js +210 -0
  185. package/dist/src/platform/slice/record.js.map +1 -0
  186. package/dist/src/reactive/match.d.ts +4 -6
  187. package/dist/src/reactive/match.d.ts.map +1 -1
  188. package/dist/src/reactive/match.js +4 -6
  189. package/dist/src/reactive/match.js.map +1 -1
  190. package/dist/src/runtime/collections/deck.d.ts.map +1 -1
  191. package/dist/src/runtime/collections/index.d.ts +0 -6
  192. package/dist/src/runtime/collections/index.d.ts.map +1 -1
  193. package/dist/src/runtime/collections/index.js +0 -6
  194. package/dist/src/runtime/collections/index.js.map +1 -1
  195. package/dist/src/runtime/display/icon.d.ts +6 -5
  196. package/dist/src/runtime/display/icon.d.ts.map +1 -1
  197. package/dist/src/runtime/display/icon.js +6 -5
  198. package/dist/src/runtime/display/icon.js.map +1 -1
  199. package/dist/src/runtime/feedback/empty-state.d.ts +5 -5
  200. package/dist/src/runtime/feedback/empty-state.js +5 -5
  201. package/dist/src/runtime/layout/dock.d.ts +2 -1
  202. package/dist/src/runtime/layout/dock.d.ts.map +1 -1
  203. package/dist/src/runtime/layout/dock.js +2 -1
  204. package/dist/src/runtime/layout/dock.js.map +1 -1
  205. package/dist/src/runtime/navigation/index.d.ts +0 -3
  206. package/dist/src/runtime/navigation/index.d.ts.map +1 -1
  207. package/dist/src/runtime/navigation/index.js +0 -3
  208. package/dist/src/runtime/navigation/index.js.map +1 -1
  209. package/dist/src/runtime/reactive/match.d.ts +2 -3
  210. package/dist/src/runtime/reactive/match.d.ts.map +1 -1
  211. package/dist/src/runtime/reactive/match.js +2 -3
  212. package/dist/src/runtime/reactive/match.js.map +1 -1
  213. package/dist/src/runtime/record-slice-source.d.ts +78 -0
  214. package/dist/src/runtime/record-slice-source.d.ts.map +1 -0
  215. package/dist/src/runtime/record-slice-source.js +201 -0
  216. package/dist/src/runtime/record-slice-source.js.map +1 -0
  217. package/dist/src/runtime/record-slice.d.ts +110 -0
  218. package/dist/src/runtime/record-slice.d.ts.map +1 -0
  219. package/dist/src/runtime/record-slice.js +374 -0
  220. package/dist/src/runtime/record-slice.js.map +1 -0
  221. package/dist/src/runtime/slice.d.ts +11 -13
  222. package/dist/src/runtime/slice.d.ts.map +1 -1
  223. package/dist/src/runtime/slice.js +41 -93
  224. package/dist/src/runtime/slice.js.map +1 -1
  225. package/dist/src/shared/plot-gutter.d.ts +1 -1
  226. package/dist/src/shared/plot-gutter.js +1 -1
  227. package/dist/src/shared/resolve-tag.d.ts +23 -0
  228. package/dist/src/shared/resolve-tag.d.ts.map +1 -0
  229. package/dist/src/shared/resolve-tag.js +26 -0
  230. package/dist/src/shared/resolve-tag.js.map +1 -0
  231. package/dist/src/shared/tree.d.ts +1 -1
  232. package/dist/src/shared/tree.js +1 -1
  233. package/dist/src/slice/breakdown/index.d.ts +1 -1
  234. package/dist/src/slice/breakdown/index.d.ts.map +1 -1
  235. package/dist/src/slice/breakdown/index.js +3 -3
  236. package/dist/src/slice/breakdown/index.js.map +1 -1
  237. package/dist/src/slice/cohort/index.d.ts +4 -5
  238. package/dist/src/slice/cohort/index.d.ts.map +1 -1
  239. package/dist/src/slice/cohort/index.js +6 -7
  240. package/dist/src/slice/cohort/index.js.map +1 -1
  241. package/dist/src/slice/filter/index.d.ts +1 -1
  242. package/dist/src/slice/filter/index.d.ts.map +1 -1
  243. package/dist/src/slice/filter/index.js +3 -3
  244. package/dist/src/slice/filter/index.js.map +1 -1
  245. package/dist/src/slice/index.d.ts +20 -2230
  246. package/dist/src/slice/index.d.ts.map +1 -1
  247. package/dist/src/slice/legend/index.d.ts +2 -2
  248. package/dist/src/slice/legend/index.d.ts.map +1 -1
  249. package/dist/src/slice/legend/index.js +4 -4
  250. package/dist/src/slice/legend/index.js.map +1 -1
  251. package/dist/src/slice/rail/index.d.ts +7 -4
  252. package/dist/src/slice/rail/index.d.ts.map +1 -1
  253. package/dist/src/slice/rail/index.js +10 -5
  254. package/dist/src/slice/rail/index.js.map +1 -1
  255. package/dist/src/slice/range/index.d.ts +1 -1
  256. package/dist/src/slice/range/index.d.ts.map +1 -1
  257. package/dist/src/slice/range/index.js +3 -3
  258. package/dist/src/slice/range/index.js.map +1 -1
  259. package/dist/src/slice/record/index.d.ts +171 -0
  260. package/dist/src/slice/record/index.d.ts.map +1 -0
  261. package/dist/src/slice/record/index.js +10 -0
  262. package/dist/src/slice/record/index.js.map +1 -0
  263. package/dist/src/slice/search/index.d.ts +6 -6
  264. package/dist/src/slice/search/index.d.ts.map +1 -1
  265. package/dist/src/slice/search/index.js +7 -7
  266. package/dist/src/slice/search/index.js.map +1 -1
  267. package/dist/src/slice/summary/index.d.ts +1 -1
  268. package/dist/src/slice/summary/index.d.ts.map +1 -1
  269. package/dist/src/slice/summary/index.js +3 -3
  270. package/dist/src/slice/summary/index.js.map +1 -1
  271. package/dist/src/typography/list/index.d.ts +2 -8
  272. package/dist/src/typography/list/index.d.ts.map +1 -1
  273. package/dist/src/typography/list/index.js +4 -1
  274. package/dist/src/typography/list/index.js.map +1 -1
  275. package/dist/src/typography/list/types.d.ts +0 -8
  276. package/dist/src/typography/list/types.d.ts.map +1 -1
  277. package/dist/test/collections/deck.examples.d.ts.map +1 -1
  278. package/dist/test/collections/deck.examples.js +6 -7
  279. package/dist/test/collections/deck.examples.js.map +1 -1
  280. package/dist/test/collections/index.d.ts +0 -1
  281. package/dist/test/collections/index.d.ts.map +1 -1
  282. package/dist/test/collections/index.js +0 -1
  283. package/dist/test/collections/index.js.map +1 -1
  284. package/dist/test/collections/library.examples.d.ts.map +1 -1
  285. package/dist/test/collections/library.examples.js +6 -7
  286. package/dist/test/collections/library.examples.js.map +1 -1
  287. package/dist/test/collections/schematic.examples.d.ts.map +1 -1
  288. package/dist/test/collections/schematic.examples.js +11 -19
  289. package/dist/test/collections/schematic.examples.js.map +1 -1
  290. package/dist/test/collections/tree-view.examples.js +2 -2
  291. package/dist/test/contracts/editing.examples.d.ts +1 -0
  292. package/dist/test/contracts/editing.examples.d.ts.map +1 -1
  293. package/dist/test/contracts/editing.examples.js +37 -6
  294. package/dist/test/contracts/editing.examples.js.map +1 -1
  295. package/dist/test/contracts/fields.examples.d.ts +7 -0
  296. package/dist/test/contracts/fields.examples.d.ts.map +1 -0
  297. package/dist/test/contracts/fields.examples.js +42 -0
  298. package/dist/test/contracts/fields.examples.js.map +1 -0
  299. package/dist/test/display/avatar.examples.d.ts.map +1 -1
  300. package/dist/test/display/avatar.examples.js +3 -3
  301. package/dist/test/display/avatar.examples.js.map +1 -1
  302. package/dist/test/display/icon.examples.d.ts.map +1 -1
  303. package/dist/test/display/icon.examples.js +12 -11
  304. package/dist/test/display/icon.examples.js.map +1 -1
  305. package/dist/test/feedback/empty-state.examples.js +9 -9
  306. package/dist/test/feedback/empty-state.examples.js.map +1 -1
  307. package/dist/test/layout/dock.examples.d.ts +0 -8
  308. package/dist/test/layout/dock.examples.d.ts.map +1 -1
  309. package/dist/test/layout/dock.examples.js +2 -42
  310. package/dist/test/layout/dock.examples.js.map +1 -1
  311. package/dist/test/layout/snap-grid.examples.d.ts.map +1 -1
  312. package/dist/test/layout/snap-grid.examples.js +18 -28
  313. package/dist/test/layout/snap-grid.examples.js.map +1 -1
  314. package/dist/test/navigation/index.d.ts +0 -2
  315. package/dist/test/navigation/index.d.ts.map +1 -1
  316. package/dist/test/navigation/index.js +0 -2
  317. package/dist/test/navigation/index.js.map +1 -1
  318. package/dist/test/navigation/nav-list.examples.js.map +1 -1
  319. package/dist/test/platform/index.d.ts +1 -0
  320. package/dist/test/platform/index.d.ts.map +1 -1
  321. package/dist/test/platform/index.js +1 -0
  322. package/dist/test/platform/index.js.map +1 -1
  323. package/dist/test/platform/slice-local.examples.d.ts +2 -0
  324. package/dist/test/platform/slice-local.examples.d.ts.map +1 -0
  325. package/dist/test/platform/slice-local.examples.js +31 -0
  326. package/dist/test/platform/slice-local.examples.js.map +1 -0
  327. package/dist/test/platform/slice.examples.js +61 -61
  328. package/dist/test/platform/slice.examples.js.map +1 -1
  329. package/dist/test/slice/slice.examples.d.ts +0 -1
  330. package/dist/test/slice/slice.examples.d.ts.map +1 -1
  331. package/dist/test/slice/slice.examples.js +67 -181
  332. package/dist/test/slice/slice.examples.js.map +1 -1
  333. package/package.json +4 -4
  334. package/dist/src/collections/board/index.d.ts +0 -855
  335. package/dist/src/collections/board/index.d.ts.map +0 -1
  336. package/dist/src/collections/board/index.js +0 -416
  337. package/dist/src/collections/board/index.js.map +0 -1
  338. package/dist/src/collections/board/types.d.ts +0 -111
  339. package/dist/src/collections/board/types.d.ts.map +0 -1
  340. package/dist/src/collections/board/types.js +0 -89
  341. package/dist/src/collections/board/types.js.map +0 -1
  342. package/dist/src/collections/calendar/index.d.ts +0 -446
  343. package/dist/src/collections/calendar/index.d.ts.map +0 -1
  344. package/dist/src/collections/calendar/index.js +0 -287
  345. package/dist/src/collections/calendar/index.js.map +0 -1
  346. package/dist/src/collections/calendar/types.d.ts +0 -338
  347. package/dist/src/collections/calendar/types.d.ts.map +0 -1
  348. package/dist/src/collections/calendar/types.js +0 -206
  349. package/dist/src/collections/calendar/types.js.map +0 -1
  350. package/dist/src/collections/flowchart/index.d.ts +0 -430
  351. package/dist/src/collections/flowchart/index.d.ts.map +0 -1
  352. package/dist/src/collections/flowchart/index.js +0 -292
  353. package/dist/src/collections/flowchart/index.js.map +0 -1
  354. package/dist/src/collections/flowchart/types.d.ts +0 -333
  355. package/dist/src/collections/flowchart/types.d.ts.map +0 -1
  356. package/dist/src/collections/flowchart/types.js +0 -263
  357. package/dist/src/collections/flowchart/types.js.map +0 -1
  358. package/dist/src/collections/plan/assemble.d.ts +0 -2274
  359. package/dist/src/collections/plan/assemble.d.ts.map +0 -1
  360. package/dist/src/collections/plan/assemble.js +0 -210
  361. package/dist/src/collections/plan/assemble.js.map +0 -1
  362. package/dist/src/collections/plan/builders.d.ts +0 -765
  363. package/dist/src/collections/plan/builders.d.ts.map +0 -1
  364. package/dist/src/collections/plan/builders.js +0 -673
  365. package/dist/src/collections/plan/builders.js.map +0 -1
  366. package/dist/src/collections/plan/factories.d.ts +0 -512
  367. package/dist/src/collections/plan/factories.d.ts.map +0 -1
  368. package/dist/src/collections/plan/factories.js +0 -539
  369. package/dist/src/collections/plan/factories.js.map +0 -1
  370. package/dist/src/collections/plan/index.d.ts +0 -324
  371. package/dist/src/collections/plan/index.d.ts.map +0 -1
  372. package/dist/src/collections/plan/index.js +0 -193
  373. package/dist/src/collections/plan/index.js.map +0 -1
  374. package/dist/src/collections/plan/ir.d.ts +0 -2490
  375. package/dist/src/collections/plan/ir.d.ts.map +0 -1
  376. package/dist/src/collections/plan/ir.js +0 -107
  377. package/dist/src/collections/plan/ir.js.map +0 -1
  378. package/dist/src/collections/plan/pick.d.ts +0 -133
  379. package/dist/src/collections/plan/pick.d.ts.map +0 -1
  380. package/dist/src/collections/plan/pick.js +0 -208
  381. package/dist/src/collections/plan/pick.js.map +0 -1
  382. package/dist/src/collections/plan/root.d.ts +0 -297
  383. package/dist/src/collections/plan/root.d.ts.map +0 -1
  384. package/dist/src/collections/plan/root.js +0 -427
  385. package/dist/src/collections/plan/root.js.map +0 -1
  386. package/dist/src/collections/plan/series.d.ts +0 -13887
  387. package/dist/src/collections/plan/series.d.ts.map +0 -1
  388. package/dist/src/collections/plan/series.js +0 -1710
  389. package/dist/src/collections/plan/series.js.map +0 -1
  390. package/dist/src/collections/plan/types.d.ts +0 -12612
  391. package/dist/src/collections/plan/types.d.ts.map +0 -1
  392. package/dist/src/collections/plan/types.js +0 -1345
  393. package/dist/src/collections/plan/types.js.map +0 -1
  394. package/dist/src/collections/roster/index.d.ts +0 -787
  395. package/dist/src/collections/roster/index.d.ts.map +0 -1
  396. package/dist/src/collections/roster/index.js +0 -325
  397. package/dist/src/collections/roster/index.js.map +0 -1
  398. package/dist/src/collections/roster/types.d.ts +0 -97
  399. package/dist/src/collections/roster/types.d.ts.map +0 -1
  400. package/dist/src/collections/roster/types.js +0 -72
  401. package/dist/src/collections/roster/types.js.map +0 -1
  402. package/dist/src/collections/sheet/bridge.d.ts +0 -376
  403. package/dist/src/collections/sheet/bridge.d.ts.map +0 -1
  404. package/dist/src/collections/sheet/bridge.js +0 -773
  405. package/dist/src/collections/sheet/bridge.js.map +0 -1
  406. package/dist/src/collections/sheet/columns.d.ts +0 -410
  407. package/dist/src/collections/sheet/columns.d.ts.map +0 -1
  408. package/dist/src/collections/sheet/columns.js +0 -99
  409. package/dist/src/collections/sheet/columns.js.map +0 -1
  410. package/dist/src/collections/sheet/context-bridge.d.ts +0 -48
  411. package/dist/src/collections/sheet/context-bridge.d.ts.map +0 -1
  412. package/dist/src/collections/sheet/context-bridge.js +0 -216
  413. package/dist/src/collections/sheet/context-bridge.js.map +0 -1
  414. package/dist/src/collections/sheet/draft-bridge.d.ts +0 -37
  415. package/dist/src/collections/sheet/draft-bridge.d.ts.map +0 -1
  416. package/dist/src/collections/sheet/draft-bridge.js +0 -153
  417. package/dist/src/collections/sheet/draft-bridge.js.map +0 -1
  418. package/dist/src/collections/sheet/drafts.d.ts +0 -14
  419. package/dist/src/collections/sheet/drafts.d.ts.map +0 -1
  420. package/dist/src/collections/sheet/drafts.js +0 -14
  421. package/dist/src/collections/sheet/drafts.js.map +0 -1
  422. package/dist/src/collections/sheet/editing-bridge.d.ts +0 -36
  423. package/dist/src/collections/sheet/editing-bridge.d.ts.map +0 -1
  424. package/dist/src/collections/sheet/editing-bridge.js +0 -196
  425. package/dist/src/collections/sheet/editing-bridge.js.map +0 -1
  426. package/dist/src/collections/sheet/editing-types.d.ts +0 -268
  427. package/dist/src/collections/sheet/editing-types.d.ts.map +0 -1
  428. package/dist/src/collections/sheet/editing-types.js +0 -34
  429. package/dist/src/collections/sheet/editing-types.js.map +0 -1
  430. package/dist/src/collections/sheet/edits.d.ts +0 -37
  431. package/dist/src/collections/sheet/edits.d.ts.map +0 -1
  432. package/dist/src/collections/sheet/edits.js +0 -31
  433. package/dist/src/collections/sheet/edits.js.map +0 -1
  434. package/dist/src/collections/sheet/group.d.ts +0 -165
  435. package/dist/src/collections/sheet/group.d.ts.map +0 -1
  436. package/dist/src/collections/sheet/group.js +0 -52
  437. package/dist/src/collections/sheet/group.js.map +0 -1
  438. package/dist/src/collections/sheet/index.d.ts +0 -351
  439. package/dist/src/collections/sheet/index.d.ts.map +0 -1
  440. package/dist/src/collections/sheet/index.js +0 -208
  441. package/dist/src/collections/sheet/index.js.map +0 -1
  442. package/dist/src/collections/sheet/link.d.ts +0 -398
  443. package/dist/src/collections/sheet/link.d.ts.map +0 -1
  444. package/dist/src/collections/sheet/link.js +0 -228
  445. package/dist/src/collections/sheet/link.js.map +0 -1
  446. package/dist/src/collections/sheet/registers.d.ts +0 -278
  447. package/dist/src/collections/sheet/registers.d.ts.map +0 -1
  448. package/dist/src/collections/sheet/registers.js +0 -268
  449. package/dist/src/collections/sheet/registers.js.map +0 -1
  450. package/dist/src/collections/sheet/root.d.ts +0 -328
  451. package/dist/src/collections/sheet/root.d.ts.map +0 -1
  452. package/dist/src/collections/sheet/root.js +0 -432
  453. package/dist/src/collections/sheet/root.js.map +0 -1
  454. package/dist/src/collections/sheet/seed-bridge.d.ts +0 -14
  455. package/dist/src/collections/sheet/seed-bridge.d.ts.map +0 -1
  456. package/dist/src/collections/sheet/seed-bridge.js +0 -51
  457. package/dist/src/collections/sheet/seed-bridge.js.map +0 -1
  458. package/dist/src/collections/sheet/sub-rows.d.ts +0 -249
  459. package/dist/src/collections/sheet/sub-rows.d.ts.map +0 -1
  460. package/dist/src/collections/sheet/sub-rows.js +0 -222
  461. package/dist/src/collections/sheet/sub-rows.js.map +0 -1
  462. package/dist/src/collections/sheet/transactions.d.ts +0 -76
  463. package/dist/src/collections/sheet/transactions.d.ts.map +0 -1
  464. package/dist/src/collections/sheet/transactions.js +0 -40
  465. package/dist/src/collections/sheet/transactions.js.map +0 -1
  466. package/dist/src/collections/sheet/types.d.ts +0 -14992
  467. package/dist/src/collections/sheet/types.d.ts.map +0 -1
  468. package/dist/src/collections/sheet/types.js +0 -1061
  469. package/dist/src/collections/sheet/types.js.map +0 -1
  470. package/dist/src/navigation/app/index.d.ts +0 -150
  471. package/dist/src/navigation/app/index.d.ts.map +0 -1
  472. package/dist/src/navigation/app/index.js +0 -191
  473. package/dist/src/navigation/app/index.js.map +0 -1
  474. package/dist/src/navigation/pages/index.d.ts +0 -165
  475. package/dist/src/navigation/pages/index.d.ts.map +0 -1
  476. package/dist/src/navigation/pages/index.js +0 -152
  477. package/dist/src/navigation/pages/index.js.map +0 -1
  478. package/dist/src/navigation/pages/types.d.ts +0 -111
  479. package/dist/src/navigation/pages/types.d.ts.map +0 -1
  480. package/dist/src/navigation/pages/types.js +0 -101
  481. package/dist/src/navigation/pages/types.js.map +0 -1
  482. package/dist/src/runtime/collections/board.d.ts +0 -73
  483. package/dist/src/runtime/collections/board.d.ts.map +0 -1
  484. package/dist/src/runtime/collections/board.js +0 -68
  485. package/dist/src/runtime/collections/board.js.map +0 -1
  486. package/dist/src/runtime/collections/calendar.d.ts +0 -54
  487. package/dist/src/runtime/collections/calendar.d.ts.map +0 -1
  488. package/dist/src/runtime/collections/calendar.js +0 -54
  489. package/dist/src/runtime/collections/calendar.js.map +0 -1
  490. package/dist/src/runtime/collections/flowchart.d.ts +0 -58
  491. package/dist/src/runtime/collections/flowchart.d.ts.map +0 -1
  492. package/dist/src/runtime/collections/flowchart.js +0 -54
  493. package/dist/src/runtime/collections/flowchart.js.map +0 -1
  494. package/dist/src/runtime/collections/plan.d.ts +0 -181
  495. package/dist/src/runtime/collections/plan.d.ts.map +0 -1
  496. package/dist/src/runtime/collections/plan.js +0 -186
  497. package/dist/src/runtime/collections/plan.js.map +0 -1
  498. package/dist/src/runtime/collections/roster.d.ts +0 -60
  499. package/dist/src/runtime/collections/roster.d.ts.map +0 -1
  500. package/dist/src/runtime/collections/roster.js +0 -59
  501. package/dist/src/runtime/collections/roster.js.map +0 -1
  502. package/dist/src/runtime/collections/sheet.d.ts +0 -122
  503. package/dist/src/runtime/collections/sheet.d.ts.map +0 -1
  504. package/dist/src/runtime/collections/sheet.js +0 -73
  505. package/dist/src/runtime/collections/sheet.js.map +0 -1
  506. package/dist/src/runtime/navigation/app.d.ts +0 -52
  507. package/dist/src/runtime/navigation/app.d.ts.map +0 -1
  508. package/dist/src/runtime/navigation/app.js +0 -53
  509. package/dist/src/runtime/navigation/app.js.map +0 -1
  510. package/dist/src/runtime/navigation/pages.d.ts +0 -50
  511. package/dist/src/runtime/navigation/pages.d.ts.map +0 -1
  512. package/dist/src/runtime/navigation/pages.js +0 -52
  513. package/dist/src/runtime/navigation/pages.js.map +0 -1
  514. package/dist/src/runtime/navigation/route.d.ts +0 -46
  515. package/dist/src/runtime/navigation/route.d.ts.map +0 -1
  516. package/dist/src/runtime/navigation/route.js +0 -47
  517. package/dist/src/runtime/navigation/route.js.map +0 -1
  518. package/dist/test/collections/board.examples.d.ts +0 -18
  519. package/dist/test/collections/board.examples.d.ts.map +0 -1
  520. package/dist/test/collections/board.examples.js +0 -297
  521. package/dist/test/collections/board.examples.js.map +0 -1
  522. package/dist/test/collections/calendar.examples.d.ts +0 -5
  523. package/dist/test/collections/calendar.examples.d.ts.map +0 -1
  524. package/dist/test/collections/calendar.examples.js +0 -147
  525. package/dist/test/collections/calendar.examples.js.map +0 -1
  526. package/dist/test/collections/flowchart.examples.d.ts +0 -17
  527. package/dist/test/collections/flowchart.examples.d.ts.map +0 -1
  528. package/dist/test/collections/flowchart.examples.js +0 -243
  529. package/dist/test/collections/flowchart.examples.js.map +0 -1
  530. package/dist/test/collections/plan.examples.d.ts +0 -200
  531. package/dist/test/collections/plan.examples.d.ts.map +0 -1
  532. package/dist/test/collections/plan.examples.js +0 -3665
  533. package/dist/test/collections/plan.examples.js.map +0 -1
  534. package/dist/test/collections/roster.examples.d.ts +0 -26
  535. package/dist/test/collections/roster.examples.d.ts.map +0 -1
  536. package/dist/test/collections/roster.examples.js +0 -237
  537. package/dist/test/collections/roster.examples.js.map +0 -1
  538. package/dist/test/collections/sheet-link.examples.d.ts +0 -7
  539. package/dist/test/collections/sheet-link.examples.d.ts.map +0 -1
  540. package/dist/test/collections/sheet-link.examples.js +0 -41
  541. package/dist/test/collections/sheet-link.examples.js.map +0 -1
  542. package/dist/test/collections/sheet-transactions.examples.d.ts +0 -7
  543. package/dist/test/collections/sheet-transactions.examples.d.ts.map +0 -1
  544. package/dist/test/collections/sheet-transactions.examples.js +0 -58
  545. package/dist/test/collections/sheet-transactions.examples.js.map +0 -1
  546. package/dist/test/collections/sheet.examples.d.ts +0 -96
  547. package/dist/test/collections/sheet.examples.d.ts.map +0 -1
  548. package/dist/test/collections/sheet.examples.js +0 -1040
  549. package/dist/test/collections/sheet.examples.js.map +0 -1
  550. package/dist/test/navigation/app.examples.d.ts +0 -22
  551. package/dist/test/navigation/app.examples.d.ts.map +0 -1
  552. package/dist/test/navigation/app.examples.js +0 -136
  553. package/dist/test/navigation/app.examples.js.map +0 -1
  554. package/dist/test/navigation/pages.examples.d.ts +0 -13
  555. package/dist/test/navigation/pages.examples.d.ts.map +0 -1
  556. package/dist/test/navigation/pages.examples.js +0 -113
  557. package/dist/test/navigation/pages.examples.js.map +0 -1
  558. package/dist/test/navigation/route.examples.d.ts +0 -13
  559. package/dist/test/navigation/route.examples.d.ts.map +0 -1
  560. package/dist/test/navigation/route.examples.js +0 -69
  561. package/dist/test/navigation/route.examples.js.map +0 -1
@@ -1,1345 +0,0 @@
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` IR — the UIComponent-free types. A Plan is an axis-aligned
7
- * composite canvas: ONE shared axis — `{ time | number | ordinal }`, declared
8
- * once by the root and carried by every element instant (#631) — divided into
9
- * `n` buckets (a window ÷ a resolution or step, or an ordinal list) over
10
- * heterogeneous rows — Gantt-style state-runs, Planner allocation lanes,
11
- * Chart measures, Matrix heat cells, Table numerals, Roster chips and event
12
- * marks — sliced and reviewed as one surface.
13
- *
14
- * Rows are an ordered STREAM in the IR (`ArrayType(PlanRowType)`, #822): the
15
- * stream IS the render order. The top-level series list is the layout — each
16
- * series contributes its rows in declared order, as BLOCKS that travel apart
17
- * ({@link PlanBlockType}, #823): a data series is one block of its entries'
18
- * rows, which a paged canvas pages on its own, and a section's header and
19
- * hand-built rows are fixed blocks drawn once — and a parent is followed by
20
- * its descendants. A row has a TYPED identity
21
- * ({@link PlanRowIdType}: the series that made it and the path of entry keys
22
- * that leads to it), which is what `parent` references, what `links` address,
23
- * what every callback reports and what focus / collapse / selection state is
24
- * keyed on. Hierarchy comes from the data's own nesting (a series'
25
- * `children`), never from a field value; parent aggregates (rollup bands,
26
- * per-bucket heat means, table subtotals) are derived renderer-side from the
27
- * tree the `parent` ids encode.
28
- *
29
- * This file holds only plain data — no UIComponent slots — so `component.ts`
30
- * can import it without a circular dependency. Since the data-interface
31
- * redesign (`Plan Data Interface.md` §3.2/§3.3) that includes the WHOLE row
32
- * vocabulary: elements (runs, bucket events, chips, event marks, decisions),
33
- * the row kind and the row itself carry **no `UIComponentType` and no
34
- * per-element UI embeds** — rich surfaces resolve through the ROOT's
35
- * `popover` / `hover` / `expandRender` functions over
36
- * {@link PlanElementRefType} / row refs, so a row is a storable, pageable
37
- * dataset element. Only the root, review and the resolver signatures stay
38
- * UIComponent-coupled (`./ir.ts`, mirrored inline with the recursion `node`
39
- * in the `Plan` arm of `component.ts`; the plan spec holds the two to one
40
- * East type).
41
- *
42
- * @packageDocumentation
43
- */
44
- import { ArrayType, BlobType, BooleanType, DateTimeType, DictType, FloatType, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, VariantType, } from "@elaraai/east";
45
- import { StatusValueType } from "../../feedback/status/types.js";
46
- import { IconType } from "../../display/icon/types.js";
47
- import { ColorSchemeType } from "../../style/scheme.js";
48
- import { EventStateType } from "../../contracts/states.js";
49
- import { ApprovalStateType } from "../../contracts/approval.js";
50
- import { LibraryRefType } from "../../contracts/drag.js";
51
- import { EditingDraftFieldType, EditingPatchEventTypeWith, EditingReadinessType, EditingSessionFields, } from "../../contracts/editing.js";
52
- import { TickFormatType } from "../../format/types.js";
53
- import { TimeResolutionType } from "../../contracts/time.js";
54
- import { ValueFormatType } from "../../contracts/format.js";
55
- import { PagedSourceType, RowSourceType } from "../../contracts/source.js";
56
- import { ChartDomainType, ChartTickValuesType } from "../../charts/spec/index.js";
57
- import { MatrixFillType } from "../matrix/types.js";
58
- import { TableAggregateType } from "../table/types.js";
59
- import { DensityType } from "../../style/interaction.js";
60
- // ============================================================================
61
- // Instants + axis — the shared scale, in one of three kinds
62
- // ============================================================================
63
- /**
64
- * One instant on the Plan's shared axis — `{ time | number | ordinal }`, the
65
- * retired Planner's slot type verbatim (#631). The axis KIND rides every
66
- * element, so a canvas is typed end to end: a run's `start` / `end`, a tile's
67
- * `at`, a chart point's `t`, a chip's `from` / `to` and a click payload's
68
- * `at` are all this variant, and the root's {@link PlanAxisType} declares
69
- * which arm the canvas positions on.
70
- *
71
- * @remarks
72
- * Every instant on a canvas must ride the axis's arm — a row whose instants
73
- * ride another arm is a render-time diagnostic naming the row and the axis
74
- * kind, never a silent misplacement (the Planner's single-axis-kind rule).
75
- *
76
- * The element builders take the JS-typed sugar (`Date` ⇒ `time`, `number`
77
- * ⇒ `number`, `string` ⇒ `ordinal`) and wrap East expressions by their
78
- * STATIC type (`DateTimeType` ⇒ `time`, `FloatType` / `IntegerType` ⇒
79
- * `number`, `StringType` ⇒ `ordinal`), so a `DateTimeType` accessor keeps
80
- * compiling unchanged; `Plan.at.time` / `.number` / `.ordinal` build one
81
- * explicitly, and element RECORDS stored in data carry the variant itself.
82
- *
83
- * @property time - A UTC instant on a `time` axis
84
- * @property number - A position on a `number` axis (day 1..8, a shift index, a distance)
85
- * @property ordinal - A declared value on an `ordinal` axis (a workflow phase)
86
- */
87
- export const PlanInstantType = VariantType({ time: DateTimeType, number: FloatType, ordinal: StringType });
88
- // ============================================================================
89
- // The phantom axis kind — a TYPE-only brand (#631)
90
- // ============================================================================
91
- /**
92
- * The phantom axis-kind brand — a `unique symbol` that exists only in the
93
- * TYPES. Every builder result whose instants have a known kind is intersected
94
- * with `{ readonly [PlanAxisKindBrand]?: K }` ({@link PlanKinded}): `Plan.at.time(d)`
95
- * is `"time"`, `Plan.run({ start: r.start })` takes the kind of `r.start`'s
96
- * static type ({@link PlanKindOf}), a `Plan.series.span` whose accessor
97
- * returns such runs collects their kind, `Plan.axis.number(...)` declares
98
- * `"number"` — and the root demands every series' kind lie WITHIN its
99
- * axis's. A `"time"` series on a `"number"` axis is then a compile error at
100
- * the `<Plan>` tag, before anything renders.
101
- *
102
- * @remarks
103
- * Nothing changes at runtime or on the wire: the property is optional and
104
- * never written. Kind-ERASED values — a stored `Plan.Types.Run`, an
105
- * `Expr<PlanInstantType>`, an East-mapped element list, a `$.let`-bound axis
106
- * or series list — carry no brand, are accepted on any axis, and remain the
107
- * render-time `AXIS MISMATCH` diagnostic's job. Chart rows are erased too:
108
- * a Chart layer's TS face does not expose its x type.
109
- */
110
- export const PlanAxisKindBrand = Symbol("PlanAxisKind");
111
- /**
112
- * The `time` axis — the explicit window, the bucket resolution, the
113
- * resolution segment options, the observed/plan divider, and the tick format.
114
- *
115
- * @remarks
116
- * Construct via `Plan.axis({ … })` (or `Plan.axis.time`). The window is a
117
- * half-open calendar range `[min, max)` interpreted in UTC — a 12-week window
118
- * at `week` resolution is exactly 12 columns. When a bound slice carries a
119
- * datetime range / resolution, the slice state supersedes these initial
120
- * values (the slice is the single source of truth for window + resolution);
121
- * `axis` seeds the defaults and covers the unbound case. There is no fit to
122
- * the data (#822): a canvas states its window, or binds a slice whose range
123
- * supplies it — the same inline and paged.
124
- *
125
- * @property window - Explicit window `[min, max)`. `none` ⇒ the bound slice's datetime range
126
- * @property resolution - Initial bucket unit (see {@link TimeResolutionType}); the toolbar segment overrides via slice state
127
- * @property resolutions - Resolution segment options (e.g. `[week, day]`); `[]` ⇒ no segment shown
128
- * @property now - The observed/plan split instant. `none` ⇒ no now-line
129
- * @property format - Tick-label pattern override; `none` ⇒ resolution defaults matching the spec ruler (week ⇒ ISO week `"W27"`, day ⇒ uppercase weekday `"MON"`)
130
- */
131
- export const PlanTimeAxisType = StructType({
132
- window: OptionType(StructType({ min: DateTimeType, max: DateTimeType })),
133
- resolution: TimeResolutionType,
134
- resolutions: ArrayType(TimeResolutionType),
135
- now: OptionType(DateTimeType),
136
- format: OptionType(StringType),
137
- });
138
- /**
139
- * The `number` axis — a numeric window divided by a `step` (the
140
- * `TimeResolution` rule, numerically): `[min, max)` ÷ `step` = `n` buckets,
141
- * bucket edges on whole multiples of `step`.
142
- *
143
- * @remarks
144
- * Construct via `Plan.axis.number({ … })`. When a bound slice carries a
145
- * `float` / `integer` range, that range is the window (the horizon brush and
146
- * the `[` / `]` / `n` keys write it back); `window` seeds the unbound case —
147
- * there is no fit to the data (#822). There is no resolution segment on a
148
- * number axis — `step` is fixed by the declaration.
149
- *
150
- * @property window - Explicit half-open window `[min, max)`. `none` ⇒ the bound slice's numeric range
151
- * @property step - The bucket width (`> 0`) — `n = window ÷ step`
152
- * @property now - The observed/plan split position. `none` ⇒ no now-line
153
- * @property format - Tick-label format (the shared {@link ValueFormatType} — `Chart.format.*`); `none` ⇒ plain numbers
154
- */
155
- export const PlanNumberAxisType = StructType({
156
- window: OptionType(StructType({ min: FloatType, max: FloatType })),
157
- step: FloatType,
158
- now: OptionType(FloatType),
159
- format: OptionType(ValueFormatType),
160
- });
161
- /**
162
- * The `ordinal` axis — the declared values ARE the buckets, one column each,
163
- * in the declared order; the window is the whole list.
164
- *
165
- * @remarks
166
- * Construct via `Plan.axis.ordinal({ … })`. An ordinal axis has no slice
167
- * range arm: the horizon brush does not mount and the window keys idle — the
168
- * list is the window. An instant naming a value outside the list positions
169
- * nowhere (it is culled, like an instant outside a time window).
170
- *
171
- * @property values - The ordered labels — the bucket identities and their ruler ticks
172
- * @property now - The observed/plan split value. `none` ⇒ no now-line
173
- */
174
- export const PlanOrdinalAxisType = StructType({
175
- values: ArrayType(StringType),
176
- now: OptionType(StringType),
177
- });
178
- /**
179
- * The Plan axis declaration — ONE of the three kinds. The arm IS the
180
- * declaration: a canvas cannot mix kinds, and every element instant on it
181
- * must ride the same arm ({@link PlanInstantType}).
182
- *
183
- * @property time - A calendar axis: UTC window ÷ resolution ({@link PlanTimeAxisType})
184
- * @property number - A numeric axis: window ÷ step ({@link PlanNumberAxisType})
185
- * @property ordinal - A declared list of values, one bucket each ({@link PlanOrdinalAxisType})
186
- */
187
- export const PlanAxisType = VariantType({
188
- time: PlanTimeAxisType,
189
- number: PlanNumberAxisType,
190
- ordinal: PlanOrdinalAxisType,
191
- });
192
- /**
193
- * The two grains of one canvas — GROUP (heat strips) and RESOURCE (rows, the
194
- * default).
195
- *
196
- * @remarks
197
- * The grain changes rows — never the axis, the charts or the vocabulary. Set
198
- * the initial grain via the root's `grain`; thereafter the toolbar segment
199
- * drives it as renderer state (observe via `onGrainChange`).
200
- *
201
- * @property group - Every group collapsed to its summary heat strip
202
- * @property resource - Resource rows (the default)
203
- */
204
- export const PlanGrainType = VariantType({ group: NullType, resource: NullType });
205
- // ============================================================================
206
- // Values — quantities, and how a bucket folds what falls in it (#824)
207
- // ============================================================================
208
- /**
209
- * How the values that fall in one bucket fold into the one value it shows
210
- * (#824). A canvas re-buckets every cell and chart point at the scale's
211
- * resolution: switch WEEK → MONTH over weekly cells and each month shows ONE
212
- * cell, the fold of its weeks, where it used to stack four.
213
- *
214
- * @remarks
215
- * A bucket holding one value shows it as it is — its label, its text, its own
216
- * instant — for every fold but `count`. A bucket holding several shows their
217
- * fold at the bucket's start. Values with nothing in them (a `none` cell, a
218
- * gap in a chart) are skipped; a bucket with no values left shows none.
219
- *
220
- * The defaults follow what the values mean: a heat cell is a level (`mean`),
221
- * a weight cell the FRACTION of its bucket booked (`mean` — a month's fraction
222
- * is its weeks' mean, where a sum would fill every bar), a segment the amount
223
- * each fill holds (`sum`), a table numeral and a chart column an amount
224
- * (`sum`), and a line or an area a level (`mean`).
225
- *
226
- * @property sum - The values added up
227
- * @property mean - Their mean
228
- * @property min - The least of them
229
- * @property max - The greatest of them
230
- * @property last - The one at the latest instant
231
- * @property count - How many there are
232
- */
233
- export const PlanFoldType = VariantType({
234
- sum: NullType,
235
- mean: NullType,
236
- min: NullType,
237
- max: NullType,
238
- last: NullType,
239
- count: NullType,
240
- });
241
- /**
242
- * A quantity — a number, its unit, and how it prints (#824). Runs and links
243
- * carry one: a run's bar prints it after its label, a link's ribbon prints it
244
- * as its caption and takes its share from it, and a parent's rollup band sums
245
- * its runs' quantities unit by unit.
246
- *
247
- * @remarks
248
- * The number is the value the canvas computes with, and the words are derived
249
- * from it: `format` (the shared `Format.*` vocabulary, in the viewer's locale)
250
- * prints `value`, followed by `unit`. `text` overrides the printed caption
251
- * where the author wants their own words — the value still sums and weighs.
252
- *
253
- * @property value - The amount — what sums, weighs and compares
254
- * @property unit - The unit it is in (`"t"`); quantities in different units never sum together
255
- * @property format - How `value` prints (`Format.*`); `none` ⇒ the canvas's plain number
256
- * @property text - The caption to print instead of the formatted value and unit
257
- */
258
- export const PlanQuantityType = StructType({
259
- value: FloatType,
260
- unit: OptionType(StringType),
261
- format: OptionType(TickFormatType),
262
- text: OptionType(StringType),
263
- });
264
- /**
265
- * The scale heat cells paint on — the value at no depth, the value at full
266
- * depth, and the threshold at or above which a cell wears the warn ring
267
- * (#824 names it; it used to be three loose options on the heat arm).
268
- *
269
- * @property min - The value painted at no depth; `none` ⇒ the least value shown
270
- * @property max - The value painted at full depth; `none` ⇒ the greatest value shown
271
- * @property warnAt - The warn-ring threshold (a cell at or above it rings); `none` ⇒ no ring
272
- */
273
- export const PlanHeatScaleType = StructType({
274
- min: OptionType(FloatType),
275
- max: OptionType(FloatType),
276
- warnAt: OptionType(FloatType),
277
- });
278
- // ============================================================================
279
- // Gutter — the left cell's identity vocabulary
280
- // ============================================================================
281
- /**
282
- * One chart-series legend chip printed in the gutter (colour swatch + label).
283
- *
284
- * @property color - The swatch colour (theme token, e.g. `"teal.solid"`, or CSS colour)
285
- * @property label - The swatch caption (e.g. `"col"`, `"trend"`)
286
- */
287
- export const PlanGutterSwatchType = StructType({
288
- color: StringType,
289
- label: StringType,
290
- });
291
- /**
292
- * The gutter identity — the left cell's whole vocabulary.
293
- *
294
- * @remarks
295
- * The factories flatten these fields into their input bags (`label`, `id`,
296
- * `sub`, `value`, `meta`, `stacked`, `swatches` ride on every row factory).
297
- *
298
- * @property label - The row name (12.5/500; groups and names)
299
- * @property id - `true` ⇒ the label renders as a mono row id (11.5/600 — `L1-M03`, `COVERAGE`); `false` by default
300
- * @property sub - The muted mono sub line (`"120 t"`, `"week · 1 lane"`)
301
- * @property value - The right-aligned mono value slot (`"94.2%"`, `"82"`) — the same aggregate slot a table group header uses
302
- * @property meta - The group meta line (`"8 rs · 82%"`)
303
- * @property stacked - `true` ⇒ two-line layout (label over sub; row min-height 42px); `false` by default
304
- * @property swatches - Chart-series legend chips printed under the label
305
- */
306
- export const PlanGutterType = StructType({
307
- label: StringType,
308
- id: BooleanType,
309
- sub: OptionType(StringType),
310
- value: OptionType(StringType),
311
- meta: OptionType(StringType),
312
- stacked: BooleanType,
313
- swatches: ArrayType(PlanGutterSwatchType),
314
- });
315
- // ============================================================================
316
- // Span-row leaf data — ports, rollup, bands
317
- // ============================================================================
318
- /**
319
- * A quantity in/out port glyph on a span row — cross-row relations are
320
- * quantity through ports, never dependency arrows.
321
- *
322
- * @property at - The instant the quantity moves
323
- * @property label - Optional port caption (e.g. `"−24 t"`)
324
- */
325
- export const PlanPortType = StructType({
326
- at: PlanInstantType,
327
- label: OptionType(StringType),
328
- });
329
- /**
330
- * How a parent span row rolls its descendants' runs up into bands.
331
- *
332
- * @property union - One band per busy interval (any child busy — the default)
333
- * @property byStatus - One thin band per status, stacked
334
- * @property sum - Quantity series emphasis (band quantities carry the sums — feed a chart row for the full series)
335
- */
336
- export const PlanRollupType = VariantType({ union: NullType, byStatus: NullType, sum: NullType });
337
- // ============================================================================
338
- // Bucket-row leaf data — cell markers + the tile geometry vocabulary
339
- // ============================================================================
340
- /**
341
- * A status marker on a bucket cell — rings the cell, paints the corner status
342
- * icon, and surfaces `message` as a hover tooltip (the Planner marker,
343
- * verbatim).
344
- *
345
- * @property at - The bucket instant the marker rings
346
- * @property lane - The lane key within the cell (`none` in an unbucketed row)
347
- * @property status - The semantic status — drives colour + paired icon
348
- * @property message - The tooltip text
349
- */
350
- export const PlanCellMarkerType = StructType({
351
- at: PlanInstantType,
352
- lane: OptionType(StringType),
353
- status: StatusValueType,
354
- message: StringType,
355
- });
356
- /**
357
- * Which axis a bucket-event tile stretches to fill its cell on. Absent ⇒ the
358
- * tile is content-sized (intrinsic).
359
- *
360
- * @property horizontal - Fill the cell width
361
- * @property vertical - Fill the cell height
362
- * @property both - Fill both axes
363
- */
364
- export const PlanStretchType = VariantType({ horizontal: NullType, vertical: NullType, both: NullType });
365
- /**
366
- * One alignment position for a tile's content along a single axis.
367
- *
368
- * @property start - Align to the start (left / top)
369
- * @property center - Centre
370
- * @property end - Align to the end (right / bottom)
371
- */
372
- export const PlanContentAlignType = VariantType({ start: NullType, center: NullType, end: NullType });
373
- /**
374
- * Where a bucket-event tile's content sits inside the tile — a two-axis
375
- * alignment. Both axes default to `start` (top-left) when omitted.
376
- *
377
- * @property horizontal - Horizontal content alignment (→ `justifyContent`)
378
- * @property vertical - Vertical content alignment (→ `alignItems`)
379
- */
380
- export const PlanContentType = StructType({
381
- horizontal: OptionType(PlanContentAlignType),
382
- vertical: OptionType(PlanContentAlignType),
383
- });
384
- /**
385
- * A bucket-event tile's optional attention animation. `pulse` honours
386
- * `prefers-reduced-motion`.
387
- *
388
- * @property none - No animation (the default)
389
- * @property pulse - A gentle opacity pulse
390
- */
391
- export const PlanAnimationType = VariantType({ none: NullType, pulse: NullType });
392
- // ============================================================================
393
- // Chart-row leaf data — first-class, data-only layers
394
- // ============================================================================
395
- /**
396
- * One `{t, y}` point of a Plan chart layer — the reified form every consumed
397
- * Chart layer builder reduces to. The x accessor's arm follows its static
398
- * type (`DateTimeType` ⇒ `time`, numeric ⇒ `number`, `StringType` ⇒
399
- * `ordinal`) and must match the canvas axis at render.
400
- *
401
- * @remarks
402
- * A `y` that is not a finite number (`NaN`) is a GAP — a missing
403
- * observation: a line or an area breaks there instead of bridging it, a
404
- * column draws nothing, and the value counts toward no axis domain.
405
- *
406
- * @property t - The instant on the shared scale
407
- * @property y - The measure value (`NaN` ⇒ a gap)
408
- */
409
- export const PlanChartPointType = StructType({ t: PlanInstantType, y: FloatType });
410
- /**
411
- * Which y-axis a chart layer scales against. Left ticks print inside the
412
- * gutter cell's right edge; right ticks at the plot's right edge.
413
- *
414
- * @property left - The left (primary) y-axis
415
- * @property right - The right (secondary) y-axis
416
- */
417
- export const PlanAxisSideType = VariantType({ left: NullType, right: NullType });
418
- /**
419
- * A breach threshold on a chart layer — buckets/points beyond it render in
420
- * the warn tone, and contiguous breach buckets derive the outlined breach
421
- * rectangle at expanded density.
422
- *
423
- * @property above - Breach when the value exceeds this threshold
424
- * @property below - Breach when the value falls below this threshold
425
- */
426
- export const PlanBreachType = VariantType({ above: FloatType, below: FloatType });
427
- /**
428
- * One `{t, lo, hi}` point of a band (area-range) chart layer. A bound that is
429
- * not finite (`NaN`) makes the point a gap: the band breaks there.
430
- *
431
- * @property t - The instant on the shared scale
432
- * @property lo - The lower bound
433
- * @property hi - The upper bound
434
- */
435
- export const PlanChartBandPointType = StructType({ t: PlanInstantType, lo: FloatType, hi: FloatType });
436
- /**
437
- * A chart row's y-axis declaration — the Chart axis vocabulary
438
- * ({@link ChartDomainType} / {@link ChartTickValuesType} /
439
- * {@link ValueFormatType}), restricted to a value axis: only the `number`
440
- * arms are meaningful (a Plan chart row's time axis is the shared canvas
441
- * scale, never per-axis).
442
- *
443
- * @property domain - Explicit `[min, max]` extent (`none` ⇒ derived from what the row draws: its values, an area's and each column's baseline, and every column stack's ends)
444
- * @property tickValues - Explicit tick positions printed at the gutter/plot edge (`none` ⇒ no ticks)
445
- * @property format - Optional tick format (the shared {@link ValueFormatType} — `Chart.format.*`)
446
- */
447
- export const PlanChartAxisType = StructType({
448
- domain: OptionType(ChartDomainType),
449
- tickValues: OptionType(ChartTickValuesType),
450
- format: OptionType(ValueFormatType),
451
- });
452
- /**
453
- * One data-only chart layer on a chart row — the reified form of a consumed
454
- * `Chart.*` layer builder. The canvas renders every mark itself against the
455
- * shared scale; nothing of `ChartSpec` reaches the Plan IR.
456
- *
457
- * @remarks
458
- * Renderer vocabulary (fixed by the spec, not the IR): lines draw solid ≤ now
459
- * and dashed after; columns observed `ink`, planned brand at half strength,
460
- * breach warn; stacked columns pair by `series`, each value axis stacking on
461
- * its own — positive parts up from the baseline, negative parts down;
462
- * refLines are dotted gridlines with a mono label. Every mark sits at its
463
- * true instant — a point beyond the window keeps its position and the plot
464
- * clips it. Hovering a bucket reads each data layer's value there.
465
- * `Chart.Bar` (horizontal) is a build-time error on every axis kind —
466
- * horizontal bars flip the frame the shared axis owns.
467
- *
468
- * A line, an area and a column series FOLD what falls in one bucket (#824):
469
- * at a coarser resolution than its points, a column series draws one column
470
- * per bucket — the `sum` of its points there by default — and a line or an
471
- * area one vertex — their `mean` ({@link PlanFoldType}). Scatter points and
472
- * bands draw every point where it is.
473
- *
474
- * @property line - A continuous line series (optional breach threshold; folds by `mean`)
475
- * @property area - A filled area series (folds by `mean`)
476
- * @property column - Per-bucket columns (optional stack `series` id + breach; folds by `sum`)
477
- * @property scatter - Point markers
478
- * @property band - A filled range (lo/hi per instant)
479
- * @property refLine - A horizontal reference line at a y value (dotted, mono label)
480
- * @property refBand - A vertical reference band between two instants
481
- * @property refDot - A reference marker at an instant × y value
482
- */
483
- export const PlanChartLayerType = VariantType({
484
- line: StructType({ points: ArrayType(PlanChartPointType), axis: PlanAxisSideType,
485
- breach: OptionType(PlanBreachType), fold: PlanFoldType }),
486
- area: StructType({ points: ArrayType(PlanChartPointType), axis: PlanAxisSideType, fold: PlanFoldType }),
487
- column: StructType({ points: ArrayType(PlanChartPointType), axis: PlanAxisSideType,
488
- series: OptionType(StringType), breach: OptionType(PlanBreachType), fold: PlanFoldType }),
489
- scatter: StructType({ points: ArrayType(PlanChartPointType), axis: PlanAxisSideType }),
490
- band: StructType({ points: ArrayType(PlanChartBandPointType), axis: PlanAxisSideType }),
491
- refLine: StructType({ y: FloatType, axis: PlanAxisSideType, label: OptionType(StringType) }),
492
- refBand: StructType({ from: PlanInstantType, to: PlanInstantType, label: OptionType(StringType) }),
493
- refDot: StructType({ t: PlanInstantType, y: FloatType, axis: PlanAxisSideType,
494
- label: OptionType(StringType) }),
495
- });
496
- /**
497
- * A chart row's height mode — spark (32px resting), expanded (88px), or an
498
- * explicit height for a composed chart (via `Plan.fixed("120px")` — a CSS px
499
- * size, the same String type as every component height).
500
- *
501
- * @property spark - The 32px resting sparkline density
502
- * @property expanded - The 88px expanded density
503
- * @property fixed - An explicit CSS px size (`"120px"`)
504
- */
505
- export const PlanChartHeightType = VariantType({ spark: NullType, expanded: NullType, fixed: StringType });
506
- // ============================================================================
507
- // Heat-row leaf data — heat depth / weight bars / segment compositions
508
- // ============================================================================
509
- /**
510
- * One heat cell — a per-bucket scalar rendered as colour depth.
511
- *
512
- * @property at - The bucket instant
513
- * @property value - The scalar (`none` ⇒ the 45° no-data hatch + `–`)
514
- * @property label - Optional printed value text (shown when the cell is ≥ 12px tall); without one, a cell prints
515
- * its value only when its arm declares a `format` (#824)
516
- */
517
- export const PlanHeatCellType = StructType({
518
- at: PlanInstantType,
519
- value: OptionType(FloatType),
520
- label: OptionType(StringType),
521
- });
522
- /**
523
- * One weight cell — a per-bucket booked-vs-free bar (the Matrix weight-bar
524
- * recipe). Planned buckets render pale.
525
- *
526
- * @property at - The bucket instant
527
- * @property fraction - The 0..1 filled fraction
528
- * @property planned - `true` ⇒ the pale planned treatment
529
- */
530
- export const PlanWeightCellType = StructType({
531
- at: PlanInstantType,
532
- fraction: FloatType,
533
- planned: BooleanType,
534
- });
535
- /**
536
- * One segment of a segment-cell bar (the Matrix segment recipe).
537
- *
538
- * @property fill - The status-leveraged fill (see `MatrixFillType`)
539
- * @property weight - The proportional weight (normalised with siblings)
540
- * @property label - Optional in-bar % text (printed when the segment is wide enough)
541
- */
542
- export const PlanSegmentType = StructType({
543
- fill: MatrixFillType,
544
- weight: FloatType,
545
- label: OptionType(StringType),
546
- });
547
- /**
548
- * One segment cell — a per-bucket composition bar.
549
- *
550
- * @property at - The bucket instant
551
- * @property segments - The weighted segments
552
- */
553
- export const PlanSegmentCellType = StructType({
554
- at: PlanInstantType,
555
- segments: ArrayType(PlanSegmentType),
556
- });
557
- /**
558
- * A heat row's cells — one of the three Matrix-borrowed cell recipes, each
559
- * declaring how a bucket folds the cells that fall in it and how their values
560
- * print (#824).
561
- *
562
- * @remarks
563
- * `heat` carries the scale its own cells paint on ({@link PlanHeatScaleType}:
564
- * `min`/`max`, defaulting to the extent shown, and the `warnAt` ring). Group
565
- * summary strips (§5) are exactly the `heat` arm computed over descendants.
566
- *
567
- * `fold` ({@link PlanFoldType}) is how a coarser resolution than the cells'
568
- * shows them — one cell per bucket: heat `mean` and weight `mean` by default
569
- * (a level and a fraction), segments `sum` (each fill's weight adds up, then
570
- * normalises). `format` prints the arm's values where the canvas prints one:
571
- * a heat cell without a `label` of its own, a folded or derived heat cell, and
572
- * the words a reader hears for a weight or a segment share.
573
- *
574
- * @property heat - Colour-depth cells, their scale, fold (`mean`) and format
575
- * @property weight - Booked-vs-free weight bars, their fold (`mean`) and format
576
- * @property segments - Weighted segment compositions, their fold (`sum`) and format
577
- */
578
- export const PlanHeatCellsType = VariantType({
579
- heat: StructType({ cells: ArrayType(PlanHeatCellType), scale: PlanHeatScaleType,
580
- fold: PlanFoldType, format: OptionType(TickFormatType) }),
581
- weight: StructType({ cells: ArrayType(PlanWeightCellType),
582
- fold: PlanFoldType, format: OptionType(TickFormatType) }),
583
- segments: StructType({ cells: ArrayType(PlanSegmentCellType),
584
- fold: PlanFoldType, format: OptionType(TickFormatType) }),
585
- });
586
- /**
587
- * How a parent heat row derives its per-bucket cells from its children.
588
- *
589
- * @property mean - The per-bucket mean over children
590
- * @property max - The per-bucket maximum
591
- * @property sum - The per-bucket sum
592
- */
593
- export const PlanAggregateType = VariantType({ mean: NullType, max: NullType, sum: NullType });
594
- /**
595
- * What a collapsed group strip shows (#824) — ONE declaration, where there
596
- * used to be two independent options (explicit cells, and an aggregate) that
597
- * could both be set.
598
- *
599
- * @property none - A plain band
600
- * @property cells - Explicit strip cells
601
- * @property aggregate - Cells the canvas derives from the members' heat cells, per bucket
602
- */
603
- export const PlanGroupSummaryType = VariantType({
604
- none: NullType,
605
- cells: PlanHeatCellsType,
606
- aggregate: PlanAggregateType,
607
- });
608
- // ============================================================================
609
- // Table-row leaf data — bucketed numerals
610
- // ============================================================================
611
- /**
612
- * A table cell's semantic tone.
613
- *
614
- * @property neg - Negative emphasis (shortfalls print in the negative ink)
615
- * @property muted - Muted (the no-data em-dash)
616
- */
617
- export const PlanTableToneType = VariantType({ neg: NullType, muted: NullType });
618
- /**
619
- * One table-row cell — a per-bucket numeral.
620
- *
621
- * @remarks
622
- * The RENDERER prints `value` through the row's `format` (the shared
623
- * {@link ValueFormatType}); `text` is an explicit display override and
624
- * `tone` an explicit tone override (else negatives derive `neg`, `none`
625
- * the muted em-dash).
626
- *
627
- * @property at - The bucket instant
628
- * @property value - The numeric value (`none` ⇒ the muted em-dash)
629
- * @property text - Optional explicit display override
630
- * @property tone - Optional explicit semantic tone override
631
- */
632
- export const PlanTableCellType = StructType({
633
- at: PlanInstantType,
634
- value: OptionType(FloatType),
635
- text: OptionType(StringType),
636
- tone: OptionType(PlanTableToneType),
637
- });
638
- /**
639
- * How a multi-series table row lays its per-bucket values out — side by side
640
- * (`horizontal`, the default) or stacked lines (`vertical`; the row grows to
641
- * fit the stack).
642
- *
643
- * @property horizontal - Values print side by side in the right-aligned cell
644
- * @property vertical - Values stack as lines (the row grows)
645
- */
646
- export const PlanTableSplitType = VariantType({ horizontal: NullType, vertical: NullType });
647
- /**
648
- * One value series of a table row — its own raw cells plus the POSITION's
649
- * style declarations. Style is declared ONCE per series (wire-lean — never
650
- * replicated per cell); the cells stay raw values, with the same rare
651
- * per-cell `text`/`tone` overrides a single-series cell has.
652
- *
653
- * @property cells - The series' per-bucket cells (raw values)
654
- * @property format - Numeral format override for this series (`none` ⇒ the row's `format`)
655
- * @property tone - Default tone for the series' values (per-cell tones and derived neg/muted win)
656
- * @property strong - Semibold emphasis for this series' values (`false` by default)
657
- * @property rollup - `true` ⇒ this series feeds declared parent aggregation — flag none and every series does (`false` by default)
658
- * @property fold - How a bucket folds the cells that fall in it at a coarser resolution ({@link PlanFoldType}; `sum` by default, #824)
659
- */
660
- export const PlanTableSeriesType = StructType({
661
- cells: ArrayType(PlanTableCellType),
662
- format: OptionType(TickFormatType),
663
- tone: OptionType(PlanTableToneType),
664
- strong: BooleanType,
665
- rollup: BooleanType,
666
- fold: PlanFoldType,
667
- });
668
- /**
669
- * A table row's emphasis — body, header (caption-styled numerals) or footer
670
- * (the 2px top rule).
671
- *
672
- * @property body - A plain body row
673
- * @property header - The caption-styled header emphasis
674
- * @property footer - The footer emphasis (2px top rule, bold numerals)
675
- */
676
- export const PlanTableEmphasisType = VariantType({ body: NullType, header: NullType, footer: NullType });
677
- // ============================================================================
678
- // Event-row leaf data — the mark kind
679
- // ============================================================================
680
- /**
681
- * An event mark's kind — ● milestone, ◇/◆ decision (pending / applied), or
682
- * ▲ exception.
683
- *
684
- * @property milestone - A milestone dot (`--ink-4`)
685
- * @property decision - A decision diamond; `applied` fills it
686
- * @property exception - A warn exception triangle
687
- */
688
- export const PlanEventMarkKindType = VariantType({
689
- milestone: NullType,
690
- decision: StructType({ applied: BooleanType }),
691
- exception: NullType,
692
- });
693
- // ============================================================================
694
- // Refs + callback payloads
695
- // ============================================================================
696
- /**
697
- * A row's identity (#822) — which series made it, and the path of entry keys
698
- * that leads to it. Every callback that names a row (`onSelect`, an element
699
- * ref's `row`, `links`, review, `expand`) carries this; `Plan.ref` /
700
- * `Plan.sectionRef` build one.
701
- *
702
- * @remarks
703
- * A path segment is an entry's key: at the top level the source key — the
704
- * String itself, or its `.east` text (`printFor(K)`) for any other key type —
705
- * and below that a `Dict` child's key or an `Array` child's index. A path is
706
- * unique by construction (keys within a collection, indices within an array),
707
- * and series keys are unique across the whole series tree, so two rows can
708
- * share an id only when a hand-built `Plan.series.rows` repeats a key — which
709
- * renders as a row diagnostic, never a silent drop.
710
- *
711
- * A drag grammar `CellRef.row` carries the id's canonical text
712
- * (`printFor(PlanRowIdType)`), so the shared drag grammar stays string-based.
713
- *
714
- * @property entry - A row made from a source entry (or a hand-built row): `{ series, path }` — `["L1"]`, `["L1", "m03"]`
715
- * @property section - A section header (`Plan.series.section`), at its parent's path
716
- */
717
- export const PlanRowIdType = VariantType({
718
- entry: StructType({ series: StringType, path: ArrayType(StringType) }),
719
- section: StructType({ series: StringType, path: ArrayType(StringType) }),
720
- });
721
- /**
722
- * One run, by reference — its row's id and its key. What a `run` element ref
723
- * carries, and what a link's two ends are.
724
- *
725
- * @property row - The row's id
726
- * @property run - The run key
727
- */
728
- export const PlanRunRefType = StructType({ row: PlanRowIdType, run: StringType });
729
- /**
730
- * One canvas element, by reference — what the root's ONE element callback
731
- * (`onElementClick`, #824) and its generalized `popover` / `hover` resolvers
732
- * (`Plan Data Interface.md` §3.3) are called with. Each ref carries the row's
733
- * id plus the element's key, so one function covers every element kind.
734
- *
735
- * @remarks
736
- * Span decision diamonds ride the `mark` arm (mark keys are unique per row).
737
- * A cell names its bucket by its instant (on the axis's arm), never an index:
738
- * the cell's own instant, or — for a bucket that folds several cells — the
739
- * bucket's start. A link names itself by its key and its two ends; it belongs
740
- * to no one row. A resolver returning `none` for a ref opens no surface —
741
- * per-element presence is the author's decision, made lazily at interaction
742
- * time.
743
- *
744
- * @property run - A span run bar (`{ row, run }`)
745
- * @property event - A bucket-event tile (`{ row, event }`)
746
- * @property chip - A cards chip (`{ row, chip }`)
747
- * @property mark - An event-row mark or span decision diamond (`{ row, mark }`)
748
- * @property cell - A heat / table / weight / segment bucket cell (`{ row, at }`)
749
- * @property link - A link ribbon (`{ key, from, to }` — the runs it joins)
750
- */
751
- export const PlanElementRefType = VariantType({
752
- run: PlanRunRefType,
753
- event: StructType({ row: PlanRowIdType, event: StringType }),
754
- chip: StructType({ row: PlanRowIdType, chip: StringType }),
755
- mark: StructType({ row: PlanRowIdType, mark: StringType }),
756
- cell: StructType({ row: PlanRowIdType, at: PlanInstantType }),
757
- link: StructType({ key: StringType, from: PlanRunRefType, to: PlanRunRefType }),
758
- });
759
- /**
760
- * The `onGroupToggle` payload — a row with children was expanded or collapsed
761
- * (fires after the in-place swap).
762
- *
763
- * @property row - The row's id
764
- * @property expanded - The new expansion state
765
- */
766
- export const PlanGroupToggleEventType = StructType({ row: PlanRowIdType, expanded: BooleanType });
767
- // ============================================================================
768
- // Editing — the gestures a draft is made by (#880)
769
- // ============================================================================
770
- /**
771
- * A library card dropped on a row (#880) — what an editable series' `create`
772
- * builds its new item from.
773
- *
774
- * @remarks
775
- * `at` is the start of the bucket the card landed in, on the axis's arm (a
776
- * time axis's UTC instant, a number axis's bucket start, an ordinal axis's
777
- * value) — the same instant a `cell` element ref reports.
778
- *
779
- * @property from - The card — the library that declared it and its item key
780
- * @property row - The row it landed on
781
- * @property at - The start of the bucket it landed in
782
- * @property duplicate - Whether the drag was an alt-drag copy
783
- */
784
- export const PlanDropType = StructType({
785
- from: LibraryRefType,
786
- row: PlanRowIdType,
787
- at: PlanInstantType,
788
- duplicate: BooleanType,
789
- });
790
- /**
791
- * A run, chip, tile or mark moved or resized (#825) — where its item goes and
792
- * the instants it takes there, which the series write into the fields they
793
- * declare (`edit: { key, start, end }`, or `at`).
794
- *
795
- * @remarks
796
- * `key` is the element's key, which is its item's (`edit.key` names the item's
797
- * key field). A move along its own row, or a resize, has `to` equal to `from`,
798
- * and sets the item's instants where it is. A move to another row takes the
799
- * item out of the list it was in and puts it, with its new instants, into the
800
- * target row's list — even when the two rows come from different entries,
801
- * which is then one gesture over both. A point element (a tile, a mark) moves
802
- * to `start`, and `end` repeats it. A row's list keeps its keys unique, so a
803
- * move onto a row whose list already holds the key is refused.
804
- *
805
- * @property key - The element's key — its item's key
806
- * @property from - The row it was on
807
- * @property to - The row it goes to — `from` itself for a resize, or a move along its row
808
- * @property start - Its start after the gesture (a point element's instant)
809
- * @property end - Its end after the gesture (a point element's instant again)
810
- */
811
- export const PlanMoveType = StructType({
812
- key: StringType,
813
- from: PlanRowIdType,
814
- to: PlanRowIdType,
815
- start: PlanInstantType,
816
- end: PlanInstantType,
817
- });
818
- /**
819
- * A gesture on the canvas — what one draft is made by (#880). A series writes
820
- * it into the entry its row came from, through the fields it declares: a
821
- * verdict into its `review.verdict` field, a drop into its `edit.items`, a
822
- * move into the item's instant fields (and, across rows, into another row's
823
- * list — #825).
824
- *
825
- * @property verdict - Approve or Reject (their "all" forms are the same verdict on every row the canvas holds)
826
- * @property drop - A library card dropped on a row
827
- * @property move - A run, chip, tile or mark moved or resized ({@link PlanMoveType}, #825)
828
- */
829
- export const PlanGestureType = VariantType({
830
- verdict: ApprovalStateType,
831
- drop: PlanDropType,
832
- move: PlanMoveType,
833
- });
834
- /**
835
- * How a row's elements move (#825) — present when its series declares the
836
- * instant fields a move writes (`edit: { key, start, end }`, or `at`).
837
- *
838
- * @remarks
839
- * `items` is the East type of the row's items, as East prints it: a run, chip,
840
- * tile or mark moves onto another row only when that row's items are the same
841
- * type, since the item itself changes lists. `resize` says whether the
842
- * elements have two ends to drag (a run, a chip) or one instant (a tile, a
843
- * mark).
844
- *
845
- * @property items - The row's item type, printed — rows of one item type share it
846
- * @property resize - Whether its elements have a start and an end to resize
847
- */
848
- export const PlanMoveEditsType = StructType({
849
- items: StringType,
850
- resize: BooleanType,
851
- });
852
- /**
853
- * Which gestures a row takes (#880) — whether its series declares the field
854
- * each one writes, so the canvas offers only what a draft can hold: the
855
- * decision buttons act on a `verdict` row, a card lands only on a `drop` row,
856
- * and an element is picked up only on a `move` row (#825).
857
- *
858
- * @property verdict - Its series names the field a verdict writes (`review.verdict`)
859
- * @property drop - Its series names where a dropped card lands and how it becomes an item (`edit.create`)
860
- * @property move - Its series names the item fields a move writes (`edit.key` and `start` / `end`, or `at`) — {@link PlanMoveEditsType}
861
- */
862
- export const PlanRowEditsType = StructType({
863
- verdict: BooleanType,
864
- drop: BooleanType,
865
- move: OptionType(PlanMoveEditsType),
866
- });
867
- /**
868
- * The entries in one window a paged canvas reads — it pages its source at
869
- * `w × PLAN_PAGE_SIZE`, and the editing session reads an entry back from the
870
- * very window it came from, so a gesture never waits on a new request (#880).
871
- */
872
- export const PLAN_PAGE_SIZE = 200;
873
- // ============================================================================
874
- // The bound UI state (#824)
875
- // ============================================================================
876
- /**
877
- * The canvas's interaction state, as a host holds it — the value behind a
878
- * root's bound `ui` ({@link PlanUiBindType}). Bound, the canvas reads it and
879
- * writes the user's actions back to it: a host selects a row, opens or folds
880
- * one, expands a chart or brings a row into view from outside (a deep link, a
881
- * list beside the canvas), and reads what the user did.
882
- *
883
- * @remarks
884
- * Rows are named by their typed ids ({@link PlanRowIdType}) in lists — an
885
- * East `Set` needs an immutable element type, and an id's path is an `Array`.
886
- * The canvas treats each list as a set, keeps the order of what it finds there
887
- * and adds what is new at the end.
888
- *
889
- * A row's collapse is the one it DECLARES (`collapsed`, per row) until
890
- * someone decides otherwise: `collapsed` lists the rows folded against it
891
- * or by the user, `expanded` the rows opened, and a row in neither follows its
892
- * declaration — so binding `ui` changes nothing about a canvas until someone
893
- * acts, and a row a paged window has not landed yet still folds as it
894
- * declares. A row in both lists is collapsed.
895
- *
896
- * `focus` is a REQUEST, not a state: write a row's id and the canvas brings
897
- * that row into view (opening the rows it nests under, and on a paged canvas
898
- * loading its window — through the source's `seek` for a row it has not
899
- * loaded yet), makes it the row the keyboard starts from, and clears the
900
- * request (`none`). A row it cannot find clears it too.
901
- *
902
- * @property selected - The selected row (`none` ⇒ no selection)
903
- * @property collapsed - Rows folded — overriding what they declare
904
- * @property expanded - Rows opened — overriding what they declare
905
- * @property charts - Chart rows expanded from spark to full height
906
- * @property focus - A row to bring into view — spent (`none`) once the canvas has
907
- */
908
- export const PlanUiStateType = StructType({
909
- selected: OptionType(PlanRowIdType),
910
- collapsed: ArrayType(PlanRowIdType),
911
- expanded: ArrayType(PlanRowIdType),
912
- charts: ArrayType(PlanRowIdType),
913
- focus: OptionType(PlanRowIdType),
914
- });
915
- /**
916
- * A bound {@link PlanUiStateType} — EXACTLY `State.bind`'s handle at it, so
917
- * `State.bind([Plan.Types.UiState], key, Plan.uiState())` passes straight
918
- * through as a root's `ui` (#824).
919
- *
920
- * @remarks
921
- * Field order is `read` / `write` / `has`: East struct subtyping is exact, so
922
- * declaring the shape here means a change to `State.bind`'s fails this file's
923
- * build rather than a canvas's.
924
- *
925
- * @property read - The current state
926
- * @property write - Replace it
927
- * @property has - Whether the key is set
928
- */
929
- export const PlanUiBindType = StructType({
930
- read: FunctionType([], PlanUiStateType),
931
- write: FunctionType([PlanUiStateType], NullType),
932
- has: FunctionType([], BooleanType),
933
- });
934
- // ============================================================================
935
- // Footer + style
936
- // ============================================================================
937
- /**
938
- * One status-footer item (mono 10px). Items with `end: true` right-align.
939
- *
940
- * @property text - The footer text (`"512 RESOURCES · 12 GROUPS · 3 IN VIEW"`)
941
- * @property tone - Optional status tint (`warning` for the exceptions count)
942
- * @property end - `true` ⇒ pushed to the right edge (`false` by default)
943
- */
944
- export const PlanFooterItemType = StructType({
945
- text: StringType,
946
- tone: OptionType(StatusValueType),
947
- end: BooleanType,
948
- });
949
- /**
950
- * The Plan style — uniform sizing (#320), density, and the gutter width.
951
- *
952
- * @property height - Definite height (`"fill"` fills the parent); header chrome pinned, body scrolls within
953
- * @property maxHeight - Max-height cap; content-sized up to it, then scrolls
954
- * @property density - Row rhythm (`compact` ⇒ dense 24px span rows)
955
- * @property gutterWidth - Explicit gutter width, a CSS px size (`"168px"`; default 168)
956
- */
957
- export const PlanStyleType = StructType({
958
- height: OptionType(StringType),
959
- maxHeight: OptionType(StringType),
960
- density: OptionType(DensityType),
961
- gutterWidth: OptionType(StringType),
962
- });
963
- // ============================================================================
964
- // Links + expand — the plain vocabulary
965
- // ============================================================================
966
- /**
967
- * One quantity link between two runs — the Plan's edge vocabulary. The root's
968
- * `links` graph carries them and the links-focus control gathers a row's
969
- * transitive upstream/downstream family over these edges. Each edge renders as
970
- * a quantity-weighted ribbon between the run edges it names; geometry is fixed
971
- * by the spec and lives in the renderer.
972
- *
973
- * @remarks
974
- * The quantity is a number with its unit and format (#824): its value weighs
975
- * the ribbon's share of the family's largest, and its caption — `text`, else
976
- * the value formatted with its unit — prints on the ribbon. A link without one
977
- * draws at the faintest share and prints nothing. A click on a ribbon reports
978
- * the `link` arm of the element ref, which names the link by its `key`.
979
- *
980
- * @property key - The link's identity (what a `link` element ref names it by)
981
- * @property from - The source run (`{ row, run }` — the ribbon leaves its end)
982
- * @property to - The destination run (the ribbon lands on its start)
983
- * @property quantity - The moved quantity (share, opacity and caption)
984
- */
985
- export const PlanLinkType = StructType({
986
- key: StringType,
987
- from: PlanRunRefType,
988
- to: PlanRunRefType,
989
- quantity: OptionType(PlanQuantityType),
990
- });
991
- /**
992
- * How a row's expand-in-place developer render treats the shared axis lines
993
- * (grid columns + the now-line) INSIDE the expanded row — the ruler above
994
- * never moves.
995
- *
996
- * @property keep - Run the grid + now-line through the render (the default)
997
- * @property dim - Wash them to 40% behind dense content
998
- * @property off - Suppress them inside the row only
999
- */
1000
- export const PlanExpandAxisType = VariantType({ keep: NullType, dim: NullType, off: NullType });
1001
- // ============================================================================
1002
- // Elements + rows — the data-only row vocabulary (pageable dataset shapes)
1003
- // ============================================================================
1004
- /**
1005
- * One span run — a continuous `[start, end)` state-run bar
1006
- * (`"RUN · B-214 · 96 t"`). Runs are quantity-bearing states, not tasks: no
1007
- * dependency arrows, no critical path.
1008
- *
1009
- * @remarks
1010
- * `quantity` is ONE value (#824, {@link PlanQuantityType}): the bar prints its
1011
- * caption after the label (the muted `.q` suffix, `"96 t"`), and a parent's
1012
- * rollup band sums its runs' values unit by unit. `state` is the shared
1013
- * `EventStateType` lifecycle driving the bar recipe; `status: warning` adds
1014
- * the `.stuck` warn ring; `moved` collapses same-status churn to a `moved ×k`
1015
- * counter. Rich click/hover surfaces resolve through the ROOT's `popover` /
1016
- * `hover` functions with the `run` arm of {@link PlanElementRefType}.
1017
- */
1018
- export const PlanRunType = StructType({
1019
- key: StringType,
1020
- start: PlanInstantType,
1021
- end: PlanInstantType,
1022
- label: StringType,
1023
- quantity: OptionType(PlanQuantityType),
1024
- state: EventStateType,
1025
- status: OptionType(StatusValueType),
1026
- moved: OptionType(IntegerType),
1027
- icon: OptionType(IconType),
1028
- });
1029
- /**
1030
- * One decision mark — the ◇/◆ diamond sitting on the run transition it
1031
- * fires (`applied` fills it). Decision detail resolves through the root's
1032
- * `popover` with the `mark` arm of {@link PlanElementRefType}.
1033
- */
1034
- export const PlanDecisionMarkType = StructType({
1035
- key: StringType,
1036
- at: PlanInstantType,
1037
- applied: BooleanType,
1038
- });
1039
- /**
1040
- * One bucket-event tile — the full Planner point-event grammar carried over
1041
- * whole (everything `PlannerEventType` had except `endSlot` — multi-bucket
1042
- * spans are span rows; the slot coordinate is the shared
1043
- * {@link PlanInstantType}).
1044
- *
1045
- * @remarks
1046
- * `label: none` ⇒ the resting look — a ✓ chip for confirmed/actual, the
1047
- * dashed `plan` chip for proposed. `icon` with `label: none` ⇒ an icon-only
1048
- * tile. In a laned row, `lane: none` is the mixed grammar — the tile takes
1049
- * the full cell across lanes. Rich surfaces resolve through the root's
1050
- * `popover` / `hover` with the `event` arm of {@link PlanElementRefType}.
1051
- */
1052
- export const PlanBucketEventType = StructType({
1053
- key: StringType,
1054
- at: PlanInstantType,
1055
- lane: OptionType(StringType),
1056
- label: OptionType(StringType),
1057
- icon: OptionType(IconType),
1058
- state: EventStateType,
1059
- tone: OptionType(StatusValueType),
1060
- color: OptionType(StringType),
1061
- colorPalette: OptionType(ColorSchemeType),
1062
- stretch: OptionType(PlanStretchType),
1063
- content: OptionType(PlanContentType),
1064
- animation: OptionType(PlanAnimationType),
1065
- });
1066
- /**
1067
- * One cards chip — a Roster shift chip spanning whole buckets. `confirmed`
1068
- * renders the brand-tint chip, proposals dashed (`+64h`),
1069
- * `proposed(removed)` the warn strikethrough, `estimated` the faint ghost a
1070
- * tap would accept. Chip detail resolves through the root's `popover` with
1071
- * the `chip` arm of {@link PlanElementRefType}.
1072
- */
1073
- export const PlanChipType = StructType({
1074
- key: StringType,
1075
- from: PlanInstantType,
1076
- to: PlanInstantType,
1077
- label: StringType,
1078
- state: EventStateType,
1079
- icon: OptionType(IconType),
1080
- });
1081
- /**
1082
- * One event-row mark — ● milestone · ◇/◆ decision · ▲ exception at an
1083
- * instant. Clusters collapse to `◇ ×3` in the renderer; labels print when
1084
- * there is room. `icon` swaps the kind's default glyph for an FA icon
1085
- * (12px, still kind-coloured) — hosts choose the glyph, never the geometry.
1086
- * Mark detail resolves through the root's `popover` with the `mark` arm of
1087
- * {@link PlanElementRefType}.
1088
- */
1089
- export const PlanEventMarkType = StructType({
1090
- key: StringType,
1091
- at: PlanInstantType,
1092
- kind: PlanEventMarkKindType,
1093
- icon: OptionType(IconType),
1094
- label: OptionType(StringType),
1095
- });
1096
- /**
1097
- * One bucket-row lane — a sub-slot within each column cell (`AM`/`PM`).
1098
- * `label: none` renders an unlabelled lane strip.
1099
- */
1100
- export const PlanLaneType = StructType({
1101
- key: StringType,
1102
- label: OptionType(StringType),
1103
- });
1104
- /**
1105
- * A row's expand-in-place declaration (R2) — pure data: the row grows and
1106
- * the ROOT's `expandRender` resolver builds the mounted body when the
1107
- * `expand` control fires. `height` is the developer region's minimum, a CSS
1108
- * px size (`none` ⇒ the renderer default); `axis` chooses how the shared
1109
- * grid + now-line run through the focused row's own plot.
1110
- */
1111
- export const PlanExpandType = StructType({
1112
- height: OptionType(StringType),
1113
- axis: PlanExpandAxisType,
1114
- });
1115
- /**
1116
- * The eight-arm row kind — `group · span · buckets · chart · heat · table ·
1117
- * cards · events` — each keeping its source component's rendered surface.
1118
- *
1119
- * @remarks
1120
- * `span` positions continuously (real instants, may cross bucket edges);
1121
- * `buckets` / `heat` / `table` / `cards` quantise to the bucket grid;
1122
- * `chart` draws per-bucket and continuous marks; `events` places instant
1123
- * marks; `group` is the heterogeneous container whose collapsed form is
1124
- * its `summary` heat strip. Whether a row with children starts collapsed is
1125
- * the ROW's `collapsed` (every kind may have children, #822).
1126
- *
1127
- * A span parent's rollup bands sum its runs' quantities unit by unit — the
1128
- * unit rides each quantity (#824). A heat parent's derived cells paint on the
1129
- * kind's `scale` (#824 — it used to ride an empty cells arm). A chart row's
1130
- * height is its `height` mode (`fixed` is its px), `expandedHeight` what the
1131
- * expanded state opens to, and `expandable` whether the user may toggle it.
1132
- */
1133
- export const PlanRowKindType = VariantType({
1134
- group: StructType({
1135
- summary: PlanGroupSummaryType,
1136
- }),
1137
- span: StructType({
1138
- runs: ArrayType(PlanRunType),
1139
- decisions: ArrayType(PlanDecisionMarkType),
1140
- ports: ArrayType(PlanPortType),
1141
- rollup: OptionType(PlanRollupType),
1142
- }),
1143
- buckets: StructType({
1144
- lanes: ArrayType(PlanLaneType),
1145
- events: ArrayType(PlanBucketEventType),
1146
- markers: ArrayType(PlanCellMarkerType),
1147
- }),
1148
- chart: StructType({
1149
- layers: ArrayType(PlanChartLayerType),
1150
- left: OptionType(PlanChartAxisType),
1151
- right: OptionType(PlanChartAxisType),
1152
- height: PlanChartHeightType,
1153
- /** Height the EXPANDED state opens to, a CSS px size like every
1154
- * component height (`"120px"`; `none` ⇒ the 88px default). */
1155
- expandedHeight: OptionType(StringType),
1156
- expandable: BooleanType,
1157
- }),
1158
- heat: StructType({
1159
- cells: PlanHeatCellsType,
1160
- aggregate: OptionType(PlanAggregateType),
1161
- /** The scale a parent's DERIVED cells paint on (#824); `none` ⇒ the extent they span. */
1162
- scale: OptionType(PlanHeatScaleType),
1163
- }),
1164
- table: StructType({
1165
- series: ArrayType(PlanTableSeriesType),
1166
- split: PlanTableSplitType,
1167
- aggregate: OptionType(TableAggregateType),
1168
- format: OptionType(TickFormatType),
1169
- emphasis: PlanTableEmphasisType,
1170
- }),
1171
- cards: StructType({
1172
- chips: ArrayType(PlanChipType),
1173
- }),
1174
- events: StructType({
1175
- marks: ArrayType(PlanEventMarkType),
1176
- }),
1177
- });
1178
- /**
1179
- * One canvas row — a pure-data, storable, pageable dataset element (no
1180
- * `UIComponentType`, no `FunctionType`).
1181
- *
1182
- * @remarks
1183
- * Rows ride the canvas's STREAM ({@link PlanRowsCollectionType}), whose order
1184
- * is the render order. `id` is the row's typed identity and `parent` the id of
1185
- * the row it nests under — the tree the renderer derives aggregates from and
1186
- * collapses by. A parent precedes its descendants, but they need not follow it
1187
- * directly: an entry's children under `Plan.series.views` come after ALL of
1188
- * that entry's view rows while nesting under the first of them. `collapsed` is
1189
- * the initial state of a row that has children; `pinned` rows render above
1190
- * the virtualised body under the ruler (both `false` unless declared, #824);
1191
- * `height` is a fixed CSS-px override; `status` the quiet gutter dot;
1192
- * `approval` the review verdict (rendered only with the root's review
1193
- * chrome); `expand` the R2 declaration (the render itself is the root's
1194
- * `expandRender` resolver); `edits` the gestures the row takes (#880 —
1195
- * neither, unless its series declares the fields they write).
1196
- */
1197
- export const PlanRowType = StructType({
1198
- id: PlanRowIdType,
1199
- parent: OptionType(PlanRowIdType),
1200
- gutter: PlanGutterType,
1201
- kind: PlanRowKindType,
1202
- collapsed: BooleanType,
1203
- pinned: BooleanType,
1204
- height: OptionType(StringType),
1205
- status: OptionType(StatusValueType),
1206
- approval: OptionType(ApprovalStateType),
1207
- expand: OptionType(PlanExpandType),
1208
- edits: PlanRowEditsType,
1209
- });
1210
- /**
1211
- * The canvas's rows — an ordered STREAM (#822). The stream IS the render
1212
- * order: the top-level series each contribute one contiguous block in
1213
- * declared order, and a parent is followed by its subtree.
1214
- *
1215
- * @remarks
1216
- * It used to be a `Dict` keyed by a row string, so the canvas sat in KEY
1217
- * order and authors numbered their keys to get a layout; two series emitting
1218
- * the same key silently lost a row. Identity is now the typed
1219
- * {@link PlanRowIdType}, which is unique by construction, and order is the
1220
- * series list's.
1221
- */
1222
- export const PlanRowsCollectionType = ArrayType(PlanRowType);
1223
- /**
1224
- * One BLOCK of the canvas's rows (#823) — the unit a paged canvas pages.
1225
- *
1226
- * @remarks
1227
- * The series list lays the canvas out block by block, top to bottom. A data
1228
- * series (`span`, `buckets`, `chart`, `heat`, `table`, `cards`, `events`,
1229
- * `group`, `views`) is one block of its entries' rows, each entry's row
1230
- * followed by its subtree: a window of a paged source holds its entries'
1231
- * share, and a paged canvas pages each such block on its own over the one
1232
- * source. A section's header and a `Plan.series.rows` block are FIXED — no
1233
- * entry produces them, so every window serves them alike and the canvas draws
1234
- * them once. A section is its header's block followed by its members' blocks,
1235
- * so the series inside a section page on their own too: inline or paged, the
1236
- * canvas draws the same rows in the same order.
1237
- *
1238
- * @property fixed - `true` when no entry produces the rows — a section's header, hand-built rows — so every window serves them alike
1239
- * @property parent - The row the block's top rows nest under — the header of the section it sits in — or `none` at the top of the canvas
1240
- * @property rows - The block's rows, in stream order
1241
- */
1242
- export const PlanBlockType = StructType({
1243
- fixed: BooleanType,
1244
- parent: OptionType(PlanRowIdType),
1245
- rows: PlanRowsCollectionType,
1246
- });
1247
- /**
1248
- * The canvas's BLOCKS (#823), in layout order — the series list's blocks, one
1249
- * after another ({@link PlanBlockType}).
1250
- *
1251
- * @remarks
1252
- * The blocks travel apart rather than concatenated so a paged canvas can page
1253
- * each one on its own. A window of a paged source is every block's share of
1254
- * that window's entries, so ONE read of a window serves every block, while
1255
- * each block keeps its own residency over the source. Inline, the blocks are
1256
- * the whole canvas, drawn one after another: the same rows in the same order
1257
- * either way.
1258
- */
1259
- export const PlanBlocksType = ArrayType(PlanBlockType);
1260
- /**
1261
- * The paged source of a `data` + `series` canvas — the SHARED row-source
1262
- * contract ({@link PagedSourceType}) instantiated at the canvas's BLOCKS
1263
- * (`Plan Data Interface.md` §3.8). The factory builds it from the author's
1264
- * source (a `Data.bindPaged` handle — paged data is bound) by wrapping each
1265
- * window with the series' `derive` functions, so the renderer only ever sees
1266
- * typed canvas-row windows — no bytes and no domain types. A window is the
1267
- * canvas's blocks over that window's entries: each data series' block holds
1268
- * the rows it derives from them, every entry with its whole subtree, and each
1269
- * fixed block its rows as ever (#823).
1270
- */
1271
- export const PlanPagedSourceType = PagedSourceType(PlanBlocksType);
1272
- /**
1273
- * The root's rows channel — the shared {@link RowSourceType} at the canvas's
1274
- * BLOCKS: `inline` blocks (what a `data`+`series` canvas over a collection
1275
- * collapses to) or a `paged` source serving a window of every block at once.
1276
- * One vocabulary across every collection, so a component never sniffs shapes
1277
- * of its own (#567).
1278
- */
1279
- export const PlanRowsType = RowSourceType(PlanBlocksType);
1280
- // ============================================================================
1281
- // The editing wire (#880) — what the canvas hands the shared session
1282
- // ============================================================================
1283
- /**
1284
- * What a Plan's `editing.onPatch` receives for entries of `R` (#880) — the
1285
- * shared patch event (`Editing.Types.PatchEvent`) over the Plan's drafts,
1286
- * which are whole entries (`Editing.Types.DraftField(R)`): every gesture
1287
- * writes a complete entry, so a draft is always its `value`.
1288
- *
1289
- * @typeParam R - The entry type
1290
- * @param entryType - The canvas's entry type
1291
- * @returns The patch event type
1292
- */
1293
- export function PlanPatchEventTypeFor(entryType) {
1294
- return EditingPatchEventTypeWith(entryType, EditingDraftFieldType(entryType));
1295
- }
1296
- /**
1297
- * One entry's gesture, to be written (#880) — the entry's id (its key's text),
1298
- * its bytes, the rows the gesture was made on, and the gesture. Approve all
1299
- * writes every entry the canvas holds in one call, and a move to another row
1300
- * writes the entry holding its source row, then the one holding its target
1301
- * (#825) — one request when both rows are the same entry's.
1302
- *
1303
- * @internal
1304
- * @property id - The entry's id — its key, as a row path's first segment spells it
1305
- * @property entry - The entry as it stands now (its draft, else the source's), encoded
1306
- * @property rows - The rows the gesture was made on — one, each of the entry's for a verdict on all, or a move's source then target
1307
- * @property gesture - The gesture
1308
- */
1309
- export const PlanWriteRequestType = StructType({
1310
- id: StringType,
1311
- entry: BlobType,
1312
- rows: ArrayType(PlanRowIdType),
1313
- gesture: PlanGestureType,
1314
- });
1315
- /**
1316
- * A drafted entry the author's readiness check reads (#880).
1317
- *
1318
- * @internal
1319
- * @property id - The entry's id
1320
- * @property entry - The drafted entry, encoded
1321
- */
1322
- export const PlanReadyEntryType = StructType({ id: StringType, entry: BlobType });
1323
- const PlanEditingTypeImpl = StructType({
1324
- ...EditingSessionFields,
1325
- derive: FunctionType([IntegerType, IntegerType, DictType(StringType, BlobType)], OptionType(PlanBlocksType)),
1326
- deriveEntry: FunctionType([StringType, BlobType], PlanBlocksType),
1327
- write: FunctionType([ArrayType(PlanWriteRequestType)], ArrayType(OptionType(BlobType))),
1328
- entryIds: FunctionType([IntegerType, IntegerType], OptionType(ArrayType(StringType))),
1329
- ready: OptionType(FunctionType([ArrayType(PlanReadyEntryType)], ArrayType(EditingReadinessType))),
1330
- });
1331
- /**
1332
- * The Plan's editing declaration, on the wire (#880) — the shared session's
1333
- * fields ({@link EditingSessionFields}) and the canvas's own. Every value
1334
- * crosses as bytes at the exact entry type the wire names, so the arm stays a
1335
- * closed type whatever the canvas's entries are.
1336
- *
1337
- * @internal
1338
- * @property derive - The canvas's blocks with drafted entries in place of the source's — `(offset, limit, drafts by id)`: inline the whole source (offset and limit unread), paged the window `(offset, limit)`, `none` while it is in flight. The series applied to the drafted entries, so a draft draws exactly as the applied batch would.
1339
- * @property deriveEntry - One entry's blocks — `(id, entry)` — the rows a draft is compared by, where it was made
1340
- * @property write - Gestures written into their entries — each request's entry, or `none` when no series takes it; a move carries its item from the request holding its source row to the one holding its target, and is refused whole (every result `none`) unless both take it — a target whose list already holds the item's key does not (#825)
1341
- * @property entryIds - The ids of the source's entries `[offset, offset + limit)`, `none` while in flight — how the session reads an entry back after an Apply
1342
- * @property ready - The author's readiness check over drafted entries, one result each, in order
1343
- */
1344
- export const PlanEditingType = PlanEditingTypeImpl;
1345
- //# sourceMappingURL=types.js.map