A Framework Unifying Three-Cell-Based Scale-Invariant Exponential and Trigonometric WENO Weighting Functions With Optimal Shape Parameters