@zakisheriff/liquid-glass 0.3.0 → 0.3.2
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/LICENSE +21 -0
- package/README.md +26 -7
- package/dist/index.css +7 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -1100,8 +1100,9 @@ var GlassSheet = ({ open, onClose, intensity = 5, tint, container: container2, d
|
|
|
1100
1100
|
let medium = 0;
|
|
1101
1101
|
const measure = () => {
|
|
1102
1102
|
height = sheet.offsetHeight || 400;
|
|
1103
|
-
|
|
1104
|
-
|
|
1103
|
+
const top = sheet.offsetTop;
|
|
1104
|
+
hidden = layer.clientHeight - top + 24;
|
|
1105
|
+
medium = Math.max(0, layer.clientHeight * 0.5 - top);
|
|
1105
1106
|
stops = wanted.length ? wanted.map((d) => d === "large" ? 0 : medium).sort((x, y) => x - y) : [0];
|
|
1106
1107
|
rest = wanted.includes("medium") ? medium : stops[0];
|
|
1107
1108
|
};
|
|
@@ -2053,7 +2054,7 @@ var GlassSlider = React9.forwardRef(
|
|
|
2053
2054
|
const progress = max > min ? clamp((Number(value) - min) / (max - min), 0, 1) : 0;
|
|
2054
2055
|
useRefraction(
|
|
2055
2056
|
thumbRef,
|
|
2056
|
-
{ kind: "lens", zoom: 1.95, bezel: 7, thickness: 16, strength, dispersion: 0.6 },
|
|
2057
|
+
{ kind: "lens", zoom: 1.95, bezel: 7, thickness: 16, strength, dispersion: 0.6, inset: 11 },
|
|
2057
2058
|
showThumb,
|
|
2058
2059
|
rootRef,
|
|
2059
2060
|
() => parseFloat(rootRef.current?.style.getPropertyValue("--lg-lift") || "0") > 0.01
|