@doenet/doenetml-iframe 0.7.0-rc-6 → 0.7.0-rc-8

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 +12 -5
  2. package/index.js.map +1 -1
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -18090,6 +18090,7 @@ function normalize_negative_numbers$1(e2) {
18090
18090
  if ("-" === r && 1 === n.length) {
18091
18091
  if ("number" == typeof n[0] && n[0] >= 0) return -n[0];
18092
18092
  if (Array.isArray(n[0]) && "*" === n[0][0] && "number" == typeof n[0][1] && n[0][1] >= 0) return ["*", -n[0][1], ...n[0].slice(2).map(normalize_negative_numbers$1)];
18093
+ if (Array.isArray(n[0][1]) && "/" === n[0][1][0] && 3 === n[0][1].length && "number" == typeof n[0][1][1] && n[0][1][1] >= 0) return ["*", ["/", -1 * n[0][1][1], n[0][1][2]], ...n[0].slice(2).map(normalize_negative_numbers$1)];
18093
18094
  }
18094
18095
  return [r, ...n.map(normalize_negative_numbers$1)];
18095
18096
  }
@@ -27455,9 +27456,13 @@ function attributeValueText(node, source) {
27455
27456
  }
27456
27457
  return removeQuotes(unescapeEntities(node, source));
27457
27458
  }
27458
- function lezerNodeToPosition(node, offsetToPositionMap) {
27459
+ function lezerNodeToPosition(node, offsetToPositionMap, adjustForQuotes = false) {
27459
27460
  const { rowMap, columnMap } = offsetToPositionMap;
27460
- const { from, to } = node;
27461
+ let { from, to } = node;
27462
+ if (adjustForQuotes) {
27463
+ from += 1;
27464
+ to -= 1;
27465
+ }
27461
27466
  return {
27462
27467
  start: {
27463
27468
  line: rowMap[from] + 1,
@@ -29787,7 +29792,8 @@ function _lezerToDast(node, source) {
29787
29792
  ),
29788
29793
  position: lezerNodeToPosition(
29789
29794
  attrValue,
29790
- offsetMap
29795
+ offsetMap,
29796
+ true
29791
29797
  )
29792
29798
  },
29793
29799
  offsetMap
@@ -31727,7 +31733,7 @@ function detectVersionFromDoenetML(doenetML) {
31727
31733
  version: versionString,
31728
31734
  position: {
31729
31735
  begin: xmlnsTextNode.position?.start.offset + offsetStart,
31730
- end: xmlnsTextNode.position?.start.offset + offsetEnd + 1
31736
+ end: xmlnsTextNode.position?.start.offset + offsetEnd
31731
31737
  }
31732
31738
  };
31733
31739
  }
@@ -64946,6 +64952,7 @@ function normalize_negative_numbers(e2) {
64946
64952
  if ("-" === r && 1 === n.length) {
64947
64953
  if ("number" == typeof n[0] && n[0] >= 0) return -n[0];
64948
64954
  if (Array.isArray(n[0]) && "*" === n[0][0] && "number" == typeof n[0][1] && n[0][1] >= 0) return ["*", -n[0][1], ...n[0].slice(2).map(normalize_negative_numbers)];
64955
+ if (Array.isArray(n[0][1]) && "/" === n[0][1][0] && 3 === n[0][1].length && "number" == typeof n[0][1][1] && n[0][1][1] >= 0) return ["*", ["/", -1 * n[0][1][1], n[0][1][2]], ...n[0].slice(2).map(normalize_negative_numbers)];
64949
64956
  }
64950
64957
  return [r, ...n.map(normalize_negative_numbers)];
64951
64958
  }
@@ -70744,7 +70751,7 @@ function ExternalVirtualKeyboard() {
70744
70751
  }
70745
70752
  );
70746
70753
  }
70747
- const version = "0.7.0-rc-6";
70754
+ const version = "0.7.0-rc-8";
70748
70755
  const latestDoenetmlVersion = version;
70749
70756
  function DoenetViewer({
70750
70757
  doenetML,