@mathscan/math-exercise-engine 1.1.3 → 1.1.5
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 +1930 -15
- package/dist/index.js +426 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +426 -3
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +189 -0
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -1681,6 +1681,195 @@ th.exercise-table-cell {
|
|
|
1681
1681
|
outline-offset: 2px;
|
|
1682
1682
|
}
|
|
1683
1683
|
|
|
1684
|
+
/* ═══════════════════════════════════════════════════════════════════════════
|
|
1685
|
+
Clock Widget Styles
|
|
1686
|
+
═══════════════════════════════════════════════════════════════════════════ */
|
|
1687
|
+
|
|
1688
|
+
.clock {
|
|
1689
|
+
display: inline-flex;
|
|
1690
|
+
align-items: center;
|
|
1691
|
+
vertical-align: middle;
|
|
1692
|
+
margin: 4px;
|
|
1693
|
+
user-select: none;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
/* ── Analog ──────────────────────────────────────────────────────────────── */
|
|
1697
|
+
|
|
1698
|
+
.clock-analog {
|
|
1699
|
+
position: relative;
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
/* Circular wrapper — width/height/offset set via inline styles in ClockRenderer.tsx
|
|
1703
|
+
(derived from FACE_RADIUS and INTERACTIVE_SCALE so they stay in sync).
|
|
1704
|
+
box-shadow respects border-radius, so shadows align with the face.
|
|
1705
|
+
Inset shadow goes on ::after (z-index:1) so it paints above the SVG child. */
|
|
1706
|
+
|
|
1707
|
+
.clock-face-ring {
|
|
1708
|
+
position: relative;
|
|
1709
|
+
display: inline-block;
|
|
1710
|
+
border-radius: 50%;
|
|
1711
|
+
box-shadow: 0px 4.57px 0px 0px #00000040;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
.clock-face-ring::after {
|
|
1715
|
+
content: '';
|
|
1716
|
+
position: absolute;
|
|
1717
|
+
inset: 0;
|
|
1718
|
+
border-radius: 50%;
|
|
1719
|
+
box-shadow: 0px 3px 0px 4px #00000026 inset;
|
|
1720
|
+
pointer-events: none;
|
|
1721
|
+
z-index: 1;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
.clock-svg {
|
|
1725
|
+
display: block;
|
|
1726
|
+
touch-action: none;
|
|
1727
|
+
/* top/left offset set via inline style in ClockRenderer.tsx */
|
|
1728
|
+
position: absolute;
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
.clock-face {
|
|
1732
|
+
fill: #ffffff;
|
|
1733
|
+
stroke: #ae9cff;
|
|
1734
|
+
stroke-width: 7;
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
.clock-tick-hour {
|
|
1738
|
+
stroke: #705dc0;
|
|
1739
|
+
stroke-width: 2.5;
|
|
1740
|
+
stroke-linecap: round;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
.clock-tick-minute {
|
|
1744
|
+
stroke: #c6b6ff;
|
|
1745
|
+
stroke-width: 1;
|
|
1746
|
+
stroke-linecap: round;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
.clock-number {
|
|
1750
|
+
font-family: 'Arial Rounded MT Bold', 'Helvetica Rounded', Arial, sans-serif;
|
|
1751
|
+
font-size: 13px;
|
|
1752
|
+
font-weight: 700;
|
|
1753
|
+
fill: #705dc0;
|
|
1754
|
+
stroke: #ae9cff;
|
|
1755
|
+
stroke-width: 2.5px;
|
|
1756
|
+
paint-order: stroke fill;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
.clock-hand {
|
|
1760
|
+
stroke: transparent;
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
/* ── Arrow hands ─────────────────────────────────────────────────────────── */
|
|
1764
|
+
|
|
1765
|
+
.clock-arrow {
|
|
1766
|
+
fill: #ae9cff;
|
|
1767
|
+
stroke: #705dc0;
|
|
1768
|
+
stroke-width: 1;
|
|
1769
|
+
stroke-linejoin: round;
|
|
1770
|
+
stroke-linecap: round;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
.clock-interactive .clock-arrow {
|
|
1774
|
+
stroke-dasharray: 3 2;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
.clock-arrow-minute {
|
|
1778
|
+
fill: #705dc0;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
.clock-center {
|
|
1782
|
+
fill: #705dc0;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
.clock-interactive .clock-hand {
|
|
1786
|
+
cursor: grab;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
.clock-interactive .clock-hand:active {
|
|
1790
|
+
cursor: grabbing;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
.clock-interactive .clock-arrow-hour {
|
|
1794
|
+
fill: #c8b8ff;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
.clock-period-badge {
|
|
1798
|
+
position: absolute;
|
|
1799
|
+
bottom: 6px;
|
|
1800
|
+
right: 6px;
|
|
1801
|
+
font-size: 10px;
|
|
1802
|
+
font-weight: 700;
|
|
1803
|
+
color: #705dc0;
|
|
1804
|
+
background: rgba(255, 255, 255, 0.92);
|
|
1805
|
+
padding: 1px 4px;
|
|
1806
|
+
border-radius: 3px;
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
/* ── Digital ─────────────────────────────────────────────────────────────── */
|
|
1810
|
+
|
|
1811
|
+
.clock-digital-wrapper {
|
|
1812
|
+
--clock-digital-border: 5px;
|
|
1813
|
+
display: inline-flex;
|
|
1814
|
+
flex-direction: column;
|
|
1815
|
+
align-items: center;
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
.clock-digital-tabs {
|
|
1819
|
+
display: block;
|
|
1820
|
+
margin-bottom: calc(-1 * var(--clock-digital-border));
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
.clock-digital-display {
|
|
1824
|
+
font-family: 'Courier New', ui-monospace, monospace;
|
|
1825
|
+
font-size: 28px;
|
|
1826
|
+
font-weight: 700;
|
|
1827
|
+
color: #705dc0;
|
|
1828
|
+
background: #fffbf3;
|
|
1829
|
+
padding: 6px 12px;
|
|
1830
|
+
border-radius: 12px;
|
|
1831
|
+
border: var(--clock-digital-border) solid #ffca76;
|
|
1832
|
+
box-shadow: 0px 4px 1px 0px rgba(255, 202, 118, 0.4) inset;
|
|
1833
|
+
letter-spacing: 2px;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
/* ── Validation states ───────────────────────────────────────────────────── */
|
|
1837
|
+
|
|
1838
|
+
.clock-interactive.clock-correct .clock-arrow,
|
|
1839
|
+
.clock-interactive.clock-incorrect .clock-arrow {
|
|
1840
|
+
stroke-dasharray: none;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
.clock-correct .clock-arrow {
|
|
1844
|
+
fill: #16a34a;
|
|
1845
|
+
stroke: #16a34a;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
.clock-correct .clock-arrow-hour {
|
|
1849
|
+
fill: #f2ffee;
|
|
1850
|
+
stroke: #16a34a;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
.clock-incorrect .clock-arrow {
|
|
1854
|
+
fill: #dc2626;
|
|
1855
|
+
stroke: #dc2626;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
.clock-incorrect .clock-arrow-hour {
|
|
1859
|
+
fill: #fff0f7;
|
|
1860
|
+
stroke: #dc2626;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
.clock-correct .clock-digital-display {
|
|
1864
|
+
border-color: #16a34a;
|
|
1865
|
+
background: #f0fdf4;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
.clock-incorrect .clock-digital-display {
|
|
1869
|
+
border-color: #dc2626;
|
|
1870
|
+
background: #fef2f2;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1684
1873
|
/**
|
|
1685
1874
|
* Button & Action Styles
|
|
1686
1875
|
*
|
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.5",
|
|
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",
|