@nakafa/aksara-contracts 8.16.0 → 8.17.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/ecosystem.d.ts +425 -0
- package/dist/visual/biology/ecosystem.js +140 -0
- package/dist/visual/biology/respiration.d.ts +286 -0
- package/dist/visual/biology/respiration.js +97 -0
- package/dist/visual/biology.d.ts +1371 -676
- package/dist/visual/biology.js +4 -0
- package/dist/visual/catalog.d.ts +2 -2
- package/dist/visual/mathematics/derivative.d.ts +425 -0
- package/dist/visual/mathematics/derivative.js +132 -0
- package/dist/visual/mathematics/integral.d.ts +428 -0
- package/dist/visual/mathematics/integral.js +146 -0
- package/dist/visual/mathematics/limit.d.ts +425 -0
- package/dist/visual/mathematics/limit.js +139 -0
- package/dist/visual/mathematics/linear.d.ts +425 -0
- package/dist/visual/mathematics/linear.js +140 -0
- package/dist/visual/mathematics/vector.d.ts +419 -0
- package/dist/visual/mathematics/vector.js +129 -0
- package/dist/visual/mathematics.d.ts +2260 -177
- package/dist/visual/mathematics.js +12 -1
- package/package.json +1 -1
|
@@ -0,0 +1,132 @@
|
|
|
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
|
+
/** A strictly positive finite number for step-size and cutout sliders. */
|
|
5
|
+
const PositiveSchema = Schema.Finite.check(Schema.isGreaterThan(0));
|
|
6
|
+
/** A positive slider whose minimum sits below its maximum. */
|
|
7
|
+
const PositiveSliderSchema = Schema.Struct({
|
|
8
|
+
max: PositiveSchema,
|
|
9
|
+
min: PositiveSchema,
|
|
10
|
+
value: PositiveSchema,
|
|
11
|
+
}).check(Schema.makeFilter(({ max, min, value }) => min < max && min <= value && value <= max, {
|
|
12
|
+
message: "Expected a positive slider range whose minimum is below its maximum, with the starting value between them.",
|
|
13
|
+
}));
|
|
14
|
+
/** A signed slider whose minimum sits below its maximum. */
|
|
15
|
+
const SignedSliderSchema = Schema.Struct({
|
|
16
|
+
max: Schema.Finite,
|
|
17
|
+
min: Schema.Finite,
|
|
18
|
+
value: Schema.Finite,
|
|
19
|
+
}).check(Schema.makeFilter(({ max, min, value }) => min < max && min <= value && value <= max, {
|
|
20
|
+
message: "Expected a slider range whose minimum is below its maximum, with the starting value between them.",
|
|
21
|
+
}));
|
|
22
|
+
const SECANT_CURVES = ["quadratic", "cubic", "sineWave"];
|
|
23
|
+
const SLOPE_CURVES = ["cubicWave", "quarticWell", "dampedSine"];
|
|
24
|
+
const BOX_SHEETS = ["squareSheet", "wideSheet", "tallSheet"];
|
|
25
|
+
/**
|
|
26
|
+
* Props of `SecantToTangentLab`: a 3D curve ribbon showing a secant beam
|
|
27
|
+
* between x = a and x = a + h converging onto the tangent line as h approaches
|
|
28
|
+
* zero. Secant slope and tangent slope readouts are optional answer state.
|
|
29
|
+
*/
|
|
30
|
+
function secantToTangentLab(rich) {
|
|
31
|
+
return figure(Schema.Struct({
|
|
32
|
+
...cardFields(rich),
|
|
33
|
+
curves: Schema.NonEmptyArray(Schema.Literals(SECANT_CURVES)).check(Schema.isUnique()),
|
|
34
|
+
labels: Schema.Struct({
|
|
35
|
+
curve: TextSchema,
|
|
36
|
+
curves: byPickedIds(SECANT_CURVES, Schema.Struct({
|
|
37
|
+
formula: rich,
|
|
38
|
+
name: TextSchema,
|
|
39
|
+
})),
|
|
40
|
+
parts: byIds([
|
|
41
|
+
"curveRibbon",
|
|
42
|
+
"anchorPoint",
|
|
43
|
+
"movingPoint",
|
|
44
|
+
"secantLine",
|
|
45
|
+
"tangentLine",
|
|
46
|
+
"slopeTriangle",
|
|
47
|
+
], TextSchema),
|
|
48
|
+
secantSlope: Schema.optionalKey(rich),
|
|
49
|
+
stepH: TextSchema,
|
|
50
|
+
tangentSlope: Schema.optionalKey(rich),
|
|
51
|
+
view: TextSchema,
|
|
52
|
+
}),
|
|
53
|
+
stepH: PositiveSliderSchema,
|
|
54
|
+
}).check(Schema.makeFilter(({ curves, labels }) => namesEach(curves, labels.curves), {
|
|
55
|
+
message: "Expected a name and formula for every secant curve shown, and no other.",
|
|
56
|
+
})), answerAt(["labels", "secantSlope"], ["labels", "tangentSlope"]));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Props of `DerivativeSlopeFieldLab`: a 3D dual-ribbon stage pairing f(x) with
|
|
60
|
+
* its derivative curve f'(x), local tangent slope needles, and critical point
|
|
61
|
+
* beacons. Slope value and monotonicity readouts are optional answer state.
|
|
62
|
+
*/
|
|
63
|
+
function derivativeSlopeFieldLab(rich) {
|
|
64
|
+
return figure(Schema.Struct({
|
|
65
|
+
...cardFields(rich),
|
|
66
|
+
curves: Schema.NonEmptyArray(Schema.Literals(SLOPE_CURVES)).check(Schema.isUnique()),
|
|
67
|
+
labels: Schema.Struct({
|
|
68
|
+
curve: TextSchema,
|
|
69
|
+
curves: byPickedIds(SLOPE_CURVES, Schema.Struct({
|
|
70
|
+
formula: rich,
|
|
71
|
+
name: TextSchema,
|
|
72
|
+
})),
|
|
73
|
+
monotonicity: Schema.optionalKey(rich),
|
|
74
|
+
parts: byIds([
|
|
75
|
+
"functionCurve",
|
|
76
|
+
"derivativeCurve",
|
|
77
|
+
"slopeNeedles",
|
|
78
|
+
"probeMarker",
|
|
79
|
+
"criticalPoints",
|
|
80
|
+
], TextSchema),
|
|
81
|
+
probeX: TextSchema,
|
|
82
|
+
slopeValue: Schema.optionalKey(rich),
|
|
83
|
+
view: TextSchema,
|
|
84
|
+
}),
|
|
85
|
+
probeX: SignedSliderSchema,
|
|
86
|
+
}).check(Schema.makeFilter(({ curves, labels }) => namesEach(curves, labels.curves), {
|
|
87
|
+
message: "Expected a name and formula for every derivative curve shown, and no other.",
|
|
88
|
+
})), answerAt(["labels", "slopeValue"], ["labels", "monotonicity"]));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Props of `OptimizationBox3DLab`: a 3D foldable open-top box cut from a flat
|
|
92
|
+
* sheet alongside a live volume curve V(x) highlighting the stationary optimum
|
|
93
|
+
* V'(x) = 0. Box volume and derivative note readouts are optional answer state.
|
|
94
|
+
*/
|
|
95
|
+
function optimizationBox3DLab(rich) {
|
|
96
|
+
return figure(Schema.Struct({
|
|
97
|
+
...cardFields(rich),
|
|
98
|
+
cutout: PositiveSliderSchema,
|
|
99
|
+
labels: Schema.Struct({
|
|
100
|
+
boxVolume: Schema.optionalKey(rich),
|
|
101
|
+
cutout: TextSchema,
|
|
102
|
+
derivativeNote: Schema.optionalKey(rich),
|
|
103
|
+
parts: byIds([
|
|
104
|
+
"basePlate",
|
|
105
|
+
"sideFlaps",
|
|
106
|
+
"cornerCutouts",
|
|
107
|
+
"volumeCurve",
|
|
108
|
+
"optimalMarker",
|
|
109
|
+
], TextSchema),
|
|
110
|
+
sheet: TextSchema,
|
|
111
|
+
sheets: byPickedIds(BOX_SHEETS, Schema.Struct({
|
|
112
|
+
dimensions: rich,
|
|
113
|
+
name: TextSchema,
|
|
114
|
+
})),
|
|
115
|
+
view: TextSchema,
|
|
116
|
+
}),
|
|
117
|
+
sheets: Schema.NonEmptyArray(Schema.Literals(BOX_SHEETS)).check(Schema.isUnique()),
|
|
118
|
+
}).check(Schema.makeFilter(({ labels, sheets }) => namesEach(sheets, labels.sheets), {
|
|
119
|
+
message: "Expected a name and dimensions note for every sheet preset shown, and no other.",
|
|
120
|
+
})), answerAt(["labels", "boxVolume"], ["labels", "derivativeNote"]));
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Derivative calculus 3D labs covering secant-to-tangent limits, derivative
|
|
124
|
+
* slope fields, and 3D box volume optimization.
|
|
125
|
+
*/
|
|
126
|
+
export function derivativeVisuals(rich) {
|
|
127
|
+
return {
|
|
128
|
+
DerivativeSlopeFieldLab: derivativeSlopeFieldLab(rich),
|
|
129
|
+
OptimizationBox3DLab: optimizationBox3DLab(rich),
|
|
130
|
+
SecantToTangentLab: secantToTangentLab(rich),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* Integral calculus 3D labs covering Riemann sum convergence, solids of
|
|
5
|
+
* revolution, and enclosed areas between curves.
|
|
6
|
+
*/
|
|
7
|
+
export declare function integralVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
AreaBetweenCurvesLab: 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 enclosedArea: Schema.optionalKey<RichSlot<E>>;
|
|
130
|
+
readonly heightGap: Schema.optionalKey<RichSlot<E>>;
|
|
131
|
+
readonly pair: Schema.Trimmed;
|
|
132
|
+
readonly pairs: Schema.$Record<Schema.Literals<readonly ["lineAndParabola", "twoParabolas", "sineAndCosine"]>, Schema.optionalKey<Schema.Struct<{
|
|
133
|
+
readonly formula: RichSlot<E>;
|
|
134
|
+
readonly name: Schema.Trimmed;
|
|
135
|
+
}>>>;
|
|
136
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["upperCurve", "lowerCurve", "shadedRibbon", "verticalStrip", "intersectionPins"]>, Schema.Trimmed>;
|
|
137
|
+
readonly upperBound: Schema.Trimmed;
|
|
138
|
+
readonly view: Schema.Trimmed;
|
|
139
|
+
}>;
|
|
140
|
+
readonly pairs: Schema.NonEmptyArray<Schema.Literals<readonly ["lineAndParabola", "twoParabolas", "sineAndCosine"]>>;
|
|
141
|
+
readonly upperBound: Schema.Struct<{
|
|
142
|
+
readonly max: Schema.Finite;
|
|
143
|
+
readonly min: Schema.Finite;
|
|
144
|
+
readonly value: Schema.Finite;
|
|
145
|
+
}>;
|
|
146
|
+
}>, "figure">;
|
|
147
|
+
RiemannSumConvergenceLab: 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 curves: Schema.NonEmptyArray<Schema.Literals<readonly ["parabola", "sineArch", "exponential"]>>;
|
|
268
|
+
readonly labels: Schema.Struct<{
|
|
269
|
+
readonly approxArea: Schema.optionalKey<RichSlot<E>>;
|
|
270
|
+
readonly curve: Schema.Trimmed;
|
|
271
|
+
readonly curves: Schema.$Record<Schema.Literals<readonly ["parabola", "sineArch", "exponential"]>, Schema.optionalKey<Schema.Struct<{
|
|
272
|
+
readonly formula: RichSlot<E>;
|
|
273
|
+
readonly name: Schema.Trimmed;
|
|
274
|
+
}>>>;
|
|
275
|
+
readonly exactIntegral: Schema.optionalKey<RichSlot<E>>;
|
|
276
|
+
readonly method: Schema.Trimmed;
|
|
277
|
+
readonly methods: Schema.$Record<Schema.Literals<readonly ["left", "right", "midpoint", "trapezoid"]>, Schema.optionalKey<Schema.Trimmed>>;
|
|
278
|
+
readonly partitions: Schema.Trimmed;
|
|
279
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["curveSurface", "riemannPrisms", "samplePoints", "exactArea", "baseAxis"]>, Schema.Trimmed>;
|
|
280
|
+
readonly view: Schema.Trimmed;
|
|
281
|
+
}>;
|
|
282
|
+
readonly methods: Schema.NonEmptyArray<Schema.Literals<readonly ["left", "right", "midpoint", "trapezoid"]>>;
|
|
283
|
+
readonly partitions: Schema.Struct<{
|
|
284
|
+
readonly max: Schema.Int;
|
|
285
|
+
readonly min: Schema.Int;
|
|
286
|
+
readonly value: Schema.Int;
|
|
287
|
+
}>;
|
|
288
|
+
}>, "figure">;
|
|
289
|
+
SolidOfRevolutionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
290
|
+
readonly description: RichSlot<E>;
|
|
291
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
292
|
+
readonly marks?: readonly [{
|
|
293
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
294
|
+
} | {
|
|
295
|
+
readonly attrs: {
|
|
296
|
+
readonly href: string;
|
|
297
|
+
};
|
|
298
|
+
readonly type: "link";
|
|
299
|
+
} | {
|
|
300
|
+
readonly attrs: {
|
|
301
|
+
readonly variant: "success" | "warning" | null;
|
|
302
|
+
};
|
|
303
|
+
readonly type: "highlight";
|
|
304
|
+
}, ...({
|
|
305
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
306
|
+
} | {
|
|
307
|
+
readonly attrs: {
|
|
308
|
+
readonly href: string;
|
|
309
|
+
};
|
|
310
|
+
readonly type: "link";
|
|
311
|
+
} | {
|
|
312
|
+
readonly attrs: {
|
|
313
|
+
readonly variant: "success" | "warning" | null;
|
|
314
|
+
};
|
|
315
|
+
readonly type: "highlight";
|
|
316
|
+
})[]];
|
|
317
|
+
readonly text: string;
|
|
318
|
+
readonly type: "text";
|
|
319
|
+
} | {
|
|
320
|
+
readonly attrs: {
|
|
321
|
+
readonly latex: string;
|
|
322
|
+
};
|
|
323
|
+
readonly marks?: readonly [{
|
|
324
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
325
|
+
} | {
|
|
326
|
+
readonly attrs: {
|
|
327
|
+
readonly href: string;
|
|
328
|
+
};
|
|
329
|
+
readonly type: "link";
|
|
330
|
+
} | {
|
|
331
|
+
readonly attrs: {
|
|
332
|
+
readonly variant: "success" | "warning" | null;
|
|
333
|
+
};
|
|
334
|
+
readonly type: "highlight";
|
|
335
|
+
}, ...({
|
|
336
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
337
|
+
} | {
|
|
338
|
+
readonly attrs: {
|
|
339
|
+
readonly href: string;
|
|
340
|
+
};
|
|
341
|
+
readonly type: "link";
|
|
342
|
+
} | {
|
|
343
|
+
readonly attrs: {
|
|
344
|
+
readonly variant: "success" | "warning" | null;
|
|
345
|
+
};
|
|
346
|
+
readonly type: "highlight";
|
|
347
|
+
})[]];
|
|
348
|
+
readonly type: "mathInline";
|
|
349
|
+
}, ...({
|
|
350
|
+
readonly marks?: readonly [{
|
|
351
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
352
|
+
} | {
|
|
353
|
+
readonly attrs: {
|
|
354
|
+
readonly href: string;
|
|
355
|
+
};
|
|
356
|
+
readonly type: "link";
|
|
357
|
+
} | {
|
|
358
|
+
readonly attrs: {
|
|
359
|
+
readonly variant: "success" | "warning" | null;
|
|
360
|
+
};
|
|
361
|
+
readonly type: "highlight";
|
|
362
|
+
}, ...({
|
|
363
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
364
|
+
} | {
|
|
365
|
+
readonly attrs: {
|
|
366
|
+
readonly href: string;
|
|
367
|
+
};
|
|
368
|
+
readonly type: "link";
|
|
369
|
+
} | {
|
|
370
|
+
readonly attrs: {
|
|
371
|
+
readonly variant: "success" | "warning" | null;
|
|
372
|
+
};
|
|
373
|
+
readonly type: "highlight";
|
|
374
|
+
})[]];
|
|
375
|
+
readonly text: string;
|
|
376
|
+
readonly type: "text";
|
|
377
|
+
} | {
|
|
378
|
+
readonly attrs: {
|
|
379
|
+
readonly latex: string;
|
|
380
|
+
};
|
|
381
|
+
readonly marks?: readonly [{
|
|
382
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
383
|
+
} | {
|
|
384
|
+
readonly attrs: {
|
|
385
|
+
readonly href: string;
|
|
386
|
+
};
|
|
387
|
+
readonly type: "link";
|
|
388
|
+
} | {
|
|
389
|
+
readonly attrs: {
|
|
390
|
+
readonly variant: "success" | "warning" | null;
|
|
391
|
+
};
|
|
392
|
+
readonly type: "highlight";
|
|
393
|
+
}, ...({
|
|
394
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
395
|
+
} | {
|
|
396
|
+
readonly attrs: {
|
|
397
|
+
readonly href: string;
|
|
398
|
+
};
|
|
399
|
+
readonly type: "link";
|
|
400
|
+
} | {
|
|
401
|
+
readonly attrs: {
|
|
402
|
+
readonly variant: "success" | "warning" | null;
|
|
403
|
+
};
|
|
404
|
+
readonly type: "highlight";
|
|
405
|
+
})[]];
|
|
406
|
+
readonly type: "mathInline";
|
|
407
|
+
})[]], E, never, never>>;
|
|
408
|
+
readonly title: RichSlot<E>;
|
|
409
|
+
readonly labels: Schema.Struct<{
|
|
410
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["profileCurve", "revolvedShell", "crossSectionDisk", "rotationAxis", "radiusArrow"]>, Schema.Trimmed>;
|
|
411
|
+
readonly profile: Schema.Trimmed;
|
|
412
|
+
readonly profiles: Schema.$Record<Schema.Literals<readonly ["paraboloid", "trumpetHorn", "washerBowl", "frustumCone"]>, Schema.optionalKey<Schema.Struct<{
|
|
413
|
+
readonly formula: RichSlot<E>;
|
|
414
|
+
readonly name: Schema.Trimmed;
|
|
415
|
+
}>>>;
|
|
416
|
+
readonly sliceArea: Schema.optionalKey<RichSlot<E>>;
|
|
417
|
+
readonly sweepAngle: Schema.Trimmed;
|
|
418
|
+
readonly totalVolume: Schema.optionalKey<RichSlot<E>>;
|
|
419
|
+
readonly view: Schema.Trimmed;
|
|
420
|
+
}>;
|
|
421
|
+
readonly profiles: Schema.NonEmptyArray<Schema.Literals<readonly ["paraboloid", "trumpetHorn", "washerBowl", "frustumCone"]>>;
|
|
422
|
+
readonly sweepAngle: Schema.Struct<{
|
|
423
|
+
readonly max: Schema.Finite;
|
|
424
|
+
readonly min: Schema.Finite;
|
|
425
|
+
readonly value: Schema.Finite;
|
|
426
|
+
}>;
|
|
427
|
+
}>, "figure">;
|
|
428
|
+
};
|