@elaraai/e3-ui 1.0.96 → 1.0.98
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/index.d.ts +258 -7
- package/dist/src/allocation/index.d.ts.map +1 -1
- package/dist/src/allocation/index.js +30 -1
- package/dist/src/allocation/index.js.map +1 -1
- package/dist/src/allocation/types.d.ts +41 -0
- package/dist/src/allocation/types.d.ts.map +1 -1
- package/dist/src/allocation/types.js +35 -0
- package/dist/src/allocation/types.js.map +1 -1
- package/dist/src/bind/data-indexed.d.ts +31 -4
- package/dist/src/bind/data-indexed.d.ts.map +1 -1
- package/dist/src/bind/data-indexed.js +54 -10
- package/dist/src/bind/data-indexed.js.map +1 -1
- package/dist/src/calendar/index.d.ts +540 -14
- package/dist/src/calendar/index.d.ts.map +1 -1
- package/dist/src/calendar/index.js +43 -7
- package/dist/src/calendar/index.js.map +1 -1
- package/dist/src/calendar/paged.d.ts +89 -0
- package/dist/src/calendar/paged.d.ts.map +1 -0
- package/dist/src/calendar/paged.js +148 -0
- package/dist/src/calendar/paged.js.map +1 -0
- package/dist/src/flowchart/payload.d.ts +156 -0
- package/dist/src/flowchart/payload.d.ts.map +1 -1
- package/dist/src/flowchart/window.d.ts +12 -0
- package/dist/src/flowchart/window.d.ts.map +1 -1
- package/dist/src/index.d.ts +11 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +19 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +11 -5
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +28 -7
- package/dist/src/internal.js.map +1 -1
- package/dist/src/plan/builders.d.ts +12 -8
- package/dist/src/plan/builders.d.ts.map +1 -1
- package/dist/src/plan/builders.js +12 -8
- package/dist/src/plan/builders.js.map +1 -1
- package/dist/src/plan/event-rows.d.ts +228 -156
- package/dist/src/plan/event-rows.d.ts.map +1 -1
- package/dist/src/plan/event-rows.js +239 -54
- package/dist/src/plan/event-rows.js.map +1 -1
- package/dist/src/plan/index.d.ts +5 -0
- package/dist/src/plan/index.d.ts.map +1 -1
- package/dist/src/plan/index.js +3 -0
- package/dist/src/plan/index.js.map +1 -1
- package/dist/src/plan/ir.d.ts +70 -0
- package/dist/src/plan/ir.d.ts.map +1 -1
- package/dist/src/plan/ordered-source.d.ts +2038 -1
- package/dist/src/plan/ordered-source.d.ts.map +1 -1
- package/dist/src/plan/ordered-source.js +19 -11
- package/dist/src/plan/ordered-source.js.map +1 -1
- package/dist/src/plan/plan.d.ts +513 -32
- package/dist/src/plan/plan.d.ts.map +1 -1
- package/dist/src/plan/plan.js +119 -32
- package/dist/src/plan/plan.js.map +1 -1
- package/dist/src/plan/root.d.ts +4 -2
- package/dist/src/plan/root.d.ts.map +1 -1
- package/dist/src/plan/root.js +6 -4
- package/dist/src/plan/root.js.map +1 -1
- package/dist/src/plan/series.d.ts +13 -0
- package/dist/src/plan/series.d.ts.map +1 -1
- package/dist/src/plan/series.js +61 -7
- package/dist/src/plan/series.js.map +1 -1
- package/dist/src/plan/types.d.ts +14 -0
- package/dist/src/plan/types.d.ts.map +1 -1
- package/dist/src/plan/types.js +8 -0
- package/dist/src/plan/types.js.map +1 -1
- package/dist/src/roster/index.d.ts +608 -20
- package/dist/src/roster/index.d.ts.map +1 -1
- package/dist/src/roster/index.js +103 -29
- package/dist/src/roster/index.js.map +1 -1
- package/dist/src/roster/library.d.ts +12 -2
- package/dist/src/roster/library.d.ts.map +1 -1
- package/dist/src/roster/library.js +8 -0
- package/dist/src/roster/library.js.map +1 -1
- package/dist/src/roster/lists.d.ts +59 -12
- package/dist/src/roster/lists.d.ts.map +1 -1
- package/dist/src/roster/lists.js +51 -58
- package/dist/src/roster/lists.js.map +1 -1
- package/dist/src/roster/times.d.ts +402 -0
- package/dist/src/roster/times.d.ts.map +1 -1
- package/dist/src/roster/types.d.ts +913 -1
- package/dist/src/roster/types.d.ts.map +1 -1
- package/dist/src/roster/types.js +43 -3
- package/dist/src/roster/types.js.map +1 -1
- package/dist/src/schedule/cell-checks.d.ts +85 -0
- package/dist/src/schedule/cell-checks.d.ts.map +1 -0
- package/dist/src/schedule/cell-checks.js +211 -0
- package/dist/src/schedule/cell-checks.js.map +1 -0
- package/dist/src/schedule/events.d.ts +42 -10
- package/dist/src/schedule/events.d.ts.map +1 -1
- package/dist/src/schedule/events.js +349 -155
- package/dist/src/schedule/events.js.map +1 -1
- package/dist/src/schedule/fields.d.ts +134 -0
- package/dist/src/schedule/fields.d.ts.map +1 -0
- package/dist/src/schedule/fields.js +207 -0
- package/dist/src/schedule/fields.js.map +1 -0
- package/dist/src/schedule/library.d.ts +11 -3
- package/dist/src/schedule/library.d.ts.map +1 -1
- package/dist/src/schedule/library.js +9 -6
- package/dist/src/schedule/library.js.map +1 -1
- package/dist/src/schedule/optimise.d.ts +124 -0
- package/dist/src/schedule/optimise.d.ts.map +1 -0
- package/dist/src/schedule/optimise.js +140 -0
- package/dist/src/schedule/optimise.js.map +1 -0
- package/dist/src/schedule/pages.d.ts +76 -0
- package/dist/src/schedule/pages.d.ts.map +1 -0
- package/dist/src/schedule/pages.js +86 -0
- package/dist/src/schedule/pages.js.map +1 -0
- package/dist/src/schedule/record-window.d.ts +119 -6
- package/dist/src/schedule/record-window.d.ts.map +1 -1
- package/dist/src/schedule/record-window.js +139 -60
- package/dist/src/schedule/record-window.js.map +1 -1
- package/dist/src/schedule/resources.d.ts +8 -4
- package/dist/src/schedule/resources.d.ts.map +1 -1
- package/dist/src/schedule/resources.js +35 -15
- package/dist/src/schedule/resources.js.map +1 -1
- package/dist/src/schedule/session.d.ts +14 -0
- package/dist/src/schedule/session.d.ts.map +1 -1
- package/dist/src/schedule/session.js +29 -17
- package/dist/src/schedule/session.js.map +1 -1
- package/dist/src/schedule/types.d.ts +426 -36
- package/dist/src/schedule/types.d.ts.map +1 -1
- package/dist/src/schedule/types.js +63 -17
- package/dist/src/schedule/types.js.map +1 -1
- package/dist/src/schedule/window.d.ts +30 -9
- package/dist/src/schedule/window.d.ts.map +1 -1
- package/dist/src/schedule/window.js +101 -49
- package/dist/src/schedule/window.js.map +1 -1
- package/dist/src/schematic/index.d.ts +277 -0
- package/dist/src/schematic/index.d.ts.map +1 -0
- package/dist/src/schematic/index.js +206 -0
- package/dist/src/schematic/index.js.map +1 -0
- package/dist/src/schematic/kinds.d.ts +501 -0
- package/dist/src/schematic/kinds.d.ts.map +1 -0
- package/dist/src/schematic/kinds.js +1027 -0
- package/dist/src/schematic/kinds.js.map +1 -0
- package/dist/src/schematic/layers.d.ts +74 -0
- package/dist/src/schematic/layers.d.ts.map +1 -0
- package/dist/src/schematic/layers.js +99 -0
- package/dist/src/schematic/layers.js.map +1 -0
- package/dist/src/schematic/library.d.ts +202 -0
- package/dist/src/schematic/library.d.ts.map +1 -0
- package/dist/src/schematic/library.js +244 -0
- package/dist/src/schematic/library.js.map +1 -0
- package/dist/src/schematic/payload.d.ts +8360 -0
- package/dist/src/schematic/payload.d.ts.map +1 -0
- package/dist/src/schematic/payload.js +446 -0
- package/dist/src/schematic/payload.js.map +1 -0
- package/dist/src/schematic/schematic.d.ts +27 -0
- package/dist/src/schematic/schematic.d.ts.map +1 -0
- package/dist/src/schematic/schematic.js +17 -0
- package/dist/src/schematic/schematic.js.map +1 -0
- package/dist/src/schematic/shapes.d.ts +150 -0
- package/dist/src/schematic/shapes.d.ts.map +1 -0
- package/dist/src/schematic/shapes.js +171 -0
- package/dist/src/schematic/shapes.js.map +1 -0
- package/dist/src/schematic/templates.d.ts +96 -0
- package/dist/src/schematic/templates.d.ts.map +1 -0
- package/dist/src/schematic/templates.js +91 -0
- package/dist/src/schematic/templates.js.map +1 -0
- package/dist/src/schematic/types.d.ts +5766 -0
- package/dist/src/schematic/types.d.ts.map +1 -0
- package/dist/src/schematic/types.js +688 -0
- package/dist/src/schematic/types.js.map +1 -0
- package/dist/src/schematic/window.d.ts +212 -0
- package/dist/src/schematic/window.d.ts.map +1 -0
- package/dist/src/schematic/window.js +337 -0
- package/dist/src/schematic/window.js.map +1 -0
- package/dist/src/sheet/editing-bridge.d.ts +4 -2
- package/dist/src/sheet/editing-bridge.d.ts.map +1 -1
- package/dist/src/sheet/editing-bridge.js +8 -2
- package/dist/src/sheet/editing-bridge.js.map +1 -1
- package/dist/src/sheet/editing-types.d.ts +9 -5
- package/dist/src/sheet/editing-types.d.ts.map +1 -1
- package/dist/src/sheet/editing-types.js +9 -5
- package/dist/src/sheet/editing-types.js.map +1 -1
- package/dist/src/sheet/index.d.ts +18 -8
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/index.js +15 -7
- package/dist/src/sheet/index.js.map +1 -1
- package/dist/src/sheet/optimise.d.ts +69 -0
- package/dist/src/sheet/optimise.d.ts.map +1 -0
- package/dist/src/sheet/optimise.js +81 -0
- package/dist/src/sheet/optimise.js.map +1 -0
- package/dist/src/sheet/registers.d.ts +5 -5
- package/dist/src/sheet/registers.js +5 -5
- package/dist/src/sheet/root.d.ts +2 -0
- package/dist/src/sheet/root.d.ts.map +1 -1
- package/dist/src/sheet/root.js +2 -2
- package/dist/src/sheet/root.js.map +1 -1
- package/dist/src/sheet/sheet.d.ts +753 -573
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +45 -13
- package/dist/src/sheet/sheet.js.map +1 -1
- package/dist/src/sheet/types.d.ts +92 -12
- package/dist/src/sheet/types.d.ts.map +1 -1
- package/dist/src/sheet/types.js +4 -8
- package/dist/src/sheet/types.js.map +1 -1
- package/dist/src/utils/keyed-rows.d.ts +41 -0
- package/dist/src/utils/keyed-rows.d.ts.map +1 -0
- package/dist/src/utils/keyed-rows.js +64 -0
- package/dist/src/utils/keyed-rows.js.map +1 -0
- package/dist/src/utils/optimise.d.ts +79 -0
- package/dist/src/utils/optimise.d.ts.map +1 -0
- package/dist/src/utils/optimise.js +46 -0
- package/dist/src/utils/optimise.js.map +1 -0
- package/dist/test/allocation/allocation.examples.d.ts +6 -18
- package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
- package/dist/test/allocation/allocation.examples.js +3 -3
- package/dist/test/allocation/allocation.examples.js.map +1 -1
- package/dist/test/allocation/optimise.examples.d.ts +109 -0
- package/dist/test/allocation/optimise.examples.d.ts.map +1 -0
- package/dist/test/allocation/optimise.examples.js +223 -0
- package/dist/test/allocation/optimise.examples.js.map +1 -0
- package/dist/test/bind/data/data.examples.d.ts +540 -36
- package/dist/test/bind/data/data.examples.d.ts.map +1 -1
- package/dist/test/bind/data/data.examples.js +66 -2
- package/dist/test/bind/data/data.examples.js.map +1 -1
- package/dist/test/bind/record/record.examples.d.ts +1 -3
- package/dist/test/bind/record/record.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar-records.examples.js +3 -3
- package/dist/test/calendar/calendar-records.examples.js.map +1 -1
- package/dist/test/calendar/calendar-windows.examples.d.ts +9 -0
- package/dist/test/calendar/calendar-windows.examples.d.ts.map +1 -0
- package/dist/test/calendar/calendar-windows.examples.js +111 -0
- package/dist/test/calendar/calendar-windows.examples.js.map +1 -0
- package/dist/test/calendar/calendar.examples.d.ts +7 -21
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar.examples.js +7 -7
- package/dist/test/calendar/calendar.examples.js.map +1 -1
- package/dist/test/calendar/optimise.examples.d.ts +132 -0
- package/dist/test/calendar/optimise.examples.d.ts.map +1 -0
- package/dist/test/calendar/optimise.examples.js +75 -0
- package/dist/test/calendar/optimise.examples.js.map +1 -0
- package/dist/test/examples-package.d.ts +46 -10
- package/dist/test/examples-package.d.ts.map +1 -1
- package/dist/test/examples-package.js +142 -32
- package/dist/test/examples-package.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +10 -30
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
- package/dist/test/plan/optimise.examples.d.ts +207 -0
- package/dist/test/plan/optimise.examples.d.ts.map +1 -0
- package/dist/test/plan/optimise.examples.js +98 -0
- package/dist/test/plan/optimise.examples.js.map +1 -0
- package/dist/test/plan/plan-events.examples.d.ts +8 -24
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-events.examples.js +3 -3
- package/dist/test/plan/plan-events.examples.js.map +1 -1
- package/dist/test/plan/plan-records.examples.d.ts +200 -19
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-records.examples.js +125 -28
- package/dist/test/plan/plan-records.examples.js.map +1 -1
- package/dist/test/plan/plan-windows.examples.d.ts +853 -36
- package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-windows.examples.js +166 -29
- package/dist/test/plan/plan-windows.examples.js.map +1 -1
- package/dist/test/plan/plan.examples.d.ts +7 -21
- package/dist/test/plan/plan.examples.d.ts.map +1 -1
- package/dist/test/plan/plan.examples.js +11 -9
- package/dist/test/plan/plan.examples.js.map +1 -1
- package/dist/test/roster/domain.examples.d.ts +804 -0
- package/dist/test/roster/domain.examples.d.ts.map +1 -1
- package/dist/test/roster/domain.examples.js +3 -3
- package/dist/test/roster/domain.examples.js.map +1 -1
- package/dist/test/roster/optimise.examples.d.ts +485 -0
- package/dist/test/roster/optimise.examples.d.ts.map +1 -0
- package/dist/test/roster/optimise.examples.js +155 -0
- package/dist/test/roster/optimise.examples.js.map +1 -0
- package/dist/test/roster/roster-records.examples.d.ts +6 -18
- package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
- package/dist/test/roster/roster-records.examples.js +1 -1
- package/dist/test/roster/roster-records.examples.js.map +1 -1
- package/dist/test/roster/roster.examples.d.ts +3391 -21
- package/dist/test/roster/roster.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.js +54 -7
- package/dist/test/roster/roster.examples.js.map +1 -1
- package/dist/test/roster/warehouse.d.ts +150 -7
- package/dist/test/roster/warehouse.d.ts.map +1 -1
- package/dist/test/roster/warehouse.js +36 -11
- package/dist/test/roster/warehouse.js.map +1 -1
- package/dist/test/schedule/schedule.examples.d.ts +1 -3
- package/dist/test/schedule/schedule.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic-records.examples.d.ts +444 -0
- package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -0
- package/dist/test/schematic/schematic-records.examples.js +205 -0
- package/dist/test/schematic/schematic-records.examples.js.map +1 -0
- package/dist/test/schematic/schematic.examples.d.ts +2289 -0
- package/dist/test/schematic/schematic.examples.d.ts.map +1 -0
- package/dist/test/schematic/schematic.examples.js +453 -0
- package/dist/test/schematic/schematic.examples.js.map +1 -0
- package/dist/test/sheet/optimise.examples.d.ts +177 -0
- package/dist/test/sheet/optimise.examples.d.ts.map +1 -0
- package/dist/test/sheet/optimise.examples.js +75 -0
- package/dist/test/sheet/optimise.examples.js.map +1 -0
- package/dist/test/sheet/sheet-records.examples.d.ts +95 -204
- package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet-records.examples.js +42 -17
- package/dist/test/sheet/sheet-records.examples.js.map +1 -1
- package/dist/test/sheet/sheet.examples.d.ts +17 -33
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet.examples.js +18 -15
- package/dist/test/sheet/sheet.examples.js.map +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/schematic/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EACH,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAc,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EACnH,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EACzC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAU,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAA0C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ACH,UAAU,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC,OAAO,sBAAsB,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACvG,uHAAuH;IACvH,QAAQ,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,OAAO,gBAAgB,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;CAC/F;AA6MD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAmHpF"}
|
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The Schematic's payload (#1386, #1401, `Schematic Builder Spec.md` §2, §5):
|
|
7
|
+
* what `<Schematic>` hands the renderer through its `Schematic` carrier — the
|
|
8
|
+
* drawing's extent and scale, its kinds by slot, its layers, its narrowing and
|
|
9
|
+
* how a narrowed-out row draws, its library's tabs, whether it has an
|
|
10
|
+
* inspector, whether it is read only, its `id`, the canvas's options, the
|
|
11
|
+
* connect veto and what the host hears — and every refusal of its props, made
|
|
12
|
+
* when the surface is built.
|
|
13
|
+
*
|
|
14
|
+
* Its props are the Plan's, the Roster's and the Calendar's (D31–D34): `id`
|
|
15
|
+
* keeps its state apart, the inspector is opted into, the library's tabs cover
|
|
16
|
+
* every kind, `onSelect` hears the whole selection, and `canConnect` answers a
|
|
17
|
+
* candidate with the refusal's words. Its layers are the app's rows
|
|
18
|
+
* (`Schematic.layers`, D36).
|
|
19
|
+
*
|
|
20
|
+
* Its kinds are the app's records (§1, `kinds.ts`): `items`, `zones`, `links`
|
|
21
|
+
* and `nets` each map a slot to a kind, each closed over its record behind
|
|
22
|
+
* East functions over beast2 bytes, so the payload is one type whatever the
|
|
23
|
+
* rows hold. A slot names the kind in the payload and the source of the slice
|
|
24
|
+
* that narrows it.
|
|
25
|
+
*
|
|
26
|
+
* Its narrowing is one `Slice.bindRecords` (§10.1): a source named after a
|
|
27
|
+
* kind's slot narrows that kind, read complete through it (`window.ts`) — or,
|
|
28
|
+
* under `narrowed="dim"`, every row read through it, and what the narrowing
|
|
29
|
+
* leaves out drawn as context (§10.3, #1392) — and each other source the
|
|
30
|
+
* templates list or the author's tab that names it. The payload's block binds
|
|
31
|
+
* each source once (`recordSources(…).bind($)`, #1356), and each kind reads
|
|
32
|
+
* its own source inside its functions; none reads a source's state, so a
|
|
33
|
+
* choice builds the Schematic no more (#1354).
|
|
34
|
+
*
|
|
35
|
+
* The props §2 removes are refused when the surface is built, each naming the
|
|
36
|
+
* form that replaces it (SC3).
|
|
37
|
+
*
|
|
38
|
+
* @packageDocumentation
|
|
39
|
+
*/
|
|
40
|
+
import { ArrayType, BooleanType, DictType, East, Expr, FloatType, FunctionType, NullType, OptionType, StringType, StructType, none, some, variant, } from "@elaraai/east";
|
|
41
|
+
import { EastUI, RowSourceType } from "@elaraai/east-ui";
|
|
42
|
+
import { RecordSlicesChromeType, isRecordSlices } from "@elaraai/east-ui/internal";
|
|
43
|
+
import { recordSources, sliceSourceNames, templatesSource } from "../utils/record-sources.js";
|
|
44
|
+
import { isSchematicKind } from "./kinds.js";
|
|
45
|
+
import { SchematicLibraryTabType, buildSchematicLibrary, schematicTabSources } from "./library.js";
|
|
46
|
+
import { isSchematicLayers } from "./layers.js";
|
|
47
|
+
import { SchematicCandidateType, SchematicItemKindType, SchematicLayerType, SchematicLinkKindType, SchematicNarrowedType, SchematicNetKindType, SchematicRefType, SchematicZoneKindType, } from "./types.js";
|
|
48
|
+
// ============================================================================
|
|
49
|
+
// The payload
|
|
50
|
+
// ============================================================================
|
|
51
|
+
/** Each source's shown keys on the wire, by the source's name. */
|
|
52
|
+
const ShownType = DictType(StringType, RowSourceType(ArrayType(StringType)));
|
|
53
|
+
/**
|
|
54
|
+
* The `Schematic` renderer's payload: the Schematic's interface (§5).
|
|
55
|
+
*
|
|
56
|
+
* @property extent - The drawing's world bounds; the canvas fits them
|
|
57
|
+
* @property scaleUnit - The scale bar's unit
|
|
58
|
+
* @property items - The item kinds, in the order `items` lists their slots
|
|
59
|
+
* @property zones - The zone kinds
|
|
60
|
+
* @property links - The link kinds
|
|
61
|
+
* @property nets - The net kinds
|
|
62
|
+
* @property layers - The layers, from the app's record, and their author defaults, in their order (§8)
|
|
63
|
+
* @property slice - The rail's chrome over the one `Slice.bindRecords`; `none`, no rail
|
|
64
|
+
* @property shown - Each source's shown keys, paged through its own data, by the source's name: what a templates list's and a tab's cards follow, and what dims a narrowed-out row
|
|
65
|
+
* @property narrowed - How a narrowed-out row draws (§10.3)
|
|
66
|
+
* @property library - The library pane's tabs, in the order `library` lists them; none, no library pane
|
|
67
|
+
* @property inspector - Whether the inspector pane shows (§9): off unless `inspector` is given
|
|
68
|
+
* @property readOnly - No gesture, drop or inspector edit; selection stays
|
|
69
|
+
* @property id - Keeps the Schematic's state apart, when a surface holds two
|
|
70
|
+
* @property grid - The metric grid; on by default
|
|
71
|
+
* @property minimap - The minimap; shown at 25 items or more by default
|
|
72
|
+
* @property canConnect - Vetoes a link or a net before its draft snaps: `none` allows it, or the refusal's words
|
|
73
|
+
* @property onSelect - Hears the whole selection after each change, each entity by its kind and key
|
|
74
|
+
*/
|
|
75
|
+
export const SchematicPayloadType = StructType({
|
|
76
|
+
extent: StructType({ width: FloatType, height: FloatType }),
|
|
77
|
+
scaleUnit: OptionType(StringType),
|
|
78
|
+
items: ArrayType(SchematicItemKindType),
|
|
79
|
+
zones: ArrayType(SchematicZoneKindType),
|
|
80
|
+
links: ArrayType(SchematicLinkKindType),
|
|
81
|
+
nets: ArrayType(SchematicNetKindType),
|
|
82
|
+
layers: ArrayType(SchematicLayerType),
|
|
83
|
+
slice: OptionType(RecordSlicesChromeType),
|
|
84
|
+
shown: ShownType,
|
|
85
|
+
narrowed: SchematicNarrowedType,
|
|
86
|
+
library: ArrayType(SchematicLibraryTabType),
|
|
87
|
+
inspector: BooleanType,
|
|
88
|
+
readOnly: BooleanType,
|
|
89
|
+
id: OptionType(StringType),
|
|
90
|
+
grid: OptionType(BooleanType),
|
|
91
|
+
minimap: OptionType(BooleanType),
|
|
92
|
+
canConnect: OptionType(FunctionType([SchematicCandidateType], OptionType(StringType))),
|
|
93
|
+
onSelect: OptionType(FunctionType([ArrayType(SchematicRefType)], NullType)),
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* The `Schematic` carrier: `<Schematic>` builds a {@link SchematicPayloadType}
|
|
97
|
+
* and returns it through this {@link EastUI.component}. The React renderer
|
|
98
|
+
* registers against it in `@elaraai/e3-ui-components` via
|
|
99
|
+
* `implementUIComponent`.
|
|
100
|
+
*/
|
|
101
|
+
export const SchematicComponent = EastUI.component("Schematic", SchematicPayloadType, { optional: true });
|
|
102
|
+
// ============================================================================
|
|
103
|
+
// The Schematic's shared keys
|
|
104
|
+
// ============================================================================
|
|
105
|
+
/**
|
|
106
|
+
* The names a Schematic keeps its viewer's state under, by its `id` (§5,
|
|
107
|
+
* D31): its frame's panes, its library's id, the layers the viewer shows,
|
|
108
|
+
* hides and locks, the tool it holds, and its drop surface, where its
|
|
109
|
+
* library's cards land.
|
|
110
|
+
*
|
|
111
|
+
* @remarks
|
|
112
|
+
* As the Plan's `planKeys(id)`: two Schematics on one surface keep apart only
|
|
113
|
+
* when each has an `id`.
|
|
114
|
+
*
|
|
115
|
+
* @param id - The Schematic's `id`, when a surface holds more than one; omitted, the one Schematic
|
|
116
|
+
* @returns The keys
|
|
117
|
+
*/
|
|
118
|
+
export function schematicKeys(id) {
|
|
119
|
+
const suffix = id === undefined ? "" : `.${id}`;
|
|
120
|
+
return {
|
|
121
|
+
frame: `schematic${suffix}.frame`,
|
|
122
|
+
library: `schematic.library${suffix}`,
|
|
123
|
+
layers: `schematic${suffix}.layers`,
|
|
124
|
+
tools: `schematic${suffix}.tools`,
|
|
125
|
+
surface: `schematic${suffix}.surface`,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/** The refusal of rows and their mappers: kinds over the app's records replace them (§2). */
|
|
129
|
+
function rowsRefusal(prop) {
|
|
130
|
+
const sort = prop.startsWith("item") ? "items" : prop.startsWith("zone") ? "zones" : prop.startsWith("link") ? "links" : "nets";
|
|
131
|
+
const example = {
|
|
132
|
+
items: "items={{ racks: Schematic.items(Record.bind(racks, [e3.mutation.patch(racks)]), { name, icon, x, y, label }) }}",
|
|
133
|
+
zones: "zones={{ halls: Schematic.zones(Data.bind(halls), { name, icon, x, y, width, height, label }) }}",
|
|
134
|
+
links: "links={{ fibre: Schematic.links(Record.bind(fibres, [e3.mutation.patch(fibres)]), { name, icon, from: { field, of }, to: { field, of } }) }}",
|
|
135
|
+
nets: "nets={{ feeds: Schematic.nets(Record.bind(feeds, [e3.mutation.patch(feeds)]), { name, icon, sources: { field, of }, destinations: { field, of } }) }}",
|
|
136
|
+
}[sort];
|
|
137
|
+
return `Schematic: rows and their mappers are gone — an app's rows are its records, each kind's fields mapped to its roles: ${example}`;
|
|
138
|
+
}
|
|
139
|
+
/** The refusal of a callback for an edit: the editing session's gestures replace them (§2, §7). */
|
|
140
|
+
const SESSION = "every gesture is a transaction of the Schematic's editing session, and Save writes each record through its patch door — " +
|
|
141
|
+
"bind a kind with Record.bind(record, [e3.mutation.patch(record)]) to edit it";
|
|
142
|
+
/** The refusal of the slice's effect props: `narrowed` replaces them (§2, §10.3). */
|
|
143
|
+
const NARROWED = "how a narrowed-out row draws is `narrowed` — narrowed=\"dim\", or narrowed={{ show: \"dim\", opacity, desaturate, dot, emphasis, frame, fit }}";
|
|
144
|
+
/** The refusal of a hover card: the inspector replaces them (§2, §9). */
|
|
145
|
+
const HOVER = "the inspector shows what is selected — give `inspector` for the pane, and a kind its own Details with its `inspector`: " +
|
|
146
|
+
"Schematic.items(record, { …, inspector: East.function([RowType, FunctionType([RowType], NullType)], UIComponentType, ($, row, update) => …) })";
|
|
147
|
+
/** The refusal of a selection callback of another form: `onSelect` replaces them (§2, D34). */
|
|
148
|
+
const SELECT = "`onSelect` hears the whole selection after each change, items, zones, links and nets alike, each by its kind and key: " +
|
|
149
|
+
"onSelect={East.function([ArrayType(Schematic.Types.Ref)], NullType, ($, selected) => …)}";
|
|
150
|
+
/** The refusal of a size: the Schematic fills the box it is given (§2). */
|
|
151
|
+
const SIZE = "the Schematic fills the box it is given — give it a box of its own height: <Box height=\"640px\"><Schematic … /></Box>";
|
|
152
|
+
/** Each prop §2 removes, with the form that replaces it (SC3). */
|
|
153
|
+
const REMOVED = {
|
|
154
|
+
item: rowsRefusal("item"),
|
|
155
|
+
zone: rowsRefusal("zone"),
|
|
156
|
+
link: rowsRefusal("link"),
|
|
157
|
+
net: rowsRefusal("net"),
|
|
158
|
+
onMoveItem: SESSION,
|
|
159
|
+
onCreateLink: SESSION,
|
|
160
|
+
onEditLink: SESSION,
|
|
161
|
+
onDeleteLink: SESSION,
|
|
162
|
+
onEditNet: SESSION,
|
|
163
|
+
linkMode: "the Connect tool always records a link, of the link kind its menu picks — an app that plans operations between items gives them a link kind of their own",
|
|
164
|
+
readOnlyLinks: "a kind is read only when it is bound read only — Data.bind(record), or Data.bindPaged(record) read through its source",
|
|
165
|
+
readOnlyItems: "a kind is read only when it is bound read only — Data.bind(record), or Data.bindPaged(record) read through its source",
|
|
166
|
+
itemHover: HOVER,
|
|
167
|
+
zoneHover: HOVER,
|
|
168
|
+
linkHover: HOVER,
|
|
169
|
+
affordances: "it moved into `slice`: slice={{ slice: Slice.bindRecords(key, { … }), affordances }}",
|
|
170
|
+
sliceHidden: NARROWED,
|
|
171
|
+
sliceOpacity: NARROWED,
|
|
172
|
+
sliceDesaturate: NARROWED,
|
|
173
|
+
sliceDot: NARROWED,
|
|
174
|
+
sliceEmphasis: NARROWED,
|
|
175
|
+
sliceFrame: NARROWED,
|
|
176
|
+
sliceFrameFit: NARROWED,
|
|
177
|
+
sliceSelectField: "the selection drives the inspector, and the rail is the only narrowing — leave it out",
|
|
178
|
+
selectionMode: "selection is built in: a tap selects, Shift extends it, and the Marquee tool boxes — leave it out",
|
|
179
|
+
navigator: "the library's Index tab lists the zones and the items inside them: library={[Schematic.library.index()]}",
|
|
180
|
+
height: SIZE,
|
|
181
|
+
maxHeight: SIZE,
|
|
182
|
+
onSelectZone: SELECT,
|
|
183
|
+
onSelectionChange: SELECT,
|
|
184
|
+
onZoneSelectionChange: SELECT,
|
|
185
|
+
onSelectLink: SELECT,
|
|
186
|
+
onViewportChange: "the canvas reads its own window, and nothing hears where the camera settled — leave it out",
|
|
187
|
+
onItemOpen: "Enter or a double-click opens the selection in the inspector's Details — give `inspector`, and a kind its own Details with its `inspector`",
|
|
188
|
+
selectZoomFocus: "a tap selects in place, and Find, the Index tab and the arrow keys fly to what they pick — leave it out",
|
|
189
|
+
name: "`id` names the Schematic, as the Plan's, the Roster's and the Calendar's do: <Schematic id=\"floor\" … />",
|
|
190
|
+
};
|
|
191
|
+
/** Every prop `<Schematic>` takes. */
|
|
192
|
+
const PROPS = new Set([
|
|
193
|
+
"extent", "scaleUnit", "items", "zones", "links", "nets", "layers", "slice", "narrowed", "library", "inspector", "readOnly", "id",
|
|
194
|
+
"grid", "minimap", "canConnect", "onSelect",
|
|
195
|
+
]);
|
|
196
|
+
/** A sort's noun, as a refusal names a kind of it. */
|
|
197
|
+
const NOUN = { items: "item", zones: "zone", links: "link", nets: "net" };
|
|
198
|
+
/** The declaration each sort takes, as a refusal names it. */
|
|
199
|
+
const DECLARE = {
|
|
200
|
+
items: "Schematic.items(record, { name, icon, x, y, label })",
|
|
201
|
+
zones: "Schematic.zones(record, { name, icon, x, y, width, height, label })",
|
|
202
|
+
links: "Schematic.links(record, { name, icon, from, to })",
|
|
203
|
+
nets: "Schematic.nets(record, { name, icon, sources, destinations })",
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Reads one sort's kinds by slot (§1, rule 5), each checked to be a kind of
|
|
207
|
+
* that sort.
|
|
208
|
+
*
|
|
209
|
+
* @param sort - The prop: `items`, `zones`, `links` or `nets`
|
|
210
|
+
* @param given - What it was given
|
|
211
|
+
* @returns Its kinds, in the order their slots are listed
|
|
212
|
+
* @throws {Error} When it is rows rather than kinds by slot, or a slot holds no kind of its sort
|
|
213
|
+
*/
|
|
214
|
+
function kindsOf(sort, given) {
|
|
215
|
+
if (given === undefined)
|
|
216
|
+
return [];
|
|
217
|
+
if (given instanceof Expr || Array.isArray(given) || typeof given !== "object" || given === null || isSchematicKind(given, sort)) {
|
|
218
|
+
throw new Error(isSchematicKind(given, sort)
|
|
219
|
+
? `Schematic: \`${sort}\` takes kinds by slot — ${sort}={{ <slot>: ${DECLARE[sort]} }}: a slot names the kind, and the source of the slice that narrows it`
|
|
220
|
+
: rowsRefusal(sort));
|
|
221
|
+
}
|
|
222
|
+
return Object.entries(given).map(([slot, kind]) => {
|
|
223
|
+
if (!isSchematicKind(kind, sort)) {
|
|
224
|
+
const other = ["items", "zones", "links", "nets"].find((s) => isSchematicKind(kind, s));
|
|
225
|
+
throw new Error(`Schematic: \`${sort}.${slot}\` is ${sort === "items" ? "an" : "a"} ${NOUN[sort]} kind, ${DECLARE[sort]}` +
|
|
226
|
+
(other === undefined ? "" : ` — and this is ${other === "items" ? "an" : "a"} ${NOUN[other]} kind: give it under \`${other}\``));
|
|
227
|
+
}
|
|
228
|
+
return { slot, sort, kind: kind };
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
/** The drawing's world bounds, checked. */
|
|
232
|
+
function extentOf(extent) {
|
|
233
|
+
const box = extent;
|
|
234
|
+
const positive = (n) => typeof n === "number" && Number.isFinite(n) && n > 0;
|
|
235
|
+
if (typeof extent !== "object" || extent === null || !positive(box?.width) || !positive(box?.height)) {
|
|
236
|
+
throw new Error("Schematic: `extent` is the drawing's world bounds, { width, height }, each a positive number of world units — the canvas fits them");
|
|
237
|
+
}
|
|
238
|
+
return { width: box.width, height: box.height };
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* How a narrowed-out row draws (§10.3), on the wire; and whether it is dimmed,
|
|
242
|
+
* when each kind read through its source reads every row and the renderer
|
|
243
|
+
* draws what the narrowing leaves out as context.
|
|
244
|
+
*
|
|
245
|
+
* @param narrowed - The Schematic's `narrowed`
|
|
246
|
+
* @returns It on the wire, and whether a narrowed-out row is dimmed
|
|
247
|
+
* @throws {Error} For a `narrowed` of another form, naming the forms it takes
|
|
248
|
+
*/
|
|
249
|
+
function narrowedOf(narrowed) {
|
|
250
|
+
const options = narrowed === undefined || narrowed === "hide" ? { show: "hide" } : narrowed === "dim" ? { show: "dim" } : narrowed;
|
|
251
|
+
const o = options;
|
|
252
|
+
const flag = (value) => value === undefined || typeof value === "boolean";
|
|
253
|
+
if (typeof options !== "object" || options === null || (o.show !== "hide" && o.show !== "dim")
|
|
254
|
+
|| !(o.opacity === undefined || (typeof o.opacity === "number" && o.opacity >= 0 && o.opacity <= 1))
|
|
255
|
+
|| !flag(o.desaturate) || !flag(o.dot) || !flag(o.frame) || !flag(o.fit)
|
|
256
|
+
|| !(o.emphasis === undefined || o.emphasis === "halo" || o.emphasis === "pulse")) {
|
|
257
|
+
throw new Error("Schematic: `narrowed` is \"hide\" (the default), \"dim\", or { show: \"hide\" | \"dim\", opacity?: 0–1, desaturate?, dot?, emphasis?: \"halo\" | \"pulse\", frame?, fit? }");
|
|
258
|
+
}
|
|
259
|
+
const wire = East.value({
|
|
260
|
+
show: variant(o.show, null),
|
|
261
|
+
opacity: o.opacity ?? 0.35,
|
|
262
|
+
desaturate: o.desaturate ?? true,
|
|
263
|
+
dot: o.dot ?? false,
|
|
264
|
+
emphasis: o.emphasis === undefined ? none : some(variant(o.emphasis, null)),
|
|
265
|
+
frame: o.frame ?? false,
|
|
266
|
+
fit: o.fit ?? false,
|
|
267
|
+
}, SchematicNarrowedType);
|
|
268
|
+
return { wire, dim: o.show === "dim" };
|
|
269
|
+
}
|
|
270
|
+
/** The layers' declaration, as a refusal names it. */
|
|
271
|
+
const LAYERS = "layers={Schematic.layers(systems.read(), { label: (s) => s.label, order?, tone?, color?, visible?, locked?, opacity? })}";
|
|
272
|
+
/**
|
|
273
|
+
* The layers on the wire: what `Schematic.layers` read from the app's record
|
|
274
|
+
* (D36); none, when left out.
|
|
275
|
+
*
|
|
276
|
+
* @param layers - The Schematic's `layers`
|
|
277
|
+
* @returns The layers, in their order
|
|
278
|
+
* @throws {Error} For a list written in the code, or anything but `Schematic.layers`' declaration, naming it
|
|
279
|
+
*/
|
|
280
|
+
function layersOf(layers) {
|
|
281
|
+
if (layers === undefined)
|
|
282
|
+
return East.value([], ArrayType(SchematicLayerType));
|
|
283
|
+
if (isSchematicLayers(layers))
|
|
284
|
+
return layers.rows;
|
|
285
|
+
if (Array.isArray(layers)) {
|
|
286
|
+
throw new Error(`Schematic: \`layers\` reads the app's own rows, as the Roster's lists do — ${LAYERS}: a list written in the code is gone, ` +
|
|
287
|
+
"so each layer is a row of the app's record, keyed as an entity's `layer` field names it");
|
|
288
|
+
}
|
|
289
|
+
throw new Error(`Schematic: \`layers\` is ${LAYERS}`);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* The inspector pane (§9, D32): shown for `true`, none for `false` or left
|
|
293
|
+
* out, as the Plan's, the Roster's and the Calendar's.
|
|
294
|
+
*
|
|
295
|
+
* @param inspector - The Schematic's `inspector`
|
|
296
|
+
* @returns Whether the pane shows
|
|
297
|
+
* @throws {Error} For an `inspector` that is no Boolean, naming the kind's own `inspector`, the one way to give it Details
|
|
298
|
+
*/
|
|
299
|
+
function inspectorOf(inspector) {
|
|
300
|
+
if (inspector === undefined || inspector === false)
|
|
301
|
+
return false;
|
|
302
|
+
if (inspector === true)
|
|
303
|
+
return true;
|
|
304
|
+
throw new Error("Schematic: `inspector` is true or false — a kind's own Details is its kind's `inspector`: " +
|
|
305
|
+
"Schematic.items(record, { …, inspector: East.function([RowType, FunctionType([RowType], NullType)], UIComponentType, ($, row, update) => …) })");
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Creates the Schematic's payload alone — what `<Schematic>` returns through
|
|
309
|
+
* the `Schematic` carrier — for the tests and the renderer's fixtures, which
|
|
310
|
+
* read it whole.
|
|
311
|
+
*
|
|
312
|
+
* @param props - The Schematic's props ({@link SchematicProps})
|
|
313
|
+
* @returns An East expression of {@link SchematicPayloadType}
|
|
314
|
+
* @throws {Error} Naming the prop and the remedy (SC3): each prop §2 removes — rows and their mappers, the callbacks
|
|
315
|
+
* for an edit, `linkMode`, `readOnlyLinks` and `readOnlyItems`, the hover cards, `affordances` outside `slice`, the
|
|
316
|
+
* slice's effect props, `sliceSelectField`, `selectionMode`, `navigator`, `height` and `maxHeight`, `onSelectZone`,
|
|
317
|
+
* `onSelectionChange`, `onZoneSelectionChange`, `onSelectLink`, `onViewportChange`, `onItemOpen`, `selectZoomFocus`
|
|
318
|
+
* and `name` — and a prop the Schematic doesn't take; an `extent` that is no pair of positive numbers; no item kind;
|
|
319
|
+
* a sort given rows rather than kinds by slot, a slot holding a kind of another sort, and one slot holding two kinds;
|
|
320
|
+
* a link's end or a net's side holding keys of a slot that holds no item kind; a `slice` that is not `{ slice }`, or
|
|
321
|
+
* not `Slice.bindRecords`, or holding a source nothing names, or the brush; a templates list naming no source of the
|
|
322
|
+
* slice; a `narrowed` of another form; `layers` other than `Schematic.layers`' declaration, a list written in the code
|
|
323
|
+
* among them; an `inspector` that is no Boolean; an `id` that is no string; each of the library's refusals
|
|
324
|
+
* (`library.ts`); and each kind's refusals of its binding (SC33)
|
|
325
|
+
* @internal
|
|
326
|
+
*/
|
|
327
|
+
export function createSchematicPayload(props) {
|
|
328
|
+
const given = props;
|
|
329
|
+
for (const [prop, remedy] of Object.entries(REMOVED)) {
|
|
330
|
+
if (prop in given)
|
|
331
|
+
throw new Error(prop === "item" || prop === "zone" || prop === "link" || prop === "net" ? remedy : `Schematic: \`${prop}\` is gone — ${remedy}`);
|
|
332
|
+
}
|
|
333
|
+
for (const prop of Object.keys(given)) {
|
|
334
|
+
if (!PROPS.has(prop) && !(prop === "children" && given[prop] === undefined)) {
|
|
335
|
+
throw new Error(`Schematic: \`${prop}\` is not a prop of <Schematic> — it takes ${[...PROPS].join(", ")}`);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
const extent = extentOf(given.extent);
|
|
339
|
+
// The kinds, by slot (§1, rule 5): each slot names its kind, and the source of the slice that narrows it.
|
|
340
|
+
const items = kindsOf("items", given.items);
|
|
341
|
+
if (items.length === 0)
|
|
342
|
+
throw new Error(`Schematic: needs its items — items={{ <slot>: ${DECLARE.items} }}, one item kind at least, over the app's record`);
|
|
343
|
+
const zones = kindsOf("zones", given.zones);
|
|
344
|
+
const links = kindsOf("links", given.links);
|
|
345
|
+
const nets = kindsOf("nets", given.nets);
|
|
346
|
+
const kinds = [...items, ...zones, ...links, ...nets];
|
|
347
|
+
const slotted = new Map();
|
|
348
|
+
for (const one of kinds) {
|
|
349
|
+
const held = slotted.get(one.slot);
|
|
350
|
+
if (held !== undefined) {
|
|
351
|
+
throw new Error(`Schematic: the slot "${one.slot}" holds two kinds — ${held.sort === "items" ? "an" : "a"} ${NOUN[held.sort]} kind and ` +
|
|
352
|
+
`${one.sort === "items" ? "an" : "a"} ${NOUN[one.sort]} kind: each slot names one kind, and the source of the slice that narrows it`);
|
|
353
|
+
}
|
|
354
|
+
slotted.set(one.slot, one);
|
|
355
|
+
}
|
|
356
|
+
// A link's ends and a net's sides hold keys of item slots.
|
|
357
|
+
const itemSlots = items.map((one) => one.slot);
|
|
358
|
+
const holdsItems = (one, prop, slot) => {
|
|
359
|
+
if (!itemSlots.includes(slot)) {
|
|
360
|
+
throw new Error(`Schematic: the ${NOUN[one.sort]} kind "${one.slot}"'s \`${prop}\` holds keys of "${slot}", which holds no item kind — ` +
|
|
361
|
+
`its item slots are ${itemSlots.map((s) => `"${s}"`).join(", ")}`);
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
for (const one of links) {
|
|
365
|
+
const ends = one.kind.ends;
|
|
366
|
+
for (const slot of ends.from)
|
|
367
|
+
holdsItems(one, "from", slot);
|
|
368
|
+
for (const slot of ends.to)
|
|
369
|
+
holdsItems(one, "to", slot);
|
|
370
|
+
}
|
|
371
|
+
for (const one of nets) {
|
|
372
|
+
const sides = one.kind.sides;
|
|
373
|
+
holdsItems(one, "sources", sides.sources);
|
|
374
|
+
holdsItems(one, "destinations", sides.destinations);
|
|
375
|
+
}
|
|
376
|
+
// The narrowing (§10.1): one Slice.bindRecords, each source named after what it narrows.
|
|
377
|
+
const slice = given.slice;
|
|
378
|
+
if (slice !== undefined && (slice instanceof Expr || typeof slice !== "object" || slice === null || !("slice" in slice))) {
|
|
379
|
+
throw new Error("Schematic: `slice` takes { slice } — slice={{ slice: Slice.bindRecords(key, { … }), affordances?, persist? }}, " +
|
|
380
|
+
"each source named after the kind it narrows; a bare Slice.bind handle beside rows is gone");
|
|
381
|
+
}
|
|
382
|
+
const narrowing = slice;
|
|
383
|
+
if (narrowing?.affordances?.includes("brush") === true) {
|
|
384
|
+
throw new Error("Schematic: `slice`'s affordances list \"brush\", and a 2D canvas has no continuous axis to brush along — mount fields, search, presets or summary");
|
|
385
|
+
}
|
|
386
|
+
// Templates are records (#1340, ruling 9): each list names its source of the slice, refused with the change to make
|
|
387
|
+
// before a source no list names is.
|
|
388
|
+
const sliceNames = sliceSourceNames(narrowing);
|
|
389
|
+
const templateSources = [];
|
|
390
|
+
if (narrowing === undefined || isRecordSlices(narrowing.slice)) {
|
|
391
|
+
for (const one of kinds) {
|
|
392
|
+
if (one.kind.hasTemplates)
|
|
393
|
+
templateSources.push(templatesSource("Schematic", "Schematic.templates(rows, { …, source })", one.kind.templatesSource, sliceNames));
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
const tabSources = schematicTabSources(given.library);
|
|
397
|
+
const names = [...new Set([...kinds.map((one) => one.slot), ...templateSources, ...tabSources])];
|
|
398
|
+
const sources = recordSources(narrowing, {
|
|
399
|
+
builder: "Schematic", names, what: "its kinds, each by its slot, and the templates lists and tabs that name a source",
|
|
400
|
+
});
|
|
401
|
+
const library = buildSchematicLibrary(given.library, {
|
|
402
|
+
kinds: kinds.map((one) => ({
|
|
403
|
+
slot: one.slot, sort: one.sort, rowType: one.kind.rowType,
|
|
404
|
+
templates: one.kind.hasTemplates,
|
|
405
|
+
backlog: one.sort === "items" && one.kind.backlog,
|
|
406
|
+
})),
|
|
407
|
+
layers: given.layers !== undefined,
|
|
408
|
+
sources: sources.names,
|
|
409
|
+
});
|
|
410
|
+
const inspector = inspectorOf(given.inspector);
|
|
411
|
+
const narrowed = narrowedOf(given.narrowed);
|
|
412
|
+
const layers = layersOf(given.layers);
|
|
413
|
+
const id = given.id;
|
|
414
|
+
if (id !== undefined && typeof id !== "string")
|
|
415
|
+
throw new Error("Schematic: `id` keeps the Schematic's state apart — a string, needed only when one surface holds two");
|
|
416
|
+
const optional = (value) => value === undefined ? none : some(value);
|
|
417
|
+
return Expr.block(($) => {
|
|
418
|
+
// Each source bound once (#1356): a kind reads its own source inside its functions.
|
|
419
|
+
const bound = sources.bind($);
|
|
420
|
+
const shown = East.value(new Map(Object.entries(bound.keys)), ShownType);
|
|
421
|
+
// Dimmed, a kind read through its source reads every row: the renderer draws what the narrowing leaves out as context.
|
|
422
|
+
const built = (sort) => kinds.filter((one) => one.sort === sort)
|
|
423
|
+
.map((one) => one.kind.build(one.slot, bound.parts[one.slot], narrowed.dim));
|
|
424
|
+
return East.value({
|
|
425
|
+
extent,
|
|
426
|
+
scaleUnit: optional(given.scaleUnit),
|
|
427
|
+
items: built("items"),
|
|
428
|
+
zones: built("zones"),
|
|
429
|
+
links: built("links"),
|
|
430
|
+
nets: built("nets"),
|
|
431
|
+
layers,
|
|
432
|
+
slice: sources.chrome,
|
|
433
|
+
shown,
|
|
434
|
+
narrowed: narrowed.wire,
|
|
435
|
+
library,
|
|
436
|
+
inspector,
|
|
437
|
+
readOnly: given.readOnly ?? false,
|
|
438
|
+
id: id === undefined ? none : some(id),
|
|
439
|
+
grid: optional(given.grid),
|
|
440
|
+
minimap: optional(given.minimap),
|
|
441
|
+
canConnect: optional(given.canConnect),
|
|
442
|
+
onSelect: optional(given.onSelect),
|
|
443
|
+
}, SchematicPayloadType);
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../src/schematic/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EACH,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,GAE3I,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAkC,MAAM,2BAA2B,CAAC;AACnH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAqF,MAAM,YAAY,CAAC;AAChI,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,mBAAmB,EAAuD,MAAM,cAAc,CAAC;AACxJ,OAAO,EAAE,iBAAiB,EAAwB,MAAM,aAAa,CAAC;AACtE,OAAO,EACH,sBAAsB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,oBAAoB,EACrI,gBAAgB,EAAE,qBAAqB,GAC1C,MAAM,YAAY,CAAC;AAEpB,+EAA+E;AAC/E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copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* `<Schematic>` (#1386) — the tag: the drawing's kinds over the app's records
|
|
7
|
+
* (`Schematic.items`, `zones`, `links` and `nets`, each by slot), its layers,
|
|
8
|
+
* its narrowing through one `Slice.bindRecords`, its library's tabs and its
|
|
9
|
+
* inspector. Its payload and every refusal are `payload.ts`'s, its kinds'
|
|
10
|
+
* `kinds.ts`'s, and its library's tabs and their refusals `library.ts`'s.
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
import type { UIElement } from "@elaraai/east-ui";
|
|
15
|
+
import { type SchematicProps } from "./payload.js";
|
|
16
|
+
/**
|
|
17
|
+
* `<Schematic extent={{ width, height }} items={{ racks: Schematic.items(record, { … }) }} />`
|
|
18
|
+
* — the drawing of the app's records: its items, zones, links and nets, each
|
|
19
|
+
* kind's fields mapped to the Schematic's roles (§1).
|
|
20
|
+
*
|
|
21
|
+
* @param props - The Schematic's props ({@link SchematicProps})
|
|
22
|
+
* @returns The Schematic: the `Schematic` carrier over its payload
|
|
23
|
+
*/
|
|
24
|
+
export declare function SchematicTag(props: SchematicProps): UIElement;
|
|
25
|
+
/** The type of `<Schematic>` as a tag. */
|
|
26
|
+
export type SchematicTagType = typeof SchematicTag;
|
|
27
|
+
//# sourceMappingURL=schematic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schematic.d.ts","sourceRoot":"","sources":["../../../src/schematic/schematic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAA8C,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE/F;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,CAE7D;AAED,0CAA0C;AAC1C,MAAM,MAAM,gBAAgB,GAAG,OAAO,YAAY,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { SchematicComponent, createSchematicPayload } from "./payload.js";
|
|
6
|
+
/**
|
|
7
|
+
* `<Schematic extent={{ width, height }} items={{ racks: Schematic.items(record, { … }) }} />`
|
|
8
|
+
* — the drawing of the app's records: its items, zones, links and nets, each
|
|
9
|
+
* kind's fields mapped to the Schematic's roles (§1).
|
|
10
|
+
*
|
|
11
|
+
* @param props - The Schematic's props ({@link SchematicProps})
|
|
12
|
+
* @returns The Schematic: the `Schematic` carrier over its payload
|
|
13
|
+
*/
|
|
14
|
+
export function SchematicTag(props) {
|
|
15
|
+
return SchematicComponent.Root(createSchematicPayload(props));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schematic.js","sourceRoot":"","sources":["../../../src/schematic/schematic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAuB,MAAM,cAAc,CAAC;AAE/F;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,KAAqB;IAC9C,OAAO,kBAAkB,CAAC,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;AAClE,CAAC"}
|