@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.
Files changed (68) hide show
  1. package/dist/assessment/figure.d.ts +24 -48725
  2. package/dist/assessment/figure.js +10 -6
  3. package/dist/visual/base/layout.d.ts +6 -6
  4. package/dist/visual/base/math.d.ts +4 -4
  5. package/dist/visual/base/media.d.ts +2 -2
  6. package/dist/visual/biology/bacteria.d.ts +55 -0
  7. package/dist/visual/biology/bacteria.js +79 -0
  8. package/dist/visual/biology/cell.d.ts +89 -0
  9. package/dist/visual/biology/cell.js +95 -0
  10. package/dist/visual/biology/climate.d.ts +75 -0
  11. package/dist/visual/biology/climate.js +94 -0
  12. package/dist/visual/biology/ecology.d.ts +75 -0
  13. package/dist/visual/biology/ecology.js +94 -0
  14. package/dist/visual/biology.d.ts +9 -9
  15. package/dist/visual/catalog.d.ts +1645 -26906
  16. package/dist/visual/catalog.js +47 -1
  17. package/dist/visual/chemistry/atom.d.ts +4 -4
  18. package/dist/visual/chemistry/balance.d.ts +79 -0
  19. package/dist/visual/chemistry/balance.js +128 -0
  20. package/dist/visual/chemistry/bonding.d.ts +80 -0
  21. package/dist/visual/chemistry/bonding.js +147 -0
  22. package/dist/visual/chemistry/discovery.d.ts +96 -0
  23. package/dist/visual/chemistry/discovery.js +137 -0
  24. package/dist/visual/chemistry/electron.d.ts +2 -2
  25. package/dist/visual/chemistry/laws.d.ts +4 -4
  26. package/dist/visual/chemistry/particles.d.ts +5 -5
  27. package/dist/visual/chemistry/periodic.d.ts +2 -2
  28. package/dist/visual/chemistry/reaction.d.ts +3 -3
  29. package/dist/visual/entry.d.ts +4 -4
  30. package/dist/visual/mathematics/chart.d.ts +1 -1
  31. package/dist/visual/mathematics/charts.d.ts +5 -5
  32. package/dist/visual/mathematics/function.d.ts +7 -7
  33. package/dist/visual/mathematics/geometry.d.ts +4 -4
  34. package/dist/visual/mathematics/number.d.ts +1 -1
  35. package/dist/visual/physics/braking.d.ts +62 -0
  36. package/dist/visual/physics/braking.js +83 -0
  37. package/dist/visual/physics/circular.d.ts +36 -0
  38. package/dist/visual/physics/circular.js +51 -0
  39. package/dist/visual/physics/efficiency.d.ts +93 -0
  40. package/dist/visual/physics/efficiency.js +129 -0
  41. package/dist/visual/physics/falling.d.ts +56 -0
  42. package/dist/visual/physics/falling.js +77 -0
  43. package/dist/visual/physics/force.d.ts +88 -0
  44. package/dist/visual/physics/force.js +115 -0
  45. package/dist/visual/physics/instrument.d.ts +93 -0
  46. package/dist/visual/physics/instrument.js +135 -0
  47. package/dist/visual/physics/measurement.d.ts +4 -4
  48. package/dist/visual/physics/motion.d.ts +6 -6
  49. package/dist/visual/physics/parabolic.d.ts +2 -2
  50. package/dist/visual/physics/position.d.ts +87 -0
  51. package/dist/visual/physics/position.js +123 -0
  52. package/dist/visual/physics/power.d.ts +121 -0
  53. package/dist/visual/physics/power.js +162 -0
  54. package/dist/visual/physics/precision.d.ts +96 -0
  55. package/dist/visual/physics/precision.js +137 -0
  56. package/dist/visual/physics/product.d.ts +73 -0
  57. package/dist/visual/physics/product.js +96 -0
  58. package/dist/visual/physics/record.d.ts +34 -0
  59. package/dist/visual/physics/record.js +46 -0
  60. package/dist/visual/physics/relative.d.ts +55 -0
  61. package/dist/visual/physics/relative.js +76 -0
  62. package/dist/visual/physics/solar.d.ts +91 -0
  63. package/dist/visual/physics/solar.js +126 -0
  64. package/dist/visual/physics/vector.d.ts +103 -0
  65. package/dist/visual/physics/vector.js +123 -0
  66. package/dist/visual/physics/velocity.d.ts +7 -7
  67. package/dist/visual/politics.d.ts +8 -8
  68. package/package.json +1 -1
@@ -0,0 +1,137 @@
1
+ import { Schema } from "effect";
2
+ import { cardFields, TextSchema } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /** Props of `CathodeRayLab`: Thomson's cathode-ray tube at real size. */
5
+ function cathodeRayLab(rich) {
6
+ return figure(Schema.Struct({
7
+ ...cardFields(rich),
8
+ labels: Schema.Struct({
9
+ anode: rich,
10
+ field: rich,
11
+ plates: TextSchema,
12
+ spot: rich,
13
+ view: TextSchema,
14
+ }),
15
+ }));
16
+ }
17
+ /**
18
+ * Props of `MillikanOilDropLab`: Millikan's oil drops between two charged
19
+ * plates.
20
+ */
21
+ function millikanOilDropLab(rich) {
22
+ return figure(Schema.Struct({
23
+ ...cardFields(rich),
24
+ labels: Schema.Struct({
25
+ charge: rich,
26
+ field: rich,
27
+ multiple: rich,
28
+ view: TextSchema,
29
+ voltage: TextSchema,
30
+ }),
31
+ }));
32
+ }
33
+ /**
34
+ * Props of `RutherfordScatteringLab`: Rutherford's gold foil, seen at the scale
35
+ * of one nucleus.
36
+ */
37
+ function rutherfordScatteringLab(rich) {
38
+ return figure(Schema.Struct({
39
+ ...cardFields(rich),
40
+ energy: Schema.optionalKey(Schema.Finite),
41
+ labels: Schema.Struct({
42
+ approach: rich,
43
+ energy: TextSchema,
44
+ nucleus: rich,
45
+ ratio: rich,
46
+ view: TextSchema,
47
+ }),
48
+ }));
49
+ }
50
+ /** Props of `BohrEmissionLab`: Bohr's hydrogen atom. */
51
+ function bohrEmissionLab(rich) {
52
+ return figure(Schema.Struct({
53
+ ...cardFields(rich),
54
+ falls: Schema.Array(Schema.Struct({ from: Schema.Int, to: Schema.Int })),
55
+ labels: Schema.Struct({
56
+ choose: TextSchema,
57
+ energy: rich,
58
+ frequency: rich,
59
+ transition: rich,
60
+ view: TextSchema,
61
+ wavelength: rich,
62
+ }),
63
+ }));
64
+ }
65
+ /** Props of `MassSpectrometerLab`: a magnetic sector mass spectrometer. */
66
+ function massSpectrometerLab(rich) {
67
+ return figure(Schema.Struct({
68
+ ...cardFields(rich),
69
+ labels: Schema.Struct({
70
+ average: rich,
71
+ choose: TextSchema,
72
+ isotopes: rich,
73
+ north: TextSchema,
74
+ radius: rich,
75
+ ratio: rich,
76
+ south: TextSchema,
77
+ view: TextSchema,
78
+ }),
79
+ samples: Schema.Array(Schema.Literals([
80
+ "boron",
81
+ "carbon",
82
+ "neon",
83
+ "magnesium",
84
+ "chlorine",
85
+ "copper",
86
+ ])),
87
+ }));
88
+ }
89
+ /**
90
+ * Props of `ParticleTrackLab`: an electron, a proton and a neutron enter a
91
+ * magnetic field side by side at the same speed.
92
+ */
93
+ function particleTrackLab(rich) {
94
+ return figure(Schema.Struct({
95
+ ...cardFields(rich),
96
+ labels: Schema.Struct({
97
+ electron: rich,
98
+ field: TextSchema,
99
+ proton: rich,
100
+ ratio: rich,
101
+ view: TextSchema,
102
+ }),
103
+ }));
104
+ }
105
+ /**
106
+ * Props of `RadioactiveDecayLab`: a sample of 400 carbon-14 nuclei, each
107
+ * turning into nitrogen-14 at its own moment, so no one can say when a single
108
+ * nucleus decays, yet the count halves every 5730 years.
109
+ */
110
+ function radioactiveDecayLab(rich) {
111
+ return figure(Schema.Struct({
112
+ ...cardFields(rich),
113
+ labels: Schema.Struct({
114
+ counted: rich,
115
+ expected: rich,
116
+ halfLives: rich,
117
+ time: TextSchema,
118
+ view: TextSchema,
119
+ years: TextSchema,
120
+ }),
121
+ }));
122
+ }
123
+ /**
124
+ * The props of the labs of the experiments that found atomic structure. No prop
125
+ * states the conclusion a lab leads to, so none holds answer state.
126
+ */
127
+ export function discoveryVisuals(rich) {
128
+ return {
129
+ CathodeRayLab: cathodeRayLab(rich),
130
+ MillikanOilDropLab: millikanOilDropLab(rich),
131
+ RutherfordScatteringLab: rutherfordScatteringLab(rich),
132
+ BohrEmissionLab: bohrEmissionLab(rich),
133
+ MassSpectrometerLab: massSpectrometerLab(rich),
134
+ ParticleTrackLab: particleTrackLab(rich),
135
+ RadioactiveDecayLab: radioactiveDecayLab(rich),
136
+ };
137
+ }
@@ -19,7 +19,7 @@ export declare function electronVisuals<E>(rich: RichSlot<E>): {
19
19
  readonly note: RichSlot<E>;
20
20
  }>>;
21
21
  }>;
22
- }>>;
22
+ }>, "figure">;
23
23
  ValenceElectronLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
24
24
  readonly description: RichSlot<E>;
25
25
  readonly title: RichSlot<E>;
@@ -37,5 +37,5 @@ export declare function electronVisuals<E>(rich: RichSlot<E>): {
37
37
  }>>;
38
38
  readonly valenceElectron: Schema.Trimmed;
39
39
  }>;
40
- }>>;
40
+ }>, "figure">;
41
41
  };
@@ -24,7 +24,7 @@ export declare function lawVisuals<E>(rich: RichSlot<E>): {
24
24
  readonly reactionView: Schema.Trimmed;
25
25
  readonly volumeUnit: Schema.Trimmed;
26
26
  }>;
27
- }>>;
27
+ }>, "figure">;
28
28
  ConstantCompositionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
29
29
  readonly description: RichSlot<E>;
30
30
  readonly title: RichSlot<E>;
@@ -45,7 +45,7 @@ export declare function lawVisuals<E>(rich: RichSlot<E>): {
45
45
  readonly ratioLabel: Schema.Trimmed;
46
46
  readonly reactionView: Schema.Trimmed;
47
47
  }>;
48
- }>>;
48
+ }>, "figure">;
49
49
  MassConservationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
50
50
  readonly description: RichSlot<E>;
51
51
  readonly title: RichSlot<E>;
@@ -65,7 +65,7 @@ export declare function lawVisuals<E>(rich: RichSlot<E>): {
65
65
  readonly reactionView: Schema.Trimmed;
66
66
  readonly systemLabel: Schema.Trimmed;
67
67
  }>;
68
- }>>;
68
+ }>, "figure">;
69
69
  MultipleProportionsLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
70
70
  readonly description: RichSlot<E>;
71
71
  readonly title: RichSlot<E>;
@@ -82,5 +82,5 @@ export declare function lawVisuals<E>(rich: RichSlot<E>): {
82
82
  readonly tabLabel: Schema.Trimmed;
83
83
  }>>;
84
84
  }>;
85
- }>>;
85
+ }>, "figure">;
86
86
  };
@@ -25,7 +25,7 @@ export declare function particleVisuals<E>(rich: RichSlot<E>): {
25
25
  readonly type: Schema.Trimmed;
26
26
  }>>;
27
27
  }>;
28
- }>>;
28
+ }>, "figure">;
29
29
  IsotopeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
30
30
  readonly description: RichSlot<E>;
31
31
  readonly title: RichSlot<E>;
@@ -45,7 +45,7 @@ export declare function particleVisuals<E>(rich: RichSlot<E>): {
45
45
  readonly tab: RichSlot<E>;
46
46
  }>>;
47
47
  }>;
48
- }>>;
48
+ }>, "figure">;
49
49
  MatterParticleReaderLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
50
50
  readonly description: RichSlot<E>;
51
51
  readonly title: RichSlot<E>;
@@ -62,7 +62,7 @@ export declare function particleVisuals<E>(rich: RichSlot<E>): {
62
62
  readonly particleView: Schema.Trimmed;
63
63
  readonly readingLabel: Schema.Trimmed;
64
64
  }>;
65
- }>>;
65
+ }>, "figure">;
66
66
  SubatomicParticlePropertiesLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
67
67
  readonly description: RichSlot<E>;
68
68
  readonly title: RichSlot<E>;
@@ -86,7 +86,7 @@ export declare function particleVisuals<E>(rich: RichSlot<E>): {
86
86
  readonly proton: RichSlot<E>;
87
87
  }>;
88
88
  }>;
89
- }>>;
89
+ }>, "figure">;
90
90
  SubatomicParticlesLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
91
91
  readonly description: RichSlot<E>;
92
92
  readonly title: RichSlot<E>;
@@ -110,5 +110,5 @@ export declare function particleVisuals<E>(rich: RichSlot<E>): {
110
110
  readonly positivePlate: RichSlot<E>;
111
111
  }>;
112
112
  }>;
113
- }>>;
113
+ }>, "figure">;
114
114
  };
@@ -25,7 +25,7 @@ export declare function periodicVisuals<E>(rich: RichSlot<E>): {
25
25
  readonly seriesNames: Schema.$Record<Schema.Literals<readonly ["lanthanide", "actinide"]>, Schema.Trimmed>;
26
26
  readonly tableLabel: Schema.Trimmed;
27
27
  }>;
28
- }>>;
28
+ }>, "figure">;
29
29
  PeriodicPropertiesLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
30
30
  readonly description: RichSlot<E>;
31
31
  readonly title: RichSlot<E>;
@@ -48,5 +48,5 @@ export declare function periodicVisuals<E>(rich: RichSlot<E>): {
48
48
  }>>;
49
49
  readonly sceneLabel: Schema.Trimmed;
50
50
  }>;
51
- }>>;
51
+ }>, "figure">;
52
52
  };
@@ -24,7 +24,7 @@ export declare function reactionVisuals<E>(rich: RichSlot<E>): {
24
24
  readonly observationLabel: Schema.Trimmed;
25
25
  readonly transition: Schema.Trimmed;
26
26
  }>;
27
- }>>;
27
+ }>, "figure">;
28
28
  ChemicalReactionTypesLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
29
29
  readonly description: RichSlot<E>;
30
30
  readonly title: RichSlot<E>;
@@ -46,7 +46,7 @@ export declare function reactionVisuals<E>(rich: RichSlot<E>): {
46
46
  }>>;
47
47
  readonly visibleCueLabel: Schema.Trimmed;
48
48
  }>;
49
- }>>;
49
+ }>, "figure">;
50
50
  MethaneCombustionEquationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
51
51
  readonly description: RichSlot<E>;
52
52
  readonly title: RichSlot<E>;
@@ -56,5 +56,5 @@ export declare function reactionVisuals<E>(rich: RichSlot<E>): {
56
56
  readonly products: Schema.Trimmed;
57
57
  readonly reactants: Schema.Trimmed;
58
58
  }>;
59
- }>>;
59
+ }>, "figure">;
60
60
  };
@@ -23,9 +23,9 @@ export type AnswerReader = (props: unknown) => readonly string[];
23
23
  * One component of the catalog: its kind, the schema of its props in one
24
24
  * document kind, and the reader of the answer state those props hold.
25
25
  */
26
- export interface VisualEntry<Props extends Schema.Top> {
26
+ export interface VisualEntry<Props extends Schema.Top, Kind extends VisualKind = VisualKind> {
27
27
  readonly answer: AnswerReader;
28
- readonly kind: VisualKind;
28
+ readonly kind: Kind;
29
29
  readonly props: Props;
30
30
  }
31
31
  /**
@@ -37,6 +37,6 @@ export declare function answerAt(...patterns: readonly AnswerPattern[]): AnswerR
37
37
  /** A component whose props never hold answer state. */
38
38
  export declare const noAnswer: AnswerReader;
39
39
  /** A figure component, with the answer state its props may hold. */
40
- export declare function figure<Props extends Schema.Top>(props: Props, answer?: AnswerReader): VisualEntry<Props>;
40
+ export declare function figure<Props extends Schema.Top>(props: Props, answer?: AnswerReader): VisualEntry<Props, "figure">;
41
41
  /** A markup component: a formula, an emphasis, or a layout around blocks. */
42
- export declare function markup<Props extends Schema.Top>(props: Props): VisualEntry<Props>;
42
+ export declare function markup<Props extends Schema.Top>(props: Props): VisualEntry<Props, "markup">;
@@ -27,4 +27,4 @@ export declare function chartProps<E>(rich: RichSlot<E>): import("#contracts/vis
27
27
  readonly max: Schema.Finite;
28
28
  readonly min: Schema.Finite;
29
29
  }>>;
30
- }>>;
30
+ }>, "figure">;
@@ -37,7 +37,7 @@ export declare function chartVisuals<E>(rich: RichSlot<E>): {
37
37
  readonly value: Schema.Finite;
38
38
  }>>;
39
39
  readonly yAxisLabel: Schema.Trimmed;
40
- }>>;
40
+ }>, "figure">;
41
41
  Chart: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
42
42
  readonly description: RichSlot<E>;
43
43
  readonly title: RichSlot<E>;
@@ -53,7 +53,7 @@ export declare function chartVisuals<E>(rich: RichSlot<E>): {
53
53
  readonly max: Schema.Finite;
54
54
  readonly min: Schema.Finite;
55
55
  }>>;
56
- }>>;
56
+ }>, "figure">;
57
57
  FunctionChart: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
58
58
  readonly description: RichSlot<E>;
59
59
  readonly title: RichSlot<E>;
@@ -61,7 +61,7 @@ export declare function chartVisuals<E>(rich: RichSlot<E>): {
61
61
  readonly mode: Schema.optionalKey<Schema.Literals<readonly ["continuous", "discrete"]>>;
62
62
  readonly n: Schema.optionalKey<Schema.Int>;
63
63
  readonly p: Schema.Finite;
64
- }>>;
64
+ }>, "figure">;
65
65
  HistogramChart: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
66
66
  readonly description: RichSlot<E>;
67
67
  readonly title: RichSlot<E>;
@@ -93,7 +93,7 @@ export declare function chartVisuals<E>(rich: RichSlot<E>): {
93
93
  readonly value: Schema.Finite;
94
94
  }>>;
95
95
  readonly yAxisLabel: Schema.Trimmed;
96
- }>>;
96
+ }>, "figure">;
97
97
  ScatterDiagram: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
98
98
  readonly description: RichSlot<E>;
99
99
  readonly title: RichSlot<E>;
@@ -114,5 +114,5 @@ export declare function chartVisuals<E>(rich: RichSlot<E>): {
114
114
  readonly xAxisDomain: Schema.optionalKey<Schema.Literal<"min-max">>;
115
115
  readonly xAxisLabel: Schema.optionalKey<Schema.Trimmed>;
116
116
  readonly yAxisLabel: Schema.optionalKey<Schema.Trimmed>;
117
- }>>;
117
+ }>, "figure">;
118
118
  };
@@ -19,11 +19,11 @@ export declare function functionVisuals<E>(rich: RichSlot<E>): {
19
19
  readonly ratio: Schema.optionalKey<Schema.Finite>;
20
20
  readonly timeInterval: Schema.optionalKey<Schema.Finite>;
21
21
  readonly timeUnit: Schema.optionalKey<Schema.Trimmed>;
22
- }>>;
22
+ }>, "figure">;
23
23
  FunctionAndNonFunctionDiagram: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
24
24
  readonly description: RichSlot<E>;
25
25
  readonly title: RichSlot<E>;
26
- }>>;
26
+ }>, "markup">;
27
27
  FunctionAndNonFunctionRelationVisualizer: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
28
28
  readonly accessibilityLabel: Schema.Trimmed;
29
29
  readonly codomain: Schema.$Array<Schema.Struct<{
@@ -40,7 +40,7 @@ export declare function functionVisuals<E>(rich: RichSlot<E>): {
40
40
  readonly from: Schema.Trimmed;
41
41
  readonly to: Schema.Trimmed;
42
42
  }>>;
43
- }>>;
43
+ }>, "figure">;
44
44
  FunctionExplorationVirusChart: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
45
45
  readonly labels: Schema.Struct<{
46
46
  readonly caption: RichSlot<E>;
@@ -52,12 +52,12 @@ export declare function functionVisuals<E>(rich: RichSlot<E>): {
52
52
  readonly title: RichSlot<E>;
53
53
  readonly yLabel: Schema.Trimmed;
54
54
  }>;
55
- }>>;
55
+ }>, "figure">;
56
56
  FunctionMachine: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
57
57
  readonly description: RichSlot<E>;
58
58
  readonly title: RichSlot<E>;
59
59
  readonly inputLabel: Schema.Trimmed;
60
- }>>;
60
+ }>, "figure">;
61
61
  InverseFunctionIllustration: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
62
62
  readonly description: RichSlot<E>;
63
63
  readonly title: RichSlot<E>;
@@ -66,7 +66,7 @@ export declare function functionVisuals<E>(rich: RichSlot<E>): {
66
66
  readonly output: RichSlot<E>;
67
67
  }>;
68
68
  readonly machineLabel: RichSlot<E>;
69
- }>>;
69
+ }>, "figure">;
70
70
  SequenceConceptTableChairsAnimation: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
71
71
  readonly labels: Schema.Struct<{
72
72
  readonly chair: Schema.Trimmed;
@@ -78,5 +78,5 @@ export declare function functionVisuals<E>(rich: RichSlot<E>): {
78
78
  readonly table: Schema.Trimmed;
79
79
  readonly title: RichSlot<E>;
80
80
  }>;
81
- }>>;
81
+ }>, "figure">;
82
82
  };
@@ -185,7 +185,7 @@ export declare function geometryVisuals<E>(rich: RichSlot<E>): {
185
185
  readonly segments: Schema.optionalKey<Schema.Int>;
186
186
  }>]>>;
187
187
  readonly showZAxis: Schema.optionalKey<Schema.Boolean>;
188
- }>>;
188
+ }>, "figure">;
189
189
  NumberLine: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
190
190
  readonly description: RichSlot<E>;
191
191
  readonly title: RichSlot<E>;
@@ -203,12 +203,12 @@ export declare function geometryVisuals<E>(rich: RichSlot<E>): {
203
203
  readonly startInclusive: Schema.optionalKey<Schema.Boolean>;
204
204
  readonly startLabel: Schema.optionalKey<RichSlot<E>>;
205
205
  }>>;
206
- }>>;
206
+ }>, "figure">;
207
207
  QuadraticEquationReadingRoomProblem: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
208
208
  readonly description: Schema.optionalKey<RichSlot<E>>;
209
209
  readonly heightLabel: RichSlot<E>;
210
210
  readonly widthLabel: RichSlot<E>;
211
- }>>;
211
+ }>, "figure">;
212
212
  UnitCircle: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
213
213
  readonly description: RichSlot<E>;
214
214
  readonly title: RichSlot<E>;
@@ -218,5 +218,5 @@ export declare function geometryVisuals<E>(rich: RichSlot<E>): {
218
218
  readonly sin: Schema.optionalKey<Schema.Trimmed>;
219
219
  readonly tan: Schema.optionalKey<Schema.Trimmed>;
220
220
  }>>;
221
- }>>;
221
+ }>, "figure">;
222
222
  };
@@ -18,4 +18,4 @@ export declare function numberLine<E>(rich: RichSlot<E>): import("#contracts/vis
18
18
  readonly startInclusive: Schema.optionalKey<Schema.Boolean>;
19
19
  readonly startLabel: Schema.optionalKey<RichSlot<E>>;
20
20
  }>>;
21
- }>>;
21
+ }>, "figure">;
@@ -0,0 +1,62 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the braking and stopping labs. No prop states the conclusion a
5
+ * lab leads to, so none holds answer state.
6
+ */
7
+ export declare function brakingVisuals<E>(rich: RichSlot<E>): {
8
+ BrakeHeatLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly chooseSpeed: Schema.Trimmed;
13
+ readonly discTemperature: RichSlot<E>;
14
+ readonly kineticEnergy: RichSlot<E>;
15
+ readonly temperatureRise: RichSlot<E>;
16
+ readonly thermal: Schema.Trimmed;
17
+ readonly viewLabel: Schema.Trimmed;
18
+ }>;
19
+ }>, "figure">;
20
+ BrakingSurfaceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
21
+ readonly description: RichSlot<E>;
22
+ readonly title: RichSlot<E>;
23
+ readonly labels: Schema.Struct<{
24
+ readonly brakingDistance: RichSlot<E>;
25
+ readonly brakingTime: RichSlot<E>;
26
+ readonly chooseSurface: Schema.Trimmed;
27
+ readonly deceleration: RichSlot<E>;
28
+ readonly friction: RichSlot<E>;
29
+ readonly surfaces: Schema.$Record<Schema.Literals<readonly ["dry", "wet", "gravel", "snow", "ice"]>, Schema.Trimmed>;
30
+ readonly viewLabel: Schema.Trimmed;
31
+ }>;
32
+ }>, "figure">;
33
+ FollowingDistanceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
34
+ readonly description: RichSlot<E>;
35
+ readonly title: RichSlot<E>;
36
+ readonly labels: Schema.Struct<{
37
+ readonly chooseHeadway: Schema.Trimmed;
38
+ readonly crash: RichSlot<E>;
39
+ readonly finalGap: RichSlot<E>;
40
+ readonly impactSpeed: RichSlot<E>;
41
+ readonly initialGap: RichSlot<E>;
42
+ readonly reactionDistance: RichSlot<E>;
43
+ readonly reactionTime: Schema.Trimmed;
44
+ readonly safe: RichSlot<E>;
45
+ readonly viewLabel: Schema.Trimmed;
46
+ }>;
47
+ }>, "figure">;
48
+ ReactionTimeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
49
+ readonly description: RichSlot<E>;
50
+ readonly title: RichSlot<E>;
51
+ readonly labels: Schema.Struct<{
52
+ readonly average: RichSlot<E>;
53
+ readonly best: RichSlot<E>;
54
+ readonly brake: Schema.Trimmed;
55
+ readonly early: RichSlot<E>;
56
+ readonly lastTime: RichSlot<E>;
57
+ readonly reactionDistance: RichSlot<E>;
58
+ readonly start: Schema.Trimmed;
59
+ readonly viewLabel: Schema.Trimmed;
60
+ }>;
61
+ }>, "figure">;
62
+ };
@@ -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
+ /**
5
+ * Props of `BrakeHeatLab`: a front wheel seen up close while the car brakes to
6
+ * rest.
7
+ */
8
+ function brakeHeatLab(rich) {
9
+ return figure(Schema.Struct({
10
+ ...cardFields(rich),
11
+ labels: Schema.Struct({
12
+ chooseSpeed: TextSchema,
13
+ discTemperature: rich,
14
+ kineticEnergy: rich,
15
+ temperatureRise: rich,
16
+ thermal: TextSchema,
17
+ viewLabel: TextSchema,
18
+ }),
19
+ }));
20
+ }
21
+ /**
22
+ * Props of `BrakingSurfaceLab`: a car at 20 m/s locks its wheels at the white
23
+ * line on the road surface the learner picks.
24
+ */
25
+ function brakingSurfaceLab(rich) {
26
+ return figure(Schema.Struct({
27
+ ...cardFields(rich),
28
+ labels: Schema.Struct({
29
+ brakingDistance: rich,
30
+ brakingTime: rich,
31
+ chooseSurface: TextSchema,
32
+ deceleration: rich,
33
+ friction: rich,
34
+ surfaces: byIds(["dry", "wet", "gravel", "snow", "ice"], TextSchema),
35
+ viewLabel: TextSchema,
36
+ }),
37
+ }));
38
+ }
39
+ /** Props of `FollowingDistanceLab`: two cars at 90 km/h on one lane. */
40
+ function followingDistanceLab(rich) {
41
+ return figure(Schema.Struct({
42
+ ...cardFields(rich),
43
+ labels: Schema.Struct({
44
+ chooseHeadway: TextSchema,
45
+ crash: rich,
46
+ finalGap: rich,
47
+ impactSpeed: rich,
48
+ initialGap: rich,
49
+ reactionDistance: rich,
50
+ reactionTime: TextSchema,
51
+ safe: rich,
52
+ viewLabel: TextSchema,
53
+ }),
54
+ }));
55
+ }
56
+ /** Props of `ReactionTimeLab`: a reaction test from the driver's seat. */
57
+ function reactionTimeLab(rich) {
58
+ return figure(Schema.Struct({
59
+ ...cardFields(rich),
60
+ labels: Schema.Struct({
61
+ average: rich,
62
+ best: rich,
63
+ brake: TextSchema,
64
+ early: rich,
65
+ lastTime: rich,
66
+ reactionDistance: rich,
67
+ start: TextSchema,
68
+ viewLabel: TextSchema,
69
+ }),
70
+ }));
71
+ }
72
+ /**
73
+ * The props of the braking and stopping labs. No prop states the conclusion a
74
+ * lab leads to, so none holds answer state.
75
+ */
76
+ export function brakingVisuals(rich) {
77
+ return {
78
+ BrakeHeatLab: brakeHeatLab(rich),
79
+ BrakingSurfaceLab: brakingSurfaceLab(rich),
80
+ FollowingDistanceLab: followingDistanceLab(rich),
81
+ ReactionTimeLab: reactionTimeLab(rich),
82
+ };
83
+ }
@@ -0,0 +1,36 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the circular motion labs. No prop states the conclusion a lab
5
+ * leads to, so none holds answer state.
6
+ */
7
+ export declare function circularVisuals<E>(rich: RichSlot<E>): {
8
+ SatelliteOrbitCircularLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly acceleration: RichSlot<E>;
13
+ readonly chooseOrbit: Schema.Trimmed;
14
+ readonly orbits: Schema.$Record<Schema.Literals<readonly ["station", "gps", "geostationary"]>, RichSlot<E>>;
15
+ readonly period: RichSlot<E>;
16
+ readonly radius: RichSlot<E>;
17
+ readonly speed: RichSlot<E>;
18
+ readonly viewLabel: Schema.Trimmed;
19
+ }>;
20
+ }>, "figure">;
21
+ StringWhirlReleaseLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
22
+ readonly description: RichSlot<E>;
23
+ readonly title: RichSlot<E>;
24
+ readonly labels: Schema.Struct<{
25
+ readonly acceleration: RichSlot<E>;
26
+ readonly chooseRelease: Schema.Trimmed;
27
+ readonly period: RichSlot<E>;
28
+ readonly radius: RichSlot<E>;
29
+ readonly releases: Schema.$Record<Schema.Literals<readonly ["east", "north", "west", "south"]>, RichSlot<E>>;
30
+ readonly speed: RichSlot<E>;
31
+ readonly viewLabel: Schema.Trimmed;
32
+ }>;
33
+ readonly period: Schema.Finite;
34
+ readonly radius: Schema.Finite;
35
+ }>, "figure">;
36
+ };
@@ -0,0 +1,51 @@
1
+ import { Schema } from "effect";
2
+ import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /**
5
+ * Props of `SatelliteOrbitCircularLab`: three real satellites in circular
6
+ * orbits drawn to scale around the Earth.
7
+ */
8
+ function satelliteOrbitCircularLab(rich) {
9
+ return figure(Schema.Struct({
10
+ ...cardFields(rich),
11
+ labels: Schema.Struct({
12
+ acceleration: rich,
13
+ chooseOrbit: TextSchema,
14
+ orbits: byIds(["station", "gps", "geostationary"], rich),
15
+ period: rich,
16
+ radius: rich,
17
+ speed: rich,
18
+ viewLabel: TextSchema,
19
+ }),
20
+ }));
21
+ }
22
+ /**
23
+ * Props of `StringWhirlReleaseLab`: a ball whirled on a string, seen from
24
+ * above, let go at a point the learner picks.
25
+ */
26
+ function stringWhirlReleaseLab(rich) {
27
+ return figure(Schema.Struct({
28
+ ...cardFields(rich),
29
+ labels: Schema.Struct({
30
+ acceleration: rich,
31
+ chooseRelease: TextSchema,
32
+ period: rich,
33
+ radius: rich,
34
+ releases: byIds(["east", "north", "west", "south"], rich),
35
+ speed: rich,
36
+ viewLabel: TextSchema,
37
+ }),
38
+ period: Schema.Finite,
39
+ radius: Schema.Finite,
40
+ }));
41
+ }
42
+ /**
43
+ * The props of the circular motion labs. No prop states the conclusion a lab
44
+ * leads to, so none holds answer state.
45
+ */
46
+ export function circularVisuals(rich) {
47
+ return {
48
+ SatelliteOrbitCircularLab: satelliteOrbitCircularLab(rich),
49
+ StringWhirlReleaseLab: stringWhirlReleaseLab(rich),
50
+ };
51
+ }