@nakafa/aksara-contracts 8.14.0 → 8.15.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/visual/biology/flower.d.ts +276 -0
- package/dist/visual/biology/flower.js +76 -0
- package/dist/visual/biology/membrane.d.ts +141 -2
- package/dist/visual/biology/membrane.js +44 -2
- package/dist/visual/biology/mendelian.d.ts +410 -0
- package/dist/visual/biology/mendelian.js +107 -0
- package/dist/visual/biology/nutrition.d.ts +410 -0
- package/dist/visual/biology/nutrition.js +112 -0
- package/dist/visual/biology/phytohormone.d.ts +275 -0
- package/dist/visual/biology/phytohormone.js +75 -0
- package/dist/visual/biology/variation.d.ts +421 -0
- package/dist/visual/biology/variation.js +123 -0
- package/dist/visual/biology/vascular.d.ts +425 -0
- package/dist/visual/biology/vascular.js +107 -0
- package/dist/visual/biology.d.ts +2169 -0
- package/dist/visual/biology.js +12 -0
- package/dist/visual/catalog.d.ts +2962 -654
- package/package.json +1 -1
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* Vascular plant transport labs covering xylem water lift, phloem pressure
|
|
5
|
+
* flow and ringing, and heavy-metal phytoremediation.
|
|
6
|
+
*/
|
|
7
|
+
export declare function vascularVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
PhloemTranslocationLab: 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 labels: Schema.Struct<{
|
|
129
|
+
readonly barkState: Schema.optionalKey<RichSlot<E>>;
|
|
130
|
+
readonly mode: Schema.Trimmed;
|
|
131
|
+
readonly modes: Schema.$Record<Schema.Literals<readonly ["intact", "ringed"]>, Schema.optionalKey<Schema.Struct<{
|
|
132
|
+
readonly name: Schema.Trimmed;
|
|
133
|
+
readonly outcome: RichSlot<E>;
|
|
134
|
+
}>>>;
|
|
135
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["sieveTube", "sievePlate", "companionCell", "xylem", "sucrose"]>, Schema.Trimmed>;
|
|
136
|
+
readonly pressureDiff: Schema.optionalKey<RichSlot<E>>;
|
|
137
|
+
readonly sourceSucrose: Schema.Trimmed;
|
|
138
|
+
readonly view: Schema.Trimmed;
|
|
139
|
+
}>;
|
|
140
|
+
readonly modes: Schema.NonEmptyArray<Schema.Literals<readonly ["intact", "ringed"]>>;
|
|
141
|
+
readonly sourceSucrose: Schema.Struct<{
|
|
142
|
+
readonly max: Schema.Finite;
|
|
143
|
+
readonly min: Schema.Finite;
|
|
144
|
+
readonly value: Schema.Finite;
|
|
145
|
+
}>;
|
|
146
|
+
}>, "figure">;
|
|
147
|
+
PhytoremediationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
148
|
+
readonly description: RichSlot<E>;
|
|
149
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
150
|
+
readonly marks?: readonly [{
|
|
151
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
152
|
+
} | {
|
|
153
|
+
readonly attrs: {
|
|
154
|
+
readonly href: string;
|
|
155
|
+
};
|
|
156
|
+
readonly type: "link";
|
|
157
|
+
} | {
|
|
158
|
+
readonly attrs: {
|
|
159
|
+
readonly variant: "success" | "warning" | null;
|
|
160
|
+
};
|
|
161
|
+
readonly type: "highlight";
|
|
162
|
+
}, ...({
|
|
163
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
164
|
+
} | {
|
|
165
|
+
readonly attrs: {
|
|
166
|
+
readonly href: string;
|
|
167
|
+
};
|
|
168
|
+
readonly type: "link";
|
|
169
|
+
} | {
|
|
170
|
+
readonly attrs: {
|
|
171
|
+
readonly variant: "success" | "warning" | null;
|
|
172
|
+
};
|
|
173
|
+
readonly type: "highlight";
|
|
174
|
+
})[]];
|
|
175
|
+
readonly text: string;
|
|
176
|
+
readonly type: "text";
|
|
177
|
+
} | {
|
|
178
|
+
readonly attrs: {
|
|
179
|
+
readonly latex: string;
|
|
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 type: "mathInline";
|
|
207
|
+
}, ...({
|
|
208
|
+
readonly marks?: readonly [{
|
|
209
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
210
|
+
} | {
|
|
211
|
+
readonly attrs: {
|
|
212
|
+
readonly href: string;
|
|
213
|
+
};
|
|
214
|
+
readonly type: "link";
|
|
215
|
+
} | {
|
|
216
|
+
readonly attrs: {
|
|
217
|
+
readonly variant: "success" | "warning" | null;
|
|
218
|
+
};
|
|
219
|
+
readonly type: "highlight";
|
|
220
|
+
}, ...({
|
|
221
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
222
|
+
} | {
|
|
223
|
+
readonly attrs: {
|
|
224
|
+
readonly href: string;
|
|
225
|
+
};
|
|
226
|
+
readonly type: "link";
|
|
227
|
+
} | {
|
|
228
|
+
readonly attrs: {
|
|
229
|
+
readonly variant: "success" | "warning" | null;
|
|
230
|
+
};
|
|
231
|
+
readonly type: "highlight";
|
|
232
|
+
})[]];
|
|
233
|
+
readonly text: string;
|
|
234
|
+
readonly type: "text";
|
|
235
|
+
} | {
|
|
236
|
+
readonly attrs: {
|
|
237
|
+
readonly latex: string;
|
|
238
|
+
};
|
|
239
|
+
readonly marks?: readonly [{
|
|
240
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
241
|
+
} | {
|
|
242
|
+
readonly attrs: {
|
|
243
|
+
readonly href: string;
|
|
244
|
+
};
|
|
245
|
+
readonly type: "link";
|
|
246
|
+
} | {
|
|
247
|
+
readonly attrs: {
|
|
248
|
+
readonly variant: "success" | "warning" | null;
|
|
249
|
+
};
|
|
250
|
+
readonly type: "highlight";
|
|
251
|
+
}, ...({
|
|
252
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
253
|
+
} | {
|
|
254
|
+
readonly attrs: {
|
|
255
|
+
readonly href: string;
|
|
256
|
+
};
|
|
257
|
+
readonly type: "link";
|
|
258
|
+
} | {
|
|
259
|
+
readonly attrs: {
|
|
260
|
+
readonly variant: "success" | "warning" | null;
|
|
261
|
+
};
|
|
262
|
+
readonly type: "highlight";
|
|
263
|
+
})[]];
|
|
264
|
+
readonly type: "mathInline";
|
|
265
|
+
})[]], E, never, never>>;
|
|
266
|
+
readonly title: RichSlot<E>;
|
|
267
|
+
readonly harvests: Schema.Struct<{
|
|
268
|
+
readonly max: Schema.Finite;
|
|
269
|
+
readonly min: Schema.Finite;
|
|
270
|
+
readonly value: Schema.Finite;
|
|
271
|
+
}>;
|
|
272
|
+
readonly labels: Schema.Struct<{
|
|
273
|
+
readonly harvests: Schema.Trimmed;
|
|
274
|
+
readonly medium: Schema.optionalKey<RichSlot<E>>;
|
|
275
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["shoot", "rootZone", "metalIon", "soilBed", "waterChannel"]>, Schema.Trimmed>;
|
|
276
|
+
readonly plant: Schema.Trimmed;
|
|
277
|
+
readonly plants: Schema.$Record<Schema.Literals<readonly ["mustard", "hyacinth", "vetiver"]>, Schema.optionalKey<Schema.Struct<{
|
|
278
|
+
readonly medium: RichSlot<E>;
|
|
279
|
+
readonly name: Schema.Trimmed;
|
|
280
|
+
}>>>;
|
|
281
|
+
readonly remaining: Schema.optionalKey<RichSlot<E>>;
|
|
282
|
+
readonly view: Schema.Trimmed;
|
|
283
|
+
}>;
|
|
284
|
+
readonly plants: Schema.NonEmptyArray<Schema.Literals<readonly ["mustard", "hyacinth", "vetiver"]>>;
|
|
285
|
+
}>, "figure">;
|
|
286
|
+
XylemCohesionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
287
|
+
readonly description: RichSlot<E>;
|
|
288
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
289
|
+
readonly marks?: readonly [{
|
|
290
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
291
|
+
} | {
|
|
292
|
+
readonly attrs: {
|
|
293
|
+
readonly href: string;
|
|
294
|
+
};
|
|
295
|
+
readonly type: "link";
|
|
296
|
+
} | {
|
|
297
|
+
readonly attrs: {
|
|
298
|
+
readonly variant: "success" | "warning" | null;
|
|
299
|
+
};
|
|
300
|
+
readonly type: "highlight";
|
|
301
|
+
}, ...({
|
|
302
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
303
|
+
} | {
|
|
304
|
+
readonly attrs: {
|
|
305
|
+
readonly href: string;
|
|
306
|
+
};
|
|
307
|
+
readonly type: "link";
|
|
308
|
+
} | {
|
|
309
|
+
readonly attrs: {
|
|
310
|
+
readonly variant: "success" | "warning" | null;
|
|
311
|
+
};
|
|
312
|
+
readonly type: "highlight";
|
|
313
|
+
})[]];
|
|
314
|
+
readonly text: string;
|
|
315
|
+
readonly type: "text";
|
|
316
|
+
} | {
|
|
317
|
+
readonly attrs: {
|
|
318
|
+
readonly latex: string;
|
|
319
|
+
};
|
|
320
|
+
readonly marks?: readonly [{
|
|
321
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
322
|
+
} | {
|
|
323
|
+
readonly attrs: {
|
|
324
|
+
readonly href: string;
|
|
325
|
+
};
|
|
326
|
+
readonly type: "link";
|
|
327
|
+
} | {
|
|
328
|
+
readonly attrs: {
|
|
329
|
+
readonly variant: "success" | "warning" | null;
|
|
330
|
+
};
|
|
331
|
+
readonly type: "highlight";
|
|
332
|
+
}, ...({
|
|
333
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
334
|
+
} | {
|
|
335
|
+
readonly attrs: {
|
|
336
|
+
readonly href: string;
|
|
337
|
+
};
|
|
338
|
+
readonly type: "link";
|
|
339
|
+
} | {
|
|
340
|
+
readonly attrs: {
|
|
341
|
+
readonly variant: "success" | "warning" | null;
|
|
342
|
+
};
|
|
343
|
+
readonly type: "highlight";
|
|
344
|
+
})[]];
|
|
345
|
+
readonly type: "mathInline";
|
|
346
|
+
}, ...({
|
|
347
|
+
readonly marks?: readonly [{
|
|
348
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
349
|
+
} | {
|
|
350
|
+
readonly attrs: {
|
|
351
|
+
readonly href: string;
|
|
352
|
+
};
|
|
353
|
+
readonly type: "link";
|
|
354
|
+
} | {
|
|
355
|
+
readonly attrs: {
|
|
356
|
+
readonly variant: "success" | "warning" | null;
|
|
357
|
+
};
|
|
358
|
+
readonly type: "highlight";
|
|
359
|
+
}, ...({
|
|
360
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
361
|
+
} | {
|
|
362
|
+
readonly attrs: {
|
|
363
|
+
readonly href: string;
|
|
364
|
+
};
|
|
365
|
+
readonly type: "link";
|
|
366
|
+
} | {
|
|
367
|
+
readonly attrs: {
|
|
368
|
+
readonly variant: "success" | "warning" | null;
|
|
369
|
+
};
|
|
370
|
+
readonly type: "highlight";
|
|
371
|
+
})[]];
|
|
372
|
+
readonly text: string;
|
|
373
|
+
readonly type: "text";
|
|
374
|
+
} | {
|
|
375
|
+
readonly attrs: {
|
|
376
|
+
readonly latex: string;
|
|
377
|
+
};
|
|
378
|
+
readonly marks?: readonly [{
|
|
379
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
380
|
+
} | {
|
|
381
|
+
readonly attrs: {
|
|
382
|
+
readonly href: string;
|
|
383
|
+
};
|
|
384
|
+
readonly type: "link";
|
|
385
|
+
} | {
|
|
386
|
+
readonly attrs: {
|
|
387
|
+
readonly variant: "success" | "warning" | null;
|
|
388
|
+
};
|
|
389
|
+
readonly type: "highlight";
|
|
390
|
+
}, ...({
|
|
391
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
392
|
+
} | {
|
|
393
|
+
readonly attrs: {
|
|
394
|
+
readonly href: string;
|
|
395
|
+
};
|
|
396
|
+
readonly type: "link";
|
|
397
|
+
} | {
|
|
398
|
+
readonly attrs: {
|
|
399
|
+
readonly variant: "success" | "warning" | null;
|
|
400
|
+
};
|
|
401
|
+
readonly type: "highlight";
|
|
402
|
+
})[]];
|
|
403
|
+
readonly type: "mathInline";
|
|
404
|
+
})[]], E, never, never>>;
|
|
405
|
+
readonly title: RichSlot<E>;
|
|
406
|
+
readonly forces: Schema.NonEmptyArray<Schema.Literals<readonly ["rootPressure", "capillary", "transpirationPull"]>>;
|
|
407
|
+
readonly height: Schema.Struct<{
|
|
408
|
+
readonly max: Schema.Finite;
|
|
409
|
+
readonly min: Schema.Finite;
|
|
410
|
+
readonly value: Schema.Finite;
|
|
411
|
+
}>;
|
|
412
|
+
readonly labels: Schema.Struct<{
|
|
413
|
+
readonly force: Schema.Trimmed;
|
|
414
|
+
readonly forces: Schema.$Record<Schema.Literals<readonly ["rootPressure", "capillary", "transpirationPull"]>, Schema.optionalKey<Schema.Struct<{
|
|
415
|
+
readonly mechanism: RichSlot<E>;
|
|
416
|
+
readonly name: Schema.Trimmed;
|
|
417
|
+
}>>>;
|
|
418
|
+
readonly height: Schema.Trimmed;
|
|
419
|
+
readonly mechanism: Schema.optionalKey<RichSlot<E>>;
|
|
420
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["ligninWall", "waterColumn", "cohesionBond", "stoma", "rootCell"]>, Schema.Trimmed>;
|
|
421
|
+
readonly pressureNeeded: Schema.optionalKey<RichSlot<E>>;
|
|
422
|
+
readonly view: Schema.Trimmed;
|
|
423
|
+
}>;
|
|
424
|
+
}>, "figure">;
|
|
425
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
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 PositiveSchema = Schema.Finite.check(Schema.isGreaterThan(0));
|
|
5
|
+
const NonNegativeSchema = Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0));
|
|
6
|
+
const SliderSchema = Schema.Struct({
|
|
7
|
+
max: PositiveSchema,
|
|
8
|
+
min: NonNegativeSchema,
|
|
9
|
+
value: NonNegativeSchema,
|
|
10
|
+
}).check(Schema.makeFilter(({ max, min, value }) => min < max && min <= value && value <= max, {
|
|
11
|
+
message: "Expected a slider range whose minimum is below its maximum, with the starting value between them.",
|
|
12
|
+
}));
|
|
13
|
+
const LIFT_FORCES = ["rootPressure", "capillary", "transpirationPull"];
|
|
14
|
+
const RING_MODES = ["intact", "ringed"];
|
|
15
|
+
const REMEDIATION_PLANTS = ["mustard", "hyacinth", "vetiver"];
|
|
16
|
+
/**
|
|
17
|
+
* Props of `XylemCohesionLab`: a 3D hollow lignified xylem vessel column
|
|
18
|
+
* comparing root pressure, capillary adhesion-cohesion, and transpiration
|
|
19
|
+
* pull against tree height. Dominant force and reach readouts are optional
|
|
20
|
+
* answer state.
|
|
21
|
+
*/
|
|
22
|
+
function xylemCohesionLab(rich) {
|
|
23
|
+
return figure(Schema.Struct({
|
|
24
|
+
...cardFields(rich),
|
|
25
|
+
forces: Schema.NonEmptyArray(Schema.Literals(LIFT_FORCES)).check(Schema.isUnique()),
|
|
26
|
+
height: SliderSchema,
|
|
27
|
+
labels: Schema.Struct({
|
|
28
|
+
force: TextSchema,
|
|
29
|
+
forces: byPickedIds(LIFT_FORCES, Schema.Struct({
|
|
30
|
+
mechanism: rich,
|
|
31
|
+
name: TextSchema,
|
|
32
|
+
})),
|
|
33
|
+
height: TextSchema,
|
|
34
|
+
mechanism: Schema.optionalKey(rich),
|
|
35
|
+
parts: byIds(["ligninWall", "waterColumn", "cohesionBond", "stoma", "rootCell"], TextSchema),
|
|
36
|
+
pressureNeeded: Schema.optionalKey(rich),
|
|
37
|
+
view: TextSchema,
|
|
38
|
+
}),
|
|
39
|
+
}).check(Schema.makeFilter(({ forces, labels }) => namesEach(forces, labels.forces), {
|
|
40
|
+
message: "Expected a name and mechanism note for every water-lifting force shown, and no other.",
|
|
41
|
+
})), answerAt(["labels", "mechanism"], ["labels", "pressureNeeded"]));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Props of `PhloemTranslocationLab`: a 3D sieve-tube and companion-cell
|
|
45
|
+
* column showing ATP sucrose loading at the leaf source, osmotic pressure
|
|
46
|
+
* flow toward the root sink, and bark ringing accumulation above the ring.
|
|
47
|
+
* Pressure gradient and bark outcome readouts are optional answer state.
|
|
48
|
+
*/
|
|
49
|
+
function phloemTranslocationLab(rich) {
|
|
50
|
+
return figure(Schema.Struct({
|
|
51
|
+
...cardFields(rich),
|
|
52
|
+
labels: Schema.Struct({
|
|
53
|
+
barkState: Schema.optionalKey(rich),
|
|
54
|
+
mode: TextSchema,
|
|
55
|
+
modes: byPickedIds(RING_MODES, Schema.Struct({
|
|
56
|
+
name: TextSchema,
|
|
57
|
+
outcome: rich,
|
|
58
|
+
})),
|
|
59
|
+
parts: byIds(["sieveTube", "sievePlate", "companionCell", "xylem", "sucrose"], TextSchema),
|
|
60
|
+
pressureDiff: Schema.optionalKey(rich),
|
|
61
|
+
sourceSucrose: TextSchema,
|
|
62
|
+
view: TextSchema,
|
|
63
|
+
}),
|
|
64
|
+
modes: Schema.NonEmptyArray(Schema.Literals(RING_MODES)).check(Schema.isUnique()),
|
|
65
|
+
sourceSucrose: SliderSchema,
|
|
66
|
+
}).check(Schema.makeFilter(({ labels, modes }) => namesEach(modes, labels.modes), {
|
|
67
|
+
message: "Expected a name and outcome note for every phloem stem mode shown, and no other.",
|
|
68
|
+
})), answerAt(["labels", "barkState"], ["labels", "pressureDiff"]));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Props of `PhytoremediationLab`: a 3D polluted soil or water bed where
|
|
72
|
+
* hyperaccumulator roots absorb heavy-metal ions into harvestable shoots
|
|
73
|
+
* across repeated harvest cycles. Remaining pollutant and target medium
|
|
74
|
+
* readouts are optional answer state.
|
|
75
|
+
*/
|
|
76
|
+
function phytoremediationLab(rich) {
|
|
77
|
+
return figure(Schema.Struct({
|
|
78
|
+
...cardFields(rich),
|
|
79
|
+
harvests: SliderSchema,
|
|
80
|
+
labels: Schema.Struct({
|
|
81
|
+
harvests: TextSchema,
|
|
82
|
+
medium: Schema.optionalKey(rich),
|
|
83
|
+
parts: byIds(["shoot", "rootZone", "metalIon", "soilBed", "waterChannel"], TextSchema),
|
|
84
|
+
plant: TextSchema,
|
|
85
|
+
plants: byPickedIds(REMEDIATION_PLANTS, Schema.Struct({
|
|
86
|
+
medium: rich,
|
|
87
|
+
name: TextSchema,
|
|
88
|
+
})),
|
|
89
|
+
remaining: Schema.optionalKey(rich),
|
|
90
|
+
view: TextSchema,
|
|
91
|
+
}),
|
|
92
|
+
plants: Schema.NonEmptyArray(Schema.Literals(REMEDIATION_PLANTS)).check(Schema.isUnique()),
|
|
93
|
+
}).check(Schema.makeFilter(({ labels, plants }) => namesEach(plants, labels.plants), {
|
|
94
|
+
message: "Expected a name and medium note for every phytoremediation plant shown, and no other.",
|
|
95
|
+
})), answerAt(["labels", "medium"], ["labels", "remaining"]));
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Vascular plant transport labs covering xylem water lift, phloem pressure
|
|
99
|
+
* flow and ringing, and heavy-metal phytoremediation.
|
|
100
|
+
*/
|
|
101
|
+
export function vascularVisuals(rich) {
|
|
102
|
+
return {
|
|
103
|
+
PhloemTranslocationLab: phloemTranslocationLab(rich),
|
|
104
|
+
PhytoremediationLab: phytoremediationLab(rich),
|
|
105
|
+
XylemCohesionLab: xylemCohesionLab(rich),
|
|
106
|
+
};
|
|
107
|
+
}
|