@nakafa/aksara-contracts 8.9.1 → 8.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assessment/choice.d.ts +26 -0
- package/dist/assessment/document.d.ts +39 -0
- package/dist/assessment/figure.d.ts +13 -0
- package/dist/assessment/hash.d.ts +711 -111
- package/dist/assessment/inline.d.ts +53 -0
- package/dist/assessment/inline.js +1 -0
- package/dist/assessment/interaction.d.ts +26 -0
- package/dist/assessment/item.d.ts +414 -36
- package/dist/assessment/paper.d.ts +731 -131
- package/dist/assessment/part.d.ts +13 -0
- package/dist/assessment/rows.d.ts +336 -36
- package/dist/assessment/snapshot.d.ts +773 -121
- package/dist/release/snapshot/data.d.ts +26 -0
- package/dist/release/snapshot/verify.d.ts +336 -36
- package/dist/transport/group.d.ts +78 -0
- package/dist/transport/request.d.ts +2195 -343
- package/dist/transport/snapshot.d.ts +52 -0
- package/dist/visual/base/math.d.ts +56 -6
- package/dist/visual/base/media.d.ts +56 -6
- package/dist/visual/biology/bacteria.d.ts +224 -24
- package/dist/visual/biology/binomial.d.ts +139 -0
- package/dist/visual/biology/binomial.js +46 -0
- package/dist/visual/biology/blood.d.ts +56 -6
- package/dist/visual/biology/bone.d.ts +141 -0
- package/dist/visual/biology/bone.js +46 -0
- package/dist/visual/biology/cell.d.ts +168 -18
- package/dist/visual/biology/chromosome.d.ts +139 -0
- package/dist/visual/biology/chromosome.js +42 -0
- package/dist/visual/biology/climate.d.ts +168 -18
- package/dist/visual/biology/control.d.ts +17 -0
- package/dist/visual/biology/control.js +21 -0
- package/dist/visual/biology/denature.d.ts +159 -0
- package/dist/visual/biology/denature.js +74 -0
- package/dist/visual/biology/drawing.d.ts +151 -0
- package/dist/visual/biology/drawing.js +69 -0
- package/dist/visual/biology/ecology.d.ts +224 -24
- package/dist/visual/biology/enzyme.d.ts +145 -0
- package/dist/visual/biology/enzyme.js +54 -0
- package/dist/visual/biology/equipment.d.ts +140 -0
- package/dist/visual/biology/equipment.js +64 -0
- package/dist/visual/biology/gametogenesis.d.ts +145 -0
- package/dist/visual/biology/gametogenesis.js +83 -0
- package/dist/visual/biology/heart.d.ts +56 -6
- package/dist/visual/biology/implantation.d.ts +138 -0
- package/dist/visual/biology/implantation.js +44 -0
- package/dist/visual/biology/joint.d.ts +140 -0
- package/dist/visual/biology/joint.js +47 -0
- package/dist/visual/biology/key.d.ts +141 -0
- package/dist/visual/biology/key.js +58 -0
- package/dist/visual/biology/kingdom.d.ts +142 -0
- package/dist/visual/biology/kingdom.js +82 -0
- package/dist/visual/biology/lactase.d.ts +147 -0
- package/dist/visual/biology/lactase.js +48 -0
- package/dist/visual/biology/limb.d.ts +139 -0
- package/dist/visual/biology/limb.js +44 -0
- package/dist/visual/biology/lipid.d.ts +144 -0
- package/dist/visual/biology/lipid.js +43 -0
- package/dist/visual/biology/locomotion.d.ts +141 -0
- package/dist/visual/biology/locomotion.js +48 -0
- package/dist/visual/biology/menstrual.d.ts +148 -0
- package/dist/visual/biology/menstrual.js +65 -0
- package/dist/visual/biology/metamorphosis.d.ts +140 -0
- package/dist/visual/biology/metamorphosis.js +34 -0
- package/dist/visual/biology/mitochondrion.d.ts +56 -6
- package/dist/visual/biology/muscle.d.ts +56 -6
- package/dist/visual/biology/neuron.d.ts +56 -6
- package/dist/visual/biology/paddy.d.ts +56 -6
- package/dist/visual/biology/physiology.d.ts +168 -18
- package/dist/visual/biology/placenta.d.ts +139 -0
- package/dist/visual/biology/placenta.js +52 -0
- package/dist/visual/biology/planes.d.ts +145 -0
- package/dist/visual/biology/planes.js +62 -0
- package/dist/visual/biology/plant.d.ts +280 -30
- package/dist/visual/biology/protein.d.ts +142 -0
- package/dist/visual/biology/protein.js +41 -0
- package/dist/visual/biology/saturation.d.ts +149 -0
- package/dist/visual/biology/saturation.js +40 -0
- package/dist/visual/biology/secretion.d.ts +149 -0
- package/dist/visual/biology/secretion.js +79 -0
- package/dist/visual/biology/spill.d.ts +165 -0
- package/dist/visual/biology/spill.js +58 -0
- package/dist/visual/biology/sugar.d.ts +152 -0
- package/dist/visual/biology/sugar.js +59 -0
- package/dist/visual/biology/synapse.d.ts +56 -6
- package/dist/visual/biology/taxon.d.ts +138 -0
- package/dist/visual/biology/taxon.js +50 -0
- package/dist/visual/biology/twins.d.ts +144 -0
- package/dist/visual/biology/twins.js +60 -0
- package/dist/visual/biology/vernacular.d.ts +141 -0
- package/dist/visual/biology/vernacular.js +57 -0
- package/dist/visual/biology/vertebra.d.ts +141 -0
- package/dist/visual/biology/vertebra.js +59 -0
- package/dist/visual/biology/vessel.d.ts +56 -6
- package/dist/visual/biology/waste.d.ts +140 -0
- package/dist/visual/biology/waste.js +57 -0
- package/dist/visual/biology/water.d.ts +152 -0
- package/dist/visual/biology/water.js +54 -0
- package/dist/visual/biology/yeast.d.ts +56 -6
- package/dist/visual/card.d.ts +67 -6
- package/dist/visual/card.js +17 -1
- package/dist/visual/catalog.d.ts +21584 -5487
- package/dist/visual/catalog.js +66 -0
- package/dist/visual/chemistry/atom.d.ts +168 -18
- package/dist/visual/chemistry/balance.d.ts +280 -30
- package/dist/visual/chemistry/bonding.d.ts +280 -30
- package/dist/visual/chemistry/discovery.d.ts +392 -42
- package/dist/visual/chemistry/electrochemistry.d.ts +112 -12
- package/dist/visual/chemistry/electron.d.ts +112 -12
- package/dist/visual/chemistry/laws.d.ts +224 -24
- package/dist/visual/chemistry/particles.d.ts +280 -30
- package/dist/visual/chemistry/periodic.d.ts +112 -12
- package/dist/visual/chemistry/rate.d.ts +56 -6
- package/dist/visual/chemistry/reaction.d.ts +168 -18
- package/dist/visual/chemistry/titration.d.ts +56 -6
- package/dist/visual/length.d.ts +56 -6
- package/dist/visual/mathematics/argument.d.ts +226 -0
- package/dist/visual/mathematics/argument.js +150 -0
- package/dist/visual/mathematics/chance.d.ts +168 -18
- package/dist/visual/mathematics/chart.d.ts +56 -6
- package/dist/visual/mathematics/charts.d.ts +280 -30
- package/dist/visual/mathematics/counterexample.d.ts +340 -0
- package/dist/visual/mathematics/counterexample.js +157 -0
- package/dist/visual/mathematics/function.d.ts +168 -18
- package/dist/visual/mathematics/journey.d.ts +56 -6
- package/dist/visual/mathematics/logic.d.ts +56 -6
- package/dist/visual/mathematics/network.d.ts +56 -6
- package/dist/visual/mathematics/numeral.d.ts +168 -18
- package/dist/visual/mathematics/sets.d.ts +56 -6
- package/dist/visual/physics/braking.d.ts +224 -24
- package/dist/visual/physics/circuit.d.ts +224 -24
- package/dist/visual/physics/circular.d.ts +112 -12
- package/dist/visual/physics/dynamics.d.ts +392 -42
- package/dist/visual/physics/efficiency.d.ts +336 -36
- package/dist/visual/physics/electronics.d.ts +168 -18
- package/dist/visual/physics/falling.d.ts +224 -24
- package/dist/visual/physics/field.d.ts +168 -18
- package/dist/visual/physics/fluid.d.ts +224 -24
- package/dist/visual/physics/force.d.ts +280 -30
- package/dist/visual/physics/gravity.d.ts +112 -12
- package/dist/visual/physics/heat.d.ts +168 -18
- package/dist/visual/physics/instrument.d.ts +392 -42
- package/dist/visual/physics/light.d.ts +224 -24
- package/dist/visual/physics/measurement.d.ts +224 -24
- package/dist/visual/physics/motion.d.ts +336 -36
- package/dist/visual/physics/nuclear.d.ts +168 -18
- package/dist/visual/physics/parabolic.d.ts +56 -6
- package/dist/visual/physics/position.d.ts +336 -36
- package/dist/visual/physics/power.d.ts +448 -48
- package/dist/visual/physics/precision.d.ts +392 -42
- package/dist/visual/physics/product.d.ts +224 -24
- package/dist/visual/physics/reading.d.ts +168 -18
- package/dist/visual/physics/record.d.ts +112 -12
- package/dist/visual/physics/relative.d.ts +168 -18
- package/dist/visual/physics/solar.d.ts +336 -36
- package/dist/visual/physics/thermodynamics.d.ts +56 -6
- package/dist/visual/physics/vector.d.ts +280 -30
- package/dist/visual/physics/velocity.d.ts +392 -42
- package/dist/visual/physics/wave.d.ts +224 -24
- package/dist/visual/politics.d.ts +336 -36
- package/package.json +1 -1
|
@@ -8,11 +8,64 @@ export declare function cellVisuals<E>(rich: RichSlot<E>): {
|
|
|
8
8
|
CellCutawayLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
9
|
readonly description: RichSlot<E>;
|
|
10
10
|
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
11
|
+
readonly marks?: readonly [{
|
|
12
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
13
|
+
} | {
|
|
14
|
+
readonly attrs: {
|
|
15
|
+
readonly href: string;
|
|
16
|
+
};
|
|
17
|
+
readonly type: "link";
|
|
18
|
+
} | {
|
|
19
|
+
readonly attrs: {
|
|
20
|
+
readonly variant: "success" | "warning" | null;
|
|
21
|
+
};
|
|
22
|
+
readonly type: "highlight";
|
|
23
|
+
}, ...({
|
|
24
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
25
|
+
} | {
|
|
26
|
+
readonly attrs: {
|
|
27
|
+
readonly href: string;
|
|
28
|
+
};
|
|
29
|
+
readonly type: "link";
|
|
30
|
+
} | {
|
|
31
|
+
readonly attrs: {
|
|
32
|
+
readonly variant: "success" | "warning" | null;
|
|
33
|
+
};
|
|
34
|
+
readonly type: "highlight";
|
|
35
|
+
})[]];
|
|
36
|
+
readonly text: string;
|
|
37
|
+
readonly type: "text";
|
|
38
|
+
} | {
|
|
11
39
|
readonly attrs: {
|
|
12
40
|
readonly latex: string;
|
|
13
41
|
};
|
|
42
|
+
readonly marks?: readonly [{
|
|
43
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
44
|
+
} | {
|
|
45
|
+
readonly attrs: {
|
|
46
|
+
readonly href: string;
|
|
47
|
+
};
|
|
48
|
+
readonly type: "link";
|
|
49
|
+
} | {
|
|
50
|
+
readonly attrs: {
|
|
51
|
+
readonly variant: "success" | "warning" | null;
|
|
52
|
+
};
|
|
53
|
+
readonly type: "highlight";
|
|
54
|
+
}, ...({
|
|
55
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
56
|
+
} | {
|
|
57
|
+
readonly attrs: {
|
|
58
|
+
readonly href: string;
|
|
59
|
+
};
|
|
60
|
+
readonly type: "link";
|
|
61
|
+
} | {
|
|
62
|
+
readonly attrs: {
|
|
63
|
+
readonly variant: "success" | "warning" | null;
|
|
64
|
+
};
|
|
65
|
+
readonly type: "highlight";
|
|
66
|
+
})[]];
|
|
14
67
|
readonly type: "mathInline";
|
|
15
|
-
}
|
|
68
|
+
}, ...({
|
|
16
69
|
readonly marks?: readonly [{
|
|
17
70
|
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
18
71
|
} | {
|
|
@@ -40,12 +93,10 @@ export declare function cellVisuals<E>(rich: RichSlot<E>): {
|
|
|
40
93
|
})[]];
|
|
41
94
|
readonly text: string;
|
|
42
95
|
readonly type: "text";
|
|
43
|
-
}
|
|
96
|
+
} | {
|
|
44
97
|
readonly attrs: {
|
|
45
98
|
readonly latex: string;
|
|
46
99
|
};
|
|
47
|
-
readonly type: "mathInline";
|
|
48
|
-
} | {
|
|
49
100
|
readonly marks?: readonly [{
|
|
50
101
|
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
51
102
|
} | {
|
|
@@ -71,8 +122,7 @@ export declare function cellVisuals<E>(rich: RichSlot<E>): {
|
|
|
71
122
|
};
|
|
72
123
|
readonly type: "highlight";
|
|
73
124
|
})[]];
|
|
74
|
-
readonly
|
|
75
|
-
readonly type: "text";
|
|
125
|
+
readonly type: "mathInline";
|
|
76
126
|
})[]], E, never, never>>;
|
|
77
127
|
readonly title: RichSlot<E>;
|
|
78
128
|
readonly cells: Schema.$Array<Schema.Literals<readonly ["animal", "plant", "yeast", "bacterium"]>>;
|
|
@@ -117,11 +167,64 @@ export declare function cellVisuals<E>(rich: RichSlot<E>): {
|
|
|
117
167
|
CellScaleLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
118
168
|
readonly description: RichSlot<E>;
|
|
119
169
|
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
170
|
+
readonly marks?: readonly [{
|
|
171
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
172
|
+
} | {
|
|
173
|
+
readonly attrs: {
|
|
174
|
+
readonly href: string;
|
|
175
|
+
};
|
|
176
|
+
readonly type: "link";
|
|
177
|
+
} | {
|
|
178
|
+
readonly attrs: {
|
|
179
|
+
readonly variant: "success" | "warning" | null;
|
|
180
|
+
};
|
|
181
|
+
readonly type: "highlight";
|
|
182
|
+
}, ...({
|
|
183
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
184
|
+
} | {
|
|
185
|
+
readonly attrs: {
|
|
186
|
+
readonly href: string;
|
|
187
|
+
};
|
|
188
|
+
readonly type: "link";
|
|
189
|
+
} | {
|
|
190
|
+
readonly attrs: {
|
|
191
|
+
readonly variant: "success" | "warning" | null;
|
|
192
|
+
};
|
|
193
|
+
readonly type: "highlight";
|
|
194
|
+
})[]];
|
|
195
|
+
readonly text: string;
|
|
196
|
+
readonly type: "text";
|
|
197
|
+
} | {
|
|
120
198
|
readonly attrs: {
|
|
121
199
|
readonly latex: string;
|
|
122
200
|
};
|
|
201
|
+
readonly marks?: readonly [{
|
|
202
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
203
|
+
} | {
|
|
204
|
+
readonly attrs: {
|
|
205
|
+
readonly href: string;
|
|
206
|
+
};
|
|
207
|
+
readonly type: "link";
|
|
208
|
+
} | {
|
|
209
|
+
readonly attrs: {
|
|
210
|
+
readonly variant: "success" | "warning" | null;
|
|
211
|
+
};
|
|
212
|
+
readonly type: "highlight";
|
|
213
|
+
}, ...({
|
|
214
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
215
|
+
} | {
|
|
216
|
+
readonly attrs: {
|
|
217
|
+
readonly href: string;
|
|
218
|
+
};
|
|
219
|
+
readonly type: "link";
|
|
220
|
+
} | {
|
|
221
|
+
readonly attrs: {
|
|
222
|
+
readonly variant: "success" | "warning" | null;
|
|
223
|
+
};
|
|
224
|
+
readonly type: "highlight";
|
|
225
|
+
})[]];
|
|
123
226
|
readonly type: "mathInline";
|
|
124
|
-
}
|
|
227
|
+
}, ...({
|
|
125
228
|
readonly marks?: readonly [{
|
|
126
229
|
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
127
230
|
} | {
|
|
@@ -149,12 +252,10 @@ export declare function cellVisuals<E>(rich: RichSlot<E>): {
|
|
|
149
252
|
})[]];
|
|
150
253
|
readonly text: string;
|
|
151
254
|
readonly type: "text";
|
|
152
|
-
}
|
|
255
|
+
} | {
|
|
153
256
|
readonly attrs: {
|
|
154
257
|
readonly latex: string;
|
|
155
258
|
};
|
|
156
|
-
readonly type: "mathInline";
|
|
157
|
-
} | {
|
|
158
259
|
readonly marks?: readonly [{
|
|
159
260
|
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
160
261
|
} | {
|
|
@@ -180,8 +281,7 @@ export declare function cellVisuals<E>(rich: RichSlot<E>): {
|
|
|
180
281
|
};
|
|
181
282
|
readonly type: "highlight";
|
|
182
283
|
})[]];
|
|
183
|
-
readonly
|
|
184
|
-
readonly type: "text";
|
|
284
|
+
readonly type: "mathInline";
|
|
185
285
|
})[]], E, never, never>>;
|
|
186
286
|
readonly title: RichSlot<E>;
|
|
187
287
|
readonly labels: Schema.Struct<{
|
|
@@ -196,11 +296,64 @@ export declare function cellVisuals<E>(rich: RichSlot<E>): {
|
|
|
196
296
|
DnaHelixLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
197
297
|
readonly description: RichSlot<E>;
|
|
198
298
|
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
299
|
+
readonly marks?: readonly [{
|
|
300
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
301
|
+
} | {
|
|
302
|
+
readonly attrs: {
|
|
303
|
+
readonly href: string;
|
|
304
|
+
};
|
|
305
|
+
readonly type: "link";
|
|
306
|
+
} | {
|
|
307
|
+
readonly attrs: {
|
|
308
|
+
readonly variant: "success" | "warning" | null;
|
|
309
|
+
};
|
|
310
|
+
readonly type: "highlight";
|
|
311
|
+
}, ...({
|
|
312
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
313
|
+
} | {
|
|
314
|
+
readonly attrs: {
|
|
315
|
+
readonly href: string;
|
|
316
|
+
};
|
|
317
|
+
readonly type: "link";
|
|
318
|
+
} | {
|
|
319
|
+
readonly attrs: {
|
|
320
|
+
readonly variant: "success" | "warning" | null;
|
|
321
|
+
};
|
|
322
|
+
readonly type: "highlight";
|
|
323
|
+
})[]];
|
|
324
|
+
readonly text: string;
|
|
325
|
+
readonly type: "text";
|
|
326
|
+
} | {
|
|
199
327
|
readonly attrs: {
|
|
200
328
|
readonly latex: string;
|
|
201
329
|
};
|
|
330
|
+
readonly marks?: readonly [{
|
|
331
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
332
|
+
} | {
|
|
333
|
+
readonly attrs: {
|
|
334
|
+
readonly href: string;
|
|
335
|
+
};
|
|
336
|
+
readonly type: "link";
|
|
337
|
+
} | {
|
|
338
|
+
readonly attrs: {
|
|
339
|
+
readonly variant: "success" | "warning" | null;
|
|
340
|
+
};
|
|
341
|
+
readonly type: "highlight";
|
|
342
|
+
}, ...({
|
|
343
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
344
|
+
} | {
|
|
345
|
+
readonly attrs: {
|
|
346
|
+
readonly href: string;
|
|
347
|
+
};
|
|
348
|
+
readonly type: "link";
|
|
349
|
+
} | {
|
|
350
|
+
readonly attrs: {
|
|
351
|
+
readonly variant: "success" | "warning" | null;
|
|
352
|
+
};
|
|
353
|
+
readonly type: "highlight";
|
|
354
|
+
})[]];
|
|
202
355
|
readonly type: "mathInline";
|
|
203
|
-
}
|
|
356
|
+
}, ...({
|
|
204
357
|
readonly marks?: readonly [{
|
|
205
358
|
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
206
359
|
} | {
|
|
@@ -228,12 +381,10 @@ export declare function cellVisuals<E>(rich: RichSlot<E>): {
|
|
|
228
381
|
})[]];
|
|
229
382
|
readonly text: string;
|
|
230
383
|
readonly type: "text";
|
|
231
|
-
}
|
|
384
|
+
} | {
|
|
232
385
|
readonly attrs: {
|
|
233
386
|
readonly latex: string;
|
|
234
387
|
};
|
|
235
|
-
readonly type: "mathInline";
|
|
236
|
-
} | {
|
|
237
388
|
readonly marks?: readonly [{
|
|
238
389
|
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
239
390
|
} | {
|
|
@@ -259,8 +410,7 @@ export declare function cellVisuals<E>(rich: RichSlot<E>): {
|
|
|
259
410
|
};
|
|
260
411
|
readonly type: "highlight";
|
|
261
412
|
})[]];
|
|
262
|
-
readonly
|
|
263
|
-
readonly type: "text";
|
|
413
|
+
readonly type: "mathInline";
|
|
264
414
|
})[]], E, never, never>>;
|
|
265
415
|
readonly title: RichSlot<E>;
|
|
266
416
|
readonly copy: Schema.optionalKey<Schema.Boolean>;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The chromosome lab. How long the DNA would be is what a question asks a
|
|
5
|
+
* learner to work out, so that readout is answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function chromosomeVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
ChromosomePackingLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
11
|
+
readonly marks?: readonly [{
|
|
12
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
13
|
+
} | {
|
|
14
|
+
readonly attrs: {
|
|
15
|
+
readonly href: string;
|
|
16
|
+
};
|
|
17
|
+
readonly type: "link";
|
|
18
|
+
} | {
|
|
19
|
+
readonly attrs: {
|
|
20
|
+
readonly variant: "success" | "warning" | null;
|
|
21
|
+
};
|
|
22
|
+
readonly type: "highlight";
|
|
23
|
+
}, ...({
|
|
24
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
25
|
+
} | {
|
|
26
|
+
readonly attrs: {
|
|
27
|
+
readonly href: string;
|
|
28
|
+
};
|
|
29
|
+
readonly type: "link";
|
|
30
|
+
} | {
|
|
31
|
+
readonly attrs: {
|
|
32
|
+
readonly variant: "success" | "warning" | null;
|
|
33
|
+
};
|
|
34
|
+
readonly type: "highlight";
|
|
35
|
+
})[]];
|
|
36
|
+
readonly text: string;
|
|
37
|
+
readonly type: "text";
|
|
38
|
+
} | {
|
|
39
|
+
readonly attrs: {
|
|
40
|
+
readonly latex: string;
|
|
41
|
+
};
|
|
42
|
+
readonly marks?: readonly [{
|
|
43
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
44
|
+
} | {
|
|
45
|
+
readonly attrs: {
|
|
46
|
+
readonly href: string;
|
|
47
|
+
};
|
|
48
|
+
readonly type: "link";
|
|
49
|
+
} | {
|
|
50
|
+
readonly attrs: {
|
|
51
|
+
readonly variant: "success" | "warning" | null;
|
|
52
|
+
};
|
|
53
|
+
readonly type: "highlight";
|
|
54
|
+
}, ...({
|
|
55
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
56
|
+
} | {
|
|
57
|
+
readonly attrs: {
|
|
58
|
+
readonly href: string;
|
|
59
|
+
};
|
|
60
|
+
readonly type: "link";
|
|
61
|
+
} | {
|
|
62
|
+
readonly attrs: {
|
|
63
|
+
readonly variant: "success" | "warning" | null;
|
|
64
|
+
};
|
|
65
|
+
readonly type: "highlight";
|
|
66
|
+
})[]];
|
|
67
|
+
readonly type: "mathInline";
|
|
68
|
+
}, ...({
|
|
69
|
+
readonly marks?: readonly [{
|
|
70
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
71
|
+
} | {
|
|
72
|
+
readonly attrs: {
|
|
73
|
+
readonly href: string;
|
|
74
|
+
};
|
|
75
|
+
readonly type: "link";
|
|
76
|
+
} | {
|
|
77
|
+
readonly attrs: {
|
|
78
|
+
readonly variant: "success" | "warning" | null;
|
|
79
|
+
};
|
|
80
|
+
readonly type: "highlight";
|
|
81
|
+
}, ...({
|
|
82
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
83
|
+
} | {
|
|
84
|
+
readonly attrs: {
|
|
85
|
+
readonly href: string;
|
|
86
|
+
};
|
|
87
|
+
readonly type: "link";
|
|
88
|
+
} | {
|
|
89
|
+
readonly attrs: {
|
|
90
|
+
readonly variant: "success" | "warning" | null;
|
|
91
|
+
};
|
|
92
|
+
readonly type: "highlight";
|
|
93
|
+
})[]];
|
|
94
|
+
readonly text: string;
|
|
95
|
+
readonly type: "text";
|
|
96
|
+
} | {
|
|
97
|
+
readonly attrs: {
|
|
98
|
+
readonly latex: string;
|
|
99
|
+
};
|
|
100
|
+
readonly marks?: readonly [{
|
|
101
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
102
|
+
} | {
|
|
103
|
+
readonly attrs: {
|
|
104
|
+
readonly href: string;
|
|
105
|
+
};
|
|
106
|
+
readonly type: "link";
|
|
107
|
+
} | {
|
|
108
|
+
readonly attrs: {
|
|
109
|
+
readonly variant: "success" | "warning" | null;
|
|
110
|
+
};
|
|
111
|
+
readonly type: "highlight";
|
|
112
|
+
}, ...({
|
|
113
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
114
|
+
} | {
|
|
115
|
+
readonly attrs: {
|
|
116
|
+
readonly href: string;
|
|
117
|
+
};
|
|
118
|
+
readonly type: "link";
|
|
119
|
+
} | {
|
|
120
|
+
readonly attrs: {
|
|
121
|
+
readonly variant: "success" | "warning" | null;
|
|
122
|
+
};
|
|
123
|
+
readonly type: "highlight";
|
|
124
|
+
})[]];
|
|
125
|
+
readonly type: "mathInline";
|
|
126
|
+
})[]], E, never, never>>;
|
|
127
|
+
readonly title: RichSlot<E>;
|
|
128
|
+
readonly basePairs: Schema.Int;
|
|
129
|
+
readonly labels: Schema.Struct<{
|
|
130
|
+
readonly length: Schema.optionalKey<RichSlot<E>>;
|
|
131
|
+
readonly level: Schema.Trimmed;
|
|
132
|
+
readonly levels: Schema.$Record<Schema.Literals<readonly ["nucleotide", "helix", "nucleosome", "fibre", "chromosome"]>, Schema.optionalKey<Schema.Trimmed>>;
|
|
133
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["phosphate", "sugar", "base", "histone", "chromatid", "centromere"]>, Schema.Trimmed>;
|
|
134
|
+
readonly view: Schema.Trimmed;
|
|
135
|
+
readonly width: RichSlot<E>;
|
|
136
|
+
}>;
|
|
137
|
+
readonly levels: Schema.NonEmptyArray<Schema.Literals<readonly ["nucleotide", "helix", "nucleosome", "fibre", "chromosome"]>>;
|
|
138
|
+
}>, "figure">;
|
|
139
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, byPickedIds, cardFields, namesEach, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
+
const LEVELS = [
|
|
5
|
+
"nucleotide",
|
|
6
|
+
"helix",
|
|
7
|
+
"nucleosome",
|
|
8
|
+
"fibre",
|
|
9
|
+
"chromosome",
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* Props of `ChromosomePackingLab`: one DNA molecule of `basePairs` base pairs
|
|
13
|
+
* zoomed from a single nucleotide to a whole chromosome, through the levels
|
|
14
|
+
* the learner picks from `levels` (each once, smallest first). The readouts
|
|
15
|
+
* give the width at each level and, only when `labels.length` names it, how
|
|
16
|
+
* long the stretched-out DNA would be, so a question that asks for the length
|
|
17
|
+
* leaves its name out.
|
|
18
|
+
*/
|
|
19
|
+
function chromosomePackingLab(rich) {
|
|
20
|
+
return figure(Schema.Struct({
|
|
21
|
+
...cardFields(rich),
|
|
22
|
+
basePairs: Schema.Int.check(Schema.isGreaterThan(0)),
|
|
23
|
+
labels: Schema.Struct({
|
|
24
|
+
length: Schema.optionalKey(rich),
|
|
25
|
+
level: TextSchema,
|
|
26
|
+
levels: byPickedIds(LEVELS, TextSchema),
|
|
27
|
+
parts: byIds(["phosphate", "sugar", "base", "histone", "chromatid", "centromere"], TextSchema),
|
|
28
|
+
view: TextSchema,
|
|
29
|
+
width: rich,
|
|
30
|
+
}),
|
|
31
|
+
levels: Schema.NonEmptyArray(Schema.Literals(LEVELS)).check(Schema.isUnique()),
|
|
32
|
+
}).check(Schema.makeFilter(({ labels, levels }) => namesEach(levels, labels.levels), {
|
|
33
|
+
message: "Expected a name for every level the lab shows, and no other.",
|
|
34
|
+
})), answerAt(["labels", "length"]));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The chromosome lab. How long the DNA would be is what a question asks a
|
|
38
|
+
* learner to work out, so that readout is answer state.
|
|
39
|
+
*/
|
|
40
|
+
export function chromosomeVisuals(rich) {
|
|
41
|
+
return { ChromosomePackingLab: chromosomePackingLab(rich) };
|
|
42
|
+
}
|