@mathscan/math-exercise-engine 1.1.5 → 1.1.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
@@ -142,7 +142,9 @@
142
142
  ======================================== */
143
143
 
144
144
  .exercise-layout-container {
145
- /* Default: regular block layout */
145
+ /* Default: regular block layout.
146
+ position:relative makes this the anchor for the absolute tools-overlay. */
147
+ position: relative;
146
148
  }
147
149
 
148
150
  .exercise-layout-container.has-keypad {
@@ -521,6 +523,10 @@ mark {
521
523
  /* Container for drag options widget */
522
524
  }
523
525
 
526
+ .pill-bg-path {
527
+ fill: var(--exercise-pill-bg, #FFE7B4);
528
+ }
529
+
524
530
  /*
525
531
  * Shared base for every widget that sits inline within a text line.
526
532
  *
@@ -2079,6 +2085,11 @@ th.exercise-table-cell {
2079
2085
  border-color: #8578b0;
2080
2086
  }
2081
2087
 
2088
+ /* Original chip dims while its copy is shown in the drag overlay */
2089
+ .inline-input-chip.dragging {
2090
+ opacity: 0.4;
2091
+ }
2092
+
2082
2093
  /* When droppable is active, style the input inside */
2083
2094
  .inline-input-droppable.drop-active .inline-input {
2084
2095
  border-color: #4a90d9;
@@ -2089,6 +2100,7 @@ th.exercise-table-cell {
2089
2100
  DRAGGABLE TOOLS (Ruler, Protractor, etc.)
2090
2101
  ============================================ */
2091
2102
 
2103
+ /* Default overlay — absolute positioning (for floating-over-exercise future use) */
2092
2104
  .tools-overlay {
2093
2105
  position: absolute;
2094
2106
  top: 0;
@@ -2097,11 +2109,13 @@ th.exercise-table-cell {
2097
2109
  height: 100%;
2098
2110
  pointer-events: none;
2099
2111
  z-index: 50;
2112
+ overflow: visible;
2100
2113
  }
2101
2114
 
2102
2115
  .draggable-tool {
2103
2116
  pointer-events: auto;
2104
- transition: box-shadow 0.15s ease;
2117
+ touch-action: none;
2118
+ border-radius: 3px;
2105
2119
  }
2106
2120
 
2107
2121
  .draggable-tool:hover {
@@ -2112,37 +2126,45 @@ th.exercise-table-cell {
2112
2126
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
2113
2127
  }
2114
2128
 
2115
- /* Rotate handle */
2116
- .tool-rotate-handle {
2129
+ /* Ensure exercise container allows tools to float outside */
2130
+ .math-exercise-renderer {
2131
+ position: relative;
2132
+ overflow: visible;
2133
+ }
2134
+
2135
+ /* ── Flip button (set-square mirror) ─────────────────────────────────────────── */
2136
+ .tool-flip-btn {
2117
2137
  position: absolute;
2118
- top: -30px;
2138
+ bottom: -36px;
2119
2139
  left: 50%;
2120
2140
  transform: translateX(-50%);
2121
- width: 24px;
2122
- height: 24px;
2123
- background: #e8e4f3;
2124
- border: 2px solid #9b8fc7;
2141
+ width: 30px;
2142
+ height: 30px;
2143
+ border: 1.5px solid #705DC0;
2125
2144
  border-radius: 50%;
2145
+ background: #fff;
2146
+ color: #705DC0;
2147
+ cursor: pointer;
2126
2148
  display: flex;
2127
2149
  align-items: center;
2128
2150
  justify-content: center;
2129
- cursor: grab;
2130
- font-size: 14px;
2131
- color: #5c5470;
2132
- opacity: 0;
2133
- transition: opacity 0.15s ease;
2151
+ pointer-events: auto;
2152
+ z-index: 102;
2153
+ opacity: 0.78;
2154
+ transition: opacity 0.15s, background 0.15s, color 0.15s;
2155
+ padding: 0;
2156
+ box-shadow: 0 1px 5px rgba(112, 93, 192, 0.22);
2134
2157
  }
2135
2158
 
2136
- .draggable-tool:hover .tool-rotate-handle {
2159
+ .tool-flip-btn:hover {
2137
2160
  opacity: 1;
2161
+ background: #705DC0;
2162
+ color: #fff;
2138
2163
  }
2139
2164
 
2140
- .tool-rotate-handle:hover {
2141
- background: #e8e4f3;
2142
- }
2143
-
2144
- /* Ensure exercise container has relative positioning for tools */
2145
- .math-exercise-renderer {
2146
- position: relative;
2147
- min-height: 200px;
2165
+ .tool-flip-btn--active {
2166
+ background: #705DC0;
2167
+ color: #fff;
2168
+ opacity: 1;
2169
+ box-shadow: 0 1px 5px rgba(112, 93, 192, 0.4);
2148
2170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mathscan/math-exercise-engine",
3
- "version": "1.1.5",
3
+ "version": "1.1.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",