@zag-js/utils
Advanced tools
Comparing version
@@ -99,3 +99,7 @@ declare function toArray<T>(v: T | T[] | undefined | null): T[]; | ||
declare function setRafInterval(callback: () => void, interval: number): () => void; | ||
interface RafIntervalOptions { | ||
startMs: number; | ||
deltaMs: number; | ||
} | ||
declare function setRafInterval(callback: (options: RafIntervalOptions) => void, interval: number): () => void; | ||
declare function setRafTimeout(callback: () => void, delay: number): () => void; | ||
@@ -111,2 +115,2 @@ | ||
export { type IndexOptions, type MaybeFunction, type Nullable, add, addOrRemove, callAll, cast, chunk, clampPercent, clampValue, clear, compact, createSplitProps, decrementValue, ensure, ensureProps, first, flatArray, fromLength, getClosestValue, getClosestValueIndex, getMaxValueAtIndex, getMinValueAtIndex, getNextStepValue, getPercentValue, getPreviousStepValue, getValuePercent, getValueRanges, getValueSetterAtIndex, getValueTransformer, has, hasProp, identity, incrementValue, insertAt, invariant, isArray, isBoolean, isDev, isEmpty, isEqual, isFunction, isNaN, isNull, isNumber, isObject, isObjectLike, isPlainObject, isString, isValueAtMax, isValueAtMin, isValueWithinRange, json, last, match, mod, nan, next, nextIndex, noop, omit, pick, prev, prevIndex, remove, removeAt, roundToDpr, roundToStepPrecision, roundValue, runIfFn, setRafInterval, setRafTimeout, setValueAtIndex, snapValueToStep, splitProps, throttle, toArray, toFixedNumber, tryCatch, uniq, uuid, warn, wrap }; | ||
export { type IndexOptions, type MaybeFunction, type Nullable, type RafIntervalOptions, add, addOrRemove, callAll, cast, chunk, clampPercent, clampValue, clear, compact, createSplitProps, decrementValue, ensure, ensureProps, first, flatArray, fromLength, getClosestValue, getClosestValueIndex, getMaxValueAtIndex, getMinValueAtIndex, getNextStepValue, getPercentValue, getPreviousStepValue, getValuePercent, getValueRanges, getValueSetterAtIndex, getValueTransformer, has, hasProp, identity, incrementValue, insertAt, invariant, isArray, isBoolean, isDev, isEmpty, isEqual, isFunction, isNaN, isNull, isNumber, isObject, isObjectLike, isPlainObject, isString, isValueAtMax, isValueAtMin, isValueWithinRange, json, last, match, mod, nan, next, nextIndex, noop, omit, pick, prev, prevIndex, remove, removeAt, roundToDpr, roundToStepPrecision, roundValue, runIfFn, setRafInterval, setRafTimeout, setValueAtIndex, snapValueToStep, splitProps, throttle, toArray, toFixedNumber, tryCatch, uniq, uuid, warn, wrap }; |
@@ -358,3 +358,3 @@ 'use strict'; | ||
start = now - delta % interval; | ||
callback(); | ||
callback({ startMs: start, deltaMs: delta }); | ||
} | ||
@@ -361,0 +361,0 @@ } |
{ | ||
"name": "@zag-js/utils", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
44953
0.72%982
0.41%