@pie-qti/qti-common 0.1.25 → 0.1.27

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.
@@ -0,0 +1,115 @@
1
+ // GENERATED FILE — do not edit by hand.
2
+ // Regenerate with:
3
+ // bun run packages/qti-common/scripts/generate-qti3-attribute-map.ts
4
+ //
5
+ // Derived from the IMS QTI schemas vendored in packages/to-pie (imsqti_v2p1.xsd, imsqti_v2p2.xsd) by taking every
6
+ // camelCase attribute name in the QTI 2.x vocabulary and kebab-casing it, which is exactly
7
+ // the QTI 3.0 attribute rename. Attributes already kebab-case in QTI 2.x (`aria-*`) carry
8
+ // no uppercase letter and so are absent here by construction — as are `data-*`,
9
+ // `xml:lang` and HTML attributes, since lookup is by exact name.
10
+ /** QTI 3.0 kebab-case attribute name → QTI 2.x camelCase equivalent. 79 entries. */
11
+ export const QTI3_ATTRIBUTE_TO_QTI2 = new Map([
12
+ ['allow-comment', 'allowComment'],
13
+ ['allow-late-submission', 'allowLateSubmission'],
14
+ ['allow-review', 'allowReview'],
15
+ ['allow-skipping', 'allowSkipping'],
16
+ ['base-type', 'baseType'],
17
+ ['case-sensitive', 'caseSensitive'],
18
+ ['center-point', 'centerPoint'],
19
+ ['centre-point', 'centrePoint'],
20
+ ['count-attempt', 'countAttempt'],
21
+ ['data-extension', 'dataExtension'],
22
+ ['default-value', 'defaultValue'],
23
+ ['exclude-category', 'excludeCategory'],
24
+ ['expected-length', 'expectedLength'],
25
+ ['expected-lines', 'expectedLines'],
26
+ ['external-scored', 'externalScored'],
27
+ ['field-identifier', 'fieldIdentifier'],
28
+ ['hotspot-label', 'hotspotLabel'],
29
+ ['include-boundary', 'includeBoundary'],
30
+ ['include-category', 'includeCategory'],
31
+ ['include-lower-bound', 'includeLowerBound'],
32
+ ['include-upper-bound', 'includeUpperBound'],
33
+ ['keep-together', 'keepTogether'],
34
+ ['long-interpretation', 'longInterpretation'],
35
+ ['lower-bound', 'lowerBound'],
36
+ ['map-key', 'mapKey'],
37
+ ['mapped-value', 'mappedValue'],
38
+ ['mapping-indicator', 'mappingIndicator'],
39
+ ['mastery-value', 'masteryValue'],
40
+ ['match-group', 'matchGroup'],
41
+ ['match-max', 'matchMax'],
42
+ ['match-min', 'matchMin'],
43
+ ['math-variable', 'mathVariable'],
44
+ ['max-associations', 'maxAssociations'],
45
+ ['max-attempts', 'maxAttempts'],
46
+ ['max-choices', 'maxChoices'],
47
+ ['max-plays', 'maxPlays'],
48
+ ['max-strings', 'maxStrings'],
49
+ ['max-time', 'maxTime'],
50
+ ['min-associations', 'minAssociations'],
51
+ ['min-choices', 'minChoices'],
52
+ ['min-plays', 'minPlays'],
53
+ ['min-strings', 'minStrings'],
54
+ ['min-time', 'minTime'],
55
+ ['navigation-mode', 'navigationMode'],
56
+ ['normal-maximum', 'normalMaximum'],
57
+ ['normal-minimum', 'normalMinimum'],
58
+ ['number-repeats', 'numberRepeats'],
59
+ ['object-label', 'objectLabel'],
60
+ ['outcome-identifier', 'outcomeIdentifier'],
61
+ ['param-variable', 'paramVariable'],
62
+ ['pattern-mask', 'patternMask'],
63
+ ['placeholder-text', 'placeholderText'],
64
+ ['power-form', 'powerForm'],
65
+ ['response-identifier', 'responseIdentifier'],
66
+ ['rounding-mode', 'roundingMode'],
67
+ ['section-identifier', 'sectionIdentifier'],
68
+ ['show-feedback', 'showFeedback'],
69
+ ['show-hide', 'showHide'],
70
+ ['show-solution', 'showSolution'],
71
+ ['source-identifier', 'sourceIdentifier'],
72
+ ['source-value', 'sourceValue'],
73
+ ['step-label', 'stepLabel'],
74
+ ['string-identifier', 'stringIdentifier'],
75
+ ['submission-mode', 'submissionMode'],
76
+ ['target-identifier', 'targetIdentifier'],
77
+ ['target-type', 'targetType'],
78
+ ['target-value', 'targetValue'],
79
+ ['template-identifier', 'templateIdentifier'],
80
+ ['template-location', 'templateLocation'],
81
+ ['time-dependent', 'timeDependent'],
82
+ ['tolerance-mode', 'toleranceMode'],
83
+ ['tool-name', 'toolName'],
84
+ ['tool-version', 'toolVersion'],
85
+ ['upper-bound', 'upperBound'],
86
+ ['validate-responses', 'validateResponses'],
87
+ ['variable-identifier', 'variableIdentifier'],
88
+ ['variable-identifier-ref', 'variableIdentifierRef'],
89
+ ['weight-identifier', 'weightIdentifier'],
90
+ ['with-replacement', 'withReplacement'],
91
+ ]);
92
+ /**
93
+ * QTI 2.2 interactions whose content model permits a `prompt` child (it must come first).
94
+ * The inline interactions are deliberately absent: moving a prompt into one would trade one
95
+ * schema violation for another.
96
+ */
97
+ export const QTI2_PROMPT_BEARING_INTERACTIONS = new Set([
98
+ 'associateInteraction',
99
+ 'choiceInteraction',
100
+ 'drawingInteraction',
101
+ 'extendedTextInteraction',
102
+ 'gapMatchInteraction',
103
+ 'graphicAssociateInteraction',
104
+ 'graphicGapMatchInteraction',
105
+ 'graphicOrderInteraction',
106
+ 'hotspotInteraction',
107
+ 'hottextInteraction',
108
+ 'matchInteraction',
109
+ 'mediaInteraction',
110
+ 'orderInteraction',
111
+ 'selectPointInteraction',
112
+ 'sliderInteraction',
113
+ 'uploadInteraction',
114
+ ]);
115
+ //# sourceMappingURL=qti3-attribute-map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qti3-attribute-map.js","sourceRoot":"","sources":["../../src/element-mapper/qti3-attribute-map.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,mBAAmB;AACnB,uEAAuE;AACvE,EAAE;AACF,kHAAkH;AAClH,2FAA2F;AAC3F,0FAA0F;AAC1F,gFAAgF;AAChF,iEAAiE;AAEjE,oFAAoF;AACpF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAiB;IAC5D,CAAC,eAAe,EAAE,cAAc,CAAC;IACjC,CAAC,uBAAuB,EAAE,qBAAqB,CAAC;IAChD,CAAC,cAAc,EAAE,aAAa,CAAC;IAC/B,CAAC,gBAAgB,EAAE,eAAe,CAAC;IACnC,CAAC,WAAW,EAAE,UAAU,CAAC;I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C;IACzC,CAAC,gBAAgB,EAAE,eAAe,CAAC;IACnC,CAAC,gBAAgB,EAAE,eAAe,CAAC;IACnC,CAAC,WAAW,EAAE,UAAU,CAAC;IACzB,CAAC,cAAc,EAAE,aAAa,CAAC;IAC/B,CAAC,aAAa,EAAE,YAAY,CAAC;IAC7B,CAAC,oBAAoB,EAAE,mBAAmB,CAAC;IAC3C,CAAC,qBAAqB,EAAE,oBAAoB,CAAC;IAC7C,CAAC,yBAAyB,EAAE,uBAAuB,CAAC;IACpD,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;IACzC,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;CACxC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAwB,IAAI,GAAG,CAAC;IAC3E,sBAAsB;IACtB,mBAAmB;IACnB,oBAAoB;IACpB,yBAAyB;IACzB,qBAAqB;IACrB,6BAA6B;IAC7B,4BAA4B;IAC5B,yBAAyB;IACzB,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,wBAAwB;IACxB,mBAAmB;IACnB,mBAAmB;CACpB,CAAC,CAAC","sourcesContent":["// GENERATED FILE — do not edit by hand.\n// Regenerate with:\n// bun run packages/qti-common/scripts/generate-qti3-attribute-map.ts\n//\n// Derived from the IMS QTI schemas vendored in packages/to-pie (imsqti_v2p1.xsd, imsqti_v2p2.xsd) by taking every\n// camelCase attribute name in the QTI 2.x vocabulary and kebab-casing it, which is exactly\n// the QTI 3.0 attribute rename. Attributes already kebab-case in QTI 2.x (`aria-*`) carry\n// no uppercase letter and so are absent here by construction — as are `data-*`,\n// `xml:lang` and HTML attributes, since lookup is by exact name.\n\n/** QTI 3.0 kebab-case attribute name → QTI 2.x camelCase equivalent. 79 entries. */\nexport const QTI3_ATTRIBUTE_TO_QTI2 = new Map<string, string>([\n ['allow-comment', 'allowComment'],\n ['allow-late-submission', 'allowLateSubmission'],\n ['allow-review', 'allowReview'],\n ['allow-skipping', 'allowSkipping'],\n ['base-type', 'baseType'],\n ['case-sensitive', 'caseSensitive'],\n ['center-point', 'centerPoint'],\n ['centre-point', 'centrePoint'],\n ['count-attempt', 'countAttempt'],\n ['data-extension', 'dataExtension'],\n ['default-value', 'defaultValue'],\n ['exclude-category', 'excludeCategory'],\n ['expected-length', 'expectedLength'],\n ['expected-lines', 'expectedLines'],\n ['external-scored', 'externalScored'],\n ['field-identifier', 'fieldIdentifier'],\n ['hotspot-label', 'hotspotLabel'],\n ['include-boundary', 'includeBoundary'],\n ['include-category', 'includeCategory'],\n ['include-lower-bound', 'includeLowerBound'],\n ['include-upper-bound', 'includeUpperBound'],\n ['keep-together', 'keepTogether'],\n ['long-interpretation', 'longInterpretation'],\n ['lower-bound', 'lowerBound'],\n ['map-key', 'mapKey'],\n ['mapped-value', 'mappedValue'],\n ['mapping-indicator', 'mappingIndicator'],\n ['mastery-value', 'masteryValue'],\n ['match-group', 'matchGroup'],\n ['match-max', 'matchMax'],\n ['match-min', 'matchMin'],\n ['math-variable', 'mathVariable'],\n ['max-associations', 'maxAssociations'],\n ['max-attempts', 'maxAttempts'],\n ['max-choices', 'maxChoices'],\n ['max-plays', 'maxPlays'],\n ['max-strings', 'maxStrings'],\n ['max-time', 'maxTime'],\n ['min-associations', 'minAssociations'],\n ['min-choices', 'minChoices'],\n ['min-plays', 'minPlays'],\n ['min-strings', 'minStrings'],\n ['min-time', 'minTime'],\n ['navigation-mode', 'navigationMode'],\n ['normal-maximum', 'normalMaximum'],\n ['normal-minimum', 'normalMinimum'],\n ['number-repeats', 'numberRepeats'],\n ['object-label', 'objectLabel'],\n ['outcome-identifier', 'outcomeIdentifier'],\n ['param-variable', 'paramVariable'],\n ['pattern-mask', 'patternMask'],\n ['placeholder-text', 'placeholderText'],\n ['power-form', 'powerForm'],\n ['response-identifier', 'responseIdentifier'],\n ['rounding-mode', 'roundingMode'],\n ['section-identifier', 'sectionIdentifier'],\n ['show-feedback', 'showFeedback'],\n ['show-hide', 'showHide'],\n ['show-solution', 'showSolution'],\n ['source-identifier', 'sourceIdentifier'],\n ['source-value', 'sourceValue'],\n ['step-label', 'stepLabel'],\n ['string-identifier', 'stringIdentifier'],\n ['submission-mode', 'submissionMode'],\n ['target-identifier', 'targetIdentifier'],\n ['target-type', 'targetType'],\n ['target-value', 'targetValue'],\n ['template-identifier', 'templateIdentifier'],\n ['template-location', 'templateLocation'],\n ['time-dependent', 'timeDependent'],\n ['tolerance-mode', 'toleranceMode'],\n ['tool-name', 'toolName'],\n ['tool-version', 'toolVersion'],\n ['upper-bound', 'upperBound'],\n ['validate-responses', 'validateResponses'],\n ['variable-identifier', 'variableIdentifier'],\n ['variable-identifier-ref', 'variableIdentifierRef'],\n ['weight-identifier', 'weightIdentifier'],\n ['with-replacement', 'withReplacement'],\n]);\n\n/**\n * QTI 2.2 interactions whose content model permits a `prompt` child (it must come first).\n * The inline interactions are deliberately absent: moving a prompt into one would trade one\n * schema violation for another.\n */\nexport const QTI2_PROMPT_BEARING_INTERACTIONS: ReadonlySet<string> = new Set([\n 'associateInteraction',\n 'choiceInteraction',\n 'drawingInteraction',\n 'extendedTextInteraction',\n 'gapMatchInteraction',\n 'graphicAssociateInteraction',\n 'graphicGapMatchInteraction',\n 'graphicOrderInteraction',\n 'hotspotInteraction',\n 'hottextInteraction',\n 'matchInteraction',\n 'mediaInteraction',\n 'orderInteraction',\n 'selectPointInteraction',\n 'sliderInteraction',\n 'uploadInteraction',\n]);\n"]}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export { Qti3ElementNameMapper } from './element-mapper/Qti3ElementNameMapper.js
4
4
  export type { AttributeNameMapper } from './element-mapper/AttributeNameMapper.js';
5
5
  export { Qti2xAttributeNameMapper } from './element-mapper/Qti2xAttributeNameMapper.js';
6
6
  export { Qti3AttributeNameMapper } from './element-mapper/Qti3AttributeNameMapper.js';
7
+ export { QTI2_PROMPT_BEARING_INTERACTIONS, QTI3_ATTRIBUTE_TO_QTI2, } from './element-mapper/qti3-attribute-map.js';
7
8
  export { detectQtiVersion } from './version-detection/detectQtiVersion.js';
8
9
  export type { QtiVersion } from './version-detection/detectQtiVersion.js';
9
10
  export { getAttribute, getBooleanAttribute, getNumberAttribute, hasAttribute, toCamelCase, toKebabCase, } from './xml/attributes.js';
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ export { Qti2xElementNameMapper } from './element-mapper/Qti2xElementNameMapper.
2
2
  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
+ export { QTI2_PROMPT_BEARING_INTERACTIONS, QTI3_ATTRIBUTE_TO_QTI2, } from './element-mapper/qti3-attribute-map.js';
5
6
  // Version detection
6
7
  export { detectQtiVersion } from './version-detection/detectQtiVersion.js';
7
8
  // 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;AAEtF,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';\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;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"]}
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@pie-qti/qti-common",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "main": "./dist/index.js",
5
+ "dependencies": {
6
+ "node-html-parser": "^9.0.4"
7
+ },
5
8
  "devDependencies": {
6
9
  "@types/bun": "^1.4.2",
7
10
  "@xmldom/xmldom": "^0.9.12",
@@ -13,6 +16,10 @@
13
16
  "types": "./dist/index.d.ts",
14
17
  "import": "./dist/index.js"
15
18
  },
19
+ "./accessibility": {
20
+ "types": "./dist/accessibility/index.d.ts",
21
+ "import": "./dist/accessibility/index.js"
22
+ },
16
23
  "./element-mapper": {
17
24
  "types": "./dist/element-mapper/index.d.ts",
18
25
  "import": "./dist/element-mapper/index.js"