@mathscan/math-exercise-engine 1.0.3 → 1.0.4

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
@@ -48,6 +48,7 @@
48
48
  --exercise-highlight: #ffd700;
49
49
  --exercise-border: #ddd;
50
50
  --exercise-border-focus: var(--exercise-primary);
51
+ --exercise-highlight-color: #aef59d;
51
52
 
52
53
  /* ========================================
53
54
  SPACING VARIABLES
@@ -70,7 +71,7 @@
70
71
  ======================================== */
71
72
 
72
73
  /** Base font size - responsive (14px to 20px) */
73
- --exercise-font-size: clamp(0.875rem, 2vw, 1.25rem);
74
+ --exercise-font-size: clamp(0.875rem, 2vw, 1.1rem);
74
75
 
75
76
  /** Larger font size for inputs/buttons (12px to 16px) */
76
77
  --exercise-font-size-large: clamp(1rem, 1.5vw, 0.75rem);
@@ -201,7 +202,7 @@
201
202
 
202
203
  .text-item {
203
204
  color: var(--exercise-text);
204
- font-size: medium;
205
+ /* font-size: medium; */
205
206
  }
206
207
 
207
208
  .text-group {
@@ -240,10 +241,8 @@
240
241
  ======================================== */
241
242
 
242
243
  .highlighted-text {
243
- font-weight: var(--exercise-font-weight);
244
- margin: 0 var(--exercise-element-margin);
244
+ /* margin: 0 var(--exercise-element-margin); */
245
245
  color: var(--exercise-text);
246
-
247
246
  /**
248
247
  * unicode-bidi: isolate prevents highlighted text from being affected
249
248
  * by parent RTL context, keeping numbers in correct order.
@@ -252,8 +251,25 @@
252
251
  }
253
252
 
254
253
  .highlighted-text .highlight {
255
- color: red;
256
- font-weight: var(--exercise-font-weight-bold);
254
+ /* background-color: var(--exercise-highlight-color); */
255
+ }
256
+
257
+ mark {
258
+ /* Default background color */
259
+ background-color: #aef59d;
260
+
261
+ /* Add padding for space around the text within the highlight */
262
+ padding: 0.1em 0.4em;
263
+
264
+ /* Apply border-radius for rounded corners */
265
+ border-radius: 0.8em;
266
+
267
+ /* Ensures rounded corners are applied to each line when text wraps */
268
+ box-decoration-break: clone;
269
+ -webkit-box-decoration-break: clone; /* for older Safari/Chrome */
270
+
271
+ /* Optional: add a border */
272
+ border: 1px solid #aef59d;
257
273
  }
258
274
 
259
275
  /* ========================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mathscan/math-exercise-engine",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
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",
@@ -52,8 +52,8 @@
52
52
  "zod": "^3.22.4"
53
53
  },
54
54
  "peerDependencies": {
55
- "react": "^18.0.0",
56
- "react-dom": "^18.0.0"
55
+ "react": "^18.0.0 || ^19.0.0",
56
+ "react-dom": "^18.0.0 || ^19.0.0"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "react": {
@@ -68,16 +68,16 @@
68
68
  "@testing-library/react": "^16.3.2",
69
69
  "@testing-library/user-event": "^14.6.1",
70
70
  "@types/node": "^20.11.0",
71
- "@types/react": "^18.2.0",
72
- "@types/react-dom": "^18.2.0",
71
+ "@types/react": "^19.0.0",
72
+ "@types/react-dom": "^19.0.0",
73
73
  "@typescript-eslint/eslint-plugin": "^6.19.0",
74
74
  "@typescript-eslint/parser": "^6.19.0",
75
75
  "@vitest/coverage-v8": "^4.0.17",
76
76
  "eslint": "^8.56.0",
77
77
  "jsdom": "^28.0.0",
78
78
  "prettier": "^3.2.4",
79
- "react": "^18.2.0",
80
- "react-dom": "^18.2.0",
79
+ "react": "^19.0.0",
80
+ "react-dom": "^19.0.0",
81
81
  "ts-node": "^10.9.2",
82
82
  "tsx": "^4.7.0",
83
83
  "typescript": "^5.3.3",