@citolab/qti-components 7.28.0 → 7.28.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.
Files changed (50) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +188 -188
  3. package/custom-elements.json +91 -1
  4. package/dist/base.d.ts +2 -2
  5. package/dist/base.js +5 -1
  6. package/dist/chunk-3WBG257S.js +697 -0
  7. package/dist/chunk-3WBG257S.js.map +1 -0
  8. package/dist/{chunk-Z2SUBRH5.js → chunk-3XV26R5M.js} +6 -1
  9. package/dist/chunk-3XV26R5M.js.map +1 -0
  10. package/dist/{chunk-LQZCSHN5.js → chunk-AQ5RJFM6.js} +2 -2
  11. package/dist/{chunk-N7S3GNUP.js → chunk-FLJAKWXL.js} +2 -2
  12. package/dist/{chunk-PINGOK2F.js → chunk-HFCZFWSH.js} +27 -48
  13. package/dist/chunk-HFCZFWSH.js.map +1 -0
  14. package/dist/{chunk-FK2IVMS3.js → chunk-MPC7LIPC.js} +3 -3
  15. package/dist/{chunk-YLIYPNMK.js → chunk-REI3AMCZ.js} +2 -2
  16. package/dist/{chunk-U2FLSHK7.js → chunk-RLTYVS2I.js} +25 -5
  17. package/dist/chunk-RLTYVS2I.js.map +1 -0
  18. package/dist/{chunk-F6WP6WEF.js → chunk-SP6S2WMG.js} +2 -2
  19. package/dist/{chunk-OQ77SE2W.js → chunk-WDO2TRFM.js} +4 -4
  20. package/dist/elements.js +4 -4
  21. package/dist/index.d.ts +3 -3
  22. package/dist/index.js +14 -10
  23. package/dist/interactions.d.ts +1 -1
  24. package/dist/interactions.js +3 -3
  25. package/dist/item.d.ts +7 -0
  26. package/dist/item.js +4 -4
  27. package/dist/loader.js +2 -2
  28. package/dist/processing.d.ts +2 -2
  29. package/dist/processing.js +2 -2
  30. package/dist/qti-components-jsx.d.ts +178 -151
  31. package/dist/{qti-condition-expression-B1BYmCcq.d.ts → qti-condition-expression-Dam-RER6.d.ts} +1 -1
  32. package/dist/{qti-transform-test-DMx816H0.d.ts → qti-transform-test-DoZaWItm.d.ts} +11 -9
  33. package/dist/qti.context-CejJMlfZ.d.ts +50 -0
  34. package/dist/test.d.ts +5 -3
  35. package/dist/test.js +6 -6
  36. package/dist/transformers.d.ts +1 -1
  37. package/dist/transformers.js +1 -1
  38. package/package.json +6 -6
  39. package/dist/chunk-BPIDAS3T.js +0 -495
  40. package/dist/chunk-BPIDAS3T.js.map +0 -1
  41. package/dist/chunk-PINGOK2F.js.map +0 -1
  42. package/dist/chunk-U2FLSHK7.js.map +0 -1
  43. package/dist/chunk-Z2SUBRH5.js.map +0 -1
  44. package/dist/qti.context-B8PSyIWm.d.ts +0 -14
  45. /package/dist/{chunk-LQZCSHN5.js.map → chunk-AQ5RJFM6.js.map} +0 -0
  46. /package/dist/{chunk-N7S3GNUP.js.map → chunk-FLJAKWXL.js.map} +0 -0
  47. /package/dist/{chunk-FK2IVMS3.js.map → chunk-MPC7LIPC.js.map} +0 -0
  48. /package/dist/{chunk-YLIYPNMK.js.map → chunk-REI3AMCZ.js.map} +0 -0
  49. /package/dist/{chunk-F6WP6WEF.js.map → chunk-SP6S2WMG.js.map} +0 -0
  50. /package/dist/{chunk-OQ77SE2W.js.map → chunk-WDO2TRFM.js.map} +0 -0
@@ -33,14 +33,14 @@ import type { QtiItem } from "packages/qti-item/src/components/qti-item/qti-item
33
33
  import type { QtiAssessmentItemRef } from "packages/qti-test/src/components/qti-assessment-item-ref/qti-assessment-item-ref.ts";
34
34
  import type { QtiAssessmentSection } from "packages/qti-test/src/components/qti-assessment-section/qti-assessment-section.ts";
35
35
  import type { QtiAssessmentTest } from "packages/qti-test/src/components/qti-assessment-test/qti-assessment-test.ts";
36
+ import type { QtiTestPart } from "packages/qti-test/src/components/qti-test-part/qti-test-part.ts";
37
+ import type { TestNavigation } from "packages/qti-test/src/components/test-navigation/test-navigation.ts";
36
38
  import type {
37
39
  QtiOutcomeProcessing,
38
40
  QtiOutcomeProcessingProcessor,
39
41
  } from "packages/qti-test/src/components/qti-outcome-processing/qti-outcome-processing.ts";
40
42
  import type { QtiTest } from "packages/qti-test/src/components/qti-test/qti-test.ts";
41
- import type { QtiTestPart } from "packages/qti-test/src/components/qti-test-part/qti-test-part.ts";
42
43
  import type { QtiTestFeedback } from "packages/qti-test/src/components/qti-test-feedback/qti-test-feedback.ts";
43
- import type { TestNavigation } from "packages/qti-test/src/components/test-navigation/test-navigation.ts";
44
44
  import type { TestNext } from "packages/qti-test/src/components/test-next/test-next.ts";
45
45
  import type { TestPrev } from "packages/qti-test/src/components/test-prev/test-prev.ts";
46
46
  import type { TestView } from "packages/qti-test/src/components/test-view-toggle/test-view.ts";
@@ -863,6 +863,9 @@ export type QtiItemProps = {
863
863
  computedContext?: QtiItem["computedContext"];
864
864
  /** */
865
865
  configContext?: QtiItem["configContext"];
866
+ /** Provided so that descendants (e.g. `<item-container>`) can read the QTI runtime
867
+ context for standalone item delivery, including the optional shuffle `seed`. */
868
+ qtiContext?: QtiItem["qtiContext"];
866
869
  };
867
870
 
868
871
  export type QtiItemSolidJsProps = {
@@ -870,6 +873,9 @@ export type QtiItemSolidJsProps = {
870
873
  "prop:computedContext"?: QtiItem["computedContext"];
871
874
  /** */
872
875
  "prop:configContext"?: QtiItem["configContext"];
876
+ /** Provided so that descendants (e.g. `<item-container>`) can read the QTI runtime
877
+ context for standalone item delivery, including the optional shuffle `seed`. */
878
+ "prop:qtiContext"?: QtiItem["qtiContext"];
873
879
 
874
880
  /** Set the innerHTML of the element */
875
881
  innerHTML?: string;
@@ -1001,30 +1007,6 @@ export type QtiAssessmentTestSolidJsProps = {
1001
1007
  textContent?: string | number;
1002
1008
  };
1003
1009
 
1004
- export type QtiOutcomeProcessingProps = {};
1005
-
1006
- export type QtiOutcomeProcessingSolidJsProps = {
1007
- /** Set the innerHTML of the element */
1008
- innerHTML?: string;
1009
- /** Set the textContent of the element */
1010
- textContent?: string | number;
1011
- };
1012
-
1013
- export type QtiTestProps = {
1014
- /** */
1015
- "onqti-test-connected"?: (e: CustomEvent) => void;
1016
- };
1017
-
1018
- export type QtiTestSolidJsProps = {
1019
- /** */
1020
- "on:qti-test-connected"?: (e: CustomEvent) => void;
1021
-
1022
- /** Set the innerHTML of the element */
1023
- innerHTML?: string;
1024
- /** Set the textContent of the element */
1025
- textContent?: string | number;
1026
- };
1027
-
1028
1010
  export type QtiTestPartProps = {
1029
1011
  /** */
1030
1012
  identifier?: QtiTestPart["identifier"];
@@ -1069,39 +1051,39 @@ export type QtiTestPartSolidJsProps = {
1069
1051
  textContent?: string | number;
1070
1052
  };
1071
1053
 
1072
- export type QtiTestFeedbackProps = {
1054
+ export type TestNavigationProps = {
1073
1055
  /** */
1074
- "show-hide"?: QtiTestFeedback["showHide"];
1056
+ identifier?: TestNavigation["identifier"];
1075
1057
  /** */
1076
- showHide?: QtiTestFeedback["showHide"];
1058
+ "auto-score-items"?: TestNavigation["autoScoreItems"];
1077
1059
  /** */
1078
- "outcome-identifier"?: QtiTestFeedback["outcomeIdentifier"];
1060
+ autoScoreItems?: TestNavigation["autoScoreItems"];
1079
1061
  /** */
1080
- outcomeIdentifier?: QtiTestFeedback["outcomeIdentifier"];
1062
+ initContext?: TestNavigation["initContext"];
1081
1063
  /** */
1082
- identifier?: QtiTestFeedback["identifier"];
1064
+ qtiContext?: TestNavigation["qtiContext"];
1083
1065
  /** */
1084
- showStatus?: QtiTestFeedback["showStatus"];
1066
+ configContext?: TestNavigation["configContext"];
1085
1067
 
1086
1068
  /** */
1087
- "onqti-register-feedback"?: (e: CustomEvent) => void;
1069
+ "onqti-computed-context-updated"?: (e: CustomEvent) => void;
1088
1070
  };
1089
1071
 
1090
- export type QtiTestFeedbackSolidJsProps = {
1072
+ export type TestNavigationSolidJsProps = {
1091
1073
  /** */
1092
- "attr:show-hide"?: QtiTestFeedback["showHide"];
1074
+ "prop:identifier"?: TestNavigation["identifier"];
1093
1075
  /** */
1094
- "prop:showHide"?: QtiTestFeedback["showHide"];
1076
+ "bool:auto-score-items"?: TestNavigation["autoScoreItems"];
1095
1077
  /** */
1096
- "attr:outcome-identifier"?: QtiTestFeedback["outcomeIdentifier"];
1078
+ "prop:autoScoreItems"?: TestNavigation["autoScoreItems"];
1097
1079
  /** */
1098
- "prop:outcomeIdentifier"?: QtiTestFeedback["outcomeIdentifier"];
1080
+ "prop:initContext"?: TestNavigation["initContext"];
1099
1081
  /** */
1100
- "prop:identifier"?: QtiTestFeedback["identifier"];
1082
+ "prop:qtiContext"?: TestNavigation["qtiContext"];
1101
1083
  /** */
1102
- "prop:showStatus"?: QtiTestFeedback["showStatus"];
1084
+ "prop:configContext"?: TestNavigation["configContext"];
1103
1085
  /** */
1104
- "on:qti-register-feedback"?: (e: CustomEvent) => void;
1086
+ "on:qti-computed-context-updated"?: (e: CustomEvent) => void;
1105
1087
 
1106
1088
  /** Set the innerHTML of the element */
1107
1089
  innerHTML?: string;
@@ -1109,39 +1091,68 @@ export type QtiTestFeedbackSolidJsProps = {
1109
1091
  textContent?: string | number;
1110
1092
  };
1111
1093
 
1112
- export type TestNavigationProps = {
1094
+ export type QtiOutcomeProcessingProps = {};
1095
+
1096
+ export type QtiOutcomeProcessingSolidJsProps = {
1097
+ /** Set the innerHTML of the element */
1098
+ innerHTML?: string;
1099
+ /** Set the textContent of the element */
1100
+ textContent?: string | number;
1101
+ };
1102
+
1103
+ export type QtiTestProps = {
1113
1104
  /** */
1114
- identifier?: TestNavigation["identifier"];
1105
+ configContext?: QtiTest["configContext"];
1106
+
1115
1107
  /** */
1116
- "auto-score-items"?: TestNavigation["autoScoreItems"];
1108
+ "onqti-test-connected"?: (e: CustomEvent) => void;
1109
+ };
1110
+
1111
+ export type QtiTestSolidJsProps = {
1117
1112
  /** */
1118
- autoScoreItems?: TestNavigation["autoScoreItems"];
1113
+ "prop:configContext"?: QtiTest["configContext"];
1119
1114
  /** */
1120
- initContext?: TestNavigation["initContext"];
1115
+ "on:qti-test-connected"?: (e: CustomEvent) => void;
1116
+
1117
+ /** Set the innerHTML of the element */
1118
+ innerHTML?: string;
1119
+ /** Set the textContent of the element */
1120
+ textContent?: string | number;
1121
+ };
1122
+
1123
+ export type QtiTestFeedbackProps = {
1121
1124
  /** */
1122
- qtiContext?: TestNavigation["qtiContext"];
1125
+ "show-hide"?: QtiTestFeedback["showHide"];
1123
1126
  /** */
1124
- configContext?: TestNavigation["configContext"];
1127
+ showHide?: QtiTestFeedback["showHide"];
1128
+ /** */
1129
+ "outcome-identifier"?: QtiTestFeedback["outcomeIdentifier"];
1130
+ /** */
1131
+ outcomeIdentifier?: QtiTestFeedback["outcomeIdentifier"];
1132
+ /** */
1133
+ identifier?: QtiTestFeedback["identifier"];
1134
+ /** */
1135
+ showStatus?: QtiTestFeedback["showStatus"];
1125
1136
 
1126
1137
  /** */
1127
- "onqti-computed-context-updated"?: (e: CustomEvent) => void;
1138
+ "onqti-register-feedback"?: (e: CustomEvent) => void;
1128
1139
  };
1129
1140
 
1130
- export type TestNavigationSolidJsProps = {
1141
+ export type QtiTestFeedbackSolidJsProps = {
1131
1142
  /** */
1132
- "prop:identifier"?: TestNavigation["identifier"];
1143
+ "attr:show-hide"?: QtiTestFeedback["showHide"];
1133
1144
  /** */
1134
- "bool:auto-score-items"?: TestNavigation["autoScoreItems"];
1145
+ "prop:showHide"?: QtiTestFeedback["showHide"];
1135
1146
  /** */
1136
- "prop:autoScoreItems"?: TestNavigation["autoScoreItems"];
1147
+ "attr:outcome-identifier"?: QtiTestFeedback["outcomeIdentifier"];
1137
1148
  /** */
1138
- "prop:initContext"?: TestNavigation["initContext"];
1149
+ "prop:outcomeIdentifier"?: QtiTestFeedback["outcomeIdentifier"];
1139
1150
  /** */
1140
- "prop:qtiContext"?: TestNavigation["qtiContext"];
1151
+ "prop:identifier"?: QtiTestFeedback["identifier"];
1141
1152
  /** */
1142
- "prop:configContext"?: TestNavigation["configContext"];
1153
+ "prop:showStatus"?: QtiTestFeedback["showStatus"];
1143
1154
  /** */
1144
- "on:qti-computed-context-updated"?: (e: CustomEvent) => void;
1155
+ "on:qti-register-feedback"?: (e: CustomEvent) => void;
1145
1156
 
1146
1157
  /** Set the innerHTML of the element */
1147
1158
  innerHTML?: string;
@@ -5613,6 +5624,8 @@ export type CustomElements = {
5613
5624
  *
5614
5625
  * - `computedContext`: undefined (property only)
5615
5626
  * - `configContext`: undefined (property only)
5627
+ * - `qtiContext`: Provided so that descendants (e.g. `<item-container>`) can read the QTI runtime
5628
+ * context for standalone item delivery, including the optional shuffle `seed`. (property only)
5616
5629
  */
5617
5630
  "qti-item": Partial<QtiItemProps & BaseProps<QtiItem> & BaseEvents>;
5618
5631
 
@@ -5689,6 +5702,52 @@ export type CustomElements = {
5689
5702
  QtiAssessmentTestProps & BaseProps<QtiAssessmentTest> & BaseEvents
5690
5703
  >;
5691
5704
 
5705
+ /**
5706
+ *
5707
+ *
5708
+ * ## Attributes & Properties
5709
+ *
5710
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
5711
+ *
5712
+ * - `identifier`: undefined
5713
+ * - `class`: undefined
5714
+ * - `navigation-mode`/`navigationMode`: undefined
5715
+ * - `submission-mode`/`submissionMode`: undefined
5716
+ * - `title`: undefined (property only)
5717
+ *
5718
+ * ## Events
5719
+ *
5720
+ * Events that will be emitted by the component.
5721
+ *
5722
+ * - `qti-test-part-connected`: undefined
5723
+ */
5724
+ "qti-test-part": Partial<
5725
+ QtiTestPartProps & BaseProps<QtiTestPart> & BaseEvents
5726
+ >;
5727
+
5728
+ /**
5729
+ *
5730
+ *
5731
+ * ## Attributes & Properties
5732
+ *
5733
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
5734
+ *
5735
+ * - `identifier`: undefined
5736
+ * - `auto-score-items`/`autoScoreItems`: undefined
5737
+ * - `initContext`: undefined (property only)
5738
+ * - `qtiContext`: undefined (property only)
5739
+ * - `configContext`: undefined (property only)
5740
+ *
5741
+ * ## Events
5742
+ *
5743
+ * Events that will be emitted by the component.
5744
+ *
5745
+ * - `qti-computed-context-updated`: undefined
5746
+ */
5747
+ "test-navigation": Partial<
5748
+ TestNavigationProps & BaseProps<TestNavigation> & BaseEvents
5749
+ >;
5750
+
5692
5751
  /**
5693
5752
  *
5694
5753
  *
@@ -5749,36 +5808,19 @@ export type CustomElements = {
5749
5808
  * You can use normal class names to style the elements.
5750
5809
  * And you can use the `test-prev` and `test-next` elements to navigate through the test.
5751
5810
  *
5752
- * ## Events
5753
- *
5754
- * Events that will be emitted by the component.
5755
- *
5756
- * - `qti-test-connected`: undefined
5757
- */
5758
- "qti-test": Partial<QtiTestProps & BaseProps<QtiTest> & BaseEvents>;
5759
-
5760
- /**
5761
- *
5762
- *
5763
5811
  * ## Attributes & Properties
5764
5812
  *
5765
5813
  * Component attributes and properties that can be applied to the element or by using JavaScript.
5766
5814
  *
5767
- * - `identifier`: undefined
5768
- * - `class`: undefined
5769
- * - `navigation-mode`/`navigationMode`: undefined
5770
- * - `submission-mode`/`submissionMode`: undefined
5771
- * - `title`: undefined (property only)
5815
+ * - `configContext`: undefined (property only)
5772
5816
  *
5773
5817
  * ## Events
5774
5818
  *
5775
5819
  * Events that will be emitted by the component.
5776
5820
  *
5777
- * - `qti-test-part-connected`: undefined
5821
+ * - `qti-test-connected`: undefined
5778
5822
  */
5779
- "qti-test-part": Partial<
5780
- QtiTestPartProps & BaseProps<QtiTestPart> & BaseEvents
5781
- >;
5823
+ "qti-test": Partial<QtiTestProps & BaseProps<QtiTest> & BaseEvents>;
5782
5824
 
5783
5825
  /**
5784
5826
  *
@@ -5810,29 +5852,6 @@ export type CustomElements = {
5810
5852
  QtiTestFeedbackProps & BaseProps<QtiTestFeedback> & BaseEvents
5811
5853
  >;
5812
5854
 
5813
- /**
5814
- *
5815
- *
5816
- * ## Attributes & Properties
5817
- *
5818
- * Component attributes and properties that can be applied to the element or by using JavaScript.
5819
- *
5820
- * - `identifier`: undefined
5821
- * - `auto-score-items`/`autoScoreItems`: undefined
5822
- * - `initContext`: undefined (property only)
5823
- * - `qtiContext`: undefined (property only)
5824
- * - `configContext`: undefined (property only)
5825
- *
5826
- * ## Events
5827
- *
5828
- * Events that will be emitted by the component.
5829
- *
5830
- * - `qti-computed-context-updated`: undefined
5831
- */
5832
- "test-navigation": Partial<
5833
- TestNavigationProps & BaseProps<TestNavigation> & BaseEvents
5834
- >;
5835
-
5836
5855
  /**
5837
5856
  * Represents a custom element for navigating to the next test item.
5838
5857
  *
@@ -9234,6 +9253,8 @@ export type CustomElementsSolidJs = {
9234
9253
  *
9235
9254
  * - `computedContext`: undefined (property only)
9236
9255
  * - `configContext`: undefined (property only)
9256
+ * - `qtiContext`: Provided so that descendants (e.g. `<item-container>`) can read the QTI runtime
9257
+ * context for standalone item delivery, including the optional shuffle `seed`. (property only)
9237
9258
  */
9238
9259
  "qti-item": Partial<
9239
9260
  QtiItemProps & QtiItemSolidJsProps & BaseProps<QtiItem> & BaseEvents
@@ -9321,6 +9342,58 @@ export type CustomElementsSolidJs = {
9321
9342
  BaseEvents
9322
9343
  >;
9323
9344
 
9345
+ /**
9346
+ *
9347
+ *
9348
+ * ## Attributes & Properties
9349
+ *
9350
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
9351
+ *
9352
+ * - `identifier`: undefined
9353
+ * - `class`: undefined
9354
+ * - `navigation-mode`/`navigationMode`: undefined
9355
+ * - `submission-mode`/`submissionMode`: undefined
9356
+ * - `title`: undefined (property only)
9357
+ *
9358
+ * ## Events
9359
+ *
9360
+ * Events that will be emitted by the component.
9361
+ *
9362
+ * - `qti-test-part-connected`: undefined
9363
+ */
9364
+ "qti-test-part": Partial<
9365
+ QtiTestPartProps &
9366
+ QtiTestPartSolidJsProps &
9367
+ BaseProps<QtiTestPart> &
9368
+ BaseEvents
9369
+ >;
9370
+
9371
+ /**
9372
+ *
9373
+ *
9374
+ * ## Attributes & Properties
9375
+ *
9376
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
9377
+ *
9378
+ * - `identifier`: undefined
9379
+ * - `auto-score-items`/`autoScoreItems`: undefined
9380
+ * - `initContext`: undefined (property only)
9381
+ * - `qtiContext`: undefined (property only)
9382
+ * - `configContext`: undefined (property only)
9383
+ *
9384
+ * ## Events
9385
+ *
9386
+ * Events that will be emitted by the component.
9387
+ *
9388
+ * - `qti-computed-context-updated`: undefined
9389
+ */
9390
+ "test-navigation": Partial<
9391
+ TestNavigationProps &
9392
+ TestNavigationSolidJsProps &
9393
+ BaseProps<TestNavigation> &
9394
+ BaseEvents
9395
+ >;
9396
+
9324
9397
  /**
9325
9398
  *
9326
9399
  *
@@ -9384,40 +9457,20 @@ export type CustomElementsSolidJs = {
9384
9457
  * You can use normal class names to style the elements.
9385
9458
  * And you can use the `test-prev` and `test-next` elements to navigate through the test.
9386
9459
  *
9387
- * ## Events
9388
- *
9389
- * Events that will be emitted by the component.
9390
- *
9391
- * - `qti-test-connected`: undefined
9392
- */
9393
- "qti-test": Partial<
9394
- QtiTestProps & QtiTestSolidJsProps & BaseProps<QtiTest> & BaseEvents
9395
- >;
9396
-
9397
- /**
9398
- *
9399
- *
9400
9460
  * ## Attributes & Properties
9401
9461
  *
9402
9462
  * Component attributes and properties that can be applied to the element or by using JavaScript.
9403
9463
  *
9404
- * - `identifier`: undefined
9405
- * - `class`: undefined
9406
- * - `navigation-mode`/`navigationMode`: undefined
9407
- * - `submission-mode`/`submissionMode`: undefined
9408
- * - `title`: undefined (property only)
9464
+ * - `configContext`: undefined (property only)
9409
9465
  *
9410
9466
  * ## Events
9411
9467
  *
9412
9468
  * Events that will be emitted by the component.
9413
9469
  *
9414
- * - `qti-test-part-connected`: undefined
9470
+ * - `qti-test-connected`: undefined
9415
9471
  */
9416
- "qti-test-part": Partial<
9417
- QtiTestPartProps &
9418
- QtiTestPartSolidJsProps &
9419
- BaseProps<QtiTestPart> &
9420
- BaseEvents
9472
+ "qti-test": Partial<
9473
+ QtiTestProps & QtiTestSolidJsProps & BaseProps<QtiTest> & BaseEvents
9421
9474
  >;
9422
9475
 
9423
9476
  /**
@@ -9453,32 +9506,6 @@ export type CustomElementsSolidJs = {
9453
9506
  BaseEvents
9454
9507
  >;
9455
9508
 
9456
- /**
9457
- *
9458
- *
9459
- * ## Attributes & Properties
9460
- *
9461
- * Component attributes and properties that can be applied to the element or by using JavaScript.
9462
- *
9463
- * - `identifier`: undefined
9464
- * - `auto-score-items`/`autoScoreItems`: undefined
9465
- * - `initContext`: undefined (property only)
9466
- * - `qtiContext`: undefined (property only)
9467
- * - `configContext`: undefined (property only)
9468
- *
9469
- * ## Events
9470
- *
9471
- * Events that will be emitted by the component.
9472
- *
9473
- * - `qti-computed-context-updated`: undefined
9474
- */
9475
- "test-navigation": Partial<
9476
- TestNavigationProps &
9477
- TestNavigationSolidJsProps &
9478
- BaseProps<TestNavigation> &
9479
- BaseEvents
9480
- >;
9481
-
9482
9509
  /**
9483
9510
  * Represents a custom element for navigating to the next test item.
9484
9511
  *
@@ -1,6 +1,6 @@
1
1
  import * as lit from 'lit';
2
2
  import { LitElement } from 'lit';
3
- import { Q as QtiContext, a as QtiContextType } from './qti.context-B8PSyIWm.js';
3
+ import { Q as QtiContext, a as QtiContextType } from './qti.context-CejJMlfZ.js';
4
4
  import { f as ResponseVariable, V as VariableDeclaration } from './variables-CMYcDbyW.js';
5
5
  import { I as ItemContext } from './item.context-CkUeDcaO.js';
6
6
 
@@ -13,13 +13,9 @@ interface ModuleResolutionConfig {
13
13
  };
14
14
  };
15
15
  }
16
- type LoadOptions = {
17
- signal?: AbortSignal;
18
- /** Whether to auto-run `shuffleInteractions()` after loading. Defaults to `true` for backwards compatibility. */
19
- shuffle?: boolean;
20
- };
16
+
21
17
  type transformItemApi = {
22
- load: (uri: string, opts?: AbortSignal | LoadOptions) => Promise<transformItemApi>;
18
+ load: (uri: string, signal?: AbortSignal) => Promise<transformItemApi>;
23
19
  parse: (xmlString: string) => transformItemApi;
24
20
  path: (location: string) => transformItemApi;
25
21
  fn: (fn: (xmlFragment: XMLDocument) => void) => transformItemApi;
@@ -29,14 +25,14 @@ type transformItemApi = {
29
25
  extendElementsWithClass: (param?: string) => transformItemApi;
30
26
  customInteraction: (baseRef: string, baseItem: string) => transformItemApi;
31
27
  convertCDATAtoComment: () => transformItemApi;
32
- shuffleInteractions: () => transformItemApi;
28
+ shuffleInteractions: (seed?: string | number | null) => transformItemApi;
33
29
  stripStyleSheets: () => transformItemApi;
34
30
  html: () => string;
35
31
  xml: () => string;
36
32
  htmlDoc: () => DocumentFragment;
37
33
  xmlDoc: () => XMLDocument;
38
34
  };
39
- declare const qtiTransformItem: (cache?: boolean) => transformItemApi;
35
+ declare const qtiTransformItem: () => transformItemApi;
40
36
 
41
37
  /**
42
38
  * Returns an object with methods to load, parse and transform QTI tests.
@@ -53,6 +49,12 @@ type transformTestApi = {
53
49
  parse: (xmlString: string) => transformTestApi;
54
50
  path: (location: string) => transformTestApi;
55
51
  fn: (fn: (xmlFragment: XMLDocument) => void) => transformTestApi;
52
+ /**
53
+ * Deterministically shuffle the children of every section that carries a
54
+ * <qti-ordering shuffle="true">, honoring fixed items and nested
55
+ * keep-together / visible rules. The same seed reproduces the same order.
56
+ */
57
+ shuffleOrdering: (seed?: string | number | null) => transformTestApi;
56
58
  items: () => {
57
59
  identifier: string;
58
60
  href: string;
@@ -65,4 +67,4 @@ type transformTestApi = {
65
67
  };
66
68
  declare const qtiTransformTest: () => transformTestApi;
67
69
 
68
- export { type LoadOptions as L, type ModuleResolutionConfig as M, qtiTransformTest as a, type transformTestApi as b, qtiTransformItem as q, type transformItemApi as t };
70
+ export { type ModuleResolutionConfig as M, qtiTransformTest as a, type transformTestApi as b, qtiTransformItem as q, type transformItemApi as t };
@@ -0,0 +1,50 @@
1
+ /**
2
+ * A validated deterministic shuffle seed.
3
+ *
4
+ * Branded so that only values verified through {@link isSeed} (or constructed via
5
+ * {@link asSeed}) can be assigned where a seed is expected. This prevents arbitrary
6
+ * strings from silently being used as a seed.
7
+ *
8
+ * A usable seed is a non-empty string of letters, digits and hyphens (e.g. a GUID
9
+ * "N" format like `8f14e45fceea167a5a36dedd4bea2543`, or a readable label like
10
+ * `delivery-2026-06-05`). Whitespace and other characters are rejected.
11
+ */
12
+ type Seed = string & {
13
+ readonly __seedBrand: 'Seed';
14
+ };
15
+ /**
16
+ * Runtime type guard that narrows an unknown value to a {@link Seed}.
17
+ * Use this at boundaries (e.g. values coming from XML, a host application or a
18
+ * backend) before treating a string as a seed.
19
+ */
20
+ declare const isSeed: (value: unknown) => value is Seed;
21
+ /**
22
+ * Validates and brands a value as a {@link Seed}, returning `undefined` when the
23
+ * value is missing or not in a usable seed format.
24
+ */
25
+ declare const asSeed: (value: unknown) => Seed | undefined;
26
+ type QtiContextType = {
27
+ testIdentifier: string;
28
+ candidateIdentifier: string;
29
+ environmentIdentifier: string;
30
+ /**
31
+ * Optional deterministic seed for shuffling.
32
+ *
33
+ * When set, it is used to reproduce a stable shuffle order across reloads/restarts:
34
+ * - test ordering in `test-container` (`<qti-ordering shuffle="true">`),
35
+ * - seeded item interaction shuffling in `item-container` and during test navigation.
36
+ *
37
+ * Typically generated once per session by the host/backend and passed in via
38
+ * `QTI_CONTEXT`. When omitted, each item falls back to its own URI-derived seed.
39
+ */
40
+ seed?: Seed;
41
+ [key: string]: string | string[];
42
+ };
43
+ interface QtiContext {
44
+ QTI_CONTEXT: QtiContextType;
45
+ }
46
+ declare const qtiContext: {
47
+ __context__: Readonly<QtiContext>;
48
+ };
49
+
50
+ export { type QtiContext as Q, type Seed as S, type QtiContextType as a, asSeed as b, isSeed as i, qtiContext as q };
package/dist/test.d.ts CHANGED
@@ -6,8 +6,8 @@ import { T as TestContext } from './test.context-CByZZjkR.js';
6
6
  import { g as VariableValue, b as OutcomeVariable, V as VariableDeclaration } from './variables-CMYcDbyW.js';
7
7
  import { S as SessionContext, C as ComputedContext, a as ComputedItem, V as View } from './computed.context-DHbxad0N.js';
8
8
  import { C as ConfigContext } from './config.context-BjZ2bZSY.js';
9
- import { Q as QtiContext } from './qti.context-B8PSyIWm.js';
10
- import { t as transformItemApi, b as transformTestApi } from './qti-transform-test-DMx816H0.js';
9
+ import { Q as QtiContext } from './qti.context-CejJMlfZ.js';
10
+ import { t as transformItemApi, b as transformTestApi } from './qti-transform-test-DoZaWItm.js';
11
11
  import './item.context-CkUeDcaO.js';
12
12
  import './qti-feedback-ChmXhZuf.js';
13
13
  import './qti-rule-base-ajOnfGXY.js';
@@ -51,6 +51,7 @@ declare global {
51
51
  interface TestBaseInterface extends LitElement {
52
52
  testContext: Readonly<TestContext>;
53
53
  sessionContext: Readonly<SessionContext>;
54
+ configContext?: Readonly<ConfigContext>;
54
55
  _testElement: QtiAssessmentTest;
55
56
  updateItemVariables(itemRefID: string, variables: VariableValue<string | string[] | null>[]): void;
56
57
  }
@@ -113,6 +114,7 @@ declare const QtiTest_base: (abstract new (...args: any[]) => {}) & (abstract ne
113
114
  *
114
115
  */
115
116
  declare class QtiTest extends QtiTest_base {
117
+ configContext: ConfigContext;
116
118
  /**
117
119
  * Renders the component's template.
118
120
  * Provides a default `<slot>` for content projection.
@@ -366,6 +368,7 @@ declare class TestContainer extends LitElement {
366
368
  testDoc: DocumentFragment;
367
369
  /** The raw XML string */
368
370
  testXML: string;
371
+ protected qtiContext: QtiContext;
369
372
  /** Callback function to transform the test after loading */
370
373
  protected handleTestURLChange(): Promise<void>;
371
374
  protected handleTestXMLChange(): void;
@@ -519,7 +522,6 @@ interface IMyQtiTest {
519
522
  }
520
523
  interface ITestNavigationMixin {
521
524
  navigate: 'item' | 'section' | null;
522
- cacheTransform: boolean;
523
525
  requestTimeout: number;
524
526
  showLoadingIndicators: boolean;
525
527
  postLoadTransformCallback: PostLoadTransformCallback | null;
package/dist/test.js CHANGED
@@ -23,12 +23,12 @@ import {
23
23
  TestStamp,
24
24
  TestView,
25
25
  TestViewToggle
26
- } from "./chunk-PINGOK2F.js";
27
- import "./chunk-OQ77SE2W.js";
28
- import "./chunk-N7S3GNUP.js";
29
- import "./chunk-LQZCSHN5.js";
30
- import "./chunk-BPIDAS3T.js";
31
- import "./chunk-Z2SUBRH5.js";
26
+ } from "./chunk-HFCZFWSH.js";
27
+ import "./chunk-WDO2TRFM.js";
28
+ import "./chunk-FLJAKWXL.js";
29
+ import "./chunk-AQ5RJFM6.js";
30
+ import "./chunk-3WBG257S.js";
31
+ import "./chunk-3XV26R5M.js";
32
32
  import "./chunk-QXBXORM3.js";
33
33
  export {
34
34
  QtiAssessmentItemRef,
@@ -1,4 +1,4 @@
1
- export { L as LoadOptions, M as ModuleResolutionConfig, q as qtiTransformItem, a as qtiTransformTest, t as transformItemApi, b as transformTestApi } from './qti-transform-test-DMx816H0.js';
1
+ export { M as ModuleResolutionConfig, q as qtiTransformItem, a as qtiTransformTest, t as transformItemApi, b as transformTestApi } from './qti-transform-test-DoZaWItm.js';
2
2
 
3
3
  declare const qtiTransformManifest: () => {
4
4
  load: (uri: string, signal?: AbortSignal) => Promise<{
@@ -2,7 +2,7 @@ import {
2
2
  qtiTransformItem,
3
3
  qtiTransformManifest,
4
4
  qtiTransformTest
5
- } from "./chunk-BPIDAS3T.js";
5
+ } from "./chunk-3WBG257S.js";
6
6
  import "./chunk-QXBXORM3.js";
7
7
  export {
8
8
  qtiTransformItem,