@stnd/lab 1.7.0 → 1.8.0
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/CHANGELOG.md +10 -0
- package/Lab.svelte +16 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/Lab.svelte
CHANGED
|
@@ -492,9 +492,11 @@
|
|
|
492
492
|
"--font-interface",
|
|
493
493
|
"--font-monospace",
|
|
494
494
|
"--font-text-size",
|
|
495
|
-
"--
|
|
495
|
+
"--density",
|
|
496
|
+
"--ratio",
|
|
496
497
|
"--optical-ratio",
|
|
497
498
|
"--page-padding",
|
|
499
|
+
"--reading-width",
|
|
498
500
|
"--rhythm-block-scale",
|
|
499
501
|
"--radius",
|
|
500
502
|
];
|
|
@@ -554,9 +556,11 @@
|
|
|
554
556
|
"--font-interface",
|
|
555
557
|
"--font-monospace",
|
|
556
558
|
"--font-text-size",
|
|
557
|
-
"--
|
|
559
|
+
"--density",
|
|
560
|
+
"--ratio",
|
|
558
561
|
"--optical-ratio",
|
|
559
562
|
"--page-padding",
|
|
563
|
+
"--reading-width",
|
|
560
564
|
"--rhythm-block-scale",
|
|
561
565
|
"--radius",
|
|
562
566
|
];
|
|
@@ -986,10 +990,12 @@
|
|
|
986
990
|
"--font-monospace",
|
|
987
991
|
"--font-text-size",
|
|
988
992
|
"--font-size",
|
|
989
|
-
"--
|
|
993
|
+
"--density",
|
|
994
|
+
"--ratio",
|
|
990
995
|
"--line-height",
|
|
991
996
|
"--optical-ratio",
|
|
992
997
|
"--page-padding",
|
|
998
|
+
"--reading-width",
|
|
993
999
|
"--rhythm-block-scale",
|
|
994
1000
|
"--rhythm-gap-new-line",
|
|
995
1001
|
"--radius",
|
|
@@ -1156,11 +1162,13 @@
|
|
|
1156
1162
|
|
|
1157
1163
|
function onLineHeightInput(e) {
|
|
1158
1164
|
lineHeight = parseFloat(e.target.value);
|
|
1159
|
-
writeVar("--
|
|
1165
|
+
writeVar("--density", String(lineHeight));
|
|
1166
|
+
writeVar("--line-height", String(lineHeight));
|
|
1160
1167
|
}
|
|
1161
1168
|
|
|
1162
1169
|
function onRatioInput(e) {
|
|
1163
1170
|
ratio = parseFloat(e.target.value);
|
|
1171
|
+
writeVar("--ratio", String(ratio));
|
|
1164
1172
|
writeVar("--optical-ratio", String(ratio));
|
|
1165
1173
|
}
|
|
1166
1174
|
|
|
@@ -1754,11 +1762,11 @@
|
|
|
1754
1762
|
</div>
|
|
1755
1763
|
<div class="lab-field">
|
|
1756
1764
|
<label class="lab-field-label" for="lab-line-height"
|
|
1757
|
-
>
|
|
1765
|
+
>Density</label
|
|
1758
1766
|
>
|
|
1759
1767
|
<div class="lab-slider-wrapper">
|
|
1760
1768
|
<input
|
|
1761
|
-
id="lab-line-height" title="--
|
|
1769
|
+
id="lab-line-height" title="--density: sets vertical cadence and line-height (1.35 to 1.75)"
|
|
1762
1770
|
type="range"
|
|
1763
1771
|
class="lab-range"
|
|
1764
1772
|
value={lineHeight}
|
|
@@ -1772,11 +1780,11 @@
|
|
|
1772
1780
|
</div>
|
|
1773
1781
|
<div class="lab-field">
|
|
1774
1782
|
<label class="lab-field-label" for="lab-ratio"
|
|
1775
|
-
>
|
|
1783
|
+
>Ratio</label
|
|
1776
1784
|
>
|
|
1777
1785
|
<div class="lab-slider-wrapper">
|
|
1778
1786
|
<input
|
|
1779
|
-
id="lab-ratio"
|
|
1787
|
+
id="lab-ratio" title="--ratio: modular scale factor"
|
|
1780
1788
|
type="range"
|
|
1781
1789
|
class="lab-range"
|
|
1782
1790
|
value={ratio}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stnd/lab",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"svelte": "./Lab.svelte",
|
|
6
6
|
"author": "Francis Fontaine",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"bezier-easing": "^3.0.1",
|
|
18
18
|
"svelte": "5.57.2",
|
|
19
|
-
"@stnd/ui": "0.16.
|
|
19
|
+
"@stnd/ui": "0.16.2"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"astro": ">=5.0.0"
|