rattail 1.0.21 → 1.0.22

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/lib/index.d.cts CHANGED
@@ -130,20 +130,20 @@ interface Motion {
130
130
  }
131
131
  declare function motion(options: MotionOptions): Motion;
132
132
 
133
- declare function duration(): {
134
- value: number;
135
- years: (value: number) => any;
136
- months: (value: number) => any;
137
- weeks: (value: number) => any;
138
- days: (value: number) => any;
139
- hours: (value: number) => any;
140
- minutes: (value: number) => any;
141
- seconds: (value: number) => any;
142
- milliseconds: (value: number) => any;
143
- valueOf: (options?: {
133
+ interface DurationContext {
134
+ years(value: number): this;
135
+ months(value: number): this;
136
+ weeks(value: number): this;
137
+ days(value: number): this;
138
+ hours(value: number): this;
139
+ minutes(value: number): this;
140
+ seconds(value: number): this;
141
+ milliseconds(value: number): this;
142
+ valueOf(options?: {
144
143
  milliseconds: boolean;
145
- }) => number;
146
- };
144
+ }): number;
145
+ }
146
+ declare function duration(): DurationContext;
147
147
 
148
148
  declare function call<P extends any[], R>(fn?: ((...arg: P) => R) | ((...arg: P) => R)[] | null, ...args: P): R | R[] | undefined;
149
149
 
@@ -310,4 +310,4 @@ declare function floor(val: number, precision?: number): number;
310
310
 
311
311
  declare function ceil(val: number, precision?: number): number;
312
312
 
313
- export { type BEM, type ClassName, type Classes, type Motion, type MotionOptions, type MotionState, NOOP, type PromiseWithResolvers, type Storage, assert, at, baseRound, call, camelize, cancelAnimationFrame, ceil, chunk, clamp, clampArrayRange, classes, cloneDeep, cloneDeepWith, copyText, createNamespaceFn, createStorage, debounce, delay, difference, differenceWith, doubleRaf, download, duration, ensurePrefix, ensureSuffix, find, floor, genNumberKey, genStringKey, getAllParentScroller, getGlobalThis, getParentScroller, getRect, getScrollLeft, getScrollTop, getStyle, groupBy, hasOwn, inBrowser, inMobile, inViewport, intersection, intersectionWith, isArray, isArrayBuffer, isBlob, isBoolean, isDOMException, isDataView, isDate, isEmpty, isEmptyPlainObject, isEqual, isEqualWith, isError, isFile, isFunction, isMap, isNonEmptyArray, isNullish, isNumber, isNumeric, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTruthy, isTypedArray, isWeakMap, isWeakSet, isWindow, kebabCase, localStorage, lowerFirst, mapObject, maxBy, mean, meanBy, merge, mergeWith, minBy, motion, normalizeToArray, objectToString, omit, omitBy, once, pascalCase, pick, pickBy, prettyJSONObject, preventDefault, promiseWithResolvers, raf, randomColor, randomNumber, randomString, removeArrayBlank, removeArrayEmpty, removeItem, requestAnimationFrame, round, sample, sessionStorage, shuffle, slash, sum, sumBy, sumHash, supportTouch, throttle, times, toArrayBuffer, toDataURL, toNumber, toRawType, toText, toTypeString, toggleItem, tryParseJSON, uniq, uniqBy, upperFirst, xor, xorWith };
313
+ export { type BEM, type ClassName, type Classes, type DurationContext, type Motion, type MotionOptions, type MotionState, NOOP, type PromiseWithResolvers, type Storage, assert, at, baseRound, call, camelize, cancelAnimationFrame, ceil, chunk, clamp, clampArrayRange, classes, cloneDeep, cloneDeepWith, copyText, createNamespaceFn, createStorage, debounce, delay, difference, differenceWith, doubleRaf, download, duration, ensurePrefix, ensureSuffix, find, floor, genNumberKey, genStringKey, getAllParentScroller, getGlobalThis, getParentScroller, getRect, getScrollLeft, getScrollTop, getStyle, groupBy, hasOwn, inBrowser, inMobile, inViewport, intersection, intersectionWith, isArray, isArrayBuffer, isBlob, isBoolean, isDOMException, isDataView, isDate, isEmpty, isEmptyPlainObject, isEqual, isEqualWith, isError, isFile, isFunction, isMap, isNonEmptyArray, isNullish, isNumber, isNumeric, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTruthy, isTypedArray, isWeakMap, isWeakSet, isWindow, kebabCase, localStorage, lowerFirst, mapObject, maxBy, mean, meanBy, merge, mergeWith, minBy, motion, normalizeToArray, objectToString, omit, omitBy, once, pascalCase, pick, pickBy, prettyJSONObject, preventDefault, promiseWithResolvers, raf, randomColor, randomNumber, randomString, removeArrayBlank, removeArrayEmpty, removeItem, requestAnimationFrame, round, sample, sessionStorage, shuffle, slash, sum, sumBy, sumHash, supportTouch, throttle, times, toArrayBuffer, toDataURL, toNumber, toRawType, toText, toTypeString, toggleItem, tryParseJSON, uniq, uniqBy, upperFirst, xor, xorWith };
package/lib/index.d.ts CHANGED
@@ -130,20 +130,20 @@ interface Motion {
130
130
  }
131
131
  declare function motion(options: MotionOptions): Motion;
132
132
 
133
- declare function duration(): {
134
- value: number;
135
- years: (value: number) => any;
136
- months: (value: number) => any;
137
- weeks: (value: number) => any;
138
- days: (value: number) => any;
139
- hours: (value: number) => any;
140
- minutes: (value: number) => any;
141
- seconds: (value: number) => any;
142
- milliseconds: (value: number) => any;
143
- valueOf: (options?: {
133
+ interface DurationContext {
134
+ years(value: number): this;
135
+ months(value: number): this;
136
+ weeks(value: number): this;
137
+ days(value: number): this;
138
+ hours(value: number): this;
139
+ minutes(value: number): this;
140
+ seconds(value: number): this;
141
+ milliseconds(value: number): this;
142
+ valueOf(options?: {
144
143
  milliseconds: boolean;
145
- }) => number;
146
- };
144
+ }): number;
145
+ }
146
+ declare function duration(): DurationContext;
147
147
 
148
148
  declare function call<P extends any[], R>(fn?: ((...arg: P) => R) | ((...arg: P) => R)[] | null, ...args: P): R | R[] | undefined;
149
149
 
@@ -310,4 +310,4 @@ declare function floor(val: number, precision?: number): number;
310
310
 
311
311
  declare function ceil(val: number, precision?: number): number;
312
312
 
313
- export { type BEM, type ClassName, type Classes, type Motion, type MotionOptions, type MotionState, NOOP, type PromiseWithResolvers, type Storage, assert, at, baseRound, call, camelize, cancelAnimationFrame, ceil, chunk, clamp, clampArrayRange, classes, cloneDeep, cloneDeepWith, copyText, createNamespaceFn, createStorage, debounce, delay, difference, differenceWith, doubleRaf, download, duration, ensurePrefix, ensureSuffix, find, floor, genNumberKey, genStringKey, getAllParentScroller, getGlobalThis, getParentScroller, getRect, getScrollLeft, getScrollTop, getStyle, groupBy, hasOwn, inBrowser, inMobile, inViewport, intersection, intersectionWith, isArray, isArrayBuffer, isBlob, isBoolean, isDOMException, isDataView, isDate, isEmpty, isEmptyPlainObject, isEqual, isEqualWith, isError, isFile, isFunction, isMap, isNonEmptyArray, isNullish, isNumber, isNumeric, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTruthy, isTypedArray, isWeakMap, isWeakSet, isWindow, kebabCase, localStorage, lowerFirst, mapObject, maxBy, mean, meanBy, merge, mergeWith, minBy, motion, normalizeToArray, objectToString, omit, omitBy, once, pascalCase, pick, pickBy, prettyJSONObject, preventDefault, promiseWithResolvers, raf, randomColor, randomNumber, randomString, removeArrayBlank, removeArrayEmpty, removeItem, requestAnimationFrame, round, sample, sessionStorage, shuffle, slash, sum, sumBy, sumHash, supportTouch, throttle, times, toArrayBuffer, toDataURL, toNumber, toRawType, toText, toTypeString, toggleItem, tryParseJSON, uniq, uniqBy, upperFirst, xor, xorWith };
313
+ export { type BEM, type ClassName, type Classes, type DurationContext, type Motion, type MotionOptions, type MotionState, NOOP, type PromiseWithResolvers, type Storage, assert, at, baseRound, call, camelize, cancelAnimationFrame, ceil, chunk, clamp, clampArrayRange, classes, cloneDeep, cloneDeepWith, copyText, createNamespaceFn, createStorage, debounce, delay, difference, differenceWith, doubleRaf, download, duration, ensurePrefix, ensureSuffix, find, floor, genNumberKey, genStringKey, getAllParentScroller, getGlobalThis, getParentScroller, getRect, getScrollLeft, getScrollTop, getStyle, groupBy, hasOwn, inBrowser, inMobile, inViewport, intersection, intersectionWith, isArray, isArrayBuffer, isBlob, isBoolean, isDOMException, isDataView, isDate, isEmpty, isEmptyPlainObject, isEqual, isEqualWith, isError, isFile, isFunction, isMap, isNonEmptyArray, isNullish, isNumber, isNumeric, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTruthy, isTypedArray, isWeakMap, isWeakSet, isWindow, kebabCase, localStorage, lowerFirst, mapObject, maxBy, mean, meanBy, merge, mergeWith, minBy, motion, normalizeToArray, objectToString, omit, omitBy, once, pascalCase, pick, pickBy, prettyJSONObject, preventDefault, promiseWithResolvers, raf, randomColor, randomNumber, randomString, removeArrayBlank, removeArrayEmpty, removeItem, requestAnimationFrame, round, sample, sessionStorage, shuffle, slash, sum, sumBy, sumHash, supportTouch, throttle, times, toArrayBuffer, toDataURL, toNumber, toRawType, toText, toTypeString, toggleItem, tryParseJSON, uniq, uniqBy, upperFirst, xor, xorWith };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rattail",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "A utilities library for front-end developers, lightweight and ts-friendly",
5
5
  "keywords": [
6
6
  "utilities library",