@mathscan/math-exercise-engine 1.2.0 → 1.2.1

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
@@ -1351,6 +1351,50 @@ th.exercise-table-cell.exercise-table-cell--last-row:last-child {
1351
1351
  }
1352
1352
  }
1353
1353
 
1354
+ /* ----------------------------------------
1355
+ Layout variant: left/right columns
1356
+ (groups[0] → left column, groups[1] → right column; the flex row follows the
1357
+ inherited `dir`, so an RTL ancestor mirrors them without extra rules)
1358
+ ---------------------------------------- */
1359
+
1360
+ .pair-matcher-widget--columns {
1361
+ flex-direction: row;
1362
+ align-items: flex-start;
1363
+ justify-content: center;
1364
+ width: 100%;
1365
+ }
1366
+
1367
+ .pair-matcher-widget--columns .pair-matcher-row {
1368
+ display: flex;
1369
+ flex-direction: column;
1370
+ flex: 1 1 0;
1371
+ min-width: 0;
1372
+ }
1373
+
1374
+ .pair-matcher-widget--columns .pair-matcher-cell {
1375
+ flex-direction: row;
1376
+ }
1377
+
1378
+ .pair-matcher-widget--columns .pair-matcher-dot--south {
1379
+ margin-top: 0;
1380
+ margin-inline-start: calc(var(--pm-dot-size) / -2);
1381
+ }
1382
+
1383
+ .pair-matcher-widget--columns .pair-matcher-dot--north {
1384
+ margin-bottom: 0;
1385
+ margin-inline-end: calc(var(--pm-dot-size) / -2);
1386
+ }
1387
+
1388
+ /* Too narrow for two columns — stack them. Row/cell directions already match
1389
+ the base rules above, and `gap` comes from the base `.pair-matcher-widget`
1390
+ media rule, so only the widget axis flips here. */
1391
+
1392
+ @media (max-width: 420px) {
1393
+ .pair-matcher-widget--columns {
1394
+ flex-direction: column;
1395
+ }
1396
+ }
1397
+
1354
1398
  /* ============================================
1355
1399
  LOCKED EXERCISE (answers checked or revealed)
1356
1400
  Widgets refuse input in JS; these rules kill the pointer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mathscan/math-exercise-engine",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
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",
@@ -16,6 +16,23 @@
16
16
  "files": [
17
17
  "dist"
18
18
  ],
19
+ "scripts": {
20
+ "build": "vite build",
21
+ "dev": "vite build --watch",
22
+ "playground": "vite --open /playground/grid-symmetry-builder/",
23
+ "demo": "node examples/demo.mjs",
24
+ "demo:ts": "tsx --conditions=import examples/demo.ts",
25
+ "demo:build": "pnpm run build && node examples/demo.mjs",
26
+ "test": "vitest",
27
+ "test:run": "vitest run",
28
+ "test:coverage": "vitest run --coverage",
29
+ "lint": "echo 'ESLint disabled for now'",
30
+ "lint:fix": "echo 'ESLint disabled for now'",
31
+ "format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" \"*.{json,md}\"",
32
+ "format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" \"*.{json,md}\"",
33
+ "typecheck": "tsc --noEmit",
34
+ "prepublishOnly": "pnpm run build"
35
+ },
19
36
  "keywords": [
20
37
  "math",
21
38
  "exercise",
@@ -74,21 +91,5 @@
74
91
  "engines": {
75
92
  "node": ">=18.0.0"
76
93
  },
77
- "packageManager": "pnpm@8.15.0",
78
- "scripts": {
79
- "build": "vite build",
80
- "dev": "vite build --watch",
81
- "playground": "vite --open /playground/grid-symmetry-builder/",
82
- "demo": "node examples/demo.mjs",
83
- "demo:ts": "tsx --conditions=import examples/demo.ts",
84
- "demo:build": "pnpm run build && node examples/demo.mjs",
85
- "test": "vitest",
86
- "test:run": "vitest run",
87
- "test:coverage": "vitest run --coverage",
88
- "lint": "echo 'ESLint disabled for now'",
89
- "lint:fix": "echo 'ESLint disabled for now'",
90
- "format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" \"*.{json,md}\"",
91
- "format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" \"*.{json,md}\"",
92
- "typecheck": "tsc --noEmit"
93
- }
94
- }
94
+ "packageManager": "pnpm@8.15.0"
95
+ }