@elaraai/east-ui 1.0.30 → 1.0.32

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 (167) hide show
  1. package/README.md +1 -1
  2. package/dist/src/charts/chart/index.d.ts +116 -12
  3. package/dist/src/charts/chart/index.d.ts.map +1 -1
  4. package/dist/src/charts/chart/index.js +100 -37
  5. package/dist/src/charts/chart/index.js.map +1 -1
  6. package/dist/src/charts/index.d.ts +2 -1
  7. package/dist/src/charts/index.d.ts.map +1 -1
  8. package/dist/src/charts/index.js +2 -1
  9. package/dist/src/charts/index.js.map +1 -1
  10. package/dist/src/charts/spec/index.d.ts +5 -3
  11. package/dist/src/charts/spec/index.d.ts.map +1 -1
  12. package/dist/src/charts/spec/index.js +2 -2
  13. package/dist/src/charts/spec/index.js.map +1 -1
  14. package/dist/src/charts/spec/types.d.ts +7 -2
  15. package/dist/src/charts/spec/types.d.ts.map +1 -1
  16. package/dist/src/charts/spec/types.js +7 -2
  17. package/dist/src/charts/spec/types.js.map +1 -1
  18. package/dist/src/collections/blend/index.d.ts +59 -0
  19. package/dist/src/collections/blend/index.d.ts.map +1 -1
  20. package/dist/src/collections/blend/index.js +1 -0
  21. package/dist/src/collections/blend/index.js.map +1 -1
  22. package/dist/src/collections/blend/types.d.ts +66 -0
  23. package/dist/src/collections/blend/types.d.ts.map +1 -1
  24. package/dist/src/collections/blend/types.js +15 -1
  25. package/dist/src/collections/blend/types.js.map +1 -1
  26. package/dist/src/collections/board/index.d.ts +381 -28
  27. package/dist/src/collections/board/index.d.ts.map +1 -1
  28. package/dist/src/collections/board/index.js +133 -5
  29. package/dist/src/collections/board/index.js.map +1 -1
  30. package/dist/src/collections/board/types.d.ts +1 -198
  31. package/dist/src/collections/board/types.d.ts.map +1 -1
  32. package/dist/src/collections/board/types.js +6 -73
  33. package/dist/src/collections/board/types.js.map +1 -1
  34. package/dist/src/collections/gantt/index.d.ts +63 -24
  35. package/dist/src/collections/gantt/index.d.ts.map +1 -1
  36. package/dist/src/collections/gantt/index.js +98 -64
  37. package/dist/src/collections/gantt/index.js.map +1 -1
  38. package/dist/src/collections/gantt/types.d.ts +31 -76
  39. package/dist/src/collections/gantt/types.d.ts.map +1 -1
  40. package/dist/src/collections/gantt/types.js +18 -60
  41. package/dist/src/collections/gantt/types.js.map +1 -1
  42. package/dist/src/collections/library/index.d.ts +700 -17
  43. package/dist/src/collections/library/index.d.ts.map +1 -1
  44. package/dist/src/collections/library/index.js +66 -12
  45. package/dist/src/collections/library/index.js.map +1 -1
  46. package/dist/src/collections/library/types.d.ts +710 -38
  47. package/dist/src/collections/library/types.d.ts.map +1 -1
  48. package/dist/src/collections/library/types.js +48 -20
  49. package/dist/src/collections/library/types.js.map +1 -1
  50. package/dist/src/collections/planner/index.d.ts +45 -26
  51. package/dist/src/collections/planner/index.d.ts.map +1 -1
  52. package/dist/src/collections/planner/index.js +37 -27
  53. package/dist/src/collections/planner/index.js.map +1 -1
  54. package/dist/src/collections/planner/types.d.ts +11 -0
  55. package/dist/src/collections/planner/types.d.ts.map +1 -1
  56. package/dist/src/collections/planner/types.js +11 -0
  57. package/dist/src/collections/planner/types.js.map +1 -1
  58. package/dist/src/collections/roster/index.d.ts +397 -21
  59. package/dist/src/collections/roster/index.d.ts.map +1 -1
  60. package/dist/src/collections/roster/index.js +94 -4
  61. package/dist/src/collections/roster/index.js.map +1 -1
  62. package/dist/src/collections/roster/types.d.ts +15 -161
  63. package/dist/src/collections/roster/types.d.ts.map +1 -1
  64. package/dist/src/collections/roster/types.js +13 -58
  65. package/dist/src/collections/roster/types.js.map +1 -1
  66. package/dist/src/collections/table/index.d.ts +8 -0
  67. package/dist/src/collections/table/index.d.ts.map +1 -1
  68. package/dist/src/collections/table/index.js +22 -0
  69. package/dist/src/collections/table/index.js.map +1 -1
  70. package/dist/src/collections/table/types.d.ts +17 -0
  71. package/dist/src/collections/table/types.d.ts.map +1 -1
  72. package/dist/src/collections/table/types.js.map +1 -1
  73. package/dist/src/component.d.ts +1411 -299
  74. package/dist/src/component.d.ts.map +1 -1
  75. package/dist/src/component.js +131 -11
  76. package/dist/src/component.js.map +1 -1
  77. package/dist/src/contracts/drag.d.ts +122 -1
  78. package/dist/src/contracts/drag.d.ts.map +1 -1
  79. package/dist/src/contracts/drag.js +46 -1
  80. package/dist/src/contracts/drag.js.map +1 -1
  81. package/dist/src/contracts/index.d.ts +2 -1
  82. package/dist/src/contracts/index.d.ts.map +1 -1
  83. package/dist/src/contracts/index.js +2 -1
  84. package/dist/src/contracts/index.js.map +1 -1
  85. package/dist/src/contracts/review.d.ts +198 -0
  86. package/dist/src/contracts/review.d.ts.map +1 -0
  87. package/dist/src/contracts/review.js +163 -0
  88. package/dist/src/contracts/review.js.map +1 -0
  89. package/dist/src/index.d.ts +3 -2
  90. package/dist/src/index.d.ts.map +1 -1
  91. package/dist/src/index.js +4 -2
  92. package/dist/src/index.js.map +1 -1
  93. package/dist/src/internal.d.ts +4 -2
  94. package/dist/src/internal.d.ts.map +1 -1
  95. package/dist/src/internal.js +5 -2
  96. package/dist/src/internal.js.map +1 -1
  97. package/dist/src/layout/expandable/index.d.ts +116 -0
  98. package/dist/src/layout/expandable/index.d.ts.map +1 -0
  99. package/dist/src/layout/expandable/index.js +129 -0
  100. package/dist/src/layout/expandable/index.js.map +1 -0
  101. package/dist/src/layout/expandable/types.d.ts +43 -0
  102. package/dist/src/layout/expandable/types.d.ts.map +1 -0
  103. package/dist/src/layout/expandable/types.js +18 -0
  104. package/dist/src/layout/expandable/types.js.map +1 -0
  105. package/dist/src/layout/index.d.ts +1 -0
  106. package/dist/src/layout/index.d.ts.map +1 -1
  107. package/dist/src/layout/index.js +1 -0
  108. package/dist/src/layout/index.js.map +1 -1
  109. package/dist/src/runtime/charts/chart.d.ts +16 -13
  110. package/dist/src/runtime/charts/chart.d.ts.map +1 -1
  111. package/dist/src/runtime/charts/chart.js +16 -13
  112. package/dist/src/runtime/charts/chart.js.map +1 -1
  113. package/dist/src/runtime/collections/library.d.ts +4 -2
  114. package/dist/src/runtime/collections/library.d.ts.map +1 -1
  115. package/dist/src/runtime/collections/library.js +4 -2
  116. package/dist/src/runtime/collections/library.js.map +1 -1
  117. package/dist/src/runtime/layout/expandable.d.ts +43 -0
  118. package/dist/src/runtime/layout/expandable.d.ts.map +1 -0
  119. package/dist/src/runtime/layout/expandable.js +41 -0
  120. package/dist/src/runtime/layout/expandable.js.map +1 -0
  121. package/dist/src/runtime/layout/index.d.ts +1 -0
  122. package/dist/src/runtime/layout/index.d.ts.map +1 -1
  123. package/dist/src/runtime/layout/index.js +1 -0
  124. package/dist/src/runtime/layout/index.js.map +1 -1
  125. package/dist/test/charts/chart.examples.d.ts +8 -4
  126. package/dist/test/charts/chart.examples.d.ts.map +1 -1
  127. package/dist/test/charts/chart.examples.js +89 -34
  128. package/dist/test/charts/chart.examples.js.map +1 -1
  129. package/dist/test/collections/blend.examples.d.ts +10 -1
  130. package/dist/test/collections/blend.examples.d.ts.map +1 -1
  131. package/dist/test/collections/blend.examples.js +52 -6
  132. package/dist/test/collections/blend.examples.js.map +1 -1
  133. package/dist/test/collections/board.examples.d.ts +8 -1
  134. package/dist/test/collections/board.examples.d.ts.map +1 -1
  135. package/dist/test/collections/board.examples.js +32 -5
  136. package/dist/test/collections/board.examples.js.map +1 -1
  137. package/dist/test/collections/gantt.examples.d.ts +26 -1
  138. package/dist/test/collections/gantt.examples.d.ts.map +1 -1
  139. package/dist/test/collections/gantt.examples.js +153 -27
  140. package/dist/test/collections/gantt.examples.js.map +1 -1
  141. package/dist/test/collections/library.examples.d.ts +3 -0
  142. package/dist/test/collections/library.examples.d.ts.map +1 -1
  143. package/dist/test/collections/library.examples.js +107 -2
  144. package/dist/test/collections/library.examples.js.map +1 -1
  145. package/dist/test/collections/planner.examples.d.ts +14 -0
  146. package/dist/test/collections/planner.examples.d.ts.map +1 -1
  147. package/dist/test/collections/planner.examples.js +127 -3
  148. package/dist/test/collections/planner.examples.js.map +1 -1
  149. package/dist/test/collections/roster.examples.d.ts +17 -1
  150. package/dist/test/collections/roster.examples.d.ts.map +1 -1
  151. package/dist/test/collections/roster.examples.js +89 -9
  152. package/dist/test/collections/roster.examples.js.map +1 -1
  153. package/dist/test/collections/table.examples.d.ts +16 -0
  154. package/dist/test/collections/table.examples.d.ts.map +1 -1
  155. package/dist/test/collections/table.examples.js +62 -2
  156. package/dist/test/collections/table.examples.js.map +1 -1
  157. package/dist/test/disclosure/story.examples.js +3 -3
  158. package/dist/test/disclosure/story.examples.js.map +1 -1
  159. package/dist/test/layout/expandable.examples.d.ts +3 -0
  160. package/dist/test/layout/expandable.examples.d.ts.map +1 -0
  161. package/dist/test/layout/expandable.examples.js +31 -0
  162. package/dist/test/layout/expandable.examples.js.map +1 -0
  163. package/dist/test/layout/index.d.ts +1 -0
  164. package/dist/test/layout/index.d.ts.map +1 -1
  165. package/dist/test/layout/index.js +1 -0
  166. package/dist/test/layout/index.js.map +1 -1
  167. package/package.json +3 -3
@@ -2,10 +2,29 @@
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 { BooleanType, NullType, OptionType, StringType, StructType, VariantType, } from "@elaraai/east";
5
+ import { BooleanType, FunctionType, NullType, OptionType, StringType, StructType, VariantType, } from "@elaraai/east";
6
6
  // ============================================================================
7
7
  // Drag & drop grammar — shared contract for DnD-aware surfaces
8
8
  // ============================================================================
9
+ //
10
+ // ## Slot-key encoding (the `CellRefType.row` / `slot` conventions)
11
+ //
12
+ // `row` and `slot` are strings; each target documents how its grid coordinates
13
+ // encode into them, and every target follows the same composite-key rule:
14
+ //
15
+ // | Target | `row` | `slot` |
16
+ // |---------|------------------|-----------------------------------------------|
17
+ // | Roster | person key | day key (e.g. `"wed"`) |
18
+ // | Board | area key | shift key |
19
+ // | Blend | target key | `"alloc"` (synthetic single slot) |
20
+ // | Planner | row key | axis key, with the bucket composed in — `"wed"` unbucketed, `"wed:am"` for the AM bucket |
21
+ // | Gantt | row index key | snapped datetime key (ISO instant after the component's grid snap) |
22
+ //
23
+ // The composite rule: when a slot subdivides (Planner buckets), the sub-slot
24
+ // key is appended with `":"` — the same composite key the renderer uses to
25
+ // index its cells. Axis coordinates that are not strings (numbers, datetimes)
26
+ // are printed canonically: numbers via their decimal form, datetimes as the
27
+ // snapped ISO-8601 instant. Hosts map keys straight back to their source data.
9
28
  /**
10
29
  * Reference to an item in a Library (a drag **source**).
11
30
  *
@@ -135,4 +154,30 @@ export const DragEventType = VariantType({
135
154
  edge: DragEdgeType,
136
155
  }),
137
156
  });
157
+ /**
158
+ * The `canDrop` validation predicate every DnD target root carries as
159
+ * `canDrop: OptionType(CanDropFnType)` — IR-level drop validation, uniform
160
+ * across targets.
161
+ *
162
+ * @remarks
163
+ * **Candidate-event semantics.** During a drag, the renderer consults the
164
+ * predicate once per hovered destination with a **synthesized candidate
165
+ * event** — the {@link DragEventType} value that *would* be delivered if the
166
+ * payload dropped there: an `add` for a Library card over a cell (with
167
+ * `duplicate: false` — the alt-key state is unknowable before the drop), a
168
+ * `move` for an event chip over a cell, a `resize` for an edge drag over a
169
+ * slot. Returning `false` puts the cell in the invalid stage
170
+ * (`data-drop-invalid`: ⊘ badge, red outline, `cursor: not-allowed`) and the
171
+ * drop is a no-op; the verdict is also re-checked with the real event before
172
+ * delivery. Absent ⇒ every structurally-connected cell accepts (the default).
173
+ *
174
+ * Sink drops are not consulted: a `remove` into the trash / return-to-palette
175
+ * sink is always structurally valid for a removable payload — removal policy
176
+ * belongs to the host's `onDrag` handling, not the hover veto.
177
+ *
178
+ * A **throwing** predicate logs and allows (fail-open, the Board / Schematic
179
+ * validator convention) so a broken validator cannot brick the surface.
180
+ * Verdicts are cached per (payload, destination) for the duration of a drag.
181
+ */
182
+ export const CanDropFnType = FunctionType([DragEventType], BooleanType);
138
183
  //# sourceMappingURL=drag.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drag.js","sourceRoot":"","s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wC;IACxC,IAAI,EAAE,UAAU,CAAC;QACb,iDAAiD;QACjD,IAAI,EAAE,WAAW;QACjB,2BAA2B;QAC3B,EAAE,EAAE,WAAW;KAClB,CAAC;IACF,mDAAmD;IACnD,MAAM,EAAE,UAAU,CAAC;QACf,iDAAiD;QACjD,IAAI,EAAE,WAAW;QACjB,+BAA+B;QAC/B,EAAE,EAAE,YAAY;KACnB,CAAC;IACF,gDAAgD;IAChD,MAAM,EAAE,UAAU,CAAC;QACf,mEAAmE;QACnE,KAAK,EAAE,WAAW;QAClB,2BAA2B;QAC3B,IAAI,EAAE,YAAY;KACrB,CAAC;CACL,CAAC,CAAC"}
1
+ {"version":3,"file":"drag.js","sourceRoot":"","sources":["../../../src/contracts/drag.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,GACd,MAAM,eAAe,CAAC;AAEvB,+EAA+E;AAC/E,+DAA+D;AAC/D,+EAA+E;AAC/E,EAAE;AACF,oEAAoE;AACpE,EAAE;AACF,+EAA+E;AAC/E,0EAA0E;AAC1E,EAAE;AACF,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,4HAA4H;AAC5H,sGAAsG;AACtG,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,4EAA4E;AAC5E,+EAA+E;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACrC,2CAA2C;IAC3C,OAAO,EAAE,UAAU;IACnB,sDAAsD;IACtD,GAAG,EAAE,UAAU;CAClB,CAAC,CAAC;AAOH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;IAClC,yCAAyC;IACzC,OAAO,EAAE,UAAU;IACnB,kBAAkB;IAClB,GAAG,EAAE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,EAAE,WAAW,CAAC,CAAC"}
@@ -19,5 +19,6 @@ export { StatusTokenType, type StatusTokenLiteral, HoverIntentType, type HoverIn
19
19
  export { StateValueType, type StateValueLiteral, StateValue, } from "./states.js";
20
20
  export { SliceAffordanceType, type SliceAffordanceLiteral, SliceAffordance, } from "./slice-affordances.js";
21
21
  export { ValueFormatType, } from "./format.js";
22
- export { LibraryRefType, CellRefType, DragSinkType, type DragSinkLiteral, DragEdgeType, type DragEdgeLiteral, DragEventType, } from "./drag.js";
22
+ export { LibraryRefType, CellRefType, DragSinkType, type DragSinkLiteral, DragEdgeType, type DragEdgeLiteral, DragEventType, CanDropFnType, } from "./drag.js";
23
+ export { ApprovalStateType, type ApprovalStateLiteral, RowRefType, reviewType, type ReviewStructType, RowReviewType, type ReviewConfig, buildReview, deriveApproval, } from "./review.js";
23
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contracts/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EACH,eAAe,EAAE,KAAK,kBAAkB,EACxC,eAAe,EAAE,KAAK,kBAAkB,EACxC,WAAW,EAAE,KAAK,cAAc,EAChC,aAAa,EAAE,KAAK,gBAAgB,EACpC,aAAa,EAAE,KAAK,gBAAgB,EACpC,cAAc,EAAE,KAAK,iBAAiB,EACtC,aAAa,EAAE,KAAK,gBAAgB,EACpC,kBAAkB,EAAE,KAAK,qBAAqB,EAC9C,gBAAgB,EAAE,KAAK,mBAAmB,EAC1C,cAAc,EAAE,KAAK,iBAAiB,GACzC,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,cAAc,EAAE,KAAK,iBAAiB,EAAE,UAAU,GACrD,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,mBAAmB,EAAE,KAAK,sBAAsB,EAAE,eAAe,GACpE,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACH,eAAe,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,cAAc,EACd,WAAW,EACX,YAAY,EAAE,KAAK,eAAe,EAClC,YAAY,EAAE,KAAK,eAAe,EAClC,aAAa,GAChB,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contracts/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EACH,eAAe,EAAE,KAAK,kBAAkB,EACxC,eAAe,EAAE,KAAK,kBAAkB,EACxC,WAAW,EAAE,KAAK,cAAc,EAChC,aAAa,EAAE,KAAK,gBAAgB,EACpC,aAAa,EAAE,KAAK,gBAAgB,EACpC,cAAc,EAAE,KAAK,iBAAiB,EACtC,aAAa,EAAE,KAAK,gBAAgB,EACpC,kBAAkB,EAAE,KAAK,qBAAqB,EAC9C,gBAAgB,EAAE,KAAK,mBAAmB,EAC1C,cAAc,EAAE,KAAK,iBAAiB,GACzC,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,cAAc,EAAE,KAAK,iBAAiB,EAAE,UAAU,GACrD,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,mBAAmB,EAAE,KAAK,sBAAsB,EAAE,eAAe,GACpE,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACH,eAAe,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,cAAc,EACd,WAAW,EACX,YAAY,EAAE,KAAK,eAAe,EAClC,YAAY,EAAE,KAAK,eAAe,EAClC,aAAa,EACb,aAAa,GAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACH,iBAAiB,EAAE,KAAK,oBAAoB,EAC5C,UAAU,EACV,UAAU,EAAE,KAAK,gBAAgB,EACjC,aAAa,EACb,KAAK,YAAY,EACjB,WAAW,EACX,cAAc,GACjB,MAAM,aAAa,CAAC"}
@@ -19,5 +19,6 @@ export { StatusTokenType, HoverIntentType, DensityType, VerbosityType, Elevation
19
19
  export { StateValueType, StateValue, } from "./states.js";
20
20
  export { SliceAffordanceType, SliceAffordance, } from "./slice-affordances.js";
21
21
  export { ValueFormatType, } from "./format.js";
22
- export { LibraryRefType, CellRefType, DragSinkType, DragEdgeType, DragEventType, } from "./drag.js";
22
+ export { LibraryRefType, CellRefType, DragSinkType, DragEdgeType, DragEventType, CanDropFnType, } from "./drag.js";
23
+ export { ApprovalStateType, RowRefType, reviewType, RowReviewType, buildReview, deriveApproval, } from "./review.js";
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contracts/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EACH,eAAe,EACf,eAAe,EACf,WAAW,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,cAAc,EAA0B,UAAU,GACrD,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,mBAAmB,EAA+B,eAAe,GACpE,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACH,eAAe,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,GAChB,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contracts/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EACH,eAAe,EACf,eAAe,EACf,WAAW,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,cAAc,EAA0B,UAAU,GACrD,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,mBAAmB,EAA+B,eAAe,GACpE,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACH,eAAe,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,GAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACH,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,aAAa,EAEb,WAAW,EACX,cAAc,GACjB,MAAM,aAAa,CAAC"}
@@ -0,0 +1,198 @@
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
+ * Review / approval grammar — the shared contract for decision surfaces.
7
+ *
8
+ * Lifted from the Planner's review chrome (PR #76) so every grid surface
9
+ * (Planner, Gantt, Table, Roster, Board) speaks one approval vocabulary and
10
+ * wears identical chrome: a per-subject Approve / Reject **decision column**
11
+ * plus a batch **`commitBar` foot** (Approve all / Reject all / Rerun).
12
+ *
13
+ * The vocabulary is deliberately two-axis:
14
+ *
15
+ * - **Event lifecycle** (`PlannerStateType`: committed / proposed / rejected)
16
+ * is what happened to a scheduled event — the audit trail.
17
+ * - **Approval state** ({@link ApprovalStateType}: approved / pending /
18
+ * rejected) is the *reviewer's* verdict on a subject (usually a row) — the
19
+ * sign-off.
20
+ *
21
+ * A model writes `proposed(model)` events; the affected row rests `pending`;
22
+ * an operator's Approve resolves the row to `approved`. Related, coarser /
23
+ * finer granularities stay distinct on purpose: per-tile ghost-accept
24
+ * (`onAccept(CellRef)` on the drag contract) resolves ONE proposed event,
25
+ * and e3-ui's DecisionQueue `Verdict` resolves a *case*; this contract is the
26
+ * row/batch granularity between them.
27
+ *
28
+ * @packageDocumentation
29
+ */
30
+ import { type EastType, type ExprType, type SubtypeExprOrValue, BooleanType, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, VariantType } from "@elaraai/east";
31
+ import { UIComponentType } from "../component.js";
32
+ /**
33
+ * A review subject's approval state — the reviewer's verdict, distinct from
34
+ * the event-level audit lifecycle (`PlannerStateType`).
35
+ *
36
+ * @remarks
37
+ * `approved` rests pre-approved (a clean line's resting state — its Approve
38
+ * button renders as the active state); `pending` awaits an explicit call (a
39
+ * flagged line); `rejected` is an explicit decline. Authors usually derive it
40
+ * in East — see {@link deriveApproval} for the canonical "clean ⇒ approved,
41
+ * flagged ⇒ pending" rule.
42
+ *
43
+ * The same three words appear in e3-ui's DecisionQueue at *case* granularity
44
+ * (`Verdict`); this variant is the in-surface (row / batch) resolution.
45
+ *
46
+ * @property approved - Pre-approved / accepted (the resting state for a clean subject)
47
+ * @property pending - Undecided — awaits an explicit Approve / Reject
48
+ * @property rejected - Explicitly declined
49
+ */
50
+ export declare const ApprovalStateType: VariantType<{
51
+ /** Pre-approved / accepted (the resting state for a clean subject). */
52
+ readonly approved: NullType;
53
+ /** Undecided — awaits an explicit Approve / Reject. */
54
+ readonly pending: NullType;
55
+ /** Explicitly declined. */
56
+ readonly rejected: NullType;
57
+ }>;
58
+ /**
59
+ * Type representing approval state values.
60
+ */
61
+ export type ApprovalStateType = typeof ApprovalStateType;
62
+ /**
63
+ * String literal form of {@link ApprovalStateType} tags.
64
+ */
65
+ export type ApprovalStateLiteral = "approved" | "pending" | "rejected";
66
+ /**
67
+ * The row-subject reference — the payload of per-row review callbacks on the
68
+ * row-granularity adopters (Planner, Gantt, Table, Roster).
69
+ *
70
+ * @remarks
71
+ * `rowIndex` addresses the row in the surface's **unsliced** row order (the
72
+ * same convention as row-selection events), so hosts map it straight back to
73
+ * their source data. Tile-granularity acceptance keeps its own subject — the
74
+ * drag contract's `CellRefType` — documented as the *item*-level sibling of
75
+ * this row-level ref.
76
+ *
77
+ * @property rowIndex - The acted-on row's index (0-based, unsliced order)
78
+ */
79
+ export declare const RowRefType: StructType<{
80
+ /** The acted-on row's index (0-based, unsliced order) */
81
+ readonly rowIndex: IntegerType;
82
+ }>;
83
+ /**
84
+ * Type representing row-subject reference values.
85
+ */
86
+ export type RowRefType = typeof RowRefType;
87
+ /**
88
+ * The review-config struct shape for a subject-ref type `S` and a UI
89
+ * component type `C` — see {@link reviewType}.
90
+ */
91
+ export type ReviewStructType<S extends EastType, C extends EastType> = StructType<{
92
+ columnLabel: StringType;
93
+ summary: OptionType<C>;
94
+ onApprove: OptionType<FunctionType<[S], NullType>>;
95
+ onReject: OptionType<FunctionType<[S], NullType>>;
96
+ onApproveAll: OptionType<FunctionType<[], NullType>>;
97
+ onRejectAll: OptionType<FunctionType<[], NullType>>;
98
+ onRerun: OptionType<FunctionType<[], NullType>>;
99
+ rerunLabel: StringType;
100
+ }>;
101
+ /**
102
+ * Builds the review-config East type for a given subject-ref type — the
103
+ * honest per-component variability of the shared contract.
104
+ *
105
+ * @param subjectRefType - The per-subject callback payload type (e.g. {@link RowRefType} for row-granularity surfaces)
106
+ * @param componentType - The UI component type for the `summary` field — pass `UIComponentType` (or the recursion `node` when spelling a root inline in `component.ts`)
107
+ * @returns The review-config `StructType` for that subject
108
+ *
109
+ * @remarks
110
+ * Every adopter's `review` field is `OptionType(reviewType(...))` with the
111
+ * same fixed fields — only the subject varies: Planner / Gantt / Table /
112
+ * Roster review rows (`{ rowIndex }`), while per-tile ghost-accept stays on
113
+ * the drag contract's `CellRefType`. `componentType` is injected (rather than
114
+ * imported) so `component.ts` can spell the same shape inside its
115
+ * `RecursiveType` using the recursion `node`; every other caller passes the
116
+ * resolved `UIComponentType`.
117
+ *
118
+ * Semantics of the fields (identical across adopters):
119
+ * - `columnLabel` — the decision-column header (builders default `"Decision"`).
120
+ * - `summary` — optional host-composed foot eyebrow (a `UIComponentType`).
121
+ * - `onApprove` / `onReject` — per-subject calls, receiving the subject ref.
122
+ * - `onApproveAll` / `onRejectAll` — batch foot verbs.
123
+ * - `onRerun` — optional re-run verb (absent ⇒ no Rerun button);
124
+ * `rerunLabel` its label (builders default `"Rerun"`).
125
+ */
126
+ export declare function reviewType<S extends EastType, C extends EastType>(subjectRefType: S, componentType: C): ReviewStructType<S, C>;
127
+ /**
128
+ * The resolved row-granularity review-config type — `reviewType(RowRefType,
129
+ * UIComponentType)`. The concrete type Planner / Gantt / Table / Roster carry
130
+ * (and the one renderers decode).
131
+ */
132
+ export declare const RowReviewType: ReviewStructType<RowRefType, UIComponentType>;
133
+ /**
134
+ * Type representing row-granularity review-config values.
135
+ */
136
+ export type RowReviewType = typeof RowReviewType;
137
+ /**
138
+ * Flat TS input for a surface's `review` option — opt-in per-subject approval
139
+ * plus the batch foot.
140
+ *
141
+ * @typeParam S - The subject-ref East type the per-subject callbacks receive
142
+ * @property columnLabel - The decision-column header (default `"Decision"`)
143
+ * @property summary - Optional foot eyebrow (host-composed UI component)
144
+ * @property onApprove - Optional per-subject Approve callback (receives the subject ref)
145
+ * @property onReject - Optional per-subject Reject callback (receives the subject ref)
146
+ * @property onApproveAll - Optional batch Approve-all callback
147
+ * @property onRejectAll - Optional batch Reject-all callback
148
+ * @property onRerun - Optional Rerun callback (absent ⇒ no Rerun button)
149
+ * @property rerunLabel - The Rerun button label (default `"Rerun"`)
150
+ */
151
+ export interface ReviewConfig<S extends EastType = RowRefType> {
152
+ /** The decision-column header (default `"Decision"`). */
153
+ columnLabel?: SubtypeExprOrValue<StringType> | string;
154
+ /** Optional foot eyebrow (host-composed UI component). */
155
+ summary?: SubtypeExprOrValue<UIComponentType>;
156
+ /** Optional per-subject Approve callback (receives the subject ref). */
157
+ onApprove?: SubtypeExprOrValue<FunctionType<[S], NullType>>;
158
+ /** Optional per-subject Reject callback (receives the subject ref). */
159
+ onReject?: SubtypeExprOrValue<FunctionType<[S], NullType>>;
160
+ /** Optional batch Approve-all callback. */
161
+ onApproveAll?: SubtypeExprOrValue<FunctionType<[], NullType>>;
162
+ /** Optional batch Reject-all callback. */
163
+ onRejectAll?: SubtypeExprOrValue<FunctionType<[], NullType>>;
164
+ /** Optional Rerun callback (absent ⇒ no Rerun button). */
165
+ onRerun?: SubtypeExprOrValue<FunctionType<[], NullType>>;
166
+ /** The Rerun button label (default `"Rerun"`). */
167
+ rerunLabel?: SubtypeExprOrValue<StringType> | string;
168
+ }
169
+ /**
170
+ * Resolves a {@link ReviewConfig} into a review-config value, defaulting the
171
+ * column / rerun labels (`"Decision"` / `"Rerun"`).
172
+ *
173
+ * @param config - The flat review configuration
174
+ * @param type - The adopter's resolved review-config type (e.g. {@link RowReviewType})
175
+ * @returns An East expression of `type`
176
+ *
177
+ * @remarks
178
+ * The shared factory every adopter's root builder delegates to, so the
179
+ * normalisation (and its defaults) is defined once. Pass the surface's own
180
+ * review type — `reviewType(subject, UIComponentType)` — so the callbacks are
181
+ * checked against the right subject ref.
182
+ */
183
+ export declare function buildReview<S extends EastType>(config: ReviewConfig<S>, type: ReviewStructType<S, UIComponentType>): ExprType<ReviewStructType<S, UIComponentType>>;
184
+ /**
185
+ * The canonical "clean ⇒ approved, flagged ⇒ pending" approval derivation.
186
+ *
187
+ * @param flagged - Whether the subject is flagged for an explicit call
188
+ * @returns `some(pending)` when flagged, `some(approved)` otherwise
189
+ *
190
+ * @remarks
191
+ * The resting-state rule every review surface documents: clean subjects rest
192
+ * pre-approved (no dot, Approve active), flagged subjects await an explicit
193
+ * Approve / Reject. Use as the `approval` accessor —
194
+ * `approval: r => deriveApproval(r.flagged)` — and pair it with a `status`
195
+ * dot on the flagged rows.
196
+ */
197
+ export declare function deriveApproval(flagged: SubtypeExprOrValue<BooleanType>): ExprType<OptionType<ApprovalStateType>>;
198
+ //# sourceMappingURL=review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../src/contracts/review.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAEvB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EAId,MAAM,eAAe,CAAC;AACvB,OAAO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vB,IAAI,EAAE,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,GAC3C,QAAQ,CAAC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAWhD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC1B,OAAO,EAAE,kBAAkB,CAAC,WAAW,CAAC,GACzC,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAKzC"}
@@ -0,0 +1,163 @@
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
+ * Review / approval grammar — the shared contract for decision surfaces.
7
+ *
8
+ * Lifted from the Planner's review chrome (PR #76) so every grid surface
9
+ * (Planner, Gantt, Table, Roster, Board) speaks one approval vocabulary and
10
+ * wears identical chrome: a per-subject Approve / Reject **decision column**
11
+ * plus a batch **`commitBar` foot** (Approve all / Reject all / Rerun).
12
+ *
13
+ * The vocabulary is deliberately two-axis:
14
+ *
15
+ * - **Event lifecycle** (`PlannerStateType`: committed / proposed / rejected)
16
+ * is what happened to a scheduled event — the audit trail.
17
+ * - **Approval state** ({@link ApprovalStateType}: approved / pending /
18
+ * rejected) is the *reviewer's* verdict on a subject (usually a row) — the
19
+ * sign-off.
20
+ *
21
+ * A model writes `proposed(model)` events; the affected row rests `pending`;
22
+ * an operator's Approve resolves the row to `approved`. Related, coarser /
23
+ * finer granularities stay distinct on purpose: per-tile ghost-accept
24
+ * (`onAccept(CellRef)` on the drag contract) resolves ONE proposed event,
25
+ * and e3-ui's DecisionQueue `Verdict` resolves a *case*; this contract is the
26
+ * row/batch granularity between them.
27
+ *
28
+ * @packageDocumentation
29
+ */
30
+ import { East, BooleanType, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, VariantType, none, some, variant, } from "@elaraai/east";
31
+ import { UIComponentType } from "../component.js";
32
+ // ============================================================================
33
+ // Approval vocabulary
34
+ // ============================================================================
35
+ /**
36
+ * A review subject's approval state — the reviewer's verdict, distinct from
37
+ * the event-level audit lifecycle (`PlannerStateType`).
38
+ *
39
+ * @remarks
40
+ * `approved` rests pre-approved (a clean line's resting state — its Approve
41
+ * button renders as the active state); `pending` awaits an explicit call (a
42
+ * flagged line); `rejected` is an explicit decline. Authors usually derive it
43
+ * in East — see {@link deriveApproval} for the canonical "clean ⇒ approved,
44
+ * flagged ⇒ pending" rule.
45
+ *
46
+ * The same three words appear in e3-ui's DecisionQueue at *case* granularity
47
+ * (`Verdict`); this variant is the in-surface (row / batch) resolution.
48
+ *
49
+ * @property approved - Pre-approved / accepted (the resting state for a clean subject)
50
+ * @property pending - Undecided — awaits an explicit Approve / Reject
51
+ * @property rejected - Explicitly declined
52
+ */
53
+ export const ApprovalStateType = VariantType({
54
+ /** Pre-approved / accepted (the resting state for a clean subject). */
55
+ approved: NullType,
56
+ /** Undecided — awaits an explicit Approve / Reject. */
57
+ pending: NullType,
58
+ /** Explicitly declined. */
59
+ rejected: NullType,
60
+ });
61
+ /**
62
+ * The row-subject reference — the payload of per-row review callbacks on the
63
+ * row-granularity adopters (Planner, Gantt, Table, Roster).
64
+ *
65
+ * @remarks
66
+ * `rowIndex` addresses the row in the surface's **unsliced** row order (the
67
+ * same convention as row-selection events), so hosts map it straight back to
68
+ * their source data. Tile-granularity acceptance keeps its own subject — the
69
+ * drag contract's `CellRefType` — documented as the *item*-level sibling of
70
+ * this row-level ref.
71
+ *
72
+ * @property rowIndex - The acted-on row's index (0-based, unsliced order)
73
+ */
74
+ export const RowRefType = StructType({
75
+ /** The acted-on row's index (0-based, unsliced order) */
76
+ rowIndex: IntegerType,
77
+ });
78
+ /**
79
+ * Builds the review-config East type for a given subject-ref type — the
80
+ * honest per-component variability of the shared contract.
81
+ *
82
+ * @param subjectRefType - The per-subject callback payload type (e.g. {@link RowRefType} for row-granularity surfaces)
83
+ * @param componentType - The UI component type for the `summary` field — pass `UIComponentType` (or the recursion `node` when spelling a root inline in `component.ts`)
84
+ * @returns The review-config `StructType` for that subject
85
+ *
86
+ * @remarks
87
+ * Every adopter's `review` field is `OptionType(reviewType(...))` with the
88
+ * same fixed fields — only the subject varies: Planner / Gantt / Table /
89
+ * Roster review rows (`{ rowIndex }`), while per-tile ghost-accept stays on
90
+ * the drag contract's `CellRefType`. `componentType` is injected (rather than
91
+ * imported) so `component.ts` can spell the same shape inside its
92
+ * `RecursiveType` using the recursion `node`; every other caller passes the
93
+ * resolved `UIComponentType`.
94
+ *
95
+ * Semantics of the fields (identical across adopters):
96
+ * - `columnLabel` — the decision-column header (builders default `"Decision"`).
97
+ * - `summary` — optional host-composed foot eyebrow (a `UIComponentType`).
98
+ * - `onApprove` / `onReject` — per-subject calls, receiving the subject ref.
99
+ * - `onApproveAll` / `onRejectAll` — batch foot verbs.
100
+ * - `onRerun` — optional re-run verb (absent ⇒ no Rerun button);
101
+ * `rerunLabel` its label (builders default `"Rerun"`).
102
+ */
103
+ export function reviewType(subjectRefType, componentType) {
104
+ return StructType({
105
+ columnLabel: StringType,
106
+ summary: OptionType(componentType),
107
+ onApprove: OptionType(FunctionType([subjectRefType], NullType)),
108
+ onReject: OptionType(FunctionType([subjectRefType], NullType)),
109
+ onApproveAll: OptionType(FunctionType([], NullType)),
110
+ onRejectAll: OptionType(FunctionType([], NullType)),
111
+ onRerun: OptionType(FunctionType([], NullType)),
112
+ rerunLabel: StringType,
113
+ });
114
+ }
115
+ /**
116
+ * The resolved row-granularity review-config type — `reviewType(RowRefType,
117
+ * UIComponentType)`. The concrete type Planner / Gantt / Table / Roster carry
118
+ * (and the one renderers decode).
119
+ */
120
+ export const RowReviewType = reviewType(RowRefType, UIComponentType);
121
+ /**
122
+ * Resolves a {@link ReviewConfig} into a review-config value, defaulting the
123
+ * column / rerun labels (`"Decision"` / `"Rerun"`).
124
+ *
125
+ * @param config - The flat review configuration
126
+ * @param type - The adopter's resolved review-config type (e.g. {@link RowReviewType})
127
+ * @returns An East expression of `type`
128
+ *
129
+ * @remarks
130
+ * The shared factory every adopter's root builder delegates to, so the
131
+ * normalisation (and its defaults) is defined once. Pass the surface's own
132
+ * review type — `reviewType(subject, UIComponentType)` — so the callbacks are
133
+ * checked against the right subject ref.
134
+ */
135
+ export function buildReview(config, type) {
136
+ return East.value({
137
+ columnLabel: config.columnLabel ?? "Decision",
138
+ summary: config.summary !== undefined ? some(config.summary) : none,
139
+ onApprove: config.onApprove !== undefined ? some(config.onApprove) : none,
140
+ onReject: config.onReject !== undefined ? some(config.onReject) : none,
141
+ onApproveAll: config.onApproveAll !== undefined ? some(config.onApproveAll) : none,
142
+ onRejectAll: config.onRejectAll !== undefined ? some(config.onRejectAll) : none,
143
+ onRerun: config.onRerun !== undefined ? some(config.onRerun) : none,
144
+ rerunLabel: config.rerunLabel ?? "Rerun",
145
+ }, type);
146
+ }
147
+ /**
148
+ * The canonical "clean ⇒ approved, flagged ⇒ pending" approval derivation.
149
+ *
150
+ * @param flagged - Whether the subject is flagged for an explicit call
151
+ * @returns `some(pending)` when flagged, `some(approved)` otherwise
152
+ *
153
+ * @remarks
154
+ * The resting-state rule every review surface documents: clean subjects rest
155
+ * pre-approved (no dot, Approve active), flagged subjects await an explicit
156
+ * Approve / Reject. Use as the `approval` accessor —
157
+ * `approval: r => deriveApproval(r.flagged)` — and pair it with a `status`
158
+ * dot on the flagged rows.
159
+ */
160
+ export function deriveApproval(flagged) {
161
+ return East.value(flagged, BooleanType).ifElse(() => East.value(some(variant("pending", null)), OptionType(ApprovalStateType)), () => East.value(some(variant("approved", null)), OptionType(ApprovalStateType)));
162
+ }
163
+ //# sourceMappingURL=review.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review.js","sourceRoot":"","sources":["../../../src/contracts/review.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAIH,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EAC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,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,EAC/E,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CACnF,CAAC;AACN,CAAC"}
@@ -30,11 +30,12 @@ export type { ContainerChildrenType } from "./runtime/children.js";
30
30
  export type { UIElement } from "./runtime/runtime.js";
31
31
  export { Style } from "./style.js";
32
32
  export { DensityType, type DensityLiteral, StatusTokenType, type StatusTokenLiteral } from "./style/interaction.js";
33
- export { LibraryRefType, CellRefType, DragSinkType, type DragSinkLiteral, DragEdgeType, type DragEdgeLiteral, DragEventType, } from "./contracts/drag.js";
33
+ export { LibraryRefType, CellRefType, DragSinkType, type DragSinkLiteral, DragEdgeType, type DragEdgeLiteral, DragEventType, CanDropFnType, } from "./contracts/drag.js";
34
+ export { ApprovalStateType, type ApprovalStateLiteral, RowRefType, reviewType, type ReviewStructType, RowReviewType, type ReviewConfig, deriveApproval, } from "./contracts/review.js";
34
35
  export { Format } from "./format/index.js";
35
36
  export type { NumberFormatOptions, CurrencyFormatOptions, PercentFormatOptions, CompactFormatOptions, UnitFormatOptions, } from "./format/index.js";
36
37
  export { Text, Code, Heading, Link, Highlight, Mark, List, CodeBlock, Numeric, Note, } from "./runtime/typography/index.js";
37
- export { Box, Flex, Stack, VStack, HStack, AlignedStack, Separator, Grid, Splitter, Sticky, ScrollArea, } from "./runtime/layout/index.js";
38
+ export { Box, Flex, Stack, VStack, HStack, AlignedStack, Separator, Grid, Splitter, Sticky, ScrollArea, Expandable, } from "./runtime/layout/index.js";
38
39
  export { Button, IconButton, CopyButton, CloseButton, Toggle, ButtonGroup } from "./runtime/buttons/index.js";
39
40
  export type { ButtonLabelInput, ButtonOptions } from "./buttons/index.js";
40
41
  export { Input, Checkbox, RadioGroup, RadioCardGroup, TimeRangeInput, DateRangeInput, Switch, Select, Combobox, Slider, Field, FileUpload, Textarea, TagsInput } from "./runtime/forms/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACzF,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC/G,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,eAAe,EAAE,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGpH,OAAO,EACH,cAAc,EACd,WAAW,EACX,YAAY,EAAE,KAAK,eAAe,EAClC,YAAY,EAAE,KAAK,eAAe,EAClC,aAAa,GAChB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,YAAY,EACR,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,GACpB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACH,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAC3D,OAAO,EAAE,IAAI,GAChB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EACH,GA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AE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAGtD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGvD,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIvE,OAAO,EACH,MAAM,EACN,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,kBAAkB,GAC1B,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACvL,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EACH,gBAAgB,EAAE,oBAAoB,EAAE,eAAe,EACvD,eAAe,EAAE,wBAAwB,EACzC,eAAe,EAAE,oBAAoB,EACrC,mBAAmB,EAAE,qBAAqB,GAC7C,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
package/dist/src/index.js CHANGED
@@ -31,13 +31,15 @@ export { coalesceChildren } from "./runtime/children.js";
31
31
  export { Style } from "./style.js";
32
32
  export { DensityType, StatusTokenType } from "./style/interaction.js";
33
33
  // Drag & drop grammar contract — hosts type `onDrag` handlers against these
34
- export { LibraryRefType, CellRefType, DragSinkType, DragEdgeType, DragEventType, } from "./contracts/drag.js";
34
+ export { LibraryRefType, CellRefType, DragSinkType, DragEdgeType, DragEventType, CanDropFnType, } from "./contracts/drag.js";
35
+ // Review / approval grammar contract — hosts type `review` configs against these
36
+ export { ApprovalStateType, RowRefType, reviewType, RowReviewType, deriveApproval, } from "./contracts/review.js";
35
37
  // Format helpers
36
38
  export { Format } from "./format/index.js";
37
39
  // Typography
38
40
  export { Text, Code, Heading, Link, Highlight, Mark, List, CodeBlock, Numeric, Note, } from "./runtime/typography/index.js";
39
41
  // Layout
40
- export { Box, Flex, Stack, VStack, HStack, AlignedStack, Separator, Grid, Splitter, Sticky, ScrollArea, } from "./runtime/layout/index.js";
42
+ export { Box, Flex, Stack, VStack, HStack, AlignedStack, Separator, Grid, Splitter, Sticky, ScrollArea, Expandable, } from "./runtime/layout/index.js";
41
43
  // Buttons
42
44
  export { Button, IconButton, CopyButton, CloseButton, Toggle, ButtonGroup } from "./runtime/buttons/index.js";
43
45
  // Forms
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,8CAA8C;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,0EAA0E;AAC1E,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,eAAe;AACf,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAuB,eAAe,EAA2B,MAAM,wBAAwB,CAAC;AAEpH,4EAA4E;AAC5E,OAAO,EACH,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,GAChB,MAAM,qBAAqB,CAAC;AAE7B,iBAAiB;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAS3C,aAAa;AACb,OAAO,EACH,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAC3D,OAAO,EAAE,IAAI,GAChB,MAAM,+BAA+B,CAAC;AAEvC,SAAS;AACT,OAAO,EACH,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE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M,yBAAyB,CAAC"}
@@ -19,11 +19,12 @@
19
19
  export { variant } from "@elaraai/east";
20
20
  export { Style } from "./style.js";
21
21
  export { DensityType, type DensityLiteral } from "./style/interaction.js";
22
- export { LibraryRefType, CellRefType, DragSinkType, type DragSinkLiteral, DragEdgeType, type DragEdgeLiteral, DragEventType, } from "./contracts/drag.js";
22
+ export { LibraryRefType, CellRefType, DragSinkType, type DragSinkLiteral, DragEdgeType, type DragEdgeLiteral, DragEventType, CanDropFnType, } from "./contracts/drag.js";
23
+ export { ApprovalStateType, type ApprovalStateLiteral, RowRefType, reviewType, type ReviewStructType, RowReviewType, type ReviewConfig, buildReview, deriveApproval, } from "./contracts/review.js";
23
24
  export { Format } from "./format/index.js";
24
25
  export type { NumberFormatOptions, CurrencyFormatOptions, PercentFormatOptions, CompactFormatOptions, UnitFormatOptions, } from "./format/index.js";
25
26
  export { Text, Code, Heading, Link, Highlight, Mark, List, CodeBlock, Numeric, Note, } from "./typography/index.js";
26
- export { Box, Flex, Stack, AlignedStack, Separator, Grid, Splitter, Sticky, ScrollArea, } from "./layout/index.js";
27
+ export { Box, Flex, Stack, AlignedStack, Separator, Grid, Splitter, Sticky, ScrollArea, Expandable, } from "./layout/index.js";
27
28
  export { Button, IconButton, CopyButton, CloseButton, Toggle, ButtonGroup } from "./buttons/index.js";
28
29
  export type { ButtonLabelInput, ButtonOptions } from "./buttons/index.js";
29
30
  export { Input, Checkbox, RadioGroup, RadioCardGroup, TimeRangeInput, DateRangeInput, Switch, Select, Combobox, Slider, Field, FileUpload, Textarea, TagsInput } from "./forms/index.js";
@@ -53,6 +54,7 @@ export * from "./layout/box/types.js";
53
54
  export * from "./layout/stack/types.js";
54
55
  export * from "./layout/aligned-stack/types.js";
55
56
  export * from "./shared/plot-gutter.js";
57
+ export { reifyAccessor } from "./shared/reify.js";
56
58
  export * from "./layout/grid/types.js";
57
59
  export * from "./layout/separator/types.js";
58
60
  export * from "./layout/splitter/types.js";
@@ -1 +1 @@
1
- {"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AAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC"}
@@ -22,12 +22,14 @@ export { variant } from "@elaraai/east";
22
22
  export { Style } from "./style.js";
23
23
  export { DensityType } from "./style/interaction.js";
24
24
  // Drag & drop grammar contract
25
- export { LibraryRefType, CellRefType, DragSinkType, DragEdgeType, DragEventType, } from "./contracts/drag.js";
25
+ export { LibraryRefType, CellRefType, DragSinkType, DragEdgeType, DragEventType, CanDropFnType, } from "./contracts/drag.js";
26
+ // Review / approval grammar contract
27
+ export { ApprovalStateType, RowRefType, reviewType, RowReviewType, buildReview, deriveApproval, } from "./contracts/review.js";
26
28
  // Format helpers
27
29
  export { Format } from "./format/index.js";
28
30
  // Component factories, by category
29
31
  export { Text, Code, Heading, Link, Highlight, Mark, List, CodeBlock, Numeric, Note, } from "./typography/index.js";
30
- export { Box, Flex, Stack, AlignedStack, Separator, Grid, Splitter, Sticky, ScrollArea, } from "./layout/index.js";
32
+ export { Box, Flex, Stack, AlignedStack, Separator, Grid, Splitter, Sticky, ScrollArea, Expandable, } from "./layout/index.js";
31
33
  export { Button, IconButton, CopyButton, CloseButton, Toggle, ButtonGroup } from "./buttons/index.js";
32
34
  export { Input, Checkbox, RadioGroup, RadioCardGroup, TimeRangeInput, DateRangeInput, Switch, Select, Combobox, Slider, Field, FileUpload, Textarea, TagsInput } from "./forms/index.js";
33
35
  export { Progress, Banner, EmptyState, Skeleton, Status } from "./feedback/index.js";
@@ -56,6 +58,7 @@ export * from "./layout/box/types.js";
56
58
  export * from "./layout/stack/types.js";
57
59
  export * from "./layout/aligned-stack/types.js";
58
60
  export * from "./shared/plot-gutter.js";
61
+ export { reifyAccessor } from "./shared/reify.js";
59
62
  export * from "./layout/grid/types.js";
60
63
  export * from "./layout/separator/types.js";
61
64
  export * from "./layout/splitter/types.js";