@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.
Files changed (49) hide show
  1. package/dist/math/bounds.js +6 -3
  2. package/dist/math/formula/contour.d.ts +5 -11
  3. package/dist/math/formula/contour.js +48 -57
  4. package/dist/math/formula/plane.d.ts +7 -0
  5. package/dist/math/formula/plane.js +23 -8
  6. package/dist/math/formula/region.js +3 -2
  7. package/dist/math/formula/scan.d.ts +13 -0
  8. package/dist/math/formula/scan.js +45 -0
  9. package/dist/visual/biology/physiology.d.ts +85 -0
  10. package/dist/visual/biology/physiology.js +105 -0
  11. package/dist/visual/biology/plant.d.ts +121 -0
  12. package/dist/visual/biology/plant.js +160 -0
  13. package/dist/visual/biology.d.ts +16 -16
  14. package/dist/visual/biology.js +2 -2
  15. package/dist/visual/catalog.d.ts +834 -28
  16. package/dist/visual/catalog.js +26 -0
  17. package/dist/visual/chemistry/atom.d.ts +2 -2
  18. package/dist/visual/chemistry/atom.js +2 -2
  19. package/dist/visual/mathematics/function.d.ts +4 -4
  20. package/dist/visual/mathematics/function.js +4 -4
  21. package/dist/visual/mathematics/geometry.d.ts +1 -1
  22. package/dist/visual/mathematics/geometry.js +1 -1
  23. package/dist/visual/physics/circuit.d.ts +75 -0
  24. package/dist/visual/physics/circuit.js +86 -0
  25. package/dist/visual/physics/dynamics.d.ts +110 -0
  26. package/dist/visual/physics/dynamics.js +134 -0
  27. package/dist/visual/physics/electronics.d.ts +59 -0
  28. package/dist/visual/physics/electronics.js +71 -0
  29. package/dist/visual/physics/field.d.ts +48 -0
  30. package/dist/visual/physics/field.js +60 -0
  31. package/dist/visual/physics/fluid.d.ts +68 -0
  32. package/dist/visual/physics/fluid.js +83 -0
  33. package/dist/visual/physics/gravity.d.ts +38 -0
  34. package/dist/visual/physics/gravity.js +47 -0
  35. package/dist/visual/physics/heat.d.ts +54 -0
  36. package/dist/visual/physics/heat.js +66 -0
  37. package/dist/visual/physics/light.d.ts +75 -0
  38. package/dist/visual/physics/light.js +90 -0
  39. package/dist/visual/physics/nuclear.d.ts +57 -0
  40. package/dist/visual/physics/nuclear.js +69 -0
  41. package/dist/visual/physics/parabolic.d.ts +2 -2
  42. package/dist/visual/physics/parabolic.js +2 -2
  43. package/dist/visual/physics/reading.d.ts +52 -0
  44. package/dist/visual/physics/reading.js +61 -0
  45. package/dist/visual/physics/wave.d.ts +70 -0
  46. package/dist/visual/physics/wave.js +85 -0
  47. package/dist/visual/politics.d.ts +1 -1
  48. package/dist/visual/politics.js +1 -1
  49. package/package.json +1 -1
@@ -0,0 +1,90 @@
1
+ import { Schema } from "effect";
2
+ import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /** Props of `GlassBlockLab`: a ray box aims a narrow beam at the top face of a rectangular glass block. */
5
+ function glassBlockLab(rich) {
6
+ return figure(Schema.Struct({
7
+ ...cardFields(rich),
8
+ incidence: Schema.Finite,
9
+ index: Schema.Finite,
10
+ labels: Schema.Struct({
11
+ critical: rich,
12
+ incidence: rich,
13
+ incidenceName: TextSchema,
14
+ next: rich,
15
+ outcome: rich,
16
+ reflected: rich,
17
+ refracted: rich,
18
+ refraction: rich,
19
+ viewLabel: TextSchema,
20
+ }),
21
+ }));
22
+ }
23
+ /** Props of `ApparentDepthLab`: a coin on the floor of a glass container holding one or more liquids in layers, seen straight down by an eye above. */
24
+ function apparentDepthLab(rich) {
25
+ return figure(Schema.Struct({
26
+ ...cardFields(rich),
27
+ labels: Schema.Struct({
28
+ apparent: rich,
29
+ image: rich,
30
+ liquids: byIds(["water", "oil", "glycerine", "alcohol"], rich),
31
+ real: rich,
32
+ top: TextSchema,
33
+ viewLabel: TextSchema,
34
+ }),
35
+ layers: Schema.NonEmptyArray(Schema.Struct({
36
+ index: Schema.Finite,
37
+ liquid: Schema.Literals(["water", "oil", "glycerine", "alcohol"]),
38
+ thickness: Schema.Finite,
39
+ })),
40
+ }));
41
+ }
42
+ /** Props of `ConvexLensLab`: an object arrow in front of a convex lens on an optical bench. */
43
+ function convexLensLab(rich) {
44
+ return figure(Schema.Struct({
45
+ ...cardFields(rich),
46
+ focal: Schema.Finite,
47
+ labels: Schema.Struct({
48
+ distance: rich,
49
+ distanceName: TextSchema,
50
+ image: rich,
51
+ magnification: rich,
52
+ nature: rich,
53
+ noImage: rich,
54
+ presets: TextSchema,
55
+ real: rich,
56
+ viewLabel: TextSchema,
57
+ virtual: rich,
58
+ }),
59
+ object: Schema.Finite,
60
+ presets: Schema.optionalKey(Schema.Array(Schema.Finite)),
61
+ }));
62
+ }
63
+ /** Props of `TelescopeLab`: an astronomical telescope in normal adjustment, drawn to scale with a magnified view of its eyepiece end. */
64
+ function telescopeLab(rich) {
65
+ return figure(Schema.Struct({
66
+ ...cardFields(rich),
67
+ eyepiecePower: Schema.Finite,
68
+ labels: Schema.Struct({
69
+ eyepiece: rich,
70
+ eyepieceName: TextSchema,
71
+ length: rich,
72
+ magnification: rich,
73
+ objective: rich,
74
+ viewLabel: TextSchema,
75
+ }),
76
+ objectivePower: Schema.Finite,
77
+ }));
78
+ }
79
+ /**
80
+ * The props of the light labs. Each prop is a value from the item the lab
81
+ * draws, never the conclusion it leads to, so none holds answer state.
82
+ */
83
+ export function lightVisuals(rich) {
84
+ return {
85
+ GlassBlockLab: glassBlockLab(rich),
86
+ ApparentDepthLab: apparentDepthLab(rich),
87
+ ConvexLensLab: convexLensLab(rich),
88
+ TelescopeLab: telescopeLab(rich),
89
+ };
90
+ }
@@ -0,0 +1,57 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the nuclear and quantum physics 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 nuclearVisuals<E>(rich: RichSlot<E>): {
8
+ HalfLifeCounterLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly background: Schema.Finite;
12
+ readonly first: Schema.Finite;
13
+ readonly labels: Schema.Struct<{
14
+ readonly end: RichSlot<E>;
15
+ readonly halfLife: RichSlot<E>;
16
+ readonly start: RichSlot<E>;
17
+ readonly viewLabel: Schema.Trimmed;
18
+ }>;
19
+ readonly later: Schema.Finite;
20
+ readonly time: Schema.Finite;
21
+ }>, "figure">;
22
+ FissionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
23
+ readonly description: RichSlot<E>;
24
+ readonly title: RichSlot<E>;
25
+ readonly fragments: Schema.Tuple<readonly [Schema.Finite, Schema.Finite]>;
26
+ readonly labels: Schema.Struct<{
27
+ readonly defect: RichSlot<E>;
28
+ readonly energy: RichSlot<E>;
29
+ readonly kilograms: RichSlot<E>;
30
+ readonly viewLabel: Schema.Trimmed;
31
+ }>;
32
+ readonly lightSpeed: Schema.Finite;
33
+ readonly neutron: Schema.Finite;
34
+ readonly parent: Schema.Finite;
35
+ readonly released: Schema.Finite;
36
+ readonly unit: Schema.Finite;
37
+ }>, "figure">;
38
+ PhotoelectricLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
39
+ readonly description: RichSlot<E>;
40
+ readonly title: RichSlot<E>;
41
+ readonly charge: Schema.Finite;
42
+ readonly labels: Schema.Struct<{
43
+ readonly energy: RichSlot<E>;
44
+ readonly intensity: RichSlot<E>;
45
+ readonly intensityName: Schema.Trimmed;
46
+ readonly kinetic: RichSlot<E>;
47
+ readonly none: RichSlot<E>;
48
+ readonly viewLabel: Schema.Trimmed;
49
+ readonly wavelength: RichSlot<E>;
50
+ readonly wavelengthName: Schema.Trimmed;
51
+ }>;
52
+ readonly lightSpeed: Schema.Finite;
53
+ readonly planck: Schema.Finite;
54
+ readonly wavelength: Schema.Finite;
55
+ readonly workFunction: Schema.Finite;
56
+ }>, "figure">;
57
+ };
@@ -0,0 +1,69 @@
1
+ import { Schema } from "effect";
2
+ import { cardFields, TextSchema } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /** Props of `HalfLifeCounterLab`: a Geiger-Muller counter in front of a radioactive sample records its rate over time. */
5
+ function halfLifeCounterLab(rich) {
6
+ return figure(Schema.Struct({
7
+ ...cardFields(rich),
8
+ background: Schema.Finite,
9
+ first: Schema.Finite,
10
+ labels: Schema.Struct({
11
+ end: rich,
12
+ halfLife: rich,
13
+ start: rich,
14
+ viewLabel: TextSchema,
15
+ }),
16
+ later: Schema.Finite,
17
+ time: Schema.Finite,
18
+ }));
19
+ }
20
+ /** Props of `FissionLab`: a slow neutron splits a uranium nucleus into two fragments and a few fast neutrons. */
21
+ function fissionLab(rich) {
22
+ return figure(Schema.Struct({
23
+ ...cardFields(rich),
24
+ fragments: Schema.Tuple([Schema.Finite, Schema.Finite]),
25
+ labels: Schema.Struct({
26
+ defect: rich,
27
+ energy: rich,
28
+ kilograms: rich,
29
+ viewLabel: TextSchema,
30
+ }),
31
+ lightSpeed: Schema.Finite,
32
+ neutron: Schema.Finite,
33
+ parent: Schema.Finite,
34
+ released: Schema.Finite,
35
+ unit: Schema.Finite,
36
+ }));
37
+ }
38
+ /** Props of `PhotoelectricLab`: light falls on a metal plate in an evacuated tube. */
39
+ function photoelectricLab(rich) {
40
+ return figure(Schema.Struct({
41
+ ...cardFields(rich),
42
+ charge: Schema.Finite,
43
+ labels: Schema.Struct({
44
+ energy: rich,
45
+ intensity: rich,
46
+ intensityName: TextSchema,
47
+ kinetic: rich,
48
+ none: rich,
49
+ viewLabel: TextSchema,
50
+ wavelength: rich,
51
+ wavelengthName: TextSchema,
52
+ }),
53
+ lightSpeed: Schema.Finite,
54
+ planck: Schema.Finite,
55
+ wavelength: Schema.Finite,
56
+ workFunction: Schema.Finite,
57
+ }));
58
+ }
59
+ /**
60
+ * The props of the nuclear and quantum physics labs. Each prop is a value from the item the lab
61
+ * draws, never the conclusion it leads to, so none holds answer state.
62
+ */
63
+ export function nuclearVisuals(rich) {
64
+ return {
65
+ HalfLifeCounterLab: halfLifeCounterLab(rich),
66
+ FissionLab: fissionLab(rich),
67
+ PhotoelectricLab: photoelectricLab(rich),
68
+ };
69
+ }
@@ -26,7 +26,7 @@ export declare function parabolicVisuals<E>(rich: RichSlot<E>): {
26
26
  ParabolicMovementLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
27
27
  readonly decimalSeparator: Schema.optionalKey<Schema.Literals<readonly ["comma", "dot"]>>;
28
28
  readonly defaultLaunchId: Schema.optionalKey<Schema.Literals<readonly ["low-angle", "balanced-angle", "high-angle"]>>;
29
- readonly description: Schema.optionalKey<RichSlot<E>>;
29
+ readonly description: RichSlot<E>;
30
30
  readonly labels: Schema.Struct<{
31
31
  readonly chooseLaunch: Schema.Trimmed;
32
32
  readonly factLabels: Schema.Struct<{
@@ -37,6 +37,6 @@ export declare function parabolicVisuals<E>(rich: RichSlot<E>): {
37
37
  }>;
38
38
  readonly viewLabel: Schema.Trimmed;
39
39
  }>;
40
- readonly title: Schema.optionalKey<RichSlot<E>>;
40
+ readonly title: RichSlot<E>;
41
41
  }>, "figure">;
42
42
  };
@@ -10,7 +10,7 @@ function parabolicLab(rich) {
10
10
  return figure(Schema.Struct({
11
11
  decimalSeparator: Schema.optionalKey(DecimalSeparatorSchema),
12
12
  defaultLaunchId: Schema.optionalKey(Schema.Literals(LAUNCHES)),
13
- description: Schema.optionalKey(rich),
13
+ description: rich,
14
14
  labels: Schema.Struct({
15
15
  chooseLaunch: TextSchema,
16
16
  factLabels: Schema.Struct({
@@ -21,7 +21,7 @@ function parabolicLab(rich) {
21
21
  }),
22
22
  viewLabel: TextSchema,
23
23
  }),
24
- title: Schema.optionalKey(rich),
24
+ title: rich,
25
25
  }));
26
26
  }
27
27
  /** Props of `ParabolicMovementAnalysisLab`: the components of a projectile's velocity. */
@@ -0,0 +1,52 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the measurement and graphs 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 readingVisuals<E>(rich: RichSlot<E>): {
8
+ MotionAreaLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly displacement: RichSlot<E>;
13
+ readonly distance: RichSlot<E>;
14
+ readonly viewLabel: Schema.Trimmed;
15
+ }>;
16
+ readonly start: Schema.Finite;
17
+ readonly stretches: Schema.$Array<Schema.Struct<{
18
+ readonly duration: Schema.Finite;
19
+ readonly end: Schema.Finite;
20
+ }>>;
21
+ }>, "figure">;
22
+ PendulumGraphLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
23
+ readonly description: RichSlot<E>;
24
+ readonly title: RichSlot<E>;
25
+ readonly gradient: Schema.Finite;
26
+ readonly labels: Schema.Struct<{
27
+ readonly gravity: RichSlot<E>;
28
+ readonly lengthIntercept: RichSlot<E>;
29
+ readonly measure: Schema.Trimmed;
30
+ readonly measures: Schema.$Record<Schema.Literals<readonly ["top", "centre"]>, RichSlot<E>>;
31
+ readonly periodIntercept: RichSlot<E>;
32
+ readonly viewLabel: Schema.Trimmed;
33
+ }>;
34
+ readonly radius: Schema.Finite;
35
+ }>, "figure">;
36
+ ReadingSpreadLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
37
+ readonly description: RichSlot<E>;
38
+ readonly title: RichSlot<E>;
39
+ readonly actual: Schema.Finite;
40
+ readonly labels: Schema.Struct<{
41
+ readonly mean: RichSlot<E>;
42
+ readonly offset: RichSlot<E>;
43
+ readonly range: RichSlot<E>;
44
+ readonly student: Schema.Trimmed;
45
+ readonly viewLabel: Schema.Trimmed;
46
+ }>;
47
+ readonly students: Schema.$Array<Schema.Struct<{
48
+ readonly name: Schema.String;
49
+ readonly readings: Schema.NonEmptyArray<Schema.Finite>;
50
+ }>>;
51
+ }>, "figure">;
52
+ };
@@ -0,0 +1,61 @@
1
+ import { Schema } from "effect";
2
+ import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /** Props of `MotionAreaLab`: a car drives a straight road through stretches of steady speeding up, steady speed and slowing down, and its velocity-time graph fills in below it. */
5
+ function motionAreaLab(rich) {
6
+ return figure(Schema.Struct({
7
+ ...cardFields(rich),
8
+ labels: Schema.Struct({
9
+ displacement: rich,
10
+ distance: rich,
11
+ viewLabel: TextSchema,
12
+ }),
13
+ start: Schema.Finite,
14
+ stretches: Schema.Array(Schema.Struct({ duration: Schema.Finite, end: Schema.Finite })),
15
+ }));
16
+ }
17
+ /** Props of `PendulumGraphLab`: a simple pendulum and its graph of T² against the measured length. */
18
+ function pendulumGraphLab(rich) {
19
+ return figure(Schema.Struct({
20
+ ...cardFields(rich),
21
+ gradient: Schema.Finite,
22
+ labels: Schema.Struct({
23
+ gravity: rich,
24
+ lengthIntercept: rich,
25
+ measure: TextSchema,
26
+ measures: byIds(["top", "centre"], rich),
27
+ periodIntercept: rich,
28
+ viewLabel: TextSchema,
29
+ }),
30
+ radius: Schema.Finite,
31
+ }));
32
+ }
33
+ /** Props of `ReadingSpreadLab`: several students measure the same object, each with an own instrument, and their readings sit as dots on a magnified scale against the actual value. */
34
+ function readingSpreadLab(rich) {
35
+ return figure(Schema.Struct({
36
+ ...cardFields(rich),
37
+ actual: Schema.Finite,
38
+ labels: Schema.Struct({
39
+ mean: rich,
40
+ offset: rich,
41
+ range: rich,
42
+ student: TextSchema,
43
+ viewLabel: TextSchema,
44
+ }),
45
+ students: Schema.Array(Schema.Struct({
46
+ name: Schema.String,
47
+ readings: Schema.NonEmptyArray(Schema.Finite),
48
+ })),
49
+ }));
50
+ }
51
+ /**
52
+ * The props of the measurement and graphs labs. Each prop is a value from the item the lab
53
+ * draws, never the conclusion it leads to, so none holds answer state.
54
+ */
55
+ export function readingVisuals(rich) {
56
+ return {
57
+ MotionAreaLab: motionAreaLab(rich),
58
+ PendulumGraphLab: pendulumGraphLab(rich),
59
+ ReadingSpreadLab: readingSpreadLab(rich),
60
+ };
61
+ }
@@ -0,0 +1,70 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the wave 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 waveVisuals<E>(rich: RichSlot<E>): {
8
+ EchoLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly boatSpeed: Schema.Finite;
12
+ readonly echoTime: Schema.Finite;
13
+ readonly labels: Schema.Struct<{
14
+ readonly back: RichSlot<E>;
15
+ readonly boat: RichSlot<E>;
16
+ readonly out: RichSlot<E>;
17
+ readonly start: RichSlot<E>;
18
+ readonly viewLabel: Schema.Trimmed;
19
+ }>;
20
+ readonly soundSpeed: Schema.Finite;
21
+ }>, "figure">;
22
+ DoubleSlitLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
23
+ readonly description: RichSlot<E>;
24
+ readonly title: RichSlot<E>;
25
+ readonly distance: Schema.Finite;
26
+ readonly labels: Schema.Struct<{
27
+ readonly count: RichSlot<E>;
28
+ readonly distance: RichSlot<E>;
29
+ readonly distanceName: Schema.Trimmed;
30
+ readonly separation: RichSlot<E>;
31
+ readonly separationName: Schema.Trimmed;
32
+ readonly spacing: RichSlot<E>;
33
+ readonly viewLabel: Schema.Trimmed;
34
+ }>;
35
+ readonly separation: Schema.Finite;
36
+ readonly span: Schema.optionalKey<Schema.Finite>;
37
+ readonly wavelength: Schema.Finite;
38
+ }>, "figure">;
39
+ SpeakerInterferenceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
40
+ readonly description: RichSlot<E>;
41
+ readonly title: RichSlot<E>;
42
+ readonly distance: Schema.Finite;
43
+ readonly frequency: Schema.Finite;
44
+ readonly labels: Schema.Struct<{
45
+ readonly frequency: RichSlot<E>;
46
+ readonly frequencyName: Schema.Trimmed;
47
+ readonly spacing: RichSlot<E>;
48
+ readonly viewLabel: Schema.Trimmed;
49
+ readonly wavelength: RichSlot<E>;
50
+ }>;
51
+ readonly separation: Schema.Finite;
52
+ readonly speed: Schema.Finite;
53
+ }>, "figure">;
54
+ RippleTankLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
55
+ readonly description: RichSlot<E>;
56
+ readonly title: RichSlot<E>;
57
+ readonly deepSpeed: Schema.Finite;
58
+ readonly incidence: Schema.Finite;
59
+ readonly labels: Schema.Struct<{
60
+ readonly frequency: RichSlot<E>;
61
+ readonly incidence: RichSlot<E>;
62
+ readonly incidenceName: Schema.Trimmed;
63
+ readonly refraction: RichSlot<E>;
64
+ readonly viewLabel: Schema.Trimmed;
65
+ readonly wavelength: RichSlot<E>;
66
+ }>;
67
+ readonly shallowSpeed: Schema.Finite;
68
+ readonly wavelength: Schema.Finite;
69
+ }>, "figure">;
70
+ };
@@ -0,0 +1,85 @@
1
+ import { Schema } from "effect";
2
+ import { cardFields, TextSchema } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /** Props of `EchoLab`: a boat heading for a cliff sounds its horn and hears the echo a few seconds later. */
5
+ function echoLab(rich) {
6
+ return figure(Schema.Struct({
7
+ ...cardFields(rich),
8
+ boatSpeed: Schema.Finite,
9
+ echoTime: Schema.Finite,
10
+ labels: Schema.Struct({
11
+ back: rich,
12
+ boat: rich,
13
+ out: rich,
14
+ start: rich,
15
+ viewLabel: TextSchema,
16
+ }),
17
+ soundSpeed: Schema.Finite,
18
+ }));
19
+ }
20
+ /** Props of `DoubleSlitLab`: young's double slit on an optics bench: a laser lights two narrow slits, and the light from them overlaps on a screen in bright and dark fringes x = λD/a apart. */
21
+ function doubleSlitLab(rich) {
22
+ return figure(Schema.Struct({
23
+ ...cardFields(rich),
24
+ distance: Schema.Finite,
25
+ labels: Schema.Struct({
26
+ count: rich,
27
+ distance: rich,
28
+ distanceName: TextSchema,
29
+ separation: rich,
30
+ separationName: TextSchema,
31
+ spacing: rich,
32
+ viewLabel: TextSchema,
33
+ }),
34
+ separation: Schema.Finite,
35
+ span: Schema.optionalKey(Schema.Finite),
36
+ wavelength: Schema.Finite,
37
+ }));
38
+ }
39
+ /** Props of `SpeakerInterferenceLab`: two loudspeakers on one signal generator, seen from above, and a student walking along a line in front of them with a sound meter. */
40
+ function speakerInterferenceLab(rich) {
41
+ return figure(Schema.Struct({
42
+ ...cardFields(rich),
43
+ distance: Schema.Finite,
44
+ frequency: Schema.Finite,
45
+ labels: Schema.Struct({
46
+ frequency: rich,
47
+ frequencyName: TextSchema,
48
+ spacing: rich,
49
+ viewLabel: TextSchema,
50
+ wavelength: rich,
51
+ }),
52
+ separation: Schema.Finite,
53
+ speed: Schema.Finite,
54
+ }));
55
+ }
56
+ /** Props of `RippleTankLab`: a ripple tank seen from above, with a glass plate under one half that makes the water shallow. */
57
+ function rippleTankLab(rich) {
58
+ return figure(Schema.Struct({
59
+ ...cardFields(rich),
60
+ deepSpeed: Schema.Finite,
61
+ incidence: Schema.Finite,
62
+ labels: Schema.Struct({
63
+ frequency: rich,
64
+ incidence: rich,
65
+ incidenceName: TextSchema,
66
+ refraction: rich,
67
+ viewLabel: TextSchema,
68
+ wavelength: rich,
69
+ }),
70
+ shallowSpeed: Schema.Finite,
71
+ wavelength: Schema.Finite,
72
+ }));
73
+ }
74
+ /**
75
+ * The props of the wave labs. Each prop is a value from the item the lab
76
+ * draws, never the conclusion it leads to, so none holds answer state.
77
+ */
78
+ export function waveVisuals(rich) {
79
+ return {
80
+ EchoLab: echoLab(rich),
81
+ DoubleSlitLab: doubleSlitLab(rich),
82
+ SpeakerInterferenceLab: speakerInterferenceLab(rich),
83
+ RippleTankLab: rippleTankLab(rich),
84
+ };
85
+ }
@@ -39,7 +39,7 @@ export declare function politicsVisuals<E>(rich: RichSlot<E>): {
39
39
  }>;
40
40
  }>, "figure">;
41
41
  NepotismStage: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
42
- readonly description: Schema.optionalKey<RichSlot<E>>;
42
+ readonly description: RichSlot<E>;
43
43
  readonly labels: Schema.Struct<{
44
44
  readonly delivery: RichSlot<E>;
45
45
  readonly election: RichSlot<E>;
@@ -19,7 +19,7 @@ function axisChart(rich, labels) {
19
19
  /** Props of `NepotismStage`: the three stages of a good democratic process. */
20
20
  function nepotismStage(rich) {
21
21
  return figure(Schema.Struct({
22
- description: Schema.optionalKey(rich),
22
+ description: rich,
23
23
  labels: Schema.Struct({
24
24
  delivery: rich,
25
25
  election: rich,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nakafa/aksara-contracts",
3
- "version": "8.0.4",
3
+ "version": "8.2.0",
4
4
  "description": "Schemas and verification contracts for Nakafa content releases.",
5
5
  "homepage": "https://github.com/nakafaai/aksara#readme",
6
6
  "license": "SEE LICENSE IN LICENSE",