made-refine 0.2.1-beta.1 → 0.2.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/dist/utils.mjs CHANGED
@@ -23,6 +23,11 @@ function formatPropertyValue(value) {
23
23
  }
24
24
 
25
25
  // src/utils.ts
26
+ function clamp(value, min, max) {
27
+ if (!Number.isFinite(value)) return min;
28
+ if (max < min) return min;
29
+ return Math.max(min, Math.min(max, value));
30
+ }
26
31
  function getComputedStyles(element) {
27
32
  const computed = window.getComputedStyle(element);
28
33
  return {
@@ -2241,6 +2246,7 @@ export {
2241
2246
  calculateElementMeasurements,
2242
2247
  calculateGuidelineMeasurements,
2243
2248
  calculateParentMeasurements,
2249
+ clamp,
2244
2250
  collapseExportShorthands,
2245
2251
  collapseSpacingShorthands,
2246
2252
  colorPropertyToCSSMap,