@nakafa/aksara-contracts 6.5.0 → 7.1.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 (159) hide show
  1. package/dist/assessment/catalog.d.ts +18 -5
  2. package/dist/assessment/catalog.js +18 -8
  3. package/dist/assessment/choice.d.ts +10 -0
  4. package/dist/assessment/closure.d.ts +2 -1
  5. package/dist/assessment/closure.js +43 -62
  6. package/dist/assessment/document.d.ts +18 -0
  7. package/dist/assessment/document.js +10 -0
  8. package/dist/assessment/figure.d.ts +25 -2676
  9. package/dist/assessment/figure.js +17 -216
  10. package/dist/assessment/hash.d.ts +274 -4
  11. package/dist/assessment/inline.d.ts +25 -0
  12. package/dist/assessment/inline.js +22 -3
  13. package/dist/assessment/interaction.d.ts +10 -0
  14. package/dist/assessment/item.d.ts +864 -0
  15. package/dist/assessment/item.js +10 -2
  16. package/dist/assessment/locales.d.ts +10 -0
  17. package/dist/assessment/locales.js +58 -0
  18. package/dist/assessment/paper.d.ts +1349 -12
  19. package/dist/assessment/paper.js +93 -9
  20. package/dist/assessment/part.d.ts +5 -0
  21. package/dist/assessment/profile.d.ts +4 -4
  22. package/dist/assessment/rows.d.ts +1409 -0
  23. package/dist/assessment/rows.js +44 -0
  24. package/dist/assessment/scalar.d.ts +1 -1
  25. package/dist/assessment/scoring.d.ts +1 -1
  26. package/dist/assessment/snapshot.d.ts +372 -20
  27. package/dist/assessment/structure.d.ts +6 -0
  28. package/dist/assessment/structure.js +22 -2
  29. package/dist/locale.d.ts +9 -9
  30. package/dist/locale.js +4 -3
  31. package/dist/program/snapshot/hash.d.ts +2 -2
  32. package/dist/program/snapshot/spec.d.ts +2 -2
  33. package/dist/projection/material.d.ts +10 -0
  34. package/dist/projection/material.js +1 -1
  35. package/dist/quran/attribution.d.ts +2 -2
  36. package/dist/quran/identity.d.ts +31 -10
  37. package/dist/quran/identity.js +15 -3
  38. package/dist/quran/provenance.d.ts +16 -16
  39. package/dist/quran/provenance.js +4 -1
  40. package/dist/quran/snapshot/hash.d.ts +2 -2
  41. package/dist/quran/snapshot/row/hash.d.ts +48 -15
  42. package/dist/quran/snapshot/row.d.ts +18 -8
  43. package/dist/quran/snapshot/spec.d.ts +2 -2
  44. package/dist/quran/source.d.ts +17 -7
  45. package/dist/quran/source.js +13 -1
  46. package/dist/quran/spec.d.ts +4 -4
  47. package/dist/quran/spec.js +2 -1
  48. package/dist/release/current/evidence.d.ts +9 -9
  49. package/dist/release/current/state.d.ts +11 -11
  50. package/dist/release/hash.d.ts +2 -2
  51. package/dist/release/identity.d.ts +1 -1
  52. package/dist/release/lifecycle.d.ts +7 -7
  53. package/dist/release/policy.d.ts +1 -1
  54. package/dist/release/snapshot/data.d.ts +36 -11
  55. package/dist/release/snapshot/evidence/assessment.d.ts +1 -1
  56. package/dist/release/snapshot/evidence/program.d.ts +1 -1
  57. package/dist/release/snapshot/evidence/quran.d.ts +1 -1
  58. package/dist/release/snapshot/evidence.d.ts +3 -3
  59. package/dist/release/snapshot/verify.d.ts +179 -12
  60. package/dist/release/spec.d.ts +13 -13
  61. package/dist/release/verify.d.ts +2 -2
  62. package/dist/runtime/spec.d.ts +6 -6
  63. package/dist/runtime/verify.d.ts +4 -4
  64. package/dist/transport/group.d.ts +108 -33
  65. package/dist/transport/request.d.ts +1166 -114
  66. package/dist/transport/response.d.ts +64 -64
  67. package/dist/transport/snapshot.d.ts +72 -22
  68. package/dist/visual/base/layout.d.ts +27 -0
  69. package/dist/visual/base/layout.js +35 -0
  70. package/dist/visual/base/math.d.ts +523 -0
  71. package/dist/visual/base/math.js +72 -0
  72. package/dist/visual/base/media.d.ts +13 -0
  73. package/dist/visual/base/media.js +25 -0
  74. package/dist/visual/biology/bacteria.d.ts +55 -0
  75. package/dist/visual/biology/bacteria.js +79 -0
  76. package/dist/visual/biology/cell.d.ts +89 -0
  77. package/dist/visual/biology/cell.js +95 -0
  78. package/dist/visual/biology/climate.d.ts +75 -0
  79. package/dist/visual/biology/climate.js +94 -0
  80. package/dist/visual/biology/ecology.d.ts +75 -0
  81. package/dist/visual/biology/ecology.js +94 -0
  82. package/dist/visual/biology.d.ts +203 -0
  83. package/dist/visual/biology.js +108 -0
  84. package/dist/visual/card.d.ts +32 -0
  85. package/dist/visual/card.js +30 -0
  86. package/dist/visual/catalog.d.ts +3372 -0
  87. package/dist/visual/catalog.js +119 -0
  88. package/dist/visual/chemistry/atom.d.ts +79 -0
  89. package/dist/visual/chemistry/atom.js +109 -0
  90. package/dist/visual/chemistry/balance.d.ts +79 -0
  91. package/dist/visual/chemistry/balance.js +128 -0
  92. package/dist/visual/chemistry/bonding.d.ts +80 -0
  93. package/dist/visual/chemistry/bonding.js +147 -0
  94. package/dist/visual/chemistry/discovery.d.ts +96 -0
  95. package/dist/visual/chemistry/discovery.js +137 -0
  96. package/dist/visual/chemistry/electron.d.ts +41 -0
  97. package/dist/visual/chemistry/electron.js +69 -0
  98. package/dist/visual/chemistry/laws.d.ts +86 -0
  99. package/dist/visual/chemistry/laws.js +117 -0
  100. package/dist/visual/chemistry/particles.d.ts +114 -0
  101. package/dist/visual/chemistry/particles.js +149 -0
  102. package/dist/visual/chemistry/periodic.d.ts +52 -0
  103. package/dist/visual/chemistry/periodic.js +85 -0
  104. package/dist/visual/chemistry/reaction.d.ts +60 -0
  105. package/dist/visual/chemistry/reaction.js +76 -0
  106. package/dist/visual/entry.d.ts +42 -0
  107. package/dist/visual/entry.js +48 -0
  108. package/dist/visual/mathematics/chart.d.ts +30 -0
  109. package/dist/{assessment → visual/mathematics}/chart.js +26 -18
  110. package/dist/visual/mathematics/charts.d.ts +118 -0
  111. package/dist/visual/mathematics/charts.js +100 -0
  112. package/dist/visual/mathematics/function.d.ts +82 -0
  113. package/dist/visual/mathematics/function.js +102 -0
  114. package/dist/visual/mathematics/geometry.d.ts +222 -0
  115. package/dist/visual/mathematics/geometry.js +81 -0
  116. package/dist/visual/mathematics/line.d.ts +179 -0
  117. package/dist/visual/mathematics/line.js +156 -0
  118. package/dist/visual/mathematics/number.d.ts +21 -0
  119. package/dist/visual/mathematics/number.js +53 -0
  120. package/dist/visual/physics/braking.d.ts +62 -0
  121. package/dist/visual/physics/braking.js +83 -0
  122. package/dist/visual/physics/circular.d.ts +36 -0
  123. package/dist/visual/physics/circular.js +51 -0
  124. package/dist/visual/physics/efficiency.d.ts +93 -0
  125. package/dist/visual/physics/efficiency.js +129 -0
  126. package/dist/visual/physics/falling.d.ts +56 -0
  127. package/dist/visual/physics/falling.js +77 -0
  128. package/dist/visual/physics/force.d.ts +88 -0
  129. package/dist/visual/physics/force.js +115 -0
  130. package/dist/visual/physics/instrument.d.ts +93 -0
  131. package/dist/visual/physics/instrument.js +135 -0
  132. package/dist/visual/physics/measurement.d.ts +66 -0
  133. package/dist/visual/physics/measurement.js +85 -0
  134. package/dist/visual/physics/motion.d.ts +85 -0
  135. package/dist/visual/physics/motion.js +110 -0
  136. package/dist/visual/physics/parabolic.d.ts +42 -0
  137. package/dist/visual/physics/parabolic.js +56 -0
  138. package/dist/visual/physics/position.d.ts +87 -0
  139. package/dist/visual/physics/position.js +123 -0
  140. package/dist/visual/physics/power.d.ts +121 -0
  141. package/dist/visual/physics/power.js +162 -0
  142. package/dist/visual/physics/precision.d.ts +96 -0
  143. package/dist/visual/physics/precision.js +137 -0
  144. package/dist/visual/physics/product.d.ts +73 -0
  145. package/dist/visual/physics/product.js +96 -0
  146. package/dist/visual/physics/record.d.ts +34 -0
  147. package/dist/visual/physics/record.js +46 -0
  148. package/dist/visual/physics/relative.d.ts +55 -0
  149. package/dist/visual/physics/relative.js +76 -0
  150. package/dist/visual/physics/solar.d.ts +91 -0
  151. package/dist/visual/physics/solar.js +126 -0
  152. package/dist/visual/physics/vector.d.ts +103 -0
  153. package/dist/visual/physics/vector.js +123 -0
  154. package/dist/visual/physics/velocity.d.ts +112 -0
  155. package/dist/visual/physics/velocity.js +144 -0
  156. package/dist/visual/politics.d.ts +92 -0
  157. package/dist/visual/politics.js +76 -0
  158. package/package.json +13 -5
  159. package/dist/assessment/chart.d.ts +0 -62
@@ -0,0 +1,162 @@
1
+ import { Schema } from "effect";
2
+ import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /** Props of `HydroDamLab`: a hydropower dam in cross-section. */
5
+ function hydroDamLab(rich) {
6
+ return figure(Schema.Struct({
7
+ ...cardFields(rich),
8
+ head: Schema.optionalKey(Schema.Finite),
9
+ labels: Schema.Struct({
10
+ electric: rich,
11
+ head: rich,
12
+ headControl: TextSchema,
13
+ kinetic: rich,
14
+ potential: rich,
15
+ shaft: rich,
16
+ speed: rich,
17
+ viewLabel: TextSchema,
18
+ }),
19
+ }));
20
+ }
21
+ /** Props of `MicrohydroLab`: a microhydro plant on a hillside at dusk. */
22
+ function microhydroLab(rich) {
23
+ return figure(Schema.Struct({
24
+ ...cardFields(rich),
25
+ flow: Schema.optionalKey(Schema.Finite),
26
+ head: Schema.optionalKey(Schema.Finite),
27
+ labels: Schema.Struct({
28
+ flowControl: TextSchema,
29
+ headControl: TextSchema,
30
+ homes: rich,
31
+ power: rich,
32
+ viewLabel: TextSchema,
33
+ }),
34
+ }));
35
+ }
36
+ /**
37
+ * Props of `WaveBuoyPowerLab`: a wave-energy buoy riding deep-water waves,
38
+ * drawn in cross-section with the height stretched four times.
39
+ */
40
+ function waveBuoyPowerLab(rich) {
41
+ return figure(Schema.Struct({
42
+ ...cardFields(rich),
43
+ labels: Schema.Struct({
44
+ chooseSea: TextSchema,
45
+ height: rich,
46
+ length: rich,
47
+ period: rich,
48
+ power: rich,
49
+ seas: byIds(["calm", "moderate", "rough"], rich),
50
+ viewLabel: TextSchema,
51
+ }),
52
+ sea: Schema.optionalKey(Schema.Literals(["calm", "moderate", "rough"])),
53
+ }));
54
+ }
55
+ /**
56
+ * Props of `WindRotorLab`: the same wind turbine, rotor 40 m long, at a valley,
57
+ * a hill top and a coast.
58
+ */
59
+ function windRotorLab(rich) {
60
+ return figure(Schema.Struct({
61
+ ...cardFields(rich),
62
+ labels: Schema.Struct({
63
+ chooseSite: TextSchema,
64
+ daily: rich,
65
+ electric: rich,
66
+ sites: byIds(["valley", "hill", "coast"], rich),
67
+ speed: rich,
68
+ viewLabel: TextSchema,
69
+ wind: rich,
70
+ }),
71
+ site: Schema.optionalKey(Schema.Literals(["valley", "hill", "coast"])),
72
+ }));
73
+ }
74
+ /** Props of `GeothermalLoopLab`: a geothermal plant in cross-section. */
75
+ function geothermalLoopLab(rich) {
76
+ return figure(Schema.Struct({
77
+ ...cardFields(rich),
78
+ labels: Schema.Struct({
79
+ electric: rich,
80
+ heat: rich,
81
+ ideal: rich,
82
+ real: rich,
83
+ reservoirControl: TextSchema,
84
+ viewLabel: TextSchema,
85
+ }),
86
+ reservoir: Schema.optionalKey(Schema.Finite),
87
+ }));
88
+ }
89
+ /**
90
+ * Props of `BiogasDigesterLab`: a household biogas digester in cross-section.
91
+ */
92
+ function biogasDigesterLab(rich) {
93
+ return figure(Schema.Struct({
94
+ ...cardFields(rich),
95
+ dung: Schema.optionalKey(Schema.Finite),
96
+ labels: Schema.Struct({
97
+ cooking: rich,
98
+ dungControl: TextSchema,
99
+ energy: rich,
100
+ gas: rich,
101
+ methane: rich,
102
+ viewLabel: TextSchema,
103
+ }),
104
+ }));
105
+ }
106
+ /**
107
+ * Props of `SteamPlantCycleLab`: a steam power plant fed 1000 MW of heat by
108
+ * coal, gas or uranium.
109
+ */
110
+ function steamPlantCycleLab(rich) {
111
+ return figure(Schema.Struct({
112
+ ...cardFields(rich),
113
+ fuel: Schema.optionalKey(Schema.Literals(["coal", "gas", "uranium"])),
114
+ labels: Schema.Struct({
115
+ chooseFuel: TextSchema,
116
+ electric: rich,
117
+ fuelUse: rich,
118
+ fuels: byIds(["coal", "gas", "uranium"], rich),
119
+ heat: rich,
120
+ ideal: rich,
121
+ steam: rich,
122
+ viewLabel: TextSchema,
123
+ waste: rich,
124
+ }),
125
+ }));
126
+ }
127
+ /**
128
+ * Props of `FuelCombustionCarbonLab`: 1 kg of coal, diesel or methane burns
129
+ * under a hood, and a balloon collects the carbon dioxide.
130
+ */
131
+ function fuelCombustionCarbonLab(rich) {
132
+ return figure(Schema.Struct({
133
+ ...cardFields(rich),
134
+ fuel: Schema.optionalKey(Schema.Literals(["coal", "diesel", "methane"])),
135
+ labels: Schema.Struct({
136
+ carbon: rich,
137
+ chooseFuel: TextSchema,
138
+ dioxide: rich,
139
+ fuels: byIds(["coal", "diesel", "methane"], rich),
140
+ oxygen: rich,
141
+ perEnergy: rich,
142
+ viewLabel: TextSchema,
143
+ volume: rich,
144
+ }),
145
+ }));
146
+ }
147
+ /**
148
+ * The props of the power plant labs. No prop states the conclusion a lab leads
149
+ * to, so none holds answer state.
150
+ */
151
+ export function powerVisuals(rich) {
152
+ return {
153
+ HydroDamLab: hydroDamLab(rich),
154
+ MicrohydroLab: microhydroLab(rich),
155
+ WaveBuoyPowerLab: waveBuoyPowerLab(rich),
156
+ WindRotorLab: windRotorLab(rich),
157
+ GeothermalLoopLab: geothermalLoopLab(rich),
158
+ BiogasDigesterLab: biogasDigesterLab(rich),
159
+ SteamPlantCycleLab: steamPlantCycleLab(rich),
160
+ FuelCombustionCarbonLab: fuelCombustionCarbonLab(rich),
161
+ };
162
+ }
@@ -0,0 +1,96 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the labs of significant figures, units, and derived quantities.
5
+ * No prop states the conclusion a lab leads to, so none holds answer state.
6
+ */
7
+ export declare function precisionVisuals<E>(rich: RichSlot<E>): {
8
+ SignificantZerosLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly chooseTool: Schema.Trimmed;
13
+ readonly chooseUnit: Schema.Trimmed;
14
+ readonly figures: RichSlot<E>;
15
+ readonly measuredZeros: RichSlot<E>;
16
+ readonly placeZeros: RichSlot<E>;
17
+ readonly reading: RichSlot<E>;
18
+ readonly scientific: RichSlot<E>;
19
+ readonly tools: Schema.$Record<Schema.Literals<readonly ["tape", "ruler", "caliper"]>, RichSlot<E>>;
20
+ readonly viewLabel: Schema.Trimmed;
21
+ }>;
22
+ }>, "figure">;
23
+ DecimalSumLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
24
+ readonly description: RichSlot<E>;
25
+ readonly title: RichSlot<E>;
26
+ readonly labels: Schema.Struct<{
27
+ readonly chooseTool: Schema.Trimmed;
28
+ readonly copper: RichSlot<E>;
29
+ readonly iron: RichSlot<E>;
30
+ readonly raw: RichSlot<E>;
31
+ readonly reported: RichSlot<E>;
32
+ readonly tools: Schema.$Record<Schema.Literals<readonly ["ruler", "caliper"]>, RichSlot<E>>;
33
+ readonly viewLabel: Schema.Trimmed;
34
+ }>;
35
+ }>, "figure">;
36
+ PaperStackLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
37
+ readonly description: RichSlot<E>;
38
+ readonly title: RichSlot<E>;
39
+ readonly labels: Schema.Struct<{
40
+ readonly chooseStack: Schema.Trimmed;
41
+ readonly figures: RichSlot<E>;
42
+ readonly reading: RichSlot<E>;
43
+ readonly sheet: RichSlot<E>;
44
+ readonly viewLabel: Schema.Trimmed;
45
+ }>;
46
+ }>, "figure">;
47
+ BoltDimensionsLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
48
+ readonly description: RichSlot<E>;
49
+ readonly title: RichSlot<E>;
50
+ readonly labels: Schema.Struct<{
51
+ readonly chooseQuantity: Schema.Trimmed;
52
+ readonly dimension: RichSlot<E>;
53
+ readonly quantities: Schema.$Record<Schema.Literals<readonly ["length", "diameter", "area", "volume", "mass", "density"]>, RichSlot<E>>;
54
+ readonly value: RichSlot<E>;
55
+ readonly viewLabel: Schema.Trimmed;
56
+ }>;
57
+ }>, "figure">;
58
+ DensityMeasurementLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
59
+ readonly description: RichSlot<E>;
60
+ readonly title: RichSlot<E>;
61
+ readonly labels: Schema.Struct<{
62
+ readonly chooseMaterial: Schema.Trimmed;
63
+ readonly density: RichSlot<E>;
64
+ readonly densitySi: RichSlot<E>;
65
+ readonly mass: RichSlot<E>;
66
+ readonly materials: Schema.$Record<Schema.Literals<readonly ["pine", "aluminium", "brass"]>, RichSlot<E>>;
67
+ readonly sides: RichSlot<E>;
68
+ readonly viewLabel: Schema.Trimmed;
69
+ readonly volume: RichSlot<E>;
70
+ }>;
71
+ }>, "figure">;
72
+ CommonReferenceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
73
+ readonly description: RichSlot<E>;
74
+ readonly title: RichSlot<E>;
75
+ readonly labels: Schema.Struct<{
76
+ readonly chooseReference: Schema.Trimmed;
77
+ readonly count: RichSlot<E>;
78
+ readonly desk: RichSlot<E>;
79
+ readonly length: RichSlot<E>;
80
+ readonly references: Schema.$Record<Schema.Literals<readonly ["short", "medium", "long", "rule"]>, RichSlot<E>>;
81
+ readonly viewLabel: Schema.Trimmed;
82
+ }>;
83
+ }>, "figure">;
84
+ UnitSystemsLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
85
+ readonly description: RichSlot<E>;
86
+ readonly title: RichSlot<E>;
87
+ readonly labels: Schema.Struct<{
88
+ readonly chooseSystem: Schema.Trimmed;
89
+ readonly diameter: RichSlot<E>;
90
+ readonly mass: RichSlot<E>;
91
+ readonly systems: Schema.$Record<Schema.Literals<readonly ["fps", "cgs", "mks"]>, RichSlot<E>>;
92
+ readonly time: RichSlot<E>;
93
+ readonly viewLabel: Schema.Trimmed;
94
+ }>;
95
+ }>, "figure">;
96
+ };
@@ -0,0 +1,137 @@
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 `SignificantZerosLab`: one steel rod read with a tape measure, a
6
+ * steel ruler and a long vernier caliper, and written in millimetres,
7
+ * centimetres or metres.
8
+ */
9
+ function significantZerosLab(rich) {
10
+ return figure(Schema.Struct({
11
+ ...cardFields(rich),
12
+ labels: Schema.Struct({
13
+ chooseTool: TextSchema,
14
+ chooseUnit: TextSchema,
15
+ figures: rich,
16
+ measuredZeros: rich,
17
+ placeZeros: rich,
18
+ reading: rich,
19
+ scientific: rich,
20
+ tools: byIds(["tape", "ruler", "caliper"], rich),
21
+ viewLabel: TextSchema,
22
+ }),
23
+ }));
24
+ }
25
+ /**
26
+ * Props of `DecimalSumLab`: an iron rod read with a caliper joined to a copper
27
+ * rod read with a ruler or the caliper.
28
+ */
29
+ function decimalSumLab(rich) {
30
+ return figure(Schema.Struct({
31
+ ...cardFields(rich),
32
+ labels: Schema.Struct({
33
+ chooseTool: TextSchema,
34
+ copper: rich,
35
+ iron: rich,
36
+ raw: rich,
37
+ reported: rich,
38
+ tools: byIds(["ruler", "caliper"], rich),
39
+ viewLabel: TextSchema,
40
+ }),
41
+ }));
42
+ }
43
+ /** Props of `PaperStackLab`: a stack of paper beside a millimetre ruler. */
44
+ function paperStackLab(rich) {
45
+ return figure(Schema.Struct({
46
+ ...cardFields(rich),
47
+ labels: Schema.Struct({
48
+ chooseStack: TextSchema,
49
+ figures: rich,
50
+ reading: rich,
51
+ sheet: rich,
52
+ viewLabel: TextSchema,
53
+ }),
54
+ }));
55
+ }
56
+ /** Props of `BoltDimensionsLab`: one M10 bolt and six quantities. */
57
+ function boltDimensionsLab(rich) {
58
+ return figure(Schema.Struct({
59
+ ...cardFields(rich),
60
+ labels: Schema.Struct({
61
+ chooseQuantity: TextSchema,
62
+ dimension: rich,
63
+ quantities: byIds(["length", "diameter", "area", "volume", "mass", "density"], rich),
64
+ value: rich,
65
+ viewLabel: TextSchema,
66
+ }),
67
+ }));
68
+ }
69
+ /**
70
+ * Props of `DensityMeasurementLab`: three blocks of the same size, pine,
71
+ * aluminium and brass, on a dial scale.
72
+ */
73
+ function densityMeasurementLab(rich) {
74
+ return figure(Schema.Struct({
75
+ ...cardFields(rich),
76
+ labels: Schema.Struct({
77
+ chooseMaterial: TextSchema,
78
+ density: rich,
79
+ densitySi: rich,
80
+ mass: rich,
81
+ materials: byIds(["pine", "aluminium", "brass"], rich),
82
+ sides: rich,
83
+ viewLabel: TextSchema,
84
+ volume: rich,
85
+ }),
86
+ }));
87
+ }
88
+ /**
89
+ * Props of `CommonReferenceLab`: one desk measured with three friends' pencils
90
+ * and with a metre rule.
91
+ */
92
+ function commonReferenceLab(rich) {
93
+ return figure(Schema.Struct({
94
+ ...cardFields(rich),
95
+ labels: Schema.Struct({
96
+ chooseReference: TextSchema,
97
+ count: rich,
98
+ desk: rich,
99
+ length: rich,
100
+ references: byIds(["short", "medium", "long", "rule"], rich),
101
+ viewLabel: TextSchema,
102
+ }),
103
+ }));
104
+ }
105
+ /**
106
+ * Props of `UnitSystemsLab`: a 16 lb bowling ball weighed on a dial scale and
107
+ * measured against a ruler with inches on one edge and centimetres on the
108
+ * other.
109
+ */
110
+ function unitSystemsLab(rich) {
111
+ return figure(Schema.Struct({
112
+ ...cardFields(rich),
113
+ labels: Schema.Struct({
114
+ chooseSystem: TextSchema,
115
+ diameter: rich,
116
+ mass: rich,
117
+ systems: byIds(["fps", "cgs", "mks"], rich),
118
+ time: rich,
119
+ viewLabel: TextSchema,
120
+ }),
121
+ }));
122
+ }
123
+ /**
124
+ * The props of the labs of significant figures, units, and derived quantities.
125
+ * No prop states the conclusion a lab leads to, so none holds answer state.
126
+ */
127
+ export function precisionVisuals(rich) {
128
+ return {
129
+ SignificantZerosLab: significantZerosLab(rich),
130
+ DecimalSumLab: decimalSumLab(rich),
131
+ PaperStackLab: paperStackLab(rich),
132
+ BoltDimensionsLab: boltDimensionsLab(rich),
133
+ DensityMeasurementLab: densityMeasurementLab(rich),
134
+ CommonReferenceLab: commonReferenceLab(rich),
135
+ UnitSystemsLab: unitSystemsLab(rich),
136
+ };
137
+ }
@@ -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
+ }