@pie-qti/item-player 0.1.1 → 0.1.5

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 (547) hide show
  1. package/README.md +22 -19
  2. package/dist/catalog/applyGlossaryTriggers.d.ts +15 -0
  3. package/dist/catalog/applyGlossaryTriggers.d.ts.map +1 -0
  4. package/dist/catalog/applyGlossaryTriggers.js +193 -0
  5. package/dist/catalog/catalogExtractor.d.ts +18 -0
  6. package/dist/catalog/catalogExtractor.d.ts.map +1 -0
  7. package/dist/catalog/catalogExtractor.js +114 -0
  8. package/dist/catalog/catalogLookup.d.ts +18 -0
  9. package/dist/catalog/catalogLookup.d.ts.map +1 -0
  10. package/dist/catalog/catalogLookup.js +44 -0
  11. package/dist/catalog/glossaryAction.d.ts +17 -0
  12. package/dist/catalog/glossaryAction.d.ts.map +1 -0
  13. package/dist/catalog/glossaryAction.js +21 -0
  14. package/dist/catalog/types.d.ts +26 -0
  15. package/dist/catalog/types.d.ts.map +1 -0
  16. package/dist/catalog/types.js +6 -0
  17. package/dist/components/actions/typesetAction.d.ts +24 -0
  18. package/dist/components/actions/typesetAction.d.ts.map +1 -0
  19. package/dist/components/actions/typesetAction.js +59 -0
  20. package/dist/components/utils/assignProps.d.ts +2 -0
  21. package/dist/components/utils/assignProps.d.ts.map +1 -0
  22. package/dist/components/utils/assignProps.js +1 -0
  23. package/dist/components/utils/feedbackUtils.d.ts +73 -0
  24. package/dist/components/utils/feedbackUtils.d.ts.map +1 -0
  25. package/dist/components/utils/feedbackUtils.js +93 -0
  26. package/dist/components/utils/index.d.ts +6 -0
  27. package/dist/components/utils/index.d.ts.map +1 -0
  28. package/dist/components/utils/index.js +5 -0
  29. package/dist/core/ComponentRegistry.d.ts +128 -0
  30. package/dist/core/ComponentRegistry.d.ts.map +1 -0
  31. package/dist/core/ComponentRegistry.js +137 -0
  32. package/dist/core/ItemRenderer.d.ts +91 -0
  33. package/dist/core/ItemRenderer.d.ts.map +1 -0
  34. package/dist/core/ItemRenderer.js +261 -0
  35. package/dist/core/Player.d.ts +195 -0
  36. package/dist/core/Player.d.ts.map +1 -0
  37. package/dist/core/Player.js +1235 -0
  38. package/dist/core/Plugin.d.ts +105 -0
  39. package/dist/core/Plugin.d.ts.map +1 -0
  40. package/dist/core/Plugin.js +7 -0
  41. package/dist/core/PluginManager.d.ts +56 -0
  42. package/dist/core/PluginManager.d.ts.map +1 -0
  43. package/dist/core/PluginManager.js +147 -0
  44. package/dist/core/constants.d.ts +68 -0
  45. package/dist/core/constants.d.ts.map +1 -0
  46. package/dist/core/constants.js +106 -0
  47. package/dist/core/declarations.d.ts +45 -0
  48. package/dist/core/declarations.d.ts.map +1 -0
  49. package/dist/core/declarations.js +133 -0
  50. package/dist/core/parsingLimits.d.ts +12 -0
  51. package/dist/core/parsingLimits.d.ts.map +1 -0
  52. package/dist/core/parsingLimits.js +45 -0
  53. package/dist/core/random.d.ts +12 -0
  54. package/dist/core/random.d.ts.map +1 -0
  55. package/dist/core/random.js +21 -0
  56. package/dist/core/rolePolicy.d.ts +16 -0
  57. package/dist/core/rolePolicy.d.ts.map +1 -0
  58. package/dist/core/rolePolicy.js +15 -0
  59. package/dist/core/sanitizer.d.ts +34 -0
  60. package/dist/core/sanitizer.d.ts.map +1 -0
  61. package/dist/core/sanitizer.js +198 -0
  62. package/dist/core/trustedTypes.d.ts +16 -0
  63. package/dist/core/trustedTypes.d.ts.map +1 -0
  64. package/dist/core/trustedTypes.js +55 -0
  65. package/dist/core/urlPolicy.d.ts +8 -0
  66. package/dist/core/urlPolicy.d.ts.map +1 -0
  67. package/dist/core/urlPolicy.js +90 -0
  68. package/dist/element.d.ts +22 -0
  69. package/dist/element.js +5327 -0
  70. package/dist/element.js.map +1 -0
  71. package/dist/extensions/MathLiveEditor.d.ts +32 -0
  72. package/dist/extensions/MathLiveEditor.d.ts.map +1 -0
  73. package/dist/extensions/MathLiveEditor.js +249 -0
  74. package/dist/extraction/ExtractionRegistry.d.ts +112 -0
  75. package/dist/extraction/ExtractionRegistry.d.ts.map +1 -0
  76. package/dist/extraction/ExtractionRegistry.js +260 -0
  77. package/dist/extraction/createContext.d.ts +30 -0
  78. package/dist/extraction/createContext.d.ts.map +1 -0
  79. package/dist/extraction/createContext.js +39 -0
  80. package/dist/extraction/extractors/associateExtractor.d.ts +29 -0
  81. package/dist/extraction/extractors/associateExtractor.d.ts.map +1 -0
  82. package/dist/extraction/extractors/associateExtractor.js +97 -0
  83. package/dist/extraction/extractors/choiceExtractor.d.ts +27 -0
  84. package/dist/extraction/extractors/choiceExtractor.d.ts.map +1 -0
  85. package/dist/extraction/extractors/choiceExtractor.js +93 -0
  86. package/dist/extraction/extractors/customExtractor.d.ts +20 -0
  87. package/dist/extraction/extractors/customExtractor.d.ts.map +1 -0
  88. package/dist/extraction/extractors/customExtractor.js +51 -0
  89. package/dist/extraction/extractors/drawingExtractor.d.ts +30 -0
  90. package/dist/extraction/extractors/drawingExtractor.d.ts.map +1 -0
  91. package/dist/extraction/extractors/drawingExtractor.js +78 -0
  92. package/dist/extraction/extractors/endAttemptExtractor.d.ts +20 -0
  93. package/dist/extraction/extractors/endAttemptExtractor.d.ts.map +1 -0
  94. package/dist/extraction/extractors/endAttemptExtractor.js +53 -0
  95. package/dist/extraction/extractors/extendedTextExtractor.d.ts +21 -0
  96. package/dist/extraction/extractors/extendedTextExtractor.d.ts.map +1 -0
  97. package/dist/extraction/extractors/extendedTextExtractor.js +63 -0
  98. package/dist/extraction/extractors/gapMatchExtractor.d.ts +29 -0
  99. package/dist/extraction/extractors/gapMatchExtractor.d.ts.map +1 -0
  100. package/dist/extraction/extractors/gapMatchExtractor.js +155 -0
  101. package/dist/extraction/extractors/graphicAssociateExtractor.d.ts +41 -0
  102. package/dist/extraction/extractors/graphicAssociateExtractor.d.ts.map +1 -0
  103. package/dist/extraction/extractors/graphicAssociateExtractor.js +143 -0
  104. package/dist/extraction/extractors/graphicGapMatchExtractor.d.ts +53 -0
  105. package/dist/extraction/extractors/graphicGapMatchExtractor.d.ts.map +1 -0
  106. package/dist/extraction/extractors/graphicGapMatchExtractor.js +205 -0
  107. package/dist/extraction/extractors/graphicOrderExtractor.d.ts +37 -0
  108. package/dist/extraction/extractors/graphicOrderExtractor.d.ts.map +1 -0
  109. package/dist/extraction/extractors/graphicOrderExtractor.js +121 -0
  110. package/dist/extraction/extractors/hotspotExtractor.d.ts +38 -0
  111. package/dist/extraction/extractors/hotspotExtractor.d.ts.map +1 -0
  112. package/dist/extraction/extractors/hotspotExtractor.js +159 -0
  113. package/dist/extraction/extractors/hottextExtractor.d.ts +26 -0
  114. package/dist/extraction/extractors/hottextExtractor.d.ts.map +1 -0
  115. package/dist/extraction/extractors/hottextExtractor.js +128 -0
  116. package/dist/extraction/extractors/index.d.ts +63 -0
  117. package/dist/extraction/extractors/index.d.ts.map +1 -0
  118. package/dist/extraction/extractors/index.js +88 -0
  119. package/dist/extraction/extractors/inlineChoiceExtractor.d.ts +25 -0
  120. package/dist/extraction/extractors/inlineChoiceExtractor.d.ts.map +1 -0
  121. package/dist/extraction/extractors/inlineChoiceExtractor.js +80 -0
  122. package/dist/extraction/extractors/matchExtractor.d.ts +37 -0
  123. package/dist/extraction/extractors/matchExtractor.d.ts.map +1 -0
  124. package/dist/extraction/extractors/matchExtractor.js +160 -0
  125. package/dist/extraction/extractors/mediaExtractor.d.ts +33 -0
  126. package/dist/extraction/extractors/mediaExtractor.d.ts.map +1 -0
  127. package/dist/extraction/extractors/mediaExtractor.js +125 -0
  128. package/dist/extraction/extractors/orderExtractor.d.ts +28 -0
  129. package/dist/extraction/extractors/orderExtractor.d.ts.map +1 -0
  130. package/dist/extraction/extractors/orderExtractor.js +90 -0
  131. package/dist/extraction/extractors/portableCustomExtractor.d.ts +14 -0
  132. package/dist/extraction/extractors/portableCustomExtractor.d.ts.map +1 -0
  133. package/dist/extraction/extractors/portableCustomExtractor.js +96 -0
  134. package/dist/extraction/extractors/positionObjectExtractor.d.ts +59 -0
  135. package/dist/extraction/extractors/positionObjectExtractor.d.ts.map +1 -0
  136. package/dist/extraction/extractors/positionObjectExtractor.js +191 -0
  137. package/dist/extraction/extractors/selectPointExtractor.d.ts +31 -0
  138. package/dist/extraction/extractors/selectPointExtractor.d.ts.map +1 -0
  139. package/dist/extraction/extractors/selectPointExtractor.js +109 -0
  140. package/dist/extraction/extractors/sliderExtractor.d.ts +24 -0
  141. package/dist/extraction/extractors/sliderExtractor.d.ts.map +1 -0
  142. package/dist/extraction/extractors/sliderExtractor.js +73 -0
  143. package/dist/extraction/extractors/textEntryExtractor.d.ts +21 -0
  144. package/dist/extraction/extractors/textEntryExtractor.d.ts.map +1 -0
  145. package/dist/extraction/extractors/textEntryExtractor.js +54 -0
  146. package/dist/extraction/extractors/uploadExtractor.d.ts +20 -0
  147. package/dist/extraction/extractors/uploadExtractor.d.ts.map +1 -0
  148. package/dist/extraction/extractors/uploadExtractor.js +59 -0
  149. package/dist/extraction/index.d.ts +49 -0
  150. package/dist/extraction/index.d.ts.map +1 -0
  151. package/dist/extraction/index.js +49 -0
  152. package/dist/extraction/types.d.ts +209 -0
  153. package/dist/extraction/types.d.ts.map +1 -0
  154. package/dist/extraction/types.js +30 -0
  155. package/dist/extraction/utils.d.ts +15 -0
  156. package/dist/extraction/utils.d.ts.map +1 -0
  157. package/dist/extraction/utils.js +178 -0
  158. package/dist/iframe/IFramePlayerHost.d.ts +122 -0
  159. package/dist/iframe/IFramePlayerHost.d.ts.map +1 -0
  160. package/dist/iframe/IFramePlayerHost.js +172 -0
  161. package/dist/iframe/index.d.ts +9 -0
  162. package/dist/iframe/index.d.ts.map +1 -0
  163. package/dist/iframe/index.js +8 -0
  164. package/dist/iframe/protocol.d.ts +75 -0
  165. package/dist/iframe/protocol.d.ts.map +1 -0
  166. package/dist/iframe/protocol.js +53 -0
  167. package/dist/index.d.ts +38 -0
  168. package/dist/index.d.ts.map +1 -0
  169. package/dist/index.js +42 -0
  170. package/dist/pci/PciHost.d.ts +53 -0
  171. package/dist/pci/PciHost.d.ts.map +1 -0
  172. package/dist/pci/PciHost.js +116 -0
  173. package/dist/pci/types.d.ts +57 -0
  174. package/dist/pci/types.d.ts.map +1 -0
  175. package/dist/pci/types.js +19 -0
  176. package/dist/pnp/applyPnp.d.ts +9 -0
  177. package/dist/pnp/applyPnp.d.ts.map +1 -0
  178. package/dist/pnp/applyPnp.js +19 -0
  179. package/dist/pnp/parsePnpXml.d.ts +9 -0
  180. package/dist/pnp/parsePnpXml.d.ts.map +1 -0
  181. package/dist/pnp/parsePnpXml.js +101 -0
  182. package/dist/pnp/types.d.ts +40 -0
  183. package/dist/pnp/types.d.ts.map +1 -0
  184. package/dist/pnp/types.js +1 -0
  185. package/dist/server.d.ts +10 -0
  186. package/dist/server.d.ts.map +1 -0
  187. package/dist/server.js +10 -0
  188. package/dist/types/index.d.ts +304 -0
  189. package/dist/types/index.d.ts.map +1 -0
  190. package/dist/types/index.js +7 -0
  191. package/dist/types/interactions.d.ts +412 -0
  192. package/dist/types/interactions.d.ts.map +1 -0
  193. package/dist/types/interactions.js +7 -0
  194. package/dist/types/responseValidation.d.ts +25 -0
  195. package/dist/types/responseValidation.d.ts.map +1 -0
  196. package/dist/types/responseValidation.js +1 -0
  197. package/dist/utils/PerformanceMonitor.d.ts +170 -0
  198. package/dist/utils/PerformanceMonitor.d.ts.map +1 -0
  199. package/dist/utils/PerformanceMonitor.js +242 -0
  200. package/dist/utils/drawingUtils.d.ts +39 -0
  201. package/dist/utils/drawingUtils.d.ts.map +1 -0
  202. package/dist/utils/drawingUtils.js +57 -0
  203. package/dist/utils/responseUtils.d.ts +16 -0
  204. package/dist/utils/responseUtils.d.ts.map +1 -0
  205. package/dist/utils/responseUtils.js +45 -0
  206. package/dist/utils/touchDragHelper.d.ts +2 -0
  207. package/dist/utils/touchDragHelper.d.ts.map +1 -0
  208. package/dist/utils/touchDragHelper.js +1 -0
  209. package/dist/web-components/QTIInteractionBase.d.ts +120 -0
  210. package/dist/web-components/QTIInteractionBase.d.ts.map +1 -0
  211. package/dist/web-components/QTIInteractionBase.js +243 -0
  212. package/dist/web-components/QTIInteractionElement.d.ts +77 -0
  213. package/dist/web-components/QTIInteractionElement.d.ts.map +1 -0
  214. package/dist/web-components/QTIInteractionElement.js +61 -0
  215. package/dist/web-components/index.d.ts +8 -0
  216. package/dist/web-components/index.d.ts.map +1 -0
  217. package/dist/web-components/index.js +10 -0
  218. package/package.json +104 -76
  219. package/src/__tests__/catalog.test.ts +267 -0
  220. package/src/__tests__/fixtures/pci/echo-pci.js +49 -0
  221. package/src/__tests__/glossaryTriggers.test.ts +411 -0
  222. package/src/__tests__/pci.test.ts +353 -0
  223. package/src/__tests__/pnp.test.ts +250 -0
  224. package/src/__tests__/qti3-attribute-extraction.test.ts +174 -0
  225. package/src/__tests__/qti3-debug.test.ts +140 -0
  226. package/src/__tests__/qti3-extraction.test.ts +309 -0
  227. package/src/catalog/applyGlossaryTriggers.ts +232 -0
  228. package/src/catalog/catalogExtractor.ts +130 -0
  229. package/src/catalog/catalogLookup.ts +53 -0
  230. package/src/catalog/glossaryAction.ts +28 -0
  231. package/src/catalog/types.ts +37 -0
  232. package/src/components/ItemBody.svelte +136 -26
  233. package/src/components/ItemPlayer.svelte +6 -2
  234. package/src/components/index.ts +3 -0
  235. package/src/components/utils/assignProps.ts +1 -23
  236. package/src/core/ComponentRegistry.ts +14 -0
  237. package/src/core/ItemRenderer.ts +4 -0
  238. package/src/core/Player.ts +312 -38
  239. package/src/core/parsingLimits.ts +1 -1
  240. package/src/core/rolePolicy.ts +34 -0
  241. package/src/core/urlPolicy.ts +5 -2
  242. package/src/element.ts +128 -0
  243. package/src/extensions/MathLiveEditor.ts +6 -3
  244. package/src/extraction/ExtractionRegistry.ts +51 -11
  245. package/src/extraction/createContext.ts +6 -1
  246. package/src/extraction/extractors/associateExtractor.ts +4 -0
  247. package/src/extraction/extractors/choiceExtractor.ts +12 -1
  248. package/src/extraction/extractors/conformance-qti3-advanced.test.ts +239 -0
  249. package/src/extraction/extractors/conformance-qti3-basic.test.ts +82 -0
  250. package/src/extraction/extractors/conformance.test.ts +208 -0
  251. package/src/extraction/extractors/extendedTextExtractor.ts +11 -2
  252. package/src/extraction/extractors/gapMatchExtractor.ts +36 -21
  253. package/src/extraction/extractors/graphicAssociateExtractor.ts +4 -0
  254. package/src/extraction/extractors/graphicGapMatchExtractor.ts +82 -10
  255. package/src/extraction/extractors/hotspotExtractor.ts +26 -8
  256. package/src/extraction/extractors/hottextExtractor.ts +15 -5
  257. package/src/extraction/extractors/index.ts +4 -0
  258. package/src/extraction/extractors/inlineChoiceExtractor.ts +22 -5
  259. package/src/extraction/extractors/matchExtractor.ts +33 -6
  260. package/src/extraction/extractors/orderExtractor.ts +6 -0
  261. package/src/extraction/extractors/portableCustomExtractor.ts +122 -0
  262. package/src/extraction/extractors/selectPointExtractor.ts +5 -5
  263. package/src/extraction/extractors/textEntryExtractor.ts +11 -2
  264. package/src/extraction/extractors/uploadExtractor.ts +10 -2
  265. package/src/extraction/utils.ts +99 -16
  266. package/src/index.ts +19 -1
  267. package/src/pci/PciHost.ts +138 -0
  268. package/src/pci/types.ts +70 -0
  269. package/src/pnp/applyPnp.ts +23 -0
  270. package/src/pnp/parsePnpXml.ts +118 -0
  271. package/src/pnp/types.ts +33 -0
  272. package/src/types/index.ts +50 -16
  273. package/src/types/interactions.ts +81 -6
  274. package/src/types/xmldom.d.ts +12 -0
  275. package/src/utils/drawingUtils.ts +73 -0
  276. package/src/utils/touchDragHelper.ts +1 -211
  277. package/.turbo/turbo-build.log +0 -1
  278. package/CHANGELOG.md +0 -9
  279. package/docs/QTI-COMPLIANCE.md +0 -197
  280. package/docs/WCAG-2.2-COMPLIANCE.md +0 -466
  281. package/docs/custom-extractors.md +0 -679
  282. package/docs/iframe-mode.md +0 -78
  283. package/docs/security-audit.md +0 -236
  284. package/docs/server-api.md +0 -691
  285. package/tests/conformance/FIXTURE_POLICY.md +0 -29
  286. package/tests/conformance/README.md +0 -70
  287. package/tests/conformance/fixtures/baseTypes_all/cases.json +0 -61
  288. package/tests/conformance/fixtures/baseTypes_all/item.xml +0 -131
  289. package/tests/conformance/fixtures/baseTypes_all/manifest.json +0 -7
  290. package/tests/conformance/fixtures/choice_match_correct/cases.json +0 -17
  291. package/tests/conformance/fixtures/choice_match_correct/item.xml +0 -55
  292. package/tests/conformance/fixtures/choice_match_correct/manifest.json +0 -14
  293. package/tests/conformance/fixtures/contains_multiple/cases.json +0 -12
  294. package/tests/conformance/fixtures/contains_multiple/item.xml +0 -37
  295. package/tests/conformance/fixtures/contains_multiple/manifest.json +0 -13
  296. package/tests/conformance/fixtures/isNull_isNotNull/cases.json +0 -9
  297. package/tests/conformance/fixtures/isNull_isNotNull/item.xml +0 -41
  298. package/tests/conformance/fixtures/isNull_isNotNull/manifest.json +0 -23
  299. package/tests/conformance/fixtures/mapResponse_bounds_default_duplicates/cases.json +0 -27
  300. package/tests/conformance/fixtures/mapResponse_bounds_default_duplicates/item.xml +0 -30
  301. package/tests/conformance/fixtures/mapResponse_bounds_default_duplicates/manifest.json +0 -15
  302. package/tests/conformance/fixtures/mapResponse_integer_mapKey/cases.json +0 -11
  303. package/tests/conformance/fixtures/mapResponse_integer_mapKey/item.xml +0 -26
  304. package/tests/conformance/fixtures/mapResponse_integer_mapKey/manifest.json +0 -13
  305. package/tests/conformance/fixtures/mapResponse_mapEntry_caseSensitive_override/cases.json +0 -27
  306. package/tests/conformance/fixtures/mapResponse_mapEntry_caseSensitive_override/item.xml +0 -32
  307. package/tests/conformance/fixtures/mapResponse_mapEntry_caseSensitive_override/manifest.json +0 -7
  308. package/tests/conformance/fixtures/mapResponse_mapping_caseSensitive_defaultValue/cases.json +0 -9
  309. package/tests/conformance/fixtures/mapResponse_mapping_caseSensitive_defaultValue/item.xml +0 -25
  310. package/tests/conformance/fixtures/mapResponse_mapping_caseSensitive_defaultValue/manifest.json +0 -12
  311. package/tests/conformance/fixtures/mapResponse_multiple_cardinality/cases.json +0 -12
  312. package/tests/conformance/fixtures/mapResponse_multiple_cardinality/item.xml +0 -35
  313. package/tests/conformance/fixtures/mapResponse_multiple_cardinality/manifest.json +0 -11
  314. package/tests/conformance/fixtures/mapping_bounds_upperLower/cases.json +0 -12
  315. package/tests/conformance/fixtures/mapping_bounds_upperLower/item.xml +0 -37
  316. package/tests/conformance/fixtures/mapping_bounds_upperLower/manifest.json +0 -11
  317. package/tests/conformance/fixtures/mapping_mapResponse/cases.json +0 -22
  318. package/tests/conformance/fixtures/mapping_mapResponse/item.xml +0 -53
  319. package/tests/conformance/fixtures/mapping_mapResponse/manifest.json +0 -16
  320. package/tests/conformance/fixtures/member_multiple/cases.json +0 -12
  321. package/tests/conformance/fixtures/member_multiple/item.xml +0 -37
  322. package/tests/conformance/fixtures/member_multiple/manifest.json +0 -13
  323. package/tests/conformance/fixtures/modalFeedback_basic/cases.json +0 -17
  324. package/tests/conformance/fixtures/modalFeedback_basic/item.xml +0 -52
  325. package/tests/conformance/fixtures/modalFeedback_basic/manifest.json +0 -13
  326. package/tests/conformance/fixtures/multiple_unordered_match/cases.json +0 -17
  327. package/tests/conformance/fixtures/multiple_unordered_match/item.xml +0 -44
  328. package/tests/conformance/fixtures/multiple_unordered_match/manifest.json +0 -11
  329. package/tests/conformance/fixtures/ordered_match/cases.json +0 -17
  330. package/tests/conformance/fixtures/ordered_match/item.xml +0 -48
  331. package/tests/conformance/fixtures/ordered_match/manifest.json +0 -13
  332. package/tests/conformance/fixtures/outcomeProcessing_derive_percent_passfail/cases.json +0 -27
  333. package/tests/conformance/fixtures/outcomeProcessing_derive_percent_passfail/item.xml +0 -103
  334. package/tests/conformance/fixtures/outcomeProcessing_derive_percent_passfail/manifest.json +0 -7
  335. package/tests/conformance/fixtures/outcomeProcessing_exitTest/cases.json +0 -15
  336. package/tests/conformance/fixtures/outcomeProcessing_exitTest/item.xml +0 -33
  337. package/tests/conformance/fixtures/outcomeProcessing_exitTest/manifest.json +0 -10
  338. package/tests/conformance/fixtures/outcomeProcessing_numberExpressions/cases.json +0 -14
  339. package/tests/conformance/fixtures/outcomeProcessing_numberExpressions/item.xml +0 -26
  340. package/tests/conformance/fixtures/outcomeProcessing_numberExpressions/manifest.json +0 -8
  341. package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_equal/cases.json +0 -17
  342. package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_equal/item.xml +0 -43
  343. package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_equal/manifest.json +0 -16
  344. package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_toBoolean/cases.json +0 -27
  345. package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_toBoolean/item.xml +0 -37
  346. package/tests/conformance/fixtures/outcomeProcessing_outcomeCondition_toBoolean/manifest.json +0 -16
  347. package/tests/conformance/fixtures/outcomeProcessing_outcomeMaximum/cases.json +0 -14
  348. package/tests/conformance/fixtures/outcomeProcessing_outcomeMaximum/item.xml +0 -35
  349. package/tests/conformance/fixtures/outcomeProcessing_outcomeMaximum/manifest.json +0 -8
  350. package/tests/conformance/fixtures/outcomeProcessing_outcomeMinimum/cases.json +0 -14
  351. package/tests/conformance/fixtures/outcomeProcessing_outcomeMinimum/item.xml +0 -35
  352. package/tests/conformance/fixtures/outcomeProcessing_outcomeMinimum/manifest.json +0 -8
  353. package/tests/conformance/fixtures/outcomeProcessing_outcomeProcessingFragment/cases.json +0 -15
  354. package/tests/conformance/fixtures/outcomeProcessing_outcomeProcessingFragment/item.xml +0 -39
  355. package/tests/conformance/fixtures/outcomeProcessing_outcomeProcessingFragment/manifest.json +0 -11
  356. package/tests/conformance/fixtures/outcomeProcessing_testVariables/cases.json +0 -14
  357. package/tests/conformance/fixtures/outcomeProcessing_testVariables/item.xml +0 -35
  358. package/tests/conformance/fixtures/outcomeProcessing_testVariables/manifest.json +0 -8
  359. package/tests/conformance/fixtures/pair_unordered_match/cases.json +0 -22
  360. package/tests/conformance/fixtures/pair_unordered_match/item.xml +0 -44
  361. package/tests/conformance/fixtures/pair_unordered_match/manifest.json +0 -13
  362. package/tests/conformance/fixtures/positionObject_coordinateSystem_aspectRatio/cases.json +0 -95
  363. package/tests/conformance/fixtures/positionObject_coordinateSystem_aspectRatio/item.xml +0 -53
  364. package/tests/conformance/fixtures/positionObject_mapResponsePoint_scoring/cases.json +0 -115
  365. package/tests/conformance/fixtures/positionObject_mapResponsePoint_scoring/item.xml +0 -45
  366. package/tests/conformance/fixtures/positionObject_mapResponse_wrong/cases.json +0 -29
  367. package/tests/conformance/fixtures/positionObject_mapResponse_wrong/item.xml +0 -40
  368. package/tests/conformance/fixtures/responseCondition_elseIf_chain/cases.json +0 -10
  369. package/tests/conformance/fixtures/responseCondition_elseIf_chain/item.xml +0 -49
  370. package/tests/conformance/fixtures/responseCondition_elseIf_chain/manifest.json +0 -15
  371. package/tests/conformance/fixtures/responseProcessing_anyN/cases.json +0 -27
  372. package/tests/conformance/fixtures/responseProcessing_anyN/item.xml +0 -47
  373. package/tests/conformance/fixtures/responseProcessing_anyN/manifest.json +0 -16
  374. package/tests/conformance/fixtures/responseProcessing_anyN_allN/cases.json +0 -27
  375. package/tests/conformance/fixtures/responseProcessing_anyN_allN/item.xml +0 -69
  376. package/tests/conformance/fixtures/responseProcessing_anyN_allN/manifest.json +0 -23
  377. package/tests/conformance/fixtures/responseProcessing_arithmetic_nulls/cases.json +0 -15
  378. package/tests/conformance/fixtures/responseProcessing_arithmetic_nulls/item.xml +0 -58
  379. package/tests/conformance/fixtures/responseProcessing_arithmetic_nulls/manifest.json +0 -15
  380. package/tests/conformance/fixtures/responseProcessing_boolean_compare_ops/cases.json +0 -37
  381. package/tests/conformance/fixtures/responseProcessing_boolean_compare_ops/item.xml +0 -94
  382. package/tests/conformance/fixtures/responseProcessing_boolean_compare_ops/manifest.json +0 -27
  383. package/tests/conformance/fixtures/responseProcessing_containerSize_index/cases.json +0 -33
  384. package/tests/conformance/fixtures/responseProcessing_containerSize_index/item.xml +0 -79
  385. package/tests/conformance/fixtures/responseProcessing_containerSize_index/manifest.json +0 -16
  386. package/tests/conformance/fixtures/responseProcessing_customOperator/cases.json +0 -15
  387. package/tests/conformance/fixtures/responseProcessing_customOperator/item.xml +0 -30
  388. package/tests/conformance/fixtures/responseProcessing_customOperator/manifest.json +0 -12
  389. package/tests/conformance/fixtures/responseProcessing_default_expression/cases.json +0 -12
  390. package/tests/conformance/fixtures/responseProcessing_default_expression/item.xml +0 -48
  391. package/tests/conformance/fixtures/responseProcessing_default_expression/manifest.json +0 -13
  392. package/tests/conformance/fixtures/responseProcessing_deleteValue_repeat/cases.json +0 -29
  393. package/tests/conformance/fixtures/responseProcessing_deleteValue_repeat/item.xml +0 -68
  394. package/tests/conformance/fixtures/responseProcessing_deleteValue_repeat/manifest.json +0 -17
  395. package/tests/conformance/fixtures/responseProcessing_equalRounded_tolerance/cases.json +0 -39
  396. package/tests/conformance/fixtures/responseProcessing_equalRounded_tolerance/item.xml +0 -39
  397. package/tests/conformance/fixtures/responseProcessing_equalRounded_tolerance/manifest.json +0 -17
  398. package/tests/conformance/fixtures/responseProcessing_exitResponse/cases.json +0 -12
  399. package/tests/conformance/fixtures/responseProcessing_exitResponse/item.xml +0 -25
  400. package/tests/conformance/fixtures/responseProcessing_exitResponse/manifest.json +0 -12
  401. package/tests/conformance/fixtures/responseProcessing_inside_duration_statsOperator/cases.json +0 -26
  402. package/tests/conformance/fixtures/responseProcessing_inside_duration_statsOperator/item.xml +0 -134
  403. package/tests/conformance/fixtures/responseProcessing_inside_duration_statsOperator/manifest.json +0 -16
  404. package/tests/conformance/fixtures/responseProcessing_lookupTable_interpolationTable/cases.json +0 -27
  405. package/tests/conformance/fixtures/responseProcessing_lookupTable_interpolationTable/item.xml +0 -33
  406. package/tests/conformance/fixtures/responseProcessing_lookupTable_interpolationTable/manifest.json +0 -13
  407. package/tests/conformance/fixtures/responseProcessing_lookupTable_matchTable/cases.json +0 -22
  408. package/tests/conformance/fixtures/responseProcessing_lookupTable_matchTable/item.xml +0 -33
  409. package/tests/conformance/fixtures/responseProcessing_lookupTable_matchTable/manifest.json +0 -13
  410. package/tests/conformance/fixtures/responseProcessing_mapOutcome_basic/cases.json +0 -27
  411. package/tests/conformance/fixtures/responseProcessing_mapOutcome_basic/item.xml +0 -40
  412. package/tests/conformance/fixtures/responseProcessing_mapOutcome_basic/manifest.json +0 -18
  413. package/tests/conformance/fixtures/responseProcessing_mapResponsePoint_basic/cases.json +0 -22
  414. package/tests/conformance/fixtures/responseProcessing_mapResponsePoint_basic/item.xml +0 -33
  415. package/tests/conformance/fixtures/responseProcessing_mapResponsePoint_basic/manifest.json +0 -12
  416. package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_ordered/cases.json +0 -29
  417. package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_ordered/item.xml +0 -26
  418. package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_ordered/manifest.json +0 -7
  419. package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_whitespace/cases.json +0 -23
  420. package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_whitespace/item.xml +0 -28
  421. package/tests/conformance/fixtures/responseProcessing_mapResponse_directedPair_whitespace/manifest.json +0 -11
  422. package/tests/conformance/fixtures/responseProcessing_mapResponse_pair_unordered/cases.json +0 -29
  423. package/tests/conformance/fixtures/responseProcessing_mapResponse_pair_unordered/item.xml +0 -26
  424. package/tests/conformance/fixtures/responseProcessing_mapResponse_pair_unordered/manifest.json +0 -7
  425. package/tests/conformance/fixtures/responseProcessing_mathOperator_integerUtils/cases.json +0 -31
  426. package/tests/conformance/fixtures/responseProcessing_mathOperator_integerUtils/item.xml +0 -102
  427. package/tests/conformance/fixtures/responseProcessing_mathOperator_integerUtils/manifest.json +0 -18
  428. package/tests/conformance/fixtures/responseProcessing_math_max_min_round_truncate/cases.json +0 -22
  429. package/tests/conformance/fixtures/responseProcessing_math_max_min_round_truncate/item.xml +0 -45
  430. package/tests/conformance/fixtures/responseProcessing_math_max_min_round_truncate/manifest.json +0 -21
  431. package/tests/conformance/fixtures/responseProcessing_misc_math_string_stats/cases.json +0 -26
  432. package/tests/conformance/fixtures/responseProcessing_misc_math_string_stats/item.xml +0 -157
  433. package/tests/conformance/fixtures/responseProcessing_misc_math_string_stats/manifest.json +0 -22
  434. package/tests/conformance/fixtures/responseProcessing_notEqual_basic/cases.json +0 -22
  435. package/tests/conformance/fixtures/responseProcessing_notEqual_basic/item.xml +0 -39
  436. package/tests/conformance/fixtures/responseProcessing_notEqual_basic/manifest.json +0 -18
  437. package/tests/conformance/fixtures/responseProcessing_patternMatch_caseSensitive/cases.json +0 -22
  438. package/tests/conformance/fixtures/responseProcessing_patternMatch_caseSensitive/item.xml +0 -51
  439. package/tests/conformance/fixtures/responseProcessing_patternMatch_caseSensitive/manifest.json +0 -19
  440. package/tests/conformance/fixtures/responseProcessing_preCondition/cases.json +0 -31
  441. package/tests/conformance/fixtures/responseProcessing_preCondition/item.xml +0 -44
  442. package/tests/conformance/fixtures/responseProcessing_preCondition/manifest.json +0 -12
  443. package/tests/conformance/fixtures/responseProcessing_random_lookupOutcomeValue/cases.json +0 -27
  444. package/tests/conformance/fixtures/responseProcessing_random_lookupOutcomeValue/item.xml +0 -42
  445. package/tests/conformance/fixtures/responseProcessing_random_lookupOutcomeValue/manifest.json +0 -14
  446. package/tests/conformance/fixtures/responseProcessing_record_fieldValue/cases.json +0 -12
  447. package/tests/conformance/fixtures/responseProcessing_record_fieldValue/item.xml +0 -40
  448. package/tests/conformance/fixtures/responseProcessing_record_fieldValue/manifest.json +0 -17
  449. package/tests/conformance/fixtures/responseProcessing_responseCondition_toBoolean/cases.json +0 -17
  450. package/tests/conformance/fixtures/responseProcessing_responseCondition_toBoolean/item.xml +0 -63
  451. package/tests/conformance/fixtures/responseProcessing_responseCondition_toBoolean/manifest.json +0 -9
  452. package/tests/conformance/fixtures/responseProcessing_responseProcessingFragment/cases.json +0 -12
  453. package/tests/conformance/fixtures/responseProcessing_responseProcessingFragment/item.xml +0 -40
  454. package/tests/conformance/fixtures/responseProcessing_responseProcessingFragment/manifest.json +0 -13
  455. package/tests/conformance/fixtures/responseProcessing_setDefaultValue/cases.json +0 -15
  456. package/tests/conformance/fixtures/responseProcessing_setDefaultValue/item.xml +0 -67
  457. package/tests/conformance/fixtures/responseProcessing_setDefaultValue/manifest.json +0 -9
  458. package/tests/conformance/fixtures/responseProcessing_setResponseValue_setDefaultValue/cases.json +0 -27
  459. package/tests/conformance/fixtures/responseProcessing_setResponseValue_setDefaultValue/item.xml +0 -69
  460. package/tests/conformance/fixtures/responseProcessing_setResponseValue_setDefaultValue/manifest.json +0 -10
  461. package/tests/conformance/fixtures/responseProcessing_subtract_divide/cases.json +0 -15
  462. package/tests/conformance/fixtures/responseProcessing_subtract_divide/item.xml +0 -35
  463. package/tests/conformance/fixtures/responseProcessing_subtract_divide/manifest.json +0 -11
  464. package/tests/conformance/fixtures/responseProcessing_template_map_response/cases.json +0 -17
  465. package/tests/conformance/fixtures/responseProcessing_template_map_response/item.xml +0 -31
  466. package/tests/conformance/fixtures/responseProcessing_template_map_response/manifest.json +0 -8
  467. package/tests/conformance/fixtures/responseProcessing_template_map_response_point/cases.json +0 -22
  468. package/tests/conformance/fixtures/responseProcessing_template_map_response_point/item.xml +0 -27
  469. package/tests/conformance/fixtures/responseProcessing_template_map_response_point/manifest.json +0 -8
  470. package/tests/conformance/fixtures/responseProcessing_template_match_correct/cases.json +0 -17
  471. package/tests/conformance/fixtures/responseProcessing_template_match_correct/item.xml +0 -34
  472. package/tests/conformance/fixtures/responseProcessing_template_match_correct/manifest.json +0 -8
  473. package/tests/conformance/fixtures/responseProcessing_template_match_correct_directedPair/cases.json +0 -22
  474. package/tests/conformance/fixtures/responseProcessing_template_match_correct_directedPair/item.xml +0 -30
  475. package/tests/conformance/fixtures/responseProcessing_template_match_correct_directedPair/manifest.json +0 -7
  476. package/tests/conformance/fixtures/responseProcessing_template_match_correct_two_responses/cases.json +0 -17
  477. package/tests/conformance/fixtures/responseProcessing_template_match_correct_two_responses/item.xml +0 -30
  478. package/tests/conformance/fixtures/responseProcessing_template_match_correct_two_responses/manifest.json +0 -9
  479. package/tests/conformance/fixtures/responseProcessing_template_match_nothing/cases.json +0 -17
  480. package/tests/conformance/fixtures/responseProcessing_template_match_nothing/item.xml +0 -30
  481. package/tests/conformance/fixtures/responseProcessing_template_match_nothing/manifest.json +0 -8
  482. package/tests/conformance/fixtures/responseProcessing_xiInclude/cases.json +0 -14
  483. package/tests/conformance/fixtures/responseProcessing_xiInclude/item.xml +0 -25
  484. package/tests/conformance/fixtures/responseProcessing_xiInclude/manifest.json +0 -9
  485. package/tests/conformance/fixtures/stringMatch_caseSensitive_substring/cases.json +0 -12
  486. package/tests/conformance/fixtures/stringMatch_caseSensitive_substring/item.xml +0 -52
  487. package/tests/conformance/fixtures/stringMatch_caseSensitive_substring/manifest.json +0 -14
  488. package/tests/conformance/fixtures/templateProcessing_exitTemplate/cases.json +0 -12
  489. package/tests/conformance/fixtures/templateProcessing_exitTemplate/item.xml +0 -48
  490. package/tests/conformance/fixtures/templateProcessing_exitTemplate/manifest.json +0 -13
  491. package/tests/conformance/fixtures/templateProcessing_setCorrectResponse/cases.json +0 -27
  492. package/tests/conformance/fixtures/templateProcessing_setCorrectResponse/item.xml +0 -74
  493. package/tests/conformance/fixtures/templateProcessing_setCorrectResponse/manifest.json +0 -22
  494. package/tests/conformance/fixtures/templateProcessing_templateCondition_branching/cases.json +0 -17
  495. package/tests/conformance/fixtures/templateProcessing_templateCondition_branching/item.xml +0 -133
  496. package/tests/conformance/fixtures/templateProcessing_templateCondition_branching/manifest.json +0 -22
  497. package/tests/conformance/fixtures/templateProcessing_templateCondition_toBoolean/cases.json +0 -12
  498. package/tests/conformance/fixtures/templateProcessing_templateCondition_toBoolean/item.xml +0 -107
  499. package/tests/conformance/fixtures/templateProcessing_templateCondition_toBoolean/manifest.json +0 -16
  500. package/tests/conformance/fixtures/templateProcessing_templateConstraint/cases.json +0 -15
  501. package/tests/conformance/fixtures/templateProcessing_templateConstraint/item.xml +0 -52
  502. package/tests/conformance/fixtures/templateProcessing_templateConstraint/manifest.json +0 -14
  503. package/tests/conformance/fixtures/template_randomFloat_roundTo_mathConstant/cases.json +0 -16
  504. package/tests/conformance/fixtures/template_randomFloat_roundTo_mathConstant/item.xml +0 -49
  505. package/tests/conformance/fixtures/template_randomFloat_roundTo_mathConstant/manifest.json +0 -15
  506. package/tests/conformance/fixtures/template_randomInteger_printedVariable/cases.json +0 -16
  507. package/tests/conformance/fixtures/template_randomInteger_printedVariable/item.xml +0 -38
  508. package/tests/conformance/fixtures/template_randomInteger_printedVariable/manifest.json +0 -13
  509. package/tests/conformance/harness.ts +0 -84
  510. package/tests/conformance/run-fixtures.test.ts +0 -127
  511. package/tests/conformance/scripts/normalize-covers.ts +0 -152
  512. package/tests/conformance/types.ts +0 -53
  513. package/tests/core/Player.test.ts +0 -563
  514. package/tests/core/adaptiveItems.test.ts +0 -442
  515. package/tests/core/correctResponse.test.ts +0 -280
  516. package/tests/core/interaction-plumbing.test.ts +0 -141
  517. package/tests/core/modalFeedback.test.ts +0 -308
  518. package/tests/core/outcome-reset.test.ts +0 -43
  519. package/tests/extraction/extractors/associateExtractor.test.ts +0 -182
  520. package/tests/extraction/extractors/choiceExtractor.test.ts +0 -239
  521. package/tests/extraction/extractors/customExtractor.test.ts +0 -83
  522. package/tests/extraction/extractors/drawingExtractor.test.ts +0 -94
  523. package/tests/extraction/extractors/endAttemptExtractor.test.ts +0 -188
  524. package/tests/extraction/extractors/extendedTextExtractor.test.ts +0 -178
  525. package/tests/extraction/extractors/gapMatchExtractor.test.ts +0 -318
  526. package/tests/extraction/extractors/graphicAssociateExtractor.test.ts +0 -260
  527. package/tests/extraction/extractors/graphicGapMatchExtractor.test.ts +0 -320
  528. package/tests/extraction/extractors/graphicOrderExtractor.test.ts +0 -223
  529. package/tests/extraction/extractors/hotspotExtractor.test.ts +0 -298
  530. package/tests/extraction/extractors/hottextExtractor.test.ts +0 -240
  531. package/tests/extraction/extractors/inlineChoiceExtractor.test.ts +0 -292
  532. package/tests/extraction/extractors/matchExtractor.test.ts +0 -241
  533. package/tests/extraction/extractors/mediaExtractor.test.ts +0 -295
  534. package/tests/extraction/extractors/orderExtractor.test.ts +0 -212
  535. package/tests/extraction/extractors/positionObjectExtractor.test.ts +0 -363
  536. package/tests/extraction/extractors/selectPointExtractor.test.ts +0 -214
  537. package/tests/extraction/extractors/sliderExtractor.test.ts +0 -293
  538. package/tests/extraction/extractors/textEntryExtractor.test.ts +0 -133
  539. package/tests/extraction/extractors/uploadExtractor.test.ts +0 -119
  540. package/tests/extraction/test-utils.ts +0 -57
  541. package/tests/iframe/host.test.ts +0 -145
  542. package/tests/iframe/protocol.test.ts +0 -42
  543. package/tests/performance/player-benchmarks.bench.ts +0 -191
  544. package/tests/security/dos-limits.test.ts +0 -56
  545. package/tests/security/xss-prevention.test.ts +0 -522
  546. package/tsconfig.json +0 -20
  547. package/tsconfig.svelte.json +0 -14
@@ -0,0 +1,19 @@
1
+ /**
2
+ * QTI 3.0 Portable Custom Interaction (PCI) types.
3
+ * Based on IMS QTI 3.0 Portable Custom Interaction specification.
4
+ */
5
+ /**
6
+ * Thrown when a PCI module fails to load from both primary and fallback paths.
7
+ */
8
+ export class PciLoadError extends Error {
9
+ constructor(primaryPath, fallbackPath, cause) {
10
+ super(fallbackPath
11
+ ? `PCI module failed to load from '${primaryPath}' and fallback '${fallbackPath}'`
12
+ : `PCI module failed to load from '${primaryPath}'`);
13
+ this.primaryPath = primaryPath;
14
+ this.fallbackPath = fallbackPath;
15
+ this.name = 'PciLoadError';
16
+ if (cause)
17
+ Object.defineProperty(this, 'cause', { value: cause, writable: true, configurable: true });
18
+ }
19
+ }
@@ -0,0 +1,9 @@
1
+ import type { PnpProfile } from './types.js';
2
+ /**
3
+ * Apply a PNP profile to the player root element.
4
+ *
5
+ * Currently handles color scheme (data-qti-colorscheme attribute).
6
+ * Magnification is intentionally deferred — host stylesheets / browser zoom are sufficient for now.
7
+ */
8
+ export declare function applyPnpToRoot(rootEl: HTMLElement, pnp: PnpProfile | undefined): void;
9
+ //# sourceMappingURL=applyPnp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyPnp.d.ts","sourceRoot":"","sources":["../../src/pnp/applyPnp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAI7C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI,CAYrF"}
@@ -0,0 +1,19 @@
1
+ const ATTR = 'data-qti-colorscheme';
2
+ /**
3
+ * Apply a PNP profile to the player root element.
4
+ *
5
+ * Currently handles color scheme (data-qti-colorscheme attribute).
6
+ * Magnification is intentionally deferred — host stylesheets / browser zoom are sufficient for now.
7
+ */
8
+ export function applyPnpToRoot(rootEl, pnp) {
9
+ const scheme = pnp?.display?.colorScheme;
10
+ if (!scheme || scheme === 'default') {
11
+ rootEl.removeAttribute(ATTR);
12
+ }
13
+ else {
14
+ rootEl.setAttribute(ATTR, scheme);
15
+ }
16
+ if (pnp?.display?.magnification !== undefined) {
17
+ console.warn('[QTI Player] PnpProfile.display.magnification is not yet applied by the player. Use browser zoom or a host stylesheet instead.');
18
+ }
19
+ }
@@ -0,0 +1,9 @@
1
+ import type { PnpProfile } from './types.js';
2
+ /**
3
+ * Parse a QTI 3.0 <personalNeedsProfile> element (or legacy <pnp> element) into a PnpProfile.
4
+ *
5
+ * Accepts either an XML/HTML string containing the profile element, or a live DOM Element.
6
+ * Unknown child elements are silently ignored for forward-compatibility.
7
+ */
8
+ export declare function parsePnpXml(xml: string | Element): PnpProfile;
9
+ //# sourceMappingURL=parsePnpXml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsePnpXml.d.ts","sourceRoot":"","sources":["../../src/pnp/parsePnpXml.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAe7D"}
@@ -0,0 +1,101 @@
1
+ import { parse as parseHtml } from 'node-html-parser';
2
+ /**
3
+ * Parse a QTI 3.0 <personalNeedsProfile> element (or legacy <pnp> element) into a PnpProfile.
4
+ *
5
+ * Accepts either an XML/HTML string containing the profile element, or a live DOM Element.
6
+ * Unknown child elements are silently ignored for forward-compatibility.
7
+ */
8
+ export function parsePnpXml(xml) {
9
+ if (typeof xml !== 'string') {
10
+ // Live DOM Element — serialise to string and re-parse via node-html-parser
11
+ return parsePnpXml(xml.outerHTML ?? '');
12
+ }
13
+ const trimmed = xml.trim();
14
+ if (!trimmed)
15
+ return {};
16
+ // Wrap so node-html-parser treats the outer tag as the root
17
+ const doc = parseHtml(`<root>${trimmed}</root>`, { lowerCaseTagName: true });
18
+ const root = doc.querySelector('personalneedsprofile') ?? doc.querySelector('pnp');
19
+ if (!root)
20
+ return {};
21
+ return extractProfile(root);
22
+ }
23
+ function extractProfile(root) {
24
+ const profile = {};
25
+ // <display>
26
+ const displayEl = findChild(root, ['display']);
27
+ if (displayEl) {
28
+ profile.display = {};
29
+ const colorSchemeEl = findChild(displayEl, ['colorscheme', 'color-scheme']);
30
+ if (colorSchemeEl) {
31
+ const val = (colorSchemeEl.getAttribute('value') ?? colorSchemeEl.text ?? '').trim().toLowerCase();
32
+ if (isColorScheme(val))
33
+ profile.display.colorScheme = val;
34
+ }
35
+ const magEl = findChild(displayEl, ['magnification']);
36
+ if (magEl) {
37
+ const val = parseFloat(magEl.getAttribute('value') ?? magEl.text ?? '');
38
+ if (Number.isFinite(val) && val > 0)
39
+ profile.display.magnification = val;
40
+ }
41
+ }
42
+ // <content>
43
+ const contentEl = findChild(root, ['content']);
44
+ if (contentEl) {
45
+ profile.content = {};
46
+ const glossaryEl = findChild(contentEl, ['glossaryonscreen', 'glossary-on-screen']);
47
+ if (glossaryEl) {
48
+ profile.content.glossaryOnScreen = parseBool(glossaryEl.getAttribute('enabled') ?? glossaryEl.text ?? 'true');
49
+ }
50
+ const kwEl = findChild(contentEl, ['keywordtranslation', 'keyword-translation']);
51
+ if (kwEl) {
52
+ const active = parseBool(kwEl.getAttribute('active') ?? 'true');
53
+ const languageCode = (kwEl.getAttribute('languagecode') ?? kwEl.getAttribute('language-code') ?? kwEl.getAttribute('lang') ?? '').trim();
54
+ if (languageCode)
55
+ profile.content.keywordTranslation = { active, languageCode };
56
+ }
57
+ const etEl = findChild(contentEl, ['extendedtime', 'extended-time']);
58
+ if (etEl) {
59
+ const active = parseBool(etEl.getAttribute('active') ?? 'true');
60
+ const rawMultiplier = etEl.getAttribute('multiplier') ?? etEl.text ?? '';
61
+ const multiplier = rawMultiplier.trim().toLowerCase() === 'infinity'
62
+ ? Infinity
63
+ : parseFloat(rawMultiplier);
64
+ if (Number.isFinite(multiplier) || multiplier === Infinity) {
65
+ profile.content.extendedTime = { active, multiplier };
66
+ }
67
+ }
68
+ }
69
+ // <cognitive>
70
+ const cogEl = findChild(root, ['cognitive']);
71
+ if (cogEl) {
72
+ profile.cognitive = {};
73
+ const elTool = findChild(cogEl, ['eliminationtool', 'elimination-tool']);
74
+ if (elTool) {
75
+ profile.cognitive.eliminationTool = parseBool(elTool.getAttribute('enabled') ?? elTool.getAttribute('active') ?? elTool.text ?? 'true');
76
+ }
77
+ }
78
+ return profile;
79
+ }
80
+ // ---------------------------------------------------------------------------
81
+ // Helpers
82
+ // ---------------------------------------------------------------------------
83
+ function findChild(parent, names) {
84
+ for (const child of parent.childNodes) {
85
+ if (child.nodeType !== 1)
86
+ continue; // element nodes only
87
+ const el = child;
88
+ const tag = (el.rawTagName ?? '').toLowerCase();
89
+ if (names.includes(tag))
90
+ return el;
91
+ }
92
+ return null;
93
+ }
94
+ function parseBool(value) {
95
+ const v = (value ?? '').trim().toLowerCase();
96
+ return v !== 'false' && v !== '0' && v !== 'no';
97
+ }
98
+ const COLOR_SCHEMES = new Set(['default', 'blackwhite', 'whitenav', 'blackcream', 'yellowblue', 'medgray']);
99
+ function isColorScheme(v) {
100
+ return COLOR_SCHEMES.has(v);
101
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * QTI 3.0 §6.2 Personal Needs and Preferences profile.
3
+ * All fields are optional; absent means "use platform default".
4
+ */
5
+ export interface PnpProfile {
6
+ display?: {
7
+ /**
8
+ * Named color scheme. Maps to the data-qti-colorscheme attribute on the player root.
9
+ * 'default' or undefined → attribute removed (browser/host default).
10
+ */
11
+ colorScheme?: 'default' | 'blackwhite' | 'whitenav' | 'blackcream' | 'yellowblue' | 'medgray';
12
+ /**
13
+ * CSS zoom factor (1.0 = 100%). Deferred — set by browser zoom or host stylesheet.
14
+ * Stored here for forward-compatibility but not yet applied by the player.
15
+ */
16
+ magnification?: number;
17
+ };
18
+ content?: {
19
+ /** Show glossary trigger buttons on [data-catalog-idref] terms (G-10). */
20
+ glossaryOnScreen?: boolean;
21
+ /** Show keyword-translation trigger buttons using the given language code. */
22
+ keywordTranslation?: {
23
+ active: boolean;
24
+ languageCode: string;
25
+ };
26
+ /**
27
+ * Scale assessment time limits. multiplier: 1.5 means 50% extra time.
28
+ * multiplier: Infinity removes the time limit entirely.
29
+ */
30
+ extendedTime?: {
31
+ active: boolean;
32
+ multiplier: number;
33
+ };
34
+ };
35
+ cognitive?: {
36
+ /** Render per-choice elimination toggle buttons in choiceInteraction and orderInteraction. */
37
+ eliminationTool?: boolean;
38
+ };
39
+ }
40
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/pnp/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,UAAU;IAC1B,OAAO,CAAC,EAAE;QACT;;;WAGG;QACH,WAAW,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,CAAC;QAC9F;;;WAGG;QACH,aAAa,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,OAAO,CAAC,EAAE;QACT,0EAA0E;QAC1E,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,8EAA8E;QAC9E,kBAAkB,CAAC,EAAE;YAAE,MAAM,EAAE,OAAO,CAAC;YAAC,YAAY,EAAE,MAAM,CAAA;SAAE,CAAC;QAC/D;;;WAGG;QACH,YAAY,CAAC,EAAE;YAAE,MAAM,EAAE,OAAO,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE,CAAC;KACvD,CAAC;IACF,SAAS,CAAC,EAAE;QACX,8FAA8F;QAC9F,eAAe,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;CACF"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Server-safe entrypoint for @pie-qti/item-player
3
+ *
4
+ * This module must remain free of browser/DOM globals (document, window, HTMLElement).
5
+ * Use it from SSR / backend code (e.g. SvelteKit endpoints) for scoring and parsing.
6
+ */
7
+ export * from './core/constants.js';
8
+ export * from './core/declarations.js';
9
+ export { Player } from './core/Player.js';
10
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/server.js ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Server-safe entrypoint for @pie-qti/item-player
3
+ *
4
+ * This module must remain free of browser/DOM globals (document, window, HTMLElement).
5
+ * Use it from SSR / backend code (e.g. SvelteKit endpoints) for scoring and parsing.
6
+ */
7
+ // These are used by scoring/processing and are DOM-independent.
8
+ export * from './core/constants.js';
9
+ export * from './core/declarations.js';
10
+ export { Player } from './core/Player.js';
@@ -0,0 +1,304 @@
1
+ /**
2
+ * Core QTI types for the player
3
+ */
4
+ import type { BaseType as ProcessingBaseType, Cardinality as ProcessingCardinality, QtiValue } from '@pie-qti/qti-processing';
5
+ /**
6
+ * QTI base type identifier
7
+ * Extensible string type allows custom base types
8
+ */
9
+ export type VariableBaseType = ProcessingBaseType;
10
+ /**
11
+ * QTI cardinality identifier
12
+ * Extensible string type allows custom cardinality values
13
+ */
14
+ export type VariableCardinality = ProcessingCardinality;
15
+ export interface VariableDeclaration {
16
+ identifier: string;
17
+ baseType: VariableBaseType;
18
+ cardinality: VariableCardinality;
19
+ value: any;
20
+ defaultValue?: any;
21
+ mapping?: Mapping;
22
+ areaMapping?: AreaMapping;
23
+ }
24
+ export interface Mapping {
25
+ defaultValue?: number;
26
+ lowerBound?: number;
27
+ upperBound?: number;
28
+ /**
29
+ * QTI attribute on <mapping>. When "false", string mappings are case-insensitive by default.
30
+ * Stored as raw string to match XML attribute values ("true"/"false").
31
+ */
32
+ caseSensitive?: string;
33
+ entries: Record<string, MapEntry>;
34
+ }
35
+ export interface MapEntry {
36
+ mapKey: string;
37
+ mappedValue: number;
38
+ caseSensitive?: string;
39
+ }
40
+ export interface AreaMapping {
41
+ defaultValue?: number;
42
+ lowerBound?: number;
43
+ upperBound?: number;
44
+ entries: AreaMapEntry[];
45
+ }
46
+ export interface AreaMapEntry {
47
+ shape: 'circle' | 'rect' | 'poly' | 'ellipse' | 'default';
48
+ coords: string;
49
+ mappedValue: number;
50
+ }
51
+ export interface ResponseDeclaration extends VariableDeclaration {
52
+ correctResponse?: any;
53
+ }
54
+ export interface OutcomeDeclaration extends VariableDeclaration {
55
+ interpretation?: string;
56
+ longInterpretation?: string;
57
+ normalMaximum?: number;
58
+ normalMinimum?: number;
59
+ masteryValue?: number;
60
+ views?: string[];
61
+ }
62
+ export interface ItemSessionState {
63
+ [variableId: string]: any;
64
+ }
65
+ export interface InteractionResponse {
66
+ [responseId: string]: any;
67
+ }
68
+ /**
69
+ * Serializable representation of a QTI baseType="file" response.
70
+ * (We cannot store a browser File object in session state / JSON exports.)
71
+ */
72
+ export interface QTIFileResponse {
73
+ name: string;
74
+ type: string;
75
+ size: number;
76
+ lastModified: number;
77
+ /** Base64 data URL, e.g. data:application/pdf;base64,... */
78
+ dataUrl: string;
79
+ /**
80
+ * Optional ImageData extracted from canvas (for drawing interactions).
81
+ * This allows custom operators to analyze drawing content synchronously
82
+ * without needing to decode the dataUrl asynchronously.
83
+ */
84
+ imageData?: {
85
+ data: Uint8ClampedArray;
86
+ width: number;
87
+ height: number;
88
+ };
89
+ }
90
+ export interface ModalFeedback {
91
+ /** Unique identifier for this feedback block */
92
+ identifier: string;
93
+ /** Outcome variable identifier this feedback is tied to */
94
+ outcomeIdentifier: string;
95
+ /** When to show: 'show' means display when outcome matches identifier */
96
+ showHide: 'show' | 'hide';
97
+ /** HTML content to display */
98
+ content: HtmlContent;
99
+ /** Optional title for the feedback */
100
+ title?: string;
101
+ }
102
+ export interface ScoringResult {
103
+ score: number;
104
+ maxScore: number;
105
+ completed: boolean;
106
+ outcomeValues: Record<string, any>;
107
+ /** Modal feedback elements that should be displayed based on outcome values */
108
+ modalFeedback?: ModalFeedback[];
109
+ }
110
+ /**
111
+ * QTI 2.2 completionStatus values for adaptive items
112
+ * - not_attempted: No interaction has occurred yet
113
+ * - unknown: Response exists but hasn't been scored/evaluated
114
+ * - incomplete: Item has been scored but is still active (can submit again)
115
+ * - completed: Item is finished (final state)
116
+ */
117
+ export type CompletionStatus = 'not_attempted' | 'unknown' | 'incomplete' | 'completed';
118
+ /**
119
+ * Extended scoring result for adaptive items with multi-attempt support
120
+ */
121
+ export interface AdaptiveAttemptResult extends ScoringResult {
122
+ /** Number of attempts made so far */
123
+ numAttempts: number;
124
+ /** Current completion status of the item */
125
+ completionStatus: CompletionStatus;
126
+ /** Whether the item can accept more submissions */
127
+ canContinue: boolean;
128
+ }
129
+ /**
130
+ * QTI role/view actors used for audience filtering (for example rubric/outcome visibility).
131
+ * Runtime interaction behavior (readonly vs editable, correct-answer visibility) is a player
132
+ * policy layered on top of these roles.
133
+ */
134
+ export type QTIRole = 'candidate' | 'scorer' | 'proctor' | 'testConstructor' | 'tutor' | 'author';
135
+ export interface RubricBlock {
136
+ view: string[];
137
+ html: HtmlContent;
138
+ }
139
+ /**
140
+ * QTI specification compliance configuration.
141
+ * Controls whether the player enforces strict QTI 2.2 spec or allows vendor extensions.
142
+ */
143
+ export interface QTIComplianceConfig {
144
+ /** Enable strict QTI 2.2 compliance mode. Default: false (lenient) */
145
+ enabled?: boolean;
146
+ /** Reject items with unknown or non-standard elements. Default: false */
147
+ rejectUnknownExtensions?: boolean;
148
+ /** Log warnings for spec deviations and vendor extensions. Default: true */
149
+ logDeviations?: boolean;
150
+ }
151
+ export interface PlayerConfig {
152
+ itemXml?: string;
153
+ /**
154
+ * QTI 3.0 §6.2 Personal Needs and Preferences profile.
155
+ * Color scheme is applied immediately as data-qti-colorscheme on the player root.
156
+ * Use player.updatePnp() to change mid-session without re-parsing the item.
157
+ */
158
+ pnp?: import('../pnp/types.js').PnpProfile;
159
+ /**
160
+ * Optional shared catalog XML string (QTI 3.0 §6.3).
161
+ * Parsed and merged with any catalog embedded in the item XML.
162
+ * Item-level catalog entries take precedence over shared entries with the same identifier.
163
+ * Deferred: external catalog files from IMS manifest (G-15) are not yet supported.
164
+ */
165
+ catalogXml?: string;
166
+ sessionState?: ItemSessionState;
167
+ responses?: InteractionResponse;
168
+ role?: QTIRole;
169
+ /** Optional seed for deterministic random operations (e.g. templateProcessing randomInteger) */
170
+ seed?: number;
171
+ /** Optional RNG override (takes precedence over seed if provided) */
172
+ rng?: () => number;
173
+ /**
174
+ * Optional element name mapper for handling different QTI versions.
175
+ * Defaults to Qti2xElementNameMapper (primary supported QTI format).
176
+ * @since 0.2.0
177
+ */
178
+ elementNameMapper?: any;
179
+ /**
180
+ * Optional attribute name mapper for handling different QTI versions.
181
+ * Defaults to Qti2xAttributeNameMapper (primary supported QTI format).
182
+ * @since 0.3.0
183
+ */
184
+ attributeNameMapper?: any;
185
+ /** Optional web component registry for custom interaction components */
186
+ componentRegistry?: any;
187
+ /** Optional extraction registry for custom element extractors */
188
+ extractionRegistry?: any;
189
+ /** Optional plugins to extend player functionality */
190
+ plugins?: any[];
191
+ /**
192
+ * Optional i18n provider for internationalization.
193
+ * If not provided, defaults to DefaultI18nProvider with English messages.
194
+ */
195
+ i18nProvider?: any;
196
+ /**
197
+ * Optional registry for executing QTI <customOperator> expressions.
198
+ * Keyed by operator `class` (preferred) or `definition` URI.
199
+ */
200
+ customOperators?: Record<string, (args: QtiValue[], meta: {
201
+ class?: string;
202
+ definition?: string;
203
+ }) => QtiValue>;
204
+ /**
205
+ * Optional base URL for resolving relative PCI module paths.
206
+ * Defaults to document.baseURI when running in a browser.
207
+ */
208
+ pciBaseUrl?: string;
209
+ /**
210
+ * Security-related controls for untrusted QTI rendered into the host DOM.
211
+ * Defaults are conservative for same-DOM embedding.
212
+ */
213
+ security?: PlayerSecurityConfig;
214
+ /**
215
+ * QTI specification compliance settings.
216
+ * Set strictQtiCompliance.enabled = true for strict QTI 2.2 validation.
217
+ */
218
+ strictQtiCompliance?: QTIComplianceConfig;
219
+ }
220
+ export interface UrlPolicyConfig {
221
+ /**
222
+ * Optional base URL used to resolve relative asset URLs (e.g. images/media).
223
+ * If omitted, relative URLs are preserved as-is.
224
+ */
225
+ assetBaseUrl?: string;
226
+ /** Allow https: URLs */
227
+ allowHttps?: boolean;
228
+ /** Allow http: URLs (default false; prefer https) */
229
+ allowHttp?: boolean;
230
+ /** Allow protocol-relative URLs (e.g. //cdn.example/asset). Default false. */
231
+ allowProtocolRelative?: boolean;
232
+ /** Allow data:image/* for <img src>. */
233
+ allowDataImages?: boolean;
234
+ /** Allow data:image/svg+xml (default false) */
235
+ allowSvgDataImages?: boolean;
236
+ /** Optional allowlist of hostnames for absolute URLs (exact match). */
237
+ allowedHosts?: string[];
238
+ }
239
+ /**
240
+ * Trusted Types support:
241
+ * - When enabled and supported by the host browser + CSP, HTML-returning APIs may return TrustedHTML instead of string.
242
+ * - When not enabled (default), APIs return plain strings as before.
243
+ */
244
+ export type TrustedTypesHtml = typeof globalThis extends {
245
+ TrustedHTML: infer T;
246
+ } ? T : never;
247
+ export type HtmlContent = string | TrustedTypesHtml;
248
+ export interface PlayerSecurityConfig {
249
+ /** URL policy applied to extracted URL fields and HTML attribute URLs */
250
+ urlPolicy?: UrlPolicyConfig;
251
+ /** Allow <object>/<embed> usage (default false) */
252
+ allowObjectEmbeds?: boolean;
253
+ /** Allow <iframe> usage (default false) */
254
+ allowIframes?: boolean;
255
+ /**
256
+ * Optional parsing/processing guardrails to reduce DoS risk from untrusted QTI.
257
+ * Disabled by default for compatibility.
258
+ */
259
+ parsingLimits?: ParsingLimitsConfig;
260
+ /**
261
+ * Optional Trusted Types policy name (host-controlled).
262
+ * When set, and Trusted Types is available, the player will produce TrustedHTML for HTML injection sinks.
263
+ *
264
+ * Note: this is only effective when the host enables Trusted Types via CSP.
265
+ */
266
+ trustedTypesPolicyName?: string;
267
+ }
268
+ export interface ParsingLimitsConfig {
269
+ /**
270
+ * Enables parsing limits. When false/undefined, the player behaves exactly as before (compat default).
271
+ */
272
+ enabled?: boolean;
273
+ /**
274
+ * Reject any XML containing <!DOCTYPE ...> (case-insensitive) when enabled.
275
+ * Helps reduce entity-expansion and other parser edge-case risks.
276
+ */
277
+ rejectDoctype?: boolean;
278
+ /**
279
+ * Maximum bytes for `itemXml` input (UTF-8). Enforced when enabled.
280
+ */
281
+ maxItemXmlBytes?: number;
282
+ /**
283
+ * Maximum bytes for HTML strings passed to sanitizer (UTF-8). Enforced when enabled.
284
+ */
285
+ maxHtmlBytes?: number;
286
+ /**
287
+ * Maximum number of element nodes sanitized per HTML input. Enforced when enabled.
288
+ */
289
+ maxHtmlNodes?: number;
290
+ /**
291
+ * Maximum element depth sanitized per HTML input. Enforced when enabled.
292
+ */
293
+ maxHtmlDepth?: number;
294
+ }
295
+ export interface InteractionContext {
296
+ responseIdentifier: string;
297
+ maxChoices?: number;
298
+ minChoices?: number;
299
+ shuffle?: boolean;
300
+ orientation?: 'horizontal' | 'vertical';
301
+ }
302
+ export * from './interactions.js';
303
+ export * from './responseValidation.js';
304
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACX,QAAQ,IAAI,kBAAkB,EAC9B,WAAW,IAAI,qBAAqB,EACpC,QAAQ,EACR,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAExD,MAAM,WAAW,mBAAmB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,mBAAmB,CAAC;IACjC,KAAK,EAAE,GAAG,CAAC;IACX,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,WAAW,OAAO;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,QAAQ;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC3B,YAAY,CAAC,EAAE,MAAM,CAA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,CAAC;AAClC,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Core QTI types for the player
3
+ */
4
+ // Interaction data shapes for the component/plugin system.
5
+ // Exported here so consumers can import them from `@pie-qti/item-player`.
6
+ export * from './interactions.js';
7
+ export * from './responseValidation.js';