@elaraai/e3-ui 1.0.102 → 1.0.104
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.
- package/dist/src/allocation/functions.d.ts +2 -1
- package/dist/src/allocation/functions.d.ts.map +1 -1
- package/dist/src/allocation/functions.js +3 -2
- package/dist/src/allocation/functions.js.map +1 -1
- package/dist/src/allocation/index.d.ts +120 -1
- package/dist/src/allocation/index.d.ts.map +1 -1
- package/dist/src/allocation/index.js +24 -4
- package/dist/src/allocation/index.js.map +1 -1
- package/dist/src/bind/data-indexed.d.ts +25 -4
- package/dist/src/bind/data-indexed.d.ts.map +1 -1
- package/dist/src/bind/data-indexed.js +58 -7
- package/dist/src/bind/data-indexed.js.map +1 -1
- package/dist/src/bind/data.d.ts +12 -14
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +11 -11
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/func.d.ts +7 -2
- package/dist/src/bind/func.d.ts.map +1 -1
- package/dist/src/bind/func.js +10 -3
- package/dist/src/bind/func.js.map +1 -1
- package/dist/src/bind/record.d.ts +6 -6
- package/dist/src/bind/record.d.ts.map +1 -1
- package/dist/src/bind/record.js.map +1 -1
- package/dist/src/calendar/index.d.ts +148 -1
- package/dist/src/calendar/index.d.ts.map +1 -1
- package/dist/src/calendar/index.js +55 -5
- package/dist/src/calendar/index.js.map +1 -1
- package/dist/src/decision/bind.d.ts.map +1 -1
- package/dist/src/decision/index.d.ts +218 -218
- package/dist/src/decision/index.d.ts.map +1 -1
- package/dist/src/decision/types.d.ts.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +32 -14
- package/dist/src/flowchart/canvas.d.ts.map +1 -1
- package/dist/src/flowchart/canvas.js +21 -6
- package/dist/src/flowchart/canvas.js.map +1 -1
- package/dist/src/flowchart/details.d.ts +469 -0
- package/dist/src/flowchart/details.d.ts.map +1 -0
- package/dist/src/flowchart/details.js +1035 -0
- package/dist/src/flowchart/details.js.map +1 -0
- package/dist/src/flowchart/flowchart.d.ts +16 -72
- package/dist/src/flowchart/flowchart.d.ts.map +1 -1
- package/dist/src/flowchart/flowchart.js +10 -1
- package/dist/src/flowchart/flowchart.js.map +1 -1
- package/dist/src/flowchart/index.d.ts +282 -251
- package/dist/src/flowchart/index.d.ts.map +1 -1
- package/dist/src/flowchart/index.js +234 -220
- package/dist/src/flowchart/index.js.map +1 -1
- package/dist/src/flowchart/kinds.d.ts +438 -0
- package/dist/src/flowchart/kinds.d.ts.map +1 -0
- package/dist/src/flowchart/kinds.js +799 -0
- package/dist/src/flowchart/kinds.js.map +1 -0
- package/dist/src/flowchart/library.d.ts +155 -740
- package/dist/src/flowchart/library.d.ts.map +1 -1
- package/dist/src/flowchart/library.js +191 -673
- package/dist/src/flowchart/library.js.map +1 -1
- package/dist/src/flowchart/payload.d.ts +3654 -7845
- package/dist/src/flowchart/payload.d.ts.map +1 -1
- package/dist/src/flowchart/payload.js +331 -469
- package/dist/src/flowchart/payload.js.map +1 -1
- package/dist/src/flowchart/templates.d.ts +657 -0
- package/dist/src/flowchart/templates.d.ts.map +1 -0
- package/dist/src/flowchart/templates.js +658 -0
- package/dist/src/flowchart/templates.js.map +1 -0
- package/dist/src/flowchart/types.d.ts +2258 -214
- package/dist/src/flowchart/types.d.ts.map +1 -1
- package/dist/src/flowchart/types.js +374 -124
- package/dist/src/flowchart/types.js.map +1 -1
- package/dist/src/index.d.ts +13 -15
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +24 -29
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +5 -7
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +12 -19
- package/dist/src/internal.js.map +1 -1
- package/dist/src/ontology/index.d.ts +44 -15
- package/dist/src/ontology/index.d.ts.map +1 -1
- package/dist/src/ontology/index.js +19 -11
- package/dist/src/ontology/index.js.map +1 -1
- package/dist/src/plan/builders.d.ts +26 -26
- package/dist/src/plan/builders.d.ts.map +1 -1
- package/dist/src/plan/builders.js.map +1 -1
- package/dist/src/plan/event-rows.d.ts +59 -58
- package/dist/src/plan/event-rows.d.ts.map +1 -1
- package/dist/src/plan/event-rows.js +6 -4
- package/dist/src/plan/event-rows.js.map +1 -1
- package/dist/src/plan/factories.js.map +1 -1
- package/dist/src/plan/ir.d.ts +1 -0
- package/dist/src/plan/ir.d.ts.map +1 -1
- package/dist/src/plan/library.d.ts.map +1 -1
- package/dist/src/plan/nested-checks.js.map +1 -1
- package/dist/src/plan/plan.d.ts +567 -423
- package/dist/src/plan/plan.d.ts.map +1 -1
- package/dist/src/plan/plan.js +67 -3
- package/dist/src/plan/plan.js.map +1 -1
- package/dist/src/plan/series.d.ts.map +1 -1
- package/dist/src/plan/series.js.map +1 -1
- package/dist/src/plan/types.d.ts +173 -172
- package/dist/src/plan/types.d.ts.map +1 -1
- package/dist/src/query/builder.d.ts +368 -321
- package/dist/src/query/builder.d.ts.map +1 -1
- package/dist/src/query/builder.js +12 -1
- package/dist/src/query/builder.js.map +1 -1
- package/dist/src/query/index.d.ts +5 -1
- package/dist/src/query/index.d.ts.map +1 -1
- package/dist/src/query/index.js +3 -1
- package/dist/src/query/index.js.map +1 -1
- package/dist/src/query/library.d.ts +6 -6
- package/dist/src/query/queries.d.ts +3 -3
- package/dist/src/roster/fit.d.ts +5 -2
- package/dist/src/roster/fit.d.ts.map +1 -1
- package/dist/src/roster/fit.js +5 -3
- package/dist/src/roster/fit.js.map +1 -1
- package/dist/src/roster/index.d.ts +103 -2
- package/dist/src/roster/index.d.ts.map +1 -1
- package/dist/src/roster/index.js +45 -6
- package/dist/src/roster/index.js.map +1 -1
- package/dist/src/runtime/index.d.ts +1 -3
- package/dist/src/runtime/index.d.ts.map +1 -1
- package/dist/src/runtime/index.js +1 -3
- package/dist/src/runtime/index.js.map +1 -1
- package/dist/src/schedule/fields.js.map +1 -1
- package/dist/src/schedule/library.js.map +1 -1
- package/dist/src/schedule/record-window.d.ts +27 -26
- package/dist/src/schedule/record-window.d.ts.map +1 -1
- package/dist/src/schedule/types.d.ts +196 -196
- package/dist/src/schematic/index.d.ts +1 -1
- package/dist/src/schematic/index.d.ts.map +1 -1
- package/dist/src/schematic/index.js +1 -1
- package/dist/src/schematic/index.js.map +1 -1
- package/dist/src/schematic/kinds.d.ts +4 -24
- package/dist/src/schematic/kinds.d.ts.map +1 -1
- package/dist/src/schematic/kinds.js +8 -212
- package/dist/src/schematic/kinds.js.map +1 -1
- package/dist/src/schematic/library.d.ts.map +1 -1
- package/dist/src/schematic/payload.d.ts +1688 -1549
- package/dist/src/schematic/payload.d.ts.map +1 -1
- package/dist/src/schematic/payload.js +38 -1
- package/dist/src/schematic/payload.js.map +1 -1
- package/dist/src/schematic/shapes.d.ts.map +1 -1
- package/dist/src/schematic/types.d.ts +978 -978
- package/dist/src/schematic/types.d.ts.map +1 -1
- package/dist/src/schematic/types.js +4 -36
- package/dist/src/schematic/types.js.map +1 -1
- package/dist/src/schematic/window.d.ts +9 -42
- package/dist/src/schematic/window.d.ts.map +1 -1
- package/dist/src/schematic/window.js +10 -115
- package/dist/src/schematic/window.js.map +1 -1
- package/dist/src/sheet/actions.d.ts +388 -0
- package/dist/src/sheet/actions.d.ts.map +1 -0
- package/dist/src/sheet/actions.js +594 -0
- package/dist/src/sheet/actions.js.map +1 -0
- package/dist/src/sheet/bridge.d.ts +12 -1
- package/dist/src/sheet/bridge.d.ts.map +1 -1
- package/dist/src/sheet/bridge.js +30 -6
- package/dist/src/sheet/bridge.js.map +1 -1
- package/dist/src/sheet/columns.d.ts +5 -2
- package/dist/src/sheet/columns.d.ts.map +1 -1
- package/dist/src/sheet/columns.js.map +1 -1
- package/dist/src/sheet/draft-bridge.d.ts +9 -4
- package/dist/src/sheet/draft-bridge.d.ts.map +1 -1
- package/dist/src/sheet/draft-bridge.js +22 -7
- package/dist/src/sheet/draft-bridge.js.map +1 -1
- package/dist/src/sheet/editing-types.d.ts +71 -71
- package/dist/src/sheet/fields.d.ts +13 -0
- package/dist/src/sheet/fields.d.ts.map +1 -1
- package/dist/src/sheet/fields.js +3 -0
- package/dist/src/sheet/fields.js.map +1 -1
- package/dist/src/sheet/group.js.map +1 -1
- package/dist/src/sheet/index.d.ts +32 -2
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/index.js +18 -3
- package/dist/src/sheet/index.js.map +1 -1
- package/dist/src/sheet/library.d.ts +8 -0
- package/dist/src/sheet/library.d.ts.map +1 -1
- package/dist/src/sheet/library.js.map +1 -1
- package/dist/src/sheet/link.d.ts.map +1 -1
- package/dist/src/sheet/record.js.map +1 -1
- package/dist/src/sheet/root.d.ts +23 -1
- package/dist/src/sheet/root.d.ts.map +1 -1
- package/dist/src/sheet/root.js +40 -5
- package/dist/src/sheet/root.js.map +1 -1
- package/dist/src/sheet/sheet.d.ts +9332 -5621
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +41 -2
- package/dist/src/sheet/sheet.js.map +1 -1
- package/dist/src/sheet/templates.d.ts +4 -0
- package/dist/src/sheet/templates.d.ts.map +1 -1
- package/dist/src/sheet/types.d.ts +13020 -5839
- package/dist/src/sheet/types.d.ts.map +1 -1
- package/dist/src/sheet/types.js +114 -2
- package/dist/src/sheet/types.js.map +1 -1
- package/dist/src/studio/builder.d.ts +6 -6
- package/dist/src/studio/library.d.ts +9 -9
- package/dist/src/studio/pages.d.ts +6 -6
- package/dist/src/studio/publish.d.ts +3 -3
- package/dist/src/utils/derive.d.ts +1 -1
- package/dist/src/utils/derive.js +1 -1
- package/dist/src/utils/derive.js.map +1 -1
- package/dist/src/utils/key-visibility.d.ts +1 -1
- package/dist/src/utils/record-kind.d.ts +625 -0
- package/dist/src/utils/record-kind.d.ts.map +1 -0
- package/dist/src/utils/record-kind.js +450 -0
- package/dist/src/utils/record-kind.js.map +1 -0
- package/dist/src/utils/views.d.ts +55 -0
- package/dist/src/utils/views.d.ts.map +1 -0
- package/dist/src/utils/views.js +72 -0
- package/dist/src/utils/views.js.map +1 -0
- package/dist/src/utils/vocabulary.d.ts +48 -0
- package/dist/src/utils/vocabulary.d.ts.map +1 -0
- package/dist/src/utils/vocabulary.js +47 -0
- package/dist/src/utils/vocabulary.js.map +1 -0
- package/dist/test/allocation/allocation.examples.d.ts +3 -1
- package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
- package/dist/test/allocation/allocation.examples.js +81 -2
- package/dist/test/allocation/allocation.examples.js.map +1 -1
- package/dist/test/bind/data/data.examples.d.ts +1 -1
- package/dist/test/bind/func/func.examples.d.ts +19 -1
- package/dist/test/bind/func/func.examples.d.ts.map +1 -1
- package/dist/test/bind/func/func.examples.js +36 -1
- package/dist/test/bind/func/func.examples.js.map +1 -1
- package/dist/test/calendar/calendar.examples.d.ts +2 -0
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar.examples.js +80 -2
- package/dist/test/calendar/calendar.examples.js.map +1 -1
- package/dist/test/decision/queue.examples.d.ts +1 -0
- package/dist/test/decision/queue.examples.d.ts.map +1 -1
- package/dist/test/decision/queue.examples.js +12 -0
- package/dist/test/decision/queue.examples.js.map +1 -1
- package/dist/test/examples-package.d.ts.map +1 -1
- package/dist/test/examples-package.js +5 -4
- package/dist/test/examples-package.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +1250 -4605
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
- package/dist/test/flowchart/flowchart.examples.js +861 -512
- package/dist/test/flowchart/flowchart.examples.js.map +1 -1
- package/dist/test/ontology/ontology.examples.d.ts +2 -3
- package/dist/test/ontology/ontology.examples.d.ts.map +1 -1
- package/dist/test/ontology/ontology.examples.js +32 -21
- package/dist/test/ontology/ontology.examples.js.map +1 -1
- package/dist/test/plan/plan-events.examples.d.ts +1 -0
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-events.examples.js +44 -0
- package/dist/test/plan/plan-events.examples.js.map +1 -1
- package/dist/test/plan/plan-nested.examples.d.ts +15 -15
- package/dist/test/plan/plan-nested.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-nested.examples.js +5 -5
- package/dist/test/plan/plan-nested.examples.js.map +1 -1
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-records.examples.js +1 -1
- package/dist/test/plan/plan-records.examples.js.map +1 -1
- package/dist/test/plan/plan.examples.js.map +1 -1
- package/dist/test/query/query.examples.d.ts +2 -0
- package/dist/test/query/query.examples.d.ts.map +1 -1
- package/dist/test/query/query.examples.js +37 -1
- package/dist/test/query/query.examples.js.map +1 -1
- package/dist/test/roster/domain.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.d.ts +2 -0
- package/dist/test/roster/roster.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.js +76 -15
- package/dist/test/roster/roster.examples.js.map +1 -1
- package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic-records.examples.js +6 -4
- package/dist/test/schematic/schematic-records.examples.js.map +1 -1
- package/dist/test/schematic/schematic.examples.d.ts +1 -0
- package/dist/test/schematic/schematic.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic.examples.js +144 -0
- package/dist/test/schematic/schematic.examples.js.map +1 -1
- package/dist/test/sheet/sheet-actions.examples.d.ts +1264 -0
- package/dist/test/sheet/sheet-actions.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-actions.examples.js +394 -0
- package/dist/test/sheet/sheet-actions.examples.js.map +1 -0
- package/dist/test/sheet/sheet-records.examples.d.ts +1 -1
- package/dist/test/sheet/sheet.examples.d.ts +1 -0
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet.examples.js +77 -0
- package/dist/test/sheet/sheet.examples.js.map +1 -1
- package/dist/test/studio/studio.examples.d.ts +1 -0
- package/dist/test/studio/studio.examples.d.ts.map +1 -1
- package/dist/test/studio/studio.examples.js +18 -8
- package/dist/test/studio/studio.examples.js.map +1 -1
- package/package.json +14 -13
- package/dist/src/diff/index.d.ts +0 -407
- package/dist/src/diff/index.d.ts.map +0 -1
- package/dist/src/diff/index.js +0 -203
- package/dist/src/diff/index.js.map +0 -1
- package/dist/src/experiment/index.d.ts +0 -1033
- package/dist/src/experiment/index.d.ts.map +0 -1
- package/dist/src/experiment/index.js +0 -197
- package/dist/src/experiment/index.js.map +0 -1
- package/dist/src/experiment/types.d.ts +0 -1093
- package/dist/src/experiment/types.d.ts.map +0 -1
- package/dist/src/experiment/types.js +0 -423
- package/dist/src/experiment/types.js.map +0 -1
- package/dist/src/flowchart/over.d.ts +0 -227
- package/dist/src/flowchart/over.d.ts.map +0 -1
- package/dist/src/flowchart/over.js +0 -213
- package/dist/src/flowchart/over.js.map +0 -1
- package/dist/src/flowchart/patch.d.ts +0 -64
- package/dist/src/flowchart/patch.d.ts.map +0 -1
- package/dist/src/flowchart/patch.js +0 -67
- package/dist/src/flowchart/patch.js.map +0 -1
- package/dist/src/flowchart/values.d.ts +0 -271
- package/dist/src/flowchart/values.d.ts.map +0 -1
- package/dist/src/flowchart/values.js +0 -220
- package/dist/src/flowchart/values.js.map +0 -1
- package/dist/src/flowchart/window.d.ts +0 -306
- package/dist/src/flowchart/window.d.ts.map +0 -1
- package/dist/src/flowchart/window.js +0 -63
- package/dist/src/flowchart/window.js.map +0 -1
- package/dist/src/runtime/diff.d.ts +0 -36
- package/dist/src/runtime/diff.d.ts.map +0 -1
- package/dist/src/runtime/diff.js +0 -34
- package/dist/src/runtime/diff.js.map +0 -1
- package/dist/src/runtime/experiment.d.ts +0 -48
- package/dist/src/runtime/experiment.d.ts.map +0 -1
- package/dist/src/runtime/experiment.js +0 -10
- package/dist/src/runtime/experiment.js.map +0 -1
- package/dist/test/diff/diff.examples.d.ts +0 -313
- package/dist/test/diff/diff.examples.d.ts.map +0 -1
- package/dist/test/diff/diff.examples.js +0 -452
- package/dist/test/diff/diff.examples.js.map +0 -1
- package/dist/test/experiment/experiment.examples.d.ts +0 -1512
- package/dist/test/experiment/experiment.examples.d.ts.map +0 -1
- package/dist/test/experiment/experiment.examples.js +0 -609
- 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 (#
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
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
|
|
14
|
-
*
|
|
15
|
-
* - `
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* - `
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* - `
|
|
24
|
-
*
|
|
25
|
-
*
|
|
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 {
|
|
33
|
+
import { SchedulePatchTypeFor, schedulePatch } from "../schedule/patch.js";
|
|
33
34
|
import { FlowchartCanvasType } from "./canvas.js";
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
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 {
|
|
43
|
-
export {
|
|
44
|
-
export {
|
|
45
|
-
export {
|
|
46
|
-
export {
|
|
47
|
-
/** The East types a
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
53
|
+
/** A transition's kind — planned | observed ({@link FlowchartLinkKindType}). */
|
|
64
54
|
Kind: typeof FlowchartLinkKindType;
|
|
65
|
-
/**
|
|
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
|
|
70
|
-
Patch: typeof
|
|
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>`,
|
|
74
|
-
*
|
|
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
|
-
/**
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
|
|
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
|
|
96
|
+
/** The East types a Flowchart is written with ({@link FlowchartTypes}). */
|
|
88
97
|
Types: FlowchartTypes;
|
|
89
98
|
}
|
|
90
99
|
/**
|
|
91
|
-
* `<Flowchart>` —
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* inspector shows what is
|
|
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
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* `
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* the
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* the
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
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
|
-
* -
|
|
198
|
-
*
|
|
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 {
|
|
163
|
+
* import { Data, Flowchart } from "@elaraai/e3-ui";
|
|
232
164
|
* import e3 from "@elaraai/e3";
|
|
233
165
|
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
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
|
-
*
|
|
265
|
-
*
|
|
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
|
|
262
|
+
* const flowchartDwell = East.function([], UIComponentType, (_$) => (
|
|
270
263
|
* <Reactive>{$ => {
|
|
271
|
-
* const
|
|
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="
|
|
274
|
-
* <Flowchart
|
|
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
|
|
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
|
|
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
|
|
303
|
+
/** What the canvas draws with besides its kinds ({@link FlowchartCanvasType}). */
|
|
297
304
|
Canvas: typeof FlowchartCanvasType;
|
|
298
|
-
/**
|
|
299
|
-
|
|
300
|
-
/** The
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
|
|
304
|
-
/** The
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
|
|
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
|
-
/**
|
|
311
|
-
|
|
312
|
-
/** A
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
|
|
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
|
/**
|