@pie-qti/item-player 0.1.9 → 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.
- package/README.md +17 -0
- package/dist/catalog/applyGlossaryTriggers.d.ts +13 -3
- package/dist/catalog/applyGlossaryTriggers.js +1 -0
- package/dist/catalog/applyGlossaryTriggers.js.map +1 -0
- package/dist/catalog/catalogExtractor.d.ts +0 -1
- package/dist/catalog/catalogExtractor.js +1 -0
- package/dist/catalog/catalogExtractor.js.map +1 -0
- package/dist/catalog/catalogLookup.d.ts +0 -1
- package/dist/catalog/catalogLookup.js +1 -0
- package/dist/catalog/catalogLookup.js.map +1 -0
- package/dist/catalog/glossaryAction.d.ts +4 -3
- package/dist/catalog/glossaryAction.js +1 -0
- package/dist/catalog/glossaryAction.js.map +1 -0
- package/dist/catalog/types.d.ts +0 -1
- package/dist/catalog/types.js +1 -0
- package/dist/catalog/types.js.map +1 -0
- package/dist/components/actions/typesetAction.d.ts +0 -1
- package/dist/components/actions/typesetAction.js +1 -0
- package/dist/components/actions/typesetAction.js.map +1 -0
- package/dist/components/utils/feedbackUtils.d.ts +0 -1
- package/dist/components/utils/feedbackUtils.js +1 -0
- package/dist/components/utils/feedbackUtils.js.map +1 -0
- package/dist/components/utils/index.d.ts +1 -3
- package/dist/components/utils/index.js +2 -2
- package/dist/components/utils/index.js.map +1 -0
- package/dist/components/utils/stimulusRender.d.ts +0 -1
- package/dist/components/utils/stimulusRender.js +1 -0
- package/dist/components/utils/stimulusRender.js.map +1 -0
- package/dist/components/utils/stylesheetRender.d.ts +0 -1
- package/dist/components/utils/stylesheetRender.js +1 -0
- package/dist/components/utils/stylesheetRender.js.map +1 -0
- package/dist/core/ComponentRegistry.d.ts +10 -2
- package/dist/core/ComponentRegistry.js +43 -1
- package/dist/core/ComponentRegistry.js.map +1 -0
- package/dist/core/Player.d.ts +10 -3
- package/dist/core/Player.js +55 -46
- package/dist/core/Player.js.map +1 -0
- package/dist/core/Plugin.d.ts +0 -1
- package/dist/core/Plugin.js +1 -0
- package/dist/core/Plugin.js.map +1 -0
- package/dist/core/PluginManager.d.ts +0 -1
- package/dist/core/PluginManager.js +1 -0
- package/dist/core/PluginManager.js.map +1 -0
- package/dist/core/constants.d.ts +0 -1
- package/dist/core/constants.js +1 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/declarations.d.ts +0 -1
- package/dist/core/declarations.js +1 -0
- package/dist/core/declarations.js.map +1 -0
- package/dist/core/parsingLimits.d.ts +0 -1
- package/dist/core/parsingLimits.js +1 -0
- package/dist/core/parsingLimits.js.map +1 -0
- package/dist/core/random.d.ts +0 -1
- package/dist/core/random.js +1 -0
- package/dist/core/random.js.map +1 -0
- package/dist/core/rolePolicy.d.ts +0 -1
- package/dist/core/rolePolicy.js +1 -0
- package/dist/core/rolePolicy.js.map +1 -0
- package/dist/core/sanitizer.d.ts +0 -1
- package/dist/core/sanitizer.js +1 -0
- package/dist/core/sanitizer.js.map +1 -0
- package/dist/core/trustedTypes.d.ts +0 -1
- package/dist/core/trustedTypes.js +1 -0
- package/dist/core/trustedTypes.js.map +1 -0
- package/dist/core/urlPolicy.d.ts +0 -1
- package/dist/core/urlPolicy.js +1 -0
- package/dist/core/urlPolicy.js.map +1 -0
- package/dist/document/AssessmentItemDocument.d.ts +1 -2
- package/dist/document/AssessmentItemDocument.js +1 -0
- package/dist/document/AssessmentItemDocument.js.map +1 -0
- package/dist/element.d.ts +15 -0
- package/dist/element.js +1816 -1625
- package/dist/element.js.map +1 -1
- package/dist/extensions/MathLiveEditor.d.ts +0 -1
- package/dist/extensions/MathLiveEditor.js +1 -0
- package/dist/extensions/MathLiveEditor.js.map +1 -0
- package/dist/extraction/ExtractionRegistry.d.ts +1 -2
- package/dist/extraction/ExtractionRegistry.js +1 -0
- package/dist/extraction/ExtractionRegistry.js.map +1 -0
- package/dist/extraction/createContext.d.ts +1 -2
- package/dist/extraction/createContext.js +1 -0
- package/dist/extraction/createContext.js.map +1 -0
- package/dist/extraction/index.d.ts +2 -3
- package/dist/extraction/index.js +2 -1
- package/dist/extraction/index.js.map +1 -0
- package/dist/extraction/interactionExtractionPipeline.d.ts +1 -2
- package/dist/extraction/interactionExtractionPipeline.js +1 -0
- package/dist/extraction/interactionExtractionPipeline.js.map +1 -0
- package/dist/extraction/interactionSecurity.d.ts +1 -2
- package/dist/extraction/interactionSecurity.js +1 -0
- package/dist/extraction/interactionSecurity.js.map +1 -0
- package/dist/extraction/types.d.ts +1 -2
- package/dist/extraction/types.js +1 -0
- package/dist/extraction/types.js.map +1 -0
- package/dist/extraction/utils.d.ts +0 -1
- package/dist/extraction/utils.js +1 -0
- package/dist/extraction/utils.js.map +1 -0
- package/dist/iframe/IFramePlayerHost.d.ts +0 -1
- package/dist/iframe/IFramePlayerHost.js +1 -0
- package/dist/iframe/IFramePlayerHost.js.map +1 -0
- package/dist/iframe/index.d.ts +0 -1
- package/dist/iframe/index.js +1 -0
- package/dist/iframe/index.js.map +1 -0
- package/dist/iframe/protocol.d.ts +0 -1
- package/dist/iframe/protocol.js +1 -0
- package/dist/iframe/protocol.js.map +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/interactions/associate/extractor.d.ts +0 -1
- package/dist/interactions/associate/extractor.js +1 -0
- package/dist/interactions/associate/extractor.js.map +1 -0
- package/dist/interactions/associate/index.d.ts +0 -1
- package/dist/interactions/associate/index.js +1 -0
- package/dist/interactions/associate/index.js.map +1 -0
- package/dist/interactions/associate/types.d.ts +0 -1
- package/dist/interactions/associate/types.js +1 -0
- package/dist/interactions/associate/types.js.map +1 -0
- package/dist/interactions/choice/extractor.d.ts +0 -1
- package/dist/interactions/choice/extractor.js +1 -0
- package/dist/interactions/choice/extractor.js.map +1 -0
- package/dist/interactions/choice/index.d.ts +0 -1
- package/dist/interactions/choice/index.js +1 -0
- package/dist/interactions/choice/index.js.map +1 -0
- package/dist/interactions/choice/types.d.ts +0 -1
- package/dist/interactions/choice/types.js +1 -0
- package/dist/interactions/choice/types.js.map +1 -0
- package/dist/interactions/custom/extractor.d.ts +0 -1
- package/dist/interactions/custom/extractor.js +1 -0
- package/dist/interactions/custom/extractor.js.map +1 -0
- package/dist/interactions/custom/index.d.ts +0 -1
- package/dist/interactions/custom/index.js +1 -0
- package/dist/interactions/custom/index.js.map +1 -0
- package/dist/interactions/custom/types.d.ts +0 -1
- package/dist/interactions/custom/types.js +1 -0
- package/dist/interactions/custom/types.js.map +1 -0
- package/dist/interactions/drawing/extractor.d.ts +0 -1
- package/dist/interactions/drawing/extractor.js +1 -0
- package/dist/interactions/drawing/extractor.js.map +1 -0
- package/dist/interactions/drawing/index.d.ts +0 -1
- package/dist/interactions/drawing/index.js +1 -0
- package/dist/interactions/drawing/index.js.map +1 -0
- package/dist/interactions/drawing/types.d.ts +0 -1
- package/dist/interactions/drawing/types.js +1 -0
- package/dist/interactions/drawing/types.js.map +1 -0
- package/dist/interactions/end-attempt/extractor.d.ts +0 -1
- package/dist/interactions/end-attempt/extractor.js +1 -0
- package/dist/interactions/end-attempt/extractor.js.map +1 -0
- package/dist/interactions/end-attempt/index.d.ts +0 -1
- package/dist/interactions/end-attempt/index.js +1 -0
- package/dist/interactions/end-attempt/index.js.map +1 -0
- package/dist/interactions/end-attempt/types.d.ts +0 -1
- package/dist/interactions/end-attempt/types.js +1 -0
- package/dist/interactions/end-attempt/types.js.map +1 -0
- package/dist/interactions/extended-text/extractor.d.ts +0 -1
- package/dist/interactions/extended-text/extractor.js +1 -0
- package/dist/interactions/extended-text/extractor.js.map +1 -0
- package/dist/interactions/extended-text/index.d.ts +0 -1
- package/dist/interactions/extended-text/index.js +1 -0
- package/dist/interactions/extended-text/index.js.map +1 -0
- package/dist/interactions/extended-text/types.d.ts +0 -1
- package/dist/interactions/extended-text/types.js +1 -0
- package/dist/interactions/extended-text/types.js.map +1 -0
- package/dist/interactions/gap-match/extractor.d.ts +0 -1
- package/dist/interactions/gap-match/extractor.js +1 -0
- package/dist/interactions/gap-match/extractor.js.map +1 -0
- package/dist/interactions/gap-match/index.d.ts +0 -1
- package/dist/interactions/gap-match/index.js +1 -0
- package/dist/interactions/gap-match/index.js.map +1 -0
- package/dist/interactions/gap-match/types.d.ts +0 -1
- package/dist/interactions/gap-match/types.js +1 -0
- package/dist/interactions/gap-match/types.js.map +1 -0
- package/dist/interactions/graphic-associate/extractor.d.ts +0 -1
- package/dist/interactions/graphic-associate/extractor.js +1 -0
- package/dist/interactions/graphic-associate/extractor.js.map +1 -0
- package/dist/interactions/graphic-associate/index.d.ts +0 -1
- package/dist/interactions/graphic-associate/index.js +1 -0
- package/dist/interactions/graphic-associate/index.js.map +1 -0
- package/dist/interactions/graphic-associate/types.d.ts +0 -1
- package/dist/interactions/graphic-associate/types.js +1 -0
- package/dist/interactions/graphic-associate/types.js.map +1 -0
- package/dist/interactions/graphic-gap-match/extractor.d.ts +0 -1
- package/dist/interactions/graphic-gap-match/extractor.js +1 -0
- package/dist/interactions/graphic-gap-match/extractor.js.map +1 -0
- package/dist/interactions/graphic-gap-match/index.d.ts +0 -1
- package/dist/interactions/graphic-gap-match/index.js +1 -0
- package/dist/interactions/graphic-gap-match/index.js.map +1 -0
- package/dist/interactions/graphic-gap-match/types.d.ts +0 -1
- package/dist/interactions/graphic-gap-match/types.js +1 -0
- package/dist/interactions/graphic-gap-match/types.js.map +1 -0
- package/dist/interactions/graphic-order/extractor.d.ts +0 -1
- package/dist/interactions/graphic-order/extractor.js +1 -0
- package/dist/interactions/graphic-order/extractor.js.map +1 -0
- package/dist/interactions/graphic-order/index.d.ts +0 -1
- package/dist/interactions/graphic-order/index.js +1 -0
- package/dist/interactions/graphic-order/index.js.map +1 -0
- package/dist/interactions/graphic-order/types.d.ts +0 -1
- package/dist/interactions/graphic-order/types.js +1 -0
- package/dist/interactions/graphic-order/types.js.map +1 -0
- package/dist/interactions/hotspot/extractor.d.ts +0 -1
- package/dist/interactions/hotspot/extractor.js +1 -0
- package/dist/interactions/hotspot/extractor.js.map +1 -0
- package/dist/interactions/hotspot/index.d.ts +0 -1
- package/dist/interactions/hotspot/index.js +1 -0
- package/dist/interactions/hotspot/index.js.map +1 -0
- package/dist/interactions/hotspot/types.d.ts +0 -1
- package/dist/interactions/hotspot/types.js +1 -0
- package/dist/interactions/hotspot/types.js.map +1 -0
- package/dist/interactions/hottext/extractor.d.ts +0 -1
- package/dist/interactions/hottext/extractor.js +1 -0
- package/dist/interactions/hottext/extractor.js.map +1 -0
- package/dist/interactions/hottext/index.d.ts +0 -1
- package/dist/interactions/hottext/index.js +1 -0
- package/dist/interactions/hottext/index.js.map +1 -0
- package/dist/interactions/hottext/types.d.ts +0 -1
- package/dist/interactions/hottext/types.js +1 -0
- package/dist/interactions/hottext/types.js.map +1 -0
- package/dist/interactions/index.d.ts +0 -1
- package/dist/interactions/index.js +1 -0
- package/dist/interactions/index.js.map +1 -0
- package/dist/interactions/inline/index.d.ts +0 -1
- package/dist/interactions/inline/index.js +1 -0
- package/dist/interactions/inline/index.js.map +1 -0
- package/dist/interactions/inline/render-plan.d.ts +0 -1
- package/dist/interactions/inline/render-plan.js +1 -0
- package/dist/interactions/inline/render-plan.js.map +1 -0
- package/dist/interactions/inline-choice/extractor.d.ts +0 -1
- package/dist/interactions/inline-choice/extractor.js +1 -0
- package/dist/interactions/inline-choice/extractor.js.map +1 -0
- package/dist/interactions/inline-choice/index.d.ts +0 -1
- package/dist/interactions/inline-choice/index.js +1 -0
- package/dist/interactions/inline-choice/index.js.map +1 -0
- package/dist/interactions/inline-choice/types.d.ts +0 -1
- package/dist/interactions/inline-choice/types.js +1 -0
- package/dist/interactions/inline-choice/types.js.map +1 -0
- package/dist/interactions/match/extractor.d.ts +0 -1
- package/dist/interactions/match/extractor.js +1 -0
- package/dist/interactions/match/extractor.js.map +1 -0
- package/dist/interactions/match/index.d.ts +0 -1
- package/dist/interactions/match/index.js +1 -0
- package/dist/interactions/match/index.js.map +1 -0
- package/dist/interactions/match/types.d.ts +0 -1
- package/dist/interactions/match/types.js +1 -0
- package/dist/interactions/match/types.js.map +1 -0
- package/dist/interactions/media/extractor.d.ts +0 -1
- package/dist/interactions/media/extractor.js +1 -0
- package/dist/interactions/media/extractor.js.map +1 -0
- package/dist/interactions/media/index.d.ts +0 -1
- package/dist/interactions/media/index.js +1 -0
- package/dist/interactions/media/index.js.map +1 -0
- package/dist/interactions/media/types.d.ts +0 -1
- package/dist/interactions/media/types.js +1 -0
- package/dist/interactions/media/types.js.map +1 -0
- package/dist/interactions/modules.d.ts +0 -1
- package/dist/interactions/modules.js +1 -0
- package/dist/interactions/modules.js.map +1 -0
- package/dist/interactions/order/extractor.d.ts +0 -1
- package/dist/interactions/order/extractor.js +1 -0
- package/dist/interactions/order/extractor.js.map +1 -0
- package/dist/interactions/order/index.d.ts +0 -1
- package/dist/interactions/order/index.js +1 -0
- package/dist/interactions/order/index.js.map +1 -0
- package/dist/interactions/order/types.d.ts +0 -1
- package/dist/interactions/order/types.js +1 -0
- package/dist/interactions/order/types.js.map +1 -0
- package/dist/interactions/portable-custom/extractor.d.ts +0 -1
- package/dist/interactions/portable-custom/extractor.js +1 -0
- package/dist/interactions/portable-custom/extractor.js.map +1 -0
- package/dist/interactions/portable-custom/index.d.ts +0 -1
- package/dist/interactions/portable-custom/index.js +1 -0
- package/dist/interactions/portable-custom/index.js.map +1 -0
- package/dist/interactions/portable-custom/types.d.ts +0 -1
- package/dist/interactions/portable-custom/types.js +1 -0
- package/dist/interactions/portable-custom/types.js.map +1 -0
- package/dist/interactions/position-object/extractor.d.ts +0 -1
- package/dist/interactions/position-object/extractor.js +1 -0
- package/dist/interactions/position-object/extractor.js.map +1 -0
- package/dist/interactions/position-object/index.d.ts +0 -1
- package/dist/interactions/position-object/index.js +1 -0
- package/dist/interactions/position-object/index.js.map +1 -0
- package/dist/interactions/position-object/types.d.ts +0 -1
- package/dist/interactions/position-object/types.js +1 -0
- package/dist/interactions/position-object/types.js.map +1 -0
- package/dist/interactions/select-point/extractor.d.ts +0 -1
- package/dist/interactions/select-point/extractor.js +1 -0
- package/dist/interactions/select-point/extractor.js.map +1 -0
- package/dist/interactions/select-point/index.d.ts +0 -1
- package/dist/interactions/select-point/index.js +1 -0
- package/dist/interactions/select-point/index.js.map +1 -0
- package/dist/interactions/select-point/types.d.ts +0 -1
- package/dist/interactions/select-point/types.js +1 -0
- package/dist/interactions/select-point/types.js.map +1 -0
- package/dist/interactions/shared/index.d.ts +0 -1
- package/dist/interactions/shared/index.js +1 -0
- package/dist/interactions/shared/index.js.map +1 -0
- package/dist/interactions/shared/types.d.ts +0 -1
- package/dist/interactions/shared/types.js +1 -0
- package/dist/interactions/shared/types.js.map +1 -0
- package/dist/interactions/slider/extractor.d.ts +0 -1
- package/dist/interactions/slider/extractor.js +1 -0
- package/dist/interactions/slider/extractor.js.map +1 -0
- package/dist/interactions/slider/index.d.ts +0 -1
- package/dist/interactions/slider/index.js +1 -0
- package/dist/interactions/slider/index.js.map +1 -0
- package/dist/interactions/slider/types.d.ts +0 -1
- package/dist/interactions/slider/types.js +1 -0
- package/dist/interactions/slider/types.js.map +1 -0
- package/dist/interactions/text-entry/extractor.d.ts +0 -1
- package/dist/interactions/text-entry/extractor.js +1 -0
- package/dist/interactions/text-entry/extractor.js.map +1 -0
- package/dist/interactions/text-entry/index.d.ts +0 -1
- package/dist/interactions/text-entry/index.js +1 -0
- package/dist/interactions/text-entry/index.js.map +1 -0
- package/dist/interactions/text-entry/types.d.ts +0 -1
- package/dist/interactions/text-entry/types.js +1 -0
- package/dist/interactions/text-entry/types.js.map +1 -0
- package/dist/interactions/upload/extractor.d.ts +0 -1
- package/dist/interactions/upload/extractor.js +1 -0
- package/dist/interactions/upload/extractor.js.map +1 -0
- package/dist/interactions/upload/index.d.ts +0 -1
- package/dist/interactions/upload/index.js +1 -0
- package/dist/interactions/upload/index.js.map +1 -0
- package/dist/interactions/upload/types.d.ts +0 -1
- package/dist/interactions/upload/types.js +1 -0
- package/dist/interactions/upload/types.js.map +1 -0
- package/dist/pci/PciHost.d.ts +0 -1
- package/dist/pci/PciHost.js +1 -0
- package/dist/pci/PciHost.js.map +1 -0
- package/dist/pci/types.d.ts +0 -1
- package/dist/pci/types.js +1 -0
- package/dist/pci/types.js.map +1 -0
- package/dist/pnp/applyPnp.d.ts +0 -1
- package/dist/pnp/applyPnp.js +1 -0
- package/dist/pnp/applyPnp.js.map +1 -0
- package/dist/pnp/parsePnpXml.d.ts +0 -1
- package/dist/pnp/parsePnpXml.js +1 -0
- package/dist/pnp/parsePnpXml.js.map +1 -0
- package/dist/pnp/types.d.ts +0 -1
- package/dist/pnp/types.js +1 -0
- package/dist/pnp/types.js.map +1 -0
- package/dist/presentation/itemPresentationPlan.d.ts +53 -0
- package/dist/presentation/itemPresentationPlan.js +98 -0
- package/dist/presentation/itemPresentationPlan.js.map +1 -0
- package/dist/server.d.ts +0 -1
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -0
- package/dist/types/index.d.ts +17 -3
- package/dist/types/index.js +1 -3
- package/dist/types/index.js.map +1 -0
- package/dist/types/responseValidation.d.ts +0 -1
- package/dist/types/responseValidation.js +1 -0
- package/dist/types/responseValidation.js.map +1 -0
- package/dist/utils/PerformanceMonitor.d.ts +0 -1
- package/dist/utils/PerformanceMonitor.js +1 -0
- package/dist/utils/PerformanceMonitor.js.map +1 -0
- package/dist/utils/drawingUtils.d.ts +0 -1
- package/dist/utils/drawingUtils.js +1 -0
- package/dist/utils/drawingUtils.js.map +1 -0
- package/dist/utils/responseUtils.d.ts +0 -1
- package/dist/utils/responseUtils.js +1 -0
- package/dist/utils/responseUtils.js.map +1 -0
- package/dist/web-components/QTIInteractionBase.d.ts +1 -2
- package/dist/web-components/QTIInteractionBase.js +1 -0
- package/dist/web-components/QTIInteractionBase.js.map +1 -0
- package/dist/web-components/QTIInteractionElement.d.ts +1 -2
- package/dist/web-components/QTIInteractionElement.js +1 -0
- package/dist/web-components/QTIInteractionElement.js.map +1 -0
- package/dist/web-components/index.d.ts +0 -1
- package/dist/web-components/index.js +1 -0
- package/dist/web-components/index.js.map +1 -0
- package/package.json +7 -14
- package/dist/catalog/applyGlossaryTriggers.d.ts.map +0 -1
- package/dist/catalog/catalogExtractor.d.ts.map +0 -1
- package/dist/catalog/catalogLookup.d.ts.map +0 -1
- package/dist/catalog/glossaryAction.d.ts.map +0 -1
- package/dist/catalog/types.d.ts.map +0 -1
- package/dist/components/actions/typesetAction.d.ts.map +0 -1
- package/dist/components/utils/assignProps.d.ts +0 -2
- package/dist/components/utils/assignProps.d.ts.map +0 -1
- package/dist/components/utils/assignProps.js +0 -1
- package/dist/components/utils/feedbackUtils.d.ts.map +0 -1
- package/dist/components/utils/index.d.ts.map +0 -1
- package/dist/components/utils/stimulusRender.d.ts.map +0 -1
- package/dist/components/utils/stylesheetRender.d.ts.map +0 -1
- package/dist/core/ComponentRegistry.d.ts.map +0 -1
- package/dist/core/ItemRenderer.d.ts +0 -91
- package/dist/core/ItemRenderer.d.ts.map +0 -1
- package/dist/core/ItemRenderer.js +0 -248
- package/dist/core/Player.d.ts.map +0 -1
- package/dist/core/Plugin.d.ts.map +0 -1
- package/dist/core/PluginManager.d.ts.map +0 -1
- package/dist/core/constants.d.ts.map +0 -1
- package/dist/core/declarations.d.ts.map +0 -1
- package/dist/core/parsingLimits.d.ts.map +0 -1
- package/dist/core/random.d.ts.map +0 -1
- package/dist/core/rolePolicy.d.ts.map +0 -1
- package/dist/core/sanitizer.d.ts.map +0 -1
- package/dist/core/trustedTypes.d.ts.map +0 -1
- package/dist/core/urlPolicy.d.ts.map +0 -1
- package/dist/document/AssessmentItemDocument.d.ts.map +0 -1
- package/dist/extensions/MathLiveEditor.d.ts.map +0 -1
- package/dist/extraction/ExtractionRegistry.d.ts.map +0 -1
- package/dist/extraction/createContext.d.ts.map +0 -1
- package/dist/extraction/extractors/associateExtractor.d.ts +0 -2
- package/dist/extraction/extractors/associateExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/associateExtractor.js +0 -1
- package/dist/extraction/extractors/choiceExtractor.d.ts +0 -2
- package/dist/extraction/extractors/choiceExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/choiceExtractor.js +0 -1
- package/dist/extraction/extractors/customExtractor.d.ts +0 -2
- package/dist/extraction/extractors/customExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/customExtractor.js +0 -1
- package/dist/extraction/extractors/drawingExtractor.d.ts +0 -2
- package/dist/extraction/extractors/drawingExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/drawingExtractor.js +0 -1
- package/dist/extraction/extractors/endAttemptExtractor.d.ts +0 -2
- package/dist/extraction/extractors/endAttemptExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/endAttemptExtractor.js +0 -1
- package/dist/extraction/extractors/extendedTextExtractor.d.ts +0 -2
- package/dist/extraction/extractors/extendedTextExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/extendedTextExtractor.js +0 -1
- package/dist/extraction/extractors/gapMatchExtractor.d.ts +0 -2
- package/dist/extraction/extractors/gapMatchExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/gapMatchExtractor.js +0 -1
- package/dist/extraction/extractors/graphicAssociateExtractor.d.ts +0 -2
- package/dist/extraction/extractors/graphicAssociateExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/graphicAssociateExtractor.js +0 -1
- package/dist/extraction/extractors/graphicGapMatchExtractor.d.ts +0 -2
- package/dist/extraction/extractors/graphicGapMatchExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/graphicGapMatchExtractor.js +0 -1
- package/dist/extraction/extractors/graphicOrderExtractor.d.ts +0 -2
- package/dist/extraction/extractors/graphicOrderExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/graphicOrderExtractor.js +0 -1
- package/dist/extraction/extractors/hotspotExtractor.d.ts +0 -2
- package/dist/extraction/extractors/hotspotExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/hotspotExtractor.js +0 -1
- package/dist/extraction/extractors/hottextExtractor.d.ts +0 -2
- package/dist/extraction/extractors/hottextExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/hottextExtractor.js +0 -1
- package/dist/extraction/extractors/index.d.ts +0 -9
- package/dist/extraction/extractors/index.d.ts.map +0 -1
- package/dist/extraction/extractors/index.js +0 -8
- package/dist/extraction/extractors/inlineChoiceExtractor.d.ts +0 -2
- package/dist/extraction/extractors/inlineChoiceExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/inlineChoiceExtractor.js +0 -1
- package/dist/extraction/extractors/matchExtractor.d.ts +0 -2
- package/dist/extraction/extractors/matchExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/matchExtractor.js +0 -1
- package/dist/extraction/extractors/mediaExtractor.d.ts +0 -2
- package/dist/extraction/extractors/mediaExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/mediaExtractor.js +0 -1
- package/dist/extraction/extractors/orderExtractor.d.ts +0 -2
- package/dist/extraction/extractors/orderExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/orderExtractor.js +0 -1
- package/dist/extraction/extractors/portableCustomExtractor.d.ts +0 -2
- package/dist/extraction/extractors/portableCustomExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/portableCustomExtractor.js +0 -1
- package/dist/extraction/extractors/positionObjectExtractor.d.ts +0 -2
- package/dist/extraction/extractors/positionObjectExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/positionObjectExtractor.js +0 -1
- package/dist/extraction/extractors/selectPointExtractor.d.ts +0 -2
- package/dist/extraction/extractors/selectPointExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/selectPointExtractor.js +0 -1
- package/dist/extraction/extractors/sliderExtractor.d.ts +0 -2
- package/dist/extraction/extractors/sliderExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/sliderExtractor.js +0 -1
- package/dist/extraction/extractors/textEntryExtractor.d.ts +0 -2
- package/dist/extraction/extractors/textEntryExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/textEntryExtractor.js +0 -1
- package/dist/extraction/extractors/uploadExtractor.d.ts +0 -2
- package/dist/extraction/extractors/uploadExtractor.d.ts.map +0 -1
- package/dist/extraction/extractors/uploadExtractor.js +0 -1
- package/dist/extraction/index.d.ts.map +0 -1
- package/dist/extraction/interactionExtractionPipeline.d.ts.map +0 -1
- package/dist/extraction/interactionSecurity.d.ts.map +0 -1
- package/dist/extraction/types.d.ts.map +0 -1
- package/dist/extraction/utils.d.ts.map +0 -1
- package/dist/iframe/IFramePlayerHost.d.ts.map +0 -1
- package/dist/iframe/index.d.ts.map +0 -1
- package/dist/iframe/protocol.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/interactions/associate/extractor.d.ts.map +0 -1
- package/dist/interactions/associate/index.d.ts.map +0 -1
- package/dist/interactions/associate/types.d.ts.map +0 -1
- package/dist/interactions/choice/extractor.d.ts.map +0 -1
- package/dist/interactions/choice/index.d.ts.map +0 -1
- package/dist/interactions/choice/types.d.ts.map +0 -1
- package/dist/interactions/custom/extractor.d.ts.map +0 -1
- package/dist/interactions/custom/index.d.ts.map +0 -1
- package/dist/interactions/custom/types.d.ts.map +0 -1
- package/dist/interactions/drawing/extractor.d.ts.map +0 -1
- package/dist/interactions/drawing/index.d.ts.map +0 -1
- package/dist/interactions/drawing/types.d.ts.map +0 -1
- package/dist/interactions/end-attempt/extractor.d.ts.map +0 -1
- package/dist/interactions/end-attempt/index.d.ts.map +0 -1
- package/dist/interactions/end-attempt/types.d.ts.map +0 -1
- package/dist/interactions/extended-text/extractor.d.ts.map +0 -1
- package/dist/interactions/extended-text/index.d.ts.map +0 -1
- package/dist/interactions/extended-text/types.d.ts.map +0 -1
- package/dist/interactions/gap-match/extractor.d.ts.map +0 -1
- package/dist/interactions/gap-match/index.d.ts.map +0 -1
- package/dist/interactions/gap-match/types.d.ts.map +0 -1
- package/dist/interactions/graphic-associate/extractor.d.ts.map +0 -1
- package/dist/interactions/graphic-associate/index.d.ts.map +0 -1
- package/dist/interactions/graphic-associate/types.d.ts.map +0 -1
- package/dist/interactions/graphic-gap-match/extractor.d.ts.map +0 -1
- package/dist/interactions/graphic-gap-match/index.d.ts.map +0 -1
- package/dist/interactions/graphic-gap-match/types.d.ts.map +0 -1
- package/dist/interactions/graphic-order/extractor.d.ts.map +0 -1
- package/dist/interactions/graphic-order/index.d.ts.map +0 -1
- package/dist/interactions/graphic-order/types.d.ts.map +0 -1
- package/dist/interactions/hotspot/extractor.d.ts.map +0 -1
- package/dist/interactions/hotspot/index.d.ts.map +0 -1
- package/dist/interactions/hotspot/types.d.ts.map +0 -1
- package/dist/interactions/hottext/extractor.d.ts.map +0 -1
- package/dist/interactions/hottext/index.d.ts.map +0 -1
- package/dist/interactions/hottext/types.d.ts.map +0 -1
- package/dist/interactions/index.d.ts.map +0 -1
- package/dist/interactions/inline/index.d.ts.map +0 -1
- package/dist/interactions/inline/render-plan.d.ts.map +0 -1
- package/dist/interactions/inline-choice/extractor.d.ts.map +0 -1
- package/dist/interactions/inline-choice/index.d.ts.map +0 -1
- package/dist/interactions/inline-choice/types.d.ts.map +0 -1
- package/dist/interactions/match/extractor.d.ts.map +0 -1
- package/dist/interactions/match/index.d.ts.map +0 -1
- package/dist/interactions/match/types.d.ts.map +0 -1
- package/dist/interactions/media/extractor.d.ts.map +0 -1
- package/dist/interactions/media/index.d.ts.map +0 -1
- package/dist/interactions/media/types.d.ts.map +0 -1
- package/dist/interactions/modules.d.ts.map +0 -1
- package/dist/interactions/order/extractor.d.ts.map +0 -1
- package/dist/interactions/order/index.d.ts.map +0 -1
- package/dist/interactions/order/types.d.ts.map +0 -1
- package/dist/interactions/portable-custom/extractor.d.ts.map +0 -1
- package/dist/interactions/portable-custom/index.d.ts.map +0 -1
- package/dist/interactions/portable-custom/types.d.ts.map +0 -1
- package/dist/interactions/position-object/extractor.d.ts.map +0 -1
- package/dist/interactions/position-object/index.d.ts.map +0 -1
- package/dist/interactions/position-object/types.d.ts.map +0 -1
- package/dist/interactions/select-point/extractor.d.ts.map +0 -1
- package/dist/interactions/select-point/index.d.ts.map +0 -1
- package/dist/interactions/select-point/types.d.ts.map +0 -1
- package/dist/interactions/shared/index.d.ts.map +0 -1
- package/dist/interactions/shared/types.d.ts.map +0 -1
- package/dist/interactions/slider/extractor.d.ts.map +0 -1
- package/dist/interactions/slider/index.d.ts.map +0 -1
- package/dist/interactions/slider/types.d.ts.map +0 -1
- package/dist/interactions/text-entry/extractor.d.ts.map +0 -1
- package/dist/interactions/text-entry/index.d.ts.map +0 -1
- package/dist/interactions/text-entry/types.d.ts.map +0 -1
- package/dist/interactions/upload/extractor.d.ts.map +0 -1
- package/dist/interactions/upload/index.d.ts.map +0 -1
- package/dist/interactions/upload/types.d.ts.map +0 -1
- package/dist/pci/PciHost.d.ts.map +0 -1
- package/dist/pci/types.d.ts.map +0 -1
- package/dist/pnp/applyPnp.d.ts.map +0 -1
- package/dist/pnp/parsePnpXml.d.ts.map +0 -1
- package/dist/pnp/types.d.ts.map +0 -1
- package/dist/server.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/interactions.d.ts +0 -8
- package/dist/types/interactions.d.ts.map +0 -1
- package/dist/types/interactions.js +0 -7
- package/dist/types/responseValidation.d.ts.map +0 -1
- package/dist/utils/PerformanceMonitor.d.ts.map +0 -1
- package/dist/utils/drawingUtils.d.ts.map +0 -1
- package/dist/utils/responseUtils.d.ts.map +0 -1
- package/dist/utils/touchDragHelper.d.ts +0 -2
- package/dist/utils/touchDragHelper.d.ts.map +0 -1
- package/dist/utils/touchDragHelper.js +0 -1
- package/dist/web-components/QTIInteractionBase.d.ts.map +0 -1
- package/dist/web-components/QTIInteractionElement.d.ts.map +0 -1
- package/dist/web-components/index.d.ts.map +0 -1
- package/src/__tests__/catalog.test.ts +0 -267
- package/src/__tests__/fixtures/pci/echo-pci.js +0 -49
- package/src/__tests__/pci.test.ts +0 -353
- package/src/__tests__/qti3-attribute-extraction.test.ts +0 -174
- package/src/__tests__/qti3-debug.test.ts +0 -140
- package/src/__tests__/qti3-extraction.test.ts +0 -309
- package/src/catalog/applyGlossaryTriggers.ts +0 -372
- package/src/catalog/catalogExtractor.ts +0 -130
- package/src/catalog/catalogLookup.ts +0 -53
- package/src/catalog/glossaryAction.ts +0 -38
- package/src/catalog/types.ts +0 -37
- package/src/components/ItemBody.svelte +0 -363
- package/src/components/ItemPlayer.svelte +0 -163
- package/src/components/ModalFeedbackDisplay.svelte +0 -97
- package/src/components/actions/typesetAction.ts +0 -74
- package/src/components/index.ts +0 -22
- package/src/components/utils/assignProps.ts +0 -2
- package/src/components/utils/feedbackUtils.ts +0 -140
- package/src/components/utils/index.ts +0 -13
- package/src/components/utils/stimulusRender.ts +0 -93
- package/src/components/utils/stylesheetRender.ts +0 -58
- package/src/core/ComponentRegistry.ts +0 -248
- package/src/core/Player.ts +0 -1618
- package/src/core/Plugin.ts +0 -123
- package/src/core/PluginManager.ts +0 -182
- package/src/core/constants.ts +0 -117
- package/src/core/declarations.ts +0 -171
- package/src/core/parsingLimits.ts +0 -62
- package/src/core/random.ts +0 -24
- package/src/core/rolePolicy.ts +0 -34
- package/src/core/sanitizer.ts +0 -305
- package/src/core/trustedTypes.ts +0 -63
- package/src/core/urlPolicy.ts +0 -98
- package/src/document/AssessmentItemDocument.ts +0 -247
- package/src/element.ts +0 -128
- package/src/extensions/MathLiveEditor.ts +0 -313
- package/src/extraction/ExtractionRegistry.ts +0 -335
- package/src/extraction/createContext.ts +0 -52
- package/src/extraction/extractors/associateExtractor.ts +0 -1
- package/src/extraction/extractors/choiceExtractor.ts +0 -1
- package/src/extraction/extractors/conformance-qti3-advanced.test.ts +0 -239
- package/src/extraction/extractors/conformance-qti3-basic.test.ts +0 -82
- package/src/extraction/extractors/conformance.test.ts +0 -208
- package/src/extraction/extractors/customExtractor.ts +0 -1
- package/src/extraction/extractors/drawingExtractor.ts +0 -1
- package/src/extraction/extractors/endAttemptExtractor.ts +0 -1
- package/src/extraction/extractors/extendedTextExtractor.ts +0 -1
- package/src/extraction/extractors/gapMatchExtractor.ts +0 -1
- package/src/extraction/extractors/graphicAssociateExtractor.ts +0 -1
- package/src/extraction/extractors/graphicGapMatchExtractor.ts +0 -1
- package/src/extraction/extractors/graphicOrderExtractor.ts +0 -1
- package/src/extraction/extractors/hotspotExtractor.ts +0 -1
- package/src/extraction/extractors/hottextExtractor.ts +0 -1
- package/src/extraction/extractors/index.ts +0 -9
- package/src/extraction/extractors/inlineChoiceExtractor.ts +0 -1
- package/src/extraction/extractors/matchExtractor.ts +0 -1
- package/src/extraction/extractors/mediaExtractor.ts +0 -1
- package/src/extraction/extractors/orderExtractor.ts +0 -1
- package/src/extraction/extractors/portableCustomExtractor.ts +0 -1
- package/src/extraction/extractors/positionObjectExtractor.ts +0 -1
- package/src/extraction/extractors/selectPointExtractor.ts +0 -1
- package/src/extraction/extractors/sliderExtractor.ts +0 -1
- package/src/extraction/extractors/textEntryExtractor.ts +0 -1
- package/src/extraction/extractors/uploadExtractor.ts +0 -1
- package/src/extraction/index.ts +0 -108
- package/src/extraction/interactionExtractionPipeline.ts +0 -70
- package/src/extraction/interactionSecurity.ts +0 -60
- package/src/extraction/types.ts +0 -246
- package/src/extraction/utils.ts +0 -243
- package/src/iframe/IFramePlayerHost.ts +0 -265
- package/src/iframe/index.ts +0 -11
- package/src/iframe/protocol.ts +0 -137
- package/src/index.ts +0 -101
- package/src/interactions/associate/extractor.ts +0 -133
- package/src/interactions/associate/index.ts +0 -2
- package/src/interactions/associate/types.ts +0 -1
- package/src/interactions/choice/extractor.ts +0 -121
- package/src/interactions/choice/index.ts +0 -2
- package/src/interactions/choice/types.ts +0 -1
- package/src/interactions/custom/extractor.ts +0 -72
- package/src/interactions/custom/index.ts +0 -2
- package/src/interactions/custom/types.ts +0 -1
- package/src/interactions/drawing/extractor.ts +0 -113
- package/src/interactions/drawing/index.ts +0 -2
- package/src/interactions/drawing/types.ts +0 -1
- package/src/interactions/end-attempt/extractor.ts +0 -74
- package/src/interactions/end-attempt/index.ts +0 -2
- package/src/interactions/end-attempt/types.ts +0 -1
- package/src/interactions/extended-text/extractor.ts +0 -92
- package/src/interactions/extended-text/index.ts +0 -2
- package/src/interactions/extended-text/types.ts +0 -1
- package/src/interactions/gap-match/extractor.ts +0 -193
- package/src/interactions/gap-match/index.ts +0 -2
- package/src/interactions/gap-match/types.ts +0 -1
- package/src/interactions/graphic-associate/extractor.ts +0 -192
- package/src/interactions/graphic-associate/index.ts +0 -2
- package/src/interactions/graphic-associate/types.ts +0 -1
- package/src/interactions/graphic-gap-match/extractor.ts +0 -257
- package/src/interactions/graphic-gap-match/index.ts +0 -2
- package/src/interactions/graphic-gap-match/types.ts +0 -1
- package/src/interactions/graphic-order/extractor.ts +0 -162
- package/src/interactions/graphic-order/index.ts +0 -2
- package/src/interactions/graphic-order/types.ts +0 -1
- package/src/interactions/hotspot/extractor.ts +0 -208
- package/src/interactions/hotspot/index.ts +0 -2
- package/src/interactions/hotspot/types.ts +0 -1
- package/src/interactions/hottext/extractor.ts +0 -163
- package/src/interactions/hottext/index.ts +0 -2
- package/src/interactions/hottext/types.ts +0 -1
- package/src/interactions/index.ts +0 -52
- package/src/interactions/inline/index.ts +0 -1
- package/src/interactions/inline/render-plan.ts +0 -105
- package/src/interactions/inline-choice/InlineChoice.svelte +0 -57
- package/src/interactions/inline-choice/extractor.ts +0 -105
- package/src/interactions/inline-choice/index.ts +0 -2
- package/src/interactions/inline-choice/types.ts +0 -1
- package/src/interactions/match/extractor.ts +0 -187
- package/src/interactions/match/index.ts +0 -2
- package/src/interactions/match/types.ts +0 -1
- package/src/interactions/media/extractor.ts +0 -168
- package/src/interactions/media/index.ts +0 -2
- package/src/interactions/media/types.ts +0 -1
- package/src/interactions/modules.ts +0 -111
- package/src/interactions/order/extractor.ts +0 -120
- package/src/interactions/order/index.ts +0 -2
- package/src/interactions/order/types.ts +0 -1
- package/src/interactions/portable-custom/extractor.ts +0 -122
- package/src/interactions/portable-custom/index.ts +0 -2
- package/src/interactions/portable-custom/types.ts +0 -1
- package/src/interactions/position-object/extractor.ts +0 -243
- package/src/interactions/position-object/index.ts +0 -2
- package/src/interactions/position-object/types.ts +0 -1
- package/src/interactions/select-point/extractor.ts +0 -143
- package/src/interactions/select-point/index.ts +0 -2
- package/src/interactions/select-point/types.ts +0 -1
- package/src/interactions/shared/index.ts +0 -1
- package/src/interactions/shared/types.ts +0 -430
- package/src/interactions/slider/extractor.ts +0 -102
- package/src/interactions/slider/index.ts +0 -2
- package/src/interactions/slider/types.ts +0 -1
- package/src/interactions/text-entry/InlineTextEntry.svelte +0 -75
- package/src/interactions/text-entry/extractor.ts +0 -79
- package/src/interactions/text-entry/index.ts +0 -2
- package/src/interactions/text-entry/types.ts +0 -1
- package/src/interactions/upload/extractor.ts +0 -81
- package/src/interactions/upload/index.ts +0 -2
- package/src/interactions/upload/types.ts +0 -1
- package/src/pci/PciHost.ts +0 -138
- package/src/pci/types.ts +0 -70
- package/src/pnp/applyPnp.ts +0 -29
- package/src/pnp/parsePnpXml.ts +0 -215
- package/src/pnp/types.ts +0 -75
- package/src/server.ts +0 -14
- package/src/types/index.ts +0 -388
- package/src/types/interactions.ts +0 -8
- package/src/types/responseValidation.ts +0 -29
- package/src/types/xmldom.d.ts +0 -12
- package/src/utils/PerformanceMonitor.ts +0 -335
- package/src/utils/drawingUtils.ts +0 -73
- package/src/utils/responseUtils.ts +0 -51
- package/src/utils/touchDragHelper.ts +0 -1
- package/src/web-components/QTIInteractionBase.ts +0 -303
- package/src/web-components/QTIInteractionElement.ts +0 -125
- package/src/web-components/index.ts +0 -22
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standard QTI graphicOrderInteraction extractor
|
|
3
|
-
*
|
|
4
|
-
* Extracts data from graphicOrderInteraction elements (order items on image)
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { ElementExtractor } from '../../extraction/types.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Image data for graphic order interaction
|
|
11
|
-
*/
|
|
12
|
-
export interface ImageData {
|
|
13
|
-
type: 'image' | 'svg';
|
|
14
|
-
src?: string;
|
|
15
|
-
content?: string;
|
|
16
|
-
width?: string;
|
|
17
|
-
height?: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Graphic order data extracted from graphicOrderInteraction elements
|
|
22
|
-
*/
|
|
23
|
-
export interface GraphicOrderData {
|
|
24
|
-
imageData: ImageData | null;
|
|
25
|
-
hotspotChoices: Array<{
|
|
26
|
-
identifier: string;
|
|
27
|
-
label: string;
|
|
28
|
-
shape: string;
|
|
29
|
-
coords: string;
|
|
30
|
-
fixed?: boolean;
|
|
31
|
-
classes?: string[];
|
|
32
|
-
}>;
|
|
33
|
-
prompt: string | null;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Standard QTI graphic order interaction extractor
|
|
38
|
-
* Handles graphicOrderInteraction elements (ordering hotspots on an image)
|
|
39
|
-
*/
|
|
40
|
-
export const standardGraphicOrderExtractor: ElementExtractor<GraphicOrderData> = {
|
|
41
|
-
id: 'qti:graphic-order-interaction',
|
|
42
|
-
name: 'QTI Standard Graphic Order Interaction',
|
|
43
|
-
priority: 10,
|
|
44
|
-
elementTypes: ['graphicOrderInteraction'],
|
|
45
|
-
description: 'Extracts standard QTI graphicOrderInteraction (order items on image)',
|
|
46
|
-
|
|
47
|
-
canHandle(element, _context) {
|
|
48
|
-
// All graphicOrderInteraction elements are standard
|
|
49
|
-
return element.rawTagName === 'graphicOrderInteraction';
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
extract(element, context) {
|
|
53
|
-
const { utils } = context;
|
|
54
|
-
|
|
55
|
-
// Extract image data from object element
|
|
56
|
-
const objectElements = utils.getChildrenByTag(element, 'object');
|
|
57
|
-
let imageData: ImageData | null = null;
|
|
58
|
-
|
|
59
|
-
if (objectElements.length > 0) {
|
|
60
|
-
const objectElement = objectElements[0];
|
|
61
|
-
const type = utils.getAttribute(objectElement, 'type', '');
|
|
62
|
-
const data = utils.getAttribute(objectElement, 'data', '');
|
|
63
|
-
const width = utils.getAttribute(objectElement, 'width', '500');
|
|
64
|
-
const height = utils.getAttribute(objectElement, 'height', '300');
|
|
65
|
-
|
|
66
|
-
if (type.startsWith('image/svg')) {
|
|
67
|
-
// Extract inline SVG content - get full content including <svg> tag
|
|
68
|
-
const content = utils.getHtmlContent(objectElement);
|
|
69
|
-
imageData = {
|
|
70
|
-
type: 'svg',
|
|
71
|
-
content,
|
|
72
|
-
width,
|
|
73
|
-
height,
|
|
74
|
-
};
|
|
75
|
-
} else {
|
|
76
|
-
// External image reference
|
|
77
|
-
imageData = {
|
|
78
|
-
type: 'image',
|
|
79
|
-
src: data,
|
|
80
|
-
width,
|
|
81
|
-
height,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Extract hotspotChoice children
|
|
87
|
-
const hotspotElements = utils.getChildrenByTag(element, 'hotspotChoice');
|
|
88
|
-
const hotspotChoices = hotspotElements.map((hotspot) => {
|
|
89
|
-
const classes = utils.getClasses(hotspot);
|
|
90
|
-
const identifier = utils.getAttribute(hotspot, 'identifier', '');
|
|
91
|
-
const shape = utils.getAttribute(hotspot, 'shape', 'rect');
|
|
92
|
-
const coords = utils.getAttribute(hotspot, 'coords', '0,0,50,50');
|
|
93
|
-
const fixed = utils.getBooleanAttribute(hotspot, 'fixed');
|
|
94
|
-
|
|
95
|
-
// Get text content as label, use identifier as fallback
|
|
96
|
-
const textContent = utils.getTextContent(hotspot).trim();
|
|
97
|
-
const label = textContent || identifier;
|
|
98
|
-
|
|
99
|
-
return {
|
|
100
|
-
identifier,
|
|
101
|
-
label,
|
|
102
|
-
shape,
|
|
103
|
-
coords,
|
|
104
|
-
...(fixed ? { fixed } : {}),
|
|
105
|
-
...(classes.length > 0 ? { classes } : {}),
|
|
106
|
-
};
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
// Extract prompt (optional)
|
|
110
|
-
const promptElements = utils.getChildrenByTag(element, 'prompt');
|
|
111
|
-
const prompt = promptElements.length > 0 ? utils.getHtmlContent(promptElements[0]) : null;
|
|
112
|
-
|
|
113
|
-
return {
|
|
114
|
-
imageData,
|
|
115
|
-
hotspotChoices,
|
|
116
|
-
prompt,
|
|
117
|
-
};
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
validate(data) {
|
|
121
|
-
const errors: string[] = [];
|
|
122
|
-
const warnings: string[] = [];
|
|
123
|
-
|
|
124
|
-
// Validate image data
|
|
125
|
-
if (!data.imageData) {
|
|
126
|
-
warnings.push('graphicOrderInteraction has no image data');
|
|
127
|
-
} else if (data.imageData.type === 'image' && !data.imageData.src) {
|
|
128
|
-
errors.push('graphicOrderInteraction must have an image URL');
|
|
129
|
-
} else if (data.imageData.type === 'svg' && !data.imageData.content) {
|
|
130
|
-
errors.push('graphicOrderInteraction must have SVG content');
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Validate hotspot choices exist
|
|
134
|
-
if (!data.hotspotChoices || data.hotspotChoices.length < 2) {
|
|
135
|
-
errors.push('graphicOrderInteraction must have at least 2 hotspots');
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// Validate hotspot choice identifiers and coords
|
|
139
|
-
if (data.hotspotChoices) {
|
|
140
|
-
const identifiers = new Set<string>();
|
|
141
|
-
for (const hotspot of data.hotspotChoices) {
|
|
142
|
-
if (!hotspot.identifier) {
|
|
143
|
-
errors.push('All hotspot choices must have an identifier');
|
|
144
|
-
} else if (identifiers.has(hotspot.identifier)) {
|
|
145
|
-
errors.push(`Duplicate hotspot identifier: ${hotspot.identifier}`);
|
|
146
|
-
} else {
|
|
147
|
-
identifiers.add(hotspot.identifier);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (!hotspot.coords) {
|
|
151
|
-
errors.push(`Hotspot ${hotspot.identifier} must have coords`);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return {
|
|
157
|
-
valid: errors.length === 0,
|
|
158
|
-
errors: errors.length > 0 ? errors : undefined,
|
|
159
|
-
warnings: warnings.length > 0 ? warnings : undefined,
|
|
160
|
-
};
|
|
161
|
-
},
|
|
162
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { GraphicOrderInteractionData, GraphicOrderChoice } from '../shared/types.js';
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standard QTI hotspotInteraction extractor
|
|
3
|
-
*
|
|
4
|
-
* Extracts data from hotspotInteraction elements (clickable areas on image)
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { ElementExtractor } from '../../extraction/types.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Image data for hotspot interaction
|
|
11
|
-
*/
|
|
12
|
-
export interface ImageData {
|
|
13
|
-
type: 'image' | 'svg';
|
|
14
|
-
src?: string;
|
|
15
|
-
content?: string;
|
|
16
|
-
width?: string;
|
|
17
|
-
height?: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Hotspot data extracted from hotspotInteraction elements
|
|
22
|
-
*/
|
|
23
|
-
export interface HotspotData {
|
|
24
|
-
imageData: ImageData | null;
|
|
25
|
-
hotspotChoices: Array<{
|
|
26
|
-
identifier: string;
|
|
27
|
-
shape: 'circle' | 'rect' | 'poly' | 'ellipse' | 'default';
|
|
28
|
-
coords: string;
|
|
29
|
-
hotspotLabel?: string;
|
|
30
|
-
classes?: string[];
|
|
31
|
-
}>;
|
|
32
|
-
maxChoices: number;
|
|
33
|
-
minChoices?: number;
|
|
34
|
-
prompt: string | null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Standard QTI hotspot interaction extractor
|
|
39
|
-
* Handles hotspotInteraction elements (clickable areas on an image)
|
|
40
|
-
*/
|
|
41
|
-
export const standardHotspotExtractor: ElementExtractor<HotspotData> = {
|
|
42
|
-
id: 'qti:hotspot-interaction',
|
|
43
|
-
name: 'QTI Standard Hotspot Interaction',
|
|
44
|
-
priority: 10,
|
|
45
|
-
elementTypes: ['hotspotInteraction'],
|
|
46
|
-
description: 'Extracts standard QTI hotspotInteraction (clickable areas on image)',
|
|
47
|
-
|
|
48
|
-
canHandle(element, _context) {
|
|
49
|
-
// All hotspotInteraction elements are standard
|
|
50
|
-
return element.rawTagName === 'hotspotInteraction';
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
extract(element, context) {
|
|
54
|
-
const { utils } = context;
|
|
55
|
-
|
|
56
|
-
// Extract image data from object element
|
|
57
|
-
const objectElements = utils.getChildrenByTag(element, 'object');
|
|
58
|
-
let imageData: ImageData | null = null;
|
|
59
|
-
|
|
60
|
-
if (objectElements.length > 0) {
|
|
61
|
-
const objectElement = objectElements[0];
|
|
62
|
-
const type = utils.getAttribute(objectElement, 'type', '');
|
|
63
|
-
const data = utils.getAttribute(objectElement, 'data', '');
|
|
64
|
-
const width = utils.getAttribute(objectElement, 'width', 'auto');
|
|
65
|
-
const height = utils.getAttribute(objectElement, 'height', 'auto');
|
|
66
|
-
|
|
67
|
-
if (type.startsWith('image/svg')) {
|
|
68
|
-
// Inline SVG: <object type="image/svg+xml"><svg>...</svg></object>
|
|
69
|
-
// External SVG: <object type="image/svg+xml" data="path/to/file.svg"/>
|
|
70
|
-
// The <object> may contain alt text (not SVG markup) — only treat as inline if content has <svg.
|
|
71
|
-
const content = utils.getHtmlContent(objectElement);
|
|
72
|
-
const hasSvgMarkup = /<svg[\s>]/i.test(content);
|
|
73
|
-
if (hasSvgMarkup) {
|
|
74
|
-
imageData = {
|
|
75
|
-
type: 'svg',
|
|
76
|
-
content,
|
|
77
|
-
width,
|
|
78
|
-
height,
|
|
79
|
-
};
|
|
80
|
-
} else {
|
|
81
|
-
// External SVG file reference — render via <img src> (SVG renders in img tags)
|
|
82
|
-
imageData = {
|
|
83
|
-
type: 'image',
|
|
84
|
-
src: data,
|
|
85
|
-
width,
|
|
86
|
-
height,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
} else {
|
|
90
|
-
// External image reference
|
|
91
|
-
imageData = {
|
|
92
|
-
type: 'image',
|
|
93
|
-
src: data,
|
|
94
|
-
width,
|
|
95
|
-
height,
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Extract hotspotChoice children
|
|
101
|
-
const hotspotElements = utils.getChildrenByTag(element, 'hotspotChoice');
|
|
102
|
-
const hotspotChoices = hotspotElements.map((hotspot) => {
|
|
103
|
-
const classes = utils.getClasses(hotspot);
|
|
104
|
-
const shape = utils.getAttribute(hotspot, 'shape', 'rect');
|
|
105
|
-
const coords = utils.getAttribute(hotspot, 'coords', '');
|
|
106
|
-
const hotspotLabel = utils.getAttribute(hotspot, 'hotspotLabel', '');
|
|
107
|
-
|
|
108
|
-
return {
|
|
109
|
-
identifier: utils.getAttribute(hotspot, 'identifier', ''),
|
|
110
|
-
shape: shape as 'circle' | 'rect' | 'poly' | 'ellipse' | 'default',
|
|
111
|
-
coords,
|
|
112
|
-
...(hotspotLabel ? { hotspotLabel } : {}),
|
|
113
|
-
...(classes.length > 0 ? { classes } : {}),
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
// Extract attributes
|
|
118
|
-
const maxChoices = utils.getNumberAttribute(element, 'maxChoices', 1);
|
|
119
|
-
const minChoices = utils.getNumberAttribute(element, 'minChoices', 0);
|
|
120
|
-
const interactionClasses = utils.getClasses(element);
|
|
121
|
-
const maxSelectionsMessage = utils.getAttribute(element, 'data-max-selections-message', '') || null;
|
|
122
|
-
const minSelectionsMessage = utils.getAttribute(element, 'data-min-selections-message', '') || null;
|
|
123
|
-
|
|
124
|
-
// Extract prompt (optional)
|
|
125
|
-
const promptElements = utils.getChildrenByTag(element, 'prompt');
|
|
126
|
-
const prompt = promptElements.length > 0 ? utils.getHtmlContent(promptElements[0]) : null;
|
|
127
|
-
|
|
128
|
-
return {
|
|
129
|
-
imageData,
|
|
130
|
-
hotspotChoices,
|
|
131
|
-
maxChoices,
|
|
132
|
-
...(minChoices > 0 ? { minChoices } : {}),
|
|
133
|
-
prompt,
|
|
134
|
-
...(interactionClasses.length > 0 ? { interactionClasses } : {}),
|
|
135
|
-
...(maxSelectionsMessage ? { maxSelectionsMessage } : {}),
|
|
136
|
-
...(minSelectionsMessage ? { minSelectionsMessage } : {}),
|
|
137
|
-
};
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
validate(data) {
|
|
141
|
-
const errors: string[] = [];
|
|
142
|
-
const warnings: string[] = [];
|
|
143
|
-
|
|
144
|
-
// Validate image data
|
|
145
|
-
if (!data.imageData) {
|
|
146
|
-
warnings.push('hotspotInteraction has no image data');
|
|
147
|
-
} else if (data.imageData.type === 'image' && !data.imageData.src) {
|
|
148
|
-
errors.push('hotspotInteraction must have an image URL');
|
|
149
|
-
} else if (data.imageData.type === 'svg' && !data.imageData.content) {
|
|
150
|
-
errors.push('hotspotInteraction must have SVG content');
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// Validate hotspots exist
|
|
154
|
-
if (!data.hotspotChoices || data.hotspotChoices.length === 0) {
|
|
155
|
-
errors.push('hotspotInteraction must have at least one hotspot');
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// Validate hotspot identifiers and coords
|
|
159
|
-
if (data.hotspotChoices && data.hotspotChoices.length > 0) {
|
|
160
|
-
const identifiers = new Set<string>();
|
|
161
|
-
for (const hotspot of data.hotspotChoices) {
|
|
162
|
-
if (!hotspot.identifier) {
|
|
163
|
-
errors.push('All hotspots must have an identifier');
|
|
164
|
-
} else if (identifiers.has(hotspot.identifier)) {
|
|
165
|
-
errors.push(`Duplicate hotspot identifier: ${hotspot.identifier}`);
|
|
166
|
-
} else {
|
|
167
|
-
identifiers.add(hotspot.identifier);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
if (!hotspot.coords) {
|
|
171
|
-
errors.push(`Hotspot ${hotspot.identifier} must have coords`);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// Warn if maxChoices exceeds hotspot count
|
|
176
|
-
if (data.maxChoices > data.hotspotChoices.length) {
|
|
177
|
-
warnings.push(
|
|
178
|
-
`maxChoices (${data.maxChoices}) exceeds the number of hotspots (${data.hotspotChoices.length})`
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// Validate maxChoices
|
|
184
|
-
if (data.maxChoices < 0) {
|
|
185
|
-
errors.push('maxChoices must be non-negative');
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// Validate minChoices
|
|
189
|
-
if (data.minChoices !== undefined && data.minChoices < 0) {
|
|
190
|
-
errors.push('minChoices must be non-negative');
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// Validate minChoices <= maxChoices
|
|
194
|
-
if (
|
|
195
|
-
data.minChoices !== undefined &&
|
|
196
|
-
data.maxChoices > 0 &&
|
|
197
|
-
data.minChoices > data.maxChoices
|
|
198
|
-
) {
|
|
199
|
-
errors.push('minChoices cannot exceed maxChoices');
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
return {
|
|
203
|
-
valid: errors.length === 0,
|
|
204
|
-
errors: errors.length > 0 ? errors : undefined,
|
|
205
|
-
warnings: warnings.length > 0 ? warnings : undefined,
|
|
206
|
-
};
|
|
207
|
-
},
|
|
208
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { HotspotInteractionData, HotspotChoice, ImageData } from '../shared/types.js';
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standard QTI hottextInteraction extractor
|
|
3
|
-
*
|
|
4
|
-
* Extracts data from hottextInteraction elements (select text spans)
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { sanitizeHtml } from '../../core/sanitizer.js';
|
|
8
|
-
import type { QTIElement } from '../shared/types.js';
|
|
9
|
-
import type { ElementExtractor } from '../../extraction/types.js';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Hottext data extracted from hottextInteraction elements
|
|
13
|
-
*/
|
|
14
|
-
export interface HottextData {
|
|
15
|
-
hottextChoices: Array<{ identifier: string; text: string; classes?: string[] }>;
|
|
16
|
-
contentHtml: string;
|
|
17
|
-
maxChoices: number;
|
|
18
|
-
minChoices: number;
|
|
19
|
-
prompt: string | null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Standard QTI hottext interaction extractor
|
|
24
|
-
* Handles hottextInteraction elements (selectable text spans)
|
|
25
|
-
*/
|
|
26
|
-
export const standardHottextExtractor: ElementExtractor<HottextData> = {
|
|
27
|
-
id: 'qti:hottext-interaction',
|
|
28
|
-
name: 'QTI Standard Hottext Interaction',
|
|
29
|
-
priority: 10,
|
|
30
|
-
elementTypes: ['hottextInteraction'],
|
|
31
|
-
description: 'Extracts standard QTI hottextInteraction (select text spans)',
|
|
32
|
-
|
|
33
|
-
canHandle(element, _context) {
|
|
34
|
-
// All hottextInteraction elements are standard
|
|
35
|
-
return element.rawTagName === 'hottextInteraction' || element.rawTagName === 'qti-hottext-interaction';
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
extract(element, context) {
|
|
39
|
-
const { utils } = context;
|
|
40
|
-
|
|
41
|
-
// Extract hottext children (selectable text spans) - recursively search entire tree
|
|
42
|
-
const findHottextElements = (el: any): any[] => {
|
|
43
|
-
const results: any[] = [];
|
|
44
|
-
if (el.rawTagName === 'hottext' || el.rawTagName === 'qti-hottext') {
|
|
45
|
-
results.push(el);
|
|
46
|
-
}
|
|
47
|
-
if (el.childNodes) {
|
|
48
|
-
for (const child of el.childNodes) {
|
|
49
|
-
if (typeof child !== 'string') {
|
|
50
|
-
results.push(...findHottextElements(child));
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return results;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const hottextElements = findHottextElements(element);
|
|
58
|
-
const hottextChoices = hottextElements.map((hottext) => {
|
|
59
|
-
const classes = utils.getClasses(hottext);
|
|
60
|
-
return {
|
|
61
|
-
identifier: utils.getAttribute(hottext, 'identifier', ''),
|
|
62
|
-
text: utils.getTextContent(hottext),
|
|
63
|
-
...(classes.length > 0 ? { classes } : {}),
|
|
64
|
-
};
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
// Extract attributes
|
|
68
|
-
const maxChoices = utils.getNumberAttribute(element, 'maxChoices', 1);
|
|
69
|
-
const minChoices = utils.getNumberAttribute(element, 'minChoices', 0);
|
|
70
|
-
const interactionClasses = utils.getClasses(element);
|
|
71
|
-
const maxSelectionsMessage = utils.getAttribute(element, 'data-max-selections-message', '') || null;
|
|
72
|
-
const minSelectionsMessage = utils.getAttribute(element, 'data-min-selections-message', '') || null;
|
|
73
|
-
|
|
74
|
-
// Extract prompt (optional)
|
|
75
|
-
const promptElements = utils.getChildrenByTag(element, 'prompt');
|
|
76
|
-
const prompt = promptElements.length > 0 ? utils.getHtmlContent(promptElements[0]) : null;
|
|
77
|
-
|
|
78
|
-
// Extract content HTML (all content except prompt)
|
|
79
|
-
let contentHtml = '';
|
|
80
|
-
for (const child of element.childNodes) {
|
|
81
|
-
// Skip prompt elements
|
|
82
|
-
if (
|
|
83
|
-
typeof child !== 'string' &&
|
|
84
|
-
(child as QTIElement).rawTagName !== 'prompt' &&
|
|
85
|
-
(child as QTIElement).rawTagName !== 'qti-prompt'
|
|
86
|
-
) {
|
|
87
|
-
contentHtml += (child as QTIElement).outerHTML || child.toString();
|
|
88
|
-
} else if (typeof child === 'string') {
|
|
89
|
-
contentHtml += child;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Sanitize extracted HTML before rendering via {@html} in the component.
|
|
94
|
-
contentHtml = sanitizeHtml(contentHtml, { security: context.config.security });
|
|
95
|
-
|
|
96
|
-
return {
|
|
97
|
-
hottextChoices,
|
|
98
|
-
contentHtml,
|
|
99
|
-
maxChoices,
|
|
100
|
-
minChoices,
|
|
101
|
-
prompt,
|
|
102
|
-
...(interactionClasses.length > 0 ? { interactionClasses } : {}),
|
|
103
|
-
...(maxSelectionsMessage ? { maxSelectionsMessage } : {}),
|
|
104
|
-
...(minSelectionsMessage ? { minSelectionsMessage } : {}),
|
|
105
|
-
};
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
validate(data) {
|
|
109
|
-
const errors: string[] = [];
|
|
110
|
-
const warnings: string[] = [];
|
|
111
|
-
|
|
112
|
-
// Validate hottextChoices exist
|
|
113
|
-
if (!data.hottextChoices || data.hottextChoices.length === 0) {
|
|
114
|
-
errors.push('hottextInteraction must have at least one hottext');
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// Validate hottext identifiers
|
|
118
|
-
if (data.hottextChoices) {
|
|
119
|
-
const identifiers = new Set<string>();
|
|
120
|
-
for (const hottext of data.hottextChoices) {
|
|
121
|
-
if (!hottext.identifier) {
|
|
122
|
-
errors.push('All hottext elements must have an identifier');
|
|
123
|
-
} else if (identifiers.has(hottext.identifier)) {
|
|
124
|
-
errors.push(`Duplicate hottext identifier: ${hottext.identifier}`);
|
|
125
|
-
} else {
|
|
126
|
-
identifiers.add(hottext.identifier);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Validate maxChoices
|
|
132
|
-
if (data.maxChoices < 0) {
|
|
133
|
-
errors.push('maxChoices must be non-negative');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Warn if maxChoices exceeds hottext count
|
|
137
|
-
if (data.hottextChoices && data.maxChoices > data.hottextChoices.length) {
|
|
138
|
-
warnings.push(
|
|
139
|
-
`maxChoices (${data.maxChoices}) exceeds the number of hottext choices (${data.hottextChoices.length})`
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// Validate minChoices
|
|
144
|
-
if (data.minChoices !== undefined && data.minChoices < 0) {
|
|
145
|
-
errors.push('minChoices must be non-negative');
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Validate minChoices <= maxChoices
|
|
149
|
-
if (
|
|
150
|
-
data.minChoices !== undefined &&
|
|
151
|
-
data.maxChoices > 0 &&
|
|
152
|
-
data.minChoices > data.maxChoices
|
|
153
|
-
) {
|
|
154
|
-
errors.push('minChoices cannot exceed maxChoices');
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
return {
|
|
158
|
-
valid: errors.length === 0,
|
|
159
|
-
errors: errors.length > 0 ? errors : undefined,
|
|
160
|
-
warnings: warnings.length > 0 ? warnings : undefined,
|
|
161
|
-
};
|
|
162
|
-
},
|
|
163
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { HottextInteractionData, HottextChoice } from '../shared/types.js';
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vertical QTI interaction modules.
|
|
3
|
-
*
|
|
4
|
-
* Each interaction folder owns the extractor entrypoint and interaction-specific
|
|
5
|
-
* type exports. Legacy extractor and type paths re-export from this module layer.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export type {
|
|
9
|
-
AssociableChoice,
|
|
10
|
-
AssociableHotspot,
|
|
11
|
-
BaseInteractionData,
|
|
12
|
-
GraphicAssociateHotspot,
|
|
13
|
-
GraphicOrderChoice,
|
|
14
|
-
HotspotChoice,
|
|
15
|
-
ImageData,
|
|
16
|
-
MediaElement,
|
|
17
|
-
Point,
|
|
18
|
-
PositionObjectStage,
|
|
19
|
-
QTIElement,
|
|
20
|
-
} from './shared/index.js';
|
|
21
|
-
|
|
22
|
-
export * from './associate/index.js';
|
|
23
|
-
export * from './choice/index.js';
|
|
24
|
-
export * from './custom/index.js';
|
|
25
|
-
export * from './drawing/index.js';
|
|
26
|
-
export * from './end-attempt/index.js';
|
|
27
|
-
export * from './extended-text/index.js';
|
|
28
|
-
export * from './gap-match/index.js';
|
|
29
|
-
export * from './graphic-associate/index.js';
|
|
30
|
-
export * from './graphic-gap-match/index.js';
|
|
31
|
-
export * from './graphic-order/index.js';
|
|
32
|
-
export * from './hotspot/index.js';
|
|
33
|
-
export * from './hottext/index.js';
|
|
34
|
-
export * from './inline/index.js';
|
|
35
|
-
export * from './inline-choice/index.js';
|
|
36
|
-
export * from './match/index.js';
|
|
37
|
-
export * from './media/index.js';
|
|
38
|
-
export * from './modules.js';
|
|
39
|
-
export * from './order/index.js';
|
|
40
|
-
export * from './portable-custom/index.js';
|
|
41
|
-
export * from './position-object/index.js';
|
|
42
|
-
export * from './select-point/index.js';
|
|
43
|
-
export * from './slider/index.js';
|
|
44
|
-
export * from './text-entry/index.js';
|
|
45
|
-
export * from './upload/index.js';
|
|
46
|
-
|
|
47
|
-
export type {
|
|
48
|
-
InteractionData,
|
|
49
|
-
InteractionDataMap,
|
|
50
|
-
InteractionType,
|
|
51
|
-
InteractionValueMap,
|
|
52
|
-
} from './shared/types.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './render-plan.js';
|