@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,673 +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 value builders — shorthand resolvers, the instant sugar
7
- * ({@link resolveInstant} / `Plan.at`), the axis declarations (`Plan.axis`,
8
- * `.time` / `.number` / `.ordinal`), element value builders (`Plan.run` /
9
- * `decision` / `port` / `event` / `marker` / `chip` / `mark`) and cell
10
- * builders (`heatCells` / `weightCells` / `segmentCells` / `tableCells`).
11
- * Every element is pure data — rich click/hover surfaces resolve through
12
- * the ROOT's `popover` / `hover` functions over `PlanElementRefType`
13
- * (`Plan Data Interface.md` §3.3), never per-element embeds.
14
- *
15
- * @packageDocumentation
16
- */
17
- import { East, Expr, ArrayType, BooleanType, DateTimeType, FloatType, IntegerType, OptionType, StringType, StructType, variant, some, none, } from "@elaraai/east";
18
- import { TickFormatType } from "../../format/types.js";
19
- import { IconType } from "../../display/icon/types.js";
20
- import { StatusValueType } from "../../feedback/status/types.js";
21
- import { ColorSchemeType } from "../../style/scheme.js";
22
- import { EventStateType } from "../../contracts/states.js";
23
- import { TimeResolutionType } from "../../contracts/time.js";
24
- import { MatrixFillType } from "../matrix/types.js";
25
- import { PlanAxisType, PlanInstantType, PlanPortType, PlanCellMarkerType, PlanStretchType, PlanContentAlignType, PlanContentType, PlanAnimationType, PlanEventMarkKindType, PlanHeatCellType, PlanWeightCellType, PlanSegmentType, PlanSegmentCellType, PlanHeatCellsType, PlanTableCellType, PlanTableToneType, PlanTableSeriesType, PlanLinkType, PlanRunType, PlanDecisionMarkType, PlanBucketEventType, PlanChipType, PlanEventMarkType, PlanLaneType, PlanRowIdType, PlanFoldType, PlanQuantityType, PlanHeatScaleType, PlanUiStateType, } from "./types.js";
26
- // ============================================================================
27
- // Shorthand resolvers
28
- // ============================================================================
29
- /**
30
- * Resolves the shared event-lifecycle string shorthands into an
31
- * {@link EventStateType} value: `"estimated"`, `"added"`, `"recommended"`,
32
- * `"removed"` (the three `proposed` flavours), `"confirmed"`,
33
- * `"in-progress"`, `"actual"`, `"rejected"`.
34
- *
35
- * @param state - An `EventStateType` value/expression or a string shorthand
36
- * @returns The resolved `EventStateType` value
37
- */
38
- export function resolvePlanEventState(state) {
39
- if (typeof state !== "string")
40
- return state;
41
- switch (state) {
42
- case "estimated": return East.value(variant("estimated", null), EventStateType);
43
- case "added": return East.value(variant("proposed", variant("added", null)), EventStateType);
44
- case "recommended": return East.value(variant("proposed", variant("recommended", null)), EventStateType);
45
- case "removed": return East.value(variant("proposed", variant("removed", null)), EventStateType);
46
- case "confirmed": return East.value(variant("confirmed", null), EventStateType);
47
- case "in-progress": return East.value(variant("in-progress", null), EventStateType);
48
- case "actual": return East.value(variant("actual", null), EventStateType);
49
- case "rejected": return East.value(variant("rejected", null), EventStateType);
50
- }
51
- }
52
- /** Resolve a null-payload variant string shorthand against its East type. */
53
- export function resolveTag(v, type) {
54
- const value = typeof v === "string" ? variant(v, null) : v;
55
- return East.value(value, type);
56
- }
57
- /**
58
- * Resolve a fold input, falling back to the default of what it folds.
59
- *
60
- * @param fold - The declared fold, if any
61
- * @param fallback - The default for the values being folded (`mean` for levels, `sum` for amounts)
62
- * @returns The fold
63
- */
64
- export function resolveFold(fold, fallback) {
65
- return resolveTag(fold ?? fallback, PlanFoldType);
66
- }
67
- /** Resolve a {@link PlanIconInput} into an `IconType` value. */
68
- export function resolveIcon(icon) {
69
- if (typeof icon === "string") {
70
- return East.value({ prefix: "fas", name: icon, label: none, style: none }, IconType);
71
- }
72
- if (typeof icon.prefix === "string") {
73
- return East.value({
74
- prefix: icon.prefix,
75
- name: icon.name,
76
- label: none,
77
- style: none,
78
- }, IconType);
79
- }
80
- return icon;
81
- }
82
- // ============================================================================
83
- // Instants — the axis-kind sugar
84
- // ============================================================================
85
- /**
86
- * Resolves an instant input into a {@link PlanInstantType} value — the one
87
- * place the arm is inferred (#631).
88
- *
89
- * @remarks
90
- * The input is any {@link PlanInstantLikeType} value or expression. JS values
91
- * wrap by their type (`Date` ⇒ `time`, `number` / `bigint` ⇒ `number`,
92
- * `string` ⇒ `ordinal`); East expressions wrap by their STATIC type
93
- * (`DateTimeType` ⇒ `time`, `FloatType` ⇒ `number`, `IntegerType` ⇒ `number`
94
- * via `toFloat`, `StringType` ⇒ `ordinal`); a {@link PlanInstantType} value
95
- * or expression passes through (subtype-checked by `East.value`). Nothing
96
- * here knows the canvas axis — the arm is the INPUT's; the renderer holds it
97
- * against the root's declaration.
98
- *
99
- * @param v - The instant (a value or expression of a {@link PlanInstantLikeType})
100
- * @param where - The field being resolved, for the error message
101
- * @returns The instant as a `PlanInstantType` expression
102
- * @throws {Error} If `v` is an expression of a non-instant type
103
- */
104
- export function resolveInstant(v, where) {
105
- if (v instanceof Date)
106
- return East.value(variant("time", v), PlanInstantType);
107
- if (typeof v === "number")
108
- return East.value(variant("number", v), PlanInstantType);
109
- if (typeof v === "bigint")
110
- return East.value(variant("number", Number(v)), PlanInstantType);
111
- if (typeof v === "string")
112
- return East.value(variant("ordinal", v), PlanInstantType);
113
- if (v instanceof Expr) {
114
- const tag = Expr.type(v).type;
115
- switch (tag) {
116
- case "DateTime": return East.value(variant("time", v), PlanInstantType);
117
- case "Float": return East.value(variant("number", v), PlanInstantType);
118
- case "Integer": return East.value(variant("number", v.toFloat()), PlanInstantType);
119
- case "String": return East.value(variant("ordinal", v), PlanInstantType);
120
- case "Variant": return East.value(v, PlanInstantType);
121
- default:
122
- throw new Error(`Plan: ${where} must be an instant — a Date / number / string, a DateTime / Float / ` +
123
- `Integer / String expression, or a Plan.at.* value (got a ${tag} expression)`);
124
- }
125
- }
126
- // A plain variant VALUE (`variant("time", d)`, a decoded instant).
127
- return East.value(v, PlanInstantType);
128
- }
129
- /**
130
- * The `Plan.at` builders — one instant per axis kind, explicitly. The
131
- * element builders already wrap by type; these are for element RECORDS
132
- * written as data (`{ at: Plan.at.time(week(27n)), … }` in a
133
- * `Plan.Types.HeatCell` array) and for reading as a declaration. Each
134
- * result is BRANDED with its arm ({@link PlanInstantExpr}), so a cell
135
- * list built from them carries the kind to the root's compile-time check.
136
- */
137
- export const at = {
138
- /**
139
- * A `time` instant.
140
- *
141
- * @param v - The UTC instant (a `Date` or `DateTimeType` expression)
142
- * @returns A `PlanInstantType` expression with the `time` arm, branded `"time"`
143
- */
144
- time: (v) => East.value(variant("time", v), PlanInstantType),
145
- /**
146
- * A `number` instant.
147
- *
148
- * @param v - The position (a number or `FloatType` expression)
149
- * @returns A `PlanInstantType` expression with the `number` arm, branded `"number"`
150
- */
151
- number: (v) => East.value(variant("number", v), PlanInstantType),
152
- /**
153
- * An `ordinal` instant.
154
- *
155
- * @param v - The declared value (a string or `StringType` expression)
156
- * @returns A `PlanInstantType` expression with the `ordinal` arm, branded `"ordinal"`
157
- */
158
- ordinal: (v) => East.value(variant("ordinal", v), PlanInstantType),
159
- };
160
- // ============================================================================
161
- // Axis — the three kinds
162
- // ============================================================================
163
- /**
164
- * The axis values built WITHOUT a window (#822) — a canvas given one must bind
165
- * a slice, whose range supplies the window, or the root refuses it at build
166
- * time. An axis held in a variable (`$.const(Plan.axis(…))`) is not the value
167
- * recorded here, so its canvas is held to the rule at render instead.
168
- */
169
- export const WINDOWLESS_AXES = new WeakSet();
170
- /**
171
- * Builds the `time` axis declaration — `Plan.axis({ … })` / `Plan.axis.time`.
172
- *
173
- * @param options - Window, resolution(s), now instant and tick format ({@link PlanAxisOptions})
174
- * @returns An East expression of {@link PlanAxisType} (the `time` arm), branded `"time"` — the root's canvas kind
175
- *
176
- * @remarks
177
- * The window is half-open `[min, max)` in UTC; omit it to follow the bound
178
- * slice's datetime range — a canvas states one or the other (#822). There is
179
- * no fit to the data. `resolutions` lists the WEEK/DAY-style segment options
180
- * (omit ⇒ no segment). When the Plan is slice-bound, slice state supersedes
181
- * window + resolution after mount — the slice is the single source of truth.
182
- */
183
- export function createTimeAxis(options) {
184
- const axis = East.value(variant("time", {
185
- window: options.window !== undefined
186
- ? some({ min: options.window.min, max: options.window.max })
187
- : none,
188
- resolution: resolveTag(options.resolution, TimeResolutionType),
189
- resolutions: (options.resolutions ?? []).map(r => resolveTag(r, TimeResolutionType)),
190
- now: options.now !== undefined ? some(options.now) : none,
191
- format: options.format !== undefined ? some(options.format) : none,
192
- }), PlanAxisType);
193
- if (options.window === undefined)
194
- WINDOWLESS_AXES.add(axis);
195
- return axis;
196
- }
197
- /**
198
- * Builds the `number` axis declaration — `Plan.axis.number({ … })`.
199
- *
200
- * @param options - Window, step, now position and tick format ({@link PlanNumberAxisOptions})
201
- * @returns An East expression of {@link PlanAxisType} (the `number` arm), branded `"number"` — the root's canvas kind
202
- * @throws {Error} If a literal `step` is not `> 0`
203
- *
204
- * @remarks
205
- * `[min, max)` ÷ `step` = `n` buckets, edges on whole multiples of `step`
206
- * (the `TimeResolution` rule, numerically). Omit the window to follow the
207
- * bound slice's `float` / `integer` range — a canvas states one or the other
208
- * (#822). Element instants on this canvas are numbers — a `FloatType` /
209
- * `IntegerType` accessor or a bare number wraps to the `number` arm.
210
- */
211
- export function createNumberAxis(options) {
212
- if (typeof options.step === "number" && !(options.step > 0)) {
213
- throw new Error(`Plan.axis.number: \`step\` must be > 0 (got ${options.step}) — it is the bucket width`);
214
- }
215
- const axis = East.value(variant("number", {
216
- window: options.window !== undefined
217
- ? some({ min: options.window.min, max: options.window.max })
218
- : none,
219
- step: options.step,
220
- now: options.now !== undefined ? some(options.now) : none,
221
- format: options.format !== undefined ? some(options.format) : none,
222
- }), PlanAxisType);
223
- if (options.window === undefined)
224
- WINDOWLESS_AXES.add(axis);
225
- return axis;
226
- }
227
- /**
228
- * Builds the `ordinal` axis declaration — `Plan.axis.ordinal({ … })`.
229
- *
230
- * @param options - The ordered values and the now value ({@link PlanOrdinalAxisOptions})
231
- * @returns An East expression of {@link PlanAxisType} (the `ordinal` arm), branded `"ordinal"` — the root's canvas kind
232
- * @throws {Error} If a literal `values` list is empty
233
- *
234
- * @remarks
235
- * The declared values ARE the buckets, one each, in order; the window is
236
- * the whole list, so there is no slice range to brush and the window keys
237
- * idle. Element instants on this canvas are the values — a `StringType`
238
- * accessor or a bare string wraps to the `ordinal` arm.
239
- */
240
- export function createOrdinalAxis(options) {
241
- if (Array.isArray(options.values) && options.values.length === 0) {
242
- throw new Error("Plan.axis.ordinal: `values` must list at least one value — the list is the axis");
243
- }
244
- return East.value(variant("ordinal", {
245
- values: East.value(options.values, ArrayType(StringType)),
246
- now: options.now !== undefined ? some(options.now) : none,
247
- }), PlanAxisType);
248
- }
249
- /**
250
- * Builds the shared axis declaration — `Plan.axis({ … })` is the `time`
251
- * shorthand; `Plan.axis.time` / `.number` / `.ordinal` declare each kind.
252
- *
253
- * @param options - The time-axis options ({@link PlanAxisOptions})
254
- * @returns An East expression of {@link PlanAxisType}, branded with its kind
255
- */
256
- export const createAxis = Object.assign(function axis(options) { return createTimeAxis(options); }, { time: createTimeAxis, number: createNumberAxis, ordinal: createOrdinalAxis });
257
- /**
258
- * Builds a quantity — a number with its unit and how it prints (#824). A run
259
- * carries one as its `quantity` (its bar prints it; a parent's rollup band sums
260
- * its runs' per unit), and so does a link (its ribbon's share and caption).
261
- *
262
- * @param value - The amount (a number or `FloatType` expression)
263
- * @param options - Its unit, format and caption override ({@link PlanQuantityOptions})
264
- * @returns An East expression of {@link PlanQuantityType}
265
- */
266
- export function createQuantity(value, options) {
267
- return East.value({
268
- value,
269
- unit: options?.unit !== undefined ? some(options.unit) : none,
270
- format: options?.format !== undefined ? some(East.value(options.format, TickFormatType)) : none,
271
- text: options?.text !== undefined ? some(options.text) : none,
272
- }, PlanQuantityType);
273
- }
274
- /**
275
- * Builds one span run from a flat input. The result is BRANDED with the axis
276
- * kind `start` / `end` imply ({@link PlanKindOf}) — a `DateTimeType` accessor
277
- * makes a `"time"` run, a `FloatType` one a `"number"` run — so the series and
278
- * root can refuse a mismatched kind at compile time; an erased input (an
279
- * `Expr<PlanInstantType>`) leaves the run unbranded.
280
- *
281
- * @typeParam S - The `start` input's type
282
- * @typeParam E - The `end` input's type
283
- * @param input - The run configuration ({@link PlanRunInput})
284
- * @returns An East expression of {@link PlanRunType}, branded with its kind
285
- */
286
- export function createRun(input) {
287
- return East.value({
288
- key: input.key,
289
- start: resolveInstant(input.start, "run start"),
290
- end: resolveInstant(input.end, "run end"),
291
- label: input.label,
292
- quantity: input.quantity !== undefined ? some(East.value(input.quantity, PlanQuantityType)) : none,
293
- state: resolvePlanEventState(input.state),
294
- status: input.status !== undefined ? some(resolveTag(input.status, StatusValueType)) : none,
295
- moved: input.moved !== undefined ? some(typeof input.moved === "number" ? BigInt(input.moved) : input.moved) : none,
296
- icon: input.icon !== undefined ? some(resolveIcon(input.icon)) : none,
297
- }, PlanRunType);
298
- }
299
- /**
300
- * Builds one decision mark from a flat input, branded with `at`'s kind.
301
- *
302
- * @typeParam A - The `at` input's type
303
- * @param input - The decision configuration ({@link PlanDecisionInput})
304
- * @returns An East expression of {@link PlanDecisionMarkType}, branded with its kind
305
- */
306
- export function createDecision(input) {
307
- return East.value({
308
- key: input.key,
309
- at: resolveInstant(input.at, "decision at"),
310
- applied: input.applied,
311
- }, PlanDecisionMarkType);
312
- }
313
- /**
314
- * Builds one port glyph from a flat input, branded with `at`'s kind.
315
- *
316
- * @typeParam A - The `at` input's type
317
- * @param input - The port configuration ({@link PlanPortInput})
318
- * @returns An East expression of {@link PlanPortType}, branded with its kind
319
- */
320
- export function createPort(input) {
321
- return East.value({
322
- at: resolveInstant(input.at, "port at"),
323
- label: input.label !== undefined ? some(input.label) : none,
324
- }, PlanPortType);
325
- }
326
- /**
327
- * Builds one bucket event from a flat input, branded with `at`'s kind.
328
- *
329
- * @typeParam A - The `at` input's type
330
- * @param input - The event configuration ({@link PlanBucketEventInput})
331
- * @returns An East expression of {@link PlanBucketEventType}, branded with its kind
332
- */
333
- export function createBucketEvent(input) {
334
- const content = input.content !== undefined
335
- ? some(East.value({
336
- horizontal: input.content.horizontal !== undefined ? some(resolveTag(input.content.horizontal, PlanContentAlignType)) : none,
337
- vertical: input.content.vertical !== undefined ? some(resolveTag(input.content.vertical, PlanContentAlignType)) : none,
338
- }, PlanContentType))
339
- : none;
340
- return East.value({
341
- key: input.key,
342
- at: resolveInstant(input.at, "event at"),
343
- lane: input.lane !== undefined ? some(input.lane) : none,
344
- label: input.label !== undefined ? some(input.label) : none,
345
- icon: input.icon !== undefined ? some(resolveIcon(input.icon)) : none,
346
- state: resolvePlanEventState(input.state),
347
- tone: input.tone !== undefined ? some(resolveTag(input.tone, StatusValueType)) : none,
348
- color: input.color !== undefined ? some(input.color) : none,
349
- colorPalette: input.colorPalette !== undefined ? some(resolveTag(input.colorPalette, ColorSchemeType)) : none,
350
- stretch: input.stretch !== undefined ? some(resolveTag(input.stretch, PlanStretchType)) : none,
351
- content,
352
- animation: input.animation !== undefined ? some(resolveTag(input.animation, PlanAnimationType)) : none,
353
- }, PlanBucketEventType);
354
- }
355
- /**
356
- * Builds one bucket-row lane from a flat input.
357
- *
358
- * @param input - The lane configuration ({@link PlanLaneInput})
359
- * @returns An East expression of {@link PlanLaneType}
360
- */
361
- export function createLane(input) {
362
- return East.value({
363
- key: input.key,
364
- label: input.label !== undefined ? some(input.label) : none,
365
- }, PlanLaneType);
366
- }
367
- /**
368
- * A row's id by its series and path — `Plan.ref("machine-jobs", "L1", "m03")`
369
- * is the row series `machine-jobs` made from entry `m03` under `L1` (#822).
370
- * What `links` name their ends with, and what a callback's row compares to.
371
- *
372
- * @remarks
373
- * A segment is an entry's key as the canvas prints it: a String key as is, any
374
- * other key type as its `.east` text (`printFor`), an `Array` child's index as
375
- * its digits.
376
- *
377
- * @param series - The series key
378
- * @param path - The entry keys that lead to the row, outermost first
379
- * @returns The `entry` id
380
- */
381
- export function createRef(series, ...path) {
382
- return East.value(variant("entry", { series, path }), PlanRowIdType);
383
- }
384
- /**
385
- * A section header's id — `Plan.sectionRef("crew-block", "L1")` is the
386
- * `crew-block` section's header under entry `L1`; a top-level section's path
387
- * is empty (#822).
388
- *
389
- * @param series - The section's series key
390
- * @param path - The path of the entry the section sits under (empty at the top level)
391
- * @returns The `section` id
392
- */
393
- export function createSectionRef(series, ...path) {
394
- return East.value(variant("section", { series, path }), PlanRowIdType);
395
- }
396
- /**
397
- * Builds a {@link PlanUiStateType} value — the seed of a bound `ui` state
398
- * (`State.bind([Plan.Types.UiState], key, Plan.uiState())`, #824). Omitted
399
- * fields are empty: nothing selected, every row as it declares, no chart
400
- * expanded, nothing to bring into view.
401
- *
402
- * @param init - What the state starts as ({@link PlanUiStateInput})
403
- * @returns An East expression of {@link PlanUiStateType}
404
- */
405
- export function createUiState(init) {
406
- const ids = (list) => East.value((list ?? []), ArrayType(PlanRowIdType));
407
- return East.value({
408
- selected: init?.selected !== undefined ? some(East.value(init.selected, PlanRowIdType)) : none,
409
- collapsed: ids(init?.collapsed),
410
- expanded: ids(init?.expanded),
411
- charts: ids(init?.charts),
412
- focus: init?.focus !== undefined ? some(East.value(init.focus, PlanRowIdType)) : none,
413
- }, PlanUiStateType);
414
- }
415
- /**
416
- * Builds one link edge from a flat input. Links are root DATA
417
- * (`links={transfers.map(($, t) => Plan.link({ … }))}`): the links-focus
418
- * control gathers a row's transitive upstream/downstream family over them.
419
- *
420
- * @param input - The link configuration ({@link PlanLinkInput})
421
- * @returns An East expression of {@link PlanLinkType}
422
- */
423
- export function createLink(input) {
424
- return East.value({
425
- key: input.key,
426
- from: { row: input.from, run: input.fromRun },
427
- to: { row: input.to, run: input.toRun },
428
- quantity: input.quantity !== undefined ? some(East.value(input.quantity, PlanQuantityType)) : none,
429
- }, PlanLinkType);
430
- }
431
- /**
432
- * Builds one cell marker from a flat input, branded with `at`'s kind.
433
- *
434
- * @typeParam A - The `at` input's type
435
- * @param input - The marker configuration ({@link PlanCellMarkerInput})
436
- * @returns An East expression of {@link PlanCellMarkerType}, branded with its kind
437
- */
438
- export function createCellMarker(input) {
439
- return East.value({
440
- at: resolveInstant(input.at, "marker at"),
441
- lane: input.lane !== undefined ? some(input.lane) : none,
442
- status: resolveTag(input.status ?? "danger", StatusValueType),
443
- message: input.message,
444
- }, PlanCellMarkerType);
445
- }
446
- /**
447
- * Builds one cards chip from a flat input, branded with the kind `from` /
448
- * `to` imply.
449
- *
450
- * @typeParam F - The `from` input's type
451
- * @typeParam T - The `to` input's type
452
- * @param input - The chip configuration ({@link PlanChipInput})
453
- * @returns An East expression of {@link PlanChipType}, branded with its kind
454
- */
455
- export function createChip(input) {
456
- return East.value({
457
- key: input.key,
458
- from: resolveInstant(input.from, "chip from"),
459
- to: resolveInstant(input.to, "chip to"),
460
- label: input.label,
461
- state: resolvePlanEventState(input.state),
462
- icon: input.icon !== undefined ? some(resolveIcon(input.icon)) : none,
463
- }, PlanChipType);
464
- }
465
- /**
466
- * Builds one event mark from a flat input, branded with `at`'s kind.
467
- *
468
- * @typeParam A - The `at` input's type
469
- * @param input - The mark configuration ({@link PlanEventMarkInput})
470
- * @returns An East expression of {@link PlanEventMarkType}, branded with its kind
471
- */
472
- export function createEventMark(input) {
473
- return East.value({
474
- key: input.key,
475
- at: resolveInstant(input.at, "mark at"),
476
- kind: typeof input.kind === "string" ? East.value(variant(input.kind, null), PlanEventMarkKindType) : input.kind,
477
- icon: input.icon !== undefined ? some(resolveIcon(input.icon)) : none,
478
- label: input.label !== undefined ? some(input.label) : none,
479
- }, PlanEventMarkType);
480
- }
481
- /** The `Plan.markKind` builders — non-null mark kinds. */
482
- export const markKind = {
483
- /**
484
- * A decision diamond mark — ◇ pending / ◆ applied.
485
- *
486
- * @param applied - `true` fills the diamond
487
- * @returns A `PlanEventMarkKindType` expression with the `decision` arm
488
- */
489
- decision: (applied) => East.value(variant("decision", { applied }), PlanEventMarkKindType),
490
- };
491
- /**
492
- * Build a heat scale value from its input.
493
- *
494
- * @param input - The scale ({@link PlanHeatScaleInput}); omit ⇒ every bound from the values shown
495
- * @returns An East expression of {@link PlanHeatScaleType}
496
- */
497
- export function createHeatScale(input) {
498
- return East.value({
499
- min: input?.min !== undefined ? some(input.min) : none,
500
- max: input?.max !== undefined ? some(input.max) : none,
501
- warnAt: input?.warnAt !== undefined ? some(input.warnAt) : none,
502
- }, PlanHeatScaleType);
503
- }
504
- /** The declared `format`, as the arm's option. */
505
- function formatOpt(format) {
506
- return format !== undefined
507
- ? East.value(some(East.value(format, TickFormatType)), OptionType(TickFormatType))
508
- : East.value(none, OptionType(TickFormatType));
509
- }
510
- /**
511
- * Wraps per-bucket heat cells into the `heat` arm of {@link PlanHeatCellsType}.
512
- * Literal records whose `at` is a `Plan.at.*` value brand the result with
513
- * that kind ({@link PlanCellsInput}); an East array is kind-erased.
514
- *
515
- * @remarks
516
- * At a coarser resolution than the cells', a bucket shows ONE cell — the
517
- * `fold` of the cells in it (`"mean"` by default: a heat cell is a level).
518
- * A cell prints its `label`; one without prints its value only through a
519
- * declared `format` (#824).
520
- *
521
- * @typeParam K - The kind inferred from the literal records' `at`
522
- * @param cells - The cells (`{ at, value, label }` structs; `value: none` ⇒ the no-data hatch)
523
- * @param options - Scale, warn threshold, fold and format ({@link PlanHeatCellsOptions})
524
- * @returns A `PlanHeatCellsType` expression, branded with the cells' kind
525
- */
526
- export function createHeatCells(cells, options) {
527
- return East.value(variant("heat", {
528
- cells: East.value(cells, ArrayType(PlanHeatCellType)),
529
- scale: createHeatScale(options),
530
- fold: resolveFold(options?.fold, "mean"),
531
- format: formatOpt(options?.format),
532
- }), PlanHeatCellsType);
533
- }
534
- /**
535
- * Wraps per-bucket weight cells into the `weight` arm of
536
- * {@link PlanHeatCellsType} (booked-vs-free bars; planned ⇒ pale). Literal
537
- * records with `Plan.at.*` instants brand the result with their kind.
538
- *
539
- * @remarks
540
- * At a coarser resolution, a bucket shows ONE bar — the `fold` of its cells'
541
- * fractions (`"mean"` by default: a cell is the fraction of its bucket booked,
542
- * and a month's fraction is its weeks' mean), pale only when every cell in it
543
- * is planned. `format` prints the fraction in the words a reader hears
544
- * (default: a percent).
545
- *
546
- * @typeParam K - The kind inferred from the literal records' `at`
547
- * @param cells - The cells (`{ at, fraction, planned }` structs)
548
- * @param options - Fold and format ({@link PlanCellsFoldOptions})
549
- * @returns A `PlanHeatCellsType` expression, branded with the cells' kind
550
- */
551
- export function createWeightCells(cells, options) {
552
- return East.value(variant("weight", {
553
- cells: East.value(cells, ArrayType(PlanWeightCellType)),
554
- fold: resolveFold(options?.fold, "mean"),
555
- format: formatOpt(options?.format),
556
- }), PlanHeatCellsType);
557
- }
558
- /**
559
- * Wraps per-bucket segment cells into the `segments` arm of
560
- * {@link PlanHeatCellsType} (committed / pending / slack compositions).
561
- * Literal records with `Plan.at.*` instants brand the result with their kind.
562
- *
563
- * @remarks
564
- * At a coarser resolution, a bucket shows ONE composition — each fill's
565
- * weights folded across the cells in it (`"sum"` by default: the weights are
566
- * amounts, and the bar normalises them). `format` prints a segment's share in
567
- * the words a reader hears (default: a percent).
568
- *
569
- * @typeParam K - The kind inferred from the literal records' `at`
570
- * @param cells - The cells (`{ at, segments }` structs — build segments with `Plan.segment`)
571
- * @param options - Fold and format ({@link PlanCellsFoldOptions})
572
- * @returns A `PlanHeatCellsType` expression, branded with the cells' kind
573
- */
574
- export function createSegmentCells(cells, options) {
575
- return East.value(variant("segments", {
576
- cells: East.value(cells, ArrayType(PlanSegmentCellType)),
577
- fold: resolveFold(options?.fold, "sum"),
578
- format: formatOpt(options?.format),
579
- }), PlanHeatCellsType);
580
- }
581
- /**
582
- * Builds one segment from a flat input (the Matrix segment vocabulary).
583
- *
584
- * @param input - The segment configuration ({@link PlanSegmentInput})
585
- * @returns An East expression of {@link PlanSegmentType}
586
- */
587
- export function createSegment(input) {
588
- return East.value({
589
- fill: resolveTag(input.fill, MatrixFillType),
590
- weight: input.weight,
591
- label: input.label !== undefined ? some(input.label) : none,
592
- }, PlanSegmentType);
593
- }
594
- /**
595
- * Builds one table-row value series (see {@link Plan.table}'s `series`) —
596
- * per-position style declared once, raw cells beneath it; the result carries
597
- * the cells' axis kind.
598
- *
599
- * @typeParam K - The cells' axis kind
600
- * @param input - The series configuration ({@link PlanTableSeriesInput})
601
- * @returns An East expression of {@link PlanTableSeriesType}, branded with the cells' kind
602
- */
603
- export function createTableSeries(input) {
604
- return East.value({
605
- cells: East.value(input.cells, ArrayType(PlanTableCellType)),
606
- format: input.format !== undefined ? some(East.value(input.format, TickFormatType)) : none,
607
- tone: input.tone !== undefined ? some(resolveTag(input.tone, PlanTableToneType)) : none,
608
- strong: input.strong ?? false,
609
- rollup: input.rollup ?? false,
610
- fold: resolveFold(input.fold, "sum"),
611
- }, PlanTableSeriesType);
612
- }
613
- /**
614
- * Builds per-bucket table cells from raw values. The RENDERER prints each
615
- * value through the row's `format` (a `Format.*` spec — the shared
616
- * `TickFormatType`), tones negatives `neg` and renders `none` as the muted
617
- * em-dash; build `PlanTableCellType` values directly for explicit `text` /
618
- * `tone` overrides.
619
- *
620
- * @remarks
621
- * The `at` of each raw cell wraps to the axis arm by its type — a
622
- * `DateTimeType` field to `time`, a numeric field to `number`, a string
623
- * field to `ordinal`, a {@link PlanInstantType} field as is — so a
624
- * `{ at: DateTimeType, value }` dataset keeps compiling unchanged.
625
- *
626
- * Literal records brand the result with the kind their `at` implies
627
- * ({@link PlanKindOf}); an East array is kind-erased.
628
- *
629
- * @typeParam A - The literal records' `at` type
630
- * @param cells - The raw cells (`{ at, value }` records; `value` an `Option<Float>`)
631
- * @returns An `ArrayType(PlanTableCellType)` expression, branded with the cells' kind
632
- * @throws {Error} If an East array's element `at` is not an instant-typed field
633
- */
634
- export function createTableCells(cells) {
635
- if (Array.isArray(cells)) {
636
- // Each element is a literal record or a struct expression; both
637
- // expose `at` / `value` (a struct expression's field accessors carry
638
- // the field's static type, which is what `resolveInstant` reads).
639
- const built = cells.map((c) => {
640
- const rec = c;
641
- return East.value({
642
- at: resolveInstant(rec.at, "tableCells at"),
643
- value: East.value(rec.value, OptionType(FloatType)),
644
- text: none,
645
- tone: none,
646
- }, PlanTableCellType);
647
- });
648
- return East.value(built, ArrayType(PlanTableCellType));
649
- }
650
- // An East array — wrap `at` by its STATIC element type, once for the map.
651
- const raw = cells;
652
- const elem = Expr.type(raw).value;
653
- const atTag = (elem.fields.at).type;
654
- const wrap = (v) => {
655
- switch (atTag) {
656
- case "DateTime": return East.value(variant("time", v), PlanInstantType);
657
- case "Float": return East.value(variant("number", v), PlanInstantType);
658
- case "Integer": return East.value(variant("number", v.toFloat()), PlanInstantType);
659
- case "String": return East.value(variant("ordinal", v), PlanInstantType);
660
- case "Variant": return East.value(v, PlanInstantType);
661
- default:
662
- throw new Error("Plan.tableCells: each cell's `at` must be an instant-typed field (DateTime / Float / " +
663
- `Integer / String / Plan.Types.Instant) — got ${atTag}`);
664
- }
665
- };
666
- return raw.map((_$, c) => East.value({
667
- at: wrap(c.at),
668
- value: c.value,
669
- text: none,
670
- tone: none,
671
- }, PlanTableCellType));
672
- }
673
- //# sourceMappingURL=builders.js.map