@decidables/accumulable-elements 0.1.3 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,34 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.2.1](https://github.com/decidables/decidables/compare/@decidables/accumulable-elements@0.2.0...@decidables/accumulable-elements@0.2.1) (2025-09-09)
7
+
8
+ **Note:** Version bump only for package @decidables/accumulable-elements
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.2.0](https://github.com/decidables/decidables/compare/@decidables/accumulable-elements@0.1.3...@decidables/accumulable-elements@0.2.0) (2025-05-20)
15
+
16
+
17
+ ### Features
18
+
19
+ * **accumulable-elements:** add colored sliders to ddm-parameters ([eba01e5](https://github.com/decidables/decidables/commit/eba01e57279ac5df06f619a0f63e34c16e856656))
20
+ * **accumulable-elements:** controls/parameters must be explicitly included to be shown in examples ([1dc025d](https://github.com/decidables/decidables/commit/1dc025d0919e8249f8447a5608a81d515e22ec08))
21
+ * **accumulable-elements:** human example now has attributes shared to slotted children ([eb25a21](https://github.com/decidables/decidables/commit/eb25a21db6972731e4fec184ac7ff98c403e7d75))
22
+ * **accumulable-elements:** use new parameter settings in DDMMath ([95ce71f](https://github.com/decidables/decidables/commit/95ce71fc6337ba0af73154135f3381d2092ca1e5))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **accumulable-elements:** add proper touch targets in ddm-model ([bb808d6](https://github.com/decidables/decidables/commit/bb808d6f5afc9ce78297f14071e9faab7634b205))
28
+ * **accumulable-elements:** better target touch adjustments ([969aa65](https://github.com/decidables/decidables/commit/969aa65896a0fef1e0503b5e082db2f1ff740114))
29
+ * **accumulable-elements:** clean-up examples to consistently handle events ([d6964d9](https://github.com/decidables/decidables/commit/d6964d91f692961323ccaa57dc6145f5b6aa9fa9))
30
+ * **accumulable-elements:** tweak touch targets for ddm-model ([6bd2dd7](https://github.com/decidables/decidables/commit/6bd2dd73add80ba898d956b0042a02fd71509ed8))
31
+
32
+
33
+
6
34
  ## [0.1.3](https://github.com/decidables/decidables/compare/@decidables/accumulable-elements@0.1.2...@decidables/accumulable-elements@0.1.3) (2025-02-06)
7
35
 
8
36
  **Note:** Version bump only for package @decidables/accumulable-elements
package/README.md CHANGED
@@ -126,6 +126,9 @@ Response buttons, feedback, and payoffs for two-alternative forced choice tasks
126
126
  This element provides 'left' and 'right' response buttons. It can also display a running count of
127
127
  the trials, display feedback on accuracy, and display the current trial and total payoff.
128
128
 
129
+ Also accepts keyboard responses: <kbd>ArrowLeft</kbd> for 'left' button and <kbd>ArrowRight</kbd> for
130
+ 'right' button.
131
+
129
132
  ##### Attributes
130
133
 
131
134
  - `interactive: boolean = false`
@@ -191,28 +194,29 @@ the trials, display feedback on accuracy, and display the current trial and tota
191
194
  - The outcome of the trial as an `'error'` or `'correct'`
192
195
  - `payoff: number`
193
196
  - The payoff for this trial
194
- - `correctCount: number`
195
- - Number of correct trials
196
- - `errorCount: number`
197
- - Number of error trials
198
- - `nrCount: number`
199
- - Number of no-response trials
200
- - `accuracy: number`
201
- - Proportion of correct trials
202
- - `meanRT: number`
203
- - Overall mean reaction time
204
- - `correctMeanRT: number`
205
- - Mean reaction time on correct trials
206
- - `errorMeanRT: number`
207
- - Mean reaction time on error trials
208
- - `sdRT: number`
209
- - Overall standard deviation of reaction time
210
- - `correctSDRT: number`
211
- - Standard deviation of reaction time on correct trials
212
- - `errorSDRT: number`
213
- - Standard deviation of reaction time on error trials
214
197
  - `totalPayoff: number`
215
198
  - Total payoff for the block
199
+ - `data: object`
200
+ - `correctCount: number`
201
+ - Number of correct trials
202
+ - `errorCount: number`
203
+ - Number of error trials
204
+ - `nrCount: number`
205
+ - Number of no-response trials
206
+ - `accuracy: number`
207
+ - Proportion of correct trials
208
+ - `meanRT: number`
209
+ - Overall mean reaction time
210
+ - `correctMeanRT: number`
211
+ - Mean reaction time on correct trials
212
+ - `errorMeanRT: number`
213
+ - Mean reaction time on error trials
214
+ - `sdRT: number`
215
+ - Overall standard deviation of reaction time
216
+ - `correctSDRT: number`
217
+ - Standard deviation of reaction time on correct trials
218
+ - `errorSDRT: number`
219
+ - Standard deviation of reaction time on error trials
216
220
 
217
221
  ##### Example
218
222
 
@@ -565,23 +569,23 @@ The paths can be animated when added individually to the visualization.
565
569
  Control panel for DDM model parameters
566
570
 
567
571
  A configurable set of controls for user manipulation of DDM model parameters. Controls can be
568
- provided for the boundary separation, starting pointm, drift rate, and non-decision time.
572
+ provided for the boundary separation, starting point, drift rate, and non-decision time.
569
573
 
570
574
  ##### Attributes
571
575
 
572
- - `a: number = undefined`
576
+ - `boundary-separation: number = undefined`
573
577
  - Show a slider for setting the boundary separation, initialized to the value provided
574
578
  - Options
575
579
  - `0.01` to `2` in steps of `0.01`
576
- - `z: number = undefined`
580
+ - `starting-point: number = undefined`
577
581
  - Show a slider for setting the starting point, initialized to the value provided
578
582
  - Options
579
583
  - `0.01` to `0.99` in steps of `0.01`
580
- - `z: number = undefined`
584
+ - `drift-rate: number = undefined`
581
585
  - Show a slider for setting the drift rate, initialized to the value provided
582
586
  - Options
583
587
  - `0.01` to `5` in steps of `0.01`
584
- - `t0: number = undefined`
588
+ - `nondecision-time: number = undefined`
585
589
  - Show a slider for setting the non-decision time, initialized to the value provided
586
590
  - Options
587
591
  - `0` to `500` in steps of `1`
@@ -817,6 +821,30 @@ space, and a visual rendering of signal detection theory. The table of results,
817
821
  SDT model should not be interactive, because their values are received from the user's task
818
822
  performance.
819
823
 
824
+ ##### Attributes
825
+
826
+ **Note:** Since model parameter attributes are set on the example, they don't need to be set on the
827
+ individual components, as they will be propagated and kept in sync.
828
+
829
+ - `trials: number = 10`
830
+ - Number of sampled trials to display
831
+ - `duration: number = 2000`
832
+ - The duration of the stimulus, wait, and inter-trial interval on each trial, initialized to the
833
+ value provided in milliseconds
834
+ - `coherence: number = 0.5`
835
+ - The proportion of coherent dots in the visual stimulus
836
+ - `color: string = outcome`
837
+ - How to color the cells in the results table
838
+ - Options
839
+ - `'none'`
840
+ - No use of color
841
+ - `'measure'`
842
+ - Color based on measure (*count/accuracy*, *mean RT*, *standard deviation RT*)
843
+ - `'outcome'`
844
+ - Color based on outcome (*correct*, *error*, *overall*)
845
+ - `'all'`
846
+ - Color based on measure and outcome
847
+
820
848
  ##### Slots
821
849
 
822
850
  - *unnamed*
@@ -840,11 +868,11 @@ performance.
840
868
  ##### Example
841
869
 
842
870
  ```html
843
- <ddm-example-human>
844
- <accumulable-control trials="10" duration="1000" coherence="0.4" color="outcome" run pause reset></accumulable-control>
845
- <rdk-2afc-task trials="10"></rdk-2afc-task>
871
+ <ddm-example-human trials="10" duration="2000" coherence="0.5" color="outcome">
872
+ <accumulable-control run pause reset></accumulable-control>
873
+ <rdk-2afc-task></rdk-2afc-task>
846
874
  <accumulable-response interactive trial feedback></accumulable-response>
847
- <accumulable-table numeric summary color="outcome"></accumulable-table>
875
+ <accumulable-table numeric summary></accumulable-table>
848
876
  <ddm-parameters></ddm-parameters>
849
877
  <ddm-model human measures means sds></ddm-model>
850
878
  <ddm-fit></ddm-fit>
@@ -865,6 +893,17 @@ components, as they will be propagated and kept in sync.
865
893
 
866
894
  - `trials: number = 10`
867
895
  - Number of sampled trials to display
896
+ - `color: string = outcome`
897
+ - How to color the cells in the results table
898
+ - Options
899
+ - `'none'`
900
+ - No use of color
901
+ - `'measure'`
902
+ - Color based on measure (*count/accuracy*, *mean RT*, *standard deviation RT*)
903
+ - `'outcome'`
904
+ - Color based on outcome (*correct*, *error*, *overall*)
905
+ - `'all'`
906
+ - Color based on measure and outcome
868
907
  - `boundary-separation: number = 1.5`
869
908
  - Boundary separation, in units of evidence, *a*
870
909
  - `starting-point: number = 0.5`
@@ -892,11 +931,11 @@ components, as they will be propagated and kept in sync.
892
931
  ##### Example
893
932
 
894
933
  ```html
895
- <ddm-example-interactive trials="10" boundary-separation="1.2" starting-point="0.35" drift-rate="1.5" nondecision-time="150">
896
- <accumulable-control trials="10" resample></accumulable-control>
934
+ <ddm-example-interactive trials="10" color="outcome" boundary-separation="1.2" starting-point="0.35" drift-rate="1.5" nondecision-time="150">
935
+ <accumulable-control resample></accumulable-control>
897
936
  <ddm-parameters interactive></ddm-parameters>
898
937
  <ddm-model interactive measures means sds></ddm-model>
899
- <accumulable-table numeric summary color="outcome"></accumulable-table>
938
+ <accumulable-table numeric summary></accumulable-table>
900
939
  </ddm-example-interactive>
901
940
  ```
902
941
 
@@ -963,7 +1002,7 @@ individual components, as they will be propagated and kept in sync.
963
1002
 
964
1003
  ```html
965
1004
  <ddm-example-model trials="10" duration="2000" coherence="0.5" color="outcome" boundary-separation="1.2" starting-point="0.35" drift-rate="1.5" nondecision-time="150">
966
- <accumulable-control trials color run pause reset></accumulable-control>
1005
+ <accumulable-control run pause reset></accumulable-control>
967
1006
  <rdk-2afc-task></rdk-2afc-task>
968
1007
  <ddm-parameters interactive></ddm-parameters>
969
1008
  <ddm-model interactive measures means sds></ddm-model>