@doenet/doenetml-iframe 0.7.20-dev.306 → 0.7.20-dev.308

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 (3) hide show
  1. package/index.js +55 -1
  2. package/index.js.map +1 -1
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -33791,6 +33791,50 @@ function detectVersionFromDoenetML(doenetML) {
33791
33791
  }
33792
33792
  return null;
33793
33793
  }
33794
+ const SCORED_SECTION_COMPONENT_TYPES = [
33795
+ "document",
33796
+ "section",
33797
+ "subsection",
33798
+ "subsubsection",
33799
+ "paragraphs",
33800
+ "aside",
33801
+ "objectives",
33802
+ "problem",
33803
+ "exercise",
33804
+ "question",
33805
+ "activity",
33806
+ "example",
33807
+ "definition",
33808
+ "note",
33809
+ "theorem",
33810
+ "part",
33811
+ "task",
33812
+ "proof",
33813
+ "problems",
33814
+ "exercises",
33815
+ "standinForFutureLayoutTag",
33816
+ "externalContent",
33817
+ "cascade",
33818
+ "div",
33819
+ "span",
33820
+ "ol",
33821
+ "ul",
33822
+ "li",
33823
+ "p"
33824
+ ];
33825
+ function renamedScoredSectionAttribute(oldName, newName) {
33826
+ const rule = {
33827
+ to: newName,
33828
+ warningMessage: `[deprecation] Attribute \`${oldName}\` is deprecated; use \`${newName}\` instead.`,
33829
+ conflictWarningMessage: `[deprecation] Attribute \`${oldName}\` is deprecated and ignored because \`${newName}\` is also specified.`
33830
+ };
33831
+ return Object.fromEntries(
33832
+ SCORED_SECTION_COMPONENT_TYPES.map((comp) => [
33833
+ comp,
33834
+ { [oldName]: rule }
33835
+ ])
33836
+ );
33837
+ }
33794
33838
  function ignoredAttributes(componentName, attributeNames) {
33795
33839
  return Object.fromEntries(
33796
33840
  attributeNames.map((attributeName) => [
@@ -33801,9 +33845,19 @@ function ignoredAttributes(componentName, attributeNames) {
33801
33845
  ])
33802
33846
  );
33803
33847
  }
33848
+ const SCORED_SECTION_COLORING_RENAMES = renamedScoredSectionAttribute(
33849
+ "forceIndividualAnswerColoring",
33850
+ "colorAnswersSeparately"
33851
+ );
33804
33852
  const DEPRECATION_REGISTRY = {
33805
33853
  attributeRenames: {
33854
+ // Merge per-component rules, spreading scored-section rename rules
33855
+ // first so component-specific rules take precedence on conflict.
33856
+ ...SCORED_SECTION_COLORING_RENAMES,
33806
33857
  document: {
33858
+ // document already has a scored-section rename (spread above) plus
33859
+ // its own documentWideCheckWork rename.
33860
+ ...SCORED_SECTION_COLORING_RENAMES["document"],
33807
33861
  documentWideCheckWork: {
33808
33862
  to: "sectionWideCheckWork",
33809
33863
  warningMessage: "[deprecation] Attribute `documentWideCheckWork` on `<document>` is deprecated; use `sectionWideCheckWork` instead.",
@@ -62886,7 +62940,7 @@ function ExternalVirtualKeyboard({
62886
62940
  }
62887
62941
  );
62888
62942
  }
62889
- const version = "0.7.20-dev.306";
62943
+ const version = "0.7.20-dev.308";
62890
62944
  const latestDoenetmlVersion = version;
62891
62945
  function subscribeToPinnedTheme() {
62892
62946
  return () => {