@mathscan/math-exercise-engine 1.2.6 → 1.2.7

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
@@ -60,6 +60,10 @@
60
60
  --exercise-incorrect: #ef4444;
61
61
  --exercise-correct-bg: color-mix(in srgb, var(--exercise-correct) 6%, var(--exercise-bg));
62
62
  --exercise-incorrect-bg: color-mix(in srgb, var(--exercise-incorrect) 6%, var(--exercise-bg));
63
+ /* Disabled inputs: a visible slot the student can't fill. Derived from the
64
+ base tokens so they follow the host theme. */
65
+ --exercise-disabled-bg: color-mix(in srgb, var(--exercise-border) 40%, var(--exercise-bg));
66
+ --exercise-disabled-border: var(--exercise-border);
63
67
  /* Authoring/engine errors — kept apart from --exercise-incorrect so they
64
68
  don't follow the student's attempt state. */
65
69
  --exercise-error: #ef4444;
@@ -496,6 +500,21 @@ mark {
496
500
  border-color: var(--exercise-border-focus);
497
501
  }
498
502
 
503
+ /* ========================================
504
+ DISABLED
505
+ Prefixed with .math-exercise-renderer so a host's own .inline-input CSS can't override the gray.
506
+ To change the colors, override the --exercise-disabled-* variables instead.
507
+ ======================================== */
508
+
509
+ .math-exercise-renderer .inline-input.inline-input--disabled:disabled {
510
+ background: var(--exercise-disabled-bg);
511
+ border: var(--exercise-border-width) solid var(--exercise-disabled-border);
512
+ box-shadow: none;
513
+ cursor: not-allowed;
514
+ /* Cancel the browser's default fade: the gray tokens already convey it. */
515
+ opacity: 1;
516
+ }
517
+
499
518
  /* ========================================
500
519
  VALIDATION STATUS
501
520
  ======================================== */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mathscan/math-exercise-engine",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
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",