@elaraai/east-ui 1.0.39 → 1.0.41

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 (121) hide show
  1. package/dist/src/collections/calendar/index.d.ts +275 -62
  2. package/dist/src/collections/calendar/index.d.ts.map +1 -1
  3. package/dist/src/collections/calendar/index.js +168 -51
  4. package/dist/src/collections/calendar/index.js.map +1 -1
  5. package/dist/src/collections/calendar/types.d.ts +228 -22
  6. package/dist/src/collections/calendar/types.d.ts.map +1 -1
  7. package/dist/src/collections/calendar/types.js +132 -18
  8. package/dist/src/collections/calendar/types.js.map +1 -1
  9. package/dist/src/collections/deck/index.d.ts +2229 -0
  10. package/dist/src/collections/deck/index.d.ts.map +1 -0
  11. package/dist/src/collections/deck/index.js +461 -0
  12. package/dist/src/collections/deck/index.js.map +1 -0
  13. package/dist/src/collections/deck/types.d.ts +327 -0
  14. package/dist/src/collections/deck/types.d.ts.map +1 -0
  15. package/dist/src/collections/deck/types.js +206 -0
  16. package/dist/src/collections/deck/types.js.map +1 -0
  17. package/dist/src/collections/index.d.ts +2 -0
  18. package/dist/src/collections/index.d.ts.map +1 -1
  19. package/dist/src/collections/index.js +2 -0
  20. package/dist/src/collections/index.js.map +1 -1
  21. package/dist/src/collections/value-tree/index.d.ts +380 -0
  22. package/dist/src/collections/value-tree/index.d.ts.map +1 -0
  23. package/dist/src/collections/value-tree/index.js +688 -0
  24. package/dist/src/collections/value-tree/index.js.map +1 -0
  25. package/dist/src/collections/value-tree/materialize.d.ts +65 -0
  26. package/dist/src/collections/value-tree/materialize.d.ts.map +1 -0
  27. package/dist/src/collections/value-tree/materialize.js +238 -0
  28. package/dist/src/collections/value-tree/materialize.js.map +1 -0
  29. package/dist/src/collections/value-tree/types.d.ts +324 -0
  30. package/dist/src/collections/value-tree/types.d.ts.map +1 -0
  31. package/dist/src/collections/value-tree/types.js +168 -0
  32. package/dist/src/collections/value-tree/types.js.map +1 -0
  33. package/dist/src/component.d.ts +1047 -61
  34. package/dist/src/component.d.ts.map +1 -1
  35. package/dist/src/component.js +97 -3
  36. package/dist/src/component.js.map +1 -1
  37. package/dist/src/index.d.ts +3 -3
  38. package/dist/src/index.d.ts.map +1 -1
  39. package/dist/src/index.js +2 -2
  40. package/dist/src/index.js.map +1 -1
  41. package/dist/src/internal.d.ts +4 -3
  42. package/dist/src/internal.d.ts.map +1 -1
  43. package/dist/src/internal.js +3 -3
  44. package/dist/src/internal.js.map +1 -1
  45. package/dist/src/layout/splitter/index.d.ts +1 -0
  46. package/dist/src/layout/splitter/index.d.ts.map +1 -1
  47. package/dist/src/layout/splitter/index.js +2 -1
  48. package/dist/src/layout/splitter/index.js.map +1 -1
  49. package/dist/src/layout/splitter/types.d.ts +9 -0
  50. package/dist/src/layout/splitter/types.d.ts.map +1 -1
  51. package/dist/src/layout/splitter/types.js +4 -0
  52. package/dist/src/layout/splitter/types.js.map +1 -1
  53. package/dist/src/navigation/app/index.d.ts +135 -0
  54. package/dist/src/navigation/app/index.d.ts.map +1 -0
  55. package/dist/src/navigation/app/index.js +191 -0
  56. package/dist/src/navigation/app/index.js.map +1 -0
  57. package/dist/src/navigation/index.d.ts +1 -0
  58. package/dist/src/navigation/index.d.ts.map +1 -1
  59. package/dist/src/navigation/index.js +1 -0
  60. package/dist/src/navigation/index.js.map +1 -1
  61. package/dist/src/navigation/pages/types.d.ts +15 -1
  62. package/dist/src/navigation/pages/types.d.ts.map +1 -1
  63. package/dist/src/navigation/pages/types.js.map +1 -1
  64. package/dist/src/platform/slice/impl.js +2 -2
  65. package/dist/src/platform/slice/impl.js.map +1 -1
  66. package/dist/src/runtime/collections/calendar.d.ts +10 -5
  67. package/dist/src/runtime/collections/calendar.d.ts.map +1 -1
  68. package/dist/src/runtime/collections/calendar.js +10 -5
  69. package/dist/src/runtime/collections/calendar.js.map +1 -1
  70. package/dist/src/runtime/collections/deck.d.ts +1066 -0
  71. package/dist/src/runtime/collections/deck.d.ts.map +1 -0
  72. package/dist/src/runtime/collections/deck.js +54 -0
  73. package/dist/src/runtime/collections/deck.js.map +1 -0
  74. package/dist/src/runtime/collections/index.d.ts +2 -0
  75. package/dist/src/runtime/collections/index.d.ts.map +1 -1
  76. package/dist/src/runtime/collections/index.js +2 -0
  77. package/dist/src/runtime/collections/index.js.map +1 -1
  78. package/dist/src/runtime/collections/value-tree.d.ts +202 -0
  79. package/dist/src/runtime/collections/value-tree.d.ts.map +1 -0
  80. package/dist/src/runtime/collections/value-tree.js +49 -0
  81. package/dist/src/runtime/collections/value-tree.js.map +1 -0
  82. package/dist/src/runtime/navigation/app.d.ts +50 -0
  83. package/dist/src/runtime/navigation/app.d.ts.map +1 -0
  84. package/dist/src/runtime/navigation/app.js +51 -0
  85. package/dist/src/runtime/navigation/app.js.map +1 -0
  86. package/dist/src/runtime/navigation/index.d.ts +1 -0
  87. package/dist/src/runtime/navigation/index.d.ts.map +1 -1
  88. package/dist/src/runtime/navigation/index.js +1 -0
  89. package/dist/src/runtime/navigation/index.js.map +1 -1
  90. package/dist/test/collections/calendar.examples.d.ts +2 -0
  91. package/dist/test/collections/calendar.examples.d.ts.map +1 -1
  92. package/dist/test/collections/calendar.examples.js +74 -42
  93. package/dist/test/collections/calendar.examples.js.map +1 -1
  94. package/dist/test/collections/deck.examples.d.ts +8 -0
  95. package/dist/test/collections/deck.examples.d.ts.map +1 -0
  96. package/dist/test/collections/deck.examples.js +169 -0
  97. package/dist/test/collections/deck.examples.js.map +1 -0
  98. package/dist/test/collections/planner.examples.js +2 -2
  99. package/dist/test/collections/value-tree.examples.d.ts +10 -0
  100. package/dist/test/collections/value-tree.examples.d.ts.map +1 -0
  101. package/dist/test/collections/value-tree.examples.js +263 -0
  102. package/dist/test/collections/value-tree.examples.js.map +1 -0
  103. package/dist/test/display/image.examples.js +1 -1
  104. package/dist/test/display/image.examples.js.map +1 -1
  105. package/dist/test/layout/aligned-stack.examples.js +4 -4
  106. package/dist/test/layout/aligned-stack.examples.js.map +1 -1
  107. package/dist/test/layout/dock.examples.js +6 -6
  108. package/dist/test/layout/dock.examples.js.map +1 -1
  109. package/dist/test/layout/splitter.examples.d.ts +1 -0
  110. package/dist/test/layout/splitter.examples.d.ts.map +1 -1
  111. package/dist/test/layout/splitter.examples.js +11 -0
  112. package/dist/test/layout/splitter.examples.js.map +1 -1
  113. package/dist/test/navigation/app.examples.d.ts +22 -0
  114. package/dist/test/navigation/app.examples.d.ts.map +1 -0
  115. package/dist/test/navigation/app.examples.js +116 -0
  116. package/dist/test/navigation/app.examples.js.map +1 -0
  117. package/dist/test/navigation/nav-list.examples.js +2 -2
  118. package/dist/test/navigation/nav-list.examples.js.map +1 -1
  119. package/dist/test/overlays/drawer.examples.js +2 -2
  120. package/dist/test/overlays/drawer.examples.js.map +1 -1
  121. package/package.json +3 -3
@@ -3,23 +3,121 @@
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
5
  /**
6
- * `Calendar` — a day-of-week × week grid coloured by intensity (forecast,
7
- * demand, OT exposure). **Visualisation only**: clicking drills into a day,
8
- * but the Calendar is not part of the Planner family — no events, no
6
+ * `Calendar` — a day-of-week × week heatmap coloured by intensity (forecast,
7
+ * demand, OT exposure). **Visualisation only**: clicking selects/drills into
8
+ * a day, but the Calendar is not part of the Planner family — no events, no
9
9
  * committed/proposed state, no drag & drop. Takes one flat table with a
10
- * chart-style field encoding; the component owns the week (columns are
11
- * always Mon–Sun).
10
+ * chart-style field encoding; the component owns the week (columns are always
11
+ * Mon–Sun). Optional chrome — the weekly totals rail, the per-weekday
12
+ * aggregate row, and the selection footer — is composed with the
13
+ * `Calendar.*` sub-factories.
12
14
  *
13
15
  * @packageDocumentation
14
16
  */
15
- import { East, Expr, variant, some, none, ArrayType, FloatType, StringType, StructType, } from "@elaraai/east";
17
+ import { East, Expr, variant, some, none, ArrayType, BooleanType, FloatType, IntegerType, StringType, StructType, } from "@elaraai/east";
16
18
  import { UIComponentType } from "../../component.js";
17
19
  import { mapRows } from "../../shared/reify.js";
18
20
  import { DensityType } from "../../style.js";
19
21
  import { PlotGutterType } from "../../shared/plot-gutter.js";
20
- import { CalendarRootType, CalendarCellType, CalendarCellRefType, } from "./types.js";
22
+ import { CalendarRootType, CalendarCellType, CalendarCellRefType, CalendarAggregateType, CalendarScaleType, CalendarTotalsType, CalendarAggregateRowType, CalendarLegendType, CalendarFooterType, } from "./types.js";
21
23
  // Re-export types
22
- export { CalendarRootType, CalendarCellType, CalendarCellRefType, } from "./types.js";
24
+ export { CalendarRootType, CalendarCellType, CalendarCellRefType, CalendarAggregateType, CalendarScaleType, CalendarTotalsType, CalendarAggregateRowType, CalendarLegendType, CalendarFooterType, } from "./types.js";
25
+ // ============================================================================
26
+ // Sub-factory helpers
27
+ // ============================================================================
28
+ /** Normalise an aggregate literal / expression into a `CalendarAggregateType`. */
29
+ function aggregateValue(agg) {
30
+ return typeof agg === "string"
31
+ ? East.value(variant(agg, null), CalendarAggregateType)
32
+ : agg;
33
+ }
34
+ /**
35
+ * Builds a heatmap scale — the low→high colour ramp and bucket count that map
36
+ * a cell value to its fill. Pass the result as `config.scale`.
37
+ *
38
+ * @param options - The scale options ({@link CalendarScaleOptions})
39
+ * @returns An East `CalendarScaleType` value
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * Calendar.scale({ steps: 6 })
44
+ * ```
45
+ */
46
+ function calendarScale(options = {}) {
47
+ return East.value({
48
+ ramp: options.ramp !== undefined
49
+ ? some(East.value(options.ramp, ArrayType(StringType)))
50
+ : none,
51
+ steps: options.steps ?? 8n,
52
+ }, CalendarScaleType);
53
+ }
54
+ /**
55
+ * Builds the weekly totals rail — a trailing column reducing each week row,
56
+ * with an optional proportion bar. Pass the result as `config.totals`.
57
+ * The aggregate vocabulary (`sum` / `mean` / `min` / `max` / `count`) matches
58
+ * the Table component.
59
+ *
60
+ * @param options - The totals options ({@link CalendarTotalsOptions})
61
+ * @returns An East `CalendarTotalsType` value
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * Calendar.totals({ aggregate: "sum", label: "Σ wk" })
66
+ * ```
67
+ */
68
+ function calendarTotals(options = {}) {
69
+ return East.value({
70
+ aggregate: aggregateValue(options.aggregate ?? "sum"),
71
+ label: options.label ?? "Σ wk",
72
+ bar: options.bar ?? true,
73
+ }, CalendarTotalsType);
74
+ }
75
+ /**
76
+ * Builds the per-weekday aggregate row — a trailing row reducing each weekday
77
+ * column, pinned under the grid. Pass the result as `config.aggregateRow`.
78
+ *
79
+ * @param options - The aggregate-row options ({@link CalendarAggregateRowOptions})
80
+ * @returns An East `CalendarAggregateRowType` value
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * Calendar.aggregateRow({ aggregate: "mean", label: "mean" })
85
+ * ```
86
+ */
87
+ function calendarAggregateRow(options = {}) {
88
+ return East.value({
89
+ aggregate: aggregateValue(options.aggregate ?? "mean"),
90
+ label: options.label ?? "mean",
91
+ }, CalendarAggregateRowType);
92
+ }
93
+ /**
94
+ * Builds the selection footer — the strip shown once a cell is selected,
95
+ * printing the cell value (labelled `valueLabel`), its `compare` baseline
96
+ * (labelled `compareLabel`) and a computed delta chip, plus an optional
97
+ * low→high gradient legend pinned right. Pass the result as `config.footer`.
98
+ *
99
+ * @param options - The footer options ({@link CalendarFooterOptions})
100
+ * @returns An East `CalendarFooterType` value
101
+ *
102
+ * @example
103
+ * ```ts
104
+ * Calendar.footer({ valueLabel: "predicted", compareLabel: "last yr", legend: true })
105
+ * ```
106
+ */
107
+ function calendarFooter(options = {}) {
108
+ const legend = options.legend;
109
+ const legendValue = legend === undefined || legend === false
110
+ ? none
111
+ : some(East.value({
112
+ low: (legend === true ? undefined : legend.low) ?? "low",
113
+ high: (legend === true ? undefined : legend.high) ?? "high",
114
+ }, CalendarLegendType));
115
+ return East.value({
116
+ valueLabel: options.valueLabel ?? "value",
117
+ compareLabel: options.compareLabel ?? "prev",
118
+ legend: legendValue,
119
+ }, CalendarFooterType);
120
+ }
23
121
  function buildRoot(data, config) {
24
122
  const cellMapper = config.cell;
25
123
  const cells = cellMapper === undefined
@@ -34,8 +132,8 @@ function buildRoot(data, config) {
34
132
  day: r.day,
35
133
  value,
36
134
  text: r.text !== undefined ? r.text : East.print(value),
135
+ compare: r.compare !== undefined ? some(East.value(r.compare, FloatType)) : none,
37
136
  summary: r.summary !== undefined ? some(r.summary) : none,
38
- delta: r.delta !== undefined ? some(r.delta) : none,
39
137
  }, CalendarCellType);
40
138
  });
41
139
  const densityValue = config.density !== undefined
@@ -44,11 +142,15 @@ function buildRoot(data, config) {
44
142
  : config.density)
45
143
  : undefined;
46
144
  return East.value(variant("Calendar", {
47
- legend: config.legend ?? "",
48
145
  cells,
146
+ values: config.values ?? true,
147
+ scale: config.scale !== undefined ? some(East.value(config.scale, CalendarScaleType)) : none,
49
148
  domain: config.domain !== undefined
50
149
  ? some(East.value({ min: config.domain.min, max: config.domain.max }, StructType({ min: FloatType, max: FloatType })))
51
150
  : none,
151
+ totals: config.totals !== undefined ? some(East.value(config.totals, CalendarTotalsType)) : none,
152
+ aggregateRow: config.aggregateRow !== undefined ? some(East.value(config.aggregateRow, CalendarAggregateRowType)) : none,
153
+ footer: config.footer !== undefined ? some(East.value(config.footer, CalendarFooterType)) : none,
52
154
  actionLabel: config.actionLabel !== undefined ? some(config.actionLabel) : none,
53
155
  onAction: config.onAction !== undefined ? some(config.onAction) : none,
54
156
  onSelect: config.onSelect !== undefined ? some(config.onSelect) : none,
@@ -64,7 +166,7 @@ function buildRoot(data, config) {
64
166
  }), UIComponentType);
65
167
  }
66
168
  /**
67
- * Creates a Calendar — a day-of-week × week intensity grid.
169
+ * Creates a Calendar — a day-of-week × week intensity heatmap.
68
170
  *
69
171
  * @typeParam R - The day-table input
70
172
  * @param data - The day rows (one element per week × day cell; sparse is fine)
@@ -81,6 +183,8 @@ function buildRoot(data, config) {
81
183
  * [{ week: "W37", day: "Mon", demand: 102.0 }],
82
184
  * {
83
185
  * cell: d => ({ week: d.week, day: d.day, value: d.demand }),
186
+ * totals: Calendar.totals(),
187
+ * footer: Calendar.footer({ legend: true }),
84
188
  * },
85
189
  * ),
86
190
  * );
@@ -96,13 +200,16 @@ function createCalendar(data, config) {
96
200
  * Calendar component namespace.
97
201
  *
98
202
  * @remarks
99
- * `Calendar.Root(data, config)` builds the grid from one flat day table.
100
- * Visualisation only — pair it with a `Slice.Range` in the surrounding
101
- * chrome if the time window needs to narrow.
203
+ * `Calendar.Root(data, config)` builds the heatmap from one flat day table.
204
+ * Compose the optional chrome with the sub-factories: `Calendar.scale` (the
205
+ * colour ramp), `Calendar.totals` (the weekly rail), `Calendar.aggregateRow`
206
+ * (the per-weekday row), and `Calendar.footer` (the selection footer + legend).
207
+ * Visualisation only — pair it with a `Slice.Range` in the surrounding chrome
208
+ * if the time window needs to narrow.
102
209
  */
103
210
  export const Calendar = {
104
211
  /**
105
- * Creates a Calendar — a day-of-week × week intensity grid.
212
+ * Creates a Calendar — a day-of-week × week intensity heatmap.
106
213
  *
107
214
  * @typeParam R - The day-table input
108
215
  * @param data - The day rows (one element per week × day cell; sparse is fine)
@@ -110,61 +217,71 @@ export const Calendar = {
110
217
  * @returns An East expression of `UIComponentType`
111
218
  *
112
219
  * @remarks
113
- * Cells fill with brand-scale intensity normalised over the visible
114
- * values (or the explicit `domain`); missing (week, day) combinations
115
- * render the neutral `−` fill. Selecting a cell shows its `summary` /
116
- * `delta` in the footer next to the drill `action`.
220
+ * Cells fill with the heatmap ramp normalised over the visible values (or
221
+ * the explicit `domain`); missing (week, day) combinations render the
222
+ * neutral hatched fill. Selecting a cell shows its details in the footer.
223
+ */
224
+ Root: createCalendar,
225
+ /**
226
+ * Builds a heatmap scale — the low→high colour ramp and bucket count.
227
+ * Pass the result as `config.scale`.
117
228
  *
118
- * @example
119
- * ```ts
120
- * import { East } from "@elaraai/east";
121
- * import { Calendar, UIComponentType } from "@elaraai/east-ui";
229
+ * @param options - The scale options ({@link CalendarScaleOptions})
230
+ * @returns An East `CalendarScaleType` value
231
+ */
232
+ scale: calendarScale,
233
+ /**
234
+ * Builds the weekly totals rail (per-row aggregation) — a trailing column
235
+ * with an optional proportion bar. Pass the result as `config.totals`.
122
236
  *
123
- * const example = East.function([], UIComponentType, _$ =>
124
- * Calendar.Root(
125
- * [{ week: "W37", day: "Mon", demand: 102.0 }],
126
- * {
127
- * title: "Forecasted demand · SE region",
128
- * cell: d => ({ week: d.week, day: d.day, value: d.demand }),
129
- * },
130
- * ),
131
- * );
132
- * ```
237
+ * @param options - The totals options ({@link CalendarTotalsOptions})
238
+ * @returns An East `CalendarTotalsType` value
133
239
  */
134
- Root: createCalendar,
240
+ totals: calendarTotals,
241
+ /**
242
+ * Builds the per-weekday aggregate row (per-column aggregation). Pass the
243
+ * result as `config.aggregateRow`.
244
+ *
245
+ * @param options - The aggregate-row options ({@link CalendarAggregateRowOptions})
246
+ * @returns An East `CalendarAggregateRowType` value
247
+ */
248
+ aggregateRow: calendarAggregateRow,
249
+ /**
250
+ * Builds the selection footer (value / compare / delta + legend). Pass the
251
+ * result as `config.footer`.
252
+ *
253
+ * @param options - The footer options ({@link CalendarFooterOptions})
254
+ * @returns An East `CalendarFooterType` value
255
+ */
256
+ footer: calendarFooter,
135
257
  Types: {
136
258
  /**
137
259
  * East StructType for the Calendar component.
138
260
  *
139
261
  * @remarks
140
262
  * The resolved grid; see {@link CalendarRootType} for per-field docs.
141
- *
142
- * @property legend - Intensity caption
143
- * @property cells - The resolved cells
144
- * @property domain - Optional explicit intensity domain
145
- * @property actionLabel - Optional footer-right drill label
146
- * @property onAction - Optional drill callback
147
- * @property onSelect - Optional cell-click callback
148
263
  */
149
264
  Calendar: CalendarRootType,
150
265
  /**
151
266
  * A resolved calendar cell.
152
- *
153
- * @property week - The row's week label
154
- * @property day - The day column
155
- * @property value - The intensity / printed value
156
- * @property text - The cell text
157
- * @property summary - Optional selection-footer text
158
- * @property delta - Optional signed change
159
267
  */
160
268
  Cell: CalendarCellType,
161
269
  /**
162
270
  * A cell reference — what `onSelect` / `onAction` receive.
163
- *
164
- * @property week - The row's week label
165
- * @property day - The day column
166
271
  */
167
272
  CellRef: CalendarCellRefType,
273
+ /** The aggregate reduction vocabulary (sum / mean / min / max / count). */
274
+ Aggregate: CalendarAggregateType,
275
+ /** The heatmap scale (ramp / steps). */
276
+ Scale: CalendarScaleType,
277
+ /** The weekly totals rail. */
278
+ Totals: CalendarTotalsType,
279
+ /** The per-weekday aggregate row. */
280
+ AggregateRow: CalendarAggregateRowType,
281
+ /** The selection footer. */
282
+ Footer: CalendarFooterType,
283
+ /** The heatmap legend. */
284
+ Legend: CalendarLegendType,
168
285
  },
169
286
  };
170
287
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collections/calendar/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AAEH,OAAO,EAIH,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,SAAS,EAGT,UAAU,EACV,UAAU,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,GACtB,MAAM,YAAY,CAAC;AAEpB,kBAAkB;AAClB,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,GACtB,MAAM,YAAY,CAAC;AA2EpB,SAAS,SAAS,CACd,IAA+C,EAC/C,MAAkC;IAElC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;IAC/B,MAAM,KAAK,GAAG,UAAU,KAAK,SAAS;QAClC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAuD,EAAE,S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AE,MAAM,CAAC,UAAU,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;aACtF,EAAE,cAAc,CAAC,CAAC;YACnB,CAAC,CAAC,IAAI;KACb,CAAC,EAAE,eAAe,CAAC,CAAC;AACzB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAS,cAAc,CACnB,IAAO,EACP,MAAqC;IAErC,OAAO,SAAS,CAAC,IAAI,EAAE,MAA+C,CAAC,CAAC;AAC5E,CAAC;AAED,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE,cAAc;IACpB;;;;;;OAMG;IACH,KAAK,EAAE,aAAa;IACpB;;;;;;OAMG;IACH,MAAM,EAAE,cAAc;IACtB;;;;;;OAMG;IACH,YAAY,EAAE,oBAAoB;IAClC;;;;;;OAMG;IACH,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE;QACH;;;;;WAKG;QACH,QAAQ,EAAE,gBAAgB;QAC1B;;WAEG;QACH,IAAI,EAAE,gBAAgB;QACtB;;WAEG;QACH,OAAO,EAAE,mBAAmB;QAC5B,2EAA2E;QAC3E,SAAS,EAAE,qBAAqB;QAChC,wCAAwC;QACxC,KAAK,EAAE,iBAAiB;QACxB,8BAA8B;QAC9B,MAAM,EAAE,kBAAkB;QAC1B,qCAAqC;QACrC,YAAY,EAAE,wBAAwB;QACtC,4BAA4B;QAC5B,MAAM,EAAE,kBAAkB;QAC1B,0BAA0B;QAC1B,MAAM,EAAE,kBAAkB;KAC7B;CACK,CAAC"}
@@ -2,7 +2,147 @@
2
2
  * Copyright (c) 2025 Elara AI Pty Ltd
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
- import { ArrayType, FloatType, FunctionType, NullType, OptionType, StringType, StructType } from "@elaraai/east";
5
+ import { ArrayType, BooleanType, FloatType, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, VariantType } from "@elaraai/east";
6
+ /**
7
+ * A reduction applied across a calendar row (the weekly totals rail) or
8
+ * column (the aggregate row). Mirrors the Table component's aggregate
9
+ * vocabulary so the two collections stay consistent.
10
+ *
11
+ * @property sum - Numeric sum of the member cell values
12
+ * @property mean - Numeric mean of the member cell values
13
+ * @property min - Minimum member value
14
+ * @property max - Maximum member value
15
+ * @property count - Number of member cells present
16
+ */
17
+ export declare const CalendarAggregateType: VariantType<{
18
+ /** Numeric sum of the member cell values */
19
+ readonly sum: NullType;
20
+ /** Numeric mean of the member cell values */
21
+ readonly mean: NullType;
22
+ /** Minimum member value */
23
+ readonly min: NullType;
24
+ /** Maximum member value */
25
+ readonly max: NullType;
26
+ /** Number of member cells present */
27
+ readonly count: NullType;
28
+ }>;
29
+ /** Type representing a calendar aggregate reduction. */
30
+ export type CalendarAggregateType = typeof CalendarAggregateType;
31
+ /** String-literal shorthand for {@link CalendarAggregateType}. */
32
+ export type CalendarAggregateLiteral = "sum" | "mean" | "min" | "max" | "count";
33
+ /**
34
+ * The heatmap colour scale — how a cell value maps to a fill.
35
+ *
36
+ * @remarks
37
+ * `ramp` is a low→high list of CSS colours; when absent the renderer uses
38
+ * the built-in eight-step teal ramp (theme-aware — it flips to a bright-on-
39
+ * dark ramp in dark mode). `steps` buckets the domain (default the ramp
40
+ * length). The intensity domain lives on the root as `domain`.
41
+ *
42
+ * @property ramp - Optional low→high colour list (absent = the default ramp)
43
+ * @property steps - Number of intensity buckets
44
+ */
45
+ export declare const CalendarScaleType: StructType<{
46
+ /** Optional low→high colour list (absent = the default ramp) */
47
+ readonly ramp: OptionType<ArrayType<StringType>>;
48
+ /** Number of intensity buckets */
49
+ readonly steps: IntegerType;
50
+ }>;
51
+ /** Type representing a calendar heatmap scale. */
52
+ export type CalendarScaleType = typeof CalendarScaleType;
53
+ /**
54
+ * The weekly totals rail — a trailing column that reduces each week row and
55
+ * (optionally) shows a proportion bar against the largest total.
56
+ *
57
+ * @property aggregate - The reduction applied across each week's cells
58
+ * @property label - The rail's column header (e.g. `"Σ wk"`)
59
+ * @property bar - Whether to draw the proportion bar under each total
60
+ */
61
+ export declare const CalendarTotalsType: StructType<{
62
+ /** The reduction applied across each week's cells */
63
+ readonly aggregate: VariantType<{
64
+ /** Numeric sum of the member cell values */
65
+ readonly sum: NullType;
66
+ /** Numeric mean of the member cell values */
67
+ readonly mean: NullType;
68
+ /** Minimum member value */
69
+ readonly min: NullType;
70
+ /** Maximum member value */
71
+ readonly max: NullType;
72
+ /** Number of member cells present */
73
+ readonly count: NullType;
74
+ }>;
75
+ /** The rail's column header (e.g. `"Σ wk"`) */
76
+ readonly label: StringType;
77
+ /** Whether to draw the proportion bar under each total */
78
+ readonly bar: BooleanType;
79
+ }>;
80
+ /** Type representing the weekly totals rail. */
81
+ export type CalendarTotalsType = typeof CalendarTotalsType;
82
+ /**
83
+ * The aggregate row — a trailing row that reduces each weekday column
84
+ * (e.g. the per-weekday mean), pinned under the grid with a top rule.
85
+ *
86
+ * @property aggregate - The reduction applied across each weekday's cells
87
+ * @property label - The row's label (e.g. `"mean"`)
88
+ */
89
+ export declare const CalendarAggregateRowType: StructType<{
90
+ /** The reduction applied across each weekday's cells */
91
+ readonly aggregate: VariantType<{
92
+ /** Numeric sum of the member cell values */
93
+ readonly sum: NullType;
94
+ /** Numeric mean of the member cell values */
95
+ readonly mean: NullType;
96
+ /** Minimum member value */
97
+ readonly min: NullType;
98
+ /** Maximum member value */
99
+ readonly max: NullType;
100
+ /** Number of member cells present */
101
+ readonly count: NullType;
102
+ }>;
103
+ /** The row's label (e.g. `"mean"`) */
104
+ readonly label: StringType;
105
+ }>;
106
+ /** Type representing the per-weekday aggregate row. */
107
+ export type CalendarAggregateRowType = typeof CalendarAggregateRowType;
108
+ /**
109
+ * The footer's low→high gradient legend that decodes the heatmap ramp.
110
+ *
111
+ * @property low - The low-end caption (e.g. `"low"`)
112
+ * @property high - The high-end caption (e.g. `"high"`)
113
+ */
114
+ export declare const CalendarLegendType: StructType<{
115
+ /** The low-end caption (e.g. `"low"`) */
116
+ readonly low: StringType;
117
+ /** The high-end caption (e.g. `"high"`) */
118
+ readonly high: StringType;
119
+ }>;
120
+ /** Type representing the heatmap legend. */
121
+ export type CalendarLegendType = typeof CalendarLegendType;
122
+ /**
123
+ * The selection footer — shown once a cell is selected. Reads the selected
124
+ * cell's `value` (labelled `valueLabel`) and, when present, its `compare`
125
+ * baseline (labelled `compareLabel`) plus the computed delta chip.
126
+ *
127
+ * @property valueLabel - Label for the cell value (e.g. `"predicted"`)
128
+ * @property compareLabel - Label for the compare baseline (e.g. `"last yr"`)
129
+ * @property legend - Optional low→high gradient legend, pinned footer-right
130
+ */
131
+ export declare const CalendarFooterType: StructType<{
132
+ /** Label for the cell value (e.g. `"predicted"`) */
133
+ readonly valueLabel: StringType;
134
+ /** Label for the compare baseline (e.g. `"last yr"`) */
135
+ readonly compareLabel: StringType;
136
+ /** Optional low→high gradient legend, pinned footer-right */
137
+ readonly legend: OptionType<StructType<{
138
+ /** The low-end caption (e.g. `"low"`) */
139
+ readonly low: StringType;
140
+ /** The high-end caption (e.g. `"high"`) */
141
+ readonly high: StringType;
142
+ }>>;
143
+ }>;
144
+ /** Type representing the selection footer. */
145
+ export type CalendarFooterType = typeof CalendarFooterType;
6
146
  /**
7
147
  * A cell reference on the calendar grid — what `onSelect` receives.
8
148
  *
@@ -24,15 +164,16 @@ export type CalendarCellRefType = typeof CalendarCellRefType;
24
164
  *
25
165
  * @remarks
26
166
  * One element per (week, day) the data covered; days with no cell render
27
- * the neutral `−` fill. `summary` / `delta` are the selection-footer facts
28
- * for this day, resolved from the accessors at authoring time.
167
+ * the neutral hatched fill. `compare` is the footer's baseline (last year /
168
+ * forecast) — when present the footer prints it and a computed delta chip;
169
+ * `summary` is optional extra footer text.
29
170
  *
30
171
  * @property week - The row's week label (rows appear in first-appearance order)
31
172
  * @property day - The day column ("Mon" … "Sun", exact match)
32
173
  * @property value - The intensity / printed value
33
174
  * @property text - The cell text (formatted value)
34
- * @property summary - Optional selection-footer text for this day
35
- * @property delta - Optional signed change (renders as a pos/neg chip)
175
+ * @property compare - Optional baseline for the footer delta (e.g. last year)
176
+ * @property summary - Optional extra selection-footer text for this day
36
177
  */
37
178
  export declare const CalendarCellType: StructType<{
38
179
  /** The row's week label (rows appear in first-appearance order) */
@@ -43,10 +184,10 @@ export declare const CalendarCellType: StructType<{
43
184
  readonly value: FloatType;
44
185
  /** The cell text (formatted value) */
45
186
  readonly text: StringType;
46
- /** Optional selection-footer text for this day */
187
+ /** Optional baseline for the footer delta (e.g. last year) */
188
+ readonly compare: OptionType<FloatType>;
189
+ /** Optional extra selection-footer text for this day */
47
190
  readonly summary: OptionType<StringType>;
48
- /** Optional signed change (renders as a pos/neg chip) */
49
- readonly delta: OptionType<FloatType>;
50
191
  }>;
51
192
  /**
52
193
  * Type representing resolved calendar cells.
@@ -56,21 +197,25 @@ export type CalendarCellType = typeof CalendarCellType;
56
197
  * East StructType for the Calendar component.
57
198
  *
58
199
  * @remarks
59
- * Day-of-week × week grid coloured by intensity — visualisation only: click
60
- * drills into a day (`onSelect` / the footer `action`), but there are no
61
- * events, no committed/proposed state, and no drag & drop.
200
+ * Day-of-week × week heatmap coloured by intensity — visualisation only:
201
+ * clicking selects/drills a day (`onSelect` / the footer `action`), but
202
+ * there are no events, no committed/proposed state, and no drag & drop.
203
+ * Optional chrome: the weekly `totals` rail, the per-weekday `aggregateRow`,
204
+ * and the selection `footer` (with its gradient legend).
62
205
  *
63
- * @property legend - Intensity caption (decodes the colour ramp)
64
206
  * @property cells - The resolved cells
207
+ * @property values - Whether the numeric value is printed inside each cell
208
+ * @property scale - Optional heatmap scale override (ramp / steps)
65
209
  * @property domain - Optional explicit intensity domain (default: observed min/max)
66
- * @property actionLabel - Optional footer-right drill label
67
- * @property onAction - Optional footer-right drill callback (receives the selected cell)
210
+ * @property totals - Optional weekly totals rail (per-row aggregation)
211
+ * @property aggregateRow - Optional per-weekday aggregate row (per-column aggregation)
212
+ * @property footer - Optional selection footer (value / compare / delta + legend)
213
+ * @property actionLabel - Optional footer drill label
214
+ * @property onAction - Optional footer drill callback (receives the selected cell)
68
215
  * @property onSelect - Optional cell-click callback
69
216
  * @property density - Optional density preset (comfortable | compact | condensed)
70
217
  */
71
218
  export declare const CalendarRootType: StructType<{
72
- /** Intensity caption (decodes the colour ramp) */
73
- readonly legend: StringType;
74
219
  /** The resolved cells */
75
220
  readonly cells: ArrayType<StructType<{
76
221
  /** The row's week label (rows appear in first-appearance order) */
@@ -81,10 +226,19 @@ export declare const CalendarRootType: StructType<{
81
226
  readonly value: FloatType;
82
227
  /** The cell text (formatted value) */
83
228
  readonly text: StringType;
84
- /** Optional selection-footer text for this day */
229
+ /** Optional baseline for the footer delta (e.g. last year) */
230
+ readonly compare: OptionType<FloatType>;
231
+ /** Optional extra selection-footer text for this day */
85
232
  readonly summary: OptionType<StringType>;
86
- /** Optional signed change (renders as a pos/neg chip) */
87
- readonly delta: OptionType<FloatType>;
233
+ }>>;
234
+ /** Whether the numeric value is printed inside each cell */
235
+ readonly values: BooleanType;
236
+ /** Optional heatmap scale override (ramp / steps) */
237
+ readonly scale: OptionType<StructType<{
238
+ /** Optional low→high colour list (absent = the default ramp) */
239
+ readonly ramp: OptionType<ArrayType<StringType>>;
240
+ /** Number of intensity buckets */
241
+ readonly steps: IntegerType;
88
242
  }>>;
89
243
  /** Optional explicit intensity domain (default: observed min/max) */
90
244
  readonly domain: OptionType<StructType<{
@@ -93,9 +247,61 @@ export declare const CalendarRootType: StructType<{
93
247
  /** Domain maximum */
94
248
  readonly max: FloatType;
95
249
  }>>;
96
- /** Optional footer-right drill label */
250
+ /** Optional weekly totals rail (per-row aggregation) */
251
+ readonly totals: OptionType<StructType<{
252
+ /** The reduction applied across each week's cells */
253
+ readonly aggregate: VariantType<{
254
+ /** Numeric sum of the member cell values */
255
+ readonly sum: NullType;
256
+ /** Numeric mean of the member cell values */
257
+ readonly mean: NullType;
258
+ /** Minimum member value */
259
+ readonly min: NullType;
260
+ /** Maximum member value */
261
+ readonly max: NullType;
262
+ /** Number of member cells present */
263
+ readonly count: NullType;
264
+ }>;
265
+ /** The rail's column header (e.g. `"Σ wk"`) */
266
+ readonly label: StringType;
267
+ /** Whether to draw the proportion bar under each total */
268
+ readonly bar: BooleanType;
269
+ }>>;
270
+ /** Optional per-weekday aggregate row (per-column aggregation) */
271
+ readonly aggregateRow: OptionType<StructType<{
272
+ /** The reduction applied across each weekday's cells */
273
+ readonly aggregate: VariantType<{
274
+ /** Numeric sum of the member cell values */
275
+ readonly sum: NullType;
276
+ /** Numeric mean of the member cell values */
277
+ readonly mean: NullType;
278
+ /** Minimum member value */
279
+ readonly min: NullType;
280
+ /** Maximum member value */
281
+ readonly max: NullType;
282
+ /** Number of member cells present */
283
+ readonly count: NullType;
284
+ }>;
285
+ /** The row's label (e.g. `"mean"`) */
286
+ readonly label: StringType;
287
+ }>>;
288
+ /** Optional selection footer (value / compare / delta + legend) */
289
+ readonly footer: OptionType<StructType<{
290
+ /** Label for the cell value (e.g. `"predicted"`) */
291
+ readonly valueLabel: StringType;
292
+ /** Label for the compare baseline (e.g. `"last yr"`) */
293
+ readonly compareLabel: StringType;
294
+ /** Optional low→high gradient legend, pinned footer-right */
295
+ readonly legend: OptionType<StructType<{
296
+ /** The low-end caption (e.g. `"low"`) */
297
+ readonly low: StringType;
298
+ /** The high-end caption (e.g. `"high"`) */
299
+ readonly high: StringType;
300
+ }>>;
301
+ }>>;
302
+ /** Optional footer drill label */
97
303
  readonly actionLabel: OptionType<StringType>;
98
- /** Optional footer-right drill callback (receives the selected cell) */
304
+ /** Optional footer drill callback (receives the selected cell) */
99
305
  readonly onAction: OptionType<FunctionType<[StructType<{
100
306
  /** The row's week label */
101
307
  readonly week: StringType;
@@ -110,7 +316,7 @@ export declare const CalendarRootType: StructType<{
110
316
  readonly day: StringType;
111
317
  }>], NullType>>;
112
318
  /** Optional density preset (comfortable | compact | condensed); default comfortable */
113
- readonly density: OptionType<import("@elaraai/east").VariantType<{
319
+ readonly density: OptionType<VariantType<{
114
320
  readonly comfortable: NullType;
115
321
  readonly compact: NullType;
116
322
  readonly condensed: NullType;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/collections/calendar/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,SAAS,EACT,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACb,MAAM,eAAe,CAAC;AAKvB;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;IAC5B,2BAA2B;;IAE3B,qCAAqC;;EAEvC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAE7D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB;IACzB,mEAAmE;;IAEnE,kDAAkD;;IAElD,oCAAoC;;IAEpC,sCAAsC;;IAEtC,kDAAkD;;IAElD,yDAAyD;;EAE3D,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC;AAEvD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB;IACzB,kDAAkD;;IAElD,yBAAyB;;QAtCzB,mEAAmE;;QAEnE,kDAAkD;;QAElD,oCAAoC;;QAEpC,sCAAsC;;QAEtC,kDAAkD;;QAElD,yDAAyD;;;IA8BzD,qEAAqE;;QAEjE,qBAAqB;;QAErB,qBAAqB;;;IAGzB,wCAAwC;;IAExC,wEAAwE;;QA5ExE,2BAA2B;;QAE3B,qCAAqC;;;IA4ErC,mCAAmC;;QA9EnC,2BAA2B;;QAE3B,qCAAqC;;;IA8ErC,uFAAuF;;;;;;IAEvF,6JAA6J;;;;;IA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