@mathscan/math-exercise-engine 1.2.8 → 1.2.9

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.
package/dist/style.css CHANGED
@@ -2626,6 +2626,28 @@ th.exercise-table-cell.exercise-table-cell--last-row:last-child {
2626
2626
  transform: translateY(-50%);
2627
2627
  }
2628
2628
 
2629
+ /**
2630
+ * GEOMETRY widget — the wrapper this package owns. Everything inside it is
2631
+ * rendered by @mathscan/geometry-engine, which ships no stylesheet of its own
2632
+ * and sizes its canvas from the box it is given.
2633
+ */
2634
+
2635
+ .geometry-widget {
2636
+ width: 100%;
2637
+ max-width: 100%;
2638
+ margin: 0;
2639
+ }
2640
+
2641
+ /* Reserves the canvas box while the engine's React entry is still loading, so
2642
+ the exercise does not jump when the canvas appears. */
2643
+
2644
+ .geometry-widget__loading {
2645
+ width: 100%;
2646
+ aspect-ratio: 1 / 1;
2647
+ border-radius: 8px;
2648
+ background: var(--exercise-bg, transparent);
2649
+ }
2650
+
2629
2651
  /**
2630
2652
  * Button & Action Styles
2631
2653
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mathscan/math-exercise-engine",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "A DSL parser and validator for math exercises - transforms text-based exercise definitions into structured AST and JSON",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -18,6 +18,7 @@
18
18
  ],
19
19
  "scripts": {
20
20
  "build": "vite build",
21
+ "check:geometry-isolation": "node --no-warnings --experimental-loader ./scripts/geometry-validation-isolation-loader.mjs ./scripts/check-geometry-validation-isolation.mjs && node ./scripts/check-geometry-bundle-isolation.mjs",
21
22
  "dev": "vite build --watch",
22
23
  "playground": "vite --open /playground/grid-symmetry-builder/",
23
24
  "demo": "node examples/demo.mjs",
@@ -31,7 +32,7 @@
31
32
  "format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" \"*.{json,md}\"",
32
33
  "format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" \"*.{json,md}\"",
33
34
  "typecheck": "tsc --noEmit",
34
- "prepublishOnly": "pnpm run build"
35
+ "prepublishOnly": "pnpm run build && pnpm run check:geometry-isolation"
35
36
  },
36
37
  "keywords": [
37
38
  "math",
@@ -48,14 +49,17 @@
48
49
  "dependencies": {
49
50
  "@dnd-kit/core": "^6.3.1",
50
51
  "@dnd-kit/utilities": "^3.2.2",
52
+ "@mathscan/geometry-engine": "0.1.4",
51
53
  "chevrotain": "^11.0.3",
52
54
  "lodash": "^4.17.21",
53
55
  "mathjs": "^12.4.0",
54
56
  "zod": "^3.22.4"
55
57
  },
56
58
  "peerDependencies": {
57
- "react": "^18.0.0 || ^19.0.0",
58
- "react-dom": "^18.0.0 || ^19.0.0"
59
+ "konva": "^10.3.0",
60
+ "react": "^19.2.0",
61
+ "react-dom": "^19.2.0",
62
+ "react-konva": "^19.2.5"
59
63
  },
60
64
  "peerDependenciesMeta": {
61
65
  "react": {
@@ -63,6 +67,12 @@
63
67
  },
64
68
  "react-dom": {
65
69
  "optional": true
70
+ },
71
+ "konva": {
72
+ "optional": true
73
+ },
74
+ "react-konva": {
75
+ "optional": true
66
76
  }
67
77
  },
68
78
  "devDependencies": {
@@ -89,7 +99,7 @@
89
99
  "vitest": "^4.0.17"
90
100
  },
91
101
  "engines": {
92
- "node": ">=18.0.0"
102
+ "node": "^20.19.0 || >=22.12.0"
93
103
  },
94
104
  "packageManager": "pnpm@8.15.0"
95
105
  }