@elaraai/east-ui 1.0.67 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/README.md +2 -2
  2. package/dist/src/charts/chart/index.d.ts +39 -4
  3. package/dist/src/charts/chart/index.d.ts.map +1 -1
  4. package/dist/src/charts/chart/index.js +3 -3
  5. package/dist/src/charts/chart/index.js.map +1 -1
  6. package/dist/src/charts/spec/index.d.ts +61 -3
  7. package/dist/src/charts/spec/index.d.ts.map +1 -1
  8. package/dist/src/charts/spec/types.d.ts +1 -1
  9. package/dist/src/charts/spec/types.js +1 -1
  10. package/dist/src/collections/blend/index.d.ts +1 -1
  11. package/dist/src/collections/blend/index.d.ts.map +1 -1
  12. package/dist/src/collections/blend/index.js +1 -1
  13. package/dist/src/collections/blend/index.js.map +1 -1
  14. package/dist/src/collections/blend/types.js +1 -1
  15. package/dist/src/collections/blend/types.js.map +1 -1
  16. package/dist/src/collections/board/index.d.ts +4 -4
  17. package/dist/src/collections/board/index.d.ts.map +1 -1
  18. package/dist/src/collections/board/index.js +1 -1
  19. package/dist/src/collections/board/index.js.map +1 -1
  20. package/dist/src/collections/board/types.js +1 -1
  21. package/dist/src/collections/board/types.js.map +1 -1
  22. package/dist/src/collections/calendar/index.d.ts +1 -1
  23. package/dist/src/collections/calendar/index.d.ts.map +1 -1
  24. package/dist/src/collections/deck/index.d.ts +58 -0
  25. package/dist/src/collections/deck/index.d.ts.map +1 -1
  26. package/dist/src/collections/index.d.ts +1 -2
  27. package/dist/src/collections/index.d.ts.map +1 -1
  28. package/dist/src/collections/index.js +1 -2
  29. package/dist/src/collections/index.js.map +1 -1
  30. package/dist/src/collections/library/index.d.ts +29 -0
  31. package/dist/src/collections/library/index.d.ts.map +1 -1
  32. package/dist/src/collections/library/types.d.ts +29 -0
  33. package/dist/src/collections/library/types.d.ts.map +1 -1
  34. package/dist/src/collections/matrix/index.d.ts +1 -1
  35. package/dist/src/collections/matrix/index.d.ts.map +1 -1
  36. package/dist/src/collections/plan/assemble.d.ts +3732 -0
  37. package/dist/src/collections/plan/assemble.d.ts.map +1 -0
  38. package/dist/src/collections/plan/assemble.js +187 -0
  39. package/dist/src/collections/plan/assemble.js.map +1 -0
  40. package/dist/src/collections/plan/builders.d.ts +612 -0
  41. package/dist/src/collections/plan/builders.d.ts.map +1 -0
  42. package/dist/src/collections/plan/builders.js +543 -0
  43. package/dist/src/collections/plan/builders.js.map +1 -0
  44. package/dist/src/collections/plan/data-forms.d.ts +332 -0
  45. package/dist/src/collections/plan/data-forms.d.ts.map +1 -0
  46. package/dist/src/collections/plan/data-forms.js +212 -0
  47. package/dist/src/collections/plan/data-forms.js.map +1 -0
  48. package/dist/src/collections/plan/factories.d.ts +338 -0
  49. package/dist/src/collections/plan/factories.d.ts.map +1 -0
  50. package/dist/src/collections/plan/factories.js +414 -0
  51. package/dist/src/collections/plan/factories.js.map +1 -0
  52. package/dist/src/collections/plan/index.d.ts +271 -0
  53. package/dist/src/collections/plan/index.d.ts.map +1 -0
  54. package/dist/src/collections/plan/index.js +162 -0
  55. package/dist/src/collections/plan/index.js.map +1 -0
  56. package/dist/src/collections/plan/ir.d.ts +3496 -0
  57. package/dist/src/collections/plan/ir.d.ts.map +1 -0
  58. package/dist/src/collections/plan/ir.js +83 -0
  59. package/dist/src/collections/plan/ir.js.map +1 -0
  60. package/dist/src/collections/plan/pick.d.ts +115 -0
  61. package/dist/src/collections/plan/pick.d.ts.map +1 -0
  62. package/dist/src/collections/plan/pick.js +193 -0
  63. package/dist/src/collections/plan/pick.js.map +1 -0
  64. package/dist/src/collections/plan/root.d.ts +210 -0
  65. package/dist/src/collections/plan/root.d.ts.map +1 -0
  66. package/dist/src/collections/plan/root.js +146 -0
  67. package/dist/src/collections/plan/root.js.map +1 -0
  68. package/dist/src/collections/plan/series.d.ts +11890 -0
  69. package/dist/src/collections/plan/series.d.ts.map +1 -0
  70. package/dist/src/collections/plan/series.js +412 -0
  71. package/dist/src/collections/plan/series.js.map +1 -0
  72. package/dist/src/collections/plan/types.d.ts +9291 -0
  73. package/dist/src/collections/plan/types.d.ts.map +1 -0
  74. package/dist/src/collections/plan/types.js +940 -0
  75. package/dist/src/collections/plan/types.js.map +1 -0
  76. package/dist/src/collections/roster/index.d.ts +4 -4
  77. package/dist/src/collections/roster/index.d.ts.map +1 -1
  78. package/dist/src/collections/roster/index.js +1 -1
  79. package/dist/src/collections/roster/index.js.map +1 -1
  80. package/dist/src/collections/roster/types.d.ts +1 -1
  81. package/dist/src/collections/roster/types.d.ts.map +1 -1
  82. package/dist/src/collections/roster/types.js +4 -3
  83. package/dist/src/collections/roster/types.js.map +1 -1
  84. package/dist/src/collections/table/index.d.ts +70 -2
  85. package/dist/src/collections/table/index.d.ts.map +1 -1
  86. package/dist/src/collections/table/index.js +55 -11
  87. package/dist/src/collections/table/index.js.map +1 -1
  88. package/dist/src/collections/table/types.d.ts +1 -1
  89. package/dist/src/collections/table/types.d.ts.map +1 -1
  90. package/dist/src/component.d.ts +3898 -1339
  91. package/dist/src/component.d.ts.map +1 -1
  92. package/dist/src/component.js +83 -146
  93. package/dist/src/component.js.map +1 -1
  94. package/dist/src/container/card/types.d.ts +1 -1
  95. package/dist/src/container/card/types.d.ts.map +1 -1
  96. package/dist/src/contracts/approval.d.ts +117 -0
  97. package/dist/src/contracts/approval.d.ts.map +1 -0
  98. package/dist/src/contracts/approval.js +105 -0
  99. package/dist/src/contracts/approval.js.map +1 -0
  100. package/dist/src/contracts/drag.d.ts +3 -3
  101. package/dist/src/contracts/drag.d.ts.map +1 -1
  102. package/dist/src/contracts/drag.js +23 -10
  103. package/dist/src/contracts/drag.js.map +1 -1
  104. package/dist/src/contracts/index.d.ts +4 -1
  105. package/dist/src/contracts/index.d.ts.map +1 -1
  106. package/dist/src/contracts/index.js +4 -1
  107. package/dist/src/contracts/index.js.map +1 -1
  108. package/dist/src/contracts/pick.d.ts +705 -0
  109. package/dist/src/contracts/pick.d.ts.map +1 -0
  110. package/dist/src/contracts/pick.js +360 -0
  111. package/dist/src/contracts/pick.js.map +1 -0
  112. package/dist/src/contracts/review.d.ts +7 -99
  113. package/dist/src/contracts/review.d.ts.map +1 -1
  114. package/dist/src/contracts/review.js +11 -85
  115. package/dist/src/contracts/review.js.map +1 -1
  116. package/dist/src/contracts/slice-affordances.d.ts +13 -4
  117. package/dist/src/contracts/slice-affordances.d.ts.map +1 -1
  118. package/dist/src/contracts/slice-affordances.js +13 -3
  119. package/dist/src/contracts/slice-affordances.js.map +1 -1
  120. package/dist/src/contracts/source.d.ts +432 -0
  121. package/dist/src/contracts/source.d.ts.map +1 -0
  122. package/dist/src/contracts/source.js +505 -0
  123. package/dist/src/contracts/source.js.map +1 -0
  124. package/dist/src/contracts/states.d.ts +130 -0
  125. package/dist/src/contracts/states.d.ts.map +1 -1
  126. package/dist/src/contracts/states.js +122 -0
  127. package/dist/src/contracts/states.js.map +1 -1
  128. package/dist/src/contracts/time.d.ts +76 -0
  129. package/dist/src/contracts/time.d.ts.map +1 -0
  130. package/dist/src/contracts/time.js +78 -0
  131. package/dist/src/contracts/time.js.map +1 -0
  132. package/dist/src/display/trace/types.d.ts +1 -1
  133. package/dist/src/display/trace/types.d.ts.map +1 -1
  134. package/dist/src/index.d.ts +10 -2
  135. package/dist/src/index.d.ts.map +1 -1
  136. package/dist/src/index.js +22 -2
  137. package/dist/src/index.js.map +1 -1
  138. package/dist/src/internal.d.ts +5 -3
  139. package/dist/src/internal.d.ts.map +1 -1
  140. package/dist/src/internal.js +4 -3
  141. package/dist/src/internal.js.map +1 -1
  142. package/dist/src/layout/dock/index.d.ts +1 -1
  143. package/dist/src/layout/dock/index.js +1 -1
  144. package/dist/src/layout/index.d.ts +0 -1
  145. package/dist/src/layout/index.d.ts.map +1 -1
  146. package/dist/src/layout/index.js +0 -1
  147. package/dist/src/layout/index.js.map +1 -1
  148. package/dist/src/overlays/drawer/types.d.ts +1 -1
  149. package/dist/src/overlays/drawer/types.d.ts.map +1 -1
  150. package/dist/src/pick/index.d.ts +443 -0
  151. package/dist/src/pick/index.d.ts.map +1 -0
  152. package/dist/src/pick/index.js +64 -0
  153. package/dist/src/pick/index.js.map +1 -0
  154. package/dist/src/pick/panel/index.d.ts +64 -0
  155. package/dist/src/pick/panel/index.d.ts.map +1 -0
  156. package/dist/src/pick/panel/index.js +61 -0
  157. package/dist/src/pick/panel/index.js.map +1 -0
  158. package/dist/src/platform/slice/index.d.ts +291 -0
  159. package/dist/src/platform/slice/index.d.ts.map +1 -1
  160. package/dist/src/platform/slice/index.js +16 -0
  161. package/dist/src/platform/slice/index.js.map +1 -1
  162. package/dist/src/runtime/collections/deck.d.ts +29 -0
  163. package/dist/src/runtime/collections/deck.d.ts.map +1 -1
  164. package/dist/src/runtime/collections/index.d.ts +1 -2
  165. package/dist/src/runtime/collections/index.d.ts.map +1 -1
  166. package/dist/src/runtime/collections/index.js +1 -2
  167. package/dist/src/runtime/collections/index.js.map +1 -1
  168. package/dist/src/runtime/collections/library.d.ts +1 -1
  169. package/dist/src/runtime/collections/library.js +1 -1
  170. package/dist/src/runtime/collections/plan.d.ts +98 -0
  171. package/dist/src/runtime/collections/plan.d.ts.map +1 -0
  172. package/dist/src/runtime/collections/plan.js +98 -0
  173. package/dist/src/runtime/collections/plan.js.map +1 -0
  174. package/dist/src/runtime/collections/schematic.d.ts +1 -1
  175. package/dist/src/runtime/collections/schematic.js +1 -1
  176. package/dist/src/runtime/collections/table.d.ts +9 -1
  177. package/dist/src/runtime/collections/table.d.ts.map +1 -1
  178. package/dist/src/runtime/collections/table.js +1 -7
  179. package/dist/src/runtime/collections/table.js.map +1 -1
  180. package/dist/src/runtime/layout/dock.d.ts +2 -2
  181. package/dist/src/runtime/layout/dock.js +2 -2
  182. package/dist/src/runtime/layout/index.d.ts +0 -1
  183. package/dist/src/runtime/layout/index.d.ts.map +1 -1
  184. package/dist/src/runtime/layout/index.js +0 -1
  185. package/dist/src/runtime/layout/index.js.map +1 -1
  186. package/dist/src/shared/plot-gutter.d.ts +6 -23
  187. package/dist/src/shared/plot-gutter.d.ts.map +1 -1
  188. package/dist/src/shared/plot-gutter.js +6 -19
  189. package/dist/src/shared/plot-gutter.js.map +1 -1
  190. package/dist/src/shared/reify.d.ts +47 -4
  191. package/dist/src/shared/reify.d.ts.map +1 -1
  192. package/dist/src/shared/reify.js +62 -4
  193. package/dist/src/shared/reify.js.map +1 -1
  194. package/dist/src/slice/breakdown/index.d.ts +27 -0
  195. package/dist/src/slice/breakdown/index.d.ts.map +1 -1
  196. package/dist/src/slice/breakdown/types.d.ts +27 -0
  197. package/dist/src/slice/breakdown/types.d.ts.map +1 -1
  198. package/dist/src/slice/cohort/index.d.ts +54 -0
  199. package/dist/src/slice/cohort/index.d.ts.map +1 -1
  200. package/dist/src/slice/cohort/types.d.ts +27 -0
  201. package/dist/src/slice/cohort/types.d.ts.map +1 -1
  202. package/dist/src/slice/filter/index.d.ts +27 -0
  203. package/dist/src/slice/filter/index.d.ts.map +1 -1
  204. package/dist/src/slice/filter/types.d.ts +27 -0
  205. package/dist/src/slice/filter/types.d.ts.map +1 -1
  206. package/dist/src/slice/index.d.ts +405 -0
  207. package/dist/src/slice/index.d.ts.map +1 -1
  208. package/dist/src/slice/legend/index.d.ts +27 -0
  209. package/dist/src/slice/legend/index.d.ts.map +1 -1
  210. package/dist/src/slice/legend/types.d.ts +27 -0
  211. package/dist/src/slice/legend/types.d.ts.map +1 -1
  212. package/dist/src/slice/range/index.d.ts +60 -18
  213. package/dist/src/slice/range/index.d.ts.map +1 -1
  214. package/dist/src/slice/range/index.js +9 -1
  215. package/dist/src/slice/range/index.js.map +1 -1
  216. package/dist/src/slice/range/types.d.ts +63 -22
  217. package/dist/src/slice/range/types.d.ts.map +1 -1
  218. package/dist/src/slice/range/types.js +12 -5
  219. package/dist/src/slice/range/types.js.map +1 -1
  220. package/dist/src/slice/search/index.d.ts +27 -0
  221. package/dist/src/slice/search/index.d.ts.map +1 -1
  222. package/dist/src/slice/search/types.d.ts +27 -0
  223. package/dist/src/slice/search/types.d.ts.map +1 -1
  224. package/dist/src/slice/summary/index.d.ts +27 -0
  225. package/dist/src/slice/summary/index.d.ts.map +1 -1
  226. package/dist/src/slice/summary/types.d.ts +27 -0
  227. package/dist/src/slice/summary/types.d.ts.map +1 -1
  228. package/dist/src/style/content.d.ts +4 -6
  229. package/dist/src/style/content.d.ts.map +1 -1
  230. package/dist/src/style/content.js +4 -6
  231. package/dist/src/style/content.js.map +1 -1
  232. package/dist/src/style/scheme.js +1 -1
  233. package/dist/src/style/scheme.js.map +1 -1
  234. package/dist/test/collections/index.d.ts +2 -2
  235. package/dist/test/collections/index.d.ts.map +1 -1
  236. package/dist/test/collections/index.js +2 -2
  237. package/dist/test/collections/index.js.map +1 -1
  238. package/dist/test/collections/paged-source.examples.d.ts +9 -0
  239. package/dist/test/collections/paged-source.examples.d.ts.map +1 -0
  240. package/dist/test/collections/paged-source.examples.js +136 -0
  241. package/dist/test/collections/paged-source.examples.js.map +1 -0
  242. package/dist/test/collections/plan.examples.d.ts +125 -0
  243. package/dist/test/collections/plan.examples.d.ts.map +1 -0
  244. package/dist/test/collections/plan.examples.js +2939 -0
  245. package/dist/test/collections/plan.examples.js.map +1 -0
  246. package/dist/test/contracts/pick.examples.d.ts +6 -0
  247. package/dist/test/contracts/pick.examples.d.ts.map +1 -0
  248. package/dist/test/contracts/pick.examples.js +89 -0
  249. package/dist/test/contracts/pick.examples.js.map +1 -0
  250. package/dist/test/layout/dock.examples.d.ts +4 -4
  251. package/dist/test/layout/dock.examples.d.ts.map +1 -1
  252. package/dist/test/layout/dock.examples.js +34 -16
  253. package/dist/test/layout/dock.examples.js.map +1 -1
  254. package/dist/test/slice/slice.examples.d.ts +2 -1
  255. package/dist/test/slice/slice.examples.d.ts.map +1 -1
  256. package/dist/test/slice/slice.examples.js +67 -9
  257. package/dist/test/slice/slice.examples.js.map +1 -1
  258. package/package.json +3 -3
  259. package/dist/src/collections/gantt/index.d.ts +0 -377
  260. package/dist/src/collections/gantt/index.d.ts.map +0 -1
  261. package/dist/src/collections/gantt/index.js +0 -896
  262. package/dist/src/collections/gantt/index.js.map +0 -1
  263. package/dist/src/collections/gantt/types.d.ts +0 -353
  264. package/dist/src/collections/gantt/types.d.ts.map +0 -1
  265. package/dist/src/collections/gantt/types.js +0 -207
  266. package/dist/src/collections/gantt/types.js.map +0 -1
  267. package/dist/src/collections/planner/index.d.ts +0 -624
  268. package/dist/src/collections/planner/index.d.ts.map +0 -1
  269. package/dist/src/collections/planner/index.js +0 -941
  270. package/dist/src/collections/planner/index.js.map +0 -1
  271. package/dist/src/collections/planner/types.d.ts +0 -615
  272. package/dist/src/collections/planner/types.d.ts.map +0 -1
  273. package/dist/src/collections/planner/types.js +0 -423
  274. package/dist/src/collections/planner/types.js.map +0 -1
  275. package/dist/src/layout/aligned-stack/index.d.ts +0 -101
  276. package/dist/src/layout/aligned-stack/index.d.ts.map +0 -1
  277. package/dist/src/layout/aligned-stack/index.js +0 -105
  278. package/dist/src/layout/aligned-stack/index.js.map +0 -1
  279. package/dist/src/layout/aligned-stack/types.d.ts +0 -50
  280. package/dist/src/layout/aligned-stack/types.d.ts.map +0 -1
  281. package/dist/src/layout/aligned-stack/types.js +0 -24
  282. package/dist/src/layout/aligned-stack/types.js.map +0 -1
  283. package/dist/src/runtime/collections/gantt.d.ts +0 -67
  284. package/dist/src/runtime/collections/gantt.d.ts.map +0 -1
  285. package/dist/src/runtime/collections/gantt.js +0 -58
  286. package/dist/src/runtime/collections/gantt.js.map +0 -1
  287. package/dist/src/runtime/collections/planner.d.ts +0 -80
  288. package/dist/src/runtime/collections/planner.d.ts.map +0 -1
  289. package/dist/src/runtime/collections/planner.js +0 -76
  290. package/dist/src/runtime/collections/planner.js.map +0 -1
  291. package/dist/src/runtime/layout/aligned-stack.d.ts +0 -38
  292. package/dist/src/runtime/layout/aligned-stack.d.ts.map +0 -1
  293. package/dist/src/runtime/layout/aligned-stack.js +0 -36
  294. package/dist/src/runtime/layout/aligned-stack.js.map +0 -1
  295. package/dist/test/collections/gantt.examples.d.ts +0 -33
  296. package/dist/test/collections/gantt.examples.d.ts.map +0 -1
  297. package/dist/test/collections/gantt.examples.js +0 -359
  298. package/dist/test/collections/gantt.examples.js.map +0 -1
  299. package/dist/test/collections/planner.examples.d.ts +0 -47
  300. package/dist/test/collections/planner.examples.d.ts.map +0 -1
  301. package/dist/test/collections/planner.examples.js +0 -546
  302. package/dist/test/collections/planner.examples.js.map +0 -1
  303. package/dist/test/layout/aligned-stack.examples.d.ts +0 -25
  304. package/dist/test/layout/aligned-stack.examples.d.ts.map +0 -1
  305. package/dist/test/layout/aligned-stack.examples.js +0 -294
  306. package/dist/test/layout/aligned-stack.examples.js.map +0 -1
@@ -1,423 +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
- * `Planner` IR — the UIComponent-free types. A Planner is a discrete
7
- * `rows × ordered slots` scheduling grid: rows are typed resources, slots are
8
- * positions on a typed axis, and each cell holds zero or more events in one of
9
- * three audit states.
10
- *
11
- * The axis design follows the `Chart.Spec` style — a typed coordinate variant
12
- * ({@link PlannerSlotType}) whose arm chooses the scale, so the axis kind is
13
- * derived from the data ("one axis type per Planner"). Sub-slot buckets are an
14
- * arbitrary labelled array, never a bare count.
15
- *
16
- * `PlannerEventType` / `PlannerRowType` / `PlannerRootType` carry a
17
- * `UIComponentType` (`event.popover`) and therefore live in `./index.ts`, not
18
- * here — `types.ts` stays UIComp-free so `component.ts` can import it without a
19
- * circular dependency.
20
- *
21
- * @packageDocumentation
22
- */
23
- import { OptionType, StructType, VariantType, StringType, FloatType, IntegerType, BooleanType, DateTimeType, NullType, ArrayType, } from "@elaraai/east";
24
- import { StatusValueType } from "../../feedback/status/types.js";
25
- // ============================================================================
26
- // Axis — typed slot coordinate + scale + buckets + range
27
- // ============================================================================
28
- /**
29
- * A typed slot coordinate. The arm chooses the axis scale the renderer builds,
30
- * so the scale kind is derived from the data and never declared twice; mixing
31
- * arms within one Planner is the forbidden "one axis type per Planner" case.
32
- *
33
- * @remarks
34
- * Use `Planner.at.time(date)`, `Planner.at.number(n)`, or
35
- * `Planner.at.ordinal(label)` to construct slot values rather than building
36
- * the variant manually. Every event and marker on the same Planner must use
37
- * the same arm — the renderer enforces the single-axis-kind rule at render
38
- * time.
39
- *
40
- * @property time - A datetime position (calendar slots)
41
- * @property number - A numeric position (day-of-X, hour-of-Y)
42
- * @property ordinal - An ordinal label (phase / stage / week-number)
43
- */
44
- export const PlannerSlotType = VariantType({
45
- time: DateTimeType,
46
- number: FloatType,
47
- ordinal: StringType,
48
- });
49
- /**
50
- * The axis scale kind, declared once on the axis; must match every slot's arm.
51
- *
52
- * @remarks
53
- * This value is embedded in the serialised `PlannerAxisType` and read by the
54
- * renderer to choose the correct tick-label formatter. Prefer the
55
- * `Planner.axis.*` builder helpers over constructing it directly — they set the
56
- * scale tag automatically from the builder you call.
57
- *
58
- * @property time - Datetime axis
59
- * @property number - Numeric axis
60
- * @property ordinal - Ordinal axis
61
- */
62
- export const PlannerScaleType = VariantType({
63
- time: NullType,
64
- number: NullType,
65
- ordinal: NullType,
66
- });
67
- /**
68
- * The time-axis resolution — the calendar unit of each `time`-axis slot
69
- * column. The Planner sibling of the Gantt axis `tier`, except that a Planner
70
- * resolution sets slot *identity* (the column set, event placement, and drag
71
- * slot keys), not just header labels.
72
- *
73
- * @remarks
74
- * Declared via `Planner.axis.time({ resolution })`; meaningless on `number` /
75
- * `ordinal` axes. `auto` (or an absent resolution) infers the unit from the
76
- * axis extent: a pinned `range` spanning ≤ 14 days derives one column per
77
- * day, anything else keeps one column per month (the pre-resolution
78
- * behaviour — data-derived extents never infer day columns). The fixed arms
79
- * force the unit regardless of extent; `hour` is never chosen automatically.
80
- *
81
- * @property auto - Infer from the pinned range span (≤ 14 days ⇒ day, else month)
82
- * @property hour - One column per hour
83
- * @property day - One column per day
84
- * @property week - One column per week
85
- * @property month - One column per calendar month
86
- * @property quarter - One column per calendar quarter
87
- * @property year - One column per calendar year
88
- */
89
- export const PlannerResolutionType = VariantType({
90
- auto: NullType,
91
- hour: NullType,
92
- day: NullType,
93
- week: NullType,
94
- month: NullType,
95
- quarter: NullType,
96
- year: NullType,
97
- });
98
- /**
99
- * One labelled sub-slot bucket inside a column — the explicit name an operator
100
- * reads (AM/PM, the parts of a day, …). Buckets are an arbitrary labelled
101
- * array; an empty array means one slot per column.
102
- *
103
- * @remarks
104
- * Pass bucket objects via the `buckets` array in `AxisTimeOptions`,
105
- * `AxisNumberOptions`, or `AxisOrdinalOptions`. Events reference a bucket by
106
- * its `key`; the renderer displays the `label` in the column header. When no
107
- * buckets are specified an event omits the `bucket` field entirely.
108
- *
109
- * @property key - The bucket identity an event references
110
- * @property label - The displayed bucket name
111
- */
112
- export const PlannerBucketType = StructType({
113
- key: StringType,
114
- label: StringType,
115
- });
116
- /**
117
- * An explicit axis domain, typed to the axis's coordinate kind. Supplied to fix
118
- * the extent instead of deriving it from the data.
119
- *
120
- * @remarks
121
- * When omitted the renderer derives the domain from the union of all event
122
- * slots, which can produce a shifting viewport as data changes. Supply a range
123
- * to pin the visible extent regardless of what events are present — useful for
124
- * keeping a calendar grid stable even when some days have no events. The arm
125
- * must match the axis scale: a `number` axis requires the `number` arm, a
126
- * `time` axis the `time` arm, and an `ordinal` axis the `ordinal` arm.
127
- *
128
- * @property time - Datetime bounds for a time axis
129
- * @property number - Numeric bounds for a numeric axis
130
- * @property ordinal - The ordered category labels for an ordinal axis
131
- */
132
- export const PlannerRangeType = VariantType({
133
- time: StructType({ min: DateTimeType, max: DateTimeType }),
134
- number: StructType({ min: FloatType, max: FloatType }),
135
- ordinal: ArrayType(StringType),
136
- });
137
- /**
138
- * The axis declaration — the scale kind, the labelled sub-slot buckets, an
139
- * optional explicit range, an optional tick-label format, and (time axes
140
- * only) an optional column grain.
141
- *
142
- * @remarks
143
- * This is the serialised form written into the Planner IR. Consumer code
144
- * should construct it via `Planner.axis.time(opts)`, `Planner.axis.number(opts)`,
145
- * or `Planner.axis.ordinal(opts)` rather than by hand — those builders fill
146
- * `scale` and coerce the `range` variant automatically.
147
- *
148
- * @property scale - The axis coordinate kind (see {@link PlannerScaleType})
149
- * @property buckets - The labelled sub-slot buckets ([] = one slot per column)
150
- * @property range - Optional explicit domain; else derived from the data
151
- * @property format - Optional tick-label format pattern
152
- * @property resolution - Optional time-axis column unit (see {@link PlannerResolutionType}); absent ≡ auto
153
- */
154
- export const PlannerAxisType = StructType({
155
- scale: PlannerScaleType,
156
- buckets: ArrayType(PlannerBucketType),
157
- range: OptionType(PlannerRangeType),
158
- format: OptionType(StringType),
159
- resolution: OptionType(PlannerResolutionType),
160
- });
161
- // ============================================================================
162
- // Event state + conflict marker
163
- // ============================================================================
164
- /**
165
- * The sub-flavour of a `proposed` event. It rides inside the `proposed` arm of
166
- * {@link PlannerStateType}, so it is only representable while proposed — a
167
- * committed event can never carry a flavour.
168
- *
169
- * @remarks
170
- * Consumer code passes string literals (`"added"`, `"model"`, `"removed"`) to
171
- * `Planner.event`'s `state` field rather than constructing this variant
172
- * directly. The renderer uses the flavour to pick a distinct visual treatment:
173
- * `added` is highlighted, `model` is rendered italic, and `removed` is struck
174
- * through to communicate a proposed deletion of an existing committed event.
175
- *
176
- * @property added - An operator proposal
177
- * @property model - A model's suggestion (rendered italic)
178
- * @property removed - A proposed deletion of a committed event (struck through)
179
- */
180
- export const PlannerFlavourType = VariantType({
181
- added: NullType,
182
- model: NullType,
183
- removed: NullType,
184
- });
185
- /**
186
- * The three event states. `committed` is audit-locked and read-only; `proposed`
187
- * is dirty-patch owned (carrying its flavour); `rejected` is a proposal that was
188
- * turned down, kept for diff context.
189
- *
190
- * @remarks
191
- * Consumer code passes string literals to `Planner.event`'s `state` field —
192
- * `"committed"`, `"added"`, `"model"`, `"removed"`, or `"rejected"` — and the
193
- * builder maps them to the appropriate nested variant. `proposed` is never
194
- * written directly; use the flavour shorthands instead. `rejected` events are
195
- * kept in the IR so diff views can show what was declined without re-fetching
196
- * history.
197
- *
198
- * @property committed - Audit-locked, immutable
199
- * @property proposed - Drafted; the flavour (see {@link PlannerFlavourType}) is nested
200
- * @property rejected - Reviewed and declined; kept for diff
201
- */
202
- export const PlannerStateType = VariantType({
203
- committed: NullType,
204
- proposed: PlannerFlavourType,
205
- rejected: NullType,
206
- });
207
- /**
208
- * A row's review decision — distinct from the event-level {@link PlannerStateType}.
209
- *
210
- * @remarks
211
- * Used only when the Planner's `review` chrome is enabled. `approved` rests
212
- * pre-approved (its Approve renders as the active state); `pending` awaits an
213
- * explicit call (a flagged line); `rejected` is an explicit decline.
214
- *
215
- * The canonical definition is the shared review contract's
216
- * `ApprovalStateType` (`contracts/review.ts`) — this structural twin is kept
217
- * so existing Planner IR and imports round-trip unchanged, and because
218
- * `component.ts` must reach the variant through a `UIComponentType`-free
219
- * module. Prefer `ApprovalStateType` in new code.
220
- *
221
- * @property approved - Pre-approved / accepted (the resting state for a clean line)
222
- * @property pending - Undecided — awaits an explicit Approve / Reject
223
- * @property rejected - Explicitly declined
224
- */
225
- export const PlannerApprovalType = VariantType({
226
- /** Pre-approved / accepted (the resting state for a clean line). */
227
- approved: NullType,
228
- /** Undecided — awaits an explicit Approve / Reject. */
229
- pending: NullType,
230
- /** Explicitly declined. */
231
- rejected: NullType,
232
- });
233
- /**
234
- * A status marker placed at a slot — declared parallel to events (in the row's
235
- * `markers`, not on an event). The renderer rings the cell at `slot`, paints the
236
- * paired status icon in its corner, and surfaces `message` as a hover tooltip.
237
- * Reuses the shared {@link StatusValueType} so a cell can be flagged good
238
- * (`success`) just as readily as bad (`danger` / `warning`). The consumer
239
- * computes the rule (in East) and emits the markers; the library renders them.
240
- *
241
- * @remarks
242
- * Markers are computed independently of events and passed via the `markers`
243
- * callback on the Planner root options. A slot can carry a marker and zero
244
- * events simultaneously — for example, to flag a capacity breach on a day that
245
- * has no events scheduled yet. The `message` field is intentionally free-form;
246
- * compute it from the same East expression that determines the status so the
247
- * tooltip stays in sync with the visual.
248
- *
249
- * @property slot - The slot coordinate of the cell the marker rings
250
- * @property status - The semantic status (success / warning / danger / info / neutral) — drives colour + icon
251
- * @property message - The marker text surfaced as a hover tooltip
252
- */
253
- export const PlannerMarkerType = StructType({
254
- slot: PlannerSlotType,
255
- status: StatusValueType,
256
- message: StringType,
257
- });
258
- // ============================================================================
259
- // Event geometry — stretch + content alignment + animation
260
- // ============================================================================
261
- /**
262
- * Which axis an event tile stretches to fill its cell on. Absent ⇒ the tile is
263
- * content-sized (intrinsic). Deliberately `stretch` (not `fill`) to avoid
264
- * confusion with the background-colour fill — it matches the flexbox
265
- * `alignItems: stretch` vocabulary the renderer already uses.
266
- *
267
- * @remarks
268
- * Pass the string shorthand (`"horizontal"` / `"vertical"` / `"both"`) to
269
- * `Planner.event`'s `stretch` field. A horizontal stretch fills the cell width,
270
- * a vertical stretch fills its height (so a single-occupant event paints the
271
- * whole day cell), and `both` fills both axes. A vertical-stretch tile that
272
- * shares a cell with others stretches to its flex-line height, not the full
273
- * cell.
274
- *
275
- * @property horizontal - Fill the cell width
276
- * @property vertical - Fill the cell height
277
- * @property both - Fill both axes
278
- */
279
- export const PlannerStretchType = VariantType({ horizontal: NullType, vertical: NullType, both: NullType });
280
- /**
281
- * One alignment position for an event tile's content along a single axis.
282
- *
283
- * @remarks
284
- * Used for both axes of {@link PlannerContentType}. Maps to `justifyContent`
285
- * (horizontal) / `alignItems` (vertical) inside the tile, and positions a
286
- * normal-size tile within a taller cell. Defaults to `start` on each axis.
287
- *
288
- * @property start - Align to the start (left / top)
289
- * @property center - Centre
290
- * @property end - Align to the end (right / bottom)
291
- */
292
- export const PlannerContentAlignType = VariantType({ start: NullType, center: NullType, end: NullType });
293
- /**
294
- * Where an event tile's content sits inside the tile — a two-axis alignment.
295
- *
296
- * @remarks
297
- * Both axes default to `start` (top-left) when omitted. `horizontal` drives the
298
- * tile's `justifyContent`; `vertical` its `alignItems`. Meaningful even without
299
- * `stretch` — it positions a normal-size tile within a taller (e.g. bucketed or
300
- * mixed) cell.
301
- *
302
- * @property horizontal - Horizontal content alignment (→ `justifyContent`)
303
- * @property vertical - Vertical content alignment (→ `alignItems`)
304
- */
305
- export const PlannerContentType = StructType({
306
- horizontal: OptionType(PlannerContentAlignType),
307
- vertical: OptionType(PlannerContentAlignType),
308
- });
309
- /**
310
- * An event tile's optional attention animation.
311
- *
312
- * @remarks
313
- * Pass `"pulse"` to `Planner.event`'s `animation` field to draw a gentle
314
- * opacity pulse (the shared `elara-pulse` keyframe); `"none"` (or absent) is
315
- * static. The pulse honours `prefers-reduced-motion`.
316
- *
317
- * @property none - No animation (the default)
318
- * @property pulse - A gentle opacity pulse
319
- */
320
- export const PlannerAnimationType = VariantType({ none: NullType, pulse: NullType });
321
- // ============================================================================
322
- // Columns — one flat shape (value + eyebrow)
323
- // ============================================================================
324
- /**
325
- * Horizontal alignment of a left column's content.
326
- *
327
- * @remarks
328
- * Defaults to `start` when omitted. Use `"end"` for numeric columns such as
329
- * hours or counts so digits align on their decimal point. Pass the string
330
- * literal directly to the `align` field in a column definition rather than
331
- * constructing the variant explicitly.
332
- *
333
- * @property start - Align to the start (left)
334
- * @property end - Align to the end (right)
335
- */
336
- export const PlannerAlignType = VariantType({ start: NullType, end: NullType });
337
- /**
338
- * A left-side column definition — flat and kind-free, the same shape as Table /
339
- * Gantt. The five spec "column kinds" are authoring patterns built from `value`
340
- * + `sublabel`, not distinct IR shapes.
341
- *
342
- * @remarks
343
- * Pass column definitions as plain objects in the `columns` array of the
344
- * Planner root options. Set `frozen: true` on the identity column so it stays
345
- * visible while the slot grid scrolls horizontally. Derived columns — values
346
- * computed from the row in East rather than read from a field directly — use
347
- * the same shape; there is no separate kind for them.
348
- *
349
- * @property key - The column identity (and the row's cell key)
350
- * @property header - The column header text
351
- * @property width - Optional CSS width
352
- * @property frozen - Whether the column is pinned sticky-left
353
- * @property align - Optional horizontal alignment of the cell content
354
- */
355
- export const PlannerColumnType = StructType({
356
- key: StringType,
357
- header: StringType,
358
- width: OptionType(StringType),
359
- frozen: OptionType(BooleanType),
360
- align: OptionType(PlannerAlignType),
361
- });
362
- /**
363
- * The per-row cell content — a `value` and an optional muted `sublabel`
364
- * (eyebrow). A derived column is just a `value` computed in East; there is no
365
- * separate kind.
366
- *
367
- * @remarks
368
- * This is the serialised cell shape stored in the row's `cells` map, keyed by
369
- * the matching `PlannerColumnType.key`. Consumer code produces cell values via
370
- * the `value` and `sublabel` callbacks on each column definition — the builder
371
- * assembles this struct from those callbacks automatically.
372
- *
373
- * @property value - The cell text (a field or an East-computed value)
374
- * @property sublabel - The optional muted eyebrow line beneath the value
375
- */
376
- export const PlannerCellType = StructType({
377
- value: StringType,
378
- sublabel: OptionType(StringType),
379
- });
380
- // ============================================================================
381
- // Variant + callback payloads
382
- // ============================================================================
383
- /**
384
- * Which chassis configuration this Planner is.
385
- *
386
- * @remarks
387
- * Set automatically by `Planner.Point(...)` and `Planner.Span(...)` — consumer
388
- * code never needs to construct this variant directly. The renderer uses it to
389
- * decide whether to treat events as single-cell tiles (`point`) or as
390
- * horizontal bars stretching from `slot` to `endSlot` (`span`).
391
- *
392
- * @property point - Slot-bound events (each event sits in one slot/bucket)
393
- * @property span - Multi-slot span events (start → end)
394
- */
395
- export const PlannerVariantType = VariantType({
396
- point: NullType,
397
- span: NullType,
398
- });
399
- /**
400
- * The payload of the `onSelectRow` callback (a row was clicked / selected).
401
- *
402
- * @remarks
403
- * Passed as the sole argument to the `East.function` supplied to `onSelectRow`
404
- * on the Planner root options. Use `Planner.Types.SelectEvent` to reference
405
- * this type when declaring that function's parameter list, as shown in the
406
- * `plannerPoint` example.
407
- *
408
- * @property rowIndex - The selected row's index (0-based)
409
- */
410
- export const PlannerSelectEventType = StructType({ rowIndex: IntegerType });
411
- /**
412
- * The payload of the per-row `review.onApprove` / `review.onReject` callbacks
413
- * (a row's Approve / Reject was clicked). Mirrors {@link PlannerSelectEventType}.
414
- *
415
- * @remarks
416
- * A structural twin of the shared review contract's `RowRefType`
417
- * (`contracts/review.ts`), kept for the same round-trip / import-graph
418
- * reasons as {@link PlannerApprovalType}. Prefer `RowRefType` in new code.
419
- *
420
- * @property rowIndex - The row's index (0-based)
421
- */
422
- export const PlannerApproveEventType = StructType({ rowIndex: IntegerType });
423
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/collections/planner/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAEH,UAAU,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,SAAS,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,+EAA+E;AAC/E,yDAAyD;AACzD,+EAA+E;AAE/E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACvC,IAAI,EAAK,YAAY;IACrB,MAAM,EAAG,SAAS;IAClB,OAAO,EAAE,UAAU;CACtB,CAAC,CAAC;AAGH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;IACxC,IAAI,EAAK,QAAQ;IACjB,MAAM,EAAG,QAAQ;IACjB,OAAO,EAAE,QAAQ;CACpB,CAAC,CAAC;AAMH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC;IAC7C,IAAI,EAAK,QAAQ;IACjB,IAAI,EAAK,QAAQ;IACjB,GAAG,EAAM,QAAQ;IACjB,IAAI,EAAK,QAAQ;IACjB,KAAK,EAAI,QAAQ;IACjB,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAK,QAAQ;CACpB,CAAC,CAAC;AAMH;;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;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;IACxC,GAAG,EAAK,UAAU;IAClB,MAAM,EAAE,UAAU;IAClB,KAAK,EAAG,UAAU,CAAC,UAAU,CAAC;IAC9B,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC/B,KAAK,EAAG,UAAU,CAAC,gBAAgB,CAAC;CACvC,CAAC,CAAC;AAGH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;IACtC,KAAK,EAAK,UAAU;IACpB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;CACnC,CAAC,CAAC;AAGH,+EAA+E;AAC/E,8BAA8B;AAC9B,+EAA+E;AAE/E;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAC;IAC1C,KAAK,EAAE,QAAQ;IACf,IAAI,EAAG,QAAQ;CAClB,CAAC,CAAC;AAGH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;AAG5E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC"}
@@ -1,101 +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
- import { type ExprType, type SubtypeExprOrValue, ArrayType, StructType, OptionType } from "@elaraai/east";
6
- import { UIComponentType } from "../../component.js";
7
- /**
8
- * Standalone East type for `AlignedStack` data — mirrors the inline arm in
9
- * `component.ts` (which spells `children` with the recursion `node`). Used by the
10
- * renderer for `equalFor` + `ValueTypeOf`.
11
- *
12
- * @property children - The stacked lane components
13
- * @property gutter - The imposed gutter (`auto` | `fixed{left,right}`)
14
- * @property style - Optional box-model style
15
- */
16
- export declare const AlignedStackType: StructType<{
17
- children: ArrayType<UIComponentType>;
18
- gutter: OptionType<AlignedGutterType>;
19
- style: OptionType<AlignedStackStyleType>;
20
- }>;
21
- export type AlignedStackType = typeof AlignedStackType;
22
- import { AlignedStackStyleType, type AlignedStackStyle } from "./types.js";
23
- import { AlignedGutterType, type PlotGutter } from "../../shared/plot-gutter.js";
24
- export { AlignedStackStyleType, type AlignedStackStyle } from "./types.js";
25
- export { PlotGutterType, AlignedGutterType, type PlotGutter } from "../../shared/plot-gutter.js";
26
- /** Options for {@link createAlignedStack} — the gutter mode plus the box-model style fields (flattened, like `Stack`). */
27
- export interface AlignedStackOptions extends AlignedStackStyle {
28
- /**
29
- * The gutter imposed on every child: an explicit `{ left, right }` (px
30
- * recommended), or `"auto"` to measure the max gutter the children need.
31
- * Omit to impose nothing (children keep their own gutters).
32
- */
33
- gutter?: PlotGutter | "auto";
34
- }
35
- /**
36
- * Build an `<AlignedStack>` — a vertical stack of axis/lane components (Chart,
37
- * Trace, Calendar, …) that share one horizontal plot gutter so their data lanes
38
- * line up on a common x. The gutter is published to the children via context; a
39
- * child's own `plotGutter` prop still wins over the inherited value (#147).
40
- *
41
- * @param children - The stacked lane components
42
- * @param options - The {@link AlignedStackOptions} (`gutter` + box-model style)
43
- * @returns An `AlignedStack` {@link UIComponentType} value
44
- *
45
- * @example
46
- * ```ts
47
- * import { East } from "@elaraai/east";
48
- * import { AlignedStack, Chart, UIComponentType } from "@elaraai/east-ui";
49
- *
50
- * const aligned = East.function([], UIComponentType, ($) =>
51
- * AlignedStack.Root([
52
- * Chart.Root(Chart.Line(rows, { x: r => r.day, y: r => r.value })),
53
- * // …a Trace / Planner on the same day axis…
54
- * ], { gutter: { left: "48px", right: "12px" }, gap: "8px" }));
55
- * ```
56
- */
57
- declare function createAlignedStack(children: SubtypeExprOrValue<ArrayType<UIComponentType>>, options?: AlignedStackOptions): ExprType<UIComponentType>;
58
- /**
59
- * `AlignedStack` — vertically stacks axis/lane components on a shared plot gutter.
60
- *
61
- * @remarks
62
- * Use `AlignedStack.Root(children, { gutter })`. Types via `.Types`.
63
- */
64
- export declare const AlignedStack: {
65
- /** Build an AlignedStack (see {@link createAlignedStack}). */
66
- readonly Root: typeof createAlignedStack;
67
- readonly Types: {
68
- /** The AlignedStack data struct. */
69
- readonly AlignedStack: StructType<{
70
- children: ArrayType<UIComponentType>;
71
- gutter: OptionType<AlignedGutterType>;
72
- style: OptionType<AlignedStackStyleType>;
73
- }>;
74
- /** The `{ left, right }` plot-gutter struct. */
75
- readonly PlotGutter: StructType<{
76
- readonly left: OptionType<import("@elaraai/east").StringType>;
77
- readonly right: OptionType<import("@elaraai/east").StringType>;
78
- }>;
79
- /** The `auto | fixed` gutter mode. */
80
- readonly Gutter: import("@elaraai/east").VariantType<{
81
- readonly auto: import("@elaraai/east").NullType;
82
- readonly fixed: StructType<{
83
- readonly left: OptionType<import("@elaraai/east").StringType>;
84
- readonly right: OptionType<import("@elaraai/east").StringType>;
85
- }>;
86
- }>;
87
- /** The AlignedStack style struct. */
88
- readonly Style: StructType<{
89
- readonly gap: OptionType<import("@elaraai/east").StringType>;
90
- readonly width: OptionType<import("@elaraai/east").StringType>;
91
- readonly height: OptionType<import("@elaraai/east").StringType>;
92
- readonly minHeight: OptionType<import("@elaraai/east").StringType>;
93
- readonly density: OptionType<import("@elaraai/east").VariantType<{
94
- readonly comfortable: import("@elaraai/east").NullType;
95
- readonly compact: import("@elaraai/east").NullType;
96
- readonly condensed: import("@elaraai/east").NullType;
97
- }>>;
98
- }>;
99
- };
100
- };
101
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/layout/aligned-stack/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAEvB,SAAS,EACT,UAAU,EACV,UAAU,EAIb,MAAM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CAAC"}
@@ -1,105 +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
- import { East, ArrayType, StructType, OptionType, variant, some, none, } from "@elaraai/east";
6
- import { UIComponentType } from "../../component.js";
7
- import { DensityType } from "../../style/interaction.js";
8
- /**
9
- * Standalone East type for `AlignedStack` data — mirrors the inline arm in
10
- * `component.ts` (which spells `children` with the recursion `node`). Used by the
11
- * renderer for `equalFor` + `ValueTypeOf`.
12
- *
13
- * @property children - The stacked lane components
14
- * @property gutter - The imposed gutter (`auto` | `fixed{left,right}`)
15
- * @property style - Optional box-model style
16
- */
17
- export const AlignedStackType = StructType({
18
- children: ArrayType(UIComponentType),
19
- gutter: OptionType(AlignedGutterType),
20
- style: OptionType(AlignedStackStyleType),
21
- });
22
- import { AlignedStackStyleType } from "./types.js";
23
- import { PlotGutterType, AlignedGutterType, } from "../../shared/plot-gutter.js";
24
- export { AlignedStackStyleType } from "./types.js";
25
- export { PlotGutterType, AlignedGutterType } from "../../shared/plot-gutter.js";
26
- /** Build the `AlignedGutterType` value (`auto` | `fixed{left,right}`) from the input. */
27
- function resolveGutter(g) {
28
- if (g === undefined)
29
- return undefined;
30
- if (g === "auto")
31
- return East.value(variant("auto", null), AlignedGutterType);
32
- const gutter = East.value({
33
- left: g.left !== undefined ? some(g.left) : none,
34
- right: g.right !== undefined ? some(g.right) : none,
35
- }, PlotGutterType);
36
- return East.value(variant("fixed", gutter), AlignedGutterType);
37
- }
38
- /**
39
- * Build an `<AlignedStack>` — a vertical stack of axis/lane components (Chart,
40
- * Trace, Calendar, …) that share one horizontal plot gutter so their data lanes
41
- * line up on a common x. The gutter is published to the children via context; a
42
- * child's own `plotGutter` prop still wins over the inherited value (#147).
43
- *
44
- * @param children - The stacked lane components
45
- * @param options - The {@link AlignedStackOptions} (`gutter` + box-model style)
46
- * @returns An `AlignedStack` {@link UIComponentType} value
47
- *
48
- * @example
49
- * ```ts
50
- * import { East } from "@elaraai/east";
51
- * import { AlignedStack, Chart, UIComponentType } from "@elaraai/east-ui";
52
- *
53
- * const aligned = East.function([], UIComponentType, ($) =>
54
- * AlignedStack.Root([
55
- * Chart.Root(Chart.Line(rows, { x: r => r.day, y: r => r.value })),
56
- * // …a Trace / Planner on the same day axis…
57
- * ], { gutter: { left: "48px", right: "12px" }, gap: "8px" }));
58
- * ```
59
- */
60
- function createAlignedStack(children, options) {
61
- const gutter = resolveGutter(options?.gutter);
62
- const densityValue = options?.density !== undefined
63
- ? (typeof options.density === "string"
64
- ? East.value(variant(options.density, null), DensityType)
65
- : options.density)
66
- : undefined;
67
- const hasStyle = options !== undefined &&
68
- (options.gap !== undefined || options.width !== undefined ||
69
- options.height !== undefined || options.minHeight !== undefined ||
70
- options.density !== undefined);
71
- return East.value(variant("AlignedStack", {
72
- children,
73
- gutter: gutter !== undefined ? some(gutter) : none,
74
- style: hasStyle
75
- ? some(East.value({
76
- gap: options.gap !== undefined ? some(options.gap) : none,
77
- width: options.width !== undefined ? some(options.width) : none,
78
- height: options.height !== undefined ? some(options.height) : none,
79
- minHeight: options.minHeight !== undefined ? some(options.minHeight) : none,
80
- density: densityValue !== undefined ? some(densityValue) : none,
81
- }, AlignedStackStyleType))
82
- : none,
83
- }), UIComponentType);
84
- }
85
- /**
86
- * `AlignedStack` — vertically stacks axis/lane components on a shared plot gutter.
87
- *
88
- * @remarks
89
- * Use `AlignedStack.Root(children, { gutter })`. Types via `.Types`.
90
- */
91
- export const AlignedStack = {
92
- /** Build an AlignedStack (see {@link createAlignedStack}). */
93
- Root: createAlignedStack,
94
- Types: {
95
- /** The AlignedStack data struct. */
96
- AlignedStack: AlignedStackType,
97
- /** The `{ left, right }` plot-gutter struct. */
98
- PlotGutter: PlotGutterType,
99
- /** The `auto | fixed` gutter mode. */
100
- Gutter: AlignedGutterType,
101
- /** The AlignedStack style struct. */
102
- Style: AlignedStackStyleType,
103
- },
104
- };
105
- //# sourceMapp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