@nakafa/aksara-contracts 8.4.0 → 8.8.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/document.d.ts +1 -1
- package/dist/assessment/document.js +1 -1
- package/dist/assessment/figure.d.ts +1 -1
- package/dist/assessment/figure.js +1 -1
- package/dist/assessment/fit.d.ts +3 -3
- package/dist/assessment/fit.js +3 -3
- package/dist/assessment/locales.d.ts +1 -1
- package/dist/assessment/scoring.d.ts +1 -1
- package/dist/assessment/scoring.js +1 -1
- package/dist/cache/content.d.ts +1 -1
- package/dist/cache/content.js +1 -1
- package/dist/content.d.ts +3 -2
- package/dist/graph/identity.d.ts +1 -1
- package/dist/graph/identity.js +1 -1
- 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/bounds.d.ts +1 -1
- package/dist/math/collision.d.ts +1 -1
- package/dist/math/coordinate.d.ts +6 -5
- package/dist/math/coordinate.js +2 -2
- package/dist/math/edge.d.ts +11 -0
- package/dist/math/edge.js +74 -0
- package/dist/math/formula/compile.d.ts +1 -1
- package/dist/math/formula/compile.js +1 -1
- package/dist/math/formula/contour.d.ts +1 -1
- package/dist/math/formula/contour.js +1 -1
- package/dist/math/formula/field.js +1 -1
- package/dist/math/formula/mesh.d.ts +1 -1
- package/dist/math/formula/mesh.js +1 -1
- package/dist/math/formula/names.d.ts +1 -1
- package/dist/math/formula/names.js +1 -1
- package/dist/math/formula/parse.d.ts +1 -1
- package/dist/math/formula/parse.js +1 -1
- package/dist/math/formula/plane.d.ts +2 -2
- package/dist/math/formula/plane.js +3 -3
- package/dist/math/formula/reader.d.ts +2 -1
- package/dist/math/formula/reader.js +1 -1
- package/dist/math/formula/region.d.ts +2 -2
- package/dist/math/formula/region.js +3 -3
- package/dist/math/formula/sample.d.ts +1 -1
- package/dist/math/formula/scan.d.ts +1 -1
- package/dist/math/formula/scan.js +1 -1
- package/dist/math/formula/slider.d.ts +2 -2
- package/dist/math/formula/slider.js +1 -1
- package/dist/math/formula/space.d.ts +1 -1
- package/dist/math/formula/space.js +1 -1
- 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/precision.d.ts +1 -1
- package/dist/math/precision.js +1 -1
- package/dist/math/resolution.js +1 -1
- package/dist/math/scene.d.ts +2 -2
- 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/math/vector.d.ts +1 -1
- package/dist/preview/spec.js +1 -1
- package/dist/program/curriculum.d.ts +1 -1
- package/dist/program/curriculum.js +1 -1
- package/dist/program/snapshot/digest.d.ts +1 -1
- package/dist/program/snapshot/digest.js +2 -2
- package/dist/program/snapshot/hash.d.ts +2 -2
- package/dist/projection/digest.d.ts +1 -1
- package/dist/projection/digest.js +1 -1
- package/dist/projection/hash.js +1 -1
- package/dist/projection/material.d.ts +1 -1
- package/dist/projection/material.js +1 -1
- package/dist/projection/verify.js +1 -1
- package/dist/quran/identity.d.ts +2 -1
- package/dist/quran/provenance.d.ts +2 -2
- package/dist/quran/provenance.js +1 -1
- package/dist/quran/snapshot/hash.d.ts +1 -1
- package/dist/quran/snapshot/row/hash.d.ts +1 -1
- package/dist/quran/snapshot/row/hash.js +1 -1
- package/dist/quran/snapshot/spec.js +1 -1
- package/dist/quran/source.d.ts +2 -2
- package/dist/release/current/evidence.d.ts +1 -1
- package/dist/release/current/evidence.js +1 -1
- package/dist/release/current/state.d.ts +1 -1
- package/dist/release/current/state.js +1 -1
- package/dist/release/head.js +1 -1
- package/dist/release/items.d.ts +1 -1
- package/dist/release/items.js +1 -1
- package/dist/release/policy.d.ts +1 -1
- package/dist/release/policy.js +1 -1
- package/dist/release/result/digest.d.ts +3 -3
- package/dist/release/result/digest.js +2 -2
- package/dist/release/rollback/digest.d.ts +1 -1
- package/dist/release/rollback/digest.js +1 -1
- package/dist/release/route/digest.d.ts +1 -1
- package/dist/release/route/digest.js +1 -1
- package/dist/release/snapshot/evidence/assessment.d.ts +1 -1
- package/dist/release/snapshot/evidence/assessment.js +1 -1
- package/dist/release/snapshot/evidence/program.d.ts +1 -1
- package/dist/release/snapshot/evidence/program.js +1 -1
- package/dist/release/snapshot/evidence/quran.d.ts +1 -1
- package/dist/release/snapshot/evidence/quran.js +1 -1
- package/dist/release/snapshot/evidence/requirement.d.ts +3 -2
- package/dist/release/snapshot/evidence/requirement.js +1 -1
- package/dist/release/snapshot/spec.d.ts +2 -2
- package/dist/release/snapshot/spec.js +1 -1
- package/dist/release/snapshot/verify.d.ts +1 -1
- package/dist/release/snapshot/verify.js +1 -1
- package/dist/release/spec.d.ts +1 -1
- package/dist/release/verify.d.ts +1 -1
- package/dist/release/verify.js +1 -1
- package/dist/renderer/compatibility.d.ts +1 -1
- package/dist/renderer/compatibility.js +2 -2
- package/dist/renderer/contract.d.ts +1 -1
- package/dist/renderer/contract.js +1 -1
- package/dist/runtime/spec.js +2 -2
- package/dist/signature/spec.d.ts +3 -2
- package/dist/signature/verify.d.ts +2 -1
- package/dist/transport/request.d.ts +1 -1
- package/dist/visual/base/math.d.ts +1 -1
- package/dist/visual/base/media.d.ts +1 -1
- package/dist/visual/biology/bacteria.d.ts +1 -1
- package/dist/visual/biology/bacteria.js +1 -1
- package/dist/visual/biology/blood.d.ts +91 -0
- package/dist/visual/biology/blood.js +55 -0
- package/dist/visual/biology/cell.d.ts +1 -1
- package/dist/visual/biology/climate.d.ts +1 -1
- package/dist/visual/biology/climate.js +1 -1
- package/dist/visual/biology/ecology.d.ts +1 -1
- 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/physiology.d.ts +1 -1
- package/dist/visual/biology/physiology.js +1 -1
- package/dist/visual/biology/plant.d.ts +1 -1
- package/dist/visual/biology/plant.js +1 -1
- 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/biology.d.ts +1 -1
- package/dist/visual/catalog.d.ts +2177 -778
- package/dist/visual/catalog.js +28 -0
- package/dist/visual/chemistry/atom.d.ts +1 -1
- package/dist/visual/chemistry/atom.js +1 -1
- package/dist/visual/chemistry/balance.d.ts +1 -1
- package/dist/visual/chemistry/balance.js +1 -1
- package/dist/visual/chemistry/bonding.d.ts +1 -1
- package/dist/visual/chemistry/discovery.d.ts +1 -1
- package/dist/visual/chemistry/electrochemistry.d.ts +1 -1
- package/dist/visual/chemistry/electrochemistry.js +1 -1
- package/dist/visual/chemistry/electron.d.ts +1 -1
- package/dist/visual/chemistry/electron.js +1 -1
- package/dist/visual/chemistry/laws.d.ts +1 -1
- package/dist/visual/chemistry/laws.js +1 -1
- package/dist/visual/chemistry/particles.d.ts +1 -1
- package/dist/visual/chemistry/periodic.d.ts +1 -1
- package/dist/visual/chemistry/periodic.js +1 -1
- package/dist/visual/chemistry/rate.d.ts +1 -1
- package/dist/visual/chemistry/rate.js +1 -1
- package/dist/visual/chemistry/reaction.d.ts +1 -1
- package/dist/visual/chemistry/reaction.js +1 -1
- package/dist/visual/chemistry/titration.d.ts +1 -1
- package/dist/visual/chemistry/titration.js +1 -1
- package/dist/visual/mathematics/chance.d.ts +1 -1
- package/dist/visual/mathematics/chance.js +1 -1
- package/dist/visual/mathematics/chart.d.ts +1 -1
- package/dist/visual/mathematics/charts.d.ts +1 -1
- package/dist/visual/mathematics/function.d.ts +1 -1
- 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 +82 -1
- package/dist/visual/mathematics/numeral.js +49 -1
- package/dist/visual/mathematics/sets.d.ts +92 -0
- package/dist/visual/mathematics/sets.js +95 -0
- package/dist/visual/physics/braking.d.ts +1 -1
- package/dist/visual/physics/braking.js +1 -1
- package/dist/visual/physics/circuit.d.ts +1 -1
- package/dist/visual/physics/circular.d.ts +1 -1
- package/dist/visual/physics/circular.js +1 -1
- package/dist/visual/physics/dynamics.d.ts +1 -1
- package/dist/visual/physics/dynamics.js +1 -1
- package/dist/visual/physics/efficiency.d.ts +1 -1
- package/dist/visual/physics/efficiency.js +1 -1
- package/dist/visual/physics/electronics.d.ts +1 -1
- package/dist/visual/physics/falling.d.ts +1 -1
- package/dist/visual/physics/falling.js +1 -1
- package/dist/visual/physics/field.d.ts +1 -1
- package/dist/visual/physics/fluid.d.ts +1 -1
- package/dist/visual/physics/fluid.js +1 -1
- package/dist/visual/physics/force.d.ts +1 -1
- package/dist/visual/physics/gravity.d.ts +1 -1
- package/dist/visual/physics/heat.d.ts +1 -1
- package/dist/visual/physics/heat.js +1 -1
- package/dist/visual/physics/instrument.d.ts +1 -1
- package/dist/visual/physics/light.d.ts +1 -1
- package/dist/visual/physics/light.js +1 -1
- package/dist/visual/physics/measurement.d.ts +1 -1
- package/dist/visual/physics/measurement.js +1 -1
- package/dist/visual/physics/motion.d.ts +1 -1
- package/dist/visual/physics/nuclear.d.ts +1 -1
- package/dist/visual/physics/parabolic.d.ts +1 -1
- package/dist/visual/physics/position.d.ts +1 -1
- package/dist/visual/physics/position.js +1 -1
- package/dist/visual/physics/power.d.ts +1 -1
- package/dist/visual/physics/power.js +1 -1
- package/dist/visual/physics/precision.d.ts +1 -1
- package/dist/visual/physics/precision.js +1 -1
- package/dist/visual/physics/product.d.ts +1 -1
- package/dist/visual/physics/reading.d.ts +1 -1
- package/dist/visual/physics/reading.js +1 -1
- package/dist/visual/physics/record.d.ts +1 -1
- package/dist/visual/physics/record.js +1 -1
- package/dist/visual/physics/relative.d.ts +1 -1
- package/dist/visual/physics/relative.js +1 -1
- package/dist/visual/physics/solar.d.ts +1 -1
- package/dist/visual/physics/solar.js +1 -1
- package/dist/visual/physics/thermodynamics.d.ts +117 -0
- package/dist/visual/physics/thermodynamics.js +95 -0
- package/dist/visual/physics/vector.d.ts +1 -1
- package/dist/visual/physics/vector.js +1 -1
- package/dist/visual/physics/velocity.d.ts +1 -1
- package/dist/visual/physics/wave.d.ts +1 -1
- package/dist/visual/politics.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Array as Arr, Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
+
/** The circuits the board wires: switches in a row, side by side, or across the lamp. */
|
|
5
|
+
const LOGIC_MODES = ["and", "or", "not"];
|
|
6
|
+
/** One circuit, named by the compound statement its lamp shows. */
|
|
7
|
+
const LogicModeSchema = Schema.Literals(LOGIC_MODES);
|
|
8
|
+
/** The circuits a lab offers and the one it opens on, the first when unset. */
|
|
9
|
+
const ModeChoiceSchema = Schema.Struct({
|
|
10
|
+
modes: Schema.NonEmptyArray(LogicModeSchema),
|
|
11
|
+
startMode: Schema.optionalKey(LogicModeSchema),
|
|
12
|
+
});
|
|
13
|
+
/** Whether each circuit is offered once and the opening circuit is one of them. */
|
|
14
|
+
function isModeChoice({ modes, startMode }) {
|
|
15
|
+
return (Arr.dedupe(modes).length === modes.length &&
|
|
16
|
+
(startMode === undefined || Arr.contains(modes, startMode)));
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Props of `SwitchLogicLab`: a battery, a lamp and switches P and Q on a
|
|
20
|
+
* pegboard, wired in a row for `p ∧ q`, side by side for `p ∨ q`, or across
|
|
21
|
+
* the lamp for `~p`. The learner closes and opens the switches, a lit lamp
|
|
22
|
+
* means the compound statement is true, and each case fills its row of the
|
|
23
|
+
* truth table as it is tried. With `showTable`, every row's compound value
|
|
24
|
+
* shows from the start, so it is answer state.
|
|
25
|
+
*/
|
|
26
|
+
function switchLogicLab(rich) {
|
|
27
|
+
return figure(Schema.Struct({
|
|
28
|
+
...cardFields(rich),
|
|
29
|
+
labels: Schema.Struct({
|
|
30
|
+
compounds: byIds(LOGIC_MODES, rich),
|
|
31
|
+
false: TextSchema,
|
|
32
|
+
mode: TextSchema,
|
|
33
|
+
modes: byIds(LOGIC_MODES, TextSchema),
|
|
34
|
+
p: rich,
|
|
35
|
+
q: rich,
|
|
36
|
+
switches: TextSchema,
|
|
37
|
+
true: TextSchema,
|
|
38
|
+
viewLabel: TextSchema,
|
|
39
|
+
}),
|
|
40
|
+
...ModeChoiceSchema.fields,
|
|
41
|
+
showTable: Schema.optionalKey(Schema.Boolean),
|
|
42
|
+
}).check(Schema.makeFilter(isModeChoice, {
|
|
43
|
+
message: "Expected each circuit once, and an opening circuit that is one of them.",
|
|
44
|
+
})), answerAt(["showTable"]));
|
|
45
|
+
}
|
|
46
|
+
/** The logic labs, where the truth of a compound statement is read. */
|
|
47
|
+
export function logicVisuals(rich) {
|
|
48
|
+
return { SwitchLogicLab: switchLogicLab(rich) };
|
|
49
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/** The graph-theory labs, where a network of vertices and edges is read. */
|
|
4
|
+
export declare function networkVisuals<E>(rich: RichSlot<E>): {
|
|
5
|
+
RouteNetworkLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
6
|
+
readonly description: RichSlot<E>;
|
|
7
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
8
|
+
readonly attrs: {
|
|
9
|
+
readonly latex: string;
|
|
10
|
+
};
|
|
11
|
+
readonly type: "mathInline";
|
|
12
|
+
} | {
|
|
13
|
+
readonly marks?: readonly [{
|
|
14
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
15
|
+
} | {
|
|
16
|
+
readonly attrs: {
|
|
17
|
+
readonly href: string;
|
|
18
|
+
};
|
|
19
|
+
readonly type: "link";
|
|
20
|
+
} | {
|
|
21
|
+
readonly attrs: {
|
|
22
|
+
readonly variant: "success" | "warning" | null;
|
|
23
|
+
};
|
|
24
|
+
readonly type: "highlight";
|
|
25
|
+
}, ...({
|
|
26
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
27
|
+
} | {
|
|
28
|
+
readonly attrs: {
|
|
29
|
+
readonly href: string;
|
|
30
|
+
};
|
|
31
|
+
readonly type: "link";
|
|
32
|
+
} | {
|
|
33
|
+
readonly attrs: {
|
|
34
|
+
readonly variant: "success" | "warning" | null;
|
|
35
|
+
};
|
|
36
|
+
readonly type: "highlight";
|
|
37
|
+
})[]];
|
|
38
|
+
readonly text: string;
|
|
39
|
+
readonly type: "text";
|
|
40
|
+
}, ...({
|
|
41
|
+
readonly attrs: {
|
|
42
|
+
readonly latex: string;
|
|
43
|
+
};
|
|
44
|
+
readonly type: "mathInline";
|
|
45
|
+
} | {
|
|
46
|
+
readonly marks?: readonly [{
|
|
47
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
48
|
+
} | {
|
|
49
|
+
readonly attrs: {
|
|
50
|
+
readonly href: string;
|
|
51
|
+
};
|
|
52
|
+
readonly type: "link";
|
|
53
|
+
} | {
|
|
54
|
+
readonly attrs: {
|
|
55
|
+
readonly variant: "success" | "warning" | null;
|
|
56
|
+
};
|
|
57
|
+
readonly type: "highlight";
|
|
58
|
+
}, ...({
|
|
59
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
60
|
+
} | {
|
|
61
|
+
readonly attrs: {
|
|
62
|
+
readonly href: string;
|
|
63
|
+
};
|
|
64
|
+
readonly type: "link";
|
|
65
|
+
} | {
|
|
66
|
+
readonly attrs: {
|
|
67
|
+
readonly variant: "success" | "warning" | null;
|
|
68
|
+
};
|
|
69
|
+
readonly type: "highlight";
|
|
70
|
+
})[]];
|
|
71
|
+
readonly text: string;
|
|
72
|
+
readonly type: "text";
|
|
73
|
+
})[]], E, never, never>>;
|
|
74
|
+
readonly title: RichSlot<E>;
|
|
75
|
+
readonly end: Schema.String;
|
|
76
|
+
readonly roads: Schema.NonEmptyArray<Schema.Struct<{
|
|
77
|
+
readonly from: Schema.String;
|
|
78
|
+
readonly length: Schema.Finite;
|
|
79
|
+
readonly to: Schema.String;
|
|
80
|
+
}>>;
|
|
81
|
+
readonly start: Schema.String;
|
|
82
|
+
readonly towns: Schema.NonEmptyArray<Schema.Struct<{
|
|
83
|
+
readonly id: Schema.String;
|
|
84
|
+
readonly name: Schema.Trimmed;
|
|
85
|
+
}>>;
|
|
86
|
+
readonly labels: Schema.Struct<{
|
|
87
|
+
readonly degreeSum: RichSlot<E>;
|
|
88
|
+
readonly length: RichSlot<E>;
|
|
89
|
+
readonly mode: Schema.Trimmed;
|
|
90
|
+
readonly modes: Schema.$Record<Schema.Literals<readonly ["degrees", "route"]>, Schema.Trimmed>;
|
|
91
|
+
readonly route: Schema.Trimmed;
|
|
92
|
+
readonly shortest: RichSlot<E>;
|
|
93
|
+
readonly town: Schema.Trimmed;
|
|
94
|
+
readonly trip: RichSlot<E>;
|
|
95
|
+
readonly twiceRoads: RichSlot<E>;
|
|
96
|
+
readonly viewLabel: Schema.Trimmed;
|
|
97
|
+
}>;
|
|
98
|
+
readonly mode: Schema.optionalKey<Schema.Literals<readonly ["degrees", "route"]>>;
|
|
99
|
+
readonly showShortest: Schema.optionalKey<Schema.Boolean>;
|
|
100
|
+
}>, "figure">;
|
|
101
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Array as Arr, Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
+
/** What the learner looks at: the degree of each town, or routes between two towns. */
|
|
5
|
+
const NETWORK_MODES = ["degrees", "route"];
|
|
6
|
+
/** The fewest and the most towns the board shows legibly on a phone. */
|
|
7
|
+
const TOWN_RANGE = { maximum: 8, minimum: 2 };
|
|
8
|
+
/** The id a road and a route use to name a town. */
|
|
9
|
+
const TownIdSchema = Schema.String.check(Schema.isNonEmpty());
|
|
10
|
+
/** One town: a vertex of the network, with the name its sign shows. */
|
|
11
|
+
const TownSchema = Schema.Struct({ id: TownIdSchema, name: TextSchema });
|
|
12
|
+
/** One road: an edge of the network, weighted by its length in kilometres. */
|
|
13
|
+
const RoadSchema = Schema.Struct({
|
|
14
|
+
from: TownIdSchema,
|
|
15
|
+
length: Schema.Finite.check(Schema.isGreaterThan(0)),
|
|
16
|
+
to: TownIdSchema,
|
|
17
|
+
});
|
|
18
|
+
/** The towns, the roads between them, and the trip's two ends. */
|
|
19
|
+
const NetworkSchema = Schema.Struct({
|
|
20
|
+
end: TownIdSchema,
|
|
21
|
+
roads: Schema.NonEmptyArray(RoadSchema),
|
|
22
|
+
start: TownIdSchema,
|
|
23
|
+
towns: Schema.NonEmptyArray(TownSchema).check(Schema.isMinLength(TOWN_RANGE.minimum), Schema.isMaxLength(TOWN_RANGE.maximum)),
|
|
24
|
+
});
|
|
25
|
+
/** The unordered pair a road joins, so a road and its reverse read the same. */
|
|
26
|
+
function roadPair({ from, to }) {
|
|
27
|
+
return from < to ? `${from}|${to}` : `${to}|${from}`;
|
|
28
|
+
}
|
|
29
|
+
/** The towns a road leads to from the frontier that were not reached before. */
|
|
30
|
+
function newTowns({ from, to }, frontier, reached) {
|
|
31
|
+
if (Arr.contains(frontier, from) && !Arr.contains(reached, to)) {
|
|
32
|
+
return [to];
|
|
33
|
+
}
|
|
34
|
+
if (Arr.contains(frontier, to) && !Arr.contains(reached, from)) {
|
|
35
|
+
return [from];
|
|
36
|
+
}
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
/** The towns reachable along the roads, widening from the frontier one road at a time. */
|
|
40
|
+
function reachedTowns(roads, reached, frontier) {
|
|
41
|
+
const next = Arr.dedupe(Arr.flatMap(roads, (road) => newTowns(road, frontier, reached)));
|
|
42
|
+
return next.length === 0
|
|
43
|
+
? reached
|
|
44
|
+
: reachedTowns(roads, Arr.appendAll(reached, next), next);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Whether the network is one simple, connected graph: each town once, each
|
|
48
|
+
* road joining two different listed towns at most once in either direction,
|
|
49
|
+
* every town reachable, and the trip running between two different towns.
|
|
50
|
+
*/
|
|
51
|
+
function isSimpleNetwork(network) {
|
|
52
|
+
const ids = Arr.map(network.towns, ({ id }) => id);
|
|
53
|
+
/** Whether the network lists a town with this id. */
|
|
54
|
+
const listed = (id) => Arr.contains(ids, id);
|
|
55
|
+
const pairs = Arr.map(network.roads, roadPair);
|
|
56
|
+
return (Arr.dedupe(ids).length === ids.length &&
|
|
57
|
+
Arr.every(network.roads, ({ from, to }) => from !== to && listed(from) && listed(to)) &&
|
|
58
|
+
Arr.dedupe(pairs).length === pairs.length &&
|
|
59
|
+
reachedTowns(network.roads, [ids[0]], [ids[0]]).length === ids.length &&
|
|
60
|
+
network.start !== network.end &&
|
|
61
|
+
listed(network.start) &&
|
|
62
|
+
listed(network.end));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Props of `RouteNetworkLab`: a network as a model landscape of `towns`
|
|
66
|
+
* joined by weighted `roads`. In the degrees mode each town shows how many
|
|
67
|
+
* roads meet there and the footer adds the degrees up to twice the number of
|
|
68
|
+
* roads; in the route mode the learner picks a route from `start` to `end`, a
|
|
69
|
+
* van drives it, and the footer adds up its roads. With `showShortest`, the
|
|
70
|
+
* footer also names the shortest route and its length, so it is answer state.
|
|
71
|
+
*/
|
|
72
|
+
function routeNetworkLab(rich) {
|
|
73
|
+
return figure(Schema.Struct({
|
|
74
|
+
...cardFields(rich),
|
|
75
|
+
...NetworkSchema.fields,
|
|
76
|
+
labels: Schema.Struct({
|
|
77
|
+
degreeSum: rich,
|
|
78
|
+
length: rich,
|
|
79
|
+
mode: TextSchema,
|
|
80
|
+
modes: byIds(NETWORK_MODES, TextSchema),
|
|
81
|
+
route: TextSchema,
|
|
82
|
+
shortest: rich,
|
|
83
|
+
town: TextSchema,
|
|
84
|
+
trip: rich,
|
|
85
|
+
twiceRoads: rich,
|
|
86
|
+
viewLabel: TextSchema,
|
|
87
|
+
}),
|
|
88
|
+
mode: Schema.optionalKey(Schema.Literals(NETWORK_MODES)),
|
|
89
|
+
showShortest: Schema.optionalKey(Schema.Boolean),
|
|
90
|
+
}).check(Schema.makeFilter(isSimpleNetwork, {
|
|
91
|
+
message: "Expected each town once, roads between two different listed towns at most once each, one connected network, and a trip between two different towns.",
|
|
92
|
+
})), answerAt(["showShortest"]));
|
|
93
|
+
}
|
|
94
|
+
/** The graph-theory labs, where a network of vertices and edges is read. */
|
|
95
|
+
export function networkVisuals(rich) {
|
|
96
|
+
return { RouteNetworkLab: routeNetworkLab(rich) };
|
|
97
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/** The place-value labs, where a number is written in a base. */
|
|
4
4
|
export declare function numeralVisuals<E>(rich: RichSlot<E>): {
|
|
5
5
|
AbacusBaseLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
@@ -167,4 +167,85 @@ export declare function numeralVisuals<E>(rich: RichSlot<E>): {
|
|
|
167
167
|
}>;
|
|
168
168
|
readonly showReadout: Schema.optionalKey<Schema.Boolean>;
|
|
169
169
|
}>, "figure">;
|
|
170
|
+
BundleCountLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
171
|
+
readonly description: RichSlot<E>;
|
|
172
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
173
|
+
readonly attrs: {
|
|
174
|
+
readonly latex: string;
|
|
175
|
+
};
|
|
176
|
+
readonly type: "mathInline";
|
|
177
|
+
} | {
|
|
178
|
+
readonly marks?: readonly [{
|
|
179
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
180
|
+
} | {
|
|
181
|
+
readonly attrs: {
|
|
182
|
+
readonly href: string;
|
|
183
|
+
};
|
|
184
|
+
readonly type: "link";
|
|
185
|
+
} | {
|
|
186
|
+
readonly attrs: {
|
|
187
|
+
readonly variant: "success" | "warning" | null;
|
|
188
|
+
};
|
|
189
|
+
readonly type: "highlight";
|
|
190
|
+
}, ...({
|
|
191
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
192
|
+
} | {
|
|
193
|
+
readonly attrs: {
|
|
194
|
+
readonly href: string;
|
|
195
|
+
};
|
|
196
|
+
readonly type: "link";
|
|
197
|
+
} | {
|
|
198
|
+
readonly attrs: {
|
|
199
|
+
readonly variant: "success" | "warning" | null;
|
|
200
|
+
};
|
|
201
|
+
readonly type: "highlight";
|
|
202
|
+
})[]];
|
|
203
|
+
readonly text: string;
|
|
204
|
+
readonly type: "text";
|
|
205
|
+
}, ...({
|
|
206
|
+
readonly attrs: {
|
|
207
|
+
readonly latex: string;
|
|
208
|
+
};
|
|
209
|
+
readonly type: "mathInline";
|
|
210
|
+
} | {
|
|
211
|
+
readonly marks?: readonly [{
|
|
212
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
213
|
+
} | {
|
|
214
|
+
readonly attrs: {
|
|
215
|
+
readonly href: string;
|
|
216
|
+
};
|
|
217
|
+
readonly type: "link";
|
|
218
|
+
} | {
|
|
219
|
+
readonly attrs: {
|
|
220
|
+
readonly variant: "success" | "warning" | null;
|
|
221
|
+
};
|
|
222
|
+
readonly type: "highlight";
|
|
223
|
+
}, ...({
|
|
224
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
225
|
+
} | {
|
|
226
|
+
readonly attrs: {
|
|
227
|
+
readonly href: string;
|
|
228
|
+
};
|
|
229
|
+
readonly type: "link";
|
|
230
|
+
} | {
|
|
231
|
+
readonly attrs: {
|
|
232
|
+
readonly variant: "success" | "warning" | null;
|
|
233
|
+
};
|
|
234
|
+
readonly type: "highlight";
|
|
235
|
+
})[]];
|
|
236
|
+
readonly text: string;
|
|
237
|
+
readonly type: "text";
|
|
238
|
+
})[]], E, never, never>>;
|
|
239
|
+
readonly title: RichSlot<E>;
|
|
240
|
+
readonly bases: Schema.NonEmptyArray<Schema.Int>;
|
|
241
|
+
readonly value: Schema.Int;
|
|
242
|
+
readonly labels: Schema.Struct<{
|
|
243
|
+
readonly base: Schema.Trimmed;
|
|
244
|
+
readonly count: Schema.Trimmed;
|
|
245
|
+
readonly ladder: RichSlot<E>;
|
|
246
|
+
readonly numeral: RichSlot<E>;
|
|
247
|
+
readonly viewLabel: Schema.Trimmed;
|
|
248
|
+
}>;
|
|
249
|
+
readonly showReadout: Schema.optionalKey<Schema.Boolean>;
|
|
250
|
+
}>, "figure">;
|
|
170
251
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Array as Arr, Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
4
|
/** How many places the spike abacus has: b^3, b^2, b and 1. */
|
|
5
5
|
const ABACUS_PLACES = 4;
|
|
@@ -76,10 +76,58 @@ function binaryLampLab(rich) {
|
|
|
76
76
|
message: "Expected a number the row of lamps can show.",
|
|
77
77
|
})), answerAt(["showReadout"]));
|
|
78
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* How many trays the bundling desk has room for. A tray holds b boxes, so the
|
|
81
|
+
* highest place, b^3, shows a digit of at most this.
|
|
82
|
+
*/
|
|
83
|
+
const DESK_TRAYS = 1;
|
|
84
|
+
/** The most sticks one heap on the bundling desk holds. */
|
|
85
|
+
const HEAP_STICKS = 300;
|
|
86
|
+
/** A base the desk can bundle in: two to nine sticks to a bundle, as the KSSM bases are. */
|
|
87
|
+
const BundleBaseSchema = Schema.Int.check(Schema.isBetween({ maximum: 9, minimum: 2 }));
|
|
88
|
+
/** The bases a bundling desk offers and the count of sticks it starts from. */
|
|
89
|
+
const BundleStartSchema = Schema.Struct({
|
|
90
|
+
bases: Schema.NonEmptyArray(BundleBaseSchema),
|
|
91
|
+
value: Schema.Int.check(Schema.isBetween({ maximum: HEAP_STICKS, minimum: 1 })),
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* Whether each base is offered once and the first base's desk holds the count:
|
|
95
|
+
* loose sticks, bundles and boxes below b each, and at most one full tray.
|
|
96
|
+
*/
|
|
97
|
+
function fitsDesk({ bases, value }) {
|
|
98
|
+
const [first] = bases;
|
|
99
|
+
return (Arr.dedupe(bases).length === bases.length &&
|
|
100
|
+
value <= (DESK_TRAYS + 1) * first ** 3 - 1);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Props of `BundleCountLab`: a desk where a heap of `value` sticks is tied
|
|
104
|
+
* into bundles of b, the bundles boxed b to a box and the boxes set b to a
|
|
105
|
+
* tray (one tray fits the desk), one division by b per round, in the base the learner picks from
|
|
106
|
+
* `bases`. With `showReadout`, the slider shows the count, each place shows
|
|
107
|
+
* its digit, a caption reads each division, and the footer reads the
|
|
108
|
+
* division ladder and the numeral, so it is answer state.
|
|
109
|
+
*/
|
|
110
|
+
function bundleCountLab(rich) {
|
|
111
|
+
return figure(Schema.Struct({
|
|
112
|
+
...cardFields(rich),
|
|
113
|
+
...BundleStartSchema.fields,
|
|
114
|
+
labels: Schema.Struct({
|
|
115
|
+
base: TextSchema,
|
|
116
|
+
count: TextSchema,
|
|
117
|
+
ladder: rich,
|
|
118
|
+
numeral: rich,
|
|
119
|
+
viewLabel: TextSchema,
|
|
120
|
+
}),
|
|
121
|
+
showReadout: Schema.optionalKey(Schema.Boolean),
|
|
122
|
+
}).check(Schema.makeFilter(fitsDesk, {
|
|
123
|
+
message: "Expected each base once and a count the first base's desk holds with one tray.",
|
|
124
|
+
})), answerAt(["showReadout"]));
|
|
125
|
+
}
|
|
79
126
|
/** The place-value labs, where a number is written in a base. */
|
|
80
127
|
export function numeralVisuals(rich) {
|
|
81
128
|
return {
|
|
82
129
|
AbacusBaseLab: abacusBaseLab(rich),
|
|
83
130
|
BinaryLampLab: binaryLampLab(rich),
|
|
131
|
+
BundleCountLab: bundleCountLab(rich),
|
|
84
132
|
};
|
|
85
133
|
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/** The set labs, where objects are sorted into sets and operations select regions. */
|
|
4
|
+
export declare function setVisuals<E>(rich: RichSlot<E>): {
|
|
5
|
+
VennSortLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
6
|
+
readonly description: RichSlot<E>;
|
|
7
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
8
|
+
readonly attrs: {
|
|
9
|
+
readonly latex: string;
|
|
10
|
+
};
|
|
11
|
+
readonly type: "mathInline";
|
|
12
|
+
} | {
|
|
13
|
+
readonly marks?: readonly [{
|
|
14
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
15
|
+
} | {
|
|
16
|
+
readonly attrs: {
|
|
17
|
+
readonly href: string;
|
|
18
|
+
};
|
|
19
|
+
readonly type: "link";
|
|
20
|
+
} | {
|
|
21
|
+
readonly attrs: {
|
|
22
|
+
readonly variant: "success" | "warning" | null;
|
|
23
|
+
};
|
|
24
|
+
readonly type: "highlight";
|
|
25
|
+
}, ...({
|
|
26
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
27
|
+
} | {
|
|
28
|
+
readonly attrs: {
|
|
29
|
+
readonly href: string;
|
|
30
|
+
};
|
|
31
|
+
readonly type: "link";
|
|
32
|
+
} | {
|
|
33
|
+
readonly attrs: {
|
|
34
|
+
readonly variant: "success" | "warning" | null;
|
|
35
|
+
};
|
|
36
|
+
readonly type: "highlight";
|
|
37
|
+
})[]];
|
|
38
|
+
readonly text: string;
|
|
39
|
+
readonly type: "text";
|
|
40
|
+
}, ...({
|
|
41
|
+
readonly attrs: {
|
|
42
|
+
readonly latex: string;
|
|
43
|
+
};
|
|
44
|
+
readonly type: "mathInline";
|
|
45
|
+
} | {
|
|
46
|
+
readonly marks?: readonly [{
|
|
47
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
48
|
+
} | {
|
|
49
|
+
readonly attrs: {
|
|
50
|
+
readonly href: string;
|
|
51
|
+
};
|
|
52
|
+
readonly type: "link";
|
|
53
|
+
} | {
|
|
54
|
+
readonly attrs: {
|
|
55
|
+
readonly variant: "success" | "warning" | null;
|
|
56
|
+
};
|
|
57
|
+
readonly type: "highlight";
|
|
58
|
+
}, ...({
|
|
59
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
60
|
+
} | {
|
|
61
|
+
readonly attrs: {
|
|
62
|
+
readonly href: string;
|
|
63
|
+
};
|
|
64
|
+
readonly type: "link";
|
|
65
|
+
} | {
|
|
66
|
+
readonly attrs: {
|
|
67
|
+
readonly variant: "success" | "warning" | null;
|
|
68
|
+
};
|
|
69
|
+
readonly type: "highlight";
|
|
70
|
+
})[]];
|
|
71
|
+
readonly text: string;
|
|
72
|
+
readonly type: "text";
|
|
73
|
+
})[]], E, never, never>>;
|
|
74
|
+
readonly title: RichSlot<E>;
|
|
75
|
+
readonly objects: Schema.NonEmptyArray<Schema.Struct<{
|
|
76
|
+
readonly name: Schema.Trimmed;
|
|
77
|
+
readonly object: Schema.Literals<readonly ["apple", "lemon", "lime", "tennis-ball", "steel-ball", "red-ball", "blue-ball", "washer", "coin", "toy-car", "red-block", "green-block", "yellow-block", "blue-cup", "green-cup"]>;
|
|
78
|
+
}>>;
|
|
79
|
+
readonly operations: Schema.NonEmptyArray<Schema.Literals<readonly ["intersection", "union", "complement", "outside-union", "difference", "triple-intersection", "union-with-pair"]>>;
|
|
80
|
+
readonly sets: Schema.$Array<Schema.Struct<{
|
|
81
|
+
readonly attribute: Schema.Literals<readonly ["red", "yellow", "blue", "green", "metal", "wood", "plastic", "ball", "fruit"]>;
|
|
82
|
+
readonly name: Schema.Trimmed;
|
|
83
|
+
}>>;
|
|
84
|
+
readonly labels: Schema.Struct<{
|
|
85
|
+
readonly count: RichSlot<E>;
|
|
86
|
+
readonly members: RichSlot<E>;
|
|
87
|
+
readonly operation: Schema.Trimmed;
|
|
88
|
+
readonly viewLabel: Schema.Trimmed;
|
|
89
|
+
}>;
|
|
90
|
+
readonly showCount: Schema.optionalKey<Schema.Boolean>;
|
|
91
|
+
}>, "figure">;
|
|
92
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Array as Arr, Schema } from "effect";
|
|
2
|
+
import { cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
+
/** What a hoop can gather the objects by: a colour, a material, being a ball, or being a fruit. */
|
|
5
|
+
const VENN_ATTRIBUTES = [
|
|
6
|
+
"red",
|
|
7
|
+
"yellow",
|
|
8
|
+
"blue",
|
|
9
|
+
"green",
|
|
10
|
+
"metal",
|
|
11
|
+
"wood",
|
|
12
|
+
"plastic",
|
|
13
|
+
"ball",
|
|
14
|
+
"fruit",
|
|
15
|
+
];
|
|
16
|
+
/** The everyday objects the mat can hold, each at most once. */
|
|
17
|
+
const VENN_OBJECTS = [
|
|
18
|
+
"apple",
|
|
19
|
+
"lemon",
|
|
20
|
+
"lime",
|
|
21
|
+
"tennis-ball",
|
|
22
|
+
"steel-ball",
|
|
23
|
+
"red-ball",
|
|
24
|
+
"blue-ball",
|
|
25
|
+
"washer",
|
|
26
|
+
"coin",
|
|
27
|
+
"toy-car",
|
|
28
|
+
"red-block",
|
|
29
|
+
"green-block",
|
|
30
|
+
"yellow-block",
|
|
31
|
+
"blue-cup",
|
|
32
|
+
"green-cup",
|
|
33
|
+
];
|
|
34
|
+
/** The operations the toolbar can offer, from A ∩ B to A ∪ (B ∩ C). */
|
|
35
|
+
const VENN_OPERATIONS = [
|
|
36
|
+
"intersection",
|
|
37
|
+
"union",
|
|
38
|
+
"complement",
|
|
39
|
+
"outside-union",
|
|
40
|
+
"difference",
|
|
41
|
+
"triple-intersection",
|
|
42
|
+
"union-with-pair",
|
|
43
|
+
];
|
|
44
|
+
/** The operations that name the third set C, so they need three hoops. */
|
|
45
|
+
const THREE_SET_OPERATIONS = [
|
|
46
|
+
"triple-intersection",
|
|
47
|
+
"union-with-pair",
|
|
48
|
+
];
|
|
49
|
+
/** The fewest and the most hoops the mat lays out. */
|
|
50
|
+
const HOOP_RANGE = { maximum: 3, minimum: 2 };
|
|
51
|
+
/** The hoops, the objects and the operations a lab offers. */
|
|
52
|
+
const SortSchema = Schema.Struct({
|
|
53
|
+
objects: Schema.NonEmptyArray(Schema.Struct({ name: TextSchema, object: Schema.Literals(VENN_OBJECTS) })),
|
|
54
|
+
operations: Schema.NonEmptyArray(Schema.Literals(VENN_OPERATIONS)),
|
|
55
|
+
sets: Schema.Array(Schema.Struct({
|
|
56
|
+
attribute: Schema.Literals(VENN_ATTRIBUTES),
|
|
57
|
+
name: TextSchema,
|
|
58
|
+
})).check(Schema.isMinLength(HOOP_RANGE.minimum), Schema.isMaxLength(HOOP_RANGE.maximum)),
|
|
59
|
+
});
|
|
60
|
+
/** Whether every list holds each entry once, and every operation has the hoops it names. */
|
|
61
|
+
function isSort({ objects, operations, sets }) {
|
|
62
|
+
const kinds = Arr.map(objects, ({ object }) => object);
|
|
63
|
+
const attributes = Arr.map(sets, ({ attribute }) => attribute);
|
|
64
|
+
return (Arr.dedupe(kinds).length === kinds.length &&
|
|
65
|
+
Arr.dedupe(attributes).length === attributes.length &&
|
|
66
|
+
Arr.dedupe(operations).length === operations.length &&
|
|
67
|
+
(sets.length === HOOP_RANGE.maximum ||
|
|
68
|
+
!Arr.some(operations, (operation) => Arr.contains(THREE_SET_OPERATIONS, operation))));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Props of `VennSortLab`: a universal-set mat with two or three hoops, A, B
|
|
72
|
+
* and C, each gathering the `objects` with one attribute. In Play the objects
|
|
73
|
+
* roll from a tray into their regions; picking one of the `operations`
|
|
74
|
+
* shades the region it selects. With `showCount`, the footer gives how many
|
|
75
|
+
* objects the operation selects and lists them, so it is answer state.
|
|
76
|
+
*/
|
|
77
|
+
function vennSortLab(rich) {
|
|
78
|
+
return figure(Schema.Struct({
|
|
79
|
+
...cardFields(rich),
|
|
80
|
+
...SortSchema.fields,
|
|
81
|
+
labels: Schema.Struct({
|
|
82
|
+
count: rich,
|
|
83
|
+
members: rich,
|
|
84
|
+
operation: TextSchema,
|
|
85
|
+
viewLabel: TextSchema,
|
|
86
|
+
}),
|
|
87
|
+
showCount: Schema.optionalKey(Schema.Boolean),
|
|
88
|
+
}).check(Schema.makeFilter(isSort, {
|
|
89
|
+
message: "Expected each object, attribute and operation once, two or three hoops, and three hoops for an operation that names C.",
|
|
90
|
+
})), answerAt(["showCount"]));
|
|
91
|
+
}
|
|
92
|
+
/** The set labs, where objects are sorted into sets and operations select regions. */
|
|
93
|
+
export function setVisuals(rich) {
|
|
94
|
+
return { VennSortLab: vennSortLab(rich) };
|
|
95
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the braking and stopping labs. No prop states the conclusion a
|
|
5
5
|
* lab leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/**
|
|
5
5
|
* Props of `BrakeHeatLab`: a front wheel seen up close while the car brakes to
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the electricity labs. Each prop is a value from the item the lab
|
|
5
5
|
* draws, never the conclusion it leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the circular motion labs. No prop states the conclusion a lab
|
|
5
5
|
* leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/**
|
|
5
5
|
* Props of `SatelliteOrbitCircularLab`: three real satellites in circular
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the forces and motion labs. Each prop is a value from the item the lab
|
|
5
5
|
* draws, never the conclusion it leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/** Props of `ConnectedBlocksLab`: two blocks joined by a light string are pulled across the floor from the front. */
|
|
5
5
|
function connectedBlocksLab(rich) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the energy conversion and efficiency labs. No prop states the
|
|
5
5
|
* conclusion a lab leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/**
|
|
5
5
|
* Props of `HoistWorkLab`: a motor hoist lifts a 20 kg crate 5 m onto a
|