@anoki/fse-ui 2.2.0-4-SNAPSHOT4 → 2.2.0-4-SNAPSHOT5
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/index.cjs276.js +1 -1
- package/dist/index.cjs287.js +1 -1
- package/dist/index.cjs301.js +1 -1
- package/dist/index.cjs306.js +1 -1
- package/dist/index.cjs310.js +1 -1
- package/dist/index.cjs336.js +1 -1
- package/dist/index.cjs386.js +1 -1
- package/dist/index.cjs395.js +1 -1
- package/dist/index.cjs414.js +1 -1
- package/dist/index.cjs415.js +1 -1
- package/dist/index.cjs438.js +1 -1
- package/dist/index.cjs443.js +1 -1
- package/dist/index.cjs471.js +1 -1
- package/dist/index.cjs471.js.map +1 -1
- package/dist/index.cjs472.js +1 -1
- package/dist/index.cjs472.js.map +1 -1
- package/dist/index.cjs475.js +1 -1
- package/dist/index.cjs475.js.map +1 -1
- package/dist/index.cjs481.js +1 -1
- package/dist/index.cjs481.js.map +1 -1
- package/dist/index.cjs482.js +1 -1
- package/dist/index.cjs482.js.map +1 -1
- package/dist/index.cjs483.js +1 -1
- package/dist/index.cjs483.js.map +1 -1
- package/dist/index.cjs484.js +1 -1
- package/dist/index.cjs484.js.map +1 -1
- package/dist/index.cjs485.js +1 -1
- package/dist/index.cjs485.js.map +1 -1
- package/dist/index.cjs486.js +1 -1
- package/dist/index.cjs486.js.map +1 -1
- package/dist/index.cjs487.js +1 -1
- package/dist/index.cjs487.js.map +1 -1
- package/dist/index.cjs488.js +1 -1
- package/dist/index.cjs488.js.map +1 -1
- package/dist/index.cjs489.js +1 -1
- package/dist/index.cjs489.js.map +1 -1
- package/dist/index.cjs490.js +1 -1
- package/dist/index.cjs490.js.map +1 -1
- package/dist/index.cjs491.js +1 -1
- package/dist/index.cjs491.js.map +1 -1
- package/dist/index.cjs492.js +1 -1
- package/dist/index.cjs492.js.map +1 -1
- package/dist/index.cjs493.js +1 -1
- package/dist/index.cjs493.js.map +1 -1
- package/dist/index.cjs494.js +1 -1
- package/dist/index.cjs494.js.map +1 -1
- package/dist/index.cjs495.js +1 -1
- package/dist/index.cjs495.js.map +1 -1
- package/dist/index.cjs496.js +1 -1
- package/dist/index.cjs496.js.map +1 -1
- package/dist/index.cjs497.js +1 -1
- package/dist/index.cjs497.js.map +1 -1
- package/dist/index.cjs498.js +1 -1
- package/dist/index.cjs498.js.map +1 -1
- package/dist/index.cjs499.js +1 -1
- package/dist/index.cjs499.js.map +1 -1
- package/dist/index.cjs500.js +1 -1
- package/dist/index.cjs500.js.map +1 -1
- package/dist/index.cjs501.js +1 -1
- package/dist/index.cjs501.js.map +1 -1
- package/dist/index.cjs502.js +1 -1
- package/dist/index.cjs502.js.map +1 -1
- package/dist/index.cjs503.js +1 -1
- package/dist/index.cjs503.js.map +1 -1
- package/dist/index.cjs504.js +1 -1
- package/dist/index.cjs504.js.map +1 -1
- package/dist/index.cjs505.js +1 -1
- package/dist/index.cjs505.js.map +1 -1
- package/dist/index.cjs506.js +1 -1
- package/dist/index.cjs506.js.map +1 -1
- package/dist/index.cjs507.js +1 -1
- package/dist/index.cjs507.js.map +1 -1
- package/dist/index.cjs508.js +1 -1
- package/dist/index.cjs508.js.map +1 -1
- package/dist/index.cjs509.js +1 -1
- package/dist/index.cjs509.js.map +1 -1
- package/dist/index.cjs51.js +1 -1
- package/dist/index.cjs51.js.map +1 -1
- package/dist/index.cjs510.js +1 -1
- package/dist/index.cjs510.js.map +1 -1
- package/dist/index.cjs511.js +1 -1
- package/dist/index.cjs511.js.map +1 -1
- package/dist/index.cjs512.js +1 -1
- package/dist/index.cjs512.js.map +1 -1
- package/dist/index.cjs513.js +1 -1
- package/dist/index.cjs513.js.map +1 -1
- package/dist/index.cjs514.js +1 -1
- package/dist/index.cjs514.js.map +1 -1
- package/dist/index.cjs515.js +1 -1
- package/dist/index.cjs515.js.map +1 -1
- package/dist/index.cjs516.js +1 -1
- package/dist/index.cjs516.js.map +1 -1
- package/dist/index.cjs517.js +1 -1
- package/dist/index.cjs517.js.map +1 -1
- package/dist/index.cjs518.js +1 -1
- package/dist/index.cjs518.js.map +1 -1
- package/dist/index.cjs519.js +1 -1
- package/dist/index.cjs519.js.map +1 -1
- package/dist/index.cjs520.js +1 -1
- package/dist/index.cjs520.js.map +1 -1
- package/dist/index.cjs521.js +1 -1
- package/dist/index.cjs521.js.map +1 -1
- package/dist/index.cjs522.js +1 -1
- package/dist/index.cjs522.js.map +1 -1
- package/dist/index.cjs523.js +1 -1
- package/dist/index.cjs523.js.map +1 -1
- package/dist/index.cjs524.js +1 -1
- package/dist/index.cjs524.js.map +1 -1
- package/dist/index.cjs525.js +1 -1
- package/dist/index.cjs525.js.map +1 -1
- package/dist/index.cjs535.js +1 -1
- package/dist/index.cjs542.js +1 -1
- package/dist/index.cjs552.js +1 -1
- package/dist/index.cjs555.js +1 -1
- package/dist/index.cjs555.js.map +1 -1
- package/dist/index.cjs556.js +1 -1
- package/dist/index.cjs556.js.map +1 -1
- package/dist/index.cjs557.js +1 -1
- package/dist/index.cjs557.js.map +1 -1
- package/dist/index.cjs558.js +1 -1
- package/dist/index.cjs558.js.map +1 -1
- package/dist/index.cjs559.js +1 -1
- package/dist/index.cjs559.js.map +1 -1
- package/dist/index.cjs560.js +1 -1
- package/dist/index.cjs560.js.map +1 -1
- package/dist/index.cjs561.js +1 -1
- package/dist/index.cjs561.js.map +1 -1
- package/dist/index.cjs562.js +2 -0
- package/dist/index.cjs562.js.map +1 -0
- package/dist/index.cjs563.js +2 -0
- package/dist/index.cjs563.js.map +1 -0
- package/dist/index.cjs564.js +2 -0
- package/dist/index.cjs564.js.map +1 -0
- package/dist/index.cjs565.js +2 -0
- package/dist/index.cjs565.js.map +1 -0
- package/dist/index.cjs566.js +2 -0
- package/dist/index.cjs566.js.map +1 -0
- package/dist/index.cjs567.js +1 -1
- package/dist/index.cjs567.js.map +1 -1
- package/dist/index.cjs568.js +1 -1
- package/dist/index.cjs568.js.map +1 -1
- package/dist/index.cjs572.js +1 -1
- package/dist/index.cjs572.js.map +1 -1
- package/dist/index.cjs573.js +1 -1
- package/dist/index.cjs573.js.map +1 -1
- package/dist/index.cjs574.js +1 -1
- package/dist/index.cjs574.js.map +1 -1
- package/dist/index.cjs575.js +1 -1
- package/dist/index.cjs575.js.map +1 -1
- package/dist/index.cjs576.js +1 -4
- package/dist/index.cjs576.js.map +1 -1
- package/dist/index.cjs577.js +1 -1
- package/dist/index.cjs577.js.map +1 -1
- package/dist/index.cjs578.js +2 -0
- package/dist/index.cjs578.js.map +1 -0
- package/dist/index.cjs579.js +2 -0
- package/dist/index.cjs579.js.map +1 -0
- package/dist/index.cjs580.js +2 -0
- package/dist/index.cjs580.js.map +1 -0
- package/dist/index.cjs581.js +4 -1
- package/dist/index.cjs581.js.map +1 -1
- package/dist/index.cjs582.js +1 -38
- package/dist/index.cjs582.js.map +1 -1
- package/dist/index.cjs586.js +1 -1
- package/dist/index.cjs586.js.map +1 -1
- package/dist/index.cjs587.js +38 -1
- package/dist/index.cjs587.js.map +1 -1
- package/dist/index.cjs588.js +1 -1
- package/dist/index.cjs588.js.map +1 -1
- package/dist/{index.cjs584.js → index.cjs589.js} +1 -1
- package/dist/{index.cjs584.js.map → index.cjs589.js.map} +1 -1
- package/dist/{index.cjs585.js → index.cjs590.js} +1 -1
- package/dist/{index.cjs585.js.map → index.cjs590.js.map} +1 -1
- package/dist/index.cjs592.js +1 -1
- package/dist/index.cjs593.js +1 -1
- package/dist/index.cjs593.js.map +1 -1
- package/dist/index.cjs594.js +1 -1
- package/dist/index.cjs594.js.map +1 -1
- package/dist/index.cjs595.js +1 -1
- package/dist/index.cjs595.js.map +1 -1
- package/dist/index.cjs596.js +1 -1
- package/dist/index.cjs596.js.map +1 -1
- package/dist/index.cjs597.js +2 -0
- package/dist/index.cjs597.js.map +1 -0
- package/dist/index.cjs598.js +2 -0
- package/dist/index.cjs598.js.map +1 -0
- package/dist/index.cjs599.js +2 -0
- package/dist/index.cjs599.js.map +1 -0
- package/dist/index.cjs611.js +2 -0
- package/dist/index.cjs611.js.map +1 -0
- package/dist/index.cjs612.js +1 -1
- package/dist/index.cjs612.js.map +1 -1
- package/dist/index.cjs613.js +1 -1
- package/dist/index.cjs613.js.map +1 -1
- package/dist/index.cjs614.js +1 -1
- package/dist/index.cjs614.js.map +1 -1
- package/dist/index.cjs615.js +1 -1
- package/dist/index.cjs615.js.map +1 -1
- package/dist/index.cjs618.js +2 -0
- package/dist/index.cjs618.js.map +1 -0
- package/dist/index.cjs619.js +1 -1
- package/dist/index.cjs619.js.map +1 -1
- package/dist/index.cjs620.js +1 -1
- package/dist/index.cjs620.js.map +1 -1
- package/dist/index.cjs621.js +1 -1
- package/dist/index.cjs621.js.map +1 -1
- package/dist/index.cjs622.js +1 -1
- package/dist/index.cjs622.js.map +1 -1
- package/dist/index.cjs623.js +1 -1
- package/dist/index.cjs623.js.map +1 -1
- package/dist/index.cjs624.js +1 -1
- package/dist/index.cjs624.js.map +1 -1
- package/dist/index.cjs625.js +1 -1
- package/dist/index.cjs625.js.map +1 -1
- package/dist/index.cjs626.js +2 -0
- package/dist/index.cjs626.js.map +1 -0
- package/dist/index.cjs627.js +1 -1
- package/dist/index.cjs627.js.map +1 -1
- package/dist/index.cjs628.js +1 -1
- package/dist/index.cjs628.js.map +1 -1
- package/dist/index.cjs629.js +1 -1
- package/dist/index.cjs629.js.map +1 -1
- package/dist/index.cjs630.js +1 -1
- package/dist/index.cjs630.js.map +1 -1
- package/dist/index.cjs631.js +1 -1
- package/dist/index.cjs631.js.map +1 -1
- package/dist/index.cjs632.js +1 -1
- package/dist/index.cjs632.js.map +1 -1
- package/dist/index.cjs633.js +1 -1
- package/dist/index.cjs633.js.map +1 -1
- package/dist/index.cjs634.js +1 -1
- package/dist/index.cjs634.js.map +1 -1
- package/dist/index.cjs635.js +1 -1
- package/dist/index.cjs635.js.map +1 -1
- package/dist/index.cjs636.js +1 -1
- package/dist/index.cjs636.js.map +1 -1
- package/dist/index.cjs637.js +1 -1
- package/dist/index.cjs637.js.map +1 -1
- package/dist/index.cjs638.js +1 -1
- package/dist/index.cjs638.js.map +1 -1
- package/dist/index.cjs639.js +1 -1
- package/dist/index.cjs639.js.map +1 -1
- package/dist/index.cjs640.js +1 -1
- package/dist/index.cjs640.js.map +1 -1
- package/dist/index.cjs641.js +1 -1
- package/dist/index.cjs641.js.map +1 -1
- package/dist/index.cjs642.js +1 -1
- package/dist/index.cjs642.js.map +1 -1
- package/dist/index.cjs643.js +1 -1
- package/dist/index.cjs643.js.map +1 -1
- package/dist/index.cjs644.js +1 -1
- package/dist/index.cjs644.js.map +1 -1
- package/dist/index.cjs645.js +1 -1
- package/dist/index.cjs645.js.map +1 -1
- package/dist/index.cjs646.js +1 -1
- package/dist/index.cjs646.js.map +1 -1
- package/dist/index.cjs647.js +1 -1
- package/dist/index.cjs647.js.map +1 -1
- package/dist/index.cjs648.js +1 -1
- package/dist/index.cjs648.js.map +1 -1
- package/dist/index.cjs649.js +1 -1
- package/dist/index.cjs649.js.map +1 -1
- package/dist/index.cjs650.js +1 -1
- package/dist/index.cjs650.js.map +1 -1
- package/dist/index.cjs656.js +5 -1
- package/dist/index.cjs656.js.map +1 -1
- package/dist/index.cjs657.js +1 -1
- package/dist/index.cjs657.js.map +1 -1
- package/dist/index.cjs658.js +1 -1
- package/dist/index.cjs658.js.map +1 -1
- package/dist/index.cjs659.js +1 -1
- package/dist/index.cjs659.js.map +1 -1
- package/dist/index.cjs660.js +1 -1
- package/dist/index.cjs660.js.map +1 -1
- package/dist/index.cjs661.js +1 -1
- package/dist/index.cjs661.js.map +1 -1
- package/dist/index.cjs662.js +1 -1
- package/dist/index.cjs662.js.map +1 -1
- package/dist/index.cjs663.js +1 -1
- package/dist/index.cjs663.js.map +1 -1
- package/dist/index.cjs664.js +1 -1
- package/dist/index.cjs664.js.map +1 -1
- package/dist/index.cjs665.js +1 -1
- package/dist/index.cjs665.js.map +1 -1
- package/dist/index.cjs666.js +1 -1
- package/dist/index.cjs666.js.map +1 -1
- package/dist/index.cjs667.js +1 -1
- package/dist/index.cjs667.js.map +1 -1
- package/dist/index.cjs668.js +1 -1
- package/dist/index.cjs668.js.map +1 -1
- package/dist/index.cjs669.js +2 -0
- package/dist/index.cjs669.js.map +1 -0
- package/dist/index.cjs670.js +1 -1
- package/dist/index.cjs670.js.map +1 -1
- package/dist/index.cjs671.js +1 -1
- package/dist/index.cjs671.js.map +1 -1
- package/dist/index.cjs672.js +1 -1
- package/dist/index.cjs672.js.map +1 -1
- package/dist/index.cjs673.js +2 -0
- package/dist/index.cjs673.js.map +1 -0
- package/dist/index.cjs674.js +2 -0
- package/dist/index.cjs674.js.map +1 -0
- package/dist/index.es276.js +1 -1
- package/dist/index.es287.js +1 -1
- package/dist/index.es301.js +4 -4
- package/dist/index.es306.js +1 -1
- package/dist/index.es310.js +14 -14
- package/dist/index.es336.js +6 -6
- package/dist/index.es386.js +7 -7
- package/dist/index.es395.js +1 -1
- package/dist/index.es414.js +6 -6
- package/dist/index.es415.js +2 -2
- package/dist/index.es438.js +5 -5
- package/dist/index.es443.js +8 -8
- package/dist/index.es471.js +40 -39
- package/dist/index.es471.js.map +1 -1
- package/dist/index.es472.js +15 -7
- package/dist/index.es472.js.map +1 -1
- package/dist/index.es475.js +14 -67
- package/dist/index.es475.js.map +1 -1
- package/dist/index.es481.js +2 -14
- package/dist/index.es481.js.map +1 -1
- package/dist/index.es482.js +5 -5
- package/dist/index.es482.js.map +1 -1
- package/dist/index.es483.js +12 -4
- package/dist/index.es483.js.map +1 -1
- package/dist/index.es484.js +3 -3
- package/dist/index.es484.js.map +1 -1
- package/dist/index.es485.js +3 -3
- package/dist/index.es485.js.map +1 -1
- package/dist/index.es486.js +3 -3
- package/dist/index.es486.js.map +1 -1
- package/dist/index.es487.js +3 -3
- package/dist/index.es487.js.map +1 -1
- package/dist/index.es488.js +3 -3
- package/dist/index.es488.js.map +1 -1
- package/dist/index.es489.js +1 -1
- package/dist/index.es489.js.map +1 -1
- package/dist/index.es490.js +3 -3
- package/dist/index.es490.js.map +1 -1
- package/dist/index.es491.js +3 -3
- package/dist/index.es491.js.map +1 -1
- package/dist/index.es492.js +3 -3
- package/dist/index.es492.js.map +1 -1
- package/dist/index.es493.js +3 -3
- package/dist/index.es493.js.map +1 -1
- package/dist/index.es494.js +3 -3
- package/dist/index.es494.js.map +1 -1
- package/dist/index.es495.js +1 -1
- package/dist/index.es495.js.map +1 -1
- package/dist/index.es496.js +3 -3
- package/dist/index.es496.js.map +1 -1
- package/dist/index.es497.js +4 -8
- package/dist/index.es497.js.map +1 -1
- package/dist/index.es498.js +5 -5
- package/dist/index.es498.js.map +1 -1
- package/dist/index.es499.js +8 -4
- package/dist/index.es499.js.map +1 -1
- package/dist/index.es500.js +3 -3
- package/dist/index.es500.js.map +1 -1
- package/dist/index.es501.js +1 -1
- package/dist/index.es501.js.map +1 -1
- package/dist/index.es502.js +3 -3
- package/dist/index.es502.js.map +1 -1
- package/dist/index.es503.js +5 -10
- package/dist/index.es503.js.map +1 -1
- package/dist/index.es504.js +3 -3
- package/dist/index.es504.js.map +1 -1
- package/dist/index.es505.js +10 -5
- package/dist/index.es505.js.map +1 -1
- package/dist/index.es506.js +3 -3
- package/dist/index.es506.js.map +1 -1
- package/dist/index.es507.js +1 -1
- package/dist/index.es507.js.map +1 -1
- package/dist/index.es508.js +3 -3
- package/dist/index.es508.js.map +1 -1
- package/dist/index.es509.js +3 -3
- package/dist/index.es509.js.map +1 -1
- package/dist/index.es51.js +27 -26
- package/dist/index.es51.js.map +1 -1
- package/dist/index.es510.js +4 -10
- package/dist/index.es510.js.map +1 -1
- package/dist/index.es511.js +3 -3
- package/dist/index.es511.js.map +1 -1
- package/dist/index.es512.js +10 -4
- package/dist/index.es512.js.map +1 -1
- package/dist/index.es513.js +5 -8
- package/dist/index.es513.js.map +1 -1
- package/dist/index.es514.js +4 -15
- package/dist/index.es514.js.map +1 -1
- package/dist/index.es515.js +9 -2
- package/dist/index.es515.js.map +1 -1
- package/dist/index.es516.js +16 -10
- package/dist/index.es516.js.map +1 -1
- package/dist/index.es517.js +10 -51
- package/dist/index.es517.js.map +1 -1
- package/dist/index.es518.js +2 -125
- package/dist/index.es518.js.map +1 -1
- package/dist/index.es519.js +2 -135
- package/dist/index.es519.js.map +1 -1
- package/dist/index.es520.js +2 -14
- package/dist/index.es520.js.map +1 -1
- package/dist/index.es521.js +2 -69
- package/dist/index.es521.js.map +1 -1
- package/dist/index.es522.js +2 -34
- package/dist/index.es522.js.map +1 -1
- package/dist/index.es523.js +2 -15
- package/dist/index.es523.js.map +1 -1
- package/dist/index.es524.js +2 -9
- package/dist/index.es524.js.map +1 -1
- package/dist/index.es525.js +2 -50
- package/dist/index.es525.js.map +1 -1
- package/dist/index.es526.js +2 -2
- package/dist/index.es527.js +2 -2
- package/dist/index.es528.js +2 -2
- package/dist/index.es530.js +2 -2
- package/dist/index.es532.js +2 -2
- package/dist/index.es534.js +2 -2
- package/dist/index.es536.js +2 -2
- package/dist/index.es537.js +2 -2
- package/dist/index.es539.js +2 -2
- package/dist/index.es540.js +2 -2
- package/dist/index.es541.js +2 -2
- package/dist/index.es542.js +2 -2
- package/dist/index.es544.js +2 -2
- package/dist/index.es545.js +2 -2
- package/dist/index.es546.js +2 -2
- package/dist/index.es547.js +2 -2
- package/dist/index.es548.js +2 -2
- package/dist/index.es549.js +2 -2
- package/dist/index.es550.js +2 -2
- package/dist/index.es551.js +2 -2
- package/dist/index.es553.js +2 -2
- package/dist/index.es554.js +2 -2
- package/dist/index.es555.js +68 -2
- package/dist/index.es555.js.map +1 -1
- package/dist/index.es556.js +27 -2
- package/dist/index.es556.js.map +1 -1
- package/dist/index.es557.js +7 -2
- package/dist/index.es557.js.map +1 -1
- package/dist/index.es558.js +57 -2
- package/dist/index.es558.js.map +1 -1
- package/dist/index.es559.js +11 -2
- package/dist/index.es559.js.map +1 -1
- package/dist/index.es560.js +52 -2
- package/dist/index.es560.js.map +1 -1
- package/dist/index.es561.js +124 -14
- package/dist/index.es561.js.map +1 -1
- package/dist/index.es562.js +138 -0
- package/dist/index.es562.js.map +1 -0
- package/dist/index.es563.js +17 -0
- package/dist/index.es563.js.map +1 -0
- package/dist/index.es564.js +72 -0
- package/dist/index.es564.js.map +1 -0
- package/dist/index.es565.js +37 -0
- package/dist/index.es565.js.map +1 -0
- package/dist/index.es566.js +18 -0
- package/dist/index.es566.js.map +1 -0
- package/dist/index.es567.js +9 -4
- package/dist/index.es567.js.map +1 -1
- package/dist/index.es568.js +50 -11
- package/dist/index.es568.js.map +1 -1
- package/dist/index.es572.js +4 -5
- package/dist/index.es572.js.map +1 -1
- package/dist/index.es573.js +11 -5
- package/dist/index.es573.js.map +1 -1
- package/dist/index.es574.js +12 -3
- package/dist/index.es574.js.map +1 -1
- package/dist/index.es575.js +23 -22
- package/dist/index.es575.js.map +1 -1
- package/dist/index.es576.js +27 -108
- package/dist/index.es576.js.map +1 -1
- package/dist/index.es577.js +5 -16
- package/dist/index.es577.js.map +1 -1
- package/dist/index.es578.js +8 -0
- package/dist/index.es578.js.map +1 -0
- package/dist/index.es579.js +6 -0
- package/dist/index.es579.js.map +1 -0
- package/dist/index.es580.js +27 -0
- package/dist/index.es580.js.map +1 -0
- package/dist/index.es581.js +103 -58
- package/dist/index.es581.js.map +1 -1
- package/dist/index.es582.js +15 -68
- package/dist/index.es582.js.map +1 -1
- package/dist/index.es586.js +63 -13
- package/dist/index.es586.js.map +1 -1
- package/dist/index.es587.js +69 -4
- package/dist/index.es587.js.map +1 -1
- package/dist/index.es588.js +9 -23
- package/dist/index.es588.js.map +1 -1
- package/dist/{index.es584.js → index.es589.js} +1 -1
- package/dist/{index.es584.js.map → index.es589.js.map} +1 -1
- package/dist/{index.es585.js → index.es590.js} +1 -1
- package/dist/{index.es585.js.map → index.es590.js.map} +1 -1
- package/dist/index.es592.js +1 -1
- package/dist/index.es593.js +4 -23
- package/dist/index.es593.js.map +1 -1
- package/dist/index.es594.js +23 -13
- package/dist/index.es594.js.map +1 -1
- package/dist/index.es595.js +14 -27
- package/dist/index.es595.js.map +1 -1
- package/dist/index.es596.js +22 -4
- package/dist/index.es596.js.map +1 -1
- package/dist/index.es597.js +16 -0
- package/dist/index.es597.js.map +1 -0
- package/dist/index.es598.js +31 -0
- package/dist/index.es598.js.map +1 -0
- package/dist/index.es599.js +8 -0
- package/dist/index.es599.js.map +1 -0
- package/dist/index.es611.js +625 -0
- package/dist/index.es611.js.map +1 -0
- package/dist/index.es612.js +42 -618
- package/dist/index.es612.js.map +1 -1
- package/dist/index.es613.js +13 -45
- package/dist/index.es613.js.map +1 -1
- package/dist/index.es614.js +217 -12
- package/dist/index.es614.js.map +1 -1
- package/dist/index.es615.js +167 -205
- package/dist/index.es615.js.map +1 -1
- package/dist/index.es618.js +8 -0
- package/dist/index.es618.js.map +1 -0
- package/dist/index.es619.js +205 -4
- package/dist/index.es619.js.map +1 -1
- package/dist/index.es620.js +20 -204
- package/dist/index.es620.js.map +1 -1
- package/dist/index.es621.js +399 -21
- package/dist/index.es621.js.map +1 -1
- package/dist/index.es622.js +496 -371
- package/dist/index.es622.js.map +1 -1
- package/dist/index.es623.js +114 -511
- package/dist/index.es623.js.map +1 -1
- package/dist/index.es624.js +117 -111
- package/dist/index.es624.js.map +1 -1
- package/dist/index.es625.js +5 -134
- package/dist/index.es625.js.map +1 -1
- package/dist/index.es626.js +19 -0
- package/dist/index.es626.js.map +1 -0
- package/dist/index.es627.js +13 -5
- package/dist/index.es627.js.map +1 -1
- package/dist/index.es628.js +36 -16
- package/dist/index.es628.js.map +1 -1
- package/dist/index.es629.js +5 -13
- package/dist/index.es629.js.map +1 -1
- package/dist/index.es630.js +2 -36
- package/dist/index.es630.js.map +1 -1
- package/dist/index.es631.js +3 -5
- package/dist/index.es631.js.map +1 -1
- package/dist/index.es632.js +7 -2
- package/dist/index.es632.js.map +1 -1
- package/dist/index.es633.js +6 -3
- package/dist/index.es633.js.map +1 -1
- package/dist/index.es634.js +5 -7
- package/dist/index.es634.js.map +1 -1
- package/dist/index.es635.js +32 -6
- package/dist/index.es635.js.map +1 -1
- package/dist/index.es636.js +242 -5
- package/dist/index.es636.js.map +1 -1
- package/dist/index.es637.js +4 -32
- package/dist/index.es637.js.map +1 -1
- package/dist/index.es638.js +4 -241
- package/dist/index.es638.js.map +1 -1
- package/dist/index.es639.js +10 -4
- package/dist/index.es639.js.map +1 -1
- package/dist/index.es640.js +55 -4
- package/dist/index.es640.js.map +1 -1
- package/dist/index.es641.js +7 -9
- package/dist/index.es641.js.map +1 -1
- package/dist/index.es642.js +5 -55
- package/dist/index.es642.js.map +1 -1
- package/dist/index.es643.js +531 -7
- package/dist/index.es643.js.map +1 -1
- package/dist/index.es644.js +14 -6
- package/dist/index.es644.js.map +1 -1
- package/dist/index.es645.js +2 -532
- package/dist/index.es645.js.map +1 -1
- package/dist/index.es646.js +37 -14
- package/dist/index.es646.js.map +1 -1
- package/dist/index.es647.js +2 -2
- package/dist/index.es647.js.map +1 -1
- package/dist/index.es648.js +270 -35
- package/dist/index.es648.js.map +1 -1
- package/dist/index.es649.js +3 -2
- package/dist/index.es649.js.map +1 -1
- package/dist/index.es650.js +26 -268
- package/dist/index.es650.js.map +1 -1
- package/dist/index.es656.js +40 -6
- package/dist/index.es656.js.map +1 -1
- package/dist/index.es657.js +2 -16
- package/dist/index.es657.js.map +1 -1
- package/dist/index.es658.js +5 -2
- package/dist/index.es658.js.map +1 -1
- package/dist/index.es659.js +6 -2
- package/dist/index.es659.js.map +1 -1
- package/dist/index.es660.js +16 -2
- package/dist/index.es660.js.map +1 -1
- package/dist/index.es661.js +2 -2
- package/dist/index.es661.js.map +1 -1
- package/dist/index.es662.js +2 -2
- package/dist/index.es662.js.map +1 -1
- package/dist/index.es663.js +2 -3
- package/dist/index.es663.js.map +1 -1
- package/dist/index.es664.js +2 -2
- package/dist/index.es664.js.map +1 -1
- package/dist/index.es665.js +2 -4
- package/dist/index.es665.js.map +1 -1
- package/dist/index.es666.js +3 -4
- package/dist/index.es666.js.map +1 -1
- package/dist/index.es667.js +2 -3
- package/dist/index.es667.js.map +1 -1
- package/dist/index.es668.js +4 -2
- package/dist/index.es668.js.map +1 -1
- package/dist/index.es669.js +37 -0
- package/dist/index.es669.js.map +1 -0
- package/dist/index.es670.js +3 -34
- package/dist/index.es670.js.map +1 -1
- package/dist/index.es671.js +4 -2
- package/dist/index.es671.js.map +1 -1
- package/dist/index.es672.js +3 -82
- package/dist/index.es672.js.map +1 -1
- package/dist/index.es673.js +3 -0
- package/dist/index.es673.js.map +1 -0
- package/dist/index.es674.js +86 -0
- package/dist/index.es674.js.map +1 -0
- package/package.json +1 -1
- package/dist/index.cjs476.js +0 -2
- package/dist/index.cjs476.js.map +0 -1
- package/dist/index.cjs477.js +0 -2
- package/dist/index.cjs477.js.map +0 -1
- package/dist/index.cjs478.js +0 -2
- package/dist/index.cjs478.js.map +0 -1
- package/dist/index.cjs479.js +0 -2
- package/dist/index.cjs479.js.map +0 -1
- package/dist/index.cjs480.js +0 -2
- package/dist/index.cjs480.js.map +0 -1
- package/dist/index.cjs569.js +0 -2
- package/dist/index.cjs569.js.map +0 -1
- package/dist/index.cjs570.js +0 -2
- package/dist/index.cjs570.js.map +0 -1
- package/dist/index.cjs571.js +0 -2
- package/dist/index.cjs571.js.map +0 -1
- package/dist/index.cjs583.js +0 -2
- package/dist/index.cjs583.js.map +0 -1
- package/dist/index.cjs616.js +0 -2
- package/dist/index.cjs616.js.map +0 -1
- package/dist/index.cjs651.js +0 -2
- package/dist/index.cjs651.js.map +0 -1
- package/dist/index.cjs652.js +0 -2
- package/dist/index.cjs652.js.map +0 -1
- package/dist/index.cjs653.js +0 -6
- package/dist/index.cjs653.js.map +0 -1
- package/dist/index.cjs654.js +0 -2
- package/dist/index.cjs654.js.map +0 -1
- package/dist/index.cjs655.js +0 -2
- package/dist/index.cjs655.js.map +0 -1
- package/dist/index.es476.js +0 -30
- package/dist/index.es476.js.map +0 -1
- package/dist/index.es477.js +0 -10
- package/dist/index.es477.js.map +0 -1
- package/dist/index.es478.js +0 -60
- package/dist/index.es478.js.map +0 -1
- package/dist/index.es479.js +0 -5
- package/dist/index.es479.js.map +0 -1
- package/dist/index.es480.js +0 -9
- package/dist/index.es480.js.map +0 -1
- package/dist/index.es569.js +0 -15
- package/dist/index.es569.js.map +0 -1
- package/dist/index.es570.js +0 -28
- package/dist/index.es570.js.map +0 -1
- package/dist/index.es571.js +0 -32
- package/dist/index.es571.js.map +0 -1
- package/dist/index.es583.js +0 -12
- package/dist/index.es583.js.map +0 -1
- package/dist/index.es616.js +0 -184
- package/dist/index.es616.js.map +0 -1
- package/dist/index.es651.js +0 -6
- package/dist/index.es651.js.map +0 -1
- package/dist/index.es652.js +0 -33
- package/dist/index.es652.js.map +0 -1
- package/dist/index.es653.js +0 -43
- package/dist/index.es653.js.map +0 -1
- package/dist/index.es654.js +0 -5
- package/dist/index.es654.js.map +0 -1
- package/dist/index.es655.js +0 -8
- package/dist/index.es655.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es580.js","sources":["../node_modules/use-callback-ref/dist/es2015/useMergeRef.js"],"sourcesContent":["import * as React from 'react';\nimport { assignRef } from './assignRef';\nimport { useCallbackRef } from './useRef';\nvar useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar currentValues = new WeakMap();\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return <div ref={domRef}>...</div>\n * }\n */\nexport function useMergeRefs(refs, defaultValue) {\n var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {\n return refs.forEach(function (ref) { return assignRef(ref, newValue); });\n });\n // handle refs changes - added or removed\n useIsomorphicLayoutEffect(function () {\n var oldValue = currentValues.get(callbackRef);\n if (oldValue) {\n var prevRefs_1 = new Set(oldValue);\n var nextRefs_1 = new Set(refs);\n var current_1 = callbackRef.current;\n prevRefs_1.forEach(function (ref) {\n if (!nextRefs_1.has(ref)) {\n assignRef(ref, null);\n }\n });\n nextRefs_1.forEach(function (ref) {\n if (!prevRefs_1.has(ref)) {\n assignRef(ref, current_1);\n }\n });\n }\n currentValues.set(callbackRef, refs);\n }, [refs]);\n return callbackRef;\n}\n"],"names":["useIsomorphicLayoutEffect","React","currentValues","useMergeRefs","refs","defaultValue","callbackRef","useCallbackRef","newValue","ref","assignRef","oldValue","prevRefs_1","nextRefs_1","current_1"],"mappings":";;;AAGA,IAAIA,IAA4B,OAAO,SAAW,MAAcC,EAAM,kBAAkBA,EAAM,WAC1FC,IAAgB,oBAAI,QAAO;AAexB,SAASC,EAAaC,GAAMC,GAAc;AAC7C,MAAIC,IAAcC,EAA+B,MAAM,SAAUC,GAAU;AACvE,WAAOJ,EAAK,QAAQ,SAAUK,GAAK;AAAE,aAAOC,EAAUD,GAAKD,CAAQ;AAAA,IAAG,CAAC;AAAA,EAC3E,CAAC;AAED,SAAAR,EAA0B,WAAY;AAClC,QAAIW,IAAWT,EAAc,IAAII,CAAW;AAC5C,QAAIK,GAAU;AACV,UAAIC,IAAa,IAAI,IAAID,CAAQ,GAC7BE,IAAa,IAAI,IAAIT,CAAI,GACzBU,IAAYR,EAAY;AAC5B,MAAAM,EAAW,QAAQ,SAAUH,GAAK;AAC9B,QAAKI,EAAW,IAAIJ,CAAG,KACnBC,EAAUD,GAAK,IAAI;AAAA,MAE3B,CAAC,GACDI,EAAW,QAAQ,SAAUJ,GAAK;AAC9B,QAAKG,EAAW,IAAIH,CAAG,KACnBC,EAAUD,GAAKK,CAAS;AAAA,MAEhC,CAAC;AAAA,IACL;AACA,IAAAZ,EAAc,IAAII,GAAaF,CAAI;AAAA,EACvC,GAAG,CAACA,CAAI,CAAC,GACFE;AACX;","x_google_ignoreList":[0]}
|
package/dist/index.es581.js
CHANGED
|
@@ -1,68 +1,113 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { __spreadArray as x } from "./index.es575.js";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { RemoveScrollBar as A } from "./index.es587.js";
|
|
4
|
+
import { styleSingleton as I } from "./index.es588.js";
|
|
5
|
+
import { nonPassive as s } from "./index.es589.js";
|
|
6
|
+
import { locationCouldBeScrolled as T, handleScroll as W } from "./index.es590.js";
|
|
7
|
+
var b = function(t) {
|
|
8
|
+
return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
|
|
9
|
+
}, Y = function(t) {
|
|
10
|
+
return [t.deltaX, t.deltaY];
|
|
11
|
+
}, B = function(t) {
|
|
12
|
+
return t && "current" in t ? t.current : t;
|
|
13
|
+
}, F = function(t, c) {
|
|
14
|
+
return t[0] === c[0] && t[1] === c[1];
|
|
15
|
+
}, K = function(t) {
|
|
16
|
+
return `
|
|
17
|
+
.block-interactivity-`.concat(t, ` {pointer-events: none;}
|
|
18
|
+
.allow-interactivity-`).concat(t, ` {pointer-events: all;}
|
|
19
|
+
`);
|
|
20
|
+
}, O = 0, f = [];
|
|
21
|
+
function G(t) {
|
|
22
|
+
var c = n.useRef([]), E = n.useRef([0, 0]), d = n.useRef(), h = n.useState(O++)[0], m = n.useState(I)[0], g = n.useRef(t);
|
|
23
|
+
n.useEffect(function() {
|
|
24
|
+
g.current = t;
|
|
25
|
+
}, [t]), n.useEffect(function() {
|
|
26
|
+
if (t.inert) {
|
|
27
|
+
document.body.classList.add("block-interactivity-".concat(h));
|
|
28
|
+
var e = x([t.lockRef.current], (t.shards || []).map(B), !0).filter(Boolean);
|
|
29
|
+
return e.forEach(function(r) {
|
|
30
|
+
return r.classList.add("allow-interactivity-".concat(h));
|
|
31
|
+
}), function() {
|
|
32
|
+
document.body.classList.remove("block-interactivity-".concat(h)), e.forEach(function(r) {
|
|
33
|
+
return r.classList.remove("allow-interactivity-".concat(h));
|
|
18
34
|
});
|
|
19
35
|
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
36
|
+
}
|
|
37
|
+
}, [t.inert, t.lockRef.current, t.shards]);
|
|
38
|
+
var k = n.useCallback(function(e, r) {
|
|
39
|
+
if ("touches" in e && e.touches.length === 2 || e.type === "wheel" && e.ctrlKey)
|
|
40
|
+
return !g.current.allowPinchZoom;
|
|
41
|
+
var l = b(e), o = E.current, u = "deltaX" in e ? e.deltaX : o[0] - l[0], i = "deltaY" in e ? e.deltaY : o[1] - l[1], a, C = e.target, v = Math.abs(u) > Math.abs(i) ? "h" : "v";
|
|
42
|
+
if ("touches" in e && v === "h" && C.type === "range")
|
|
43
|
+
return !1;
|
|
44
|
+
var y = T(v, C);
|
|
45
|
+
if (!y)
|
|
46
|
+
return !0;
|
|
47
|
+
if (y ? a = v : (a = v === "v" ? "h" : "v", y = T(v, C)), !y)
|
|
48
|
+
return !1;
|
|
49
|
+
if (!d.current && "changedTouches" in e && (u || i) && (d.current = a), !a)
|
|
50
|
+
return !0;
|
|
51
|
+
var P = d.current || a;
|
|
52
|
+
return W(P, r, e, P === "h" ? u : i);
|
|
53
|
+
}, []), S = n.useCallback(function(e) {
|
|
54
|
+
var r = e;
|
|
55
|
+
if (!(!f.length || f[f.length - 1] !== m)) {
|
|
56
|
+
var l = "deltaY" in r ? Y(r) : b(r), o = c.current.filter(function(a) {
|
|
57
|
+
return a.name === r.type && (a.target === r.target || r.target === a.shadowParent) && F(a.delta, l);
|
|
58
|
+
})[0];
|
|
59
|
+
if (o && o.should) {
|
|
60
|
+
r.cancelable && r.preventDefault();
|
|
61
|
+
return;
|
|
25
62
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
return e;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
assignMedium: function(u) {
|
|
36
|
-
o = !0;
|
|
37
|
-
var n = [];
|
|
38
|
-
if (e.length) {
|
|
39
|
-
var i = e;
|
|
40
|
-
e = [], i.forEach(u), n = e;
|
|
63
|
+
if (!o) {
|
|
64
|
+
var u = (g.current.shards || []).map(B).filter(Boolean).filter(function(a) {
|
|
65
|
+
return a.contains(r.target);
|
|
66
|
+
}), i = u.length > 0 ? k(r, u[0]) : !g.current.noIsolation;
|
|
67
|
+
i && r.cancelable && r.preventDefault();
|
|
41
68
|
}
|
|
42
|
-
var s = function() {
|
|
43
|
-
var f = n;
|
|
44
|
-
n = [], f.forEach(u);
|
|
45
|
-
}, a = function() {
|
|
46
|
-
return Promise.resolve().then(s);
|
|
47
|
-
};
|
|
48
|
-
a(), e = {
|
|
49
|
-
push: function(f) {
|
|
50
|
-
n.push(f), a();
|
|
51
|
-
},
|
|
52
|
-
filter: function(f) {
|
|
53
|
-
return n = n.filter(f), e;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
69
|
}
|
|
57
|
-
}
|
|
58
|
-
|
|
70
|
+
}, []), R = n.useCallback(function(e, r, l, o) {
|
|
71
|
+
var u = { name: e, delta: r, target: l, should: o, shadowParent: Q(l) };
|
|
72
|
+
c.current.push(u), setTimeout(function() {
|
|
73
|
+
c.current = c.current.filter(function(i) {
|
|
74
|
+
return i !== u;
|
|
75
|
+
});
|
|
76
|
+
}, 1);
|
|
77
|
+
}, []), w = n.useCallback(function(e) {
|
|
78
|
+
E.current = b(e), d.current = void 0;
|
|
79
|
+
}, []), L = n.useCallback(function(e) {
|
|
80
|
+
R(e.type, Y(e), e.target, k(e, t.lockRef.current));
|
|
81
|
+
}, []), M = n.useCallback(function(e) {
|
|
82
|
+
R(e.type, b(e), e.target, k(e, t.lockRef.current));
|
|
83
|
+
}, []);
|
|
84
|
+
n.useEffect(function() {
|
|
85
|
+
return f.push(m), t.setCallbacks({
|
|
86
|
+
onScrollCapture: L,
|
|
87
|
+
onWheelCapture: L,
|
|
88
|
+
onTouchMoveCapture: M
|
|
89
|
+
}), document.addEventListener("wheel", S, s), document.addEventListener("touchmove", S, s), document.addEventListener("touchstart", w, s), function() {
|
|
90
|
+
f = f.filter(function(e) {
|
|
91
|
+
return e !== m;
|
|
92
|
+
}), document.removeEventListener("wheel", S, s), document.removeEventListener("touchmove", S, s), document.removeEventListener("touchstart", w, s);
|
|
93
|
+
};
|
|
94
|
+
}, []);
|
|
95
|
+
var X = t.removeScrollBar, D = t.inert;
|
|
96
|
+
return n.createElement(
|
|
97
|
+
n.Fragment,
|
|
98
|
+
null,
|
|
99
|
+
D ? n.createElement(m, { styles: K(h) }) : null,
|
|
100
|
+
X ? n.createElement(A, { noRelative: t.noRelative, gapMode: t.gapMode }) : null
|
|
101
|
+
);
|
|
59
102
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return
|
|
103
|
+
function Q(t) {
|
|
104
|
+
for (var c = null; t !== null; )
|
|
105
|
+
t instanceof ShadowRoot && (c = t.host, t = t.host), t = t.parentNode;
|
|
106
|
+
return c;
|
|
64
107
|
}
|
|
65
108
|
export {
|
|
66
|
-
|
|
109
|
+
G as RemoveScrollSideCar,
|
|
110
|
+
Y as getDeltaXY,
|
|
111
|
+
b as getTouchXY
|
|
67
112
|
};
|
|
68
113
|
//# sourceMappingURL=index.es581.js.map
|
package/dist/index.es581.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es581.js","sources":["../node_modules/use-sidecar/dist/es2015/medium.js"],"sourcesContent":["import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n"],"names":["ItoI","a","innerCreateMedium","defaults","middleware","buffer","assigned","medium","data","item","x","cb","cbs","pendingQueue","executeQueue","cycle","filter","createSidecarMedium","options","__assign"],"mappings":";AACA,SAASA,EAAKC,GAAG;AACb,SAAOA;AACX;AACA,SAASC,EAAkBC,GAAUC,GAAY;AAC7C,EAAIA,MAAe,WAAUA,IAAaJ;AAC1C,MAAIK,IAAS,CAAA,GACTC,IAAW,I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A,EAAa,OAAOG,CAAM,GAClCX;AAAA,QACX;AAAA,MAChB;AAAA,IACQ;AAAA,EACR;AACI,SAAOE;AACX;AAMO,SAASU,EAAoBC,GAAS;AACzC,EAAIA,MAAY,WAAUA,IAAU,CAAA;AACpC,MAAIX,IAASL,EAAkB,IAAI;AACnC,SAAAK,EAAO,UAAUY,EAAS,EAAE,OAAO,IAAM,KAAK,GAAK,GAAID,CAAO,GACvDX;AACX;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.es581.js","sources":["../node_modules/react-remove-scroll/dist/es2015/SideEffect.js"],"sourcesContent":["import { __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScrollBar } from 'react-remove-scroll-bar';\nimport { styleSingleton } from 'react-style-singleton';\nimport { nonPassive } from './aggresiveCapture';\nimport { handleScroll, locationCouldBeScrolled } from './handleScroll';\nexport var getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexport var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };\nvar generateStyle = function (id) { return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\"); };\nvar idCounter = 0;\nvar lockStack = [];\nexport function RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(styleSingleton)[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) { return el.classList.add(\"allow-interactivity-\".concat(id)); });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) { return el.classList.remove(\"allow-interactivity-\".concat(id)); });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n }\n else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || [])\n .map(extractRef)\n .filter(Boolean)\n .filter(function (node) { return node.contains(event.target); });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove,\n });\n document.addEventListener('wheel', shouldPrevent, nonPassive);\n document.addEventListener('touchmove', shouldPrevent, nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) { return inst !== Style; });\n document.removeEventListener('wheel', shouldPrevent, nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar, inert = props.inert;\n return (React.createElement(React.Fragment, null,\n inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,\n removeScrollBar ? React.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null));\n}\nfunction getOutermostShadowParent(node) {\n var shadowParent = null;\n while (node !== null) {\n if (node instanceof ShadowRoot) {\n shadowParent = node.host;\n node = node.host;\n }\n node = node.parentNode;\n }\n return shadowParent;\n}\n"],"names":["getTouchXY","event","getDeltaXY","extractRef","ref","deltaCompare","x","y","generateStyle","id","idCounter","lockStack","RemoveScrollSideCar","props","shouldPreventQueue","React","touchStartRef","activeAxis","Style","styleSingleton","lastProps","allow_1","__spreadArray","el","shouldCancelEvent","parent","touch","touchStart","deltaX","deltaY","currentAxis","target","moveDirection","canBeScrolledInMainDirection","locationCouldBeScrolled","cancelingAxis","handleScroll","shouldPrevent","_event","delta","sourceEvent","e","shardNodes","node","shouldStop","shouldCancel","name","should","getOutermostShadowParent","scrollTouchStart","scrollWheel","scrollTouchMove","nonPassive","inst","removeScrollBar","inert","RemoveScrollBar","shadowParent"],"mappings":";;;;;;AAMU,IAACA,IAAa,SAAUC,GAAO;AACrC,SAAO,oBAAoBA,IAAQ,CAACA,EAAM,eAAe,CAAC,EAAE,SAASA,EAAM,eAAe,CAAC,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC;AACjH,GACWC,IAAa,SAAUD,GAAO;AAAE,SAAO,CAACA,EAAM,QAAQA,EAAM,MAAM;AAAG,GAC5EE,IAAa,SAAUC,GAAK;AAC5B,SAAOA,KAAO,aAAaA,IAAMA,EAAI,UAAUA;AACnD,GACIC,IAAe,SAAUC,GAAGC,GAAG;AAAE,SAAOD,EAAE,CAAC,MAAMC,EAAE,CAAC,KAAKD,EAAE,CAAC,MAAMC,EAAE,CAAC;AAAG,GACxEC,IAAgB,SAAUC,GAAI;AAAE,SAAO;AAAA,yBAA4B,OAAOA,GAAI;AAAA,wBAAmD,EAAE,OAAOA,GAAI;AAAA,CAA2B;AAAG,GAC5KC,IAAY,GACZC,IAAY,CAAA;A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-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
body[`).concat(e, `] {
|
|
13
|
-
overflow: hidden `).concat(t, `;
|
|
14
|
-
overscroll-behavior: contain;
|
|
15
|
-
`).concat([
|
|
16
|
-
a && "position: relative ".concat(t, ";"),
|
|
17
|
-
o === "margin" && `
|
|
18
|
-
padding-left: `.concat(r, `px;
|
|
19
|
-
padding-top: `).concat(i, `px;
|
|
20
|
-
padding-right: `).concat(s, `px;
|
|
21
|
-
margin-left:0;
|
|
22
|
-
margin-top:0;
|
|
23
|
-
margin-right: `).concat(c, "px ").concat(t, `;
|
|
24
|
-
`),
|
|
25
|
-
o === "padding" && "padding-right: ".concat(c, "px ").concat(t, ";")
|
|
26
|
-
].filter(Boolean).join(""), `
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.`).concat(g, ` {
|
|
30
|
-
right: `).concat(c, "px ").concat(t, `;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.`).concat(l, ` {
|
|
34
|
-
margin-right: `).concat(c, "px ").concat(t, `;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.`).concat(g, " .").concat(g, ` {
|
|
38
|
-
right: 0 `).concat(t, `;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.`).concat(l, " .").concat(l, ` {
|
|
42
|
-
margin-right: 0 `).concat(t, `;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
body[`).concat(e, `] {
|
|
46
|
-
`).concat(v, ": ").concat(c, `px;
|
|
47
|
-
}
|
|
48
|
-
`);
|
|
49
|
-
}, u = function() {
|
|
50
|
-
var n = parseInt(document.body.getAttribute(e) || "0", 10);
|
|
51
|
-
return isFinite(n) ? n : 0;
|
|
52
|
-
}, x = function() {
|
|
53
|
-
d.useEffect(function() {
|
|
54
|
-
return document.body.setAttribute(e, (u() + 1).toString()), function() {
|
|
55
|
-
var n = u() - 1;
|
|
56
|
-
n <= 0 ? document.body.removeAttribute(e) : document.body.setAttribute(e, n.toString());
|
|
57
|
-
};
|
|
58
|
-
}, []);
|
|
59
|
-
}, C = function(n) {
|
|
60
|
-
var a = n.noRelative, o = n.noImportant, t = n.gapMode, r = t === void 0 ? "margin" : t;
|
|
61
|
-
x();
|
|
62
|
-
var i = d.useMemo(function() {
|
|
63
|
-
return m(r);
|
|
64
|
-
}, [r]);
|
|
65
|
-
return d.createElement(b, { styles: h(i, !a, r, o ? "" : "!important") });
|
|
1
|
+
import { __rest as o, __assign as d } from "./index.es575.js";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
var i = function(r) {
|
|
4
|
+
var e = r.sideCar, a = o(r, ["sideCar"]);
|
|
5
|
+
if (!e)
|
|
6
|
+
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
7
|
+
var t = e.read();
|
|
8
|
+
if (!t)
|
|
9
|
+
throw new Error("Sidecar medium not found");
|
|
10
|
+
return n.createElement(t, d({}, a));
|
|
66
11
|
};
|
|
12
|
+
i.isSideCarExport = !0;
|
|
13
|
+
function p(r, e) {
|
|
14
|
+
return r.useMedium(e), i;
|
|
15
|
+
}
|
|
67
16
|
export {
|
|
68
|
-
|
|
69
|
-
e as lockAttribute,
|
|
70
|
-
x as useLockAttribute
|
|
17
|
+
p as exportSidecar
|
|
71
18
|
};
|
|
72
19
|
//# sourceMappingURL=index.es582.js.map
|
package/dist/index.es582.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es582.js","sources":["../node_modules/
|
|
1
|
+
{"version":3,"file":"index.es582.js","sources":["../node_modules/use-sidecar/dist/es2015/exports.js"],"sourcesContent":["import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = __rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, __assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\n"],"names":["SideCar","_a","sideCar","rest","__rest","Target","React","__assign","exportSidecar","medium","exported"],"mappings":";;AAEA,IAAIA,IAAU,SAAUC,GAAI;AACxB,MAAIC,IAAUD,EAAG,SAASE,IAAOC,EAAOH,GAAI,CAAC,SAAS,CAAC;AACvD,MAAI,CAACC;AACD,UAAM,IAAI,MAAM,oEAAoE;AAExF,MAAIG,IAASH,EAAQ,KAAI;AACzB,MAAI,CAACG;AACD,UAAM,IAAI,MAAM,0BAA0B;AAE9C,SAAOC,EAAM,cAAcD,GAAQE,EAAS,CAAA,GAAIJ,CAAI,CAAC;AACzD;AACAH,EAAQ,kBAAkB;AACnB,SAASQ,EAAcC,GAAQC,GAAU;AAC5C,SAAAD,EAAO,UAAUC,CAAQ,GAClBV;AACX;","x_google_ignoreList":[0]}
|
package/dist/index.es586.js
CHANGED
|
@@ -1,18 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { __assign as d } from "./index.es575.js";
|
|
2
|
+
function l(r) {
|
|
3
|
+
return r;
|
|
4
|
+
}
|
|
5
|
+
function h(r, t) {
|
|
6
|
+
t === void 0 && (t = l);
|
|
7
|
+
var e = [], o = !1, c = {
|
|
8
|
+
read: function() {
|
|
9
|
+
if (o)
|
|
10
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
11
|
+
return e.length ? e[e.length - 1] : r;
|
|
12
|
+
},
|
|
13
|
+
useMedium: function(u) {
|
|
14
|
+
var n = t(u, o);
|
|
15
|
+
return e.push(n), function() {
|
|
16
|
+
e = e.filter(function(i) {
|
|
17
|
+
return i !== n;
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
assignSyncMedium: function(u) {
|
|
22
|
+
for (o = !0; e.length; ) {
|
|
23
|
+
var n = e;
|
|
24
|
+
e = [], n.forEach(u);
|
|
25
|
+
}
|
|
26
|
+
e = {
|
|
27
|
+
push: function(i) {
|
|
28
|
+
return u(i);
|
|
29
|
+
},
|
|
30
|
+
filter: function() {
|
|
31
|
+
return e;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
assignMedium: function(u) {
|
|
36
|
+
o = !0;
|
|
37
|
+
var n = [];
|
|
38
|
+
if (e.length) {
|
|
39
|
+
var i = e;
|
|
40
|
+
e = [], i.forEach(u), n = e;
|
|
41
|
+
}
|
|
42
|
+
var s = function() {
|
|
43
|
+
var f = n;
|
|
44
|
+
n = [], f.forEach(u);
|
|
45
|
+
}, a = function() {
|
|
46
|
+
return Promise.resolve().then(s);
|
|
47
|
+
};
|
|
48
|
+
a(), e = {
|
|
49
|
+
push: function(f) {
|
|
50
|
+
n.push(f), a();
|
|
51
|
+
},
|
|
52
|
+
filter: function(f) {
|
|
53
|
+
return n = n.filter(f), e;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
11
56
|
}
|
|
12
|
-
}
|
|
13
|
-
return
|
|
57
|
+
};
|
|
58
|
+
return c;
|
|
59
|
+
}
|
|
60
|
+
function v(r) {
|
|
61
|
+
r === void 0 && (r = {});
|
|
62
|
+
var t = h(null);
|
|
63
|
+
return t.options = d({ async: !0, ssr: !1 }, r), t;
|
|
14
64
|
}
|
|
15
65
|
export {
|
|
16
|
-
|
|
66
|
+
v as createSidecarMedium
|
|
17
67
|
};
|
|
18
68
|
//# sourceMappingURL=index.es586.js.map
|
package/dist/index.es586.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es586.js","sources":["../node_modules/usehooks-ts/dist/index.js"],"sourcesContent":["import { useState, useCallback, useLayoutEffect, useEffect, useRef, useMemo } from 'react';\nimport debounce from 'lodash.debounce';\n\n// src/useBoolean/useBoolean.ts\nfunction useBoolean(defaultValue = false) {\n if (typeof defaultValue !== \"boolean\") {\n throw new Error(\"defaultValue must be `true` or `false`\");\n }\n const [value, setValue] = useState(defaultValue);\n const setTrue = useCallback(() => {\n setValue(true);\n }, []);\n const setFalse = useCallback(() => {\n setValue(false);\n }, []);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return { value, setValue, setTrue, setFalse, toggle };\n}\nvar useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\n// src/useEventListener/useEventListener.ts\nfunction useEventListener(eventName, handler, element, options) {\n const savedHandler = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n useEffect(() => {\n const targetElement = (element == null ? void 0 : element.current) ?? window;\n if (!(targetElement && targetElement.addEventListener))\n return;\n const listener = (event) => {\n savedHandler.current(event);\n };\n targetElement.addEventListener(eventName, listener, options);\n return () => {\n targetElement.removeEventListener(eventName, listener, options);\n };\n }, [eventName, element, options]);\n}\n\n// src/useClickAnyWhere/useClickAnyWhere.ts\nfunction useClickAnyWhere(handler) {\n useEventListener(\"click\", (event) => {\n handler(event);\n });\n}\nfunction useCopyToClipboard() {\n const [copiedText, setCopiedText] = useState(null);\n const copy = useCallback(async (text) => {\n if (!(navigator == null ? void 0 : navigator.clipboard)) {\n console.warn(\"Clipboard not supported\");\n return false;\n }\n try {\n await navigator.clipboard.writeText(text);\n setCopiedText(text);\n return true;\n } catch (error) {\n console.warn(\"Copy failed\", error);\n setCopiedText(null);\n return false;\n }\n }, []);\n return [copiedText, copy];\n}\nfunction useCounter(initialValue) {\n const [count, setCount] = useState(initialValue ?? 0);\n const increment = useCallback(() => {\n setCount((x) => x + 1);\n }, []);\n const decrement = useCallback(() => {\n setCount((x) => x - 1);\n }, []);\n const reset = useCallback(() => {\n setCount(initialValue ?? 0);\n }, [initialValue]);\n return {\n count,\n increment,\n decrement,\n reset,\n setCount\n };\n}\nfunction useInterval(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (delay === null) {\n return;\n }\n const id = setInterval(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearInterval(id);\n };\n }, [delay]);\n}\n\n// src/useCountdown/useCountdown.ts\nfunction useCountdown({\n countStart,\n countStop = 0,\n intervalMs = 1e3,\n isIncrement = false\n}) {\n const {\n count,\n increment,\n decrement,\n reset: resetCounter\n } = useCounter(countStart);\n const {\n value: isCountdownRunning,\n setTrue: startCountdown,\n setFalse: stopCountdown\n } = useBoolean(false);\n const resetCountdown = useCallback(() => {\n stopCountdown();\n resetCounter();\n }, [stopCountdown, resetCounter]);\n const countdownCallback = useCallback(() => {\n if (count === countStop) {\n stopCountdown();\n return;\n }\n if (isIncrement) {\n increment();\n } else {\n decrement();\n }\n }, [count, countStop, decrement, increment, isIncrement, stopCountdown]);\n useInterval(countdownCallback, isCountdownRunning ? intervalMs : null);\n return [count, { startCountdown, stopCountdown, resetCountdown }];\n}\nfunction useEventCallback(fn) {\n const ref = useRef(() => {\n throw new Error(\"Cannot call an event handler while rendering.\");\n });\n useIsomorphicLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n return useCallback((...args) => {\n var _a;\n return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);\n }, [ref]);\n}\n\n// src/useLocalStorage/useLocalStorage.ts\nvar IS_SERVER = typeof window === \"undefined\";\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER) {\n return initialValueToUse;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER) {\n console.warn(\n `Tried setting localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.localStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting localStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n const removeValue = useEventCallback(() => {\n if (IS_SERVER) {\n console.warn(\n `Tried removing localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n window.localStorage.removeItem(key);\n setStoredValue(defaultValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return [storedValue, setValue, removeValue];\n}\nvar IS_SERVER2 = typeof window === \"undefined\";\nfunction useMediaQuery(query, {\n defaultValue = false,\n initializeWithValue = true\n} = {}) {\n const getMatches = (query2) => {\n if (IS_SERVER2) {\n return defaultValue;\n }\n return window.matchMedia(query2).matches;\n };\n const [matches, setMatches] = useState(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n function handleChange() {\n setMatches(getMatches(query));\n }\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n handleChange();\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener(\"change\", handleChange);\n }\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener(\"change\", handleChange);\n }\n };\n }, [query]);\n return matches;\n}\n\n// src/useDarkMode/useDarkMode.ts\nvar COLOR_SCHEME_QUERY = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY = \"usehooks-ts-dark-mode\";\nfunction useDarkMode(options = {}) {\n const {\n defaultValue,\n localStorageKey = LOCAL_STORAGE_KEY,\n initializeWithValue = true\n } = options;\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY, {\n initializeWithValue,\n defaultValue\n });\n const [isDarkMode, setDarkMode] = useLocalStorage(\n localStorageKey,\n defaultValue ?? isDarkOS ?? false,\n { initializeWithValue }\n );\n useIsomorphicLayoutEffect(() => {\n if (isDarkOS !== isDarkMode) {\n setDarkMode(isDarkOS);\n }\n }, [isDarkOS]);\n return {\n isDarkMode,\n toggle: () => {\n setDarkMode((prev) => !prev);\n },\n enable: () => {\n setDarkMode(true);\n },\n disable: () => {\n setDarkMode(false);\n },\n set: (value) => {\n setDarkMode(value);\n }\n };\n}\nfunction useUnmount(func) {\n const funcRef = useRef(func);\n funcRef.current = func;\n useEffect(\n () => () => {\n funcRef.current();\n },\n []\n );\n}\n\n// src/useDebounceCallback/useDebounceCallback.ts\nfunction useDebounceCallback(func, delay = 500, options) {\n const debouncedFunc = useRef();\n useUnmount(() => {\n if (debouncedFunc.current) {\n debouncedFunc.current.cancel();\n }\n });\n const debounced = useMemo(() => {\n const debouncedFuncInstance = debounce(func, delay, options);\n const wrappedFunc = (...args) => {\n return debouncedFuncInstance(...args);\n };\n wrappedFunc.cancel = () => {\n debouncedFuncInstance.cancel();\n };\n wrappedFunc.isPending = () => {\n return !!debouncedFunc.current;\n };\n wrappedFunc.flush = () => {\n return debouncedFuncInstance.flush();\n };\n return wrappedFunc;\n }, [func, delay, options]);\n useEffect(() => {\n debouncedFunc.current = debounce(func, delay, options);\n }, [func, delay, options]);\n return debounced;\n}\nfunction useDebounceValue(initialValue, delay, options) {\n const eq = (options == null ? void 0 : options.equalityFn) ?? ((left, right) => left === right);\n const unwrappedInitialValue = initialValue instanceof Function ? initialValue() : initialValue;\n const [debouncedValue, setDebouncedValue] = useState(unwrappedInitialValue);\n const previousValueRef = useRef(unwrappedInitialValue);\n const updateDebouncedValue = useDebounceCallback(\n setDebouncedValue,\n delay,\n options\n );\n if (!eq(previousValueRef.current, unwrappedInitialValue)) {\n updateDebouncedValue(unwrappedInitialValue);\n previousValueRef.current = unwrappedInitialValue;\n }\n return [debouncedValue, updateDebouncedValue];\n}\nfunction useDocumentTitle(title, options = {}) {\n const { preserveTitleOnUnmount = true } = options;\n const defaultTitle = useRef(null);\n useIsomorphicLayoutEffect(() => {\n defaultTitle.current = window.document.title;\n }, []);\n useIsomorphicLayoutEffect(() => {\n window.document.title = title;\n }, [title]);\n useUnmount(() => {\n if (!preserveTitleOnUnmount && defaultTitle.current) {\n window.document.title = defaultTitle.current;\n }\n });\n}\nfunction useHover(elementRef) {\n const [value, setValue] = useState(false);\n const handleMouseEnter = () => {\n setValue(true);\n };\n const handleMouseLeave = () => {\n setValue(false);\n };\n useEventListener(\"mouseenter\", handleMouseEnter, elementRef);\n useEventListener(\"mouseleave\", handleMouseLeave, elementRef);\n return value;\n}\nfunction useIntersectionObserver({\n threshold = 0,\n root = null,\n rootMargin = \"0%\",\n freezeOnceVisible = false,\n initialIsIntersecting = false,\n onChange\n} = {}) {\n var _a;\n const [ref, setRef] = useState(null);\n const [state, setState] = useState(() => ({\n isIntersecting: initialIsIntersecting,\n entry: void 0\n }));\n const callbackRef = useRef();\n callbackRef.current = onChange;\n const frozen = ((_a = state.entry) == null ? void 0 : _a.isIntersecting) && freezeOnceVisible;\n useEffect(() => {\n if (!ref)\n return;\n if (!(\"IntersectionObserver\" in window))\n return;\n if (frozen)\n return;\n let unobserve;\n const observer = new IntersectionObserver(\n (entries) => {\n const thresholds = Array.isArray(observer.thresholds) ? observer.thresholds : [observer.thresholds];\n entries.forEach((entry) => {\n const isIntersecting = entry.isIntersecting && thresholds.some((threshold2) => entry.intersectionRatio >= threshold2);\n setState({ isIntersecting, entry });\n if (callbackRef.current) {\n callbackRef.current(isIntersecting, entry);\n }\n if (isIntersecting && freezeOnceVisible && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n });\n },\n { threshold, root, rootMargin }\n );\n observer.observe(ref);\n return () => {\n observer.disconnect();\n };\n }, [\n ref,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold),\n root,\n rootMargin,\n frozen,\n freezeOnceVisible\n ]);\n const prevRef = useRef(null);\n useEffect(() => {\n var _a2;\n if (!ref && ((_a2 = state.entry) == null ? void 0 : _a2.target) && !freezeOnceVisible && !frozen && prevRef.current !== state.entry.target) {\n prevRef.current = state.entry.target;\n setState({ isIntersecting: initialIsIntersecting, entry: void 0 });\n }\n }, [ref, state.entry, freezeOnceVisible, frozen, initialIsIntersecting]);\n const result = [\n setRef,\n !!state.isIntersecting,\n state.entry\n ];\n result.ref = result[0];\n result.isIntersecting = result[1];\n result.entry = result[2];\n return result;\n}\nfunction useIsClient() {\n const [isClient, setClient] = useState(false);\n useEffect(() => {\n setClient(true);\n }, []);\n return isClient;\n}\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return useCallback(() => isMounted.current, []);\n}\nfunction useMap(initialState = /* @__PURE__ */ new Map()) {\n const [map, setMap] = useState(new Map(initialState));\n const actions = {\n set: useCallback((key, value) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.set(key, value);\n return copy;\n });\n }, []),\n setAll: useCallback((entries) => {\n setMap(() => new Map(entries));\n }, []),\n remove: useCallback((key) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.delete(key);\n return copy;\n });\n }, []),\n reset: useCallback(() => {\n setMap(() => /* @__PURE__ */ new Map());\n }, [])\n };\n return [map, actions];\n}\n\n// src/useOnClickOutside/useOnClickOutside.ts\nfunction useOnClickOutside(ref, handler, eventType = \"mousedown\", eventListenerOptions = {}) {\n useEventListener(\n eventType,\n (event) => {\n const target = event.target;\n if (!target || !target.isConnected) {\n return;\n }\n const isOutside = Array.isArray(ref) ? ref.filter((r) => Boolean(r.current)).every((r) => r.current && !r.current.contains(target)) : ref.current && !ref.current.contains(target);\n if (isOutside) {\n handler(event);\n }\n },\n void 0,\n eventListenerOptions\n );\n}\nvar IS_SERVER3 = typeof window === \"undefined\";\nfunction useReadLocalStorage(key, options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER3) {\n initializeWithValue = false;\n }\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return null;\n }\n return parsed;\n },\n [options]\n );\n const readValue = useCallback(() => {\n if (IS_SERVER3) {\n return null;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : null;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return null;\n }\n }, [key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return void 0;\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return storedValue;\n}\nvar initialSize = {\n width: void 0,\n height: void 0\n};\nfunction useResizeObserver(options) {\n const { ref, box = \"content-box\" } = options;\n const [{ width, height }, setSize] = useState(initialSize);\n const isMounted = useIsMounted();\n const previousSize = useRef({ ...initialSize });\n const onResize = useRef(void 0);\n onResize.current = options.onResize;\n useEffect(() => {\n if (!ref.current)\n return;\n if (typeof window === \"undefined\" || !(\"ResizeObserver\" in window))\n return;\n const observer = new ResizeObserver(([entry]) => {\n const boxProp = box === \"border-box\" ? \"borderBoxSize\" : box === \"device-pixel-content-box\" ? \"devicePixelContentBoxSize\" : \"contentBoxSize\";\n const newWidth = extractSize(entry, boxProp, \"inlineSize\");\n const newHeight = extractSize(entry, boxProp, \"blockSize\");\n const hasChanged = previousSize.current.width !== newWidth || previousSize.current.height !== newHeight;\n if (hasChanged) {\n const newSize = { width: newWidth, height: newHeight };\n previousSize.current.width = newWidth;\n previousSize.current.height = newHeight;\n if (onResize.current) {\n onResize.current(newSize);\n } else {\n if (isMounted()) {\n setSize(newSize);\n }\n }\n }\n });\n observer.observe(ref.current, { box });\n return () => {\n observer.disconnect();\n };\n }, [box, ref, isMounted]);\n return { width, height };\n}\nfunction extractSize(entry, box, sizeType) {\n if (!entry[box]) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"];\n }\n return void 0;\n }\n return Array.isArray(entry[box]) ? entry[box][0][sizeType] : (\n // @ts-ignore Support Firefox's non-standard behavior\n entry[box][sizeType]\n );\n}\nvar IS_SERVER4 = typeof window === \"undefined\";\nfunction useScreen(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER4) {\n initializeWithValue = false;\n }\n const readScreen = () => {\n if (IS_SERVER4) {\n return void 0;\n }\n return window.screen;\n };\n const [screen, setScreen] = useState(() => {\n if (initializeWithValue) {\n return readScreen();\n }\n return void 0;\n });\n const debouncedSetScreen = useDebounceCallback(\n setScreen,\n options.debounceDelay\n );\n function handleSize() {\n const newScreen = readScreen();\n const setSize = options.debounceDelay ? debouncedSetScreen : setScreen;\n if (newScreen) {\n const {\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n } = newScreen;\n setSize({\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n });\n }\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return screen;\n}\nvar cachedScriptStatuses = /* @__PURE__ */ new Map();\nfunction getScriptNode(src) {\n const node = document.querySelector(\n `script[src=\"${src}\"]`\n );\n const status = node == null ? void 0 : node.getAttribute(\"data-status\");\n return {\n node,\n status\n };\n}\nfunction useScript(src, options) {\n const [status, setStatus] = useState(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return \"idle\";\n }\n if (typeof window === \"undefined\") {\n return \"loading\";\n }\n return cachedScriptStatuses.get(src) ?? \"loading\";\n });\n useEffect(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return;\n }\n const cachedScriptStatus = cachedScriptStatuses.get(src);\n if (cachedScriptStatus === \"ready\" || cachedScriptStatus === \"error\") {\n setStatus(cachedScriptStatus);\n return;\n }\n const script = getScriptNode(src);\n let scriptNode = script.node;\n if (!scriptNode) {\n scriptNode = document.createElement(\"script\");\n scriptNode.src = src;\n scriptNode.async = true;\n if (options == null ? void 0 : options.id) {\n scriptNode.id = options.id;\n }\n scriptNode.setAttribute(\"data-status\", \"loading\");\n document.body.appendChild(scriptNode);\n const setAttributeFromEvent = (event) => {\n const scriptStatus = event.type === \"load\" ? \"ready\" : \"error\";\n scriptNode == null ? void 0 : scriptNode.setAttribute(\"data-status\", scriptStatus);\n };\n scriptNode.addEventListener(\"load\", setAttributeFromEvent);\n scriptNode.addEventListener(\"error\", setAttributeFromEvent);\n } else {\n setStatus(script.status ?? cachedScriptStatus ?? \"loading\");\n }\n const setStateFromEvent = (event) => {\n const newStatus = event.type === \"load\" ? \"ready\" : \"error\";\n setStatus(newStatus);\n cachedScriptStatuses.set(src, newStatus);\n };\n scriptNode.addEventListener(\"load\", setStateFromEvent);\n scriptNode.addEventListener(\"error\", setStateFromEvent);\n return () => {\n if (scriptNode) {\n scriptNode.removeEventListener(\"load\", setStateFromEvent);\n scriptNode.removeEventListener(\"error\", setStateFromEvent);\n }\n if (scriptNode && (options == null ? void 0 : options.removeOnUnmount)) {\n scriptNode.remove();\n cachedScriptStatuses.delete(src);\n }\n };\n }, [src, options == null ? void 0 : options.shouldPreventLoad, options == null ? void 0 : options.removeOnUnmount, options == null ? void 0 : options.id]);\n return status;\n}\nvar IS_SERVER5 = typeof window === \"undefined\";\nfunction useScrollLock(options = {}) {\n const { autoLock = true, lockTarget, widthReflow = true } = options;\n const [isLocked, setIsLocked] = useState(false);\n const target = useRef(null);\n const originalStyle = useRef(null);\n const lock = () => {\n if (target.current) {\n const { overflow, paddingRight } = target.current.style;\n originalStyle.current = { overflow, paddingRight };\n if (widthReflow) {\n const offsetWidth = target.current === document.body ? window.innerWidth : target.current.offsetWidth;\n const currentPaddingRight = parseInt(window.getComputedStyle(target.current).paddingRight, 10) || 0;\n const scrollbarWidth = offsetWidth - target.current.scrollWidth;\n target.current.style.paddingRight = `${scrollbarWidth + currentPaddingRight}px`;\n }\n target.current.style.overflow = \"hidden\";\n setIsLocked(true);\n }\n };\n const unlock = () => {\n if (target.current && originalStyle.current) {\n target.current.style.overflow = originalStyle.current.overflow;\n if (widthReflow) {\n target.current.style.paddingRight = originalStyle.current.paddingRight;\n }\n }\n setIsLocked(false);\n };\n useIsomorphicLayoutEffect(() => {\n if (IS_SERVER5)\n return;\n if (lockTarget) {\n target.current = typeof lockTarget === \"string\" ? document.querySelector(lockTarget) : lockTarget;\n }\n if (!target.current) {\n target.current = document.body;\n }\n if (autoLock) {\n lock();\n }\n return () => {\n unlock();\n };\n }, [autoLock, lockTarget, widthReflow]);\n return { isLocked, lock, unlock };\n}\nvar IS_SERVER6 = typeof window === \"undefined\";\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER6) {\n return initialValueToUse;\n }\n try {\n const raw = window.sessionStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading sessionStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER6) {\n console.warn(\n `Tried setting sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.sessionStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting sessionStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n const removeValue = useEventCallback(() => {\n if (IS_SERVER6) {\n console.warn(\n `Tried removing sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n window.sessionStorage.removeItem(key);\n setStoredValue(defaultValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"session-storage\", handleStorageChange);\n return [storedValue, setValue, removeValue];\n}\nfunction useStep(maxStep) {\n const [currentStep, setCurrentStep] = useState(1);\n const canGoToNextStep = currentStep + 1 <= maxStep;\n const canGoToPrevStep = currentStep - 1 > 0;\n const setStep = useCallback(\n (step) => {\n const newStep = step instanceof Function ? step(currentStep) : step;\n if (newStep >= 1 && newStep <= maxStep) {\n setCurrentStep(newStep);\n return;\n }\n throw new Error(\"Step not valid\");\n },\n [maxStep, currentStep]\n );\n const goToNextStep = useCallback(() => {\n if (canGoToNextStep) {\n setCurrentStep((step) => step + 1);\n }\n }, [canGoToNextStep]);\n const goToPrevStep = useCallback(() => {\n if (canGoToPrevStep) {\n setCurrentStep((step) => step - 1);\n }\n }, [canGoToPrevStep]);\n const reset = useCallback(() => {\n setCurrentStep(1);\n }, []);\n return [\n currentStep,\n {\n goToNextStep,\n goToPrevStep,\n canGoToNextStep,\n canGoToPrevStep,\n setStep,\n reset\n }\n ];\n}\n\n// src/useTernaryDarkMode/useTernaryDarkMode.ts\nvar COLOR_SCHEME_QUERY2 = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY2 = \"usehooks-ts-ternary-dark-mode\";\nfunction useTernaryDarkMode({\n defaultValue = \"system\",\n localStorageKey = LOCAL_STORAGE_KEY2,\n initializeWithValue = true\n} = {}) {\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY2, { initializeWithValue });\n const [mode, setMode] = useLocalStorage(localStorageKey, defaultValue, {\n initializeWithValue\n });\n const isDarkMode = mode === \"dark\" || mode === \"system\" && isDarkOS;\n const toggleTernaryDarkMode = () => {\n const modes = [\"light\", \"system\", \"dark\"];\n setMode((prevMode) => {\n const nextIndex = (modes.indexOf(prevMode) + 1) % modes.length;\n return modes[nextIndex];\n });\n };\n return {\n isDarkMode,\n ternaryDarkMode: mode,\n setTernaryDarkMode: setMode,\n toggleTernaryDarkMode\n };\n}\nfunction useTimeout(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (!delay && delay !== 0) {\n return;\n }\n const id = setTimeout(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearTimeout(id);\n };\n }, [delay]);\n}\nfunction useToggle(defaultValue) {\n const [value, setValue] = useState(!!defaultValue);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return [value, toggle, setValue];\n}\nvar IS_SERVER7 = typeof window === \"undefined\";\nfunction useWindowSize(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER7) {\n initializeWithValue = false;\n }\n const [windowSize, setWindowSize] = useState(() => {\n if (initializeWithValue) {\n return {\n width: window.innerWidth,\n height: window.innerHeight\n };\n }\n return {\n width: void 0,\n height: void 0\n };\n });\n const debouncedSetWindowSize = useDebounceCallback(\n setWindowSize,\n options.debounceDelay\n );\n function handleSize() {\n const setSize = options.debounceDelay ? debouncedSetWindowSize : setWindowSize;\n setSize({\n width: window.innerWidth,\n height: window.innerHeight\n });\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return windowSize;\n}\n\nexport { useBoolean, useClickAnyWhere, useCopyToClipboard, useCountdown, useCounter, useDarkMode, useDebounceCallback, useDebounceValue, useDocumentTitle, useEventCallback, useEventListener, useHover, useIntersectionObserver, useInterval, useIsClient, useIsMounted, useIsomorphicLayoutEffect, useLocalStorage, useMap, useMediaQuery, useOnClickOutside, useReadLocalStorage, useResizeObserver, useScreen, useScript, useScrollLock, useSessionStorage, useStep, useTernaryDarkMode, useTimeout, useToggle, useUnmount, useWindowSize };\n"],"names":["useCopyToClipboard","copiedText","setCopiedText","useState","copy","useCallback","text","error"],"mappings":";;AAgDA,SAASA,IAAqB;AAC5B,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAS,IAAI,GAC3CC,IAAOC,EAAY,OAAOC,MAAS;AACvC,QAAI,EAAE,aAAa,QAAgB,UAAU;AAC3C,qBAAQ,KAAK,yBAAyB,GAC/B;AAET,QAAI;AACF,mBAAM,UAAU,UAAU,UAAUA,CAAI,GACxCJ,EAAcI,CAAI,GACX;AAAA,IACT,SAASC,GAAO;AACd,qBAAQ,KAAK,eAAeA,CAAK,GACjCL,EAAc,IAAI,GACX;AAAA,IACT;AAAA,EACF,GAAG,CAAA,CAAE;AACL,SAAO,CAACD,GAAYG,CAAI;AAC1B;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.es586.js","sources":["../node_modules/use-sidecar/dist/es2015/medium.js"],"sourcesContent":["import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n"],"names":["ItoI","a","innerCreateMedium","defaults","middleware","buffer","assigned","medium","data","item","x","cb","cbs","pendingQueue","executeQueue","cycle","filter","createSidecarMedium","options","__assign"],"mappings":";AACA,SAASA,EAAKC,GAAG;AACb,SAAOA;AACX;AACA,SAASC,EAAkBC,GAAUC,GAAY;AAC7C,EAAIA,MAAe,WAAUA,IAAaJ;AAC1C,MAAIK,IAAS,CAAA,GACTC,IAAW,IACXC,IAAS;AAAA,IACT,MAAM,WAAY;AACd,UAAID;AACA,cAAM,IAAI,MAAM,kGAAkG;AAEtH,aAAID,EAAO,SACAA,EAAOA,EAAO,SAAS,CAAC,IAE5BF;AAAA,IACX;AAAA,IACA,WAAW,SAAUK,GAAM;AACvB,UAAIC,IAAOL,EAAWI,GAAMF,CAAQ;AACpC,aAAAD,EAAO,KAAKI,CAAI,GACT,WAAY;AACf,QAAAJ,IAASA,EAAO,OAAO,SAAUK,GAAG;AAAE,iBAAOA,MAAMD;AAAA,QAAM,CAAC;AAAA,MAC9D;AAAA,IACJ;AAAA,IACA,kBAAkB,SAAUE,GAAI;AAE5B,WADAL,IAAW,IACJD,EAAO,UAAQ;AAClB,YAAIO,IAAMP;AACV,QAAAA,IAAS,CAAA,GACTO,EAAI,QAAQD,CAAE;AAAA,MAClB;AACA,MAAAN,IAAS;AAAA,QACL,MAAM,SAAUK,GAAG;AAAE,iBAAOC,EAAGD,CAAC;AAAA,QAAG;AAAA,QACnC,QAAQ,WAAY;AAAE,iBAAOL;AAAA,QAAQ;AAAA,MACrD;AAAA,IACQ;AAAA,IACA,cAAc,SAAUM,GAAI;AACxB,MAAAL,IAAW;AACX,UAAIO,IAAe,CAAA;AACnB,UAAIR,EAAO,QAAQ;AACf,YAAIO,IAAMP;AACV,QAAAA,IAAS,CAAA,GACTO,EAAI,QAAQD,CAAE,GACdE,IAAeR;AAAA,MACnB;AACA,UAAIS,IAAe,WAAY;AAC3B,YAAIF,IAAMC;AACV,QAAAA,IAAe,CAAA,GACfD,EAAI,QAAQD,CAAE;AAAA,MAClB,GACII,IAAQ,WAAY;AAAE,eAAO,QAAQ,QAAO,EAAG,KAAKD,CAAY;AAAA,MAAG;AACvE,MAAAC,EAAK,GACLV,IAAS;AAAA,QACL,MAAM,SAAUK,GAAG;AACf,UAAAG,EAAa,KAAKH,CAAC,GACnBK,EAAK;AAAA,QACT;AAAA,QACA,QAAQ,SAAUC,GAAQ;AACtB,iBAAAH,IAAeA,EAAa,OAAOG,CAAM,GAClCX;AAAA,QACX;AAAA,MAChB;AAAA,IACQ;AAAA,EACR;AACI,SAAOE;AACX;AAMO,SAASU,EAAoBC,GAAS;AACzC,EAAIA,MAAY,WAAUA,IAAU,CAAA;AACpC,MAAIX,IAASL,EAAkB,IAAI;AACnC,SAAAK,EAAO,UAAUY,EAAS,EAAE,OAAO,IAAM,KAAK,GAAK,GAAID,CAAO,GACvDX;AACX;","x_google_ignoreList":[0]}
|
package/dist/index.es587.js
CHANGED
|
@@ -1,7 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
1
|
+
import * as d from "react";
|
|
2
|
+
import { styleSingleton as f } from "./index.es588.js";
|
|
3
|
+
import { noScrollbarsClassName as p, zeroRightClassName as g, fullWidthClassName as l, removedBarSizeVariable as v } from "./index.es578.js";
|
|
4
|
+
import { getGapWidth as m } from "./index.es596.js";
|
|
5
|
+
var b = f(), e = "data-scroll-locked", h = function(n, a, o, t) {
|
|
6
|
+
var r = n.left, i = n.top, s = n.right, c = n.gap;
|
|
7
|
+
return o === void 0 && (o = "margin"), `
|
|
8
|
+
.`.concat(p, ` {
|
|
9
|
+
overflow: hidden `).concat(t, `;
|
|
10
|
+
padding-right: `).concat(c, "px ").concat(t, `;
|
|
11
|
+
}
|
|
12
|
+
body[`).concat(e, `] {
|
|
13
|
+
overflow: hidden `).concat(t, `;
|
|
14
|
+
overscroll-behavior: contain;
|
|
15
|
+
`).concat([
|
|
16
|
+
a && "position: relative ".concat(t, ";"),
|
|
17
|
+
o === "margin" && `
|
|
18
|
+
padding-left: `.concat(r, `px;
|
|
19
|
+
padding-top: `).concat(i, `px;
|
|
20
|
+
padding-right: `).concat(s, `px;
|
|
21
|
+
margin-left:0;
|
|
22
|
+
margin-top:0;
|
|
23
|
+
margin-right: `).concat(c, "px ").concat(t, `;
|
|
24
|
+
`),
|
|
25
|
+
o === "padding" && "padding-right: ".concat(c, "px ").concat(t, ";")
|
|
26
|
+
].filter(Boolean).join(""), `
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.`).concat(g, ` {
|
|
30
|
+
right: `).concat(c, "px ").concat(t, `;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.`).concat(l, ` {
|
|
34
|
+
margin-right: `).concat(c, "px ").concat(t, `;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.`).concat(g, " .").concat(g, ` {
|
|
38
|
+
right: 0 `).concat(t, `;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.`).concat(l, " .").concat(l, ` {
|
|
42
|
+
margin-right: 0 `).concat(t, `;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
body[`).concat(e, `] {
|
|
46
|
+
`).concat(v, ": ").concat(c, `px;
|
|
47
|
+
}
|
|
48
|
+
`);
|
|
49
|
+
}, u = function() {
|
|
50
|
+
var n = parseInt(document.body.getAttribute(e) || "0", 10);
|
|
51
|
+
return isFinite(n) ? n : 0;
|
|
52
|
+
}, x = function() {
|
|
53
|
+
d.useEffect(function() {
|
|
54
|
+
return document.body.setAttribute(e, (u() + 1).toString()), function() {
|
|
55
|
+
var n = u() - 1;
|
|
56
|
+
n <= 0 ? document.body.removeAttribute(e) : document.body.setAttribute(e, n.toString());
|
|
57
|
+
};
|
|
58
|
+
}, []);
|
|
59
|
+
}, C = function(n) {
|
|
60
|
+
var a = n.noRelative, o = n.noImportant, t = n.gapMode, r = t === void 0 ? "margin" : t;
|
|
61
|
+
x();
|
|
62
|
+
var i = d.useMemo(function() {
|
|
63
|
+
return m(r);
|
|
64
|
+
}, [r]);
|
|
65
|
+
return d.createElement(b, { styles: h(i, !a, r, o ? "" : "!important") });
|
|
66
|
+
};
|
|
4
67
|
export {
|
|
5
|
-
|
|
68
|
+
C as RemoveScrollBar,
|
|
69
|
+
e as lockAttribute,
|
|
70
|
+
x as useLockAttribute
|
|
6
71
|
};
|
|
7
72
|
//# sourceMappingURL=index.es587.js.map
|
package/dist/index.es587.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es587.js","sources":["../node_modules/
|
|
1
|
+
{"version":3,"file":"index.es587.js","sources":["../node_modules/react-remove-scroll-bar/dist/es2015/component.js"],"sourcesContent":["import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body[\").concat(lockAttribute, \"] {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(zeroRightClassName, \" .\").concat(zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" .\").concat(fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body[\").concat(lockAttribute, \"] {\\n \").concat(removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n"],"names":["Style","styleSingleton","lockAttribute","getStyles","_a","allowRelative","gapMode","important","left","top","right","gap","noScrollbarsClassName","zeroRightClassName","fullWidthClassName","removedBarSizeVariable","getCurrentUseCounter","counter","useLockAttribute","React","newCounter","RemoveScrollBar","noRelative","noImportant","_b","getGapWidth"],"mappings":";;;;AAIA,IAAIA,IAAQC,EAAc,GACfC,IAAgB,sBAIvBC,IAAY,SAAUC,GAAIC,GAAeC,GAASC,GAAW;AAC7D,MAAIC,IAAOJ,EAAG,MAAMK,IAAML,EAAG,KAAKM,IAAQN,EAAG,OAAOO,IAAMP,EAAG;AAC7D,SAAIE,MAAY,WAAUA,IAAU,WAC7B;AAAA,KAAQ,OAAOM,GAAuB;AAAA,qBAA0B,EAAE,OAAOL,GAAW;AAAA,mBAAuB,EAAE,OAAOI,GAAK,KAAK,EAAE,OAAOJ,GAAW;AAAA;AAAA,QAAiB,EAAE,OAAOL,GAAe;AAAA,sBAA4B,EAAE,OAAOK,GAAW;AAAA;AAAA,KAA4C,EAAE,OAAO;AAAA,IACnSF,KAAiB,sBAAsB,OAAOE,GAAW,GAAG;AAAA,IAC5DD,MAAY,YACR;AAAA,oBAAuB,OAAOE,GAAM;AAAA,kBAAwB,EAAE,OAAOC,GAAK;AAAA,oBAA0B,EAAE,OAAOC,GAAO;AAAA;AAAA;AAAA,mBAAgE,EAAE,OAAOC,GAAK,KAAK,EAAE,OAAOJ,GAAW;AAAA,KAAS;AAAA,IACxOD,MAAY,aAAa,kBAAkB,OAAOK,GAAK,KAAK,EAAE,OAAOJ,GAAW,GAAG;AAAA,EAC3F,EACS,OAAO,OAAO,EACd,KAAK,EAAE,GAAG;AAAA;AAAA;AAAA,IAAgB,EAAE,OAAOM,GAAoB;AAAA,YAAiB,EAAE,OAAOF,GAAK,KAAK,EAAE,OAAOJ,GAAW;AAAA;AAAA;A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