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