@pie-qti/item-player 0.1.10 → 0.1.11

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 (572) hide show
  1. package/dist/catalog/applyGlossaryTriggers.d.ts +0 -1
  2. package/dist/catalog/applyGlossaryTriggers.js +1 -0
  3. package/dist/catalog/applyGlossaryTriggers.js.map +1 -0
  4. package/dist/catalog/catalogExtractor.d.ts +0 -1
  5. package/dist/catalog/catalogExtractor.js +1 -0
  6. package/dist/catalog/catalogExtractor.js.map +1 -0
  7. package/dist/catalog/catalogLookup.d.ts +0 -1
  8. package/dist/catalog/catalogLookup.js +1 -0
  9. package/dist/catalog/catalogLookup.js.map +1 -0
  10. package/dist/catalog/glossaryAction.d.ts +0 -1
  11. package/dist/catalog/glossaryAction.js +1 -0
  12. package/dist/catalog/glossaryAction.js.map +1 -0
  13. package/dist/catalog/types.d.ts +0 -1
  14. package/dist/catalog/types.js +1 -0
  15. package/dist/catalog/types.js.map +1 -0
  16. package/dist/components/actions/typesetAction.d.ts +0 -1
  17. package/dist/components/actions/typesetAction.js +1 -0
  18. package/dist/components/actions/typesetAction.js.map +1 -0
  19. package/dist/components/utils/feedbackUtils.d.ts +0 -1
  20. package/dist/components/utils/feedbackUtils.js +1 -0
  21. package/dist/components/utils/feedbackUtils.js.map +1 -0
  22. package/dist/components/utils/index.d.ts +0 -1
  23. package/dist/components/utils/index.js +1 -0
  24. package/dist/components/utils/index.js.map +1 -0
  25. package/dist/components/utils/stimulusRender.d.ts +0 -1
  26. package/dist/components/utils/stimulusRender.js +1 -0
  27. package/dist/components/utils/stimulusRender.js.map +1 -0
  28. package/dist/components/utils/stylesheetRender.d.ts +0 -1
  29. package/dist/components/utils/stylesheetRender.js +1 -0
  30. package/dist/components/utils/stylesheetRender.js.map +1 -0
  31. package/dist/core/ComponentRegistry.d.ts +0 -1
  32. package/dist/core/ComponentRegistry.js +1 -0
  33. package/dist/core/ComponentRegistry.js.map +1 -0
  34. package/dist/core/Player.d.ts +0 -1
  35. package/dist/core/Player.js +1 -0
  36. package/dist/core/Player.js.map +1 -0
  37. package/dist/core/Plugin.d.ts +0 -1
  38. package/dist/core/Plugin.js +1 -0
  39. package/dist/core/Plugin.js.map +1 -0
  40. package/dist/core/PluginManager.d.ts +0 -1
  41. package/dist/core/PluginManager.js +1 -0
  42. package/dist/core/PluginManager.js.map +1 -0
  43. package/dist/core/constants.d.ts +0 -1
  44. package/dist/core/constants.js +1 -0
  45. package/dist/core/constants.js.map +1 -0
  46. package/dist/core/declarations.d.ts +0 -1
  47. package/dist/core/declarations.js +1 -0
  48. package/dist/core/declarations.js.map +1 -0
  49. package/dist/core/parsingLimits.d.ts +0 -1
  50. package/dist/core/parsingLimits.js +1 -0
  51. package/dist/core/parsingLimits.js.map +1 -0
  52. package/dist/core/random.d.ts +0 -1
  53. package/dist/core/random.js +1 -0
  54. package/dist/core/random.js.map +1 -0
  55. package/dist/core/rolePolicy.d.ts +0 -1
  56. package/dist/core/rolePolicy.js +1 -0
  57. package/dist/core/rolePolicy.js.map +1 -0
  58. package/dist/core/sanitizer.d.ts +0 -1
  59. package/dist/core/sanitizer.js +1 -0
  60. package/dist/core/sanitizer.js.map +1 -0
  61. package/dist/core/trustedTypes.d.ts +0 -1
  62. package/dist/core/trustedTypes.js +1 -0
  63. package/dist/core/trustedTypes.js.map +1 -0
  64. package/dist/core/urlPolicy.d.ts +0 -1
  65. package/dist/core/urlPolicy.js +1 -0
  66. package/dist/core/urlPolicy.js.map +1 -0
  67. package/dist/document/AssessmentItemDocument.d.ts +0 -1
  68. package/dist/document/AssessmentItemDocument.js +1 -0
  69. package/dist/document/AssessmentItemDocument.js.map +1 -0
  70. package/dist/element.js +8 -9
  71. package/dist/element.js.map +1 -1
  72. package/dist/extensions/MathLiveEditor.d.ts +0 -1
  73. package/dist/extensions/MathLiveEditor.js +1 -0
  74. package/dist/extensions/MathLiveEditor.js.map +1 -0
  75. package/dist/extraction/ExtractionRegistry.d.ts +0 -1
  76. package/dist/extraction/ExtractionRegistry.js +1 -0
  77. package/dist/extraction/ExtractionRegistry.js.map +1 -0
  78. package/dist/extraction/createContext.d.ts +0 -1
  79. package/dist/extraction/createContext.js +1 -0
  80. package/dist/extraction/createContext.js.map +1 -0
  81. package/dist/extraction/index.d.ts +0 -1
  82. package/dist/extraction/index.js +1 -0
  83. package/dist/extraction/index.js.map +1 -0
  84. package/dist/extraction/interactionExtractionPipeline.d.ts +0 -1
  85. package/dist/extraction/interactionExtractionPipeline.js +1 -0
  86. package/dist/extraction/interactionExtractionPipeline.js.map +1 -0
  87. package/dist/extraction/interactionSecurity.d.ts +0 -1
  88. package/dist/extraction/interactionSecurity.js +1 -0
  89. package/dist/extraction/interactionSecurity.js.map +1 -0
  90. package/dist/extraction/types.d.ts +0 -1
  91. package/dist/extraction/types.js +1 -0
  92. package/dist/extraction/types.js.map +1 -0
  93. package/dist/extraction/utils.d.ts +0 -1
  94. package/dist/extraction/utils.js +1 -0
  95. package/dist/extraction/utils.js.map +1 -0
  96. package/dist/iframe/IFramePlayerHost.d.ts +0 -1
  97. package/dist/iframe/IFramePlayerHost.js +1 -0
  98. package/dist/iframe/IFramePlayerHost.js.map +1 -0
  99. package/dist/iframe/index.d.ts +0 -1
  100. package/dist/iframe/index.js +1 -0
  101. package/dist/iframe/index.js.map +1 -0
  102. package/dist/iframe/protocol.d.ts +0 -1
  103. package/dist/iframe/protocol.js +1 -0
  104. package/dist/iframe/protocol.js.map +1 -0
  105. package/dist/index.d.ts +0 -1
  106. package/dist/index.js +1 -0
  107. package/dist/index.js.map +1 -0
  108. package/dist/interactions/associate/extractor.d.ts +0 -1
  109. package/dist/interactions/associate/extractor.js +1 -0
  110. package/dist/interactions/associate/extractor.js.map +1 -0
  111. package/dist/interactions/associate/index.d.ts +0 -1
  112. package/dist/interactions/associate/index.js +1 -0
  113. package/dist/interactions/associate/index.js.map +1 -0
  114. package/dist/interactions/associate/types.d.ts +0 -1
  115. package/dist/interactions/associate/types.js +1 -0
  116. package/dist/interactions/associate/types.js.map +1 -0
  117. package/dist/interactions/choice/extractor.d.ts +0 -1
  118. package/dist/interactions/choice/extractor.js +1 -0
  119. package/dist/interactions/choice/extractor.js.map +1 -0
  120. package/dist/interactions/choice/index.d.ts +0 -1
  121. package/dist/interactions/choice/index.js +1 -0
  122. package/dist/interactions/choice/index.js.map +1 -0
  123. package/dist/interactions/choice/types.d.ts +0 -1
  124. package/dist/interactions/choice/types.js +1 -0
  125. package/dist/interactions/choice/types.js.map +1 -0
  126. package/dist/interactions/custom/extractor.d.ts +0 -1
  127. package/dist/interactions/custom/extractor.js +1 -0
  128. package/dist/interactions/custom/extractor.js.map +1 -0
  129. package/dist/interactions/custom/index.d.ts +0 -1
  130. package/dist/interactions/custom/index.js +1 -0
  131. package/dist/interactions/custom/index.js.map +1 -0
  132. package/dist/interactions/custom/types.d.ts +0 -1
  133. package/dist/interactions/custom/types.js +1 -0
  134. package/dist/interactions/custom/types.js.map +1 -0
  135. package/dist/interactions/drawing/extractor.d.ts +0 -1
  136. package/dist/interactions/drawing/extractor.js +1 -0
  137. package/dist/interactions/drawing/extractor.js.map +1 -0
  138. package/dist/interactions/drawing/index.d.ts +0 -1
  139. package/dist/interactions/drawing/index.js +1 -0
  140. package/dist/interactions/drawing/index.js.map +1 -0
  141. package/dist/interactions/drawing/types.d.ts +0 -1
  142. package/dist/interactions/drawing/types.js +1 -0
  143. package/dist/interactions/drawing/types.js.map +1 -0
  144. package/dist/interactions/end-attempt/extractor.d.ts +0 -1
  145. package/dist/interactions/end-attempt/extractor.js +1 -0
  146. package/dist/interactions/end-attempt/extractor.js.map +1 -0
  147. package/dist/interactions/end-attempt/index.d.ts +0 -1
  148. package/dist/interactions/end-attempt/index.js +1 -0
  149. package/dist/interactions/end-attempt/index.js.map +1 -0
  150. package/dist/interactions/end-attempt/types.d.ts +0 -1
  151. package/dist/interactions/end-attempt/types.js +1 -0
  152. package/dist/interactions/end-attempt/types.js.map +1 -0
  153. package/dist/interactions/extended-text/extractor.d.ts +0 -1
  154. package/dist/interactions/extended-text/extractor.js +1 -0
  155. package/dist/interactions/extended-text/extractor.js.map +1 -0
  156. package/dist/interactions/extended-text/index.d.ts +0 -1
  157. package/dist/interactions/extended-text/index.js +1 -0
  158. package/dist/interactions/extended-text/index.js.map +1 -0
  159. package/dist/interactions/extended-text/types.d.ts +0 -1
  160. package/dist/interactions/extended-text/types.js +1 -0
  161. package/dist/interactions/extended-text/types.js.map +1 -0
  162. package/dist/interactions/gap-match/extractor.d.ts +0 -1
  163. package/dist/interactions/gap-match/extractor.js +1 -0
  164. package/dist/interactions/gap-match/extractor.js.map +1 -0
  165. package/dist/interactions/gap-match/index.d.ts +0 -1
  166. package/dist/interactions/gap-match/index.js +1 -0
  167. package/dist/interactions/gap-match/index.js.map +1 -0
  168. package/dist/interactions/gap-match/types.d.ts +0 -1
  169. package/dist/interactions/gap-match/types.js +1 -0
  170. package/dist/interactions/gap-match/types.js.map +1 -0
  171. package/dist/interactions/graphic-associate/extractor.d.ts +0 -1
  172. package/dist/interactions/graphic-associate/extractor.js +1 -0
  173. package/dist/interactions/graphic-associate/extractor.js.map +1 -0
  174. package/dist/interactions/graphic-associate/index.d.ts +0 -1
  175. package/dist/interactions/graphic-associate/index.js +1 -0
  176. package/dist/interactions/graphic-associate/index.js.map +1 -0
  177. package/dist/interactions/graphic-associate/types.d.ts +0 -1
  178. package/dist/interactions/graphic-associate/types.js +1 -0
  179. package/dist/interactions/graphic-associate/types.js.map +1 -0
  180. package/dist/interactions/graphic-gap-match/extractor.d.ts +0 -1
  181. package/dist/interactions/graphic-gap-match/extractor.js +1 -0
  182. package/dist/interactions/graphic-gap-match/extractor.js.map +1 -0
  183. package/dist/interactions/graphic-gap-match/index.d.ts +0 -1
  184. package/dist/interactions/graphic-gap-match/index.js +1 -0
  185. package/dist/interactions/graphic-gap-match/index.js.map +1 -0
  186. package/dist/interactions/graphic-gap-match/types.d.ts +0 -1
  187. package/dist/interactions/graphic-gap-match/types.js +1 -0
  188. package/dist/interactions/graphic-gap-match/types.js.map +1 -0
  189. package/dist/interactions/graphic-order/extractor.d.ts +0 -1
  190. package/dist/interactions/graphic-order/extractor.js +1 -0
  191. package/dist/interactions/graphic-order/extractor.js.map +1 -0
  192. package/dist/interactions/graphic-order/index.d.ts +0 -1
  193. package/dist/interactions/graphic-order/index.js +1 -0
  194. package/dist/interactions/graphic-order/index.js.map +1 -0
  195. package/dist/interactions/graphic-order/types.d.ts +0 -1
  196. package/dist/interactions/graphic-order/types.js +1 -0
  197. package/dist/interactions/graphic-order/types.js.map +1 -0
  198. package/dist/interactions/hotspot/extractor.d.ts +0 -1
  199. package/dist/interactions/hotspot/extractor.js +1 -0
  200. package/dist/interactions/hotspot/extractor.js.map +1 -0
  201. package/dist/interactions/hotspot/index.d.ts +0 -1
  202. package/dist/interactions/hotspot/index.js +1 -0
  203. package/dist/interactions/hotspot/index.js.map +1 -0
  204. package/dist/interactions/hotspot/types.d.ts +0 -1
  205. package/dist/interactions/hotspot/types.js +1 -0
  206. package/dist/interactions/hotspot/types.js.map +1 -0
  207. package/dist/interactions/hottext/extractor.d.ts +0 -1
  208. package/dist/interactions/hottext/extractor.js +1 -0
  209. package/dist/interactions/hottext/extractor.js.map +1 -0
  210. package/dist/interactions/hottext/index.d.ts +0 -1
  211. package/dist/interactions/hottext/index.js +1 -0
  212. package/dist/interactions/hottext/index.js.map +1 -0
  213. package/dist/interactions/hottext/types.d.ts +0 -1
  214. package/dist/interactions/hottext/types.js +1 -0
  215. package/dist/interactions/hottext/types.js.map +1 -0
  216. package/dist/interactions/index.d.ts +0 -1
  217. package/dist/interactions/index.js +1 -0
  218. package/dist/interactions/index.js.map +1 -0
  219. package/dist/interactions/inline/index.d.ts +0 -1
  220. package/dist/interactions/inline/index.js +1 -0
  221. package/dist/interactions/inline/index.js.map +1 -0
  222. package/dist/interactions/inline/render-plan.d.ts +0 -1
  223. package/dist/interactions/inline/render-plan.js +1 -0
  224. package/dist/interactions/inline/render-plan.js.map +1 -0
  225. package/dist/interactions/inline-choice/extractor.d.ts +0 -1
  226. package/dist/interactions/inline-choice/extractor.js +1 -0
  227. package/dist/interactions/inline-choice/extractor.js.map +1 -0
  228. package/dist/interactions/inline-choice/index.d.ts +0 -1
  229. package/dist/interactions/inline-choice/index.js +1 -0
  230. package/dist/interactions/inline-choice/index.js.map +1 -0
  231. package/dist/interactions/inline-choice/types.d.ts +0 -1
  232. package/dist/interactions/inline-choice/types.js +1 -0
  233. package/dist/interactions/inline-choice/types.js.map +1 -0
  234. package/dist/interactions/match/extractor.d.ts +0 -1
  235. package/dist/interactions/match/extractor.js +1 -0
  236. package/dist/interactions/match/extractor.js.map +1 -0
  237. package/dist/interactions/match/index.d.ts +0 -1
  238. package/dist/interactions/match/index.js +1 -0
  239. package/dist/interactions/match/index.js.map +1 -0
  240. package/dist/interactions/match/types.d.ts +0 -1
  241. package/dist/interactions/match/types.js +1 -0
  242. package/dist/interactions/match/types.js.map +1 -0
  243. package/dist/interactions/media/extractor.d.ts +0 -1
  244. package/dist/interactions/media/extractor.js +1 -0
  245. package/dist/interactions/media/extractor.js.map +1 -0
  246. package/dist/interactions/media/index.d.ts +0 -1
  247. package/dist/interactions/media/index.js +1 -0
  248. package/dist/interactions/media/index.js.map +1 -0
  249. package/dist/interactions/media/types.d.ts +0 -1
  250. package/dist/interactions/media/types.js +1 -0
  251. package/dist/interactions/media/types.js.map +1 -0
  252. package/dist/interactions/modules.d.ts +0 -1
  253. package/dist/interactions/modules.js +1 -0
  254. package/dist/interactions/modules.js.map +1 -0
  255. package/dist/interactions/order/extractor.d.ts +0 -1
  256. package/dist/interactions/order/extractor.js +1 -0
  257. package/dist/interactions/order/extractor.js.map +1 -0
  258. package/dist/interactions/order/index.d.ts +0 -1
  259. package/dist/interactions/order/index.js +1 -0
  260. package/dist/interactions/order/index.js.map +1 -0
  261. package/dist/interactions/order/types.d.ts +0 -1
  262. package/dist/interactions/order/types.js +1 -0
  263. package/dist/interactions/order/types.js.map +1 -0
  264. package/dist/interactions/portable-custom/extractor.d.ts +0 -1
  265. package/dist/interactions/portable-custom/extractor.js +1 -0
  266. package/dist/interactions/portable-custom/extractor.js.map +1 -0
  267. package/dist/interactions/portable-custom/index.d.ts +0 -1
  268. package/dist/interactions/portable-custom/index.js +1 -0
  269. package/dist/interactions/portable-custom/index.js.map +1 -0
  270. package/dist/interactions/portable-custom/types.d.ts +0 -1
  271. package/dist/interactions/portable-custom/types.js +1 -0
  272. package/dist/interactions/portable-custom/types.js.map +1 -0
  273. package/dist/interactions/position-object/extractor.d.ts +0 -1
  274. package/dist/interactions/position-object/extractor.js +1 -0
  275. package/dist/interactions/position-object/extractor.js.map +1 -0
  276. package/dist/interactions/position-object/index.d.ts +0 -1
  277. package/dist/interactions/position-object/index.js +1 -0
  278. package/dist/interactions/position-object/index.js.map +1 -0
  279. package/dist/interactions/position-object/types.d.ts +0 -1
  280. package/dist/interactions/position-object/types.js +1 -0
  281. package/dist/interactions/position-object/types.js.map +1 -0
  282. package/dist/interactions/select-point/extractor.d.ts +0 -1
  283. package/dist/interactions/select-point/extractor.js +1 -0
  284. package/dist/interactions/select-point/extractor.js.map +1 -0
  285. package/dist/interactions/select-point/index.d.ts +0 -1
  286. package/dist/interactions/select-point/index.js +1 -0
  287. package/dist/interactions/select-point/index.js.map +1 -0
  288. package/dist/interactions/select-point/types.d.ts +0 -1
  289. package/dist/interactions/select-point/types.js +1 -0
  290. package/dist/interactions/select-point/types.js.map +1 -0
  291. package/dist/interactions/shared/index.d.ts +0 -1
  292. package/dist/interactions/shared/index.js +1 -0
  293. package/dist/interactions/shared/index.js.map +1 -0
  294. package/dist/interactions/shared/types.d.ts +0 -1
  295. package/dist/interactions/shared/types.js +1 -0
  296. package/dist/interactions/shared/types.js.map +1 -0
  297. package/dist/interactions/slider/extractor.d.ts +0 -1
  298. package/dist/interactions/slider/extractor.js +1 -0
  299. package/dist/interactions/slider/extractor.js.map +1 -0
  300. package/dist/interactions/slider/index.d.ts +0 -1
  301. package/dist/interactions/slider/index.js +1 -0
  302. package/dist/interactions/slider/index.js.map +1 -0
  303. package/dist/interactions/slider/types.d.ts +0 -1
  304. package/dist/interactions/slider/types.js +1 -0
  305. package/dist/interactions/slider/types.js.map +1 -0
  306. package/dist/interactions/text-entry/extractor.d.ts +0 -1
  307. package/dist/interactions/text-entry/extractor.js +1 -0
  308. package/dist/interactions/text-entry/extractor.js.map +1 -0
  309. package/dist/interactions/text-entry/index.d.ts +0 -1
  310. package/dist/interactions/text-entry/index.js +1 -0
  311. package/dist/interactions/text-entry/index.js.map +1 -0
  312. package/dist/interactions/text-entry/types.d.ts +0 -1
  313. package/dist/interactions/text-entry/types.js +1 -0
  314. package/dist/interactions/text-entry/types.js.map +1 -0
  315. package/dist/interactions/upload/extractor.d.ts +0 -1
  316. package/dist/interactions/upload/extractor.js +1 -0
  317. package/dist/interactions/upload/extractor.js.map +1 -0
  318. package/dist/interactions/upload/index.d.ts +0 -1
  319. package/dist/interactions/upload/index.js +1 -0
  320. package/dist/interactions/upload/index.js.map +1 -0
  321. package/dist/interactions/upload/types.d.ts +0 -1
  322. package/dist/interactions/upload/types.js +1 -0
  323. package/dist/interactions/upload/types.js.map +1 -0
  324. package/dist/pci/PciHost.d.ts +0 -1
  325. package/dist/pci/PciHost.js +1 -0
  326. package/dist/pci/PciHost.js.map +1 -0
  327. package/dist/pci/types.d.ts +0 -1
  328. package/dist/pci/types.js +1 -0
  329. package/dist/pci/types.js.map +1 -0
  330. package/dist/pnp/applyPnp.d.ts +0 -1
  331. package/dist/pnp/applyPnp.js +1 -0
  332. package/dist/pnp/applyPnp.js.map +1 -0
  333. package/dist/pnp/parsePnpXml.d.ts +0 -1
  334. package/dist/pnp/parsePnpXml.js +1 -0
  335. package/dist/pnp/parsePnpXml.js.map +1 -0
  336. package/dist/pnp/types.d.ts +0 -1
  337. package/dist/pnp/types.js +1 -0
  338. package/dist/pnp/types.js.map +1 -0
  339. package/dist/presentation/itemPresentationPlan.d.ts +0 -1
  340. package/dist/presentation/itemPresentationPlan.js +2 -2
  341. package/dist/presentation/itemPresentationPlan.js.map +1 -0
  342. package/dist/server.d.ts +0 -1
  343. package/dist/server.js +1 -0
  344. package/dist/server.js.map +1 -0
  345. package/dist/types/index.d.ts +0 -1
  346. package/dist/types/index.js +1 -0
  347. package/dist/types/index.js.map +1 -0
  348. package/dist/types/responseValidation.d.ts +0 -1
  349. package/dist/types/responseValidation.js +1 -0
  350. package/dist/types/responseValidation.js.map +1 -0
  351. package/dist/utils/PerformanceMonitor.d.ts +0 -1
  352. package/dist/utils/PerformanceMonitor.js +1 -0
  353. package/dist/utils/PerformanceMonitor.js.map +1 -0
  354. package/dist/utils/drawingUtils.d.ts +0 -1
  355. package/dist/utils/drawingUtils.js +1 -0
  356. package/dist/utils/drawingUtils.js.map +1 -0
  357. package/dist/utils/responseUtils.d.ts +0 -1
  358. package/dist/utils/responseUtils.js +1 -0
  359. package/dist/utils/responseUtils.js.map +1 -0
  360. package/dist/web-components/QTIInteractionBase.d.ts +0 -1
  361. package/dist/web-components/QTIInteractionBase.js +1 -0
  362. package/dist/web-components/QTIInteractionBase.js.map +1 -0
  363. package/dist/web-components/QTIInteractionElement.d.ts +0 -1
  364. package/dist/web-components/QTIInteractionElement.js +1 -0
  365. package/dist/web-components/QTIInteractionElement.js.map +1 -0
  366. package/dist/web-components/index.d.ts +0 -1
  367. package/dist/web-components/index.js +1 -0
  368. package/dist/web-components/index.js.map +1 -0
  369. package/package.json +6 -6
  370. package/dist/catalog/applyGlossaryTriggers.d.ts.map +0 -1
  371. package/dist/catalog/catalogExtractor.d.ts.map +0 -1
  372. package/dist/catalog/catalogLookup.d.ts.map +0 -1
  373. package/dist/catalog/glossaryAction.d.ts.map +0 -1
  374. package/dist/catalog/types.d.ts.map +0 -1
  375. package/dist/components/actions/typesetAction.d.ts.map +0 -1
  376. package/dist/components/utils/assignProps.d.ts +0 -2
  377. package/dist/components/utils/assignProps.d.ts.map +0 -1
  378. package/dist/components/utils/assignProps.js +0 -1
  379. package/dist/components/utils/feedbackUtils.d.ts.map +0 -1
  380. package/dist/components/utils/index.d.ts.map +0 -1
  381. package/dist/components/utils/stimulusRender.d.ts.map +0 -1
  382. package/dist/components/utils/stylesheetRender.d.ts.map +0 -1
  383. package/dist/core/ComponentRegistry.d.ts.map +0 -1
  384. package/dist/core/ItemRenderer.d.ts +0 -91
  385. package/dist/core/ItemRenderer.d.ts.map +0 -1
  386. package/dist/core/ItemRenderer.js +0 -248
  387. package/dist/core/Player.d.ts.map +0 -1
  388. package/dist/core/Plugin.d.ts.map +0 -1
  389. package/dist/core/PluginManager.d.ts.map +0 -1
  390. package/dist/core/constants.d.ts.map +0 -1
  391. package/dist/core/declarations.d.ts.map +0 -1
  392. package/dist/core/parsingLimits.d.ts.map +0 -1
  393. package/dist/core/random.d.ts.map +0 -1
  394. package/dist/core/rolePolicy.d.ts.map +0 -1
  395. package/dist/core/sanitizer.d.ts.map +0 -1
  396. package/dist/core/trustedTypes.d.ts.map +0 -1
  397. package/dist/core/urlPolicy.d.ts.map +0 -1
  398. package/dist/document/AssessmentItemDocument.d.ts.map +0 -1
  399. package/dist/extensions/MathLiveEditor.d.ts.map +0 -1
  400. package/dist/extraction/ExtractionRegistry.d.ts.map +0 -1
  401. package/dist/extraction/createContext.d.ts.map +0 -1
  402. package/dist/extraction/extractors/associateExtractor.d.ts +0 -2
  403. package/dist/extraction/extractors/associateExtractor.d.ts.map +0 -1
  404. package/dist/extraction/extractors/associateExtractor.js +0 -1
  405. package/dist/extraction/extractors/choiceExtractor.d.ts +0 -2
  406. package/dist/extraction/extractors/choiceExtractor.d.ts.map +0 -1
  407. package/dist/extraction/extractors/choiceExtractor.js +0 -1
  408. package/dist/extraction/extractors/customExtractor.d.ts +0 -2
  409. package/dist/extraction/extractors/customExtractor.d.ts.map +0 -1
  410. package/dist/extraction/extractors/customExtractor.js +0 -1
  411. package/dist/extraction/extractors/drawingExtractor.d.ts +0 -2
  412. package/dist/extraction/extractors/drawingExtractor.d.ts.map +0 -1
  413. package/dist/extraction/extractors/drawingExtractor.js +0 -1
  414. package/dist/extraction/extractors/endAttemptExtractor.d.ts +0 -2
  415. package/dist/extraction/extractors/endAttemptExtractor.d.ts.map +0 -1
  416. package/dist/extraction/extractors/endAttemptExtractor.js +0 -1
  417. package/dist/extraction/extractors/extendedTextExtractor.d.ts +0 -2
  418. package/dist/extraction/extractors/extendedTextExtractor.d.ts.map +0 -1
  419. package/dist/extraction/extractors/extendedTextExtractor.js +0 -1
  420. package/dist/extraction/extractors/gapMatchExtractor.d.ts +0 -2
  421. package/dist/extraction/extractors/gapMatchExtractor.d.ts.map +0 -1
  422. package/dist/extraction/extractors/gapMatchExtractor.js +0 -1
  423. package/dist/extraction/extractors/graphicAssociateExtractor.d.ts +0 -2
  424. package/dist/extraction/extractors/graphicAssociateExtractor.d.ts.map +0 -1
  425. package/dist/extraction/extractors/graphicAssociateExtractor.js +0 -1
  426. package/dist/extraction/extractors/graphicGapMatchExtractor.d.ts +0 -2
  427. package/dist/extraction/extractors/graphicGapMatchExtractor.d.ts.map +0 -1
  428. package/dist/extraction/extractors/graphicGapMatchExtractor.js +0 -1
  429. package/dist/extraction/extractors/graphicOrderExtractor.d.ts +0 -2
  430. package/dist/extraction/extractors/graphicOrderExtractor.d.ts.map +0 -1
  431. package/dist/extraction/extractors/graphicOrderExtractor.js +0 -1
  432. package/dist/extraction/extractors/hotspotExtractor.d.ts +0 -2
  433. package/dist/extraction/extractors/hotspotExtractor.d.ts.map +0 -1
  434. package/dist/extraction/extractors/hotspotExtractor.js +0 -1
  435. package/dist/extraction/extractors/hottextExtractor.d.ts +0 -2
  436. package/dist/extraction/extractors/hottextExtractor.d.ts.map +0 -1
  437. package/dist/extraction/extractors/hottextExtractor.js +0 -1
  438. package/dist/extraction/extractors/index.d.ts +0 -9
  439. package/dist/extraction/extractors/index.d.ts.map +0 -1
  440. package/dist/extraction/extractors/index.js +0 -8
  441. package/dist/extraction/extractors/inlineChoiceExtractor.d.ts +0 -2
  442. package/dist/extraction/extractors/inlineChoiceExtractor.d.ts.map +0 -1
  443. package/dist/extraction/extractors/inlineChoiceExtractor.js +0 -1
  444. package/dist/extraction/extractors/matchExtractor.d.ts +0 -2
  445. package/dist/extraction/extractors/matchExtractor.d.ts.map +0 -1
  446. package/dist/extraction/extractors/matchExtractor.js +0 -1
  447. package/dist/extraction/extractors/mediaExtractor.d.ts +0 -2
  448. package/dist/extraction/extractors/mediaExtractor.d.ts.map +0 -1
  449. package/dist/extraction/extractors/mediaExtractor.js +0 -1
  450. package/dist/extraction/extractors/orderExtractor.d.ts +0 -2
  451. package/dist/extraction/extractors/orderExtractor.d.ts.map +0 -1
  452. package/dist/extraction/extractors/orderExtractor.js +0 -1
  453. package/dist/extraction/extractors/portableCustomExtractor.d.ts +0 -2
  454. package/dist/extraction/extractors/portableCustomExtractor.d.ts.map +0 -1
  455. package/dist/extraction/extractors/portableCustomExtractor.js +0 -1
  456. package/dist/extraction/extractors/positionObjectExtractor.d.ts +0 -2
  457. package/dist/extraction/extractors/positionObjectExtractor.d.ts.map +0 -1
  458. package/dist/extraction/extractors/positionObjectExtractor.js +0 -1
  459. package/dist/extraction/extractors/selectPointExtractor.d.ts +0 -2
  460. package/dist/extraction/extractors/selectPointExtractor.d.ts.map +0 -1
  461. package/dist/extraction/extractors/selectPointExtractor.js +0 -1
  462. package/dist/extraction/extractors/sliderExtractor.d.ts +0 -2
  463. package/dist/extraction/extractors/sliderExtractor.d.ts.map +0 -1
  464. package/dist/extraction/extractors/sliderExtractor.js +0 -1
  465. package/dist/extraction/extractors/textEntryExtractor.d.ts +0 -2
  466. package/dist/extraction/extractors/textEntryExtractor.d.ts.map +0 -1
  467. package/dist/extraction/extractors/textEntryExtractor.js +0 -1
  468. package/dist/extraction/extractors/uploadExtractor.d.ts +0 -2
  469. package/dist/extraction/extractors/uploadExtractor.d.ts.map +0 -1
  470. package/dist/extraction/extractors/uploadExtractor.js +0 -1
  471. package/dist/extraction/index.d.ts.map +0 -1
  472. package/dist/extraction/interactionExtractionPipeline.d.ts.map +0 -1
  473. package/dist/extraction/interactionSecurity.d.ts.map +0 -1
  474. package/dist/extraction/types.d.ts.map +0 -1
  475. package/dist/extraction/utils.d.ts.map +0 -1
  476. package/dist/iframe/IFramePlayerHost.d.ts.map +0 -1
  477. package/dist/iframe/index.d.ts.map +0 -1
  478. package/dist/iframe/protocol.d.ts.map +0 -1
  479. package/dist/index.d.ts.map +0 -1
  480. package/dist/interactions/associate/extractor.d.ts.map +0 -1
  481. package/dist/interactions/associate/index.d.ts.map +0 -1
  482. package/dist/interactions/associate/types.d.ts.map +0 -1
  483. package/dist/interactions/choice/extractor.d.ts.map +0 -1
  484. package/dist/interactions/choice/index.d.ts.map +0 -1
  485. package/dist/interactions/choice/types.d.ts.map +0 -1
  486. package/dist/interactions/custom/extractor.d.ts.map +0 -1
  487. package/dist/interactions/custom/index.d.ts.map +0 -1
  488. package/dist/interactions/custom/types.d.ts.map +0 -1
  489. package/dist/interactions/drawing/extractor.d.ts.map +0 -1
  490. package/dist/interactions/drawing/index.d.ts.map +0 -1
  491. package/dist/interactions/drawing/types.d.ts.map +0 -1
  492. package/dist/interactions/end-attempt/extractor.d.ts.map +0 -1
  493. package/dist/interactions/end-attempt/index.d.ts.map +0 -1
  494. package/dist/interactions/end-attempt/types.d.ts.map +0 -1
  495. package/dist/interactions/extended-text/extractor.d.ts.map +0 -1
  496. package/dist/interactions/extended-text/index.d.ts.map +0 -1
  497. package/dist/interactions/extended-text/types.d.ts.map +0 -1
  498. package/dist/interactions/gap-match/extractor.d.ts.map +0 -1
  499. package/dist/interactions/gap-match/index.d.ts.map +0 -1
  500. package/dist/interactions/gap-match/types.d.ts.map +0 -1
  501. package/dist/interactions/graphic-associate/extractor.d.ts.map +0 -1
  502. package/dist/interactions/graphic-associate/index.d.ts.map +0 -1
  503. package/dist/interactions/graphic-associate/types.d.ts.map +0 -1
  504. package/dist/interactions/graphic-gap-match/extractor.d.ts.map +0 -1
  505. package/dist/interactions/graphic-gap-match/index.d.ts.map +0 -1
  506. package/dist/interactions/graphic-gap-match/types.d.ts.map +0 -1
  507. package/dist/interactions/graphic-order/extractor.d.ts.map +0 -1
  508. package/dist/interactions/graphic-order/index.d.ts.map +0 -1
  509. package/dist/interactions/graphic-order/types.d.ts.map +0 -1
  510. package/dist/interactions/hotspot/extractor.d.ts.map +0 -1
  511. package/dist/interactions/hotspot/index.d.ts.map +0 -1
  512. package/dist/interactions/hotspot/types.d.ts.map +0 -1
  513. package/dist/interactions/hottext/extractor.d.ts.map +0 -1
  514. package/dist/interactions/hottext/index.d.ts.map +0 -1
  515. package/dist/interactions/hottext/types.d.ts.map +0 -1
  516. package/dist/interactions/index.d.ts.map +0 -1
  517. package/dist/interactions/inline/index.d.ts.map +0 -1
  518. package/dist/interactions/inline/render-plan.d.ts.map +0 -1
  519. package/dist/interactions/inline-choice/extractor.d.ts.map +0 -1
  520. package/dist/interactions/inline-choice/index.d.ts.map +0 -1
  521. package/dist/interactions/inline-choice/types.d.ts.map +0 -1
  522. package/dist/interactions/match/extractor.d.ts.map +0 -1
  523. package/dist/interactions/match/index.d.ts.map +0 -1
  524. package/dist/interactions/match/types.d.ts.map +0 -1
  525. package/dist/interactions/media/extractor.d.ts.map +0 -1
  526. package/dist/interactions/media/index.d.ts.map +0 -1
  527. package/dist/interactions/media/types.d.ts.map +0 -1
  528. package/dist/interactions/modules.d.ts.map +0 -1
  529. package/dist/interactions/order/extractor.d.ts.map +0 -1
  530. package/dist/interactions/order/index.d.ts.map +0 -1
  531. package/dist/interactions/order/types.d.ts.map +0 -1
  532. package/dist/interactions/portable-custom/extractor.d.ts.map +0 -1
  533. package/dist/interactions/portable-custom/index.d.ts.map +0 -1
  534. package/dist/interactions/portable-custom/types.d.ts.map +0 -1
  535. package/dist/interactions/position-object/extractor.d.ts.map +0 -1
  536. package/dist/interactions/position-object/index.d.ts.map +0 -1
  537. package/dist/interactions/position-object/types.d.ts.map +0 -1
  538. package/dist/interactions/select-point/extractor.d.ts.map +0 -1
  539. package/dist/interactions/select-point/index.d.ts.map +0 -1
  540. package/dist/interactions/select-point/types.d.ts.map +0 -1
  541. package/dist/interactions/shared/index.d.ts.map +0 -1
  542. package/dist/interactions/shared/types.d.ts.map +0 -1
  543. package/dist/interactions/slider/extractor.d.ts.map +0 -1
  544. package/dist/interactions/slider/index.d.ts.map +0 -1
  545. package/dist/interactions/slider/types.d.ts.map +0 -1
  546. package/dist/interactions/text-entry/extractor.d.ts.map +0 -1
  547. package/dist/interactions/text-entry/index.d.ts.map +0 -1
  548. package/dist/interactions/text-entry/types.d.ts.map +0 -1
  549. package/dist/interactions/upload/extractor.d.ts.map +0 -1
  550. package/dist/interactions/upload/index.d.ts.map +0 -1
  551. package/dist/interactions/upload/types.d.ts.map +0 -1
  552. package/dist/pci/PciHost.d.ts.map +0 -1
  553. package/dist/pci/types.d.ts.map +0 -1
  554. package/dist/pnp/applyPnp.d.ts.map +0 -1
  555. package/dist/pnp/parsePnpXml.d.ts.map +0 -1
  556. package/dist/pnp/types.d.ts.map +0 -1
  557. package/dist/presentation/itemPresentationPlan.d.ts.map +0 -1
  558. package/dist/server.d.ts.map +0 -1
  559. package/dist/types/index.d.ts.map +0 -1
  560. package/dist/types/interactions.d.ts +0 -8
  561. package/dist/types/interactions.d.ts.map +0 -1
  562. package/dist/types/interactions.js +0 -7
  563. package/dist/types/responseValidation.d.ts.map +0 -1
  564. package/dist/utils/PerformanceMonitor.d.ts.map +0 -1
  565. package/dist/utils/drawingUtils.d.ts.map +0 -1
  566. package/dist/utils/responseUtils.d.ts.map +0 -1
  567. package/dist/utils/touchDragHelper.d.ts +0 -2
  568. package/dist/utils/touchDragHelper.d.ts.map +0 -1
  569. package/dist/utils/touchDragHelper.js +0 -1
  570. package/dist/web-components/QTIInteractionBase.d.ts.map +0 -1
  571. package/dist/web-components/QTIInteractionElement.d.ts.map +0 -1
  572. package/dist/web-components/index.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interactions/hottext/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './extractor.js';\nexport type { HottextInteractionData } from './types.js';\n"]}
@@ -1,2 +1 @@
1
1
  export type { HottextInteractionData, HottextChoice } from '../shared/types.js';
2
- //# sourceMappingURL=types.d.ts.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/interactions/hottext/types.ts"],"names":[],"mappings":"","sourcesContent":["export type { HottextInteractionData, HottextChoice } from '../shared/types.js';\n"]}
@@ -30,4 +30,3 @@ export * from './slider/index.js';
30
30
  export * from './text-entry/index.js';
31
31
  export * from './upload/index.js';
32
32
  export type { InteractionData, InteractionDataMap, InteractionType, InteractionValueMap, } from './shared/types.js';
33
- //# sourceMappingURL=index.d.ts.map
@@ -28,3 +28,4 @@ export * from './select-point/index.js';
28
28
  export * from './slider/index.js';
29
29
  export * from './text-entry/index.js';
30
30
  export * from './upload/index.js';
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interactions/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC","sourcesContent":["/**\n * Vertical QTI interaction modules.\n *\n * Each interaction folder owns the extractor entrypoint and interaction-specific\n * type exports. Legacy extractor and type paths re-export from this module layer.\n */\n\nexport type {\n\tAssociableChoice,\n\tAssociableHotspot,\n\tBaseInteractionData,\n\tGraphicAssociateHotspot,\n\tGraphicOrderChoice,\n\tHotspotChoice,\n\tImageData,\n\tMediaElement,\n\tPoint,\n\tPositionObjectStage,\n\tQTIElement,\n} from './shared/index.js';\n\nexport * from './associate/index.js';\nexport * from './choice/index.js';\nexport * from './custom/index.js';\nexport * from './drawing/index.js';\nexport * from './end-attempt/index.js';\nexport * from './extended-text/index.js';\nexport * from './gap-match/index.js';\nexport * from './graphic-associate/index.js';\nexport * from './graphic-gap-match/index.js';\nexport * from './graphic-order/index.js';\nexport * from './hotspot/index.js';\nexport * from './hottext/index.js';\nexport * from './inline/index.js';\nexport * from './inline-choice/index.js';\nexport * from './match/index.js';\nexport * from './media/index.js';\nexport * from './modules.js';\nexport * from './order/index.js';\nexport * from './portable-custom/index.js';\nexport * from './position-object/index.js';\nexport * from './select-point/index.js';\nexport * from './slider/index.js';\nexport * from './text-entry/index.js';\nexport * from './upload/index.js';\n\nexport type {\n\tInteractionData,\n\tInteractionDataMap,\n\tInteractionType,\n\tInteractionValueMap,\n} from './shared/types.js';\n"]}
@@ -1,2 +1 @@
1
1
  export * from './render-plan.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +1,2 @@
1
1
  export * from './render-plan.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interactions/inline/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './render-plan.js';\n"]}
@@ -16,4 +16,3 @@ export declare function isInlineInteractionType(type: string): type is InlineInt
16
16
  export declare function isInlineInteractionTagName(tagName: string): boolean;
17
17
  export declare function createInlinePlaceholderHtml(html: string, interactions: InteractionData[]): string;
18
18
  export declare function createInlineRenderPlan(html: string, interactions: InteractionData[]): InlineRenderSegment[];
19
- //# sourceMappingURL=render-plan.d.ts.map
@@ -57,3 +57,4 @@ function findInlineInteraction(interactions, responseId, type) {
57
57
  return (interactions.find((interaction) => interaction.responseId === responseId && interaction.type === type) ??
58
58
  null);
59
59
  }
60
+ //# sourceMappingURL=render-plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-plan.js","sourceRoot":"","sources":["../../../src/interactions/inline/render-plan.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,kCAAkC,EAClC,+BAA+B,GAC/B,MAAM,eAAe,CAAC;AASvB,MAAM,UAAU,uBAAuB,CAAC,IAAY;IACnD,OAAO,+BAA+B,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAAe;IACzD,OAAO,kCAAkC,CAAC,OAAO,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,IAAY,EAAE,YAA+B;IACxF,OAAO,IAAI;SACT,OAAO,CACP,iGAAiG,EACjG,CAAC,KAAK,EAAE,UAAkB,EAAE,EAAE,CAC7B,oBAAoB,CAAC,YAAY,EAAE,UAAU,EAAE,sBAAsB,CAAC;QACrE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,UAAU,CAAC;QACtC,CAAC,CAAC,KAAK,CACT;SACA,OAAO,CACP,8GAA8G,EAC9G,CAAC,KAAK,EAAE,UAAkB,EAAE,EAAE,CAC7B,oBAAoB,CAAC,YAAY,EAAE,UAAU,EAAE,sBAAsB,CAAC;QACrE,C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AAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,UAAU,KAAK,UAAU,IAAI,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC;QAC7G,IAAI,CAAuD,CAAC;AAC9D,CAAC","sourcesContent":["import type { InlineChoiceInteractionData } from '../inline-choice/types.js';\nimport type { TextEntryInteractionData } from '../text-entry/types.js';\nimport type { InteractionData } from '../shared/types.js';\nimport {\n\tisStandardInlineInteractionTagName,\n\tisStandardInlineInteractionType,\n} from '../modules.js';\n\nexport type InlineInteractionData = TextEntryInteractionData | InlineChoiceInteractionData;\n\nexport type InlineRenderSegment =\n\t| { type: 'html'; content: string }\n\t| { type: 'textEntry'; interaction: TextEntryInteractionData }\n\t| { type: 'inlineChoice'; interaction: InlineChoiceInteractionData };\n\nexport function isInlineInteractionType(type: string): type is InlineInteractionData['type'] {\n\treturn isStandardInlineInteractionType(type);\n}\n\nexport function isInlineInteractionTagName(tagName: string): boolean {\n\treturn isStandardInlineInteractionTagName(tagName);\n}\n\nexport function createInlinePlaceholderHtml(html: string, interactions: InteractionData[]): string {\n\treturn html\n\t\t.replace(\n\t\t\t/<textEntryInteraction[^>]*responseIdentifier=\"([^\"]+)\"[^>]*?(?:\\/>|><\\/textEntryInteraction>)/gi,\n\t\t\t(match, responseId: string) =>\n\t\t\t\thasInlineInteraction(interactions, responseId, 'textEntryInteraction')\n\t\t\t\t\t? placeholder('textEntry', responseId)\n\t\t\t\t\t: match\n\t\t)\n\t\t.replace(\n\t\t\t/<qti-text-entry-interaction[^>]*response-identifier=\"([^\"]+)\"[^>]*?(?:\\/>|><\\/qti-text-entry-interaction>)/gi,\n\t\t\t(match, responseId: string) =>\n\t\t\t\thasInlineInteraction(interactions, responseId, 'textEntryInteraction')\n\t\t\t\t\t? placeholder('textEntry', responseId)\n\t\t\t\t\t: match\n\t\t)\n\t\t.replace(\n\t\t\t/<inlineChoiceInteraction[^>]*responseIdentifier=\"([^\"]+)\"[^>]*>[\\s\\S]*?<\\/inlineChoiceInteraction>/gi,\n\t\t\t(match, responseId: string) =>\n\t\t\t\thasInlineInteraction(interactions, responseId, 'inlineChoiceInteraction')\n\t\t\t\t\t? placeholder('inlineChoice', responseId)\n\t\t\t\t\t: match\n\t\t)\n\t\t.replace(\n\t\t\t/<qti-inline-choice-interaction[^>]*response-identifier=\"([^\"]+)\"[^>]*>[\\s\\S]*?<\\/qti-inline-choice-interaction>/gi,\n\t\t\t(match, responseId: string) =>\n\t\t\t\thasInlineInteraction(interactions, responseId, 'inlineChoiceInteraction')\n\t\t\t\t\t? placeholder('inlineChoice', responseId)\n\t\t\t\t\t: match\n\t\t);\n}\n\nexport function createInlineRenderPlan(html: string, interactions: InteractionData[]): InlineRenderSegment[] {\n\tconst placeholderHtml = createInlinePlaceholderHtml(html, interactions);\n\tconst result: InlineRenderSegment[] = [];\n\tconst combinedPattern = /\\[TEXTENTRY:([^\\]]+)\\]|\\[INLINECHOICE:([^\\]]+)\\]/g;\n\tlet lastIndex = 0;\n\tlet match: RegExpExecArray | null;\n\n\twhile ((match = combinedPattern.exec(placeholderHtml)) !== null) {\n\t\tif (match.index > lastIndex) {\n\t\t\tresult.push({ type: 'html', content: placeholderHtml.substring(lastIndex, match.index) });\n\t\t}\n\n\t\tif (match[0].startsWith('[TEXTENTRY:')) {\n\t\t\tconst interaction = findInlineInteraction(interactions, match[1], 'textEntryInteraction');\n\t\t\tif (interaction) result.push({ type: 'textEntry', interaction });\n\t\t} else {\n\t\t\tconst interaction = findInlineInteraction(interactions, match[2], 'inlineChoiceInteraction');\n\t\t\tif (interaction) result.push({ type: 'inlineChoice', interaction });\n\t\t}\n\n\t\tlastIndex = match.index + match[0].length;\n\t}\n\n\tif (lastIndex < placeholderHtml.length) {\n\t\tresult.push({ type: 'html', content: placeholderHtml.substring(lastIndex) });\n\t}\n\n\treturn result.length > 0 ? result : [{ type: 'html', content: placeholderHtml }];\n}\n\nfunction placeholder(kind: 'textEntry' | 'inlineChoice', responseId: string): string {\n\treturn kind === 'textEntry' ? `[TEXTENTRY:${responseId}]` : `[INLINECHOICE:${responseId}]`;\n}\n\nfunction hasInlineInteraction(\n\tinteractions: InteractionData[],\n\tresponseId: string,\n\ttype: InlineInteractionData['type']\n): boolean {\n\treturn Boolean(findInlineInteraction(interactions, responseId, type));\n}\n\nfunction findInlineInteraction<T extends InlineInteractionData['type']>(\n\tinteractions: InteractionData[],\n\tresponseId: string,\n\ttype: T\n): Extract<InlineInteractionData, { type: T }> | null {\n\treturn (interactions.find((interaction) => interaction.responseId === responseId && interaction.type === type) ??\n\t\tnull) as Extract<InlineInteractionData, { type: T }> | null;\n}\n"]}
@@ -22,4 +22,3 @@ export interface InlineChoiceData {
22
22
  * Handles inlineChoiceInteraction elements (dropdown selections within text)
23
23
  */
24
24
  export declare const standardInlineChoiceExtractor: ElementExtractor<InlineChoiceData>;
25
- //# sourceMappingURL=extractor.d.ts.map
@@ -78,3 +78,4 @@ export const standardInlineChoiceExtractor = {
78
78
  };
79
79
  },
80
80
  };
81
+ //# sourceMappingURL=extractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractor.js","sourceRoot":"","sources":["../../../src/interactions/inline-choice/extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAuC;IAChF,EAAE,EAAE,+BAA+B;IACnC,IAAI,EAAE,wCAAwC;IAC9C,QAAQ,EAAE,EAAE;IACZ,YAAY,EAAE,CAAC,yBAAyB,CAAC;IACzC,WAAW,EAAE,kEAAkE;IAE/E,SAAS,CAAC,OAAO,EAAE,QAAQ;QAC1B,oDAAoD;QACpD,OAAO,OAAO,CAAC,UAAU,KAAK,yBAAyB,IAAI,OAAO,CAAC,UAAU,KAAK,+BAA+B,CAAC;IACnH,CAAC;IAED,OAAO,CAAC,OAAO,EAAE,OAAO;QACvB,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAE1B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MAAM,CAAC,CAAC,CAAC,SAAS;YAC9C,QAAQ,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;SACpD,CAAC;IACH,CAAC;CACD,CAAC","sourcesContent":["/**\n * Standard QTI inlineChoiceInteraction extractor\n *\n * Extracts data from inlineChoiceInteraction elements (dropdown in text)\n */\n\nimport type { ElementExtractor } from '../../extraction/types.js';\n\n/**\n * Inline choice data extracted from inlineChoiceInteraction elements\n */\nexport interface InlineChoiceData {\n\tchoices: Array<{ identifier: string; text: string; fixed?: boolean }>;\n\tshuffle: boolean;\n\t/** Text from the QTI <label> child element; used as the placeholder \"Select…\" option */\n\tlabel: string | null;\n}\n\n/**\n * Standard QTI inline choice interaction extractor\n * Handles inlineChoiceInteraction elements (dropdown selections within text)\n */\nexport const standardInlineChoiceExtractor: ElementExtractor<InlineChoiceData> = {\n\tid: 'qti:inline-choice-interaction',\n\tname: 'QTI Standard Inline Choice Interaction',\n\tpriority: 10,\n\telementTypes: ['inlineChoiceInteraction'],\n\tdescription: 'Extracts standard QTI inlineChoiceInteraction (dropdown in text)',\n\n\tcanHandle(element, _context) {\n\t\t// All inlineChoiceInteraction elements are standard\n\t\treturn element.rawTagName === 'inlineChoiceInteraction' || element.rawTagName === 'qti-inline-choice-interaction';\n\t},\n\n\textract(element, context) {\n\t\tconst { utils } = context;\n\n\t\t// Extract choices (inlineChoice children)\n\t\tconst inlineChoices = utils.getChildrenByTag(element, 'inlineChoice');\n\t\tconst choices = inlineChoices.map((choice) => {\n\t\t\tconst fixed = utils.getBooleanAttribute(choice, 'fixed');\n\t\t\treturn {\n\t\t\t\tidentifier: utils.getAttribute(choice, 'identifier', ''),\n\t\t\t\ttext: utils.getTextContent(choice),\n\t\t\t\t...(fixed ? { fixed } : {}),\n\t\t\t};\n\t\t});\n\n\t\t// Extract <label> child — used as placeholder text in the dropdown\n\t\tconst labelElements = utils.getChildrenByTag(element, 'label');\n\t\tconst label = labelElements.length > 0 ? utils.getTextContent(labelElements[0]) : null;\n\n\t\t// data-prompt: alternative placeholder for the dropdown default option\n\t\tconst dataPrompt = utils.getAttribute(element, 'data-prompt', '') || null;\n\n\t\t// Extract attributes\n\t\tconst shuffle = utils.getBooleanAttribute(element, 'shuffle');\n\t\tconst interactionClasses = utils.getClasses(element);\n\n\t\treturn {\n\t\t\tchoices,\n\t\t\tshuffle,\n\t\t\tlabel,\n\t\t\t...(dataPrompt ? { dataPrompt } : {}),\n\t\t\t...(interactionClasses.length > 0 ? { interactionClasses } : {}),\n\t\t};\n\t},\n\n\tvalidate(data) {\n\t\tconst errors: string[] = [];\n\t\tconst warnings: string[] = [];\n\n\t\t// Validate choices exist\n\t\tif (!data.choices || data.choices.length === 0) {\n\t\t\terrors.push('inlineChoiceInteraction must have at least one choice');\n\t\t}\n\n\t\t// Validate choice identifiers\n\t\tif (data.choices) {\n\t\t\tconst identifiers = new Set<string>();\n\t\t\tfor (const choice of data.choices) {\n\t\t\t\tif (!choice.identifier) {\n\t\t\t\t\terrors.push('All choices must have an identifier');\n\t\t\t\t} else if (identifiers.has(choice.identifier)) {\n\t\t\t\t\terrors.push(`Duplicate choice identifier: ${choice.identifier}`);\n\t\t\t\t} else {\n\t\t\t\t\tidentifiers.add(choice.identifier);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Warn if too many choices\n\t\t\tif (data.choices.length >= 10) {\n\t\t\t\twarnings.push(\n\t\t\t\t\t`inlineChoiceInteraction has ${data.choices.length} choices - consider limiting for better usability`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tvalid: errors.length === 0,\n\t\t\terrors: errors.length > 0 ? errors : undefined,\n\t\t\twarnings: warnings.length > 0 ? warnings : undefined,\n\t\t};\n\t},\n};\n"]}
@@ -1,3 +1,2 @@
1
1
  export * from './extractor.js';
2
2
  export type { InlineChoiceInteractionData } from './types.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +1,2 @@
1
1
  export * from './extractor.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interactions/inline-choice/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './extractor.js';\nexport type { InlineChoiceInteractionData } from './types.js';\n"]}
@@ -1,2 +1 @@
1
1
  export type { InlineChoiceInteractionData } from '../shared/types.js';
2
- //# sourceMappingURL=types.d.ts.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/interactions/inline-choice/types.ts"],"names":[],"mappings":"","sourcesContent":["export type { InlineChoiceInteractionData } from '../shared/types.js';\n"]}
@@ -34,4 +34,3 @@ export interface MatchData {
34
34
  * Handles matchInteraction elements (matching pairs between two sets)
35
35
  */
36
36
  export declare const standardMatchExtractor: ElementExtractor<MatchData>;
37
- //# sourceMappingURL=extractor.d.ts.map
@@ -158,3 +158,4 @@ export const standardMatchExtractor = {
158
158
  };
159
159
  },
160
160
  };
161
+ //# sourceMappingURL=extractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractor.js","sourceRoot":"","sources":["../../../src/interactions/match/extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgBH;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IAClE,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,gCAAgC;IACtC,QAAQ,EAAE,EAAE;IACZ,YAAY,EAAE,CAAC,kBAAkB,CAAC;IAClC,WAAW,EAAE,yDAAyD;IAEtE,SAAS,CAAC,OAAO,EAAE,QAAQ;QAC1B,oEAAoE;QACpE,OAAO,OAAO,CAAC,UAAU,KAAK,kBAAkB,IAAI,OAAO,CAAC,UAAU,KAAK,uBAAuB,CAAC;IACpG,CAAC;IAED,OAAO,CAAC,OAAO,EAAE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C,CAAC;IACH,CAAC;CACD,CAAC","sourcesContent":["/**\n * Standard QTI matchInteraction extractor\n *\n * Extracts data from matchInteraction elements (matching pairs)\n */\n\nimport type { ElementExtractor } from '../../extraction/types.js';\n\n/**\n * Match data extracted from matchInteraction elements\n */\nexport interface MatchData {\n\tsourceSet: Array<{ identifier: string; text: string; matchMax: number; matchMin?: number; matchGroup?: string[]; classes?: string[] }>;\n\ttargetSet: Array<{ identifier: string; text: string; matchMax: number; matchMin?: number; matchGroup?: string[]; classes?: string[] }>;\n\tshuffle: boolean;\n\tmaxAssociations: number;\n\tminAssociations?: number;\n\tprompt: string | null;\n}\n\n/**\n * Standard QTI match interaction extractor\n * Handles matchInteraction elements (matching pairs between two sets)\n */\nexport const standardMatchExtractor: ElementExtractor<MatchData> = {\n\tid: 'qti:match-interaction',\n\tname: 'QTI Standard Match Interaction',\n\tpriority: 10,\n\telementTypes: ['matchInteraction'],\n\tdescription: 'Extracts standard QTI matchInteraction (matching pairs)',\n\n\tcanHandle(element, _context) {\n\t\t// All matchInteraction elements are standard (both QTI 2.x and 3.0)\n\t\treturn element.rawTagName === 'matchInteraction' || element.rawTagName === 'qti-match-interaction';\n\t},\n\n\textract(element, context) {\n\t\tconst { utils } = context;\n\n\t\t// Extract all simpleAssociableChoice children\n\t\tconst allChoices = utils.getChildrenByTag(element, 'simpleAssociableChoice');\n\n\t\t// Determine which are source vs target based on matchSet structure\n\t\t// In QTI, matchInteraction can have two simpleMatchSet elements\n\t\tconst matchSets = utils.getChildrenByTag(element, 'simpleMatchSet');\n\n\t\tlet sourceSet: Array<{ identifier: string; text: string; matchMax: number; matchMin?: number; matchGroup?: string[]; classes?: string[] }> = [];\n\t\tlet targetSet: Array<{ identifier: string; text: string; matchMax: number; matchMin?: number; matchGroup?: string[]; classes?: string[] }> = [];\n\n\t\tif (matchSets.length >= 2) {\n\t\t\t// Extract choices from first matchSet (source)\n\t\t\tconst sourceMatchSet = matchSets[0];\n\t\t\tconst sourceElements = utils.getChildrenByTag(sourceMatchSet, 'simpleAssociableChoice');\n\t\t\tsourceSet = sourceElements.map((choice) => {\n\t\t\t\tconst classes = utils.getClasses(choice);\n\t\t\t\tconst matchMax = utils.getNumberAttribute(choice, 'matchMax', 1);\n\t\t\t\tconst matchMin = utils.getNumberAttribute(choice, 'matchMin', 0);\n\t\t\t\tconst matchGroupRaw = utils.getAttribute(choice, 'matchGroup', '');\n\t\t\t\tconst matchGroup = matchGroupRaw.split(/\\s+/).filter(Boolean);\n\t\t\t\treturn {\n\t\t\t\t\tidentifier: utils.getAttribute(choice, 'identifier', ''),\n\t\t\t\t\ttext: utils.getHtmlContent(choice),\n\t\t\t\t\tmatchMax,\n\t\t\t\t\t...(matchMin > 0 ? { matchMin } : {}),\n\t\t\t\t\t...(matchGroup.length > 0 ? { matchGroup } : {}),\n\t\t\t\t\t...(classes.length > 0 ? { classes } : {}),\n\t\t\t\t};\n\t\t\t});\n\n\t\t\t// Extract choices from second matchSet (target)\n\t\t\tconst targetMatchSet = matchSets[1];\n\t\t\tconst targetElements = utils.getChildrenByTag(targetMatchSet, 'simpleAssociableChoice');\n\t\t\ttargetSet = targetElements.map((choice) => {\n\t\t\t\tconst classes = utils.getClasses(choice);\n\t\t\t\tconst matchMax = utils.getNumberAttribute(choice, 'matchMax', 1);\n\t\t\t\tconst matchMin = utils.getNumberAttribute(choice, 'matchMin', 0);\n\t\t\t\tconst matchGroupRaw = utils.getAttribute(choice, 'matchGroup', '');\n\t\t\t\tconst matchGroup = matchGroupRaw.split(/\\s+/).filter(Boolean);\n\t\t\t\treturn {\n\t\t\t\t\tidentifier: utils.getAttribute(choice, 'identifier', ''),\n\t\t\t\t\ttext: utils.getHtmlContent(choice),\n\t\t\t\t\tmatchMax,\n\t\t\t\t\t...(matchMin > 0 ? { matchMin } : {}),\n\t\t\t\t\t...(matchGroup.length > 0 ? { matchGroup } : {}),\n\t\t\t\t\t...(classes.length > 0 ? { classes } : {}),\n\t\t\t\t};\n\t\t\t});\n\t\t} else {\n\t\t\t// Fallback: treat all choices as both source and target\n\t\t\tconst extractedChoices = allChoices.map((choice) => {\n\t\t\t\tconst classes = utils.getClasses(choice);\n\t\t\t\tconst matchMax = utils.getNumberAttribute(choice, 'matchMax', 1);\n\t\t\t\tconst matchMin = utils.getNumberAttribute(choice, 'matchMin', 0);\n\t\t\t\tconst matchGroupRaw = utils.getAttribute(choice, 'matchGroup', '');\n\t\t\t\tconst matchGroup = matchGroupRaw.split(/\\s+/).filter(Boolean);\n\t\t\t\treturn {\n\t\t\t\t\tidentifier: utils.getAttribute(choice, 'identifier', ''),\n\t\t\t\t\ttext: utils.getHtmlContent(choice),\n\t\t\t\t\tmatchMax,\n\t\t\t\t\t...(matchMin > 0 ? { matchMin } : {}),\n\t\t\t\t\t...(matchGroup.length > 0 ? { matchGroup } : {}),\n\t\t\t\t\t...(classes.length > 0 ? { classes } : {}),\n\t\t\t\t};\n\t\t\t});\n\t\t\tsourceSet = extractedChoices;\n\t\t\ttargetSet = extractedChoices;\n\t\t}\n\n\t\t// Extract attributes\n\t\tconst shuffle = utils.getBooleanAttribute(element, 'shuffle');\n\t\tconst maxAssociations = utils.getNumberAttribute(element, 'maxAssociations', 1);\n\t\tconst minAssociationsRaw = utils.getNumberAttribute(element, 'minAssociations', 0);\n\t\tconst minAssociations = minAssociationsRaw > 0 ? minAssociationsRaw : undefined;\n\t\tconst interactionClasses = utils.getClasses(element);\n\t\tconst maxSelectionsMessage = utils.getAttribute(element, 'data-qti-max-selections-message', '') || null;\n\t\tconst minSelectionsMessage = utils.getAttribute(element, 'data-qti-min-selections-message', '') || null;\n\t\tconst firstColumnHeader = utils.getAttribute(element, 'data-qti-first-column-header', '') || null;\n\n\t\t// Extract prompt (optional)\n\t\tconst promptElements = utils.getChildrenByTag(element, 'prompt');\n\t\tconst prompt = promptElements.length > 0 ? utils.getHtmlContent(promptElements[0]) : null;\n\n\t\treturn {\n\t\t\tsourceSet,\n\t\t\ttargetSet,\n\t\t\tshuffle,\n\t\t\tmaxAssociations,\n\t\t\t...(minAssociations !== undefined ? { minAssociations } : {}),\n\t\t\tprompt,\n\t\t\t...(interactionClasses.length > 0 ? { interactionClasses } : {}),\n\t\t\t...(maxSelectionsMessage ? { maxSelectionsMessage } : {}),\n\t\t\t...(minSelectionsMessage ? { minSelectionsMessage } : {}),\n\t\t\t...(firstColumnHeader ? { firstColumnHeader } : {}),\n\t\t};\n\t},\n\n\tvalidate(data) {\n\t\tconst errors: string[] = [];\n\n\t\t// Validate source choices exist\n\t\tif (!data.sourceSet || data.sourceSet.length === 0) {\n\t\t\terrors.push('matchInteraction must have at least one source choice');\n\t\t}\n\n\t\t// Validate target choices exist\n\t\tif (!data.targetSet || data.targetSet.length === 0) {\n\t\t\terrors.push('matchInteraction must have at least one target choice');\n\t\t}\n\n\t\t// Validate choice identifiers\n\t\tif (data.sourceSet) {\n\t\t\tconst identifiers = new Set<string>();\n\t\t\tfor (const choice of data.sourceSet) {\n\t\t\t\tif (!choice.identifier) {\n\t\t\t\t\terrors.push('All source choices must have an identifier');\n\t\t\t\t} else if (identifiers.has(choice.identifier)) {\n\t\t\t\t\terrors.push(`Duplicate source identifier: ${choice.identifier}`);\n\t\t\t\t} else {\n\t\t\t\t\tidentifiers.add(choice.identifier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (data.targetSet) {\n\t\t\tconst identifiers = new Set<string>();\n\t\t\tfor (const choice of data.targetSet) {\n\t\t\t\tif (!choice.identifier) {\n\t\t\t\t\terrors.push('All target choices must have an identifier');\n\t\t\t\t} else if (identifiers.has(choice.identifier)) {\n\t\t\t\t\terrors.push(`Duplicate target identifier: ${choice.identifier}`);\n\t\t\t\t} else {\n\t\t\t\t\tidentifiers.add(choice.identifier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Validate maxAssociations\n\t\tif (data.maxAssociations < 0) {\n\t\t\terrors.push('maxAssociations must be non-negative');\n\t\t}\n\n\t\treturn {\n\t\t\tvalid: errors.length === 0,\n\t\t\terrors: errors.length > 0 ? errors : undefined,\n\t\t};\n\t},\n};\n"]}
@@ -1,3 +1,2 @@
1
1
  export * from './extractor.js';
2
2
  export type { MatchInteractionData } from './types.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +1,2 @@
1
1
  export * from './extractor.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interactions/match/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './extractor.js';\nexport type { MatchInteractionData } from './types.js';\n"]}
@@ -1,2 +1 @@
1
1
  export type { MatchInteractionData, AssociableChoice } from '../shared/types.js';
2
- //# sourceMappingURL=types.d.ts.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/interactions/match/types.ts"],"names":[],"mappings":"","sourcesContent":["export type { MatchInteractionData, AssociableChoice } from '../shared/types.js';\n"]}
@@ -30,4 +30,3 @@ export interface MediaData {
30
30
  * Handles mediaInteraction elements (video/audio playback with interaction)
31
31
  */
32
32
  export declare const standardMediaExtractor: ElementExtractor<MediaData>;
33
- //# sourceMappingURL=extractor.d.ts.map
@@ -123,3 +123,4 @@ export const standardMediaExtractor = {
123
123
  };
124
124
  },
125
125
  };
126
+ //# sourceMappingURL=extractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractor.js","sourceRoot":"","sources":["../../../src/interactions/media/extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA2BH;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IAClE,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,gCAAgC;IACtC,QAAQ,EAAE,EAAE;IACZ,YAAY,EAAE,CAAC,kBAAkB,CAAC;IAClC,WAAW,EAAE,+DAA+D;IAE5E,SAAS,CAAC,OAAO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,MAAM,QAAQ,GAAa,EAAE,CAAC;QAE9B,gCAAgC;QAChC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACxB,MAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QAC1D,CAAC;QAED,4BAA4B;QAC5B,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC9C,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC9C,CAAC;QAED,0EAA0E;QAC1E,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACxD,MAAM,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,QAAQ,gDAAgD,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QACzG,CAAC;QAED,qCAAqC;QACrC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;YACpC,QAAQ,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC;QACrF,CAAC;QAED,OAAO;YACN,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;YAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YAC9C,QAAQ,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;SACpD,CAAC;IACH,CAAC;CACD,CAAC","sourcesContent":["/**\n * Standard QTI mediaInteraction extractor\n *\n * Extracts data from mediaInteraction elements (video/audio playback)\n */\n\nimport type { ElementExtractor } from '../../extraction/types.js';\n\n/**\n * Media element data\n */\nexport interface MediaElement {\n\ttype: 'audio' | 'video' | 'object';\n\tsrc: string;\n\tmimeType: string;\n\twidth?: number;\n\theight?: number;\n}\n\n/**\n * Media data extracted from mediaInteraction elements\n */\nexport interface MediaData {\n\tmediaElement: MediaElement | null;\n\tautostart: boolean;\n\tminPlays: number;\n\tmaxPlays: number;\n\tloop: boolean;\n\tprompt: string | null;\n}\n\n/**\n * Standard QTI media interaction extractor\n * Handles mediaInteraction elements (video/audio playback with interaction)\n */\nexport const standardMediaExtractor: ElementExtractor<MediaData> = {\n\tid: 'qti:media-interaction',\n\tname: 'QTI Standard Media Interaction',\n\tpriority: 10,\n\telementTypes: ['mediaInteraction'],\n\tdescription: 'Extracts standard QTI mediaInteraction (video/audio playback)',\n\n\tcanHandle(element, _context) {\n\t\t// All mediaInteraction elements are standard\n\t\treturn element.rawTagName === 'mediaInteraction';\n\t},\n\n\textract(element, context) {\n\t\tconst { utils } = context;\n\n\t\t// Extract attributes\n\t\tconst autostart = utils.getBooleanAttribute(element, 'autostart', false);\n\t\tconst minPlays = utils.getNumberAttribute(element, 'minPlays', 0);\n\t\tconst maxPlays = utils.getNumberAttribute(element, 'maxPlays', 0);\n\t\tconst loop = utils.getBooleanAttribute(element, 'loop', false);\n\n\t\t// Extract prompt (optional)\n\t\tconst promptElements = utils.getChildrenByTag(element, 'prompt');\n\t\tconst prompt = promptElements.length > 0 ? utils.getHtmlContent(promptElements[0]) : null;\n\n\t\t// Extract media element (audio, video, or object)\n\t\tlet mediaElement: MediaElement | null = null;\n\n\t\t// Check for audio element\n\t\tconst audioElements = utils.getChildrenByTag(element, 'audio');\n\t\tif (audioElements.length > 0) {\n\t\t\tconst audioElement = audioElements[0];\n\t\t\tconst sourceElements = utils.getChildrenByTag(audioElement, 'source');\n\t\t\tif (sourceElements.length === 0) {\n\t\t\t\tthrow new Error('audio element must contain at least one source element');\n\t\t\t}\n\t\t\tconst firstSource = sourceElements[0];\n\t\t\tmediaElement = {\n\t\t\t\ttype: 'audio',\n\t\t\t\tsrc: utils.getAttribute(firstSource, 'src', ''),\n\t\t\t\tmimeType: utils.getAttribute(firstSource, 'type', ''),\n\t\t\t};\n\t\t}\n\n\t\t// Check for video element\n\t\tconst videoElements = utils.getChildrenByTag(element, 'video');\n\t\tif (videoElements.length > 0) {\n\t\t\tconst videoElement = videoElements[0];\n\t\t\tconst sourceElements = utils.getChildrenByTag(videoElement, 'source');\n\t\t\tif (sourceElements.length === 0) {\n\t\t\t\tthrow new Error('video element must contain at least one source element');\n\t\t\t}\n\t\t\tconst firstSource = sourceElements[0];\n\t\t\tconst width = utils.getNumberAttribute(videoElement, 'width', 640);\n\t\t\tconst height = utils.getNumberAttribute(videoElement, 'height', 480);\n\t\t\tmediaElement = {\n\t\t\t\ttype: 'video',\n\t\t\t\tsrc: utils.getAttribute(firstSource, 'src', ''),\n\t\t\t\tmimeType: utils.getAttribute(firstSource, 'type', ''),\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t};\n\t\t}\n\n\t\t// Check for object element\n\t\tconst objectElements = utils.getChildrenByTag(element, 'object');\n\t\tif (objectElements.length > 0) {\n\t\t\tconst objectElement = objectElements[0];\n\t\t\tconst data = utils.getAttribute(objectElement, 'data', '');\n\t\t\tif (!data) {\n\t\t\t\tthrow new Error('object element must have data attribute');\n\t\t\t}\n\t\t\tconst width = utils.getNumberAttribute(objectElement, 'width', 0);\n\t\t\tconst height = utils.getNumberAttribute(objectElement, 'height', 0);\n\t\t\tmediaElement = {\n\t\t\t\ttype: 'object',\n\t\t\t\tsrc: data,\n\t\t\t\tmimeType: utils.getAttribute(objectElement, 'type', ''),\n\t\t\t\t...(width > 0 ? { width } : {}),\n\t\t\t\t...(height > 0 ? { height } : {}),\n\t\t\t};\n\t\t}\n\n\t\t// Throw error if no media element found\n\t\tif (!mediaElement) {\n\t\t\tthrow new Error('mediaInteraction must contain audio, video, or object element');\n\t\t}\n\n\t\treturn {\n\t\t\tmediaElement,\n\t\t\tautostart,\n\t\t\tminPlays,\n\t\t\tmaxPlays,\n\t\t\tloop,\n\t\t\tprompt,\n\t\t};\n\t},\n\n\tvalidate(data) {\n\t\tconst errors: string[] = [];\n\t\tconst warnings: string[] = [];\n\n\t\t// Validate media element exists\n\t\tif (!data.mediaElement) {\n\t\t\terrors.push('mediaInteraction must have a mediaElement');\n\t\t}\n\n\t\t// Validate play constraints\n\t\tif (data.minPlays < 0) {\n\t\t\terrors.push('minPlays must be non-negative');\n\t\t}\n\n\t\tif (data.maxPlays < 0) {\n\t\t\terrors.push('maxPlays must be non-negative');\n\t\t}\n\n\t\t// Validate minPlays <= maxPlays (when maxPlays > 0, as 0 means unlimited)\n\t\tif (data.maxPlays > 0 && data.minPlays > data.maxPlays) {\n\t\t\terrors.push(`maxPlays (${data.maxPlays}) must be greater than or equal to minPlays (${data.minPlays})`);\n\t\t}\n\n\t\t// Warn if loop is true with maxPlays\n\t\tif (data.loop && data.maxPlays > 0) {\n\t\t\twarnings.push('mediaInteraction has loop=true with maxPlays - loop may be ignored');\n\t\t}\n\n\t\treturn {\n\t\t\tvalid: errors.length === 0,\n\t\t\terrors: errors.length > 0 ? errors : undefined,\n\t\t\twarnings: warnings.length > 0 ? warnings : undefined,\n\t\t};\n\t},\n};\n"]}
@@ -1,3 +1,2 @@
1
1
  export * from './extractor.js';
2
2
  export type { MediaInteractionData } from './types.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +1,2 @@
1
1
  export * from './extractor.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interactions/media/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './extractor.js';\nexport type { MediaInteractionData } from './types.js';\n"]}
@@ -1,2 +1 @@
1
1
  export type { MediaInteractionData, MediaElement } from '../shared/types.js';
2
- //# sourceMappingURL=types.d.ts.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/interactions/media/types.ts"],"names":[],"mappings":"","sourcesContent":["export type { MediaInteractionData, MediaElement } from '../shared/types.js';\n"]}
@@ -102,4 +102,3 @@ export declare function getStandardInteractionModule(type: string): StandardInte
102
102
  export declare function isStandardInlineInteractionType(type: string): type is 'textEntryInteraction' | 'inlineChoiceInteraction';
103
103
  export declare function isStandardBlockInteractionType(type: string): boolean;
104
104
  export declare function isStandardInlineInteractionTagName(tagName: string): boolean;
105
- //# sourceMappingURL=modules.d.ts.map
@@ -84,3 +84,4 @@ export function isStandardBlockInteractionType(type) {
84
84
  export function isStandardInlineInteractionTagName(tagName) {
85
85
  return isStandardInlineInteractionType(normalizeInteractionTypeFromTagName(tagName));
86
86
  }
87
+ //# sourceMappingURL=modules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/interactions/modules.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC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CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;IACrG,CAAC;IACD,OAAO,0BAA0B,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,IAAY;IACxD,MAAM,cAAc,GAAG,mCAAmC,CAAC,IAAI,CAAC,CAAC;IACjE,OAAO,4BAA4B,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI,IAAI,CAAC;AAC9F,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,IAAY;IAC3D,OAAO,4BAA4B,CAAC,IAAI,CAAC,EAAE,SAAS,KAAK,QAAQ,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,IAAY;IAC1D,OAAO,4BAA4B,CAAC,IAAI,CAAC,EAAE,SAAS,KAAK,OAAO,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,kCAAkC,CAAC,OAAe;IACjE,OAAO,+BAA+B,CAAC,mCAAmC,CAAC,OAAO,CAAC,CAAC,CAAC;AACtF,CAAC","sourcesContent":["import type { ElementExtractor } from '../extraction/types.js';\nimport type { InteractionDataMap } from './shared/types.js';\nimport { standardAssociateExtractor } from './associate/index.js';\nimport { standardChoiceExtractor } from './choice/index.js';\nimport { standardCustomExtractor } from './custom/index.js';\nimport { standardDrawingExtractor } from './drawing/index.js';\nimport { standardEndAttemptExtractor } from './end-attempt/index.js';\nimport { standardExtendedTextExtractor } from './extended-text/index.js';\nimport { standardGapMatchExtractor } from './gap-match/index.js';\nimport { standardGraphicAssociateExtractor } from './graphic-associate/index.js';\nimport { standardGraphicGapMatchExtractor } from './graphic-gap-match/index.js';\nimport { standardGraphicOrderExtractor } from './graphic-order/index.js';\nimport { standardHotspotExtractor } from './hotspot/index.js';\nimport { standardHottextExtractor } from './hottext/index.js';\nimport { standardInlineChoiceExtractor } from './inline-choice/index.js';\nimport { standardMatchExtractor } from './match/index.js';\nimport { standardMediaExtractor } from './media/index.js';\nimport { standardOrderExtractor } from './order/index.js';\nimport { standardPositionObjectExtractor } from './position-object/index.js';\nimport { standardSelectPointExtractor } from './select-point/index.js';\nimport { standardSliderExtractor } from './slider/index.js';\nimport { standardTextEntryExtractor } from './text-entry/index.js';\nimport { standardUploadExtractor } from './upload/index.js';\n\nexport type StandardInteractionType = keyof InteractionDataMap;\nexport type InteractionPlacement = 'block' | 'inline';\n\nexport interface StandardInteractionModule {\n\ttype: StandardInteractionType;\n\textractor: ElementExtractor;\n\tplacement: InteractionPlacement;\n}\n\nexport const STANDARD_INTERACTION_MODULES = [\n\t{ type: 'choiceInteraction', extractor: standardChoiceExtractor, placement: 'block' },\n\t{ type: 'textEntryInteraction', extractor: standardTextEntryExtractor, placement: 'inline' },\n\t{ type: 'extendedTextInteraction', extractor: standardExtendedTextExtractor, placement: 'block' },\n\t{ type: 'inlineChoiceInteraction', extractor: standardInlineChoiceExtractor, placement: 'inline' },\n\t{ type: 'orderInteraction', extractor: standardOrderExtractor, placement: 'block' },\n\t{ type: 'matchInteraction', extractor: standardMatchExtractor, placement: 'block' },\n\t{ type: 'associateInteraction', extractor: standardAssociateExtractor, placement: 'block' },\n\t{ type: 'gapMatchInteraction', extractor: standardGapMatchExtractor, placement: 'block' },\n\t{ type: 'sliderInteraction', extractor: standardSliderExtractor, placement: 'block' },\n\t{ type: 'hotspotInteraction', extractor: standardHotspotExtractor, placement: 'block' },\n\t{ type: 'graphicGapMatchInteraction', extractor: standardGraphicGapMatchExtractor, placement: 'block' },\n\t{ type: 'uploadInteraction', extractor: standardUploadExtractor, placement: 'block' },\n\t{ type: 'drawingInteraction', extractor: standardDrawingExtractor, placement: 'block' },\n\t{ type: 'customInteraction', extractor: standardCustomExtractor, placement: 'block' },\n\t{ type: 'mediaInteraction', extractor: standardMediaExtractor, placement: 'block' },\n\t{ type: 'hottextInteraction', extractor: standardHottextExtractor, placement: 'block' },\n\t{ type: 'selectPointInteraction', extractor: standardSelectPointExtractor, placement: 'block' },\n\t{ type: 'graphicOrderInteraction', extractor: standardGraphicOrderExtractor, placement: 'block' },\n\t{ type: 'graphicAssociateInteraction', extractor: standardGraphicAssociateExtractor, placement: 'block' },\n\t{ type: 'positionObjectInteraction', extractor: standardPositionObjectExtractor, placement: 'block' },\n\t{ type: 'endAttemptInteraction', extractor: standardEndAttemptExtractor, placement: 'block' },\n] as const satisfies readonly StandardInteractionModule[];\n\nexport function getStandardInteractionModules(): readonly StandardInteractionModule[] {\n\treturn STANDARD_INTERACTION_MODULES;\n}\n\nexport function getStandardBlockInteractionModules(): readonly StandardInteractionModule[] {\n\treturn STANDARD_INTERACTION_MODULES.filter((module) => module.placement === 'block');\n}\n\nexport function getStandardInlineInteractionModules(): readonly StandardInteractionModule[] {\n\treturn STANDARD_INTERACTION_MODULES.filter((module) => module.placement === 'inline');\n}\n\nexport function getStandardInteractionExtractors(): readonly ElementExtractor[] {\n\treturn STANDARD_INTERACTION_MODULES.map((module) => module.extractor);\n}\n\nexport function getStandardInteractionElementTypes(): string[] {\n\tconst elementTypes = new Set<string>();\n\tfor (const module of STANDARD_INTERACTION_MODULES) {\n\t\tfor (const elementType of module.extractor.elementTypes) {\n\t\t\telementTypes.add(elementType);\n\t\t}\n\t}\n\treturn [...elementTypes];\n}\n\nconst STANDARD_TYPE_BY_LOWERCASE = new Map(\n\tSTANDARD_INTERACTION_MODULES.map((module) => [module.type.toLowerCase(), module.type])\n);\n\nexport function normalizeInteractionTypeFromTagName(tagName: string): string {\n\tconst lowerTagName = tagName.toLowerCase();\n\tif (lowerTagName.startsWith('qti-')) {\n\t\treturn lowerTagName.slice(4).replace(/-([a-z])/g, (_match, letter: string) => letter.toUpperCase());\n\t}\n\treturn STANDARD_TYPE_BY_LOWERCASE.get(lowerTagName) ?? tagName;\n}\n\nexport function getStandardInteractionModule(type: string): StandardInteractionModule | null {\n\tconst normalizedType = normalizeInteractionTypeFromTagName(type);\n\treturn STANDARD_INTERACTION_MODULES.find((module) => module.type === normalizedType) ?? null;\n}\n\nexport function isStandardInlineInteractionType(type: string): type is 'textEntryInteraction' | 'inlineChoiceInteraction' {\n\treturn getStandardInteractionModule(type)?.placement === 'inline';\n}\n\nexport function isStandardBlockInteractionType(type: string): boolean {\n\treturn getStandardInteractionModule(type)?.placement === 'block';\n}\n\nexport function isStandardInlineInteractionTagName(tagName: string): boolean {\n\treturn isStandardInlineInteractionType(normalizeInteractionTypeFromTagName(tagName));\n}\n"]}
@@ -25,4 +25,3 @@ export interface OrderData {
25
25
  * Handles orderInteraction elements with simpleChoice children
26
26
  */
27
27
  export declare const standardOrderExtractor: ElementExtractor<OrderData>;
28
- //# sourceMappingURL=extractor.d.ts.map
@@ -88,3 +88,4 @@ export const standardOrderExtractor = {
88
88
  };
89
89
  },
90
90
  };
91
+ //# sourceMappingURL=extractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractor.js","sourceRoot":"","sources":["../../../src/interactions/order/extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgBH;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IAClE,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,gCAAgC;IACtC,QAAQ,EAAE,EAAE;IACZ,YAAY,EAAE,CAAC,kBAAkB,CAAC;IAClC,WAAW,EAAE,iEAAiE;IAE9E,SAAS,CAAC,OAAO,EAAE,OAAO;QACzB,6DAA6D;QAC7D,OAAO,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,CAAC,OAAO,EAAE,OAAO;QACvB,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAE1B,kBAAkB;QAClB,MAAM,aAAa,GAAG,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QACtE,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,M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E,CAAC;gBACnD,QAAQ,CAAC,IAAI,CACZ,gBAAgB,IAAI,CAAC,WAAW,gCAAgC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC/F,CAAC;YACH,CAAC;QACF,CAAC;QAED,OAAO;YACN,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;YAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YAC9C,QAAQ,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;SACpD,CAAC;IACH,CAAC;CACD,CAAC","sourcesContent":["/**\n * Standard QTI orderInteraction extractor\n *\n * Extracts data from orderInteraction elements (ordering/ranking tasks)\n */\n\nimport type { ElementExtractor } from '../../extraction/types.js';\n\n/**\n * Order data extracted from orderInteraction elements\n */\nexport interface OrderData {\n\tchoices: Array<{ identifier: string; text: string; fixed?: boolean; classes?: string[] }>;\n\tshuffle: boolean;\n\tminChoices: number;\n\tmaxChoices: number;\n\torientation?: string;\n\tprompt: string | null;\n}\n\n/**\n * Standard QTI order interaction extractor\n * Handles orderInteraction elements with simpleChoice children\n */\nexport const standardOrderExtractor: ElementExtractor<OrderData> = {\n\tid: 'qti:order-interaction',\n\tname: 'QTI Standard Order Interaction',\n\tpriority: 10,\n\telementTypes: ['orderInteraction'],\n\tdescription: 'Extracts standard QTI orderInteraction (ordering/ranking tasks)',\n\n\tcanHandle(element, context) {\n\t\t// Standard QTI order interactions have simpleChoice children\n\t\treturn context.utils.hasChildWithTag(element, 'simpleChoice');\n\t},\n\n\textract(element, context) {\n\t\tconst { utils } = context;\n\n\t\t// Extract choices\n\t\tconst simpleChoices = utils.getChildrenByTag(element, 'simpleChoice');\n\t\tconst choices = simpleChoices.map((choice) => {\n\t\t\tconst classes = utils.getClasses(choice);\n\t\t\tconst fixed = utils.getBooleanAttribute(choice, 'fixed');\n\n\t\t\treturn {\n\t\t\t\tidentifier: utils.getAttribute(choice, 'identifier', ''),\n\t\t\t\ttext: utils.getHtmlContent(choice),\n\t\t\t\t...(fixed ? { fixed } : {}),\n\t\t\t\t...(classes.length > 0 ? { classes } : {}),\n\t\t\t};\n\t\t});\n\n\t\t// Extract prompt\n\t\tconst promptElement = utils.querySelector(element, 'prompt');\n\t\tconst prompt = promptElement ? utils.getHtmlContent(promptElement) : null;\n\n\t\t// Extract attributes\n\t\tconst shuffle = utils.getBooleanAttribute(element, 'shuffle');\n\t\tconst orientation = utils.getAttribute(element, 'orientation', 'vertical');\n\t\tconst minChoices = utils.getNumberAttribute(element, 'minChoices', 0);\n\t\tconst maxChoices = utils.getNumberAttribute(element, 'maxChoices', 0);\n\n\t\treturn {\n\t\t\tchoices,\n\t\t\tshuffle,\n\t\t\torientation,\n\t\t\tminChoices,\n\t\t\tmaxChoices,\n\t\t\tprompt,\n\t\t};\n\t},\n\n\tvalidate(data) {\n\t\tconst errors: string[] = [];\n\t\tconst warnings: string[] = [];\n\n\t\t// Validate choices exist\n\t\tif (!data.choices || data.choices.length < 2) {\n\t\t\terrors.push('orderInteraction must have at least 2 choices');\n\t\t}\n\n\t\t// Warn if too many choices (difficult to order)\n\t\tif (data.choices && data.choices.length > 10) {\n\t\t\twarnings.push(\n\t\t\t\t`orderInteraction has ${data.choices.length} choices - this may be difficult for users to order`\n\t\t\t);\n\t\t}\n\n\t\t// Validate choice identifiers\n\t\tif (data.choices) {\n\t\t\tconst identifiers = new Set<string>();\n\t\t\tfor (const choice of data.choices) {\n\t\t\t\tif (!choice.identifier) {\n\t\t\t\t\terrors.push('All choices must have an identifier');\n\t\t\t\t} else if (identifiers.has(choice.identifier)) {\n\t\t\t\t\terrors.push(`Duplicate choice identifier: ${choice.identifier}`);\n\t\t\t\t} else {\n\t\t\t\t\tidentifiers.add(choice.identifier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Validate orientation (only if provided)\n\t\tif (data.orientation) {\n\t\t\tconst validOrientations = ['vertical', 'horizontal'];\n\t\t\tif (!validOrientations.includes(data.orientation)) {\n\t\t\t\twarnings.push(\n\t\t\t\t\t`orientation '${data.orientation}' is not standard (expected: ${validOrientations.join(', ')})`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tvalid: errors.length === 0,\n\t\t\terrors: errors.length > 0 ? errors : undefined,\n\t\t\twarnings: warnings.length > 0 ? warnings : undefined,\n\t\t};\n\t},\n};\n"]}
@@ -1,3 +1,2 @@
1
1
  export * from './extractor.js';
2
2
  export type { OrderInteractionData } from './types.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +1,2 @@
1
1
  export * from './extractor.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interactions/order/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './extractor.js';\nexport type { OrderInteractionData } from './types.js';\n"]}
@@ -1,2 +1 @@
1
1
  export type { OrderInteractionData } from '../shared/types.js';
2
- //# sourceMappingURL=types.d.ts.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/interactions/order/types.ts"],"names":[],"mappings":"","sourcesContent":["export type { OrderInteractionData } from '../shared/types.js';\n"]}
@@ -11,4 +11,3 @@ import type { ExtractedPci } from '../../pci/types.js';
11
11
  * both would match the same element.
12
12
  */
13
13
  export declare const portableCustomExtractor: ElementExtractor<ExtractedPci>;
14
- //# sourceMappingURL=extractor.d.ts.map
@@ -94,3 +94,4 @@ export const portableCustomExtractor = {
94
94
  return { valid: errors.length === 0, errors: errors.length ? errors : undefined, warnings: warnings.length ? warnings : undefined };
95
95
  },
96
96
  };
97
+ //# sourceMappingURL=extractor.js.map
@@ -0,0 +1 @@
1
+ {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/types.js';\nimport type { ExtractedPci } from '../../pci/types.js';\n\n/**\n * Extractor for <qti-portable-custom-interaction> (QTI 3.0) and\n * <portableCustomInteraction> (QTI 2.x vendor extension).\n *\n * Extracts the module paths, markup, and config properties needed by PciHost\n * to load and initialize the PCI JavaScript module.\n *\n * Priority 20 > standardCustomExtractor priority 10, so this runs first when\n * both would match the same element.\n */\nexport const portableCustomExtractor: ElementExtractor<ExtractedPci> = {\n\tid: 'qti:portable-custom-interaction',\n\tname: 'QTI Portable Custom Interaction',\n\tpriority: 20,\n\telementTypes: [\n\t\t'portableCustomInteraction',\n\t\t'qti-portable-custom-interaction',\n\t],\n\tdescription: 'Extracts QTI 3.0 portable custom interaction module paths, markup, and config',\n\n\tcanHandle(element, _context) {\n\t\tconst tag = element.rawTagName?.toLowerCase() ?? '';\n\t\treturn (\n\t\t\ttag === 'qti-portable-custom-interaction' ||\n\t\t\ttag === 'portablecustominteraction'\n\t\t);\n\t},\n\n\textract(element, context) {\n\t\tconst { utils } = context;\n\n\t\tconst responseIdentifier = utils.getAttribute(element, 'responseIdentifier') ||\n\t\t\tutils.getAttribute(element, 'response-identifier') || '';\n\n\t\tconst customInteractionTypeIdentifier =\n\t\t\tutils.getAttribute(element, 'customInteractionTypeIdentifier') ||\n\t\t\tutils.getAttribute(element, 'custom-interaction-type-identifier') || '';\n\n\t\t// --- Module paths from <qti-interaction-modules>/<qti-interaction-module> ---\n\t\t// These element names ARE in the standard QTI 3.0 element mapper so utils.querySelector works.\n\t\tlet primaryPath = '';\n\t\tlet fallbackPath: string | undefined;\n\n\t\tconst modulesEl =\n\t\t\tutils.querySelector(element, 'qti-interaction-modules') ??\n\t\t\tutils.querySelector(element, 'interactionmodules');\n\n\t\tif (modulesEl) {\n\t\t\tconst moduleEl =\n\t\t\t\tutils.querySelector(modulesEl, 'qti-interaction-module') ??\n\t\t\t\tutils.querySelector(modulesEl, 'interactionmodule');\n\n\t\t\tif (moduleEl) {\n\t\t\t\tprimaryPath =\n\t\t\t\t\tutils.getAttribute(moduleEl, 'primaryPath') ||\n\t\t\t\t\tutils.getAttribute(moduleEl, 'primary-path') || '';\n\t\t\t\tconst fb =\n\t\t\t\t\tutils.getAttribute(moduleEl, 'fallbackPath') ||\n\t\t\t\t\tutils.getAttribute(moduleEl, 'fallback-path') || '';\n\t\t\t\tif (fb) fallbackPath = fb;\n\t\t\t}\n\t\t}\n\n\t\t// --- Markup from <qti-interaction-markup> ---\n\t\tconst markupEl =\n\t\t\tutils.querySelector(element, 'qti-interaction-markup') ??\n\t\t\tutils.querySelector(element, 'interactionmarkup');\n\n\t\tconst markup = markupEl ? utils.getHtmlContent(markupEl) : '';\n\n\t\t// --- Config from <qti-pci-properties>/<qti-pci-property> ---\n\t\t// qti-pci-properties is NOT in the standard QTI 3.0 element mapper, so we use the\n\t\t// native node-html-parser querySelector (available as element.querySelector on the raw element).\n\t\tconst config: Record<string, string> = {};\n\n\t\tconst rawEl = element as any;\n\t\tconst propsEl =\n\t\t\trawEl.querySelector?.('qti-pci-properties') ??\n\t\t\trawEl.querySelector?.('pciproperties');\n\n\t\tif (propsEl) {\n\t\t\tconst propEls: any[] = [\n\t\t\t\t...(propsEl.querySelectorAll?.('qti-pci-property') ?? []),\n\t\t\t\t...(propsEl.querySelectorAll?.('pciproperty') ?? []),\n\t\t\t];\n\t\t\tfor (const propEl of propEls) {\n\t\t\t\tconst key = propEl.getAttribute?.('key') || propEl.getAttribute?.('name') || '';\n\t\t\t\tconst value = propEl.getAttribute?.('value') || (propEl.textContent ?? '').trim() || '';\n\t\t\t\tif (key) config[key] = value;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tresponseIdentifier,\n\t\t\tcustomInteractionTypeIdentifier,\n\t\t\tprimaryPath,\n\t\t\tfallbackPath,\n\t\t\tmarkup,\n\t\t\tconfig,\n\t\t};\n\t},\n\n\tvalidate(data) {\n\t\tconst errors: string[] = [];\n\t\tconst warnings: string[] = [];\n\n\t\tif (!data.responseIdentifier) {\n\t\t\terrors.push('portableCustomInteraction is missing responseIdentifier');\n\t\t}\n\t\tif (!data.customInteractionTypeIdentifier) {\n\t\t\twarnings.push('portableCustomInteraction is missing customInteractionTypeIdentifier');\n\t\t}\n\t\tif (!data.primaryPath) {\n\t\t\terrors.push('portableCustomInteraction has no primaryPath in qti-interaction-modules');\n\t\t}\n\n\t\treturn { valid: errors.length === 0, errors: errors.length ? errors : undefined, warnings: warnings.length ? warnings : undefined };\n\t},\n};\n"]}
@@ -1,3 +1,2 @@
1
1
  export * from './extractor.js';
2
2
  export type { CustomInteractionData } from './types.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +1,2 @@
1
1
  export * from './extractor.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interactions/portable-custom/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './extractor.js';\nexport type { CustomInteractionData } from './types.js';\n"]}
@@ -1,2 +1 @@
1
1
  export type { CustomInteractionData } from '../shared/types.js';
2
- //# sourceMappingURL=types.d.ts.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/interactions/portable-custom/types.ts"],"names":[],"mappings":"","sourcesContent":["export type { CustomInteractionData } from '../shared/types.js';\n"]}
@@ -56,4 +56,3 @@ export interface PositionObjectData {
56
56
  * Handles positionObjectInteraction elements (dragging an object to a position)
57
57
  */
58
58
  export declare const standardPositionObjectExtractor: ElementExtractor<PositionObjectData>;
59
- //# sourceMappingURL=extractor.d.ts.map
@@ -189,3 +189,4 @@ export const standardPositionObjectExtractor = {
189
189
  };
190
190
  },
191
191
  };
192
+ //# sourceMappingURL=extractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractor.js","sourceRoot":"","sources":["../../../src/interactions/position-object/extractor.ts"],"names":[],"mapp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YAC9D,MAAM,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;QACpD,CAAC;QAED,OAAO;YACN,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;YAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YAC9C,QAAQ,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;SACpD,CAAC;IACH,CAAC;CACD,CAAC","sourcesContent":["/**\n * Standard QTI positionObjectInteraction extractor\n *\n * Extracts data from positionObjectInteraction elements (drag objects to positions)\n *\n * ⚠️ IMPORTANT: QTI 2.2 positionObjectInteraction Limitations\n *\n * This interaction has severe limitations that make it impractical for most educational scenarios:\n *\n * 1. Response format is baseType=\"point\" - only stores coordinates [\"158 168\"]\n * 2. NO way to track which specific object was placed where\n * 3. Designed ONLY for placing multiple copies of the SAME object (e.g., airport icons)\n * 4. Cannot support \"place labeled objects on map\" use cases\n *\n * The official QTI 2.2 spec example shows:\n * - ONE positionObjectStage (container) with background image\n * - ONE positionObjectInteraction with ONE draggable object\n * - maxChoices determines how many times the object can be placed\n * - Scoring uses areaMapping to check if ANY placement hits target zones\n *\n * This extractor supports a NON-STANDARD extension with multiple positionObjectStage\n * elements (each with identifiers), but the response format cannot preserve object identity.\n * For labeled-object placement, use graphicGapMatchInteraction instead.\n */\n\nimport type { ElementExtractor } from '../../extraction/types.js';\n\n/**\n * Image data for position object interaction\n */\nexport interface ImageData {\n\ttype: 'image' | 'svg';\n\tsrc?: string;\n\tcontent?: string;\n\twidth?: string;\n\theight?: string;\n}\n\n/**\n * Position object data extracted from positionObjectInteraction elements\n */\nexport interface PositionObjectData {\n\timageData: ImageData | null;\n\tpositionObjectStages: Array<{\n\t\tidentifier: string;\n\t\tlabel: string;\n\t\tmatchMax: number;\n\t\tmatchMin?: number;\n\t\tobjectData: ImageData | null;\n\t\tclasses?: string[];\n\t}>;\n\tcenterPoint: boolean;\n\tmaxChoices: number;\n\tminChoices: number;\n\tprompt: string | null;\n}\n\n/**\n * Standard QTI position object interaction extractor\n * Handles positionObjectInteraction elements (dragging an object to a position)\n */\nexport const standardPositionObjectExtractor: ElementExtractor<PositionObjectData> = {\n\tid: 'qti:position-object-interaction',\n\tname: 'QTI Standard Position Object Interaction',\n\tpriority: 10,\n\telementTypes: ['positionObjectInteraction'],\n\tdescription: 'Extracts standard QTI positionObjectInteraction (drag object to position)',\n\n\tcanHandle(element, _context) {\n\t\t// All positionObjectInteraction elements are standard\n\t\treturn element.rawTagName === 'positionObjectInteraction';\n\t},\n\n\textract(element, context) {\n\t\tconst { utils } = context;\n\n\t\t// Extract background image data from object element (direct child)\n\t\tconst objectElements = utils.getChildrenByTag(element, 'object');\n\t\tlet imageData: ImageData | null = null;\n\n\t\tif (objectElements.length > 0) {\n\t\t\tconst objectElement = objectElements[0];\n\t\t\tconst type = utils.getAttribute(objectElement, 'type', '');\n\t\t\tconst data = utils.getAttribute(objectElement, 'data', '');\n\t\t\tconst width = utils.getAttribute(objectElement, 'width', '500');\n\t\t\tconst height = utils.getAttribute(objectElement, 'height', '300');\n\n\t\t\tif (type.startsWith('image/svg')) {\n\t\t\t\t// Extract inline SVG content - get full content including <svg> tag\n\t\t\t\tconst content = utils.getHtmlContent(objectElement);\n\t\t\t\timageData = {\n\t\t\t\t\ttype: 'svg',\n\t\t\t\t\tcontent,\n\t\t\t\t\twidth,\n\t\t\t\t\theight,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// External image reference\n\t\t\t\timageData = {\n\t\t\t\t\ttype: 'image',\n\t\t\t\t\tsrc: data,\n\t\t\t\t\twidth,\n\t\t\t\t\theight,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Extract positionObjectStage children\n\t\tconst stageElements = utils.getChildrenByTag(element, 'positionObjectStage');\n\t\tconst positionObjectStages = stageElements.map((stage) => {\n\t\t\tconst classes = utils.getClasses(stage);\n\t\t\tconst identifier = utils.getAttribute(stage, 'identifier', '');\n\t\t\tconst matchMax = utils.getNumberAttribute(stage, 'matchMax', 1);\n\t\t\tconst matchMin = utils.getNumberAttribute(stage, 'matchMin', 0);\n\n\t\t\t// Get text content as label, use identifier as fallback\n\t\t\tconst textContent = utils.getTextContent(stage).trim();\n\t\t\tconst label = textContent || identifier;\n\n\t\t\t// Extract object data from nested object element\n\t\t\tconst stageObjectElements = utils.getChildrenByTag(stage, 'object');\n\t\t\tlet objectData: ImageData | null = null;\n\n\t\t\tif (stageObjectElements.length > 0) {\n\t\t\t\tconst objElement = stageObjectElements[0];\n\t\t\t\tconst objType = utils.getAttribute(objElement, 'type', '');\n\t\t\t\tconst objData = utils.getAttribute(objElement, 'data', '');\n\t\t\t\tconst objWidth = utils.getAttribute(objElement, 'width', '50');\n\t\t\t\tconst objHeight = utils.getAttribute(objElement, 'height', '50');\n\n\t\t\t\tif (objType.startsWith('image/svg')) {\n\t\t\t\t\t// Extract inline SVG content\n\t\t\t\t\tconst content = utils.getHtmlContent(objElement);\n\t\t\t\t\tobjectData = {\n\t\t\t\t\t\ttype: 'svg',\n\t\t\t\t\t\tcontent,\n\t\t\t\t\t\twidth: objWidth,\n\t\t\t\t\t\theight: objHeight,\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t// External image reference\n\t\t\t\t\tobjectData = {\n\t\t\t\t\t\ttype: 'image',\n\t\t\t\t\t\tsrc: objData,\n\t\t\t\t\t\twidth: objWidth,\n\t\t\t\t\t\theight: objHeight,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tidentifier,\n\t\t\t\tlabel,\n\t\t\t\tmatchMax,\n\t\t\t\t...(matchMin > 0 ? { matchMin } : {}),\n\t\t\t\tobjectData,\n\t\t\t\t...(classes.length > 0 ? { classes } : {}),\n\t\t\t};\n\t\t});\n\n\t\t// Extract attributes\n\t\t// centerPoint defaults to true when not specified\n\t\tconst centerPoint = utils.getBooleanAttribute(element, 'centerPoint', true);\n\t\tconst maxChoices = utils.getNumberAttribute(element, 'maxChoices', 0);\n\t\tconst minChoices = utils.getNumberAttribute(element, 'minChoices', 0);\n\n\t\t// Extract prompt (optional)\n\t\tconst promptElements = utils.getChildrenByTag(element, 'prompt');\n\t\tconst prompt = promptElements.length > 0 ? utils.getHtmlContent(promptElements[0]) : null;\n\n\t\treturn {\n\t\t\timageData,\n\t\t\tpositionObjectStages,\n\t\t\tcenterPoint,\n\t\t\tmaxChoices,\n\t\t\tminChoices,\n\t\t\tprompt,\n\t\t};\n\t},\n\n\tvalidate(data) {\n\t\tconst errors: string[] = [];\n\t\tconst warnings: string[] = [];\n\n\t\t// Validate image data\n\t\tif (!data.imageData) {\n\t\t\twarnings.push('positionObjectInteraction has no background image');\n\t\t} else if (data.imageData.type === 'image' && !data.imageData.src) {\n\t\t\terrors.push('positionObjectInteraction must have an image URL');\n\t\t} else if (data.imageData.type === 'svg' && !data.imageData.content) {\n\t\t\terrors.push('positionObjectInteraction must have SVG content');\n\t\t}\n\n\t\t// Warn about dimension consistency (cannot verify actual file dimensions at extraction time)\n\t\tif (data.imageData && data.imageData.type === 'image') {\n\t\t\twarnings.push(\n\t\t\t\t'IMPORTANT: Ensure declared width/height match actual image file dimensions. ' +\n\t\t\t\t\t'Mismatched dimensions cause coordinate system errors in mapResponsePoint scoring. ' +\n\t\t\t\t\t`Declared: ${data.imageData.width || 'unspecified'}×${data.imageData.height || 'unspecified'}`\n\t\t\t);\n\t\t}\n\n\t\t// Validate positionObjectStages exist\n\t\tif (!data.positionObjectStages || data.positionObjectStages.length === 0) {\n\t\t\terrors.push('positionObjectInteraction must have at least one positionObjectStage');\n\t\t}\n\n\t\t// Validate positionObjectStage identifiers\n\t\tif (data.positionObjectStages) {\n\t\t\tconst identifiers = new Set<string>();\n\t\t\tfor (const stage of data.positionObjectStages) {\n\t\t\t\tif (!stage.identifier) {\n\t\t\t\t\terrors.push('All positionObjectStages must have an identifier');\n\t\t\t\t} else if (identifiers.has(stage.identifier)) {\n\t\t\t\t\terrors.push(`Duplicate positionObjectStage identifier: ${stage.identifier}`);\n\t\t\t\t} else {\n\t\t\t\t\tidentifiers.add(stage.identifier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Validate maxChoices\n\t\tif (data.maxChoices < 0) {\n\t\t\terrors.push('maxChoices must be non-negative');\n\t\t}\n\n\t\t// Validate minChoices\n\t\tif (data.minChoices < 0) {\n\t\t\terrors.push('minChoices must be non-negative');\n\t\t}\n\n\t\t// Validate minChoices <= maxChoices\n\t\tif (data.maxChoices > 0 && data.minChoices > data.maxChoices) {\n\t\t\terrors.push('minChoices cannot exceed maxChoices');\n\t\t}\n\n\t\treturn {\n\t\t\tvalid: errors.length === 0,\n\t\t\terrors: errors.length > 0 ? errors : undefined,\n\t\t\twarnings: warnings.length > 0 ? warnings : undefined,\n\t\t};\n\t},\n};\n"]}
@@ -1,3 +1,2 @@
1
1
  export * from './extractor.js';
2
2
  export type { PositionObjectInteractionData } from './types.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +1,2 @@
1
1
  export * from './extractor.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interactions/position-object/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './extractor.js';\nexport type { PositionObjectInteractionData } from './types.js';\n"]}
@@ -1,2 +1 @@
1
1
  export type { PositionObjectInteractionData, PositionObjectStage } from '../shared/types.js';
2
- //# sourceMappingURL=types.d.ts.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/interactions/position-object/types.ts"],"names":[],"mappings":"","sourcesContent":["export type { PositionObjectInteractionData, PositionObjectStage } from '../shared/types.js';\n"]}
@@ -28,4 +28,3 @@ export interface SelectPointData {
28
28
  * Handles selectPointInteraction elements (clicking points on an image)
29
29
  */
30
30
  export declare const standardSelectPointExtractor: ElementExtractor<SelectPointData>;
31
- //# sourceMappingURL=extractor.d.ts.map
@@ -107,3 +107,4 @@ export const standardSelectPointExtractor = {
107
107
  };
108
108
  },
109
109
  };
110
+ //# sourceMappingURL=extractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractor.js","sourceRoot":"","sources":["../../../src/interactions/select-point/extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyBH;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAsC;IAC9E,EAAE,EAAE,8BAA8B;IAClC,IAAI,EAAE,uCAAuC;IAC7C,QAAQ,EAAE,EAAE;IACZ,YAAY,EAAE,CAAC,wBAAwB,CAAC;IACxC,WAAW,EAAE,qEAAqE;IAElF,SAAS,CAAC,OAAO,EAAE,QAAQ;QAC1B,mDAAmD;QACnD,OAAO,OAAO,CAAC,UAAU,KAAK,wBAAwB,CAAC;IACxD,CAAC;IAED,OAAO,CAAC,OAAO,EAAE,OAAO;QACvB,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAE1B,gDAAgD;QAChD,MAAM,cAAc,GAAG,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACjE,MAAM,WAAW,GAAG,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC3D,IAAI,SAAS,GAAqB,IAAI,CAAC;QAEvC,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,MAAM,aAAa,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;YACxC,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;YAC3D,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC,aAAa,EAA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AChD,CAAC;QAED,gFAAgF;QAChF,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YAC9D,MAAM,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,UAAU,+CAA+C,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QAC9G,CAAC;QAED,OAAO;YACN,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;YAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YAC9C,QAAQ,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;SACpD,CAAC;IACH,CAAC;CACD,CAAC","sourcesContent":["/**\n * Standard QTI selectPointInteraction extractor\n *\n * Extracts data from selectPointInteraction elements (click point on image)\n */\n\nimport type { ElementExtractor } from '../../extraction/types.js';\n\n/**\n * Image data for select point interaction\n */\nexport interface ImageData {\n\ttype: 'image' | 'svg';\n\tsrc?: string;\n\tcontent?: string;\n\twidth?: string;\n\theight?: string;\n}\n\n/**\n * Select point data extracted from selectPointInteraction elements\n */\nexport interface SelectPointData {\n\timageData: ImageData | null;\n\tmaxChoices: number;\n\tminChoices: number;\n\tprompt: string | null;\n}\n\n/**\n * Standard QTI select point interaction extractor\n * Handles selectPointInteraction elements (clicking points on an image)\n */\nexport const standardSelectPointExtractor: ElementExtractor<SelectPointData> = {\n\tid: 'qti:select-point-interaction',\n\tname: 'QTI Standard Select Point Interaction',\n\tpriority: 10,\n\telementTypes: ['selectPointInteraction'],\n\tdescription: 'Extracts standard QTI selectPointInteraction (click point on image)',\n\n\tcanHandle(element, _context) {\n\t\t// All selectPointInteraction elements are standard\n\t\treturn element.rawTagName === 'selectPointInteraction';\n\t},\n\n\textract(element, context) {\n\t\tconst { utils } = context;\n\n\t\t// Extract image data from object or img element\n\t\tconst objectElements = utils.getChildrenByTag(element, 'object');\n\t\tconst imgElements = utils.getChildrenByTag(element, 'img');\n\t\tlet imageData: ImageData | null = null;\n\n\t\tif (objectElements.length > 0) {\n\t\t\tconst objectElement = objectElements[0];\n\t\t\tconst type = utils.getAttribute(objectElement, 'type', '');\n\t\t\tconst data = utils.getAttribute(objectElement, 'data', '');\n\t\t\tconst width = utils.getAttribute(objectElement, 'width', '500');\n\t\t\tconst height = utils.getAttribute(objectElement, 'height', '300');\n\n\t\t\tif (type.startsWith('image/svg')) {\n\t\t\t\t// Extract inline SVG content - get full content including <svg> tag\n\t\t\t\tconst content = utils.getHtmlContent(objectElement);\n\t\t\t\timageData = {\n\t\t\t\t\ttype: 'svg',\n\t\t\t\t\tcontent,\n\t\t\t\t\twidth,\n\t\t\t\t\theight,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// External image reference\n\t\t\t\timageData = {\n\t\t\t\t\ttype: 'image',\n\t\t\t\t\tsrc: data,\n\t\t\t\t\twidth,\n\t\t\t\t\theight,\n\t\t\t\t};\n\t\t\t}\n\t\t} else if (imgElements.length > 0) {\n\t\t\t// Handle img element as fallback\n\t\t\tconst imgElement = imgElements[0];\n\t\t\tconst src = utils.getAttribute(imgElement, 'src', '');\n\t\t\tconst width = utils.getAttribute(imgElement, 'width', '500');\n\t\t\tconst height = utils.getAttribute(imgElement, 'height', '300');\n\t\t\timageData = {\n\t\t\t\ttype: 'image',\n\t\t\t\tsrc,\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t};\n\t\t}\n\n\t\t// Extract attributes\n\t\tconst maxChoices = utils.getNumberAttribute(element, 'maxChoices', 1);\n\t\tconst minChoices = utils.getNumberAttribute(element, 'minChoices', 0);\n\n\t\t// Extract prompt (optional)\n\t\tconst promptElements = utils.getChildrenByTag(element, 'prompt');\n\t\tconst prompt = promptElements.length > 0 ? utils.getHtmlContent(promptElements[0]) : null;\n\n\t\treturn {\n\t\t\timageData,\n\t\t\tmaxChoices,\n\t\t\tminChoices,\n\t\t\tprompt,\n\t\t};\n\t},\n\n\tvalidate(data) {\n\t\tconst errors: string[] = [];\n\t\tconst warnings: string[] = [];\n\n\t\t// Validate image data\n\t\tif (!data.imageData) {\n\t\t\twarnings.push('selectPointInteraction has no image data');\n\t\t} else if (data.imageData.type === 'image' && !data.imageData.src) {\n\t\t\terrors.push('selectPointInteraction must have an image URL');\n\t\t} else if (data.imageData.type === 'svg' && !data.imageData.content) {\n\t\t\terrors.push('selectPointInteraction must have SVG content');\n\t\t}\n\n\t\t// Validate maxChoices — 0 means unlimited per QTI spec\n\t\tif (data.maxChoices < 0) {\n\t\t\terrors.push('maxChoices must be non-negative');\n\t\t}\n\n\t\t// Validate minChoices\n\t\tif (data.minChoices < 0) {\n\t\t\terrors.push('minChoices must be non-negative');\n\t\t}\n\n\t\t// Validate minChoices <= maxChoices (skip when maxChoices=0, meaning unlimited)\n\t\tif (data.maxChoices > 0 && data.minChoices > data.maxChoices) {\n\t\t\terrors.push(`minChoices (${data.minChoices}) must be less than or equal to maxChoices (${data.maxChoices})`);\n\t\t}\n\n\t\treturn {\n\t\t\tvalid: errors.length === 0,\n\t\t\terrors: errors.length > 0 ? errors : undefined,\n\t\t\twarnings: warnings.length > 0 ? warnings : undefined,\n\t\t};\n\t},\n};\n"]}
@@ -1,3 +1,2 @@
1
1
  export * from './extractor.js';
2
2
  export type { SelectPointInteractionData } from './types.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +1,2 @@
1
1
  export * from './extractor.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interactions/select-point/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './extractor.js';\nexport type { SelectPointInteractionData } from './types.js';\n"]}
@@ -1,2 +1 @@
1
1
  export type { SelectPointInteractionData, Point, ImageData } from '../shared/types.js';
2
- //# sourceMappingURL=types.d.ts.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=types.js.map