@nakafa/aksara-contracts 8.0.4 → 8.2.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/math/bounds.js +6 -3
- package/dist/math/formula/contour.d.ts +5 -11
- package/dist/math/formula/contour.js +48 -57
- package/dist/math/formula/plane.d.ts +7 -0
- package/dist/math/formula/plane.js +23 -8
- package/dist/math/formula/region.js +3 -2
- package/dist/math/formula/scan.d.ts +13 -0
- package/dist/math/formula/scan.js +45 -0
- package/dist/visual/biology/physiology.d.ts +85 -0
- package/dist/visual/biology/physiology.js +105 -0
- package/dist/visual/biology/plant.d.ts +121 -0
- package/dist/visual/biology/plant.js +160 -0
- package/dist/visual/biology.d.ts +16 -16
- package/dist/visual/biology.js +2 -2
- package/dist/visual/catalog.d.ts +834 -28
- package/dist/visual/catalog.js +26 -0
- package/dist/visual/chemistry/atom.d.ts +2 -2
- package/dist/visual/chemistry/atom.js +2 -2
- package/dist/visual/mathematics/function.d.ts +4 -4
- package/dist/visual/mathematics/function.js +4 -4
- package/dist/visual/mathematics/geometry.d.ts +1 -1
- package/dist/visual/mathematics/geometry.js +1 -1
- package/dist/visual/physics/circuit.d.ts +75 -0
- package/dist/visual/physics/circuit.js +86 -0
- package/dist/visual/physics/dynamics.d.ts +110 -0
- package/dist/visual/physics/dynamics.js +134 -0
- package/dist/visual/physics/electronics.d.ts +59 -0
- package/dist/visual/physics/electronics.js +71 -0
- package/dist/visual/physics/field.d.ts +48 -0
- package/dist/visual/physics/field.js +60 -0
- package/dist/visual/physics/fluid.d.ts +68 -0
- package/dist/visual/physics/fluid.js +83 -0
- package/dist/visual/physics/gravity.d.ts +38 -0
- package/dist/visual/physics/gravity.js +47 -0
- package/dist/visual/physics/heat.d.ts +54 -0
- package/dist/visual/physics/heat.js +66 -0
- package/dist/visual/physics/light.d.ts +75 -0
- package/dist/visual/physics/light.js +90 -0
- package/dist/visual/physics/nuclear.d.ts +57 -0
- package/dist/visual/physics/nuclear.js +69 -0
- package/dist/visual/physics/parabolic.d.ts +2 -2
- package/dist/visual/physics/parabolic.js +2 -2
- package/dist/visual/physics/reading.d.ts +52 -0
- package/dist/visual/physics/reading.js +61 -0
- package/dist/visual/physics/wave.d.ts +70 -0
- package/dist/visual/physics/wave.js +85 -0
- package/dist/visual/politics.d.ts +1 -1
- package/dist/visual/politics.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** Props of `TransistorBiasLab`: an npn transistor with a base resistor and a collector resistor. */
|
|
5
|
+
function transistorBiasLab(rich) {
|
|
6
|
+
return figure(Schema.Struct({
|
|
7
|
+
...cardFields(rich),
|
|
8
|
+
base: Schema.Finite,
|
|
9
|
+
baseSupply: Schema.Finite,
|
|
10
|
+
collector: Schema.Finite,
|
|
11
|
+
collectorSupply: Schema.Finite,
|
|
12
|
+
gain: Schema.Finite,
|
|
13
|
+
labels: Schema.Struct({
|
|
14
|
+
base: rich,
|
|
15
|
+
baseCurrent: rich,
|
|
16
|
+
baseName: TextSchema,
|
|
17
|
+
collectorCurrent: rich,
|
|
18
|
+
collectorEmitter: rich,
|
|
19
|
+
viewLabel: TextSchema,
|
|
20
|
+
}),
|
|
21
|
+
threshold: Schema.Finite,
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
/** Props of `LogicGateLab`: a logic trainer with an unknown gate P feeding a NAND gate together with input C. */
|
|
25
|
+
function logicGateLab(rich) {
|
|
26
|
+
return figure(Schema.Struct({
|
|
27
|
+
...cardFields(rich),
|
|
28
|
+
gate: Schema.Literals(["AND", "OR", "NAND", "NOR", "XOR"]),
|
|
29
|
+
labels: Schema.Struct({
|
|
30
|
+
gate: TextSchema,
|
|
31
|
+
matches: rich,
|
|
32
|
+
viewLabel: TextSchema,
|
|
33
|
+
}),
|
|
34
|
+
rows: Schema.Array(Schema.Struct({
|
|
35
|
+
a: Schema.Finite,
|
|
36
|
+
b: Schema.Finite,
|
|
37
|
+
c: Schema.Finite,
|
|
38
|
+
q: Schema.Finite,
|
|
39
|
+
})),
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
/** Props of `TransistorSwitchLab`: an automatic lamp: a fixed resistor above a light-dependent resistor shares the supply, and the share across the LDR drives the transistor's base. */
|
|
43
|
+
function transistorSwitchLab(rich) {
|
|
44
|
+
return figure(Schema.Struct({
|
|
45
|
+
...cardFields(rich),
|
|
46
|
+
labels: Schema.Struct({
|
|
47
|
+
base: rich,
|
|
48
|
+
ldr: rich,
|
|
49
|
+
light: rich,
|
|
50
|
+
lightName: TextSchema,
|
|
51
|
+
resistor: rich,
|
|
52
|
+
resistorName: TextSchema,
|
|
53
|
+
switching: rich,
|
|
54
|
+
viewLabel: TextSchema,
|
|
55
|
+
}),
|
|
56
|
+
resistor: Schema.Finite,
|
|
57
|
+
supply: Schema.Finite,
|
|
58
|
+
threshold: Schema.Finite,
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The props of the electronics labs. Each prop is a value from the item the lab
|
|
63
|
+
* draws, never the conclusion it leads to, so none holds answer state.
|
|
64
|
+
*/
|
|
65
|
+
export function electronicsVisuals(rich) {
|
|
66
|
+
return {
|
|
67
|
+
TransistorBiasLab: transistorBiasLab(rich),
|
|
68
|
+
LogicGateLab: logicGateLab(rich),
|
|
69
|
+
TransistorSwitchLab: transistorSwitchLab(rich),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the electromagnetism labs. Each prop is a value from the item the lab
|
|
5
|
+
* draws, never the conclusion it leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function fieldVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
CurrentBalanceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly field: Schema.Finite;
|
|
12
|
+
readonly labels: Schema.Struct<{
|
|
13
|
+
readonly current: RichSlot<E>;
|
|
14
|
+
readonly currentName: Schema.Trimmed;
|
|
15
|
+
readonly force: RichSlot<E>;
|
|
16
|
+
readonly needed: RichSlot<E>;
|
|
17
|
+
readonly viewLabel: Schema.Trimmed;
|
|
18
|
+
readonly weight: RichSlot<E>;
|
|
19
|
+
}>;
|
|
20
|
+
readonly length: Schema.Finite;
|
|
21
|
+
readonly mass: Schema.Finite;
|
|
22
|
+
}>, "figure">;
|
|
23
|
+
MagnetPipeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
24
|
+
readonly description: RichSlot<E>;
|
|
25
|
+
readonly title: RichSlot<E>;
|
|
26
|
+
readonly labels: Schema.Struct<{
|
|
27
|
+
readonly copper: RichSlot<E>;
|
|
28
|
+
readonly plastic: RichSlot<E>;
|
|
29
|
+
readonly slit: RichSlot<E>;
|
|
30
|
+
readonly viewLabel: Schema.Trimmed;
|
|
31
|
+
}>;
|
|
32
|
+
}>, "figure">;
|
|
33
|
+
TransformerLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
34
|
+
readonly description: RichSlot<E>;
|
|
35
|
+
readonly title: RichSlot<E>;
|
|
36
|
+
readonly efficiency: Schema.Finite;
|
|
37
|
+
readonly labels: Schema.Struct<{
|
|
38
|
+
readonly input: RichSlot<E>;
|
|
39
|
+
readonly lost: RichSlot<E>;
|
|
40
|
+
readonly primaryCurrent: RichSlot<E>;
|
|
41
|
+
readonly ratio: RichSlot<E>;
|
|
42
|
+
readonly viewLabel: Schema.Trimmed;
|
|
43
|
+
}>;
|
|
44
|
+
readonly outputPower: Schema.Finite;
|
|
45
|
+
readonly primaryVoltage: Schema.Finite;
|
|
46
|
+
readonly secondaryVoltage: Schema.Finite;
|
|
47
|
+
}>, "figure">;
|
|
48
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** Props of `CurrentBalanceLab`: a straight wire lies east to west across the gap of a magnet whose field points north. */
|
|
5
|
+
function currentBalanceLab(rich) {
|
|
6
|
+
return figure(Schema.Struct({
|
|
7
|
+
...cardFields(rich),
|
|
8
|
+
field: Schema.Finite,
|
|
9
|
+
labels: Schema.Struct({
|
|
10
|
+
current: rich,
|
|
11
|
+
currentName: TextSchema,
|
|
12
|
+
force: rich,
|
|
13
|
+
needed: rich,
|
|
14
|
+
viewLabel: TextSchema,
|
|
15
|
+
weight: rich,
|
|
16
|
+
}),
|
|
17
|
+
length: Schema.Finite,
|
|
18
|
+
mass: Schema.Finite,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
/** Props of `MagnetPipeLab`: the same strong magnet dropped at the same moment through three pipes of the same size: plastic, copper, and copper with a slit along its length. */
|
|
22
|
+
function magnetPipeLab(rich) {
|
|
23
|
+
return figure(Schema.Struct({
|
|
24
|
+
...cardFields(rich),
|
|
25
|
+
labels: Schema.Struct({
|
|
26
|
+
copper: rich,
|
|
27
|
+
plastic: rich,
|
|
28
|
+
slit: rich,
|
|
29
|
+
viewLabel: TextSchema,
|
|
30
|
+
}),
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
/** Props of `TransformerLab`: a transformer on a laminated iron core lights a bulb from its secondary coil. */
|
|
34
|
+
function transformerLab(rich) {
|
|
35
|
+
return figure(Schema.Struct({
|
|
36
|
+
...cardFields(rich),
|
|
37
|
+
efficiency: Schema.Finite,
|
|
38
|
+
labels: Schema.Struct({
|
|
39
|
+
input: rich,
|
|
40
|
+
lost: rich,
|
|
41
|
+
primaryCurrent: rich,
|
|
42
|
+
ratio: rich,
|
|
43
|
+
viewLabel: TextSchema,
|
|
44
|
+
}),
|
|
45
|
+
outputPower: Schema.Finite,
|
|
46
|
+
primaryVoltage: Schema.Finite,
|
|
47
|
+
secondaryVoltage: Schema.Finite,
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The props of the electromagnetism labs. Each prop is a value from the item the lab
|
|
52
|
+
* draws, never the conclusion it leads to, so none holds answer state.
|
|
53
|
+
*/
|
|
54
|
+
export function fieldVisuals(rich) {
|
|
55
|
+
return {
|
|
56
|
+
CurrentBalanceLab: currentBalanceLab(rich),
|
|
57
|
+
MagnetPipeLab: magnetPipeLab(rich),
|
|
58
|
+
TransformerLab: transformerLab(rich),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the fluid pressure labs. Each prop is a value from the item the lab
|
|
5
|
+
* draws, never the conclusion it leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function fluidVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
FloatingBlockLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly density: Schema.Finite;
|
|
12
|
+
readonly labels: Schema.Struct<{
|
|
13
|
+
readonly above: RichSlot<E>;
|
|
14
|
+
readonly liquid: Schema.Trimmed;
|
|
15
|
+
readonly liquids: Schema.$Record<Schema.Literals<readonly ["water", "other"]>, RichSlot<E>>;
|
|
16
|
+
readonly under: RichSlot<E>;
|
|
17
|
+
readonly viewLabel: Schema.Trimmed;
|
|
18
|
+
}>;
|
|
19
|
+
readonly underWater: Schema.Finite;
|
|
20
|
+
readonly volume: Schema.Finite;
|
|
21
|
+
}>, "figure">;
|
|
22
|
+
HydraulicJackLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
23
|
+
readonly description: RichSlot<E>;
|
|
24
|
+
readonly title: RichSlot<E>;
|
|
25
|
+
readonly force: Schema.Finite;
|
|
26
|
+
readonly labels: Schema.Struct<{
|
|
27
|
+
readonly force: RichSlot<E>;
|
|
28
|
+
readonly forceName: Schema.Trimmed;
|
|
29
|
+
readonly lifted: RichSlot<E>;
|
|
30
|
+
readonly mass: RichSlot<E>;
|
|
31
|
+
readonly pressure: RichSlot<E>;
|
|
32
|
+
readonly rise: RichSlot<E>;
|
|
33
|
+
readonly viewLabel: Schema.Trimmed;
|
|
34
|
+
}>;
|
|
35
|
+
readonly largeArea: Schema.Finite;
|
|
36
|
+
readonly smallArea: Schema.Finite;
|
|
37
|
+
readonly stroke: Schema.Finite;
|
|
38
|
+
}>, "figure">;
|
|
39
|
+
ManometerLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
40
|
+
readonly description: RichSlot<E>;
|
|
41
|
+
readonly title: RichSlot<E>;
|
|
42
|
+
readonly atmosphere: Schema.Finite;
|
|
43
|
+
readonly difference: Schema.Finite;
|
|
44
|
+
readonly labels: Schema.Struct<{
|
|
45
|
+
readonly difference: RichSlot<E>;
|
|
46
|
+
readonly differenceName: Schema.Trimmed;
|
|
47
|
+
readonly excess: RichSlot<E>;
|
|
48
|
+
readonly gas: RichSlot<E>;
|
|
49
|
+
readonly viewLabel: Schema.Trimmed;
|
|
50
|
+
}>;
|
|
51
|
+
readonly liquidDensity: Schema.Finite;
|
|
52
|
+
readonly referenceDensity: Schema.Finite;
|
|
53
|
+
}>, "figure">;
|
|
54
|
+
VenturiTubeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
55
|
+
readonly description: RichSlot<E>;
|
|
56
|
+
readonly title: RichSlot<E>;
|
|
57
|
+
readonly labels: Schema.Struct<{
|
|
58
|
+
readonly drop: RichSlot<E>;
|
|
59
|
+
readonly faster: RichSlot<E>;
|
|
60
|
+
readonly speed: RichSlot<E>;
|
|
61
|
+
readonly speedName: Schema.Trimmed;
|
|
62
|
+
readonly viewLabel: Schema.Trimmed;
|
|
63
|
+
}>;
|
|
64
|
+
readonly narrow: Schema.Finite;
|
|
65
|
+
readonly speed: Schema.Finite;
|
|
66
|
+
readonly wide: Schema.Finite;
|
|
67
|
+
}>, "figure">;
|
|
68
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** Props of `FloatingBlockLab`: a wooden block floats in a tank of water, then in a lighter liquid. */
|
|
5
|
+
function floatingBlockLab(rich) {
|
|
6
|
+
return figure(Schema.Struct({
|
|
7
|
+
...cardFields(rich),
|
|
8
|
+
density: Schema.Finite,
|
|
9
|
+
labels: Schema.Struct({
|
|
10
|
+
above: rich,
|
|
11
|
+
liquid: TextSchema,
|
|
12
|
+
liquids: byIds(["water", "other"], rich),
|
|
13
|
+
under: rich,
|
|
14
|
+
viewLabel: TextSchema,
|
|
15
|
+
}),
|
|
16
|
+
underWater: Schema.Finite,
|
|
17
|
+
volume: Schema.Finite,
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
/** Props of `HydraulicJackLab`: a hydraulic jack in section, each cylinder drawn as wide as its piston. */
|
|
21
|
+
function hydraulicJackLab(rich) {
|
|
22
|
+
return figure(Schema.Struct({
|
|
23
|
+
...cardFields(rich),
|
|
24
|
+
force: Schema.Finite,
|
|
25
|
+
labels: Schema.Struct({
|
|
26
|
+
force: rich,
|
|
27
|
+
forceName: TextSchema,
|
|
28
|
+
lifted: rich,
|
|
29
|
+
mass: rich,
|
|
30
|
+
pressure: rich,
|
|
31
|
+
rise: rich,
|
|
32
|
+
viewLabel: TextSchema,
|
|
33
|
+
}),
|
|
34
|
+
largeArea: Schema.Finite,
|
|
35
|
+
smallArea: Schema.Finite,
|
|
36
|
+
stroke: Schema.Finite,
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
/** Props of `ManometerLab`: a U-tube manometer with one arm on a gas supply and the other open to the air. */
|
|
40
|
+
function manometerLab(rich) {
|
|
41
|
+
return figure(Schema.Struct({
|
|
42
|
+
...cardFields(rich),
|
|
43
|
+
atmosphere: Schema.Finite,
|
|
44
|
+
difference: Schema.Finite,
|
|
45
|
+
labels: Schema.Struct({
|
|
46
|
+
difference: rich,
|
|
47
|
+
differenceName: TextSchema,
|
|
48
|
+
excess: rich,
|
|
49
|
+
gas: rich,
|
|
50
|
+
viewLabel: TextSchema,
|
|
51
|
+
}),
|
|
52
|
+
liquidDensity: Schema.Finite,
|
|
53
|
+
referenceDensity: Schema.Finite,
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
/** Props of `VenturiTubeLab`: water flows steadily through a horizontal pipe that narrows halfway, with an open tube above each section. */
|
|
57
|
+
function venturiTubeLab(rich) {
|
|
58
|
+
return figure(Schema.Struct({
|
|
59
|
+
...cardFields(rich),
|
|
60
|
+
labels: Schema.Struct({
|
|
61
|
+
drop: rich,
|
|
62
|
+
faster: rich,
|
|
63
|
+
speed: rich,
|
|
64
|
+
speedName: TextSchema,
|
|
65
|
+
viewLabel: TextSchema,
|
|
66
|
+
}),
|
|
67
|
+
narrow: Schema.Finite,
|
|
68
|
+
speed: Schema.Finite,
|
|
69
|
+
wide: Schema.Finite,
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The props of the fluid pressure labs. Each prop is a value from the item the lab
|
|
74
|
+
* draws, never the conclusion it leads to, so none holds answer state.
|
|
75
|
+
*/
|
|
76
|
+
export function fluidVisuals(rich) {
|
|
77
|
+
return {
|
|
78
|
+
FloatingBlockLab: floatingBlockLab(rich),
|
|
79
|
+
HydraulicJackLab: hydraulicJackLab(rich),
|
|
80
|
+
ManometerLab: manometerLab(rich),
|
|
81
|
+
VenturiTubeLab: venturiTubeLab(rich),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the gravitation labs. Each prop is a value from the item the lab
|
|
5
|
+
* draws, never the conclusion it leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function gravityVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
OrbitRadiusLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly knownHeight: Schema.Finite;
|
|
12
|
+
readonly knownPeriod: Schema.Finite;
|
|
13
|
+
readonly labels: Schema.Struct<{
|
|
14
|
+
readonly knownName: Schema.Trimmed;
|
|
15
|
+
readonly knownRadius: RichSlot<E>;
|
|
16
|
+
readonly otherName: Schema.Trimmed;
|
|
17
|
+
readonly otherPeriod: RichSlot<E>;
|
|
18
|
+
readonly otherRadius: RichSlot<E>;
|
|
19
|
+
readonly viewLabel: Schema.Trimmed;
|
|
20
|
+
}>;
|
|
21
|
+
readonly otherHeight: Schema.Finite;
|
|
22
|
+
}>, "figure">;
|
|
23
|
+
PlanetCompareLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
24
|
+
readonly description: RichSlot<E>;
|
|
25
|
+
readonly title: RichSlot<E>;
|
|
26
|
+
readonly labels: Schema.Struct<{
|
|
27
|
+
readonly earthName: Schema.Trimmed;
|
|
28
|
+
readonly escape: RichSlot<E>;
|
|
29
|
+
readonly gravity: RichSlot<E>;
|
|
30
|
+
readonly orbit: RichSlot<E>;
|
|
31
|
+
readonly period: RichSlot<E>;
|
|
32
|
+
readonly planetName: Schema.Trimmed;
|
|
33
|
+
readonly viewLabel: Schema.Trimmed;
|
|
34
|
+
}>;
|
|
35
|
+
readonly mass: Schema.Finite;
|
|
36
|
+
readonly radius: Schema.Finite;
|
|
37
|
+
}>, "figure">;
|
|
38
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** Props of `OrbitRadiusLab`: two satellites in circular orbits round the Earth, drawn to scale. */
|
|
5
|
+
function orbitRadiusLab(rich) {
|
|
6
|
+
return figure(Schema.Struct({
|
|
7
|
+
...cardFields(rich),
|
|
8
|
+
knownHeight: Schema.Finite,
|
|
9
|
+
knownPeriod: Schema.Finite,
|
|
10
|
+
labels: Schema.Struct({
|
|
11
|
+
knownName: TextSchema,
|
|
12
|
+
knownRadius: rich,
|
|
13
|
+
otherName: TextSchema,
|
|
14
|
+
otherPeriod: rich,
|
|
15
|
+
otherRadius: rich,
|
|
16
|
+
viewLabel: TextSchema,
|
|
17
|
+
}),
|
|
18
|
+
otherHeight: Schema.Finite,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
/** Props of `PlanetCompareLab`: the Earth and another planet side by side at the same scale, each with a satellite skimming its surface. */
|
|
22
|
+
function planetCompareLab(rich) {
|
|
23
|
+
return figure(Schema.Struct({
|
|
24
|
+
...cardFields(rich),
|
|
25
|
+
labels: Schema.Struct({
|
|
26
|
+
earthName: TextSchema,
|
|
27
|
+
escape: rich,
|
|
28
|
+
gravity: rich,
|
|
29
|
+
orbit: rich,
|
|
30
|
+
period: rich,
|
|
31
|
+
planetName: TextSchema,
|
|
32
|
+
viewLabel: TextSchema,
|
|
33
|
+
}),
|
|
34
|
+
mass: Schema.Finite,
|
|
35
|
+
radius: Schema.Finite,
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The props of the gravitation labs. Each prop is a value from the item the lab
|
|
40
|
+
* draws, never the conclusion it leads to, so none holds answer state.
|
|
41
|
+
*/
|
|
42
|
+
export function gravityVisuals(rich) {
|
|
43
|
+
return {
|
|
44
|
+
OrbitRadiusLab: orbitRadiusLab(rich),
|
|
45
|
+
PlanetCompareLab: planetCompareLab(rich),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the heat labs. Each prop is a value from the item the lab
|
|
5
|
+
* draws, never the conclusion it leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function heatVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
HeatingCurveLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly finalTemperature: Schema.Finite;
|
|
12
|
+
readonly labels: Schema.Struct<{
|
|
13
|
+
readonly latent: RichSlot<E>;
|
|
14
|
+
readonly power: RichSlot<E>;
|
|
15
|
+
readonly viewLabel: Schema.Trimmed;
|
|
16
|
+
}>;
|
|
17
|
+
readonly liquidHeat: Schema.Finite;
|
|
18
|
+
readonly mass: Schema.Finite;
|
|
19
|
+
readonly meltingPoint: Schema.Finite;
|
|
20
|
+
readonly meltMinutes: Schema.Finite;
|
|
21
|
+
readonly warmMinutes: Schema.Finite;
|
|
22
|
+
}>, "figure">;
|
|
23
|
+
GasPistonLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
24
|
+
readonly description: RichSlot<E>;
|
|
25
|
+
readonly title: RichSlot<E>;
|
|
26
|
+
readonly finalTemperature: Schema.Finite;
|
|
27
|
+
readonly labels: Schema.Struct<{
|
|
28
|
+
readonly pressure: RichSlot<E>;
|
|
29
|
+
readonly stage: Schema.Trimmed;
|
|
30
|
+
readonly stages: Schema.$Record<Schema.Literals<readonly ["start", "compressed", "heated"]>, RichSlot<E>>;
|
|
31
|
+
readonly temperature: RichSlot<E>;
|
|
32
|
+
readonly viewLabel: Schema.Trimmed;
|
|
33
|
+
readonly volume: RichSlot<E>;
|
|
34
|
+
}>;
|
|
35
|
+
readonly pressure: Schema.Finite;
|
|
36
|
+
readonly temperature: Schema.Finite;
|
|
37
|
+
readonly volumeRatio: Schema.Finite;
|
|
38
|
+
}>, "figure">;
|
|
39
|
+
IceMeltingLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
40
|
+
readonly description: RichSlot<E>;
|
|
41
|
+
readonly title: RichSlot<E>;
|
|
42
|
+
readonly iceMass: Schema.Finite;
|
|
43
|
+
readonly labels: Schema.Struct<{
|
|
44
|
+
readonly final: RichSlot<E>;
|
|
45
|
+
readonly given: RichSlot<E>;
|
|
46
|
+
readonly melt: RichSlot<E>;
|
|
47
|
+
readonly viewLabel: Schema.Trimmed;
|
|
48
|
+
}>;
|
|
49
|
+
readonly latentHeat: Schema.Finite;
|
|
50
|
+
readonly specificHeat: Schema.Finite;
|
|
51
|
+
readonly waterMass: Schema.Finite;
|
|
52
|
+
readonly waterTemperature: Schema.Finite;
|
|
53
|
+
}>, "figure">;
|
|
54
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** Props of `HeatingCurveLab`: an immersion heater of constant power melts a solid in a beaker and then warms the liquid. */
|
|
5
|
+
function heatingCurveLab(rich) {
|
|
6
|
+
return figure(Schema.Struct({
|
|
7
|
+
...cardFields(rich),
|
|
8
|
+
finalTemperature: Schema.Finite,
|
|
9
|
+
labels: Schema.Struct({
|
|
10
|
+
latent: rich,
|
|
11
|
+
power: rich,
|
|
12
|
+
viewLabel: TextSchema,
|
|
13
|
+
}),
|
|
14
|
+
liquidHeat: Schema.Finite,
|
|
15
|
+
mass: Schema.Finite,
|
|
16
|
+
meltingPoint: Schema.Finite,
|
|
17
|
+
meltMinutes: Schema.Finite,
|
|
18
|
+
warmMinutes: Schema.Finite,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
/** Props of `GasPistonLab`: a fixed mass of gas in a cylinder, taken through its change one step at a time: first squeezed to its new volume at the starting temperature, then heated at that volume. */
|
|
22
|
+
function gasPistonLab(rich) {
|
|
23
|
+
return figure(Schema.Struct({
|
|
24
|
+
...cardFields(rich),
|
|
25
|
+
finalTemperature: Schema.Finite,
|
|
26
|
+
labels: Schema.Struct({
|
|
27
|
+
pressure: rich,
|
|
28
|
+
stage: TextSchema,
|
|
29
|
+
stages: byIds(["start", "compressed", "heated"], rich),
|
|
30
|
+
temperature: rich,
|
|
31
|
+
viewLabel: TextSchema,
|
|
32
|
+
volume: rich,
|
|
33
|
+
}),
|
|
34
|
+
pressure: Schema.Finite,
|
|
35
|
+
temperature: Schema.Finite,
|
|
36
|
+
volumeRatio: Schema.Finite,
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
/** Props of `IceMeltingLab`: an ice cube at 0 °C dropped into warm water in an insulated cup. */
|
|
40
|
+
function iceMeltingLab(rich) {
|
|
41
|
+
return figure(Schema.Struct({
|
|
42
|
+
...cardFields(rich),
|
|
43
|
+
iceMass: Schema.Finite,
|
|
44
|
+
labels: Schema.Struct({
|
|
45
|
+
final: rich,
|
|
46
|
+
given: rich,
|
|
47
|
+
melt: rich,
|
|
48
|
+
viewLabel: TextSchema,
|
|
49
|
+
}),
|
|
50
|
+
latentHeat: Schema.Finite,
|
|
51
|
+
specificHeat: Schema.Finite,
|
|
52
|
+
waterMass: Schema.Finite,
|
|
53
|
+
waterTemperature: Schema.Finite,
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The props of the heat labs. Each prop is a value from the item the lab
|
|
58
|
+
* draws, never the conclusion it leads to, so none holds answer state.
|
|
59
|
+
*/
|
|
60
|
+
export function heatVisuals(rich) {
|
|
61
|
+
return {
|
|
62
|
+
HeatingCurveLab: heatingCurveLab(rich),
|
|
63
|
+
GasPistonLab: gasPistonLab(rich),
|
|
64
|
+
IceMeltingLab: iceMeltingLab(rich),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the light labs. Each prop is a value from the item the lab
|
|
5
|
+
* draws, never the conclusion it leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function lightVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
GlassBlockLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly incidence: Schema.Finite;
|
|
12
|
+
readonly index: Schema.Finite;
|
|
13
|
+
readonly labels: Schema.Struct<{
|
|
14
|
+
readonly critical: RichSlot<E>;
|
|
15
|
+
readonly incidence: RichSlot<E>;
|
|
16
|
+
readonly incidenceName: Schema.Trimmed;
|
|
17
|
+
readonly next: RichSlot<E>;
|
|
18
|
+
readonly outcome: RichSlot<E>;
|
|
19
|
+
readonly reflected: RichSlot<E>;
|
|
20
|
+
readonly refracted: RichSlot<E>;
|
|
21
|
+
readonly refraction: RichSlot<E>;
|
|
22
|
+
readonly viewLabel: Schema.Trimmed;
|
|
23
|
+
}>;
|
|
24
|
+
}>, "figure">;
|
|
25
|
+
ApparentDepthLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
26
|
+
readonly description: RichSlot<E>;
|
|
27
|
+
readonly title: RichSlot<E>;
|
|
28
|
+
readonly labels: Schema.Struct<{
|
|
29
|
+
readonly apparent: RichSlot<E>;
|
|
30
|
+
readonly image: RichSlot<E>;
|
|
31
|
+
readonly liquids: Schema.$Record<Schema.Literals<readonly ["water", "oil", "glycerine", "alcohol"]>, RichSlot<E>>;
|
|
32
|
+
readonly real: RichSlot<E>;
|
|
33
|
+
readonly top: Schema.Trimmed;
|
|
34
|
+
readonly viewLabel: Schema.Trimmed;
|
|
35
|
+
}>;
|
|
36
|
+
readonly layers: Schema.NonEmptyArray<Schema.Struct<{
|
|
37
|
+
readonly index: Schema.Finite;
|
|
38
|
+
readonly liquid: Schema.Literals<readonly ["water", "oil", "glycerine", "alcohol"]>;
|
|
39
|
+
readonly thickness: Schema.Finite;
|
|
40
|
+
}>>;
|
|
41
|
+
}>, "figure">;
|
|
42
|
+
ConvexLensLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
43
|
+
readonly description: RichSlot<E>;
|
|
44
|
+
readonly title: RichSlot<E>;
|
|
45
|
+
readonly focal: Schema.Finite;
|
|
46
|
+
readonly labels: Schema.Struct<{
|
|
47
|
+
readonly distance: RichSlot<E>;
|
|
48
|
+
readonly distanceName: Schema.Trimmed;
|
|
49
|
+
readonly image: RichSlot<E>;
|
|
50
|
+
readonly magnification: RichSlot<E>;
|
|
51
|
+
readonly nature: RichSlot<E>;
|
|
52
|
+
readonly noImage: RichSlot<E>;
|
|
53
|
+
readonly presets: Schema.Trimmed;
|
|
54
|
+
readonly real: RichSlot<E>;
|
|
55
|
+
readonly viewLabel: Schema.Trimmed;
|
|
56
|
+
readonly virtual: RichSlot<E>;
|
|
57
|
+
}>;
|
|
58
|
+
readonly object: Schema.Finite;
|
|
59
|
+
readonly presets: Schema.optionalKey<Schema.$Array<Schema.Finite>>;
|
|
60
|
+
}>, "figure">;
|
|
61
|
+
TelescopeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
62
|
+
readonly description: RichSlot<E>;
|
|
63
|
+
readonly title: RichSlot<E>;
|
|
64
|
+
readonly eyepiecePower: Schema.Finite;
|
|
65
|
+
readonly labels: Schema.Struct<{
|
|
66
|
+
readonly eyepiece: RichSlot<E>;
|
|
67
|
+
readonly eyepieceName: Schema.Trimmed;
|
|
68
|
+
readonly length: RichSlot<E>;
|
|
69
|
+
readonly magnification: RichSlot<E>;
|
|
70
|
+
readonly objective: RichSlot<E>;
|
|
71
|
+
readonly viewLabel: Schema.Trimmed;
|
|
72
|
+
}>;
|
|
73
|
+
readonly objectivePower: Schema.Finite;
|
|
74
|
+
}>, "figure">;
|
|
75
|
+
};
|