@pie-qti/qti-common 0.1.27 → 0.1.28

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.
@@ -1 +1 @@
1
- {"version":3,"file":"qti3-element-mappings.js","sourceRoot":"","sources":["../../src/element-mapper/qti3-element-mappings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B,qBAAqB,EAAE,gBAAgB;IACvC,qBAAqB,EAAE,gBAAgB;IACvC,eAAe,EAAE,UAAU;IAC3B,kBAAkB,EAAE,aAAa;IACjC,eAAe,EAAE,UAAU;IAC3B,wBAAwB,EAAE,mBAAmB;IAC7C,yBAAyB,EAAE,mBAAmB;IAC9C,6BAA6B,EAAE,uBAAuB;CAC7C,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,0BAA0B,EAAE,qBAAqB;IACjD,yBAAyB,EAAE,oBAAoB;IAC/C,0BAA0B,EAAE,qBAAqB;IACjD,yBAAyB,EAAE,oBAAoB;IAC/C,sBAAsB,EAAE,iBAAiB;IACzC,mBAAmB,EAAE,cAAc;IACnC,WAAW,EAAE,OAAO;IACpB,aAAa,EAAE,SAAS;IACxB,eAAe,EAAE,UAAU;IAC3B,kBAAkB,EAAE,aAAa;IACjC,oBAAoB,EAAE,cAAc;IACpC,iBAAiB,EAAE,YAAY;IAC/B,uBAAuB,EAAE,iBAAiB;IAC1C,yBAAyB,EAAE,oBAAoB;IAC/C,+BAA+B,EAAE,yBAAyB;CACjD,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,qBAAqB;IACrB,wBAAwB,EAAE,mBAAmB;IAC7C,uBAAuB,EAAE,kBAAkB;IAC3C,uBAAuB,EAAE,kBAAkB;IAC3C,2BAA2B,EAAE,qBAAqB;IAClD,mCAAmC,EAAE,4BAA4B;IACjE,yBAAyB,EA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and amp-up.io implementation.\n * All QTI 3.0 elements use kebab-case with 'qti-' prefix.\n *\n * This file documents 172 QTI 3.0 elements providing 100% coverage of the official\n * specification including all interactions, processing rules, expressions, and\n * accessibility features.\n */\n\n/**\n * Core assessment structure elements\n */\nexport const CORE_ELEMENTS = {\n\t'qti-assessment-item': 'assessmentitem',\n\t'qti-assessment-test': 'assessmenttest',\n\t'qti-item-body': 'itembody',\n\t'qti-content-body': 'contentbody',\n\t'qti-test-part': 'testpart',\n\t'qti-assessment-section': 'assessmentsection',\n\t'qti-assessment-item-ref': 'assessmentitemref',\n\t'qti-assessment-stimulus-ref': 'assessmentstimulusref',\n} as const;\n\n/**\n * Variable declaration elements\n */\nexport const DECLARATION_ELEMENTS = {\n\t'qti-response-declaration': 'responsedeclaration',\n\t'qti-outcome-declaration': 'outcomedeclaration',\n\t'qti-template-declaration': 'templatedeclaration',\n\t'qti-context-declaration': 'contextdeclaration',\n\t'qti-correct-response': 'correctresponse',\n\t'qti-default-value': 'defaultvalue',\n\t'qti-value': 'value',\n\t'qti-mapping': 'mapping',\n\t'qti-map-entry': 'mapentry',\n\t'qti-area-mapping': 'areamapping',\n\t'qti-area-map-entry': 'areamapentry',\n\t'qti-match-table': 'matchtable',\n\t'qti-match-table-entry': 'matchtableentry',\n\t'qti-interpolation-table': 'interpolationtable',\n\t'qti-interpolation-table-entry': 'interpolationtableentry',\n} as const;\n\n/**\n * All 23+ interaction types (block and inline)\n */\nexport const INTERACTION_ELEMENTS = {\n\t// Block interactions\n\t'qti-choice-interaction': 'choiceinteraction',\n\t'qti-match-interaction': 'matchinteraction',\n\t'qti-order-interaction': 'orderinteraction',\n\t'qti-gap-match-interaction': 'gapmatchinteraction',\n\t'qti-graphic-gap-match-interaction': 'graphicgapmatchinteraction',\n\t'qti-hotspot-interaction': 'hotspotinteraction',\n\t'qti-hottext-interaction': 'hottextinteraction',\n\t'qti-extended-text-interaction': 'extendedtextinteraction',\n\t'qti-media-interaction': 'mediainteraction',\n\t'qti-select-point-interaction': 'selectpointinteraction',\n\t'qti-custom-interaction': 'custominteraction',\n\t'qti-portable-custom-interaction': 'portablecustominteraction',\n\t'qti-end-attempt-interaction': 'endattemptinteraction',\n\t'qti-slider-interaction': 'sliderinteraction',\n\t'qti-drawing-interaction': 'drawinginteraction',\n\t'qti-upload-interaction': 'uploadinteraction',\n\t'qti-position-object-interaction': 'positionobjectinteraction',\n\t'qti-graphic-order-interaction': 'graphicorderinteraction',\n\t'qti-graphic-associate-interaction': 'graphicassociateinteraction',\n\t'qti-associate-interaction': 'associateinteraction',\n\n\t// Inline interactions\n\t'qti-text-entry-interaction': 'textentryinteraction',\n\t'qti-inline-choice-interaction': 'inlinechoiceinteraction',\n\n} as const;\n\n/**\n * Interaction child elements\n */\nexport const INTERACTION_CHILD_ELEMENTS = {\n\t'qti-prompt': 'prompt',\n\t'qti-simple-choice': 'simplechoice',\n\t'qti-simple-match-set': 'simplematchset',\n\t'qti-simple-associable-choice': 'simpleassociablechoice',\n\t'qti-gap': 'gap',\n\t'qti-gap-text': 'gaptext',\n\t'qti-gap-img': 'gapimg',\n\t'qti-gap-choice': 'gapchoice',\n\t'qti-hotspot-choice': 'hotspotchoice',\n\t'qti-associable-hotspot': 'associablehotspot',\n\t'qti-hottext': 'hottext',\n\t'qti-inline-choice': 'inlinechoice',\n\t'qti-position-object-stage': 'positionobjectstage',\n} as const;\n\n/**\n * Response processing elements\n */\nexport const RESPONSE_PROCESSING_ELEMENTS = {\n\t'qti-response-processing': 'responseprocessing',\n\t'qti-response-condition': 'responsecondition',\n\t'qti-response-if': 'responseif',\n\t'qti-response-else-if': 'responseelseif',\n\t'qti-response-else': 'responseelse',\n\t'qti-response-processing-fragment': 'responseprocessingfragment',\n\t'qti-exit-response': 'exitresponse',\n\t'qti-set-outcome-value': 'setoutcomevalue',\n\t'qti-lookup-outcome-value': 'lookupoutcomevalue',\n\t'qti-set-correct-response': 'setcorrectresponse',\n\t'qti-set-default-value': 'setdefaultvalue',\n} as const;\n\n/**\n * Template processing elements\n */\nexport const TEMPLATE_PROCESSING_ELEMENTS = {\n\t'qti-template-processing': 'templateprocessing',\n\t'qti-template-condition': 'templatecondition',\n\t'qti-template-if': 'templateif',\n\t'qti-template-else-if': 'templateelseif',\n\t'qti-template-else': 'templateelse',\n\t'qti-template-constraint': 'templateconstraint',\n\t'qti-set-template-value': 'settemplatevalue',\n\t'qti-exit-template': 'exittemplate',\n\t'qti-template-block': 'templateblock',\n\t'qti-template-inline': 'templateinline',\n} as const;\n\n/**\n * Outcome processing elements (test-level)\n */\nexport const OUTCOME_PROCESSING_ELEMENTS = {\n\t'qti-outcome-processing': 'outcomeprocessing',\n\t'qti-outcome-condition': 'outcomecondition',\n\t'qti-outcome-if': 'outcomeif',\n\t'qti-outcome-else-if': 'outcomeelseif',\n\t'qti-outcome-else': 'outcomeelse',\n\t'qti-exit-test': 'exittest',\n} as const;\n\n/**\n * Expression elements (54+ operators)\n */\nexport const EXPRESSION_ELEMENTS = {\n\t// Variable expressions\n\t'qti-variable': 'variable',\n\t'qti-correct': 'correct',\n\t'qti-default': 'default',\n\t'qti-base-value': 'basevalue',\n\t'qti-field-value': 'fieldvalue',\n\t'qti-custom-operator': 'customoperator',\n\t'qti-index': 'index',\n\t'qti-contains': 'contains',\n\t'qti-member': 'member',\n\t'qti-null': 'null',\n\n\t// Comparison operators\n\t'qti-equal': 'equal',\n\t'qti-equal-rounded': 'equalrounded',\n\t'qti-gt': 'gt',\n\t'qti-gte': 'gte',\n\t'qti-lt': 'lt',\n\t'qti-lte': 'lte',\n\n\t// Logical operators\n\t'qti-and': 'and',\n\t'qti-or': 'or',\n\t'qti-not': 'not',\n\t'qti-any-n': 'anyn',\n\t'qti-multiple': 'multiple',\n\t'qti-ordered': 'ordered',\n\n\t// String operators\n\t'qti-string-match': 'stringmatch',\n\t'qti-pattern-match': 'patternmatch',\n\t'qti-substring': 'substring',\n\t'qti-repeat': 'repeat',\n\n\t// Matching operators\n\t'qti-match': 'match',\n\t'qti-inside': 'inside',\n\t'qti-map-response': 'mapresponse',\n\t'qti-map-response-point': 'mapresponsepoint',\n\n\t// Numeric operators\n\t'qti-sum': 'sum',\n\t'qti-product': 'product',\n\t'qti-subtract': 'subtract',\n\t'qti-divide': 'divide',\n\t'qti-integer-divide': 'integerdivide',\n\t'qti-integer-modulus': 'integermodulus',\n\t'qti-round': 'round',\n\t'qti-round-to': 'roundto',\n\t'qti-truncate': 'truncate',\n\n\t// Math functions\n\t'qti-math-operator': 'mathoperator',\n\t'qti-math-constant': 'mathconstant',\n\t'qti-power': 'power',\n\t'qti-gcd': 'gcd',\n\t'qti-lcm': 'lcm',\n\n\t// Statistical operators\n\t'qti-stats-operator': 'statsoperator',\n\t'qti-min': 'min',\n\t'qti-max': 'max',\n\t'qti-container-size': 'containersize',\n\t'qti-delete': 'delete',\n\t'qti-is-null': 'isnull',\n\t'qti-random': 'random',\n\t'qti-random-integer': 'randominteger',\n\t'qti-random-float': 'randomfloat',\n\n\t// Test-level expressions\n\t'qti-test-variables': 'testvariables',\n\t'qti-outcome-maximum': 'outcomemaximum',\n\t'qti-outcome-minimum': 'outcomeminimum',\n\t'qti-number-correct': 'numbercorrect',\n\t'qti-number-incorrect': 'numberincorrect',\n\t'qti-number-presented': 'numberpresented',\n\t'qti-number-responded': 'numberresponded',\n\t'qti-number-selected': 'numberselected',\n\n\t// Duration operators (time-based constraints)\n\t'qti-duration-gt': 'durationgt',\n\t'qti-duration-gte': 'durationgte',\n\t'qti-duration-lt': 'durationlt',\n\t'qti-duration-lte': 'durationlte',\n} as const;\n\n/**\n * Feedback elements\n */\nexport const FEEDBACK_ELEMENTS = {\n\t'qti-modal-feedback': 'modalfeedback',\n\t'qti-feedback-block': 'feedbackblock',\n\t'qti-feedback-inline': 'feedbackinline',\n\t'qti-rubric-block': 'rubricblock',\n\t'qti-modal-feedback-ok': 'modalfeedbackok',\n} as const;\n\n/**\n * PCI (Portable Custom Interaction) elements\n */\nexport const PCI_ELEMENTS = {\n\t'qti-interaction-modules': 'interactionmodules',\n\t'qti-interaction-module': 'interactionmodule',\n\t'qti-interaction-markup': 'interactionmarkup',\n\t'qti-interaction-hook': 'interactionhook',\n\t'qti-interaction-config': 'interactionconfig',\n} as const;\n\n/**\n * Catalog elements (accessibility support)\n */\nexport const CATALOG_ELEMENTS = {\n\t'qti-catalog': 'catalog',\n\t'qti-catalog-info': 'cataloginfo',\n\t'qti-card': 'card',\n\t'qti-card-entry': 'cardentry',\n\t'qti-html-content': 'htmlcontent',\n\t'qti-file-href': 'filehref',\n} as const;\n\n/**\n * Other content elements\n */\nexport const CONTENT_ELEMENTS = {\n\t'qti-printed-variable': 'printedvariable',\n\t'qti-context-variable': 'contextvariable',\n\t'qti-template-variable': 'templatevariable',\n\t'qti-stylesheet': 'stylesheet',\n\t'qti-companion-materials-info': 'companionmaterialsinfo',\n} as const;\n\n/**\n * Complete mapping of all QTI 3.0 elements to canonical form\n */\nexport const QTI3_ELEMENT_MAPPINGS = {\n\t...CORE_ELEMENTS,\n\t...DECLARATION_ELEMENTS,\n\t...INTERACTION_ELEMENTS,\n\t...INTERACTION_CHILD_ELEMENTS,\n\t...RESPONSE_PROCESSING_ELEMENTS,\n\t...TEMPLATE_PROCESSING_ELEMENTS,\n\t...OUTCOME_PROCESSING_ELEMENTS,\n\t...EXPRESSION_ELEMENTS,\n\t...FEEDBACK_ELEMENTS,\n\t...PCI_ELEMENTS,\n\t...CATALOG_ELEMENTS,\n\t...CONTENT_ELEMENTS,\n} as const;\n\n/**\n * Get canonical name for a QTI 3.0 element\n */\nexport function getCanonicalName(qti3ElementName: string): string | undefined {\n\treturn QTI3_ELEMENT_MAPPINGS[qti3ElementName as keyof typeof QTI3_ELEMENT_MAPPINGS];\n}\n\n/**\n * Check if an element name is a valid QTI 3.0 element\n */\nexport function isQti3Element(elementName: string): boolean {\n\treturn elementName in QTI3_ELEMENT_MAPPINGS;\n}\n\n/**\n * Get all QTI 3.0 interaction element names\n */\nexport function getInteractionElements(): readonly string[] {\n\treturn Object.keys(INTERACTION_ELEMENTS);\n}\n\n/**\n * Common QTI 3.0 attribute names (kebab-case)\n */\nexport const QTI3_ATTRIBUTES = {\n\t// Identifiers\n\tidentifier: 'identifier',\n\tresponseIdentifier: 'response-identifier',\n\toutcomeIdentifier: 'outcome-identifier',\n\ttemplateIdentifier: 'template-identifier',\n\n\t// Types\n\tbaseType: 'base-type',\n\tcardinality: 'cardinality',\n\n\t// Interaction attributes\n\tminChoices: 'min-choices',\n\tmaxChoices: 'max-choices',\n\tshuffle: 'shuffle',\n\tfixed: 'fixed',\n\n\t// Feedback attributes\n\tshowHide: 'show-hide',\n\n\t// Outcome attributes\n\tnormalMaximum: 'normal-maximum',\n\tnormalMinimum: 'normal-minimum',\n\n\t// Template attributes\n\tmathVariable: 'math-variable',\n\tparamVariable: 'param-variable',\n\n\t// Assessment attributes\n\ttimeDependent: 'time-dependent',\n\tadaptive: 'adaptive',\n\n\t// Text interaction attributes\n\texpectedLength: 'expected-length',\n\tpatternMask: 'pattern-mask',\n\tplaceholderText: 'placeholder-text',\n\tminStrings: 'min-strings',\n\tmaxStrings: 'max-strings',\n\n\t// Other\n\tfieldIdentifier: 'field-identifier',\n\ttoleranceMode: 'tolerance-mode',\n\tdataCatalogIdref: 'data-catalog-idref', // AMP extension\n} as const;\n"]}
1
+ {"version":3,"file":"qti3-element-mappings.js","sourceRoot":"","sources":["../../src/element-mapper/qti3-element-mappings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B,qBAAqB,EAAE,gBAAgB;IACvC,qBAAqB,EAAE,gBAAgB;IACvC,eAAe,EAAE,UAAU;IAC3B,kBAAkB,EAAE,aAAa;IACjC,eAAe,EAAE,UAAU;IAC3B,wBAAwB,EAAE,mBAAmB;IAC7C,yBAAyB,EAAE,mBAAmB;IAC9C,6BAA6B,EAAE,uBAAuB;CAC7C,CAAC;AAEX;;GAEG;AACH,MAAM,CA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U,EAAE,aAAa;IACzB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IAEd,sBAAsB;IACtB,QAAQ,EAAE,WAAW;IAErB,qBAAqB;IACrB,aAAa,EAAE,gBAAgB;IAC/B,aAAa,EAAE,gBAAgB;IAE/B,sBAAsB;IACtB,YAAY,EAAE,eAAe;IAC7B,aAAa,EAAE,gBAAgB;IAE/B,wBAAwB;IACxB,aAAa,EAAE,gBAAgB;IAC/B,QAAQ,EAAE,UAAU;IAEpB,8BAA8B;IAC9B,cAAc,EAAE,iBAAiB;IACjC,WAAW,EAAE,cAAc;IAC3B,eAAe,EAAE,kBAAkB;IACnC,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IAEzB,QAAQ;IACR,eAAe,EAAE,kBAAkB;IACnC,aAAa,EAAE,gBAAgB;IAC/B,gBAAgB,EAAE,oBAAoB,EAAE,gBAAgB;CAC/C,CAAC","sourcesContent":["/**\n * QTI 3.0 element name mappings: every `qti-*` element of the 1EdTech QTI 3.0 ASI schema,\n * mapped to its lowercase canonical name. `qti3-xsd-conformance.test.ts` checks the map\n * against the schema vendored in `schemas/qti3/`, in both directions.\n *\n * XHTML and HTML5 content elements keep their unprefixed names in QTI 3 and are not listed.\n */\n\n/**\n * Core assessment structure elements\n */\nexport const CORE_ELEMENTS = {\n\t'qti-assessment-item': 'assessmentitem',\n\t'qti-assessment-test': 'assessmenttest',\n\t'qti-item-body': 'itembody',\n\t'qti-content-body': 'contentbody',\n\t'qti-test-part': 'testpart',\n\t'qti-assessment-section': 'assessmentsection',\n\t'qti-assessment-item-ref': 'assessmentitemref',\n\t'qti-assessment-stimulus-ref': 'assessmentstimulusref',\n} as const;\n\n/**\n * Test structure elements\n */\nexport const TEST_STRUCTURE_ELEMENTS = {\n\t'qti-assessment-section-ref': 'assessmentsectionref',\n\t'qti-item-session-control': 'itemsessioncontrol',\n\t'qti-time-limits': 'timelimits',\n\t'qti-selection': 'selection',\n\t'qti-ordering': 'ordering',\n\t'qti-branch-rule': 'branchrule',\n\t'qti-pre-condition': 'precondition',\n\t'qti-test-feedback': 'testfeedback',\n\t'qti-template-default': 'templatedefault',\n\t'qti-variable-mapping': 'variablemapping',\n\t'qti-weight': 'weight',\n\t'qti-outcome-processing-fragment': 'outcomeprocessingfragment',\n} as const;\n\n/**\n * Shared stimulus elements\n */\nexport const STIMULUS_ELEMENTS = {\n\t'qti-assessment-stimulus': 'assessmentstimulus',\n\t'qti-stimulus-body': 'stimulusbody',\n} as const;\n\n/**\n * Variable declaration elements\n */\nexport const DECLARATION_ELEMENTS = {\n\t'qti-response-declaration': 'responsedeclaration',\n\t'qti-outcome-declaration': 'outcomedeclaration',\n\t'qti-template-declaration': 'templatedeclaration',\n\t'qti-context-declaration': 'contextdeclaration',\n\t'qti-correct-response': 'correctresponse',\n\t'qti-default-value': 'defaultvalue',\n\t'qti-value': 'value',\n\t'qti-mapping': 'mapping',\n\t'qti-map-entry': 'mapentry',\n\t'qti-area-mapping': 'areamapping',\n\t'qti-area-map-entry': 'areamapentry',\n\t'qti-match-table': 'matchtable',\n\t'qti-match-table-entry': 'matchtableentry',\n\t'qti-interpolation-table': 'interpolationtable',\n\t'qti-interpolation-table-entry': 'interpolationtableentry',\n} as const;\n\n/**\n * All 23+ interaction types (block and inline)\n */\nexport const INTERACTION_ELEMENTS = {\n\t// Block interactions\n\t'qti-choice-interaction': 'choiceinteraction',\n\t'qti-match-interaction': 'matchinteraction',\n\t'qti-order-interaction': 'orderinteraction',\n\t'qti-gap-match-interaction': 'gapmatchinteraction',\n\t'qti-graphic-gap-match-interaction': 'graphicgapmatchinteraction',\n\t'qti-hotspot-interaction': 'hotspotinteraction',\n\t'qti-hottext-interaction': 'hottextinteraction',\n\t'qti-extended-text-interaction': 'extendedtextinteraction',\n\t'qti-media-interaction': 'mediainteraction',\n\t'qti-select-point-interaction': 'selectpointinteraction',\n\t'qti-custom-interaction': 'custominteraction',\n\t'qti-portable-custom-interaction': 'portablecustominteraction',\n\t'qti-end-attempt-interaction': 'endattemptinteraction',\n\t'qti-slider-interaction': 'sliderinteraction',\n\t'qti-drawing-interaction': 'drawinginteraction',\n\t'qti-upload-interaction': 'uploadinteraction',\n\t'qti-position-object-interaction': 'positionobjectinteraction',\n\t'qti-graphic-order-interaction': 'graphicorderinteraction',\n\t'qti-graphic-associate-interaction': 'graphicassociateinteraction',\n\t'qti-associate-interaction': 'associateinteraction',\n\n\t// Inline interactions\n\t'qti-text-entry-interaction': 'textentryinteraction',\n\t'qti-inline-choice-interaction': 'inlinechoiceinteraction',\n\n} as const;\n\n/**\n * Interaction child elements\n */\nexport const INTERACTION_CHILD_ELEMENTS = {\n\t'qti-prompt': 'prompt',\n\t'qti-simple-choice': 'simplechoice',\n\t'qti-simple-match-set': 'simplematchset',\n\t'qti-simple-associable-choice': 'simpleassociablechoice',\n\t'qti-gap': 'gap',\n\t'qti-gap-text': 'gaptext',\n\t'qti-gap-img': 'gapimg',\n\t'qti-hotspot-choice': 'hotspotchoice',\n\t'qti-associable-hotspot': 'associablehotspot',\n\t'qti-hottext': 'hottext',\n\t'qti-inline-choice': 'inlinechoice',\n\t'qti-position-object-stage': 'positionobjectstage',\n} as const;\n\n/**\n * Response processing elements\n */\nexport const RESPONSE_PROCESSING_ELEMENTS = {\n\t'qti-response-processing': 'responseprocessing',\n\t'qti-response-condition': 'responsecondition',\n\t'qti-response-if': 'responseif',\n\t'qti-response-else-if': 'responseelseif',\n\t'qti-response-else': 'responseelse',\n\t'qti-response-processing-fragment': 'responseprocessingfragment',\n\t'qti-exit-response': 'exitresponse',\n\t'qti-set-outcome-value': 'setoutcomevalue',\n\t'qti-lookup-outcome-value': 'lookupoutcomevalue',\n\t'qti-set-correct-response': 'setcorrectresponse',\n\t'qti-set-default-value': 'setdefaultvalue',\n} as const;\n\n/**\n * Template processing elements\n */\nexport const TEMPLATE_PROCESSING_ELEMENTS = {\n\t'qti-template-processing': 'templateprocessing',\n\t'qti-template-condition': 'templatecondition',\n\t'qti-template-if': 'templateif',\n\t'qti-template-else-if': 'templateelseif',\n\t'qti-template-else': 'templateelse',\n\t'qti-template-constraint': 'templateconstraint',\n\t'qti-set-template-value': 'settemplatevalue',\n\t'qti-exit-template': 'exittemplate',\n\t'qti-template-block': 'templateblock',\n\t'qti-template-inline': 'templateinline',\n} as const;\n\n/**\n * Outcome processing elements (test-level)\n */\nexport const OUTCOME_PROCESSING_ELEMENTS = {\n\t'qti-outcome-processing': 'outcomeprocessing',\n\t'qti-outcome-condition': 'outcomecondition',\n\t'qti-outcome-if': 'outcomeif',\n\t'qti-outcome-else-if': 'outcomeelseif',\n\t'qti-outcome-else': 'outcomeelse',\n\t'qti-exit-test': 'exittest',\n} as const;\n\n/**\n * Expression elements (54+ operators)\n */\nexport const EXPRESSION_ELEMENTS = {\n\t// Variable expressions\n\t'qti-variable': 'variable',\n\t'qti-correct': 'correct',\n\t'qti-default': 'default',\n\t'qti-base-value': 'basevalue',\n\t'qti-field-value': 'fieldvalue',\n\t'qti-custom-operator': 'customoperator',\n\t'qti-index': 'index',\n\t'qti-contains': 'contains',\n\t'qti-member': 'member',\n\t'qti-null': 'null',\n\n\t// Comparison operators\n\t'qti-equal': 'equal',\n\t'qti-equal-rounded': 'equalrounded',\n\t'qti-gt': 'gt',\n\t'qti-gte': 'gte',\n\t'qti-lt': 'lt',\n\t'qti-lte': 'lte',\n\n\t// Logical operators\n\t'qti-and': 'and',\n\t'qti-or': 'or',\n\t'qti-not': 'not',\n\t'qti-any-n': 'anyn',\n\t'qti-multiple': 'multiple',\n\t'qti-ordered': 'ordered',\n\n\t// String operators\n\t'qti-string-match': 'stringmatch',\n\t'qti-pattern-match': 'patternmatch',\n\t'qti-substring': 'substring',\n\t'qti-repeat': 'repeat',\n\n\t// Matching operators\n\t'qti-match': 'match',\n\t'qti-inside': 'inside',\n\t'qti-map-response': 'mapresponse',\n\t'qti-map-response-point': 'mapresponsepoint',\n\n\t// Numeric operators\n\t'qti-sum': 'sum',\n\t'qti-product': 'product',\n\t'qti-subtract': 'subtract',\n\t'qti-divide': 'divide',\n\t'qti-integer-divide': 'integerdivide',\n\t'qti-integer-modulus': 'integermodulus',\n\t'qti-round': 'round',\n\t'qti-round-to': 'roundto',\n\t'qti-truncate': 'truncate',\n\n\t// Math functions\n\t'qti-math-operator': 'mathoperator',\n\t'qti-math-constant': 'mathconstant',\n\t'qti-power': 'power',\n\t'qti-gcd': 'gcd',\n\t'qti-lcm': 'lcm',\n\n\t// Statistical operators\n\t'qti-stats-operator': 'statsoperator',\n\t'qti-min': 'min',\n\t'qti-max': 'max',\n\t'qti-container-size': 'containersize',\n\t'qti-delete': 'delete',\n\t'qti-is-null': 'isnull',\n\t'qti-random': 'random',\n\t'qti-random-integer': 'randominteger',\n\t'qti-random-float': 'randomfloat',\n\n\t// Test-level expressions\n\t'qti-test-variables': 'testvariables',\n\t'qti-outcome-maximum': 'outcomemaximum',\n\t'qti-outcome-minimum': 'outcomeminimum',\n\t'qti-number-correct': 'numbercorrect',\n\t'qti-number-incorrect': 'numberincorrect',\n\t'qti-number-presented': 'numberpresented',\n\t'qti-number-responded': 'numberresponded',\n\t'qti-number-selected': 'numberselected',\n\n\t// Type conversion\n\t'qti-integer-to-float': 'integertofloat',\n\n\t// Duration operators (QTI 2 durationGTE and durationLT)\n\t'qti-duration-gte': 'durationgte',\n\t'qti-duration-lt': 'durationlt',\n} as const;\n\n/**\n * Feedback elements\n */\nexport const FEEDBACK_ELEMENTS = {\n\t'qti-modal-feedback': 'modalfeedback',\n\t'qti-feedback-block': 'feedbackblock',\n\t'qti-feedback-inline': 'feedbackinline',\n\t'qti-rubric-block': 'rubricblock',\n} as const;\n\n/**\n * PCI (Portable Custom Interaction) elements\n */\nexport const PCI_ELEMENTS = {\n\t'qti-interaction-modules': 'interactionmodules',\n\t'qti-interaction-module': 'interactionmodule',\n\t'qti-interaction-markup': 'interactionmarkup',\n} as const;\n\n/**\n * Catalog elements (accessibility support)\n */\nexport const CATALOG_ELEMENTS = {\n\t'qti-catalog': 'catalog',\n\t'qti-catalog-info': 'cataloginfo',\n\t'qti-card': 'card',\n\t'qti-card-entry': 'cardentry',\n\t'qti-html-content': 'htmlcontent',\n\t'qti-file-href': 'filehref',\n} as const;\n\n/**\n * Other content elements\n */\nexport const CONTENT_ELEMENTS = {\n\t'qti-printed-variable': 'printedvariable',\n\t'qti-context-variable': 'contextvariable',\n\t'qti-template-variable': 'templatevariable',\n\t'qti-stylesheet': 'stylesheet',\n} as const;\n\n/**\n * Companion materials (calculators, rulers, protractors, reference material)\n */\nexport const COMPANION_MATERIAL_ELEMENTS = {\n\t'qti-companion-materials-info': 'companionmaterialsinfo',\n\t'qti-calculator': 'calculator',\n\t'qti-calculator-info': 'calculatorinfo',\n\t'qti-calculator-type': 'calculatortype',\n\t'qti-description': 'description',\n\t'qti-digital-material': 'digitalmaterial',\n\t'qti-physical-material': 'physicalmaterial',\n\t'qti-label': 'label',\n\t'qti-protractor': 'protractor',\n\t'qti-rule': 'rule',\n\t'qti-rule-system-si': 'rulesystemsi',\n\t'qti-rule-system-us': 'rulesystemus',\n\t'qti-increment-si': 'incrementsi',\n\t'qti-increment-us': 'incrementus',\n\t'qti-major-increment': 'majorincrement',\n\t'qti-minor-increment': 'minorincrement',\n\t'qti-minimum-length': 'minimumlength',\n} as const;\n\n/**\n * Adaptive delivery and metadata references\n */\nexport const REFERENCE_ELEMENTS = {\n\t'qti-adaptive-selection': 'adaptiveselection',\n\t'qti-adaptive-engine-ref': 'adaptiveengineref',\n\t'qti-adaptive-settings-ref': 'adaptivesettingsref',\n\t'qti-metadata-ref': 'metadataref',\n\t'qti-usagedata-ref': 'usagedataref',\n\t'qti-resource-icon': 'resourceicon',\n} as const;\n\n/**\n * Complete mapping of all QTI 3.0 elements to canonical form\n */\nexport const QTI3_ELEMENT_MAPPINGS = {\n\t...CORE_ELEMENTS,\n\t...TEST_STRUCTURE_ELEMENTS,\n\t...STIMULUS_ELEMENTS,\n\t...DECLARATION_ELEMENTS,\n\t...INTERACTION_ELEMENTS,\n\t...INTERACTION_CHILD_ELEMENTS,\n\t...RESPONSE_PROCESSING_ELEMENTS,\n\t...TEMPLATE_PROCESSING_ELEMENTS,\n\t...OUTCOME_PROCESSING_ELEMENTS,\n\t...EXPRESSION_ELEMENTS,\n\t...FEEDBACK_ELEMENTS,\n\t...PCI_ELEMENTS,\n\t...CATALOG_ELEMENTS,\n\t...CONTENT_ELEMENTS,\n\t...COMPANION_MATERIAL_ELEMENTS,\n\t...REFERENCE_ELEMENTS,\n} as const;\n\n/**\n * Get canonical name for a QTI 3.0 element\n */\nexport function getCanonicalName(qti3ElementName: string): string | undefined {\n\treturn QTI3_ELEMENT_MAPPINGS[qti3ElementName as keyof typeof QTI3_ELEMENT_MAPPINGS];\n}\n\n/**\n * Check if an element name is a valid QTI 3.0 element\n */\nexport function isQti3Element(elementName: string): boolean {\n\treturn elementName in QTI3_ELEMENT_MAPPINGS;\n}\n\n/**\n * Get all QTI 3.0 interaction element names\n */\nexport function getInteractionElements(): readonly string[] {\n\treturn Object.keys(INTERACTION_ELEMENTS);\n}\n\n/**\n * Common QTI 3.0 attribute names (kebab-case)\n */\nexport const QTI3_ATTRIBUTES = {\n\t// Identifiers\n\tidentifier: 'identifier',\n\tresponseIdentifier: 'response-identifier',\n\toutcomeIdentifier: 'outcome-identifier',\n\ttemplateIdentifier: 'template-identifier',\n\n\t// Types\n\tbaseType: 'base-type',\n\tcardinality: 'cardinality',\n\n\t// Interaction attributes\n\tminChoices: 'min-choices',\n\tmaxChoices: 'max-choices',\n\tshuffle: 'shuffle',\n\tfixed: 'fixed',\n\n\t// Feedback attributes\n\tshowHide: 'show-hide',\n\n\t// Outcome attributes\n\tnormalMaximum: 'normal-maximum',\n\tnormalMinimum: 'normal-minimum',\n\n\t// Template attributes\n\tmathVariable: 'math-variable',\n\tparamVariable: 'param-variable',\n\n\t// Assessment attributes\n\ttimeDependent: 'time-dependent',\n\tadaptive: 'adaptive',\n\n\t// Text interaction attributes\n\texpectedLength: 'expected-length',\n\tpatternMask: 'pattern-mask',\n\tplaceholderText: 'placeholder-text',\n\tminStrings: 'min-strings',\n\tmaxStrings: 'max-strings',\n\n\t// Other\n\tfieldIdentifier: 'field-identifier',\n\ttoleranceMode: 'tolerance-mode',\n\tdataCatalogIdref: 'data-catalog-idref', // AMP extension\n} as const;\n"]}
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export type { AttributeNameMapper } from './element-mapper/AttributeNameMapper.j
5
5
  export { Qti2xAttributeNameMapper } from './element-mapper/Qti2xAttributeNameMapper.js';
6
6
  export { Qti3AttributeNameMapper } from './element-mapper/Qti3AttributeNameMapper.js';
7
7
  export { QTI2_PROMPT_BEARING_INTERACTIONS, QTI3_ATTRIBUTE_TO_QTI2, } from './element-mapper/qti3-attribute-map.js';
8
+ export { convertQti2ToQti3, QTI3_ASI_SCHEMA_LOCATION, QTI3_NAMESPACE, QTI3_RPTEMPLATE_BASE, } from './element-mapper/qti2-to-qti3.js';
8
9
  export { detectQtiVersion } from './version-detection/detectQtiVersion.js';
9
10
  export type { QtiVersion } from './version-detection/detectQtiVersion.js';
10
11
  export { getAttribute, getBooleanAttribute, getNumberAttribute, hasAttribute, toCamelCase, toKebabCase, } from './xml/attributes.js';
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ export { Qti3ElementNameMapper } from './element-mapper/Qti3ElementNameMapper.js
3
3
  export { Qti2xAttributeNameMapper } from './element-mapper/Qti2xAttributeNameMapper.js';
4
4
  export { Qti3AttributeNameMapper } from './element-mapper/Qti3AttributeNameMapper.js';
5
5
  export { QTI2_PROMPT_BEARING_INTERACTIONS, QTI3_ATTRIBUTE_TO_QTI2, } from './element-mapper/qti3-attribute-map.js';
6
+ export { convertQti2ToQti3, QTI3_ASI_SCHEMA_LOCATION, QTI3_NAMESPACE, QTI3_RPTEMPLATE_BASE, } from './element-mapper/qti2-to-qti3.js';
6
7
  // Version detection
7
8
  export { detectQtiVersion } from './version-detection/detectQtiVersion.js';
8
9
  // XML attribute utilities
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAIlF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EACN,gCAAgC,EAChC,sBAAsB,GACtB,MAAM,wCAAwC,CAAC;AAEhD,oBAAoB;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAG3E,0BAA0B;AAC1B,OAAO,EACN,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,WAAW,GACX,MAAM,qBAAqB,CAAC;AAE7B,oDAAoD;AACpD,OAAO,EAAE,WAAW,EAA2B,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACN,2BAA2B,GAG3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEhE,iBAAiB;AACjB,OAAO,EACN,eAAe,EACf,sBAAsB,EACtB,+BAA+B,EAC/B,MAAM,EACN,MAAM,GAGN,MAAM,qBAAqB,CAAC","sourcesContent":["// Element name mapping\nexport type { ElementNameMapper } from './element-mapper/ElementNameMapper.js';\nexport { Qti2xElementNameMapper } from './element-mapper/Qti2xElementNameMapper.js';\nexport { Qti3ElementNameMapper } from './element-mapper/Qti3ElementNameMapper.js';\n\n// Attribute name mapping\nexport type { AttributeNameMapper } from './element-mapper/AttributeNameMapper.js';\nexport { Qti2xAttributeNameMapper } from './element-mapper/Qti2xAttributeNameMapper.js';\nexport { Qti3AttributeNameMapper } from './element-mapper/Qti3AttributeNameMapper.js';\nexport {\n\tQTI2_PROMPT_BEARING_INTERACTIONS,\n\tQTI3_ATTRIBUTE_TO_QTI2,\n} from './element-mapper/qti3-attribute-map.js';\n\n// Version detection\nexport { detectQtiVersion } from './version-detection/detectQtiVersion.js';\nexport type { QtiVersion } from './version-detection/detectQtiVersion.js';\n\n// XML attribute utilities\nexport {\n\tgetAttribute,\n\tgetBooleanAttribute,\n\tgetNumberAttribute,\n\thasAttribute,\n\ttoCamelCase,\n\ttoKebabCase,\n} from './xml/attributes.js';\n\n// DOM utility helpers shared across player packages\nexport { assignProps, type AssignPropsOptions } from './dom/assignProps.js';\nexport {\n\tcreateSvelteMountController,\n\ttype SvelteMountController,\n\ttype SvelteMountControllerOptions,\n} from './dom/svelteMountController.js';\nexport { touchDrag, touchDragStyles } from './dom/touchDrag.js';\n\n// Parser factory\nexport {\n\tcreateQtiParser,\n\tcreateMapperForVersion,\n\tcreateAttributeMapperForVersion,\n\tisQti2,\n\tisQti3,\n\ttype QtiParserResult,\n\ttype CreateParserOptions,\n} from './parser-factory.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAIlF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EACN,gCAAgC,EAChC,sBAAsB,GACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACN,iBAAiB,EACjB,wBAAwB,EACxB,cAAc,EACd,oBAAoB,GACpB,MAAM,kCAAkC,CAAC;AAE1C,oBAAoB;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAG3E,0BAA0B;AAC1B,OAAO,EACN,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,WAAW,GACX,MAAM,qBAAqB,CAAC;AAE7B,oDAAoD;AACpD,OAAO,EAAE,WAAW,EAA2B,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACN,2BAA2B,GAG3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEhE,iBAAiB;AACjB,OAAO,EACN,eAAe,EACf,sBAAsB,EACtB,+BAA+B,EAC/B,MAAM,EACN,MAAM,GAGN,MAAM,qBAAqB,CAAC","sourcesContent":["// Element name mapping\nexport type { ElementNameMapper } from './element-mapper/ElementNameMapper.js';\nexport { Qti2xElementNameMapper } from './element-mapper/Qti2xElementNameMapper.js';\nexport { Qti3ElementNameMapper } from './element-mapper/Qti3ElementNameMapper.js';\n\n// Attribute name mapping\nexport type { AttributeNameMapper } from './element-mapper/AttributeNameMapper.js';\nexport { Qti2xAttributeNameMapper } from './element-mapper/Qti2xAttributeNameMapper.js';\nexport { Qti3AttributeNameMapper } from './element-mapper/Qti3AttributeNameMapper.js';\nexport {\n\tQTI2_PROMPT_BEARING_INTERACTIONS,\n\tQTI3_ATTRIBUTE_TO_QTI2,\n} from './element-mapper/qti3-attribute-map.js';\nexport {\n\tconvertQti2ToQti3,\n\tQTI3_ASI_SCHEMA_LOCATION,\n\tQTI3_NAMESPACE,\n\tQTI3_RPTEMPLATE_BASE,\n} from './element-mapper/qti2-to-qti3.js';\n\n// Version detection\nexport { detectQtiVersion } from './version-detection/detectQtiVersion.js';\nexport type { QtiVersion } from './version-detection/detectQtiVersion.js';\n\n// XML attribute utilities\nexport {\n\tgetAttribute,\n\tgetBooleanAttribute,\n\tgetNumberAttribute,\n\thasAttribute,\n\ttoCamelCase,\n\ttoKebabCase,\n} from './xml/attributes.js';\n\n// DOM utility helpers shared across player packages\nexport { assignProps, type AssignPropsOptions } from './dom/assignProps.js';\nexport {\n\tcreateSvelteMountController,\n\ttype SvelteMountController,\n\ttype SvelteMountControllerOptions,\n} from './dom/svelteMountController.js';\nexport { touchDrag, touchDragStyles } from './dom/touchDrag.js';\n\n// Parser factory\nexport {\n\tcreateQtiParser,\n\tcreateMapperForVersion,\n\tcreateAttributeMapperForVersion,\n\tisQti2,\n\tisQti3,\n\ttype QtiParserResult,\n\ttype CreateParserOptions,\n} from './parser-factory.js';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-qti/qti-common",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "node-html-parser": "^9.0.4"