@nakafa/aksara-contracts 8.4.1 → 8.9.1
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/answer.d.ts +2 -0
- package/dist/assessment/answer.js +5 -3
- package/dist/assessment/closure.js +2 -1
- package/dist/assessment/fit.d.ts +16 -2
- package/dist/assessment/fit.js +23 -5
- package/dist/assessment/graphic.d.ts +27 -0
- package/dist/assessment/graphic.js +17 -1
- package/dist/assessment/hash.d.ts +71 -3
- package/dist/assessment/interaction.d.ts +18 -1
- package/dist/assessment/interaction.js +2 -1
- package/dist/assessment/item.d.ts +85 -0
- package/dist/assessment/item.js +1 -1
- package/dist/assessment/joint.d.ts +4 -3
- package/dist/assessment/joint.js +4 -3
- package/dist/assessment/key.d.ts +138 -0
- package/dist/assessment/key.js +6 -0
- package/dist/assessment/paper.d.ts +316 -0
- package/dist/assessment/profile.d.ts +3 -3
- package/dist/assessment/profile.js +4 -4
- package/dist/assessment/rows.d.ts +285 -3
- package/dist/assessment/scoring.d.ts +12 -6
- package/dist/assessment/scoring.js +25 -8
- package/dist/assessment/sketch.d.ts +125 -0
- package/dist/assessment/sketch.js +175 -0
- package/dist/assessment/snapshot.d.ts +746 -10
- package/dist/assessment/structure.js +4 -4
- package/dist/hash/sha256.d.ts +16 -0
- package/dist/hash/sha256.js +164 -0
- package/dist/hash/stream.d.ts +7 -5
- package/dist/hash/stream.js +13 -18
- package/dist/math/boundary.js +3 -22
- package/dist/math/edge.d.ts +11 -0
- package/dist/math/edge.js +74 -0
- package/dist/math/graph.d.ts +9 -0
- package/dist/math/graph.js +66 -0
- package/dist/math/plane.js +6 -0
- package/dist/math/shape.d.ts +392 -0
- package/dist/math/shape.js +59 -0
- package/dist/math/straight.d.ts +13 -0
- package/dist/math/straight.js +26 -0
- package/dist/release/snapshot/data.d.ts +88 -2
- package/dist/release/snapshot/verify.d.ts +285 -3
- package/dist/transport/group.d.ts +264 -6
- package/dist/transport/request.d.ts +1886 -22
- package/dist/transport/snapshot.d.ts +176 -4
- package/dist/visual/biology/blood.d.ts +91 -0
- package/dist/visual/biology/blood.js +55 -0
- package/dist/visual/biology/heart.d.ts +92 -0
- package/dist/visual/biology/heart.js +54 -0
- package/dist/visual/biology/mitochondrion.d.ts +91 -0
- package/dist/visual/biology/mitochondrion.js +45 -0
- package/dist/visual/biology/muscle.d.ts +103 -0
- package/dist/visual/biology/muscle.js +62 -0
- package/dist/visual/biology/neuron.d.ts +97 -0
- package/dist/visual/biology/neuron.js +48 -0
- package/dist/visual/biology/paddy.d.ts +100 -0
- package/dist/visual/biology/paddy.js +54 -0
- package/dist/visual/biology/synapse.d.ts +101 -0
- package/dist/visual/biology/synapse.js +46 -0
- package/dist/visual/biology/vessel.d.ts +104 -0
- package/dist/visual/biology/vessel.js +60 -0
- package/dist/visual/biology/yeast.d.ts +108 -0
- package/dist/visual/biology/yeast.js +61 -0
- package/dist/visual/catalog.d.ts +2177 -778
- package/dist/visual/catalog.js +28 -0
- package/dist/visual/mathematics/journey.d.ts +118 -0
- package/dist/visual/mathematics/journey.js +125 -0
- package/dist/visual/mathematics/logic.d.ts +90 -0
- package/dist/visual/mathematics/logic.js +49 -0
- package/dist/visual/mathematics/network.d.ts +101 -0
- package/dist/visual/mathematics/network.js +97 -0
- package/dist/visual/mathematics/numeral.d.ts +81 -0
- package/dist/visual/mathematics/numeral.js +48 -0
- package/dist/visual/mathematics/sets.d.ts +92 -0
- package/dist/visual/mathematics/sets.js +95 -0
- package/dist/visual/physics/thermodynamics.d.ts +117 -0
- package/dist/visual/physics/thermodynamics.js +95 -0
- package/package.json +2 -2
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The blood vessel labs. Each prop sets up the vessels or names its words;
|
|
5
|
+
* none states the conclusion the lab leads to.
|
|
6
|
+
*/
|
|
7
|
+
export declare function vesselVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
CapillaryBedLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
11
|
+
readonly attrs: {
|
|
12
|
+
readonly latex: string;
|
|
13
|
+
};
|
|
14
|
+
readonly type: "mathInline";
|
|
15
|
+
} | {
|
|
16
|
+
readonly marks?: readonly [{
|
|
17
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
18
|
+
} | {
|
|
19
|
+
readonly attrs: {
|
|
20
|
+
readonly href: string;
|
|
21
|
+
};
|
|
22
|
+
readonly type: "link";
|
|
23
|
+
} | {
|
|
24
|
+
readonly attrs: {
|
|
25
|
+
readonly variant: "success" | "warning" | null;
|
|
26
|
+
};
|
|
27
|
+
readonly type: "highlight";
|
|
28
|
+
}, ...({
|
|
29
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
30
|
+
} | {
|
|
31
|
+
readonly attrs: {
|
|
32
|
+
readonly href: string;
|
|
33
|
+
};
|
|
34
|
+
readonly type: "link";
|
|
35
|
+
} | {
|
|
36
|
+
readonly attrs: {
|
|
37
|
+
readonly variant: "success" | "warning" | null;
|
|
38
|
+
};
|
|
39
|
+
readonly type: "highlight";
|
|
40
|
+
})[]];
|
|
41
|
+
readonly text: string;
|
|
42
|
+
readonly type: "text";
|
|
43
|
+
}, ...({
|
|
44
|
+
readonly attrs: {
|
|
45
|
+
readonly latex: string;
|
|
46
|
+
};
|
|
47
|
+
readonly type: "mathInline";
|
|
48
|
+
} | {
|
|
49
|
+
readonly marks?: readonly [{
|
|
50
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
51
|
+
} | {
|
|
52
|
+
readonly attrs: {
|
|
53
|
+
readonly href: string;
|
|
54
|
+
};
|
|
55
|
+
readonly type: "link";
|
|
56
|
+
} | {
|
|
57
|
+
readonly attrs: {
|
|
58
|
+
readonly variant: "success" | "warning" | null;
|
|
59
|
+
};
|
|
60
|
+
readonly type: "highlight";
|
|
61
|
+
}, ...({
|
|
62
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
63
|
+
} | {
|
|
64
|
+
readonly attrs: {
|
|
65
|
+
readonly href: string;
|
|
66
|
+
};
|
|
67
|
+
readonly type: "link";
|
|
68
|
+
} | {
|
|
69
|
+
readonly attrs: {
|
|
70
|
+
readonly variant: "success" | "warning" | null;
|
|
71
|
+
};
|
|
72
|
+
readonly type: "highlight";
|
|
73
|
+
})[]];
|
|
74
|
+
readonly text: string;
|
|
75
|
+
readonly type: "text";
|
|
76
|
+
})[]], E, never, never>>;
|
|
77
|
+
readonly title: RichSlot<E>;
|
|
78
|
+
readonly labels: Schema.Struct<{
|
|
79
|
+
readonly arterial: Schema.Trimmed;
|
|
80
|
+
readonly inward: RichSlot<E>;
|
|
81
|
+
readonly lymph: RichSlot<E>;
|
|
82
|
+
readonly oncotic: Schema.Trimmed;
|
|
83
|
+
readonly outward: RichSlot<E>;
|
|
84
|
+
readonly parts: Schema.Struct<{
|
|
85
|
+
readonly arteriole: RichSlot<E>;
|
|
86
|
+
readonly capillary: RichSlot<E>;
|
|
87
|
+
readonly cell: RichSlot<E>;
|
|
88
|
+
readonly lymph: RichSlot<E>;
|
|
89
|
+
readonly venule: RichSlot<E>;
|
|
90
|
+
}>;
|
|
91
|
+
readonly turning: RichSlot<E>;
|
|
92
|
+
readonly view: Schema.Trimmed;
|
|
93
|
+
}>;
|
|
94
|
+
readonly oncotic: Schema.Finite;
|
|
95
|
+
readonly pressure: Schema.Struct<{
|
|
96
|
+
readonly arterial: Schema.Finite;
|
|
97
|
+
readonly venous: Schema.Finite;
|
|
98
|
+
}>;
|
|
99
|
+
readonly tissue: Schema.Struct<{
|
|
100
|
+
readonly oncotic: Schema.Finite;
|
|
101
|
+
readonly pressure: Schema.Finite;
|
|
102
|
+
}>;
|
|
103
|
+
}>, "figure">;
|
|
104
|
+
};
|
|
@@ -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
|
+
/** A pressure in millimetres of mercury, never below zero. */
|
|
5
|
+
const PressureSchema = Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0));
|
|
6
|
+
/**
|
|
7
|
+
* The blood pressure at the two ends of a capillary, in millimetres of
|
|
8
|
+
* mercury. Blood flows from the arterial end to the venous end, so the
|
|
9
|
+
* pressure falls along it and the arterial end is always the higher.
|
|
10
|
+
*/
|
|
11
|
+
const EndsSchema = Schema.Struct({
|
|
12
|
+
arterial: PressureSchema,
|
|
13
|
+
venous: PressureSchema,
|
|
14
|
+
}).check(Schema.makeFilter(({ arterial, venous }) => arterial > venous, {
|
|
15
|
+
message: "Expected a higher blood pressure at the arterial end than at the venous end.",
|
|
16
|
+
}));
|
|
17
|
+
/**
|
|
18
|
+
* Props of `CapillaryBedLab`: an arteriole, the capillaries it feeds, the
|
|
19
|
+
* venule they drain into, and a lymph capillary among the tissue cells. Blood
|
|
20
|
+
* enters the capillaries at `pressure.arterial` and leaves at
|
|
21
|
+
* `pressure.venous` millimetres of mercury, against the osmotic pull of the
|
|
22
|
+
* plasma proteins, `oncotic`. The tissue fluid around the cells pushes back
|
|
23
|
+
* with `tissue.pressure` and pulls with `tissue.oncotic`. The tissue fluid's
|
|
24
|
+
* pressure may be below zero, as it is in loose tissue under the skin, where
|
|
25
|
+
* the lymph vessels draw it down to about -3 millimetres of mercury.
|
|
26
|
+
*/
|
|
27
|
+
function capillaryBedLab(rich) {
|
|
28
|
+
return figure(Schema.Struct({
|
|
29
|
+
...cardFields(rich),
|
|
30
|
+
labels: Schema.Struct({
|
|
31
|
+
arterial: TextSchema,
|
|
32
|
+
inward: rich,
|
|
33
|
+
lymph: rich,
|
|
34
|
+
oncotic: TextSchema,
|
|
35
|
+
outward: rich,
|
|
36
|
+
parts: Schema.Struct({
|
|
37
|
+
arteriole: rich,
|
|
38
|
+
capillary: rich,
|
|
39
|
+
cell: rich,
|
|
40
|
+
lymph: rich,
|
|
41
|
+
venule: rich,
|
|
42
|
+
}),
|
|
43
|
+
turning: rich,
|
|
44
|
+
view: TextSchema,
|
|
45
|
+
}),
|
|
46
|
+
oncotic: PressureSchema,
|
|
47
|
+
pressure: EndsSchema,
|
|
48
|
+
tissue: Schema.Struct({
|
|
49
|
+
oncotic: PressureSchema,
|
|
50
|
+
pressure: Schema.Finite,
|
|
51
|
+
}),
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The blood vessel labs. Each prop sets up the vessels or names its words;
|
|
56
|
+
* none states the conclusion the lab leads to.
|
|
57
|
+
*/
|
|
58
|
+
export function vesselVisuals(rich) {
|
|
59
|
+
return { CapillaryBedLab: capillaryBedLab(rich) };
|
|
60
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The visuals of this lab. Each prop sets up the experiment or names its
|
|
5
|
+
* words; none states what the learner should conclude, so none holds answer
|
|
6
|
+
* state.
|
|
7
|
+
*/
|
|
8
|
+
export declare function yeastVisuals<E>(rich: RichSlot<E>): {
|
|
9
|
+
YeastFermentationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
10
|
+
readonly description: RichSlot<E>;
|
|
11
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
12
|
+
readonly attrs: {
|
|
13
|
+
readonly latex: string;
|
|
14
|
+
};
|
|
15
|
+
readonly type: "mathInline";
|
|
16
|
+
} | {
|
|
17
|
+
readonly marks?: readonly [{
|
|
18
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
19
|
+
} | {
|
|
20
|
+
readonly attrs: {
|
|
21
|
+
readonly href: string;
|
|
22
|
+
};
|
|
23
|
+
readonly type: "link";
|
|
24
|
+
} | {
|
|
25
|
+
readonly attrs: {
|
|
26
|
+
readonly variant: "success" | "warning" | null;
|
|
27
|
+
};
|
|
28
|
+
readonly type: "highlight";
|
|
29
|
+
}, ...({
|
|
30
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
31
|
+
} | {
|
|
32
|
+
readonly attrs: {
|
|
33
|
+
readonly href: string;
|
|
34
|
+
};
|
|
35
|
+
readonly type: "link";
|
|
36
|
+
} | {
|
|
37
|
+
readonly attrs: {
|
|
38
|
+
readonly variant: "success" | "warning" | null;
|
|
39
|
+
};
|
|
40
|
+
readonly type: "highlight";
|
|
41
|
+
})[]];
|
|
42
|
+
readonly text: string;
|
|
43
|
+
readonly type: "text";
|
|
44
|
+
}, ...({
|
|
45
|
+
readonly attrs: {
|
|
46
|
+
readonly latex: string;
|
|
47
|
+
};
|
|
48
|
+
readonly type: "mathInline";
|
|
49
|
+
} | {
|
|
50
|
+
readonly marks?: readonly [{
|
|
51
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
52
|
+
} | {
|
|
53
|
+
readonly attrs: {
|
|
54
|
+
readonly href: string;
|
|
55
|
+
};
|
|
56
|
+
readonly type: "link";
|
|
57
|
+
} | {
|
|
58
|
+
readonly attrs: {
|
|
59
|
+
readonly variant: "success" | "warning" | null;
|
|
60
|
+
};
|
|
61
|
+
readonly type: "highlight";
|
|
62
|
+
}, ...({
|
|
63
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
64
|
+
} | {
|
|
65
|
+
readonly attrs: {
|
|
66
|
+
readonly href: string;
|
|
67
|
+
};
|
|
68
|
+
readonly type: "link";
|
|
69
|
+
} | {
|
|
70
|
+
readonly attrs: {
|
|
71
|
+
readonly variant: "success" | "warning" | null;
|
|
72
|
+
};
|
|
73
|
+
readonly type: "highlight";
|
|
74
|
+
})[]];
|
|
75
|
+
readonly text: string;
|
|
76
|
+
readonly type: "text";
|
|
77
|
+
})[]], E, never, never>>;
|
|
78
|
+
readonly title: RichSlot<E>;
|
|
79
|
+
readonly glucose: Schema.Finite;
|
|
80
|
+
readonly labels: Schema.Struct<{
|
|
81
|
+
readonly clear: RichSlot<E>;
|
|
82
|
+
readonly collected: RichSlot<E>;
|
|
83
|
+
readonly control: Schema.Trimmed;
|
|
84
|
+
readonly ethanol: RichSlot<E>;
|
|
85
|
+
readonly limewater: RichSlot<E>;
|
|
86
|
+
readonly milky: RichSlot<E>;
|
|
87
|
+
readonly none: RichSlot<E>;
|
|
88
|
+
readonly parts: Schema.Struct<{
|
|
89
|
+
readonly bath: Schema.Trimmed;
|
|
90
|
+
readonly limewater: Schema.Trimmed;
|
|
91
|
+
readonly paraffin: Schema.Trimmed;
|
|
92
|
+
readonly thermometer: Schema.Trimmed;
|
|
93
|
+
}>;
|
|
94
|
+
readonly rate: RichSlot<E>;
|
|
95
|
+
readonly smell: RichSlot<E>;
|
|
96
|
+
readonly temperature: Schema.Trimmed;
|
|
97
|
+
readonly time: Schema.Trimmed;
|
|
98
|
+
readonly view: Schema.Trimmed;
|
|
99
|
+
readonly warmth: RichSlot<E>;
|
|
100
|
+
readonly yeast: Schema.Trimmed;
|
|
101
|
+
}>;
|
|
102
|
+
readonly temperature: Schema.Struct<{
|
|
103
|
+
readonly max: Schema.Finite;
|
|
104
|
+
readonly min: Schema.Finite;
|
|
105
|
+
readonly value: Schema.Finite;
|
|
106
|
+
}>;
|
|
107
|
+
}>, "figure">;
|
|
108
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/**
|
|
5
|
+
* The water bath's temperatures in °C: the slider's range and where it
|
|
6
|
+
* starts. Water stays liquid from 0 to 100 °C, and the start lies in range.
|
|
7
|
+
*/
|
|
8
|
+
const BathSchema = Schema.Struct({
|
|
9
|
+
max: Schema.Finite.check(Schema.isLessThanOrEqualTo(100)),
|
|
10
|
+
min: Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0)),
|
|
11
|
+
value: Schema.Finite,
|
|
12
|
+
}).check(Schema.makeFilter(({ max, min, value }) => min < max && value >= min && value <= max, {
|
|
13
|
+
message: "Expected a bath range whose minimum is below its maximum and holds its starting value.",
|
|
14
|
+
}));
|
|
15
|
+
/**
|
|
16
|
+
* Props of `YeastFermentationLab`: the KSSM experiment on fermentation in
|
|
17
|
+
* yeast and its control, in one water bath. `glucose` is the strength of the
|
|
18
|
+
* boiled and cooled glucose solution, in per cent (w/v); `temperature` is the
|
|
19
|
+
* bath's range and starting value, in °C. The labels name the slider and the
|
|
20
|
+
* run's clock, the readings (bubbles a minute, carbon dioxide into the
|
|
21
|
+
* limewater, the limewater's state, the temperature in each tube, and the
|
|
22
|
+
* smell of the yeast tube), the two tubes, and the parts written in the
|
|
23
|
+
* scene.
|
|
24
|
+
*/
|
|
25
|
+
function yeastFermentationLab(rich) {
|
|
26
|
+
return figure(Schema.Struct({
|
|
27
|
+
...cardFields(rich),
|
|
28
|
+
glucose: Schema.Finite.check(Schema.isGreaterThan(0), Schema.isLessThanOrEqualTo(100)),
|
|
29
|
+
labels: Schema.Struct({
|
|
30
|
+
clear: rich,
|
|
31
|
+
collected: rich,
|
|
32
|
+
control: TextSchema,
|
|
33
|
+
ethanol: rich,
|
|
34
|
+
limewater: rich,
|
|
35
|
+
milky: rich,
|
|
36
|
+
none: rich,
|
|
37
|
+
parts: Schema.Struct({
|
|
38
|
+
bath: TextSchema,
|
|
39
|
+
limewater: TextSchema,
|
|
40
|
+
paraffin: TextSchema,
|
|
41
|
+
thermometer: TextSchema,
|
|
42
|
+
}),
|
|
43
|
+
rate: rich,
|
|
44
|
+
smell: rich,
|
|
45
|
+
temperature: TextSchema,
|
|
46
|
+
time: TextSchema,
|
|
47
|
+
view: TextSchema,
|
|
48
|
+
warmth: rich,
|
|
49
|
+
yeast: TextSchema,
|
|
50
|
+
}),
|
|
51
|
+
temperature: BathSchema,
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The visuals of this lab. Each prop sets up the experiment or names its
|
|
56
|
+
* words; none states what the learner should conclude, so none holds answer
|
|
57
|
+
* state.
|
|
58
|
+
*/
|
|
59
|
+
export function yeastVisuals(rich) {
|
|
60
|
+
return { YeastFermentationLab: yeastFermentationLab(rich) };
|
|
61
|
+
}
|