@nakafa/aksara-contracts 8.12.0 → 8.13.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/leaf.d.ts +436 -0
- package/dist/visual/biology/leaf.js +151 -0
- package/dist/visual/biology/tissue.d.ts +424 -0
- package/dist/visual/biology/tissue.js +140 -0
- package/dist/visual/catalog.d.ts +2072 -787
- package/dist/visual/catalog.js +6 -0
- package/dist/visual/chemistry/equilibrium.d.ts +449 -0
- package/dist/visual/chemistry/equilibrium.js +135 -0
- package/package.json +1 -1
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* Plant tissue organisation and growth labs covering meristematic vs permanent
|
|
5
|
+
* anatomy, primary and secondary growth zones, and sigmoid dry-mass curves.
|
|
6
|
+
*/
|
|
7
|
+
export declare function tissueVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
PlantGrowthCurveLab: 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 dryMass: RichSlot<E>;
|
|
130
|
+
readonly phase: Schema.optionalKey<RichSlot<E>>;
|
|
131
|
+
readonly phases: Schema.$Record<Schema.Literals<readonly ["lag", "exponential", "slowing", "stationary", "senescence"]>, Schema.Struct<{
|
|
132
|
+
readonly detail: RichSlot<E>;
|
|
133
|
+
readonly name: Schema.Trimmed;
|
|
134
|
+
}>>;
|
|
135
|
+
readonly rate: RichSlot<E>;
|
|
136
|
+
readonly time: Schema.Trimmed;
|
|
137
|
+
readonly type: Schema.Trimmed;
|
|
138
|
+
readonly types: Schema.$Record<Schema.Literals<readonly ["annual", "biennial", "perennial"]>, Schema.optionalKey<Schema.Trimmed>>;
|
|
139
|
+
readonly view: Schema.Trimmed;
|
|
140
|
+
}>;
|
|
141
|
+
readonly types: Schema.NonEmptyArray<Schema.Literals<readonly ["annual", "biennial", "perennial"]>>;
|
|
142
|
+
}>, "figure">;
|
|
143
|
+
PlantTissueAnatomyLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
144
|
+
readonly description: RichSlot<E>;
|
|
145
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
146
|
+
readonly marks?: readonly [{
|
|
147
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
148
|
+
} | {
|
|
149
|
+
readonly attrs: {
|
|
150
|
+
readonly href: string;
|
|
151
|
+
};
|
|
152
|
+
readonly type: "link";
|
|
153
|
+
} | {
|
|
154
|
+
readonly attrs: {
|
|
155
|
+
readonly variant: "success" | "warning" | null;
|
|
156
|
+
};
|
|
157
|
+
readonly type: "highlight";
|
|
158
|
+
}, ...({
|
|
159
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
160
|
+
} | {
|
|
161
|
+
readonly attrs: {
|
|
162
|
+
readonly href: string;
|
|
163
|
+
};
|
|
164
|
+
readonly type: "link";
|
|
165
|
+
} | {
|
|
166
|
+
readonly attrs: {
|
|
167
|
+
readonly variant: "success" | "warning" | null;
|
|
168
|
+
};
|
|
169
|
+
readonly type: "highlight";
|
|
170
|
+
})[]];
|
|
171
|
+
readonly text: string;
|
|
172
|
+
readonly type: "text";
|
|
173
|
+
} | {
|
|
174
|
+
readonly attrs: {
|
|
175
|
+
readonly latex: string;
|
|
176
|
+
};
|
|
177
|
+
readonly marks?: readonly [{
|
|
178
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
179
|
+
} | {
|
|
180
|
+
readonly attrs: {
|
|
181
|
+
readonly href: string;
|
|
182
|
+
};
|
|
183
|
+
readonly type: "link";
|
|
184
|
+
} | {
|
|
185
|
+
readonly attrs: {
|
|
186
|
+
readonly variant: "success" | "warning" | null;
|
|
187
|
+
};
|
|
188
|
+
readonly type: "highlight";
|
|
189
|
+
}, ...({
|
|
190
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
191
|
+
} | {
|
|
192
|
+
readonly attrs: {
|
|
193
|
+
readonly href: string;
|
|
194
|
+
};
|
|
195
|
+
readonly type: "link";
|
|
196
|
+
} | {
|
|
197
|
+
readonly attrs: {
|
|
198
|
+
readonly variant: "success" | "warning" | null;
|
|
199
|
+
};
|
|
200
|
+
readonly type: "highlight";
|
|
201
|
+
})[]];
|
|
202
|
+
readonly type: "mathInline";
|
|
203
|
+
}, ...({
|
|
204
|
+
readonly marks?: readonly [{
|
|
205
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
206
|
+
} | {
|
|
207
|
+
readonly attrs: {
|
|
208
|
+
readonly href: string;
|
|
209
|
+
};
|
|
210
|
+
readonly type: "link";
|
|
211
|
+
} | {
|
|
212
|
+
readonly attrs: {
|
|
213
|
+
readonly variant: "success" | "warning" | null;
|
|
214
|
+
};
|
|
215
|
+
readonly type: "highlight";
|
|
216
|
+
}, ...({
|
|
217
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
218
|
+
} | {
|
|
219
|
+
readonly attrs: {
|
|
220
|
+
readonly href: string;
|
|
221
|
+
};
|
|
222
|
+
readonly type: "link";
|
|
223
|
+
} | {
|
|
224
|
+
readonly attrs: {
|
|
225
|
+
readonly variant: "success" | "warning" | null;
|
|
226
|
+
};
|
|
227
|
+
readonly type: "highlight";
|
|
228
|
+
})[]];
|
|
229
|
+
readonly text: string;
|
|
230
|
+
readonly type: "text";
|
|
231
|
+
} | {
|
|
232
|
+
readonly attrs: {
|
|
233
|
+
readonly latex: string;
|
|
234
|
+
};
|
|
235
|
+
readonly marks?: readonly [{
|
|
236
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
237
|
+
} | {
|
|
238
|
+
readonly attrs: {
|
|
239
|
+
readonly href: string;
|
|
240
|
+
};
|
|
241
|
+
readonly type: "link";
|
|
242
|
+
} | {
|
|
243
|
+
readonly attrs: {
|
|
244
|
+
readonly variant: "success" | "warning" | null;
|
|
245
|
+
};
|
|
246
|
+
readonly type: "highlight";
|
|
247
|
+
}, ...({
|
|
248
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
249
|
+
} | {
|
|
250
|
+
readonly attrs: {
|
|
251
|
+
readonly href: string;
|
|
252
|
+
};
|
|
253
|
+
readonly type: "link";
|
|
254
|
+
} | {
|
|
255
|
+
readonly attrs: {
|
|
256
|
+
readonly variant: "success" | "warning" | null;
|
|
257
|
+
};
|
|
258
|
+
readonly type: "highlight";
|
|
259
|
+
})[]];
|
|
260
|
+
readonly type: "mathInline";
|
|
261
|
+
})[]], E, never, never>>;
|
|
262
|
+
readonly title: RichSlot<E>;
|
|
263
|
+
readonly labels: Schema.Struct<{
|
|
264
|
+
readonly function: Schema.optionalKey<RichSlot<E>>;
|
|
265
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["wall", "lignin", "vacuole", "nucleus", "lumen", "sievePlate", "companion"]>, Schema.Trimmed>;
|
|
266
|
+
readonly status: Schema.optionalKey<RichSlot<E>>;
|
|
267
|
+
readonly statuses: Schema.$Record<Schema.Literals<readonly ["living", "dead"]>, Schema.Trimmed>;
|
|
268
|
+
readonly tissue: Schema.Trimmed;
|
|
269
|
+
readonly tissues: Schema.$Record<Schema.Literals<readonly ["meristem", "epidermis", "parenchyma", "collenchyma", "sclerenchyma", "xylem", "phloem"]>, Schema.optionalKey<Schema.Struct<{
|
|
270
|
+
readonly name: Schema.Trimmed;
|
|
271
|
+
readonly role: RichSlot<E>;
|
|
272
|
+
readonly wall: RichSlot<E>;
|
|
273
|
+
}>>>;
|
|
274
|
+
readonly view: Schema.Trimmed;
|
|
275
|
+
readonly wall: RichSlot<E>;
|
|
276
|
+
}>;
|
|
277
|
+
readonly tissues: Schema.NonEmptyArray<Schema.Literals<readonly ["meristem", "epidermis", "parenchyma", "collenchyma", "sclerenchyma", "xylem", "phloem"]>>;
|
|
278
|
+
}>, "figure">;
|
|
279
|
+
RootShootGrowthZoneLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
280
|
+
readonly description: RichSlot<E>;
|
|
281
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
282
|
+
readonly marks?: readonly [{
|
|
283
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
284
|
+
} | {
|
|
285
|
+
readonly attrs: {
|
|
286
|
+
readonly href: string;
|
|
287
|
+
};
|
|
288
|
+
readonly type: "link";
|
|
289
|
+
} | {
|
|
290
|
+
readonly attrs: {
|
|
291
|
+
readonly variant: "success" | "warning" | null;
|
|
292
|
+
};
|
|
293
|
+
readonly type: "highlight";
|
|
294
|
+
}, ...({
|
|
295
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
296
|
+
} | {
|
|
297
|
+
readonly attrs: {
|
|
298
|
+
readonly href: string;
|
|
299
|
+
};
|
|
300
|
+
readonly type: "link";
|
|
301
|
+
} | {
|
|
302
|
+
readonly attrs: {
|
|
303
|
+
readonly variant: "success" | "warning" | null;
|
|
304
|
+
};
|
|
305
|
+
readonly type: "highlight";
|
|
306
|
+
})[]];
|
|
307
|
+
readonly text: string;
|
|
308
|
+
readonly type: "text";
|
|
309
|
+
} | {
|
|
310
|
+
readonly attrs: {
|
|
311
|
+
readonly latex: string;
|
|
312
|
+
};
|
|
313
|
+
readonly marks?: readonly [{
|
|
314
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
315
|
+
} | {
|
|
316
|
+
readonly attrs: {
|
|
317
|
+
readonly href: string;
|
|
318
|
+
};
|
|
319
|
+
readonly type: "link";
|
|
320
|
+
} | {
|
|
321
|
+
readonly attrs: {
|
|
322
|
+
readonly variant: "success" | "warning" | null;
|
|
323
|
+
};
|
|
324
|
+
readonly type: "highlight";
|
|
325
|
+
}, ...({
|
|
326
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
327
|
+
} | {
|
|
328
|
+
readonly attrs: {
|
|
329
|
+
readonly href: string;
|
|
330
|
+
};
|
|
331
|
+
readonly type: "link";
|
|
332
|
+
} | {
|
|
333
|
+
readonly attrs: {
|
|
334
|
+
readonly variant: "success" | "warning" | null;
|
|
335
|
+
};
|
|
336
|
+
readonly type: "highlight";
|
|
337
|
+
})[]];
|
|
338
|
+
readonly type: "mathInline";
|
|
339
|
+
}, ...({
|
|
340
|
+
readonly marks?: readonly [{
|
|
341
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
342
|
+
} | {
|
|
343
|
+
readonly attrs: {
|
|
344
|
+
readonly href: string;
|
|
345
|
+
};
|
|
346
|
+
readonly type: "link";
|
|
347
|
+
} | {
|
|
348
|
+
readonly attrs: {
|
|
349
|
+
readonly variant: "success" | "warning" | null;
|
|
350
|
+
};
|
|
351
|
+
readonly type: "highlight";
|
|
352
|
+
}, ...({
|
|
353
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
354
|
+
} | {
|
|
355
|
+
readonly attrs: {
|
|
356
|
+
readonly href: string;
|
|
357
|
+
};
|
|
358
|
+
readonly type: "link";
|
|
359
|
+
} | {
|
|
360
|
+
readonly attrs: {
|
|
361
|
+
readonly variant: "success" | "warning" | null;
|
|
362
|
+
};
|
|
363
|
+
readonly type: "highlight";
|
|
364
|
+
})[]];
|
|
365
|
+
readonly text: string;
|
|
366
|
+
readonly type: "text";
|
|
367
|
+
} | {
|
|
368
|
+
readonly attrs: {
|
|
369
|
+
readonly latex: string;
|
|
370
|
+
};
|
|
371
|
+
readonly marks?: readonly [{
|
|
372
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
373
|
+
} | {
|
|
374
|
+
readonly attrs: {
|
|
375
|
+
readonly href: string;
|
|
376
|
+
};
|
|
377
|
+
readonly type: "link";
|
|
378
|
+
} | {
|
|
379
|
+
readonly attrs: {
|
|
380
|
+
readonly variant: "success" | "warning" | null;
|
|
381
|
+
};
|
|
382
|
+
readonly type: "highlight";
|
|
383
|
+
}, ...({
|
|
384
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
385
|
+
} | {
|
|
386
|
+
readonly attrs: {
|
|
387
|
+
readonly href: string;
|
|
388
|
+
};
|
|
389
|
+
readonly type: "link";
|
|
390
|
+
} | {
|
|
391
|
+
readonly attrs: {
|
|
392
|
+
readonly variant: "success" | "warning" | null;
|
|
393
|
+
};
|
|
394
|
+
readonly type: "highlight";
|
|
395
|
+
})[]];
|
|
396
|
+
readonly type: "mathInline";
|
|
397
|
+
})[]], E, never, never>>;
|
|
398
|
+
readonly title: RichSlot<E>;
|
|
399
|
+
readonly labels: Schema.Struct<{
|
|
400
|
+
readonly activity: Schema.optionalKey<RichSlot<E>>;
|
|
401
|
+
readonly mode: Schema.Trimmed;
|
|
402
|
+
readonly modes: Schema.$Record<Schema.Literals<readonly ["primary", "secondary"]>, Schema.optionalKey<Schema.Trimmed>>;
|
|
403
|
+
readonly organ: Schema.Trimmed;
|
|
404
|
+
readonly organs: Schema.$Record<Schema.Literals<readonly ["root", "shoot"]>, Schema.optionalKey<Schema.Trimmed>>;
|
|
405
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["rootCap", "apicalMeristem", "vacuole", "rootHair", "vascularCambium", "corkCambium", "secondaryXylem", "secondaryPhloem", "annualRing"]>, Schema.Trimmed>;
|
|
406
|
+
readonly position: Schema.Trimmed;
|
|
407
|
+
readonly rings: Schema.optionalKey<RichSlot<E>>;
|
|
408
|
+
readonly view: Schema.Trimmed;
|
|
409
|
+
readonly year: Schema.Trimmed;
|
|
410
|
+
readonly zone: RichSlot<E>;
|
|
411
|
+
readonly zones: Schema.$Record<Schema.Literals<readonly ["division", "elongation", "differentiation"]>, Schema.Struct<{
|
|
412
|
+
readonly activity: RichSlot<E>;
|
|
413
|
+
readonly name: Schema.Trimmed;
|
|
414
|
+
}>>;
|
|
415
|
+
}>;
|
|
416
|
+
readonly modes: Schema.NonEmptyArray<Schema.Literals<readonly ["primary", "secondary"]>>;
|
|
417
|
+
readonly organs: Schema.NonEmptyArray<Schema.Literals<readonly ["root", "shoot"]>>;
|
|
418
|
+
readonly years: Schema.Struct<{
|
|
419
|
+
readonly max: Schema.Int;
|
|
420
|
+
readonly min: Schema.Int;
|
|
421
|
+
readonly value: Schema.Int;
|
|
422
|
+
}>;
|
|
423
|
+
}>, "figure">;
|
|
424
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
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 TISSUES = [
|
|
5
|
+
"meristem",
|
|
6
|
+
"epidermis",
|
|
7
|
+
"parenchyma",
|
|
8
|
+
"collenchyma",
|
|
9
|
+
"sclerenchyma",
|
|
10
|
+
"xylem",
|
|
11
|
+
"phloem",
|
|
12
|
+
];
|
|
13
|
+
const GROWTH_MODES = ["primary", "secondary"];
|
|
14
|
+
const ORGANS = ["root", "shoot"];
|
|
15
|
+
const PLANT_TYPES = ["annual", "biennial", "perennial"];
|
|
16
|
+
/** Stem age range in whole years for secondary growth annual rings. */
|
|
17
|
+
const YearsSchema = Schema.Struct({
|
|
18
|
+
max: Schema.Int.check(Schema.isLessThanOrEqualTo(10)),
|
|
19
|
+
min: Schema.Int.check(Schema.isGreaterThanOrEqualTo(1)),
|
|
20
|
+
value: Schema.Int,
|
|
21
|
+
}).check(Schema.makeFilter(({ max, min, value }) => min < max && min <= value && value <= max, {
|
|
22
|
+
message: "Expected a year range whose minimum is below its maximum, with the starting year between them.",
|
|
23
|
+
}));
|
|
24
|
+
/**
|
|
25
|
+
* Props of `PlantTissueAnatomyLab`: a 3D tissue block cutaway contrasting
|
|
26
|
+
* meristematic tissue with permanent tissues (epidermis, parenchyma,
|
|
27
|
+
* collenchyma, sclerenchyma, xylem, and phloem), showing cell wall thickness,
|
|
28
|
+
* lignification, and living or dead status. Function and status readouts are
|
|
29
|
+
* optional answer state.
|
|
30
|
+
*/
|
|
31
|
+
function plantTissueAnatomyLab(rich) {
|
|
32
|
+
return figure(Schema.Struct({
|
|
33
|
+
...cardFields(rich),
|
|
34
|
+
labels: Schema.Struct({
|
|
35
|
+
function: Schema.optionalKey(rich),
|
|
36
|
+
parts: byIds([
|
|
37
|
+
"wall",
|
|
38
|
+
"lignin",
|
|
39
|
+
"vacuole",
|
|
40
|
+
"nucleus",
|
|
41
|
+
"lumen",
|
|
42
|
+
"sievePlate",
|
|
43
|
+
"companion",
|
|
44
|
+
], TextSchema),
|
|
45
|
+
status: Schema.optionalKey(rich),
|
|
46
|
+
statuses: byIds(["living", "dead"], TextSchema),
|
|
47
|
+
tissue: TextSchema,
|
|
48
|
+
tissues: byPickedIds(TISSUES, Schema.Struct({
|
|
49
|
+
name: TextSchema,
|
|
50
|
+
role: rich,
|
|
51
|
+
wall: rich,
|
|
52
|
+
})),
|
|
53
|
+
view: TextSchema,
|
|
54
|
+
wall: rich,
|
|
55
|
+
}),
|
|
56
|
+
tissues: Schema.NonEmptyArray(Schema.Literals(TISSUES)).check(Schema.isUnique()),
|
|
57
|
+
}).check(Schema.makeFilter(({ labels, tissues }) => namesEach(tissues, labels.tissues), {
|
|
58
|
+
message: "Expected a name, wall note, and role for every plant tissue shown, and no other.",
|
|
59
|
+
})), answerAt(["labels", "function"], ["labels", "status"]));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Props of `RootShootGrowthZoneLab`: an interactive 3D root tip and shoot apex
|
|
63
|
+
* showing primary growth zones (cell division, elongation, differentiation) and
|
|
64
|
+
* secondary radial thickening driven by vascular and cork cambium with annual
|
|
65
|
+
* rings. Zone activity and ring count readouts are optional answer state.
|
|
66
|
+
*/
|
|
67
|
+
function rootShootGrowthZoneLab(rich) {
|
|
68
|
+
return figure(Schema.Struct({
|
|
69
|
+
...cardFields(rich),
|
|
70
|
+
labels: Schema.Struct({
|
|
71
|
+
activity: Schema.optionalKey(rich),
|
|
72
|
+
mode: TextSchema,
|
|
73
|
+
modes: byPickedIds(GROWTH_MODES, TextSchema),
|
|
74
|
+
organ: TextSchema,
|
|
75
|
+
organs: byPickedIds(ORGANS, TextSchema),
|
|
76
|
+
parts: byIds([
|
|
77
|
+
"rootCap",
|
|
78
|
+
"apicalMeristem",
|
|
79
|
+
"vacuole",
|
|
80
|
+
"rootHair",
|
|
81
|
+
"vascularCambium",
|
|
82
|
+
"corkCambium",
|
|
83
|
+
"secondaryXylem",
|
|
84
|
+
"secondaryPhloem",
|
|
85
|
+
"annualRing",
|
|
86
|
+
], TextSchema),
|
|
87
|
+
position: TextSchema,
|
|
88
|
+
rings: Schema.optionalKey(rich),
|
|
89
|
+
view: TextSchema,
|
|
90
|
+
year: TextSchema,
|
|
91
|
+
zone: rich,
|
|
92
|
+
zones: byIds(["division", "elongation", "differentiation"], Schema.Struct({
|
|
93
|
+
activity: rich,
|
|
94
|
+
name: TextSchema,
|
|
95
|
+
})),
|
|
96
|
+
}),
|
|
97
|
+
modes: Schema.NonEmptyArray(Schema.Literals(GROWTH_MODES)).check(Schema.isUnique()),
|
|
98
|
+
organs: Schema.NonEmptyArray(Schema.Literals(ORGANS)).check(Schema.isUnique()),
|
|
99
|
+
years: YearsSchema,
|
|
100
|
+
}).check(Schema.makeFilter(({ labels, modes, organs }) => namesEach(modes, labels.modes) && namesEach(organs, labels.organs), {
|
|
101
|
+
message: "Expected a name for every growth mode and plant organ shown, and no other.",
|
|
102
|
+
})), answerAt(["labels", "activity"], ["labels", "rings"]));
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Props of `PlantGrowthCurveLab`: a 3D specimen of an annual, biennial, or
|
|
106
|
+
* perennial plant synchronized with its sigmoid dry-mass growth curve and
|
|
107
|
+
* growth phase explorer. The active phase readout is optional answer state.
|
|
108
|
+
*/
|
|
109
|
+
function plantGrowthCurveLab(rich) {
|
|
110
|
+
return figure(Schema.Struct({
|
|
111
|
+
...cardFields(rich),
|
|
112
|
+
labels: Schema.Struct({
|
|
113
|
+
dryMass: rich,
|
|
114
|
+
phase: Schema.optionalKey(rich),
|
|
115
|
+
phases: byIds(["lag", "exponential", "slowing", "stationary", "senescence"], Schema.Struct({
|
|
116
|
+
detail: rich,
|
|
117
|
+
name: TextSchema,
|
|
118
|
+
})),
|
|
119
|
+
rate: rich,
|
|
120
|
+
time: TextSchema,
|
|
121
|
+
type: TextSchema,
|
|
122
|
+
types: byPickedIds(PLANT_TYPES, TextSchema),
|
|
123
|
+
view: TextSchema,
|
|
124
|
+
}),
|
|
125
|
+
types: Schema.NonEmptyArray(Schema.Literals(PLANT_TYPES)).check(Schema.isUnique()),
|
|
126
|
+
}).check(Schema.makeFilter(({ labels, types }) => namesEach(types, labels.types), {
|
|
127
|
+
message: "Expected a name for every plant life-cycle type shown, and no other.",
|
|
128
|
+
})), answerAt(["labels", "phase"]));
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Plant tissue organisation and growth labs covering meristematic vs permanent
|
|
132
|
+
* anatomy, primary and secondary growth zones, and sigmoid dry-mass curves.
|
|
133
|
+
*/
|
|
134
|
+
export function tissueVisuals(rich) {
|
|
135
|
+
return {
|
|
136
|
+
PlantGrowthCurveLab: plantGrowthCurveLab(rich),
|
|
137
|
+
PlantTissueAnatomyLab: plantTissueAnatomyLab(rich),
|
|
138
|
+
RootShootGrowthZoneLab: rootShootGrowthZoneLab(rich),
|
|
139
|
+
};
|
|
140
|
+
}
|