@mathscan/math-exercise-engine 1.1.17 → 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/README.md +44 -11
- package/dist/index.d.ts +186 -164
- package/dist/index.js +296 -239
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +296 -239
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +84 -0
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -1351,6 +1351,76 @@ 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
|
+
|
|
1398
|
+
/* ============================================
|
|
1399
|
+
LOCKED EXERCISE (answers checked or revealed)
|
|
1400
|
+
Widgets refuse input in JS; these rules kill the pointer
|
|
1401
|
+
cursor that suggests otherwise. Cursor only — never `transform`,
|
|
1402
|
+
which would override rotations like `.diamond-keypad .keypad-btn`.
|
|
1403
|
+
Reset() removes `.locked` and everything comes back.
|
|
1404
|
+
============================================ */
|
|
1405
|
+
|
|
1406
|
+
.math-exercise-renderer.locked .inline-input,
|
|
1407
|
+
.math-exercise-renderer.locked .inline-input-chip,
|
|
1408
|
+
.math-exercise-renderer.locked .radio-option,
|
|
1409
|
+
.math-exercise-renderer.locked .drag-option,
|
|
1410
|
+
.math-exercise-renderer.locked .matcher-card,
|
|
1411
|
+
.math-exercise-renderer.locked .pair-matcher-card,
|
|
1412
|
+
.math-exercise-renderer.locked .keypad-btn,
|
|
1413
|
+
.math-exercise-renderer.locked .grid-symmetry__cell--editable,
|
|
1414
|
+
.math-exercise-renderer.locked .visual-fraction-widget__part,
|
|
1415
|
+
.math-exercise-renderer.locked .number-line-cursor-ball,
|
|
1416
|
+
.math-exercise-renderer.locked .number-line-placed-chip-btn,
|
|
1417
|
+
/* .clock-hand, not .clock-arrow: the arrow polygons are pointer-events:none,
|
|
1418
|
+
the transparent hit-target lines are what carry the grab cursor. */
|
|
1419
|
+
.math-exercise-renderer.locked .clock-interactive .clock-hand,
|
|
1420
|
+
.math-exercise-renderer.locked .clock-interactive .clock-hand:active {
|
|
1421
|
+
cursor: default;
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1354
1424
|
/**
|
|
1355
1425
|
* Image Styles
|
|
1356
1426
|
*
|
|
@@ -2546,6 +2616,20 @@ th.exercise-table-cell.exercise-table-cell--last-row:last-child {
|
|
|
2546
2616
|
transform: scale(0.98);
|
|
2547
2617
|
}
|
|
2548
2618
|
|
|
2619
|
+
/* Locked exercise — the button is disabled until reset(). */
|
|
2620
|
+
|
|
2621
|
+
.exercise-submit-btn:disabled,
|
|
2622
|
+
.exercise-submit-btn:disabled:hover {
|
|
2623
|
+
cursor: default;
|
|
2624
|
+
opacity: 0.5;
|
|
2625
|
+
background: var(--exercise-primary);
|
|
2626
|
+
color: white;
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
.exercise-submit-btn:disabled:active {
|
|
2630
|
+
transform: none;
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2549
2633
|
/* Responsive Overrides - must be last */
|
|
2550
2634
|
|
|
2551
2635
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mathscan/math-exercise-engine",
|
|
3
|
-
"version": "1.1
|
|
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",
|