jspsych 8.0.2 → 8.1.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/index.browser.js +9 -10
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.min.js +3 -3
- package/dist/index.browser.min.js.map +1 -1
- package/dist/index.cjs +8 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +20 -7
- package/dist/index.js +8 -9
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/modules/randomization.ts +29 -10
- package/src/timeline/Timeline.spec.ts +105 -5
- package/src/timeline/Timeline.ts +12 -9
package/dist/index.cjs
CHANGED
|
@@ -6,7 +6,7 @@ var seedrandom = require('seedrandom/lib/alea');
|
|
|
6
6
|
|
|
7
7
|
var _package = {
|
|
8
8
|
name: "jspsych",
|
|
9
|
-
version: "8.0
|
|
9
|
+
version: "8.1.0",
|
|
10
10
|
description: "Behavioral experiments in a browser",
|
|
11
11
|
type: "module",
|
|
12
12
|
main: "dist/index.cjs",
|
|
@@ -54,7 +54,7 @@ var _package = {
|
|
|
54
54
|
},
|
|
55
55
|
devDependencies: {
|
|
56
56
|
"@fontsource/open-sans": "4.5.3",
|
|
57
|
-
"@jspsych/config": "^3.0.
|
|
57
|
+
"@jspsych/config": "^3.0.1",
|
|
58
58
|
"@types/dom-mediacapture-record": "^1.0.11",
|
|
59
59
|
"base64-inline-loader": "^2.0.1",
|
|
60
60
|
"css-loader": "^6.6.0",
|
|
@@ -2040,7 +2040,8 @@ class Timeline extends TimelineNode {
|
|
|
2040
2040
|
}
|
|
2041
2041
|
for (const timelineVariableIndex of timelineVariableOrder) {
|
|
2042
2042
|
this.setCurrentTimelineVariablesByIndex(timelineVariableIndex);
|
|
2043
|
-
for (const
|
|
2043
|
+
for (const childNodeDescription of this.description.timeline) {
|
|
2044
|
+
const childNode = this.instantiateChildNode(childNodeDescription);
|
|
2044
2045
|
const previousChild = this.currentChild;
|
|
2045
2046
|
this.currentChild = childNode;
|
|
2046
2047
|
childNode.index = previousChild ? previousChild.getLatestNode().index + 1 : this.index;
|
|
@@ -2097,12 +2098,10 @@ class Timeline extends TimelineNode {
|
|
|
2097
2098
|
}
|
|
2098
2099
|
}
|
|
2099
2100
|
}
|
|
2100
|
-
|
|
2101
|
-
const
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
this.children.push(...newChildNodes);
|
|
2105
|
-
return newChildNodes;
|
|
2101
|
+
instantiateChildNode(childDescription) {
|
|
2102
|
+
const newChildNode = isTimelineDescription(childDescription) ? new Timeline(this.dependencies, childDescription, this) : new Trial(this.dependencies, childDescription, this);
|
|
2103
|
+
this.children.push(newChildNode);
|
|
2104
|
+
return newChildNode;
|
|
2106
2105
|
}
|
|
2107
2106
|
setCurrentTimelineVariablesByIndex(index) {
|
|
2108
2107
|
this.currentTimelineVariables = {
|