@pie-qti/item-player 0.1.10 → 0.1.12
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/dist/catalog/applyGlossaryTriggers.d.ts +0 -1
- 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 +0 -1
- 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 +0 -1
- package/dist/components/utils/index.js +1 -0
- 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 +0 -1
- package/dist/core/ComponentRegistry.js +1 -0
- package/dist/core/ComponentRegistry.js.map +1 -0
- package/dist/core/Player.d.ts +0 -1
- package/dist/core/Player.js +1 -0
- 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 +0 -1
- package/dist/document/AssessmentItemDocument.js +1 -0
- package/dist/document/AssessmentItemDocument.js.map +1 -0
- package/dist/element.js +1510 -1435
- 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 +0 -1
- package/dist/extraction/ExtractionRegistry.js +1 -0
- package/dist/extraction/ExtractionRegistry.js.map +1 -0
- package/dist/extraction/createContext.d.ts +0 -1
- package/dist/extraction/createContext.js +1 -0
- package/dist/extraction/createContext.js.map +1 -0
- package/dist/extraction/index.d.ts +0 -1
- package/dist/extraction/index.js +1 -0
- package/dist/extraction/index.js.map +1 -0
- package/dist/extraction/interactionExtractionPipeline.d.ts +0 -1
- package/dist/extraction/interactionExtractionPipeline.js +1 -0
- package/dist/extraction/interactionExtractionPipeline.js.map +1 -0
- package/dist/extraction/interactionSecurity.d.ts +0 -1
- package/dist/extraction/interactionSecurity.js +1 -0
- package/dist/extraction/interactionSecurity.js.map +1 -0
- package/dist/extraction/types.d.ts +0 -1
- 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 +0 -1
- package/dist/presentation/itemPresentationPlan.js +2 -2
- 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 +0 -1
- package/dist/types/index.js +1 -0
- 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 +0 -1
- package/dist/web-components/QTIInteractionBase.js +1 -0
- package/dist/web-components/QTIInteractionBase.js.map +1 -0
- package/dist/web-components/QTIInteractionElement.d.ts +0 -1
- 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 +6 -6
- 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/presentation/itemPresentationPlan.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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawingUtils.js","sourceRoot":"","sources":["../../src/utils/drawingUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,C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* Drawing analysis utilities for QTI drawing interactions\n * \n * These utilities help analyze drawing content for scoring purposes.\n * They work with ImageData extracted from canvas elements.\n */\n\nimport type { QTIFileResponse } from '../types/index.js';\n\n/**\n * Check if a drawing contains at least some drawn content (non-white pixels)\n * \n * @param imageData - ImageData from canvas (RGBA format, 4 bytes per pixel)\n * @param threshold - Minimum number of non-white pixels to consider a line drawn (default: 50)\n * @returns true if the drawing contains at least threshold non-white pixels\n */\nexport function hasLine(\n\timageData: { data: Uint8ClampedArray; width: number; height: number },\n\tthreshold: number = 50\n): boolean {\n\tconst { data } = imageData;\n\tlet nonWhitePixels = 0;\n\t\n\t// Check each pixel (RGBA format: 4 bytes per pixel)\n\tfor (let i = 0; i < data.length; i += 4) {\n\t\tconst r = data[i];\n\t\tconst g = data[i + 1];\n\t\tconst b = data[i + 2];\n\t\tconst a = data[i + 3];\n\t\t\n\t\t// Consider pixel non-white if:\n\t\t// - Alpha is significant (> 10)\n\t\t// - AND color is not white/very light (any channel < 240)\n\t\tif (a > 10 && (r < 240 || g < 240 || b < 240)) {\n\t\t\tnonWhitePixels++;\n\t\t}\n\t}\n\t\n\treturn nonWhitePixels >= threshold;\n}\n\n/**\n * Get ImageData from a QTIFileResponse if available\n * \n * @param fileResponse - QTIFileResponse object (may contain imageData)\n * @returns ImageData if available, null otherwise\n */\nexport function getImageDataFromResponse(\n\tfileResponse: QTIFileResponse | null | undefined\n): { data: Uint8ClampedArray; width: number; height: number } | null {\n\tif (!fileResponse?.imageData) {\n\t\treturn null;\n\t}\n\treturn fileResponse.imageData;\n}\n\n/**\n * Analyze a drawing response to determine if it contains drawn content\n * \n * @param fileResponse - QTIFileResponse from drawing interaction\n * @param threshold - Minimum number of non-white pixels (default: 50)\n * @returns true if drawing contains content, false otherwise\n */\nexport function analyzeDrawing(\n\tfileResponse: QTIFileResponse | null | undefined,\n\tthreshold: number = 50\n): boolean {\n\tconst imageData = getImageDataFromResponse(fileResponse);\n\tif (!imageData) {\n\t\treturn false;\n\t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AC;IACd,KAAK,MAAM,EAAE,IAAI,WAAW,EAAE,CAAC;QAC9B,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;YAAE,KAAK,EAAE,CAAC;IAC9C,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC","sourcesContent":["/**\n * Generic response/value helpers.\n *\n * These are UI-agnostic utilities intended to keep \"is this answered?\"\n * logic consistent across apps (example, assessment player, etc).\n */\n\n/**\n * Returns true when a response value should be treated as \"no response / unanswered\".\n *\n * Notes:\n * - `0` and `false` are valid answers in some interactions, so they are NOT empty.\n * - Empty objects are treated as empty, and objects whose values are all empty are treated as empty.\n */\nexport function isResponseEmpty(value: unknown): boolean {\n\tif (value === null || value === undefined) return true;\n\n\tif (typeof value === 'string') return value.trim() === '';\n\n\tif (Array.isArray(value)) {\n\t\tif (value.length === 0) return true;\n\t\t// Some interactions may emit arrays with empty members; treat \"all empty\" as empty.\n\t\treturn value.every((v) => isResponseEmpty(v));\n\t}\n\n\t// Files/blobs are valid user responses (upload interactions).\n\tif (typeof Blob !== 'undefined' && value instanceof Blob) return false;\n\n\tif (typeof value === 'object') {\n\t\tconst obj = value as Record<string, unknown>;\n\t\tconst keys = Object.keys(obj);\n\t\tif (keys.length === 0) return true;\n\t\treturn keys.every((k) => isResponseEmpty(obj[k]));\n\t}\n\n\t// numbers, booleans, symbols, functions -> treat as \"has a response\"\n\treturn false;\n}\n\nexport function countAnsweredForResponseIds(\n\tresponses: Record<string, unknown>,\n\tresponseIds: readonly string[]\n): number {\n\tlet count = 0;\n\tfor (const id of responseIds) {\n\t\tif (!isResponseEmpty(responses[id])) count++;\n\t}\n\treturn count;\n}\n\n\n"]}
|
|
@@ -117,4 +117,3 @@ export declare abstract class QTIInteractionBase<TData extends InteractionData =
|
|
|
117
117
|
*/
|
|
118
118
|
protected createElement<K extends keyof HTMLElementTagNameMap>(tagName: K, classes?: string[]): HTMLElementTagNameMap[K];
|
|
119
119
|
}
|
|
120
|
-
//# sourceMappingURL=QTIInteractionBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QTIInteractionBase.js","sourceRoot":"","sources":["../../src/web-components/QTIInteractionBase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,EAEN,cAAc,EACd,aAAa,EAEb,aAAa,GACb,MAAM,4BAA4B,CAAC;AAEpC,MAAM,OAAgB,kBACrB,SAAQ,WAAW;IAYnB;QACC,KAAK,EAAE,CAAC;QAVD,iBAAY,GAAiB,IAAI,CAAC;QAClC,cAAS,GAA2C,IAAI,CAAC;QACzD,cAAS,GAAG,KAAK,CAAC;QAIlB,oBAAe,GAAG,KAAK,CAAC;QACxB,kBAAa,GAAG,KAAK,CAAC;QAI7B,4EAA4E;QAC3E,IAAY,CAAC,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,iDAAiD;IAEjD;;;OAGG;IACH,IAAI,WAAW;QACd,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACd,GAAG,IAAI,CAAC,OAAO,+CAA+C,CAC9D,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAED,IAAI,WAAW,CAAC,KAAY;QAC3B,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,EAAE,CAAC;YACjC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;YAC1B,IAAI,CAAC,aAAa,EAAE,CAAC;QACtB,CAAC;IACF,CAAC;IAED;;;OAGG;IACH,IAAI,QAAQ;QACX,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAED,IAAI,QAAQ,CAAC,KAA6C;QACzD,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE,CAAC;YAC9B,IAAI,CAAC,SAAS,GAAG,KAAK,C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YACtC,IAAI,CAAC;gBACJ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAiB,CAAC,CAAC;YACvC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,CAAC,SAAS,CAAC,KAAc,EAAE,aAAa,CAAC,CAAC;YAC/C,CAAC;QACF,CAAC;IACF,CAAC;IAED;;;OAGG;IACO,SAAS;QAClB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BN,CAAC;IACH,CAAC;IAED;;OAEG;IACO,gBAAgB,CAAC,OAAiC,EAAE,IAAiB;QAC9E,IAAI,CAAC;YACJ,OAAO,CAAC,SAAS,GAAG,IAAW,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,SAAS,CAAC,KAAc,EAAE,cAAc,CAAC,CAAC;YAC/C,OAAO,CAAC,SAAS,GAAG,uDAAuD,CAAC;QAC7E,CAAC;IACF,CAAC;IAED;;OAEG;IACO,aAAa,CACtB,OAAU,EACV,OAAkB;QAElB,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,OAAO,CAAC;IAChB,CAAC;CACD","sourcesContent":["/**\n * Abstract base class for all QTI interaction web components\n *\n * Provides common functionality including:\n * - Reactive property system\n * - Shadow DOM management\n * - Event emission helpers\n * - Update scheduling\n * - Lifecycle management\n *\n * @example\n * ```typescript\n * export class QTIChoiceInteraction extends QTIInteractionBase<ChoiceInteractionData> {\n * protected render(): void {\n * this.shadowRoot.innerHTML = `...`;\n * this.attachEventListeners();\n * }\n *\n * protected cleanup(): void {\n * // Optional cleanup\n * }\n * }\n * ```\n */\n\nimport type { HtmlContent } from '../types/index.js';\nimport type { InteractionData } from '../interactions/index.js';\nimport {\n\ttype InteractionResponseValue,\n\tQTIChangeEvent,\n\tQTIErrorEvent,\n\ttype QTIInteractionElement,\n\tQTIReadyEvent,\n} from './QTIInteractionElement.js';\n\nexport abstract class QTIInteractionBase<TData extends InteractionData = InteractionData>\n\textends HTMLElement\n\timplements QTIInteractionElement<TData>\n{\n\tprivate _interaction: TData | null = null;\n\tprivate _response: InteractionResponseValue<TData> | null = null;\n\tprivate _disabled = false;\n\tprivate _typeset?: (element: HTMLElement) => void;\n\n\tdeclare shadowRoot: ShadowRoot; // Override HTMLElement's shadowRoot type\n\tprivate updateScheduled = false;\n\tprivate isInitialized = false;\n\n\tconstructor() {\n\t\tsuper();\n\t\t// attachShadow returns ShadowRoot, and we cast to ensure type compatibility\n\t\t(this as any).shadowRoot = this.attachShadow({ mode: 'open' });\n\t}\n\n\t// ========== Property Getters/Setters ==========\n\n\t/**\n\t * The processed interaction data from QTI XML\n\t * Required property - throws if accessed before being set\n\t */\n\tget interaction(): TData {\n\t\tif (!this._interaction) {\n\t\t\tthrow new Error(\n\t\t\t\t`${this.tagName}: interaction property must be set before use`\n\t\t\t);\n\t\t}\n\t\treturn this._interaction;\n\t}\n\n\tset interaction(value: TData) {\n\t\tif (this._interaction !== value) {\n\t\t\tthis._interaction = value;\n\t\t\tthis.requestUpdate();\n\t\t}\n\t}\n\n\t/**\n\t * Current response value (type depends on interaction type)\n\t * May be null if no response has been provided yet\n\t */\n\tget response(): InteractionResponseValue<TData> | null {\n\t\treturn this._response;\n\t}\n\n\tset response(value: InteractionResponseValue<TData> | null) {\n\t\tif (this._response !== value) {\n\t\t\tthis._response = value;\n\t\t\tthis.requestUpdate();\n\t\t}\n\t}\n\n\t/**\n\t * Whether the interaction is in read-only/disabled mode\n\t */\n\tget disabled(): boolean {\n\t\treturn this._disabled;\n\t}\n\n\tset disabled(value: boolean) {\n\t\tconst newValue = Boolean(value);\n\t\tif (this._disabled !== newValue) {\n\t\t\tthis._disabled = newValue;\n\t\t\tthis.requestUpdate();\n\t\t}\n\t}\n\n\t/**\n\t * Optional function to apply math typesetting (e.g., KaTeX, MathJax)\n\t */\n\tget typeset(): ((element: HTMLElement) => void) | undefined {\n\t\treturn this._typeset;\n\t}\n\n\tset typeset(value: ((element: HTMLElement) => void) | undefined) {\n\t\tif (this._typeset !== value) {\n\t\t\tthis._typeset = value;\n\t\t\tthis.requestUpdate();\n\t\t}\n\t}\n\n\t// ========== Lifecycle Hooks ==========\n\n\t/**\n\t * Called when the element is connected to the DOM\n\t */\n\tconnectedCallback(): void {\n\t\tif (!this.isInitialized) {\n\t\t\tthis.isInitialized = true;\n\t\t\tthis.init();\n\t\t}\n\t\tthis.requestUpdate();\n\t}\n\n\t/**\n\t * Called when the element is disconnected from the DOM\n\t */\n\tdisconnectedCallback(): void {\n\t\tthis.cleanup();\n\t}\n\n\t/**\n\t * Called once when the element is first connected\n\t * Override this to perform one-time initialization\n\t */\n\tprotected init(): void {\n\t\t// Override in subclasses if needed\n\t}\n\n\t// ========== Reactive Updates ==========\n\n\t/**\n\t * Schedule a re-render on the next microtask\n\t * Multiple calls within the same tick are batched\n\t */\n\tprotected requestUpdate(): void {\n\t\tif (!this.updateScheduled && this.isConnected) {\n\t\t\tthis.updateScheduled = true;\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tthis.updateScheduled = false;\n\t\t\t\ttry {\n\t\t\t\t\tthis.render();\n\t\t\t\t\tif (this.isInitialized) {\n\t\t\t\t\t\tthis.emitReady();\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.emitError(error as Error, 'render');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t// ========== Abstract Methods ==========\n\n\t/**\n\t * Render the component's UI\n\t * Called automatically when properties change\n\t * Must be implemented by subclasses\n\t */\n\tprotected abstract render(): void;\n\n\t/**\n\t * Clean up resources when component is removed from DOM\n\t * Override this to remove event listeners, cancel timers, etc.\n\t */\n\tprotected abstract cleanup(): void;\n\n\t// ========== Event Helpers ==========\n\n\t/**\n\t * Emit a qti-change event when the user response changes\n\t * @param value - The new response value\n\t */\n\tprotected emitChange(value: InteractionResponseValue<TData> | null): void {\n\t\tif (!this._interaction) {\n\t\t\tconsole.warn(`${this.tagName}: Cannot emit change without interaction data`);\n\t\t\treturn;\n\t\t}\n\n\t\tconst event = new QTIChangeEvent({\n\t\t\tresponseId: this._interaction.responseId,\n\t\t\tvalue,\n\t\t\ttimestamp: Date.now(),\n\t\t});\n\n\t\tthis.dispatchEvent(event);\n\t}\n\n\t/**\n\t * Emit a qti-ready event when component is initialized\n\t */\n\tprivate emitReady(): void {\n\t\tthis.dispatchEvent(new QTIReadyEvent());\n\t}\n\n\t/**\n\t * Emit a qti-error event when an error occurs\n\t */\n\tprotected emitError(error: Error, context: string): void {\n\t\tconst event = new QTIErrorEvent({ error, context });\n\t\tthis.dispatchEvent(event);\n\t\tconsole.error(`${this.tagName} error in ${context}:`, error);\n\t}\n\n\t// ========== Utility Methods ==========\n\n\t/**\n\t * Apply math typesetting to the shadow root\n\t * Call this after updating the DOM with math content\n\t */\n\tprotected applyTypesetting(): void {\n\t\tif (this._typeset && this.shadowRoot) {\n\t\t\ttry {\n\t\t\t\tthis._typeset(this.shadowRoot as any);\n\t\t\t} catch (error) {\n\t\t\t\tthis.emitError(error as Error, 'typesetting');\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get base styles for all interaction components\n\t * Override and call super.getStyles() to extend these styles\n\t */\n\tprotected getStyles(): string {\n\t\treturn `\n\t\t\t:host {\n\t\t\t\tdisplay: block;\n\t\t\t\tfont-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',\n\t\t\t\t\tRoboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n\t\t\t\tfont-size: 16px;\n\t\t\t\tline-height: 1.5;\n\t\t\t}\n\n\t\t\t:host([disabled]) {\n\t\t\t\topacity: 0.6;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\n\t\t\t.qti-prompt {\n\t\t\t\tmargin-bottom: 1rem;\n\t\t\t\tfont-weight: 600;\n\t\t\t}\n\n\t\t\t.qti-error {\n\t\t\t\tcolor: #dc2626;\n\t\t\t\tpadding: 0.75rem;\n\t\t\t\tbackground: #fee2e2;\n\t\t\t\tborder-radius: 0.375rem;\n\t\t\t\tmargin: 0.5rem 0;\n\t\t\t}\n\t\t`;\n\t}\n\n\t/**\n\t * Safely set innerHTML with error handling\n\t */\n\tprotected safeSetInnerHTML(element: HTMLElement | ShadowRoot, html: HtmlContent): void {\n\t\ttry {\n\t\t\telement.innerHTML = html as any;\n\t\t} catch (error) {\n\t\t\tthis.emitError(error as Error, 'setInnerHTML');\n\t\t\telement.innerHTML = `<div class=\"qti-error\">Failed to render content</div>`;\n\t\t}\n\t}\n\n\t/**\n\t * Create an element with classes\n\t */\n\tprotected createElement<K extends keyof HTMLElementTagNameMap>(\n\t\ttagName: K,\n\t\tclasses?: string[]\n\t): HTMLElementTagNameMap[K] {\n\t\tconst element = document.createElement(tagName);\n\t\tif (classes && classes.length > 0) {\n\t\t\telement.className = classes.join(' ');\n\t\t}\n\t\treturn element;\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QTIInteractionElement.js","sourceRoot":"","sources":["../../src/web-components/QTIInteractionElement.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA0CH;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,cAAyD,SAAQ,WAAyC;IACtH,YAAY,MAAoC;QAC/C,KAAK,CAAC,YAAY,EAAE;YACnB,MAAM;YACN,OAAO,EAAE,IAAI,EAAE,6BAA6B;YAC5C,QAAQ,EAAE,IAAI,EAAE,8BAA8B;YAC9C,UAAU,EAAE,KAAK,EAAE,sBAAsB;SACzC,CAAC,CAAC;IACJ,CAAC;CACD;AAED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAiB;IACnD;QACC,KAAK,CAAC,WAAW,EAAE;YAClB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;SACjB,CAAC,CAAC;IACJ,CAAC;CACD;AAaD,MAAM,OAAO,aAAc,SAAQ,WAAgC;IAClE,YAAY,MAA2B;QACtC,KAAK,CAAC,WAAW,EAAE;YAClB,MAAM;YACN,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;SACjB,CAAC,CAAC;IACJ,CAAC;CACD;AAWD,MAAM,OAAO,uBAAwB,SAAQ,WAA0C;IACtF,YAAY,MAAqC;QAChD,KAAK,CAAC,sBAAsB,EAAE;YAC7B,MAAM;YACN,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;SACjB,CAAC,CAAC;IACJ,CAAC;CACD","sourcesContent":["/**\n * Standard interface and event types for QTI interaction web components\n *\n * All QTI interaction web components must implement the QTIInteractionElement\n * interface and emit QTIChangeEvent when the user response changes.\n */\n\nimport type { InteractionData, InteractionValueMap } from '../interactions/index.js';\n\nexport type InteractionResponseValue<TData extends InteractionData = InteractionData> =\n\tTData extends { type: infer TType }\n\t\t? TType extends keyof InteractionValueMap\n\t\t\t? InteractionValueMap[TType]\n\t\t\t: unknown\n\t\t: unknown;\n\n/**\n * Standard interface that all QTI interaction web components must implement\n */\nexport interface QTIInteractionElement<TData extends InteractionData = InteractionData> extends HTMLElement {\n\t/** The processed interaction data from the QTI XML */\n\tinteraction: TData;\n\n\t/** The current response value (type depends on interaction type) */\n\tresponse: InteractionResponseValue<TData> | null;\n\n\t/** Whether the interaction is in read-only/disabled mode */\n\tdisabled: boolean;\n\n\t/** Optional function to apply math typesetting (e.g., KaTeX, MathJax) */\n\ttypeset?: (element: HTMLElement) => void;\n}\n\n/**\n * Detail payload for the qti-change event\n */\nexport interface QTIChangeEventDetail<TValue = InteractionResponseValue | null> {\n\t/** The response identifier for this interaction */\n\tresponseId: string;\n\n\t/** The new response value */\n\tvalue: TValue;\n\n\t/** Timestamp when the change occurred */\n\ttimestamp: number;\n}\n\n/**\n * Custom event emitted when an interaction's response changes\n *\n * This event bubbles and can cross shadow DOM boundaries, making it\n * easy to listen for changes at the container level.\n *\n * @example\n * ```typescript\n * element.addEventListener('qti-change', (event: QTIChangeEvent) => {\n * console.log('Response changed:', event.detail.responseId, event.detail.value);\n * });\n * ```\n */\nexport class QTIChangeEvent<TValue = InteractionResponseValue | null> extends CustomEvent<QTIChangeEventDetail<TValue>> {\n\tconstructor(detail: QTIChangeEventDetail<TValue>) {\n\t\tsuper('qti-change', {\n\t\t\tdetail,\n\t\t\tbubbles: true, // Bubble up through DOM tree\n\t\t\tcomposed: true, // Cross shadow DOM boundaries\n\t\t\tcancelable: false, // Cannot be prevented\n\t\t});\n\t}\n}\n\n/**\n * Event emitted when a component is ready (initialized and rendered)\n */\nexport class QTIReadyEvent extends CustomEvent<void> {\n\tconstructor() {\n\t\tsuper('qti-ready', {\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t\tcancelable: false,\n\t\t});\n\t}\n}\n\n/**\n * Event emitted when an error occurs in a component\n */\nexport interface QTIErrorEventDetail {\n\t/** The error that occurred */\n\terror: Error;\n\n\t/** Context about where the error occurred */\n\tcontext: string;\n}\n\nexport class QTIErrorEvent extends CustomEvent<QTIErrorEventDetail> {\n\tconstructor(detail: QTIErrorEventDetail) {\n\t\tsuper('qti-error', {\n\t\t\tdetail,\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t\tcancelable: false,\n\t\t});\n\t}\n}\n\n/**\n * Special event for AssociateInteraction selection state\n * (used for tracking which item is selected for pairing)\n */\nexport interface QTISelectionChangeEventDetail {\n\t/** The identifier of the selected item, or null if deselected */\n\tselected: string | null;\n}\n\nexport class QTISelectionChangeEvent extends CustomEvent<QTISelectionChangeEventDetail> {\n\tconstructor(detail: QTISelectionChangeEventDetail) {\n\t\tsuper('qti-selection-change', {\n\t\t\tdetail,\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t\tcancelable: false,\n\t\t});\n\t}\n}\n"]}
|
|
@@ -5,4 +5,3 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { QTIInteractionBase } from './QTIInteractionBase.js';
|
|
7
7
|
export { QTIChangeEvent, type InteractionResponseValue, type QTIChangeEventDetail, QTIErrorEvent, type QTIErrorEventDetail, type QTIInteractionElement, QTIReadyEvent, QTISelectionChangeEvent, type QTISelectionChangeEventDetail, } from './QTIInteractionElement.js';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -8,3 +8,4 @@ export { QTIInteractionBase } from './QTIInteractionBase.js';
|
|
|
8
8
|
export { QTIChangeEvent, QTIErrorEvent, QTIReadyEvent, QTISelectionChangeEvent, } from './QTIInteractionElement.js';
|
|
9
9
|
// Note: Web component implementations are provided by separate packages
|
|
10
10
|
// (e.g., @pie-qti/default-components) that use these base classes
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web-components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qCAAqC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACN,cAAc,EAGd,aAAa,EAGb,aAAa,EACb,uBAAuB,GAEvB,MAAM,4BAA4B,CAAC;AAEpC,wEAAwE;AACxE,kEAAkE","sourcesContent":["/**\n * Web Components for QTI Interactions\n *\n * Framework-agnostic web components that can be used in any JavaScript environment\n */\n\n// Export base classes and interfaces\nexport { QTIInteractionBase } from './QTIInteractionBase.js';\nexport {\n\tQTIChangeEvent,\n\ttype InteractionResponseValue,\n\ttype QTIChangeEventDetail,\n\tQTIErrorEvent,\n\ttype QTIErrorEventDetail,\n\ttype QTIInteractionElement,\n\tQTIReadyEvent,\n\tQTISelectionChangeEvent,\n\ttype QTISelectionChangeEventDetail,\n} from './QTIInteractionElement.js';\n\n// Note: Web component implementations are provided by separate packages\n// (e.g., @pie-qti/default-components) that use these base classes\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-qti/item-player",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Modern QTI player supporting QTI 2.2 and 3.0 - Client-side with optional backend hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@pie-qti/i18n": "0.1.
|
|
31
|
-
"@pie-qti/ims-cp-core": "0.1.
|
|
32
|
-
"@pie-qti/qti-common": "0.1.
|
|
33
|
-
"@pie-qti/qti-processing": "0.1.
|
|
34
|
-
"@pie-qti/typeset-katex": "0.1.
|
|
30
|
+
"@pie-qti/i18n": "0.1.12",
|
|
31
|
+
"@pie-qti/ims-cp-core": "0.1.12",
|
|
32
|
+
"@pie-qti/qti-common": "0.1.12",
|
|
33
|
+
"@pie-qti/qti-processing": "0.1.12",
|
|
34
|
+
"@pie-qti/typeset-katex": "0.1.12",
|
|
35
35
|
"@tiptap/core": "^3.15.3",
|
|
36
36
|
"@tiptap/extension-mathematics": "^3.15.3",
|
|
37
37
|
"@tiptap/extension-placeholder": "^3.15.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applyGlossaryTriggers.d.ts","sourceRoot":"","sources":["../../src/catalog/applyGlossaryTriggers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA0BlD,UAAU,wBAAwB;IACjC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,cAAc;IAC9B,MAAM,IAAI,UAAU,GAAG,SAAS,CAAC;IACjC,eAAe,CACd,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAAE,GACvC,MAAM,GAAG,IAAI,CAAC;IACjB,oBAAoB,IAAI,wBAAwB,CAAC;CACjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,IAAI,CA8GhG;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAUpE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalogExtractor.d.ts","sourceRoot":"","sources":["../../src/catalog/catalogExtractor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA6B,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1E;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAUxD;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAKvE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,GAAG,YAAY,CAMtF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalogLookup.d.ts","sourceRoot":"","sources":["../../src/catalog/catalogLookup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC9B,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,GACX,MAAM,GAAG,IAAI,CA8Bf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glossaryAction.d.ts","sourceRoot":"","sources":["../../src/catalog/glossaryAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAExF,MAAM,WAAW,oBAAoB;IACpC,MAAM,EAAE,cAAc,GAAG;QACxB,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;KACnD,CAAC;CACF;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,oBAAoB;sBAQ1D,oBAAoB;;EAcvC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/catalog/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAEpD,MAAM,WAAW,WAAW;IAC3B,OAAO,EAAE,YAAY,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC5B;;;;OAIG;IACH,KAAK,EACF,oBAAoB,GACpB,qBAAqB,GACrB,sBAAsB,GACtB,mBAAmB,GACnB,oBAAoB,GACpB,cAAc,GACd,mBAAmB,GACnB,sBAAsB,GACtB,MAAM,CAAC;IACV,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typesetAction.d.ts","sourceRoot":"","sources":["../../../src/components/actions/typesetAction.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,mBAAmB;iBAuC7D,mBAAmB;;EAWjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assignProps.d.ts","sourceRoot":"","sources":["../../../src/components/utils/assignProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { assignProps } from '@pie-qti/qti-common';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feedbackUtils.d.ts","sourceRoot":"","sources":["../../../src/components/utils/feedbackUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,iBAAiB,EAQ1D,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,iBAAiB,EAAgC,GAC3D,MAAM,CASR;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,aAAa,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,yDAAyD;IACzD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qEAAqE;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4BAA4B,GACnC,MAAM,CAuCR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,2BAA2B,EAC3B,2BAA2B,EAC3B,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,GACjC,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stimulusRender.d.ts","sourceRoot":"","sources":["../../../src/components/utils/stimulusRender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;AAEzD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC5C,eAAe,EAAE,2BAA2B,GAAG,SAAS,EACxD,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/C,QAAQ,EAAE,iBAAiB,GACzB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWxB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAoC3G"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stylesheetRender.d.ts","sourceRoot":"","sources":["../../../src/components/utils/stylesheetRender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAA4B,MAAM,sBAAsB,CAAC;AAIlG,wBAAgB,wBAAwB,CACvC,eAAe,EAAE,2BAA2B,GAAG,SAAS,EACxD,aAAa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,MAAM,GAAG,OAAO;IAInC;;;;;;;OAOG;IACH,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAK9C;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,iBAAiB,CAI3D;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAQ9E;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IAEb,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB,yBAAyB;IACzB,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC5C"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ItemRenderer - Framework-agnostic rendering engine for QTI items
|
|
3
|
-
*
|
|
4
|
-
* Replaces ItemBody.svelte with vanilla JavaScript. Creates and manages
|
|
5
|
-
* web component instances for QTI interactions, handles response state,
|
|
6
|
-
* and orchestrates the rendering pipeline.
|
|
7
|
-
*/
|
|
8
|
-
import type { Player } from './Player.js';
|
|
9
|
-
/**
|
|
10
|
-
* Configuration for ItemRenderer
|
|
11
|
-
*/
|
|
12
|
-
export interface ItemRendererConfig {
|
|
13
|
-
/** Player instance containing the QTI item */
|
|
14
|
-
player: Player;
|
|
15
|
-
/** DOM container where the item will be rendered */
|
|
16
|
-
container: HTMLElement;
|
|
17
|
-
/** Current response values keyed by responseId */
|
|
18
|
-
responses?: Record<string, any>;
|
|
19
|
-
/** Whether the item is in read-only/disabled mode */
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
/** Optional function to apply math typesetting (e.g., KaTeX, MathJax) */
|
|
22
|
-
typeset?: (element: HTMLElement) => void;
|
|
23
|
-
/** Callback when a response changes */
|
|
24
|
-
onResponseChange?: (responseId: string, value: any) => void;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* ItemRenderer class manages the rendering of QTI items using web components
|
|
28
|
-
*/
|
|
29
|
-
export declare class ItemRenderer {
|
|
30
|
-
private player;
|
|
31
|
-
private container;
|
|
32
|
-
private componentRegistry;
|
|
33
|
-
private responses;
|
|
34
|
-
private disabled;
|
|
35
|
-
private typeset?;
|
|
36
|
-
private onResponseChange;
|
|
37
|
-
private renderedElements;
|
|
38
|
-
private eventListeners;
|
|
39
|
-
private selectedForPairing;
|
|
40
|
-
constructor(config: ItemRendererConfig);
|
|
41
|
-
/**
|
|
42
|
-
* Render the entire item with all interactions
|
|
43
|
-
*/
|
|
44
|
-
render(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Get item body HTML with block interactions removed
|
|
47
|
-
*/
|
|
48
|
-
private getProcessedItemBodyHtml;
|
|
49
|
-
/**
|
|
50
|
-
* Process inline interactions (textEntry, inlineChoice)
|
|
51
|
-
* Replaces QTI XML tags with web component placeholders
|
|
52
|
-
*/
|
|
53
|
-
private processInlineInteractions;
|
|
54
|
-
/**
|
|
55
|
-
* Create a web component element for an interaction
|
|
56
|
-
*/
|
|
57
|
-
private createInteractionElement;
|
|
58
|
-
/**
|
|
59
|
-
* Handle response change from an interaction
|
|
60
|
-
*/
|
|
61
|
-
private handleResponseChange;
|
|
62
|
-
/**
|
|
63
|
-
* Update a specific interaction element's response value
|
|
64
|
-
*/
|
|
65
|
-
private updateInteractionElement;
|
|
66
|
-
/**
|
|
67
|
-
* Update all responses at once
|
|
68
|
-
*/
|
|
69
|
-
setResponses(responses: Record<string, any>): void;
|
|
70
|
-
/**
|
|
71
|
-
* Set disabled state for all interactions
|
|
72
|
-
*/
|
|
73
|
-
setDisabled(disabled: boolean): void;
|
|
74
|
-
/**
|
|
75
|
-
* Get current responses
|
|
76
|
-
*/
|
|
77
|
-
getResponses(): Record<string, any>;
|
|
78
|
-
/**
|
|
79
|
-
* Clean up event listeners and elements
|
|
80
|
-
*/
|
|
81
|
-
private cleanup;
|
|
82
|
-
/**
|
|
83
|
-
* Destroy the renderer and clean up all resources
|
|
84
|
-
*/
|
|
85
|
-
destroy(): void;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Create a new ItemRenderer instance
|
|
89
|
-
*/
|
|
90
|
-
export declare function createItemRenderer(config: ItemRendererConfig): ItemRenderer;
|
|
91
|
-
//# sourceMappingURL=ItemRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ItemRenderer.d.ts","sourceRoot":"","sources":["../../src/core/ItemRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAK1C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;IAEf,oDAAoD;IACpD,SAAS,EAAE,WAAW,CAAC;IAEvB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEhC,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,yEAAyE;IACzE,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAEzC,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAC5D;AAED;;GAEG;AACH,qBAAa,YAAY;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,OAAO,CAAC,CAAiC;IACjD,OAAO,CAAC,gBAAgB,CAA2C;IAGnE,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,cAAc,CAId;IAGR,OAAO,CAAC,kBAAkB,CAAuB;gBAErC,MAAM,EAAE,kBAAkB;IAatC;;OAEG;IACI,MAAM,IAAI,IAAI;IA+DrB;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAiChC;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IASjC;;OAEG;IACH,OAAO,CAAC,wBAAwB;IA0DhC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAW5B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAShC;;OAEG;IACI,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAYzD;;OAEG;IACI,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAS3C;;OAEG;IACI,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1C;;OAEG;IACH,OAAO,CAAC,OAAO;IAcf;;OAEG;IACI,OAAO,IAAI,IAAI;CAItB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY,CAE3E"}
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ItemRenderer - Framework-agnostic rendering engine for QTI items
|
|
3
|
-
*
|
|
4
|
-
* Replaces ItemBody.svelte with vanilla JavaScript. Creates and manages
|
|
5
|
-
* web component instances for QTI interactions, handles response state,
|
|
6
|
-
* and orchestrates the rendering pipeline.
|
|
7
|
-
*/
|
|
8
|
-
import { htmlToString, toTrustedHtml } from './trustedTypes.js';
|
|
9
|
-
import { applyGlossaryTriggers } from '../catalog/applyGlossaryTriggers.js';
|
|
10
|
-
import { createInlinePlaceholderHtml, isInlineInteractionType } from '../interactions/inline/render-plan.js';
|
|
11
|
-
/**
|
|
12
|
-
* ItemRenderer class manages the rendering of QTI items using web components
|
|
13
|
-
*/
|
|
14
|
-
export class ItemRenderer {
|
|
15
|
-
constructor(config) {
|
|
16
|
-
// Tracking for cleanup
|
|
17
|
-
this.renderedElements = [];
|
|
18
|
-
this.eventListeners = [];
|
|
19
|
-
// State for AssociateInteraction (pairing selection)
|
|
20
|
-
this.selectedForPairing = null;
|
|
21
|
-
this.player = config.player;
|
|
22
|
-
this.container = config.container;
|
|
23
|
-
this.componentRegistry = this.player.getComponentRegistry();
|
|
24
|
-
this.responses = config.responses || {};
|
|
25
|
-
this.disabled = config.disabled || false;
|
|
26
|
-
this.typeset = config.typeset;
|
|
27
|
-
this.onResponseChange = config.onResponseChange || (() => { });
|
|
28
|
-
// Initial render
|
|
29
|
-
this.render();
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Render the entire item with all interactions
|
|
33
|
-
*/
|
|
34
|
-
render() {
|
|
35
|
-
// Clean up previous render
|
|
36
|
-
this.cleanup();
|
|
37
|
-
// Create wrapper
|
|
38
|
-
const wrapper = document.createElement('div');
|
|
39
|
-
wrapper.className = 'qti-item-body';
|
|
40
|
-
// Get and process interactions using the player's configured ExtractionRegistry
|
|
41
|
-
const interactions = this.player.getInteractionData();
|
|
42
|
-
// Filter block vs inline interactions
|
|
43
|
-
const blockInteractions = interactions.filter((interaction) => !isInlineInteractionType(interaction.type));
|
|
44
|
-
// Get item body HTML with interactions removed
|
|
45
|
-
const itemBodyHtml = this.getProcessedItemBodyHtml();
|
|
46
|
-
// Create prose container for body HTML
|
|
47
|
-
const proseContainer = document.createElement('div');
|
|
48
|
-
proseContainer.className = 'prose max-w-none mb-4';
|
|
49
|
-
// Process inline interactions in HTML
|
|
50
|
-
const processedHtml = this.processInlineInteractions(itemBodyHtml, interactions);
|
|
51
|
-
proseContainer.innerHTML = toTrustedHtml(processedHtml, this.player.getTrustedTypesPolicyName());
|
|
52
|
-
// Inject glossary/keyword-translation trigger buttons for [data-catalog-idref] terms
|
|
53
|
-
applyGlossaryTriggers(proseContainer, this.player);
|
|
54
|
-
wrapper.appendChild(proseContainer);
|
|
55
|
-
// Render block interactions as web components
|
|
56
|
-
for (const interaction of blockInteractions) {
|
|
57
|
-
try {
|
|
58
|
-
const element = this.createInteractionElement(interaction);
|
|
59
|
-
if (element) {
|
|
60
|
-
wrapper.appendChild(element);
|
|
61
|
-
this.renderedElements.push(element);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
console.error(`Failed to create component for ${interaction.type}:`, error);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
// Apply typesetting to the entire wrapper
|
|
69
|
-
if (this.typeset) {
|
|
70
|
-
try {
|
|
71
|
-
this.typeset(wrapper);
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
console.error('Typesetting failed:', error);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
// Mount to container
|
|
78
|
-
this.container.innerHTML = '';
|
|
79
|
-
this.container.appendChild(wrapper);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Get item body HTML with block interactions removed
|
|
83
|
-
*/
|
|
84
|
-
getProcessedItemBodyHtml() {
|
|
85
|
-
let html = htmlToString(this.player.getItemBodyHtml());
|
|
86
|
-
// Remove block interaction elements (they're rendered separately as web components)
|
|
87
|
-
const interactionPatterns = [
|
|
88
|
-
/<choiceInteraction[\s\S]*?<\/choiceInteraction>/gi,
|
|
89
|
-
/<extendedTextInteraction[\s\S]*?<\/extendedTextInteraction>/gi,
|
|
90
|
-
/<orderInteraction[\s\S]*?<\/orderInteraction>/gi,
|
|
91
|
-
/<matchInteraction[\s\S]*?<\/matchInteraction>/gi,
|
|
92
|
-
/<associateInteraction[\s\S]*?<\/associateInteraction>/gi,
|
|
93
|
-
/<gapMatchInteraction[\s\S]*?<\/gapMatchInteraction>/gi,
|
|
94
|
-
/<sliderInteraction[\s\S]*?<\/sliderInteraction>/gi,
|
|
95
|
-
/<hotspotInteraction[\s\S]*?<\/hotspotInteraction>/gi,
|
|
96
|
-
/<graphicGapMatchInteraction[\s\S]*?<\/graphicGapMatchInteraction>/gi,
|
|
97
|
-
/<graphicOrderInteraction[\s\S]*?<\/graphicOrderInteraction>/gi,
|
|
98
|
-
/<graphicAssociateInteraction[\s\S]*?<\/graphicAssociateInteraction>/gi,
|
|
99
|
-
/<positionObjectInteraction[\s\S]*?<\/positionObjectInteraction>/gi,
|
|
100
|
-
/<endAttemptInteraction[\s\S]*?<\/endAttemptInteraction>/gi,
|
|
101
|
-
/<uploadInteraction[\s\S]*?<\/uploadInteraction>/gi,
|
|
102
|
-
/<drawingInteraction[\s\S]*?<\/drawingInteraction>/gi,
|
|
103
|
-
/<mediaInteraction[\s\S]*?<\/mediaInteraction>/gi,
|
|
104
|
-
/<hottextInteraction[\s\S]*?<\/hottextInteraction>/gi,
|
|
105
|
-
/<selectPointInteraction[\s\S]*?<\/selectPointInteraction>/gi,
|
|
106
|
-
/<customInteraction[\s\S]*?<\/customInteraction>/gi,
|
|
107
|
-
];
|
|
108
|
-
for (const pattern of interactionPatterns) {
|
|
109
|
-
html = html.replace(pattern, '');
|
|
110
|
-
}
|
|
111
|
-
return html;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Process inline interactions (textEntry, inlineChoice)
|
|
115
|
-
* Replaces QTI XML tags with web component placeholders
|
|
116
|
-
*/
|
|
117
|
-
processInlineInteractions(html, interactions) {
|
|
118
|
-
return createInlinePlaceholderHtml(html, interactions)
|
|
119
|
-
.replace(/\[TEXTENTRY:([^\]]+)\]/g, '<span data-inline-interaction="$1" data-type="textEntry"></span>')
|
|
120
|
-
.replace(/\[INLINECHOICE:([^\]]+)\]/g, '<span data-inline-interaction="$1" data-type="inlineChoice"></span>');
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Create a web component element for an interaction
|
|
124
|
-
*/
|
|
125
|
-
createInteractionElement(interaction) {
|
|
126
|
-
try {
|
|
127
|
-
// Get tag name from registry
|
|
128
|
-
const tagName = this.componentRegistry.getTagName(interaction);
|
|
129
|
-
// Create element
|
|
130
|
-
const element = document.createElement(tagName);
|
|
131
|
-
// Set standard properties
|
|
132
|
-
element.interaction = interaction;
|
|
133
|
-
element.response = this.responses[interaction.responseId] ?? null;
|
|
134
|
-
element.disabled = this.disabled;
|
|
135
|
-
element.typeset = this.typeset;
|
|
136
|
-
// Special handling for AssociateInteraction (pairing selection)
|
|
137
|
-
if (interaction.type === 'associateInteraction') {
|
|
138
|
-
element.selectedForPairing = this.selectedForPairing;
|
|
139
|
-
// Listen for selection changes
|
|
140
|
-
const selectionHandler = (event) => {
|
|
141
|
-
const customEvent = event;
|
|
142
|
-
this.selectedForPairing = customEvent.detail.selected;
|
|
143
|
-
element.selectedForPairing = this.selectedForPairing;
|
|
144
|
-
};
|
|
145
|
-
element.addEventListener('qti-selection-change', selectionHandler);
|
|
146
|
-
this.eventListeners.push({
|
|
147
|
-
element,
|
|
148
|
-
type: 'qti-selection-change',
|
|
149
|
-
handler: selectionHandler,
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
// Listen for response changes
|
|
153
|
-
const changeHandler = (event) => {
|
|
154
|
-
const qtiEvent = event;
|
|
155
|
-
this.handleResponseChange(qtiEvent.detail.responseId, qtiEvent.detail.value);
|
|
156
|
-
};
|
|
157
|
-
element.addEventListener('qti-change', changeHandler);
|
|
158
|
-
this.eventListeners.push({
|
|
159
|
-
element,
|
|
160
|
-
type: 'qti-change',
|
|
161
|
-
handler: changeHandler,
|
|
162
|
-
});
|
|
163
|
-
return element;
|
|
164
|
-
}
|
|
165
|
-
catch (error) {
|
|
166
|
-
console.error(`Failed to create element for ${interaction.type}:`, error);
|
|
167
|
-
return null;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Handle response change from an interaction
|
|
172
|
-
*/
|
|
173
|
-
handleResponseChange(responseId, value) {
|
|
174
|
-
// Update internal state
|
|
175
|
-
this.responses[responseId] = value;
|
|
176
|
-
// Notify callback
|
|
177
|
-
this.onResponseChange(responseId, value);
|
|
178
|
-
// Update any other elements that depend on this response
|
|
179
|
-
this.updateInteractionElement(responseId, value);
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Update a specific interaction element's response value
|
|
183
|
-
*/
|
|
184
|
-
updateInteractionElement(responseId, value) {
|
|
185
|
-
for (const element of this.renderedElements) {
|
|
186
|
-
const interaction = element.interaction;
|
|
187
|
-
if (interaction && interaction.responseId === responseId) {
|
|
188
|
-
element.response = value;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Update all responses at once
|
|
194
|
-
*/
|
|
195
|
-
setResponses(responses) {
|
|
196
|
-
this.responses = { ...responses };
|
|
197
|
-
// Update all rendered elements
|
|
198
|
-
for (const element of this.renderedElements) {
|
|
199
|
-
const interaction = element.interaction;
|
|
200
|
-
if (interaction) {
|
|
201
|
-
element.response = this.responses[interaction.responseId] ?? null;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Set disabled state for all interactions
|
|
207
|
-
*/
|
|
208
|
-
setDisabled(disabled) {
|
|
209
|
-
this.disabled = disabled;
|
|
210
|
-
// Update all rendered elements
|
|
211
|
-
for (const element of this.renderedElements) {
|
|
212
|
-
element.disabled = disabled;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Get current responses
|
|
217
|
-
*/
|
|
218
|
-
getResponses() {
|
|
219
|
-
return { ...this.responses };
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Clean up event listeners and elements
|
|
223
|
-
*/
|
|
224
|
-
cleanup() {
|
|
225
|
-
// Remove event listeners
|
|
226
|
-
for (const { element, type, handler } of this.eventListeners) {
|
|
227
|
-
element.removeEventListener(type, handler);
|
|
228
|
-
}
|
|
229
|
-
this.eventListeners = [];
|
|
230
|
-
// Clear rendered elements
|
|
231
|
-
this.renderedElements = [];
|
|
232
|
-
// Reset pairing selection
|
|
233
|
-
this.selectedForPairing = null;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Destroy the renderer and clean up all resources
|
|
237
|
-
*/
|
|
238
|
-
destroy() {
|
|
239
|
-
this.cleanup();
|
|
240
|
-
this.container.innerHTML = '';
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Create a new ItemRenderer instance
|
|
245
|
-
*/
|
|
246
|
-
export function createItemRenderer(config) {
|
|
247
|
-
return new ItemRenderer(config);
|
|
248
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Player.d.ts","sourceRoot":"","sources":["../../src/core/Player.ts"],"names":[],"mappings":"AAAA,OAAO,EAWN,KAAK,cAAc,EAcnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAUxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAI9E,OAAO,KAAK,EACX,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EAEX,wBAAwB,EAExB,uBAAuB,EACvB,gBAAgB,EAEhB,YAAY,EACZ,oBAAoB,EAEpB,WAAW,EACX,aAAa,EACb,0BAA0B,EAE1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAMhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKlD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD,qBAAa,MAAM;IAClB,OAAO,CAAC,IAAI,CAAU;IACtB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,OAAO,CAAS;I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AAW,EAAE,WAAW,GACtB,IAAI,CAKN;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC/B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,EACjD,UAAU,EAAE,MAAM,GAChB,GAAG,CAGL;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC/B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,EACjD,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,GAAG,GACR,IAAI,CAyCN;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAUzF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,GACzC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAarC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parsingLimits.d.ts","sourceRoot":"","sources":["../../src/core/parsingLimits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,MAAM,uBAAuB,GAAG;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAkBF,wBAAgB,sBAAsB,CAAC,QAAQ,CAAC,EAAE,oBAAoB,GAAG,uBAAuB,CAe/F;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAe3F"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../src/core/random.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,MAAM,CAU1D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolePolicy.d.ts","sourceRoot":"","sources":["../../src/core/rolePolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,uBAAuB,EAAE,OAAO,CAAC;CACjC;AASD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,gBAAgB,CASnE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sanitizer.d.ts","sourceRoot":"","sources":["../../src/core/sanitizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAmB,MAAM,mBAAmB,CAAC;AAI/E,MAAM,WAAW,mBAAmB;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAiKD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CA0ChF;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAYvF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trustedTypes.d.ts","sourceRoot":"","sources":["../../src/core/trustedTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,mBAAmB,CAAC;AAgCvE;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,CAY5E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAEtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"urlPolicy.d.ts","sourceRoot":"","sources":["../../src/core/urlPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;AA0ClE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,IAAI,GAAE,OAAe,GAAG,MAAM,GAAG,IAAI,CA+C/G"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AssessmentItemDocument.d.ts","sourceRoot":"","sources":["../../src/document/AssessmentItemDocument.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAWlF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,4BAA4B;IAC5C,OAAO,EAAE,UAAU,CAAC;IACpB,WAAW,EAAE,UAAU,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,2BAA2B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,Q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