@elaraai/east-ui 1.0.28 → 1.0.30

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 (188) hide show
  1. package/README.md +3 -3
  2. package/dist/src/charts/chart/index.d.ts +102 -0
  3. package/dist/src/charts/chart/index.d.ts.map +1 -1
  4. package/dist/src/charts/chart/index.js +30 -11
  5. package/dist/src/charts/chart/index.js.map +1 -1
  6. package/dist/src/charts/spec/index.d.ts +204 -0
  7. package/dist/src/charts/spec/index.d.ts.map +1 -1
  8. package/dist/src/charts/spec/types.d.ts +3 -11
  9. package/dist/src/charts/spec/types.d.ts.map +1 -1
  10. package/dist/src/charts/spec/types.js +5 -20
  11. package/dist/src/charts/spec/types.js.map +1 -1
  12. package/dist/src/collections/blend/index.d.ts.map +1 -1
  13. package/dist/src/collections/blend/index.js +2 -1
  14. package/dist/src/collections/blend/index.js.map +1 -1
  15. package/dist/src/collections/board/index.d.ts +490 -0
  16. package/dist/src/collections/board/index.d.ts.map +1 -0
  17. package/dist/src/collections/board/index.js +282 -0
  18. package/dist/src/collections/board/index.js.map +1 -0
  19. package/dist/src/collections/board/types.d.ts +308 -0
  20. package/dist/src/collections/board/types.d.ts.map +1 -0
  21. package/dist/src/collections/board/types.js +156 -0
  22. package/dist/src/collections/board/types.js.map +1 -0
  23. package/dist/src/collections/calendar/index.d.ts.map +1 -1
  24. package/dist/src/collections/calendar/index.js +2 -1
  25. package/dist/src/collections/calendar/index.js.map +1 -1
  26. package/dist/src/collections/gantt/index.d.ts +1 -1
  27. package/dist/src/collections/gantt/index.d.ts.map +1 -1
  28. package/dist/src/collections/gantt/index.js +45 -52
  29. package/dist/src/collections/gantt/index.js.map +1 -1
  30. package/dist/src/collections/index.d.ts +1 -0
  31. package/dist/src/collections/index.d.ts.map +1 -1
  32. package/dist/src/collections/index.js +1 -0
  33. package/dist/src/collections/index.js.map +1 -1
  34. package/dist/src/collections/library/index.d.ts.map +1 -1
  35. package/dist/src/collections/library/index.js +2 -1
  36. package/dist/src/collections/library/index.js.map +1 -1
  37. package/dist/src/collections/map/index.d.ts.map +1 -1
  38. package/dist/src/collections/map/index.js +5 -4
  39. package/dist/src/collections/map/index.js.map +1 -1
  40. package/dist/src/collections/matrix/index.d.ts.map +1 -1
  41. package/dist/src/collections/matrix/index.js +2 -1
  42. package/dist/src/collections/matrix/index.js.map +1 -1
  43. package/dist/src/collections/planner/index.d.ts.map +1 -1
  44. package/dist/src/collections/planner/index.js +2 -1
  45. package/dist/src/collections/planner/index.js.map +1 -1
  46. package/dist/src/collections/roster/index.d.ts +3 -0
  47. package/dist/src/collections/roster/index.d.ts.map +1 -1
  48. package/dist/src/collections/roster/index.js +4 -2
  49. package/dist/src/collections/roster/index.js.map +1 -1
  50. package/dist/src/collections/roster/types.d.ts +3 -0
  51. package/dist/src/collections/roster/types.d.ts.map +1 -1
  52. package/dist/src/collections/roster/types.js +3 -0
  53. package/dist/src/collections/roster/types.js.map +1 -1
  54. package/dist/src/collections/schematic/index.d.ts +537 -709
  55. package/dist/src/collections/schematic/index.d.ts.map +1 -1
  56. package/dist/src/collections/schematic/index.js +289 -9
  57. package/dist/src/collections/schematic/index.js.map +1 -1
  58. package/dist/src/collections/schematic/types.d.ts +562 -841
  59. package/dist/src/collections/schematic/types.d.ts.map +1 -1
  60. package/dist/src/collections/schematic/types.js +416 -46
  61. package/dist/src/collections/schematic/types.js.map +1 -1
  62. package/dist/src/collections/table/index.d.ts +19 -11
  63. package/dist/src/collections/table/index.d.ts.map +1 -1
  64. package/dist/src/collections/table/index.js +65 -78
  65. package/dist/src/collections/table/index.js.map +1 -1
  66. package/dist/src/component.d.ts +1572 -63
  67. package/dist/src/component.d.ts.map +1 -1
  68. package/dist/src/component.js +55 -15
  69. package/dist/src/component.js.map +1 -1
  70. package/dist/src/contracts/format.d.ts +39 -0
  71. package/dist/src/contracts/format.d.ts.map +1 -0
  72. package/dist/src/contracts/format.js +38 -0
  73. package/dist/src/contracts/format.js.map +1 -0
  74. package/dist/src/contracts/index.d.ts +1 -0
  75. package/dist/src/contracts/index.d.ts.map +1 -1
  76. package/dist/src/contracts/index.js +1 -0
  77. package/dist/src/contracts/index.js.map +1 -1
  78. package/dist/src/contracts/slice-affordances.d.ts +13 -3
  79. package/dist/src/contracts/slice-affordances.d.ts.map +1 -1
  80. package/dist/src/contracts/slice-affordances.js +12 -2
  81. package/dist/src/contracts/slice-affordances.js.map +1 -1
  82. package/dist/src/index.d.ts +3 -2
  83. package/dist/src/index.d.ts.map +1 -1
  84. package/dist/src/index.js +3 -2
  85. package/dist/src/index.js.map +1 -1
  86. package/dist/src/internal.d.ts +1 -1
  87. package/dist/src/internal.d.ts.map +1 -1
  88. package/dist/src/internal.js +1 -1
  89. package/dist/src/internal.js.map +1 -1
  90. package/dist/src/platform/slice/impl.d.ts +1 -0
  91. package/dist/src/platform/slice/impl.d.ts.map +1 -1
  92. package/dist/src/platform/slice/impl.js +85 -34
  93. package/dist/src/platform/slice/impl.js.map +1 -1
  94. package/dist/src/platform/slice/index.d.ts +2098 -29
  95. package/dist/src/platform/slice/index.d.ts.map +1 -1
  96. package/dist/src/platform/slice/index.js +145 -12
  97. package/dist/src/platform/slice/index.js.map +1 -1
  98. package/dist/src/runtime/collections/board.d.ts +73 -0
  99. package/dist/src/runtime/collections/board.d.ts.map +1 -0
  100. package/dist/src/runtime/collections/board.js +68 -0
  101. package/dist/src/runtime/collections/board.js.map +1 -0
  102. package/dist/src/runtime/collections/index.d.ts +1 -0
  103. package/dist/src/runtime/collections/index.d.ts.map +1 -1
  104. package/dist/src/runtime/collections/index.js +1 -0
  105. package/dist/src/runtime/collections/index.js.map +1 -1
  106. package/dist/src/runtime/collections/schematic.d.ts +11 -4
  107. package/dist/src/runtime/collections/schematic.d.ts.map +1 -1
  108. package/dist/src/runtime/collections/schematic.js +8 -2
  109. package/dist/src/runtime/collections/schematic.js.map +1 -1
  110. package/dist/src/runtime/slice.d.ts +7 -3
  111. package/dist/src/runtime/slice.d.ts.map +1 -1
  112. package/dist/src/runtime/slice.js +62 -14
  113. package/dist/src/runtime/slice.js.map +1 -1
  114. package/dist/src/shared/reify.d.ts +76 -0
  115. package/dist/src/shared/reify.d.ts.map +1 -0
  116. package/dist/src/shared/reify.js +85 -0
  117. package/dist/src/shared/reify.js.map +1 -0
  118. package/dist/src/slice/breakdown/index.d.ts +100 -0
  119. package/dist/src/slice/breakdown/index.d.ts.map +1 -1
  120. package/dist/src/slice/breakdown/types.d.ts +100 -0
  121. package/dist/src/slice/breakdown/types.d.ts.map +1 -1
  122. package/dist/src/slice/cohort/index.d.ts +787 -10
  123. package/dist/src/slice/cohort/index.d.ts.map +1 -1
  124. package/dist/src/slice/cohort/index.js +33 -10
  125. package/dist/src/slice/cohort/index.js.map +1 -1
  126. package/dist/src/slice/cohort/types.d.ts +225 -99
  127. package/dist/src/slice/cohort/types.d.ts.map +1 -1
  128. package/dist/src/slice/cohort/types.js +31 -9
  129. package/dist/src/slice/cohort/types.js.map +1 -1
  130. package/dist/src/slice/filter/index.d.ts +100 -0
  131. package/dist/src/slice/filter/index.d.ts.map +1 -1
  132. package/dist/src/slice/filter/types.d.ts +100 -0
  133. package/dist/src/slice/filter/types.d.ts.map +1 -1
  134. package/dist/src/slice/index.d.ts +2862 -126
  135. package/dist/src/slice/index.d.ts.map +1 -1
  136. package/dist/src/slice/index.js +6 -4
  137. package/dist/src/slice/index.js.map +1 -1
  138. package/dist/src/slice/legend/index.d.ts +124 -7
  139. package/dist/src/slice/legend/index.d.ts.map +1 -1
  140. package/dist/src/slice/legend/index.js +20 -10
  141. package/dist/src/slice/legend/index.js.map +1 -1
  142. package/dist/src/slice/legend/types.d.ts +233 -108
  143. package/dist/src/slice/legend/types.d.ts.map +1 -1
  144. package/dist/src/slice/legend/types.js +26 -5
  145. package/dist/src/slice/legend/types.js.map +1 -1
  146. package/dist/src/slice/rail/index.d.ts +22 -0
  147. package/dist/src/slice/rail/index.d.ts.map +1 -1
  148. package/dist/src/slice/rail/index.js +9 -1
  149. package/dist/src/slice/rail/index.js.map +1 -1
  150. package/dist/src/slice/range/index.d.ts +100 -0
  151. package/dist/src/slice/range/index.d.ts.map +1 -1
  152. package/dist/src/slice/range/types.d.ts +100 -0
  153. package/dist/src/slice/range/types.d.ts.map +1 -1
  154. package/dist/src/slice/search/index.d.ts +100 -0
  155. package/dist/src/slice/search/index.d.ts.map +1 -1
  156. package/dist/src/slice/search/types.d.ts +100 -0
  157. package/dist/src/slice/search/types.d.ts.map +1 -1
  158. package/dist/src/slice/summary/index.d.ts +100 -0
  159. package/dist/src/slice/summary/index.d.ts.map +1 -1
  160. package/dist/src/slice/summary/types.d.ts +100 -0
  161. package/dist/src/slice/summary/types.d.ts.map +1 -1
  162. package/dist/test/collections/board.examples.d.ts +7 -0
  163. package/dist/test/collections/board.examples.d.ts.map +1 -0
  164. package/dist/test/collections/board.examples.js +191 -0
  165. package/dist/test/collections/board.examples.js.map +1 -0
  166. package/dist/test/collections/gantt.examples.js +2 -2
  167. package/dist/test/collections/gantt.examples.js.map +1 -1
  168. package/dist/test/collections/matrix.examples.d.ts.map +1 -1
  169. package/dist/test/collections/matrix.examples.js +4 -3
  170. package/dist/test/collections/matrix.examples.js.map +1 -1
  171. package/dist/test/collections/schematic.examples.d.ts +11 -1
  172. package/dist/test/collections/schematic.examples.d.ts.map +1 -1
  173. package/dist/test/collections/schematic.examples.js +354 -24
  174. package/dist/test/collections/schematic.examples.js.map +1 -1
  175. package/dist/test/collections/table.examples.d.ts.map +1 -1
  176. package/dist/test/collections/table.examples.js +9 -6
  177. package/dist/test/collections/table.examples.js.map +1 -1
  178. package/dist/test/disclosure/story.examples.js +1 -1
  179. package/dist/test/disclosure/story.examples.js.map +1 -1
  180. package/dist/test/display/combine.examples.js +2 -2
  181. package/dist/test/display/combine.examples.js.map +1 -1
  182. package/dist/test/display/editable-chip.examples.js +1 -1
  183. package/dist/test/display/editable-chip.examples.js.map +1 -1
  184. package/dist/test/slice/slice.examples.d.ts +5 -0
  185. package/dist/test/slice/slice.examples.d.ts.map +1 -1
  186. package/dist/test/slice/slice.examples.js +216 -6
  187. package/dist/test/slice/slice.examples.js.map +1 -1
  188. package/package.json +3 -3
@@ -0,0 +1,490 @@
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
+ * `Board` — the single-day assignment board: an areas × shifts grid where
7
+ * each cell holds multiple people as chips under the shared event-state
8
+ * grammar (committed / proposed / rejected, with the `model` flavour
9
+ * rendering as a dashed ghost). Takes the flat tables a dataset naturally
10
+ * provides — areas, shifts, people, and assignments — each with a
11
+ * chart-style field encoding; the factory joins assignments to people by
12
+ * person key and groups them into cells by `area × shift`. Optional
13
+ * `requirements` add per-cell coverage (`n/required` numerals, open-slot
14
+ * placeholders, under / over tones).
15
+ *
16
+ * Declares the drag & drop **target** role: `id` + `sources` connect it to
17
+ * sibling Libraries, and every completed drag (add / move / remove) funnels
18
+ * through one `onDrag` callback as a `DragEventType` value. The component
19
+ * renders no built-in user-facing copy — every string it shows arrives as
20
+ * data or a prop.
21
+ *
22
+ * @packageDocumentation
23
+ */
24
+ import { type ExprType, type SubtypeExprOrValue, type TypeOf, ArrayType, type BooleanType, type FunctionType, type IntegerType, StringType, StructType, type NullType } from "@elaraai/east";
25
+ import { UIComponentType } from "../../component.js";
26
+ import { DensityType, type DensityLiteral } from "../../style/interaction.js";
27
+ import { type CellRefType, type DragEventType } from "../../contracts/drag.js";
28
+ import { PlannerStateType } from "../planner/types.js";
29
+ import { BoardModeType, type BoardModeLiteral } from "./types.js";
30
+ export { BoardModeType, type BoardModeLiteral, BoardEntityType, BoardAssignmentType, BoardRequirementType, BoardRootType, } from "./types.js";
31
+ /**
32
+ * The struct element type of a `SubtypeExprOrValue<ArrayType<StructType>>`.
33
+ */
34
+ export type BoardRowElement<T extends SubtypeExprOrValue<ArrayType<StructType>>> = TypeOf<T> extends ArrayType<infer S> ? (S extends StructType ? S : never) : never;
35
+ /**
36
+ * Fields the `area` / `shift` / `person` mappers return — one board entity,
37
+ * before defaults.
38
+ *
39
+ * @remarks
40
+ * The mapper returns this plain object or a full
41
+ * `ExprType<BoardEntityType>` when the row is already resolved.
42
+ *
43
+ * @property key - Entity identity — the key assignments reference
44
+ * @property label - Display name
45
+ * @property sublabel - Optional muted second line (e.g. wing, time window, role)
46
+ */
47
+ export interface BoardEntityFields {
48
+ /** Entity identity — the key assignments reference. */
49
+ key: SubtypeExprOrValue<StringType>;
50
+ /** Display name. */
51
+ label: SubtypeExprOrValue<StringType>;
52
+ /** Optional muted second line (e.g. wing, time window, role). */
53
+ sublabel?: SubtypeExprOrValue<StringType>;
54
+ }
55
+ /**
56
+ * Fields the `assignment` mapper returns — one person chip, before defaults.
57
+ *
58
+ * @remarks
59
+ * Carries no display label — the chip face comes from joining `person` to
60
+ * the board's `people` table by key.
61
+ *
62
+ * @property key - Stable assignment identity
63
+ * @property person - The person key (join key into `people`)
64
+ * @property area - The area key — must name one of `areas`
65
+ * @property shift - The shift key — must name one of `shifts`
66
+ * @property state - The audit state (a `PlannerStateType` value)
67
+ */
68
+ export interface BoardAssignmentFields {
69
+ /** Stable assignment identity. */
70
+ key: SubtypeExprOrValue<StringType>;
71
+ /** The person key (join key into `people`). */
72
+ person: SubtypeExprOrValue<StringType>;
73
+ /** The area key — must name one of `areas`. */
74
+ area: SubtypeExprOrValue<StringType>;
75
+ /** The shift key — must name one of `shifts`. */
76
+ shift: SubtypeExprOrValue<StringType>;
77
+ /** The audit state (a `PlannerStateType` value). */
78
+ state: SubtypeExprOrValue<PlannerStateType>;
79
+ }
80
+ /**
81
+ * Fields the `requirement` mapper returns — one cell's coverage, before
82
+ * defaults.
83
+ *
84
+ * @property area - The area key
85
+ * @property shift - The shift key
86
+ * @property required - Required headcount for the cell
87
+ */
88
+ export interface BoardRequirementFields {
89
+ /** The area key. */
90
+ area: SubtypeExprOrValue<StringType>;
91
+ /** The shift key. */
92
+ shift: SubtypeExprOrValue<StringType>;
93
+ /** Required headcount for the cell. */
94
+ required: SubtypeExprOrValue<IntegerType>;
95
+ }
96
+ /**
97
+ * Configuration for {@link createBoard}.
98
+ *
99
+ * @typeParam A - The areas row struct
100
+ * @typeParam S - The shifts row struct
101
+ * @typeParam P - The people row struct
102
+ * @typeParam X - The assignments row struct
103
+ * @property id - DnD target identity
104
+ * @property sources - Library ids accepted for `add` drags (omit = no adds)
105
+ * @property mode - `published` (default) or `edit`
106
+ * @property area - Areas row mapper (omit when rows are already resolved)
107
+ * @property areaHeader - Optional frozen area column header (omit = blank)
108
+ * @property areaWidth - Optional CSS width for the frozen area column
109
+ * @property shift - Shifts row mapper (omit when rows are already resolved)
110
+ * @property person - People row mapper (omit when rows are already resolved)
111
+ * @property assignment - Assignments row mapper (omit when rows are already resolved)
112
+ * @property requirements - Optional coverage table (omit = no coverage chrome)
113
+ * @property requirement - Requirements row mapper (omit when rows are already resolved)
114
+ * @property density - Optional density
115
+ * @property maxVisible - Optional per-cell chip cap before the `+N` overflow
116
+ * @property summary - Optional status-strip text (open / proposed counts)
117
+ * @property canAssign - Optional assignability predicate `(person, area, shift) => Boolean`
118
+ * @property onDrag - Drag funnel — add / move / remove events
119
+ * @property onSelect - Assignment / cell click callback (a drag-grammar cell ref)
120
+ * @property onAccept - Ghost-assignment acceptance callback
121
+ * @property onAddAt - Open-slot / empty-cell click callback (edit mode)
122
+ */
123
+ export interface BoardConfig<A extends StructType, S extends StructType, P extends StructType, X extends StructType, R extends StructType = StructType> {
124
+ /** DnD target identity. */
125
+ id: string;
126
+ /** Library ids accepted for `add` drags (omit = no adds). */
127
+ sources?: string[];
128
+ /** `published` (default) or `edit`. */
129
+ mode?: SubtypeExprOrValue<BoardModeType> | BoardModeLiteral;
130
+ /** Areas row mapper; omit when `areas` is already `ArrayType(Board.Types.Entity)`. */
131
+ area?: (area: ExprType<A>) => BoardEntityFields;
132
+ /** Optional frozen area column header (omit = blank — the component bakes in no copy). */
133
+ areaHeader?: string;
134
+ /** Optional CSS width for the frozen area column (omit = the Planner-consistent `150px`). */
135
+ areaWidth?: string;
136
+ /** Shifts row mapper; omit when `shifts` is already `ArrayType(Board.Types.Entity)`. */
137
+ shift?: (shift: ExprType<S>) => BoardEntityFields;
138
+ /** People row mapper; omit when `people` is already `ArrayType(Board.Types.Entity)`. */
139
+ person?: (person: ExprType<P>) => BoardEntityFields;
140
+ /** Assignments row mapper; omit when `assignments` is already `ArrayType(Board.Types.Assignment)`. */
141
+ assignment?: (assignment: ExprType<X>) => BoardAssignmentFields;
142
+ /** Requirements row mapper; omit when `requirements` is already `ArrayType(Board.Types.Requirement)`. */
143
+ requirement?: (requirement: ExprType<R>) => BoardRequirementFields;
144
+ /** Optional density. */
145
+ density?: SubtypeExprOrValue<DensityType> | DensityLiteral;
146
+ /** Optional per-cell chip cap before the `+N` overflow. */
147
+ maxVisible?: SubtypeExprOrValue<IntegerType> | number;
148
+ /** Optional status-strip text (open / proposed counts). */
149
+ summary?: SubtypeExprOrValue<StringType>;
150
+ /** Optional assignability predicate `(person, area, shift) => Boolean` — a
151
+ * `false` verdict renders the invalid-drop treatment (red outline + ⊘)
152
+ * while dragging and vetoes the drop. Fail-open: a throwing predicate
153
+ * logs and allows. */
154
+ canAssign?: SubtypeExprOrValue<FunctionType<[StringType, StringType, StringType], BooleanType>>;
155
+ /** Drag funnel — add / move / remove events. */
156
+ onDrag?: SubtypeExprOrValue<FunctionType<[DragEventType], NullType>>;
157
+ /** Assignment / cell click callback (a drag-grammar cell ref). */
158
+ onSelect?: SubtypeExprOrValue<FunctionType<[CellRefType], NullType>>;
159
+ /** Ghost-assignment acceptance callback. */
160
+ onAccept?: SubtypeExprOrValue<FunctionType<[CellRefType], NullType>>;
161
+ /** Open-slot / empty-cell click callback (edit mode). */
162
+ onAddAt?: SubtypeExprOrValue<FunctionType<[CellRefType], NullType>>;
163
+ }
164
+ /**
165
+ * Creates a Board — single-day areas × shifts assignment scheduling.
166
+ *
167
+ * @typeParam A - The areas-table input
168
+ * @typeParam S - The shifts-table input
169
+ * @typeParam P - The people-table input
170
+ * @typeParam X - The assignments-table input
171
+ * @param areas - The area rows (one grid row each)
172
+ * @param shifts - The shift rows (one grid column each, in order)
173
+ * @param people - The people rows (chip faces, joined by the encoded person key)
174
+ * @param assignments - The assignment rows (grouped into cells by area × shift)
175
+ * @param config - The Board configuration ({@link BoardConfig})
176
+ * @returns An East expression of `UIComponentType`
177
+ *
178
+ * @example
179
+ * ```ts
180
+ * import { East, variant } from "@elaraai/east";
181
+ * import { Board, UIComponentType } from "@elaraai/east-ui";
182
+ *
183
+ * const example = East.function([], UIComponentType, _$ =>
184
+ * Board.Root(
185
+ * [{ id: "icu", name: "ICU" }],
186
+ * [{ id: "am", name: "AM" }],
187
+ * [{ id: "patel", name: "Patel, R." }],
188
+ * [{ id: "x1", personId: "patel", areaId: "icu", shiftId: "am", state: variant("committed", null) }],
189
+ * {
190
+ * id: "board-tue",
191
+ * sources: ["people"],
192
+ * mode: "edit",
193
+ * area: a => ({ key: a.id, label: a.name }),
194
+ * shift: s => ({ key: s.id, label: s.name }),
195
+ * person: p => ({ key: p.id, label: p.name }),
196
+ * assignment: x => ({ key: x.id, person: x.personId, area: x.areaId,
197
+ * shift: x.shiftId, state: x.state }),
198
+ * },
199
+ * ),
200
+ * );
201
+ * ```
202
+ */
203
+ declare function createBoard<A extends SubtypeExprOrValue<ArrayType<StructType>>, S extends SubtypeExprOrValue<ArrayType<StructType>>, P extends SubtypeExprOrValue<ArrayType<StructType>>, X extends SubtypeExprOrValue<ArrayType<StructType>>, R extends SubtypeExprOrValue<ArrayType<StructType>> = []>(areas: A, shifts: S, people: P, assignments: X, config: BoardConfig<BoardRowElement<A>, BoardRowElement<S>, BoardRowElement<P>, BoardRowElement<X>, BoardRowElement<R>> & {
204
+ requirements?: R;
205
+ }): ExprType<UIComponentType>;
206
+ /**
207
+ * Board component namespace.
208
+ *
209
+ * @remarks
210
+ * `Board.Root(areas, shifts, people, assignments, config)` builds the
211
+ * single-day grid from the flat tables; assignment states reuse the Planner
212
+ * event-state grammar (`Board.Types.State`), so data carries typed
213
+ * `variant(...)` values.
214
+ */
215
+ export declare const Board: {
216
+ /**
217
+ * Creates a Board — single-day areas × shifts assignment scheduling with
218
+ * the drag & drop target role.
219
+ *
220
+ * @typeParam A - The areas-table input
221
+ * @typeParam S - The shifts-table input
222
+ * @typeParam P - The people-table input
223
+ * @typeParam X - The assignments-table input
224
+ * @param areas - The area rows (one grid row each)
225
+ * @param shifts - The shift rows (one grid column each, in order)
226
+ * @param people - The people rows (chip faces, joined by the encoded person key)
227
+ * @param assignments - The assignment rows (grouped into cells by area × shift)
228
+ * @param config - The Board configuration ({@link BoardConfig})
229
+ * @returns An East expression of `UIComponentType`
230
+ *
231
+ * @remarks
232
+ * Published mode renders committed assignments only, pointer-immutable;
233
+ * edit mode enables drag handles on proposed assignments, open-slot /
234
+ * empty-cell add, and ghost acceptance. Dropping a person onto a cell
235
+ * that already holds them is a no-op (the duplicate-person guard); the
236
+ * same person in different cells is legal — host policy. Cross-area
237
+ * moves arrive as plain `move` events — the host derives any swap
238
+ * representation from `from.row ≠ to.row`.
239
+ *
240
+ * @example
241
+ * ```ts
242
+ * import { East, variant } from "@elaraai/east";
243
+ * import { Board, UIComponentType } from "@elaraai/east-ui";
244
+ *
245
+ * const example = East.function([], UIComponentType, _$ =>
246
+ * Board.Root(
247
+ * [{ id: "icu", name: "ICU" }],
248
+ * [{ id: "am", name: "AM" }],
249
+ * [{ id: "patel", name: "Patel, R." }],
250
+ * [{ id: "x1", personId: "patel", areaId: "icu", shiftId: "am", state: variant("committed", null) }],
251
+ * {
252
+ * id: "board-tue",
253
+ * area: a => ({ key: a.id, label: a.name }),
254
+ * shift: s => ({ key: s.id, label: s.name }),
255
+ * person: p => ({ key: p.id, label: p.name }),
256
+ * assignment: x => ({ key: x.id, person: x.personId, area: x.areaId,
257
+ * shift: x.shiftId, state: x.state }),
258
+ * },
259
+ * ),
260
+ * );
261
+ * ```
262
+ */
263
+ readonly Root: typeof createBoard;
264
+ readonly Types: {
265
+ /**
266
+ * East StructType for the Board component.
267
+ *
268
+ * @remarks
269
+ * Flat resolved tables; the renderer groups assignments into cells
270
+ * by `area × shift` and joins each to `people` by person key. See
271
+ * {@link BoardRootType} for per-field docs.
272
+ *
273
+ * @property id - DnD target identity
274
+ * @property sources - Library ids accepted for `add` drags
275
+ * @property mode - `published` or `edit`
276
+ * @property areaHeader - Optional frozen area column header
277
+ * @property areas - The grid rows
278
+ * @property shifts - The grid columns, in order
279
+ * @property people - The chip directory (faces)
280
+ * @property assignments - The person chips
281
+ * @property requirements - Optional per-cell coverage
282
+ * @property density - Optional density
283
+ * @property maxVisible - Optional per-cell chip cap
284
+ * @property summary - Optional status-strip text
285
+ * @property onDrag - Drag funnel
286
+ * @property onSelect - Assignment / cell click callback
287
+ * @property onAccept - Ghost acceptance callback
288
+ * @property onAddAt - Open-slot / empty-cell click callback
289
+ */
290
+ readonly Board: StructType<{
291
+ readonly id: StringType;
292
+ readonly sources: ArrayType<StringType>;
293
+ readonly mode: import("@elaraai/east").VariantType<{
294
+ readonly published: NullType;
295
+ readonly edit: NullType;
296
+ }>;
297
+ readonly areaHeader: import("@elaraai/east").OptionType<StringType>;
298
+ readonly areaWidth: import("@elaraai/east").OptionType<StringType>;
299
+ readonly areas: ArrayType<StructType<{
300
+ readonly key: StringType;
301
+ readonly label: StringType;
302
+ readonly sublabel: import("@elaraai/east").OptionType<StringType>;
303
+ }>>;
304
+ readonly shifts: ArrayType<StructType<{
305
+ readonly key: StringType;
306
+ readonly label: StringType;
307
+ readonly sublabel: import("@elaraai/east").OptionType<StringType>;
308
+ }>>;
309
+ readonly people: ArrayType<StructType<{
310
+ readonly key: StringType;
311
+ readonly label: StringType;
312
+ readonly sublabel: import("@elaraai/east").OptionType<StringType>;
313
+ }>>;
314
+ readonly assignments: ArrayType<StructType<{
315
+ readonly key: StringType;
316
+ readonly person: StringType;
317
+ readonly area: StringType;
318
+ readonly shift: StringType;
319
+ readonly state: import("@elaraai/east").VariantType<{
320
+ readonly committed: NullType;
321
+ readonly proposed: import("@elaraai/east").VariantType<{
322
+ readonly added: NullType;
323
+ readonly model: NullType;
324
+ readonly removed: NullType;
325
+ }>;
326
+ readonly rejected: NullType;
327
+ }>;
328
+ }>>;
329
+ readonly requirements: import("@elaraai/east").OptionType<ArrayType<StructType<{
330
+ readonly area: StringType;
331
+ readonly shift: StringType;
332
+ readonly required: IntegerType;
333
+ }>>>;
334
+ readonly density: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
335
+ readonly comfortable: NullType;
336
+ readonly compact: NullType;
337
+ readonly condensed: NullType;
338
+ }>>;
339
+ readonly maxVisible: import("@elaraai/east").OptionType<IntegerType>;
340
+ readonly summary: import("@elaraai/east").OptionType<StringType>;
341
+ readonly canAssign: import("@elaraai/east").OptionType<FunctionType<[StringType, StringType, StringType], BooleanType>>;
342
+ readonly onDrag: import("@elaraai/east").OptionType<FunctionType<[import("@elaraai/east").VariantType<{
343
+ readonly add: StructType<{
344
+ readonly from: StructType<{
345
+ readonly library: StringType;
346
+ readonly key: StringType;
347
+ }>;
348
+ readonly into: StructType<{
349
+ readonly surface: StringType;
350
+ readonly row: StringType;
351
+ readonly slot: StringType;
352
+ readonly event: import("@elaraai/east").OptionType<StringType>;
353
+ }>;
354
+ readonly duplicate: BooleanType;
355
+ }>;
356
+ readonly move: StructType<{
357
+ readonly from: StructType<{
358
+ readonly surface: StringType;
359
+ readonly row: StringType;
360
+ readonly slot: StringType;
361
+ readonly event: import("@elaraai/east").OptionType<StringType>;
362
+ }>;
363
+ readonly to: StructType<{
364
+ readonly surface: StringType;
365
+ readonly row: StringType;
366
+ readonly slot: StringType;
367
+ readonly event: import("@elaraai/east").OptionType<StringType>;
368
+ }>;
369
+ }>;
370
+ readonly remove: StructType<{
371
+ readonly from: StructType<{
372
+ readonly surface: StringType;
373
+ readonly row: StringType;
374
+ readonly slot: StringType;
375
+ readonly event: import("@elaraai/east").OptionType<StringType>;
376
+ }>;
377
+ readonly to: import("@elaraai/east").VariantType<{
378
+ readonly trash: NullType;
379
+ readonly source: NullType;
380
+ }>;
381
+ }>;
382
+ readonly resize: StructType<{
383
+ readonly event: StructType<{
384
+ readonly surface: StringType;
385
+ readonly row: StringType;
386
+ readonly slot: StringType;
387
+ readonly event: import("@elaraai/east").OptionType<StringType>;
388
+ }>;
389
+ readonly edge: import("@elaraai/east").VariantType<{
390
+ readonly start: NullType;
391
+ readonly end: NullType;
392
+ }>;
393
+ }>;
394
+ }>], NullType>>;
395
+ readonly onSelect: import("@elaraai/east").OptionType<FunctionType<[StructType<{
396
+ readonly surface: StringType;
397
+ readonly row: StringType;
398
+ readonly slot: StringType;
399
+ readonly event: import("@elaraai/east").OptionType<StringType>;
400
+ }>], NullType>>;
401
+ readonly onAccept: import("@elaraai/east").OptionType<FunctionType<[StructType<{
402
+ readonly surface: StringType;
403
+ readonly row: StringType;
404
+ readonly slot: StringType;
405
+ readonly event: import("@elaraai/east").OptionType<StringType>;
406
+ }>], NullType>>;
407
+ readonly onAddAt: import("@elaraai/east").OptionType<FunctionType<[StructType<{
408
+ readonly surface: StringType;
409
+ readonly row: StringType;
410
+ readonly slot: StringType;
411
+ readonly event: import("@elaraai/east").OptionType<StringType>;
412
+ }>], NullType>>;
413
+ }>;
414
+ /**
415
+ * Board render mode (`published` / `edit`).
416
+ *
417
+ * @property published - Committed-only, pointer-immutable
418
+ * @property edit - Operator + model proposals are interactive
419
+ */
420
+ readonly Mode: import("@elaraai/east").VariantType<{
421
+ readonly published: NullType;
422
+ readonly edit: NullType;
423
+ }>;
424
+ /**
425
+ * A resolved board entity — area row, shift column, or person face.
426
+ *
427
+ * @property key - Entity identity — the key assignments reference
428
+ * @property label - Display name
429
+ * @property sublabel - Optional muted second line
430
+ */
431
+ readonly Entity: StructType<{
432
+ readonly key: StringType;
433
+ readonly label: StringType;
434
+ readonly sublabel: import("@elaraai/east").OptionType<StringType>;
435
+ }>;
436
+ /**
437
+ * A resolved assignment — one person chip in one (area, shift) cell.
438
+ *
439
+ * @property key - Stable assignment identity
440
+ * @property person - The person key (joined for the chip face)
441
+ * @property area - The area key (the grid row)
442
+ * @property shift - The shift key (the grid column)
443
+ * @property state - The audit state
444
+ */
445
+ readonly Assignment: StructType<{
446
+ readonly key: StringType;
447
+ readonly person: StringType;
448
+ readonly area: StringType;
449
+ readonly shift: StringType;
450
+ readonly state: import("@elaraai/east").VariantType<{
451
+ readonly committed: NullType;
452
+ readonly proposed: import("@elaraai/east").VariantType<{
453
+ readonly added: NullType;
454
+ readonly model: NullType;
455
+ readonly removed: NullType;
456
+ }>;
457
+ readonly rejected: NullType;
458
+ }>;
459
+ }>;
460
+ /**
461
+ * A resolved coverage requirement for one (area, shift) cell.
462
+ *
463
+ * @property area - The area key
464
+ * @property shift - The shift key
465
+ * @property required - Required headcount for the cell
466
+ */
467
+ readonly Requirement: StructType<{
468
+ readonly area: StringType;
469
+ readonly shift: StringType;
470
+ readonly required: IntegerType;
471
+ }>;
472
+ /**
473
+ * The shared event-state grammar (committed / proposed / rejected).
474
+ *
475
+ * @property committed - A published assignment
476
+ * @property proposed - A proposal (`added` / `model` / `removed`)
477
+ * @property rejected - A rejected proposal
478
+ */
479
+ readonly State: import("@elaraai/east").VariantType<{
480
+ readonly committed: NullType;
481
+ readonly proposed: import("@elaraai/east").VariantType<{
482
+ readonly added: NullType;
483
+ readonly model: NullType;
484
+ readonly removed: NullType;
485
+ }>;
486
+ readonly rejected: NullType;
487
+ }>;
488
+ };
489
+ };
490
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/collections/board/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,MAAM,EAMX,SAAS,EACT,KA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