@flighthq/easing 0.2.1-next.841.373388f → 0.3.0-edge.1516.1b4fb2b

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.
Files changed (55) hide show
  1. package/dist/contract.d.ts +21 -0
  2. package/dist/contract.d.ts.map +1 -0
  3. package/dist/contract.js +21 -0
  4. package/dist/contract.js.map +1 -0
  5. package/dist/createEasingSamples.d.ts +1 -1
  6. package/dist/createEasingSamples.d.ts.map +1 -1
  7. package/dist/easeBack.d.ts +1 -1
  8. package/dist/easeBack.d.ts.map +1 -1
  9. package/dist/easeBounce.d.ts +1 -1
  10. package/dist/easeBounce.d.ts.map +1 -1
  11. package/dist/easeCircular.d.ts +1 -1
  12. package/dist/easeCircular.d.ts.map +1 -1
  13. package/dist/easeCombinators.d.ts +1 -1
  14. package/dist/easeCombinators.d.ts.map +1 -1
  15. package/dist/easeCubic.d.ts +1 -1
  16. package/dist/easeCubic.d.ts.map +1 -1
  17. package/dist/easeCubicBezier.d.ts +1 -1
  18. package/dist/easeCubicBezier.d.ts.map +1 -1
  19. package/dist/easeElastic.d.ts +1 -1
  20. package/dist/easeElastic.d.ts.map +1 -1
  21. package/dist/easeExponential.d.ts +1 -1
  22. package/dist/easeExponential.d.ts.map +1 -1
  23. package/dist/easeLinear.d.ts +1 -1
  24. package/dist/easeLinear.d.ts.map +1 -1
  25. package/dist/easePiecewise.d.ts +1 -1
  26. package/dist/easePiecewise.d.ts.map +1 -1
  27. package/dist/easePower.d.ts +1 -1
  28. package/dist/easePower.d.ts.map +1 -1
  29. package/dist/easeQuadratic.d.ts +1 -1
  30. package/dist/easeQuadratic.d.ts.map +1 -1
  31. package/dist/easeQuartic.d.ts +1 -1
  32. package/dist/easeQuartic.d.ts.map +1 -1
  33. package/dist/easeQuintic.d.ts +1 -1
  34. package/dist/easeQuintic.d.ts.map +1 -1
  35. package/dist/easeSine.d.ts +1 -1
  36. package/dist/easeSine.d.ts.map +1 -1
  37. package/dist/easeSmoothstep.d.ts +1 -1
  38. package/dist/easeSmoothstep.d.ts.map +1 -1
  39. package/dist/easeSteps.d.ts +2 -1
  40. package/dist/easeSteps.d.ts.map +1 -1
  41. package/dist/easeSteps.js +15 -4
  42. package/dist/easeSteps.js.map +1 -1
  43. package/dist/enableEasingGuards.d.ts +3 -0
  44. package/dist/enableEasingGuards.d.ts.map +1 -0
  45. package/dist/enableEasingGuards.js +25 -0
  46. package/dist/enableEasingGuards.js.map +1 -0
  47. package/dist/getEasingDerivative.d.ts +1 -1
  48. package/dist/getEasingDerivative.d.ts.map +1 -1
  49. package/dist/index.d.ts +1 -19
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +1 -19
  52. package/dist/index.js.map +1 -1
  53. package/package.json +7 -2
  54. package/src/easeSteps.test.ts +33 -1
  55. package/src/enableEasingGuards.test.ts +70 -0
@@ -0,0 +1,21 @@
1
+ export * from './createEasingSamples';
2
+ export * from './easeBack';
3
+ export * from './enableEasingGuards';
4
+ export * from './easeBounce';
5
+ export * from './easeCircular';
6
+ export * from './easeCombinators';
7
+ export * from './easeCubic';
8
+ export * from './easeCubicBezier';
9
+ export * from './easeElastic';
10
+ export * from './easeExponential';
11
+ export * from './easeLinear';
12
+ export * from './easePiecewise';
13
+ export * from './easePower';
14
+ export * from './easeQuadratic';
15
+ export * from './easeQuartic';
16
+ export * from './easeQuintic';
17
+ export * from './easeSine';
18
+ export * from './easeSmoothstep';
19
+ export * from './easeSteps';
20
+ export * from './getEasingDerivative';
21
+ //# sourceMappingURL=contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,21 @@
1
+ export * from './createEasingSamples';
2
+ export * from './easeBack';
3
+ export * from './enableEasingGuards';
4
+ export * from './easeBounce';
5
+ export * from './easeCircular';
6
+ export * from './easeCombinators';
7
+ export * from './easeCubic';
8
+ export * from './easeCubicBezier';
9
+ export * from './easeElastic';
10
+ export * from './easeExponential';
11
+ export * from './easeLinear';
12
+ export * from './easePiecewise';
13
+ export * from './easePower';
14
+ export * from './easeQuadratic';
15
+ export * from './easeQuartic';
16
+ export * from './easeQuintic';
17
+ export * from './easeSine';
18
+ export * from './easeSmoothstep';
19
+ export * from './easeSteps';
20
+ export * from './getEasingDerivative';
21
+ //# sourceMappingURL=contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare function createEasingSamples(ease: EasingFunction, count: number, out?: Float32Array): Float32Array;
3
3
  //# sourceMappingURL=createEasingSamples.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createEasingSamples.d.ts","sourceRoot":"","sources":["../src/createEasingSamples.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAgBtD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,YAAY,GAAG,YAAY,CAoBzG"}
1
+ {"version":3,"file":"createEasingSamples.d.ts","sourceRoot":"","sources":["../src/createEasingSamples.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAgB/D,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,YAAY,GAAG,YAAY,CAoBzG"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare const easeInBack: EasingFunction;
3
3
  export declare const easeInOutBack: EasingFunction;
4
4
  export declare const easeOutBack: EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easeBack.d.ts","sourceRoot":"","sources":["../src/easeBack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,UAAU,EAAE,cAAiD,CAAC;AAE3E,eAAO,MAAM,aAAa,EAAE,cACyE,CAAC;AAEtG,eAAO,MAAM,WAAW,EAAE,cAA4D,CAAC"}
1
+ {"version":3,"file":"easeBack.d.ts","sourceRoot":"","sources":["../src/easeBack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,UAAU,EAAE,cAAiD,CAAC;AAE3E,eAAO,MAAM,aAAa,EAAE,cACyE,CAAC;AAEtG,eAAO,MAAM,WAAW,EAAE,cAA4D,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare const easeInBounce: EasingFunction;
3
3
  export declare const easeInOutBounce: EasingFunction;
4
4
  export declare const easeOutBounce: EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easeBounce.d.ts","sourceRoot":"","sources":["../src/easeBounce.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,YAAY,EAAE,cAA4C,CAAC;AAExE,eAAO,MAAM,eAAe,EAAE,cAC6C,CAAC;AAE5E,eAAO,MAAM,aAAa,EAAE,cAAoC,CAAC"}
1
+ {"version":3,"file":"easeBounce.d.ts","sourceRoot":"","sources":["../src/easeBounce.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,YAAY,EAAE,cAA4C,CAAC;AAExE,eAAO,MAAM,eAAe,EAAE,cAC6C,CAAC;AAE5E,eAAO,MAAM,aAAa,EAAE,cAAoC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare const easeInCircular: EasingFunction;
3
3
  export declare const easeInOutCircular: EasingFunction;
4
4
  export declare const easeOutCircular: EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easeCircular.d.ts","sourceRoot":"","sources":["../src/easeCircular.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,cAAc,EAAE,cAAgD,CAAC;AAE9E,eAAO,MAAM,iBAAiB,EAAE,cAC2D,CAAC;AAE5F,eAAO,MAAM,eAAe,EAAE,cAAwD,CAAC"}
1
+ {"version":3,"file":"easeCircular.d.ts","sourceRoot":"","sources":["../src/easeCircular.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,cAAc,EAAE,cAAgD,CAAC;AAE9E,eAAO,MAAM,iBAAiB,EAAE,cAC2D,CAAC;AAE5F,eAAO,MAAM,eAAe,EAAE,cAAwD,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare function easeClamp(ease: EasingFunction): EasingFunction;
3
3
  export declare function easeClampOutput(ease: EasingFunction, min: number, max: number): EasingFunction;
4
4
  export declare function easeInvert(ease: EasingFunction): EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easeCombinators.d.ts","sourceRoot":"","sources":["../src/easeCombinators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAetD,wBAAgB,SAAS,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc,CAE9D;AAKD,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,cAAc,CAK9F;AAKD,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc,CAE/D;AAMD,wBAAgB,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAKjE;AAID,wBAAgB,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAElE;AAKD,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,CAExG"}
1
+ {"version":3,"file":"easeCombinators.d.ts","sourceRoot":"","sources":["../src/easeCombinators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAe/D,wBAAgB,SAAS,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc,CAE9D;AAKD,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,cAAc,CAK9F;AAKD,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc,CAE/D;AAMD,wBAAgB,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAKjE;AAID,wBAAgB,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAElE;AAKD,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,CAExG"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare const easeInCubic: EasingFunction;
3
3
  export declare const easeInOutCubic: EasingFunction;
4
4
  export declare const easeOutCubic: EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easeCubic.d.ts","sourceRoot":"","sources":["../src/easeCubic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,WAAW,EAAE,cAAiC,CAAC;AAE5D,eAAO,MAAM,cAAc,EAAE,cAAmF,CAAC;AAEjH,eAAO,MAAM,YAAY,EAAE,cAA8C,CAAC"}
1
+ {"version":3,"file":"easeCubic.d.ts","sourceRoot":"","sources":["../src/easeCubic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,WAAW,EAAE,cAAiC,CAAC;AAE5D,eAAO,MAAM,cAAc,EAAE,cAAmF,CAAC;AAEjH,eAAO,MAAM,YAAY,EAAE,cAA8C,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare function easeCubicBezier(x1: number, y1: number, x2: number, y2: number): EasingFunction;
3
3
  //# sourceMappingURL=easeCubicBezier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"easeCubicBezier.d.ts","sourceRoot":"","sources":["../src/easeCubicBezier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQtD,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,cAAc,CA8D9F"}
1
+ {"version":3,"file":"easeCubicBezier.d.ts","sourceRoot":"","sources":["../src/easeCubicBezier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQ/D,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,cAAc,CA8D9F"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare const easeInElastic: EasingFunction;
3
3
  export declare const easeInOutElastic: EasingFunction;
4
4
  export declare const easeOutElastic: EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easeElastic.d.ts","sourceRoot":"","sources":["../src/easeElastic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,aAAa,EAAE,cAG3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,cAI9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cAG5B,CAAC"}
1
+ {"version":3,"file":"easeElastic.d.ts","sourceRoot":"","sources":["../src/easeElastic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,aAAa,EAAE,cAG3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,cAI9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cAG5B,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare const easeInExponential: EasingFunction;
3
3
  export declare const easeInOutExponential: EasingFunction;
4
4
  export declare const easeOutExponential: EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easeExponential.d.ts","sourceRoot":"","sources":["../src/easeExponential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,iBAAiB,EAAE,cAAgE,CAAC;AAEjG,eAAO,MAAM,oBAAoB,EAAE,cAGlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAAgE,CAAC"}
1
+ {"version":3,"file":"easeExponential.d.ts","sourceRoot":"","sources":["../src/easeExponential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,iBAAiB,EAAE,cAAgE,CAAC;AAEjG,eAAO,MAAM,oBAAoB,EAAE,cAGlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAAgE,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare const easeLinear: EasingFunction;
3
3
  //# sourceMappingURL=easeLinear.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"easeLinear.d.ts","sourceRoot":"","sources":["../src/easeLinear.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,UAAU,EAAE,cAAyB,CAAC"}
1
+ {"version":3,"file":"easeLinear.d.ts","sourceRoot":"","sources":["../src/easeLinear.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,UAAU,EAAE,cAAyB,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { EasingFunction, EasingSegment } from '@flighthq/types';
1
+ import type { EasingFunction, EasingSegment } from '@flighthq/types/contract';
2
2
  export declare function easePiecewise(segments: Readonly<ReadonlyArray<Readonly<EasingSegment>>>): EasingFunction;
3
3
  //# sourceMappingURL=easePiecewise.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"easePiecewise.d.ts","sourceRoot":"","sources":["../src/easePiecewise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAYrE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAoCxG"}
1
+ {"version":3,"file":"easePiecewise.d.ts","sourceRoot":"","sources":["../src/easePiecewise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAY9E,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAoCxG"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare function easeInOutPower(exponent: number): EasingFunction;
3
3
  export declare function easeInPower(exponent: number): EasingFunction;
4
4
  export declare function easeOutPower(exponent: number): EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easePower.d.ts","sourceRoot":"","sources":["../src/easePower.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKtD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAK/D;AAMD,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAE5D;AAKD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAE7D"}
1
+ {"version":3,"file":"easePower.d.ts","sourceRoot":"","sources":["../src/easePower.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAK/D,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAK/D;AAMD,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAE5D;AAKD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAE7D"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare const easeInOutQuadratic: EasingFunction;
3
3
  export declare const easeInQuadratic: EasingFunction;
4
4
  export declare const easeOutQuadratic: EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easeQuadratic.d.ts","sourceRoot":"","sources":["../src/easeQuadratic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,kBAAkB,EAAE,cAA+E,CAAC;AAEjH,eAAO,MAAM,eAAe,EAAE,cAA6B,CAAC;AAE5D,eAAO,MAAM,gBAAgB,EAAE,cAAmC,CAAC"}
1
+ {"version":3,"file":"easeQuadratic.d.ts","sourceRoot":"","sources":["../src/easeQuadratic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,kBAAkB,EAAE,cAA+E,CAAC;AAEjH,eAAO,MAAM,eAAe,EAAE,cAA6B,CAAC;AAE5D,eAAO,MAAM,gBAAgB,EAAE,cAAmC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare const easeInOutQuartic: EasingFunction;
3
3
  export declare const easeInQuartic: EasingFunction;
4
4
  export declare const easeOutQuartic: EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easeQuartic.d.ts","sourceRoot":"","sources":["../src/easeQuartic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,cAAuF,CAAC;AAEvH,eAAO,MAAM,aAAa,EAAE,cAAqC,CAAC;AAElE,eAAO,MAAM,cAAc,EAAE,cAA8C,CAAC"}
1
+ {"version":3,"file":"easeQuartic.d.ts","sourceRoot":"","sources":["../src/easeQuartic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,gBAAgB,EAAE,cAAuF,CAAC;AAEvH,eAAO,MAAM,aAAa,EAAE,cAAqC,CAAC;AAElE,eAAO,MAAM,cAAc,EAAE,cAA8C,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare const easeInOutQuintic: EasingFunction;
3
3
  export declare const easeInQuintic: EasingFunction;
4
4
  export declare const easeOutQuintic: EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easeQuintic.d.ts","sourceRoot":"","sources":["../src/easeQuintic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,cACqC,CAAC;AAErE,eAAO,MAAM,aAAa,EAAE,cAAyC,CAAC;AAEtE,eAAO,MAAM,cAAc,EAAE,cAA8C,CAAC"}
1
+ {"version":3,"file":"easeQuintic.d.ts","sourceRoot":"","sources":["../src/easeQuintic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,gBAAgB,EAAE,cACqC,CAAC;AAErE,eAAO,MAAM,aAAa,EAAE,cAAyC,CAAC;AAEtE,eAAO,MAAM,cAAc,EAAE,cAA8C,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare const easeInOutSine: EasingFunction;
3
3
  export declare const easeInSine: EasingFunction;
4
4
  export declare const easeOutSine: EasingFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"easeSine.d.ts","sourceRoot":"","sources":["../src/easeSine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,aAAa,EAAE,cAAwD,CAAC;AAErF,eAAO,MAAM,UAAU,EAAE,cAAuD,CAAC;AAEjF,eAAO,MAAM,WAAW,EAAE,cAAmD,CAAC"}
1
+ {"version":3,"file":"easeSine.d.ts","sourceRoot":"","sources":["../src/easeSine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,aAAa,EAAE,cAAwD,CAAC;AAErF,eAAO,MAAM,UAAU,EAAE,cAAuD,CAAC;AAEjF,eAAO,MAAM,WAAW,EAAE,cAAmD,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { EasingFunction, ScalarRemap } from '@flighthq/types';
1
+ import type { EasingFunction, ScalarRemap } from '@flighthq/types/contract';
2
2
  export declare const easeSmootherstep: EasingFunction;
3
3
  export declare const easeSmoothstep: EasingFunction;
4
4
  export declare function easeSmoothstepRange(edge0: number, edge1: number): ScalarRemap;
@@ -1 +1 @@
1
- {"version":3,"file":"easeSmoothstep.d.ts","sourceRoot":"","sources":["../src/easeSmoothstep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAKnE,eAAO,MAAM,gBAAgB,EAAE,cAA2D,CAAC;AAG3F,eAAO,MAAM,cAAc,EAAE,cAA2C,CAAC;AAMzE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAK7E"}
1
+ {"version":3,"file":"easeSmoothstep.d.ts","sourceRoot":"","sources":["../src/easeSmoothstep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5E,eAAO,MAAM,gBAAgB,EAAE,cAA2D,CAAC;AAG3F,eAAO,MAAM,cAAc,EAAE,cAA2C,CAAC;AAMzE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAK7E"}
@@ -1,3 +1,4 @@
1
- import type { EasingFunction, StepPosition } from '@flighthq/types';
1
+ import type { EasingFunction, EasingStepsGuard, StepPosition } from '@flighthq/types/contract';
2
2
  export declare function easeSteps(count: number, position?: StepPosition): EasingFunction;
3
+ export declare function setEasingStepsGuard(guard: EasingStepsGuard | null): void;
3
4
  //# sourceMappingURL=easeSteps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"easeSteps.d.ts","sourceRoot":"","sources":["../src/easeSteps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAcpE,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,GAAE,YAAwB,GAAG,cAAc,CAc3F"}
1
+ {"version":3,"file":"easeSteps.d.ts","sourceRoot":"","sources":["../src/easeSteps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAe/F,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,GAAE,YAAwB,GAAG,cAAc,CAe3F;AAMD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAExE"}
package/dist/easeSteps.js CHANGED
@@ -6,11 +6,14 @@
6
6
  // jumpBoth - jump at both edges; count+1 levels from 0 to 1 inclusive.
7
7
  // Follows the CSS Easing Level 1 step algorithm.
8
8
  //
9
- // Sharp edge: easeSteps(1, 'jumpNone') has jumps = count - 1 = 0, so the returned
10
- // function divides by zero and yields NaN. This mirrors the CSS spec, which forbids
11
- // steps(1, jump-none) for the same reason. Callers must pass count >= 2 with
12
- // 'jumpNone'; every other position is well-defined for count >= 1.
9
+ // Sharp edge: easeSteps(1, 'jumpNone') has jumps = count - 1 = 0, so the returned function divides by
10
+ // zero and yields NaN for every input. This mirrors the CSS spec, which forbids steps(1, jump-none) for
11
+ // the same reason; `count >= 2` is required with 'jumpNone', while every other position is well-defined
12
+ // for count >= 1. The failure is SILENT — NaN propagates into whatever the easing drives — so the
13
+ // degenerate call routes through the guard seam below, which enableEasingGuards turns into a warning.
13
14
  export function easeSteps(count, position = 'jumpEnd') {
15
+ if (position === 'jumpNone' && count < 2)
16
+ _stepsGuard?.(count, position);
14
17
  const jumps = position === 'jumpNone' ? count - 1 : position === 'jumpBoth' ? count + 1 : count;
15
18
  const startOffset = position === 'jumpStart' || position === 'jumpBoth' ? 1 : 0;
16
19
  return (t) => {
@@ -24,4 +27,12 @@ export function easeSteps(count, position = 'jumpEnd') {
24
27
  return step / jumps;
25
28
  };
26
29
  }
30
+ // The diagnostics seam for the degenerate `easeSteps` call, not the caller-facing entry point — use
31
+ // `enableEasingGuards`, which installs the @flighthq/log reporter through here. Null uninstalls it, and a
32
+ // null slot is what production sees: the check above is one comparison and the message text plus the
33
+ // @flighthq/log dependency live only in the separately-imported guard module.
34
+ export function setEasingStepsGuard(guard) {
35
+ _stepsGuard = guard;
36
+ }
37
+ let _stepsGuard = null;
27
38
  //# sourceMappingURL=easeSteps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"easeSteps.js","sourceRoot":"","sources":["../src/easeSteps.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,gEAAgE;AAChE,yEAAyE;AACzE,+EAA+E;AAC/E,uFAAuF;AACvF,0EAA0E;AAC1E,iDAAiD;AACjD,EAAE;AACF,kFAAkF;AAClF,oFAAoF;AACpF,6EAA6E;AAC7E,mEAAmE;AACnE,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,WAAyB,SAAS;IACzE,MAAM,KAAK,GAAG,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAChG,MAAM,WAAW,GAAG,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhF,OAAO,CAAC,CAAC,EAAE,EAAE;QACX,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC;QAC/C,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;YACvB,IAAI,GAAG,CAAC,CAAC;QACX,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;YAC3B,IAAI,GAAG,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,GAAG,KAAK,CAAC;IACtB,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"easeSteps.js","sourceRoot":"","sources":["../src/easeSteps.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,gEAAgE;AAChE,yEAAyE;AACzE,+EAA+E;AAC/E,uFAAuF;AACvF,0EAA0E;AAC1E,iDAAiD;AACjD,EAAE;AACF,sGAAsG;AACtG,wGAAwG;AACxG,wGAAwG;AACxG,kGAAkG;AAClG,sGAAsG;AACtG,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,WAAyB,SAAS;IACzE,IAAI,QAAQ,KAAK,UAAU,IAAI,KAAK,GAAG,CAAC;QAAE,WAAW,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACzE,MAAM,KAAK,GAAG,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAChG,MAAM,WAAW,GAAG,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhF,OAAO,CAAC,CAAC,EAAE,EAAE;QACX,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC;QAC/C,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;YACvB,IAAI,GAAG,CAAC,CAAC;QACX,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;YAC3B,IAAI,GAAG,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,GAAG,KAAK,CAAC;IACtB,CAAC,CAAC;AACJ,CAAC;AAED,oGAAoG;AACpG,0GAA0G;AAC1G,qGAAqG;AACrG,8EAA8E;AAC9E,MAAM,UAAU,mBAAmB,CAAC,KAA8B;IAChE,WAAW,GAAG,KAAK,CAAC;AACtB,CAAC;AAED,IAAI,WAAW,GAA4B,IAAI,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function disableEasingGuards(): void;
2
+ export declare function enableEasingGuards(): void;
3
+ //# sourceMappingURL=enableEasingGuards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enableEasingGuards.d.ts","sourceRoot":"","sources":["../src/enableEasingGuards.ts"],"names":[],"mappings":"AAOA,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAWD,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
@@ -0,0 +1,25 @@
1
+ import { logOnce } from '@flighthq/log/contract';
2
+ import { LogLevel } from '@flighthq/types/contract';
3
+ import { setEasingStepsGuard } from './easeSteps';
4
+ // Uninstalls the guard installed by enableEasingGuards.
5
+ export function disableEasingGuards() {
6
+ setEasingStepsGuard(null);
7
+ }
8
+ // Installs the caller-facing easing guard (opt-in, dev-only). This package has one silent footgun:
9
+ // `easeSteps(count, 'jumpNone')` with `count < 2` leaves zero jumps, so the returned function divides by
10
+ // zero and hands back NaN for every input. Nothing throws and nothing logs — the NaN just propagates into
11
+ // whatever the easing drives, which is why a comment telling callers "pass count >= 2" was not enough.
12
+ //
13
+ // @flighthq/easing is a CORE package, and core may otherwise depend only on types/core. This module is the
14
+ // sanctioned exception: it is separately importable and shakeable, so a build that never imports it never
15
+ // pulls @flighthq/log, and the layer rule's actual concern — feature weight in core's always-loaded graph —
16
+ // does not arise. `packages:check` enforces that the import appears in guard modules only. Idempotent.
17
+ export function enableEasingGuards() {
18
+ setEasingStepsGuard(warnOnDegenerateSteps);
19
+ }
20
+ function warnOnDegenerateSteps(count, position) {
21
+ logOnce('easing:degenerate-steps', LogLevel.Warn, {
22
+ message: `easeSteps(${count}, '${position}'): '${position}' has count - 1 jumps, so it needs count >= 2. With ${count} there are no jumps, the easing divides by zero, and every input returns NaN. Pass count >= 2, or use a position that jumps at an edge ('jumpEnd', 'jumpStart', 'jumpBoth') — those are defined for count >= 1.`,
23
+ }, 'easing');
24
+ }
25
+ //# sourceMappingURL=enableEasingGuards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enableEasingGuards.js","sourceRoot":"","sources":["../src/enableEasingGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,wDAAwD;AACxD,MAAM,UAAU,mBAAmB;IACjC,mBAAmB,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,mGAAmG;AACnG,yGAAyG;AACzG,0GAA0G;AAC1G,uGAAuG;AACvG,EAAE;AACF,2GAA2G;AAC3G,0GAA0G;AAC1G,4GAA4G;AAC5G,uGAAuG;AACvG,MAAM,UAAU,kBAAkB;IAChC,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAa,EAAE,QAAsB;IAClE,OAAO,CACL,yBAAyB,EACzB,QAAQ,CAAC,IAAI,EACb;QACE,OAAO,EAAE,aAAa,KAAK,MAAM,QAAQ,QAAQ,QAAQ,uDAAuD,KAAK,iNAAiN;KACvU,EACD,QAAQ,CACT,CAAC;AACJ,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { EasingFunction } from '@flighthq/types';
1
+ import type { EasingFunction } from '@flighthq/types/contract';
2
2
  export declare function getEasingDerivative(ease: EasingFunction, t: number, epsilon?: number): number;
3
3
  //# sourceMappingURL=getEasingDerivative.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getEasingDerivative.d.ts","sourceRoot":"","sources":["../src/getEasingDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AActD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,MAAuB,GAAG,MAAM,CAW7G"}
1
+ {"version":3,"file":"getEasingDerivative.d.ts","sourceRoot":"","sources":["../src/getEasingDerivative.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAc/D,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,MAAuB,GAAG,MAAM,CAW7G"}
package/dist/index.d.ts CHANGED
@@ -1,20 +1,2 @@
1
- export * from './createEasingSamples';
2
- export * from './easeBack';
3
- export * from './easeBounce';
4
- export * from './easeCircular';
5
- export * from './easeCombinators';
6
- export * from './easeCubic';
7
- export * from './easeCubicBezier';
8
- export * from './easeElastic';
9
- export * from './easeExponential';
10
- export * from './easeLinear';
11
- export * from './easePiecewise';
12
- export * from './easePower';
13
- export * from './easeQuadratic';
14
- export * from './easeQuartic';
15
- export * from './easeQuintic';
16
- export * from './easeSine';
17
- export * from './easeSmoothstep';
18
- export * from './easeSteps';
19
- export * from './getEasingDerivative';
1
+ export { createEasingSamples, easeClamp, easeClampOutput, easeCubicBezier, easeInBack, easeInBounce, easeInCircular, easeInCubic, easeInElastic, easeInExponential, easeInOutBack, easeInOutBounce, easeInOutCircular, easeInOutCubic, easeInOutElastic, easeInOutExponential, easeInOutPower, easeInOutQuadratic, easeInOutQuartic, easeInOutQuintic, easeInOutSine, easeInPower, easeInQuadratic, easeInQuartic, easeInQuintic, easeInSine, easeInvert, easeLinear, easeMirror, easeOutBack, easeOutBounce, easeOutCircular, easeOutCubic, easeOutElastic, easeOutExponential, easeOutPower, easeOutQuadratic, easeOutQuartic, easeOutQuintic, easeOutSine, easePiecewise, easeReverse, easeScaleOutput, easeSmootherstep, easeSmoothstep, easeSmoothstepRange, easeSteps, getEasingDerivative, } from './contract';
20
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,eAAe,EACf,eAAe,EACf,UAAU,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,eAAe,EACf,aAAa,EACb,aAAa,EACb,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,SAAS,EACT,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,20 +1,2 @@
1
- export * from './createEasingSamples';
2
- export * from './easeBack';
3
- export * from './easeBounce';
4
- export * from './easeCircular';
5
- export * from './easeCombinators';
6
- export * from './easeCubic';
7
- export * from './easeCubicBezier';
8
- export * from './easeElastic';
9
- export * from './easeExponential';
10
- export * from './easeLinear';
11
- export * from './easePiecewise';
12
- export * from './easePower';
13
- export * from './easeQuadratic';
14
- export * from './easeQuartic';
15
- export * from './easeQuintic';
16
- export * from './easeSine';
17
- export * from './easeSmoothstep';
18
- export * from './easeSteps';
19
- export * from './getEasingDerivative';
1
+ export { createEasingSamples, easeClamp, easeClampOutput, easeCubicBezier, easeInBack, easeInBounce, easeInCircular, easeInCubic, easeInElastic, easeInExponential, easeInOutBack, easeInOutBounce, easeInOutCircular, easeInOutCubic, easeInOutElastic, easeInOutExponential, easeInOutPower, easeInOutQuadratic, easeInOutQuartic, easeInOutQuintic, easeInOutSine, easeInPower, easeInQuadratic, easeInQuartic, easeInQuintic, easeInSine, easeInvert, easeLinear, easeMirror, easeOutBack, easeOutBounce, easeOutCircular, easeOutCubic, easeOutElastic, easeOutExponential, easeOutPower, easeOutQuadratic, easeOutQuartic, easeOutQuintic, easeOutSine, easePiecewise, easeReverse, easeScaleOutput, easeSmootherstep, easeSmoothstep, easeSmoothstepRange, easeSteps, getEasingDerivative, } from './contract';
20
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,eAAe,EACf,eAAe,EACf,UAAU,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,eAAe,EACf,aAAa,EACb,aAAa,EACb,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,SAAS,EACT,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/easing",
3
- "version": "0.2.1-next.841.373388f",
3
+ "version": "0.3.0-edge.1516.1b4fb2b",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/flighthq/flight.git",
@@ -13,6 +13,10 @@
13
13
  ".": {
14
14
  "types": "./dist/index.d.ts",
15
15
  "default": "./dist/index.js"
16
+ },
17
+ "./contract": {
18
+ "types": "./dist/contract.d.ts",
19
+ "default": "./dist/contract.js"
16
20
  }
17
21
  },
18
22
  "files": [
@@ -32,7 +36,8 @@
32
36
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
33
37
  },
34
38
  "dependencies": {
35
- "@flighthq/types": "0.2.1-next.841.373388f"
39
+ "@flighthq/log": "0.3.0-edge.1516.1b4fb2b",
40
+ "@flighthq/types": "0.3.0-edge.1516.1b4fb2b"
36
41
  },
37
42
  "devDependencies": {
38
43
  "typescript": "^5.3.0"
@@ -1,4 +1,6 @@
1
- import { easeSteps } from './easeSteps';
1
+ import type { StepPosition } from '@flighthq/types/contract';
2
+
3
+ import { easeSteps, setEasingStepsGuard } from './easeSteps';
2
4
 
3
5
  describe('easeSteps', () => {
4
6
  it('jumpEnd holds at 0 first and reaches 1 only at t=1', () => {
@@ -63,3 +65,33 @@ describe('easeSteps', () => {
63
65
  }
64
66
  });
65
67
  });
68
+
69
+ describe('setEasingStepsGuard', () => {
70
+ it('reports the degenerate jumpNone call that silently returns NaN', () => {
71
+ const seen: [number, StepPosition][] = [];
72
+ setEasingStepsGuard((count, position) => seen.push([count, position]));
73
+ try {
74
+ // The failure being reported: one step with no edge jump leaves zero jumps to divide by.
75
+ expect(Number.isNaN(easeSteps(1, 'jumpNone')(0.5))).toBe(true);
76
+ } finally {
77
+ setEasingStepsGuard(null);
78
+ }
79
+ expect(seen).toEqual([[1, 'jumpNone']]);
80
+ });
81
+
82
+ it('stays silent for well-defined calls, and once uninstalled', () => {
83
+ const seen: number[] = [];
84
+ setEasingStepsGuard((count) => seen.push(count));
85
+ try {
86
+ easeSteps(2, 'jumpNone')(0.5); // count >= 2 is the documented minimum for jumpNone
87
+ easeSteps(1, 'jumpEnd')(0.5); // edge-jumping positions are defined for count >= 1
88
+ easeSteps(1, 'jumpBoth')(0.5);
89
+ } finally {
90
+ setEasingStepsGuard(null);
91
+ }
92
+ expect(seen).toEqual([]);
93
+ // Uninstalled: the degenerate call still returns NaN, but nothing is reported.
94
+ easeSteps(1, 'jumpNone')(0.5);
95
+ expect(seen).toEqual([]);
96
+ });
97
+ });
@@ -0,0 +1,70 @@
1
+ import { addLogSink, createMemoryLogSink, getMemoryLogSinkEntries, removeLogSink } from '@flighthq/log/contract';
2
+ import type { LogEntry } from '@flighthq/types/contract';
3
+ import { describe, expect, it } from 'vitest';
4
+
5
+ import { easeSteps } from './easeSteps';
6
+ import { disableEasingGuards, enableEasingGuards } from './enableEasingGuards';
7
+
8
+ function captureLog(run: () => void): readonly LogEntry[] {
9
+ const sink = createMemoryLogSink(8);
10
+ addLogSink(sink.sink);
11
+ try {
12
+ run();
13
+ return getMemoryLogSinkEntries(sink);
14
+ } finally {
15
+ removeLogSink(sink.sink);
16
+ }
17
+ }
18
+
19
+ function messageOf(entry: Readonly<LogEntry>): string {
20
+ const data = entry.data;
21
+ return typeof data === 'string' ? data : String(data.message);
22
+ }
23
+
24
+ describe('disableEasingGuards', () => {
25
+ it('uninstalls the guard, returning the degenerate call to silence', () => {
26
+ const entries = captureLog(() => {
27
+ enableEasingGuards();
28
+ disableEasingGuards();
29
+ // Still NaN — disabling removes the reporting, not the sharp edge.
30
+ expect(Number.isNaN(easeSteps(1, 'jumpNone')(0.5))).toBe(true);
31
+ });
32
+ expect(entries.length).toBe(0);
33
+ });
34
+ });
35
+
36
+ describe('enableEasingGuards', () => {
37
+ it('WARNS on the degenerate jumpNone step count that silently returns NaN', () => {
38
+ const entries = captureLog(() => {
39
+ enableEasingGuards();
40
+ try {
41
+ expect(Number.isNaN(easeSteps(1, 'jumpNone')(0.5))).toBe(true);
42
+ } finally {
43
+ disableEasingGuards();
44
+ }
45
+ });
46
+ expect(entries.length).toBe(1);
47
+ expect(messageOf(entries[0])).toContain('count >= 2');
48
+ });
49
+
50
+ it('stays SILENT for well-defined calls, and without the guard at all', () => {
51
+ const guarded = captureLog(() => {
52
+ enableEasingGuards();
53
+ try {
54
+ easeSteps(2, 'jumpNone')(0.5);
55
+ easeSteps(1, 'jumpEnd')(0.5);
56
+ easeSteps(1, 'jumpStart')(0.5);
57
+ easeSteps(1, 'jumpBoth')(0.5);
58
+ } finally {
59
+ disableEasingGuards();
60
+ }
61
+ });
62
+ expect(guarded.length).toBe(0);
63
+
64
+ // Production default: still NaN, but nothing is logged — the guard is opt-in.
65
+ const unguarded = captureLog(() => {
66
+ expect(Number.isNaN(easeSteps(1, 'jumpNone')(0.5))).toBe(true);
67
+ });
68
+ expect(unguarded.length).toBe(0);
69
+ });
70
+ });