@anoki/fse-ui 1.0.738 → 1.0.739
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.cjs10.js +1 -1
- package/dist/index.cjs130.js +1 -1
- package/dist/index.cjs131.js +1 -1
- package/dist/index.cjs132.js +1 -1
- package/dist/index.cjs133.js +1 -1
- package/dist/index.cjs134.js +1 -1
- package/dist/index.cjs135.js +1 -1
- package/dist/index.cjs136.js +1 -1
- package/dist/index.cjs137.js +1 -1
- package/dist/index.cjs138.js +1 -1
- package/dist/index.cjs139.js +1 -1
- package/dist/index.cjs140.js +1 -1
- package/dist/index.cjs141.js +1 -1
- package/dist/index.cjs142.js +1 -1
- package/dist/index.cjs143.js +1 -1
- package/dist/index.cjs144.js +1 -1
- package/dist/index.cjs145.js +1 -1
- package/dist/index.cjs146.js +1 -1
- package/dist/index.cjs147.js +1 -1
- package/dist/index.cjs148.js +1 -1
- package/dist/index.cjs149.js +1 -1
- package/dist/index.cjs150.js +1 -1
- package/dist/index.cjs151.js +1 -1
- package/dist/index.cjs152.js +1 -1
- package/dist/index.cjs156.js +1 -1
- package/dist/index.cjs157.js +1 -1
- package/dist/index.cjs158.js +1 -1
- package/dist/index.cjs160.js +1 -1
- package/dist/index.cjs161.js +1 -1
- package/dist/index.cjs162.js +1 -1
- package/dist/index.cjs163.js +1 -1
- package/dist/index.cjs164.js +1 -1
- package/dist/index.cjs165.js +1 -1
- package/dist/index.cjs166.js +1 -1
- package/dist/index.cjs167.js +1 -1
- package/dist/index.cjs168.js +1 -1
- package/dist/index.cjs170.js +1 -1
- package/dist/index.cjs171.js +1 -1
- package/dist/index.cjs172.js +1 -1
- package/dist/index.cjs173.js +1 -1
- package/dist/index.cjs174.js +1 -1
- package/dist/index.cjs175.js +1 -1
- package/dist/index.cjs176.js +1 -1
- package/dist/index.cjs178.js +1 -1
- package/dist/index.cjs179.js +1 -1
- package/dist/index.cjs180.js +1 -1
- package/dist/index.cjs181.js +1 -1
- package/dist/index.cjs182.js +1 -1
- package/dist/index.cjs183.js +1 -1
- package/dist/index.cjs184.js +1 -1
- package/dist/index.cjs185.js +1 -1
- package/dist/index.cjs191.js +1 -1
- package/dist/index.cjs214.js +1 -1
- package/dist/index.cjs214.js.map +1 -1
- package/dist/index.cjs215.js +2 -0
- package/dist/index.cjs215.js.map +1 -0
- package/dist/index.cjs22.js +1 -1
- package/dist/index.cjs224.js +1 -1
- package/dist/index.cjs231.js +1 -1
- package/dist/index.cjs234.js +1 -1
- package/dist/index.cjs235.js +1 -1
- package/dist/index.cjs242.js +1 -1
- package/dist/index.cjs25.js +1 -1
- package/dist/index.cjs252.js +1 -1
- package/dist/index.cjs256.js +1 -1
- package/dist/index.cjs258.js +1 -1
- package/dist/index.cjs266.js +1 -1
- package/dist/index.cjs275.js +1 -1
- package/dist/index.cjs283.js +1 -1
- package/dist/index.cjs284.js +1 -1
- package/dist/index.cjs285.js +1 -1
- package/dist/index.cjs325.js +1 -1
- package/dist/index.cjs365.js +1 -1
- package/dist/index.cjs372.js +1 -1
- package/dist/index.cjs378.js +1 -1
- package/dist/index.cjs379.js +1 -1
- package/dist/index.cjs380.js +1 -1
- package/dist/index.cjs380.js.map +1 -1
- package/dist/index.cjs381.js +1 -1
- package/dist/index.cjs381.js.map +1 -1
- package/dist/index.cjs382.js +1 -1
- package/dist/index.cjs382.js.map +1 -1
- package/dist/index.cjs383.js +1 -1
- package/dist/index.cjs383.js.map +1 -1
- package/dist/index.cjs384.js +1 -1
- package/dist/index.cjs384.js.map +1 -1
- package/dist/index.cjs385.js +1 -1
- package/dist/index.cjs385.js.map +1 -1
- package/dist/index.cjs386.js +1 -1
- package/dist/index.cjs386.js.map +1 -1
- package/dist/index.cjs387.js +2 -0
- package/dist/index.cjs387.js.map +1 -0
- package/dist/index.cjs388.js +1 -1
- package/dist/index.cjs388.js.map +1 -1
- package/dist/index.cjs389.js +2 -0
- package/dist/index.cjs389.js.map +1 -0
- package/dist/index.cjs390.js +2 -0
- package/dist/index.cjs390.js.map +1 -0
- package/dist/index.cjs391.js +1 -1
- package/dist/index.cjs391.js.map +1 -1
- package/dist/index.cjs392.js +1 -1
- package/dist/index.cjs392.js.map +1 -1
- package/dist/index.cjs393.js +1 -1
- package/dist/index.cjs393.js.map +1 -1
- package/dist/index.cjs394.js +1 -1
- package/dist/index.cjs394.js.map +1 -1
- package/dist/index.cjs395.js +1 -1
- package/dist/index.cjs395.js.map +1 -1
- package/dist/index.cjs396.js +1 -1
- package/dist/index.cjs397.js +1 -1
- package/dist/index.cjs397.js.map +1 -1
- package/dist/index.cjs398.js +1 -1
- package/dist/index.cjs398.js.map +1 -1
- package/dist/index.cjs399.js +1 -1
- package/dist/index.cjs399.js.map +1 -1
- package/dist/index.cjs400.js +1 -1
- package/dist/index.cjs400.js.map +1 -1
- package/dist/index.cjs401.js +1 -1
- package/dist/index.cjs401.js.map +1 -1
- package/dist/index.cjs402.js +2 -0
- package/dist/index.cjs402.js.map +1 -0
- package/dist/{index.cjs424.js → index.cjs403.js} +1 -1
- package/dist/{index.cjs424.js.map → index.cjs403.js.map} +1 -1
- package/dist/index.cjs404.js +2 -0
- package/dist/index.cjs404.js.map +1 -0
- package/dist/index.cjs405.js +2 -0
- package/dist/index.cjs405.js.map +1 -0
- package/dist/index.cjs407.js +2 -0
- package/dist/index.cjs407.js.map +1 -0
- package/dist/index.cjs410.js +1 -1
- package/dist/index.cjs410.js.map +1 -1
- package/dist/index.cjs411.js +1 -1
- package/dist/index.cjs411.js.map +1 -1
- package/dist/index.cjs412.js +2 -0
- package/dist/index.cjs412.js.map +1 -0
- package/dist/index.cjs413.js +2 -0
- package/dist/index.cjs413.js.map +1 -0
- package/dist/index.cjs417.js +2 -0
- package/dist/index.cjs417.js.map +1 -0
- package/dist/index.cjs418.js +2 -0
- package/dist/index.cjs418.js.map +1 -0
- package/dist/index.cjs419.js +1 -1
- package/dist/index.cjs419.js.map +1 -1
- package/dist/index.cjs422.js +1 -1
- package/dist/index.cjs422.js.map +1 -1
- package/dist/index.cjs426.js +1 -1
- package/dist/index.cjs426.js.map +1 -1
- package/dist/index.cjs427.js +1 -1
- package/dist/index.cjs427.js.map +1 -1
- package/dist/index.cjs428.js +1 -1
- package/dist/index.cjs428.js.map +1 -1
- package/dist/index.cjs429.js +4 -1
- package/dist/index.cjs429.js.map +1 -1
- package/dist/index.cjs430.js +1 -1
- package/dist/index.cjs430.js.map +1 -1
- package/dist/index.cjs431.js +1 -1
- package/dist/index.cjs431.js.map +1 -1
- package/dist/index.cjs432.js +1 -1
- package/dist/index.cjs432.js.map +1 -1
- package/dist/index.cjs433.js +1 -1
- package/dist/index.cjs433.js.map +1 -1
- package/dist/index.cjs437.js +1 -1
- package/dist/index.cjs437.js.map +1 -1
- package/dist/index.cjs438.js +38 -1
- package/dist/index.cjs438.js.map +1 -1
- package/dist/index.cjs439.js +1 -1
- package/dist/index.cjs439.js.map +1 -1
- package/dist/index.cjs440.js +1 -1
- package/dist/index.cjs440.js.map +1 -1
- package/dist/index.cjs441.js +1 -1
- package/dist/index.cjs441.js.map +1 -1
- package/dist/index.cjs457.js +1 -1
- package/dist/index.cjs460.js +1 -1
- package/dist/index.cjs464.js +1 -1
- package/dist/index.cjs469.js +5 -27
- package/dist/index.cjs469.js.map +1 -1
- package/dist/index.cjs471.js +1 -5
- package/dist/index.cjs471.js.map +1 -1
- package/dist/index.cjs472.js +27 -1
- package/dist/index.cjs472.js.map +1 -1
- package/dist/index.cjs473.js +1 -1
- package/dist/index.cjs473.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.cjs57.js +1 -1
- package/dist/index.cjs6.js +1 -1
- package/dist/index.cjs7.js +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs9.js +1 -1
- package/dist/index.cjs94.js +1 -1
- package/dist/index.cjs94.js.map +1 -1
- package/dist/index.es10.js +2 -2
- package/dist/index.es130.js +1 -1
- package/dist/index.es131.js +1 -1
- package/dist/index.es132.js +1 -1
- package/dist/index.es133.js +1 -1
- package/dist/index.es134.js +1 -1
- package/dist/index.es135.js +1 -1
- package/dist/index.es136.js +1 -1
- package/dist/index.es137.js +1 -1
- package/dist/index.es138.js +1 -1
- package/dist/index.es139.js +1 -1
- package/dist/index.es140.js +1 -1
- package/dist/index.es141.js +1 -1
- package/dist/index.es142.js +1 -1
- package/dist/index.es143.js +1 -1
- package/dist/index.es144.js +1 -1
- package/dist/index.es145.js +1 -1
- package/dist/index.es146.js +1 -1
- package/dist/index.es147.js +1 -1
- package/dist/index.es148.js +1 -1
- package/dist/index.es149.js +1 -1
- package/dist/index.es150.js +1 -1
- package/dist/index.es151.js +1 -1
- package/dist/index.es152.js +1 -1
- package/dist/index.es156.js +1 -1
- package/dist/index.es157.js +1 -1
- package/dist/index.es158.js +1 -1
- package/dist/index.es160.js +1 -1
- package/dist/index.es161.js +1 -1
- package/dist/index.es162.js +1 -1
- package/dist/index.es163.js +1 -1
- package/dist/index.es164.js +1 -1
- package/dist/index.es165.js +1 -1
- package/dist/index.es166.js +1 -1
- package/dist/index.es167.js +1 -1
- package/dist/index.es168.js +1 -1
- package/dist/index.es170.js +1 -1
- package/dist/index.es171.js +1 -1
- package/dist/index.es172.js +1 -1
- package/dist/index.es173.js +1 -1
- package/dist/index.es174.js +1 -1
- package/dist/index.es175.js +1 -1
- package/dist/index.es176.js +1 -1
- package/dist/index.es178.js +1 -1
- package/dist/index.es179.js +1 -1
- package/dist/index.es180.js +1 -1
- package/dist/index.es181.js +1 -1
- package/dist/index.es182.js +1 -1
- package/dist/index.es183.js +1 -1
- package/dist/index.es184.js +1 -1
- package/dist/index.es185.js +1 -1
- package/dist/index.es191.js +1 -1
- package/dist/index.es214.js +2 -27
- package/dist/index.es214.js.map +1 -1
- package/dist/index.es215.js +30 -0
- package/dist/index.es215.js.map +1 -0
- package/dist/index.es22.js +1 -1
- package/dist/index.es224.js +1 -1
- package/dist/index.es231.js +7 -7
- package/dist/index.es234.js +1 -1
- package/dist/index.es235.js +1 -1
- package/dist/index.es242.js +8 -8
- package/dist/index.es25.js +1 -1
- package/dist/index.es252.js +1 -1
- package/dist/index.es256.js +1 -1
- package/dist/index.es258.js +13 -13
- package/dist/index.es266.js +1 -1
- package/dist/index.es275.js +1 -1
- package/dist/index.es283.js +1 -1
- package/dist/index.es284.js +1 -1
- package/dist/index.es285.js +7 -7
- package/dist/index.es325.js +4 -4
- package/dist/index.es365.js +1 -1
- package/dist/index.es372.js +1 -1
- package/dist/index.es378.js +1 -1
- package/dist/index.es379.js +1 -1
- package/dist/index.es380.js +2 -7
- package/dist/index.es380.js.map +1 -1
- package/dist/index.es381.js +2 -27
- package/dist/index.es381.js.map +1 -1
- package/dist/index.es382.js +5 -67
- package/dist/index.es382.js.map +1 -1
- package/dist/index.es383.js +6 -29
- package/dist/index.es383.js.map +1 -1
- package/dist/index.es384.js +26 -32
- package/dist/index.es384.js.map +1 -1
- package/dist/index.es385.js +63 -617
- package/dist/index.es385.js.map +1 -1
- package/dist/index.es386.js +29 -10
- package/dist/index.es386.js.map +1 -1
- package/dist/index.es387.js +36 -0
- package/dist/index.es387.js.map +1 -0
- package/dist/index.es388.js +620 -13
- package/dist/index.es388.js.map +1 -1
- package/dist/index.es389.js +14 -0
- package/dist/index.es389.js.map +1 -0
- package/dist/index.es390.js +14 -0
- package/dist/index.es390.js.map +1 -0
- package/dist/index.es391.js +52 -5
- package/dist/index.es391.js.map +1 -1
- package/dist/index.es392.js +45 -24
- package/dist/index.es392.js.map +1 -1
- package/dist/index.es393.js +7 -68
- package/dist/index.es393.js.map +1 -1
- package/dist/index.es394.js +124 -14
- package/dist/index.es394.js.map +1 -1
- package/dist/index.es395.js +12 -122
- package/dist/index.es395.js.map +1 -1
- package/dist/index.es396.js +3 -3
- package/dist/index.es397.js +217 -13
- package/dist/index.es397.js.map +1 -1
- package/dist/index.es398.js +13 -14
- package/dist/index.es398.js.map +1 -1
- package/dist/index.es399.js +69 -9
- package/dist/index.es399.js.map +1 -1
- package/dist/index.es400.js +176 -48
- package/dist/index.es400.js.map +1 -1
- package/dist/index.es401.js +49 -52
- package/dist/index.es401.js.map +1 -1
- package/dist/index.es402.js +12 -0
- package/dist/index.es402.js.map +1 -0
- package/dist/{index.es424.js → index.es403.js} +1 -1
- package/dist/{index.es424.js.map → index.es403.js.map} +1 -1
- package/dist/index.es404.js +9 -0
- package/dist/index.es404.js.map +1 -0
- package/dist/index.es405.js +28 -0
- package/dist/index.es405.js.map +1 -0
- package/dist/index.es407.js +18 -0
- package/dist/index.es407.js.map +1 -0
- package/dist/index.es410.js +12 -2
- package/dist/index.es410.js.map +1 -1
- package/dist/index.es411.js +205 -2
- package/dist/index.es411.js.map +1 -1
- package/dist/index.es412.js +25 -0
- package/dist/index.es412.js.map +1 -0
- package/dist/index.es413.js +396 -0
- package/dist/index.es413.js.map +1 -0
- package/dist/index.es417.js +28 -0
- package/dist/index.es417.js.map +1 -0
- package/dist/index.es418.js +32 -0
- package/dist/index.es418.js.map +1 -0
- package/dist/index.es419.js +5 -11
- package/dist/index.es419.js.map +1 -1
- package/dist/index.es422.js +14 -217
- package/dist/index.es422.js.map +1 -1
- package/dist/index.es426.js +5 -205
- package/dist/index.es426.js.map +1 -1
- package/dist/index.es427.js +3 -22
- package/dist/index.es427.js.map +1 -1
- package/dist/index.es428.js +20 -389
- package/dist/index.es428.js.map +1 -1
- package/dist/index.es429.js +109 -5
- package/dist/index.es429.js.map +1 -1
- package/dist/index.es430.js +14 -23
- package/dist/index.es430.js.map +1 -1
- package/dist/index.es431.js +521 -27
- package/dist/index.es431.js.map +1 -1
- package/dist/index.es432.js +127 -5
- package/dist/index.es432.js.map +1 -1
- package/dist/index.es433.js +129 -5
- package/dist/index.es433.js.map +1 -1
- package/dist/index.es437.js +64 -15
- package/dist/index.es437.js.map +1 -1
- package/dist/index.es438.js +64 -518
- package/dist/index.es438.js.map +1 -1
- package/dist/index.es439.js +8 -126
- package/dist/index.es439.js.map +1 -1
- package/dist/index.es440.js +13 -128
- package/dist/index.es440.js.map +1 -1
- package/dist/index.es441.js +61 -64
- package/dist/index.es441.js.map +1 -1
- package/dist/index.es457.js +2 -2
- package/dist/index.es460.js +1 -1
- package/dist/index.es464.js +9 -9
- package/dist/index.es469.js +34 -3669
- package/dist/index.es469.js.map +1 -1
- package/dist/index.es470.js +2 -2
- package/dist/index.es471.js +2 -40
- package/dist/index.es471.js.map +1 -1
- package/dist/index.es472.js +3675 -2
- package/dist/index.es472.js.map +1 -1
- package/dist/index.es473.js +2 -2
- package/dist/index.es473.js.map +1 -1
- package/dist/index.es481.js +2 -6
- package/dist/index.es481.js.map +1 -1
- package/dist/index.es482.js +6 -2
- package/dist/index.es482.js.map +1 -1
- package/dist/index.es483.js +1 -1
- package/dist/index.es57.js +1 -1
- package/dist/index.es6.js +1 -1
- package/dist/index.es7.js +1 -1
- package/dist/index.es8.js +1 -1
- package/dist/index.es9.js +2 -2
- package/dist/index.es94.js +34 -26
- package/dist/index.es94.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.cjs216.js +0 -2
- package/dist/index.cjs216.js.map +0 -1
- package/dist/index.cjs420.js +0 -2
- package/dist/index.cjs420.js.map +0 -1
- package/dist/index.cjs421.js +0 -2
- package/dist/index.cjs421.js.map +0 -1
- package/dist/index.cjs423.js +0 -2
- package/dist/index.cjs423.js.map +0 -1
- package/dist/index.cjs425.js +0 -2
- package/dist/index.cjs425.js.map +0 -1
- package/dist/index.cjs434.js +0 -2
- package/dist/index.cjs434.js.map +0 -1
- package/dist/index.cjs435.js +0 -2
- package/dist/index.cjs435.js.map +0 -1
- package/dist/index.cjs436.js +0 -5
- package/dist/index.cjs436.js.map +0 -1
- package/dist/index.cjs442.js +0 -39
- package/dist/index.cjs442.js.map +0 -1
- package/dist/index.cjs443.js +0 -2
- package/dist/index.cjs443.js.map +0 -1
- package/dist/index.cjs444.js +0 -2
- package/dist/index.cjs444.js.map +0 -1
- package/dist/index.cjs445.js +0 -2
- package/dist/index.cjs445.js.map +0 -1
- package/dist/index.es216.js +0 -5
- package/dist/index.es216.js.map +0 -1
- package/dist/index.es420.js +0 -49
- package/dist/index.es420.js.map +0 -1
- package/dist/index.es421.js +0 -11
- package/dist/index.es421.js.map +0 -1
- package/dist/index.es423.js +0 -181
- package/dist/index.es423.js.map +0 -1
- package/dist/index.es425.js +0 -15
- package/dist/index.es425.js.map +0 -1
- package/dist/index.es434.js +0 -6
- package/dist/index.es434.js.map +0 -1
- package/dist/index.es435.js +0 -27
- package/dist/index.es435.js.map +0 -1
- package/dist/index.es436.js +0 -113
- package/dist/index.es436.js.map +0 -1
- package/dist/index.es442.js +0 -72
- package/dist/index.es442.js.map +0 -1
- package/dist/index.es443.js +0 -12
- package/dist/index.es443.js.map +0 -1
- package/dist/index.es444.js +0 -17
- package/dist/index.es444.js.map +0 -1
- package/dist/index.es445.js +0 -65
- package/dist/index.es445.js.map +0 -1
- /package/dist/components/ui/{DoctorConfirmModal/DoctorConfirmModalContent/DoctorConfirmModalContent.css → ConsentModal/ConsentModalContent/ConsentModalContent.css} +0 -0
package/dist/index.es429.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es429.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
1
|
+
{"version":3,"file":"index.es429.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, { 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,oB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IACxCwC,IAAQxC,EAAM,cAAcG,GAAO,EAAE,QAAQV,EAAcC,CAAE,EAAG,CAAA,IAAI;AAAA,IACpE6C,IAAkBvC,EAAM,cAAcyC,GAAiB,EAAE,SAAS3C,EAAM,SAAS,IAAI;AAAA,EAAI;AACjG;AACA,SAASmC,EAAyBL,GAAM;AAEpC,WADIc,IAAe,MACZd,MAAS;AACZ,IAAIA,aAAgB,eAChBc,IAAed,EAAK,MACpBA,IAAOA,EAAK,OAEhBA,IAAOA,EAAK;AAEhB,SAAOc;AACX;","x_google_ignoreList":[0]}
|
package/dist/index.es430.js
CHANGED
@@ -1,28 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
import { __rest as o, __assign as d } from "./index.es417.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));
|
9
11
|
};
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
14
|
-
for (var o = 0, r = Object.getOwnPropertySymbols(t); o < r.length; o++)
|
15
|
-
e.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[o]) && (n[r[o]] = t[r[o]]);
|
16
|
-
return n;
|
17
|
-
}
|
18
|
-
function l(t, e, n) {
|
19
|
-
if (n || arguments.length === 2) for (var r = 0, o = e.length, a; r < o; r++)
|
20
|
-
(a || !(r in e)) && (a || (a = Array.prototype.slice.call(e, 0, r)), a[r] = e[r]);
|
21
|
-
return t.concat(a || Array.prototype.slice.call(e));
|
12
|
+
i.isSideCarExport = !0;
|
13
|
+
function p(r, e) {
|
14
|
+
return r.useMedium(e), i;
|
22
15
|
}
|
23
16
|
export {
|
24
|
-
p as
|
25
|
-
c as __rest,
|
26
|
-
l as __spreadArray
|
17
|
+
p as exportSidecar
|
27
18
|
};
|
28
19
|
//# sourceMappingURL=index.es430.js.map
|
package/dist/index.es430.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es430.js","sources":["../node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n"],"names":["__assign","t","s","i","n","p","__rest","__spreadArray","to","from","pack","l","ar"],"mappings":"AA+BU,IAACA,IAAW,WAAW;AAC/B,SAAAA,IAAW,OAAO,UAAU,SAAkBC,GAAG;AAC7C,aAASC,GAAGC,IAAI,GAAGC,IAAI,UAAU,QAAQD,IAAIC,GAAGD,KAAK;AACjD,MAAAD,IAAI,UAAUC,CAAC;AACf,eAASE,KAAKH,EAAG,CAAI,OAAO,UAAU,eAAe,KAAKA,GAAGG,CAAC,MAAGJ,EAAEI,CAAC,IAAIH,EAAEG,CAAC;AAAA,IACrF;AACM,WAAOJ;AAAA,EACb,GACSD,EAAS,MAAM,MAAM,SAAS;AACvC;AAEO,SAASM,EAAOJ,GAAG,GAAG;AAC3B,MAAID,IAAI,CAAE;AACV,WAASI,KAAKH,EAAG,CAAI,OAAO,UAAU,eAAe,KAAKA,GAAGG,CAAC,KAAK,EAAE,QAAQA,CAAC,IAAI,MAC9EJ,EAAEI,CAAC,IAAIH,EAAEG,CAAC;AACd,MAAIH,KAAK,QAAQ,OAAO,OAAO,yBAA0B;AACrD,aAASC,IAAI,GAAGE,IAAI,OAAO,sBAAsBH,CAAC,GAAGC,IAAIE,EAAE,QAAQF;AAC/D,MAAI,EAAE,QAAQE,EAAEF,CAAC,CAAC,IAAI,KAAK,OAAO,UAAU,qBAAqB,KAAKD,GAAGG,EAAEF,CAAC,CAAC,MACzEF,EAAEI,EAAEF,CAAC,CAAC,IAAID,EAAEG,EAAEF,CAAC,CAAC;AAE5B,SAAOF;AACT;AAiKO,SAASM,EAAcC,GAAIC,GAAMC,GAAM;AAC5C,MAAIA,KAAQ,UAAU,WAAW,EAAG,UAASP,IAAI,GAAGQ,IAAIF,EAAK,QAAQG,GAAIT,IAAIQ,GAAGR;AAC5E,KAAIS,KAAM,EAAET,KAAKM,QACRG,MAAIA,IAAK,MAAM,UAAU,MAAM,KAAKH,GAAM,GAAGN,CAAC,IACnDS,EAAGT,CAAC,IAAIM,EAAKN,CAAC;AAGtB,SAAOK,EAAG,OAAOI,KAAM,MAAM,UAAU,MAAM,KAAKH,CAAI,CAAC;AACzD;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es430.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,KAAM;AAC3B,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.es431.js
CHANGED
@@ -1,32 +1,526 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
1
|
+
import { evaluate as E, getSideAxis as V, getSide as B, clamp as X, getOppositePlacement as Z, getExpandedPlacements as ee, getOppositeAxisPlacements as te, getAlignmentSides as ne, getAlignment as z, min as $, max as W, getPaddingObject as J, rectToClientRect as _, getOppositeAxis as K, getAlignmentAxis as N, sides as ie, getAxisLength as Q } from "./index.es432.js";
|
2
|
+
function I(t, e, d) {
|
3
|
+
let {
|
4
|
+
reference: a,
|
5
|
+
floating: r
|
6
|
+
} = t;
|
7
|
+
const n = V(e), o = N(e), m = Q(o), g = B(e), h = n === "y", c = a.x + a.width / 2 - r.width / 2, s = a.y + a.height / 2 - r.height / 2, f = a[m] / 2 - r[m] / 2;
|
8
|
+
let i;
|
9
|
+
switch (g) {
|
10
|
+
case "top":
|
11
|
+
i = {
|
12
|
+
x: c,
|
13
|
+
y: a.y - r.height
|
14
|
+
};
|
15
|
+
break;
|
16
|
+
case "bottom":
|
17
|
+
i = {
|
18
|
+
x: c,
|
19
|
+
y: a.y + a.height
|
20
|
+
};
|
21
|
+
break;
|
22
|
+
case "right":
|
23
|
+
i = {
|
24
|
+
x: a.x + a.width,
|
25
|
+
y: s
|
26
|
+
};
|
27
|
+
break;
|
28
|
+
case "left":
|
29
|
+
i = {
|
30
|
+
x: a.x - r.width,
|
31
|
+
y: s
|
32
|
+
};
|
33
|
+
break;
|
34
|
+
default:
|
35
|
+
i = {
|
36
|
+
x: a.x,
|
37
|
+
y: a.y
|
38
|
+
};
|
39
|
+
}
|
40
|
+
switch (z(e)) {
|
41
|
+
case "start":
|
42
|
+
i[o] -= f * (d && h ? -1 : 1);
|
43
|
+
break;
|
44
|
+
case "end":
|
45
|
+
i[o] += f * (d && h ? -1 : 1);
|
46
|
+
break;
|
47
|
+
}
|
48
|
+
return i;
|
49
|
+
}
|
50
|
+
const ae = async (t, e, d) => {
|
51
|
+
const {
|
52
|
+
placement: a = "bottom",
|
53
|
+
strategy: r = "absolute",
|
54
|
+
middleware: n = [],
|
55
|
+
platform: o
|
56
|
+
} = d, m = n.filter(Boolean), g = await (o.isRTL == null ? void 0 : o.isRTL(e));
|
57
|
+
let h = await o.getElementRects({
|
58
|
+
reference: t,
|
59
|
+
floating: e,
|
60
|
+
strategy: r
|
61
|
+
}), {
|
62
|
+
x: c,
|
63
|
+
y: s
|
64
|
+
} = I(h, a, g), f = a, i = {}, l = 0;
|
65
|
+
for (let u = 0; u < m.length; u++) {
|
66
|
+
const {
|
67
|
+
name: x,
|
68
|
+
fn: y
|
69
|
+
} = m[u], {
|
70
|
+
x: A,
|
71
|
+
y: p,
|
72
|
+
data: v,
|
73
|
+
reset: w
|
74
|
+
} = await y({
|
75
|
+
x: c,
|
76
|
+
y: s,
|
77
|
+
initialPlacement: a,
|
78
|
+
placement: f,
|
79
|
+
strategy: r,
|
80
|
+
middlewareData: i,
|
81
|
+
rects: h,
|
82
|
+
platform: o,
|
83
|
+
elements: {
|
84
|
+
reference: t,
|
85
|
+
floating: e
|
86
|
+
}
|
87
|
+
});
|
88
|
+
c = A ?? c, s = p ?? s, i = {
|
89
|
+
...i,
|
90
|
+
[x]: {
|
91
|
+
...i[x],
|
92
|
+
...v
|
93
|
+
}
|
94
|
+
}, w && l <= 50 && (l++, typeof w == "object" && (w.placement && (f = w.placement), w.rects && (h = w.rects === !0 ? await o.getElementRects({
|
95
|
+
reference: t,
|
96
|
+
floating: e,
|
97
|
+
strategy: r
|
98
|
+
}) : w.rects), {
|
99
|
+
x: c,
|
100
|
+
y: s
|
101
|
+
} = I(h, f, g)), u = -1);
|
102
|
+
}
|
103
|
+
return {
|
104
|
+
x: c,
|
105
|
+
y: s,
|
106
|
+
placement: f,
|
107
|
+
strategy: r,
|
108
|
+
middlewareData: i
|
109
|
+
};
|
24
110
|
};
|
25
|
-
|
26
|
-
|
27
|
-
|
111
|
+
async function Y(t, e) {
|
112
|
+
var d;
|
113
|
+
e === void 0 && (e = {});
|
114
|
+
const {
|
115
|
+
x: a,
|
116
|
+
y: r,
|
117
|
+
platform: n,
|
118
|
+
rects: o,
|
119
|
+
elements: m,
|
120
|
+
strategy: g
|
121
|
+
} = t, {
|
122
|
+
boundary: h = "clippingAncestors",
|
123
|
+
rootBoundary: c = "viewport",
|
124
|
+
elementContext: s = "floating",
|
125
|
+
altBoundary: f = !1,
|
126
|
+
padding: i = 0
|
127
|
+
} = E(e, t), l = J(i), x = m[f ? s === "floating" ? "reference" : "floating" : s], y = _(await n.getClippingRect({
|
128
|
+
element: (d = await (n.isElement == null ? void 0 : n.isElement(x))) == null || d ? x : x.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(m.floating)),
|
129
|
+
boundary: h,
|
130
|
+
rootBoundary: c,
|
131
|
+
strategy: g
|
132
|
+
})), A = s === "floating" ? {
|
133
|
+
x: a,
|
134
|
+
y: r,
|
135
|
+
width: o.floating.width,
|
136
|
+
height: o.floating.height
|
137
|
+
} : o.reference, p = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(m.floating)), v = await (n.isElement == null ? void 0 : n.isElement(p)) ? await (n.getScale == null ? void 0 : n.getScale(p)) || {
|
138
|
+
x: 1,
|
139
|
+
y: 1
|
140
|
+
} : {
|
141
|
+
x: 1,
|
142
|
+
y: 1
|
143
|
+
}, w = _(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
|
144
|
+
elements: m,
|
145
|
+
rect: A,
|
146
|
+
offsetParent: p,
|
147
|
+
strategy: g
|
148
|
+
}) : A);
|
149
|
+
return {
|
150
|
+
top: (y.top - w.top + l.top) / v.y,
|
151
|
+
bottom: (w.bottom - y.bottom + l.bottom) / v.y,
|
152
|
+
left: (y.left - w.left + l.left) / v.x,
|
153
|
+
right: (w.right - y.right + l.right) / v.x
|
154
|
+
};
|
155
|
+
}
|
156
|
+
const ce = (t) => ({
|
157
|
+
name: "arrow",
|
158
|
+
options: t,
|
159
|
+
async fn(e) {
|
160
|
+
const {
|
161
|
+
x: d,
|
162
|
+
y: a,
|
163
|
+
placement: r,
|
164
|
+
rects: n,
|
165
|
+
platform: o,
|
166
|
+
elements: m,
|
167
|
+
middlewareData: g
|
168
|
+
} = e, {
|
169
|
+
element: h,
|
170
|
+
padding: c = 0
|
171
|
+
} = E(t, e) || {};
|
172
|
+
if (h == null)
|
173
|
+
return {};
|
174
|
+
const s = J(c), f = {
|
175
|
+
x: d,
|
176
|
+
y: a
|
177
|
+
}, i = N(r), l = Q(i), u = await o.getDimensions(h), x = i === "y", y = x ? "top" : "left", A = x ? "bottom" : "right", p = x ? "clientHeight" : "clientWidth", v = n.reference[l] + n.reference[i] - f[i] - n.floating[l], w = f[i] - n.reference[i], O = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
|
178
|
+
let P = O ? O[p] : 0;
|
179
|
+
(!P || !await (o.isElement == null ? void 0 : o.isElement(O))) && (P = m.floating[p] || n.floating[l]);
|
180
|
+
const D = v / 2 - w / 2, R = P / 2 - u[l] / 2 - 1, C = $(s[y], R), T = $(s[A], R), S = C, L = P - u[l] - T, b = P / 2 - u[l] / 2 + D, j = X(S, b, L), M = !g.arrow && z(r) != null && b !== j && n.reference[l] / 2 - (b < S ? C : T) - u[l] / 2 < 0, k = M ? b < S ? b - S : b - L : 0;
|
181
|
+
return {
|
182
|
+
[i]: f[i] + k,
|
183
|
+
data: {
|
184
|
+
[i]: j,
|
185
|
+
centerOffset: b - j - k,
|
186
|
+
...M && {
|
187
|
+
alignmentOffset: k
|
188
|
+
}
|
189
|
+
},
|
190
|
+
reset: M
|
191
|
+
};
|
192
|
+
}
|
193
|
+
}), le = function(t) {
|
194
|
+
return t === void 0 && (t = {}), {
|
195
|
+
name: "flip",
|
196
|
+
options: t,
|
197
|
+
async fn(e) {
|
198
|
+
var d, a;
|
199
|
+
const {
|
200
|
+
placement: r,
|
201
|
+
middlewareData: n,
|
202
|
+
rects: o,
|
203
|
+
initialPlacement: m,
|
204
|
+
platform: g,
|
205
|
+
elements: h
|
206
|
+
} = e, {
|
207
|
+
mainAxis: c = !0,
|
208
|
+
crossAxis: s = !0,
|
209
|
+
fallbackPlacements: f,
|
210
|
+
fallbackStrategy: i = "bestFit",
|
211
|
+
fallbackAxisSideDirection: l = "none",
|
212
|
+
flipAlignment: u = !0,
|
213
|
+
...x
|
214
|
+
} = E(t, e);
|
215
|
+
if ((d = n.arrow) != null && d.alignmentOffset)
|
216
|
+
return {};
|
217
|
+
const y = B(r), A = V(m), p = B(m) === m, v = await (g.isRTL == null ? void 0 : g.isRTL(h.floating)), w = f || (p || !u ? [Z(m)] : ee(m)), O = l !== "none";
|
218
|
+
!f && O && w.push(...te(m, u, l, v));
|
219
|
+
const P = [m, ...w], D = await Y(e, x), R = [];
|
220
|
+
let C = ((a = n.flip) == null ? void 0 : a.overflows) || [];
|
221
|
+
if (c && R.push(D[y]), s) {
|
222
|
+
const b = ne(r, o, v);
|
223
|
+
R.push(D[b[0]], D[b[1]]);
|
224
|
+
}
|
225
|
+
if (C = [...C, {
|
226
|
+
placement: r,
|
227
|
+
overflows: R
|
228
|
+
}], !R.every((b) => b <= 0)) {
|
229
|
+
var T, S;
|
230
|
+
const b = (((T = n.flip) == null ? void 0 : T.index) || 0) + 1, j = P[b];
|
231
|
+
if (j)
|
232
|
+
return {
|
233
|
+
data: {
|
234
|
+
index: b,
|
235
|
+
overflows: C
|
236
|
+
},
|
237
|
+
reset: {
|
238
|
+
placement: j
|
239
|
+
}
|
240
|
+
};
|
241
|
+
let M = (S = C.filter((k) => k.overflows[0] <= 0).sort((k, H) => k.overflows[1] - H.overflows[1])[0]) == null ? void 0 : S.placement;
|
242
|
+
if (!M)
|
243
|
+
switch (i) {
|
244
|
+
case "bestFit": {
|
245
|
+
var L;
|
246
|
+
const k = (L = C.filter((H) => {
|
247
|
+
if (O) {
|
248
|
+
const F = V(H.placement);
|
249
|
+
return F === A || // Create a bias to the `y` side axis due to horizontal
|
250
|
+
// reading directions favoring greater width.
|
251
|
+
F === "y";
|
252
|
+
}
|
253
|
+
return !0;
|
254
|
+
}).map((H) => [H.placement, H.overflows.filter((F) => F > 0).reduce((F, U) => F + U, 0)]).sort((H, F) => H[1] - F[1])[0]) == null ? void 0 : L[0];
|
255
|
+
k && (M = k);
|
256
|
+
break;
|
257
|
+
}
|
258
|
+
case "initialPlacement":
|
259
|
+
M = m;
|
260
|
+
break;
|
261
|
+
}
|
262
|
+
if (r !== M)
|
263
|
+
return {
|
264
|
+
reset: {
|
265
|
+
placement: M
|
266
|
+
}
|
267
|
+
};
|
268
|
+
}
|
269
|
+
return {};
|
270
|
+
}
|
271
|
+
};
|
272
|
+
};
|
273
|
+
function q(t, e) {
|
274
|
+
return {
|
275
|
+
top: t.top - e.height,
|
276
|
+
right: t.right - e.width,
|
277
|
+
bottom: t.bottom - e.height,
|
278
|
+
left: t.left - e.width
|
279
|
+
};
|
280
|
+
}
|
281
|
+
function G(t) {
|
282
|
+
return ie.some((e) => t[e] >= 0);
|
283
|
+
}
|
284
|
+
const re = function(t) {
|
285
|
+
return t === void 0 && (t = {}), {
|
286
|
+
name: "hide",
|
287
|
+
options: t,
|
288
|
+
async fn(e) {
|
289
|
+
const {
|
290
|
+
rects: d
|
291
|
+
} = e, {
|
292
|
+
strategy: a = "referenceHidden",
|
293
|
+
...r
|
294
|
+
} = E(t, e);
|
295
|
+
switch (a) {
|
296
|
+
case "referenceHidden": {
|
297
|
+
const n = await Y(e, {
|
298
|
+
...r,
|
299
|
+
elementContext: "reference"
|
300
|
+
}), o = q(n, d.reference);
|
301
|
+
return {
|
302
|
+
data: {
|
303
|
+
referenceHiddenOffsets: o,
|
304
|
+
referenceHidden: G(o)
|
305
|
+
}
|
306
|
+
};
|
307
|
+
}
|
308
|
+
case "escaped": {
|
309
|
+
const n = await Y(e, {
|
310
|
+
...r,
|
311
|
+
altBoundary: !0
|
312
|
+
}), o = q(n, d.floating);
|
313
|
+
return {
|
314
|
+
data: {
|
315
|
+
escapedOffsets: o,
|
316
|
+
escaped: G(o)
|
317
|
+
}
|
318
|
+
};
|
319
|
+
}
|
320
|
+
default:
|
321
|
+
return {};
|
322
|
+
}
|
323
|
+
}
|
324
|
+
};
|
325
|
+
};
|
326
|
+
async function se(t, e) {
|
327
|
+
const {
|
328
|
+
placement: d,
|
329
|
+
platform: a,
|
330
|
+
elements: r
|
331
|
+
} = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = B(d), m = z(d), g = V(d) === "y", h = ["left", "top"].includes(o) ? -1 : 1, c = n && g ? -1 : 1, s = E(e, t);
|
332
|
+
let {
|
333
|
+
mainAxis: f,
|
334
|
+
crossAxis: i,
|
335
|
+
alignmentAxis: l
|
336
|
+
} = typeof s == "number" ? {
|
337
|
+
mainAxis: s,
|
338
|
+
crossAxis: 0,
|
339
|
+
alignmentAxis: null
|
340
|
+
} : {
|
341
|
+
mainAxis: s.mainAxis || 0,
|
342
|
+
crossAxis: s.crossAxis || 0,
|
343
|
+
alignmentAxis: s.alignmentAxis
|
344
|
+
};
|
345
|
+
return m && typeof l == "number" && (i = m === "end" ? l * -1 : l), g ? {
|
346
|
+
x: i * c,
|
347
|
+
y: f * h
|
348
|
+
} : {
|
349
|
+
x: f * h,
|
350
|
+
y: i * c
|
351
|
+
};
|
352
|
+
}
|
353
|
+
const fe = function(t) {
|
354
|
+
return t === void 0 && (t = 0), {
|
355
|
+
name: "offset",
|
356
|
+
options: t,
|
357
|
+
async fn(e) {
|
358
|
+
var d, a;
|
359
|
+
const {
|
360
|
+
x: r,
|
361
|
+
y: n,
|
362
|
+
placement: o,
|
363
|
+
middlewareData: m
|
364
|
+
} = e, g = await se(e, t);
|
365
|
+
return o === ((d = m.offset) == null ? void 0 : d.placement) && (a = m.arrow) != null && a.alignmentOffset ? {} : {
|
366
|
+
x: r + g.x,
|
367
|
+
y: n + g.y,
|
368
|
+
data: {
|
369
|
+
...g,
|
370
|
+
placement: o
|
371
|
+
}
|
372
|
+
};
|
373
|
+
}
|
374
|
+
};
|
375
|
+
}, me = function(t) {
|
376
|
+
return t === void 0 && (t = {}), {
|
377
|
+
name: "shift",
|
378
|
+
options: t,
|
379
|
+
async fn(e) {
|
380
|
+
const {
|
381
|
+
x: d,
|
382
|
+
y: a,
|
383
|
+
placement: r
|
384
|
+
} = e, {
|
385
|
+
mainAxis: n = !0,
|
386
|
+
crossAxis: o = !1,
|
387
|
+
limiter: m = {
|
388
|
+
fn: (x) => {
|
389
|
+
let {
|
390
|
+
x: y,
|
391
|
+
y: A
|
392
|
+
} = x;
|
393
|
+
return {
|
394
|
+
x: y,
|
395
|
+
y: A
|
396
|
+
};
|
397
|
+
}
|
398
|
+
},
|
399
|
+
...g
|
400
|
+
} = E(t, e), h = {
|
401
|
+
x: d,
|
402
|
+
y: a
|
403
|
+
}, c = await Y(e, g), s = V(B(r)), f = K(s);
|
404
|
+
let i = h[f], l = h[s];
|
405
|
+
if (n) {
|
406
|
+
const x = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", A = i + c[x], p = i - c[y];
|
407
|
+
i = X(A, i, p);
|
408
|
+
}
|
409
|
+
if (o) {
|
410
|
+
const x = s === "y" ? "top" : "left", y = s === "y" ? "bottom" : "right", A = l + c[x], p = l - c[y];
|
411
|
+
l = X(A, l, p);
|
412
|
+
}
|
413
|
+
const u = m.fn({
|
414
|
+
...e,
|
415
|
+
[f]: i,
|
416
|
+
[s]: l
|
417
|
+
});
|
418
|
+
return {
|
419
|
+
...u,
|
420
|
+
data: {
|
421
|
+
x: u.x - d,
|
422
|
+
y: u.y - a,
|
423
|
+
enabled: {
|
424
|
+
[f]: n,
|
425
|
+
[s]: o
|
426
|
+
}
|
427
|
+
}
|
428
|
+
};
|
429
|
+
}
|
430
|
+
};
|
431
|
+
}, de = function(t) {
|
432
|
+
return t === void 0 && (t = {}), {
|
433
|
+
options: t,
|
434
|
+
fn(e) {
|
435
|
+
const {
|
436
|
+
x: d,
|
437
|
+
y: a,
|
438
|
+
placement: r,
|
439
|
+
rects: n,
|
440
|
+
middlewareData: o
|
441
|
+
} = e, {
|
442
|
+
offset: m = 0,
|
443
|
+
mainAxis: g = !0,
|
444
|
+
crossAxis: h = !0
|
445
|
+
} = E(t, e), c = {
|
446
|
+
x: d,
|
447
|
+
y: a
|
448
|
+
}, s = V(r), f = K(s);
|
449
|
+
let i = c[f], l = c[s];
|
450
|
+
const u = E(m, e), x = typeof u == "number" ? {
|
451
|
+
mainAxis: u,
|
452
|
+
crossAxis: 0
|
453
|
+
} : {
|
454
|
+
mainAxis: 0,
|
455
|
+
crossAxis: 0,
|
456
|
+
...u
|
457
|
+
};
|
458
|
+
if (g) {
|
459
|
+
const p = f === "y" ? "height" : "width", v = n.reference[f] - n.floating[p] + x.mainAxis, w = n.reference[f] + n.reference[p] - x.mainAxis;
|
460
|
+
i < v ? i = v : i > w && (i = w);
|
461
|
+
}
|
462
|
+
if (h) {
|
463
|
+
var y, A;
|
464
|
+
const p = f === "y" ? "width" : "height", v = ["top", "left"].includes(B(r)), w = n.reference[s] - n.floating[p] + (v && ((y = o.offset) == null ? void 0 : y[s]) || 0) + (v ? 0 : x.crossAxis), O = n.reference[s] + n.reference[p] + (v ? 0 : ((A = o.offset) == null ? void 0 : A[s]) || 0) - (v ? x.crossAxis : 0);
|
465
|
+
l < w ? l = w : l > O && (l = O);
|
466
|
+
}
|
467
|
+
return {
|
468
|
+
[f]: i,
|
469
|
+
[s]: l
|
470
|
+
};
|
471
|
+
}
|
472
|
+
};
|
473
|
+
}, xe = function(t) {
|
474
|
+
return t === void 0 && (t = {}), {
|
475
|
+
name: "size",
|
476
|
+
options: t,
|
477
|
+
async fn(e) {
|
478
|
+
var d, a;
|
479
|
+
const {
|
480
|
+
placement: r,
|
481
|
+
rects: n,
|
482
|
+
platform: o,
|
483
|
+
elements: m
|
484
|
+
} = e, {
|
485
|
+
apply: g = () => {
|
486
|
+
},
|
487
|
+
...h
|
488
|
+
} = E(t, e), c = await Y(e, h), s = B(r), f = z(r), i = V(r) === "y", {
|
489
|
+
width: l,
|
490
|
+
height: u
|
491
|
+
} = n.floating;
|
492
|
+
let x, y;
|
493
|
+
s === "top" || s === "bottom" ? (x = s, y = f === (await (o.isRTL == null ? void 0 : o.isRTL(m.floating)) ? "start" : "end") ? "left" : "right") : (y = s, x = f === "end" ? "top" : "bottom");
|
494
|
+
const A = u - c.top - c.bottom, p = l - c.left - c.right, v = $(u - c[x], A), w = $(l - c[y], p), O = !e.middlewareData.shift;
|
495
|
+
let P = v, D = w;
|
496
|
+
if ((d = e.middlewareData.shift) != null && d.enabled.x && (D = p), (a = e.middlewareData.shift) != null && a.enabled.y && (P = A), O && !f) {
|
497
|
+
const C = W(c.left, 0), T = W(c.right, 0), S = W(c.top, 0), L = W(c.bottom, 0);
|
498
|
+
i ? D = l - 2 * (C !== 0 || T !== 0 ? C + T : W(c.left, c.right)) : P = u - 2 * (S !== 0 || L !== 0 ? S + L : W(c.top, c.bottom));
|
499
|
+
}
|
500
|
+
await g({
|
501
|
+
...e,
|
502
|
+
availableWidth: D,
|
503
|
+
availableHeight: P
|
504
|
+
});
|
505
|
+
const R = await o.getDimensions(m.floating);
|
506
|
+
return l !== R.width || u !== R.height ? {
|
507
|
+
reset: {
|
508
|
+
rects: !0
|
509
|
+
}
|
510
|
+
} : {};
|
511
|
+
}
|
512
|
+
};
|
28
513
|
};
|
29
514
|
export {
|
30
|
-
|
515
|
+
ce as arrow,
|
516
|
+
ae as computePosition,
|
517
|
+
Y as detectOverflow,
|
518
|
+
le as flip,
|
519
|
+
re as hide,
|
520
|
+
de as limitShift,
|
521
|
+
fe as offset,
|
522
|
+
_ as rectToClientRect,
|
523
|
+
me as shift,
|
524
|
+
xe as size
|
31
525
|
};
|
32
526
|
//# sourceMappingURL=index.es431.js.map
|