@elaraai/e3-ui 1.0.103 → 1.0.105

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 (287) hide show
  1. package/dist/src/allocation/functions.d.ts +2 -1
  2. package/dist/src/allocation/functions.d.ts.map +1 -1
  3. package/dist/src/allocation/functions.js +3 -2
  4. package/dist/src/allocation/functions.js.map +1 -1
  5. package/dist/src/allocation/index.d.ts +120 -1
  6. package/dist/src/allocation/index.d.ts.map +1 -1
  7. package/dist/src/allocation/index.js +24 -4
  8. package/dist/src/allocation/index.js.map +1 -1
  9. package/dist/src/bind/data-indexed.d.ts +25 -4
  10. package/dist/src/bind/data-indexed.d.ts.map +1 -1
  11. package/dist/src/bind/data-indexed.js +58 -7
  12. package/dist/src/bind/data-indexed.js.map +1 -1
  13. package/dist/src/bind/data.d.ts +12 -14
  14. package/dist/src/bind/data.d.ts.map +1 -1
  15. package/dist/src/bind/data.js +11 -11
  16. package/dist/src/bind/data.js.map +1 -1
  17. package/dist/src/bind/func.d.ts +7 -2
  18. package/dist/src/bind/func.d.ts.map +1 -1
  19. package/dist/src/bind/func.js +10 -3
  20. package/dist/src/bind/func.js.map +1 -1
  21. package/dist/src/calendar/index.d.ts +148 -1
  22. package/dist/src/calendar/index.d.ts.map +1 -1
  23. package/dist/src/calendar/index.js +55 -5
  24. package/dist/src/calendar/index.js.map +1 -1
  25. package/dist/src/flowchart/canvas.d.ts +32 -14
  26. package/dist/src/flowchart/canvas.d.ts.map +1 -1
  27. package/dist/src/flowchart/canvas.js +21 -6
  28. package/dist/src/flowchart/canvas.js.map +1 -1
  29. package/dist/src/flowchart/details.d.ts +469 -0
  30. package/dist/src/flowchart/details.d.ts.map +1 -0
  31. package/dist/src/flowchart/details.js +1035 -0
  32. package/dist/src/flowchart/details.js.map +1 -0
  33. package/dist/src/flowchart/flowchart.d.ts +16 -72
  34. package/dist/src/flowchart/flowchart.d.ts.map +1 -1
  35. package/dist/src/flowchart/flowchart.js +10 -1
  36. package/dist/src/flowchart/flowchart.js.map +1 -1
  37. package/dist/src/flowchart/index.d.ts +282 -251
  38. package/dist/src/flowchart/index.d.ts.map +1 -1
  39. package/dist/src/flowchart/index.js +234 -220
  40. package/dist/src/flowchart/index.js.map +1 -1
  41. package/dist/src/flowchart/kinds.d.ts +438 -0
  42. package/dist/src/flowchart/kinds.d.ts.map +1 -0
  43. package/dist/src/flowchart/kinds.js +799 -0
  44. package/dist/src/flowchart/kinds.js.map +1 -0
  45. package/dist/src/flowchart/library.d.ts +154 -739
  46. package/dist/src/flowchart/library.d.ts.map +1 -1
  47. package/dist/src/flowchart/library.js +191 -673
  48. package/dist/src/flowchart/library.js.map +1 -1
  49. package/dist/src/flowchart/payload.d.ts +3652 -7843
  50. package/dist/src/flowchart/payload.d.ts.map +1 -1
  51. package/dist/src/flowchart/payload.js +331 -469
  52. package/dist/src/flowchart/payload.js.map +1 -1
  53. package/dist/src/flowchart/templates.d.ts +657 -0
  54. package/dist/src/flowchart/templates.d.ts.map +1 -0
  55. package/dist/src/flowchart/templates.js +658 -0
  56. package/dist/src/flowchart/templates.js.map +1 -0
  57. package/dist/src/flowchart/types.d.ts +2258 -214
  58. package/dist/src/flowchart/types.d.ts.map +1 -1
  59. package/dist/src/flowchart/types.js +374 -124
  60. package/dist/src/flowchart/types.js.map +1 -1
  61. package/dist/src/index.d.ts +13 -15
  62. package/dist/src/index.d.ts.map +1 -1
  63. package/dist/src/index.js +24 -29
  64. package/dist/src/index.js.map +1 -1
  65. package/dist/src/internal.d.ts +5 -7
  66. package/dist/src/internal.d.ts.map +1 -1
  67. package/dist/src/internal.js +12 -19
  68. package/dist/src/internal.js.map +1 -1
  69. package/dist/src/ontology/index.d.ts +44 -15
  70. package/dist/src/ontology/index.d.ts.map +1 -1
  71. package/dist/src/ontology/index.js +19 -11
  72. package/dist/src/ontology/index.js.map +1 -1
  73. package/dist/src/plan/event-rows.d.ts +2 -1
  74. package/dist/src/plan/event-rows.d.ts.map +1 -1
  75. package/dist/src/plan/event-rows.js +6 -4
  76. package/dist/src/plan/event-rows.js.map +1 -1
  77. package/dist/src/plan/ir.d.ts +1 -0
  78. package/dist/src/plan/ir.d.ts.map +1 -1
  79. package/dist/src/plan/plan.d.ts +145 -1
  80. package/dist/src/plan/plan.d.ts.map +1 -1
  81. package/dist/src/plan/plan.js +67 -3
  82. package/dist/src/plan/plan.js.map +1 -1
  83. package/dist/src/plan/types.d.ts +1 -0
  84. package/dist/src/plan/types.d.ts.map +1 -1
  85. package/dist/src/query/builder.d.ts +362 -315
  86. package/dist/src/query/builder.d.ts.map +1 -1
  87. package/dist/src/query/builder.js +12 -1
  88. package/dist/src/query/builder.js.map +1 -1
  89. package/dist/src/query/index.d.ts +5 -1
  90. package/dist/src/query/index.d.ts.map +1 -1
  91. package/dist/src/query/index.js +3 -1
  92. package/dist/src/query/index.js.map +1 -1
  93. package/dist/src/roster/fit.d.ts +5 -2
  94. package/dist/src/roster/fit.d.ts.map +1 -1
  95. package/dist/src/roster/fit.js +5 -3
  96. package/dist/src/roster/fit.js.map +1 -1
  97. package/dist/src/roster/index.d.ts +103 -2
  98. package/dist/src/roster/index.d.ts.map +1 -1
  99. package/dist/src/roster/index.js +45 -6
  100. package/dist/src/roster/index.js.map +1 -1
  101. package/dist/src/runtime/index.d.ts +1 -3
  102. package/dist/src/runtime/index.d.ts.map +1 -1
  103. package/dist/src/runtime/index.js +1 -3
  104. package/dist/src/runtime/index.js.map +1 -1
  105. package/dist/src/schedule/record-window.d.ts +1 -0
  106. package/dist/src/schedule/record-window.d.ts.map +1 -1
  107. package/dist/src/schematic/index.d.ts +1 -1
  108. package/dist/src/schematic/index.d.ts.map +1 -1
  109. package/dist/src/schematic/index.js +1 -1
  110. package/dist/src/schematic/index.js.map +1 -1
  111. package/dist/src/schematic/kinds.d.ts +4 -24
  112. package/dist/src/schematic/kinds.d.ts.map +1 -1
  113. package/dist/src/schematic/kinds.js +8 -212
  114. package/dist/src/schematic/kinds.js.map +1 -1
  115. package/dist/src/schematic/payload.d.ts +140 -1
  116. package/dist/src/schematic/payload.d.ts.map +1 -1
  117. package/dist/src/schematic/payload.js +38 -1
  118. package/dist/src/schematic/payload.js.map +1 -1
  119. package/dist/src/schematic/types.d.ts.map +1 -1
  120. package/dist/src/schematic/types.js +4 -36
  121. package/dist/src/schematic/types.js.map +1 -1
  122. package/dist/src/schematic/window.d.ts +9 -42
  123. package/dist/src/schematic/window.d.ts.map +1 -1
  124. package/dist/src/schematic/window.js +10 -115
  125. package/dist/src/schematic/window.js.map +1 -1
  126. package/dist/src/sheet/actions.d.ts +388 -0
  127. package/dist/src/sheet/actions.d.ts.map +1 -0
  128. package/dist/src/sheet/actions.js +594 -0
  129. package/dist/src/sheet/actions.js.map +1 -0
  130. package/dist/src/sheet/bridge.d.ts +12 -1
  131. package/dist/src/sheet/bridge.d.ts.map +1 -1
  132. package/dist/src/sheet/bridge.js +30 -6
  133. package/dist/src/sheet/bridge.js.map +1 -1
  134. package/dist/src/sheet/columns.d.ts +5 -2
  135. package/dist/src/sheet/columns.d.ts.map +1 -1
  136. package/dist/src/sheet/columns.js.map +1 -1
  137. package/dist/src/sheet/draft-bridge.d.ts +9 -4
  138. package/dist/src/sheet/draft-bridge.d.ts.map +1 -1
  139. package/dist/src/sheet/draft-bridge.js +22 -7
  140. package/dist/src/sheet/draft-bridge.js.map +1 -1
  141. package/dist/src/sheet/fields.d.ts +13 -0
  142. package/dist/src/sheet/fields.d.ts.map +1 -1
  143. package/dist/src/sheet/fields.js +3 -0
  144. package/dist/src/sheet/fields.js.map +1 -1
  145. package/dist/src/sheet/index.d.ts +32 -2
  146. package/dist/src/sheet/index.d.ts.map +1 -1
  147. package/dist/src/sheet/index.js +18 -3
  148. package/dist/src/sheet/index.js.map +1 -1
  149. package/dist/src/sheet/library.d.ts +8 -0
  150. package/dist/src/sheet/library.d.ts.map +1 -1
  151. package/dist/src/sheet/root.d.ts +23 -1
  152. package/dist/src/sheet/root.d.ts.map +1 -1
  153. package/dist/src/sheet/root.js +40 -5
  154. package/dist/src/sheet/root.js.map +1 -1
  155. package/dist/src/sheet/sheet.d.ts +7843 -4132
  156. package/dist/src/sheet/sheet.d.ts.map +1 -1
  157. package/dist/src/sheet/sheet.js +41 -2
  158. package/dist/src/sheet/sheet.js.map +1 -1
  159. package/dist/src/sheet/templates.d.ts +4 -0
  160. package/dist/src/sheet/templates.d.ts.map +1 -1
  161. package/dist/src/sheet/types.d.ts +12449 -5268
  162. package/dist/src/sheet/types.d.ts.map +1 -1
  163. package/dist/src/sheet/types.js +114 -2
  164. package/dist/src/sheet/types.js.map +1 -1
  165. package/dist/src/utils/derive.d.ts +1 -1
  166. package/dist/src/utils/derive.js +1 -1
  167. package/dist/src/utils/record-kind.d.ts +625 -0
  168. package/dist/src/utils/record-kind.d.ts.map +1 -0
  169. package/dist/src/utils/record-kind.js +450 -0
  170. package/dist/src/utils/record-kind.js.map +1 -0
  171. package/dist/src/utils/views.d.ts +55 -0
  172. package/dist/src/utils/views.d.ts.map +1 -0
  173. package/dist/src/utils/views.js +72 -0
  174. package/dist/src/utils/views.js.map +1 -0
  175. package/dist/src/utils/vocabulary.d.ts +48 -0
  176. package/dist/src/utils/vocabulary.d.ts.map +1 -0
  177. package/dist/src/utils/vocabulary.js +47 -0
  178. package/dist/src/utils/vocabulary.js.map +1 -0
  179. package/dist/test/allocation/allocation.examples.d.ts +2 -0
  180. package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
  181. package/dist/test/allocation/allocation.examples.js +81 -2
  182. package/dist/test/allocation/allocation.examples.js.map +1 -1
  183. package/dist/test/bind/func/func.examples.d.ts +19 -1
  184. package/dist/test/bind/func/func.examples.d.ts.map +1 -1
  185. package/dist/test/bind/func/func.examples.js +36 -1
  186. package/dist/test/bind/func/func.examples.js.map +1 -1
  187. package/dist/test/calendar/calendar.examples.d.ts +2 -0
  188. package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
  189. package/dist/test/calendar/calendar.examples.js +80 -2
  190. package/dist/test/calendar/calendar.examples.js.map +1 -1
  191. package/dist/test/decision/queue.examples.d.ts +1 -0
  192. package/dist/test/decision/queue.examples.d.ts.map +1 -1
  193. package/dist/test/decision/queue.examples.js +12 -0
  194. package/dist/test/decision/queue.examples.js.map +1 -1
  195. package/dist/test/examples-package.d.ts.map +1 -1
  196. package/dist/test/examples-package.js +5 -4
  197. package/dist/test/examples-package.js.map +1 -1
  198. package/dist/test/flowchart/flowchart.examples.d.ts +1250 -4605
  199. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
  200. package/dist/test/flowchart/flowchart.examples.js +861 -512
  201. package/dist/test/flowchart/flowchart.examples.js.map +1 -1
  202. package/dist/test/ontology/ontology.examples.d.ts +2 -3
  203. package/dist/test/ontology/ontology.examples.d.ts.map +1 -1
  204. package/dist/test/ontology/ontology.examples.js +32 -21
  205. package/dist/test/ontology/ontology.examples.js.map +1 -1
  206. package/dist/test/plan/plan-events.examples.d.ts +1 -0
  207. package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
  208. package/dist/test/plan/plan-events.examples.js +44 -0
  209. package/dist/test/plan/plan-events.examples.js.map +1 -1
  210. package/dist/test/plan/plan-nested.examples.d.ts +2 -2
  211. package/dist/test/plan/plan-nested.examples.js +5 -5
  212. package/dist/test/plan/plan-nested.examples.js.map +1 -1
  213. package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
  214. package/dist/test/plan/plan-records.examples.js +1 -1
  215. package/dist/test/plan/plan-records.examples.js.map +1 -1
  216. package/dist/test/query/query.examples.d.ts +2 -0
  217. package/dist/test/query/query.examples.d.ts.map +1 -1
  218. package/dist/test/query/query.examples.js +37 -1
  219. package/dist/test/query/query.examples.js.map +1 -1
  220. package/dist/test/roster/roster.examples.d.ts +2 -0
  221. package/dist/test/roster/roster.examples.d.ts.map +1 -1
  222. package/dist/test/roster/roster.examples.js +76 -15
  223. package/dist/test/roster/roster.examples.js.map +1 -1
  224. package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -1
  225. package/dist/test/schematic/schematic-records.examples.js +6 -4
  226. package/dist/test/schematic/schematic-records.examples.js.map +1 -1
  227. package/dist/test/schematic/schematic.examples.d.ts +1 -0
  228. package/dist/test/schematic/schematic.examples.d.ts.map +1 -1
  229. package/dist/test/schematic/schematic.examples.js +144 -0
  230. package/dist/test/schematic/schematic.examples.js.map +1 -1
  231. package/dist/test/sheet/sheet-actions.examples.d.ts +1264 -0
  232. package/dist/test/sheet/sheet-actions.examples.d.ts.map +1 -0
  233. package/dist/test/sheet/sheet-actions.examples.js +394 -0
  234. package/dist/test/sheet/sheet-actions.examples.js.map +1 -0
  235. package/dist/test/sheet/sheet.examples.d.ts +1 -0
  236. package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
  237. package/dist/test/sheet/sheet.examples.js +77 -0
  238. package/dist/test/sheet/sheet.examples.js.map +1 -1
  239. package/dist/test/studio/studio.examples.d.ts +1 -0
  240. package/dist/test/studio/studio.examples.d.ts.map +1 -1
  241. package/dist/test/studio/studio.examples.js +18 -8
  242. package/dist/test/studio/studio.examples.js.map +1 -1
  243. package/package.json +12 -12
  244. package/dist/src/diff/index.d.ts +0 -407
  245. package/dist/src/diff/index.d.ts.map +0 -1
  246. package/dist/src/diff/index.js +0 -203
  247. package/dist/src/diff/index.js.map +0 -1
  248. package/dist/src/experiment/index.d.ts +0 -1033
  249. package/dist/src/experiment/index.d.ts.map +0 -1
  250. package/dist/src/experiment/index.js +0 -197
  251. package/dist/src/experiment/index.js.map +0 -1
  252. package/dist/src/experiment/types.d.ts +0 -1093
  253. package/dist/src/experiment/types.d.ts.map +0 -1
  254. package/dist/src/experiment/types.js +0 -423
  255. package/dist/src/experiment/types.js.map +0 -1
  256. package/dist/src/flowchart/over.d.ts +0 -227
  257. package/dist/src/flowchart/over.d.ts.map +0 -1
  258. package/dist/src/flowchart/over.js +0 -213
  259. package/dist/src/flowchart/over.js.map +0 -1
  260. package/dist/src/flowchart/patch.d.ts +0 -64
  261. package/dist/src/flowchart/patch.d.ts.map +0 -1
  262. package/dist/src/flowchart/patch.js +0 -67
  263. package/dist/src/flowchart/patch.js.map +0 -1
  264. package/dist/src/flowchart/values.d.ts +0 -271
  265. package/dist/src/flowchart/values.d.ts.map +0 -1
  266. package/dist/src/flowchart/values.js +0 -220
  267. package/dist/src/flowchart/values.js.map +0 -1
  268. package/dist/src/flowchart/window.d.ts +0 -306
  269. package/dist/src/flowchart/window.d.ts.map +0 -1
  270. package/dist/src/flowchart/window.js +0 -63
  271. package/dist/src/flowchart/window.js.map +0 -1
  272. package/dist/src/runtime/diff.d.ts +0 -36
  273. package/dist/src/runtime/diff.d.ts.map +0 -1
  274. package/dist/src/runtime/diff.js +0 -34
  275. package/dist/src/runtime/diff.js.map +0 -1
  276. package/dist/src/runtime/experiment.d.ts +0 -48
  277. package/dist/src/runtime/experiment.d.ts.map +0 -1
  278. package/dist/src/runtime/experiment.js +0 -10
  279. package/dist/src/runtime/experiment.js.map +0 -1
  280. package/dist/test/diff/diff.examples.d.ts +0 -313
  281. package/dist/test/diff/diff.examples.d.ts.map +0 -1
  282. package/dist/test/diff/diff.examples.js +0 -452
  283. package/dist/test/diff/diff.examples.js.map +0 -1
  284. package/dist/test/experiment/experiment.examples.d.ts +0 -1512
  285. package/dist/test/experiment/experiment.examples.d.ts.map +0 -1
  286. package/dist/test/experiment/experiment.examples.js +0 -609
  287. package/dist/test/experiment/experiment.examples.js.map +0 -1
@@ -3,275 +3,282 @@
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
5
  /**
6
- * The Flowchart (#1243–#1250): the state-transition flowchart, e3-ui's as the
7
- * Plan (#1177) and the Sheet (#1179) are. `<Flowchart>` takes its flows from
8
- * an e3 record of flows by name, or from the host — flows by name, or one
9
- * flow — and returns its payload through the `Flowchart` carrier, which
10
- * e3-ui-components' renderer draws in its builder frame and edits through its
11
- * editing session.
6
+ * The Flowchart (#1498): the state-transition flowchart over the app's own
7
+ * records, e3-ui's as the Plan, the Sheet and the Schematic are.
8
+ * `<Flowchart>` declares its kinds over the app's records — its states, and
9
+ * beside them its transitions, lanes and decisions, each record's fields
10
+ * mapped to the Flowchart's roles — and returns its payload through the
11
+ * `Flowchart` carrier, which e3-ui-components' renderer draws in its builder
12
+ * frame and edits through its editing session.
12
13
  *
13
- * - `types.ts` — the flow, the record of flows, and the row and closed-set
14
- * types (`Flowchart.Types.*`).
15
- * - `values.ts` — `Flowchart.value` and `Flowchart.values`, a record's value
16
- * written as literals and checked when the package builds.
17
- * - `over.ts` — `Flowchart.over`, one flow from an app's own tables.
18
- * - `patch.ts` — `Flowchart.patch`, a patch over one of a flow's rows.
19
- * - `library.ts` — `Flowchart.library`, the library pane's tabs — the Flows
20
- * tab, the state and transition templates and the author's tabs, each
21
- * reading its own rows and following the source of the slice it names —
22
- * and their wire.
23
- * - `canvas.ts` — the canvas: what the flowchart draws its flow with.
24
- * - `window.ts` — the `flows` source of its slice: the Flows tab's pages, a
25
- * flow read by its name, and the tab's own search (#1346).
14
+ * - `types.ts` — the value types its accessors return and its canvas
15
+ * carries, and the kinds' wire (`Flowchart.Types.*`).
16
+ * - `kinds.ts` — `Flowchart.states`, `transitions`, `lanes` and
17
+ * `decisions`: each role's check, the binding a kind's read takes, and the
18
+ * closed functions over beast2 bytes.
19
+ * - `details.ts` — `Flowchart.details` and its four reads, `Flowchart.figure`,
20
+ * `.histogram`, `.list` and `.tags`: a state's or a transition's details
21
+ * over the app's rows, read as the kind is.
22
+ * - `templates.ts` — `Flowchart.templates`, a kind's cards read from a
23
+ * record.
24
+ * - `library.ts` — `Flowchart.library`, the library pane's tabs, and their
25
+ * wire.
26
+ * - `canvas.ts` — the canvas: what the Flowchart draws with besides its kinds.
26
27
  * - `payload.ts` — the payload, its carrier, the shared keys, the props and
27
28
  * their refusals.
28
29
  * - `flowchart.ts` — the tag.
29
30
  *
30
31
  * @packageDocumentation
31
32
  */
32
- import { type FlowchartTagType } from "./flowchart.js";
33
+ import { SchedulePatchTypeFor, schedulePatch } from "../schedule/patch.js";
33
34
  import { FlowchartCanvasType } from "./canvas.js";
34
- import { FlowchartCardType, FlowchartDecisionCardType, FlowchartLandsType, FlowchartLaneCardType, FlowchartLibraryTabType, FlowchartStateCardType, FlowchartTransitionCardType, type FlowchartLibrary } from "./library.js";
35
- import { flowchartOver } from "./over.js";
36
- import { FlowchartPatchTypeFor, flowchartPatch } from "./patch.js";
37
- import { FlowchartComponent, FlowchartDataType, FlowchartFlowsHandleType, FlowchartInspectorType, FlowchartPayloadType, FlowchartSessionApplyType, FlowchartSourceType, createFlowchartPayload } from "./payload.js";
38
- import { FlowchartEvidenceType, FlowchartFlowType, FlowchartFlowsType, FlowchartFreshnessType, FlowchartLaneType, FlowchartLinkKindType, FlowchartLinkType, FlowchartOrientationType, FlowchartStateType, FlowchartTriggerType } from "./types.js";
39
- import { flowchartValue, flowchartValues } from "./values.js";
35
+ import { flowchartDetails, flowchartFigure, flowchartHistogram, flowchartList, flowchartTags } from "./details.js";
36
+ import { type FlowchartTagType } from "./flowchart.js";
37
+ import { flowchartDecisions, flowchartLanes, flowchartStates, flowchartTransitions } from "./kinds.js";
38
+ import { FlowchartKindTabWireType, FlowchartLibraryTabType, type FlowchartLibrary } from "./library.js";
39
+ import { FlowchartComponent, FlowchartPayloadType, createFlowchartPayload } from "./payload.js";
40
+ import { flowchartTemplates } from "./templates.js";
41
+ import { FlowchartDecisionEntryType, FlowchartDecisionKindType, FlowchartDecisionRolesType, FlowchartDetailRowType, FlowchartDetailsType, FlowchartEvidenceType, FlowchartFreshnessType, FlowchartLaneEntryType, FlowchartLaneKindType, FlowchartLaneRolesType, FlowchartLaneWriteType, FlowchartLinkKindType, FlowchartNarrowedType, FlowchartOrientationType, FlowchartReadType, FlowchartShowType, FlowchartStateEntryType, FlowchartStateKindType, FlowchartStateRolesType, FlowchartStateWriteType, FlowchartTagColorType, FlowchartTemplateType, FlowchartTransitionEntryType, FlowchartTransitionKindType, FlowchartTransitionRolesType, FlowchartTransitionWriteType, FlowchartWeighedType } from "./types.js";
40
42
  export { FlowchartTag, type FlowchartTagType } from "./flowchart.js";
41
43
  export { FlowchartCanvasType, buildCanvas, type FlowchartCanvasOptions, type FlowchartFreshnessInput, type FlowchartOrientationLiteral, } from "./canvas.js";
42
- export { flowchartOver, type RowElement, type FlowchartTables, type FlowchartStateFields, type FlowchartLinkFields, type FlowchartLaneFields, type FlowchartTriggerFields, type FlowchartEvidenceFields, type FlowchartLaneLiteral, } from "./over.js";
43
- export { FlowchartPatchTypeFor, flowchartPatch, type FlowchartRowType, type FlowchartPatchOf, type FlowchartPatchInput } from "./patch.js";
44
- export { FlowchartCardType, FlowchartDecisionCardType, FlowchartLandsType, FlowchartLaneCardType, FlowchartLibraryFactories, FlowchartLibraryTabType, FlowchartStateCardType, FlowchartTransitionCardType, buildLibrary as buildFlowchartLibrary, libraryFlows, libraryStates, libraryTab, libraryTransitions, type FlowchartAuthorTab, type FlowchartCardAccessors, type FlowchartFlowsTab, type FlowchartLibrary, type FlowchartLibraryRows, type FlowchartLibraryTab, type FlowchartOneFlowLibraryTab, type FlowchartStatesConfig, type FlowchartStatesTab, type FlowchartTabConfig, type FlowchartTemplateRows, type FlowchartTransitionsConfig, type FlowchartTransitionsTab, } from "./library.js";
45
- export { FlowchartComponent, FlowchartDataType, FlowchartFlowApplyType, FlowchartFlowsApplyType, FlowchartFlowsHandleType, FlowchartHistoryType, FlowchartInspectorType, FlowchartPayloadType, FlowchartSessionApplyType, FlowchartSourceType, createFlowchartPayload, flowchartKeys, type FlowchartBindHandle, type FlowchartCommon, type FlowchartInspectorOptions, type FlowchartRecordHandle, type FlowchartRowInspector, } from "./payload.js";
46
- export { flowchartValue, flowchartValues, type FlowchartFlowInput, type FlowchartLaneInput, type FlowchartStateInput, type FlowchartLinkInput, type FlowchartEvidenceInput, type FlowchartTriggerInput, type FlowchartLinkKindLiteral, } from "./values.js";
47
- /** The East types a flowchart is written with — `Flowchart.Types`. */
44
+ export { FLOWCHART_DEF, flowchartDecisions, flowchartLanes, flowchartStates, flowchartTransitions, isFlowchartKind, type FlowchartBinding, type FlowchartDecisions, type FlowchartDecisionsSpec, type FlowchartKeyField, type FlowchartKeysField, type FlowchartKindDeclaration, type FlowchartKindSort, type FlowchartLanes, type FlowchartLanesSpec, type FlowchartOrderField, type FlowchartStates, type FlowchartStatesSpec, type FlowchartTextField, type FlowchartTransitions, type FlowchartTransitionsSpec, type FlowchartValuesOf, type FlowchartWholeBinding, } from "./kinds.js";
45
+ export { FLOWCHART_DETAILS, FlowchartDetailsBrand, FlowchartReadBrand, flowchartDetails, flowchartFigure, flowchartHistogram, flowchartList, flowchartTags, isFlowchartDetails, type FlowchartBarScale, type FlowchartDetails, type FlowchartDetailsBinding, type FlowchartDetailsSpec, type FlowchartDurationUnit, type FlowchartFigureField, type FlowchartHistogramField, type FlowchartHistogramOptions, type FlowchartLabelDraws, type FlowchartLegendOnCanvas, type FlowchartListField, type FlowchartListItem, type FlowchartRead, type FlowchartReadKind, type FlowchartShow, type FlowchartTagColor, type FlowchartTagsField, type FlowchartTick, type FlowchartTransitionDetailsSpec, } from "./details.js";
46
+ export { FLOWCHART_TEMPLATES, checkedFlowchartTemplates, flowchartTemplates, isFlowchartTemplates, type FlowchartTemplates, type FlowchartTemplatesSpec, } from "./templates.js";
47
+ export { FlowchartKindTabWireType, FlowchartLibraryCardType, FlowchartLibraryFactories, FlowchartLibraryTabType, buildFlowchartLibrary, flowchartTabSources, libraryLanes, libraryStates, libraryTab, libraryTransitions, type FlowchartAuthorTab, type FlowchartCardKind, type FlowchartKindTab, type FlowchartKindTabOptions, type FlowchartLibrary, type FlowchartLibraryContext, type FlowchartLibraryKind, type FlowchartLibraryRows, type FlowchartLibraryTab, type FlowchartTabConfig, } from "./library.js";
48
+ export { FlowchartComponent, FlowchartPayloadType, createFlowchartPayload, flowchartKeys, type FlowchartProps, } from "./payload.js";
49
+ /** The East types a Flowchart is written with — `Flowchart.Types`. */
48
50
  export interface FlowchartTypes {
49
- /** One flow: its lanes, states, transitions and decisions, and a sentence about it ({@link FlowchartFlowType}). */
50
- Flow: typeof FlowchartFlowType;
51
- /** A record of flows, by name ({@link FlowchartFlowsType}). */
52
- Flows: typeof FlowchartFlowsType;
53
- /** One state node ({@link FlowchartStateType}). */
54
- State: typeof FlowchartStateType;
55
- /** One transition ({@link FlowchartLinkType}). */
56
- Link: typeof FlowchartLinkType;
57
- /** One ordered phase band ({@link FlowchartLaneType}). */
58
- Lane: typeof FlowchartLaneType;
59
- /** One decision trigger ({@link FlowchartTriggerType}). */
60
- Trigger: typeof FlowchartTriggerType;
61
- /** Imported link evidence ({@link FlowchartEvidenceType}). */
51
+ /** A transition's evidence: its volume, its count, when it was measured and its unit ({@link FlowchartEvidenceType}). */
62
52
  Evidence: typeof FlowchartEvidenceType;
63
- /** Link kind — planned | observed ({@link FlowchartLinkKindType}). */
53
+ /** A transition's kind — planned | observed ({@link FlowchartLinkKindType}). */
64
54
  Kind: typeof FlowchartLinkKindType;
65
- /** Canvas orientation — LR | TD ({@link FlowchartOrientationType}). */
55
+ /** The canvas's orientation — LR | TD ({@link FlowchartOrientationType}). */
66
56
  Orientation: typeof FlowchartOrientationType;
67
57
  /** The toolbar's freshness chip ({@link FlowchartFreshnessType}). */
68
58
  Freshness: typeof FlowchartFreshnessType;
69
- /** `Patch(R)` — a patch over one of a flow's rows, every field an `Option` ({@link FlowchartPatchTypeFor}). */
70
- Patch: typeof FlowchartPatchTypeFor;
59
+ /** `Patch(R)` — a patch over a kind's row type, every field an `Option` ({@link SchedulePatchTypeFor}). */
60
+ Patch: typeof SchedulePatchTypeFor;
61
+ /**
62
+ * A tag's look — its palette and variant, the pair a Tag takes — for an app that keeps its tags' looks as data
63
+ * ({@link FlowchartTagColorType}).
64
+ */
65
+ TagColor: typeof FlowchartTagColorType;
71
66
  }
72
67
  /**
73
- * The type of the {@link Flowchart} namespace: `<Flowchart>`, the values and
74
- * patches a flowchart is written with, and its East types.
68
+ * The type of the {@link Flowchart} namespace: `<Flowchart>`, its kinds, its
69
+ * cards, its patches, its library's tabs and its East types.
75
70
  */
76
71
  export interface FlowchartNamespace extends FlowchartTagType {
77
- /** One flow's value — written as a literal and checked when the package builds ({@link flowchartValue}). */
78
- value: typeof flowchartValue;
79
- /** A record of flows' value, by name — each flow written as a literal and checked when the package builds ({@link flowchartValues}). */
80
- values: typeof flowchartValues;
81
- /** One flow built from an app's own tables, through their row mappers ({@link flowchartOver}). */
82
- over: typeof flowchartOver;
83
- /** A patch over one of a flow's rows ({@link flowchartPatch}). */
84
- patch: typeof flowchartPatch;
72
+ /** The states, over the app's record ({@link flowchartStates}). */
73
+ states: typeof flowchartStates;
74
+ /** The transitions between them, over the app's record ({@link flowchartTransitions}). */
75
+ transitions: typeof flowchartTransitions;
76
+ /** The lanes, the canvas's columns, over a small record of the app's ({@link flowchartLanes}). */
77
+ lanes: typeof flowchartLanes;
78
+ /** The decisions, over a small record of the app's ({@link flowchartDecisions}). */
79
+ decisions: typeof flowchartDecisions;
80
+ /** A state's or a transition's details, over the app's rows keyed as the kind's are, read only ({@link flowchartDetails}). */
81
+ details: typeof flowchartDetails;
82
+ /** A details' figure: a number, or an Option of one ({@link flowchartFigure}). */
83
+ figure: typeof flowchartFigure;
84
+ /** A details' histogram: a Dict from a duration to its count, or an Array of counts beside the app's bins ({@link flowchartHistogram}). */
85
+ histogram: typeof flowchartHistogram;
86
+ /** A details' list: a Dict from an item's name to a number, or to a struct its draw reads ({@link flowchartList}). */
87
+ list: typeof flowchartList;
88
+ /** A details' tags: an Array or a Set of strings, in the app's looks ({@link flowchartTags}). */
89
+ tags: typeof flowchartTags;
90
+ /** A kind's cards, read from a record ({@link flowchartTemplates}). */
91
+ templates: typeof flowchartTemplates;
92
+ /** A patch over a kind's row type: what an author's card dropped on a row sets ({@link schedulePatch}). */
93
+ patch: typeof schedulePatch;
85
94
  /** The library pane's tabs, each a factory `library` lists ({@link FlowchartLibrary}). */
86
95
  library: FlowchartLibrary;
87
- /** The East types a flowchart is written with ({@link FlowchartTypes}). */
96
+ /** The East types a Flowchart is written with ({@link FlowchartTypes}). */
88
97
  Types: FlowchartTypes;
89
98
  }
90
99
  /**
91
- * `<Flowchart>` — the state-transition flowchart: states as nodes in ordered
92
- * phase lanes (the layout derived, no coordinates), H/V-routed transitions,
93
- * decision triggers (lettered diamonds) and evidence-weighted strokes. The
94
- * selection — a state, a transition, a decision, a lane by its header, or
95
- * several states — and the pointer-highlight grammar are built in, and the
96
- * inspector shows what is selected.
100
+ * `<Flowchart>` — one state-transition flowchart over the app's own records:
101
+ * its states as cards in ordered lanes (the layout derived, no coordinates),
102
+ * H/V-routed transitions between them, the decisions that govern them as
103
+ * lettered diamonds, and evidence-weighted strokes. The selection — a state,
104
+ * a transition, a decision, a lane by its header, or several states — and the
105
+ * pointer-highlight grammar are built in, and the inspector shows what is
106
+ * selected.
97
107
  *
98
108
  * @remarks
99
- * - **Its frame**: it renders in its builder frame wherever it is used — one
100
- * toolbar (find state, LR · TD, the freshness chip, the slice's rail and,
101
- * where it edits, the history item), the canvas filling main and scrolling
102
- * both ways inside it, and the footer's counts; a library pane when
103
- * `library` lists tabs, and the inspector pane unless `inspector={false}`.
104
- * It fills the box it is given and draws no border: give it a box of its
105
- * own height.
106
- * - **Its inspector** (#1250, on by default, ruled by the user on
107
- * 2026-10-08): the end pane, Details and Issues — Issues with its count, and
108
- * collapsed a rail with its icon and the issue count. Details shows what is
109
- * selected through its form, every field by the shared input its type
110
- * takes: a state (its key — a new one rekeying its transitions and the
111
- * decisions' queues — label, lane, members and notes; its transitions in and
112
- * out, each selecting it; Duplicate, Delete), a transition (its ends, its
113
- * kind, its decision and its key; its evidence read only; Delete), a
114
- * decision (its fields, its queue as tags over the flow's states; the
115
- * transitions it governs; Delete), a lane — a click on its header selects
116
- * it — (its key, which moves its states, and its label; its states' count;
117
- * Delete while it holds none), several states (their count; moved to a
118
- * lane, or deleted, together) or, with nothing selected, the open flow (its
119
- * name and description — a new name renames it — Duplicate and Delete over
120
- * many flows; its counts, its last save and who made it, and three hints).
121
- * Each edit is one transaction, a field the drafts changed tinted against
122
- * the record; read only, Details shows every field and edits none. Issues
123
- * lists a transition naming a missing state, a state naming a missing lane,
124
- * two of one key — which holds Save off — a decision's queue naming a
125
- * missing state, and a Save's conflict or refusal, a click selecting what
126
- * each names. `inspector={{ state, transition }}` gives a kind its own
127
- * Details in place of its form: an East function over the row and its
128
- * writer, `update` writing the edited row back as one transaction. The
129
- * hover cards went: the inspector is where details live.
130
- * - **Its open flow**, over many flows: `flow`, else the first by name, until
131
- * the viewer opens another — from the Flows tab
132
- * (`Flowchart.library.flows()`), which lists every flow by name — kept in
133
- * the UI store under its `name`, so a remount opens it again; a `flow` it
134
- * doesn't hold is named in a banner above main. LR · TD is the viewer's
135
- * too, kept under its `name`. Where it edits, "+ New flow" names a new
136
- * flow, opened empty with one lane; each flow keeps its own drafts until
137
- * the history item saves or discards them.
138
- * - **Its library** (#1248): the tabs `library` lists, in its order, each with
139
- * its count and a search — the Flows tab; state templates
140
- * (`Flowchart.library.states(rows, …)`) and transition templates
141
- * (`Flowchart.library.transitions(rows, …)`), each card a drag source; and
142
- * the author's own cards (`Flowchart.library.tab(rows, …)`), a drag source
143
- * when the tab declares a `drop`. Each data tab reads its own rows apart
144
- * from the flows and from the other tabs. Templates are records (#1340,
145
- * ruling 9): each list's rows are its record's (`Data.bind(record).read()`,
146
- * a `Dict<String, T>`), and it names its `source` of the slice. An author's
147
- * tab reads an Array or a `Dict<String, T>`, and naming a `source` follows
148
- * it. A click selects a card, and a click on the selected card lets it go;
149
- * an empty tab says so in the shared empty state, and one the rail leaves
150
- * none says so, with a Clear.
151
- * - **Its drops** (#1249): a card carried onto the canvas lands where its tab
152
- * says — a state template on a lane, adding a state at the row under the
153
- * pointer, its key the drop's, made unique or minted; a transition template
154
- * on a transition, retyping it; an author's card on what its drop's type
155
- * names — the ghost saying where, or, red, why not. ⏎ on a card drops it on
156
- * the canvas's selection, and on a touch screen so does a tap on the
157
- * selected card. Each drop is one transaction of the open flow's session.
158
- * - **Its edits** are its editing session's (#1247): over a record, and over
159
- * `data` given `onApply`, every gesture — "+ LANE", a lane's header
160
- * double-clicked into its rename (a click selects the lane, #1250) or its ×
161
- * (off while the lane holds states), the "+ STATE" ghost, a state
162
- * double-clicked into its editor (a new key rekeys its transitions and the
163
- * decisions' queues) or dragged across lanes, a handle dragged to another
164
- * state, Del on the selected state, states, transition, decision or empty
165
- * lane, and every edit the inspector makes — is one transaction the history
166
- * item undoes and redoes (⌘Z, ⇧⌘Z or ⌘Y anywhere in the frame but a field
167
- * being typed into), and Save sends the open flow's drafts as one commit:
168
- * through the record's patch mutation, or as one patch of `data`'s value to
169
- * the host's `onApply`, handed the session's request id with it — the same
170
- * id on a Retry, so a host that keys its write by it writes once (#1275).
171
- * Two lanes, states, transitions or decisions of one
172
- * key hold Save off. The footer counts the changes waiting on Save.
173
- * - **Its flows** are an e3 record's (`record`): `Flowchart.Types.Flows`,
174
- * flows by name, bound with its patch mutation, the canvas showing `flow`,
175
- * else the first by name. A record always holds flows by name (ruled
176
- * 2026-10-07: e3's patch mutation writes only keyed records), so a lone flow
177
- * is a record of one entry. Or they are the host's (`data`): flows by name
178
- * or one flow — a value, an expression or a bind handle — the value's type
179
- * picking the arm, one prop taking either; `Flowchart.over` builds one flow
180
- * from the host's own tables through their row mappers. The host's flows
181
- * are never narrowed: a task narrows the rows it builds them from.
182
- * - **Its narrowing** (#1346) is one `Slice.bindRecords`, `slice={{ slice:
183
- * Slice.bindRecords(key, { flows, … }) }}`, its rail on the toolbar. Over a
184
- * record, its `flows` source — `Data.bindPaged(record, { indexes })` over
185
- * the same record, its `fields` the indexes' — narrows the Flows tab, which
186
- * pages it a window at a time with its count, the tab's own search finding
187
- * within the narrowing by the source's `search` fields; the open flow is
188
- * read by its name whatever the narrowing, and keeps its drafts. Each other
189
- * source narrows the templates list or the author's tab that names it, by
190
- * its cards' keys.
191
- * - **A dataset's value** is written as literals with `Flowchart.values`
192
- * (flows by name) or `Flowchart.value` (one flow), checked when the package
193
- * builds.
109
+ * - **Its kinds** are the app's records (R1): `states`, and beside them
110
+ * `transitions`, `lanes` and `decisions` — `Flowchart.states(record, { … })`
111
+ * and the rest — whose roles are the record's fields where a gesture
112
+ * writes them or they name another row's key (a state's `label`, `lane`
113
+ * and `order`; a transition's `from`, `to` and `decision`; a lane's `label`
114
+ * and `order`; a decision's `queue`), and accessors over a row and its key
115
+ * for the rest (R2). A role naming a field the row lacks, or one of another
116
+ * type, is a type error naming the fields that fit. No record of the app's
117
+ * holds a type of the Flowchart's.
118
+ * - **How a kind is bound follows how it is read** (R3): a state or a
119
+ * transition `Record.bind(record)`, its record declaring `patch:
120
+ * mutation.patch()`, to edit it — read whole, or through its source of the
121
+ * slice with `entries: Data.bindPaged(record)` beside it — `Data.bind`,
122
+ * read only and whole, or `Data.bindPaged` alone, read only, through its
123
+ * source; a lane or a decision `Record.bind` or `Data.bind`, read whole.
124
+ * - **Its details** (R18–R21): a state or a transition takes `details`,
125
+ * `Flowchart.details(binding, { details: [ … ] })` over the app's rows keyed
126
+ * as the kind's are, read only and bound as the kind is read — four reads,
127
+ * `Flowchart.figure`, `.histogram`, `.list` and `.tags`, in one array drawn
128
+ * in its order on the cards and labels and shown in full in the inspector,
129
+ * each where its `show` says.
130
+ * - **Its narrowing** (R4) is one `Slice.bindRecords`, `slice={{ slice:
131
+ * Slice.bindRecords(key, { … }) }}`, its rail on the toolbar: its sources
132
+ * named `states` and `transitions` — each `Data.bindPaged(record, { indexes
133
+ * })` over that kind's own record — narrow that kind, and each other source
134
+ * the cards list or the author's tab that names it. A preset may narrow
135
+ * both at once: a record holding many flows shows one through a preset over
136
+ * the field both share. `narrowed="dim"` draws what the narrowing leaves
137
+ * out as context.
138
+ * - **Its edits** are its editing session's: every gesture — "+ LANE", a
139
+ * lane's rename, the "+ STATE" ghost, a state's rename or move across lanes
140
+ * or between two cards, a handle dragged to another state, Del, a card
141
+ * dropped from the library, and every edit the inspector makes — writes
142
+ * only its roles' fields, one transaction the history item undoes and
143
+ * redoes, and Save writes each record through its own patch door.
144
+ * - **Its library** (R14): the Steps, Transitions and Lanes tabs
145
+ * (`Flowchart.library.states()`, `.transitions()`, `.lanes()`) list each
146
+ * kind's cards — `Flowchart.templates(rows, { name, values, source })` on
147
+ * the kind — and `Flowchart.library.tab(rows, { … })` the app's own, its
148
+ * `drop` a `Flowchart.patch(R, { … })` over one kind's row type.
149
+ * - **Its inspector** is on unless `inspector={false}`: Details shows what is
150
+ * selected through its kind's form, or its kind's own `inspector`, and
151
+ * Issues what holds Save off.
194
152
  * - **The host hears** the selection (`onSelectState`, `onSelectLink`,
195
153
  * `onSelectTrigger`) and a traced path (`onTracePath`), and vetoes a
196
154
  * connection with `canConnect`.
197
- * - **Refused when the surface is built**, each naming the prop and the
198
- * remedy: flows from both `record` and `data`, or neither; `onApply` over a
199
- * record; `window`, which the slice's `flows` source replaced; a `slice`
200
- * that is not `{ slice }` — the bare handle a flow from the host's tables
201
- * was narrowed by — or not `Slice.bindRecords` (`Slice.bind`,
202
- * `Slice.bindRecord`), or holding a source nothing names; a `flows` source
203
- * over `data`; `affordances` outside `slice`; a templates list written in
204
- * the code, naming no source, or naming `flows`, and the two lists naming
205
- * one source; `flow` over one flow; a record of one flow, or of another
206
- * type, or not bound with its patch mutation; `"brush"` among the
207
- * affordances; `height` or `maxHeight`, which the box it fills sets; `density`, which nothing drew by — the canvas draws at one
208
- * rhythm, the spec's 116×40 cards in their lanes (#1251); a callback for an
209
- * edit (`onAddState`, `onCreateLink`, …)
210
- * or `linkMode`, which the session's gestures replace; a hover card's
211
- * builder (`stateHover`, `linkHover`, `triggerHover`), which the inspector
212
- * replaces; an `inspector` of another kind than a Boolean or `{ state,
213
- * transition }`, a key other than those two, or a kind's own Details of
214
- * another type than `(Row, (Row) => Null) => UIComponentType`; a library
215
- * that lists a tab twice — the Flows tab or a template tab, or two of the
216
- * author's tabs of one name — or the Flows tab over one flow; a data tab
217
- * whose rows are neither an Array nor a `Dict<String, T>`, or a templates
218
- * list's or a sourced tab's that are no `Dict<String, T>`; a tab's source
219
- * the slice lacks; a `states` drop
220
- * over another type than a state's patch, a `transitions` drop over another
221
- * than a transition's, and a `tab` drop over none of a flow's row types.
222
- *
223
- * The closed-set fields in data (`kind`, `orientation`) are typed variant
224
- * values, `Flowchart.Types.*`.
155
+ * - It fills the box it is given and draws no border: give it a box of its
156
+ * own height.
225
157
  *
226
158
  * @example
227
159
  * ```tsx
228
160
  * // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
229
- * import { East } from "@elaraai/east";
161
+ * import { DateTimeType, DictType, East, FloatType, IntegerType, NullType, OptionType, StringType, StructType, VariantType, none, some, variant } from "@elaraai/east";
230
162
  * import { Box, Reactive, UIComponentType } from "@elaraai/east-ui";
231
- * import { Flowchart, Record } from "@elaraai/e3-ui";
163
+ * import { Data, Flowchart } from "@elaraai/e3-ui";
232
164
  * import e3 from "@elaraai/e3";
233
165
  *
234
- * export const depotFlows = e3.record("flowchart_depot_flows", Flowchart.Types.Flows, {
235
- * initial: Flowchart.values({
236
- * "Inbound parcels": {
237
- * description: "From the trailer to the van",
238
- * lanes: [{ key: "intake", label: "Intake" }, { key: "sort", label: "Sort" }, { key: "load", label: "Load" }],
239
- * states: [
240
- * { key: "ARV", label: "Arrived", lane: "intake" },
241
- * { key: "SCN", label: "Scanned", lane: "intake" },
242
- * { key: "CH*", label: "Sort chutes", lane: "sort", members: 12n },
243
- * { key: "LDD", label: "Loaded", lane: "load" },
244
- * ],
245
- * links: [
246
- * { from: "ARV", to: "SCN" },
247
- * { from: "SCN", to: "CH*", trigger: "route" },
248
- * { from: "CH*", to: "LDD" },
249
- * { from: "SCN", to: "SCN", kind: "observed" },
250
- * ],
251
- * triggers: [{ key: "route", label: "route", owner: "sort-planner" }],
252
- * },
253
- * "Returns": {
254
- * description: "From the counter back to the sender",
255
- * lanes: [{ key: "counter", label: "Counter" }, { key: "check", label: "Check" }, { key: "out", label: "Out" }],
256
- * states: [
257
- * { key: "RCV", label: "Received", lane: "counter" },
258
- * { key: "INS", label: "Inspected", lane: "check" },
259
- * { key: "RSD", label: "Resent", lane: "out" },
260
- * ],
261
- * links: [{ from: "RCV", to: "INS" }, { from: "INS", to: "RSD" }, { from: "INS", to: "BIN", kind: "observed" }],
262
- * },
166
+ * // The depot's states, transitions and lanes: three records of the app's, keyed by String, each row its own type.
167
+ * export const DepotState = StructType({
168
+ * name: StringType, // what its card calls it
169
+ * phase: StringType, // the lane it stands in, by the lane's key
170
+ * seq: FloatType, // its place in its lane
171
+ * slots: OptionType(IntegerType), // a class of interchangeable states: the ×N badge
172
+ * flow: StringType, // the flow it belongs to: one record holds the depot's flows
173
+ * });
174
+ * export const DepotTransition = StructType({
175
+ * src: StringType, // the state it leaves, by its key
176
+ * dst: StringType, // the state it enters
177
+ * kind: VariantType({ planned: NullType, observed: NullType }),
178
+ * trigger: OptionType(StringType), // the decision that governs it, by its key
179
+ * volume: OptionType(FloatType), // the parcels measured on it
180
+ * n: OptionType(IntegerType), // the moves behind them
181
+ * at: OptionType(DateTimeType), // when they were measured
182
+ * flow: StringType,
183
+ * });
184
+ * export const DepotLane = StructType({ label: StringType, seq: FloatType });
185
+ * export const depotStates = e3.record("flowchart_depot_states", DictType(StringType, DepotState), {
186
+ * initial: new Map([
187
+ * ["ARV", { name: "Arrived", phase: "intake", seq: 1, slots: none, flow: "Parcels" }],
188
+ * ["SCN", { name: "Scanned", phase: "intake", seq: 2, slots: none, flow: "Parcels" }],
189
+ * ["IND", { name: "Inducted", phase: "induct", seq: 1, slots: none, flow: "Parcels" }],
190
+ * ["LBL", { name: "Relabelled", phase: "induct", seq: 2, slots: none, flow: "Parcels" }],
191
+ * ["CH*", { name: "Sort chutes (class)", phase: "sort", seq: 1, slots: some(14n), flow: "Parcels" }],
192
+ * ["SRD", { name: "Sorted", phase: "sort", seq: 2, slots: none, flow: "Parcels" }],
193
+ * ["HLD", { name: "Held", phase: "hold", seq: 1, slots: none, flow: "Parcels" }],
194
+ * ["CLR", { name: "Cleared", phase: "hold", seq: 2, slots: none, flow: "Parcels" }],
195
+ * ["LDD", { name: "Loaded", phase: "dispatch", seq: 1, slots: none, flow: "Parcels" }],
196
+ * ["DSP", { name: "Dispatched", phase: "dispatch", seq: 2, slots: none, flow: "Parcels" }],
197
+ * // The returns flow's states, beside the parcels'.
198
+ * ["RCV", { name: "Received", phase: "intake", seq: 3, slots: none, flow: "Returns" }],
199
+ * ["INS", { name: "Inspected", phase: "hold", seq: 3, slots: none, flow: "Returns" }],
200
+ * ["RSD", { name: "Resent", phase: "dispatch", seq: 3, slots: none, flow: "Returns" }],
201
+ * ]),
202
+ * mutations: (mutation) => ({ patch: mutation.patch() }),
203
+ * indexes: (index) => ({
204
+ * flowchart_states_by_flow: index.on(["flow"]),
205
+ * flowchart_states_by_lane: index.on(["flow", "phase"]),
263
206
  * }),
264
- * mutations: (mutation) => ({
265
- * patch: mutation.patch(),
207
+ * });
208
+ * export const depotTransitions = e3.record("flowchart_depot_transitions", DictType(StringType, DepotTransition), {
209
+ * initial: new Map([
210
+ * ["l1", { src: "ARV", dst: "SCN", kind: variant("planned", null), trigger: none, volume: some(18460), n: some(412n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
211
+ * ["l2", { src: "SCN", dst: "IND", kind: variant("planned", null), trigger: none, volume: some(18390), n: some(409n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
212
+ * // In place: parcels inducted again, counted but not weighed.
213
+ * ["l3", { src: "IND", dst: "IND", kind: variant("observed", null), trigger: none, volume: none, n: some(2n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
214
+ * ["l4", { src: "IND", dst: "CH*", kind: variant("planned", null), trigger: some("route"), volume: some(17350), n: some(386n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
215
+ * ["l5", { src: "CH*", dst: "SRD", kind: variant("planned", null), trigger: none, volume: some(18210), n: some(405n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
216
+ * ["l6", { src: "SRD", dst: "HLD", kind: variant("planned", null), trigger: none, volume: some(8420), n: some(188n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
217
+ * ["l7", { src: "HLD", dst: "CLR", kind: variant("planned", null), trigger: some("customs"), volume: some(8350), n: some(186n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
218
+ * ["l8", { src: "CLR", dst: "LDD", kind: variant("planned", null), trigger: none, volume: some(8240), n: some(183n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
219
+ * ["l9", { src: "LDD", dst: "DSP", kind: variant("planned", null), trigger: none, volume: some(17030), n: some(378n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
220
+ * // Its far end names a state no row is keyed by: drawn as a ghost, and listed in Issues.
221
+ * ["l10", { src: "DSP", dst: "DLV", kind: variant("planned", null), trigger: none, volume: none, n: none, at: none, flow: "Parcels" }],
222
+ * // Observed, not planned: parcels relabelled before they are sorted.
223
+ * ["l11", { src: "IND", dst: "LBL", kind: variant("observed", null), trigger: none, volume: some(980), n: some(22n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
224
+ * ["l12", { src: "LBL", dst: "CH*", kind: variant("observed", null), trigger: none, volume: some(975), n: some(22n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
225
+ * ["l13", { src: "SRD", dst: "LDD", kind: variant("planned", null), trigger: none, volume: some(8790), n: some(195n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Parcels" }],
226
+ * ["r1", { src: "RCV", dst: "INS", kind: variant("planned", null), trigger: none, volume: some(640), n: some(15n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Returns" }],
227
+ * ["r2", { src: "INS", dst: "RSD", kind: variant("planned", null), trigger: none, volume: some(610), n: some(14n), at: some(new Date("2026-06-30T00:00:00Z")), flow: "Returns" }],
228
+ * ]),
229
+ * mutations: (mutation) => ({ patch: mutation.patch() }),
230
+ * indexes: (index) => ({
231
+ * flowchart_transitions_by_flow: index.on(["flow"]),
266
232
  * }),
267
233
  * });
234
+ * export const depotLanes = e3.record("flowchart_depot_lanes", DictType(StringType, DepotLane), {
235
+ * initial: new Map([
236
+ * ["intake", { label: "Intake", seq: 1 }], ["induct", { label: "Induct", seq: 2 }], ["sort", { label: "Sort", seq: 3 }],
237
+ * ["hold", { label: "Hold", seq: 4 }], ["dispatch", { label: "Dispatch", seq: 5 }],
238
+ * ]),
239
+ * mutations: (mutation) => ({ patch: mutation.patch() }),
240
+ * });
241
+ *
242
+ * // The time each parcel spent in each state, keyed as the states are: its parcels counted into bins by how
243
+ * // long they stayed, each key a bin's lower edge, in hours.
244
+ * export const StateDwell = StructType({ hours: DictType(FloatType, IntegerType) });
245
+ * export const stateDwell = e3.input("flowchart_depot_dwell", DictType(StringType, StateDwell), variant("value", new Map([
246
+ * ["ARV", { hours: new Map([[0, 7752n], [0.25, 6092n], [0.5, 2769n], [1, 1108n], [2, 554n], [4, 185n]]) }],
247
+ * ["SCN", { hours: new Map([[0, 9195n], [0.25, 5517n], [0.5, 2391n], [1, 920n], [2, 367n]]) }],
248
+ * ["IND", { hours: new Map([[0, 2207n], [0.25, 4781n], [0.5, 5517n], [1, 3310n], [2, 1655n], [4, 736n], [8, 184n]]) }],
249
+ * ["LBL", { hours: new Map([[0.25, 59n], [0.5, 137n], [1, 255n], [2, 273n], [4, 157n], [8, 79n], [12, 20n]]) }],
250
+ * ["CH*", { hours: new Map([[0, 1457n], [0.25, 4007n], [0.5, 6192n], [1, 4007n], [2, 1639n], [4, 728n], [8, 180n]]) }],
251
+ * ["SRD", { hours: new Map([[0, 861n], [0.25, 2065n], [0.5, 4303n], [1, 4818n], [2, 3098n], [4, 1377n], [8, 516n], [12, 172n]]) }],
252
+ * ["HLD", { hours: new Map([[0.25, 84n], [0.5, 167n], [1, 418n], [2, 752n], [4, 1169n], [8, 1417n],
253
+ * [12, 1253n], [24, 1336n], [48, 1002n], [96, 501n], [168, 251n]]) }],
254
+ * ["CLR", { hours: new Map([[0, 824n], [0.25, 1648n], [0.5, 2060n], [1, 1648n], [2, 989n], [4, 659n], [8, 330n], [12, 82n]]) }],
255
+ * ["LDD", { hours: new Map([[0, 681n], [0.25, 1362n], [0.5, 2725n], [1, 4088n], [2, 3747n], [4, 2384n], [8, 1362n], [12, 511n], [24, 170n]]) }],
256
+ * // Dispatched has no row: the app counts no time in it once a parcel has left, and its card says no data.
257
+ * ["RCV", { hours: new Map([[0, 64n], [0.25, 115n], [0.5, 154n], [1, 141n], [2, 90n], [4, 51n], [8, 19n], [12, 6n]]) }],
258
+ * ["INS", { hours: new Map([[0.25, 12n], [0.5, 37n], [1, 73n], [2, 122n], [4, 146n], [8, 110n], [12, 61n], [24, 37n], [48, 12n]]) }],
259
+ * ["RSD", { hours: new Map([[0, 122n], [0.25, 183n], [0.5, 159n], [1, 85n], [2, 43n], [4, 18n]]) }],
260
+ * ])));
268
261
  *
269
- * const flowchart = East.function([], UIComponentType, (_$) => (
262
+ * const flowchartDwell = East.function([], UIComponentType, (_$) => (
270
263
  * <Reactive>{$ => {
271
- * const flows = $.let(Record.bind(depotFlows));
264
+ * const states = $.let(Data.bind(depotStates));
265
+ * const transitions = $.let(Data.bind(depotTransitions));
266
+ * const lanes = $.let(Data.bind(depotLanes));
267
+ * const dwell = $.let(Data.bind(stateDwell));
272
268
  * return (
273
- * <Box height="500px">
274
- * <Flowchart record={flows} flow="Inbound parcels" library={[Flowchart.library.flows()]} />
269
+ * <Box height="600px">
270
+ * <Flowchart
271
+ * states={Flowchart.states(states, {
272
+ * label: "name", lane: "phase", order: "seq",
273
+ * // Keyed as the states are, and read as they are: whole.
274
+ * details: Flowchart.details(dwell, {
275
+ * details: [Flowchart.histogram("hours", { unit: "hours", label: "Time in state" })],
276
+ * }),
277
+ * })}
278
+ * transitions={Flowchart.transitions(transitions, { from: "src", to: "dst" })}
279
+ * lanes={Flowchart.lanes(lanes, { label: "label", order: "seq" })}
280
+ * name="dwell"
281
+ * />
275
282
  * </Box>
276
283
  * );
277
284
  * }}</Reactive>
@@ -285,40 +292,64 @@ export declare const Flowchart: FlowchartNamespace;
285
292
  * against, and the payload's own East types.
286
293
  */
287
294
  export interface FlowchartInternalNamespace extends FlowchartNamespace {
288
- /** Creates the flowchart's payload alone — what `<Flowchart>` returns through the `Flowchart` carrier ({@link createFlowchartPayload}). */
295
+ /** Creates the Flowchart's payload alone — what `<Flowchart>` returns through the `Flowchart` carrier ({@link createFlowchartPayload}). */
289
296
  Payload: typeof createFlowchartPayload;
290
297
  /** The `Flowchart` carrier ({@link FlowchartComponent}). */
291
298
  Component: typeof FlowchartComponent;
292
- /** The East types a flowchart is written with, and its payload's. */
299
+ /** The East types a Flowchart is written with, and its payload's. */
293
300
  Types: FlowchartTypes & {
294
301
  /** The renderer's payload ({@link FlowchartPayloadType}). */
295
302
  Payload: typeof FlowchartPayloadType;
296
- /** What the canvas draws its flow with ({@link FlowchartCanvasType}). */
303
+ /** What the canvas draws with besides its kinds ({@link FlowchartCanvasType}). */
297
304
  Canvas: typeof FlowchartCanvasType;
298
- /** Where the flows come from ({@link FlowchartSourceType}). */
299
- Source: typeof FlowchartSourceType;
300
- /** The host's flows ({@link FlowchartDataType}). */
301
- Data: typeof FlowchartDataType;
302
- /** A record of flows, bound ({@link FlowchartFlowsHandleType}). */
303
- FlowsHandle: typeof FlowchartFlowsHandleType;
304
- /** The editing session's Save, over a record or the host's flows ({@link FlowchartSessionApplyType}). */
305
- SessionApply: typeof FlowchartSessionApplyType;
306
- /** The inspector pane: each kind's own Details ({@link FlowchartInspectorType}). */
307
- Inspector: typeof FlowchartInspectorType;
305
+ /** The states, closed over their record ({@link FlowchartStateKindType}). */
306
+ StateKind: typeof FlowchartStateKindType;
307
+ /** The transitions ({@link FlowchartTransitionKindType}). */
308
+ TransitionKind: typeof FlowchartTransitionKindType;
309
+ /** The lanes ({@link FlowchartLaneKindType}). */
310
+ LaneKind: typeof FlowchartLaneKindType;
311
+ /** The decisions ({@link FlowchartDecisionKindType}). */
312
+ DecisionKind: typeof FlowchartDecisionKindType;
313
+ /** A state's roles, as its kind reads them from the app's row ({@link FlowchartStateRolesType}). */
314
+ StateRoles: typeof FlowchartStateRolesType;
315
+ /** A transition's roles ({@link FlowchartTransitionRolesType}). */
316
+ TransitionRoles: typeof FlowchartTransitionRolesType;
317
+ /** A lane's roles ({@link FlowchartLaneRolesType}). */
318
+ LaneRoles: typeof FlowchartLaneRolesType;
319
+ /** A decision's roles ({@link FlowchartDecisionRolesType}). */
320
+ DecisionRoles: typeof FlowchartDecisionRolesType;
321
+ /** What a gesture writes of a state's roles ({@link FlowchartStateWriteType}). */
322
+ StateWrite: typeof FlowchartStateWriteType;
323
+ /** What a gesture writes of a transition's roles ({@link FlowchartTransitionWriteType}). */
324
+ TransitionWrite: typeof FlowchartTransitionWriteType;
325
+ /** What a gesture writes of a lane's roles ({@link FlowchartLaneWriteType}). */
326
+ LaneWrite: typeof FlowchartLaneWriteType;
327
+ /** A stored state: its roles and its row's bytes ({@link FlowchartStateEntryType}). */
328
+ StateEntry: typeof FlowchartStateEntryType;
329
+ /** A stored transition ({@link FlowchartTransitionEntryType}). */
330
+ TransitionEntry: typeof FlowchartTransitionEntryType;
331
+ /** A stored lane ({@link FlowchartLaneEntryType}). */
332
+ LaneEntry: typeof FlowchartLaneEntryType;
333
+ /** A stored decision ({@link FlowchartDecisionEntryType}). */
334
+ DecisionEntry: typeof FlowchartDecisionEntryType;
335
+ /** One card ({@link FlowchartTemplateType}). */
336
+ Template: typeof FlowchartTemplateType;
337
+ /** How a narrowed-out row draws ({@link FlowchartNarrowedType}). */
338
+ Narrowed: typeof FlowchartNarrowedType;
308
339
  /** One tab of the library ({@link FlowchartLibraryTabType}). */
309
340
  LibraryTab: typeof FlowchartLibraryTabType;
310
- /** An author's tab's cards, by what they land on ({@link FlowchartLandsType}). */
311
- Lands: typeof FlowchartLandsType;
312
- /** A card that drops nothing ({@link FlowchartCardType}). */
313
- Card: typeof FlowchartCardType;
314
- /** A state template's card ({@link FlowchartStateCardType}). */
315
- StateCard: typeof FlowchartStateCardType;
316
- /** A transition template's card ({@link FlowchartTransitionCardType}). */
317
- TransitionCard: typeof FlowchartTransitionCardType;
318
- /** An author's card that lands on a lane ({@link FlowchartLaneCardType}). */
319
- LaneCard: typeof FlowchartLaneCardType;
320
- /** An author's card that lands on a decision ({@link FlowchartDecisionCardType}). */
321
- DecisionCard: typeof FlowchartDecisionCardType;
341
+ /** A kind's tab on the wire ({@link FlowchartKindTabWireType}). */
342
+ KindTab: typeof FlowchartKindTabWireType;
343
+ /** A kind's details on the wire: its reads, and its rows' values ({@link FlowchartDetailsType}). */
344
+ Details: typeof FlowchartDetailsType;
345
+ /** One read, described ({@link FlowchartReadType}). */
346
+ Read: typeof FlowchartReadType;
347
+ /** Where a read shows ({@link FlowchartShowType}). */
348
+ Show: typeof FlowchartShowType;
349
+ /** What a details row holds: one value a read ({@link FlowchartDetailRowType}). */
350
+ DetailRow: typeof FlowchartDetailRowType;
351
+ /** How the rail's picks weigh a kind's details ({@link FlowchartWeighedType}). */
352
+ Weighed: typeof FlowchartWeighedType;
322
353
  };
323
354
  }
324
355
  /**