@nakafa/aksara-contracts 8.4.0 → 8.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assessment/document.d.ts +1 -1
- package/dist/assessment/document.js +1 -1
- package/dist/assessment/figure.d.ts +1 -1
- package/dist/assessment/figure.js +1 -1
- package/dist/assessment/fit.d.ts +3 -3
- package/dist/assessment/fit.js +3 -3
- package/dist/assessment/locales.d.ts +1 -1
- package/dist/assessment/scoring.d.ts +1 -1
- package/dist/assessment/scoring.js +1 -1
- package/dist/cache/content.d.ts +1 -1
- package/dist/cache/content.js +1 -1
- package/dist/content.d.ts +3 -2
- package/dist/graph/identity.d.ts +1 -1
- package/dist/graph/identity.js +1 -1
- package/dist/hash/sha256.d.ts +16 -0
- package/dist/hash/sha256.js +164 -0
- package/dist/hash/stream.d.ts +7 -5
- package/dist/hash/stream.js +13 -18
- package/dist/math/boundary.js +3 -22
- package/dist/math/bounds.d.ts +1 -1
- package/dist/math/collision.d.ts +1 -1
- package/dist/math/coordinate.d.ts +6 -5
- package/dist/math/coordinate.js +2 -2
- package/dist/math/edge.d.ts +11 -0
- package/dist/math/edge.js +74 -0
- package/dist/math/formula/compile.d.ts +1 -1
- package/dist/math/formula/compile.js +1 -1
- package/dist/math/formula/contour.d.ts +1 -1
- package/dist/math/formula/contour.js +1 -1
- package/dist/math/formula/field.js +1 -1
- package/dist/math/formula/mesh.d.ts +1 -1
- package/dist/math/formula/mesh.js +1 -1
- package/dist/math/formula/names.d.ts +1 -1
- package/dist/math/formula/names.js +1 -1
- package/dist/math/formula/parse.d.ts +1 -1
- package/dist/math/formula/parse.js +1 -1
- package/dist/math/formula/plane.d.ts +2 -2
- package/dist/math/formula/plane.js +3 -3
- package/dist/math/formula/reader.d.ts +2 -1
- package/dist/math/formula/reader.js +1 -1
- package/dist/math/formula/region.d.ts +2 -2
- package/dist/math/formula/region.js +3 -3
- package/dist/math/formula/sample.d.ts +1 -1
- package/dist/math/formula/scan.d.ts +1 -1
- package/dist/math/formula/scan.js +1 -1
- package/dist/math/formula/slider.d.ts +2 -2
- package/dist/math/formula/slider.js +1 -1
- package/dist/math/formula/space.d.ts +1 -1
- package/dist/math/formula/space.js +1 -1
- package/dist/math/graph.d.ts +9 -0
- package/dist/math/graph.js +66 -0
- package/dist/math/plane.js +6 -0
- package/dist/math/precision.d.ts +1 -1
- package/dist/math/precision.js +1 -1
- package/dist/math/resolution.js +1 -1
- package/dist/math/scene.d.ts +2 -2
- package/dist/math/shape.d.ts +392 -0
- package/dist/math/shape.js +59 -0
- package/dist/math/straight.d.ts +13 -0
- package/dist/math/straight.js +26 -0
- package/dist/math/vector.d.ts +1 -1
- package/dist/preview/spec.js +1 -1
- package/dist/program/curriculum.d.ts +1 -1
- package/dist/program/curriculum.js +1 -1
- package/dist/program/snapshot/digest.d.ts +1 -1
- package/dist/program/snapshot/digest.js +2 -2
- package/dist/program/snapshot/hash.d.ts +2 -2
- package/dist/projection/digest.d.ts +1 -1
- package/dist/projection/digest.js +1 -1
- package/dist/projection/hash.js +1 -1
- package/dist/projection/material.d.ts +1 -1
- package/dist/projection/material.js +1 -1
- package/dist/projection/verify.js +1 -1
- package/dist/quran/identity.d.ts +2 -1
- package/dist/quran/provenance.d.ts +2 -2
- package/dist/quran/provenance.js +1 -1
- package/dist/quran/snapshot/hash.d.ts +1 -1
- package/dist/quran/snapshot/row/hash.d.ts +1 -1
- package/dist/quran/snapshot/row/hash.js +1 -1
- package/dist/quran/snapshot/spec.js +1 -1
- package/dist/quran/source.d.ts +2 -2
- package/dist/release/current/evidence.d.ts +1 -1
- package/dist/release/current/evidence.js +1 -1
- package/dist/release/current/state.d.ts +1 -1
- package/dist/release/current/state.js +1 -1
- package/dist/release/head.js +1 -1
- package/dist/release/items.d.ts +1 -1
- package/dist/release/items.js +1 -1
- package/dist/release/policy.d.ts +1 -1
- package/dist/release/policy.js +1 -1
- package/dist/release/result/digest.d.ts +3 -3
- package/dist/release/result/digest.js +2 -2
- package/dist/release/rollback/digest.d.ts +1 -1
- package/dist/release/rollback/digest.js +1 -1
- package/dist/release/route/digest.d.ts +1 -1
- package/dist/release/route/digest.js +1 -1
- package/dist/release/snapshot/evidence/assessment.d.ts +1 -1
- package/dist/release/snapshot/evidence/assessment.js +1 -1
- package/dist/release/snapshot/evidence/program.d.ts +1 -1
- package/dist/release/snapshot/evidence/program.js +1 -1
- package/dist/release/snapshot/evidence/quran.d.ts +1 -1
- package/dist/release/snapshot/evidence/quran.js +1 -1
- package/dist/release/snapshot/evidence/requirement.d.ts +3 -2
- package/dist/release/snapshot/evidence/requirement.js +1 -1
- package/dist/release/snapshot/spec.d.ts +2 -2
- package/dist/release/snapshot/spec.js +1 -1
- package/dist/release/snapshot/verify.d.ts +1 -1
- package/dist/release/snapshot/verify.js +1 -1
- package/dist/release/spec.d.ts +1 -1
- package/dist/release/verify.d.ts +1 -1
- package/dist/release/verify.js +1 -1
- package/dist/renderer/compatibility.d.ts +1 -1
- package/dist/renderer/compatibility.js +2 -2
- package/dist/renderer/contract.d.ts +1 -1
- package/dist/renderer/contract.js +1 -1
- package/dist/runtime/spec.js +2 -2
- package/dist/signature/spec.d.ts +3 -2
- package/dist/signature/verify.d.ts +2 -1
- package/dist/transport/request.d.ts +1 -1
- package/dist/visual/base/math.d.ts +1 -1
- package/dist/visual/base/media.d.ts +1 -1
- package/dist/visual/biology/bacteria.d.ts +1 -1
- package/dist/visual/biology/bacteria.js +1 -1
- package/dist/visual/biology/blood.d.ts +91 -0
- package/dist/visual/biology/blood.js +55 -0
- package/dist/visual/biology/cell.d.ts +1 -1
- package/dist/visual/biology/climate.d.ts +1 -1
- package/dist/visual/biology/climate.js +1 -1
- package/dist/visual/biology/ecology.d.ts +1 -1
- package/dist/visual/biology/heart.d.ts +92 -0
- package/dist/visual/biology/heart.js +54 -0
- package/dist/visual/biology/mitochondrion.d.ts +91 -0
- package/dist/visual/biology/mitochondrion.js +45 -0
- package/dist/visual/biology/muscle.d.ts +103 -0
- package/dist/visual/biology/muscle.js +62 -0
- package/dist/visual/biology/neuron.d.ts +97 -0
- package/dist/visual/biology/neuron.js +48 -0
- package/dist/visual/biology/paddy.d.ts +100 -0
- package/dist/visual/biology/paddy.js +54 -0
- package/dist/visual/biology/physiology.d.ts +1 -1
- package/dist/visual/biology/physiology.js +1 -1
- package/dist/visual/biology/plant.d.ts +1 -1
- package/dist/visual/biology/plant.js +1 -1
- package/dist/visual/biology/synapse.d.ts +101 -0
- package/dist/visual/biology/synapse.js +46 -0
- package/dist/visual/biology/vessel.d.ts +104 -0
- package/dist/visual/biology/vessel.js +60 -0
- package/dist/visual/biology/yeast.d.ts +108 -0
- package/dist/visual/biology/yeast.js +61 -0
- package/dist/visual/biology.d.ts +1 -1
- package/dist/visual/catalog.d.ts +2177 -778
- package/dist/visual/catalog.js +28 -0
- package/dist/visual/chemistry/atom.d.ts +1 -1
- package/dist/visual/chemistry/atom.js +1 -1
- package/dist/visual/chemistry/balance.d.ts +1 -1
- package/dist/visual/chemistry/balance.js +1 -1
- package/dist/visual/chemistry/bonding.d.ts +1 -1
- package/dist/visual/chemistry/discovery.d.ts +1 -1
- package/dist/visual/chemistry/electrochemistry.d.ts +1 -1
- package/dist/visual/chemistry/electrochemistry.js +1 -1
- package/dist/visual/chemistry/electron.d.ts +1 -1
- package/dist/visual/chemistry/electron.js +1 -1
- package/dist/visual/chemistry/laws.d.ts +1 -1
- package/dist/visual/chemistry/laws.js +1 -1
- package/dist/visual/chemistry/particles.d.ts +1 -1
- package/dist/visual/chemistry/periodic.d.ts +1 -1
- package/dist/visual/chemistry/periodic.js +1 -1
- package/dist/visual/chemistry/rate.d.ts +1 -1
- package/dist/visual/chemistry/rate.js +1 -1
- package/dist/visual/chemistry/reaction.d.ts +1 -1
- package/dist/visual/chemistry/reaction.js +1 -1
- package/dist/visual/chemistry/titration.d.ts +1 -1
- package/dist/visual/chemistry/titration.js +1 -1
- package/dist/visual/mathematics/chance.d.ts +1 -1
- package/dist/visual/mathematics/chance.js +1 -1
- package/dist/visual/mathematics/chart.d.ts +1 -1
- package/dist/visual/mathematics/charts.d.ts +1 -1
- package/dist/visual/mathematics/function.d.ts +1 -1
- package/dist/visual/mathematics/journey.d.ts +118 -0
- package/dist/visual/mathematics/journey.js +125 -0
- package/dist/visual/mathematics/logic.d.ts +90 -0
- package/dist/visual/mathematics/logic.js +49 -0
- package/dist/visual/mathematics/network.d.ts +101 -0
- package/dist/visual/mathematics/network.js +97 -0
- package/dist/visual/mathematics/numeral.d.ts +82 -1
- package/dist/visual/mathematics/numeral.js +49 -1
- package/dist/visual/mathematics/sets.d.ts +92 -0
- package/dist/visual/mathematics/sets.js +95 -0
- package/dist/visual/physics/braking.d.ts +1 -1
- package/dist/visual/physics/braking.js +1 -1
- package/dist/visual/physics/circuit.d.ts +1 -1
- package/dist/visual/physics/circular.d.ts +1 -1
- package/dist/visual/physics/circular.js +1 -1
- package/dist/visual/physics/dynamics.d.ts +1 -1
- package/dist/visual/physics/dynamics.js +1 -1
- package/dist/visual/physics/efficiency.d.ts +1 -1
- package/dist/visual/physics/efficiency.js +1 -1
- package/dist/visual/physics/electronics.d.ts +1 -1
- package/dist/visual/physics/falling.d.ts +1 -1
- package/dist/visual/physics/falling.js +1 -1
- package/dist/visual/physics/field.d.ts +1 -1
- package/dist/visual/physics/fluid.d.ts +1 -1
- package/dist/visual/physics/fluid.js +1 -1
- package/dist/visual/physics/force.d.ts +1 -1
- package/dist/visual/physics/gravity.d.ts +1 -1
- package/dist/visual/physics/heat.d.ts +1 -1
- package/dist/visual/physics/heat.js +1 -1
- package/dist/visual/physics/instrument.d.ts +1 -1
- package/dist/visual/physics/light.d.ts +1 -1
- package/dist/visual/physics/light.js +1 -1
- package/dist/visual/physics/measurement.d.ts +1 -1
- package/dist/visual/physics/measurement.js +1 -1
- package/dist/visual/physics/motion.d.ts +1 -1
- package/dist/visual/physics/nuclear.d.ts +1 -1
- package/dist/visual/physics/parabolic.d.ts +1 -1
- package/dist/visual/physics/position.d.ts +1 -1
- package/dist/visual/physics/position.js +1 -1
- package/dist/visual/physics/power.d.ts +1 -1
- package/dist/visual/physics/power.js +1 -1
- package/dist/visual/physics/precision.d.ts +1 -1
- package/dist/visual/physics/precision.js +1 -1
- package/dist/visual/physics/product.d.ts +1 -1
- package/dist/visual/physics/reading.d.ts +1 -1
- package/dist/visual/physics/reading.js +1 -1
- package/dist/visual/physics/record.d.ts +1 -1
- package/dist/visual/physics/record.js +1 -1
- package/dist/visual/physics/relative.d.ts +1 -1
- package/dist/visual/physics/relative.js +1 -1
- package/dist/visual/physics/solar.d.ts +1 -1
- package/dist/visual/physics/solar.js +1 -1
- package/dist/visual/physics/thermodynamics.d.ts +117 -0
- package/dist/visual/physics/thermodynamics.js +95 -0
- package/dist/visual/physics/vector.d.ts +1 -1
- package/dist/visual/physics/vector.js +1 -1
- package/dist/visual/physics/velocity.d.ts +1 -1
- package/dist/visual/physics/wave.d.ts +1 -1
- package/dist/visual/politics.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the electronics labs. Each prop is a value from the item the lab
|
|
5
5
|
* draws, never the conclusion it leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the falling and projectile labs. No prop states the conclusion a
|
|
5
5
|
* lab leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/** Props of `GalileoInclineBellsLab`: Galileo's inclined plane. */
|
|
5
5
|
function galileoInclineBellsLab(rich) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the electromagnetism labs. Each prop is a value from the item the lab
|
|
5
5
|
* draws, never the conclusion it leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the fluid pressure labs. Each prop is a value from the item the lab
|
|
5
5
|
* draws, never the conclusion it leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/** Props of `FloatingBlockLab`: a wooden block floats in a tank of water, then in a lighter liquid. */
|
|
5
5
|
function floatingBlockLab(rich) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the labs that add and resolve forces. No prop states the
|
|
5
5
|
* conclusion a lab leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the gravitation labs. Each prop is a value from the item the lab
|
|
5
5
|
* draws, never the conclusion it leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the heat labs. Each prop is a value from the item the lab
|
|
5
5
|
* draws, never the conclusion it leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/** Props of `HeatingCurveLab`: an immersion heater of constant power melts a solid in a beaker and then warms the liquid. */
|
|
5
5
|
function heatingCurveLab(rich) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the labs that read a measuring instrument. No prop states the
|
|
5
5
|
* conclusion a lab leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the light labs. Each prop is a value from the item the lab
|
|
5
5
|
* draws, never the conclusion it leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/** Props of `GlassBlockLab`: a ray box aims a narrow beam at the top face of a rectangular glass block. */
|
|
5
5
|
function glassBlockLab(rich) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The measurement, vector, and energy labs. The net idea of the cable lab and
|
|
5
5
|
* the meaning of the wind lab state the conclusion each lab leads to, so they
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
4
|
/** The quantities the dimension lab builds from length. */
|
|
5
5
|
const DIMENSION_MODES = ["length", "area", "volume"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The labs and graphs of linear and circular motion. Their labels name the
|
|
5
5
|
* quantities a reader measures; the values come from the motion the reader
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the nuclear and quantum physics labs. Each prop is a value from the item the lab
|
|
5
5
|
* draws, never the conclusion it leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The projectile labs. Their labels name the quantities the lab computes for
|
|
5
5
|
* the launch the reader picks, so no prop holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the position and speed labs. No prop states the conclusion a lab
|
|
5
5
|
* leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/**
|
|
5
5
|
* Props of `StreetOriginPositionLab`: a cyclist rides along a street with a
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the power plant labs. No prop states the conclusion a lab leads
|
|
5
5
|
* to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/** Props of `HydroDamLab`: a hydropower dam in cross-section. */
|
|
5
5
|
function hydroDamLab(rich) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the labs of significant figures, units, and derived quantities.
|
|
5
5
|
* No prop states the conclusion a lab leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/**
|
|
5
5
|
* Props of `SignificantZerosLab`: one steel rod read with a tape measure, a
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the labs of vector products: torque, work, and flux. No prop
|
|
5
5
|
* states the conclusion a lab leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the measurement and graphs labs. Each prop is a value from the item the lab
|
|
5
5
|
* draws, never the conclusion it leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/** Props of `MotionAreaLab`: a car drives a straight road through stretches of steady speeding up, steady speed and slowing down, and its velocity-time graph fills in below it. */
|
|
5
5
|
function motionAreaLab(rich) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the labs that record a motion. No prop states the conclusion a
|
|
5
5
|
* lab leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/** Props of `TickerTapeMotionLab`: a ticker timer on a lab bench. */
|
|
5
5
|
function tickerTapeMotionLab(rich) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the relative velocity labs. No prop states the conclusion a lab
|
|
5
5
|
* leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/**
|
|
5
5
|
* Props of `RainDriveRelativeVelocityLab`: rain falling straight down on a
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the solar energy labs. No prop states the conclusion a lab leads
|
|
5
5
|
* to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/**
|
|
5
5
|
* Props of `SolarPanelAngleLab`: a solar panel on a stand under parallel rays
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/** The thermodynamics labs, where a gas exchanges heat and work. */
|
|
4
|
+
export declare function thermodynamicsVisuals<E>(rich: RichSlot<E>): {
|
|
5
|
+
GasProcessLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
6
|
+
readonly description: RichSlot<E>;
|
|
7
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
8
|
+
readonly attrs: {
|
|
9
|
+
readonly latex: string;
|
|
10
|
+
};
|
|
11
|
+
readonly type: "mathInline";
|
|
12
|
+
} | {
|
|
13
|
+
readonly marks?: readonly [{
|
|
14
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
15
|
+
} | {
|
|
16
|
+
readonly attrs: {
|
|
17
|
+
readonly href: string;
|
|
18
|
+
};
|
|
19
|
+
readonly type: "link";
|
|
20
|
+
} | {
|
|
21
|
+
readonly attrs: {
|
|
22
|
+
readonly variant: "success" | "warning" | null;
|
|
23
|
+
};
|
|
24
|
+
readonly type: "highlight";
|
|
25
|
+
}, ...({
|
|
26
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
27
|
+
} | {
|
|
28
|
+
readonly attrs: {
|
|
29
|
+
readonly href: string;
|
|
30
|
+
};
|
|
31
|
+
readonly type: "link";
|
|
32
|
+
} | {
|
|
33
|
+
readonly attrs: {
|
|
34
|
+
readonly variant: "success" | "warning" | null;
|
|
35
|
+
};
|
|
36
|
+
readonly type: "highlight";
|
|
37
|
+
})[]];
|
|
38
|
+
readonly text: string;
|
|
39
|
+
readonly type: "text";
|
|
40
|
+
}, ...({
|
|
41
|
+
readonly attrs: {
|
|
42
|
+
readonly latex: string;
|
|
43
|
+
};
|
|
44
|
+
readonly type: "mathInline";
|
|
45
|
+
} | {
|
|
46
|
+
readonly marks?: readonly [{
|
|
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 type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
60
|
+
} | {
|
|
61
|
+
readonly attrs: {
|
|
62
|
+
readonly href: string;
|
|
63
|
+
};
|
|
64
|
+
readonly type: "link";
|
|
65
|
+
} | {
|
|
66
|
+
readonly attrs: {
|
|
67
|
+
readonly variant: "success" | "warning" | null;
|
|
68
|
+
};
|
|
69
|
+
readonly type: "highlight";
|
|
70
|
+
})[]];
|
|
71
|
+
readonly text: string;
|
|
72
|
+
readonly type: "text";
|
|
73
|
+
})[]], E, never, never>>;
|
|
74
|
+
readonly title: RichSlot<E>;
|
|
75
|
+
readonly gamma: Schema.optionalKey<Schema.Finite>;
|
|
76
|
+
readonly labels: Schema.Struct<{
|
|
77
|
+
readonly endPressure: Schema.Trimmed;
|
|
78
|
+
readonly endState: RichSlot<E>;
|
|
79
|
+
readonly endVolume: Schema.Trimmed;
|
|
80
|
+
readonly energy: Schema.Trimmed;
|
|
81
|
+
readonly heat: RichSlot<E>;
|
|
82
|
+
readonly internal: RichSlot<E>;
|
|
83
|
+
readonly law: RichSlot<E>;
|
|
84
|
+
readonly pressureAxis: RichSlot<E>;
|
|
85
|
+
readonly process: Schema.Trimmed;
|
|
86
|
+
readonly processes: Schema.$Record<Schema.Literals<readonly ["isobaric", "isochoric", "isothermal", "adiabatic"]>, Schema.Trimmed>;
|
|
87
|
+
readonly startState: RichSlot<E>;
|
|
88
|
+
readonly viewLabel: Schema.Trimmed;
|
|
89
|
+
readonly volumeAxis: RichSlot<E>;
|
|
90
|
+
readonly work: RichSlot<E>;
|
|
91
|
+
}>;
|
|
92
|
+
readonly moles: Schema.Finite;
|
|
93
|
+
readonly processes: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
94
|
+
readonly process: Schema.Literals<readonly ["isobaric", "isothermal", "adiabatic"]>;
|
|
95
|
+
readonly volume: Schema.Struct<{
|
|
96
|
+
readonly end: Schema.Finite;
|
|
97
|
+
readonly max: Schema.Finite;
|
|
98
|
+
readonly min: Schema.Finite;
|
|
99
|
+
}>;
|
|
100
|
+
}>, Schema.Struct<{
|
|
101
|
+
readonly pressure: Schema.Struct<{
|
|
102
|
+
readonly end: Schema.Finite;
|
|
103
|
+
readonly max: Schema.Finite;
|
|
104
|
+
readonly min: Schema.Finite;
|
|
105
|
+
}>;
|
|
106
|
+
readonly process: Schema.Literal<"isochoric">;
|
|
107
|
+
}>]>>;
|
|
108
|
+
readonly showValues: Schema.optionalKey<Schema.Boolean>;
|
|
109
|
+
readonly start: Schema.Union<readonly [Schema.Struct<{
|
|
110
|
+
readonly pressure: Schema.Finite;
|
|
111
|
+
readonly volume: Schema.Finite;
|
|
112
|
+
}>, Schema.Struct<{
|
|
113
|
+
readonly temperature: Schema.Finite;
|
|
114
|
+
readonly volume: Schema.Finite;
|
|
115
|
+
}>]>;
|
|
116
|
+
}>, "figure">;
|
|
117
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Array as Arr, Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
+
/** The four processes of an ideal gas the lab can run. */
|
|
5
|
+
const GAS_PROCESSES = [
|
|
6
|
+
"isobaric",
|
|
7
|
+
"isochoric",
|
|
8
|
+
"isothermal",
|
|
9
|
+
"adiabatic",
|
|
10
|
+
];
|
|
11
|
+
/** A quantity of the gas that must be above zero: an amount, a pressure, a volume or a temperature. */
|
|
12
|
+
const PositiveSchema = Schema.Finite.check(Schema.isGreaterThan(0));
|
|
13
|
+
/**
|
|
14
|
+
* The starting state: its volume with either its pressure or its
|
|
15
|
+
* temperature, in kPa, L and K. The lab works the third out from pV = nRT.
|
|
16
|
+
*/
|
|
17
|
+
const StartSchema = Schema.Union([
|
|
18
|
+
Schema.Struct({ pressure: PositiveSchema, volume: PositiveSchema }),
|
|
19
|
+
Schema.Struct({ temperature: PositiveSchema, volume: PositiveSchema }),
|
|
20
|
+
]);
|
|
21
|
+
/** Where the end of a process starts, and how far the learner may drag it. */
|
|
22
|
+
const EndRangeSchema = Schema.Struct({
|
|
23
|
+
end: PositiveSchema,
|
|
24
|
+
max: PositiveSchema,
|
|
25
|
+
min: PositiveSchema,
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* One process the toolbar offers: the end's volume for isobaric, isothermal
|
|
29
|
+
* and adiabatic, and the end's pressure for isochoric, where the volume holds.
|
|
30
|
+
*/
|
|
31
|
+
const SetupSchema = Schema.Union([
|
|
32
|
+
Schema.Struct({
|
|
33
|
+
process: Schema.Literals(["isobaric", "isothermal", "adiabatic"]),
|
|
34
|
+
volume: EndRangeSchema,
|
|
35
|
+
}),
|
|
36
|
+
Schema.Struct({
|
|
37
|
+
pressure: EndRangeSchema,
|
|
38
|
+
process: Schema.Literal("isochoric"),
|
|
39
|
+
}),
|
|
40
|
+
]);
|
|
41
|
+
/** The range a process's end moves through: its pressure when isochoric, else its volume. */
|
|
42
|
+
function rangeOf(setup) {
|
|
43
|
+
return setup.process === "isochoric" ? setup.pressure : setup.volume;
|
|
44
|
+
}
|
|
45
|
+
/** Whether each process is offered once, and each end starts inside a range that has room to move. */
|
|
46
|
+
function isProcessList(processes) {
|
|
47
|
+
const names = Arr.map(processes, ({ process }) => process);
|
|
48
|
+
return (Arr.dedupe(names).length === names.length &&
|
|
49
|
+
Arr.every(processes, (setup) => {
|
|
50
|
+
const { end, max, min } = rangeOf(setup);
|
|
51
|
+
return min < max && min <= end && end <= max;
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Props of `GasProcessLab`: `moles` of an ideal gas in a cylinder under a
|
|
56
|
+
* piston, beside a p-V diagram. The learner picks one of the offered
|
|
57
|
+
* `processes` and drags point 2 along that process's own path; the rig shows
|
|
58
|
+
* what holds the process (a weight, pins, a water bath or a foam jacket), the
|
|
59
|
+
* thermometer and the piston follow, and the footer's Q, W and ΔU bars share
|
|
60
|
+
* one scale, W being the work done by the gas. `gamma` is the gas's heat
|
|
61
|
+
* capacity ratio, 5/3 unless set. With `showValues`, the bars read signed
|
|
62
|
+
* joules and the first law is worked with the numbers, so it is answer state.
|
|
63
|
+
*/
|
|
64
|
+
function gasProcessLab(rich) {
|
|
65
|
+
return figure(Schema.Struct({
|
|
66
|
+
...cardFields(rich),
|
|
67
|
+
gamma: Schema.optionalKey(Schema.Finite.check(Schema.isGreaterThan(1))),
|
|
68
|
+
labels: Schema.Struct({
|
|
69
|
+
endPressure: TextSchema,
|
|
70
|
+
endState: rich,
|
|
71
|
+
endVolume: TextSchema,
|
|
72
|
+
energy: TextSchema,
|
|
73
|
+
heat: rich,
|
|
74
|
+
internal: rich,
|
|
75
|
+
law: rich,
|
|
76
|
+
pressureAxis: rich,
|
|
77
|
+
process: TextSchema,
|
|
78
|
+
processes: byIds(GAS_PROCESSES, TextSchema),
|
|
79
|
+
startState: rich,
|
|
80
|
+
viewLabel: TextSchema,
|
|
81
|
+
volumeAxis: rich,
|
|
82
|
+
work: rich,
|
|
83
|
+
}),
|
|
84
|
+
moles: PositiveSchema,
|
|
85
|
+
processes: Schema.NonEmptyArray(SetupSchema),
|
|
86
|
+
showValues: Schema.optionalKey(Schema.Boolean),
|
|
87
|
+
start: StartSchema,
|
|
88
|
+
}).check(Schema.makeFilter(({ processes }) => isProcessList(processes), {
|
|
89
|
+
message: "Expected each process once, and each end inside a range whose minimum is below its maximum.",
|
|
90
|
+
})), answerAt(["showValues"]));
|
|
91
|
+
}
|
|
92
|
+
/** The thermodynamics labs, where a gas exchanges heat and work. */
|
|
93
|
+
export function thermodynamicsVisuals(rich) {
|
|
94
|
+
return { GasProcessLab: gasProcessLab(rich) };
|
|
95
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the labs that add and resolve displacement vectors. No prop
|
|
5
5
|
* states the conclusion a lab leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema
|
|
2
|
+
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
3
|
import { figure } from "#contracts/visual/entry";
|
|
4
4
|
/** A point on the orienteering map: metres east and north of the start. */
|
|
5
5
|
const MARK = Schema.Struct({ east: Schema.Finite, north: Schema.Finite });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The labs of velocity, distance, and relative motion. The meaning of each
|
|
5
5
|
* route says what its displacement shows, so it is answer state; every other
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The props of the wave labs. Each prop is a value from the item the lab
|
|
5
5
|
* draws, never the conclusion it leads to, so none holds answer state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
4
|
* The politics charts and tables. Each draws sourced data that the component
|
|
5
5
|
* holds, and its labels name the series, so no prop holds answer state.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nakafa/aksara-contracts",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.8.0",
|
|
4
4
|
"description": "Schemas and verification contracts for Nakafa content releases.",
|
|
5
5
|
"homepage": "https://github.com/nakafaai/aksara#readme",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -575,4 +575,4 @@
|
|
|
575
575
|
"types": "./dist/*.d.ts"
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
}
|
|
578
|
+
}
|