@rpcbase/ui 0.287.0 → 0.289.0
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/assets/sha256.worker-DNtOSCbM.js.map +1 -0
- package/dist/components/FilesUploadField/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index10.js.map +1 -1
- package/dist/index100.js.map +1 -1
- package/dist/index101.js.map +1 -1
- package/dist/index102.js.map +1 -1
- package/dist/index103.js.map +1 -1
- package/dist/index104.js.map +1 -1
- package/dist/index105.js.map +1 -1
- package/dist/index106.js.map +1 -1
- package/dist/index107.js.map +1 -1
- package/dist/index108.js.map +1 -1
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +96 -17
- package/dist/index11.js.map +1 -1
- package/dist/index110.js.map +1 -1
- package/dist/index111.js.map +1 -1
- package/dist/index112.js.map +1 -1
- package/dist/index113.js.map +1 -1
- package/dist/index114.js.map +1 -1
- package/dist/index115.js.map +1 -1
- package/dist/index116.js.map +1 -1
- package/dist/index117.js.map +1 -1
- package/dist/index118.js.map +1 -1
- package/dist/index119.js.map +1 -1
- package/dist/index12.js.map +1 -1
- package/dist/index120.js.map +1 -1
- package/dist/index121.js.map +1 -1
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +1 -1
- package/dist/index123.js.map +1 -1
- package/dist/index124.js.map +1 -1
- package/dist/index125.js.map +1 -1
- package/dist/index126.js.map +1 -1
- package/dist/index127.js.map +1 -1
- package/dist/index128.js.map +1 -1
- package/dist/index129.js.map +1 -1
- package/dist/index13.js.map +1 -1
- package/dist/index130.js.map +1 -1
- package/dist/index131.js.map +1 -1
- package/dist/index132.js.map +1 -1
- package/dist/index133.js.map +1 -1
- package/dist/index134.js.map +1 -1
- package/dist/index135.js.map +1 -1
- package/dist/index136.js.map +1 -1
- package/dist/index137.js.map +1 -1
- package/dist/index138.js.map +1 -1
- package/dist/index139.js.map +1 -1
- package/dist/index14.js.map +1 -1
- package/dist/index140.js.map +1 -1
- package/dist/index141.js.map +1 -1
- package/dist/index142.js.map +1 -1
- package/dist/index143.js.map +1 -1
- package/dist/index144.js.map +1 -1
- package/dist/index145.js.map +1 -1
- package/dist/index146.js.map +1 -1
- package/dist/index147.js.map +1 -1
- package/dist/index148.js.map +1 -1
- package/dist/index149.js.map +1 -1
- package/dist/index15.js.map +1 -1
- package/dist/index150.js.map +1 -1
- package/dist/index151.js.map +1 -1
- package/dist/index152.js.map +1 -1
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +4 -4
- package/dist/index154.js.map +1 -1
- package/dist/index155.js.map +1 -1
- package/dist/index156.js.map +1 -1
- package/dist/index157.js.map +1 -1
- package/dist/index158.js.map +1 -1
- package/dist/index159.js.map +1 -1
- package/dist/index16.js.map +1 -1
- package/dist/index160.js.map +1 -1
- package/dist/index161.js.map +1 -1
- package/dist/index162.js.map +1 -1
- package/dist/index163.js.map +1 -1
- package/dist/index164.js.map +1 -1
- package/dist/index165.js.map +1 -1
- package/dist/index166.js.map +1 -1
- package/dist/index167.js.map +1 -1
- package/dist/index168.js.map +1 -1
- package/dist/index169.js.map +1 -1
- package/dist/index17.js.map +1 -1
- package/dist/index170.js +18 -12
- package/dist/index170.js.map +1 -1
- package/dist/index171.js.map +1 -1
- package/dist/index172.js.map +1 -1
- package/dist/index173.js.map +1 -1
- package/dist/index174.js.map +1 -1
- package/dist/index175.js.map +1 -1
- package/dist/index176.js.map +1 -1
- package/dist/index177.js.map +1 -1
- package/dist/index178.js.map +1 -1
- package/dist/index179.js.map +1 -1
- package/dist/index18.js.map +1 -1
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +1 -1
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +3 -3
- package/dist/index182.js.map +1 -1
- package/dist/index183.js.map +1 -1
- package/dist/index184.js.map +1 -1
- package/dist/index185.js.map +1 -1
- package/dist/index186.js.map +1 -1
- package/dist/index187.js.map +1 -1
- package/dist/index188.js.map +1 -1
- package/dist/index189.js.map +1 -1
- package/dist/index19.js.map +1 -1
- package/dist/index190.js +9 -7
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +4 -4
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +4 -15
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +13 -3
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +2 -2
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +4 -85
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +79 -54
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +68 -7
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +3 -23
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +6 -28
- package/dist/index199.js.map +1 -1
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +4 -97
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +3 -4
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +23 -24
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +28 -10
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +97 -4
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +4 -12
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +22 -19
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +4 -6
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +4 -15
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +10 -102
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +21 -3
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +5 -23
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +15 -28
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +101 -17
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +3 -7
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +24 -15
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +27 -7
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +17 -24
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +6 -22
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +15 -6
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +8 -5
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +27 -4
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +23 -4
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +6 -24
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +5 -3
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +4 -24
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +4 -23
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +23 -6
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +22 -8
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +3 -19
- package/dist/index229.js.map +1 -1
- package/dist/index23.js.map +1 -1
- package/dist/index230.js +22 -50
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +7 -20
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +9 -27
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +17 -97
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +50 -33
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +20 -119
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +28 -13
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +98 -4
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +33 -15
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +116 -62
- package/dist/index239.js.map +1 -1
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +13 -10
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +4 -109
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +14 -14
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +64 -12
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +10 -5
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +104 -318
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +14 -66
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +12 -232
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +4 -270
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +313 -309
- package/dist/index249.js.map +1 -1
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +60 -171
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +252 -8
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +268 -41
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +316 -47
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +179 -9
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +6 -50
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +41 -51
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +50 -7
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +9 -10
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +51 -61
- package/dist/index259.js.map +1 -1
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +53 -42
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +9 -97
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +31 -47
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +61 -36
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +43 -47
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +92 -46
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +48 -20
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +33 -176
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +49 -48
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +68 -15
- package/dist/index269.js.map +1 -1
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +20 -65
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +202 -9
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +48 -40
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +60 -91
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +9 -278
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +38 -55
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +91 -10
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +278 -12
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +58 -11
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +11 -64
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +5 -5
- package/dist/index28.js.map +1 -1
- package/dist/index280.js +12 -6
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +3 -25
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +3 -25
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +12 -126
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +63 -51
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +5 -60
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +24 -48
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +24 -6
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +125 -14
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +51 -16
- package/dist/index289.js.map +1 -1
- package/dist/index29.js +5 -7
- package/dist/index29.js.map +1 -1
- package/dist/index290.js +56 -11
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +47 -24
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +7 -51
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +15 -6
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +18 -148
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +12 -59
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +25 -120
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +54 -15
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +5 -866
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +148 -28
- package/dist/index299.js.map +1 -1
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +6 -8
- package/dist/index30.js.map +1 -1
- package/dist/index300.js +55 -512
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +111 -794
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +14 -7436
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +862 -6
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +28 -12
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +515 -5
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +803 -5
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +7426 -468
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +6 -37
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +12 -19
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +5 -11
- package/dist/index31.js.map +1 -1
- package/dist/index310.js +5 -30
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +5 -4
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +461 -51
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +36 -10
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +19 -5
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +29 -8
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +4 -12
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +60 -3
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +10 -15
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +5 -25
- package/dist/index319.js.map +1 -1
- package/dist/index32.js +5 -5
- package/dist/index32.js.map +1 -1
- package/dist/index320.js +9 -41
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +11 -4
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +3 -26
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +15 -18
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +22 -31
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +41 -5
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +4 -8
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +25 -8
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +19 -9
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +34 -10
- package/dist/index329.js.map +1 -1
- package/dist/index33.js +9 -6
- package/dist/index33.js.map +1 -1
- package/dist/index330.js +5 -7
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +9 -75
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +8 -162
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +9 -114
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +10 -14
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +7 -80
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +68 -39
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +160 -11
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +113 -15
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +13 -100
- package/dist/index339.js.map +1 -1
- package/dist/index34.js +6 -6
- package/dist/index34.js.map +1 -1
- package/dist/index340.js +73 -49
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +34 -96
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +12 -70
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +14 -111
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +94 -48
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +50 -37
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +89 -125
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +52 -123
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +54 -197
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +44 -229
- package/dist/index349.js.map +1 -1
- package/dist/index35.js +9 -9
- package/dist/index35.js.map +1 -1
- package/dist/index350.js +42 -308
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +144 -5
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +142 -6
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +257 -7
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +241 -6
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +309 -6
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +5 -21
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +6 -10
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +7 -128
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +6 -42
- package/dist/index359.js.map +1 -1
- package/dist/index36.js +12 -7
- package/dist/index36.js.map +1 -1
- package/dist/index360.js +6 -68
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +20 -116
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +10 -490
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +128 -7
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +42 -13
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +67 -3
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +115 -45
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +490 -11
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +8 -26
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +12 -41
- package/dist/index369.js.map +1 -1
- package/dist/index37.js +13 -5
- package/dist/index37.js.map +1 -1
- package/dist/index370.js +4 -36
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +45 -15
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +24 -41
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +3 -12
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +27 -11
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +40 -50
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +37 -40
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +12 -10
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +40 -4
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +7 -4
- package/dist/index379.js.map +1 -1
- package/dist/index38.js +5 -5
- package/dist/index38.js.map +1 -1
- package/dist/index380.js +29 -8
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +9 -303
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +57 -4
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +40 -22
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +15 -105
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +5 -22
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +10 -22
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +289 -16
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +4 -12
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +20 -112
- package/dist/index389.js.map +1 -1
- package/dist/index39.js +6 -10
- package/dist/index39.js.map +1 -1
- package/dist/index390.js +3 -9
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +104 -27
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +20 -9
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +20 -6
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +14 -253
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +12 -10
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +117 -11
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +8 -6
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +32 -22
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +9 -23
- package/dist/index399.js.map +1 -1
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +8 -11
- package/dist/index40.js.map +1 -1
- package/dist/index400.js +6 -105
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +3 -15
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +251 -10
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +9 -7
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +11 -239
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +7 -28
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +21 -37
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +21 -10
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +97 -117
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +15 -40
- package/dist/index409.js.map +1 -1
- package/dist/index41.js +6 -7
- package/dist/index41.js.map +1 -1
- package/dist/index410.js +11 -25
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +7 -9
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +3 -24
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +226 -15
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +24 -11
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +38 -4
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +11 -324
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +119 -62
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +42 -4
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +25 -28
- package/dist/index419.js.map +1 -1
- package/dist/index42.js +6 -4
- package/dist/index42.js.map +1 -1
- package/dist/index420.js +11 -470
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +23 -268
- package/dist/index421.js.map +1 -1
- package/dist/index422.js +24 -0
- package/dist/index422.js.map +1 -0
- package/dist/index423.js +17 -0
- package/dist/index423.js.map +1 -0
- package/dist/index424.js +8 -0
- package/dist/index424.js.map +1 -0
- package/dist/index425.js +328 -0
- package/dist/index425.js.map +1 -0
- package/dist/index426.js +66 -0
- package/dist/index426.js.map +1 -0
- package/dist/index427.js +7 -0
- package/dist/index427.js.map +1 -0
- package/dist/index428.js +31 -0
- package/dist/index428.js.map +1 -0
- package/dist/index429.js +474 -0
- package/dist/index429.js.map +1 -0
- package/dist/index43.js +68 -7
- package/dist/index43.js.map +1 -1
- package/dist/index430.js +272 -0
- package/dist/index430.js.map +1 -0
- package/dist/index44.js +7 -6
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +31 -7
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +10 -10
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +15 -13
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +201 -7
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +20 -6
- package/dist/index49.js.map +1 -1
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +16 -6
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +123 -14
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +19 -8
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +5 -7
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +9 -68
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +7 -7
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +9 -31
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +13 -10
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +8 -15
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +10 -201
- package/dist/index59.js.map +1 -1
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +13 -20
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +9 -16
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +10 -123
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +5 -19
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +42 -9
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +387 -9
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +37 -14
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +21 -9
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +4 -9
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +6 -4
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +3 -3
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +57 -41
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +5 -387
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +6 -37
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +5 -21
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +4 -56
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +7 -7
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +6 -5
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +6 -5
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +11 -5
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +11 -5
- package/dist/index79.js.map +1 -1
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +7 -6
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +10 -6
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +5 -8
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +6 -7
- package/dist/index83.js.map +1 -1
- package/dist/index84.js.map +1 -1
- package/dist/index85.js.map +1 -1
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +2 -2
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +31 -31
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +1 -1
- package/dist/index89.js.map +1 -1
- package/dist/index9.js.map +1 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js.map +1 -1
- package/dist/index92.js.map +1 -1
- package/dist/index93.js.map +1 -1
- package/dist/index94.js.map +1 -1
- package/dist/index95.js.map +1 -1
- package/dist/index96.js.map +1 -1
- package/dist/index97.js.map +1 -1
- package/dist/index98.js.map +1 -1
- package/dist/index99.js.map +1 -1
- package/package.json +13 -13
- package/dist/assets/sha256.worker-BEf4_Y9w.js.map +0 -1
package/dist/index267.js
CHANGED
|
@@ -1,183 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
floatingRootContext: a.state.floatingRootContext,
|
|
30
|
-
floatingId: r,
|
|
31
|
-
nested: i,
|
|
32
|
-
onOpenChange: a.setOpen
|
|
33
|
-
}), a;
|
|
34
|
-
}
|
|
35
|
-
function g({ handle: e, store: t }) {
|
|
36
|
-
return r(() => e.attachStore(t), [e, t]), null;
|
|
37
|
-
}
|
|
38
|
-
function _(e, t) {
|
|
39
|
-
let n = f.useRef(null), r = f.useRef(null);
|
|
40
|
-
return f.useCallback((i) => {
|
|
41
|
-
if (e === void 0) return;
|
|
42
|
-
let a = !1;
|
|
43
|
-
if (n.current !== null) {
|
|
44
|
-
let e = n.current, i = r.current, o = t.context.triggerElements.getById(e);
|
|
45
|
-
i && o === i && (t.context.triggerElements.delete(e), a = !0), n.current = null, r.current = null;
|
|
46
|
-
}
|
|
47
|
-
if (i !== null && (n.current = e, r.current = i, t.context.triggerElements.add(e, i), a = !0), a) {
|
|
48
|
-
let e = t.context.triggerElements.size;
|
|
49
|
-
t.select("open") && t.state.triggerCount !== e && t.set("triggerCount", e);
|
|
50
|
-
}
|
|
51
|
-
}, [t, e]);
|
|
52
|
-
}
|
|
53
|
-
function v(e, t, n, r = !1) {
|
|
54
|
-
t ? e.preventUnmountingOnClose = !1 : r && (e.preventUnmountingOnClose = !0);
|
|
55
|
-
let i = n?.id ?? null;
|
|
56
|
-
(i || t) && (e.activeTriggerId = i, e.activeTriggerElement = n ?? null);
|
|
57
|
-
}
|
|
58
|
-
function y(e, t, i, a) {
|
|
59
|
-
let o = i.useState("isMountedByTrigger", e), s = _(e, i), c = n((t) => {
|
|
60
|
-
let n = i.select("open"), r = i.select("activeTriggerId");
|
|
61
|
-
if (r === e) {
|
|
62
|
-
i.update({
|
|
63
|
-
activeTriggerElement: t,
|
|
64
|
-
...n ? a : null
|
|
65
|
-
});
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
r == null && n && i.update({
|
|
69
|
-
activeTriggerId: e,
|
|
70
|
-
activeTriggerElement: t,
|
|
71
|
-
...a
|
|
72
|
-
});
|
|
73
|
-
}), l = f.useCallback((e) => {
|
|
74
|
-
s(e), e && c(e);
|
|
75
|
-
}, [s, c]);
|
|
76
|
-
return r(() => {
|
|
77
|
-
o && i.update({
|
|
78
|
-
activeTriggerElement: t.current,
|
|
79
|
-
...a
|
|
80
|
-
});
|
|
2
|
+
import { isElement as e } from "./index204.js";
|
|
3
|
+
import { useIsoLayoutEffect as t } from "./index208.js";
|
|
4
|
+
import { FloatingRootStore as n } from "./index266.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
//#region ../../node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
|
|
7
|
+
function i(i) {
|
|
8
|
+
let { popupStore: a, treatPopupAsFloatingElement: o = !1, floatingRootContext: s, floatingId: c, nested: l, onOpenChange: u } = i, d = a.useState("open"), f = a.useState("activeTriggerElement"), p = a.useState(o ? "popupElement" : "positionerElement"), m = a.context.triggerElements, h = u, g = r.useRef(null);
|
|
9
|
+
s === void 0 && g.current === null && (g.current = new n({
|
|
10
|
+
open: d,
|
|
11
|
+
transitionStatus: void 0,
|
|
12
|
+
referenceElement: f,
|
|
13
|
+
floatingElement: p,
|
|
14
|
+
triggerElements: m,
|
|
15
|
+
onOpenChange: h,
|
|
16
|
+
floatingId: c,
|
|
17
|
+
syncOnly: !0,
|
|
18
|
+
nested: l
|
|
19
|
+
}));
|
|
20
|
+
let _ = s ?? g.current;
|
|
21
|
+
return a.useSyncedValue("floatingId", c), t(() => {
|
|
22
|
+
let t = {
|
|
23
|
+
open: d,
|
|
24
|
+
floatingId: c,
|
|
25
|
+
referenceElement: f,
|
|
26
|
+
floatingElement: p
|
|
27
|
+
};
|
|
28
|
+
e(f) && (t.domReferenceElement = f), _.state.positionReference === _.state.referenceElement && (t.positionReference = f), _.update(t);
|
|
81
29
|
}, [
|
|
82
|
-
|
|
83
|
-
i,
|
|
84
|
-
t,
|
|
85
|
-
...Object.values(a)
|
|
86
|
-
]), {
|
|
87
|
-
registerTrigger: l,
|
|
88
|
-
isMountedByThisTrigger: o
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
function b(e, t = {}) {
|
|
92
|
-
let { closeOnActiveTriggerUnmount: n = !1 } = t, o = f.useRef(null), s = e.useState("open"), c = e.useState("triggerCount"), l = e.useState("activeTriggerId"), u = e.useState("activeTriggerElement");
|
|
93
|
-
r(() => {
|
|
94
|
-
if (!s) {
|
|
95
|
-
o.current = null, e.state.triggerCount !== 0 && e.set("triggerCount", 0);
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
let t = e.context.triggerElements.size, r = {};
|
|
99
|
-
e.state.triggerCount !== t && (r.triggerCount = t);
|
|
100
|
-
let c = e.select("activeTriggerId"), l = null;
|
|
101
|
-
if (c) {
|
|
102
|
-
let t = e.context.triggerElements.getById(c);
|
|
103
|
-
if (t) o.current = c, t !== e.state.activeTriggerElement && (r.activeTriggerElement = t);
|
|
104
|
-
else {
|
|
105
|
-
for (let [t, n] of e.context.triggerElements.entries()) if (n === e.state.activeTriggerElement) {
|
|
106
|
-
r.activeTriggerId = t, r.activeTriggerElement = n, o.current = t;
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
r.activeTriggerId === void 0 && (o.current === c ? l = c : o.current = null);
|
|
110
|
-
}
|
|
111
|
-
} else o.current = null;
|
|
112
|
-
if (!l && !c && t === 1) {
|
|
113
|
-
let t = e.context.triggerElements.entries().next();
|
|
114
|
-
if (!t.done) {
|
|
115
|
-
let [e, n] = t.value;
|
|
116
|
-
r.activeTriggerId = e, r.activeTriggerElement = n, o.current = e;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
(r.triggerCount !== void 0 || r.activeTriggerId !== void 0 || r.activeTriggerElement !== void 0) && e.update(r), l && n && queueMicrotask(() => {
|
|
120
|
-
if (e.select("open") && e.select("activeTriggerId") === l && !e.context.triggerElements.getById(l)) {
|
|
121
|
-
let t = a(i);
|
|
122
|
-
e.setOpen(!1, t), t.isCanceled || e.update({
|
|
123
|
-
activeTriggerId: null,
|
|
124
|
-
activeTriggerElement: null
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
}, [
|
|
129
|
-
s,
|
|
130
|
-
e,
|
|
30
|
+
d,
|
|
131
31
|
c,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
]);
|
|
136
|
-
}
|
|
137
|
-
function x(e, t, r) {
|
|
138
|
-
let { mounted: i, setMounted: a, transitionStatus: o } = u(e), s = t.useState("preventUnmountingOnClose"), c = !e && s;
|
|
139
|
-
t.useSyncedValues({
|
|
140
|
-
mounted: i,
|
|
141
|
-
transitionStatus: o,
|
|
142
|
-
preventUnmountingOnClose: c
|
|
143
|
-
});
|
|
144
|
-
let l = n(() => {
|
|
145
|
-
a(!1), t.update({
|
|
146
|
-
activeTriggerId: null,
|
|
147
|
-
activeTriggerElement: null,
|
|
148
|
-
mounted: !1,
|
|
149
|
-
preventUnmountingOnClose: !1
|
|
150
|
-
}), r?.(), t.context.onOpenChangeComplete?.(!1);
|
|
151
|
-
});
|
|
152
|
-
return d({
|
|
153
|
-
enabled: i && !e && !c,
|
|
154
|
-
open: e,
|
|
155
|
-
ref: t.context.popupRef,
|
|
156
|
-
onComplete() {
|
|
157
|
-
e || l();
|
|
158
|
-
}
|
|
159
|
-
}), {
|
|
160
|
-
forceUnmount: l,
|
|
161
|
-
transitionStatus: o
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
function S(e, n) {
|
|
165
|
-
e.useSyncedValues(n), r(() => () => {
|
|
166
|
-
e.update({
|
|
167
|
-
activeTriggerProps: t,
|
|
168
|
-
inactiveTriggerProps: t,
|
|
169
|
-
popupProps: t
|
|
170
|
-
});
|
|
171
|
-
}, [e]);
|
|
172
|
-
}
|
|
173
|
-
function C(e, t) {
|
|
174
|
-
r(() => {
|
|
175
|
-
!t && e.state.openMethod !== null && e.set("openMethod", null);
|
|
176
|
-
}, [t, e]), r(() => () => {
|
|
177
|
-
e.state.openMethod !== null && e.set("openMethod", null);
|
|
178
|
-
}, [e]);
|
|
32
|
+
f,
|
|
33
|
+
p,
|
|
34
|
+
_
|
|
35
|
+
]), _.context.onOpenChange = h, _.context.nested = l, _;
|
|
179
36
|
}
|
|
180
37
|
//#endregion
|
|
181
|
-
export {
|
|
38
|
+
export { i as useSyncedFloatingRootContext };
|
|
182
39
|
|
|
183
40
|
//# sourceMappingURL=index267.js.map
|
package/dist/index267.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index267.js","names":["React","REASONS.none"],"sources":["../../../node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useId } from '@base-ui/utils/useId';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { FOCUSABLE_ATTRIBUTE } from \"../../floating-ui-react/utils/constants.mjs\";\nimport { useFloatingParentNodeId } from \"../../floating-ui-react/components/FloatingTree.mjs\";\nimport { useSyncedFloatingRootContext } from \"../../floating-ui-react/hooks/useSyncedFloatingRootContext.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nexport const FOCUSABLE_POPUP_PROPS = {\n tabIndex: -1,\n [FOCUSABLE_ATTRIBUTE]: ''\n};\n\n/**\n * Returns the default `initialFocus` resolver for a popup. When opened by touch it focuses the\n * popup element itself to prevent the virtual keyboard from opening (required for Android\n * specifically; iOS handles this automatically). Otherwise it falls back to the default behavior.\n */\nexport function createDefaultInitialFocus(popupRef) {\n return interactionType => interactionType === 'touch' ? popupRef.current : true;\n}\n\n/**\n * The subset of a popup handle that a Root needs to bind its store to. Both the real handle classes\n * and any test double satisfy it.\n */\n\n/**\n * Creates and owns a popup store on behalf of a Root part. The store is created exactly once, with\n * controlled props and root state synced separately after creation. Sets up the synced floating\n * root context and returns the store.\n *\n * @param createStore Factory that builds the store. Called exactly once, receiving the floating id\n * and whether the popup is nested inside another floating element, both resolved on the first render.\n * @param treatPopupAsFloatingElement Whether the popup element is passed to Floating UI as the\n * floating element instead of the default positioner.\n */\nexport function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {\n const floatingId = useId();\n const nested = useFloatingParentNodeId() != null;\n const store = useRefWithInit(() => createStore(floatingId, nested)).current;\n useSyncedFloatingRootContext({\n popupStore: store,\n treatPopupAsFloatingElement,\n floatingRootContext: store.state.floatingRootContext,\n floatingId,\n nested,\n onOpenChange: store.setOpen\n });\n return store;\n}\n\n/**\n * Attaches a Root's store to a handle for this component's committed lifetime. Popup Roots render\n * it before their interactions and user children so its layout effect runs before descendant layout\n * effects. This lets descendants call the handle during the Root's initial commit without attaching\n * during render, which would leak suspended or abandoned stores. Store subscribers are notified by\n * `attachStore` in this ordinary layout phase, where React permits synchronous updates.\n *\n * Popup Roots must render this component only when a handle is present so handle-less Roots avoid\n * mounting an extra fiber and layout effect.\n */\nexport function PopupHandleAttachment({\n handle,\n store\n}) {\n useIsoLayoutEffect(() => {\n return handle.attachStore(store);\n }, [handle, store]);\n return null;\n}\n\n/**\n * Returns a callback ref that registers/unregisters the trigger element in the store.\n *\n * @param store The Store instance where the trigger should be registered.\n */\nexport function useTriggerRegistration(id, store) {\n // Keep track of the currently registered element to unregister it on unmount or id change.\n const registeredElementIdRef = React.useRef(null);\n const registeredElementRef = React.useRef(null);\n return React.useCallback(element => {\n if (id === undefined) {\n return;\n }\n let shouldSyncTriggerCount = false;\n if (registeredElementIdRef.current !== null) {\n const registeredId = registeredElementIdRef.current;\n const registeredElement = registeredElementRef.current;\n const currentElement = store.context.triggerElements.getById(registeredId);\n if (registeredElement && currentElement === registeredElement) {\n store.context.triggerElements.delete(registeredId);\n shouldSyncTriggerCount = true;\n }\n registeredElementIdRef.current = null;\n registeredElementRef.current = null;\n }\n if (element !== null) {\n registeredElementIdRef.current = id;\n registeredElementRef.current = element;\n store.context.triggerElements.add(id, element);\n shouldSyncTriggerCount = true;\n }\n if (shouldSyncTriggerCount) {\n const triggerCount = store.context.triggerElements.size;\n if (store.select('open') && store.state.triggerCount !== triggerCount) {\n store.set('triggerCount', triggerCount);\n }\n }\n }, [store, id]);\n}\nexport function setPopupOpenState(state, open, trigger, preventUnmountOnClose = false) {\n if (open) {\n // Opening starts a new close cycle, so clear any previous request to keep the popup mounted.\n state.preventUnmountingOnClose = false;\n } else if (preventUnmountOnClose) {\n state.preventUnmountingOnClose = true;\n }\n const triggerId = trigger?.id ?? null;\n\n // If a popup is closing, the `trigger` may be undefined.\n // We want to keep the previous value so that exit animations are played and focus is returned correctly.\n if (triggerId || open) {\n state.activeTriggerId = triggerId;\n state.activeTriggerElement = trigger ?? null;\n }\n}\nexport function attachPreventUnmountOnClose(eventDetails) {\n let preventUnmountOnClose = false;\n eventDetails.preventUnmountOnClose = () => {\n preventUnmountOnClose = true;\n };\n return () => preventUnmountOnClose;\n}\n\n/**\n * Runs the shared open-change sequence for a popup store: notifies `onOpenChange`,\n * honors cancellation, dispatches the floating root change, maps the reason to an\n * `instantType`, and commits the state update (synchronously for hover so\n * `getAnimations()` observes it). Stores supply their own differences via\n * `extraState` (e.g. the last change reason) and `onBeforeDispatch` (e.g. updating\n * inline-rect coordinates).\n */\nexport function applyPopupOpenChange(store, nextOpen, eventDetails, options = {}) {\n const reason = eventDetails.reason;\n const isHover = reason === REASONS.triggerHover;\n const isFocusOpen = nextOpen && reason === REASONS.triggerFocus;\n const isDismissClose = !nextOpen && (reason === REASONS.triggerPress || reason === REASONS.escapeKey);\n const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);\n store.context.onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n options.onBeforeDispatch?.();\n store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);\n const changeState = () => {\n // Spread `extraState` first so `open` always reflects `nextOpen`, keeping it in\n // sync with the value already passed to `dispatchOpenChange`/`setPopupOpenState`.\n const updatedState = {\n ...options.extraState,\n open: nextOpen\n };\n if (isFocusOpen) {\n updatedState.instantType = 'focus';\n } else if (isDismissClose) {\n updatedState.instantType = 'dismiss';\n } else if (isHover) {\n updatedState.instantType = undefined;\n }\n setPopupOpenState(updatedState, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());\n store.update(updatedState);\n };\n if (isHover) {\n // Flush synchronously for hover so `node.getAnimations()` sees the new state.\n ReactDOM.flushSync(changeState);\n } else {\n changeState();\n }\n}\n\n/**\n * Sets up trigger data forwarding to the store.\n *\n * @param triggerId Id of the trigger.\n * @param triggerElementRef Ref for the trigger DOM element.\n * @param store The Store instance managing the popup state.\n * @param stateUpdates An object with state updates to apply when the trigger is active.\n */\nexport function useTriggerDataForwarding(triggerId, triggerElementRef, store, stateUpdates) {\n const isMountedByThisTrigger = store.useState('isMountedByTrigger', triggerId);\n const baseRegisterTrigger = useTriggerRegistration(triggerId, store);\n\n // Applies trigger-owned state (active-trigger ownership and payload) when the trigger registers.\n // Stable so payload/`stateUpdates` changes do not change the ref identity (which would needlessly\n // churn registration); it reads the latest closure values when invoked.\n const applyTriggerData = useStableCallback(element => {\n const open = store.select('open');\n const activeTriggerId = store.select('activeTriggerId');\n if (activeTriggerId === triggerId) {\n store.update({\n activeTriggerElement: element,\n ...(open ? stateUpdates : null)\n });\n return;\n }\n if (activeTriggerId == null && open) {\n // If a popup is already open, a detached trigger can mount before any active trigger\n // has been established. Claim the first registered trigger so trigger-owned focus\n // management and ARIA relationships work.\n store.update({\n activeTriggerId: triggerId,\n activeTriggerElement: element,\n ...stateUpdates\n });\n }\n });\n\n // Intentionally NOT stable. Its identity is derived from `baseRegisterTrigger`, which is keyed on\n // `[store, id]`, so when a handle-backed trigger's store pointer swaps the merged ref re-fires —\n // unregistering from the previous store and registering into the new one. This lets a detached\n // trigger follow its handle's currently-attached store across attach/detach/remount. (A stable\n // callback would keep its identity and never re-fire on a store swap.)\n const registerTrigger = React.useCallback(element => {\n baseRegisterTrigger(element);\n if (element) {\n applyTriggerData(element);\n }\n }, [baseRegisterTrigger, applyTriggerData]);\n useIsoLayoutEffect(() => {\n if (isMountedByThisTrigger) {\n store.update({\n activeTriggerElement: triggerElementRef.current,\n ...stateUpdates\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMountedByThisTrigger, store, triggerElementRef, ...Object.values(stateUpdates)]);\n return {\n registerTrigger,\n isMountedByThisTrigger\n };\n}\n/**\n * Keeps trigger registration state synchronized while the popup is open.\n *\n * When a popup opens without an explicit trigger id and exactly one trigger is registered, that\n * trigger is claimed as the active trigger. When the active trigger id is still registered but its\n * element changed, the active element is refreshed. When the active trigger id is missing from the\n * registry but the same element is still registered under a different id (e.g. the rendered trigger\n * carries its own DOM `id` that differs from Base UI's internal trigger id), the active id is\n * reassociated to the registered id instead of being treated as lost. When the active trigger\n * unregisters, the default path preserves existing ownership so non-closing popup families do not\n * silently claim a different trigger while staying open.\n *\n * If `closeOnActiveTriggerUnmount` is enabled, unregistering a previously resolved active trigger\n * requests a close after a microtask so a same-tick replacement trigger with the same id can\n * register first. An active trigger id that has not matched a registered trigger yet is treated as\n * pending and does not request a close.\n *\n * This should be called on the Root part.\n *\n * @param store The Store instance managing the popup state.\n * @param options Options for active trigger unmount behavior.\n */\nexport function useImplicitActiveTrigger(store, options = {}) {\n const {\n closeOnActiveTriggerUnmount = false\n } = options;\n // Distinguishes a trigger that unmounted from a new active trigger that has not hydrated yet.\n const resolvedActiveTriggerIdRef = React.useRef(null);\n const open = store.useState('open');\n const reactiveTriggerCount = store.useState('triggerCount');\n // Subscribe to the active trigger id so the reconciliation below reruns when ownership moves to\n // another trigger while the popup stays open (e.g. a focus/hover handoff between triggers).\n const activeTriggerId = store.useState('activeTriggerId');\n // Subscribe to the active trigger element so the reconciliation reruns when a pending active\n // trigger registers in a commit where the trigger count nets out unchanged (registration\n // forwards the element to the store when the registering trigger matches the active id).\n // Without this, the id would never be marked resolved and a later genuine unmount would be\n // misclassified as pending, disabling `closeOnActiveTriggerUnmount`.\n const reactiveActiveTriggerElement = store.useState('activeTriggerElement');\n useIsoLayoutEffect(() => {\n if (!open) {\n resolvedActiveTriggerIdRef.current = null;\n if (store.state.triggerCount !== 0) {\n store.set('triggerCount', 0);\n }\n return;\n }\n const triggerCount = store.context.triggerElements.size;\n const stateUpdates = {};\n if (store.state.triggerCount !== triggerCount) {\n stateUpdates.triggerCount = triggerCount;\n }\n const currentActiveTriggerId = store.select('activeTriggerId');\n let lostActiveTriggerId = null;\n if (currentActiveTriggerId) {\n const activeTriggerElement = store.context.triggerElements.getById(currentActiveTriggerId);\n if (!activeTriggerElement) {\n for (const [triggerId, triggerElement] of store.context.triggerElements.entries()) {\n if (triggerElement === store.state.activeTriggerElement) {\n stateUpdates.activeTriggerId = triggerId;\n stateUpdates.activeTriggerElement = triggerElement;\n resolvedActiveTriggerIdRef.current = triggerId;\n break;\n }\n }\n if (stateUpdates.activeTriggerId === undefined) {\n if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {\n lostActiveTriggerId = currentActiveTriggerId;\n } else {\n resolvedActiveTriggerIdRef.current = null;\n }\n }\n } else {\n resolvedActiveTriggerIdRef.current = currentActiveTriggerId;\n if (activeTriggerElement !== store.state.activeTriggerElement) {\n stateUpdates.activeTriggerElement = activeTriggerElement;\n }\n }\n } else {\n resolvedActiveTriggerIdRef.current = null;\n }\n if (!lostActiveTriggerId && !currentActiveTriggerId && triggerCount === 1) {\n const iteratorResult = store.context.triggerElements.entries().next();\n if (!iteratorResult.done) {\n const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;\n stateUpdates.activeTriggerId = implicitTriggerId;\n stateUpdates.activeTriggerElement = implicitTriggerElement;\n resolvedActiveTriggerIdRef.current = implicitTriggerId;\n }\n }\n if (stateUpdates.triggerCount !== undefined || stateUpdates.activeTriggerId !== undefined || stateUpdates.activeTriggerElement !== undefined) {\n store.update(stateUpdates);\n }\n if (lostActiveTriggerId) {\n if (closeOnActiveTriggerUnmount) {\n // Defer so a same-tick replacement trigger with the same id can register first.\n queueMicrotask(() => {\n if (store.select('open') && store.select('activeTriggerId') === lostActiveTriggerId && !store.context.triggerElements.getById(lostActiveTriggerId)) {\n const eventDetails = createChangeEventDetails(REASONS.none);\n store.setOpen(false, eventDetails);\n // If closing is canceled, keep the previous active trigger ownership for the\n // still-open popup instead of claiming another trigger implicitly.\n if (!eventDetails.isCanceled) {\n store.update({\n activeTriggerId: null,\n activeTriggerElement: null\n });\n }\n }\n });\n }\n }\n }, [open, store, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);\n}\n\n/**\n * Manages the mounted state of the popup.\n * Sets up the transition status listeners and handles unmounting when needed.\n * Updates the `mounted`, `transitionStatus`, and `preventUnmountingOnClose` states in the store.\n *\n * @param open Whether the popup is open.\n * @param store The Store instance managing the popup state.\n * @param onUnmount Optional callback to be called when the popup is unmounted.\n *\n * @returns A function to forcibly unmount the popup.\n */\nexport function useOpenStateTransitions(open, store, onUnmount) {\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open);\n const preventUnmountingOnClose = store.useState('preventUnmountingOnClose');\n // Opening starts a new close cycle. Clear during render so the close-completion hook below\n // reads the synchronized value on the same pass.\n const syncedPreventUnmountingOnClose = open ? false : preventUnmountingOnClose;\n store.useSyncedValues({\n mounted,\n transitionStatus,\n preventUnmountingOnClose: syncedPreventUnmountingOnClose\n });\n const forceUnmount = useStableCallback(() => {\n setMounted(false);\n store.update({\n activeTriggerId: null,\n activeTriggerElement: null,\n mounted: false,\n preventUnmountingOnClose: false\n });\n onUnmount?.();\n store.context.onOpenChangeComplete?.(false);\n });\n useOpenChangeComplete({\n enabled: mounted && !open && !syncedPreventUnmountingOnClose,\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (!open) {\n forceUnmount();\n }\n }\n });\n return {\n forceUnmount,\n transitionStatus\n };\n}\nexport function usePopupInteractionProps(store, statePart) {\n store.useSyncedValues(statePart);\n useIsoLayoutEffect(() => () => {\n store.update({\n activeTriggerProps: EMPTY_OBJECT,\n inactiveTriggerProps: EMPTY_OBJECT,\n popupProps: EMPTY_OBJECT\n });\n }, [store]);\n}\nexport function usePopupRootSync(store, open) {\n useIsoLayoutEffect(() => {\n if (!open && store.state.openMethod !== null) {\n store.set('openMethod', null);\n }\n }, [open, store]);\n useIsoLayoutEffect(() => () => {\n if (store.state.openMethod !== null) {\n store.set('openMethod', null);\n }\n }, [store]);\n}"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index267.js","names":["React","React$1","useSyncedFloatingRootContext","floatingRootContextProp","options","open","popupStore","referenceElement","floatingElement","treatPopupAsFloatingElement","triggerElements","handleOpenChange","onOpenChange","internalStoreRef","FloatingRootStore","store","floatingId","useIsoLayoutEffect","valuesToSync","isElement","nested"],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { FloatingRootStore } from \"../components/FloatingRootStore.mjs\";\n\n/**\n * Narrowed to the store members this hook uses so consumers do not need to provide\n * unrelated store capabilities.\n */\n\n/**\n * Keeps a FloatingRootStore in sync with the provided PopupStore.\n * Uses the provided FloatingRootStore when one exists, otherwise creates one once and updates it on every render.\n */\nexport function useSyncedFloatingRootContext(options) {\n const {\n popupStore,\n treatPopupAsFloatingElement = false,\n floatingRootContext: floatingRootContextProp,\n floatingId,\n nested,\n onOpenChange\n } = options;\n const open = popupStore.useState('open');\n const referenceElement = popupStore.useState('activeTriggerElement');\n const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? 'popupElement' : 'positionerElement');\n const triggerElements = popupStore.context.triggerElements;\n const handleOpenChange = onOpenChange;\n const internalStoreRef = React.useRef(null);\n if (floatingRootContextProp === undefined && internalStoreRef.current === null) {\n internalStoreRef.current = new FloatingRootStore({\n open,\n transitionStatus: undefined,\n referenceElement,\n floatingElement,\n triggerElements,\n onOpenChange: handleOpenChange,\n floatingId,\n syncOnly: true,\n nested\n });\n }\n const store = floatingRootContextProp ?? internalStoreRef.current;\n popupStore.useSyncedValue('floatingId', floatingId);\n useIsoLayoutEffect(() => {\n const valuesToSync = {\n open,\n floatingId,\n referenceElement,\n floatingElement\n };\n if (isElement(referenceElement)) {\n valuesToSync.domReferenceElement = referenceElement;\n }\n if (store.state.positionReference === store.state.referenceElement) {\n valuesToSync.positionReference = referenceElement;\n }\n store.update(valuesToSync);\n }, [open, floatingId, referenceElement, floatingElement, store]);\n\n // Keep non-reactive context values fresh for interactions that call `store.setOpen`.\n store.context.onOpenChange = handleOpenChange;\n store.context.nested = nested;\n return store;\n}"],"ignoreList":[0],"mappings":";;;;;;AAgBA,SAAgBE,EAA6B,GAAS;CACpD,IAAM,EACJ,eACA,iCAA8B,IAC9B,qBAAqBC,GACrB,eACA,WACA,oBACEC,GACEC,IAAOC,EAAW,SAAS,MAAM,GACjCC,IAAmBD,EAAW,SAAS,sBAAsB,GAC7DE,IAAkBF,EAAW,SAASG,IAA8B,iBAAiB,mBAAmB,GACxGC,IAAkBJ,EAAW,QAAQ,iBACrCK,IAAmBC,GACnBC,IAAmBb,EAAM,OAAO,IAAI;CAC1C,AAAIG,MAA4B,KAAA,KAAaU,EAAiB,YAAY,SACxE,EAAiB,UAAU,IAAIC,EAAkB;EAC/C;EACA,kBAAkB,KAAA;EAClB;EACA;EACA;EACA,cAAcH;EACd;EACA,UAAU;EACV;CACF,CAAC;CAEH,IAAMI,IAAQZ,KAA2BU,EAAiB;CAqB1D,OApBAP,EAAW,eAAe,cAAcU,CAAU,GAClDC,QAAyB;EACvB,IAAMC,IAAe;GACnB;GACA;GACA;GACA;EACF;EAOA,AANIC,EAAUZ,CAAgB,MAC5B,EAAa,sBAAsBA,IAEjCQ,EAAM,MAAM,sBAAsBA,EAAM,MAAM,qBAChD,EAAa,oBAAoBR,IAEnCQ,EAAM,OAAOG,CAAY;CAC3B,GAAG;EAACb;EAAMW;EAAYT;EAAkBC;EAAiBO;CAAK,CAAC,GAG/D,EAAM,QAAQ,eAAeJ,GAC7B,EAAM,QAAQ,SAASS,GAChBL;AACT"}
|
package/dist/index268.js
CHANGED
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
let a = this.idMap.get(e);
|
|
17
|
-
a !== void 0 && a !== n && r.delete(a), r.set(n, e);
|
|
18
|
-
}
|
|
19
|
-
this.idMap.set(e, n);
|
|
20
|
-
}
|
|
21
|
-
delete(t) {
|
|
22
|
-
if (process.env.NODE_ENV !== "production") {
|
|
23
|
-
let n = this.idMap.get(t);
|
|
24
|
-
n !== void 0 && e?.get(this)?.delete(n);
|
|
1
|
+
"use client";
|
|
2
|
+
import { useIsoLayoutEffect as e } from "./index208.js";
|
|
3
|
+
import { AnimationFrame as t } from "./index234.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
//#region ../../node_modules/@base-ui/react/internals/useTransitionStatus.mjs
|
|
6
|
+
function r(r, i = !1, a = !1, o = !1) {
|
|
7
|
+
let [s, c] = n.useState(r && i ? "idle" : void 0), [l, u] = n.useState(r && !o);
|
|
8
|
+
return r && !l && (u(!0), c("starting")), !r && l && s !== "ending" && !a && c("ending"), !r && !l && s === "ending" && c(void 0), e(() => {
|
|
9
|
+
if (!r && l && s !== "ending" && a) {
|
|
10
|
+
let e = t.request(() => {
|
|
11
|
+
c("ending");
|
|
12
|
+
});
|
|
13
|
+
return () => {
|
|
14
|
+
t.cancel(e);
|
|
15
|
+
};
|
|
25
16
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
17
|
+
}, [
|
|
18
|
+
r,
|
|
19
|
+
l,
|
|
20
|
+
s,
|
|
21
|
+
a
|
|
22
|
+
]), e(() => {
|
|
23
|
+
if (!r || i) return;
|
|
24
|
+
let e = t.request(() => {
|
|
25
|
+
c(void 0);
|
|
26
|
+
});
|
|
27
|
+
return () => {
|
|
28
|
+
t.cancel(e);
|
|
29
|
+
};
|
|
30
|
+
}, [i, r]), e(() => {
|
|
31
|
+
if (!r || !i) return;
|
|
32
|
+
r && l && s !== "idle" && c("starting");
|
|
33
|
+
let e = t.request(() => {
|
|
34
|
+
c("idle");
|
|
35
|
+
});
|
|
36
|
+
return () => {
|
|
37
|
+
t.cancel(e);
|
|
38
|
+
};
|
|
39
|
+
}, [
|
|
40
|
+
i,
|
|
41
|
+
r,
|
|
42
|
+
l,
|
|
43
|
+
s
|
|
44
|
+
]), {
|
|
45
|
+
mounted: l,
|
|
46
|
+
setMounted: u,
|
|
47
|
+
transitionStatus: s
|
|
48
|
+
};
|
|
49
|
+
}
|
|
49
50
|
//#endregion
|
|
50
|
-
export {
|
|
51
|
+
export { r as useTransitionStatus };
|
|
51
52
|
|
|
52
53
|
//# sourceMappingURL=index268.js.map
|
package/dist/index268.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index268.js","names":[],"sources":["../../../node_modules/@base-ui/react/
|
|
1
|
+
{"version":3,"file":"index268.js","names":["React","React$1","useTransitionStatus","transitionStatus","setTransitionStatus","open","enableIdleState","mounted","setMounted","animateInitialOpen","deferEndingState","useIsoLayoutEffect","frame","AnimationFrame"],"sources":["../../../node_modules/@base-ui/react/internals/useTransitionStatus.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { AnimationFrame } from '@base-ui/utils/useAnimationFrame';\n/**\n * Provides a status string for CSS animations.\n * @param open - a boolean that determines if the element is open.\n * @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`\n * @param deferEndingState - a boolean that delays the `'ending'` state by a frame\n * @param animateInitialOpen - a boolean that makes an element which mounts already open still go\n * through `'starting'`. Off by default so content that was open on the first render (a\n * `defaultOpen` popup on page load, SSR'd markup) doesn't animate in.\n */\nexport function useTransitionStatus(open, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {\n const [transitionStatus, setTransitionStatus] = React.useState(open && enableIdleState ? 'idle' : undefined);\n // Starting at `false` while open lets the `open && !mounted` branch below run on the first\n // render, which is what produces the `'starting'` phase. React re-renders before committing, so\n // the element is still mounted in the same pass.\n const [mounted, setMounted] = React.useState(open && !animateInitialOpen);\n if (open && !mounted) {\n setMounted(true);\n setTransitionStatus('starting');\n }\n if (!open && mounted && transitionStatus !== 'ending' && !deferEndingState) {\n setTransitionStatus('ending');\n }\n if (!open && !mounted && transitionStatus === 'ending') {\n setTransitionStatus(undefined);\n }\n useIsoLayoutEffect(() => {\n if (!open && mounted && transitionStatus !== 'ending' && deferEndingState) {\n const frame = AnimationFrame.request(() => {\n setTransitionStatus('ending');\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }\n return undefined;\n }, [open, mounted, transitionStatus, deferEndingState]);\n useIsoLayoutEffect(() => {\n if (!open || enableIdleState) {\n return undefined;\n }\n const frame = AnimationFrame.request(() => {\n // Avoid `flushSync` here due to Firefox.\n // See https://github.com/mui/base-ui/pull/3424\n setTransitionStatus(undefined);\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open]);\n useIsoLayoutEffect(() => {\n if (!open || !enableIdleState) {\n return undefined;\n }\n if (open && mounted && transitionStatus !== 'idle') {\n setTransitionStatus('starting');\n }\n const frame = AnimationFrame.request(() => {\n setTransitionStatus('idle');\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open, mounted, transitionStatus]);\n return {\n mounted,\n setMounted,\n transitionStatus\n };\n}"],"ignoreList":[0],"mappings":";;;;;AAcA,SAAgBE,EAAoB,GAAM,IAAkB,IAAO,IAAmB,IAAO,IAAqB,IAAO;CACvH,IAAM,CAACC,GAAkBC,KAAuBJ,EAAM,SAASK,KAAQC,IAAkB,SAAS,KAAA,CAAS,GAIrG,CAACC,GAASC,KAAcR,EAAM,SAASK,KAAQ,CAACI,CAAkB;CAiDxE,OAhDIJ,KAAQ,CAACE,MACXC,EAAW,EAAI,GACfJ,EAAoB,UAAU,IAE5B,CAACC,KAAQE,KAAWJ,MAAqB,YAAY,CAACO,KACxDN,EAAoB,QAAQ,GAE1B,CAACC,KAAQ,CAACE,KAAWJ,MAAqB,YAC5CC,EAAoB,KAAA,CAAS,GAE/BO,QAAyB;EACvB,IAAI,CAACN,KAAQE,KAAWJ,MAAqB,YAAYO,GAAkB;GACzE,IAAME,IAAQC,EAAe,cAAc;IACzC,EAAoB,QAAQ;GAC9B,CAAC;GACD,aAAa;IACX,EAAe,OAAOD,CAAK;GAC7B;EACF;CAEF,GAAG;EAACP;EAAME;EAASJ;EAAkBO;CAAgB,CAAC,GACtDC,QAAyB;EACvB,IAAI,CAACN,KAAQC,GACX;EAEF,IAAMM,IAAQC,EAAe,cAAc;GAGzC,EAAoB,KAAA,CAAS;EAC/B,CAAC;EACD,aAAa;GACX,EAAe,OAAOD,CAAK;EAC7B;CACF,GAAG,CAACN,GAAiBD,CAAI,CAAC,GAC1BM,QAAyB;EACvB,IAAI,CAACN,KAAQ,CAACC,GACZ;EAEF,AAAID,KAAQE,KAAWJ,MAAqB,UAC1CC,EAAoB,UAAU;EAEhC,IAAMQ,IAAQC,EAAe,cAAc;GACzC,EAAoB,MAAM;EAC5B,CAAC;EACD,aAAa;GACX,EAAe,OAAOD,CAAK;EAC7B;CACF,GAAG;EAACN;EAAiBD;EAAME;EAASJ;CAAgB,CAAC,GAC9C;EACL;EACA;EACA;CACF;AACF"}
|
package/dist/index269.js
CHANGED
|
@@ -1,20 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { startingStyle as e } from "./index198.js";
|
|
3
|
+
import { useStableCallback as t } from "./index206.js";
|
|
4
|
+
import { useAnimationFrame as n } from "./index234.js";
|
|
5
|
+
import { resolveRef as r } from "./index248.js";
|
|
6
|
+
import * as i from "react-dom";
|
|
7
|
+
//#region ../../node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
|
|
8
|
+
var a = null;
|
|
9
|
+
function o(e) {
|
|
10
|
+
if (!a) {
|
|
11
|
+
let e = [];
|
|
12
|
+
a = e, queueMicrotask(() => {
|
|
13
|
+
a = null, i.flushSync(() => {
|
|
14
|
+
for (let t of e) t();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
a.push(e);
|
|
19
|
+
}
|
|
20
|
+
function s(a, s = !1, c = !1) {
|
|
21
|
+
let l = n();
|
|
22
|
+
return t((t, n = null) => {
|
|
23
|
+
l.cancel();
|
|
24
|
+
let u = r(a);
|
|
25
|
+
if (u == null) return;
|
|
26
|
+
let d = u, f = () => {
|
|
27
|
+
if (!c) {
|
|
28
|
+
i.flushSync(t);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
o(() => {
|
|
32
|
+
n?.aborted || t();
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
if (typeof d.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
|
|
36
|
+
t();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
function p() {
|
|
40
|
+
Promise.all(d.getAnimations().map((e) => e.finished)).then(() => {
|
|
41
|
+
n?.aborted || f();
|
|
42
|
+
}, () => {
|
|
43
|
+
if (!n?.aborted) {
|
|
44
|
+
if (d.getAnimations().some((e) => e.pending || e.playState !== "finished")) {
|
|
45
|
+
p();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
f();
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (s) {
|
|
53
|
+
let t = e;
|
|
54
|
+
if (!d.hasAttribute(t)) {
|
|
55
|
+
l.request(p);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
let r = new MutationObserver(() => {
|
|
59
|
+
d.hasAttribute(t) || (r.disconnect(), p());
|
|
60
|
+
});
|
|
61
|
+
r.observe(d, {
|
|
62
|
+
attributes: !0,
|
|
63
|
+
attributeFilter: [t]
|
|
64
|
+
}), n?.addEventListener("abort", () => r.disconnect(), { once: !0 });
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
l.request(p);
|
|
15
68
|
});
|
|
16
69
|
}
|
|
17
70
|
//#endregion
|
|
18
|
-
export {
|
|
71
|
+
export { s as useAnimationsFinished };
|
|
19
72
|
|
|
20
73
|
//# sourceMappingURL=index269.js.map
|
package/dist/index269.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index269.js","names":[],"sources":["../../../node_modules/@base-ui/react/
|
|
1
|
+
{"version":3,"file":"index269.js","names":["TransitionStatusDataAttributes.startingStyle","ReactDOM","pendingCallbacks","flushBeforePaint","callbacks","callback","fn","useAnimationsFinished","frame","useAnimationFrame","useStableCallback","element","resolveRef","elementOrRef","resolvedElement","done","batch","fnToExecute","signal","exec","animation","waitForStartingStyleRemoved","startingStyleAttribute","startingStyle","attributeObserver"],"sources":["../../../node_modules/@base-ui/react/internals/useAnimationsFinished.mjs"],"sourcesContent":["'use client';\n\nimport * as ReactDOM from 'react-dom';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { resolveRef } from \"../utils/resolveRef.mjs\";\nimport * as TransitionStatusDataAttributes from \"./TransitionStatusDataAttributes.mjs\";\nlet pendingCallbacks = null;\n\n/**\n * Runs the callback in a synchronous flush before the browser paints, so that the\n * browser doesn't paint an intermediate frame: https://github.com/mui/base-ui/issues/979\n * Callbacks that become ready within the same microtask checkpoint (e.g. multiple elements\n * whose animations finish together) are batched into a single commit:\n * https://github.com/mui/base-ui/issues/5481\n */\nfunction flushBeforePaint(fn) {\n if (!pendingCallbacks) {\n const callbacks = [];\n pendingCallbacks = callbacks;\n queueMicrotask(() => {\n pendingCallbacks = null;\n ReactDOM.flushSync(() => {\n for (const callback of callbacks) {\n callback();\n }\n });\n });\n }\n pendingCallbacks.push(fn);\n}\n\n/**\n * Executes a function once all animations have finished on the provided element.\n * If an animation is canceled, waits for any replacement animations before executing.\n * @param elementOrRef - The element to watch for animations.\n * @param waitForStartingStyleRemoved - Whether to wait for [data-starting-style] to be removed before checking for animations.\n * @param batch - Whether completions ready in the same microtask may be coalesced into a single\n * commit. A batched callback runs before earlier callbacks' React updates have committed, so only\n * opt in when the callback doesn't read state that another completion can change.\n * @returns A function that takes a callback to execute once all animations have finished, and an optional AbortSignal to abort the callback\n */\nexport function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {\n const frame = useAnimationFrame();\n return useStableCallback((fnToExecute,\n /**\n * An optional [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that\n * can be used to abort `fnToExecute` before all the animations have finished.\n * @default null\n */\n signal = null) => {\n frame.cancel();\n const element = resolveRef(elementOrRef);\n if (element == null) {\n return;\n }\n const resolvedElement = element;\n const done = () => {\n if (!batch) {\n // Synchronously flush the unmounting of the component so that the browser doesn't\n // paint: https://github.com/mui/base-ui/issues/979\n // Each callback gets its own commit so that later completions observe the React\n // updates caused by earlier ones.\n ReactDOM.flushSync(fnToExecute);\n return;\n }\n flushBeforePaint(() => {\n // Re-check at flush time: the signal may abort between queueing and the flush.\n if (!signal?.aborted) {\n fnToExecute();\n }\n });\n };\n if (typeof resolvedElement.getAnimations !== 'function' || globalThis.BASE_UI_ANIMATIONS_DISABLED) {\n fnToExecute();\n return;\n }\n function exec() {\n Promise.all(resolvedElement.getAnimations().map(animation => animation.finished)).then(() => {\n if (!signal?.aborted) {\n done();\n }\n }, () => {\n if (signal?.aborted) {\n return;\n }\n const currentAnimations = resolvedElement.getAnimations();\n if (currentAnimations.some(animation => animation.pending || animation.playState !== 'finished')) {\n // Sometimes animations can be aborted because a property they depend on changes while the animation plays.\n // In such cases, we need to re-check if any new animations have started.\n exec();\n return;\n }\n done();\n });\n }\n if (waitForStartingStyleRemoved) {\n const startingStyleAttribute = TransitionStatusDataAttributes.startingStyle;\n\n // If `[data-starting-style]` isn't present, fall back to waiting one more frame\n // to give \"open\" animations a chance to be registered.\n if (!resolvedElement.hasAttribute(startingStyleAttribute)) {\n frame.request(exec);\n return;\n }\n\n // Wait for `[data-starting-style]` to have been removed.\n const attributeObserver = new MutationObserver(() => {\n if (!resolvedElement.hasAttribute(startingStyleAttribute)) {\n attributeObserver.disconnect();\n exec();\n }\n });\n attributeObserver.observe(resolvedElement, {\n attributes: true,\n attributeFilter: [startingStyleAttribute]\n });\n signal?.addEventListener('abort', () => attributeObserver.disconnect(), {\n once: true\n });\n return;\n }\n frame.request(exec);\n });\n}"],"ignoreList":[0],"mappings":";;;;;;;AAOA,IAAIE,IAAmB;AASvB,SAASC,EAAiB,GAAI;CAC5B,IAAI,CAACD,GAAkB;EACrB,IAAME,IAAY,CAAC;EAEnB,AADA,IAAmBA,GACnB,qBAAqB;GAEnB,AADA,IAAmB,MACnBH,EAAS,gBAAgB;IACvB,KAAK,IAAMI,KAAYD,GACrB,EAAS;GAEb,CAAC;EACH,CAAC;CACH;CACA,EAAiB,KAAKE,CAAE;AAC1B;AAYA,SAAgBC,EAAsB,GAAc,IAA8B,IAAO,IAAQ,IAAO;CACtG,IAAMC,IAAQC,EAAkB;CAChC,OAAOC,GAAmB,GAM1B,IAAS,SAAS;EAChB,EAAM,OAAO;EACb,IAAMC,IAAUC,EAAWC,CAAY;EACvC,IAAIF,KAAW,MACb;EAEF,IAAMG,IAAkBH,GAClBI,UAAa;GACjB,IAAI,CAACC,GAAO;IAKV,EAAS,UAAUC,CAAW;IAC9B;GACF;GACA,QAAuB;IAErB,AAAKC,GAAQ,WACXD,EAAY;GAEhB,CAAC;EACH;EACA,IAAI,OAAOH,EAAgB,iBAAkB,cAAc,WAAW,6BAA6B;GACjG,EAAY;GACZ;EACF;EACA,SAASK,IAAO;GACd,QAAQ,IAAIL,EAAgB,cAAc,CAAC,CAAC,KAAI,MAAaM,EAAU,QAAQ,CAAC,CAAC,CAAC,WAAW;IAC3F,AAAKF,GAAQ,WACXH,EAAK;GAET,SAAS;IACP,IAAI,IAAQ,SAIZ;SAD0BD,EAAgB,cACtB,CAAC,CAAC,MAAK,MAAaM,EAAU,WAAWA,EAAU,cAAc,UAAU,GAAG;MAGhG,EAAK;MACL;KACF;KACA,EAAK;IADL;GAEF,CAAC;EACH;EACA,IAAIC,GAA6B;GAC/B,IAAMC,IAAyBtB;GAI/B,IAAI,CAACc,EAAgB,aAAaQ,CAAsB,GAAG;IACzD,EAAM,QAAQH,CAAI;IAClB;GACF;GAGA,IAAMK,IAAoB,IAAI,uBAAuB;IACnD,AAAKV,EAAgB,aAAaQ,CAAsB,MACtDE,EAAkB,WAAW,GAC7BL,EAAK;GAET,CAAC;GAKD,AAJAK,EAAkB,QAAQV,GAAiB;IACzC,YAAY;IACZ,iBAAiB,CAACQ,CAAsB;GAC1C,CAAC,GACDJ,GAAQ,iBAAiB,eAAeM,EAAkB,WAAW,GAAG,EACtE,MAAM,GACR,CAAC;GACD;EACF;EACA,EAAM,QAAQL,CAAI;CACpB,CAAC;AACH"}
|
package/dist/index27.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index27.js","names":[],"sources":["../../../node_modules/date-fns/addMonths.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n"],"
|
|
1
|
+
{"version":3,"file":"index27.js","names":["toDate","addMonths","_date","date","options","amount","constructFrom","dayOfMonth","endOfDesiredMonth"],"sources":["../../../node_modules/date-fns/addMonths.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n"],"ignoreList":[0],"mappings":";;;AAiCA,SAAgBC,EAAU,GAAM,GAAQ,GAAS;CAC/C,IAAMC,IAAQF,EAAOG,GAAMC,GAAS,EAAE;CACtC,IAAI,MAAMC,CAAM,GAAG,OAAOC,EAAcF,GAAS,MAAMD,GAAM,GAAG;CAChE,IAAI,CAACE,GAEH,OAAOH;CAET,IAAMK,IAAaL,EAAM,QAAQ,GAU3BM,IAAoBF,EAAcF,GAAS,MAAMD,GAAMD,EAAM,QAAQ,CAAC;CAoB1E,OAnBFM,EAAkB,SAASN,EAAM,SAAS,IAAIG,IAAS,GAAG,CAAC,GAEvDE,KADgBC,EAAkB,QACV,IAGnBA,KASPN,EAAM,YACJM,EAAkB,YAAY,GAC9BA,EAAkB,SAAS,GAC3BD,CACF,GACOL;AAEX"}
|