@elaraai/east-ui 1.0.85 → 1.0.87

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 (561) hide show
  1. package/dist/src/buttons/button/index.d.ts +4 -0
  2. package/dist/src/buttons/button/index.d.ts.map +1 -1
  3. package/dist/src/buttons/button/index.js +8 -1
  4. package/dist/src/buttons/button/index.js.map +1 -1
  5. package/dist/src/buttons/button/types.d.ts +6 -5
  6. package/dist/src/buttons/button/types.d.ts.map +1 -1
  7. package/dist/src/buttons/button/types.js.map +1 -1
  8. package/dist/src/buttons/icon-button/index.d.ts +5 -5
  9. package/dist/src/buttons/icon-button/index.d.ts.map +1 -1
  10. package/dist/src/buttons/icon-button/index.js +8 -2
  11. package/dist/src/buttons/icon-button/index.js.map +1 -1
  12. package/dist/src/buttons/icon-button/types.d.ts +8 -12
  13. package/dist/src/buttons/icon-button/types.d.ts.map +1 -1
  14. package/dist/src/buttons/icon-button/types.js +2 -2
  15. package/dist/src/buttons/icon-button/types.js.map +1 -1
  16. package/dist/src/buttons/toggle/index.d.ts +4 -0
  17. package/dist/src/buttons/toggle/index.d.ts.map +1 -1
  18. package/dist/src/buttons/toggle/index.js +6 -1
  19. package/dist/src/buttons/toggle/index.js.map +1 -1
  20. package/dist/src/buttons/toggle/types.d.ts +3 -2
  21. package/dist/src/buttons/toggle/types.d.ts.map +1 -1
  22. package/dist/src/buttons/toggle/types.js.map +1 -1
  23. package/dist/src/charts/chart/index.d.ts.map +1 -1
  24. package/dist/src/charts/chart/index.js +3 -3
  25. package/dist/src/charts/chart/index.js.map +1 -1
  26. package/dist/src/charts/spec/index.d.ts.map +1 -1
  27. package/dist/src/charts/spec/index.js +5 -2
  28. package/dist/src/charts/spec/index.js.map +1 -1
  29. package/dist/src/collections/deck/index.d.ts.map +1 -1
  30. package/dist/src/collections/deck/index.js +2 -2
  31. package/dist/src/collections/deck/index.js.map +1 -1
  32. package/dist/src/collections/index.d.ts +0 -6
  33. package/dist/src/collections/index.d.ts.map +1 -1
  34. package/dist/src/collections/index.js +0 -6
  35. package/dist/src/collections/index.js.map +1 -1
  36. package/dist/src/collections/library/index.d.ts +1 -1
  37. package/dist/src/collections/library/index.d.ts.map +1 -1
  38. package/dist/src/collections/library/index.js +2 -2
  39. package/dist/src/collections/library/index.js.map +1 -1
  40. package/dist/src/collections/schematic/index.d.ts.map +1 -1
  41. package/dist/src/collections/schematic/index.js +2 -2
  42. package/dist/src/collections/schematic/index.js.map +1 -1
  43. package/dist/src/collections/table/index.d.ts +1 -1
  44. package/dist/src/collections/table/index.d.ts.map +1 -1
  45. package/dist/src/collections/table/index.js +2 -2
  46. package/dist/src/collections/table/index.js.map +1 -1
  47. package/dist/src/collections/tree-view/index.d.ts +11 -32
  48. package/dist/src/collections/tree-view/index.d.ts.map +1 -1
  49. package/dist/src/collections/tree-view/index.js +15 -10
  50. package/dist/src/collections/tree-view/index.js.map +1 -1
  51. package/dist/src/component.d.ts +673 -9344
  52. package/dist/src/component.d.ts.map +1 -1
  53. package/dist/src/component.js +5 -259
  54. package/dist/src/component.js.map +1 -1
  55. package/dist/src/contracts/approval.d.ts +6 -8
  56. package/dist/src/contracts/approval.d.ts.map +1 -1
  57. package/dist/src/contracts/approval.js +6 -8
  58. package/dist/src/contracts/approval.js.map +1 -1
  59. package/dist/src/contracts/drag.d.ts +1 -1
  60. package/dist/src/contracts/drag.d.ts.map +1 -1
  61. package/dist/src/contracts/drag.js +4 -5
  62. package/dist/src/contracts/drag.js.map +1 -1
  63. package/dist/src/contracts/editing.d.ts +19 -19
  64. package/dist/src/contracts/editing.js +14 -14
  65. package/dist/src/contracts/fields.d.ts +471 -0
  66. package/dist/src/contracts/fields.d.ts.map +1 -0
  67. package/dist/src/contracts/fields.js +492 -0
  68. package/dist/src/contracts/fields.js.map +1 -0
  69. package/dist/src/contracts/index.d.ts +1 -0
  70. package/dist/src/contracts/index.d.ts.map +1 -1
  71. package/dist/src/contracts/index.js +1 -0
  72. package/dist/src/contracts/index.js.map +1 -1
  73. package/dist/src/contracts/indexed-source.d.ts +118 -0
  74. package/dist/src/contracts/indexed-source.d.ts.map +1 -0
  75. package/dist/src/contracts/indexed-source.js +89 -0
  76. package/dist/src/contracts/indexed-source.js.map +1 -0
  77. package/dist/src/contracts/pick.d.ts +0 -16
  78. package/dist/src/contracts/pick.d.ts.map +1 -1
  79. package/dist/src/contracts/review.d.ts +4 -6
  80. package/dist/src/contracts/review.d.ts.map +1 -1
  81. package/dist/src/contracts/review.js +4 -6
  82. package/dist/src/contracts/review.js.map +1 -1
  83. package/dist/src/contracts/source.d.ts +2 -2
  84. package/dist/src/contracts/source.d.ts.map +1 -1
  85. package/dist/src/contracts/source.js.map +1 -1
  86. package/dist/src/contracts/states.d.ts +1 -3
  87. package/dist/src/contracts/states.d.ts.map +1 -1
  88. package/dist/src/contracts/states.js +1 -3
  89. package/dist/src/contracts/states.js.map +1 -1
  90. package/dist/src/display/editable-chip/index.d.ts +2 -0
  91. package/dist/src/display/editable-chip/index.d.ts.map +1 -1
  92. package/dist/src/display/editable-chip/index.js +4 -1
  93. package/dist/src/display/editable-chip/index.js.map +1 -1
  94. package/dist/src/display/icon/index.d.ts +14 -31
  95. package/dist/src/display/icon/index.d.ts.map +1 -1
  96. package/dist/src/display/icon/index.js +15 -19
  97. package/dist/src/display/icon/index.js.map +1 -1
  98. package/dist/src/display/icon/solid.d.ts +24 -0
  99. package/dist/src/display/icon/solid.d.ts.map +1 -0
  100. package/dist/src/display/icon/solid.js +39 -0
  101. package/dist/src/display/icon/solid.js.map +1 -0
  102. package/dist/src/display/icon/types.d.ts +14 -38
  103. package/dist/src/display/icon/types.d.ts.map +1 -1
  104. package/dist/src/display/icon/types.js +6 -15
  105. package/dist/src/display/icon/types.js.map +1 -1
  106. package/dist/src/display/metric-chip/index.d.ts +2 -0
  107. package/dist/src/display/metric-chip/index.d.ts.map +1 -1
  108. package/dist/src/display/metric-chip/index.js +4 -1
  109. package/dist/src/display/metric-chip/index.js.map +1 -1
  110. package/dist/src/display/stat/index.d.ts +2 -0
  111. package/dist/src/display/stat/index.d.ts.map +1 -1
  112. package/dist/src/display/stat/index.js +4 -1
  113. package/dist/src/display/stat/index.js.map +1 -1
  114. package/dist/src/display/stat/types.d.ts +3 -5
  115. package/dist/src/display/stat/types.d.ts.map +1 -1
  116. package/dist/src/display/stat/types.js +5 -2
  117. package/dist/src/display/stat/types.js.map +1 -1
  118. package/dist/src/feedback/banner/index.d.ts +5 -3
  119. package/dist/src/feedback/banner/index.d.ts.map +1 -1
  120. package/dist/src/feedback/banner/index.js +4 -1
  121. package/dist/src/feedback/banner/index.js.map +1 -1
  122. package/dist/src/feedback/empty-state/index.d.ts +16 -19
  123. package/dist/src/feedback/empty-state/index.d.ts.map +1 -1
  124. package/dist/src/feedback/empty-state/index.js +17 -10
  125. package/dist/src/feedback/empty-state/index.js.map +1 -1
  126. package/dist/src/feedback/status/index.d.ts +5 -3
  127. package/dist/src/feedback/status/index.d.ts.map +1 -1
  128. package/dist/src/feedback/status/index.js +4 -1
  129. package/dist/src/feedback/status/index.js.map +1 -1
  130. package/dist/src/index.d.ts +5 -6
  131. package/dist/src/index.d.ts.map +1 -1
  132. package/dist/src/index.js +12 -11
  133. package/dist/src/index.js.map +1 -1
  134. package/dist/src/internal.d.ts +23 -16
  135. package/dist/src/internal.d.ts.map +1 -1
  136. package/dist/src/internal.js +29 -13
  137. package/dist/src/internal.js.map +1 -1
  138. package/dist/src/navigation/index.d.ts +0 -2
  139. package/dist/src/navigation/index.d.ts.map +1 -1
  140. package/dist/src/navigation/index.js +0 -2
  141. package/dist/src/navigation/index.js.map +1 -1
  142. package/dist/src/navigation/nav-list/index.d.ts +2 -0
  143. package/dist/src/navigation/nav-list/index.d.ts.map +1 -1
  144. package/dist/src/navigation/nav-list/index.js +4 -1
  145. package/dist/src/navigation/nav-list/index.js.map +1 -1
  146. package/dist/src/navigation/nav-list/types.d.ts +3 -14
  147. package/dist/src/navigation/nav-list/types.d.ts.map +1 -1
  148. package/dist/src/navigation/nav-list/types.js.map +1 -1
  149. package/dist/src/overlays/command-palette/index.d.ts +2 -0
  150. package/dist/src/overlays/command-palette/index.d.ts.map +1 -1
  151. package/dist/src/overlays/command-palette/index.js +5 -0
  152. package/dist/src/overlays/command-palette/index.js.map +1 -1
  153. package/dist/src/overlays/command-palette/types.d.ts +0 -8
  154. package/dist/src/overlays/command-palette/types.d.ts.map +1 -1
  155. package/dist/src/pick/index.d.ts +1 -17
  156. package/dist/src/pick/index.d.ts.map +1 -1
  157. package/dist/src/pick/index.js +1 -1
  158. package/dist/src/platform/slice/index.d.ts +1324 -2039
  159. package/dist/src/platform/slice/index.d.ts.map +1 -1
  160. package/dist/src/platform/slice/index.js +55 -74
  161. package/dist/src/platform/slice/index.js.map +1 -1
  162. package/dist/src/platform/slice/local.d.ts +743 -0
  163. package/dist/src/platform/slice/local.d.ts.map +1 -0
  164. package/dist/src/platform/slice/local.js +133 -0
  165. package/dist/src/platform/slice/local.js.map +1 -0
  166. package/dist/src/platform/slice/record-chrome.d.ts +211 -0
  167. package/dist/src/platform/slice/record-chrome.d.ts.map +1 -0
  168. package/dist/src/platform/slice/record-chrome.js +52 -0
  169. package/dist/src/platform/slice/record-chrome.js.map +1 -0
  170. package/dist/src/platform/slice/record-interval.d.ts +24 -0
  171. package/dist/src/platform/slice/record-interval.d.ts.map +1 -0
  172. package/dist/src/platform/slice/record-interval.js +61 -0
  173. package/dist/src/platform/slice/record-interval.js.map +1 -0
  174. package/dist/src/platform/slice/record-plan.d.ts +54 -0
  175. package/dist/src/platform/slice/record-plan.d.ts.map +1 -0
  176. package/dist/src/platform/slice/record-plan.js +139 -0
  177. package/dist/src/platform/slice/record-plan.js.map +1 -0
  178. package/dist/src/platform/slice/record-types.d.ts +2739 -0
  179. package/dist/src/platform/slice/record-types.d.ts.map +1 -0
  180. package/dist/src/platform/slice/record-types.js +209 -0
  181. package/dist/src/platform/slice/record-types.js.map +1 -0
  182. package/dist/src/platform/slice/record.d.ts +109 -0
  183. package/dist/src/platform/slice/record.d.ts.map +1 -0
  184. package/dist/src/platform/slice/record.js +210 -0
  185. package/dist/src/platform/slice/record.js.map +1 -0
  186. package/dist/src/reactive/match.d.ts +4 -6
  187. package/dist/src/reactive/match.d.ts.map +1 -1
  188. package/dist/src/reactive/match.js +4 -6
  189. package/dist/src/reactive/match.js.map +1 -1
  190. package/dist/src/runtime/collections/deck.d.ts.map +1 -1
  191. package/dist/src/runtime/collections/index.d.ts +0 -6
  192. package/dist/src/runtime/collections/index.d.ts.map +1 -1
  193. package/dist/src/runtime/collections/index.js +0 -6
  194. package/dist/src/runtime/collections/index.js.map +1 -1
  195. package/dist/src/runtime/display/icon.d.ts +6 -5
  196. package/dist/src/runtime/display/icon.d.ts.map +1 -1
  197. package/dist/src/runtime/display/icon.js +6 -5
  198. package/dist/src/runtime/display/icon.js.map +1 -1
  199. package/dist/src/runtime/feedback/empty-state.d.ts +5 -5
  200. package/dist/src/runtime/feedback/empty-state.js +5 -5
  201. package/dist/src/runtime/layout/dock.d.ts +2 -1
  202. package/dist/src/runtime/layout/dock.d.ts.map +1 -1
  203. package/dist/src/runtime/layout/dock.js +2 -1
  204. package/dist/src/runtime/layout/dock.js.map +1 -1
  205. package/dist/src/runtime/navigation/index.d.ts +0 -3
  206. package/dist/src/runtime/navigation/index.d.ts.map +1 -1
  207. package/dist/src/runtime/navigation/index.js +0 -3
  208. package/dist/src/runtime/navigation/index.js.map +1 -1
  209. package/dist/src/runtime/reactive/match.d.ts +2 -3
  210. package/dist/src/runtime/reactive/match.d.ts.map +1 -1
  211. package/dist/src/runtime/reactive/match.js +2 -3
  212. package/dist/src/runtime/reactive/match.js.map +1 -1
  213. package/dist/src/runtime/record-slice-source.d.ts +78 -0
  214. package/dist/src/runtime/record-slice-source.d.ts.map +1 -0
  215. package/dist/src/runtime/record-slice-source.js +201 -0
  216. package/dist/src/runtime/record-slice-source.js.map +1 -0
  217. package/dist/src/runtime/record-slice.d.ts +110 -0
  218. package/dist/src/runtime/record-slice.d.ts.map +1 -0
  219. package/dist/src/runtime/record-slice.js +374 -0
  220. package/dist/src/runtime/record-slice.js.map +1 -0
  221. package/dist/src/runtime/slice.d.ts +11 -13
  222. package/dist/src/runtime/slice.d.ts.map +1 -1
  223. package/dist/src/runtime/slice.js +41 -93
  224. package/dist/src/runtime/slice.js.map +1 -1
  225. package/dist/src/shared/plot-gutter.d.ts +1 -1
  226. package/dist/src/shared/plot-gutter.js +1 -1
  227. package/dist/src/shared/resolve-tag.d.ts +23 -0
  228. package/dist/src/shared/resolve-tag.d.ts.map +1 -0
  229. package/dist/src/shared/resolve-tag.js +26 -0
  230. package/dist/src/shared/resolve-tag.js.map +1 -0
  231. package/dist/src/shared/tree.d.ts +1 -1
  232. package/dist/src/shared/tree.js +1 -1
  233. package/dist/src/slice/breakdown/index.d.ts +1 -1
  234. package/dist/src/slice/breakdown/index.d.ts.map +1 -1
  235. package/dist/src/slice/breakdown/index.js +3 -3
  236. package/dist/src/slice/breakdown/index.js.map +1 -1
  237. package/dist/src/slice/cohort/index.d.ts +4 -5
  238. package/dist/src/slice/cohort/index.d.ts.map +1 -1
  239. package/dist/src/slice/cohort/index.js +6 -7
  240. package/dist/src/slice/cohort/index.js.map +1 -1
  241. package/dist/src/slice/filter/index.d.ts +1 -1
  242. package/dist/src/slice/filter/index.d.ts.map +1 -1
  243. package/dist/src/slice/filter/index.js +3 -3
  244. package/dist/src/slice/filter/index.js.map +1 -1
  245. package/dist/src/slice/index.d.ts +20 -2230
  246. package/dist/src/slice/index.d.ts.map +1 -1
  247. package/dist/src/slice/legend/index.d.ts +2 -2
  248. package/dist/src/slice/legend/index.d.ts.map +1 -1
  249. package/dist/src/slice/legend/index.js +4 -4
  250. package/dist/src/slice/legend/index.js.map +1 -1
  251. package/dist/src/slice/rail/index.d.ts +7 -4
  252. package/dist/src/slice/rail/index.d.ts.map +1 -1
  253. package/dist/src/slice/rail/index.js +10 -5
  254. package/dist/src/slice/rail/index.js.map +1 -1
  255. package/dist/src/slice/range/index.d.ts +1 -1
  256. package/dist/src/slice/range/index.d.ts.map +1 -1
  257. package/dist/src/slice/range/index.js +3 -3
  258. package/dist/src/slice/range/index.js.map +1 -1
  259. package/dist/src/slice/record/index.d.ts +171 -0
  260. package/dist/src/slice/record/index.d.ts.map +1 -0
  261. package/dist/src/slice/record/index.js +10 -0
  262. package/dist/src/slice/record/index.js.map +1 -0
  263. package/dist/src/slice/search/index.d.ts +6 -6
  264. package/dist/src/slice/search/index.d.ts.map +1 -1
  265. package/dist/src/slice/search/index.js +7 -7
  266. package/dist/src/slice/search/index.js.map +1 -1
  267. package/dist/src/slice/summary/index.d.ts +1 -1
  268. package/dist/src/slice/summary/index.d.ts.map +1 -1
  269. package/dist/src/slice/summary/index.js +3 -3
  270. package/dist/src/slice/summary/index.js.map +1 -1
  271. package/dist/src/typography/list/index.d.ts +2 -8
  272. package/dist/src/typography/list/index.d.ts.map +1 -1
  273. package/dist/src/typography/list/index.js +4 -1
  274. package/dist/src/typography/list/index.js.map +1 -1
  275. package/dist/src/typography/list/types.d.ts +0 -8
  276. package/dist/src/typography/list/types.d.ts.map +1 -1
  277. package/dist/test/collections/deck.examples.d.ts.map +1 -1
  278. package/dist/test/collections/deck.examples.js +6 -7
  279. package/dist/test/collections/deck.examples.js.map +1 -1
  280. package/dist/test/collections/index.d.ts +0 -1
  281. package/dist/test/collections/index.d.ts.map +1 -1
  282. package/dist/test/collections/index.js +0 -1
  283. package/dist/test/collections/index.js.map +1 -1
  284. package/dist/test/collections/library.examples.d.ts.map +1 -1
  285. package/dist/test/collections/library.examples.js +6 -7
  286. package/dist/test/collections/library.examples.js.map +1 -1
  287. package/dist/test/collections/schematic.examples.d.ts.map +1 -1
  288. package/dist/test/collections/schematic.examples.js +11 -19
  289. package/dist/test/collections/schematic.examples.js.map +1 -1
  290. package/dist/test/collections/tree-view.examples.js +2 -2
  291. package/dist/test/contracts/editing.examples.d.ts +1 -0
  292. package/dist/test/contracts/editing.examples.d.ts.map +1 -1
  293. package/dist/test/contracts/editing.examples.js +37 -6
  294. package/dist/test/contracts/editing.examples.js.map +1 -1
  295. package/dist/test/contracts/fields.examples.d.ts +7 -0
  296. package/dist/test/contracts/fields.examples.d.ts.map +1 -0
  297. package/dist/test/contracts/fields.examples.js +42 -0
  298. package/dist/test/contracts/fields.examples.js.map +1 -0
  299. package/dist/test/display/avatar.examples.d.ts.map +1 -1
  300. package/dist/test/display/avatar.examples.js +3 -3
  301. package/dist/test/display/avatar.examples.js.map +1 -1
  302. package/dist/test/display/icon.examples.d.ts.map +1 -1
  303. package/dist/test/display/icon.examples.js +12 -11
  304. package/dist/test/display/icon.examples.js.map +1 -1
  305. package/dist/test/feedback/empty-state.examples.js +9 -9
  306. package/dist/test/feedback/empty-state.examples.js.map +1 -1
  307. package/dist/test/layout/dock.examples.d.ts +0 -8
  308. package/dist/test/layout/dock.examples.d.ts.map +1 -1
  309. package/dist/test/layout/dock.examples.js +2 -42
  310. package/dist/test/layout/dock.examples.js.map +1 -1
  311. package/dist/test/layout/snap-grid.examples.d.ts.map +1 -1
  312. package/dist/test/layout/snap-grid.examples.js +18 -28
  313. package/dist/test/layout/snap-grid.examples.js.map +1 -1
  314. package/dist/test/navigation/index.d.ts +0 -2
  315. package/dist/test/navigation/index.d.ts.map +1 -1
  316. package/dist/test/navigation/index.js +0 -2
  317. package/dist/test/navigation/index.js.map +1 -1
  318. package/dist/test/navigation/nav-list.examples.js.map +1 -1
  319. package/dist/test/platform/index.d.ts +1 -0
  320. package/dist/test/platform/index.d.ts.map +1 -1
  321. package/dist/test/platform/index.js +1 -0
  322. package/dist/test/platform/index.js.map +1 -1
  323. package/dist/test/platform/slice-local.examples.d.ts +2 -0
  324. package/dist/test/platform/slice-local.examples.d.ts.map +1 -0
  325. package/dist/test/platform/slice-local.examples.js +31 -0
  326. package/dist/test/platform/slice-local.examples.js.map +1 -0
  327. package/dist/test/platform/slice.examples.js +61 -61
  328. package/dist/test/platform/slice.examples.js.map +1 -1
  329. package/dist/test/slice/slice.examples.d.ts +0 -1
  330. package/dist/test/slice/slice.examples.d.ts.map +1 -1
  331. package/dist/test/slice/slice.examples.js +67 -181
  332. package/dist/test/slice/slice.examples.js.map +1 -1
  333. package/package.json +4 -4
  334. package/dist/src/collections/board/index.d.ts +0 -855
  335. package/dist/src/collections/board/index.d.ts.map +0 -1
  336. package/dist/src/collections/board/index.js +0 -416
  337. package/dist/src/collections/board/index.js.map +0 -1
  338. package/dist/src/collections/board/types.d.ts +0 -111
  339. package/dist/src/collections/board/types.d.ts.map +0 -1
  340. package/dist/src/collections/board/types.js +0 -89
  341. package/dist/src/collections/board/types.js.map +0 -1
  342. package/dist/src/collections/calendar/index.d.ts +0 -446
  343. package/dist/src/collections/calendar/index.d.ts.map +0 -1
  344. package/dist/src/collections/calendar/index.js +0 -287
  345. package/dist/src/collections/calendar/index.js.map +0 -1
  346. package/dist/src/collections/calendar/types.d.ts +0 -338
  347. package/dist/src/collections/calendar/types.d.ts.map +0 -1
  348. package/dist/src/collections/calendar/types.js +0 -206
  349. package/dist/src/collections/calendar/types.js.map +0 -1
  350. package/dist/src/collections/flowchart/index.d.ts +0 -430
  351. package/dist/src/collections/flowchart/index.d.ts.map +0 -1
  352. package/dist/src/collections/flowchart/index.js +0 -292
  353. package/dist/src/collections/flowchart/index.js.map +0 -1
  354. package/dist/src/collections/flowchart/types.d.ts +0 -333
  355. package/dist/src/collections/flowchart/types.d.ts.map +0 -1
  356. package/dist/src/collections/flowchart/types.js +0 -263
  357. package/dist/src/collections/flowchart/types.js.map +0 -1
  358. package/dist/src/collections/plan/assemble.d.ts +0 -2274
  359. package/dist/src/collections/plan/assemble.d.ts.map +0 -1
  360. package/dist/src/collections/plan/assemble.js +0 -210
  361. package/dist/src/collections/plan/assemble.js.map +0 -1
  362. package/dist/src/collections/plan/builders.d.ts +0 -765
  363. package/dist/src/collections/plan/builders.d.ts.map +0 -1
  364. package/dist/src/collections/plan/builders.js +0 -673
  365. package/dist/src/collections/plan/builders.js.map +0 -1
  366. package/dist/src/collections/plan/factories.d.ts +0 -512
  367. package/dist/src/collections/plan/factories.d.ts.map +0 -1
  368. package/dist/src/collections/plan/factories.js +0 -539
  369. package/dist/src/collections/plan/factories.js.map +0 -1
  370. package/dist/src/collections/plan/index.d.ts +0 -324
  371. package/dist/src/collections/plan/index.d.ts.map +0 -1
  372. package/dist/src/collections/plan/index.js +0 -193
  373. package/dist/src/collections/plan/index.js.map +0 -1
  374. package/dist/src/collections/plan/ir.d.ts +0 -2490
  375. package/dist/src/collections/plan/ir.d.ts.map +0 -1
  376. package/dist/src/collections/plan/ir.js +0 -107
  377. package/dist/src/collections/plan/ir.js.map +0 -1
  378. package/dist/src/collections/plan/pick.d.ts +0 -133
  379. package/dist/src/collections/plan/pick.d.ts.map +0 -1
  380. package/dist/src/collections/plan/pick.js +0 -208
  381. package/dist/src/collections/plan/pick.js.map +0 -1
  382. package/dist/src/collections/plan/root.d.ts +0 -297
  383. package/dist/src/collections/plan/root.d.ts.map +0 -1
  384. package/dist/src/collections/plan/root.js +0 -427
  385. package/dist/src/collections/plan/root.js.map +0 -1
  386. package/dist/src/collections/plan/series.d.ts +0 -13887
  387. package/dist/src/collections/plan/series.d.ts.map +0 -1
  388. package/dist/src/collections/plan/series.js +0 -1710
  389. package/dist/src/collections/plan/series.js.map +0 -1
  390. package/dist/src/collections/plan/types.d.ts +0 -12612
  391. package/dist/src/collections/plan/types.d.ts.map +0 -1
  392. package/dist/src/collections/plan/types.js +0 -1345
  393. package/dist/src/collections/plan/types.js.map +0 -1
  394. package/dist/src/collections/roster/index.d.ts +0 -787
  395. package/dist/src/collections/roster/index.d.ts.map +0 -1
  396. package/dist/src/collections/roster/index.js +0 -325
  397. package/dist/src/collections/roster/index.js.map +0 -1
  398. package/dist/src/collections/roster/types.d.ts +0 -97
  399. package/dist/src/collections/roster/types.d.ts.map +0 -1
  400. package/dist/src/collections/roster/types.js +0 -72
  401. package/dist/src/collections/roster/types.js.map +0 -1
  402. package/dist/src/collections/sheet/bridge.d.ts +0 -376
  403. package/dist/src/collections/sheet/bridge.d.ts.map +0 -1
  404. package/dist/src/collections/sheet/bridge.js +0 -773
  405. package/dist/src/collections/sheet/bridge.js.map +0 -1
  406. package/dist/src/collections/sheet/columns.d.ts +0 -410
  407. package/dist/src/collections/sheet/columns.d.ts.map +0 -1
  408. package/dist/src/collections/sheet/columns.js +0 -99
  409. package/dist/src/collections/sheet/columns.js.map +0 -1
  410. package/dist/src/collections/sheet/context-bridge.d.ts +0 -48
  411. package/dist/src/collections/sheet/context-bridge.d.ts.map +0 -1
  412. package/dist/src/collections/sheet/context-bridge.js +0 -216
  413. package/dist/src/collections/sheet/context-bridge.js.map +0 -1
  414. package/dist/src/collections/sheet/draft-bridge.d.ts +0 -37
  415. package/dist/src/collections/sheet/draft-bridge.d.ts.map +0 -1
  416. package/dist/src/collections/sheet/draft-bridge.js +0 -153
  417. package/dist/src/collections/sheet/draft-bridge.js.map +0 -1
  418. package/dist/src/collections/sheet/drafts.d.ts +0 -14
  419. package/dist/src/collections/sheet/drafts.d.ts.map +0 -1
  420. package/dist/src/collections/sheet/drafts.js +0 -14
  421. package/dist/src/collections/sheet/drafts.js.map +0 -1
  422. package/dist/src/collections/sheet/editing-bridge.d.ts +0 -36
  423. package/dist/src/collections/sheet/editing-bridge.d.ts.map +0 -1
  424. package/dist/src/collections/sheet/editing-bridge.js +0 -196
  425. package/dist/src/collections/sheet/editing-bridge.js.map +0 -1
  426. package/dist/src/collections/sheet/editing-types.d.ts +0 -268
  427. package/dist/src/collections/sheet/editing-types.d.ts.map +0 -1
  428. package/dist/src/collections/sheet/editing-types.js +0 -34
  429. package/dist/src/collections/sheet/editing-types.js.map +0 -1
  430. package/dist/src/collections/sheet/edits.d.ts +0 -37
  431. package/dist/src/collections/sheet/edits.d.ts.map +0 -1
  432. package/dist/src/collections/sheet/edits.js +0 -31
  433. package/dist/src/collections/sheet/edits.js.map +0 -1
  434. package/dist/src/collections/sheet/group.d.ts +0 -165
  435. package/dist/src/collections/sheet/group.d.ts.map +0 -1
  436. package/dist/src/collections/sheet/group.js +0 -52
  437. package/dist/src/collections/sheet/group.js.map +0 -1
  438. package/dist/src/collections/sheet/index.d.ts +0 -351
  439. package/dist/src/collections/sheet/index.d.ts.map +0 -1
  440. package/dist/src/collections/sheet/index.js +0 -208
  441. package/dist/src/collections/sheet/index.js.map +0 -1
  442. package/dist/src/collections/sheet/link.d.ts +0 -398
  443. package/dist/src/collections/sheet/link.d.ts.map +0 -1
  444. package/dist/src/collections/sheet/link.js +0 -228
  445. package/dist/src/collections/sheet/link.js.map +0 -1
  446. package/dist/src/collections/sheet/registers.d.ts +0 -278
  447. package/dist/src/collections/sheet/registers.d.ts.map +0 -1
  448. package/dist/src/collections/sheet/registers.js +0 -268
  449. package/dist/src/collections/sheet/registers.js.map +0 -1
  450. package/dist/src/collections/sheet/root.d.ts +0 -328
  451. package/dist/src/collections/sheet/root.d.ts.map +0 -1
  452. package/dist/src/collections/sheet/root.js +0 -432
  453. package/dist/src/collections/sheet/root.js.map +0 -1
  454. package/dist/src/collections/sheet/seed-bridge.d.ts +0 -14
  455. package/dist/src/collections/sheet/seed-bridge.d.ts.map +0 -1
  456. package/dist/src/collections/sheet/seed-bridge.js +0 -51
  457. package/dist/src/collections/sheet/seed-bridge.js.map +0 -1
  458. package/dist/src/collections/sheet/sub-rows.d.ts +0 -249
  459. package/dist/src/collections/sheet/sub-rows.d.ts.map +0 -1
  460. package/dist/src/collections/sheet/sub-rows.js +0 -222
  461. package/dist/src/collections/sheet/sub-rows.js.map +0 -1
  462. package/dist/src/collections/sheet/transactions.d.ts +0 -76
  463. package/dist/src/collections/sheet/transactions.d.ts.map +0 -1
  464. package/dist/src/collections/sheet/transactions.js +0 -40
  465. package/dist/src/collections/sheet/transactions.js.map +0 -1
  466. package/dist/src/collections/sheet/types.d.ts +0 -14992
  467. package/dist/src/collections/sheet/types.d.ts.map +0 -1
  468. package/dist/src/collections/sheet/types.js +0 -1061
  469. package/dist/src/collections/sheet/types.js.map +0 -1
  470. package/dist/src/navigation/app/index.d.ts +0 -150
  471. package/dist/src/navigation/app/index.d.ts.map +0 -1
  472. package/dist/src/navigation/app/index.js +0 -191
  473. package/dist/src/navigation/app/index.js.map +0 -1
  474. package/dist/src/navigation/pages/index.d.ts +0 -165
  475. package/dist/src/navigation/pages/index.d.ts.map +0 -1
  476. package/dist/src/navigation/pages/index.js +0 -152
  477. package/dist/src/navigation/pages/index.js.map +0 -1
  478. package/dist/src/navigation/pages/types.d.ts +0 -111
  479. package/dist/src/navigation/pages/types.d.ts.map +0 -1
  480. package/dist/src/navigation/pages/types.js +0 -101
  481. package/dist/src/navigation/pages/types.js.map +0 -1
  482. package/dist/src/runtime/collections/board.d.ts +0 -73
  483. package/dist/src/runtime/collections/board.d.ts.map +0 -1
  484. package/dist/src/runtime/collections/board.js +0 -68
  485. package/dist/src/runtime/collections/board.js.map +0 -1
  486. package/dist/src/runtime/collections/calendar.d.ts +0 -54
  487. package/dist/src/runtime/collections/calendar.d.ts.map +0 -1
  488. package/dist/src/runtime/collections/calendar.js +0 -54
  489. package/dist/src/runtime/collections/calendar.js.map +0 -1
  490. package/dist/src/runtime/collections/flowchart.d.ts +0 -58
  491. package/dist/src/runtime/collections/flowchart.d.ts.map +0 -1
  492. package/dist/src/runtime/collections/flowchart.js +0 -54
  493. package/dist/src/runtime/collections/flowchart.js.map +0 -1
  494. package/dist/src/runtime/collections/plan.d.ts +0 -181
  495. package/dist/src/runtime/collections/plan.d.ts.map +0 -1
  496. package/dist/src/runtime/collections/plan.js +0 -186
  497. package/dist/src/runtime/collections/plan.js.map +0 -1
  498. package/dist/src/runtime/collections/roster.d.ts +0 -60
  499. package/dist/src/runtime/collections/roster.d.ts.map +0 -1
  500. package/dist/src/runtime/collections/roster.js +0 -59
  501. package/dist/src/runtime/collections/roster.js.map +0 -1
  502. package/dist/src/runtime/collections/sheet.d.ts +0 -122
  503. package/dist/src/runtime/collections/sheet.d.ts.map +0 -1
  504. package/dist/src/runtime/collections/sheet.js +0 -73
  505. package/dist/src/runtime/collections/sheet.js.map +0 -1
  506. package/dist/src/runtime/navigation/app.d.ts +0 -52
  507. package/dist/src/runtime/navigation/app.d.ts.map +0 -1
  508. package/dist/src/runtime/navigation/app.js +0 -53
  509. package/dist/src/runtime/navigation/app.js.map +0 -1
  510. package/dist/src/runtime/navigation/pages.d.ts +0 -50
  511. package/dist/src/runtime/navigation/pages.d.ts.map +0 -1
  512. package/dist/src/runtime/navigation/pages.js +0 -52
  513. package/dist/src/runtime/navigation/pages.js.map +0 -1
  514. package/dist/src/runtime/navigation/route.d.ts +0 -46
  515. package/dist/src/runtime/navigation/route.d.ts.map +0 -1
  516. package/dist/src/runtime/navigation/route.js +0 -47
  517. package/dist/src/runtime/navigation/route.js.map +0 -1
  518. package/dist/test/collections/board.examples.d.ts +0 -18
  519. package/dist/test/collections/board.examples.d.ts.map +0 -1
  520. package/dist/test/collections/board.examples.js +0 -297
  521. package/dist/test/collections/board.examples.js.map +0 -1
  522. package/dist/test/collections/calendar.examples.d.ts +0 -5
  523. package/dist/test/collections/calendar.examples.d.ts.map +0 -1
  524. package/dist/test/collections/calendar.examples.js +0 -147
  525. package/dist/test/collections/calendar.examples.js.map +0 -1
  526. package/dist/test/collections/flowchart.examples.d.ts +0 -17
  527. package/dist/test/collections/flowchart.examples.d.ts.map +0 -1
  528. package/dist/test/collections/flowchart.examples.js +0 -243
  529. package/dist/test/collections/flowchart.examples.js.map +0 -1
  530. package/dist/test/collections/plan.examples.d.ts +0 -200
  531. package/dist/test/collections/plan.examples.d.ts.map +0 -1
  532. package/dist/test/collections/plan.examples.js +0 -3665
  533. package/dist/test/collections/plan.examples.js.map +0 -1
  534. package/dist/test/collections/roster.examples.d.ts +0 -26
  535. package/dist/test/collections/roster.examples.d.ts.map +0 -1
  536. package/dist/test/collections/roster.examples.js +0 -237
  537. package/dist/test/collections/roster.examples.js.map +0 -1
  538. package/dist/test/collections/sheet-link.examples.d.ts +0 -7
  539. package/dist/test/collections/sheet-link.examples.d.ts.map +0 -1
  540. package/dist/test/collections/sheet-link.examples.js +0 -41
  541. package/dist/test/collections/sheet-link.examples.js.map +0 -1
  542. package/dist/test/collections/sheet-transactions.examples.d.ts +0 -7
  543. package/dist/test/collections/sheet-transactions.examples.d.ts.map +0 -1
  544. package/dist/test/collections/sheet-transactions.examples.js +0 -58
  545. package/dist/test/collections/sheet-transactions.examples.js.map +0 -1
  546. package/dist/test/collections/sheet.examples.d.ts +0 -96
  547. package/dist/test/collections/sheet.examples.d.ts.map +0 -1
  548. package/dist/test/collections/sheet.examples.js +0 -1040
  549. package/dist/test/collections/sheet.examples.js.map +0 -1
  550. package/dist/test/navigation/app.examples.d.ts +0 -22
  551. package/dist/test/navigation/app.examples.d.ts.map +0 -1
  552. package/dist/test/navigation/app.examples.js +0 -136
  553. package/dist/test/navigation/app.examples.js.map +0 -1
  554. package/dist/test/navigation/pages.examples.d.ts +0 -13
  555. package/dist/test/navigation/pages.examples.d.ts.map +0 -1
  556. package/dist/test/navigation/pages.examples.js +0 -113
  557. package/dist/test/navigation/pages.examples.js.map +0 -1
  558. package/dist/test/navigation/route.examples.d.ts +0 -13
  559. package/dist/test/navigation/route.examples.d.ts.map +0 -1
  560. package/dist/test/navigation/route.examples.js +0 -69
  561. package/dist/test/navigation/route.examples.js.map +0 -1
@@ -1,1061 +0,0 @@
1
- /**
2
- * Copyright (c) 2025 Elara AI Pty Ltd
3
- * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
- */
5
- /**
6
- * `Sheet` IR — the UIComponent-free types of the planning spreadsheet
7
- * (`libs/east-ui/docs/proposals/Sheet Spec.md` §4).
8
- *
9
- * A sheet's rows are the host's structs, projected by the factory into a
10
- * CLOSED wire row — an id, an `owned` flag and one cell per declared column
11
- * — through the columns' reified accessors (the Table `valueFn` move, the
12
- * Plan `derive` move). The host's row type `R` and the driver's row type `D`
13
- * never appear here: everything the author writes over them is bridged by
14
- * the factory into the closed context / cell / edit types below (§4.8), so
15
- * the `Sheet` arm of `UIComponentType` references {@link SheetRootType}
16
- * directly, like `Calendar` and `Blend`.
17
- *
18
- * This file holds only plain data and closed function types — no
19
- * `UIComponentType` — so `component.ts` imports it without a cycle. The
20
- * author-facing TYPED constructors (`Sheet.Types.Context(R, D)`, `Fill(T)`,
21
- * `Patch(R)`, `Proposal(R)`, `CheckContext(R)`) live here too:
22
- * they are type-level twins of the wire types, instantiated per row type
23
- * (the `Plan.Types.Series(R)` pattern).
24
- *
25
- * @packageDocumentation
26
- */
27
- import { ArrayType, AsyncFunctionType, BooleanType, BlobType, DateTimeType, DictType, EastTypeType, FloatType, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, VariantType, } from "@elaraai/east";
28
- import { SheetDraftTypeFor } from "./transactions.js";
29
- import { SheetDraftGroupTypeFor } from "./drafts.js";
30
- import { SheetEditingType } from "./editing-types.js";
31
- import { StatusValueType } from "../../feedback/status/types.js";
32
- import { TickFormatType } from "../../format/types.js";
33
- import { DensityType } from "../../style/interaction.js";
34
- import { RowSourceType } from "../../contracts/source.js";
35
- import { SliceChromeType, SliceStateType } from "../../platform/slice/index.js";
36
- // ============================================================================
37
- // Links — members, the typed link value, the cell
38
- // ============================================================================
39
- /**
40
- * One member of a link half — what the link grammar resolves a token to
41
- * (B§4.1).
42
- *
43
- * @remarks
44
- * A member is never a bare string the host has to re-parse: a code that
45
- * resolved against the register is `identified`, a `M2140-45` span is a
46
- * `range` the register expands, a `4 × CNC lathe` count is `counted`, `TBC` is
47
- * the dashed `placeholder`, and anything the grammar did not recognise is
48
- * kept verbatim as `text` — typed entry is never blocked.
49
- *
50
- * @property identified - A register code (`"M2140"`)
51
- * @property range - A span of codes, `from` to `to` (`"M2140-45"`, the upper bound completed)
52
- * @property counted - A count of a countable member (`{ n: 4, key: "CNC lathe" }`)
53
- * @property placeholder - The `TBC` placeholder
54
- * @property text - Free text the grammar kept as typed
55
- */
56
- export const SheetMemberType = VariantType({
57
- identified: StructType({ key: StringType }),
58
- range: StructType({ from: StringType, to: StringType }),
59
- counted: StructType({ n: IntegerType, key: StringType }),
60
- placeholder: NullType,
61
- text: StringType,
62
- });
63
- /**
64
- * The typed link value — a directed hyperedge between two sets of members
65
- * (B§4).
66
- *
67
- * @remarks
68
- * A destination-only link is `from: []`; a source-only link is `to: []`, so
69
- * the single-set data of B§4.2 needs no migration. The renderer's grammar is
70
- * the kind's parse / print pair (`Sheet.link.parse` / `Sheet.link.print`).
71
- *
72
- * @property from - The source members
73
- * @property to - The destination members
74
- */
75
- export const SheetLinkType = StructType({
76
- from: ArrayType(SheetMemberType),
77
- to: ArrayType(SheetMemberType),
78
- });
79
- /**
80
- * One cell of the wire row — the Table's literal cell (#206) plus the
81
- * typed link.
82
- *
83
- * @remarks
84
- * `Null` is the blank cell. A scalar column's cell is the field's value at
85
- * the column kind's primitive; a `set` / `link` column's cell is a
86
- * {@link SheetLinkType} value, never a string.
87
- *
88
- * @property Invalid - Unparseable draft text, retained verbatim until corrected
89
- * @property Null - The blank cell
90
- * @property Boolean - A boolean value
91
- * @property Integer - An integer value
92
- * @property Float - A float value (a `quantity` column's cell)
93
- * @property String - A string value (text · lookup · reference · enum · stamped)
94
- * @property DateTime - A UTC-midnight date (a `date` column's cell)
95
- * @property Link - A typed link (a `set` / `link` column's cell)
96
- */
97
- export const SheetCellType = VariantType({
98
- Invalid: StringType,
99
- Null: NullType,
100
- Boolean: BooleanType,
101
- Integer: IntegerType,
102
- Float: FloatType,
103
- String: StringType,
104
- DateTime: DateTimeType,
105
- Link: SheetLinkType,
106
- });
107
- /**
108
- * One labelled fact of a sub row's detail (#844).
109
- *
110
- * @property label - What the fact is (the renderer sets it in capitals)
111
- * @property value - The fact, printed
112
- */
113
- export const SheetFacetType = StructType({
114
- label: StringType,
115
- value: StringType,
116
- });
117
- /**
118
- * One SUB ROW on the wire (#844) — a read-only row under a line (or a flat
119
- * row) that shares none of the sheet's columns: a lead (`code` and `name`),
120
- * a detail (`chips`, then `facets`) and an `id` pinned right.
121
- *
122
- * @remarks
123
- * `code` and `id` are display strings, `""` for none (the band's `sub`
124
- * precedent). Build one with `Sheet.subRow({ … })`; declare where they come
125
- * from with `Sheet.subRows(R, { … })`.
126
- *
127
- * @property code - The lead's code (`"ASM"`, or a word for what the row is); `""` for none
128
- * @property name - The lead's words
129
- * @property chips - The detail's parameter chips, first
130
- * @property facets - The detail's labelled facts, after the chips
131
- * @property id - The record the sub row traces to; `""` for none
132
- */
133
- export const SheetSubRowType = StructType({
134
- code: StringType,
135
- name: StringType,
136
- chips: ArrayType(StringType),
137
- facets: ArrayType(SheetFacetType),
138
- id: StringType,
139
- });
140
- /**
141
- * One LINE of a group row on the wire (#740) — its cells, addressed within
142
- * its group by `key`.
143
- *
144
- * @remarks
145
- * A line has no id of its own: its `key` is its index in the group's lines
146
- * array, printed. The line's cells are the line columns' projection, exactly
147
- * a flat row's `cells`.
148
- *
149
- * @property key - The line's address within its group
150
- * @property cells - Column key → cell, one entry per declared line column
151
- * @property subRows - The line's sub rows, in declaration order (#844; empty without `subRows`)
152
- */
153
- export const SheetLineType = StructType({
154
- key: StringType,
155
- cells: DictType(StringType, SheetCellType),
156
- subRows: ArrayType(SheetSubRowType),
157
- });
158
- /**
159
- * The band a group row draws above its lines (#740) — what the band shows
160
- * beside its cells.
161
- *
162
- * @property sub - The eyebrow under the title (display only; `""` for none)
163
- * @property folded - Whether the plan opens folded
164
- */
165
- export const SheetBandType = StructType({
166
- sub: StringType,
167
- folded: BooleanType,
168
- });
169
- /** The cell key a group row's title rides under (#740) — never a line column's key. */
170
- export const SHEET_TITLE_CELL = "$title";
171
- /**
172
- * The key of an UNRENDERED cell a column's rule projects into (#844) — a
173
- * date column's `level` / `actual`, a column's `detail`. The `$` prefix keeps
174
- * it clear of every field name, as {@link SHEET_TITLE_CELL} is.
175
- *
176
- * @param rule - The rule (`"level"`, `"actual"`, `"detail"`)
177
- * @param column - The column key
178
- * @returns The cell key (`"$level:start"`)
179
- */
180
- export function sheetRuleCell(rule, column) {
181
- return `$${rule}:${column}`;
182
- }
183
- /**
184
- * One wire row — the closed projection of a host row.
185
- *
186
- * @remarks
187
- * `cells` carries one entry per DECLARED column, always present (a blank
188
- * cell is `Null`); a field of the host's row with no column never crosses
189
- * the wire — the bridge (§4.8) reads it off the real row instead. Blank
190
- * padding rows are renderer state, never rows.
191
- *
192
- * On a GROUPED sheet (#740) a group row's `cells` hold the band's cells (the
193
- * group's fields under line columns, the title under
194
- * {@link SHEET_TITLE_CELL}), `lines` its lines and `band` is `some`. On a
195
- * flat sheet `lines` is empty and `band` is `none` — and so on a grouped
196
- * sheet with LOOSE rows between its groups (#846): a loose row is a row of
197
- * the line type, its `cells` the line columns' projection, with no lines
198
- * and no band.
199
- *
200
- * @property id - The row identity (the `id` field, or a keyed source's key)
201
- * @property owned - `true` ⇒ the row belongs to the upstream system: no copilot, stamped columns read-only
202
- * @property cells - Column key → cell, one entry per declared column
203
- * @property lines - A group row's lines, in order (empty on a flat sheet, and for a loose row)
204
- * @property band - A group row's band (`none` on a flat sheet, and for a loose row)
205
- * @property subRows - A flat or loose row's sub rows (#844; empty for a group row, whose lines carry them)
206
- */
207
- export const SheetRowType = StructType({
208
- id: StringType,
209
- owned: BooleanType,
210
- cells: DictType(StringType, SheetCellType),
211
- lines: ArrayType(SheetLineType),
212
- band: OptionType(SheetBandType),
213
- subRows: ArrayType(SheetSubRowType),
214
- });
215
- /**
216
- * The sheet's own row COLLECTION — wire rows in sheet order.
217
- *
218
- * @remarks
219
- * The Sheet is POSITIONAL like the Table: the planner's order is the source's
220
- * order, so the collection is an `Array` (a `Dict` inline is refused at
221
- * build time — a sorted map would sit rows in key order).
222
- */
223
- export const SheetRowsCollectionType = ArrayType(SheetRowType);
224
- /**
225
- * How a sheet's rows arrive — inline, or a window at a time — the shared
226
- * row-source contract (#567 / #576) at the sheet's row collection.
227
- */
228
- export const SheetRowsType = RowSourceType(SheetRowsCollectionType);
229
- // ============================================================================
230
- // Registers and the driver
231
- // ============================================================================
232
- /**
233
- * One register member — the grammar's vocabulary, and nothing else.
234
- *
235
- * @remarks
236
- * There is no attribute bag: what a declaration needs from a driver row
237
- * (`uom`, `sides`) is read by an accessor at build time and stored per driver
238
- * key on the column that needs it ({@link SheetColumnKindType}); what a
239
- * provider needs (`ctx.driver`) is the typed row, looked up by the bridge.
240
- *
241
- * @property key - What the grammar resolves (`"M2140"`, `"Line 2"`, `"CNC lathe"`)
242
- * @property label - What a chip prints
243
- * @property kind - The member kind (`"machine"` · `"line"` · `"family"` · `"activity"` · …)
244
- * @property aliases - Alternative spellings the grammar also resolves (`"the 2 line"`)
245
- * @property meta - Chip meta, shown when a half holds one chip (`"CNC lathe"`, `"line · 96"`)
246
- * @property parent - A member's parent key — countable → identified resolution and "enumerate"
247
- * @property tone - An `enum` member's valence dot
248
- */
249
- export const SheetRegisterMemberType = StructType({
250
- key: StringType,
251
- label: StringType,
252
- kind: StringType,
253
- aliases: ArrayType(StringType),
254
- meta: OptionType(StringType),
255
- parent: OptionType(StringType),
256
- tone: OptionType(StatusValueType),
257
- });
258
- /**
259
- * One register — a list of members a column resolves against.
260
- *
261
- * @property members - The members, in declaration order
262
- */
263
- export const SheetRegisterType = StructType({
264
- members: ArrayType(SheetRegisterMemberType),
265
- });
266
- /**
267
- * The driver — the `lookup` column whose member decides what the row does
268
- * (B§1), with its members.
269
- *
270
- * @property column - The driver column's key
271
- * @property members - The driver's register members
272
- */
273
- export const SheetDriverType = StructType({
274
- column: StringType,
275
- members: ArrayType(SheetRegisterMemberType),
276
- });
277
- // ============================================================================
278
- // Link-column vocabulary — halves, sides, locks, counted members
279
- // ============================================================================
280
- /**
281
- * One half of a link.
282
- *
283
- * @property from - The source half
284
- * @property to - The destination half
285
- */
286
- export const SheetHalfType = VariantType({ from: NullType, to: NullType });
287
- /**
288
- * Which halves of a link column a driver member makes live (B§4.2) —
289
- * `Sheet.Types.Sides`, the type a driver row's `sides` field carries.
290
- *
291
- * @property both - Both halves live
292
- * @property from - Only the source half
293
- * @property to - Only the destination half
294
- * @property in - In place: the minus glyph, neither half moves anything
295
- */
296
- export const SheetSidesValueType = VariantType({ both: NullType, from: NullType, to: NullType, in: NullType });
297
- /**
298
- * How a `String`-backed link column writes its commit back (B§4.2).
299
- *
300
- * @property asTyped - The planner's text, verbatim
301
- * @property canonical - Rewritten to register labels (evaluated by the renderer)
302
- */
303
- export const SheetStoreType = VariantType({ asTyped: NullType, canonical: NullType });
304
- /**
305
- * One member kind a link column accepts, and how (B§4.1).
306
- *
307
- * @property kind - The register member kind (`"machine"`, `"line"`, `"family"`, `"range"`)
308
- * @property identified - The kind resolves by code (bare digits try the code prefix)
309
- * @property countable - The kind takes the counted form (`N x kind`)
310
- * @property resolvesTo - What a counted member of this kind resolves to later (`"machine"`)
311
- * @property ranged - Runs of consecutive identified codes are offered and printed as one range (`M2140-45`, #844)
312
- */
313
- export const SheetMemberKindType = StructType({
314
- kind: StringType,
315
- identified: BooleanType,
316
- countable: BooleanType,
317
- resolvesTo: OptionType(StringType),
318
- ranged: BooleanType,
319
- });
320
- /**
321
- * The counted-member grammar a link column declares (B§4.1).
322
- *
323
- * @property forms - The accepted forms (`"N x kind"`, `"kind x N"`)
324
- * @property ops - The multiplication tokens (`"x"`, `"X"`, `"*"`, `"×"`)
325
- * @property appliesTo - Which member kinds may be counted (`"countable"`)
326
- */
327
- export const SheetMultipleType = StructType({
328
- forms: ArrayType(StringType),
329
- ops: ArrayType(StringType),
330
- appliesTo: StringType,
331
- });
332
- /**
333
- * One lock rule — the tag a half shows when the driver's sides value makes
334
- * it read-only (B§4.2).
335
- *
336
- * @property half - The locked half
337
- * @property when - The driver's sides value that locks it
338
- * @property label - The lock tag text (`"external"`, `"in place"`)
339
- */
340
- export const SheetSideLockType = StructType({
341
- half: SheetHalfType,
342
- when: SheetSidesValueType,
343
- label: StringType,
344
- });
345
- /**
346
- * A link column's sides declaration — the driver's `sides` accessor APPLIED
347
- * over the driver data, plus the lock rules.
348
- *
349
- * @remarks
350
- * The accessor itself never reaches the wire: the builder reifies it against
351
- * the driver's row type and the root evaluates it once per driver member, so
352
- * the renderer looks a row's sides up by its driver key.
353
- *
354
- * @property byDriver - Driver member key → the sides value
355
- * @property locks - The lock rules
356
- */
357
- export const SheetSidesType = StructType({
358
- byDriver: DictType(StringType, SheetSidesValueType),
359
- locks: ArrayType(SheetSideLockType),
360
- });
361
- /**
362
- * A count of a countable member — the `n × CNC lathe` form (B§4.5) —
363
- * `Sheet.Types.Counted`, what an arity rule proposes.
364
- *
365
- * @property n - The count
366
- * @property key - The countable member's key
367
- */
368
- export const SheetCountedType = StructType({ n: IntegerType, key: StringType });
369
- // ============================================================================
370
- // The copilot — the WIRE context, fills, proposals, providers
371
- // ============================================================================
372
- /**
373
- * The WIRE copilot context — what the renderer hands a bridged provider.
374
- *
375
- * @remarks
376
- * The bridge (§4.8) rebuilds the author's typed context from it: `row` is
377
- * decoded over the REAL source row (`rowById(rowId, offset)`), every entry of
378
- * `rows` over its own (`rowsOffset + index`), and `driver` through the
379
- * driver lookup — so a field of the host's row that has no column keeps its
380
- * value in every provider, check, edit event and patch.
381
- *
382
- * @property drafts - Row id → its current draft, encoded
383
- * @property rowIndex - The row's index in `rows` (a grouped sheet: a line's index within its group)
384
- * @property rowId - The row's id — the source lookup's argument (a grouped sheet: a line's GROUP's id, a loose row's own)
385
- * @property offset - The row's source offset — the paged arm's `page` lookup
386
- * @property line - A grouped sheet: the line's address within its group; `none` on a flat sheet, and for a loose row (#846)
387
- * @property row - The row as it would be if the open editor committed (a grouped sheet: the LINE's cells)
388
- * @property rows - The resident sheet, real rows in sheet order (a grouped sheet: the resident GROUP rows and loose rows)
389
- * @property rowsOffset - The source offset of `rows[0]` (`0` on the inline arm)
390
- * @property partial - `true` on a paged sheet whose source is not exhausted
391
- * @property driver - The resolved driver member's key
392
- * @property today - UTC midnight — so providers stay pure
393
- */
394
- export const SheetContextType = StructType({
395
- drafts: DictType(StringType, BlobType),
396
- rowIndex: IntegerType,
397
- rowId: StringType,
398
- offset: IntegerType,
399
- line: OptionType(StringType),
400
- row: DictType(StringType, SheetCellType),
401
- rows: ArrayType(SheetRowType),
402
- rowsOffset: IntegerType,
403
- partial: BooleanType,
404
- driver: OptionType(StringType),
405
- today: DateTimeType,
406
- });
407
- /**
408
- * One row check of a readiness batch ({@link SheetReadyBatchType}, #882) —
409
- * where its row sits among the batch's rows, and its driver.
410
- * @internal
411
- *
412
- * @property index - The checked row's index in the batch's `rows` (a grouped sheet: a line's GROUP's)
413
- * @property line - A grouped sheet: the checked line's index within its group; `none` on a flat sheet, and for a loose row (#846)
414
- * @property driver - The resolved driver member's key
415
- */
416
- export const SheetReadyCheckType = StructType({
417
- index: IntegerType,
418
- line: OptionType(IntegerType),
419
- driver: OptionType(StringType),
420
- });
421
- /**
422
- * The WIRE readiness batch (#882) — every row check of one readiness
423
- * evaluation, over the rows they share.
424
- * @internal
425
- *
426
- * @remarks
427
- * The shared fields cross the wire once, and the bridge builds the typed
428
- * rows from them once. A check carries only its place and its driver: its
429
- * row is the draft the bridge built at that place — the row's own cells over
430
- * its own draft — so nothing is substituted into the rows, as a
431
- * {@link SheetContextType}'s provisional row is.
432
- *
433
- * @property drafts - Row id → its current draft, encoded
434
- * @property rows - The rows, in sheet order (a grouped sheet: the GROUP rows)
435
- * @property rowsOffset - The source offset of `rows[0]`
436
- * @property partial - `true` on a paged sheet whose source is not exhausted
437
- * @property today - UTC midnight — so checks stay pure
438
- * @property checks - The checks; their results return in this order
439
- */
440
- export const SheetReadyBatchType = StructType({
441
- drafts: DictType(StringType, BlobType),
442
- rows: ArrayType(SheetRowType),
443
- rowsOffset: IntegerType,
444
- partial: BooleanType,
445
- today: DateTimeType,
446
- checks: ArrayType(SheetReadyCheckType),
447
- });
448
- /**
449
- * The WIRE fill — one proposed cell value with its provenance (B§5.1).
450
- *
451
- * @property value - The proposed cell
452
- * @property meta - The provenance line the strip prints
453
- */
454
- export const SheetFillType = StructType({ value: SheetCellType, meta: StringType });
455
- /**
456
- * The WIRE proposal — one proposed row as the cells a patch set, with its
457
- * provenance (B§5.2).
458
- *
459
- * @property cells - The set fields, encoded; a field the patch left `none` is absent
460
- * @property meta - The provenance line
461
- */
462
- export const SheetProposalType = StructType({ cells: DictType(StringType, SheetCellType), meta: StringType });
463
- /**
464
- * One fill provider on the wire — synchronous, or asynchronous (a model
465
- * call). The factory picks the arm from the author's function value's East
466
- * type and bridges it (§4.8).
467
- *
468
- * @property sync - Runs inline within the kind's latency
469
- * @property async - The strip shows a pending chip; the result lands reactively, latest wins
470
- */
471
- export const SheetProviderType = VariantType({
472
- sync: FunctionType([SheetContextType], OptionType(SheetFillType)),
473
- async: AsyncFunctionType([SheetContextType], OptionType(SheetFillType)),
474
- });
475
- /**
476
- * One row proposer on the wire — synchronous, or asynchronous.
477
- *
478
- * @property sync - Runs inline
479
- * @property async - Pending chip; latest wins
480
- */
481
- export const SheetProposerType = VariantType({
482
- sync: FunctionType([SheetContextType], ArrayType(SheetProposalType)),
483
- async: AsyncFunctionType([SheetContextType], ArrayType(SheetProposalType)),
484
- });
485
- /**
486
- * The copilot's row-proposal declaration (B§5.2).
487
- *
488
- * @property ahead - At most this many proposed rows below the anchor
489
- * @property triggers - Column keys whose commit re-asks the proposers
490
- * @property ghost - Draw proposed rows as hatched ghosts (the default)
491
- * @property propose - The proposers, first that returns rows wins
492
- */
493
- export const SheetSuggestType = StructType({
494
- ahead: IntegerType,
495
- triggers: ArrayType(StringType),
496
- ghost: BooleanType,
497
- propose: ArrayType(SheetProposerType),
498
- });
499
- // ============================================================================
500
- // Checks and arity — the WIRE check context
501
- // ============================================================================
502
- /**
503
- * The WIRE check context — what a bridged member check receives (B§2).
504
- *
505
- * @property drafts - Row id → its current draft, encoded
506
- * @property group - A grouped sheet: the line's GROUP row; `none` on a flat sheet, and for a loose row (#846)
507
- * @property rowIndex - Sheet position among real rows (a grouped sheet: a line's index within its group, a loose row's among the loose rows)
508
- * @property rowId - The row's id (the source lookup's argument; a grouped sheet: a line's GROUP's id, a loose row's own)
509
- * @property offset - The row's source offset
510
- * @property line - A grouped sheet: the line's address within its group; `none` on a flat sheet, and for a loose row (#846)
511
- * @property row - The row as it would be if the editor committed (a grouped sheet: the LINE's cells)
512
- * @property half - The half being edited
513
- * @property member - The resolved member under check
514
- */
515
- export const SheetCheckContextType = StructType({
516
- drafts: DictType(StringType, BlobType),
517
- group: OptionType(SheetRowType),
518
- rowIndex: IntegerType,
519
- rowId: StringType,
520
- offset: IntegerType,
521
- line: OptionType(StringType),
522
- row: DictType(StringType, SheetCellType),
523
- half: SheetHalfType,
524
- member: SheetMemberType,
525
- });
526
- /**
527
- * One member check on a link column.
528
- *
529
- * @property exists - The grammar's own: the member must resolve in the register
530
- * @property custom - An author rule — `some(message)` flags the member, `none` passes
531
- */
532
- export const SheetCheckType = VariantType({
533
- exists: NullType,
534
- custom: FunctionType([SheetCheckContextType], OptionType(StringType)),
535
- });
536
- /**
537
- * A link column's arity rule — how many members a half should hold, and
538
- * which countable member to propose when none are named (B§4.6).
539
- *
540
- * @property half - The half the rule counts
541
- * @property implied - The bridged rule over the wire context
542
- */
543
- export const SheetArityType = StructType({
544
- half: SheetHalfType,
545
- implied: FunctionType([SheetContextType], OptionType(SheetCountedType)),
546
- });
547
- // ============================================================================
548
- // Column kinds
549
- // ============================================================================
550
- /**
551
- * How deep a date column reads and takes a row's date (#844) —
552
- * `Sheet.Types.DateLevel`, what a date column's `level` rule returns.
553
- *
554
- * @remarks
555
- * The cell is still one UTC instant; the level says how it is printed,
556
- * typed and compared with an `actual`.
557
- *
558
- * @property week - The week the date falls in (printed as its Monday)
559
- * @property day - The day
560
- * @property range - One end of the days the work may run in
561
- * @property time - The day and the time of day
562
- */
563
- export const SheetDateLevelType = VariantType({ week: NullType, day: NullType, range: NullType, time: NullType });
564
- /**
565
- * A column's OPTIONS rule on the wire (#844) — the register member keys a
566
- * row may be offered; `none` offers the whole register.
567
- */
568
- export const SheetOptionsRuleType = FunctionType([SheetContextType], OptionType(ArrayType(StringType)));
569
- /**
570
- * The column kind — what a column parses, displays and proposes (§3.2).
571
- *
572
- * @remarks
573
- * Every function stored here takes the CLOSED context / cell types; the
574
- * author's typed functions are bridged into them by the factory. The
575
- * accessors that read the driver's row (`uom`, `sides.value`) are not stored
576
- * at all — the builder reifies them against the driver's row type, the root
577
- * applies them over the driver data, and they land as dictionaries keyed by
578
- * the driver member's key.
579
- *
580
- * A date's `level` and `actual` and an `options` rule (#844) ride here too:
581
- * `level` / `actual` name the unrendered cell ({@link sheetRuleCell}) the
582
- * row projection filled, `options` is the bridged rule over the wire
583
- * context — the renderer offers only those members, while typed text still
584
- * resolves against the whole register.
585
- *
586
- * @property text - Free text
587
- * @property date - A UTC-midnight date; `base` names the column relative entry counts from, `format` a display pattern, `level` the cell holding the row's {@link SheetDateLevelType} tag, `actual` the cell holding when the work really happened
588
- * @property quantity - A float with a unit per driver member (`uom`) and a display format
589
- * @property integer - A whole number
590
- * @property lookup - A scored register lookup — the driver column names the driver's register; `options` narrows what a row is offered
591
- * @property reference - A lookup over a flat member list
592
- * @property enum - An upper-cased register word with a valence dot; `options` narrows what a row is offered
593
- * @property set - Comma members, the link grammar without an arrow
594
- * @property link - `from > to` — the split cell (§3.4); `options` narrows what a row is offered
595
- * @property stamped - A read-only code an upstream system owns
596
- * @property custom - An author parse / print pair over the field's own payload
597
- */
598
- export const SheetColumnKindType = VariantType({
599
- text: NullType,
600
- date: StructType({
601
- base: OptionType(StringType),
602
- format: OptionType(StringType),
603
- level: OptionType(StringType),
604
- actual: OptionType(StringType),
605
- }),
606
- quantity: StructType({ uom: OptionType(DictType(StringType, StringType)), format: OptionType(TickFormatType) }),
607
- integer: NullType,
608
- lookup: StructType({ register: StringType, options: OptionType(SheetOptionsRuleType) }),
609
- reference: StructType({ register: StringType }),
610
- enum: StructType({ register: StringType, options: OptionType(SheetOptionsRuleType) }),
611
- set: StructType({
612
- register: StringType,
613
- members: ArrayType(SheetMemberKindType),
614
- multiple: OptionType(SheetMultipleType),
615
- store: SheetStoreType,
616
- }),
617
- link: StructType({
618
- register: StringType,
619
- members: ArrayType(SheetMemberKindType),
620
- multiple: OptionType(SheetMultipleType),
621
- sides: OptionType(SheetSidesType),
622
- arity: OptionType(SheetArityType),
623
- check: ArrayType(SheetCheckType),
624
- store: SheetStoreType,
625
- options: OptionType(SheetOptionsRuleType),
626
- }),
627
- stamped: StructType({ owner: OptionType(StringType) }),
628
- custom: StructType({
629
- accepts: StringType,
630
- parse: FunctionType([StringType, SheetContextType], OptionType(SheetCellType)),
631
- print: FunctionType([SheetCellType], StringType),
632
- }),
633
- });
634
- /**
635
- * One declared column.
636
- *
637
- * @remarks
638
- * `dataType` is the row field's static type and `payloadType` the kind's
639
- * payload (a custom kind's primitive), both as type values, so the renderer
640
- * parses and prints without the host types (the Table `dataType` / `valueType`
641
- * precedent). `editable` is `false` for a stamped column, a `value`-projected
642
- * column, or by option.
643
- *
644
- * @property key - The column key — the row field it sits on
645
- * @property header - The header line
646
- * @property sub - The grey second header line
647
- * @property width - CSS width
648
- * @property kind - The column kind
649
- * @property dataType - The row field's static type
650
- * @property payloadType - The kind's payload type
651
- * @property editable - Whether the sheet writes the column
652
- * @property fill - The fill providers; the first that yields wins
653
- * @property detailCell - The unrendered cell whose text is the column's detail — the hover and the strip (#844)
654
- */
655
- export const SheetColumnType = StructType({
656
- key: StringType,
657
- header: StringType,
658
- sub: OptionType(StringType),
659
- width: OptionType(StringType),
660
- kind: SheetColumnKindType,
661
- dataType: EastTypeType,
662
- payloadType: EastTypeType,
663
- editable: BooleanType,
664
- fill: ArrayType(SheetProviderType),
665
- detailCell: OptionType(StringType),
666
- });
667
- // ============================================================================
668
- // Grouped rows (#740) — the band's cells and the group declaration
669
- // ============================================================================
670
- /**
671
- * One cell of a group row's band (#740) — a group field drawn under a line
672
- * column (or the title), exactly a column declared over the group's row.
673
- *
674
- * @property key - The cell key: a line column's key, or {@link SHEET_TITLE_CELL}
675
- * @property field - The group row's field the cell reads and writes
676
- * @property kind - The cell's kind (the §3.2 table; no `lookup`, `set`, `link` or `custom` in a band)
677
- * @property dataType - The group field's static type
678
- * @property payloadType - The kind's payload type
679
- * @property editable - Whether the band writes the field
680
- */
681
- export const SheetGroupCellType = StructType({
682
- key: StringType,
683
- field: StringType,
684
- kind: SheetColumnKindType,
685
- dataType: EastTypeType,
686
- payloadType: EastTypeType,
687
- editable: BooleanType,
688
- });
689
- /**
690
- * The host's word for a group (#844) — what fold-all, the footer count, hints
691
- * and the new-group button call a group. When the declaration names none the
692
- * wire carries none, and the renderer says its own word — its message
693
- * table's, so a translation reaches it (#861).
694
- *
695
- * @property singular - One group (`"order"`)
696
- * @property plural - Several (`"orders"`)
697
- */
698
- export const SheetNounType = StructType({
699
- singular: StringType,
700
- plural: StringType,
701
- });
702
- /**
703
- * The group declaration (#740) — how a grouped sheet's rows carry their
704
- * lines, and what the band draws.
705
- *
706
- * @property lines - The group row's field that holds the lines — an `Array<L>`, so a line's key is its position
707
- * @property cells - The band's cells, the title first under {@link SHEET_TITLE_CELL}
708
- * @property noun - The host's word for a group (#844); `none` ⇒ the renderer's own (#861)
709
- * @property loose - `true` ⇒ the source's entries are `Sheet.Types.Entry(P, "lines")`: a group, or a LOOSE row of the line type between the groups (#846) — a wire row with no band
710
- */
711
- export const SheetGroupType = StructType({
712
- lines: StringType,
713
- cells: ArrayType(SheetGroupCellType),
714
- noun: OptionType(SheetNounType),
715
- loose: BooleanType,
716
- });
717
- // ============================================================================
718
- // Views, edits, selection, footer, style
719
- // ============================================================================
720
- /**
721
- * One saved view — a slice-state snapshot plus the lens's context and reveals
722
- * (B§8), evaluated live.
723
- *
724
- * @property id - Stable identity
725
- * @property name - The tab name
726
- * @property narrowing - The slice state the view was made with
727
- * @property context - The lens's band width (`0` · `1` · `3`)
728
- * @property reveals - Revealed row indices
729
- * @property folds - A grouped sheet's fold overrides (#740): group id → folded; a group not listed opens as its `folded` accessor says
730
- */
731
- export const SheetViewType = StructType({
732
- id: StringType,
733
- name: StringType,
734
- narrowing: SliceStateType,
735
- context: IntegerType,
736
- reveals: ArrayType(IntegerType),
737
- folds: DictType(StringType, BooleanType),
738
- });
739
- /**
740
- * Where an edit came from — provenance a host can measure copilot uptake by (B§1).
741
- *
742
- * @property typed - The planner typed it
743
- * @property pasted - A paste
744
- * @property fill - A copilot fill was taken
745
- * @property row - A row fill (⌘⏎)
746
- * @property pattern - A proposed row was taken
747
- */
748
- export const SheetSourceType = VariantType({
749
- typed: NullType,
750
- pasted: NullType,
751
- fill: NullType,
752
- row: NullType,
753
- pattern: NullType,
754
- });
755
- /**
756
- * The WIRE edit event — a raw commit / insert / remove carrying the wire row
757
- * inside a renderer gesture. These records never call an author callback;
758
- * the editing session emits one complete PatchEvent after the gesture.
759
- * @internal
760
- *
761
- * On a grouped sheet (#740) the three row arms are the GROUP's — a band
762
- * cell committed, a group created, groups removed — and the line arms carry
763
- * a line's address within its group; `row` is always the whole group row.
764
- *
765
- * @property commit - One cell committed: the row AFTER the commit, and its source offset
766
- * @property insert - A row appended after `afterRowId` (`none` ⇒ at the end)
767
- * @property remove - Rows removed by id
768
- * @property lineCommit - A line's cell committed: the GROUP row after the commit, the line's key, the column
769
- * @property lineInsert - A line inserted into a group after `after` (`none` ⇒ first), at `line`
770
- * @property lineRemove - Lines removed from a group, by key
771
- */
772
- export const SheetEditType = VariantType({
773
- commit: StructType({ rowId: StringType, offset: IntegerType, key: StringType, row: SheetRowType, source: SheetSourceType }),
774
- insert: StructType({ afterRowId: OptionType(StringType), row: SheetRowType, source: SheetSourceType }),
775
- remove: StructType({ rowIds: ArrayType(StringType) }),
776
- lineCommit: StructType({ rowId: StringType, offset: IntegerType, line: StringType, key: StringType, row: SheetRowType, source: SheetSourceType }),
777
- lineInsert: StructType({ rowId: StringType, offset: IntegerType, after: OptionType(StringType), line: StringType, row: SheetRowType, source: SheetSourceType }),
778
- lineRemove: StructType({ rowId: StringType, offset: IntegerType, lines: ArrayType(StringType), row: SheetRowType }),
779
- });
780
- /**
781
- * The selection ring's position — `Sheet.Types.Selection`.
782
- *
783
- * @property rowId - The selected row (`none` ⇒ a blank padding row or nothing); a grouped sheet: the GROUP's id
784
- * @property line - A grouped sheet: the selected line's key within its group (`none` on the band, a blank line, or a flat sheet)
785
- * @property key - The selected column (a band: the line column the cell sits under, or `$title`)
786
- */
787
- export const SheetSelectionType = StructType({
788
- rowId: OptionType(StringType),
789
- line: OptionType(StringType),
790
- key: OptionType(StringType),
791
- });
792
- /**
793
- * One footer item (B§9).
794
- *
795
- * @property text - The footer text
796
- * @property tone - Optional status tint
797
- */
798
- export const SheetFooterItemType = StructType({
799
- text: StringType,
800
- tone: OptionType(StatusValueType),
801
- });
802
- /**
803
- * The Sheet style — uniform sizing (#320) and the gutter width.
804
- *
805
- * @property height - Definite height (`"fill"` fills the parent); the rows scroll within
806
- * @property maxHeight - Max-height cap; content-sized up to it, then scrolls
807
- * @property gutterWidth - The row-number gutter width, a CSS px size
808
- */
809
- export const SheetStyleType = StructType({
810
- height: OptionType(StringType),
811
- maxHeight: OptionType(StringType),
812
- gutterWidth: OptionType(StringType),
813
- });
814
- // ============================================================================
815
- // Root
816
- // ============================================================================
817
- /**
818
- * The Sheet root IR — the whole planning spreadsheet, a CLOSED struct the
819
- * `Sheet` arm of `UIComponentType` references directly.
820
- *
821
- * @remarks
822
- * `editing` carries the exact schemas and checked batch callbacks. The
823
- * live onUpdate adapter writes once per application. `selection` present
824
- * makes the selection controlled (§3.14).
825
- *
826
- * @property rows - The row source: inline wire rows, or a paged source of them
827
- * @property columns - The declared columns, in order
828
- * @property registers - Register name → register
829
- * @property driver - The driver column and its members
830
- * @property suggest - The row-proposal declaration
831
- * @property slice - The slice chrome (search / filter / cohort); the lens reads the bound state
832
- * @property views - The saved views
833
- * @property activeView - The active view's id
834
- * @property onViewsChange - Views changed (snapshot, rename, reorder, close)
835
- * @property onSelect - The ring moved
836
- * @property selection - Controlled selection when `some`
837
- * @property newRowId - Overrides the renderer's id minting for inserted rows
838
- * @property group - The group declaration (#740); `none` on a flat sheet
839
- * @property readOnly - The whole sheet is read-only
840
- * @property blanks - Padding rows below the last real one (default 18)
841
- * @property density - Row rhythm
842
- * @property footer - Footer items
843
- * @property style - Sizing and the gutter width
844
- */
845
- export const SheetRootType = StructType({
846
- rows: SheetRowsType,
847
- editing: SheetEditingType,
848
- columns: ArrayType(SheetColumnType),
849
- registers: DictType(StringType, SheetRegisterType),
850
- driver: OptionType(SheetDriverType),
851
- suggest: OptionType(SheetSuggestType),
852
- slice: OptionType(SliceChromeType),
853
- views: ArrayType(SheetViewType),
854
- activeView: OptionType(StringType),
855
- onViewsChange: OptionType(FunctionType([ArrayType(SheetViewType)], NullType)),
856
- onSelect: OptionType(FunctionType([SheetSelectionType], NullType)),
857
- selection: OptionType(SheetSelectionType),
858
- newRowId: OptionType(FunctionType([], StringType)),
859
- group: OptionType(SheetGroupType),
860
- readOnly: OptionType(BooleanType),
861
- blanks: OptionType(IntegerType),
862
- density: OptionType(DensityType),
863
- footer: ArrayType(SheetFooterItemType),
864
- style: OptionType(SheetStyleType),
865
- });
866
- // ============================================================================
867
- // The TYPED constructors — the author's side (the `Plan.Types.Series(R)` pattern)
868
- // ============================================================================
869
- /**
870
- * `Sheet.Types.Context(R, D)` — the copilot context as the author sees it:
871
- * the host's row, the resident rows and the driver's row, all typed.
872
- *
873
- * @remarks
874
- * A constructor rather than a generic wire type, so the row type lives
875
- * structurally in a provider's signature: a provider written for one sheet
876
- * is a compile error on another. Omit `D` on a sheet without a driver —
877
- * `driver` is then `Option<Null>`, always `none`.
878
- *
879
- * @typeParam R - The host's row type
880
- * @typeParam D - The driver's row type
881
- * @param rowType - The row type value
882
- * @param driverType - The driver's row type value (default `NullType`)
883
- * @returns The concrete context `StructType`
884
- *
885
- * @property rowIndex - Sheet position among REAL (resident) rows
886
- * @property row - The row as it would be if the open editor committed — the host's struct
887
- * @property rows - The resident sheet, real rows in sheet order
888
- * @property partial - `true` on a paged sheet whose source is not exhausted
889
- * @property driver - The driver's row for `row` — typed, no attribute bag
890
- * @property today - UTC midnight — so providers stay pure
891
- */
892
- export function SheetContextTypeFor(rowType, driverType) {
893
- return StructType({
894
- rowIndex: IntegerType,
895
- row: SheetDraftTypeFor(rowType),
896
- rows: ArrayType(SheetDraftTypeFor(rowType)),
897
- group: OptionType(NullType),
898
- partial: BooleanType,
899
- driver: OptionType((driverType ?? NullType)),
900
- today: DateTimeType,
901
- });
902
- }
903
- /**
904
- * `Sheet.Types.Fill(T)` — one proposed value of a column's payload with its
905
- * provenance, as a provider returns it.
906
- *
907
- * @typeParam T - The column kind's payload type (§3.2)
908
- * @param payloadType - The payload type value
909
- * @returns The concrete fill `StructType`
910
- *
911
- * @property value - The proposed value
912
- * @property meta - The provenance line the strip prints
913
- */
914
- export function SheetFillTypeFor(payloadType) {
915
- return StructType({ value: payloadType, meta: StringType });
916
- }
917
- /**
918
- * `Sheet.Types.Patch(R)` — a row patch: every field of `R` as an `Option`,
919
- * `none` meaning "left blank".
920
- *
921
- * @remarks
922
- * Built with `Sheet.patch(R, { … })`, which takes the literal-record form of
923
- * `R`'s fields and fills the omitted ones with `none`. The runner encodes the
924
- * set fields that have editable columns; a set field with no column, a
925
- * stamped column or a `value`-projected column is ignored.
926
- *
927
- * @typeParam R - The host's row type
928
- * @param rowType - The row type value
929
- * @returns The concrete patch `StructType`
930
- */
931
- export function SheetPatchTypeFor(rowType) {
932
- const fields = {};
933
- for (const [name, type] of Object.entries(rowType.fields)) {
934
- fields[name] = OptionType(type);
935
- }
936
- return StructType(fields);
937
- }
938
- /**
939
- * `Sheet.Types.Proposal(R)` — one proposed row: a patch plus its provenance.
940
- *
941
- * @typeParam R - The host's row type
942
- * @param rowType - The row type value
943
- * @returns The concrete proposal `StructType`
944
- *
945
- * @property patch - The fields the proposal sets (`Sheet.patch(R, …)`)
946
- * @property meta - The provenance line
947
- */
948
- export function SheetProposalTypeFor(rowType) {
949
- return StructType({ patch: SheetPatchTypeFor(rowType), meta: StringType });
950
- }
951
- /**
952
- * `Sheet.Types.CheckContext(R)` — what an author's member check sees (§3.4):
953
- * the typed row, the half and the resolved member.
954
- *
955
- * @typeParam R - The host's row type
956
- * @param rowType - The row type value
957
- * @returns The concrete check-context `StructType`
958
- *
959
- * @property rowIndex - Sheet position among real rows
960
- * @property row - The row as it would be if the editor committed
961
- * @property half - The half being edited
962
- * @property member - The resolved member under check
963
- */
964
- export function SheetCheckContextTypeFor(rowType) {
965
- return StructType({
966
- rowIndex: IntegerType,
967
- row: SheetDraftTypeFor(rowType),
968
- group: OptionType(NullType),
969
- half: SheetHalfType,
970
- member: SheetMemberType,
971
- });
972
- }
973
- /**
974
- * The line type a group row's lines field holds, checked at build time.
975
- *
976
- * @param groupType - The group's row type value
977
- * @param field - The lines field
978
- * @returns The line type
979
- * @throws Error naming the field when it is not an `Array<Struct>`
980
- */
981
- export function sheetLinesOf(groupType, field) {
982
- const fields = groupType.fields;
983
- const t = fields[field];
984
- if (t === undefined) {
985
- throw new Error(`Sheet: \`group\` names "${field}", which is not a field of the row type (${Object.keys(fields).join(", ")})`);
986
- }
987
- if (t.type === "Array" && t.value?.type === "Struct") {
988
- return { lineType: t.value };
989
- }
990
- throw new Error(`Sheet: the lines field "${field}" must be an Array of row structs — got ${t.type ?? "an unknown type"}`);
991
- }
992
- /**
993
- * `Sheet.Types.Context(P, "lines", D)` — the copilot context of a GROUPED
994
- * sheet: the line as it would be, its group's lines, the group, the resident
995
- * groups and the driver's row, all typed.
996
- *
997
- * @typeParam P - The group's row type
998
- * @typeParam F - The lines field
999
- * @typeParam D - The driver's row type
1000
- * @param groupType - The group's row type value
1001
- * @param lines - The lines field
1002
- * @param driverType - The driver's row type value (default `NullType`)
1003
- * @returns The concrete context `StructType`
1004
- *
1005
- * On a sheet with loose rows between its groups (#846), a LOOSE row's
1006
- * context has no group: `rows` are the resident loose rows, `rowIndex` its
1007
- * index among them.
1008
- *
1009
- * @property rowIndex - The line's index WITHIN its group (a loose row: its index in `rows`)
1010
- * @property row - The line as it would be if the open editor committed
1011
- * @property rows - The group's lines, in order (a loose row: the resident loose rows)
1012
- * @property group - The group row (`none` for a loose row)
1013
- * @property groups - The resident groups, in sheet order
1014
- * @property partial - `true` on a paged sheet whose source is not exhausted
1015
- * @property driver - The driver's row for `row`
1016
- * @property today - UTC midnight
1017
- */
1018
- export function SheetGroupContextTypeFor(groupType, lines, driverType) {
1019
- const { lineType } = sheetLinesOf(groupType, lines);
1020
- return StructType({
1021
- rowIndex: IntegerType,
1022
- row: SheetDraftTypeFor(lineType),
1023
- rows: ArrayType(SheetDraftTypeFor(lineType)),
1024
- group: OptionType(SheetDraftGroupTypeFor(groupType, lines)),
1025
- groups: ArrayType(SheetDraftGroupTypeFor(groupType, lines)),
1026
- partial: BooleanType,
1027
- driver: OptionType((driverType ?? NullType)),
1028
- today: DateTimeType,
1029
- });
1030
- }
1031
- /**
1032
- * `Sheet.Types.CheckContext(P, "lines")` — what an author's member check
1033
- * sees on a GROUPED sheet: the typed line, its group, the half and the member.
1034
- *
1035
- * @typeParam P - The group's row type
1036
- * @typeParam F - The lines field
1037
- * @param groupType - The group's row type value
1038
- * @param lines - The lines field
1039
- * @returns The concrete check-context `StructType`
1040
- */
1041
- export function SheetGroupCheckContextTypeFor(groupType, lines) {
1042
- const { lineType } = sheetLinesOf(groupType, lines);
1043
- return StructType({
1044
- rowIndex: IntegerType,
1045
- row: SheetDraftTypeFor(lineType),
1046
- group: OptionType(SheetDraftGroupTypeFor(groupType, lines)),
1047
- half: SheetHalfType,
1048
- member: SheetMemberType,
1049
- });
1050
- }
1051
- export function sheetContextType(first, second, third) {
1052
- if (typeof second === "string")
1053
- return SheetGroupContextTypeFor(first, second, third);
1054
- return SheetContextTypeFor(first, second);
1055
- }
1056
- export function sheetCheckContextType(first, second) {
1057
- if (typeof second === "string")
1058
- return SheetGroupCheckContextTypeFor(first, second);
1059
- return SheetCheckContextTypeFor(first);
1060
- }
1061
- //# sourceMappingURL=types.js.map