@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/index.d.ts +420 -0
- package/dist/index.js +1158 -277
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1158 -277
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +45 -23
- package/package.json +1 -1
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
|
-
|
|
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
|
-
/*
|
|
2116
|
-
.
|
|
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
|
-
|
|
2138
|
+
bottom: -36px;
|
|
2119
2139
|
left: 50%;
|
|
2120
2140
|
transform: translateX(-50%);
|
|
2121
|
-
width:
|
|
2122
|
-
height:
|
|
2123
|
-
|
|
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
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
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
|
-
.
|
|
2159
|
+
.tool-flip-btn:hover {
|
|
2137
2160
|
opacity: 1;
|
|
2161
|
+
background: #705DC0;
|
|
2162
|
+
color: #fff;
|
|
2138
2163
|
}
|
|
2139
2164
|
|
|
2140
|
-
.tool-
|
|
2141
|
-
background: #
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
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.
|
|
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",
|