@mathscan/math-exercise-engine 1.1.6 → 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 {
@@ -2083,6 +2085,11 @@ th.exercise-table-cell {
2083
2085
  border-color: #8578b0;
2084
2086
  }
2085
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
+
2086
2093
  /* When droppable is active, style the input inside */
2087
2094
  .inline-input-droppable.drop-active .inline-input {
2088
2095
  border-color: #4a90d9;
@@ -2093,6 +2100,7 @@ th.exercise-table-cell {
2093
2100
  DRAGGABLE TOOLS (Ruler, Protractor, etc.)
2094
2101
  ============================================ */
2095
2102
 
2103
+ /* Default overlay — absolute positioning (for floating-over-exercise future use) */
2096
2104
  .tools-overlay {
2097
2105
  position: absolute;
2098
2106
  top: 0;
@@ -2101,11 +2109,13 @@ th.exercise-table-cell {
2101
2109
  height: 100%;
2102
2110
  pointer-events: none;
2103
2111
  z-index: 50;
2112
+ overflow: visible;
2104
2113
  }
2105
2114
 
2106
2115
  .draggable-tool {
2107
2116
  pointer-events: auto;
2108
- transition: box-shadow 0.15s ease;
2117
+ touch-action: none;
2118
+ border-radius: 3px;
2109
2119
  }
2110
2120
 
2111
2121
  .draggable-tool:hover {
@@ -2116,37 +2126,45 @@ th.exercise-table-cell {
2116
2126
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
2117
2127
  }
2118
2128
 
2119
- /* Rotate handle */
2120
- .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 {
2121
2137
  position: absolute;
2122
- top: -30px;
2138
+ bottom: -36px;
2123
2139
  left: 50%;
2124
2140
  transform: translateX(-50%);
2125
- width: 24px;
2126
- height: 24px;
2127
- background: #e8e4f3;
2128
- border: 2px solid #9b8fc7;
2141
+ width: 30px;
2142
+ height: 30px;
2143
+ border: 1.5px solid #705DC0;
2129
2144
  border-radius: 50%;
2145
+ background: #fff;
2146
+ color: #705DC0;
2147
+ cursor: pointer;
2130
2148
  display: flex;
2131
2149
  align-items: center;
2132
2150
  justify-content: center;
2133
- cursor: grab;
2134
- font-size: 14px;
2135
- color: #5c5470;
2136
- opacity: 0;
2137
- 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);
2138
2157
  }
2139
2158
 
2140
- .draggable-tool:hover .tool-rotate-handle {
2159
+ .tool-flip-btn:hover {
2141
2160
  opacity: 1;
2161
+ background: #705DC0;
2162
+ color: #fff;
2142
2163
  }
2143
2164
 
2144
- .tool-rotate-handle:hover {
2145
- background: #e8e4f3;
2146
- }
2147
-
2148
- /* Ensure exercise container has relative positioning for tools */
2149
- .math-exercise-renderer {
2150
- position: relative;
2151
- 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);
2152
2170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mathscan/math-exercise-engine",
3
- "version": "1.1.6",
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",