@elaraai/e3-ui 1.0.86 → 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 (385) hide show
  1. package/dist/src/bind/data-indexed.d.ts +159 -0
  2. package/dist/src/bind/data-indexed.d.ts.map +1 -0
  3. package/dist/src/bind/data-indexed.js +105 -0
  4. package/dist/src/bind/data-indexed.js.map +1 -0
  5. package/dist/src/bind/data.d.ts +5 -3
  6. package/dist/src/bind/data.d.ts.map +1 -1
  7. package/dist/src/bind/data.js +6 -0
  8. package/dist/src/bind/data.js.map +1 -1
  9. package/dist/src/bind/record.d.ts +34 -23
  10. package/dist/src/bind/record.d.ts.map +1 -1
  11. package/dist/src/bind/record.js +46 -19
  12. package/dist/src/bind/record.js.map +1 -1
  13. package/dist/src/calendar/index.d.ts +2923 -0
  14. package/dist/src/calendar/index.d.ts.map +1 -0
  15. package/dist/src/calendar/index.js +135 -0
  16. package/dist/src/calendar/index.js.map +1 -0
  17. package/dist/src/decision/queue.d.ts +3 -3
  18. package/dist/src/decision/queue.d.ts.map +1 -1
  19. package/dist/src/decision/queue.js +2 -2
  20. package/dist/src/decision/queue.js.map +1 -1
  21. package/dist/src/decision/types.d.ts +4 -0
  22. package/dist/src/decision/types.d.ts.map +1 -1
  23. package/dist/src/decision/types.js +4 -0
  24. package/dist/src/decision/types.js.map +1 -1
  25. package/dist/src/flowchart/canvas.d.ts +114 -0
  26. package/dist/src/flowchart/canvas.d.ts.map +1 -0
  27. package/dist/src/flowchart/canvas.js +84 -0
  28. package/dist/src/flowchart/canvas.js.map +1 -0
  29. package/dist/src/flowchart/flowchart.d.ts +79 -0
  30. package/dist/src/flowchart/flowchart.d.ts.map +1 -0
  31. package/dist/src/flowchart/flowchart.js +9 -0
  32. package/dist/src/flowchart/flowchart.js.map +1 -0
  33. package/dist/src/flowchart/index.d.ts +305 -0
  34. package/dist/src/flowchart/index.d.ts.map +1 -0
  35. package/dist/src/flowchart/index.js +267 -0
  36. package/dist/src/flowchart/index.js.map +1 -0
  37. package/dist/src/flowchart/library.d.ts +720 -0
  38. package/dist/src/flowchart/library.d.ts.map +1 -0
  39. package/dist/src/flowchart/library.js +611 -0
  40. package/dist/src/flowchart/library.js.map +1 -0
  41. package/dist/src/flowchart/over.d.ts +234 -0
  42. package/dist/src/flowchart/over.d.ts.map +1 -0
  43. package/dist/src/flowchart/over.js +220 -0
  44. package/dist/src/flowchart/over.js.map +1 -0
  45. package/dist/src/flowchart/patch.d.ts +64 -0
  46. package/dist/src/flowchart/patch.d.ts.map +1 -0
  47. package/dist/src/flowchart/patch.js +67 -0
  48. package/dist/src/flowchart/patch.js.map +1 -0
  49. package/dist/src/flowchart/payload.d.ts +8220 -0
  50. package/dist/src/flowchart/payload.d.ts.map +1 -0
  51. package/dist/src/flowchart/payload.js +521 -0
  52. package/dist/src/flowchart/payload.js.map +1 -0
  53. package/dist/src/flowchart/types.d.ts +393 -0
  54. package/dist/src/flowchart/types.d.ts.map +1 -0
  55. package/dist/src/flowchart/types.js +216 -0
  56. package/dist/src/flowchart/types.js.map +1 -0
  57. package/dist/src/flowchart/values.d.ts +267 -0
  58. package/dist/src/flowchart/values.d.ts.map +1 -0
  59. package/dist/src/flowchart/values.js +216 -0
  60. package/dist/src/flowchart/values.js.map +1 -0
  61. package/dist/src/flowchart/window.d.ts +521 -0
  62. package/dist/src/flowchart/window.d.ts.map +1 -0
  63. package/dist/src/flowchart/window.js +69 -0
  64. package/dist/src/flowchart/window.js.map +1 -0
  65. package/dist/src/index.d.ts +25 -1
  66. package/dist/src/index.d.ts.map +1 -1
  67. package/dist/src/index.js +48 -1
  68. package/dist/src/index.js.map +1 -1
  69. package/dist/src/internal.d.ts +35 -3
  70. package/dist/src/internal.d.ts.map +1 -1
  71. package/dist/src/internal.js +72 -3
  72. package/dist/src/internal.js.map +1 -1
  73. package/dist/src/plan/assemble.d.ts +2224 -0
  74. package/dist/src/plan/assemble.d.ts.map +1 -0
  75. package/dist/src/plan/assemble.js +210 -0
  76. package/dist/src/plan/assemble.js.map +1 -0
  77. package/dist/src/plan/builders.d.ts +790 -0
  78. package/dist/src/plan/builders.d.ts.map +1 -0
  79. package/dist/src/plan/builders.js +749 -0
  80. package/dist/src/plan/builders.js.map +1 -0
  81. package/dist/src/plan/event-rows.d.ts +2565 -0
  82. package/dist/src/plan/event-rows.d.ts.map +1 -0
  83. package/dist/src/plan/event-rows.js +689 -0
  84. package/dist/src/plan/event-rows.js.map +1 -0
  85. package/dist/src/plan/factories.d.ts +458 -0
  86. package/dist/src/plan/factories.d.ts.map +1 -0
  87. package/dist/src/plan/factories.js +484 -0
  88. package/dist/src/plan/factories.js.map +1 -0
  89. package/dist/src/plan/index.d.ts +672 -0
  90. package/dist/src/plan/index.d.ts.map +1 -0
  91. package/dist/src/plan/index.js +532 -0
  92. package/dist/src/plan/index.js.map +1 -0
  93. package/dist/src/plan/ir.d.ts +2594 -0
  94. package/dist/src/plan/ir.d.ts.map +1 -0
  95. package/dist/src/plan/ir.js +78 -0
  96. package/dist/src/plan/ir.js.map +1 -0
  97. package/dist/src/plan/library.d.ts +772 -0
  98. package/dist/src/plan/library.d.ts.map +1 -0
  99. package/dist/src/plan/library.js +424 -0
  100. package/dist/src/plan/library.js.map +1 -0
  101. package/dist/src/plan/ordered-source.d.ts +27 -0
  102. package/dist/src/plan/ordered-source.d.ts.map +1 -0
  103. package/dist/src/plan/ordered-source.js +48 -0
  104. package/dist/src/plan/ordered-source.js.map +1 -0
  105. package/dist/src/plan/over.d.ts +247 -0
  106. package/dist/src/plan/over.d.ts.map +1 -0
  107. package/dist/src/plan/over.js +266 -0
  108. package/dist/src/plan/over.js.map +1 -0
  109. package/dist/src/plan/pick.d.ts +78 -0
  110. package/dist/src/plan/pick.d.ts.map +1 -0
  111. package/dist/src/plan/pick.js +146 -0
  112. package/dist/src/plan/pick.js.map +1 -0
  113. package/dist/src/plan/plan.d.ts +11611 -0
  114. package/dist/src/plan/plan.d.ts.map +1 -0
  115. package/dist/src/plan/plan.js +428 -0
  116. package/dist/src/plan/plan.js.map +1 -0
  117. package/dist/src/plan/refs.d.ts +218 -0
  118. package/dist/src/plan/refs.d.ts.map +1 -0
  119. package/dist/src/plan/refs.js +226 -0
  120. package/dist/src/plan/refs.js.map +1 -0
  121. package/dist/src/plan/root.d.ts +290 -0
  122. package/dist/src/plan/root.d.ts.map +1 -0
  123. package/dist/src/plan/root.js +463 -0
  124. package/dist/src/plan/root.js.map +1 -0
  125. package/dist/src/plan/series.d.ts +13554 -0
  126. package/dist/src/plan/series.d.ts.map +1 -0
  127. package/dist/src/plan/series.js +1921 -0
  128. package/dist/src/plan/series.js.map +1 -0
  129. package/dist/src/plan/types.d.ts +12400 -0
  130. package/dist/src/plan/types.d.ts.map +1 -0
  131. package/dist/src/plan/types.js +1335 -0
  132. package/dist/src/plan/types.js.map +1 -0
  133. package/dist/src/roster/coverage.d.ts +240 -0
  134. package/dist/src/roster/coverage.d.ts.map +1 -0
  135. package/dist/src/roster/coverage.js +109 -0
  136. package/dist/src/roster/coverage.js.map +1 -0
  137. package/dist/src/roster/index.d.ts +4028 -0
  138. package/dist/src/roster/index.d.ts.map +1 -0
  139. package/dist/src/roster/index.js +115 -0
  140. package/dist/src/roster/index.js.map +1 -0
  141. package/dist/src/roster/library.d.ts +106 -0
  142. package/dist/src/roster/library.d.ts.map +1 -0
  143. package/dist/src/roster/library.js +78 -0
  144. package/dist/src/roster/library.js.map +1 -0
  145. package/dist/src/roster/people.d.ts +50 -0
  146. package/dist/src/roster/people.d.ts.map +1 -0
  147. package/dist/src/roster/people.js +32 -0
  148. package/dist/src/roster/people.js.map +1 -0
  149. package/dist/src/roster/rules.d.ts +275 -0
  150. package/dist/src/roster/rules.d.ts.map +1 -0
  151. package/dist/src/roster/rules.js +162 -0
  152. package/dist/src/roster/rules.js.map +1 -0
  153. package/dist/src/roster/types.d.ts +672 -0
  154. package/dist/src/roster/types.d.ts.map +1 -0
  155. package/dist/src/roster/types.js +248 -0
  156. package/dist/src/roster/types.js.map +1 -0
  157. package/dist/src/roster/visibility.d.ts +66 -0
  158. package/dist/src/roster/visibility.d.ts.map +1 -0
  159. package/dist/src/roster/visibility.js +25 -0
  160. package/dist/src/roster/visibility.js.map +1 -0
  161. package/dist/src/schedule/days.d.ts +54 -0
  162. package/dist/src/schedule/days.d.ts.map +1 -0
  163. package/dist/src/schedule/days.js +68 -0
  164. package/dist/src/schedule/days.js.map +1 -0
  165. package/dist/src/schedule/events.d.ts +433 -0
  166. package/dist/src/schedule/events.d.ts.map +1 -0
  167. package/dist/src/schedule/events.js +851 -0
  168. package/dist/src/schedule/events.js.map +1 -0
  169. package/dist/src/schedule/index.d.ts +150 -0
  170. package/dist/src/schedule/index.d.ts.map +1 -0
  171. package/dist/src/schedule/index.js +132 -0
  172. package/dist/src/schedule/index.js.map +1 -0
  173. package/dist/src/schedule/library.d.ts +70 -0
  174. package/dist/src/schedule/library.d.ts.map +1 -0
  175. package/dist/src/schedule/library.js +102 -0
  176. package/dist/src/schedule/library.js.map +1 -0
  177. package/dist/src/schedule/patch.d.ts +74 -0
  178. package/dist/src/schedule/patch.d.ts.map +1 -0
  179. package/dist/src/schedule/patch.js +68 -0
  180. package/dist/src/schedule/patch.js.map +1 -0
  181. package/dist/src/schedule/record-window.d.ts +189 -0
  182. package/dist/src/schedule/record-window.d.ts.map +1 -0
  183. package/dist/src/schedule/record-window.js +95 -0
  184. package/dist/src/schedule/record-window.js.map +1 -0
  185. package/dist/src/schedule/resources.d.ts +165 -0
  186. package/dist/src/schedule/resources.d.ts.map +1 -0
  187. package/dist/src/schedule/resources.js +234 -0
  188. package/dist/src/schedule/resources.js.map +1 -0
  189. package/dist/src/schedule/templates.d.ts +47 -0
  190. package/dist/src/schedule/templates.d.ts.map +1 -0
  191. package/dist/src/schedule/templates.js +61 -0
  192. package/dist/src/schedule/templates.js.map +1 -0
  193. package/dist/src/schedule/types.d.ts +1677 -0
  194. package/dist/src/schedule/types.d.ts.map +1 -0
  195. package/dist/src/schedule/types.js +374 -0
  196. package/dist/src/schedule/types.js.map +1 -0
  197. package/dist/src/schedule/window.d.ts +154 -0
  198. package/dist/src/schedule/window.d.ts.map +1 -0
  199. package/dist/src/schedule/window.js +363 -0
  200. package/dist/src/schedule/window.js.map +1 -0
  201. package/dist/src/sheet/bridge.d.ts +385 -0
  202. package/dist/src/sheet/bridge.d.ts.map +1 -0
  203. package/dist/src/sheet/bridge.js +809 -0
  204. package/dist/src/sheet/bridge.js.map +1 -0
  205. package/dist/src/sheet/columns.d.ts +410 -0
  206. package/dist/src/sheet/columns.d.ts.map +1 -0
  207. package/dist/src/sheet/columns.js +99 -0
  208. package/dist/src/sheet/columns.js.map +1 -0
  209. package/dist/src/sheet/context-bridge.d.ts +48 -0
  210. package/dist/src/sheet/context-bridge.d.ts.map +1 -0
  211. package/dist/src/sheet/context-bridge.js +216 -0
  212. package/dist/src/sheet/context-bridge.js.map +1 -0
  213. package/dist/src/sheet/draft-bridge.d.ts +37 -0
  214. package/dist/src/sheet/draft-bridge.d.ts.map +1 -0
  215. package/dist/src/sheet/draft-bridge.js +153 -0
  216. package/dist/src/sheet/draft-bridge.js.map +1 -0
  217. package/dist/src/sheet/drafts.d.ts +14 -0
  218. package/dist/src/sheet/drafts.d.ts.map +1 -0
  219. package/dist/src/sheet/drafts.js +14 -0
  220. package/dist/src/sheet/drafts.js.map +1 -0
  221. package/dist/src/sheet/editing-bridge.d.ts +40 -0
  222. package/dist/src/sheet/editing-bridge.d.ts.map +1 -0
  223. package/dist/src/sheet/editing-bridge.js +231 -0
  224. package/dist/src/sheet/editing-bridge.js.map +1 -0
  225. package/dist/src/sheet/editing-types.d.ts +268 -0
  226. package/dist/src/sheet/editing-types.d.ts.map +1 -0
  227. package/dist/src/sheet/editing-types.js +34 -0
  228. package/dist/src/sheet/editing-types.js.map +1 -0
  229. package/dist/src/sheet/edits.d.ts +37 -0
  230. package/dist/src/sheet/edits.d.ts.map +1 -0
  231. package/dist/src/sheet/edits.js +31 -0
  232. package/dist/src/sheet/edits.js.map +1 -0
  233. package/dist/src/sheet/fields.d.ts +693 -0
  234. package/dist/src/sheet/fields.d.ts.map +1 -0
  235. package/dist/src/sheet/fields.js +280 -0
  236. package/dist/src/sheet/fields.js.map +1 -0
  237. package/dist/src/sheet/group.d.ts +165 -0
  238. package/dist/src/sheet/group.d.ts.map +1 -0
  239. package/dist/src/sheet/group.js +52 -0
  240. package/dist/src/sheet/group.js.map +1 -0
  241. package/dist/src/sheet/index.d.ts +542 -0
  242. package/dist/src/sheet/index.d.ts.map +1 -0
  243. package/dist/src/sheet/index.js +387 -0
  244. package/dist/src/sheet/index.js.map +1 -0
  245. package/dist/src/sheet/library.d.ts +284 -0
  246. package/dist/src/sheet/library.d.ts.map +1 -0
  247. package/dist/src/sheet/library.js +259 -0
  248. package/dist/src/sheet/library.js.map +1 -0
  249. package/dist/src/sheet/link.d.ts +398 -0
  250. package/dist/src/sheet/link.d.ts.map +1 -0
  251. package/dist/src/sheet/link.js +228 -0
  252. package/dist/src/sheet/link.js.map +1 -0
  253. package/dist/src/sheet/record.d.ts +75 -0
  254. package/dist/src/sheet/record.d.ts.map +1 -0
  255. package/dist/src/sheet/record.js +128 -0
  256. package/dist/src/sheet/record.js.map +1 -0
  257. package/dist/src/sheet/registers.d.ts +681 -0
  258. package/dist/src/sheet/registers.d.ts.map +1 -0
  259. package/dist/src/sheet/registers.js +671 -0
  260. package/dist/src/sheet/registers.js.map +1 -0
  261. package/dist/src/sheet/root.d.ts +329 -0
  262. package/dist/src/sheet/root.d.ts.map +1 -0
  263. package/dist/src/sheet/root.js +511 -0
  264. package/dist/src/sheet/root.js.map +1 -0
  265. package/dist/src/sheet/seed-bridge.d.ts +14 -0
  266. package/dist/src/sheet/seed-bridge.d.ts.map +1 -0
  267. package/dist/src/sheet/seed-bridge.js +51 -0
  268. package/dist/src/sheet/seed-bridge.js.map +1 -0
  269. package/dist/src/sheet/sheet.d.ts +11819 -0
  270. package/dist/src/sheet/sheet.d.ts.map +1 -0
  271. package/dist/src/sheet/sheet.js +236 -0
  272. package/dist/src/sheet/sheet.js.map +1 -0
  273. package/dist/src/sheet/sub-rows.d.ts +299 -0
  274. package/dist/src/sheet/sub-rows.d.ts.map +1 -0
  275. package/dist/src/sheet/sub-rows.js +272 -0
  276. package/dist/src/sheet/sub-rows.js.map +1 -0
  277. package/dist/src/sheet/templates.d.ts +161 -0
  278. package/dist/src/sheet/templates.d.ts.map +1 -0
  279. package/dist/src/sheet/templates.js +122 -0
  280. package/dist/src/sheet/templates.js.map +1 -0
  281. package/dist/src/sheet/transactions.d.ts +76 -0
  282. package/dist/src/sheet/transactions.d.ts.map +1 -0
  283. package/dist/src/sheet/transactions.js +40 -0
  284. package/dist/src/sheet/transactions.js.map +1 -0
  285. package/dist/src/sheet/types.d.ts +15226 -0
  286. package/dist/src/sheet/types.d.ts.map +1 -0
  287. package/dist/src/sheet/types.js +1070 -0
  288. package/dist/src/sheet/types.js.map +1 -0
  289. package/dist/src/sheet/views.d.ts +29 -0
  290. package/dist/src/sheet/views.d.ts.map +1 -0
  291. package/dist/src/sheet/views.js +43 -0
  292. package/dist/src/sheet/views.js.map +1 -0
  293. package/dist/src/studio/component.d.ts.map +1 -1
  294. package/dist/src/studio/component.js +11 -8
  295. package/dist/src/studio/component.js.map +1 -1
  296. package/dist/src/utils/derive.d.ts +134 -8
  297. package/dist/src/utils/derive.d.ts.map +1 -1
  298. package/dist/src/utils/derive.js +409 -7
  299. package/dist/src/utils/derive.js.map +1 -1
  300. package/dist/src/utils/ordered-source.d.ts +38 -0
  301. package/dist/src/utils/ordered-source.d.ts.map +1 -0
  302. package/dist/src/utils/ordered-source.js +45 -0
  303. package/dist/src/utils/ordered-source.js.map +1 -0
  304. package/dist/src/utils/row-inspector.d.ts +36 -0
  305. package/dist/src/utils/row-inspector.d.ts.map +1 -0
  306. package/dist/src/utils/row-inspector.js +49 -0
  307. package/dist/src/utils/row-inspector.js.map +1 -0
  308. package/dist/test/bind/data/data.examples.d.ts +21 -19
  309. package/dist/test/bind/data/data.examples.d.ts.map +1 -1
  310. package/dist/test/bind/data/data.examples.js +122 -122
  311. package/dist/test/bind/data/data.examples.js.map +1 -1
  312. package/dist/test/bind/record/record.examples.d.ts.map +1 -1
  313. package/dist/test/bind/record/record.examples.js +9 -9
  314. package/dist/test/bind/record/record.examples.js.map +1 -1
  315. package/dist/test/calendar/calendar-records.examples.d.ts +228 -0
  316. package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -0
  317. package/dist/test/calendar/calendar-records.examples.js +91 -0
  318. package/dist/test/calendar/calendar-records.examples.js.map +1 -0
  319. package/dist/test/calendar/calendar.examples.d.ts +776 -0
  320. package/dist/test/calendar/calendar.examples.d.ts.map +1 -0
  321. package/dist/test/calendar/calendar.examples.js +336 -0
  322. package/dist/test/calendar/calendar.examples.js.map +1 -0
  323. package/dist/test/decision/journal.examples.d.ts +28 -28
  324. package/dist/test/decision/journal.examples.d.ts.map +1 -1
  325. package/dist/test/decision/journal.examples.js +4 -4
  326. package/dist/test/decision/journal.examples.js.map +1 -1
  327. package/dist/test/decision/queue.examples.d.ts.map +1 -1
  328. package/dist/test/decision/queue.examples.js +5 -7
  329. package/dist/test/decision/queue.examples.js.map +1 -1
  330. package/dist/test/flowchart/flowchart.examples.d.ts +3713 -0
  331. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -0
  332. package/dist/test/flowchart/flowchart.examples.js +465 -0
  333. package/dist/test/flowchart/flowchart.examples.js.map +1 -0
  334. package/dist/test/plan/plan-events.examples.d.ts +3666 -0
  335. package/dist/test/plan/plan-events.examples.d.ts.map +1 -0
  336. package/dist/test/plan/plan-events.examples.js +773 -0
  337. package/dist/test/plan/plan-events.examples.js.map +1 -0
  338. package/dist/test/plan/plan-records.examples.d.ts +3 -0
  339. package/dist/test/plan/plan-records.examples.d.ts.map +1 -0
  340. package/dist/test/plan/plan-records.examples.js +45 -0
  341. package/dist/test/plan/plan-records.examples.js.map +1 -0
  342. package/dist/test/plan/plan-windows.examples.d.ts +588 -0
  343. package/dist/test/plan/plan-windows.examples.d.ts.map +1 -0
  344. package/dist/test/plan/plan-windows.examples.js +170 -0
  345. package/dist/test/plan/plan-windows.examples.js.map +1 -0
  346. package/dist/test/plan/plan.examples.d.ts +8095 -0
  347. package/dist/test/plan/plan.examples.d.ts.map +1 -0
  348. package/dist/test/plan/plan.examples.js +2500 -0
  349. package/dist/test/plan/plan.examples.js.map +1 -0
  350. package/dist/test/roster/domain.examples.d.ts +367 -0
  351. package/dist/test/roster/domain.examples.d.ts.map +1 -0
  352. package/dist/test/roster/domain.examples.js +72 -0
  353. package/dist/test/roster/domain.examples.js.map +1 -0
  354. package/dist/test/roster/roster-records.examples.d.ts +729 -0
  355. package/dist/test/roster/roster-records.examples.d.ts.map +1 -0
  356. package/dist/test/roster/roster-records.examples.js +86 -0
  357. package/dist/test/roster/roster-records.examples.js.map +1 -0
  358. package/dist/test/roster/roster.examples.d.ts +750 -0
  359. package/dist/test/roster/roster.examples.d.ts.map +1 -0
  360. package/dist/test/roster/roster.examples.js +198 -0
  361. package/dist/test/roster/roster.examples.js.map +1 -0
  362. package/dist/test/roster/warehouse.d.ts +87 -0
  363. package/dist/test/roster/warehouse.d.ts.map +1 -0
  364. package/dist/test/roster/warehouse.js +883 -0
  365. package/dist/test/roster/warehouse.js.map +1 -0
  366. package/dist/test/sheet/sheet-link.examples.d.ts +7 -0
  367. package/dist/test/sheet/sheet-link.examples.d.ts.map +1 -0
  368. package/dist/test/sheet/sheet-link.examples.js +41 -0
  369. package/dist/test/sheet/sheet-link.examples.js.map +1 -0
  370. package/dist/test/sheet/sheet-records.examples.d.ts +421 -0
  371. package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -0
  372. package/dist/test/sheet/sheet-records.examples.js +79 -0
  373. package/dist/test/sheet/sheet-records.examples.js.map +1 -0
  374. package/dist/test/sheet/sheet-transactions.examples.d.ts +7 -0
  375. package/dist/test/sheet/sheet-transactions.examples.d.ts.map +1 -0
  376. package/dist/test/sheet/sheet-transactions.examples.js +58 -0
  377. package/dist/test/sheet/sheet-transactions.examples.js.map +1 -0
  378. package/dist/test/sheet/sheet.examples.d.ts +5562 -0
  379. package/dist/test/sheet/sheet.examples.d.ts.map +1 -0
  380. package/dist/test/sheet/sheet.examples.js +1178 -0
  381. package/dist/test/sheet/sheet.examples.js.map +1 -0
  382. package/dist/test/studio/studio.examples.d.ts.map +1 -1
  383. package/dist/test/studio/studio.examples.js +11 -11
  384. package/dist/test/studio/studio.examples.js.map +1 -1
  385. package/package.json +12 -9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../src/flowchart/library.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EACH,SAAS,EACT,QAAQ,EAGR,QAAQ,EACR,UAAU,EAEV,UAAU,EACV,UAAU,EACV,WAAW,EAOX,KAAK,QAAQ,EACb,KAAK,QAAQ,EAEb,KAAK,kBAAkB,EAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAqB,iBAAiB,EAAE,kBAAkB,EAAwB,MAAM,YAAY,CAAC;AAM5G;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB;;;;;EAK5B,CAAC;AAEH,mDAAmD;AACnD,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC;AAEzD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAGjC,CAAC;AAEH,wDAAwD;AACxD,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;EAGtC,CAAC;AAEH,6DAA6D;AAC7D,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAC;AA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EAAE,gBAKvC,CAAC;AA8NF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC,CA+B1G"}
@@ -0,0 +1,611 @@
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
+ * `Flowchart.library` — the flowchart's library pane (#1246, #1248,
7
+ * `Flowchart Builder Spec.md` decisions 5–8, §4.2, §4.4, FB13, FB25–FB29):
8
+ * `library` lists the pane's tabs, in order, each a `Flowchart.library.*`
9
+ * call. Left out, or empty, the flowchart has no library pane.
10
+ *
11
+ * - `Flowchart.library.flows()` (#1246) — the Flows tab: every flow the
12
+ * flowchart holds by name, a click opening one on the canvas, and "+ New
13
+ * flow" naming another. Over one flow there is none to list, so one flow's
14
+ * library takes every tab but it.
15
+ * - `Flowchart.library.states(rows, { … })` — state templates: one card per
16
+ * row, its `drop` the fields of the state a card dropped on a lane adds.
17
+ * - `Flowchart.library.transitions(rows, { … })` — transition templates: one
18
+ * card per row, its `drop` the fields a card sets on the transition it lands
19
+ * on.
20
+ * - `Flowchart.library.tab(rows, { … })` — the author's own cards; given a
21
+ * `drop`, its patch's type names what a card lands on: a state, a
22
+ * transition, a lane's header or a decision's diamond.
23
+ *
24
+ * Each data tab takes its own bound data (the user, 2026-10-08), apart from
25
+ * the flows and from the other tabs: its rows are an `Array<T>` or a
26
+ * `Dict<String, T>` the app binds — a value, or an expression such as a
27
+ * binding's `read()` — read as `Sheet.library.tab` reads its rows: its
28
+ * accessors `(row, key) => …` reified once into a describe function the rows'
29
+ * map then calls, a Dict's key the second argument and an Array's index,
30
+ * printed, in its place; a key that repeats keeps its first card. A card
31
+ * crosses the closed payload as the fields its drop sets, typed by the row it
32
+ * lands on — a flow's rows are the flowchart's own types. Dropped on the
33
+ * canvas (#1249), a state template adds a state where it lands on a lane, a
34
+ * transition template retypes the transition it lands on, and an author's card
35
+ * sets its fields on what its drop's type names; ⏎ on a card drops it on the
36
+ * canvas's selection.
37
+ *
38
+ * @packageDocumentation
39
+ */
40
+ import { ArrayType, DictType, East, Expr, NullType, OptionType, SetType, StringType, StructType, VariantType, isTypeEqual, none, printType, some, variant, } from "@elaraai/east";
41
+ import { FlowchartPatchTypeFor } from "./patch.js";
42
+ import { FlowchartLaneType, FlowchartLinkType, FlowchartStateType, FlowchartTriggerType } from "./types.js";
43
+ // ============================================================================
44
+ // The wire
45
+ // ============================================================================
46
+ /**
47
+ * A card a library tab lists that drops nothing: an author's card read, never
48
+ * dragged.
49
+ *
50
+ * @property key - Its identity in its tab
51
+ * @property label - Its title
52
+ * @property meta - A line under its title
53
+ * @property group - The group its tab lists it under
54
+ */
55
+ export const FlowchartCardType = StructType({
56
+ key: StringType,
57
+ label: StringType,
58
+ meta: OptionType(StringType),
59
+ group: OptionType(StringType),
60
+ });
61
+ /**
62
+ * A state template's card: what it shows, and the fields of the state it
63
+ * adds, over a state's defaults — the `Flowchart.patch(Flowchart.Types.State, …)`
64
+ * its drop returns.
65
+ */
66
+ export const FlowchartStateCardType = StructType({
67
+ ...FlowchartCardType.fields,
68
+ sets: FlowchartPatchTypeFor(FlowchartStateType),
69
+ });
70
+ /**
71
+ * A transition template's card: what it shows, and the fields it sets on the
72
+ * transition it lands on — the `Flowchart.patch(Flowchart.Types.Link, …)` its
73
+ * drop returns.
74
+ */
75
+ export const FlowchartTransitionCardType = StructType({
76
+ ...FlowchartCardType.fields,
77
+ sets: FlowchartPatchTypeFor(FlowchartLinkType),
78
+ });
79
+ /** An author's card that lands on a lane's header, and the lane's fields it sets. */
80
+ export const FlowchartLaneCardType = StructType({
81
+ ...FlowchartCardType.fields,
82
+ sets: FlowchartPatchTypeFor(FlowchartLaneType),
83
+ });
84
+ /** An author's card that lands on a decision's diamond, and the decision's fields it sets. */
85
+ export const FlowchartDecisionCardType = StructType({
86
+ ...FlowchartCardType.fields,
87
+ sets: FlowchartPatchTypeFor(FlowchartTriggerType),
88
+ });
89
+ /**
90
+ * An author's tab's cards, by what they land on — the type of the patch its
91
+ * `drop` returns — each card with the fields it sets there.
92
+ *
93
+ * @property none - The tab declares no `drop`: its cards are read, never dragged
94
+ * @property state - Its cards land on a state
95
+ * @property transition - Its cards land on a transition
96
+ * @property lane - Its cards land on a lane's header
97
+ * @property decision - Its cards land on a decision's diamond
98
+ */
99
+ export const FlowchartLandsType = VariantType({
100
+ none: ArrayType(FlowchartCardType),
101
+ state: ArrayType(FlowchartStateCardType),
102
+ transition: ArrayType(FlowchartTransitionCardType),
103
+ lane: ArrayType(FlowchartLaneCardType),
104
+ decision: ArrayType(FlowchartDecisionCardType),
105
+ });
106
+ /**
107
+ * One tab of the library pane, as `library` lists it (`Flowchart Builder
108
+ * Spec.md` §4.2).
109
+ *
110
+ * @remarks
111
+ * A card crosses the closed payload as the fields its drop sets, typed by the
112
+ * row it lands on — a flow's rows are the flowchart's own types. A template
113
+ * tab's name is the author's when given; left out, the renderer names it in
114
+ * its words (`States`, `Transitions`), so a host translates it.
115
+ *
116
+ * @property flows - Every flow in the record; a click opens one
117
+ * @property states - State templates from the tab's own rows: its name, its icon and its cards
118
+ * @property transitions - Transition templates from the tab's own rows: its name, its icon and its cards
119
+ * @property tab - The author's own cards: its name, its icon, and its cards by what they land on
120
+ */
121
+ export const FlowchartLibraryTabType = VariantType({
122
+ flows: NullType,
123
+ states: StructType({ name: OptionType(StringType), icon: OptionType(StringType), cards: ArrayType(FlowchartStateCardType) }),
124
+ transitions: StructType({ name: OptionType(StringType), icon: OptionType(StringType), cards: ArrayType(FlowchartTransitionCardType) }),
125
+ tab: StructType({ name: StringType, icon: OptionType(StringType), lands: FlowchartLandsType }),
126
+ });
127
+ /**
128
+ * The Flows tab — `Flowchart.library.flows()` (FB13, FB14): every flow the
129
+ * flowchart holds, by name, each card its name and its description — or, with
130
+ * none, its counts — the open flow placed, and a flow whose drafts are not
131
+ * yet saved marked Pending. A click opens a flow on the canvas, and the
132
+ * tab's search reads names and descriptions. Where the flowchart edits — a
133
+ * record, or the host's flows given `onApply`, and not read only — "+ New
134
+ * flow" names another, refusing a name the flowchart holds, and opens it
135
+ * empty, one lane, as a draft the history item saves or discards.
136
+ *
137
+ * @remarks
138
+ * Over a record of flows, or the host's flows by name. Over one flow (`data`
139
+ * of `Flowchart.Types.Flow`) it is refused, when the surface is built and by
140
+ * the tag's types.
141
+ *
142
+ * @returns The tab
143
+ *
144
+ * @example
145
+ * ```tsx
146
+ * // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
147
+ * import { East } from "@elaraai/east";
148
+ * import { Box, Reactive, UIComponentType } from "@elaraai/east-ui";
149
+ * import { Flowchart, Record } from "@elaraai/e3-ui";
150
+ * import e3 from "@elaraai/e3";
151
+ *
152
+ * export const depotFlows = e3.record("flowchart_depot_flows", Flowchart.Types.Flows, Flowchart.values({
153
+ * "Inbound parcels": {
154
+ * description: "From the trailer to the van",
155
+ * lanes: [{ key: "intake", label: "Intake" }, { key: "sort", label: "Sort" }, { key: "load", label: "Load" }],
156
+ * states: [
157
+ * { key: "ARV", label: "Arrived", lane: "intake" },
158
+ * { key: "SCN", label: "Scanned", lane: "intake" },
159
+ * { key: "CH*", label: "Sort chutes", lane: "sort", members: 12n },
160
+ * { key: "LDD", label: "Loaded", lane: "load" },
161
+ * ],
162
+ * links: [
163
+ * { from: "ARV", to: "SCN" },
164
+ * { from: "SCN", to: "CH*", trigger: "route" },
165
+ * { from: "CH*", to: "LDD" },
166
+ * { from: "SCN", to: "SCN", kind: "observed" },
167
+ * ],
168
+ * triggers: [{ key: "route", label: "route", owner: "sort-planner" }],
169
+ * },
170
+ * "Returns": {
171
+ * description: "From the counter back to the sender",
172
+ * lanes: [{ key: "counter", label: "Counter" }, { key: "check", label: "Check" }, { key: "out", label: "Out" }],
173
+ * states: [
174
+ * { key: "RCV", label: "Received", lane: "counter" },
175
+ * { key: "INS", label: "Inspected", lane: "check" },
176
+ * { key: "RSD", label: "Resent", lane: "out" },
177
+ * ],
178
+ * links: [{ from: "RCV", to: "INS" }, { from: "INS", to: "RSD" }, { from: "INS", to: "BIN", kind: "observed" }],
179
+ * },
180
+ * }));
181
+ * export const depotFlowsPatch = e3.mutation.patch(depotFlows);
182
+ *
183
+ * const flowchart = East.function([], UIComponentType, (_$) => (
184
+ * <Reactive>{$ => {
185
+ * const flows = $.let(Record.bind(depotFlows, [depotFlowsPatch]));
186
+ * return (
187
+ * <Box height="500px">
188
+ * <Flowchart record={flows} flow="Inbound parcels" library={[Flowchart.library.flows()]} />
189
+ * </Box>
190
+ * );
191
+ * }}</Reactive>
192
+ * ));
193
+ * ```
194
+ */
195
+ export function libraryFlows() {
196
+ return { kind: "flows" };
197
+ }
198
+ /**
199
+ * The state templates — `Flowchart.library.states(rows, { … })` (FB26,
200
+ * decisions 6 and 7): one card per row of the tab's own rows — its label, the
201
+ * line under it, the tab's icon — grouped by its `group` and searched by its
202
+ * key, label and line. Each card is a drag source, and a click selects it, a
203
+ * click on the selected card letting it go. A card dropped on a lane adds a
204
+ * state there, seeded with the fields its `drop` sets over a state's defaults
205
+ * (#1249).
206
+ *
207
+ * @remarks
208
+ * The rows are the app's own — an input or a record the app binds, apart from
209
+ * the flows and from the other tabs — read as `Sheet.library.tab` reads its
210
+ * rows: an `Array<T>` or a `Dict<String, T>`, each accessor taking a row and
211
+ * its key, a Dict's key or an Array's index, printed. A key that repeats keeps
212
+ * its first card. Left out, the tab's name is `States`, in the flowchart's
213
+ * words. Refused when the surface is built: rows that are neither an Array
214
+ * nor a `Dict<String, T>`, a `drop` over another type than
215
+ * `Flowchart.Types.State`, and the tab listed twice.
216
+ *
217
+ * @typeParam T - The rows' element type
218
+ * @param rows - The rows — an `Array<T>` or a `Dict<String, T>` value or expression, such as a binding's `read()`
219
+ * @param config - The tab's name and icon, what each card shows, and its `drop` ({@link FlowchartStatesConfig})
220
+ * @returns The tab
221
+ *
222
+ * @example
223
+ * ```tsx
224
+ * // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
225
+ * import { ArrayType, DictType, East, IntegerType, OptionType, StringType, StructType, none, some, variant } from "@elaraai/east";
226
+ * import { Box, Reactive, UIComponentType } from "@elaraai/east-ui";
227
+ * import { Data, Flowchart, Record } from "@elaraai/e3-ui";
228
+ * import e3 from "@elaraai/e3";
229
+ *
230
+ * export const depotFlows = e3.record("flowchart_depot_flows", Flowchart.Types.Flows, Flowchart.values({
231
+ * "Inbound parcels": {
232
+ * description: "From the trailer to the van",
233
+ * lanes: [{ key: "intake", label: "Intake" }, { key: "sort", label: "Sort" }, { key: "load", label: "Load" }],
234
+ * states: [
235
+ * { key: "ARV", label: "Arrived", lane: "intake" },
236
+ * { key: "SCN", label: "Scanned", lane: "intake" },
237
+ * { key: "CH*", label: "Sort chutes", lane: "sort", members: 12n },
238
+ * { key: "LDD", label: "Loaded", lane: "load" },
239
+ * ],
240
+ * links: [
241
+ * { from: "ARV", to: "SCN" },
242
+ * { from: "SCN", to: "CH*", trigger: "route" },
243
+ * { from: "CH*", to: "LDD" },
244
+ * { from: "SCN", to: "SCN", kind: "observed" },
245
+ * ],
246
+ * triggers: [{ key: "route", label: "route", owner: "sort-planner" }],
247
+ * },
248
+ * "Returns": {
249
+ * description: "From the counter back to the sender",
250
+ * lanes: [{ key: "counter", label: "Counter" }, { key: "check", label: "Check" }, { key: "out", label: "Out" }],
251
+ * states: [
252
+ * { key: "RCV", label: "Received", lane: "counter" },
253
+ * { key: "INS", label: "Inspected", lane: "check" },
254
+ * { key: "RSD", label: "Resent", lane: "out" },
255
+ * ],
256
+ * links: [{ from: "RCV", to: "INS" }, { from: "INS", to: "RSD" }, { from: "INS", to: "BIN", kind: "observed" }],
257
+ * },
258
+ * }));
259
+ * export const depotFlowsPatch = e3.mutation.patch(depotFlows);
260
+ * export const StepTemplate = StructType({ code: StringType, name: StringType, kind: StringType, slots: OptionType(IntegerType) });
261
+ * export const stepTemplates = e3.input("flowchart_step_templates", ArrayType(StepTemplate), variant("value", [
262
+ * { code: "ARV", name: "Arrived", kind: "Intake", slots: none },
263
+ * { code: "SCN", name: "Scanned", kind: "Intake", slots: none },
264
+ * { code: "CH*", name: "Sort chutes", kind: "Sort", slots: some(12n) },
265
+ * { code: "HLD", name: "Held", kind: "Hold", slots: none },
266
+ * { code: "LDD", name: "Loaded", kind: "Load", slots: none },
267
+ * ]));
268
+ * export const MoveTemplate = StructType({ kind: Flowchart.Types.Kind, decision: OptionType(StringType), note: StringType });
269
+ * export const moveTemplates = e3.record("flowchart_move_templates", DictType(StringType, MoveTemplate), new Map([
270
+ * ["Observed", { kind: variant("observed", null), decision: none, note: "Mined from the scans" }],
271
+ * ["Planned", { kind: variant("planned", null), decision: none, note: "The designed path" }],
272
+ * ["Routed", { kind: variant("planned", null), decision: some("route"), note: "Governed by the route decision" }],
273
+ * ]));
274
+ * export const DecisionOwner = StructType({ role: StringType, name: StringType, desk: StringType });
275
+ * export const decisionOwners = e3.input("flowchart_decision_owners", ArrayType(DecisionOwner), variant("value", [
276
+ * { role: "sort-planner", name: "Sort planner", desk: "Sort hall" },
277
+ * { role: "customs-desk", name: "Customs desk", desk: "Hold bay" },
278
+ * ]));
279
+ *
280
+ * const flowchart = East.function([], UIComponentType, (_$) => (
281
+ * <Reactive>{$ => {
282
+ * const flows = $.let(Record.bind(depotFlows, [depotFlowsPatch]));
283
+ * const steps = $.let(Data.bind(stepTemplates));
284
+ * const moves = $.let(Record.bind(moveTemplates, []));
285
+ * const owners = $.let(Data.bind(decisionOwners));
286
+ * return (
287
+ * <Box height="560px">
288
+ * <Flowchart
289
+ * record={flows}
290
+ * flow="Inbound parcels"
291
+ * name="depot"
292
+ * library={[
293
+ * Flowchart.library.flows(),
294
+ * // Step types, an input's rows: a card dropped on a lane adds a state seeded with what its drop sets.
295
+ * Flowchart.library.states(steps.read(), {
296
+ * name: "Steps", icon: "box",
297
+ * key: s => s.code, label: s => s.name, meta: s => some(s.code), group: s => s.kind,
298
+ * drop: s => Flowchart.patch(Flowchart.Types.State, { key: s.code, label: some(s.name), members: s.slots }),
299
+ * }),
300
+ * // Transition types, a record's rows by name: a card dropped on a transition retypes it.
301
+ * Flowchart.library.transitions(moves.read(), {
302
+ * icon: "arrow-right",
303
+ * key: (_m, name) => name, label: (_m, name) => name, meta: m => some(m.note),
304
+ * drop: m => Flowchart.patch(Flowchart.Types.Link, { kind: some(m.kind), trigger: m.decision }),
305
+ * }),
306
+ * // The author's own cards: a role dropped on a decision owns it.
307
+ * Flowchart.library.tab(owners.read(), {
308
+ * name: "Owners", icon: "user-tie",
309
+ * key: o => o.role, label: o => o.name, meta: o => some(o.desk),
310
+ * drop: o => Flowchart.patch(Flowchart.Types.Trigger, { owner: some(o.role) }),
311
+ * }),
312
+ * ]}
313
+ * />
314
+ * </Box>
315
+ * );
316
+ * }}</Reactive>
317
+ * ));
318
+ * ```
319
+ */
320
+ export function libraryStates(rows, config) {
321
+ return { kind: "states", rows, config: config };
322
+ }
323
+ /**
324
+ * The transition templates — `Flowchart.library.transitions(rows, { … })`
325
+ * (FB26, decision 8): one card per row of the tab's own rows, as
326
+ * {@link libraryStates}' are, each a drag source that a click selects and a
327
+ * second click lets go. A card dropped on a transition sets the fields its
328
+ * `drop` sets on it — its kind, its decision and its other fields (#1249): a
329
+ * connection makes a transition of the default type, and a card retypes it.
330
+ *
331
+ * @remarks
332
+ * The rows are read as {@link libraryStates}' are. Left out, the tab's name is
333
+ * `Transitions`, in the flowchart's words. Refused when the surface is built:
334
+ * rows that are neither an Array nor a `Dict<String, T>`, a `drop` over
335
+ * another type than `Flowchart.Types.Link`, and the tab listed twice; and,
336
+ * when the tab's cards are read, a card whose `drop` sets the transition's
337
+ * `key`, `from` or `to` — the fields a patch sets are values its rows give,
338
+ * which the build cannot see.
339
+ *
340
+ * @typeParam T - The rows' element type
341
+ * @param rows - The rows — an `Array<T>` or a `Dict<String, T>` value or expression, such as a binding's `read()`
342
+ * @param config - The tab's name and icon, what each card shows, and its `drop` ({@link FlowchartTransitionsConfig})
343
+ * @returns The tab
344
+ */
345
+ export function libraryTransitions(rows, config) {
346
+ return { kind: "transitions", rows, config: config };
347
+ }
348
+ /**
349
+ * A tab of the author's own cards — `Flowchart.library.tab(rows, { … })`
350
+ * (FB27): one card per row of the tab's own rows, as {@link libraryStates}'
351
+ * are, a click selecting a card and a second click letting it go. Given a
352
+ * `drop`, each card is a drag source, which lands where its patch's type says
353
+ * — a state, a transition, a lane's header or a decision's diamond — and sets
354
+ * its fields there (#1249); without one, the cards are read, never dragged.
355
+ *
356
+ * @remarks
357
+ * The rows are read as {@link libraryStates}' are. A tab's name is its
358
+ * identity in `library`. Refused when the surface is built: rows that are
359
+ * neither an Array nor a `Dict<String, T>`, a `drop` over none of a flow's
360
+ * row types, and two tabs of one name.
361
+ *
362
+ * @typeParam T - The rows' element type
363
+ * @typeParam P - The patch `drop` returns
364
+ * @param rows - The rows — an `Array<T>` or a `Dict<String, T>` value or expression, such as a binding's `read()`
365
+ * @param config - The tab's name and icon, what each card shows, and its `drop` ({@link FlowchartTabConfig})
366
+ * @returns The tab
367
+ */
368
+ export function libraryTab(rows, config) {
369
+ return { kind: "tab", rows, config: config };
370
+ }
371
+ /** The library pane's tabs, each a factory (`Flowchart.library`). */
372
+ export const FlowchartLibraryFactories = {
373
+ flows: libraryFlows,
374
+ states: libraryStates,
375
+ transitions: libraryTransitions,
376
+ tab: libraryTab,
377
+ };
378
+ /** The cards a key repeats on, folded: the first kept, in the rows' order — as a register's members fold. */
379
+ function keepFirst(cardType) {
380
+ return East.function([ArrayType(cardType)], ArrayType(cardType), ($, cards) => {
381
+ const out = $.let([], ArrayType(cardType));
382
+ const seen = $.let(new Set(), SetType(StringType));
383
+ $.for(cards, ($2, card) => {
384
+ const key = $2.let(card.key, StringType);
385
+ $2.if(seen.has(key).not(), ($3) => {
386
+ $3(seen.insert(key));
387
+ $3(out.pushLast(card));
388
+ });
389
+ });
390
+ return out;
391
+ });
392
+ }
393
+ /** Each card type's fold, once. */
394
+ const KEEP_FIRST = new Map([
395
+ FlowchartCardType, FlowchartStateCardType, FlowchartTransitionCardType, FlowchartLaneCardType, FlowchartDecisionCardType,
396
+ ].map((cardType) => [cardType, keepFirst(cardType)]));
397
+ /** What an author's card lands on, by its drop's row type: the arm its cards ride, and their type. */
398
+ const LANDINGS = [
399
+ ["state", FlowchartStateType, FlowchartStateCardType],
400
+ ["transition", FlowchartLinkType, FlowchartTransitionCardType],
401
+ ["lane", FlowchartLaneType, FlowchartLaneCardType],
402
+ ["decision", FlowchartTriggerType, FlowchartDecisionCardType],
403
+ ];
404
+ /** How a tab names itself in a refusal. */
405
+ function tabName(tab) {
406
+ return tab.kind === "tab" ? `the "${tab.config.name}" tab` : `Flowchart.library.${tab.kind}()`;
407
+ }
408
+ /**
409
+ * A data tab's rows: an Array, or a Dict by String keys.
410
+ *
411
+ * @param tab - The tab
412
+ * @returns The rows, as East reads them
413
+ * @throws {Error} Naming the tab: rows that are neither an Array nor a `Dict<String, T>`
414
+ */
415
+ function rowsOf(tab) {
416
+ const expr = East.value(tab.rows);
417
+ const type = Expr.type(expr);
418
+ if (type.type === "Array")
419
+ return { expr, dict: false, row: type.value };
420
+ if (type.type === "Dict" && type.key.type === "String")
421
+ return { expr, dict: true, row: type.value };
422
+ throw new Error(`Flowchart: ${tabName(tab)} reads its rows as an Array<T> or a Dict<String, T> — a value, or an expression such as a binding's read(), its own apart from the flows and the other tabs — and these are ${printType(type)}`);
423
+ }
424
+ /**
425
+ * A data tab's drop, reified once over its rows' type: the function a card's
426
+ * fields are set by, and the type of the patch it returns.
427
+ */
428
+ function dropOf(rows, drop) {
429
+ const fn = East.function([rows.row, StringType], undefined, (_$, row, key) => drop(row, key));
430
+ return { fn, patch: Expr.type(fn).output };
431
+ }
432
+ /**
433
+ * A data tab's cards: one per row, read through its accessors, each with what
434
+ * its drop sets, when the tab's cards set anything, and a key that repeats
435
+ * keeping its first card.
436
+ *
437
+ * @param rows - The tab's rows
438
+ * @param config - What each card shows
439
+ * @param cardType - The cards' type
440
+ * @param sets - What a card sets, from its row and its key, checked as it is read; `undefined` for cards that set nothing
441
+ * @returns The cards, in the rows' order
442
+ */
443
+ function cardsOf(rows, config, cardType, sets) {
444
+ const describe = East.function([rows.row, StringType], cardType, ($, row, key) => {
445
+ const card = $.let(config.key(row, key), StringType);
446
+ return {
447
+ key: card,
448
+ label: config.label(row, key),
449
+ meta: config.meta !== undefined ? config.meta(row, key) : East.value(none, OptionType(StringType)),
450
+ group: config.group !== undefined ? some(config.group(row, key)) : East.value(none, OptionType(StringType)),
451
+ ...(sets === undefined ? {} : { sets: sets($, row, key, card) }),
452
+ };
453
+ });
454
+ const list = rows.dict
455
+ ? rows.expr.toArray(($, row, key) => {
456
+ const read = $.const(describe);
457
+ return read(row, key);
458
+ })
459
+ : rows.expr.map(($, row, index) => {
460
+ const read = $.const(describe);
461
+ return read(row, East.print(index));
462
+ });
463
+ const fold = KEEP_FIRST.get(cardType);
464
+ return fold(list);
465
+ }
466
+ /**
467
+ * The state templates on the wire: the tab's name and icon, and its cards,
468
+ * each with the state its drop seeds.
469
+ *
470
+ * @param tab - The tab
471
+ * @returns The tab's wire value
472
+ * @throws {Error} Naming the tab: rows that are neither an Array nor a `Dict<String, T>`, or a `drop` over another type than a state's patch
473
+ */
474
+ function statesTab(tab) {
475
+ const rows = rowsOf(tab);
476
+ const drop = dropOf(rows, tab.config.drop);
477
+ if (!isTypeEqual(drop.patch, FlowchartPatchTypeFor(FlowchartStateType))) {
478
+ throw new Error(`Flowchart: ${tabName(tab)}'s \`drop\` returns the fields of the state a card adds — Flowchart.patch(Flowchart.Types.State, { … }) — and this one returns ${printType(drop.patch)}`);
479
+ }
480
+ const cards = cardsOf(rows, tab.config, FlowchartStateCardType, ($, row, key) => {
481
+ const seed = $.const(drop.fn);
482
+ return seed(row, key);
483
+ });
484
+ // The cards' expression is typed loosely here; East checks it against the tab's type.
485
+ return East.value(variant("states", {
486
+ name: tab.config.name === undefined ? none : some(tab.config.name),
487
+ icon: tab.config.icon === undefined ? none : some(tab.config.icon),
488
+ cards,
489
+ }), FlowchartLibraryTabType);
490
+ }
491
+ /**
492
+ * The transition templates on the wire: the tab's name and icon, and its
493
+ * cards, each with what it sets on the transition it lands on — refused, as
494
+ * the card is read, when that is the transition's `key`, `from` or `to`.
495
+ *
496
+ * @param tab - The tab
497
+ * @returns The tab's wire value
498
+ * @throws {Error} Naming the tab: rows that are neither an Array nor a `Dict<String, T>`, or a `drop` over another type than a transition's patch
499
+ */
500
+ function transitionsTab(tab) {
501
+ const rows = rowsOf(tab);
502
+ const drop = dropOf(rows, tab.config.drop);
503
+ if (!isTypeEqual(drop.patch, FlowchartPatchTypeFor(FlowchartLinkType))) {
504
+ throw new Error(`Flowchart: ${tabName(tab)}'s \`drop\` returns the fields a card sets on the transition it lands on — Flowchart.patch(Flowchart.Types.Link, { … }) — and this one returns ${printType(drop.patch)}`);
505
+ }
506
+ const name = tabName(tab);
507
+ const cards = cardsOf(rows, tab.config, FlowchartTransitionCardType, ($, row, key, card) => {
508
+ const retype = $.const(drop.fn);
509
+ const patched = $.let(retype(row, key));
510
+ const sets = patched;
511
+ // A transition card retypes the transition it lands on: never its key, nor its ends.
512
+ const refusal = (field) => East.str `Flowchart: ${name}'s card "${card}" sets a transition's \`${field}\` — a transition card retypes the transition it lands on, its kind, its decision and its other fields, never its key or its ends: leave \`key\`, \`from\` and \`to\` out of its Flowchart.patch`;
513
+ $.if(sets.key.hasTag("some"), ($2) => { $2.error(refusal("key")); });
514
+ $.if(sets.from.hasTag("some"), ($2) => { $2.error(refusal("from")); });
515
+ $.if(sets.to.hasTag("some"), ($2) => { $2.error(refusal("to")); });
516
+ return patched;
517
+ });
518
+ return East.value(variant("transitions", {
519
+ name: tab.config.name === undefined ? none : some(tab.config.name),
520
+ icon: tab.config.icon === undefined ? none : some(tab.config.icon),
521
+ cards,
522
+ }), FlowchartLibraryTabType);
523
+ }
524
+ /**
525
+ * An author's tab on the wire: its name and icon, and its cards by what they
526
+ * land on — the row type of the patch its `drop` returns — or read, never
527
+ * dragged, without one.
528
+ *
529
+ * @param tab - The tab
530
+ * @returns The tab's wire value
531
+ * @throws {Error} Naming the tab: rows that are neither an Array nor a `Dict<String, T>`, or a `drop` over none of a flow's row types
532
+ */
533
+ function authorTab(tab) {
534
+ const rows = rowsOf(tab);
535
+ const config = tab.config;
536
+ // Without a drop, its cards are read, never dragged: they land nowhere.
537
+ let arm = "none";
538
+ let cardType = FlowchartCardType;
539
+ let sets = undefined;
540
+ if (config.drop !== undefined) {
541
+ const drop = dropOf(rows, config.drop);
542
+ const landing = LANDINGS.find(([, rowType]) => isTypeEqual(drop.patch, FlowchartPatchTypeFor(rowType)));
543
+ if (landing === undefined) {
544
+ throw new Error(`Flowchart: ${tabName(tab)}'s \`drop\` returns a patch over one of a flow's rows, its type naming what a card lands on — Flowchart.patch(Flowchart.Types.State, Link, Lane or Trigger, { … }) — and this one returns ${printType(drop.patch)}`);
545
+ }
546
+ [arm, , cardType] = landing;
547
+ sets = ($, row, key) => {
548
+ const setsOf = $.const(drop.fn);
549
+ return setsOf(row, key);
550
+ };
551
+ }
552
+ const lands = East.value(variant(arm, cardsOf(rows, config, cardType, sets)), FlowchartLandsType);
553
+ return East.value(variant("tab", {
554
+ name: config.name,
555
+ icon: config.icon === undefined ? none : some(config.icon),
556
+ lands,
557
+ }), FlowchartLibraryTabType);
558
+ }
559
+ /** The kinds of tab `library` lists. */
560
+ const KINDS = new Set(["flows", "states", "transitions", "tab"]);
561
+ /**
562
+ * The library pane on the wire (`Flowchart Builder Spec.md` §4.2, §4.4, FB16,
563
+ * FB25–FB29): its tabs in the order `library` lists them; none when it is
564
+ * left out, or empty.
565
+ *
566
+ * @param library - The tabs, each a `Flowchart.library.*` call
567
+ * @param many - Whether the flowchart holds flows by name, rather than one flow
568
+ * @returns The tabs on the wire
569
+ * @throws {Error} Naming the tab and the remedy: a `library` that is no list
570
+ * of `Flowchart.library.*` calls; a tab listed twice — the Flows tab, the
571
+ * state templates or the transition templates, or two of the author's tabs
572
+ * of one name; the Flows tab over one flow; and each of a data tab's
573
+ * refusals — rows that are neither an Array nor a `Dict<String, T>`, and a
574
+ * `drop` of another type than its tab's
575
+ * @internal
576
+ */
577
+ export function buildLibrary(library, many) {
578
+ if (library === undefined)
579
+ return East.value([], ArrayType(FlowchartLibraryTabType));
580
+ const LIST = "Flowchart: `library` lists the library pane's tabs, each a Flowchart.library.* call — library={[Flowchart.library.flows()]}";
581
+ if (!Array.isArray(library))
582
+ throw new Error(LIST);
583
+ const seen = new Set();
584
+ const wires = library.map((given) => {
585
+ const tab = given;
586
+ if (tab === null || tab === undefined || typeof tab !== "object" || !KINDS.has(tab.kind)
587
+ || (tab.kind !== "flows" && (typeof tab.config !== "object" || tab.config === null))) {
588
+ throw new Error(LIST);
589
+ }
590
+ // A tab once: the Flows tab and the templates by kind, an author's tab by its name.
591
+ const id = tab.kind === "tab" ? `tab:${tab.config.name}` : tab.kind;
592
+ if (seen.has(id)) {
593
+ throw new Error(tab.kind === "tab"
594
+ ? `Flowchart: the library lists two tabs named "${tab.config.name}" — each tab's name is its own`
595
+ : `Flowchart: the library lists ${tabName(tab)} twice — each tab once`);
596
+ }
597
+ seen.add(id);
598
+ switch (tab.kind) {
599
+ case "flows":
600
+ if (!many) {
601
+ throw new Error(`Flowchart: ${tabName(tab)} lists flows by name, and this \`data\` is one flow, Flowchart.Types.Flow — leave the Flows tab out of \`library\`, or pass the flows by name`);
602
+ }
603
+ return East.value(variant("flows", null), FlowchartLibraryTabType);
604
+ case "states": return statesTab(tab);
605
+ case "transitions": return transitionsTab(tab);
606
+ case "tab": return authorTab(tab);
607
+ }
608
+ });
609
+ return East.value(wires, ArrayType(FlowchartLibraryTabType));
610
+ }
611
+ //# sourceMappingURL=library.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"library.js","sourceRoot":"","sources":["../../../src/flowchart/library.ts"],"names":[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