@elaraai/east-ui 1.0.67 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/README.md +2 -2
  2. package/dist/src/charts/chart/index.d.ts +39 -4
  3. package/dist/src/charts/chart/index.d.ts.map +1 -1
  4. package/dist/src/charts/chart/index.js +3 -3
  5. package/dist/src/charts/chart/index.js.map +1 -1
  6. package/dist/src/charts/spec/index.d.ts +61 -3
  7. package/dist/src/charts/spec/index.d.ts.map +1 -1
  8. package/dist/src/charts/spec/types.d.ts +1 -1
  9. package/dist/src/charts/spec/types.js +1 -1
  10. package/dist/src/collections/blend/index.d.ts +1 -1
  11. package/dist/src/collections/blend/index.d.ts.map +1 -1
  12. package/dist/src/collections/blend/index.js +1 -1
  13. package/dist/src/collections/blend/index.js.map +1 -1
  14. package/dist/src/collections/blend/types.js +1 -1
  15. package/dist/src/collections/blend/types.js.map +1 -1
  16. package/dist/src/collections/board/index.d.ts +4 -4
  17. package/dist/src/collections/board/index.d.ts.map +1 -1
  18. package/dist/src/collections/board/index.js +1 -1
  19. package/dist/src/collections/board/index.js.map +1 -1
  20. package/dist/src/collections/board/types.js +1 -1
  21. package/dist/src/collections/board/types.js.map +1 -1
  22. package/dist/src/collections/calendar/index.d.ts +1 -1
  23. package/dist/src/collections/calendar/index.d.ts.map +1 -1
  24. package/dist/src/collections/deck/index.d.ts +58 -0
  25. package/dist/src/collections/deck/index.d.ts.map +1 -1
  26. package/dist/src/collections/index.d.ts +1 -2
  27. package/dist/src/collections/index.d.ts.map +1 -1
  28. package/dist/src/collections/index.js +1 -2
  29. package/dist/src/collections/index.js.map +1 -1
  30. package/dist/src/collections/library/index.d.ts +29 -0
  31. package/dist/src/collections/library/index.d.ts.map +1 -1
  32. package/dist/src/collections/library/types.d.ts +29 -0
  33. package/dist/src/collections/library/types.d.ts.map +1 -1
  34. package/dist/src/collections/matrix/index.d.ts +1 -1
  35. package/dist/src/collections/matrix/index.d.ts.map +1 -1
  36. package/dist/src/collections/plan/assemble.d.ts +3732 -0
  37. package/dist/src/collections/plan/assemble.d.ts.map +1 -0
  38. package/dist/src/collections/plan/assemble.js +187 -0
  39. package/dist/src/collections/plan/assemble.js.map +1 -0
  40. package/dist/src/collections/plan/builders.d.ts +612 -0
  41. package/dist/src/collections/plan/builders.d.ts.map +1 -0
  42. package/dist/src/collections/plan/builders.js +543 -0
  43. package/dist/src/collections/plan/builders.js.map +1 -0
  44. package/dist/src/collections/plan/data-forms.d.ts +332 -0
  45. package/dist/src/collections/plan/data-forms.d.ts.map +1 -0
  46. package/dist/src/collections/plan/data-forms.js +212 -0
  47. package/dist/src/collections/plan/data-forms.js.map +1 -0
  48. package/dist/src/collections/plan/factories.d.ts +338 -0
  49. package/dist/src/collections/plan/factories.d.ts.map +1 -0
  50. package/dist/src/collections/plan/factories.js +414 -0
  51. package/dist/src/collections/plan/factories.js.map +1 -0
  52. package/dist/src/collections/plan/index.d.ts +271 -0
  53. package/dist/src/collections/plan/index.d.ts.map +1 -0
  54. package/dist/src/collections/plan/index.js +162 -0
  55. package/dist/src/collections/plan/index.js.map +1 -0
  56. package/dist/src/collections/plan/ir.d.ts +3496 -0
  57. package/dist/src/collections/plan/ir.d.ts.map +1 -0
  58. package/dist/src/collections/plan/ir.js +83 -0
  59. package/dist/src/collections/plan/ir.js.map +1 -0
  60. package/dist/src/collections/plan/pick.d.ts +115 -0
  61. package/dist/src/collections/plan/pick.d.ts.map +1 -0
  62. package/dist/src/collections/plan/pick.js +193 -0
  63. package/dist/src/collections/plan/pick.js.map +1 -0
  64. package/dist/src/collections/plan/root.d.ts +210 -0
  65. package/dist/src/collections/plan/root.d.ts.map +1 -0
  66. package/dist/src/collections/plan/root.js +146 -0
  67. package/dist/src/collections/plan/root.js.map +1 -0
  68. package/dist/src/collections/plan/series.d.ts +11890 -0
  69. package/dist/src/collections/plan/series.d.ts.map +1 -0
  70. package/dist/src/collections/plan/series.js +412 -0
  71. package/dist/src/collections/plan/series.js.map +1 -0
  72. package/dist/src/collections/plan/types.d.ts +9291 -0
  73. package/dist/src/collections/plan/types.d.ts.map +1 -0
  74. package/dist/src/collections/plan/types.js +940 -0
  75. package/dist/src/collections/plan/types.js.map +1 -0
  76. package/dist/src/collections/roster/index.d.ts +4 -4
  77. package/dist/src/collections/roster/index.d.ts.map +1 -1
  78. package/dist/src/collections/roster/index.js +1 -1
  79. package/dist/src/collections/roster/index.js.map +1 -1
  80. package/dist/src/collections/roster/types.d.ts +1 -1
  81. package/dist/src/collections/roster/types.d.ts.map +1 -1
  82. package/dist/src/collections/roster/types.js +4 -3
  83. package/dist/src/collections/roster/types.js.map +1 -1
  84. package/dist/src/collections/table/index.d.ts +70 -2
  85. package/dist/src/collections/table/index.d.ts.map +1 -1
  86. package/dist/src/collections/table/index.js +55 -11
  87. package/dist/src/collections/table/index.js.map +1 -1
  88. package/dist/src/collections/table/types.d.ts +1 -1
  89. package/dist/src/collections/table/types.d.ts.map +1 -1
  90. package/dist/src/component.d.ts +3898 -1339
  91. package/dist/src/component.d.ts.map +1 -1
  92. package/dist/src/component.js +83 -146
  93. package/dist/src/component.js.map +1 -1
  94. package/dist/src/container/card/types.d.ts +1 -1
  95. package/dist/src/container/card/types.d.ts.map +1 -1
  96. package/dist/src/contracts/approval.d.ts +117 -0
  97. package/dist/src/contracts/approval.d.ts.map +1 -0
  98. package/dist/src/contracts/approval.js +105 -0
  99. package/dist/src/contracts/approval.js.map +1 -0
  100. package/dist/src/contracts/drag.d.ts +3 -3
  101. package/dist/src/contracts/drag.d.ts.map +1 -1
  102. package/dist/src/contracts/drag.js +23 -10
  103. package/dist/src/contracts/drag.js.map +1 -1
  104. package/dist/src/contracts/index.d.ts +4 -1
  105. package/dist/src/contracts/index.d.ts.map +1 -1
  106. package/dist/src/contracts/index.js +4 -1
  107. package/dist/src/contracts/index.js.map +1 -1
  108. package/dist/src/contracts/pick.d.ts +705 -0
  109. package/dist/src/contracts/pick.d.ts.map +1 -0
  110. package/dist/src/contracts/pick.js +360 -0
  111. package/dist/src/contracts/pick.js.map +1 -0
  112. package/dist/src/contracts/review.d.ts +7 -99
  113. package/dist/src/contracts/review.d.ts.map +1 -1
  114. package/dist/src/contracts/review.js +11 -85
  115. package/dist/src/contracts/review.js.map +1 -1
  116. package/dist/src/contracts/slice-affordances.d.ts +13 -4
  117. package/dist/src/contracts/slice-affordances.d.ts.map +1 -1
  118. package/dist/src/contracts/slice-affordances.js +13 -3
  119. package/dist/src/contracts/slice-affordances.js.map +1 -1
  120. package/dist/src/contracts/source.d.ts +432 -0
  121. package/dist/src/contracts/source.d.ts.map +1 -0
  122. package/dist/src/contracts/source.js +505 -0
  123. package/dist/src/contracts/source.js.map +1 -0
  124. package/dist/src/contracts/states.d.ts +130 -0
  125. package/dist/src/contracts/states.d.ts.map +1 -1
  126. package/dist/src/contracts/states.js +122 -0
  127. package/dist/src/contracts/states.js.map +1 -1
  128. package/dist/src/contracts/time.d.ts +76 -0
  129. package/dist/src/contracts/time.d.ts.map +1 -0
  130. package/dist/src/contracts/time.js +78 -0
  131. package/dist/src/contracts/time.js.map +1 -0
  132. package/dist/src/display/trace/types.d.ts +1 -1
  133. package/dist/src/display/trace/types.d.ts.map +1 -1
  134. package/dist/src/index.d.ts +10 -2
  135. package/dist/src/index.d.ts.map +1 -1
  136. package/dist/src/index.js +22 -2
  137. package/dist/src/index.js.map +1 -1
  138. package/dist/src/internal.d.ts +5 -3
  139. package/dist/src/internal.d.ts.map +1 -1
  140. package/dist/src/internal.js +4 -3
  141. package/dist/src/internal.js.map +1 -1
  142. package/dist/src/layout/dock/index.d.ts +1 -1
  143. package/dist/src/layout/dock/index.js +1 -1
  144. package/dist/src/layout/index.d.ts +0 -1
  145. package/dist/src/layout/index.d.ts.map +1 -1
  146. package/dist/src/layout/index.js +0 -1
  147. package/dist/src/layout/index.js.map +1 -1
  148. package/dist/src/overlays/drawer/types.d.ts +1 -1
  149. package/dist/src/overlays/drawer/types.d.ts.map +1 -1
  150. package/dist/src/pick/index.d.ts +443 -0
  151. package/dist/src/pick/index.d.ts.map +1 -0
  152. package/dist/src/pick/index.js +64 -0
  153. package/dist/src/pick/index.js.map +1 -0
  154. package/dist/src/pick/panel/index.d.ts +64 -0
  155. package/dist/src/pick/panel/index.d.ts.map +1 -0
  156. package/dist/src/pick/panel/index.js +61 -0
  157. package/dist/src/pick/panel/index.js.map +1 -0
  158. package/dist/src/platform/slice/index.d.ts +291 -0
  159. package/dist/src/platform/slice/index.d.ts.map +1 -1
  160. package/dist/src/platform/slice/index.js +16 -0
  161. package/dist/src/platform/slice/index.js.map +1 -1
  162. package/dist/src/runtime/collections/deck.d.ts +29 -0
  163. package/dist/src/runtime/collections/deck.d.ts.map +1 -1
  164. package/dist/src/runtime/collections/index.d.ts +1 -2
  165. package/dist/src/runtime/collections/index.d.ts.map +1 -1
  166. package/dist/src/runtime/collections/index.js +1 -2
  167. package/dist/src/runtime/collections/index.js.map +1 -1
  168. package/dist/src/runtime/collections/library.d.ts +1 -1
  169. package/dist/src/runtime/collections/library.js +1 -1
  170. package/dist/src/runtime/collections/plan.d.ts +98 -0
  171. package/dist/src/runtime/collections/plan.d.ts.map +1 -0
  172. package/dist/src/runtime/collections/plan.js +98 -0
  173. package/dist/src/runtime/collections/plan.js.map +1 -0
  174. package/dist/src/runtime/collections/schematic.d.ts +1 -1
  175. package/dist/src/runtime/collections/schematic.js +1 -1
  176. package/dist/src/runtime/collections/table.d.ts +9 -1
  177. package/dist/src/runtime/collections/table.d.ts.map +1 -1
  178. package/dist/src/runtime/collections/table.js +1 -7
  179. package/dist/src/runtime/collections/table.js.map +1 -1
  180. package/dist/src/runtime/layout/dock.d.ts +2 -2
  181. package/dist/src/runtime/layout/dock.js +2 -2
  182. package/dist/src/runtime/layout/index.d.ts +0 -1
  183. package/dist/src/runtime/layout/index.d.ts.map +1 -1
  184. package/dist/src/runtime/layout/index.js +0 -1
  185. package/dist/src/runtime/layout/index.js.map +1 -1
  186. package/dist/src/shared/plot-gutter.d.ts +6 -23
  187. package/dist/src/shared/plot-gutter.d.ts.map +1 -1
  188. package/dist/src/shared/plot-gutter.js +6 -19
  189. package/dist/src/shared/plot-gutter.js.map +1 -1
  190. package/dist/src/shared/reify.d.ts +47 -4
  191. package/dist/src/shared/reify.d.ts.map +1 -1
  192. package/dist/src/shared/reify.js +62 -4
  193. package/dist/src/shared/reify.js.map +1 -1
  194. package/dist/src/slice/breakdown/index.d.ts +27 -0
  195. package/dist/src/slice/breakdown/index.d.ts.map +1 -1
  196. package/dist/src/slice/breakdown/types.d.ts +27 -0
  197. package/dist/src/slice/breakdown/types.d.ts.map +1 -1
  198. package/dist/src/slice/cohort/index.d.ts +54 -0
  199. package/dist/src/slice/cohort/index.d.ts.map +1 -1
  200. package/dist/src/slice/cohort/types.d.ts +27 -0
  201. package/dist/src/slice/cohort/types.d.ts.map +1 -1
  202. package/dist/src/slice/filter/index.d.ts +27 -0
  203. package/dist/src/slice/filter/index.d.ts.map +1 -1
  204. package/dist/src/slice/filter/types.d.ts +27 -0
  205. package/dist/src/slice/filter/types.d.ts.map +1 -1
  206. package/dist/src/slice/index.d.ts +405 -0
  207. package/dist/src/slice/index.d.ts.map +1 -1
  208. package/dist/src/slice/legend/index.d.ts +27 -0
  209. package/dist/src/slice/legend/index.d.ts.map +1 -1
  210. package/dist/src/slice/legend/types.d.ts +27 -0
  211. package/dist/src/slice/legend/types.d.ts.map +1 -1
  212. package/dist/src/slice/range/index.d.ts +60 -18
  213. package/dist/src/slice/range/index.d.ts.map +1 -1
  214. package/dist/src/slice/range/index.js +9 -1
  215. package/dist/src/slice/range/index.js.map +1 -1
  216. package/dist/src/slice/range/types.d.ts +63 -22
  217. package/dist/src/slice/range/types.d.ts.map +1 -1
  218. package/dist/src/slice/range/types.js +12 -5
  219. package/dist/src/slice/range/types.js.map +1 -1
  220. package/dist/src/slice/search/index.d.ts +27 -0
  221. package/dist/src/slice/search/index.d.ts.map +1 -1
  222. package/dist/src/slice/search/types.d.ts +27 -0
  223. package/dist/src/slice/search/types.d.ts.map +1 -1
  224. package/dist/src/slice/summary/index.d.ts +27 -0
  225. package/dist/src/slice/summary/index.d.ts.map +1 -1
  226. package/dist/src/slice/summary/types.d.ts +27 -0
  227. package/dist/src/slice/summary/types.d.ts.map +1 -1
  228. package/dist/src/style/content.d.ts +4 -6
  229. package/dist/src/style/content.d.ts.map +1 -1
  230. package/dist/src/style/content.js +4 -6
  231. package/dist/src/style/content.js.map +1 -1
  232. package/dist/src/style/scheme.js +1 -1
  233. package/dist/src/style/scheme.js.map +1 -1
  234. package/dist/test/collections/index.d.ts +2 -2
  235. package/dist/test/collections/index.d.ts.map +1 -1
  236. package/dist/test/collections/index.js +2 -2
  237. package/dist/test/collections/index.js.map +1 -1
  238. package/dist/test/collections/paged-source.examples.d.ts +9 -0
  239. package/dist/test/collections/paged-source.examples.d.ts.map +1 -0
  240. package/dist/test/collections/paged-source.examples.js +136 -0
  241. package/dist/test/collections/paged-source.examples.js.map +1 -0
  242. package/dist/test/collections/plan.examples.d.ts +125 -0
  243. package/dist/test/collections/plan.examples.d.ts.map +1 -0
  244. package/dist/test/collections/plan.examples.js +2939 -0
  245. package/dist/test/collections/plan.examples.js.map +1 -0
  246. package/dist/test/contracts/pick.examples.d.ts +6 -0
  247. package/dist/test/contracts/pick.examples.d.ts.map +1 -0
  248. package/dist/test/contracts/pick.examples.js +89 -0
  249. package/dist/test/contracts/pick.examples.js.map +1 -0
  250. package/dist/test/layout/dock.examples.d.ts +4 -4
  251. package/dist/test/layout/dock.examples.d.ts.map +1 -1
  252. package/dist/test/layout/dock.examples.js +34 -16
  253. package/dist/test/layout/dock.examples.js.map +1 -1
  254. package/dist/test/slice/slice.examples.d.ts +2 -1
  255. package/dist/test/slice/slice.examples.d.ts.map +1 -1
  256. package/dist/test/slice/slice.examples.js +67 -9
  257. package/dist/test/slice/slice.examples.js.map +1 -1
  258. package/package.json +3 -3
  259. package/dist/src/collections/gantt/index.d.ts +0 -377
  260. package/dist/src/collections/gantt/index.d.ts.map +0 -1
  261. package/dist/src/collections/gantt/index.js +0 -896
  262. package/dist/src/collections/gantt/index.js.map +0 -1
  263. package/dist/src/collections/gantt/types.d.ts +0 -353
  264. package/dist/src/collections/gantt/types.d.ts.map +0 -1
  265. package/dist/src/collections/gantt/types.js +0 -207
  266. package/dist/src/collections/gantt/types.js.map +0 -1
  267. package/dist/src/collections/planner/index.d.ts +0 -624
  268. package/dist/src/collections/planner/index.d.ts.map +0 -1
  269. package/dist/src/collections/planner/index.js +0 -941
  270. package/dist/src/collections/planner/index.js.map +0 -1
  271. package/dist/src/collections/planner/types.d.ts +0 -615
  272. package/dist/src/collections/planner/types.d.ts.map +0 -1
  273. package/dist/src/collections/planner/types.js +0 -423
  274. package/dist/src/collections/planner/types.js.map +0 -1
  275. package/dist/src/layout/aligned-stack/index.d.ts +0 -101
  276. package/dist/src/layout/aligned-stack/index.d.ts.map +0 -1
  277. package/dist/src/layout/aligned-stack/index.js +0 -105
  278. package/dist/src/layout/aligned-stack/index.js.map +0 -1
  279. package/dist/src/layout/aligned-stack/types.d.ts +0 -50
  280. package/dist/src/layout/aligned-stack/types.d.ts.map +0 -1
  281. package/dist/src/layout/aligned-stack/types.js +0 -24
  282. package/dist/src/layout/aligned-stack/types.js.map +0 -1
  283. package/dist/src/runtime/collections/gantt.d.ts +0 -67
  284. package/dist/src/runtime/collections/gantt.d.ts.map +0 -1
  285. package/dist/src/runtime/collections/gantt.js +0 -58
  286. package/dist/src/runtime/collections/gantt.js.map +0 -1
  287. package/dist/src/runtime/collections/planner.d.ts +0 -80
  288. package/dist/src/runtime/collections/planner.d.ts.map +0 -1
  289. package/dist/src/runtime/collections/planner.js +0 -76
  290. package/dist/src/runtime/collections/planner.js.map +0 -1
  291. package/dist/src/runtime/layout/aligned-stack.d.ts +0 -38
  292. package/dist/src/runtime/layout/aligned-stack.d.ts.map +0 -1
  293. package/dist/src/runtime/layout/aligned-stack.js +0 -36
  294. package/dist/src/runtime/layout/aligned-stack.js.map +0 -1
  295. package/dist/test/collections/gantt.examples.d.ts +0 -33
  296. package/dist/test/collections/gantt.examples.d.ts.map +0 -1
  297. package/dist/test/collections/gantt.examples.js +0 -359
  298. package/dist/test/collections/gantt.examples.js.map +0 -1
  299. package/dist/test/collections/planner.examples.d.ts +0 -47
  300. package/dist/test/collections/planner.examples.d.ts.map +0 -1
  301. package/dist/test/collections/planner.examples.js +0 -546
  302. package/dist/test/collections/planner.examples.js.map +0 -1
  303. package/dist/test/layout/aligned-stack.examples.d.ts +0 -25
  304. package/dist/test/layout/aligned-stack.examples.d.ts.map +0 -1
  305. package/dist/test/layout/aligned-stack.examples.js +0 -294
  306. package/dist/test/layout/aligned-stack.examples.js.map +0 -1
@@ -20,6 +20,8 @@ import { NullType, VariantType, type ExprType } from "@elaraai/east";
20
20
  * | `presets` | left | curated toggle-only preset pills (`Slice.Cohort` in `toggle` mode) |
21
21
  * | `search` | right (fixed) | closed `.search` pill that opens the dropdown |
22
22
  * | `range` | right | single date-window pill |
23
+ * | `resolution` | right | bucket-unit segment (`WEEK · DAY`) writing the slice's shared `resolution` |
24
+ * | `summary` | right (trailing) | the `N of M · narrowings` line (`Slice.Summary` as chrome) |
23
25
  *
24
26
  * A cross-cutting *contract*, not a style token — it lives in `src/contracts/`
25
27
  * alongside `StateValueType`.
@@ -31,15 +33,20 @@ import { NullType, VariantType, type ExprType } from "@elaraai/east";
31
33
  * @property cohort - Toggleable saved-segment pills with authoring (left zone)
32
34
  * @property presets - Curated toggle-only preset pills — no authoring (#163; left zone)
33
35
  * @property brush - Drag-a-window gesture writing the slice's range. Hosts
34
- * render it natively: a Chart brushes the plot's continuous x, a Gantt the
35
- * timeline, a standalone `Slice.Rail` the mini brush strip. Hosts with no
36
- * continuous axis reject it at the factory.
36
+ * render it natively: a Chart brushes the plot's continuous x, a Plan its
37
+ * horizon strip, a standalone `Slice.Rail` the mini brush strip. Hosts with
38
+ * no continuous axis reject it at the factory.
37
39
  * @property legend - The colour-matched series legend (primary click
38
40
  * cross-filters; the eye toggles series visibility), rendered natively by
39
41
  * the host: a Chart mounts it beneath the plot, a standalone `Slice.Rail`
40
42
  * beneath the cluster. Explicit only (#187) — nothing mounts a legend the
41
43
  * author didn't list; compose `<Slice.Legend>` directly to place it
42
44
  * anywhere else.
45
+ * @property resolution - The shared bucket-unit segment (`WEEK · DAY`) beside
46
+ * the range pill — writes `state.resolution` so every bound time-bucketed
47
+ * surface re-buckets together. Hosts with no bucketed time axis omit it.
48
+ * @property summary - The trailing `N of M · narrowings` line —
49
+ * `Slice.Summary` mounted as chrome at the rail's right edge.
43
50
  */
44
51
  export declare const SliceAffordanceType: VariantType<{
45
52
  readonly filter: NullType;
@@ -50,11 +57,13 @@ export declare const SliceAffordanceType: VariantType<{
50
57
  readonly brush: NullType;
51
58
  readonly presets: NullType;
52
59
  readonly legend: NullType;
60
+ readonly resolution: NullType;
61
+ readonly summary: NullType;
53
62
  }>;
54
63
  /** Type representing slice affordance variant values. */
55
64
  export type SliceAffordanceType = typeof SliceAffordanceType;
56
65
  /** String literal type for slice affordances. */
57
- export type SliceAffordanceLiteral = "filter" | "search" | "breakdown" | "range" | "cohort" | "brush" | "presets" | "legend";
66
+ export type SliceAffordanceLiteral = "filter" | "search" | "breakdown" | "range" | "cohort" | "brush" | "presets" | "legend" | "resolution" | "summary";
58
67
  /**
59
68
  * Creates a slice affordance variant expression.
60
69
  *
@@ -1 +1 @@
1
- {"version":3,"file":"slice-affordances.d.ts","sourceRoot":"","sources":["../../../src/contracts/slice-affordances.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,QAAQ,EAAW,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAMpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;EAS9B,CAAC;AAEH,yDAAyD;AACzD,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAE7D,iDAAiD;AACjD,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE7H;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,sBAAsB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAEjG"}
1
+ {"version":3,"file":"slice-affordances.d.ts","sourceRoot":"","sources":["../../../src/contracts/slice-affordances.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,QAAQ,EAAW,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAMpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;EAY9B,CAAC;AAEH,yDAAyD;AACzD,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAE7D,iDAAiD;AACjD,MAAM,MAAM,sBAAsB,GAC5B,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GACvF,YAAY,GAAG,SAAS,CAAC;AAE/B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,sBAAsB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAEjG"}
@@ -23,6 +23,8 @@ import { East, NullType, variant, VariantType } from "@elaraai/east";
23
23
  * | `presets` | left | curated toggle-only preset pills (`Slice.Cohort` in `toggle` mode) |
24
24
  * | `search` | right (fixed) | closed `.search` pill that opens the dropdown |
25
25
  * | `range` | right | single date-window pill |
26
+ * | `resolution` | right | bucket-unit segment (`WEEK · DAY`) writing the slice's shared `resolution` |
27
+ * | `summary` | right (trailing) | the `N of M · narrowings` line (`Slice.Summary` as chrome) |
26
28
  *
27
29
  * A cross-cutting *contract*, not a style token — it lives in `src/contracts/`
28
30
  * alongside `StateValueType`.
@@ -34,15 +36,20 @@ import { East, NullType, variant, VariantType } from "@elaraai/east";
34
36
  * @property cohort - Toggleable saved-segment pills with authoring (left zone)
35
37
  * @property presets - Curated toggle-only preset pills — no authoring (#163; left zone)
36
38
  * @property brush - Drag-a-window gesture writing the slice's range. Hosts
37
- * render it natively: a Chart brushes the plot's continuous x, a Gantt the
38
- * timeline, a standalone `Slice.Rail` the mini brush strip. Hosts with no
39
- * continuous axis reject it at the factory.
39
+ * render it natively: a Chart brushes the plot's continuous x, a Plan its
40
+ * horizon strip, a standalone `Slice.Rail` the mini brush strip. Hosts with
41
+ * no continuous axis reject it at the factory.
40
42
  * @property legend - The colour-matched series legend (primary click
41
43
  * cross-filters; the eye toggles series visibility), rendered natively by
42
44
  * the host: a Chart mounts it beneath the plot, a standalone `Slice.Rail`
43
45
  * beneath the cluster. Explicit only (#187) — nothing mounts a legend the
44
46
  * author didn't list; compose `<Slice.Legend>` directly to place it
45
47
  * anywhere else.
48
+ * @property resolution - The shared bucket-unit segment (`WEEK · DAY`) beside
49
+ * the range pill — writes `state.resolution` so every bound time-bucketed
50
+ * surface re-buckets together. Hosts with no bucketed time axis omit it.
51
+ * @property summary - The trailing `N of M · narrowings` line —
52
+ * `Slice.Summary` mounted as chrome at the rail's right edge.
46
53
  */
47
54
  export const SliceAffordanceType = VariantType({
48
55
  filter: NullType,
@@ -53,6 +60,9 @@ export const SliceAffordanceType = VariantType({
53
60
  brush: NullType,
54
61
  presets: NullType,
55
62
  legend: NullType,
63
+ // Appended last: wire-order compatibility.
64
+ resolution: NullType,
65
+ summary: NullType,
56
66
  });
57
67
  /**
58
68
  * Creates a slice affordance variant expression.
@@ -1 +1 @@
1
- {"version":3,"file":"slice-affordances.js","sourceRoot":"","sources":["../../../src/contracts/slice-affordances.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EA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CAAC;AAUH;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkC;IAC9D,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,mBAAmB,CAAC,CAAC;AACtE,CAAC"}
@@ -0,0 +1,432 @@
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
+ * The ROW-SOURCE contract (#567) — how a collection component takes its rows.
7
+ *
8
+ * A component's `rows` / `data` prop accepts an inline collection or a WINDOWED
9
+ * source, and this module is the one place that vocabulary is spelled. Both are
10
+ * parameterised on the COLLECTION the component speaks — an `Array<Row>` for a
11
+ * positional surface, a `Dict<String, Row>` for a keyed one (#568). east-ui
12
+ * declares the shape; whoever can actually fetch windows produces a value of
13
+ * it. `Data.bindPaged` in `@elaraai/e3-ui` is the production implementation
14
+ * (dataset windows over an e3 workspace) and {@link Paged.of} is the in-memory
15
+ * one; neither is named here, and **nothing in this file imports e3**.
16
+ *
17
+ * # Why a variant, not a narrow struct
18
+ *
19
+ * East struct subtyping is EXACT — same arity, same field names, same order
20
+ * (`types.ts`'s `isSubtypeImpl`: `if (e1.length !== e2.length) return false`).
21
+ * Variants get width subtyping. So a narrow "source" struct could never be
22
+ * *satisfied* by a wider handle, and there is no `extends` to lean on. The
23
+ * component prop therefore takes a {@link RowSourceType} VARIANT, and the
24
+ * factory wraps whatever it was handed into the right arm at build time
25
+ * ({@link resolveRowSource}) — the same shape `Plan`'s rows channel already
26
+ * uses. What lands in the IR is a tagged union the renderer matches
27
+ * exhaustively, never a shape it has to sniff.
28
+ *
29
+ * @packageDocumentation
30
+ */
31
+ import { type EastType, type ExprType, type SubtypeExprOrValue, ArrayType, BooleanType, DictType, FunctionType, IntegerType, OptionType, StringType, StructType, VariantType } from "@elaraai/east";
32
+ /**
33
+ * Where a key query landed in a source's canonical row order.
34
+ *
35
+ * @remarks
36
+ * The RANGE, not just a row: a prefix query matches a contiguous run, and the
37
+ * search chrome needs `count` for its "k of n" indicator and its prev/next
38
+ * stepping. `found: false` still carries a `row` — the query's insertion point
39
+ * — so a miss can still position the viewport.
40
+ *
41
+ * @property found - Whether any row matched.
42
+ * @property row - First matched row (a miss carries the insertion row).
43
+ * @property count - Number of matched rows (1/0 for an exact key).
44
+ */
45
+ export declare const SeekRangeType: StructType<{
46
+ readonly found: BooleanType;
47
+ readonly row: IntegerType;
48
+ readonly count: IntegerType;
49
+ }>;
50
+ /** Type alias for {@link SeekRangeType}. */
51
+ export type SeekRangeType = typeof SeekRangeType;
52
+ /**
53
+ * A key query, in the one form every key-ordered source understands.
54
+ *
55
+ * @remarks
56
+ * Three shapes, because a key is not always one string: an exact whole-key
57
+ * literal, a String prefix, or — for STRUCT keys — exact leading fields with an
58
+ * optional prefix continuing into the next String field. Every shape addresses
59
+ * ONE CONTIGUOUS RANGE in the canonical key order, which is what makes a hit a
60
+ * `row` + `count` rather than a set of scattered matches.
61
+ *
62
+ * Literals are canonical `.east` text of already-validated values, so the query
63
+ * is plain serializable data at any key type — no type-specific wire format,
64
+ * and the search chrome parses the user's text against the key type it was
65
+ * handed ({@link SeekType.keyType}) before it ever gets here.
66
+ *
67
+ * Deliberately the same three shapes as e3's `DatasetFindQuery`, so a bound
68
+ * source forwards a query rather than translating one.
69
+ *
70
+ * @property key - A whole-key `.east` literal — an exact lookup, any key type.
71
+ * @property prefix - A String prefix (String keys, or a Struct key's first
72
+ * field when it is a String).
73
+ * @property fields - Struct keys: `.east` literals of exact leading fields in
74
+ * declaration order (`values`), optionally continuing into the next String
75
+ * field (`prefix`).
76
+ */
77
+ export declare const SeekQueryType: VariantType<{
78
+ readonly key: StringType;
79
+ readonly prefix: StringType;
80
+ readonly fields: StructType<{
81
+ readonly values: ArrayType<StringType>;
82
+ readonly prefix: OptionType<StringType>;
83
+ }>;
84
+ }>;
85
+ /** Type alias for {@link SeekQueryType}. */
86
+ export type SeekQueryType = typeof SeekQueryType;
87
+ /**
88
+ * The KEY TYPE is deliberately NOT part of this contract.
89
+ *
90
+ * A first design carried it here (`seek: Option<{ keyType: EastTypeType, find }>`)
91
+ * so a component could compose a typed query with no authoring-time knowledge
92
+ * of the dataset's schema. Two things ruled it out:
93
+ *
94
+ * - `EastTypeType` is a `RecursiveType`, and the generic-platform type
95
+ * substituter walks output types structurally — `applyTypeArgs`
96
+ * (`east/src/expr/block.ts`) recurses forever through the marker and blows
97
+ * the stack the moment `Data.bindPaged` instantiates its handle. A recursive
98
+ * type cannot ride a generic platform's output.
99
+ * - It has no consumer. The hosts that mount key search — `<DatasetPreview>`,
100
+ * `<PagedDatasetPreview>` — hold the dataset's `EastTypeValue` already and
101
+ * pass it as a prop; a keyed component's own keys are Strings, whose search
102
+ * input is a plain prefix.
103
+ *
104
+ * So the QUERY is data ({@link SeekQueryType}, `.east` literals as text) and the
105
+ * key type stays with whoever knows the schema. Revisit only with a real
106
+ * component-level consumer, and then as printed type text, not a recursive
107
+ * value.
108
+ */
109
+ /**
110
+ * A WINDOWED view of a row collection — the contract a component consumes when
111
+ * the source is too large to hold whole.
112
+ *
113
+ * @remarks
114
+ * Deliberately read-only: a window is not a value you can diff or stage.
115
+ *
116
+ * Parameterised on the COLLECTION, not on the row: a window of an `Array<R>`
117
+ * dataset is an `Array<R>`, a window of a `Dict<K, V>` dataset is a
118
+ * `Dict<K, V>`, and the Plan's canvas windows are `Dict<String, PlanRow>`
119
+ * (#568). That is what `Data.bindPaged` already produces — it returns
120
+ * `Option<T>` at the dataset's own type — so the contract matches the producer
121
+ * instead of narrowing it to arrays.
122
+ *
123
+ * `page` and `total` follow the in-flight-is-`none` convention: a window still
124
+ * being fetched reads `none` and the call re-fires when it lands, so the reads
125
+ * belong inside a tracked evaluation. An EMPTY window (`some([])`) means the
126
+ * source is exhausted at that offset — a reader that walks offsets terminates
127
+ * on an empty window, never on `none`.
128
+ *
129
+ * @typeParam C - The collection type one window carries.
130
+ * @param c - The collection type value.
131
+ * @returns The concrete `StructType` of a paged source over `c`.
132
+ *
133
+ * @property id - Comparable identity (a dataset path, a fixture name). East
134
+ * compares every function as EQUAL, so a struct of nothing but closures is
135
+ * indistinguishable from any other — without this field a memoized component
136
+ * never re-renders when the source is swapped, and a window cache cannot key
137
+ * itself. Two sources with the same `id` must serve the same rows.
138
+ * @property page - `(offset, limit)` → that window's elements as a value of the
139
+ * collection type; `none` while in flight, an EMPTY collection at exhaustion.
140
+ * @property total - The source's total element count, once known; `none` until then.
141
+ * @property seek - The source's key-search capability ({@link SeekType}) —
142
+ * `none` when the source is not key-ordered (an Array-backed source cannot
143
+ * seek; there is nothing to binary-search).
144
+ */
145
+ export declare const PagedSourceType: <C extends EastType>(c: C) => StructType<{
146
+ readonly id: StringType;
147
+ readonly page: FunctionType<[IntegerType, IntegerType], OptionType<C>>;
148
+ readonly total: FunctionType<[], OptionType<IntegerType>>;
149
+ readonly seek: OptionType<FunctionType<[VariantType<{
150
+ readonly key: StringType;
151
+ readonly prefix: StringType;
152
+ readonly fields: StructType<{
153
+ readonly values: ArrayType<StringType>;
154
+ readonly prefix: OptionType<StringType>;
155
+ }>;
156
+ }>], OptionType<StructType<{
157
+ readonly found: BooleanType;
158
+ readonly row: IntegerType;
159
+ readonly count: IntegerType;
160
+ }>>>>;
161
+ }>;
162
+ /**
163
+ * The TypeScript type of a {@link PagedSourceType} over collection type `C` —
164
+ * what a component's prop takes when it wants a windowed source specifically.
165
+ *
166
+ * @remarks
167
+ * `C` rides STRUCTURALLY, in the `page` signature, so a source bound to one
168
+ * collection type is a compile error against a component expecting another. The
169
+ * identity lives in the East type rather than a phantom brand, so it survives
170
+ * `$.let` / `$.const` and ordinary expression plumbing.
171
+ *
172
+ * @typeParam C - The collection type one window carries.
173
+ */
174
+ export type PagedSource<C extends EastType> = ExprType<ReturnType<typeof PagedSourceType<C>>>;
175
+ /**
176
+ * How a component's rows arrive: inline, or from a windowed source.
177
+ *
178
+ * @remarks
179
+ * Both arms speak the same COLLECTION type — inline is the whole of it, paged
180
+ * is a window of it — so a component that keys its rows (the Plan's
181
+ * `Dict<String, PlanRow>`) and one that positions them (`Array<Row>`) share one
182
+ * vocabulary without either shape leaking into the arm names (#568).
183
+ *
184
+ * @typeParam C - The collection type.
185
+ * @param c - The collection type value.
186
+ * @returns The concrete `VariantType` of a row source over `c`.
187
+ *
188
+ * @property inline - The whole collection, already in hand.
189
+ * @property paged - A {@link PagedSourceType} fetched a window at a time.
190
+ */
191
+ export declare const RowSourceType: <C extends EastType>(c: C) => VariantType<{
192
+ readonly inline: C;
193
+ readonly paged: StructType<{
194
+ readonly id: StringType;
195
+ readonly page: FunctionType<[IntegerType, IntegerType], OptionType<C>>;
196
+ readonly total: FunctionType<[], OptionType<IntegerType>>;
197
+ readonly seek: OptionType<FunctionType<[VariantType<{
198
+ readonly key: StringType;
199
+ readonly prefix: StringType;
200
+ readonly fields: StructType<{
201
+ readonly values: ArrayType<StringType>;
202
+ readonly prefix: OptionType<StringType>;
203
+ }>;
204
+ }>], OptionType<StructType<{
205
+ readonly found: BooleanType;
206
+ readonly row: IntegerType;
207
+ readonly count: IntegerType;
208
+ }>>>>;
209
+ }>;
210
+ }>;
211
+ /**
212
+ * The TypeScript type of a {@link RowSourceType} over collection type `C`.
213
+ *
214
+ * @typeParam C - The collection type.
215
+ */
216
+ export type RowSource<C extends EastType> = ExprType<ReturnType<typeof RowSourceType<C>>>;
217
+ /**
218
+ * The loose TS face a paged source presents at a `rows` / `data` prop —
219
+ * structural only (`page` / `total`, which a concrete source expression
220
+ * exposes and an array expression does not). {@link resolveRowSource}'s
221
+ * `Expr.type` dispatch is the real check.
222
+ */
223
+ export interface PagedSourceLike {
224
+ /** The source's page method (typed precisely on the concrete value). */
225
+ readonly page: unknown;
226
+ /** The source's total method. */
227
+ readonly total: unknown;
228
+ }
229
+ /**
230
+ * What a component's rows prop accepts: an inline collection expression, a
231
+ * paged source, or a whole-value bind handle (anything with a `read`).
232
+ *
233
+ * @typeParam C - The collection type.
234
+ */
235
+ export type RowSourceInput<C extends EastType> = SubtypeExprOrValue<C> | PagedSourceLike;
236
+ /**
237
+ * A resolved rows prop — the arm, the COLLECTION type the source speaks, the
238
+ * element type recovered from it (an `Array`'s value, a `Set`'s key, a
239
+ * `Dict`'s value), and its KEY type when it has one.
240
+ *
241
+ * `keyType` is what a keyed component checks: the Plan requires
242
+ * `Dict<String, R>` because its canvas rows inherit the source's keys, so an
243
+ * unkeyed source is refused rather than silently re-keyed (#568).
244
+ */
245
+ export type ResolvedRowSource = {
246
+ kind: "inline";
247
+ rows: ExprType<EastType>;
248
+ collectionType: EastType;
249
+ elementType: EastType;
250
+ keyType: EastType | undefined;
251
+ } | {
252
+ kind: "paged";
253
+ source: ExprType<StructType>;
254
+ collectionType: EastType;
255
+ elementType: EastType;
256
+ keyType: EastType | undefined;
257
+ };
258
+ /**
259
+ * Classify a component's rows prop at BUILD time — the one dispatch every
260
+ * collection shares, so no component re-sniffs shapes of its own.
261
+ *
262
+ * Accepted shapes, in order:
263
+ * - a collection expression / value (`Array<R>`, `Dict<K, V>`, `Set<R>`) ⇒ `inline`;
264
+ * - a struct carrying `page` + `total` ⇒ `paged` (a {@link PagedSourceType},
265
+ * or anything structurally matching it — `Data.bindPaged`'s handle);
266
+ * - a struct carrying `read` ⇒ a whole-value bind handle, which resolves by
267
+ * CALLING `read()` and recursing. The call becomes part of the surrounding
268
+ * East expression, so it is evaluated inside the component's reactive render
269
+ * and re-fires like any other tracked read — `rows={handle}` and
270
+ * `rows={handle.read()}` build the same IR.
271
+ *
272
+ * @param data - The rows prop as the author passed it
273
+ * @param label - Component name for the error message (`"Plan"`, `"Table"`)
274
+ * @returns The resolved arm — see {@link ResolvedRowSource}
275
+ * @throws Error when the expression is none of the accepted shapes
276
+ */
277
+ export declare function resolveRowSource(data: unknown, label: string): ResolvedRowSource;
278
+ /**
279
+ * Wrap a resolved rows prop into the {@link RowSourceType} arm a component
280
+ * stores, mapping each window through the same `make` the inline arm applies
281
+ * to the whole collection.
282
+ *
283
+ * @remarks
284
+ * `make` is the component's own row-construction pipeline (Table's
285
+ * `rows_mapped`, Plan's `applySeries`). Applying it inside `page` is the single
286
+ * point where the DOMAIN collection is erased to the component's row
287
+ * COLLECTION, so everything downstream — the renderer, the window cache — sees
288
+ * one row space.
289
+ *
290
+ * It is handed the source's COLLECTION, not a flattened element array: a keyed
291
+ * component's rows inherit the source's keys, and flattening at the boundary
292
+ * would throw away exactly what makes a window's rows addressable (#568). A
293
+ * positional component (Table) receives its `Array<Row>`; a keyed one (Plan) a
294
+ * `Dict<String, R>`.
295
+ *
296
+ * @typeParam Out - The component's own row COLLECTION type.
297
+ * @param resolved - The output of {@link resolveRowSource}
298
+ * @param outType - The component's row collection type
299
+ * @param make - The source collection → the component's row collection
300
+ * @param idSuffix - Appended to the paged source's `id` — see below
301
+ * @returns The `RowSourceType(outType)` value to store in the IR
302
+ *
303
+ * @remarks
304
+ * `idSuffix` exists because `make` is part of what the derived source SERVES.
305
+ * {@link PagedSourceType} requires that two sources sharing an `id` serve the
306
+ * same rows, and a component whose `make` changes — a Plan whose series list was
307
+ * narrowed by a pick — now serves different rows from the same underlying
308
+ * handle. Since a window cache keys on `id` alone and resident windows are never
309
+ * re-read, an unsigned id leaves the previous rows on screen forever. A
310
+ * component that can vary its `make` must pass a signature of what varied.
311
+ */
312
+ export declare function buildRowSource<Out extends EastType>(resolved: ResolvedRowSource, outType: Out, make: (collection: ExprType<EastType>) => SubtypeExprOrValue<Out>, idSuffix?: SubtypeExprOrValue<StringType>): RowSource<Out>;
313
+ /** Options for the ARRAY form of {@link Paged.of}. */
314
+ export interface PagedOfOptions<R extends EastType> {
315
+ /**
316
+ * Key accessor. Supplying it declares the rows are SORTED by that key and
317
+ * enables `seek` (prefix-matched, the canonical key order the search
318
+ * chrome expects). Omitted ⇒ `seek` is `none`, exactly as an
319
+ * Array-backed dataset behaves.
320
+ *
321
+ * A keyed collection needs none of this — pass a `Dict` and its own keys
322
+ * are the row order and the search space.
323
+ */
324
+ key?: (row: ExprType<R>) => SubtypeExprOrValue<StringType>;
325
+ }
326
+ /**
327
+ * Build an in-memory {@link PagedSourceType} over a collection already in hand
328
+ * — the paged sibling of passing the array directly.
329
+ *
330
+ * @remarks
331
+ * Every window resolves immediately (`page` never returns `none`), so this is
332
+ * the source to reach for in examples, fixtures and tests: it exercises the
333
+ * whole paged path — windowing, exhaustion on `some([])`, totals, seek — with
334
+ * no server, no platform function and no bind. `@elaraai/e3-ui`'s
335
+ * `Data.bindPaged` is the same contract backed by real dataset windows.
336
+ *
337
+ * Windows follow the collection: an `Array` source serves array windows in
338
+ * stream order, a `Dict` source serves DICT windows in canonical key order —
339
+ * the same shape and the same order a keyed dataset's windows arrive in, which
340
+ * is what a keyed component (the Plan) requires of its source (#568).
341
+ *
342
+ * @typeParam R - The row type (array form) / the value type (dict form).
343
+ * @param id - Comparable identity for this source (see {@link PagedSourceType}).
344
+ * @param collection - The whole collection — an `Array<R>` or a `Dict<String, R>`.
345
+ * @param options - {@link PagedOfOptions} — array form only; supply `key` to enable `seek`.
346
+ * @returns A `PagedSourceType` at the collection it was given.
347
+ *
348
+ * @example
349
+ * ```tsx
350
+ * // A keyed source: the canvas rows inherit these keys, so `seek` addresses
351
+ * // real rows and a window's key range is a canvas key range.
352
+ * const units = $.const(new Map([["UNIT-001", { … }]]), DictType(StringType, UnitRow));
353
+ * const source = $.const(Paged.of("units", units));
354
+ * // A paged canvas declares its window — fitting the axis to a partial
355
+ * // prefix would re-fit it on every landed window (#567 D8).
356
+ * const axis = $.const(Plan.axis({ window: { min: W27, max: W39 }, resolution: "week" }));
357
+ * return <Plan axis={axis} data={source} series={series} style={{ height: "fill" }} />;
358
+ * ```
359
+ */
360
+ declare function createPagedOf<R extends EastType>(id: SubtypeExprOrValue<StringType>, rows: SubtypeExprOrValue<ArrayType<R>>, options?: PagedOfOptions<R>): PagedSource<ArrayType<R>>;
361
+ declare function createPagedOf<V extends EastType>(id: SubtypeExprOrValue<StringType>, entries: SubtypeExprOrValue<DictType<StringType, V>>): PagedSource<DictType<StringType, V>>;
362
+ /**
363
+ * The `Paged` namespace — building a {@link PagedSourceType} without a server.
364
+ *
365
+ * @remarks
366
+ * The contract itself is what components consume; this namespace is the
367
+ * in-memory producer. Production sources come from the platform that owns the
368
+ * data (`Data.bindPaged` in `@elaraai/e3-ui`).
369
+ */
370
+ export declare const Paged: {
371
+ /** Build an in-memory paged source over a collection already in hand. */
372
+ readonly of: typeof createPagedOf;
373
+ /** East types — the contract, for `$.const` / `$.let` annotations. */
374
+ readonly Types: {
375
+ /** A windowed row source over a collection type. */
376
+ readonly Source: <C extends EastType>(c: C) => StructType<{
377
+ readonly id: StringType;
378
+ readonly page: FunctionType<[IntegerType, IntegerType], OptionType<C>>;
379
+ readonly total: FunctionType<[], OptionType<IntegerType>>;
380
+ readonly seek: OptionType<FunctionType<[VariantType<{
381
+ readonly key: StringType;
382
+ readonly prefix: StringType;
383
+ readonly fields: StructType<{
384
+ readonly values: ArrayType<StringType>;
385
+ readonly prefix: OptionType<StringType>;
386
+ }>;
387
+ }>], OptionType<StructType<{
388
+ readonly found: BooleanType;
389
+ readonly row: IntegerType;
390
+ readonly count: IntegerType;
391
+ }>>>>;
392
+ }>;
393
+ /** Where a key query landed in a source's row order. */
394
+ readonly SeekRange: StructType<{
395
+ readonly found: BooleanType;
396
+ readonly row: IntegerType;
397
+ readonly count: IntegerType;
398
+ }>;
399
+ /** A key query — exact literal, String prefix, or leading struct fields. */
400
+ readonly SeekQuery: VariantType<{
401
+ readonly key: StringType;
402
+ readonly prefix: StringType;
403
+ readonly fields: StructType<{
404
+ readonly values: ArrayType<StringType>;
405
+ readonly prefix: OptionType<StringType>;
406
+ }>;
407
+ }>;
408
+ /** How a component's rows arrive (inline / paged), at a collection type. */
409
+ readonly RowSource: <C extends EastType>(c: C) => VariantType<{
410
+ readonly inline: C;
411
+ readonly paged: StructType<{
412
+ readonly id: StringType;
413
+ readonly page: FunctionType<[IntegerType, IntegerType], OptionType<C>>;
414
+ readonly total: FunctionType<[], OptionType<IntegerType>>;
415
+ readonly seek: OptionType<FunctionType<[VariantType<{
416
+ readonly key: StringType;
417
+ readonly prefix: StringType;
418
+ readonly fields: StructType<{
419
+ readonly values: ArrayType<StringType>;
420
+ readonly prefix: OptionType<StringType>;
421
+ }>;
422
+ }>], OptionType<StructType<{
423
+ readonly found: BooleanType;
424
+ readonly row: IntegerType;
425
+ readonly count: IntegerType;
426
+ }>>>>;
427
+ }>;
428
+ }>;
429
+ };
430
+ };
431
+ export {};
432
+ //# sourceMappingURL=source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../src/contracts/source.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAGvB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EAId,MAAM,eAAe,CAAC;AAMvB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa;;;;EAIxB,CAAC;AACH,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,aAAa;;;;;;;EAIxB,CAAC;AACH,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,QAAQ,EAAE,GAAG,CAAC;;;;;;;;;;;;;;;;EAKtD,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,MA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