@citolab/qti-components 9.4.0 → 10.0.0-next.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 (44) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +262 -223
  3. package/dist/{chunk-XEWGFAS4.js → chunk-AWTQKBC4.js} +66 -26
  4. package/dist/chunk-AWTQKBC4.js.map +1 -0
  5. package/dist/{chunk-MSGYZE6L.js → chunk-CNFVA3AA.js} +127 -47
  6. package/dist/chunk-CNFVA3AA.js.map +1 -0
  7. package/dist/{chunk-LKHRHFXO.js → chunk-EPSUZIWL.js} +5 -5
  8. package/dist/{chunk-GNTO3IFM.js → chunk-EUKU5QKV.js} +79 -106
  9. package/dist/chunk-EUKU5QKV.js.map +1 -0
  10. package/dist/{chunk-B74SYQB2.js → chunk-F7R7GSWL.js} +2 -2
  11. package/dist/{chunk-C3JPUV36.js → chunk-GPNWMLLA.js} +2 -2
  12. package/dist/{chunk-JHPQJDAV.js → chunk-QD3Y6UK3.js} +2 -2
  13. package/dist/{chunk-B5XHZI2P.js → chunk-SVYHZIJ7.js} +2 -2
  14. package/dist/{chunk-BMXG7D2N.js → chunk-WNAOVXXN.js} +2 -2
  15. package/dist/chunk-ZP6QQYSU.js +7 -0
  16. package/dist/chunk-ZP6QQYSU.js.map +1 -0
  17. package/dist/corrections.d.ts +2 -2
  18. package/dist/corrections.js +6 -6
  19. package/dist/elements.d.ts +64 -2
  20. package/dist/elements.js +14 -4
  21. package/dist/index.d.ts +3 -3
  22. package/dist/index.js +21 -11
  23. package/dist/interactions.d.ts +2 -2
  24. package/dist/interactions.js +2 -2
  25. package/dist/item.css +11 -0
  26. package/dist/item.js +3 -3
  27. package/dist/loader.d.ts +1 -1
  28. package/dist/qti-components-jsx.d.ts +18 -191
  29. package/dist/{qti-test.d-Cud5Gvy0.d.ts → qti-test.d-_THYXPzd.d.ts} +5 -7
  30. package/dist/{qti-text-entry-interaction.d-DKvz9ncv.d.ts → qti-text-entry-interaction.d-q8u5BiVK.d.ts} +11 -2
  31. package/dist/test.d.ts +2 -2
  32. package/dist/test.js +4 -4
  33. package/package.json +8 -8
  34. package/dist/chunk-A32YH4H5.js +0 -7
  35. package/dist/chunk-A32YH4H5.js.map +0 -1
  36. package/dist/chunk-GNTO3IFM.js.map +0 -1
  37. package/dist/chunk-MSGYZE6L.js.map +0 -1
  38. package/dist/chunk-XEWGFAS4.js.map +0 -1
  39. /package/dist/{chunk-LKHRHFXO.js.map → chunk-EPSUZIWL.js.map} +0 -0
  40. /package/dist/{chunk-B74SYQB2.js.map → chunk-F7R7GSWL.js.map} +0 -0
  41. /package/dist/{chunk-C3JPUV36.js.map → chunk-GPNWMLLA.js.map} +0 -0
  42. /package/dist/{chunk-JHPQJDAV.js.map → chunk-QD3Y6UK3.js.map} +0 -0
  43. /package/dist/{chunk-B5XHZI2P.js.map → chunk-SVYHZIJ7.js.map} +0 -0
  44. /package/dist/{chunk-BMXG7D2N.js.map → chunk-WNAOVXXN.js.map} +0 -0
@@ -353,10 +353,6 @@ follow, so the item keeps no list of them to set it on. */
353
353
  "onqti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
354
354
  /** Emitted when through a user action the itemContext is updated, typically on interaction with the interactions, or calling response processing. */
355
355
  "onqti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
356
- /** */
357
- "onqti-interaction-changed"?: ((e: CustomEvent) => void) | undefined;
358
- /** */
359
- "onqti-outcome-changed"?: ((e: CustomEvent) => void) | undefined;
360
356
  };
361
357
 
362
358
  export type QtiAssessmentItemSolidJsProps = {
@@ -390,10 +386,6 @@ follow, so the item keeps no list of them to set it on. */
390
386
  "on:qti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
391
387
  /** Emitted when through a user action the itemContext is updated, typically on interaction with the interactions, or calling response processing. */
392
388
  "on:qti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
393
- /** */
394
- "on:qti-interaction-changed"?: ((e: CustomEvent) => void) | undefined;
395
- /** */
396
- "on:qti-outcome-changed"?: ((e: CustomEvent) => void) | undefined;
397
389
 
398
390
  /** Set the innerHTML of the element */
399
391
  innerHTML?: string | undefined;
@@ -1708,8 +1700,10 @@ export type QtiExtendedTextInteractionProps = {
1708
1700
  "string-identifier"?: unknown | undefined;
1709
1701
  /** Not implemented. Maximum number of separate string responses. QTI defines these for a multi-string response — several bound variables, one field each. This element renders a single textarea bound to one variable, so there is nothing for the bounds to count: reading them as a word or paragraph limit would invent a rule QTI does not state. Implement alongside multi-string rendering, not before it. */
1710
1702
  "max-strings"?: unknown | undefined;
1711
- /** Not implemented. See `max-strings`. */
1712
- "min-strings"?: unknown | undefined;
1703
+ /** Below 1 an empty field is valid; from 1 it must hold a value. Defaults to 0, as in the QTI spec. */
1704
+ "min-strings"?: QtiExtendedTextInteraction["minStrings"] | undefined;
1705
+ /** Below 1 an empty field is valid; from 1 it must hold a value. Defaults to 0, as in the QTI spec. */
1706
+ minStrings?: QtiExtendedTextInteraction["minStrings"] | undefined;
1713
1707
  /** How the response text is presented. Reflected so themes can key off
1714
1708
  `:host([format='preformatted'])`.
1715
1709
 
@@ -1814,8 +1808,10 @@ export type QtiExtendedTextInteractionSolidJsProps = {
1814
1808
  "attr:string-identifier"?: unknown | undefined;
1815
1809
  /** Not implemented. Maximum number of separate string responses. QTI defines these for a multi-string response — several bound variables, one field each. This element renders a single textarea bound to one variable, so there is nothing for the bounds to count: reading them as a word or paragraph limit would invent a rule QTI does not state. Implement alongside multi-string rendering, not before it. */
1816
1810
  "attr:max-strings"?: unknown | undefined;
1817
- /** Not implemented. See `max-strings`. */
1818
- "attr:min-strings"?: unknown | undefined;
1811
+ /** Below 1 an empty field is valid; from 1 it must hold a value. Defaults to 0, as in the QTI spec. */
1812
+ "attr:min-strings"?: QtiExtendedTextInteraction["minStrings"] | undefined;
1813
+ /** Below 1 an empty field is valid; from 1 it must hold a value. Defaults to 0, as in the QTI spec. */
1814
+ "prop:minStrings"?: QtiExtendedTextInteraction["minStrings"] | undefined;
1819
1815
  /** How the response text is presented. Reflected so themes can key off
1820
1816
  `:host([format='preformatted'])`.
1821
1817
 
@@ -3770,7 +3766,8 @@ export type QtiSliderInteractionProps = {
3770
3766
  max?: QtiSliderInteraction["max"] | undefined;
3771
3767
  /** */
3772
3768
  step?: QtiSliderInteraction["step"] | undefined;
3773
- /** */
3769
+ /** Shows the value without publishing it: it came from the item (a default or a restored answer) or
3770
+ from the host, which hold it already. Only the candidate's input is published. */
3774
3771
  response?: QtiSliderInteraction["response"] | undefined;
3775
3772
  /** */
3776
3773
  "response-identifier"?:
@@ -3829,7 +3826,8 @@ export type QtiSliderInteractionSolidJsProps = {
3829
3826
  "prop:max"?: QtiSliderInteraction["max"] | undefined;
3830
3827
  /** */
3831
3828
  "prop:step"?: QtiSliderInteraction["step"] | undefined;
3832
- /** */
3829
+ /** Shows the value without publishing it: it came from the item (a default or a restored answer) or
3830
+ from the host, which hold it already. Only the candidate's input is published. */
3833
3831
  "prop:response"?: QtiSliderInteraction["response"] | undefined;
3834
3832
  /** */
3835
3833
  "attr:response-identifier"?:
@@ -4158,9 +4156,6 @@ export type QtiAssessmentTestProps = {
4158
4156
  title?: QtiAssessmentTest["title"] | undefined;
4159
4157
  /** */
4160
4158
  _testContext?: QtiAssessmentTest["_testContext"] | undefined;
4161
-
4162
- /** */
4163
- "onqti-assessment-test-connected"?: ((e: CustomEvent) => void) | undefined;
4164
4159
  };
4165
4160
 
4166
4161
  export type QtiAssessmentTestSolidJsProps = {
@@ -4170,8 +4165,6 @@ export type QtiAssessmentTestSolidJsProps = {
4170
4165
  "prop:title"?: QtiAssessmentTest["title"] | undefined;
4171
4166
  /** */
4172
4167
  "prop:_testContext"?: QtiAssessmentTest["_testContext"] | undefined;
4173
- /** */
4174
- "on:qti-assessment-test-connected"?: ((e: CustomEvent) => void) | undefined;
4175
4168
 
4176
4169
  /** Set the innerHTML of the element */
4177
4170
  innerHTML?: string | undefined;
@@ -4194,11 +4187,6 @@ export type QtiAssessmentItemRefProps = {
4194
4187
  xmlDoc?: QtiAssessmentItemRef["xmlDoc"] | undefined;
4195
4188
  /** */
4196
4189
  myTemplate?: QtiAssessmentItemRef["myTemplate"] | undefined;
4197
-
4198
- /** */
4199
- "onqti-assessment-item-ref-connected"?:
4200
- | ((e: CustomEvent) => void)
4201
- | undefined;
4202
4190
  };
4203
4191
 
4204
4192
  export type QtiAssessmentItemRefSolidJsProps = {
@@ -4216,10 +4204,6 @@ export type QtiAssessmentItemRefSolidJsProps = {
4216
4204
  "prop:xmlDoc"?: QtiAssessmentItemRef["xmlDoc"] | undefined;
4217
4205
  /** */
4218
4206
  "prop:myTemplate"?: QtiAssessmentItemRef["myTemplate"] | undefined;
4219
- /** */
4220
- "on:qti-assessment-item-ref-connected"?:
4221
- | ((e: CustomEvent) => void)
4222
- | undefined;
4223
4207
 
4224
4208
  /** Set the innerHTML of the element */
4225
4209
  innerHTML?: string | undefined;
@@ -4606,9 +4590,6 @@ export type TestItemLinkProps = {
4606
4590
  "item-id"?: TestItemLink["itemId"] | undefined;
4607
4591
  /** */
4608
4592
  itemId?: TestItemLink["itemId"] | undefined;
4609
-
4610
- /** */
4611
- "onqti-request-navigation"?: ((e: CustomEvent) => void) | undefined;
4612
4593
  };
4613
4594
 
4614
4595
  export type TestItemLinkSolidJsProps = {
@@ -4616,8 +4597,6 @@ export type TestItemLinkSolidJsProps = {
4616
4597
  "attr:item-id"?: TestItemLink["itemId"] | undefined;
4617
4598
  /** */
4618
4599
  "prop:itemId"?: TestItemLink["itemId"] | undefined;
4619
- /** */
4620
- "on:qti-request-navigation"?: ((e: CustomEvent) => void) | undefined;
4621
4600
 
4622
4601
  /** Set the innerHTML of the element */
4623
4602
  innerHTML?: string | undefined;
@@ -4846,9 +4825,6 @@ export type TestNextProps = {
4846
4825
  role?: TestNext["role"] | undefined;
4847
4826
  /** */
4848
4827
  ariaLabel?: TestNext["ariaLabel"] | undefined;
4849
-
4850
- /** */
4851
- "onqti-request-navigation"?: ((e: CustomEvent) => void) | undefined;
4852
4828
  };
4853
4829
 
4854
4830
  export type TestNextSolidJsProps = {
@@ -4864,8 +4840,6 @@ export type TestNextSolidJsProps = {
4864
4840
  "prop:role"?: TestNext["role"] | undefined;
4865
4841
  /** */
4866
4842
  "prop:ariaLabel"?: TestNext["ariaLabel"] | undefined;
4867
- /** */
4868
- "on:qti-request-navigation"?: ((e: CustomEvent) => void) | undefined;
4869
4843
 
4870
4844
  /** Set the innerHTML of the element */
4871
4845
  innerHTML?: string | undefined;
@@ -4901,9 +4875,6 @@ export type TestPrevProps = {
4901
4875
  sectionItems?: TestPrev["sectionItems"] | undefined;
4902
4876
  /** */
4903
4877
  itemIndex?: TestPrev["itemIndex"] | undefined;
4904
-
4905
- /** */
4906
- "onqti-request-navigation"?: ((e: CustomEvent) => void) | undefined;
4907
4878
  };
4908
4879
 
4909
4880
  export type TestPrevSolidJsProps = {
@@ -4915,8 +4886,6 @@ export type TestPrevSolidJsProps = {
4915
4886
  "prop:sectionItems"?: TestPrev["sectionItems"] | undefined;
4916
4887
  /** */
4917
4888
  "prop:itemIndex"?: TestPrev["itemIndex"] | undefined;
4918
- /** */
4919
- "on:qti-request-navigation"?: ((e: CustomEvent) => void) | undefined;
4920
4889
 
4921
4890
  /** Set the innerHTML of the element */
4922
4891
  innerHTML?: string | undefined;
@@ -4961,9 +4930,6 @@ export type TestScoringButtonsProps = {
4961
4930
  disabled?: TestScoringButtons["disabled"] | undefined;
4962
4931
  /** */
4963
4932
  myTemplate?: TestScoringButtons["myTemplate"] | undefined;
4964
-
4965
- /** */
4966
- "ontest-update-outcome-variable"?: ((e: CustomEvent) => void) | undefined;
4967
4933
  };
4968
4934
 
4969
4935
  export type TestScoringButtonsSolidJsProps = {
@@ -4973,8 +4939,6 @@ export type TestScoringButtonsSolidJsProps = {
4973
4939
  "prop:disabled"?: TestScoringButtons["disabled"] | undefined;
4974
4940
  /** */
4975
4941
  "prop:myTemplate"?: TestScoringButtons["myTemplate"] | undefined;
4976
- /** */
4977
- "on:test-update-outcome-variable"?: ((e: CustomEvent) => void) | undefined;
4978
4942
 
4979
4943
  /** Set the innerHTML of the element */
4980
4944
  innerHTML?: string | undefined;
@@ -5021,9 +4985,6 @@ export type TestSectionLinkProps = {
5021
4985
  "section-id"?: TestSectionLink["sectionId"] | undefined;
5022
4986
  /** */
5023
4987
  sectionId?: TestSectionLink["sectionId"] | undefined;
5024
-
5025
- /** */
5026
- "onqti-request-navigation"?: ((e: CustomEvent) => void) | undefined;
5027
4988
  };
5028
4989
 
5029
4990
  export type TestSectionLinkSolidJsProps = {
@@ -5031,8 +4992,6 @@ export type TestSectionLinkSolidJsProps = {
5031
4992
  "attr:section-id"?: TestSectionLink["sectionId"] | undefined;
5032
4993
  /** */
5033
4994
  "prop:sectionId"?: TestSectionLink["sectionId"] | undefined;
5034
- /** */
5035
- "on:qti-request-navigation"?: ((e: CustomEvent) => void) | undefined;
5036
4995
 
5037
4996
  /** Set the innerHTML of the element */
5038
4997
  innerHTML?: string | undefined;
@@ -5073,9 +5032,6 @@ export type TestViewProps = {
5073
5032
  "view-options"?: TestView["viewOptions"] | undefined;
5074
5033
  /** The options to display in the dropdown, default: ['author', 'candidate', 'proctor', 'scorer', 'testConstructor', 'tutor'] */
5075
5034
  viewOptions?: TestView["viewOptions"] | undefined;
5076
-
5077
- /** */
5078
- "onon-test-switch-view"?: ((e: CustomEvent) => void) | undefined;
5079
5035
  };
5080
5036
 
5081
5037
  export type TestViewSolidJsProps = {
@@ -5085,8 +5041,6 @@ export type TestViewSolidJsProps = {
5085
5041
  "attr:view-options"?: TestView["viewOptions"] | undefined;
5086
5042
  /** The options to display in the dropdown, default: ['author', 'candidate', 'proctor', 'scorer', 'testConstructor', 'tutor'] */
5087
5043
  "prop:viewOptions"?: TestView["viewOptions"] | undefined;
5088
- /** */
5089
- "on:on-test-switch-view"?: ((e: CustomEvent) => void) | undefined;
5090
5044
 
5091
5045
  /** Set the innerHTML of the element */
5092
5046
  innerHTML?: string | undefined;
@@ -5097,16 +5051,11 @@ export type TestViewSolidJsProps = {
5097
5051
  export type TestViewToggleProps = {
5098
5052
  /** */
5099
5053
  myTemplate?: TestViewToggle["myTemplate"] | undefined;
5100
-
5101
- /** */
5102
- "onon-test-switch-view"?: ((e: CustomEvent) => void) | undefined;
5103
5054
  };
5104
5055
 
5105
5056
  export type TestViewToggleSolidJsProps = {
5106
5057
  /** */
5107
5058
  "prop:myTemplate"?: TestViewToggle["myTemplate"] | undefined;
5108
- /** */
5109
- "on:on-test-switch-view"?: ((e: CustomEvent) => void) | undefined;
5110
5059
 
5111
5060
  /** Set the innerHTML of the element */
5112
5061
  innerHTML?: string | undefined;
@@ -6296,10 +6245,6 @@ follow, so the item keeps no list of them to set it on. */
6296
6245
  "onqti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
6297
6246
  /** Emitted when through a user action the itemContext is updated, typically on interaction with the interactions, or calling response processing. */
6298
6247
  "onqti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
6299
- /** */
6300
- "onqti-interaction-changed"?: ((e: CustomEvent) => void) | undefined;
6301
- /** */
6302
- "onqti-outcome-changed"?: ((e: CustomEvent) => void) | undefined;
6303
6248
  };
6304
6249
 
6305
6250
  export type QtiAssessmentItemCorrectionSolidJsProps = {
@@ -6337,10 +6282,6 @@ follow, so the item keeps no list of them to set it on. */
6337
6282
  "on:qti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
6338
6283
  /** Emitted when through a user action the itemContext is updated, typically on interaction with the interactions, or calling response processing. */
6339
6284
  "on:qti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
6340
- /** */
6341
- "on:qti-interaction-changed"?: ((e: CustomEvent) => void) | undefined;
6342
- /** */
6343
- "on:qti-outcome-changed"?: ((e: CustomEvent) => void) | undefined;
6344
6285
 
6345
6286
  /** Set the innerHTML of the element */
6346
6287
  innerHTML?: string | undefined;
@@ -6739,8 +6680,6 @@ export type CustomElements = {
6739
6680
  *
6740
6681
  * - `qti-assessment-item-connected`: undefined
6741
6682
  * - `qti-item-context-updated`: Emitted when through a user action the itemContext is updated, typically on interaction with the interactions, or calling response processing.
6742
- * - `qti-interaction-changed`: undefined
6743
- * - `qti-outcome-changed`: undefined
6744
6683
  *
6745
6684
  * ## Methods
6746
6685
  *
@@ -7705,7 +7644,7 @@ export type CustomElements = {
7705
7644
  * - `base`/`undefined`: Not implemented. Numeric base used when recording the value.
7706
7645
  * - `string-identifier`/`undefined`: Not implemented. Identifier of a second, string-typed response variable that also receives the raw entry.
7707
7646
  * - `max-strings`/`undefined`: Not implemented. Maximum number of separate string responses. QTI defines these for a multi-string response — several bound variables, one field each. This element renders a single textarea bound to one variable, so there is nothing for the bounds to count: reading them as a word or paragraph limit would invent a rule QTI does not state. Implement alongside multi-string rendering, not before it.
7708
- * - `min-strings`/`undefined`: Not implemented. See `max-strings`.
7647
+ * - `min-strings`/`minStrings`: Below 1 an empty field is valid; from 1 it must hold a value. Defaults to 0, as in the QTI spec.
7709
7648
  * - `format`: How the response text is presented. Reflected so themes can key off
7710
7649
  * `:host([format='preformatted'])`.
7711
7650
  *
@@ -8955,7 +8894,8 @@ export type CustomElements = {
8955
8894
  * - `lower-bound`/`min`: undefined
8956
8895
  * - `upper-bound`/`max`: undefined
8957
8896
  * - `step`: undefined
8958
- * - `response`: undefined
8897
+ * - `response`: Shows the value without publishing it: it came from the item (a default or a restored answer) or
8898
+ * from the host, which hold it already. Only the candidate's input is published.
8959
8899
  * - `response-identifier`/`responseIdentifier`: undefined
8960
8900
  * - `disabled`: undefined
8961
8901
  * - `readonly`: undefined
@@ -9181,12 +9121,6 @@ export type CustomElements = {
9181
9121
  * - `identifier`: undefined
9182
9122
  * - `title`: undefined
9183
9123
  * - `_testContext`: undefined (property only)
9184
- *
9185
- * ## Events
9186
- *
9187
- * Events that will be emitted by the component.
9188
- *
9189
- * - `qti-assessment-test-connected`: undefined
9190
9124
  */
9191
9125
  "qti-assessment-test": Partial<
9192
9126
  QtiAssessmentTestProps & BaseProps<QtiAssessmentTest> & BaseEvents
@@ -9213,12 +9147,6 @@ export type CustomElements = {
9213
9147
  * - `xmlDoc`: undefined (property only)
9214
9148
  * - `assessmentItem`: undefined (property only) (readonly)
9215
9149
  * - `myTemplate`: undefined (property only)
9216
- *
9217
- * ## Events
9218
- *
9219
- * Events that will be emitted by the component.
9220
- *
9221
- * - `qti-assessment-item-ref-connected`: undefined
9222
9150
  */
9223
9151
  "qti-assessment-item-ref": Partial<
9224
9152
  QtiAssessmentItemRefProps & BaseProps<QtiAssessmentItemRef> & BaseEvents
@@ -9540,12 +9468,6 @@ export type CustomElements = {
9540
9468
  * Component attributes and properties that can be applied to the element or by using JavaScript.
9541
9469
  *
9542
9470
  * - `item-id`/`itemId`: undefined
9543
- *
9544
- * ## Events
9545
- *
9546
- * Events that will be emitted by the component.
9547
- *
9548
- * - `qti-request-navigation`: undefined
9549
9471
  */
9550
9472
  "test-item-link": Partial<
9551
9473
  TestItemLinkProps & BaseProps<TestItemLink> & BaseEvents
@@ -9811,12 +9733,6 @@ export type CustomElements = {
9811
9733
  * - `role`: undefined (property only)
9812
9734
  * - `ariaLabel`: undefined (property only)
9813
9735
  *
9814
- * ## Events
9815
- *
9816
- * Events that will be emitted by the component.
9817
- *
9818
- * - `qti-request-navigation`: undefined
9819
- *
9820
9736
  * ## Methods
9821
9737
  *
9822
9738
  * Methods that can be called to access component functionality.
@@ -9853,12 +9769,6 @@ export type CustomElements = {
9853
9769
  * - `sectionItems`: undefined (property only)
9854
9770
  * - `itemIndex`: undefined (property only)
9855
9771
  *
9856
- * ## Events
9857
- *
9858
- * Events that will be emitted by the component.
9859
- *
9860
- * - `qti-request-navigation`: undefined
9861
- *
9862
9772
  * ## Methods
9863
9773
  *
9864
9774
  * Methods that can be called to access component functionality.
@@ -9904,12 +9814,6 @@ export type CustomElements = {
9904
9814
  * - `view`: undefined
9905
9815
  * - `disabled`: undefined
9906
9816
  * - `myTemplate`: undefined (property only)
9907
- *
9908
- * ## Events
9909
- *
9910
- * Events that will be emitted by the component.
9911
- *
9912
- * - `test-update-outcome-variable`: undefined
9913
9817
  */
9914
9818
  "test-scoring-buttons": Partial<
9915
9819
  TestScoringButtonsProps & BaseProps<TestScoringButtons> & BaseEvents
@@ -9954,12 +9858,6 @@ export type CustomElements = {
9954
9858
  * Component attributes and properties that can be applied to the element or by using JavaScript.
9955
9859
  *
9956
9860
  * - `section-id`/`sectionId`: undefined
9957
- *
9958
- * ## Events
9959
- *
9960
- * Events that will be emitted by the component.
9961
- *
9962
- * - `qti-request-navigation`: undefined
9963
9861
  */
9964
9862
  "test-section-link": Partial<
9965
9863
  TestSectionLinkProps & BaseProps<TestSectionLink> & BaseEvents
@@ -9994,12 +9892,6 @@ export type CustomElements = {
9994
9892
  *
9995
9893
  * - `label`: label accompanying the select view dropdown
9996
9894
  * - `view-options`/`viewOptions`: The options to display in the dropdown, default: ['author', 'candidate', 'proctor', 'scorer', 'testConstructor', 'tutor']
9997
- *
9998
- * ## Events
9999
- *
10000
- * Events that will be emitted by the component.
10001
- *
10002
- * - `on-test-switch-view`: undefined
10003
9895
  */
10004
9896
  "test-view": Partial<TestViewProps & BaseProps<TestView> & BaseEvents>;
10005
9897
 
@@ -10012,12 +9904,6 @@ export type CustomElements = {
10012
9904
  *
10013
9905
  * - `myTemplate`: undefined (property only)
10014
9906
  *
10015
- * ## Events
10016
- *
10017
- * Events that will be emitted by the component.
10018
- *
10019
- * - `on-test-switch-view`: undefined
10020
- *
10021
9907
  * ## Methods
10022
9908
  *
10023
9909
  * Methods that can be called to access component functionality.
@@ -12039,8 +11925,6 @@ export type CustomElements = {
12039
11925
  *
12040
11926
  * - `qti-assessment-item-connected`: undefined
12041
11927
  * - `qti-item-context-updated`: Emitted when through a user action the itemContext is updated, typically on interaction with the interactions, or calling response processing.
12042
- * - `qti-interaction-changed`: undefined
12043
- * - `qti-outcome-changed`: undefined
12044
11928
  *
12045
11929
  * ## Methods
12046
11930
  *
@@ -12358,8 +12242,6 @@ export type CustomElementsSolidJs = {
12358
12242
  *
12359
12243
  * - `qti-assessment-item-connected`: undefined
12360
12244
  * - `qti-item-context-updated`: Emitted when through a user action the itemContext is updated, typically on interaction with the interactions, or calling response processing.
12361
- * - `qti-interaction-changed`: undefined
12362
- * - `qti-outcome-changed`: undefined
12363
12245
  *
12364
12246
  * ## Methods
12365
12247
  *
@@ -13413,7 +13295,7 @@ export type CustomElementsSolidJs = {
13413
13295
  * - `base`/`undefined`: Not implemented. Numeric base used when recording the value.
13414
13296
  * - `string-identifier`/`undefined`: Not implemented. Identifier of a second, string-typed response variable that also receives the raw entry.
13415
13297
  * - `max-strings`/`undefined`: Not implemented. Maximum number of separate string responses. QTI defines these for a multi-string response — several bound variables, one field each. This element renders a single textarea bound to one variable, so there is nothing for the bounds to count: reading them as a word or paragraph limit would invent a rule QTI does not state. Implement alongside multi-string rendering, not before it.
13416
- * - `min-strings`/`undefined`: Not implemented. See `max-strings`.
13298
+ * - `min-strings`/`minStrings`: Below 1 an empty field is valid; from 1 it must hold a value. Defaults to 0, as in the QTI spec.
13417
13299
  * - `format`: How the response text is presented. Reflected so themes can key off
13418
13300
  * `:host([format='preformatted'])`.
13419
13301
  *
@@ -14693,7 +14575,8 @@ export type CustomElementsSolidJs = {
14693
14575
  * - `lower-bound`/`min`: undefined
14694
14576
  * - `upper-bound`/`max`: undefined
14695
14577
  * - `step`: undefined
14696
- * - `response`: undefined
14578
+ * - `response`: Shows the value without publishing it: it came from the item (a default or a restored answer) or
14579
+ * from the host, which hold it already. Only the candidate's input is published.
14697
14580
  * - `response-identifier`/`responseIdentifier`: undefined
14698
14581
  * - `disabled`: undefined
14699
14582
  * - `readonly`: undefined
@@ -14926,12 +14809,6 @@ export type CustomElementsSolidJs = {
14926
14809
  * - `identifier`: undefined
14927
14810
  * - `title`: undefined
14928
14811
  * - `_testContext`: undefined (property only)
14929
- *
14930
- * ## Events
14931
- *
14932
- * Events that will be emitted by the component.
14933
- *
14934
- * - `qti-assessment-test-connected`: undefined
14935
14812
  */
14936
14813
  "qti-assessment-test": Partial<
14937
14814
  QtiAssessmentTestProps &
@@ -14961,12 +14838,6 @@ export type CustomElementsSolidJs = {
14961
14838
  * - `xmlDoc`: undefined (property only)
14962
14839
  * - `assessmentItem`: undefined (property only) (readonly)
14963
14840
  * - `myTemplate`: undefined (property only)
14964
- *
14965
- * ## Events
14966
- *
14967
- * Events that will be emitted by the component.
14968
- *
14969
- * - `qti-assessment-item-ref-connected`: undefined
14970
14841
  */
14971
14842
  "qti-assessment-item-ref": Partial<
14972
14843
  QtiAssessmentItemRefProps &
@@ -15323,12 +15194,6 @@ export type CustomElementsSolidJs = {
15323
15194
  * Component attributes and properties that can be applied to the element or by using JavaScript.
15324
15195
  *
15325
15196
  * - `item-id`/`itemId`: undefined
15326
- *
15327
- * ## Events
15328
- *
15329
- * Events that will be emitted by the component.
15330
- *
15331
- * - `qti-request-navigation`: undefined
15332
15197
  */
15333
15198
  "test-item-link": Partial<
15334
15199
  TestItemLinkProps &
@@ -15624,12 +15489,6 @@ export type CustomElementsSolidJs = {
15624
15489
  * - `role`: undefined (property only)
15625
15490
  * - `ariaLabel`: undefined (property only)
15626
15491
  *
15627
- * ## Events
15628
- *
15629
- * Events that will be emitted by the component.
15630
- *
15631
- * - `qti-request-navigation`: undefined
15632
- *
15633
15492
  * ## Methods
15634
15493
  *
15635
15494
  * Methods that can be called to access component functionality.
@@ -15671,12 +15530,6 @@ export type CustomElementsSolidJs = {
15671
15530
  * - `sectionItems`: undefined (property only)
15672
15531
  * - `itemIndex`: undefined (property only)
15673
15532
  *
15674
- * ## Events
15675
- *
15676
- * Events that will be emitted by the component.
15677
- *
15678
- * - `qti-request-navigation`: undefined
15679
- *
15680
15533
  * ## Methods
15681
15534
  *
15682
15535
  * Methods that can be called to access component functionality.
@@ -15730,12 +15583,6 @@ export type CustomElementsSolidJs = {
15730
15583
  * - `view`: undefined
15731
15584
  * - `disabled`: undefined
15732
15585
  * - `myTemplate`: undefined (property only)
15733
- *
15734
- * ## Events
15735
- *
15736
- * Events that will be emitted by the component.
15737
- *
15738
- * - `test-update-outcome-variable`: undefined
15739
15586
  */
15740
15587
  "test-scoring-buttons": Partial<
15741
15588
  TestScoringButtonsProps &
@@ -15787,12 +15634,6 @@ export type CustomElementsSolidJs = {
15787
15634
  * Component attributes and properties that can be applied to the element or by using JavaScript.
15788
15635
  *
15789
15636
  * - `section-id`/`sectionId`: undefined
15790
- *
15791
- * ## Events
15792
- *
15793
- * Events that will be emitted by the component.
15794
- *
15795
- * - `qti-request-navigation`: undefined
15796
15637
  */
15797
15638
  "test-section-link": Partial<
15798
15639
  TestSectionLinkProps &
@@ -15832,12 +15673,6 @@ export type CustomElementsSolidJs = {
15832
15673
  *
15833
15674
  * - `label`: label accompanying the select view dropdown
15834
15675
  * - `view-options`/`viewOptions`: The options to display in the dropdown, default: ['author', 'candidate', 'proctor', 'scorer', 'testConstructor', 'tutor']
15835
- *
15836
- * ## Events
15837
- *
15838
- * Events that will be emitted by the component.
15839
- *
15840
- * - `on-test-switch-view`: undefined
15841
15676
  */
15842
15677
  "test-view": Partial<
15843
15678
  TestViewProps & TestViewSolidJsProps & BaseProps<TestView> & BaseEvents
@@ -15852,12 +15687,6 @@ export type CustomElementsSolidJs = {
15852
15687
  *
15853
15688
  * - `myTemplate`: undefined (property only)
15854
15689
  *
15855
- * ## Events
15856
- *
15857
- * Events that will be emitted by the component.
15858
- *
15859
- * - `on-test-switch-view`: undefined
15860
- *
15861
15690
  * ## Methods
15862
15691
  *
15863
15692
  * Methods that can be called to access component functionality.
@@ -18076,8 +17905,6 @@ export type CustomElementsSolidJs = {
18076
17905
  *
18077
17906
  * - `qti-assessment-item-connected`: undefined
18078
17907
  * - `qti-item-context-updated`: Emitted when through a user action the itemContext is updated, typically on interaction with the interactions, or calling response processing.
18079
- * - `qti-interaction-changed`: undefined
18080
- * - `qti-outcome-changed`: undefined
18081
17908
  *
18082
17909
  * ## Methods
18083
17910
  *
@@ -25,6 +25,11 @@ declare global {
25
25
  'qti-assessment-test': QtiAssessmentTest;
26
26
  }
27
27
  }
28
+ declare module '../../public-events' {
29
+ interface PublicEventMap {
30
+ 'cito-test-loaded': CustomEvent<QtiAssessmentTest>;
31
+ }
32
+ }
28
33
 
29
34
  /**
30
35
  * Defined here, and re-exported by the navigation mixin under the same name, so this file imports
@@ -342,13 +347,6 @@ interface ITestStateMixin {
342
347
  state: QtiTestState;
343
348
  }
344
349
 
345
- type CustomEventMap = {
346
- 'test-end-attempt': CustomEvent;
347
- };
348
- declare global {
349
- interface GlobalEventHandlersEventMap extends CustomEventMap {
350
- }
351
- }
352
350
  declare class TestNavigation extends LitElement {
353
351
  #private;
354
352
  identifier: string | undefined;
@@ -608,7 +608,9 @@ declare global {
608
608
  * element renders a single textarea bound to one variable, so there is nothing for the bounds
609
609
  * to count: reading them as a word or paragraph limit would invent a rule QTI does not state.
610
610
  * Implement alongside multi-string rendering, not before it.
611
- * @attr {number} min-strings - Not implemented. See `max-strings`.
611
+ * @attr {number} [min-strings=0] - Whether a response is required. Below 1 an empty field is valid; from 1
612
+ * it must hold a value. Only that threshold is read: the field is a single string, so the
613
+ * count itself (see `max-strings`) has nothing to bound.
612
614
  * @attr {'plain'|'preformatted'|'xhtml'} [format=plain] - How the response is presented.
613
615
  * `preformatted` renders the field monospaced; `xhtml` is accepted but downgraded to plain,
614
616
  * because the field is a textarea with no rich-text editor behind it.
@@ -635,6 +637,8 @@ declare class QtiExtendedTextInteraction extends Interaction {
635
637
  */
636
638
  format: 'plain' | 'preformatted' | 'xhtml';
637
639
  protected _handleFormatChange: () => void;
640
+ /** Below 1 an empty field is valid; from 1 it must hold a value. Defaults to 0, as in the QTI spec. */
641
+ minStrings: number;
638
642
  patternMask: string;
639
643
  /** text appearing in the extended-text-interaction if it is empty */
640
644
  placeholderText: string;
@@ -1498,7 +1502,12 @@ declare class QtiSliderInteraction extends Interaction {
1498
1502
  step: number;
1499
1503
  validate(): boolean;
1500
1504
  connectedCallback(): void;
1501
- get response(): string;
1505
+ willUpdate(changed: PropertyValues): void;
1506
+ /**
1507
+ * Shows the value without publishing it: it came from the item (a default or a restored answer) or
1508
+ * from the host, which hold it already. Only the candidate's input is published.
1509
+ */
1510
+ get response(): string | null;
1502
1511
  set response(val: string | null);
1503
1512
  /** Extension hook for optional content rendered on the slider rail. */
1504
1513
  protected renderRailSupplement(): unknown;
package/dist/test.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { O as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-Cud5Gvy0.js';
2
- export { b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiItemSessionControl, f as QtiNumberSelected, g as QtiOutcomeProcessing, h as QtiOutcomeProcessingProcessor, i as QtiTest, j as QtiTestFeedback, k as QtiTestPart, l as QtiTestVariables, m as QtiTestVariablesExpression, S as SpeechState, T as TestCheckItem, n as TestContainer, o as TestEndAttempt, p as TestItemLink, q as TestItemToSpeech, r as TestNavigation, s as TestNext, t as TestPagingButtonsStamp, u as TestPrev, v as TestPrintContext, w as TestPrintVariables, x as TestScoringButtons, y as TestScoringFeedback, z as TestSectionButtonsStamp, A as TestSectionLink, B as TestStamp, C as TestTtsNext, D as TestTtsPause, E as TestTtsPick, F as TestTtsPlay, G as TestTtsPrev, H as TestTtsResume, J as TestTtsStop, K as TestView, L as TestViewToggle, M as TtsContext, N as ttsContext } from './qti-test.d-Cud5Gvy0.js';
1
+ import { O as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-_THYXPzd.js';
2
+ export { b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiItemSessionControl, f as QtiNumberSelected, g as QtiOutcomeProcessing, h as QtiOutcomeProcessingProcessor, i as QtiTest, j as QtiTestFeedback, k as QtiTestPart, l as QtiTestVariables, m as QtiTestVariablesExpression, S as SpeechState, T as TestCheckItem, n as TestContainer, o as TestEndAttempt, p as TestItemLink, q as TestItemToSpeech, r as TestNavigation, s as TestNext, t as TestPagingButtonsStamp, u as TestPrev, v as TestPrintContext, w as TestPrintVariables, x as TestScoringButtons, y as TestScoringFeedback, z as TestSectionButtonsStamp, A as TestSectionLink, B as TestStamp, C as TestTtsNext, D as TestTtsPause, E as TestTtsPick, F as TestTtsPlay, G as TestTtsPrev, H as TestTtsResume, J as TestTtsStop, K as TestView, L as TestViewToggle, M as TtsContext, N as ttsContext } from './qti-test.d-_THYXPzd.js';
3
3
  import { LitElement } from 'lit';
4
4
  import { b as ItemContext, c as OutcomeVariable, V as VariableDeclaration } from './item.types.d-B55QkJ92.js';
5
5
  import { S as SessionContext } from './session.context.d-D5080LVx.js';
package/dist/test.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-JHPQJDAV.js";
1
+ import "./chunk-QD3Y6UK3.js";
2
2
  import {
3
3
  QTI_TEST_STATE_VERSION,
4
4
  QtiAssessmentItemRef,
@@ -39,9 +39,9 @@ import {
39
39
  TestView,
40
40
  TestViewToggle,
41
41
  ttsContext
42
- } from "./chunk-GNTO3IFM.js";
43
- import "./chunk-XEWGFAS4.js";
44
- import "./chunk-A32YH4H5.js";
42
+ } from "./chunk-EUKU5QKV.js";
43
+ import "./chunk-AWTQKBC4.js";
44
+ import "./chunk-ZP6QQYSU.js";
45
45
  import "./chunk-4DB4SC5K.js";
46
46
  import "./chunk-TLAVOBEM.js";
47
47
  import "./chunk-R7MMMDP7.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@citolab/qti-components",
3
3
  "description": "QTI component utilities",
4
- "version": "9.4.0",
4
+ "version": "10.0.0-next.0",
5
5
  "author": "",
6
6
  "dependencies": {
7
7
  "@heximal/templates": "^0.1.5",
@@ -11,14 +11,14 @@
11
11
  },
12
12
  "devDependencies": {
13
13
  "@qti-components/base": "^2.4.0",
14
- "@qti-components/corrections": "^0.4.0",
15
- "@qti-components/elements": "^1.9.0",
16
- "@qti-components/interactions": "^1.10.4",
17
- "@qti-components/item": "^1.5.0",
18
- "@qti-components/loader": "^1.3.3",
14
+ "@qti-components/corrections": "^0.4.1-next.0",
15
+ "@qti-components/elements": "^1.10.0-next.0",
16
+ "@qti-components/interactions": "^1.10.5-next.0",
17
+ "@qti-components/item": "^1.5.1-next.0",
18
+ "@qti-components/loader": "^1.3.4-next.0",
19
19
  "@qti-components/processing": "^1.6.0",
20
- "@qti-components/test": "^1.9.0",
21
- "@qti-components/theme": "^2.2.1",
20
+ "@qti-components/test": "^1.10.0-next.0",
21
+ "@qti-components/theme": "^2.2.2-next.0",
22
22
  "@qti-components/transformers": "^1.7.3"
23
23
  },
24
24
  "exports": {