@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.
Files changed (98) hide show
  1. package/dist/math/boundary.d.ts +9 -0
  2. package/dist/math/boundary.js +81 -0
  3. package/dist/math/curve.d.ts +1 -0
  4. package/dist/math/curve.js +4 -2
  5. package/dist/math/formula/affine.d.ts +22 -0
  6. package/dist/math/formula/affine.js +79 -0
  7. package/dist/math/formula/contour.js +27 -12
  8. package/dist/math/object.d.ts +12 -0
  9. package/dist/math/object.js +11 -0
  10. package/dist/math/plane.d.ts +10 -0
  11. package/dist/math/plane.js +7 -1
  12. package/dist/math/space.d.ts +8 -0
  13. package/dist/math/space.js +5 -1
  14. package/dist/math/visual.d.ts +239 -212
  15. package/dist/visual/base/math.d.ts +78 -0
  16. package/dist/visual/base/math.js +31 -3
  17. package/dist/visual/base/media.d.ts +67 -0
  18. package/dist/visual/biology/bacteria.d.ts +268 -0
  19. package/dist/visual/biology/cell.d.ts +201 -0
  20. package/dist/visual/biology/climate.d.ts +201 -0
  21. package/dist/visual/biology/ecology.d.ts +268 -0
  22. package/dist/visual/biology/physiology.d.ts +201 -0
  23. package/dist/visual/biology/plant.d.ts +335 -0
  24. package/dist/visual/biology.d.ts +16 -16
  25. package/dist/visual/biology.js +2 -2
  26. package/dist/visual/card.d.ts +79 -1
  27. package/dist/visual/card.js +18 -2
  28. package/dist/visual/catalog.d.ts +14808 -28
  29. package/dist/visual/catalog.js +26 -0
  30. package/dist/visual/chemistry/atom.d.ts +203 -2
  31. package/dist/visual/chemistry/atom.js +2 -2
  32. package/dist/visual/chemistry/balance.d.ts +335 -0
  33. package/dist/visual/chemistry/bonding.d.ts +335 -0
  34. package/dist/visual/chemistry/discovery.d.ts +469 -0
  35. package/dist/visual/chemistry/electrochemistry.d.ts +134 -0
  36. package/dist/visual/chemistry/electron.d.ts +134 -0
  37. package/dist/visual/chemistry/laws.d.ts +268 -0
  38. package/dist/visual/chemistry/particles.d.ts +335 -0
  39. package/dist/visual/chemistry/periodic.d.ts +134 -0
  40. package/dist/visual/chemistry/rate.d.ts +67 -0
  41. package/dist/visual/chemistry/reaction.d.ts +201 -0
  42. package/dist/visual/chemistry/titration.d.ts +67 -0
  43. package/dist/visual/length.d.ts +79 -0
  44. package/dist/visual/length.js +37 -0
  45. package/dist/visual/mathematics/chance.d.ts +258 -0
  46. package/dist/visual/mathematics/chance.js +117 -0
  47. package/dist/visual/mathematics/chart.d.ts +67 -0
  48. package/dist/visual/mathematics/charts.d.ts +335 -0
  49. package/dist/visual/mathematics/function.d.ts +205 -4
  50. package/dist/visual/mathematics/function.js +4 -4
  51. package/dist/visual/mathematics/geometry.d.ts +1 -1
  52. package/dist/visual/mathematics/geometry.js +1 -1
  53. package/dist/visual/mathematics/numeral.d.ts +170 -0
  54. package/dist/visual/mathematics/numeral.js +85 -0
  55. package/dist/visual/physics/braking.d.ts +268 -0
  56. package/dist/visual/physics/circuit.d.ts +343 -0
  57. package/dist/visual/physics/circuit.js +86 -0
  58. package/dist/visual/physics/circular.d.ts +134 -0
  59. package/dist/visual/physics/dynamics.d.ts +579 -0
  60. package/dist/visual/physics/dynamics.js +134 -0
  61. package/dist/visual/physics/efficiency.d.ts +402 -0
  62. package/dist/visual/physics/electronics.d.ts +260 -0
  63. package/dist/visual/physics/electronics.js +71 -0
  64. package/dist/visual/physics/falling.d.ts +268 -0
  65. package/dist/visual/physics/field.d.ts +249 -0
  66. package/dist/visual/physics/field.js +60 -0
  67. package/dist/visual/physics/fluid.d.ts +336 -0
  68. package/dist/visual/physics/fluid.js +83 -0
  69. package/dist/visual/physics/force.d.ts +335 -0
  70. package/dist/visual/physics/gravity.d.ts +172 -0
  71. package/dist/visual/physics/gravity.js +47 -0
  72. package/dist/visual/physics/heat.d.ts +255 -0
  73. package/dist/visual/physics/heat.js +66 -0
  74. package/dist/visual/physics/instrument.d.ts +469 -0
  75. package/dist/visual/physics/light.d.ts +343 -0
  76. package/dist/visual/physics/light.js +90 -0
  77. package/dist/visual/physics/measurement.d.ts +268 -0
  78. package/dist/visual/physics/motion.d.ts +402 -0
  79. package/dist/visual/physics/nuclear.d.ts +258 -0
  80. package/dist/visual/physics/nuclear.js +69 -0
  81. package/dist/visual/physics/parabolic.d.ts +69 -2
  82. package/dist/visual/physics/parabolic.js +2 -2
  83. package/dist/visual/physics/position.d.ts +402 -0
  84. package/dist/visual/physics/power.d.ts +536 -0
  85. package/dist/visual/physics/precision.d.ts +469 -0
  86. package/dist/visual/physics/product.d.ts +268 -0
  87. package/dist/visual/physics/reading.d.ts +253 -0
  88. package/dist/visual/physics/reading.js +61 -0
  89. package/dist/visual/physics/record.d.ts +134 -0
  90. package/dist/visual/physics/relative.d.ts +201 -0
  91. package/dist/visual/physics/solar.d.ts +402 -0
  92. package/dist/visual/physics/vector.d.ts +335 -0
  93. package/dist/visual/physics/velocity.d.ts +469 -0
  94. package/dist/visual/physics/wave.d.ts +338 -0
  95. package/dist/visual/physics/wave.js +85 -0
  96. package/dist/visual/politics.d.ts +403 -1
  97. package/dist/visual/politics.js +1 -1
  98. package/package.json +1 -1
@@ -8,6 +8,73 @@ import { type RichSlot } from "#contracts/visual/card";
8
8
  export declare function plantVisuals<E>(rich: RichSlot<E>): {
9
9
  FertilisationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
10
10
  readonly description: RichSlot<E>;
11
+ readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
12
+ readonly attrs: {
13
+ readonly latex: string;
14
+ };
15
+ readonly type: "mathInline";
16
+ } | {
17
+ readonly marks?: readonly [{
18
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
19
+ } | {
20
+ readonly attrs: {
21
+ readonly href: string;
22
+ };
23
+ readonly type: "link";
24
+ } | {
25
+ readonly attrs: {
26
+ readonly variant: "success" | "warning" | null;
27
+ };
28
+ readonly type: "highlight";
29
+ }, ...({
30
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
31
+ } | {
32
+ readonly attrs: {
33
+ readonly href: string;
34
+ };
35
+ readonly type: "link";
36
+ } | {
37
+ readonly attrs: {
38
+ readonly variant: "success" | "warning" | null;
39
+ };
40
+ readonly type: "highlight";
41
+ })[]];
42
+ readonly text: string;
43
+ readonly type: "text";
44
+ }, ...({
45
+ readonly attrs: {
46
+ readonly latex: string;
47
+ };
48
+ readonly type: "mathInline";
49
+ } | {
50
+ readonly marks?: readonly [{
51
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
52
+ } | {
53
+ readonly attrs: {
54
+ readonly href: string;
55
+ };
56
+ readonly type: "link";
57
+ } | {
58
+ readonly attrs: {
59
+ readonly variant: "success" | "warning" | null;
60
+ };
61
+ readonly type: "highlight";
62
+ }, ...({
63
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
64
+ } | {
65
+ readonly attrs: {
66
+ readonly href: string;
67
+ };
68
+ readonly type: "link";
69
+ } | {
70
+ readonly attrs: {
71
+ readonly variant: "success" | "warning" | null;
72
+ };
73
+ readonly type: "highlight";
74
+ })[]];
75
+ readonly text: string;
76
+ readonly type: "text";
77
+ })[]], E, never, never>>;
11
78
  readonly title: RichSlot<E>;
12
79
  readonly father: Schema.Int;
13
80
  readonly labels: Schema.Struct<{
@@ -25,6 +92,73 @@ export declare function plantVisuals<E>(rich: RichSlot<E>): {
25
92
  }>, "figure">;
26
93
  OsmosisLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
27
94
  readonly description: RichSlot<E>;
95
+ readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
96
+ readonly attrs: {
97
+ readonly latex: string;
98
+ };
99
+ readonly type: "mathInline";
100
+ } | {
101
+ readonly marks?: readonly [{
102
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
103
+ } | {
104
+ readonly attrs: {
105
+ readonly href: string;
106
+ };
107
+ readonly type: "link";
108
+ } | {
109
+ readonly attrs: {
110
+ readonly variant: "success" | "warning" | null;
111
+ };
112
+ readonly type: "highlight";
113
+ }, ...({
114
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
115
+ } | {
116
+ readonly attrs: {
117
+ readonly href: string;
118
+ };
119
+ readonly type: "link";
120
+ } | {
121
+ readonly attrs: {
122
+ readonly variant: "success" | "warning" | null;
123
+ };
124
+ readonly type: "highlight";
125
+ })[]];
126
+ readonly text: string;
127
+ readonly type: "text";
128
+ }, ...({
129
+ readonly attrs: {
130
+ readonly latex: string;
131
+ };
132
+ readonly type: "mathInline";
133
+ } | {
134
+ readonly marks?: readonly [{
135
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
136
+ } | {
137
+ readonly attrs: {
138
+ readonly href: string;
139
+ };
140
+ readonly type: "link";
141
+ } | {
142
+ readonly attrs: {
143
+ readonly variant: "success" | "warning" | null;
144
+ };
145
+ readonly type: "highlight";
146
+ }, ...({
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 text: string;
160
+ readonly type: "text";
161
+ })[]], E, never, never>>;
28
162
  readonly title: RichSlot<E>;
29
163
  readonly labels: Schema.Struct<{
30
164
  readonly change: RichSlot<E>;
@@ -48,6 +182,73 @@ export declare function plantVisuals<E>(rich: RichSlot<E>): {
48
182
  }>, "figure">;
49
183
  PhotosynthesisLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
50
184
  readonly description: RichSlot<E>;
185
+ readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
186
+ readonly attrs: {
187
+ readonly latex: string;
188
+ };
189
+ readonly type: "mathInline";
190
+ } | {
191
+ readonly marks?: readonly [{
192
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
193
+ } | {
194
+ readonly attrs: {
195
+ readonly href: string;
196
+ };
197
+ readonly type: "link";
198
+ } | {
199
+ readonly attrs: {
200
+ readonly variant: "success" | "warning" | null;
201
+ };
202
+ readonly type: "highlight";
203
+ }, ...({
204
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
205
+ } | {
206
+ readonly attrs: {
207
+ readonly href: string;
208
+ };
209
+ readonly type: "link";
210
+ } | {
211
+ readonly attrs: {
212
+ readonly variant: "success" | "warning" | null;
213
+ };
214
+ readonly type: "highlight";
215
+ })[]];
216
+ readonly text: string;
217
+ readonly type: "text";
218
+ }, ...({
219
+ readonly attrs: {
220
+ readonly latex: string;
221
+ };
222
+ readonly type: "mathInline";
223
+ } | {
224
+ readonly marks?: readonly [{
225
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
226
+ } | {
227
+ readonly attrs: {
228
+ readonly href: string;
229
+ };
230
+ readonly type: "link";
231
+ } | {
232
+ readonly attrs: {
233
+ readonly variant: "success" | "warning" | null;
234
+ };
235
+ readonly type: "highlight";
236
+ }, ...({
237
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
238
+ } | {
239
+ readonly attrs: {
240
+ readonly href: string;
241
+ };
242
+ readonly type: "link";
243
+ } | {
244
+ readonly attrs: {
245
+ readonly variant: "success" | "warning" | null;
246
+ };
247
+ readonly type: "highlight";
248
+ })[]];
249
+ readonly text: string;
250
+ readonly type: "text";
251
+ })[]], E, never, never>>;
51
252
  readonly title: RichSlot<E>;
52
253
  readonly labels: Schema.Struct<{
53
254
  readonly bubbles: RichSlot<E>;
@@ -69,6 +270,73 @@ export declare function plantVisuals<E>(rich: RichSlot<E>): {
69
270
  }>, "figure">;
70
271
  PotometerLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
71
272
  readonly description: RichSlot<E>;
273
+ readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
274
+ readonly attrs: {
275
+ readonly latex: string;
276
+ };
277
+ readonly type: "mathInline";
278
+ } | {
279
+ readonly marks?: readonly [{
280
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
281
+ } | {
282
+ readonly attrs: {
283
+ readonly href: string;
284
+ };
285
+ readonly type: "link";
286
+ } | {
287
+ readonly attrs: {
288
+ readonly variant: "success" | "warning" | null;
289
+ };
290
+ readonly type: "highlight";
291
+ }, ...({
292
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
293
+ } | {
294
+ readonly attrs: {
295
+ readonly href: string;
296
+ };
297
+ readonly type: "link";
298
+ } | {
299
+ readonly attrs: {
300
+ readonly variant: "success" | "warning" | null;
301
+ };
302
+ readonly type: "highlight";
303
+ })[]];
304
+ readonly text: string;
305
+ readonly type: "text";
306
+ }, ...({
307
+ readonly attrs: {
308
+ readonly latex: string;
309
+ };
310
+ readonly type: "mathInline";
311
+ } | {
312
+ readonly marks?: readonly [{
313
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
314
+ } | {
315
+ readonly attrs: {
316
+ readonly href: string;
317
+ };
318
+ readonly type: "link";
319
+ } | {
320
+ readonly attrs: {
321
+ readonly variant: "success" | "warning" | null;
322
+ };
323
+ readonly type: "highlight";
324
+ }, ...({
325
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
326
+ } | {
327
+ readonly attrs: {
328
+ readonly href: string;
329
+ };
330
+ readonly type: "link";
331
+ } | {
332
+ readonly attrs: {
333
+ readonly variant: "success" | "warning" | null;
334
+ };
335
+ readonly type: "highlight";
336
+ })[]];
337
+ readonly text: string;
338
+ readonly type: "text";
339
+ })[]], E, never, never>>;
72
340
  readonly title: RichSlot<E>;
73
341
  readonly labels: Schema.Struct<{
74
342
  readonly distance: RichSlot<E>;
@@ -88,6 +356,73 @@ export declare function plantVisuals<E>(rich: RichSlot<E>): {
88
356
  }>, "figure">;
89
357
  TropismLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
90
358
  readonly description: RichSlot<E>;
359
+ readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
360
+ readonly attrs: {
361
+ readonly latex: string;
362
+ };
363
+ readonly type: "mathInline";
364
+ } | {
365
+ readonly marks?: readonly [{
366
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
367
+ } | {
368
+ readonly attrs: {
369
+ readonly href: string;
370
+ };
371
+ readonly type: "link";
372
+ } | {
373
+ readonly attrs: {
374
+ readonly variant: "success" | "warning" | null;
375
+ };
376
+ readonly type: "highlight";
377
+ }, ...({
378
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
379
+ } | {
380
+ readonly attrs: {
381
+ readonly href: string;
382
+ };
383
+ readonly type: "link";
384
+ } | {
385
+ readonly attrs: {
386
+ readonly variant: "success" | "warning" | null;
387
+ };
388
+ readonly type: "highlight";
389
+ })[]];
390
+ readonly text: string;
391
+ readonly type: "text";
392
+ }, ...({
393
+ readonly attrs: {
394
+ readonly latex: string;
395
+ };
396
+ readonly type: "mathInline";
397
+ } | {
398
+ readonly marks?: readonly [{
399
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
400
+ } | {
401
+ readonly attrs: {
402
+ readonly href: string;
403
+ };
404
+ readonly type: "link";
405
+ } | {
406
+ readonly attrs: {
407
+ readonly variant: "success" | "warning" | null;
408
+ };
409
+ readonly type: "highlight";
410
+ }, ...({
411
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
412
+ } | {
413
+ readonly attrs: {
414
+ readonly href: string;
415
+ };
416
+ readonly type: "link";
417
+ } | {
418
+ readonly attrs: {
419
+ readonly variant: "success" | "warning" | null;
420
+ };
421
+ readonly type: "highlight";
422
+ })[]];
423
+ readonly text: string;
424
+ readonly type: "text";
425
+ })[]], E, never, never>>;
91
426
  readonly title: RichSlot<E>;
92
427
  readonly labels: Schema.Struct<{
93
428
  readonly bend: RichSlot<E>;
@@ -8,7 +8,7 @@ import { type RichSlot } from "#contracts/visual/card";
8
8
  export declare function biologyVisuals<E>(rich: RichSlot<E>): {
9
9
  BacteriaStructureLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
10
10
  defaultItemIndex: Schema.optionalKey<Schema.Int>;
11
- description: Schema.optionalKey<RichSlot<E>>;
11
+ description: RichSlot<E>;
12
12
  labels: Schema.Struct<{
13
13
  readonly chooseMode: Schema.Trimmed;
14
14
  readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
@@ -38,11 +38,11 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
38
38
  readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
39
39
  readonly viewLabel: Schema.Trimmed;
40
40
  }>;
41
- title: Schema.optionalKey<RichSlot<E>>;
41
+ title: RichSlot<E>;
42
42
  }>, "figure">;
43
43
  ClimateObservationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
44
44
  defaultItemIndex: Schema.optionalKey<Schema.Int>;
45
- description: Schema.optionalKey<RichSlot<E>>;
45
+ description: RichSlot<E>;
46
46
  labels: Schema.Struct<{
47
47
  readonly chooseMode: Schema.Trimmed;
48
48
  readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
@@ -59,11 +59,11 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
59
59
  readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
60
60
  readonly viewLabel: Schema.Trimmed;
61
61
  }>;
62
- title: Schema.optionalKey<RichSlot<E>>;
62
+ title: RichSlot<E>;
63
63
  }>, "figure">;
64
64
  FungiMyceliumLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
65
65
  defaultItemIndex: Schema.optionalKey<Schema.Int>;
66
- description: Schema.optionalKey<RichSlot<E>>;
66
+ description: RichSlot<E>;
67
67
  labels: Schema.Struct<{
68
68
  readonly chooseMode: Schema.Trimmed;
69
69
  readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
@@ -80,7 +80,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
80
80
  readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
81
81
  readonly viewLabel: Schema.Trimmed;
82
82
  }>;
83
- title: Schema.optionalKey<RichSlot<E>>;
83
+ title: RichSlot<E>;
84
84
  }>, "figure">;
85
85
  GreenhouseEffectLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
86
86
  readonly description: RichSlot<E>;
@@ -96,7 +96,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
96
96
  }>, "figure">;
97
97
  SarsCov2VirionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
98
98
  defaultItemIndex: Schema.optionalKey<Schema.Int>;
99
- description: Schema.optionalKey<RichSlot<E>>;
99
+ description: RichSlot<E>;
100
100
  labels: Schema.Struct<{
101
101
  readonly chooseMode: Schema.Trimmed;
102
102
  readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
@@ -113,11 +113,11 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
113
113
  readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
114
114
  readonly viewLabel: Schema.Trimmed;
115
115
  }>;
116
- title: Schema.optionalKey<RichSlot<E>>;
116
+ title: RichSlot<E>;
117
117
  }>, "figure">;
118
118
  VirusMorphologyLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
119
119
  defaultItemIndex: Schema.optionalKey<Schema.Int>;
120
- description: Schema.optionalKey<RichSlot<E>>;
120
+ description: RichSlot<E>;
121
121
  labels: Schema.Struct<{
122
122
  readonly chooseMode: Schema.Trimmed;
123
123
  readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
@@ -134,11 +134,11 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
134
134
  readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
135
135
  readonly viewLabel: Schema.Trimmed;
136
136
  }>;
137
- title: Schema.optionalKey<RichSlot<E>>;
137
+ title: RichSlot<E>;
138
138
  }>, "figure">;
139
139
  VirusReplicationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
140
140
  readonly defaultItemIndex: Schema.optionalKey<Schema.Int>;
141
- readonly description: Schema.optionalKey<RichSlot<E>>;
141
+ readonly description: RichSlot<E>;
142
142
  readonly labels: Schema.Struct<{
143
143
  readonly chooseMode: Schema.Trimmed;
144
144
  readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
@@ -155,12 +155,12 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
155
155
  readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
156
156
  readonly viewLabel: Schema.Trimmed;
157
157
  }>;
158
- readonly title: Schema.optionalKey<RichSlot<E>>;
158
+ readonly title: RichSlot<E>;
159
159
  readonly mode: Schema.optionalKey<Schema.Literals<readonly ["both", "lytic", "lysogenic"]>>;
160
160
  }>, "figure">;
161
161
  VirusRoleLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
162
162
  defaultItemIndex: Schema.optionalKey<Schema.Int>;
163
- description: Schema.optionalKey<RichSlot<E>>;
163
+ description: RichSlot<E>;
164
164
  labels: Schema.Struct<{
165
165
  readonly chooseMode: Schema.Trimmed;
166
166
  readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
@@ -177,11 +177,11 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
177
177
  readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
178
178
  readonly viewLabel: Schema.Trimmed;
179
179
  }>;
180
- title: Schema.optionalKey<RichSlot<E>>;
180
+ title: RichSlot<E>;
181
181
  }>, "figure">;
182
182
  VirusStructureLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
183
183
  defaultItemIndex: Schema.optionalKey<Schema.Int>;
184
- description: Schema.optionalKey<RichSlot<E>>;
184
+ description: RichSlot<E>;
185
185
  labels: Schema.Struct<{
186
186
  readonly chooseMode: Schema.Trimmed;
187
187
  readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
@@ -198,6 +198,6 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
198
198
  readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
199
199
  readonly viewLabel: Schema.Trimmed;
200
200
  }>;
201
- title: Schema.optionalKey<RichSlot<E>>;
201
+ title: RichSlot<E>;
202
202
  }>, "figure">;
203
203
  };
@@ -21,7 +21,7 @@ function itemFields(rich) {
21
21
  function biologyFields(item, rich) {
22
22
  return {
23
23
  defaultItemIndex: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),
24
- description: Schema.optionalKey(rich),
24
+ description: rich,
25
25
  labels: Schema.Struct({
26
26
  chooseMode: TextSchema,
27
27
  focusLabel: Schema.optionalKey(TextSchema),
@@ -29,7 +29,7 @@ function biologyFields(item, rich) {
29
29
  takeawayLabel: Schema.optionalKey(TextSchema),
30
30
  viewLabel: TextSchema,
31
31
  }),
32
- title: Schema.optionalKey(rich),
32
+ title: rich,
33
33
  };
34
34
  }
35
35
  /** Props of a biology lab whose items need nothing but their words. */
@@ -11,9 +11,87 @@ export type RichSlot<Encoded = unknown> = Schema.Codec<RichText, Encoded>;
11
11
  * a screen reader announces. It is trimmed and never empty.
12
12
  */
13
13
  export declare const TextSchema: Schema.Trimmed;
14
- /** The title and description every card shows, each rich text. */
14
+ /**
15
+ * The most visible characters a card's footer shows (`visibleLength`): two
16
+ * lines of the footer's text in a card on a 360 px phone.
17
+ */
18
+ export declare const FOOTER_CHARACTERS = 90;
19
+ /**
20
+ * The words every card shows, each rich text: its title and description above
21
+ * the visual, and its footer under it. The footer is written for this one
22
+ * visual, never generated: what it shows and what to notice in it, in a
23
+ * sentence or two. In a prompt it describes how to read the figure and never
24
+ * gives its result.
25
+ */
15
26
  export declare function cardFields<E>(rich: RichSlot<E>): {
16
27
  description: RichSlot<E>;
28
+ footer: Schema.optionalKey<Schema.Codec<readonly [{
29
+ readonly attrs: {
30
+ readonly latex: string;
31
+ };
32
+ readonly type: "mathInline";
33
+ } | {
34
+ readonly marks?: readonly [{
35
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
36
+ } | {
37
+ readonly attrs: {
38
+ readonly href: string;
39
+ };
40
+ readonly type: "link";
41
+ } | {
42
+ readonly attrs: {
43
+ readonly variant: "success" | "warning" | null;
44
+ };
45
+ readonly type: "highlight";
46
+ }, ...({
47
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
48
+ } | {
49
+ readonly attrs: {
50
+ readonly href: string;
51
+ };
52
+ readonly type: "link";
53
+ } | {
54
+ readonly attrs: {
55
+ readonly variant: "success" | "warning" | null;
56
+ };
57
+ readonly type: "highlight";
58
+ })[]];
59
+ readonly text: string;
60
+ readonly type: "text";
61
+ }, ...({
62
+ readonly attrs: {
63
+ readonly latex: string;
64
+ };
65
+ readonly type: "mathInline";
66
+ } | {
67
+ readonly marks?: readonly [{
68
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
69
+ } | {
70
+ readonly attrs: {
71
+ readonly href: string;
72
+ };
73
+ readonly type: "link";
74
+ } | {
75
+ readonly attrs: {
76
+ readonly variant: "success" | "warning" | null;
77
+ };
78
+ readonly type: "highlight";
79
+ }, ...({
80
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
81
+ } | {
82
+ readonly attrs: {
83
+ readonly href: string;
84
+ };
85
+ readonly type: "link";
86
+ } | {
87
+ readonly attrs: {
88
+ readonly variant: "success" | "warning" | null;
89
+ };
90
+ readonly type: "highlight";
91
+ })[]];
92
+ readonly text: string;
93
+ readonly type: "text";
94
+ })[]], E, never, never>>;
17
95
  title: RichSlot<E>;
18
96
  };
19
97
  /**
@@ -1,13 +1,29 @@
1
1
  import { Schema } from "effect";
2
2
  import { PlainTextSchema } from "#contracts/assessment/scalar";
3
+ import { atMostVisible } from "#contracts/visual/length";
3
4
  /**
4
5
  * Plain text a component draws as a string: an axis label, a tab, or the name
5
6
  * a screen reader announces. It is trimmed and never empty.
6
7
  */
7
8
  export const TextSchema = PlainTextSchema;
8
- /** The title and description every card shows, each rich text. */
9
+ /**
10
+ * The most visible characters a card's footer shows (`visibleLength`): two
11
+ * lines of the footer's text in a card on a 360 px phone.
12
+ */
13
+ export const FOOTER_CHARACTERS = 90;
14
+ /**
15
+ * The words every card shows, each rich text: its title and description above
16
+ * the visual, and its footer under it. The footer is written for this one
17
+ * visual, never generated: what it shows and what to notice in it, in a
18
+ * sentence or two. In a prompt it describes how to read the figure and never
19
+ * gives its result.
20
+ */
9
21
  export function cardFields(rich) {
10
- return { description: rich, title: rich };
22
+ return {
23
+ description: rich,
24
+ footer: Schema.optionalKey(rich.check(atMostVisible(FOOTER_CHARACTERS, `Expected a card footer of at most ${FOOTER_CHARACTERS} visible characters, so it reads in one or two lines on a phone; keep what to notice and leave the rest to the lesson.`))),
25
+ title: rich,
26
+ };
11
27
  }
12
28
  /**
13
29
  * The words of one component for each of its fixed options, such as the