@learnosity/lib-qti-converter 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +57 -9
  2. package/docs/EXAMPLES.md +4 -2
  3. package/docs/FAQ.md +20 -0
  4. package/docs/GETTING_STARTED.md +1 -1
  5. package/docs/SUPPORTED_INTERACTIONS.md +1 -1
  6. package/package.json +8 -8
  7. package/packages/cli/dist/{batchProcessors-B6Xmhfaz.js → batchProcessors-C7czhqX0.js} +73 -10
  8. package/packages/cli/dist/batchProcessors-C7czhqX0.js.map +1 -0
  9. package/packages/cli/dist/batchWorker.js +1 -1
  10. package/packages/cli/dist/{create-prompt-DyNnKXYU.js → create-prompt-dWckcotJ.js} +45 -43
  11. package/packages/cli/dist/create-prompt-dWckcotJ.js.map +1 -0
  12. package/packages/cli/dist/{dist-D3v6G5F8.js → dist-DXDR2peT.js} +6 -6
  13. package/packages/cli/dist/{dist-D3v6G5F8.js.map → dist-DXDR2peT.js.map} +1 -1
  14. package/packages/cli/dist/{learnosityToQti-hFKA3KnZ.js → learnosityToQti-D4ddrXaz.js} +4 -4
  15. package/packages/cli/dist/{learnosityToQti-hFKA3KnZ.js.map → learnosityToQti-D4ddrXaz.js.map} +1 -1
  16. package/packages/cli/dist/{learnosityToQtiPackage-DI7bYisT.js → learnosityToQtiPackage-Bwzm-uLX.js} +8 -8
  17. package/packages/cli/dist/learnosityToQtiPackage-Bwzm-uLX.js.map +1 -0
  18. package/packages/cli/dist/main.js +5 -5
  19. package/packages/cli/dist/main.js.map +1 -1
  20. package/packages/cli/dist/{pathUtils-DkptaCiz.js → pathUtils-D_VsVde8.js} +7 -7
  21. package/packages/cli/dist/pathUtils-D_VsVde8.js.map +1 -0
  22. package/packages/cli/dist/{qtiPackageToLearnosity-JDifZn8o.js → qtiPackageToLearnosity-CX9htPId.js} +4 -4
  23. package/packages/cli/dist/{qtiPackageToLearnosity-JDifZn8o.js.map → qtiPackageToLearnosity-CX9htPId.js.map} +1 -1
  24. package/packages/cli/dist/{qtiToLearnosity-Be0s-5Dr.js → qtiToLearnosity-JQYOkNbM.js} +4 -4
  25. package/packages/cli/dist/{qtiToLearnosity-Be0s-5Dr.js.map → qtiToLearnosity-JQYOkNbM.js.map} +1 -1
  26. package/packages/cli/dist/{resolveOptions-BotCofhl.js → resolveOptions-BuNN2KMA.js} +13 -16
  27. package/packages/cli/dist/resolveOptions-BuNN2KMA.js.map +1 -0
  28. package/packages/cli/dist/{rolldown-runtime-B4iAMlE-.js → rolldown-runtime-DktXgydw.js} +1 -1
  29. package/packages/cli/dist/{table-DlY4LGmL.js → table-DsKq-B4-.js} +6009 -2978
  30. package/packages/cli/dist/table-DsKq-B4-.js.map +1 -0
  31. package/packages/core/dist/index.d.ts +28 -1
  32. package/packages/core/dist/index.js +6014 -2974
  33. package/packages/core/dist/node.d.ts +28 -1
  34. package/packages/core/dist/node.js +3883 -789
  35. package/packages/cli/dist/batchProcessors-B6Xmhfaz.js.map +0 -1
  36. package/packages/cli/dist/create-prompt-DyNnKXYU.js.map +0 -1
  37. package/packages/cli/dist/learnosityToQtiPackage-DI7bYisT.js.map +0 -1
  38. package/packages/cli/dist/pathUtils-DkptaCiz.js.map +0 -1
  39. package/packages/cli/dist/resolveOptions-BotCofhl.js.map +0 -1
  40. package/packages/cli/dist/table-DlY4LGmL.js.map +0 -1
@@ -137,6 +137,7 @@ export declare const DiagnosticCode: {
137
137
  readonly CONTENT_REMOTE_ASSET_NOT_PACKAGED: "CONTENT_REMOTE_ASSET_NOT_PACKAGED";
138
138
  readonly CONTENT_SIMPLE_FEATURE_CONVERTED: "CONTENT_SIMPLE_FEATURE_CONVERTED";
139
139
  readonly CONTENT_HTML_STIMULUS_WRAPPED: "CONTENT_HTML_STIMULUS_WRAPPED";
140
+ readonly CONTENT_ATTRIBUTE_STRIPPED: "CONTENT_ATTRIBUTE_STRIPPED";
140
141
  readonly QTI_NO_CHOICES: "QTI_NO_CHOICES";
141
142
  readonly QTI_NO_CORRECT_RESPONSE: "QTI_NO_CORRECT_RESPONSE";
142
143
  readonly QTI_MISSING_INTERACTION: "QTI_MISSING_INTERACTION";
@@ -1910,6 +1911,8 @@ export interface QtiGapImg {
1910
1911
  objectType: string;
1911
1912
  altText: string;
1912
1913
  matchMax: number;
1914
+ width?: number | string;
1915
+ height?: number | string;
1913
1916
  }
1914
1917
  /**
1915
1918
  * Directed pair (zone-choice pairing)
@@ -2108,6 +2111,13 @@ export interface QtiResponseProcessing {
2108
2111
  templateUrl?: string;
2109
2112
  ruleGroups?: QtiResponseCondition[];
2110
2113
  penaltyValue?: number;
2114
+ /**
2115
+ * When set, response processing also copies this response variable into the
2116
+ * FEEDBACK outcome so each choice's nested <feedbackBlock> displays when that
2117
+ * choice is selected. A template reference cannot carry extra rules, so the
2118
+ * serializer writes the template out as explicit rules in this case.
2119
+ */
2120
+ feedbackResponseIdentifier?: string;
2111
2121
  }
2112
2122
  /**
2113
2123
  * Response condition (if/elseif/else structure)
@@ -2266,7 +2276,10 @@ export interface QtiAssessmentSection {
2266
2276
  visible: boolean;
2267
2277
  /** Item references in this section */
2268
2278
  itemRefs: QtiItemRef[];
2269
- /** Whether to shuffle items within this section */
2279
+ /**
2280
+ * Whether to shuffle items within this section. QTI has no `shuffle` attribute
2281
+ * on assessmentSection; this is emitted as a child `<ordering shuffle="true"/>`.
2282
+ */
2270
2283
  shuffle?: boolean;
2271
2284
  /** Optional time limits for this section */
2272
2285
  timeLimits?: QtiTimeLimits;
@@ -2540,6 +2553,20 @@ export declare function serializeAssessmentItem(ast: QtiAssessmentItem, options?
2540
2553
  xml?: string;
2541
2554
  diagnostics: Diagnostic[];
2542
2555
  };
2556
+ /**
2557
+ * `id` attributes on content elements must be unique, valid identifiers. Authored
2558
+ * HTML often repeats an id (id="equationview" on every equation image) or uses
2559
+ * characters that identifiers cannot contain (id="trial_1_(grams)"). Invalid
2560
+ * characters become `_` and an id that starts with a digit or hyphen gets an `id_`
2561
+ * prefix; the new name never takes an id already used in the item (a numeric suffix
2562
+ * is added). A later repeat of the same id is removed. Id references (`headers`, `for`,
2563
+ * `aria-describedby` and the other ARIA id lists, `href="#..."`) follow any rename.
2564
+ * This is the only place ids are rewritten, so references stay consistent.
2565
+ */
2566
+ export declare function fixElementIds(xml: string): {
2567
+ xml: string;
2568
+ changes: number;
2569
+ };
2543
2570
  //#endregion
2544
2571
  //#region src/qti-serializer/serializeAssessmentTest.d.ts
2545
2572
  export interface SerializeTestOptions {