@nakafa/aksara-contracts 7.0.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/figure.d.ts +24 -48725
- package/dist/assessment/figure.js +10 -6
- package/dist/visual/base/layout.d.ts +6 -6
- package/dist/visual/base/math.d.ts +4 -4
- package/dist/visual/base/media.d.ts +2 -2
- 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 +9 -9
- package/dist/visual/catalog.d.ts +1645 -26906
- package/dist/visual/catalog.js +47 -1
- package/dist/visual/chemistry/atom.d.ts +4 -4
- 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 +2 -2
- package/dist/visual/chemistry/laws.d.ts +4 -4
- package/dist/visual/chemistry/particles.d.ts +5 -5
- package/dist/visual/chemistry/periodic.d.ts +2 -2
- package/dist/visual/chemistry/reaction.d.ts +3 -3
- package/dist/visual/entry.d.ts +4 -4
- package/dist/visual/mathematics/chart.d.ts +1 -1
- package/dist/visual/mathematics/charts.d.ts +5 -5
- package/dist/visual/mathematics/function.d.ts +7 -7
- package/dist/visual/mathematics/geometry.d.ts +4 -4
- package/dist/visual/mathematics/number.d.ts +1 -1
- 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 +4 -4
- package/dist/visual/physics/motion.d.ts +6 -6
- package/dist/visual/physics/parabolic.d.ts +2 -2
- 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 +7 -7
- package/dist/visual/politics.d.ts +8 -8
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/**
|
|
5
|
+
* Props of `PredatorPreyLab`: a rice field seen from above, with the rats that
|
|
6
|
+
* eat its grain and the barn owls that hunt them, as the Lotka-Volterra model
|
|
7
|
+
* runs them over 20 years.
|
|
8
|
+
*/
|
|
9
|
+
function predatorPreyLab(rich) {
|
|
10
|
+
return figure(Schema.Struct({
|
|
11
|
+
...cardFields(rich),
|
|
12
|
+
capacity: Schema.optionalKey(Schema.Finite),
|
|
13
|
+
labels: Schema.Struct({
|
|
14
|
+
peak: rich,
|
|
15
|
+
predators: rich,
|
|
16
|
+
prey: rich,
|
|
17
|
+
start: TextSchema,
|
|
18
|
+
viewLabel: TextSchema,
|
|
19
|
+
year: rich,
|
|
20
|
+
}),
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props of `EpidemicSpreadLab`: a town square of 60 m by 40 m where people
|
|
25
|
+
* stroll past a fountain while a virus spreads.
|
|
26
|
+
*/
|
|
27
|
+
function epidemicSpreadLab(rich) {
|
|
28
|
+
return figure(Schema.Struct({
|
|
29
|
+
...cardFields(rich),
|
|
30
|
+
labels: Schema.Struct({
|
|
31
|
+
chooseRoute: Schema.optionalKey(TextSchema),
|
|
32
|
+
distancing: Schema.optionalKey(TextSchema),
|
|
33
|
+
immune: rich,
|
|
34
|
+
infected: rich,
|
|
35
|
+
masks: Schema.optionalKey(TextSchema),
|
|
36
|
+
peak: rich,
|
|
37
|
+
recovered: rich,
|
|
38
|
+
reproduction: rich,
|
|
39
|
+
routes: Schema.optionalKey(Schema.Struct({ air: rich, touch: rich })),
|
|
40
|
+
susceptible: rich,
|
|
41
|
+
vaccinated: Schema.optionalKey(TextSchema),
|
|
42
|
+
viewLabel: TextSchema,
|
|
43
|
+
washing: Schema.optionalKey(TextSchema),
|
|
44
|
+
}),
|
|
45
|
+
measures: Schema.Array(Schema.Literals(["masks", "washing", "vaccinated", "distancing"])),
|
|
46
|
+
routes: Schema.optionalKey(Schema.Array(Schema.Literals(["air", "touch"]))),
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
/** Props of `HyphaeDecayLab`: tempeh in the making, seen from above. */
|
|
50
|
+
function hyphaeDecayLab(rich) {
|
|
51
|
+
return figure(Schema.Struct({
|
|
52
|
+
...cardFields(rich),
|
|
53
|
+
labels: Schema.Struct({
|
|
54
|
+
cover: rich,
|
|
55
|
+
hours: TextSchema,
|
|
56
|
+
length: rich,
|
|
57
|
+
time: rich,
|
|
58
|
+
tips: rich,
|
|
59
|
+
viewLabel: TextSchema,
|
|
60
|
+
}),
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Props of `AntibodyNeutralizeLab`: SARS-CoV-2 virions about 100 nm across
|
|
65
|
+
* drift down to a cell whose surface carries ACE2 receptors.
|
|
66
|
+
*/
|
|
67
|
+
function antibodyNeutralizeLab(rich) {
|
|
68
|
+
return figure(Schema.Struct({
|
|
69
|
+
...cardFields(rich),
|
|
70
|
+
labels: Schema.Struct({
|
|
71
|
+
blocked: rich,
|
|
72
|
+
chance: rich,
|
|
73
|
+
choose: Schema.optionalKey(TextSchema),
|
|
74
|
+
covered: rich,
|
|
75
|
+
day: Schema.optionalKey(TextSchema),
|
|
76
|
+
level: rich,
|
|
77
|
+
people: Schema.optionalKey(Schema.Struct({ unvaccinated: rich, vaccinated: rich })),
|
|
78
|
+
viewLabel: TextSchema,
|
|
79
|
+
}),
|
|
80
|
+
mode: Schema.Literals(["days", "vaccine"]),
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The props of the ecology and disease labs. No prop states the conclusion a
|
|
85
|
+
* lab leads to, so none holds answer state.
|
|
86
|
+
*/
|
|
87
|
+
export function ecologyVisuals(rich) {
|
|
88
|
+
return {
|
|
89
|
+
PredatorPreyLab: predatorPreyLab(rich),
|
|
90
|
+
EpidemicSpreadLab: epidemicSpreadLab(rich),
|
|
91
|
+
HyphaeDecayLab: hyphaeDecayLab(rich),
|
|
92
|
+
AntibodyNeutralizeLab: antibodyNeutralizeLab(rich),
|
|
93
|
+
};
|
|
94
|
+
}
|
package/dist/visual/biology.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
39
39
|
readonly viewLabel: Schema.Trimmed;
|
|
40
40
|
}>;
|
|
41
41
|
title: Schema.optionalKey<RichSlot<E>>;
|
|
42
|
-
}
|
|
42
|
+
}>, "figure">;
|
|
43
43
|
ClimateObservationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
44
44
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
45
45
|
description: Schema.optionalKey<RichSlot<E>>;
|
|
@@ -60,7 +60,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
60
60
|
readonly viewLabel: Schema.Trimmed;
|
|
61
61
|
}>;
|
|
62
62
|
title: Schema.optionalKey<RichSlot<E>>;
|
|
63
|
-
}
|
|
63
|
+
}>, "figure">;
|
|
64
64
|
FungiMyceliumLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
65
65
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
66
66
|
description: Schema.optionalKey<RichSlot<E>>;
|
|
@@ -81,7 +81,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
81
81
|
readonly viewLabel: Schema.Trimmed;
|
|
82
82
|
}>;
|
|
83
83
|
title: Schema.optionalKey<RichSlot<E>>;
|
|
84
|
-
}
|
|
84
|
+
}>, "figure">;
|
|
85
85
|
GreenhouseEffectLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
86
86
|
readonly description: RichSlot<E>;
|
|
87
87
|
readonly labels: Schema.Struct<{
|
|
@@ -93,7 +93,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
93
93
|
readonly viewLabel: Schema.Trimmed;
|
|
94
94
|
}>;
|
|
95
95
|
readonly title: RichSlot<E>;
|
|
96
|
-
}
|
|
96
|
+
}>, "figure">;
|
|
97
97
|
SarsCov2VirionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
98
98
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
99
99
|
description: Schema.optionalKey<RichSlot<E>>;
|
|
@@ -114,7 +114,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
114
114
|
readonly viewLabel: Schema.Trimmed;
|
|
115
115
|
}>;
|
|
116
116
|
title: Schema.optionalKey<RichSlot<E>>;
|
|
117
|
-
}
|
|
117
|
+
}>, "figure">;
|
|
118
118
|
VirusMorphologyLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
119
119
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
120
120
|
description: Schema.optionalKey<RichSlot<E>>;
|
|
@@ -135,7 +135,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
135
135
|
readonly viewLabel: Schema.Trimmed;
|
|
136
136
|
}>;
|
|
137
137
|
title: Schema.optionalKey<RichSlot<E>>;
|
|
138
|
-
}
|
|
138
|
+
}>, "figure">;
|
|
139
139
|
VirusReplicationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
140
140
|
readonly defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
141
141
|
readonly description: Schema.optionalKey<RichSlot<E>>;
|
|
@@ -157,7 +157,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
157
157
|
}>;
|
|
158
158
|
readonly title: Schema.optionalKey<RichSlot<E>>;
|
|
159
159
|
readonly mode: Schema.optionalKey<Schema.Literals<readonly ["both", "lytic", "lysogenic"]>>;
|
|
160
|
-
}
|
|
160
|
+
}>, "figure">;
|
|
161
161
|
VirusRoleLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
162
162
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
163
163
|
description: Schema.optionalKey<RichSlot<E>>;
|
|
@@ -178,7 +178,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
178
178
|
readonly viewLabel: Schema.Trimmed;
|
|
179
179
|
}>;
|
|
180
180
|
title: Schema.optionalKey<RichSlot<E>>;
|
|
181
|
-
}
|
|
181
|
+
}>, "figure">;
|
|
182
182
|
VirusStructureLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
183
183
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
184
184
|
description: Schema.optionalKey<RichSlot<E>>;
|
|
@@ -199,5 +199,5 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
199
199
|
readonly viewLabel: Schema.Trimmed;
|
|
200
200
|
}>;
|
|
201
201
|
title: Schema.optionalKey<RichSlot<E>>;
|
|
202
|
-
}
|
|
202
|
+
}>, "figure">;
|
|
203
203
|
};
|