math-exercises 3.0.35 → 3.0.37

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.
@@ -63,7 +63,7 @@ export type GeogebraOptions = {
63
63
  fontSize?: number;
64
64
  maxHeight?: number;
65
65
  maxWidth?: number;
66
- showFullScreenButton?: boolean;
66
+ hideFullScreenButton?: boolean;
67
67
  };
68
68
  export type KeyboardOptions = {
69
69
  parenthesisShouldNotProduceLeftRight?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"varTableExtremaReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/varTableExtremaReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAqJF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAkBxD,CAAC"}
1
+ {"version":3,"file":"varTableExtremaReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/variations/varTableExtremaReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAsJF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAkBxD,CAAC"}
@@ -59,9 +59,10 @@ const getGGBOptions = (identifiers) => {
59
59
  hideAxes: true,
60
60
  hideGrid: true,
61
61
  forbidShiftDragZoom: true,
62
- fontSize: 18,
63
- maxHeight: 120,
64
- maxWidth: 400,
62
+ fontSize: 12,
63
+ maxHeight: 80,
64
+ maxWidth: 300,
65
+ hideFullScreenButton: true,
65
66
  });
66
67
  return ggb.getOptions({
67
68
  coords: [-10, 10, -10, 10],
@@ -1 +1 @@
1
- {"version":3,"file":"placeAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAbscissOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAkIF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
1
+ {"version":3,"file":"placeAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAbscissOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAmIF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
@@ -43,6 +43,7 @@ const getStudentGGBOptions = ({ coeff, oneUnitTex, abscissType, }) => {
43
43
  hidden: true,
44
44
  },
45
45
  forbidShiftDragZoom: true,
46
+ maxHeight: 220,
46
47
  });
47
48
  return ggb.getOptions({
48
49
  coords: [-7, 7, -2, 2],
@@ -1 +1 @@
1
- {"version":3,"file":"placeAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsIF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
1
+ {"version":3,"file":"placeAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAwIF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
@@ -42,6 +42,7 @@ const getStudentGGBOptions = ({ coeff, oneUnitTex, abscissType, }) => {
42
42
  yAxis: {
43
43
  hidden: true,
44
44
  },
45
+ maxHeight: 220,
45
46
  forbidShiftDragZoom: true,
46
47
  });
47
48
  return ggb.getOptions({
@@ -50,6 +51,7 @@ const getStudentGGBOptions = ({ coeff, oneUnitTex, abscissType, }) => {
50
51
  };
51
52
  const isGGBAnswerValid = (ans, { ggbAnswer, absciss, abscissTex, abscissType, axisUnit, coeff, oneUnitTex }) => {
52
53
  const points = parseGGBPoints(ans).map((p) => ggbPointToCoords(p));
54
+ console.log(points);
53
55
  return (points.length === 1 &&
54
56
  points[0].y === 0 &&
55
57
  Math.abs(points[0].x - coeff) < 0.1);
@@ -1 +1 @@
1
- {"version":3,"file":"readAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAY1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAuJF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
1
+ {"version":3,"file":"readAbscissOnLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAY1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAwJF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
@@ -49,6 +49,7 @@ const getGGBOptions = ({ absciss, abscissType, axisUnit, oneUnitTex, coeff, }) =
49
49
  hideNumbers: true,
50
50
  steps: 1,
51
51
  },
52
+ maxHeight: 130,
52
53
  });
53
54
  return ggb.getOptions({
54
55
  coords: [-7, 7, -2, 2],
@@ -1 +1 @@
1
- {"version":3,"file":"readAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAW1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAwJF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
1
+ {"version":3,"file":"readAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/readAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAW1D,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAyJF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
@@ -50,6 +50,7 @@ const getGGBOptions = ({ absciss, abscissType, axisUnit, oneUnitTex, coeff, }) =
50
50
  steps: 1,
51
51
  showPositive: true,
52
52
  },
53
+ maxHeight: 130,
53
54
  });
54
55
  return ggb.getOptions({
55
56
  coords: [-1, 10, -2, 2],
@@ -30,7 +30,7 @@ export declare class GeogebraConstructor {
30
30
  fontSize?: number;
31
31
  maxHeight?: number;
32
32
  maxWidth?: number;
33
- showFullScreenButton?: boolean;
33
+ hideFullScreenButton?: boolean;
34
34
  constructor(options: Omit<GeogebraOptions, "coords">);
35
35
  getCoordsForPoints(points: Point[]): number[];
36
36
  getAdaptedCoords({ xMin, xMax, yMin, yMax, zMin, zMax, forceShowAxes, }: GetAdaptedCoords): number[];
@@ -17,7 +17,7 @@ export class GeogebraConstructor {
17
17
  fontSize;
18
18
  maxHeight;
19
19
  maxWidth;
20
- showFullScreenButton;
20
+ hideFullScreenButton;
21
21
  constructor(options) {
22
22
  this.customToolBar = options?.customToolBar ?? toolBarConstructor({});
23
23
  this.forbidShiftDragZoom = options?.forbidShiftDragZoom ?? false;
@@ -35,7 +35,7 @@ export class GeogebraConstructor {
35
35
  this.viewDirectionVector = options?.viewDirectionVector;
36
36
  this.fontSize = options?.fontSize;
37
37
  this.maxHeight = options?.maxHeight;
38
- this.showFullScreenButton = options?.showFullScreenButton;
38
+ this.hideFullScreenButton = options?.hideFullScreenButton;
39
39
  this.maxWidth = options?.maxWidth;
40
40
  }
41
41
  getCoordsForPoints(points) {
@@ -113,7 +113,7 @@ export class GeogebraConstructor {
113
113
  viewDirectionVector: this.viewDirectionVector,
114
114
  fontSize: this.fontSize,
115
115
  maxHeight: this.maxHeight,
116
- showFullScreenButton: this.showFullScreenButton,
116
+ hideFullScreenButton: this.hideFullScreenButton,
117
117
  maxWidth: this.maxWidth,
118
118
  };
119
119
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "math-exercises",
3
3
  "type": "module",
4
- "version": "3.0.35",
4
+ "version": "3.0.37",
5
5
  "description": "Math exercises generator for middle school and high school",
6
6
  "main": "lib/index.js",
7
7
  "files": [