@khanacademy/perseus 12.2.0 → 12.3.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 (36) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/article-renderer.d.ts +3 -2
  3. package/dist/error-boundary.d.ts +1 -0
  4. package/dist/es/index.css +1 -66
  5. package/dist/es/index.js +86 -66
  6. package/dist/es/index.js.map +1 -1
  7. package/dist/index.css +1 -66
  8. package/dist/index.js +77 -54
  9. package/dist/index.js.map +1 -1
  10. package/dist/renderer.d.ts +4 -1
  11. package/dist/styles/constants.d.ts +2 -2
  12. package/dist/widget-container.d.ts +2 -0
  13. package/dist/widgets/expression.d.ts +5 -4
  14. package/package.json +8 -8
  15. package/src/__tests__/renderer-api.test.tsx +18 -23
  16. package/src/article-renderer.tsx +15 -13
  17. package/src/error-boundary.tsx +3 -0
  18. package/src/multi-items/__tests__/__snapshots__/multi-renderer.test.tsx.snap +5 -5
  19. package/src/renderer.tsx +29 -27
  20. package/src/server-item-renderer.tsx +1 -0
  21. package/src/styles/constants.ts +4 -4
  22. package/src/styles/perseus-renderer.less +0 -10
  23. package/src/styles/variables.less +2 -2
  24. package/src/styles/variables.shared.less +2 -2
  25. package/src/styles/widgets/expression.less +0 -77
  26. package/src/styles/widgets/passage.less +1 -19
  27. package/src/widget-container.tsx +32 -10
  28. package/src/widgets/__stories__/label-image.stories.tsx +30 -0
  29. package/src/widgets/__testdata__/label-image.testdata.ts +63 -0
  30. package/src/widgets/__tests__/__snapshots__/group.test.tsx.snap +5 -5
  31. package/src/widgets/__tests__/__snapshots__/radio.test.ts.snap +28 -28
  32. package/src/widgets/__tests__/expression.test.tsx +12 -9
  33. package/src/widgets/__tests__/renderQuestion.tsx +30 -13
  34. package/src/widgets/expression.tsx +19 -25
  35. package/src/widgets/transformer.tsx +1 -2
  36. package/tsconfig-build.tsbuildinfo +1 -1
@@ -2518,8 +2518,7 @@ class Transformer extends React.Component<Props> {
2518
2518
  // @ts-expect-error - TS2345 - Argument of type '{ type: "dilation"; center: any; scale: number; }' is not assignable to parameter of type 'PerseusTransformerTransformation'.
2519
2519
  self.doTransform({
2520
2520
  type: "dilation",
2521
- // NOTE(kevinb): It's hard to convince that this.dilationCircle
2522
- // will still be defined here. center: self.dilationCircle.centerPoint.coord,
2521
+ center: self.dilationCircle.centerPoint.coord,
2523
2522
  scale: newRadius / oldRadius,
2524
2523
  });
2525
2524
  },