@nakafa/aksara-contracts 8.1.0 → 8.4.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/math/boundary.d.ts +9 -0
- package/dist/math/boundary.js +81 -0
- package/dist/math/curve.d.ts +1 -0
- package/dist/math/curve.js +4 -2
- package/dist/math/formula/affine.d.ts +22 -0
- package/dist/math/formula/affine.js +79 -0
- package/dist/math/formula/contour.js +27 -12
- package/dist/math/object.d.ts +12 -0
- package/dist/math/object.js +11 -0
- package/dist/math/plane.d.ts +10 -0
- package/dist/math/plane.js +7 -1
- package/dist/math/space.d.ts +8 -0
- package/dist/math/space.js +5 -1
- package/dist/math/visual.d.ts +239 -212
- package/dist/visual/base/math.d.ts +78 -0
- package/dist/visual/base/math.js +31 -3
- package/dist/visual/base/media.d.ts +67 -0
- package/dist/visual/biology/bacteria.d.ts +268 -0
- package/dist/visual/biology/cell.d.ts +201 -0
- package/dist/visual/biology/climate.d.ts +201 -0
- package/dist/visual/biology/ecology.d.ts +268 -0
- package/dist/visual/biology/physiology.d.ts +201 -0
- package/dist/visual/biology/plant.d.ts +335 -0
- package/dist/visual/biology.d.ts +16 -16
- package/dist/visual/biology.js +2 -2
- package/dist/visual/card.d.ts +79 -1
- package/dist/visual/card.js +18 -2
- package/dist/visual/catalog.d.ts +14808 -28
- package/dist/visual/catalog.js +26 -0
- package/dist/visual/chemistry/atom.d.ts +203 -2
- package/dist/visual/chemistry/atom.js +2 -2
- package/dist/visual/chemistry/balance.d.ts +335 -0
- package/dist/visual/chemistry/bonding.d.ts +335 -0
- package/dist/visual/chemistry/discovery.d.ts +469 -0
- package/dist/visual/chemistry/electrochemistry.d.ts +134 -0
- package/dist/visual/chemistry/electron.d.ts +134 -0
- package/dist/visual/chemistry/laws.d.ts +268 -0
- package/dist/visual/chemistry/particles.d.ts +335 -0
- package/dist/visual/chemistry/periodic.d.ts +134 -0
- package/dist/visual/chemistry/rate.d.ts +67 -0
- package/dist/visual/chemistry/reaction.d.ts +201 -0
- package/dist/visual/chemistry/titration.d.ts +67 -0
- package/dist/visual/length.d.ts +79 -0
- package/dist/visual/length.js +37 -0
- package/dist/visual/mathematics/chance.d.ts +258 -0
- package/dist/visual/mathematics/chance.js +117 -0
- package/dist/visual/mathematics/chart.d.ts +67 -0
- package/dist/visual/mathematics/charts.d.ts +335 -0
- package/dist/visual/mathematics/function.d.ts +205 -4
- package/dist/visual/mathematics/function.js +4 -4
- package/dist/visual/mathematics/geometry.d.ts +1 -1
- package/dist/visual/mathematics/geometry.js +1 -1
- package/dist/visual/mathematics/numeral.d.ts +170 -0
- package/dist/visual/mathematics/numeral.js +85 -0
- package/dist/visual/physics/braking.d.ts +268 -0
- package/dist/visual/physics/circuit.d.ts +343 -0
- package/dist/visual/physics/circuit.js +86 -0
- package/dist/visual/physics/circular.d.ts +134 -0
- package/dist/visual/physics/dynamics.d.ts +579 -0
- package/dist/visual/physics/dynamics.js +134 -0
- package/dist/visual/physics/efficiency.d.ts +402 -0
- package/dist/visual/physics/electronics.d.ts +260 -0
- package/dist/visual/physics/electronics.js +71 -0
- package/dist/visual/physics/falling.d.ts +268 -0
- package/dist/visual/physics/field.d.ts +249 -0
- package/dist/visual/physics/field.js +60 -0
- package/dist/visual/physics/fluid.d.ts +336 -0
- package/dist/visual/physics/fluid.js +83 -0
- package/dist/visual/physics/force.d.ts +335 -0
- package/dist/visual/physics/gravity.d.ts +172 -0
- package/dist/visual/physics/gravity.js +47 -0
- package/dist/visual/physics/heat.d.ts +255 -0
- package/dist/visual/physics/heat.js +66 -0
- package/dist/visual/physics/instrument.d.ts +469 -0
- package/dist/visual/physics/light.d.ts +343 -0
- package/dist/visual/physics/light.js +90 -0
- package/dist/visual/physics/measurement.d.ts +268 -0
- package/dist/visual/physics/motion.d.ts +402 -0
- package/dist/visual/physics/nuclear.d.ts +258 -0
- package/dist/visual/physics/nuclear.js +69 -0
- package/dist/visual/physics/parabolic.d.ts +69 -2
- package/dist/visual/physics/parabolic.js +2 -2
- package/dist/visual/physics/position.d.ts +402 -0
- package/dist/visual/physics/power.d.ts +536 -0
- package/dist/visual/physics/precision.d.ts +469 -0
- package/dist/visual/physics/product.d.ts +268 -0
- package/dist/visual/physics/reading.d.ts +253 -0
- package/dist/visual/physics/reading.js +61 -0
- package/dist/visual/physics/record.d.ts +134 -0
- package/dist/visual/physics/relative.d.ts +201 -0
- package/dist/visual/physics/solar.d.ts +402 -0
- package/dist/visual/physics/vector.d.ts +335 -0
- package/dist/visual/physics/velocity.d.ts +469 -0
- package/dist/visual/physics/wave.d.ts +338 -0
- package/dist/visual/physics/wave.js +85 -0
- package/dist/visual/politics.d.ts +403 -1
- package/dist/visual/politics.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,338 @@
|
|
|
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 footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
11
|
+
readonly attrs: {
|
|
12
|
+
readonly latex: string;
|
|
13
|
+
};
|
|
14
|
+
readonly type: "mathInline";
|
|
15
|
+
} | {
|
|
16
|
+
readonly marks?: readonly [{
|
|
17
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
18
|
+
} | {
|
|
19
|
+
readonly attrs: {
|
|
20
|
+
readonly href: string;
|
|
21
|
+
};
|
|
22
|
+
readonly type: "link";
|
|
23
|
+
} | {
|
|
24
|
+
readonly attrs: {
|
|
25
|
+
readonly variant: "success" | "warning" | null;
|
|
26
|
+
};
|
|
27
|
+
readonly type: "highlight";
|
|
28
|
+
}, ...({
|
|
29
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
30
|
+
} | {
|
|
31
|
+
readonly attrs: {
|
|
32
|
+
readonly href: string;
|
|
33
|
+
};
|
|
34
|
+
readonly type: "link";
|
|
35
|
+
} | {
|
|
36
|
+
readonly attrs: {
|
|
37
|
+
readonly variant: "success" | "warning" | null;
|
|
38
|
+
};
|
|
39
|
+
readonly type: "highlight";
|
|
40
|
+
})[]];
|
|
41
|
+
readonly text: string;
|
|
42
|
+
readonly type: "text";
|
|
43
|
+
}, ...({
|
|
44
|
+
readonly attrs: {
|
|
45
|
+
readonly latex: string;
|
|
46
|
+
};
|
|
47
|
+
readonly type: "mathInline";
|
|
48
|
+
} | {
|
|
49
|
+
readonly marks?: readonly [{
|
|
50
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
51
|
+
} | {
|
|
52
|
+
readonly attrs: {
|
|
53
|
+
readonly href: string;
|
|
54
|
+
};
|
|
55
|
+
readonly type: "link";
|
|
56
|
+
} | {
|
|
57
|
+
readonly attrs: {
|
|
58
|
+
readonly variant: "success" | "warning" | null;
|
|
59
|
+
};
|
|
60
|
+
readonly type: "highlight";
|
|
61
|
+
}, ...({
|
|
62
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
63
|
+
} | {
|
|
64
|
+
readonly attrs: {
|
|
65
|
+
readonly href: string;
|
|
66
|
+
};
|
|
67
|
+
readonly type: "link";
|
|
68
|
+
} | {
|
|
69
|
+
readonly attrs: {
|
|
70
|
+
readonly variant: "success" | "warning" | null;
|
|
71
|
+
};
|
|
72
|
+
readonly type: "highlight";
|
|
73
|
+
})[]];
|
|
74
|
+
readonly text: string;
|
|
75
|
+
readonly type: "text";
|
|
76
|
+
})[]], E, never, never>>;
|
|
77
|
+
readonly title: RichSlot<E>;
|
|
78
|
+
readonly boatSpeed: Schema.Finite;
|
|
79
|
+
readonly echoTime: Schema.Finite;
|
|
80
|
+
readonly labels: Schema.Struct<{
|
|
81
|
+
readonly back: RichSlot<E>;
|
|
82
|
+
readonly boat: RichSlot<E>;
|
|
83
|
+
readonly out: RichSlot<E>;
|
|
84
|
+
readonly start: RichSlot<E>;
|
|
85
|
+
readonly viewLabel: Schema.Trimmed;
|
|
86
|
+
}>;
|
|
87
|
+
readonly soundSpeed: Schema.Finite;
|
|
88
|
+
}>, "figure">;
|
|
89
|
+
DoubleSlitLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
90
|
+
readonly description: RichSlot<E>;
|
|
91
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
92
|
+
readonly attrs: {
|
|
93
|
+
readonly latex: string;
|
|
94
|
+
};
|
|
95
|
+
readonly type: "mathInline";
|
|
96
|
+
} | {
|
|
97
|
+
readonly marks?: readonly [{
|
|
98
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
99
|
+
} | {
|
|
100
|
+
readonly attrs: {
|
|
101
|
+
readonly href: string;
|
|
102
|
+
};
|
|
103
|
+
readonly type: "link";
|
|
104
|
+
} | {
|
|
105
|
+
readonly attrs: {
|
|
106
|
+
readonly variant: "success" | "warning" | null;
|
|
107
|
+
};
|
|
108
|
+
readonly type: "highlight";
|
|
109
|
+
}, ...({
|
|
110
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
111
|
+
} | {
|
|
112
|
+
readonly attrs: {
|
|
113
|
+
readonly href: string;
|
|
114
|
+
};
|
|
115
|
+
readonly type: "link";
|
|
116
|
+
} | {
|
|
117
|
+
readonly attrs: {
|
|
118
|
+
readonly variant: "success" | "warning" | null;
|
|
119
|
+
};
|
|
120
|
+
readonly type: "highlight";
|
|
121
|
+
})[]];
|
|
122
|
+
readonly text: string;
|
|
123
|
+
readonly type: "text";
|
|
124
|
+
}, ...({
|
|
125
|
+
readonly attrs: {
|
|
126
|
+
readonly latex: string;
|
|
127
|
+
};
|
|
128
|
+
readonly type: "mathInline";
|
|
129
|
+
} | {
|
|
130
|
+
readonly marks?: readonly [{
|
|
131
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
132
|
+
} | {
|
|
133
|
+
readonly attrs: {
|
|
134
|
+
readonly href: string;
|
|
135
|
+
};
|
|
136
|
+
readonly type: "link";
|
|
137
|
+
} | {
|
|
138
|
+
readonly attrs: {
|
|
139
|
+
readonly variant: "success" | "warning" | null;
|
|
140
|
+
};
|
|
141
|
+
readonly type: "highlight";
|
|
142
|
+
}, ...({
|
|
143
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
144
|
+
} | {
|
|
145
|
+
readonly attrs: {
|
|
146
|
+
readonly href: string;
|
|
147
|
+
};
|
|
148
|
+
readonly type: "link";
|
|
149
|
+
} | {
|
|
150
|
+
readonly attrs: {
|
|
151
|
+
readonly variant: "success" | "warning" | null;
|
|
152
|
+
};
|
|
153
|
+
readonly type: "highlight";
|
|
154
|
+
})[]];
|
|
155
|
+
readonly text: string;
|
|
156
|
+
readonly type: "text";
|
|
157
|
+
})[]], E, never, never>>;
|
|
158
|
+
readonly title: RichSlot<E>;
|
|
159
|
+
readonly distance: Schema.Finite;
|
|
160
|
+
readonly labels: Schema.Struct<{
|
|
161
|
+
readonly count: RichSlot<E>;
|
|
162
|
+
readonly distance: RichSlot<E>;
|
|
163
|
+
readonly distanceName: Schema.Trimmed;
|
|
164
|
+
readonly separation: RichSlot<E>;
|
|
165
|
+
readonly separationName: Schema.Trimmed;
|
|
166
|
+
readonly spacing: RichSlot<E>;
|
|
167
|
+
readonly viewLabel: Schema.Trimmed;
|
|
168
|
+
}>;
|
|
169
|
+
readonly separation: Schema.Finite;
|
|
170
|
+
readonly span: Schema.optionalKey<Schema.Finite>;
|
|
171
|
+
readonly wavelength: Schema.Finite;
|
|
172
|
+
}>, "figure">;
|
|
173
|
+
SpeakerInterferenceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
174
|
+
readonly description: RichSlot<E>;
|
|
175
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
176
|
+
readonly attrs: {
|
|
177
|
+
readonly latex: string;
|
|
178
|
+
};
|
|
179
|
+
readonly type: "mathInline";
|
|
180
|
+
} | {
|
|
181
|
+
readonly marks?: readonly [{
|
|
182
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
183
|
+
} | {
|
|
184
|
+
readonly attrs: {
|
|
185
|
+
readonly href: string;
|
|
186
|
+
};
|
|
187
|
+
readonly type: "link";
|
|
188
|
+
} | {
|
|
189
|
+
readonly attrs: {
|
|
190
|
+
readonly variant: "success" | "warning" | null;
|
|
191
|
+
};
|
|
192
|
+
readonly type: "highlight";
|
|
193
|
+
}, ...({
|
|
194
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
195
|
+
} | {
|
|
196
|
+
readonly attrs: {
|
|
197
|
+
readonly href: string;
|
|
198
|
+
};
|
|
199
|
+
readonly type: "link";
|
|
200
|
+
} | {
|
|
201
|
+
readonly attrs: {
|
|
202
|
+
readonly variant: "success" | "warning" | null;
|
|
203
|
+
};
|
|
204
|
+
readonly type: "highlight";
|
|
205
|
+
})[]];
|
|
206
|
+
readonly text: string;
|
|
207
|
+
readonly type: "text";
|
|
208
|
+
}, ...({
|
|
209
|
+
readonly attrs: {
|
|
210
|
+
readonly latex: string;
|
|
211
|
+
};
|
|
212
|
+
readonly type: "mathInline";
|
|
213
|
+
} | {
|
|
214
|
+
readonly marks?: readonly [{
|
|
215
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
216
|
+
} | {
|
|
217
|
+
readonly attrs: {
|
|
218
|
+
readonly href: string;
|
|
219
|
+
};
|
|
220
|
+
readonly type: "link";
|
|
221
|
+
} | {
|
|
222
|
+
readonly attrs: {
|
|
223
|
+
readonly variant: "success" | "warning" | null;
|
|
224
|
+
};
|
|
225
|
+
readonly type: "highlight";
|
|
226
|
+
}, ...({
|
|
227
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
228
|
+
} | {
|
|
229
|
+
readonly attrs: {
|
|
230
|
+
readonly href: string;
|
|
231
|
+
};
|
|
232
|
+
readonly type: "link";
|
|
233
|
+
} | {
|
|
234
|
+
readonly attrs: {
|
|
235
|
+
readonly variant: "success" | "warning" | null;
|
|
236
|
+
};
|
|
237
|
+
readonly type: "highlight";
|
|
238
|
+
})[]];
|
|
239
|
+
readonly text: string;
|
|
240
|
+
readonly type: "text";
|
|
241
|
+
})[]], E, never, never>>;
|
|
242
|
+
readonly title: RichSlot<E>;
|
|
243
|
+
readonly distance: Schema.Finite;
|
|
244
|
+
readonly frequency: Schema.Finite;
|
|
245
|
+
readonly labels: Schema.Struct<{
|
|
246
|
+
readonly frequency: RichSlot<E>;
|
|
247
|
+
readonly frequencyName: Schema.Trimmed;
|
|
248
|
+
readonly spacing: RichSlot<E>;
|
|
249
|
+
readonly viewLabel: Schema.Trimmed;
|
|
250
|
+
readonly wavelength: RichSlot<E>;
|
|
251
|
+
}>;
|
|
252
|
+
readonly separation: Schema.Finite;
|
|
253
|
+
readonly speed: Schema.Finite;
|
|
254
|
+
}>, "figure">;
|
|
255
|
+
RippleTankLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
256
|
+
readonly description: RichSlot<E>;
|
|
257
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
258
|
+
readonly attrs: {
|
|
259
|
+
readonly latex: string;
|
|
260
|
+
};
|
|
261
|
+
readonly type: "mathInline";
|
|
262
|
+
} | {
|
|
263
|
+
readonly marks?: readonly [{
|
|
264
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
265
|
+
} | {
|
|
266
|
+
readonly attrs: {
|
|
267
|
+
readonly href: string;
|
|
268
|
+
};
|
|
269
|
+
readonly type: "link";
|
|
270
|
+
} | {
|
|
271
|
+
readonly attrs: {
|
|
272
|
+
readonly variant: "success" | "warning" | null;
|
|
273
|
+
};
|
|
274
|
+
readonly type: "highlight";
|
|
275
|
+
}, ...({
|
|
276
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
277
|
+
} | {
|
|
278
|
+
readonly attrs: {
|
|
279
|
+
readonly href: string;
|
|
280
|
+
};
|
|
281
|
+
readonly type: "link";
|
|
282
|
+
} | {
|
|
283
|
+
readonly attrs: {
|
|
284
|
+
readonly variant: "success" | "warning" | null;
|
|
285
|
+
};
|
|
286
|
+
readonly type: "highlight";
|
|
287
|
+
})[]];
|
|
288
|
+
readonly text: string;
|
|
289
|
+
readonly type: "text";
|
|
290
|
+
}, ...({
|
|
291
|
+
readonly attrs: {
|
|
292
|
+
readonly latex: string;
|
|
293
|
+
};
|
|
294
|
+
readonly type: "mathInline";
|
|
295
|
+
} | {
|
|
296
|
+
readonly marks?: readonly [{
|
|
297
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
298
|
+
} | {
|
|
299
|
+
readonly attrs: {
|
|
300
|
+
readonly href: string;
|
|
301
|
+
};
|
|
302
|
+
readonly type: "link";
|
|
303
|
+
} | {
|
|
304
|
+
readonly attrs: {
|
|
305
|
+
readonly variant: "success" | "warning" | null;
|
|
306
|
+
};
|
|
307
|
+
readonly type: "highlight";
|
|
308
|
+
}, ...({
|
|
309
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
310
|
+
} | {
|
|
311
|
+
readonly attrs: {
|
|
312
|
+
readonly href: string;
|
|
313
|
+
};
|
|
314
|
+
readonly type: "link";
|
|
315
|
+
} | {
|
|
316
|
+
readonly attrs: {
|
|
317
|
+
readonly variant: "success" | "warning" | null;
|
|
318
|
+
};
|
|
319
|
+
readonly type: "highlight";
|
|
320
|
+
})[]];
|
|
321
|
+
readonly text: string;
|
|
322
|
+
readonly type: "text";
|
|
323
|
+
})[]], E, never, never>>;
|
|
324
|
+
readonly title: RichSlot<E>;
|
|
325
|
+
readonly deepSpeed: Schema.Finite;
|
|
326
|
+
readonly incidence: Schema.Finite;
|
|
327
|
+
readonly labels: Schema.Struct<{
|
|
328
|
+
readonly frequency: RichSlot<E>;
|
|
329
|
+
readonly incidence: RichSlot<E>;
|
|
330
|
+
readonly incidenceName: Schema.Trimmed;
|
|
331
|
+
readonly refraction: RichSlot<E>;
|
|
332
|
+
readonly viewLabel: Schema.Trimmed;
|
|
333
|
+
readonly wavelength: RichSlot<E>;
|
|
334
|
+
}>;
|
|
335
|
+
readonly shallowSpeed: Schema.Finite;
|
|
336
|
+
readonly wavelength: Schema.Finite;
|
|
337
|
+
}>, "figure">;
|
|
338
|
+
};
|
|
@@ -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
|
+
}
|