@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.
- package/dist/assessment/catalog.d.ts +18 -5
- package/dist/assessment/catalog.js +18 -8
- package/dist/assessment/choice.d.ts +10 -0
- package/dist/assessment/closure.d.ts +2 -1
- package/dist/assessment/closure.js +43 -62
- package/dist/assessment/document.d.ts +18 -0
- package/dist/assessment/document.js +10 -0
- package/dist/assessment/figure.d.ts +25 -2676
- package/dist/assessment/figure.js +17 -216
- package/dist/assessment/hash.d.ts +274 -4
- package/dist/assessment/inline.d.ts +25 -0
- package/dist/assessment/inline.js +22 -3
- package/dist/assessment/interaction.d.ts +10 -0
- package/dist/assessment/item.d.ts +864 -0
- package/dist/assessment/item.js +10 -2
- package/dist/assessment/locales.d.ts +10 -0
- package/dist/assessment/locales.js +58 -0
- package/dist/assessment/paper.d.ts +1349 -12
- package/dist/assessment/paper.js +93 -9
- package/dist/assessment/part.d.ts +5 -0
- package/dist/assessment/profile.d.ts +4 -4
- package/dist/assessment/rows.d.ts +1409 -0
- package/dist/assessment/rows.js +44 -0
- package/dist/assessment/scalar.d.ts +1 -1
- package/dist/assessment/scoring.d.ts +1 -1
- package/dist/assessment/snapshot.d.ts +372 -20
- package/dist/assessment/structure.d.ts +6 -0
- package/dist/assessment/structure.js +22 -2
- package/dist/locale.d.ts +9 -9
- package/dist/locale.js +4 -3
- package/dist/program/snapshot/hash.d.ts +2 -2
- package/dist/program/snapshot/spec.d.ts +2 -2
- package/dist/projection/material.d.ts +10 -0
- package/dist/projection/material.js +1 -1
- package/dist/quran/attribution.d.ts +2 -2
- package/dist/quran/identity.d.ts +31 -10
- package/dist/quran/identity.js +15 -3
- package/dist/quran/provenance.d.ts +16 -16
- package/dist/quran/provenance.js +4 -1
- package/dist/quran/snapshot/hash.d.ts +2 -2
- package/dist/quran/snapshot/row/hash.d.ts +48 -15
- package/dist/quran/snapshot/row.d.ts +18 -8
- package/dist/quran/snapshot/spec.d.ts +2 -2
- package/dist/quran/source.d.ts +17 -7
- package/dist/quran/source.js +13 -1
- package/dist/quran/spec.d.ts +4 -4
- package/dist/quran/spec.js +2 -1
- package/dist/release/current/evidence.d.ts +9 -9
- package/dist/release/current/state.d.ts +11 -11
- package/dist/release/hash.d.ts +2 -2
- package/dist/release/identity.d.ts +1 -1
- package/dist/release/lifecycle.d.ts +7 -7
- package/dist/release/policy.d.ts +1 -1
- package/dist/release/snapshot/data.d.ts +36 -11
- package/dist/release/snapshot/evidence/assessment.d.ts +1 -1
- package/dist/release/snapshot/evidence/program.d.ts +1 -1
- package/dist/release/snapshot/evidence/quran.d.ts +1 -1
- package/dist/release/snapshot/evidence.d.ts +3 -3
- package/dist/release/snapshot/verify.d.ts +179 -12
- package/dist/release/spec.d.ts +13 -13
- package/dist/release/verify.d.ts +2 -2
- package/dist/runtime/spec.d.ts +6 -6
- package/dist/runtime/verify.d.ts +4 -4
- package/dist/transport/group.d.ts +108 -33
- package/dist/transport/request.d.ts +1166 -114
- package/dist/transport/response.d.ts +64 -64
- package/dist/transport/snapshot.d.ts +72 -22
- package/dist/visual/base/layout.d.ts +27 -0
- package/dist/visual/base/layout.js +35 -0
- package/dist/visual/base/math.d.ts +523 -0
- package/dist/visual/base/math.js +72 -0
- package/dist/visual/base/media.d.ts +13 -0
- package/dist/visual/base/media.js +25 -0
- package/dist/visual/biology/bacteria.d.ts +55 -0
- package/dist/visual/biology/bacteria.js +79 -0
- package/dist/visual/biology/cell.d.ts +89 -0
- package/dist/visual/biology/cell.js +95 -0
- package/dist/visual/biology/climate.d.ts +75 -0
- package/dist/visual/biology/climate.js +94 -0
- package/dist/visual/biology/ecology.d.ts +75 -0
- package/dist/visual/biology/ecology.js +94 -0
- package/dist/visual/biology.d.ts +203 -0
- package/dist/visual/biology.js +108 -0
- package/dist/visual/card.d.ts +32 -0
- package/dist/visual/card.js +30 -0
- package/dist/visual/catalog.d.ts +3372 -0
- package/dist/visual/catalog.js +119 -0
- package/dist/visual/chemistry/atom.d.ts +79 -0
- package/dist/visual/chemistry/atom.js +109 -0
- package/dist/visual/chemistry/balance.d.ts +79 -0
- package/dist/visual/chemistry/balance.js +128 -0
- package/dist/visual/chemistry/bonding.d.ts +80 -0
- package/dist/visual/chemistry/bonding.js +147 -0
- package/dist/visual/chemistry/discovery.d.ts +96 -0
- package/dist/visual/chemistry/discovery.js +137 -0
- package/dist/visual/chemistry/electron.d.ts +41 -0
- package/dist/visual/chemistry/electron.js +69 -0
- package/dist/visual/chemistry/laws.d.ts +86 -0
- package/dist/visual/chemistry/laws.js +117 -0
- package/dist/visual/chemistry/particles.d.ts +114 -0
- package/dist/visual/chemistry/particles.js +149 -0
- package/dist/visual/chemistry/periodic.d.ts +52 -0
- package/dist/visual/chemistry/periodic.js +85 -0
- package/dist/visual/chemistry/reaction.d.ts +60 -0
- package/dist/visual/chemistry/reaction.js +76 -0
- package/dist/visual/entry.d.ts +42 -0
- package/dist/visual/entry.js +48 -0
- package/dist/visual/mathematics/chart.d.ts +30 -0
- package/dist/{assessment → visual/mathematics}/chart.js +26 -18
- package/dist/visual/mathematics/charts.d.ts +118 -0
- package/dist/visual/mathematics/charts.js +100 -0
- package/dist/visual/mathematics/function.d.ts +82 -0
- package/dist/visual/mathematics/function.js +102 -0
- package/dist/visual/mathematics/geometry.d.ts +222 -0
- package/dist/visual/mathematics/geometry.js +81 -0
- package/dist/visual/mathematics/line.d.ts +179 -0
- package/dist/visual/mathematics/line.js +156 -0
- package/dist/visual/mathematics/number.d.ts +21 -0
- package/dist/visual/mathematics/number.js +53 -0
- package/dist/visual/physics/braking.d.ts +62 -0
- package/dist/visual/physics/braking.js +83 -0
- package/dist/visual/physics/circular.d.ts +36 -0
- package/dist/visual/physics/circular.js +51 -0
- package/dist/visual/physics/efficiency.d.ts +93 -0
- package/dist/visual/physics/efficiency.js +129 -0
- package/dist/visual/physics/falling.d.ts +56 -0
- package/dist/visual/physics/falling.js +77 -0
- package/dist/visual/physics/force.d.ts +88 -0
- package/dist/visual/physics/force.js +115 -0
- package/dist/visual/physics/instrument.d.ts +93 -0
- package/dist/visual/physics/instrument.js +135 -0
- package/dist/visual/physics/measurement.d.ts +66 -0
- package/dist/visual/physics/measurement.js +85 -0
- package/dist/visual/physics/motion.d.ts +85 -0
- package/dist/visual/physics/motion.js +110 -0
- package/dist/visual/physics/parabolic.d.ts +42 -0
- package/dist/visual/physics/parabolic.js +56 -0
- package/dist/visual/physics/position.d.ts +87 -0
- package/dist/visual/physics/position.js +123 -0
- package/dist/visual/physics/power.d.ts +121 -0
- package/dist/visual/physics/power.js +162 -0
- package/dist/visual/physics/precision.d.ts +96 -0
- package/dist/visual/physics/precision.js +137 -0
- package/dist/visual/physics/product.d.ts +73 -0
- package/dist/visual/physics/product.js +96 -0
- package/dist/visual/physics/record.d.ts +34 -0
- package/dist/visual/physics/record.js +46 -0
- package/dist/visual/physics/relative.d.ts +55 -0
- package/dist/visual/physics/relative.js +76 -0
- package/dist/visual/physics/solar.d.ts +91 -0
- package/dist/visual/physics/solar.js +126 -0
- package/dist/visual/physics/vector.d.ts +103 -0
- package/dist/visual/physics/vector.js +123 -0
- package/dist/visual/physics/velocity.d.ts +112 -0
- package/dist/visual/physics/velocity.js +144 -0
- package/dist/visual/politics.d.ts +92 -0
- package/dist/visual/politics.js +76 -0
- package/package.json +13 -5
- package/dist/assessment/chart.d.ts +0 -62
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/**
|
|
5
|
+
* Props of `AlkaliWaterLab`: a 600 mL beaker of water with a few drops of
|
|
6
|
+
* phenolphthalein on a white tile, at its real size on a lab bench, and a
|
|
7
|
+
* pea-sized piece of metal dropped in.
|
|
8
|
+
*/
|
|
9
|
+
function alkaliWaterLab(rich) {
|
|
10
|
+
return figure(Schema.Struct({
|
|
11
|
+
...cardFields(rich),
|
|
12
|
+
labels: Schema.Struct({
|
|
13
|
+
choose: TextSchema,
|
|
14
|
+
density: rich,
|
|
15
|
+
equation: rich,
|
|
16
|
+
ionization: rich,
|
|
17
|
+
melting: rich,
|
|
18
|
+
radius: rich,
|
|
19
|
+
view: TextSchema,
|
|
20
|
+
}),
|
|
21
|
+
metals: Schema.Array(Schema.Literals([
|
|
22
|
+
"lithium",
|
|
23
|
+
"sodium",
|
|
24
|
+
"potassium",
|
|
25
|
+
"magnesium",
|
|
26
|
+
"calcium",
|
|
27
|
+
])),
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
/** Props of `IonLatticeLab`: a rock-salt crystal at real size. */
|
|
31
|
+
function ionLatticeLab(rich) {
|
|
32
|
+
return figure(Schema.Struct({
|
|
33
|
+
...cardFields(rich),
|
|
34
|
+
crystals: Schema.Array(Schema.Literals([
|
|
35
|
+
"sodium-chloride",
|
|
36
|
+
"magnesium-oxide",
|
|
37
|
+
"lithium-fluoride",
|
|
38
|
+
"potassium-chloride",
|
|
39
|
+
"sodium-fluoride",
|
|
40
|
+
"sodium-bromide",
|
|
41
|
+
])),
|
|
42
|
+
labels: Schema.Struct({
|
|
43
|
+
cells: TextSchema,
|
|
44
|
+
choose: TextSchema,
|
|
45
|
+
count: rich,
|
|
46
|
+
formula: rich,
|
|
47
|
+
ions: rich,
|
|
48
|
+
lattice: rich,
|
|
49
|
+
view: TextSchema,
|
|
50
|
+
}),
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Props of `IonFormationLab`: two atoms become two ions: the metal's outer
|
|
55
|
+
* electrons cross to the nonmetal's outer shell.
|
|
56
|
+
*/
|
|
57
|
+
function ionFormationLab(rich) {
|
|
58
|
+
return figure(Schema.Struct({
|
|
59
|
+
...cardFields(rich),
|
|
60
|
+
labels: Schema.Struct({
|
|
61
|
+
choose: TextSchema,
|
|
62
|
+
metalRadius: rich,
|
|
63
|
+
metalShells: rich,
|
|
64
|
+
nonmetalRadius: rich,
|
|
65
|
+
nonmetalShells: rich,
|
|
66
|
+
progress: TextSchema,
|
|
67
|
+
view: TextSchema,
|
|
68
|
+
}),
|
|
69
|
+
pairs: Schema.Array(Schema.Literals([
|
|
70
|
+
"sodium-chlorine",
|
|
71
|
+
"magnesium-oxygen",
|
|
72
|
+
"lithium-fluorine",
|
|
73
|
+
"potassium-chlorine",
|
|
74
|
+
])),
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
/** Props of `MoleculeShapeLab`: a molecule lab. */
|
|
78
|
+
function moleculeShapeLab(rich) {
|
|
79
|
+
return figure(Schema.Struct({
|
|
80
|
+
...cardFields(rich),
|
|
81
|
+
labels: Schema.Struct({
|
|
82
|
+
atoms: rich,
|
|
83
|
+
choose: TextSchema,
|
|
84
|
+
fill: rich,
|
|
85
|
+
formula: rich,
|
|
86
|
+
mass: rich,
|
|
87
|
+
shape: rich,
|
|
88
|
+
view: TextSchema,
|
|
89
|
+
}),
|
|
90
|
+
molecules: Schema.Array(Schema.Struct({
|
|
91
|
+
id: Schema.Literals([
|
|
92
|
+
"hydrogen",
|
|
93
|
+
"oxygen",
|
|
94
|
+
"nitrogen",
|
|
95
|
+
"chlorine",
|
|
96
|
+
"hydrogen-chloride",
|
|
97
|
+
"carbon-monoxide",
|
|
98
|
+
"nitrogen-monoxide",
|
|
99
|
+
"water",
|
|
100
|
+
"hydrogen-peroxide",
|
|
101
|
+
"carbon-dioxide",
|
|
102
|
+
"sulfur-dioxide",
|
|
103
|
+
"nitrogen-dioxide",
|
|
104
|
+
"dinitrogen-monoxide",
|
|
105
|
+
"ozone",
|
|
106
|
+
"sulfur-trioxide",
|
|
107
|
+
"ammonia",
|
|
108
|
+
"methane",
|
|
109
|
+
"ethene",
|
|
110
|
+
"ethane",
|
|
111
|
+
"ethyne",
|
|
112
|
+
"propane",
|
|
113
|
+
"ethanol",
|
|
114
|
+
"methanol",
|
|
115
|
+
]),
|
|
116
|
+
name: TextSchema,
|
|
117
|
+
})),
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
/** Props of `OrbitalCloudLab`: an orbital lab. */
|
|
121
|
+
function orbitalCloudLab(rich) {
|
|
122
|
+
return figure(Schema.Struct({
|
|
123
|
+
...cardFields(rich),
|
|
124
|
+
labels: Schema.Struct({
|
|
125
|
+
angular: rich,
|
|
126
|
+
choose: TextSchema,
|
|
127
|
+
numbers: rich,
|
|
128
|
+
orbital: rich,
|
|
129
|
+
radial: rich,
|
|
130
|
+
view: TextSchema,
|
|
131
|
+
}),
|
|
132
|
+
orbitals: Schema.Array(Schema.Literals(["1s", "2s", "2px", "2pz", "3s", "3pz", "3dz2", "3dxy"])),
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The props of the labs of orbitals, ions, and bonds. No prop states the
|
|
137
|
+
* conclusion a lab leads to, so none holds answer state.
|
|
138
|
+
*/
|
|
139
|
+
export function bondingVisuals(rich) {
|
|
140
|
+
return {
|
|
141
|
+
AlkaliWaterLab: alkaliWaterLab(rich),
|
|
142
|
+
IonLatticeLab: ionLatticeLab(rich),
|
|
143
|
+
IonFormationLab: ionFormationLab(rich),
|
|
144
|
+
MoleculeShapeLab: moleculeShapeLab(rich),
|
|
145
|
+
OrbitalCloudLab: orbitalCloudLab(rich),
|
|
146
|
+
};
|
|
147
|
+
}
|
|
@@ -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 the experiments that found atomic structure. No prop
|
|
5
|
+
* states the conclusion a lab leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function discoveryVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
CathodeRayLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly labels: Schema.Struct<{
|
|
12
|
+
readonly anode: RichSlot<E>;
|
|
13
|
+
readonly field: RichSlot<E>;
|
|
14
|
+
readonly plates: Schema.Trimmed;
|
|
15
|
+
readonly spot: RichSlot<E>;
|
|
16
|
+
readonly view: Schema.Trimmed;
|
|
17
|
+
}>;
|
|
18
|
+
}>, "figure">;
|
|
19
|
+
MillikanOilDropLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
20
|
+
readonly description: RichSlot<E>;
|
|
21
|
+
readonly title: RichSlot<E>;
|
|
22
|
+
readonly labels: Schema.Struct<{
|
|
23
|
+
readonly charge: RichSlot<E>;
|
|
24
|
+
readonly field: RichSlot<E>;
|
|
25
|
+
readonly multiple: RichSlot<E>;
|
|
26
|
+
readonly view: Schema.Trimmed;
|
|
27
|
+
readonly voltage: Schema.Trimmed;
|
|
28
|
+
}>;
|
|
29
|
+
}>, "figure">;
|
|
30
|
+
RutherfordScatteringLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
31
|
+
readonly description: RichSlot<E>;
|
|
32
|
+
readonly title: RichSlot<E>;
|
|
33
|
+
readonly energy: Schema.optionalKey<Schema.Finite>;
|
|
34
|
+
readonly labels: Schema.Struct<{
|
|
35
|
+
readonly approach: RichSlot<E>;
|
|
36
|
+
readonly energy: Schema.Trimmed;
|
|
37
|
+
readonly nucleus: RichSlot<E>;
|
|
38
|
+
readonly ratio: RichSlot<E>;
|
|
39
|
+
readonly view: Schema.Trimmed;
|
|
40
|
+
}>;
|
|
41
|
+
}>, "figure">;
|
|
42
|
+
BohrEmissionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
43
|
+
readonly description: RichSlot<E>;
|
|
44
|
+
readonly title: RichSlot<E>;
|
|
45
|
+
readonly falls: Schema.$Array<Schema.Struct<{
|
|
46
|
+
readonly from: Schema.Int;
|
|
47
|
+
readonly to: Schema.Int;
|
|
48
|
+
}>>;
|
|
49
|
+
readonly labels: Schema.Struct<{
|
|
50
|
+
readonly choose: Schema.Trimmed;
|
|
51
|
+
readonly energy: RichSlot<E>;
|
|
52
|
+
readonly frequency: RichSlot<E>;
|
|
53
|
+
readonly transition: RichSlot<E>;
|
|
54
|
+
readonly view: Schema.Trimmed;
|
|
55
|
+
readonly wavelength: RichSlot<E>;
|
|
56
|
+
}>;
|
|
57
|
+
}>, "figure">;
|
|
58
|
+
MassSpectrometerLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
59
|
+
readonly description: RichSlot<E>;
|
|
60
|
+
readonly title: RichSlot<E>;
|
|
61
|
+
readonly labels: Schema.Struct<{
|
|
62
|
+
readonly average: RichSlot<E>;
|
|
63
|
+
readonly choose: Schema.Trimmed;
|
|
64
|
+
readonly isotopes: RichSlot<E>;
|
|
65
|
+
readonly north: Schema.Trimmed;
|
|
66
|
+
readonly radius: RichSlot<E>;
|
|
67
|
+
readonly ratio: RichSlot<E>;
|
|
68
|
+
readonly south: Schema.Trimmed;
|
|
69
|
+
readonly view: Schema.Trimmed;
|
|
70
|
+
}>;
|
|
71
|
+
readonly samples: Schema.$Array<Schema.Literals<readonly ["boron", "carbon", "neon", "magnesium", "chlorine", "copper"]>>;
|
|
72
|
+
}>, "figure">;
|
|
73
|
+
ParticleTrackLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
74
|
+
readonly description: RichSlot<E>;
|
|
75
|
+
readonly title: RichSlot<E>;
|
|
76
|
+
readonly labels: Schema.Struct<{
|
|
77
|
+
readonly electron: RichSlot<E>;
|
|
78
|
+
readonly field: Schema.Trimmed;
|
|
79
|
+
readonly proton: RichSlot<E>;
|
|
80
|
+
readonly ratio: RichSlot<E>;
|
|
81
|
+
readonly view: Schema.Trimmed;
|
|
82
|
+
}>;
|
|
83
|
+
}>, "figure">;
|
|
84
|
+
RadioactiveDecayLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
85
|
+
readonly description: RichSlot<E>;
|
|
86
|
+
readonly title: RichSlot<E>;
|
|
87
|
+
readonly labels: Schema.Struct<{
|
|
88
|
+
readonly counted: RichSlot<E>;
|
|
89
|
+
readonly expected: RichSlot<E>;
|
|
90
|
+
readonly halfLives: RichSlot<E>;
|
|
91
|
+
readonly time: Schema.Trimmed;
|
|
92
|
+
readonly view: Schema.Trimmed;
|
|
93
|
+
readonly years: Schema.Trimmed;
|
|
94
|
+
}>;
|
|
95
|
+
}>, "figure">;
|
|
96
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** Props of `CathodeRayLab`: Thomson's cathode-ray tube at real size. */
|
|
5
|
+
function cathodeRayLab(rich) {
|
|
6
|
+
return figure(Schema.Struct({
|
|
7
|
+
...cardFields(rich),
|
|
8
|
+
labels: Schema.Struct({
|
|
9
|
+
anode: rich,
|
|
10
|
+
field: rich,
|
|
11
|
+
plates: TextSchema,
|
|
12
|
+
spot: rich,
|
|
13
|
+
view: TextSchema,
|
|
14
|
+
}),
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Props of `MillikanOilDropLab`: Millikan's oil drops between two charged
|
|
19
|
+
* plates.
|
|
20
|
+
*/
|
|
21
|
+
function millikanOilDropLab(rich) {
|
|
22
|
+
return figure(Schema.Struct({
|
|
23
|
+
...cardFields(rich),
|
|
24
|
+
labels: Schema.Struct({
|
|
25
|
+
charge: rich,
|
|
26
|
+
field: rich,
|
|
27
|
+
multiple: rich,
|
|
28
|
+
view: TextSchema,
|
|
29
|
+
voltage: TextSchema,
|
|
30
|
+
}),
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Props of `RutherfordScatteringLab`: Rutherford's gold foil, seen at the scale
|
|
35
|
+
* of one nucleus.
|
|
36
|
+
*/
|
|
37
|
+
function rutherfordScatteringLab(rich) {
|
|
38
|
+
return figure(Schema.Struct({
|
|
39
|
+
...cardFields(rich),
|
|
40
|
+
energy: Schema.optionalKey(Schema.Finite),
|
|
41
|
+
labels: Schema.Struct({
|
|
42
|
+
approach: rich,
|
|
43
|
+
energy: TextSchema,
|
|
44
|
+
nucleus: rich,
|
|
45
|
+
ratio: rich,
|
|
46
|
+
view: TextSchema,
|
|
47
|
+
}),
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
/** Props of `BohrEmissionLab`: Bohr's hydrogen atom. */
|
|
51
|
+
function bohrEmissionLab(rich) {
|
|
52
|
+
return figure(Schema.Struct({
|
|
53
|
+
...cardFields(rich),
|
|
54
|
+
falls: Schema.Array(Schema.Struct({ from: Schema.Int, to: Schema.Int })),
|
|
55
|
+
labels: Schema.Struct({
|
|
56
|
+
choose: TextSchema,
|
|
57
|
+
energy: rich,
|
|
58
|
+
frequency: rich,
|
|
59
|
+
transition: rich,
|
|
60
|
+
view: TextSchema,
|
|
61
|
+
wavelength: rich,
|
|
62
|
+
}),
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
/** Props of `MassSpectrometerLab`: a magnetic sector mass spectrometer. */
|
|
66
|
+
function massSpectrometerLab(rich) {
|
|
67
|
+
return figure(Schema.Struct({
|
|
68
|
+
...cardFields(rich),
|
|
69
|
+
labels: Schema.Struct({
|
|
70
|
+
average: rich,
|
|
71
|
+
choose: TextSchema,
|
|
72
|
+
isotopes: rich,
|
|
73
|
+
north: TextSchema,
|
|
74
|
+
radius: rich,
|
|
75
|
+
ratio: rich,
|
|
76
|
+
south: TextSchema,
|
|
77
|
+
view: TextSchema,
|
|
78
|
+
}),
|
|
79
|
+
samples: Schema.Array(Schema.Literals([
|
|
80
|
+
"boron",
|
|
81
|
+
"carbon",
|
|
82
|
+
"neon",
|
|
83
|
+
"magnesium",
|
|
84
|
+
"chlorine",
|
|
85
|
+
"copper",
|
|
86
|
+
])),
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Props of `ParticleTrackLab`: an electron, a proton and a neutron enter a
|
|
91
|
+
* magnetic field side by side at the same speed.
|
|
92
|
+
*/
|
|
93
|
+
function particleTrackLab(rich) {
|
|
94
|
+
return figure(Schema.Struct({
|
|
95
|
+
...cardFields(rich),
|
|
96
|
+
labels: Schema.Struct({
|
|
97
|
+
electron: rich,
|
|
98
|
+
field: TextSchema,
|
|
99
|
+
proton: rich,
|
|
100
|
+
ratio: rich,
|
|
101
|
+
view: TextSchema,
|
|
102
|
+
}),
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Props of `RadioactiveDecayLab`: a sample of 400 carbon-14 nuclei, each
|
|
107
|
+
* turning into nitrogen-14 at its own moment, so no one can say when a single
|
|
108
|
+
* nucleus decays, yet the count halves every 5730 years.
|
|
109
|
+
*/
|
|
110
|
+
function radioactiveDecayLab(rich) {
|
|
111
|
+
return figure(Schema.Struct({
|
|
112
|
+
...cardFields(rich),
|
|
113
|
+
labels: Schema.Struct({
|
|
114
|
+
counted: rich,
|
|
115
|
+
expected: rich,
|
|
116
|
+
halfLives: rich,
|
|
117
|
+
time: TextSchema,
|
|
118
|
+
view: TextSchema,
|
|
119
|
+
years: TextSchema,
|
|
120
|
+
}),
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The props of the labs of the experiments that found atomic structure. No prop
|
|
125
|
+
* states the conclusion a lab leads to, so none holds answer state.
|
|
126
|
+
*/
|
|
127
|
+
export function discoveryVisuals(rich) {
|
|
128
|
+
return {
|
|
129
|
+
CathodeRayLab: cathodeRayLab(rich),
|
|
130
|
+
MillikanOilDropLab: millikanOilDropLab(rich),
|
|
131
|
+
RutherfordScatteringLab: rutherfordScatteringLab(rich),
|
|
132
|
+
BohrEmissionLab: bohrEmissionLab(rich),
|
|
133
|
+
MassSpectrometerLab: massSpectrometerLab(rich),
|
|
134
|
+
ParticleTrackLab: particleTrackLab(rich),
|
|
135
|
+
RadioactiveDecayLab: radioactiveDecayLab(rich),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The electron labs. A sample note states the configuration it leads to, and
|
|
5
|
+
* a tendency states how the atom reacts, so both are answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function electronVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
ElectronConfigurationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly labels: Schema.Struct<{
|
|
12
|
+
readonly atomicNumber: Schema.Trimmed;
|
|
13
|
+
readonly chooseAtom: Schema.Trimmed;
|
|
14
|
+
readonly configuration: Schema.Trimmed;
|
|
15
|
+
readonly electronTotal: Schema.Trimmed;
|
|
16
|
+
readonly outerShell: Schema.Trimmed;
|
|
17
|
+
readonly samples: Schema.$Record<Schema.Literals<readonly ["hydrogen", "helium", "carbon", "neon", "sodium", "magnesium", "chlorine", "calcium"]>, Schema.Struct<{
|
|
18
|
+
readonly name: Schema.Trimmed;
|
|
19
|
+
readonly note: RichSlot<E>;
|
|
20
|
+
}>>;
|
|
21
|
+
}>;
|
|
22
|
+
}>, "figure">;
|
|
23
|
+
ValenceElectronLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
24
|
+
readonly description: RichSlot<E>;
|
|
25
|
+
readonly title: RichSlot<E>;
|
|
26
|
+
readonly labels: Schema.Struct<{
|
|
27
|
+
readonly atomicNumber: Schema.Trimmed;
|
|
28
|
+
readonly behavior: Schema.Trimmed;
|
|
29
|
+
readonly chooseAtom: Schema.Trimmed;
|
|
30
|
+
readonly configuration: Schema.Trimmed;
|
|
31
|
+
readonly outerShell: Schema.Trimmed;
|
|
32
|
+
readonly samples: Schema.$Record<Schema.Literals<readonly ["hydrogen", "helium", "sodium", "magnesium", "aluminum", "chlorine", "argon", "calcium"]>, Schema.Struct<{
|
|
33
|
+
readonly name: Schema.Trimmed;
|
|
34
|
+
readonly note: RichSlot<E>;
|
|
35
|
+
readonly tab: Schema.Trimmed;
|
|
36
|
+
readonly tendency: RichSlot<E>;
|
|
37
|
+
}>>;
|
|
38
|
+
readonly valenceElectron: Schema.Trimmed;
|
|
39
|
+
}>;
|
|
40
|
+
}>, "figure">;
|
|
41
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
+
/** The atoms the electron configuration lab can show. */
|
|
5
|
+
const CONFIGURATION_SAMPLES = [
|
|
6
|
+
"hydrogen",
|
|
7
|
+
"helium",
|
|
8
|
+
"carbon",
|
|
9
|
+
"neon",
|
|
10
|
+
"sodium",
|
|
11
|
+
"magnesium",
|
|
12
|
+
"chlorine",
|
|
13
|
+
"calcium",
|
|
14
|
+
];
|
|
15
|
+
/** The atoms the valence electron lab can show. */
|
|
16
|
+
const VALENCE_SAMPLES = [
|
|
17
|
+
"hydrogen",
|
|
18
|
+
"helium",
|
|
19
|
+
"sodium",
|
|
20
|
+
"magnesium",
|
|
21
|
+
"aluminum",
|
|
22
|
+
"chlorine",
|
|
23
|
+
"argon",
|
|
24
|
+
"calcium",
|
|
25
|
+
];
|
|
26
|
+
/** Props of `ElectronConfigurationLab`: filling shells for one atom at a time. */
|
|
27
|
+
function electronConfigurationLab(rich) {
|
|
28
|
+
return figure(Schema.Struct({
|
|
29
|
+
...cardFields(rich),
|
|
30
|
+
labels: Schema.Struct({
|
|
31
|
+
atomicNumber: TextSchema,
|
|
32
|
+
chooseAtom: TextSchema,
|
|
33
|
+
configuration: TextSchema,
|
|
34
|
+
electronTotal: TextSchema,
|
|
35
|
+
outerShell: TextSchema,
|
|
36
|
+
samples: byIds(CONFIGURATION_SAMPLES, Schema.Struct({ name: TextSchema, note: rich })),
|
|
37
|
+
}),
|
|
38
|
+
}), answerAt(["labels", "samples", "*", "note"]));
|
|
39
|
+
}
|
|
40
|
+
/** Props of `ValenceElectronLab`: the outer electrons and what they tend to do. */
|
|
41
|
+
function valenceElectronLab(rich) {
|
|
42
|
+
return figure(Schema.Struct({
|
|
43
|
+
...cardFields(rich),
|
|
44
|
+
labels: Schema.Struct({
|
|
45
|
+
atomicNumber: TextSchema,
|
|
46
|
+
behavior: TextSchema,
|
|
47
|
+
chooseAtom: TextSchema,
|
|
48
|
+
configuration: TextSchema,
|
|
49
|
+
outerShell: TextSchema,
|
|
50
|
+
samples: byIds(VALENCE_SAMPLES, Schema.Struct({
|
|
51
|
+
name: TextSchema,
|
|
52
|
+
note: rich,
|
|
53
|
+
tab: TextSchema,
|
|
54
|
+
tendency: rich,
|
|
55
|
+
})),
|
|
56
|
+
valenceElectron: TextSchema,
|
|
57
|
+
}),
|
|
58
|
+
}), answerAt(["labels", "samples", "*", "note"], ["labels", "samples", "*", "tendency"]));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The electron labs. A sample note states the configuration it leads to, and
|
|
62
|
+
* a tendency states how the atom reacts, so both are answer state.
|
|
63
|
+
*/
|
|
64
|
+
export function electronVisuals(rich) {
|
|
65
|
+
return {
|
|
66
|
+
ElectronConfigurationLab: electronConfigurationLab(rich),
|
|
67
|
+
ValenceElectronLab: valenceElectronLab(rich),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The labs of the basic chemical laws. A ratio, a leftover, and a calculation
|
|
5
|
+
* state the result each law predicts, so they are answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function lawVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
CombiningVolumesLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly labels: Schema.Struct<{
|
|
12
|
+
readonly chooseMode: Schema.Trimmed;
|
|
13
|
+
readonly exampleLabel: Schema.Trimmed;
|
|
14
|
+
readonly modes: Schema.$Record<Schema.Literals<readonly ["water-vapor", "ammonia-synthesis", "ammonia-decomposition"]>, Schema.Struct<{
|
|
15
|
+
readonly example: RichSlot<E>;
|
|
16
|
+
readonly helperCaption: RichSlot<E>;
|
|
17
|
+
readonly ratio: RichSlot<E>;
|
|
18
|
+
readonly tab: RichSlot<E>;
|
|
19
|
+
readonly tabLabel: Schema.Trimmed;
|
|
20
|
+
}>>;
|
|
21
|
+
readonly products: Schema.Trimmed;
|
|
22
|
+
readonly ratioLabel: Schema.Trimmed;
|
|
23
|
+
readonly reactants: Schema.Trimmed;
|
|
24
|
+
readonly reactionView: Schema.Trimmed;
|
|
25
|
+
readonly volumeUnit: Schema.Trimmed;
|
|
26
|
+
}>;
|
|
27
|
+
}>, "figure">;
|
|
28
|
+
ConstantCompositionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
29
|
+
readonly description: RichSlot<E>;
|
|
30
|
+
readonly title: RichSlot<E>;
|
|
31
|
+
readonly labels: Schema.Struct<{
|
|
32
|
+
readonly after: Schema.Trimmed;
|
|
33
|
+
readonly before: Schema.Trimmed;
|
|
34
|
+
readonly chooseMode: Schema.Trimmed;
|
|
35
|
+
readonly leftoverLabel: Schema.Trimmed;
|
|
36
|
+
readonly modes: Schema.$Record<Schema.Literals<readonly ["exact", "hydrogen-excess", "oxygen-excess"]>, Schema.Struct<{
|
|
37
|
+
readonly helperCaption: RichSlot<E>;
|
|
38
|
+
readonly leftover: RichSlot<E>;
|
|
39
|
+
readonly ratio: RichSlot<E>;
|
|
40
|
+
readonly readoutAfter: RichSlot<E>;
|
|
41
|
+
readonly readoutBefore: RichSlot<E>;
|
|
42
|
+
readonly tab: RichSlot<E>;
|
|
43
|
+
readonly tabLabel: Schema.Trimmed;
|
|
44
|
+
}>>;
|
|
45
|
+
readonly ratioLabel: Schema.Trimmed;
|
|
46
|
+
readonly reactionView: Schema.Trimmed;
|
|
47
|
+
}>;
|
|
48
|
+
}>, "figure">;
|
|
49
|
+
MassConservationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
50
|
+
readonly description: RichSlot<E>;
|
|
51
|
+
readonly title: RichSlot<E>;
|
|
52
|
+
readonly labels: Schema.Struct<{
|
|
53
|
+
readonly after: Schema.Trimmed;
|
|
54
|
+
readonly before: Schema.Trimmed;
|
|
55
|
+
readonly calculationLabel: Schema.Trimmed;
|
|
56
|
+
readonly chooseMode: Schema.Trimmed;
|
|
57
|
+
readonly modes: Schema.$Record<Schema.Literals<readonly ["closed", "open"]>, Schema.Struct<{
|
|
58
|
+
readonly calculation: RichSlot<E>;
|
|
59
|
+
readonly helperCaption: RichSlot<E>;
|
|
60
|
+
readonly readoutAfter: RichSlot<E>;
|
|
61
|
+
readonly readoutBefore: RichSlot<E>;
|
|
62
|
+
readonly system: RichSlot<E>;
|
|
63
|
+
readonly tab: Schema.Trimmed;
|
|
64
|
+
}>>;
|
|
65
|
+
readonly reactionView: Schema.Trimmed;
|
|
66
|
+
readonly systemLabel: Schema.Trimmed;
|
|
67
|
+
}>;
|
|
68
|
+
}>, "figure">;
|
|
69
|
+
MultipleProportionsLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
70
|
+
readonly description: RichSlot<E>;
|
|
71
|
+
readonly title: RichSlot<E>;
|
|
72
|
+
readonly labels: Schema.Struct<{
|
|
73
|
+
readonly changingLabel: Schema.Trimmed;
|
|
74
|
+
readonly chooseMode: Schema.Trimmed;
|
|
75
|
+
readonly comparisonView: Schema.Trimmed;
|
|
76
|
+
readonly fixedLabel: Schema.Trimmed;
|
|
77
|
+
readonly modes: Schema.$Record<Schema.Literals<readonly ["water-peroxide", "carbon-oxides", "nitrogen-oxides"]>, Schema.Struct<{
|
|
78
|
+
readonly changing: RichSlot<E>;
|
|
79
|
+
readonly fixed: RichSlot<E>;
|
|
80
|
+
readonly helperCaption: RichSlot<E>;
|
|
81
|
+
readonly tab: RichSlot<E>;
|
|
82
|
+
readonly tabLabel: Schema.Trimmed;
|
|
83
|
+
}>>;
|
|
84
|
+
}>;
|
|
85
|
+
}>, "figure">;
|
|
86
|
+
};
|