@nakafa/aksara-contracts 7.0.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/assessment/figure.d.ts +24 -48725
  2. package/dist/assessment/figure.js +10 -6
  3. package/dist/visual/base/layout.d.ts +6 -6
  4. package/dist/visual/base/math.d.ts +4 -4
  5. package/dist/visual/base/media.d.ts +2 -2
  6. package/dist/visual/biology/bacteria.d.ts +55 -0
  7. package/dist/visual/biology/bacteria.js +79 -0
  8. package/dist/visual/biology/cell.d.ts +89 -0
  9. package/dist/visual/biology/cell.js +95 -0
  10. package/dist/visual/biology/climate.d.ts +75 -0
  11. package/dist/visual/biology/climate.js +94 -0
  12. package/dist/visual/biology/ecology.d.ts +75 -0
  13. package/dist/visual/biology/ecology.js +94 -0
  14. package/dist/visual/biology.d.ts +9 -9
  15. package/dist/visual/card.d.ts +0 -2
  16. package/dist/visual/card.js +0 -6
  17. package/dist/visual/catalog.d.ts +1610 -27079
  18. package/dist/visual/catalog.js +47 -1
  19. package/dist/visual/chemistry/atom.d.ts +4 -4
  20. package/dist/visual/chemistry/balance.d.ts +79 -0
  21. package/dist/visual/chemistry/balance.js +128 -0
  22. package/dist/visual/chemistry/bonding.d.ts +80 -0
  23. package/dist/visual/chemistry/bonding.js +147 -0
  24. package/dist/visual/chemistry/discovery.d.ts +96 -0
  25. package/dist/visual/chemistry/discovery.js +137 -0
  26. package/dist/visual/chemistry/electron.d.ts +2 -2
  27. package/dist/visual/chemistry/laws.d.ts +4 -4
  28. package/dist/visual/chemistry/particles.d.ts +5 -5
  29. package/dist/visual/chemistry/periodic.d.ts +2 -2
  30. package/dist/visual/chemistry/reaction.d.ts +3 -3
  31. package/dist/visual/entry.d.ts +4 -4
  32. package/dist/visual/mathematics/chart.d.ts +1 -1
  33. package/dist/visual/mathematics/charts.d.ts +5 -5
  34. package/dist/visual/mathematics/function.d.ts +7 -7
  35. package/dist/visual/mathematics/geometry.d.ts +4 -213
  36. package/dist/visual/mathematics/geometry.js +3 -65
  37. package/dist/visual/physics/braking.d.ts +62 -0
  38. package/dist/visual/physics/braking.js +83 -0
  39. package/dist/visual/physics/circular.d.ts +36 -0
  40. package/dist/visual/physics/circular.js +51 -0
  41. package/dist/visual/physics/efficiency.d.ts +93 -0
  42. package/dist/visual/physics/efficiency.js +129 -0
  43. package/dist/visual/physics/falling.d.ts +56 -0
  44. package/dist/visual/physics/falling.js +77 -0
  45. package/dist/visual/physics/force.d.ts +88 -0
  46. package/dist/visual/physics/force.js +115 -0
  47. package/dist/visual/physics/instrument.d.ts +93 -0
  48. package/dist/visual/physics/instrument.js +135 -0
  49. package/dist/visual/physics/measurement.d.ts +4 -4
  50. package/dist/visual/physics/motion.d.ts +6 -6
  51. package/dist/visual/physics/parabolic.d.ts +2 -2
  52. package/dist/visual/physics/position.d.ts +87 -0
  53. package/dist/visual/physics/position.js +123 -0
  54. package/dist/visual/physics/power.d.ts +121 -0
  55. package/dist/visual/physics/power.js +162 -0
  56. package/dist/visual/physics/precision.d.ts +96 -0
  57. package/dist/visual/physics/precision.js +137 -0
  58. package/dist/visual/physics/product.d.ts +73 -0
  59. package/dist/visual/physics/product.js +96 -0
  60. package/dist/visual/physics/record.d.ts +34 -0
  61. package/dist/visual/physics/record.js +46 -0
  62. package/dist/visual/physics/relative.d.ts +55 -0
  63. package/dist/visual/physics/relative.js +76 -0
  64. package/dist/visual/physics/solar.d.ts +91 -0
  65. package/dist/visual/physics/solar.js +126 -0
  66. package/dist/visual/physics/vector.d.ts +103 -0
  67. package/dist/visual/physics/vector.js +123 -0
  68. package/dist/visual/physics/velocity.d.ts +7 -7
  69. package/dist/visual/politics.d.ts +8 -8
  70. package/package.json +1 -1
  71. package/dist/visual/mathematics/line.d.ts +0 -179
  72. package/dist/visual/mathematics/line.js +0 -156
  73. package/dist/visual/mathematics/number.d.ts +0 -21
  74. package/dist/visual/mathematics/number.js +0 -53
@@ -0,0 +1,73 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the labs of vector products: torque, work, and flux. No prop
5
+ * states the conclusion a lab leads to, so none holds answer state.
6
+ */
7
+ export declare function productVisuals<E>(rich: RichSlot<E>): {
8
+ DoorHingeTorqueLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly angle: Schema.Finite;
12
+ readonly arm: Schema.Finite;
13
+ readonly force: Schema.Finite;
14
+ readonly labels: Schema.Struct<{
15
+ readonly angle: RichSlot<E>;
16
+ readonly angleName: Schema.Trimmed;
17
+ readonly arm: RichSlot<E>;
18
+ readonly armName: Schema.Trimmed;
19
+ readonly square: RichSlot<E>;
20
+ readonly torque: RichSlot<E>;
21
+ readonly viewLabel: Schema.Trimmed;
22
+ }>;
23
+ readonly mass: Schema.Finite;
24
+ readonly width: Schema.Finite;
25
+ }>, "figure">;
26
+ WrenchTorqueLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
27
+ readonly description: RichSlot<E>;
28
+ readonly title: RichSlot<E>;
29
+ readonly angle: Schema.Finite;
30
+ readonly arm: Schema.Finite;
31
+ readonly force: Schema.Finite;
32
+ readonly labels: Schema.Struct<{
33
+ readonly angle: RichSlot<E>;
34
+ readonly angleName: Schema.Trimmed;
35
+ readonly square: RichSlot<E>;
36
+ readonly torque: RichSlot<E>;
37
+ readonly viewLabel: Schema.Trimmed;
38
+ }>;
39
+ }>, "figure">;
40
+ SledPullWorkLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
41
+ readonly description: RichSlot<E>;
42
+ readonly title: RichSlot<E>;
43
+ readonly angle: Schema.Finite;
44
+ readonly distance: Schema.Finite;
45
+ readonly force: Schema.Finite;
46
+ readonly labels: Schema.Struct<{
47
+ readonly along: RichSlot<E>;
48
+ readonly angle: RichSlot<E>;
49
+ readonly angleName: Schema.Trimmed;
50
+ readonly normal: RichSlot<E>;
51
+ readonly up: RichSlot<E>;
52
+ readonly viewLabel: Schema.Trimmed;
53
+ readonly work: RichSlot<E>;
54
+ }>;
55
+ readonly mass: Schema.Finite;
56
+ }>, "figure">;
57
+ SolarPanelFluxLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
58
+ readonly description: RichSlot<E>;
59
+ readonly title: RichSlot<E>;
60
+ readonly area: Schema.Finite;
61
+ readonly elevation: Schema.Finite;
62
+ readonly labels: Schema.Struct<{
63
+ readonly between: RichSlot<E>;
64
+ readonly cosine: RichSlot<E>;
65
+ readonly power: RichSlot<E>;
66
+ readonly tilt: RichSlot<E>;
67
+ readonly tiltName: Schema.Trimmed;
68
+ readonly viewLabel: Schema.Trimmed;
69
+ }>;
70
+ readonly sunlight: Schema.Finite;
71
+ readonly tilt: Schema.Finite;
72
+ }>, "figure">;
73
+ };
@@ -0,0 +1,96 @@
1
+ import { Schema } from "effect";
2
+ import { cardFields, TextSchema } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /**
5
+ * Props of `DoorHingeTorqueLab`: a door seen from the ceiling, pushed open by a
6
+ * hand.
7
+ */
8
+ function doorHingeTorqueLab(rich) {
9
+ return figure(Schema.Struct({
10
+ ...cardFields(rich),
11
+ angle: Schema.Finite,
12
+ arm: Schema.Finite,
13
+ force: Schema.Finite,
14
+ labels: Schema.Struct({
15
+ angle: rich,
16
+ angleName: TextSchema,
17
+ arm: rich,
18
+ armName: TextSchema,
19
+ square: rich,
20
+ torque: rich,
21
+ viewLabel: TextSchema,
22
+ }),
23
+ mass: Schema.Finite,
24
+ width: Schema.Finite,
25
+ }));
26
+ }
27
+ /** Props of `WrenchTorqueLab`: a wheel brace on a car wheel's nut. */
28
+ function wrenchTorqueLab(rich) {
29
+ return figure(Schema.Struct({
30
+ ...cardFields(rich),
31
+ angle: Schema.Finite,
32
+ arm: Schema.Finite,
33
+ force: Schema.Finite,
34
+ labels: Schema.Struct({
35
+ angle: rich,
36
+ angleName: TextSchema,
37
+ square: rich,
38
+ torque: rich,
39
+ viewLabel: TextSchema,
40
+ }),
41
+ }));
42
+ }
43
+ /**
44
+ * Props of `SledPullWorkLab`: a sled of firewood pulled across snow by a rope.
45
+ */
46
+ function sledPullWorkLab(rich) {
47
+ return figure(Schema.Struct({
48
+ ...cardFields(rich),
49
+ angle: Schema.Finite,
50
+ distance: Schema.Finite,
51
+ force: Schema.Finite,
52
+ labels: Schema.Struct({
53
+ along: rich,
54
+ angle: rich,
55
+ angleName: TextSchema,
56
+ normal: rich,
57
+ up: rich,
58
+ viewLabel: TextSchema,
59
+ work: rich,
60
+ }),
61
+ mass: Schema.Finite,
62
+ }));
63
+ }
64
+ /**
65
+ * Props of `SolarPanelFluxLab`: a solar panel on a frame in a field, with the
66
+ * sun in the sky it faces.
67
+ */
68
+ function solarPanelFluxLab(rich) {
69
+ return figure(Schema.Struct({
70
+ ...cardFields(rich),
71
+ area: Schema.Finite,
72
+ elevation: Schema.Finite,
73
+ labels: Schema.Struct({
74
+ between: rich,
75
+ cosine: rich,
76
+ power: rich,
77
+ tilt: rich,
78
+ tiltName: TextSchema,
79
+ viewLabel: TextSchema,
80
+ }),
81
+ sunlight: Schema.Finite,
82
+ tilt: Schema.Finite,
83
+ }));
84
+ }
85
+ /**
86
+ * The props of the labs of vector products: torque, work, and flux. No prop
87
+ * states the conclusion a lab leads to, so none holds answer state.
88
+ */
89
+ export function productVisuals(rich) {
90
+ return {
91
+ DoorHingeTorqueLab: doorHingeTorqueLab(rich),
92
+ WrenchTorqueLab: wrenchTorqueLab(rich),
93
+ SledPullWorkLab: sledPullWorkLab(rich),
94
+ SolarPanelFluxLab: solarPanelFluxLab(rich),
95
+ };
96
+ }
@@ -0,0 +1,34 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the labs that record a motion. No prop states the conclusion a
5
+ * lab leads to, so none holds answer state.
6
+ */
7
+ export declare function recordVisuals<E>(rich: RichSlot<E>): {
8
+ TickerTapeMotionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly acceleration: RichSlot<E>;
13
+ readonly chooseMotion: Schema.Trimmed;
14
+ readonly firstStrip: RichSlot<E>;
15
+ readonly interval: RichSlot<E>;
16
+ readonly lastStrip: RichSlot<E>;
17
+ readonly motions: Schema.$Record<Schema.Literals<readonly ["uniform", "speeding", "slowing"]>, RichSlot<E>>;
18
+ readonly viewLabel: Schema.Trimmed;
19
+ }>;
20
+ readonly motion: Schema.optionalKey<Schema.Literals<readonly ["uniform", "speeding", "slowing"]>>;
21
+ }>, "figure">;
22
+ StrobePhotoMotionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
23
+ readonly description: RichSlot<E>;
24
+ readonly title: RichSlot<E>;
25
+ readonly labels: Schema.Struct<{
26
+ readonly airTime: RichSlot<E>;
27
+ readonly height: RichSlot<E>;
28
+ readonly interval: RichSlot<E>;
29
+ readonly outcome: RichSlot<E>;
30
+ readonly viewLabel: Schema.Trimmed;
31
+ }>;
32
+ readonly shot: Schema.Literals<readonly ["drop", "toss", "launch", "components"]>;
33
+ }>, "figure">;
34
+ };
@@ -0,0 +1,46 @@
1
+ import { Schema } from "effect";
2
+ import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /** Props of `TickerTapeMotionLab`: a ticker timer on a lab bench. */
5
+ function tickerTapeMotionLab(rich) {
6
+ return figure(Schema.Struct({
7
+ ...cardFields(rich),
8
+ labels: Schema.Struct({
9
+ acceleration: rich,
10
+ chooseMotion: TextSchema,
11
+ firstStrip: rich,
12
+ interval: rich,
13
+ lastStrip: rich,
14
+ motions: byIds(["uniform", "speeding", "slowing"], rich),
15
+ viewLabel: TextSchema,
16
+ }),
17
+ motion: Schema.optionalKey(Schema.Literals(["uniform", "speeding", "slowing"])),
18
+ }));
19
+ }
20
+ /**
21
+ * Props of `StrobePhotoMotionLab`: a strobe photograph built up flash by flash
22
+ * in a dark room.
23
+ */
24
+ function strobePhotoMotionLab(rich) {
25
+ return figure(Schema.Struct({
26
+ ...cardFields(rich),
27
+ labels: Schema.Struct({
28
+ airTime: rich,
29
+ height: rich,
30
+ interval: rich,
31
+ outcome: rich,
32
+ viewLabel: TextSchema,
33
+ }),
34
+ shot: Schema.Literals(["drop", "toss", "launch", "components"]),
35
+ }));
36
+ }
37
+ /**
38
+ * The props of the labs that record a motion. No prop states the conclusion a
39
+ * lab leads to, so none holds answer state.
40
+ */
41
+ export function recordVisuals(rich) {
42
+ return {
43
+ TickerTapeMotionLab: tickerTapeMotionLab(rich),
44
+ StrobePhotoMotionLab: strobePhotoMotionLab(rich),
45
+ };
46
+ }
@@ -0,0 +1,55 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the relative velocity labs. No prop states the conclusion a lab
5
+ * leads to, so none holds answer state.
6
+ */
7
+ export declare function relativeVisuals<E>(rich: RichSlot<E>): {
8
+ RainDriveRelativeVelocityLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly car: Schema.optionalKey<Schema.Finite>;
12
+ readonly labels: Schema.Struct<{
13
+ readonly angle: RichSlot<E>;
14
+ readonly apparentSpeed: RichSlot<E>;
15
+ readonly carSpeed: RichSlot<E>;
16
+ readonly carSpeedName: Schema.Trimmed;
17
+ readonly chooseFrame: Schema.Trimmed;
18
+ readonly frames: Schema.$Record<Schema.Literals<readonly ["ground", "car"]>, RichSlot<E>>;
19
+ readonly rainSpeed: RichSlot<E>;
20
+ readonly viewLabel: Schema.Trimmed;
21
+ }>;
22
+ readonly rain: Schema.optionalKey<Schema.Finite>;
23
+ }>, "figure">;
24
+ RiverBoatCrossingLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
25
+ readonly description: RichSlot<E>;
26
+ readonly title: RichSlot<E>;
27
+ readonly boatSpeed: Schema.Finite;
28
+ readonly current: Schema.Finite;
29
+ readonly heading: Schema.optionalKey<Schema.Finite>;
30
+ readonly labels: Schema.Struct<{
31
+ readonly angle: RichSlot<E>;
32
+ readonly drift: RichSlot<E>;
33
+ readonly groundSpeed: RichSlot<E>;
34
+ readonly heading: RichSlot<E>;
35
+ readonly headingName: Schema.Trimmed;
36
+ readonly time: RichSlot<E>;
37
+ readonly viewLabel: Schema.Trimmed;
38
+ }>;
39
+ readonly width: Schema.Finite;
40
+ }>, "figure">;
41
+ TrainPassengerRelativeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
42
+ readonly description: RichSlot<E>;
43
+ readonly title: RichSlot<E>;
44
+ readonly labels: Schema.Struct<{
45
+ readonly chooseObserver: Schema.Trimmed;
46
+ readonly chooseWay: Schema.Trimmed;
47
+ readonly observers: Schema.$Record<Schema.Literals<readonly ["platform", "train"]>, RichSlot<E>>;
48
+ readonly passenger: RichSlot<E>;
49
+ readonly train: RichSlot<E>;
50
+ readonly viewLabel: Schema.Trimmed;
51
+ readonly walk: RichSlot<E>;
52
+ readonly ways: Schema.$Record<Schema.Literals<readonly ["forward", "backward"]>, RichSlot<E>>;
53
+ }>;
54
+ }>, "figure">;
55
+ };
@@ -0,0 +1,76 @@
1
+ import { Schema } from "effect";
2
+ import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /**
5
+ * Props of `RainDriveRelativeVelocityLab`: rain falling straight down on a
6
+ * still day, watched from the roadside or from inside a moving car.
7
+ */
8
+ function rainDriveRelativeVelocityLab(rich) {
9
+ return figure(Schema.Struct({
10
+ ...cardFields(rich),
11
+ car: Schema.optionalKey(Schema.Finite),
12
+ labels: Schema.Struct({
13
+ angle: rich,
14
+ apparentSpeed: rich,
15
+ carSpeed: rich,
16
+ carSpeedName: TextSchema,
17
+ chooseFrame: TextSchema,
18
+ frames: byIds(["ground", "car"], rich),
19
+ rainSpeed: rich,
20
+ viewLabel: TextSchema,
21
+ }),
22
+ rain: Schema.optionalKey(Schema.Finite),
23
+ }));
24
+ }
25
+ /**
26
+ * Props of `RiverBoatCrossingLab`: a boat crossing a flowing river, seen from
27
+ * above.
28
+ */
29
+ function riverBoatCrossingLab(rich) {
30
+ return figure(Schema.Struct({
31
+ ...cardFields(rich),
32
+ boatSpeed: Schema.Finite,
33
+ current: Schema.Finite,
34
+ heading: Schema.optionalKey(Schema.Finite),
35
+ labels: Schema.Struct({
36
+ angle: rich,
37
+ drift: rich,
38
+ groundSpeed: rich,
39
+ heading: rich,
40
+ headingName: TextSchema,
41
+ time: rich,
42
+ viewLabel: TextSchema,
43
+ }),
44
+ width: Schema.Finite,
45
+ }));
46
+ }
47
+ /**
48
+ * Props of `TrainPassengerRelativeLab`: a passenger walks along a commuter
49
+ * carriage moving at 20 m/s.
50
+ */
51
+ function trainPassengerRelativeLab(rich) {
52
+ return figure(Schema.Struct({
53
+ ...cardFields(rich),
54
+ labels: Schema.Struct({
55
+ chooseObserver: TextSchema,
56
+ chooseWay: TextSchema,
57
+ observers: byIds(["platform", "train"], rich),
58
+ passenger: rich,
59
+ train: rich,
60
+ viewLabel: TextSchema,
61
+ walk: rich,
62
+ ways: byIds(["forward", "backward"], rich),
63
+ }),
64
+ }));
65
+ }
66
+ /**
67
+ * The props of the relative velocity labs. No prop states the conclusion a lab
68
+ * leads to, so none holds answer state.
69
+ */
70
+ export function relativeVisuals(rich) {
71
+ return {
72
+ RainDriveRelativeVelocityLab: rainDriveRelativeVelocityLab(rich),
73
+ RiverBoatCrossingLab: riverBoatCrossingLab(rich),
74
+ TrainPassengerRelativeLab: trainPassengerRelativeLab(rich),
75
+ };
76
+ }
@@ -0,0 +1,91 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the solar energy labs. No prop states the conclusion a lab leads
5
+ * to, so none holds answer state.
6
+ */
7
+ export declare function solarVisuals<E>(rich: RichSlot<E>): {
8
+ SolarPanelAngleLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly incidence: RichSlot<E>;
13
+ readonly irradiance: RichSlot<E>;
14
+ readonly power: RichSlot<E>;
15
+ readonly sunControl: Schema.Trimmed;
16
+ readonly tiltControl: Schema.Trimmed;
17
+ readonly viewLabel: Schema.Trimmed;
18
+ }>;
19
+ readonly sun: Schema.optionalKey<Schema.Finite>;
20
+ readonly tilt: Schema.optionalKey<Schema.Finite>;
21
+ }>, "figure">;
22
+ SolarPanelHeatLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
23
+ readonly description: RichSlot<E>;
24
+ readonly title: RichSlot<E>;
25
+ readonly irradiance: Schema.optionalKey<Schema.Finite>;
26
+ readonly labels: Schema.Struct<{
27
+ readonly efficiency: RichSlot<E>;
28
+ readonly electric: RichSlot<E>;
29
+ readonly heat: RichSlot<E>;
30
+ readonly input: RichSlot<E>;
31
+ readonly irradianceControl: Schema.Trimmed;
32
+ readonly reflected: RichSlot<E>;
33
+ readonly temperature: RichSlot<E>;
34
+ readonly viewLabel: Schema.Trimmed;
35
+ }>;
36
+ }>, "figure">;
37
+ SolarRoofPaybackLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
38
+ readonly description: RichSlot<E>;
39
+ readonly title: RichSlot<E>;
40
+ readonly labels: Schema.Struct<{
41
+ readonly invested: RichSlot<E>;
42
+ readonly lifetime: RichSlot<E>;
43
+ readonly payback: RichSlot<E>;
44
+ readonly viewLabel: Schema.Trimmed;
45
+ readonly yearly: RichSlot<E>;
46
+ readonly yieldControl: Schema.Trimmed;
47
+ }>;
48
+ readonly yieldPerPeak: Schema.optionalKey<Schema.Finite>;
49
+ }>, "figure">;
50
+ SolarBatteryStorageLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
51
+ readonly description: RichSlot<E>;
52
+ readonly title: RichSlot<E>;
53
+ readonly labels: Schema.Struct<{
54
+ readonly chooseSize: Schema.Trimmed;
55
+ readonly demand: RichSlot<E>;
56
+ readonly size: RichSlot<E>;
57
+ readonly solar: RichSlot<E>;
58
+ readonly unmet: RichSlot<E>;
59
+ readonly viewLabel: Schema.Trimmed;
60
+ }>;
61
+ readonly size: Schema.optionalKey<Schema.Literals<readonly [5, 10, 15]>>;
62
+ }>, "figure">;
63
+ GreenhouseLayerLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
64
+ readonly description: RichSlot<E>;
65
+ readonly title: RichSlot<E>;
66
+ readonly absorptance: Schema.optionalKey<Schema.Finite>;
67
+ readonly labels: Schema.Struct<{
68
+ readonly absorptanceControl: Schema.Trimmed;
69
+ readonly back: RichSlot<E>;
70
+ readonly celsius: RichSlot<E>;
71
+ readonly emitted: RichSlot<E>;
72
+ readonly kelvin: RichSlot<E>;
73
+ readonly sunlight: RichSlot<E>;
74
+ readonly viewLabel: Schema.Trimmed;
75
+ }>;
76
+ }>, "figure">;
77
+ GridLoadCurveLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
78
+ readonly description: RichSlot<E>;
79
+ readonly title: RichSlot<E>;
80
+ readonly labels: Schema.Struct<{
81
+ readonly capacity: RichSlot<E>;
82
+ readonly chooseSchedule: Schema.Trimmed;
83
+ readonly energy: RichSlot<E>;
84
+ readonly hours: RichSlot<E>;
85
+ readonly peak: RichSlot<E>;
86
+ readonly schedules: Schema.$Record<Schema.Literals<readonly ["together", "spread"]>, RichSlot<E>>;
87
+ readonly viewLabel: Schema.Trimmed;
88
+ }>;
89
+ readonly schedule: Schema.optionalKey<Schema.Literals<readonly ["together", "spread"]>>;
90
+ }>, "figure">;
91
+ };
@@ -0,0 +1,126 @@
1
+ import { Schema } from "effect";
2
+ import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /**
5
+ * Props of `SolarPanelAngleLab`: a solar panel on a stand under parallel rays
6
+ * of sunlight.
7
+ */
8
+ function solarPanelAngleLab(rich) {
9
+ return figure(Schema.Struct({
10
+ ...cardFields(rich),
11
+ labels: Schema.Struct({
12
+ incidence: rich,
13
+ irradiance: rich,
14
+ power: rich,
15
+ sunControl: TextSchema,
16
+ tiltControl: TextSchema,
17
+ viewLabel: TextSchema,
18
+ }),
19
+ sun: Schema.optionalKey(Schema.Finite),
20
+ tilt: Schema.optionalKey(Schema.Finite),
21
+ }));
22
+ }
23
+ /** Props of `SolarPanelHeatLab`: a 1.6 m² solar panel on a roof. */
24
+ function solarPanelHeatLab(rich) {
25
+ return figure(Schema.Struct({
26
+ ...cardFields(rich),
27
+ irradiance: Schema.optionalKey(Schema.Finite),
28
+ labels: Schema.Struct({
29
+ efficiency: rich,
30
+ electric: rich,
31
+ heat: rich,
32
+ input: rich,
33
+ irradianceControl: TextSchema,
34
+ reflected: rich,
35
+ temperature: rich,
36
+ viewLabel: TextSchema,
37
+ }),
38
+ }));
39
+ }
40
+ /**
41
+ * Props of `SolarRoofPaybackLab`: a 3 kWp solar roof starts in energy debt:
42
+ * making it took 3900 kWh.
43
+ */
44
+ function solarRoofPaybackLab(rich) {
45
+ return figure(Schema.Struct({
46
+ ...cardFields(rich),
47
+ labels: Schema.Struct({
48
+ invested: rich,
49
+ lifetime: rich,
50
+ payback: rich,
51
+ viewLabel: TextSchema,
52
+ yearly: rich,
53
+ yieldControl: TextSchema,
54
+ }),
55
+ yieldPerPeak: Schema.optionalKey(Schema.Finite),
56
+ }));
57
+ }
58
+ /**
59
+ * Props of `SolarBatteryStorageLab`: a village health post on a 3 kWp solar
60
+ * roof with a battery, through one day.
61
+ */
62
+ function solarBatteryStorageLab(rich) {
63
+ return figure(Schema.Struct({
64
+ ...cardFields(rich),
65
+ labels: Schema.Struct({
66
+ chooseSize: TextSchema,
67
+ demand: rich,
68
+ size: rich,
69
+ solar: rich,
70
+ unmet: rich,
71
+ viewLabel: TextSchema,
72
+ }),
73
+ size: Schema.optionalKey(Schema.Literals([5, 10, 15])),
74
+ }));
75
+ }
76
+ /**
77
+ * Props of `GreenhouseLayerLab`: Earth's surface under one layer of atmosphere.
78
+ */
79
+ function greenhouseLayerLab(rich) {
80
+ return figure(Schema.Struct({
81
+ ...cardFields(rich),
82
+ absorptance: Schema.optionalKey(Schema.Finite),
83
+ labels: Schema.Struct({
84
+ absorptanceControl: TextSchema,
85
+ back: rich,
86
+ celsius: rich,
87
+ emitted: rich,
88
+ kelvin: rich,
89
+ sunlight: rich,
90
+ viewLabel: TextSchema,
91
+ }),
92
+ }));
93
+ }
94
+ /**
95
+ * Props of `GridLoadCurveLab`: a village of 100 homes through one day on a 50
96
+ * kW mini-grid, above its hourly demand curve.
97
+ */
98
+ function gridLoadCurveLab(rich) {
99
+ return figure(Schema.Struct({
100
+ ...cardFields(rich),
101
+ labels: Schema.Struct({
102
+ capacity: rich,
103
+ chooseSchedule: TextSchema,
104
+ energy: rich,
105
+ hours: rich,
106
+ peak: rich,
107
+ schedules: byIds(["together", "spread"], rich),
108
+ viewLabel: TextSchema,
109
+ }),
110
+ schedule: Schema.optionalKey(Schema.Literals(["together", "spread"])),
111
+ }));
112
+ }
113
+ /**
114
+ * The props of the solar energy labs. No prop states the conclusion a lab leads
115
+ * to, so none holds answer state.
116
+ */
117
+ export function solarVisuals(rich) {
118
+ return {
119
+ SolarPanelAngleLab: solarPanelAngleLab(rich),
120
+ SolarPanelHeatLab: solarPanelHeatLab(rich),
121
+ SolarRoofPaybackLab: solarRoofPaybackLab(rich),
122
+ SolarBatteryStorageLab: solarBatteryStorageLab(rich),
123
+ GreenhouseLayerLab: greenhouseLayerLab(rich),
124
+ GridLoadCurveLab: gridLoadCurveLab(rich),
125
+ };
126
+ }