@nakafa/aksara-contracts 6.5.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 (159) hide show
  1. package/dist/assessment/catalog.d.ts +18 -5
  2. package/dist/assessment/catalog.js +18 -8
  3. package/dist/assessment/choice.d.ts +10 -0
  4. package/dist/assessment/closure.d.ts +2 -1
  5. package/dist/assessment/closure.js +43 -62
  6. package/dist/assessment/document.d.ts +18 -0
  7. package/dist/assessment/document.js +10 -0
  8. package/dist/assessment/figure.d.ts +25 -2676
  9. package/dist/assessment/figure.js +17 -216
  10. package/dist/assessment/hash.d.ts +274 -4
  11. package/dist/assessment/inline.d.ts +25 -0
  12. package/dist/assessment/inline.js +22 -3
  13. package/dist/assessment/interaction.d.ts +10 -0
  14. package/dist/assessment/item.d.ts +864 -0
  15. package/dist/assessment/item.js +10 -2
  16. package/dist/assessment/locales.d.ts +10 -0
  17. package/dist/assessment/locales.js +58 -0
  18. package/dist/assessment/paper.d.ts +1349 -12
  19. package/dist/assessment/paper.js +93 -9
  20. package/dist/assessment/part.d.ts +5 -0
  21. package/dist/assessment/profile.d.ts +4 -4
  22. package/dist/assessment/rows.d.ts +1409 -0
  23. package/dist/assessment/rows.js +44 -0
  24. package/dist/assessment/scalar.d.ts +1 -1
  25. package/dist/assessment/scoring.d.ts +1 -1
  26. package/dist/assessment/snapshot.d.ts +372 -20
  27. package/dist/assessment/structure.d.ts +6 -0
  28. package/dist/assessment/structure.js +22 -2
  29. package/dist/locale.d.ts +9 -9
  30. package/dist/locale.js +4 -3
  31. package/dist/program/snapshot/hash.d.ts +2 -2
  32. package/dist/program/snapshot/spec.d.ts +2 -2
  33. package/dist/projection/material.d.ts +10 -0
  34. package/dist/projection/material.js +1 -1
  35. package/dist/quran/attribution.d.ts +2 -2
  36. package/dist/quran/identity.d.ts +31 -10
  37. package/dist/quran/identity.js +15 -3
  38. package/dist/quran/provenance.d.ts +16 -16
  39. package/dist/quran/provenance.js +4 -1
  40. package/dist/quran/snapshot/hash.d.ts +2 -2
  41. package/dist/quran/snapshot/row/hash.d.ts +48 -15
  42. package/dist/quran/snapshot/row.d.ts +18 -8
  43. package/dist/quran/snapshot/spec.d.ts +2 -2
  44. package/dist/quran/source.d.ts +17 -7
  45. package/dist/quran/source.js +13 -1
  46. package/dist/quran/spec.d.ts +4 -4
  47. package/dist/quran/spec.js +2 -1
  48. package/dist/release/current/evidence.d.ts +9 -9
  49. package/dist/release/current/state.d.ts +11 -11
  50. package/dist/release/hash.d.ts +2 -2
  51. package/dist/release/identity.d.ts +1 -1
  52. package/dist/release/lifecycle.d.ts +7 -7
  53. package/dist/release/policy.d.ts +1 -1
  54. package/dist/release/snapshot/data.d.ts +36 -11
  55. package/dist/release/snapshot/evidence/assessment.d.ts +1 -1
  56. package/dist/release/snapshot/evidence/program.d.ts +1 -1
  57. package/dist/release/snapshot/evidence/quran.d.ts +1 -1
  58. package/dist/release/snapshot/evidence.d.ts +3 -3
  59. package/dist/release/snapshot/verify.d.ts +179 -12
  60. package/dist/release/spec.d.ts +13 -13
  61. package/dist/release/verify.d.ts +2 -2
  62. package/dist/runtime/spec.d.ts +6 -6
  63. package/dist/runtime/verify.d.ts +4 -4
  64. package/dist/transport/group.d.ts +108 -33
  65. package/dist/transport/request.d.ts +1166 -114
  66. package/dist/transport/response.d.ts +64 -64
  67. package/dist/transport/snapshot.d.ts +72 -22
  68. package/dist/visual/base/layout.d.ts +27 -0
  69. package/dist/visual/base/layout.js +35 -0
  70. package/dist/visual/base/math.d.ts +523 -0
  71. package/dist/visual/base/math.js +72 -0
  72. package/dist/visual/base/media.d.ts +13 -0
  73. package/dist/visual/base/media.js +25 -0
  74. package/dist/visual/biology/bacteria.d.ts +55 -0
  75. package/dist/visual/biology/bacteria.js +79 -0
  76. package/dist/visual/biology/cell.d.ts +89 -0
  77. package/dist/visual/biology/cell.js +95 -0
  78. package/dist/visual/biology/climate.d.ts +75 -0
  79. package/dist/visual/biology/climate.js +94 -0
  80. package/dist/visual/biology/ecology.d.ts +75 -0
  81. package/dist/visual/biology/ecology.js +94 -0
  82. package/dist/visual/biology.d.ts +203 -0
  83. package/dist/visual/biology.js +108 -0
  84. package/dist/visual/card.d.ts +32 -0
  85. package/dist/visual/card.js +30 -0
  86. package/dist/visual/catalog.d.ts +3372 -0
  87. package/dist/visual/catalog.js +119 -0
  88. package/dist/visual/chemistry/atom.d.ts +79 -0
  89. package/dist/visual/chemistry/atom.js +109 -0
  90. package/dist/visual/chemistry/balance.d.ts +79 -0
  91. package/dist/visual/chemistry/balance.js +128 -0
  92. package/dist/visual/chemistry/bonding.d.ts +80 -0
  93. package/dist/visual/chemistry/bonding.js +147 -0
  94. package/dist/visual/chemistry/discovery.d.ts +96 -0
  95. package/dist/visual/chemistry/discovery.js +137 -0
  96. package/dist/visual/chemistry/electron.d.ts +41 -0
  97. package/dist/visual/chemistry/electron.js +69 -0
  98. package/dist/visual/chemistry/laws.d.ts +86 -0
  99. package/dist/visual/chemistry/laws.js +117 -0
  100. package/dist/visual/chemistry/particles.d.ts +114 -0
  101. package/dist/visual/chemistry/particles.js +149 -0
  102. package/dist/visual/chemistry/periodic.d.ts +52 -0
  103. package/dist/visual/chemistry/periodic.js +85 -0
  104. package/dist/visual/chemistry/reaction.d.ts +60 -0
  105. package/dist/visual/chemistry/reaction.js +76 -0
  106. package/dist/visual/entry.d.ts +42 -0
  107. package/dist/visual/entry.js +48 -0
  108. package/dist/visual/mathematics/chart.d.ts +30 -0
  109. package/dist/{assessment → visual/mathematics}/chart.js +26 -18
  110. package/dist/visual/mathematics/charts.d.ts +118 -0
  111. package/dist/visual/mathematics/charts.js +100 -0
  112. package/dist/visual/mathematics/function.d.ts +82 -0
  113. package/dist/visual/mathematics/function.js +102 -0
  114. package/dist/visual/mathematics/geometry.d.ts +222 -0
  115. package/dist/visual/mathematics/geometry.js +81 -0
  116. package/dist/visual/mathematics/line.d.ts +179 -0
  117. package/dist/visual/mathematics/line.js +156 -0
  118. package/dist/visual/mathematics/number.d.ts +21 -0
  119. package/dist/visual/mathematics/number.js +53 -0
  120. package/dist/visual/physics/braking.d.ts +62 -0
  121. package/dist/visual/physics/braking.js +83 -0
  122. package/dist/visual/physics/circular.d.ts +36 -0
  123. package/dist/visual/physics/circular.js +51 -0
  124. package/dist/visual/physics/efficiency.d.ts +93 -0
  125. package/dist/visual/physics/efficiency.js +129 -0
  126. package/dist/visual/physics/falling.d.ts +56 -0
  127. package/dist/visual/physics/falling.js +77 -0
  128. package/dist/visual/physics/force.d.ts +88 -0
  129. package/dist/visual/physics/force.js +115 -0
  130. package/dist/visual/physics/instrument.d.ts +93 -0
  131. package/dist/visual/physics/instrument.js +135 -0
  132. package/dist/visual/physics/measurement.d.ts +66 -0
  133. package/dist/visual/physics/measurement.js +85 -0
  134. package/dist/visual/physics/motion.d.ts +85 -0
  135. package/dist/visual/physics/motion.js +110 -0
  136. package/dist/visual/physics/parabolic.d.ts +42 -0
  137. package/dist/visual/physics/parabolic.js +56 -0
  138. package/dist/visual/physics/position.d.ts +87 -0
  139. package/dist/visual/physics/position.js +123 -0
  140. package/dist/visual/physics/power.d.ts +121 -0
  141. package/dist/visual/physics/power.js +162 -0
  142. package/dist/visual/physics/precision.d.ts +96 -0
  143. package/dist/visual/physics/precision.js +137 -0
  144. package/dist/visual/physics/product.d.ts +73 -0
  145. package/dist/visual/physics/product.js +96 -0
  146. package/dist/visual/physics/record.d.ts +34 -0
  147. package/dist/visual/physics/record.js +46 -0
  148. package/dist/visual/physics/relative.d.ts +55 -0
  149. package/dist/visual/physics/relative.js +76 -0
  150. package/dist/visual/physics/solar.d.ts +91 -0
  151. package/dist/visual/physics/solar.js +126 -0
  152. package/dist/visual/physics/vector.d.ts +103 -0
  153. package/dist/visual/physics/vector.js +123 -0
  154. package/dist/visual/physics/velocity.d.ts +112 -0
  155. package/dist/visual/physics/velocity.js +144 -0
  156. package/dist/visual/politics.d.ts +92 -0
  157. package/dist/visual/politics.js +76 -0
  158. package/package.json +13 -5
  159. package/dist/assessment/chart.d.ts +0 -62
@@ -0,0 +1,88 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the labs that add and resolve forces. No prop states the
5
+ * conclusion a lab leads to, so none holds answer state.
6
+ */
7
+ export declare function forceVisuals<E>(rich: RichSlot<E>): {
8
+ ForceTableResultantLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly angle: RichSlot<E>;
13
+ readonly angleName: Schema.Trimmed;
14
+ readonly direction: RichSlot<E>;
15
+ readonly resultant: RichSlot<E>;
16
+ readonly sumX: RichSlot<E>;
17
+ readonly sumY: RichSlot<E>;
18
+ readonly viewLabel: Schema.Trimmed;
19
+ }>;
20
+ readonly pulls: Schema.$Array<Schema.Struct<{
21
+ readonly angle: Schema.Finite;
22
+ readonly mass: Schema.Finite;
23
+ }>>;
24
+ }>, "figure">;
25
+ TugOfWarForceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
26
+ readonly description: RichSlot<E>;
27
+ readonly title: RichSlot<E>;
28
+ readonly labels: Schema.Struct<{
29
+ readonly left: RichSlot<E>;
30
+ readonly leftCount: RichSlot<E>;
31
+ readonly leftName: Schema.Trimmed;
32
+ readonly net: RichSlot<E>;
33
+ readonly right: RichSlot<E>;
34
+ readonly rightCount: RichSlot<E>;
35
+ readonly rightName: Schema.Trimmed;
36
+ readonly viewLabel: Schema.Trimmed;
37
+ }>;
38
+ readonly left: Schema.Finite;
39
+ readonly pull: Schema.Finite;
40
+ readonly right: Schema.Finite;
41
+ }>, "figure">;
42
+ TugboatResultantLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
43
+ readonly description: RichSlot<E>;
44
+ readonly title: RichSlot<E>;
45
+ readonly between: Schema.Finite;
46
+ readonly first: Schema.Finite;
47
+ readonly labels: Schema.Struct<{
48
+ readonly between: RichSlot<E>;
49
+ readonly betweenName: Schema.Trimmed;
50
+ readonly fromFirst: RichSlot<E>;
51
+ readonly fromLine: RichSlot<E>;
52
+ readonly resultant: RichSlot<E>;
53
+ readonly viewLabel: Schema.Trimmed;
54
+ }>;
55
+ readonly second: Schema.Finite;
56
+ }>, "figure">;
57
+ RampBlockComponentLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
58
+ readonly description: RichSlot<E>;
59
+ readonly title: RichSlot<E>;
60
+ readonly angle: Schema.Finite;
61
+ readonly distance: Schema.optionalKey<Schema.Finite>;
62
+ readonly friction: Schema.Finite;
63
+ readonly labels: Schema.Struct<{
64
+ readonly along: RichSlot<E>;
65
+ readonly angle: RichSlot<E>;
66
+ readonly angleName: Schema.Trimmed;
67
+ readonly into: RichSlot<E>;
68
+ readonly viewLabel: Schema.Trimmed;
69
+ readonly weight: RichSlot<E>;
70
+ readonly work: Schema.optionalKey<RichSlot<E>>;
71
+ }>;
72
+ readonly mass: Schema.Finite;
73
+ }>, "figure">;
74
+ KiteStringTensionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
75
+ readonly description: RichSlot<E>;
76
+ readonly title: RichSlot<E>;
77
+ readonly angle: Schema.Finite;
78
+ readonly labels: Schema.Struct<{
79
+ readonly across: RichSlot<E>;
80
+ readonly angle: RichSlot<E>;
81
+ readonly angleName: Schema.Trimmed;
82
+ readonly up: RichSlot<E>;
83
+ readonly viewLabel: Schema.Trimmed;
84
+ }>;
85
+ readonly length: Schema.Finite;
86
+ readonly tension: Schema.Finite;
87
+ }>, "figure">;
88
+ };
@@ -0,0 +1,115 @@
1
+ import { Schema } from "effect";
2
+ import { cardFields, TextSchema } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /** Props of `ForceTableResultantLab`: a force table on a lab bench. */
5
+ function forceTableResultantLab(rich) {
6
+ return figure(Schema.Struct({
7
+ ...cardFields(rich),
8
+ labels: Schema.Struct({
9
+ angle: rich,
10
+ angleName: TextSchema,
11
+ direction: rich,
12
+ resultant: rich,
13
+ sumX: rich,
14
+ sumY: rich,
15
+ viewLabel: TextSchema,
16
+ }),
17
+ pulls: Schema.Array(Schema.Struct({
18
+ angle: Schema.Finite,
19
+ mass: Schema.Finite.check(Schema.isGreaterThan(0)),
20
+ })),
21
+ }));
22
+ }
23
+ /** Props of `TugOfWarForceLab`: a tug of war at sunset. */
24
+ function tugOfWarForceLab(rich) {
25
+ return figure(Schema.Struct({
26
+ ...cardFields(rich),
27
+ labels: Schema.Struct({
28
+ left: rich,
29
+ leftCount: rich,
30
+ leftName: TextSchema,
31
+ net: rich,
32
+ right: rich,
33
+ rightCount: rich,
34
+ rightName: TextSchema,
35
+ viewLabel: TextSchema,
36
+ }),
37
+ left: Schema.Finite,
38
+ pull: Schema.Finite,
39
+ right: Schema.Finite,
40
+ }));
41
+ }
42
+ /**
43
+ * Props of `TugboatResultantLab`: two harbour tugs tow a bulk carrier, their
44
+ * cables opening at an angle.
45
+ */
46
+ function tugboatResultantLab(rich) {
47
+ return figure(Schema.Struct({
48
+ ...cardFields(rich),
49
+ between: Schema.Finite,
50
+ first: Schema.Finite,
51
+ labels: Schema.Struct({
52
+ between: rich,
53
+ betweenName: TextSchema,
54
+ fromFirst: rich,
55
+ fromLine: rich,
56
+ resultant: rich,
57
+ viewLabel: TextSchema,
58
+ }),
59
+ second: Schema.Finite,
60
+ }));
61
+ }
62
+ /**
63
+ * Props of `RampBlockComponentLab`: a wooden block on a pine plank hinged on a
64
+ * lab bench.
65
+ */
66
+ function rampBlockComponentLab(rich) {
67
+ return figure(Schema.Struct({
68
+ ...cardFields(rich),
69
+ angle: Schema.Finite,
70
+ distance: Schema.optionalKey(Schema.Finite),
71
+ friction: Schema.Finite,
72
+ labels: Schema.Struct({
73
+ along: rich,
74
+ angle: rich,
75
+ angleName: TextSchema,
76
+ into: rich,
77
+ viewLabel: TextSchema,
78
+ weight: rich,
79
+ work: Schema.optionalKey(rich),
80
+ }),
81
+ mass: Schema.Finite,
82
+ }));
83
+ }
84
+ /**
85
+ * Props of `KiteStringTensionLab`: a kite on a string tied to a stake, the wind
86
+ * carrying it downwind.
87
+ */
88
+ function kiteStringTensionLab(rich) {
89
+ return figure(Schema.Struct({
90
+ ...cardFields(rich),
91
+ angle: Schema.Finite,
92
+ labels: Schema.Struct({
93
+ across: rich,
94
+ angle: rich,
95
+ angleName: TextSchema,
96
+ up: rich,
97
+ viewLabel: TextSchema,
98
+ }),
99
+ length: Schema.Finite,
100
+ tension: Schema.Finite,
101
+ }));
102
+ }
103
+ /**
104
+ * The props of the labs that add and resolve forces. No prop states the
105
+ * conclusion a lab leads to, so none holds answer state.
106
+ */
107
+ export function forceVisuals(rich) {
108
+ return {
109
+ ForceTableResultantLab: forceTableResultantLab(rich),
110
+ TugOfWarForceLab: tugOfWarForceLab(rich),
111
+ TugboatResultantLab: tugboatResultantLab(rich),
112
+ RampBlockComponentLab: rampBlockComponentLab(rich),
113
+ KiteStringTensionLab: kiteStringTensionLab(rich),
114
+ };
115
+ }
@@ -0,0 +1,93 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the labs that read a measuring instrument. No prop states the
5
+ * conclusion a lab leads to, so none holds answer state.
6
+ */
7
+ export declare function instrumentVisuals<E>(rich: RichSlot<E>): {
8
+ MicrometerScrewLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly division: RichSlot<E>;
13
+ readonly reading: RichSlot<E>;
14
+ readonly size: Schema.Trimmed;
15
+ readonly sleeve: RichSlot<E>;
16
+ readonly viewLabel: Schema.Trimmed;
17
+ }>;
18
+ readonly thickness: Schema.optionalKey<Schema.Finite>;
19
+ }>, "figure">;
20
+ VernierCaliperLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
21
+ readonly description: RichSlot<E>;
22
+ readonly title: RichSlot<E>;
23
+ readonly labels: Schema.Struct<{
24
+ readonly centimetres: RichSlot<E>;
25
+ readonly line: RichSlot<E>;
26
+ readonly main: RichSlot<E>;
27
+ readonly reading: RichSlot<E>;
28
+ readonly viewLabel: Schema.Trimmed;
29
+ readonly width: Schema.Trimmed;
30
+ }>;
31
+ readonly width: Schema.optionalKey<Schema.Finite>;
32
+ }>, "figure">;
33
+ MicroscopeScaleLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
34
+ readonly description: RichSlot<E>;
35
+ readonly title: RichSlot<E>;
36
+ readonly labels: Schema.Struct<{
37
+ readonly chooseObjective: Schema.Trimmed;
38
+ readonly diameter: RichSlot<E>;
39
+ readonly divisions: RichSlot<E>;
40
+ readonly metres: RichSlot<E>;
41
+ readonly oneDivision: RichSlot<E>;
42
+ readonly viewLabel: Schema.Trimmed;
43
+ }>;
44
+ }>, "figure">;
45
+ ParallaxReadingLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
46
+ readonly description: RichSlot<E>;
47
+ readonly title: RichSlot<E>;
48
+ readonly labels: Schema.Struct<{
49
+ readonly error: RichSlot<E>;
50
+ readonly eye: Schema.Trimmed;
51
+ readonly reading: RichSlot<E>;
52
+ readonly trueVolume: RichSlot<E>;
53
+ readonly viewLabel: Schema.Trimmed;
54
+ }>;
55
+ readonly offset: Schema.optionalKey<Schema.Finite>;
56
+ }>, "figure">;
57
+ LightGateSpeedLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
58
+ readonly description: RichSlot<E>;
59
+ readonly title: RichSlot<E>;
60
+ readonly distance: Schema.optionalKey<Schema.Finite>;
61
+ readonly labels: Schema.Struct<{
62
+ readonly distance: Schema.Trimmed;
63
+ readonly speed: RichSlot<E>;
64
+ readonly time: RichSlot<E>;
65
+ readonly viewLabel: Schema.Trimmed;
66
+ }>;
67
+ }>, "figure">;
68
+ StopwatchSpreadLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
69
+ readonly description: RichSlot<E>;
70
+ readonly title: RichSlot<E>;
71
+ readonly count: Schema.optionalKey<Schema.Finite>;
72
+ readonly labels: Schema.Struct<{
73
+ readonly mean: RichSlot<E>;
74
+ readonly spread: RichSlot<E>;
75
+ readonly trials: Schema.Trimmed;
76
+ readonly uncertainty: RichSlot<E>;
77
+ readonly viewLabel: Schema.Trimmed;
78
+ }>;
79
+ }>, "figure">;
80
+ PendulumPeriodLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
81
+ readonly description: RichSlot<E>;
82
+ readonly title: RichSlot<E>;
83
+ readonly labels: Schema.Struct<{
84
+ readonly check: RichSlot<E>;
85
+ readonly gravity: RichSlot<E>;
86
+ readonly length: Schema.Trimmed;
87
+ readonly masses: RichSlot<E>;
88
+ readonly period: RichSlot<E>;
89
+ readonly viewLabel: Schema.Trimmed;
90
+ }>;
91
+ readonly length: Schema.optionalKey<Schema.Finite>;
92
+ }>, "figure">;
93
+ };
@@ -0,0 +1,135 @@
1
+ import { Schema } from "effect";
2
+ import { cardFields, TextSchema } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /**
5
+ * Props of `MicrometerScrewLab`: a micrometer screw gauge closed on a steel
6
+ * ball, with a magnifier on its sleeve and thimble.
7
+ */
8
+ function micrometerScrewLab(rich) {
9
+ return figure(Schema.Struct({
10
+ ...cardFields(rich),
11
+ labels: Schema.Struct({
12
+ division: rich,
13
+ reading: rich,
14
+ size: TextSchema,
15
+ sleeve: rich,
16
+ viewLabel: TextSchema,
17
+ }),
18
+ thickness: Schema.optionalKey(Schema.Finite),
19
+ }));
20
+ }
21
+ /**
22
+ * Props of `VernierCaliperLab`: a vernier caliper closed on a brass cylinder,
23
+ * with a magnifier on its scales.
24
+ */
25
+ function vernierCaliperLab(rich) {
26
+ return figure(Schema.Struct({
27
+ ...cardFields(rich),
28
+ labels: Schema.Struct({
29
+ centimetres: rich,
30
+ line: rich,
31
+ main: rich,
32
+ reading: rich,
33
+ viewLabel: TextSchema,
34
+ width: TextSchema,
35
+ }),
36
+ width: Schema.optionalKey(Schema.Finite),
37
+ }));
38
+ }
39
+ /**
40
+ * Props of `MicroscopeScaleLab`: a hair seen through a microscope with a scale
41
+ * in its eyepiece.
42
+ */
43
+ function microscopeScaleLab(rich) {
44
+ return figure(Schema.Struct({
45
+ ...cardFields(rich),
46
+ labels: Schema.Struct({
47
+ chooseObjective: TextSchema,
48
+ diameter: rich,
49
+ divisions: rich,
50
+ metres: rich,
51
+ oneDivision: rich,
52
+ viewLabel: TextSchema,
53
+ }),
54
+ }));
55
+ }
56
+ /**
57
+ * Props of `ParallaxReadingLab`: an eye reading the water in a measuring
58
+ * cylinder.
59
+ */
60
+ function parallaxReadingLab(rich) {
61
+ return figure(Schema.Struct({
62
+ ...cardFields(rich),
63
+ labels: Schema.Struct({
64
+ error: rich,
65
+ eye: TextSchema,
66
+ reading: rich,
67
+ trueVolume: rich,
68
+ viewLabel: TextSchema,
69
+ }),
70
+ offset: Schema.optionalKey(Schema.Finite),
71
+ }));
72
+ }
73
+ /** Props of `LightGateSpeedLab`: a trolley rolling through two light gates. */
74
+ function lightGateSpeedLab(rich) {
75
+ return figure(Schema.Struct({
76
+ ...cardFields(rich),
77
+ distance: Schema.optionalKey(Schema.Finite),
78
+ labels: Schema.Struct({
79
+ distance: TextSchema,
80
+ speed: rich,
81
+ time: rich,
82
+ viewLabel: TextSchema,
83
+ }),
84
+ }));
85
+ }
86
+ /**
87
+ * Props of `StopwatchSpreadLab`: ten swings of a pendulum timed by hand, trial
88
+ * after trial.
89
+ */
90
+ function stopwatchSpreadLab(rich) {
91
+ return figure(Schema.Struct({
92
+ ...cardFields(rich),
93
+ count: Schema.optionalKey(Schema.Finite),
94
+ labels: Schema.Struct({
95
+ mean: rich,
96
+ spread: rich,
97
+ trials: TextSchema,
98
+ uncertainty: rich,
99
+ viewLabel: TextSchema,
100
+ }),
101
+ }));
102
+ }
103
+ /**
104
+ * Props of `PendulumPeriodLab`: three pendulums of one length with a 50 g
105
+ * wooden bob, a 200 g brass bob and a 500 g lead bob.
106
+ */
107
+ function pendulumPeriodLab(rich) {
108
+ return figure(Schema.Struct({
109
+ ...cardFields(rich),
110
+ labels: Schema.Struct({
111
+ check: rich,
112
+ gravity: rich,
113
+ length: TextSchema,
114
+ masses: rich,
115
+ period: rich,
116
+ viewLabel: TextSchema,
117
+ }),
118
+ length: Schema.optionalKey(Schema.Finite),
119
+ }));
120
+ }
121
+ /**
122
+ * The props of the labs that read a measuring instrument. No prop states the
123
+ * conclusion a lab leads to, so none holds answer state.
124
+ */
125
+ export function instrumentVisuals(rich) {
126
+ return {
127
+ MicrometerScrewLab: micrometerScrewLab(rich),
128
+ VernierCaliperLab: vernierCaliperLab(rich),
129
+ MicroscopeScaleLab: microscopeScaleLab(rich),
130
+ ParallaxReadingLab: parallaxReadingLab(rich),
131
+ LightGateSpeedLab: lightGateSpeedLab(rich),
132
+ StopwatchSpreadLab: stopwatchSpreadLab(rich),
133
+ PendulumPeriodLab: pendulumPeriodLab(rich),
134
+ };
135
+ }
@@ -0,0 +1,66 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The measurement, vector, and energy labs. The net idea of the cable lab and
5
+ * the meaning of the wind lab state the conclusion each lab leads to, so they
6
+ * are answer state.
7
+ */
8
+ export declare function measurementVisuals<E>(rich: RichSlot<E>): {
9
+ DimensionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
10
+ readonly description: RichSlot<E>;
11
+ readonly title: RichSlot<E>;
12
+ readonly labels: Schema.Struct<{
13
+ readonly chooseMode: Schema.Trimmed;
14
+ readonly dimension: Schema.Trimmed;
15
+ readonly formula: Schema.Trimmed;
16
+ readonly modes: Schema.$Record<Schema.Literals<readonly ["length", "area", "volume"]>, Schema.Trimmed>;
17
+ readonly unit: Schema.Trimmed;
18
+ }>;
19
+ }>, "figure">;
20
+ MeasurementToolsLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
21
+ readonly description: RichSlot<E>;
22
+ readonly title: RichSlot<E>;
23
+ readonly labels: Schema.Struct<{
24
+ readonly chooseTool: Schema.Trimmed;
25
+ readonly decimalSeparator: Schema.Literals<readonly [".", ","]>;
26
+ readonly instrument: Schema.Trimmed;
27
+ readonly measuredObject: Schema.Trimmed;
28
+ readonly reading: Schema.Trimmed;
29
+ readonly tools: Schema.$Record<Schema.Literals<readonly ["length", "mass", "time"]>, Schema.Struct<{
30
+ readonly control: Schema.Trimmed;
31
+ readonly instrument: Schema.Trimmed;
32
+ readonly object: Schema.Trimmed;
33
+ readonly tab: Schema.Trimmed;
34
+ }>>;
35
+ }>;
36
+ }>, "figure">;
37
+ VectorConceptLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
38
+ readonly description: RichSlot<E>;
39
+ readonly title: RichSlot<E>;
40
+ readonly labels: Schema.Struct<{
41
+ readonly bridgeView: Schema.Trimmed;
42
+ readonly chooseLoadPosition: Schema.Trimmed;
43
+ readonly direction: Schema.Trimmed;
44
+ readonly directionValue: Schema.Trimmed;
45
+ readonly leftCable: RichSlot<E>;
46
+ readonly magnitude: Schema.Trimmed;
47
+ readonly magnitudeValue: Schema.Trimmed;
48
+ readonly netIdea: Schema.Trimmed;
49
+ readonly netIdeaValue: Schema.Trimmed;
50
+ readonly rightCable: RichSlot<E>;
51
+ }>;
52
+ }>, "figure">;
53
+ WindEnergyConversionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
54
+ readonly description: RichSlot<E>;
55
+ readonly title: RichSlot<E>;
56
+ readonly labels: Schema.Struct<{
57
+ readonly flow: RichSlot<E>;
58
+ readonly flowLabel: Schema.Trimmed;
59
+ readonly meaning: RichSlot<E>;
60
+ readonly meaningLabel: Schema.Trimmed;
61
+ readonly speedControl: Schema.Trimmed;
62
+ readonly speedUnit: Schema.Trimmed;
63
+ readonly viewLabel: Schema.Trimmed;
64
+ }>;
65
+ }>, "figure">;
66
+ };
@@ -0,0 +1,85 @@
1
+ import { Schema } from "effect";
2
+ import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
3
+ import { answerAt, figure } from "#contracts/visual/entry";
4
+ /** The quantities the dimension lab builds from length. */
5
+ const DIMENSION_MODES = ["length", "area", "volume"];
6
+ /** The instruments the measurement lab reads. */
7
+ const MEASUREMENT_TOOLS = ["length", "mass", "time"];
8
+ /** Props of `DimensionLab`: length, area, and volume and their dimensions. */
9
+ function dimensionLab(rich) {
10
+ return figure(Schema.Struct({
11
+ ...cardFields(rich),
12
+ labels: Schema.Struct({
13
+ chooseMode: TextSchema,
14
+ dimension: TextSchema,
15
+ formula: TextSchema,
16
+ modes: byIds(DIMENSION_MODES, TextSchema),
17
+ unit: TextSchema,
18
+ }),
19
+ }));
20
+ }
21
+ /** Props of `MeasurementToolsLab`: reading a ruler, a balance, and a stopwatch. */
22
+ function measurementToolsLab(rich) {
23
+ return figure(Schema.Struct({
24
+ ...cardFields(rich),
25
+ labels: Schema.Struct({
26
+ chooseTool: TextSchema,
27
+ decimalSeparator: Schema.Literals([".", ","]),
28
+ instrument: TextSchema,
29
+ measuredObject: TextSchema,
30
+ reading: TextSchema,
31
+ tools: byIds(MEASUREMENT_TOOLS, Schema.Struct({
32
+ control: TextSchema,
33
+ instrument: TextSchema,
34
+ object: TextSchema,
35
+ tab: TextSchema,
36
+ })),
37
+ }),
38
+ }));
39
+ }
40
+ /** Props of `VectorConceptLab`: the tension of two cables as vectors. */
41
+ function vectorConceptLab(rich) {
42
+ return figure(Schema.Struct({
43
+ ...cardFields(rich),
44
+ labels: Schema.Struct({
45
+ bridgeView: TextSchema,
46
+ chooseLoadPosition: TextSchema,
47
+ direction: TextSchema,
48
+ directionValue: TextSchema,
49
+ leftCable: rich,
50
+ magnitude: TextSchema,
51
+ magnitudeValue: TextSchema,
52
+ netIdea: TextSchema,
53
+ netIdeaValue: TextSchema,
54
+ rightCable: rich,
55
+ }),
56
+ }), answerAt(["labels", "netIdeaValue"]));
57
+ }
58
+ /** Props of `WindEnergyConversionLab`: wind turned into electric energy. */
59
+ function windEnergyLab(rich) {
60
+ return figure(Schema.Struct({
61
+ ...cardFields(rich),
62
+ labels: Schema.Struct({
63
+ flow: rich,
64
+ flowLabel: TextSchema,
65
+ meaning: rich,
66
+ meaningLabel: TextSchema,
67
+ speedControl: TextSchema,
68
+ speedUnit: TextSchema,
69
+ viewLabel: TextSchema,
70
+ }),
71
+ }), answerAt(["labels", "meaning"]));
72
+ }
73
+ /**
74
+ * The measurement, vector, and energy labs. The net idea of the cable lab and
75
+ * the meaning of the wind lab state the conclusion each lab leads to, so they
76
+ * are answer state.
77
+ */
78
+ export function measurementVisuals(rich) {
79
+ return {
80
+ DimensionLab: dimensionLab(rich),
81
+ MeasurementToolsLab: measurementToolsLab(rich),
82
+ VectorConceptLab: vectorConceptLab(rich),
83
+ WindEnergyConversionLab: windEnergyLab(rich),
84
+ };
85
+ }
@@ -0,0 +1,85 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The labs and graphs of linear and circular motion. Their labels name the
5
+ * quantities a reader measures; the values come from the motion the reader
6
+ * picks, so no prop holds answer state.
7
+ */
8
+ export declare function motionVisuals<E>(rich: RichSlot<E>): {
9
+ AccelerationGraphCard: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
10
+ readonly description: RichSlot<E>;
11
+ readonly title: RichSlot<E>;
12
+ readonly labels: Schema.Struct<{
13
+ readonly chooseCase: Schema.Trimmed;
14
+ readonly contextLine: Schema.Trimmed;
15
+ readonly scenarioNames: Schema.$Record<Schema.Literals<readonly ["speed-up", "steady", "slow-down"]>, Schema.Trimmed>;
16
+ readonly timeAxis: Schema.Trimmed;
17
+ readonly velocityAxis: Schema.Trimmed;
18
+ }>;
19
+ }>, "figure">;
20
+ AccelerationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
21
+ readonly description: RichSlot<E>;
22
+ readonly title: RichSlot<E>;
23
+ readonly labels: Schema.Struct<{
24
+ readonly chooseCase: Schema.Trimmed;
25
+ readonly factLabels: Schema.Struct<{
26
+ readonly acceleration: RichSlot<E>;
27
+ readonly finalVelocity: RichSlot<E>;
28
+ readonly initialVelocity: RichSlot<E>;
29
+ readonly timeStep: RichSlot<E>;
30
+ }>;
31
+ readonly scenarioNames: Schema.$Record<Schema.Literals<readonly ["speed-up", "steady", "slow-down"]>, RichSlot<E>>;
32
+ readonly viewLabel: Schema.Trimmed;
33
+ }>;
34
+ }>, "figure">;
35
+ NonUniformLinearMotionGraphCard: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
36
+ readonly description: RichSlot<E>;
37
+ readonly title: RichSlot<E>;
38
+ readonly labels: Schema.Struct<{
39
+ readonly chooseScenario: Schema.Trimmed;
40
+ readonly scenarioNames: Schema.$Record<Schema.Literals<readonly ["from-rest", "speed-up", "brake"]>, Schema.Trimmed>;
41
+ readonly timeAxis: Schema.Trimmed;
42
+ readonly velocityAxis: Schema.Trimmed;
43
+ }>;
44
+ }>, "figure">;
45
+ NonUniformLinearMotionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
46
+ readonly description: RichSlot<E>;
47
+ readonly title: RichSlot<E>;
48
+ readonly labels: Schema.Struct<{
49
+ readonly chooseScenario: Schema.Trimmed;
50
+ readonly factLabels: Schema.Struct<{
51
+ readonly acceleration: RichSlot<E>;
52
+ readonly displacement: RichSlot<E>;
53
+ readonly finalVelocity: RichSlot<E>;
54
+ readonly initialVelocity: RichSlot<E>;
55
+ }>;
56
+ readonly scenarioNames: Schema.$Record<Schema.Literals<readonly ["from-rest", "speed-up", "brake"]>, RichSlot<E>>;
57
+ readonly viewLabel: Schema.Trimmed;
58
+ }>;
59
+ }>, "figure">;
60
+ UniformCircularMotionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
61
+ readonly description: RichSlot<E>;
62
+ readonly title: RichSlot<E>;
63
+ readonly decimalSeparator: Schema.optionalKey<Schema.Literals<readonly ["comma", "dot"]>>;
64
+ readonly labels: Schema.Struct<{
65
+ readonly acceleration: RichSlot<E>;
66
+ readonly choosePeriod: Schema.Trimmed;
67
+ readonly period: RichSlot<E>;
68
+ readonly radius: RichSlot<E>;
69
+ readonly speed: RichSlot<E>;
70
+ readonly viewLabel: Schema.Trimmed;
71
+ }>;
72
+ }>, "figure">;
73
+ UniformLinearMotionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
74
+ readonly description: RichSlot<E>;
75
+ readonly title: RichSlot<E>;
76
+ readonly labels: Schema.Struct<{
77
+ readonly chooseSpeed: Schema.Trimmed;
78
+ readonly duration: RichSlot<E>;
79
+ readonly positionStep: RichSlot<E>;
80
+ readonly speed: RichSlot<E>;
81
+ readonly stepDistance: RichSlot<E>;
82
+ readonly viewLabel: Schema.Trimmed;
83
+ }>;
84
+ }>, "figure">;
85
+ };