@rpcbase/ui 0.244.0 → 0.245.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/index10.js +2 -2
- package/dist/index105.js +36 -36
- package/dist/index106.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index117.js +6 -6
- package/dist/index12.js +3 -3
- package/dist/index120.js +10 -10
- package/dist/index122.js +2 -2
- package/dist/index123.js +3 -3
- package/dist/index124.js +1 -1
- package/dist/index126.js +2 -2
- package/dist/index128.js +2 -2
- package/dist/index13.js +2 -2
- package/dist/index14.js +2 -2
- package/dist/index149.js +14 -5
- package/dist/index149.js.map +1 -1
- package/dist/index15.js +2 -2
- package/dist/index150.js +63 -63
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +38 -2
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +13 -385
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +23 -261
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +109 -58
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +13 -47
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +4 -169
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +4 -110
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +5 -25
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +12 -8
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +8 -8
- package/dist/index160.js +19 -4
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +11 -6
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +176 -4
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +268 -476
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +4 -189
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +28 -14
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +124 -105
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +63 -262
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +8 -6
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +15 -40
- package/dist/index169.js.map +1 -1
- package/dist/index17.js +1 -1
- package/dist/index170.js +30 -4
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +69 -58
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +5 -8
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +61 -80
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +2 -20
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +383 -14
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +260 -4
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +59 -4
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +46 -6
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +169 -4
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +7 -7
- package/dist/index180.js +109 -6
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +24 -16
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +8 -5
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +4 -4
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +5 -12
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +4 -9
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +487 -13
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +189 -13
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +13 -4
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +107 -5
- package/dist/index189.js.map +1 -1
- package/dist/index19.js +16 -16
- package/dist/index190.js +262 -6
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +6 -5
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +39 -53
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +4 -8
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +58 -4
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +8 -4
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +87 -8
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +19 -4
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +16 -4
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +5 -3
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +5 -10
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +6 -9
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +4 -9
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +6 -10
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +16 -10
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +4 -9
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +4 -6
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +12 -5
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +9 -4
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +13 -5
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +1 -1
- package/dist/index210.js +13 -6
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +4 -5
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +5 -16
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +6 -7
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -10
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +54 -10
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +8 -21
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +4 -8
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +4 -9
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +8 -9
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +2 -2
- package/dist/index220.js +4 -4
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +4 -5
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +3 -16
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +10 -9
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +9 -18
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +9 -20
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +10 -12
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +10 -29
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +9 -12
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +6 -25
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +1 -1
- package/dist/index230.js +5 -5
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +5 -20
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +5 -66
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +6 -6
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +5 -5
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +16 -11
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +7 -3
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +9 -49
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +11 -4
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +20 -28
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +1 -1
- package/dist/index240.js +8 -16
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +9 -5
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +9 -21
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +4 -53
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +5 -20
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +16 -41
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +9 -39
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +19 -46
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +17 -20
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +12 -19
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +1 -1
- package/dist/index250.js +28 -19
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +10 -68
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +25 -17
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +5 -3
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +66 -11
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +8 -30
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +11 -13
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +8 -18
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +5 -36
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +12 -68
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +3 -239
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +3 -252
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +96 -65
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +16 -98
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +26 -173
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +47 -79
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +6 -13
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +5 -3
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +60 -28
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +66 -16
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +131 -35
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +8 -34
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +5 -69
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +4 -18
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +11 -3
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +17 -107
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +16 -26
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +11 -28
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +8 -4
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +142 -124
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +1 -1
- package/dist/index280.js +79 -4
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +61 -78
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +15 -273
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +20 -12
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +7 -28
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +12 -16
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +3 -10
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +49 -24
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +15 -15
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +21 -125
- package/dist/index289.js.map +1 -1
- package/dist/index29.js +3 -56
- package/dist/index29.js.map +1 -1
- package/dist/index290.js +53 -5
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +19 -64
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +42 -14
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +40 -14
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +46 -8
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +21 -11
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +70 -5
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +17 -3
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +3 -10
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +13 -7
- package/dist/index299.js.map +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.js +242 -3
- package/dist/index30.js.map +1 -1
- package/dist/index300.js +15 -130
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +34 -277
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +229 -389
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +253 -5
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +64 -48
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +83 -11
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +3 -27
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +29 -11
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +16 -4
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +35 -15
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +21 -239
- package/dist/index31.js.map +1 -1
- package/dist/index310.js +18 -4
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +4 -5
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +26 -11
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +28 -63
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +4 -9
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +75 -151
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +270 -30
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +11 -11
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +11 -50
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +24 -8
- package/dist/index319.js.map +1 -1
- package/dist/index32.js +4 -23
- package/dist/index32.js.map +1 -1
- package/dist/index320.js +16 -11
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +124 -42
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +5 -97
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +61 -82
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +12 -104
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +7 -52
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +5 -11
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +3 -4
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +10 -37
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +7 -8
- package/dist/index329.js.map +1 -1
- package/dist/index33.js +6 -3
- package/dist/index33.js.map +1 -1
- package/dist/index330.js +385 -121
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +5 -18
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +51 -14
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +11 -3
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +25 -34
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +11 -20
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +154 -9
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +32 -8
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +11 -24
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +46 -25
- package/dist/index339.js.map +1 -1
- package/dist/index34.js +38 -8
- package/dist/index34.js.map +1 -1
- package/dist/index340.js +9 -16
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +11 -4
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +43 -17
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +97 -12
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +86 -8
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +105 -11
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +51 -7
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +10 -12
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +4 -3
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +37 -3
- package/dist/index349.js.map +1 -1
- package/dist/index35.js +74 -35
- package/dist/index35.js.map +1 -1
- package/dist/index350.js +9 -4
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +136 -15
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +17 -11
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +15 -5
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +4 -5
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +37 -3
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +19 -7
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +9 -51
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +8 -16
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +25 -8
- package/dist/index359.js.map +1 -1
- package/dist/index36.js +20 -74
- package/dist/index36.js.map +1 -1
- package/dist/index360.js +28 -5
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +15 -19
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +5 -45
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +16 -16
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +13 -5
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +7 -199
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +27 -74
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +131 -117
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +10 -15
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +44 -59
- package/dist/index369.js.map +1 -1
- package/dist/index37.js +33 -18
- package/dist/index37.js.map +1 -1
- package/dist/index370.js +3 -66
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +21 -11
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +74 -20
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +12 -145
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +3 -79
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +73 -61
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +200 -4
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +71 -20
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +35 -4
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +7 -5
- package/dist/index379.js.map +1 -1
- package/dist/index38.js +26 -36
- package/dist/index38.js.map +1 -1
- package/dist/index380.js +16 -4
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +123 -15
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +4 -9
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +11 -5
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +5 -4
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +3 -546
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +20 -46
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +45 -18
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +18 -6
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +5 -8
- package/dist/index389.js.map +1 -1
- package/dist/index39.js +21 -26
- package/dist/index39.js.map +1 -1
- package/dist/index390.js +4 -6
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +20 -7
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +4 -11
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +4 -8
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +4 -13
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +16 -3
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +9 -3
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +6 -7
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +4 -12
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +543 -44
- package/dist/index399.js.map +1 -1
- package/dist/index4.js +2 -2
- package/dist/index40.js +56 -20
- package/dist/index40.js.map +1 -1
- package/dist/index400.js +44 -135
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +17 -8
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +6 -27
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +7 -3
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +6 -21
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +7 -75
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +12 -12
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +8 -3
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +12 -71
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +3 -36
- package/dist/index409.js.map +1 -1
- package/dist/index41.js +51 -59
- package/dist/index41.js.map +1 -1
- package/dist/index410.js +14 -15
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +491 -4
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +3 -56
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +3 -68
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +5 -31
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +56 -9
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +61 -146
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +26 -103
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +9 -8
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +153 -2
- package/dist/index419.js.map +1 -1
- package/dist/index42.js +21 -50
- package/dist/index42.js.map +1 -1
- package/dist/index420.js +107 -43
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +32 -55
- package/dist/index421.js.map +1 -1
- package/dist/index422.js +6 -6
- package/dist/index422.js.map +1 -1
- package/dist/index424.js +38 -49
- package/dist/index424.js.map +1 -1
- package/dist/index425.js +50 -50
- package/dist/index425.js.map +1 -1
- package/dist/index426.js +8 -3
- package/dist/index426.js.map +1 -1
- package/dist/index427.js +2 -15
- package/dist/index427.js.map +1 -1
- package/dist/index428.js +50 -487
- package/dist/index428.js.map +1 -1
- package/dist/index429.js +55 -32
- package/dist/index429.js.map +1 -1
- package/dist/index43.js +127 -18
- package/dist/index43.js.map +1 -1
- package/dist/index430.js +16 -2
- package/dist/index430.js.map +1 -1
- package/dist/index431.js +29 -2
- package/dist/index431.js.map +1 -1
- package/dist/index432.js +13 -2
- package/dist/index432.js.map +1 -1
- package/dist/index433.js +7 -2
- package/dist/index433.js.map +1 -1
- package/dist/index434.js +2 -16
- package/dist/index434.js.map +1 -1
- package/dist/index435.js +2 -29
- package/dist/index435.js.map +1 -1
- package/dist/index436.js +2 -13
- package/dist/index436.js.map +1 -1
- package/dist/index437.js +2 -7
- package/dist/index437.js.map +1 -1
- package/dist/index44.js +39 -122
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +85 -42
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +123 -87
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +5 -126
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +332 -5
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +246 -321
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +2 -2
- package/dist/index50.js +23 -254
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +129 -25
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +24 -129
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +19 -22
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +134 -19
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +30 -133
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +24 -30
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +38 -26
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +19 -39
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +133 -18
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +4 -4
- package/dist/index60.js +49 -134
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +25 -48
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +57 -28
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +56 -57
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +5 -5
- package/dist/index64.js.map +1 -1
- package/dist/index66.js +22 -10
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +232 -17
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +5 -5
- package/dist/index68.js.map +1 -1
- package/dist/index7.js +11 -11
- package/dist/index70.js +10 -22
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +17 -232
- package/dist/index71.js.map +1 -1
- package/dist/index76.js +1 -1
- package/dist/index77.js +2 -2
- package/dist/index78.js +2 -2
- package/dist/index8.js +2 -2
- package/dist/index9.js +1 -1
- package/package.json +1 -1
package/dist/index264.js
CHANGED
|
@@ -1,180 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return (t) => t === "touch" ? e.current : !0;
|
|
20
|
-
}
|
|
21
|
-
function V(e, t, i = !1) {
|
|
22
|
-
const r = T(), u = C() != null, o = a.useRef(null);
|
|
23
|
-
e === void 0 && o.current === null && (o.current = t(r, u));
|
|
24
|
-
const n = e ?? o.current;
|
|
25
|
-
return E({
|
|
26
|
-
popupStore: n,
|
|
27
|
-
treatPopupAsFloatingElement: i,
|
|
28
|
-
floatingRootContext: n.state.floatingRootContext,
|
|
29
|
-
floatingId: r,
|
|
30
|
-
nested: u,
|
|
31
|
-
onOpenChange: n.setOpen
|
|
32
|
-
}), {
|
|
33
|
-
store: n,
|
|
34
|
-
internalStore: o.current
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function R(e, t) {
|
|
38
|
-
const i = a.useRef(null), r = a.useRef(null);
|
|
39
|
-
return a.useCallback((u) => {
|
|
40
|
-
if (e === void 0)
|
|
41
|
-
return;
|
|
42
|
-
let o = !1;
|
|
43
|
-
if (i.current !== null) {
|
|
44
|
-
const n = i.current, g = r.current, l = t.context.triggerElements.getById(n);
|
|
45
|
-
g && l === g && (t.context.triggerElements.delete(n), o = !0), i.current = null, r.current = null;
|
|
46
|
-
}
|
|
47
|
-
if (u !== null && (i.current = e, r.current = u, t.context.triggerElements.add(e, u), o = !0), o) {
|
|
48
|
-
const n = t.context.triggerElements.size;
|
|
49
|
-
t.select("open") && t.state.triggerCount !== n && t.set("triggerCount", n);
|
|
50
|
-
}
|
|
51
|
-
}, [t, e]);
|
|
52
|
-
}
|
|
53
|
-
function j(e, t, i, r = !1) {
|
|
54
|
-
t ? e.preventUnmountingOnClose = !1 : r && (e.preventUnmountingOnClose = !0);
|
|
55
|
-
const u = i?.id ?? null;
|
|
56
|
-
(u || t) && (e.activeTriggerId = u, e.activeTriggerElement = i ?? null);
|
|
57
|
-
}
|
|
58
|
-
function q(e, t, i, r) {
|
|
59
|
-
const u = i.useState("isMountedByTrigger", e), o = R(e, i), n = p((g) => {
|
|
60
|
-
if (o(g), !g)
|
|
61
|
-
return;
|
|
62
|
-
const l = i.select("open"), c = i.select("activeTriggerId");
|
|
63
|
-
if (c === e) {
|
|
64
|
-
i.update({
|
|
65
|
-
activeTriggerElement: g,
|
|
66
|
-
...l ? r : null
|
|
67
|
-
});
|
|
68
|
-
return;
|
|
1
|
+
import { SafeReact as a } from "./index272.js";
|
|
2
|
+
import { useRefWithInit as c } from "./index284.js";
|
|
3
|
+
const n = a.useInsertionEffect, r = (
|
|
4
|
+
// React 17 doesn't have useInsertionEffect.
|
|
5
|
+
n && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
|
|
6
|
+
n !== a.useLayoutEffect ? n : (e) => e()
|
|
7
|
+
);
|
|
8
|
+
function i(e) {
|
|
9
|
+
const t = c(o).current;
|
|
10
|
+
return t.next = e, r(t.effect), t.trampoline;
|
|
11
|
+
}
|
|
12
|
+
function o() {
|
|
13
|
+
const e = {
|
|
14
|
+
next: void 0,
|
|
15
|
+
callback: f,
|
|
16
|
+
trampoline: (...t) => e.callback?.(...t),
|
|
17
|
+
effect: () => {
|
|
18
|
+
e.callback = e.next;
|
|
69
19
|
}
|
|
70
|
-
c == null && l && i.update({
|
|
71
|
-
activeTriggerId: e,
|
|
72
|
-
activeTriggerElement: g,
|
|
73
|
-
...r
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
return s(() => {
|
|
77
|
-
u && i.update({
|
|
78
|
-
activeTriggerElement: t.current,
|
|
79
|
-
...r
|
|
80
|
-
});
|
|
81
|
-
}, [u, i, t, ...Object.values(r)]), {
|
|
82
|
-
registerTrigger: n,
|
|
83
|
-
isMountedByThisTrigger: u
|
|
84
20
|
};
|
|
21
|
+
return e;
|
|
85
22
|
}
|
|
86
|
-
function
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
e.state.triggerCount !== 0 && e.set("triggerCount", 0);
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
const o = e.context.triggerElements.size, n = {};
|
|
96
|
-
e.state.triggerCount !== o && (n.triggerCount = o);
|
|
97
|
-
const g = e.select("activeTriggerId");
|
|
98
|
-
let l = null;
|
|
99
|
-
if (g) {
|
|
100
|
-
const c = e.context.triggerElements.getById(g);
|
|
101
|
-
c ? c !== e.state.activeTriggerElement && (n.activeTriggerElement = c) : l = g;
|
|
102
|
-
}
|
|
103
|
-
if (!l && !g && o === 1) {
|
|
104
|
-
const c = e.context.triggerElements.entries().next();
|
|
105
|
-
if (!c.done) {
|
|
106
|
-
const [m, d] = c.value;
|
|
107
|
-
n.activeTriggerId = m, n.activeTriggerElement = d;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
(n.triggerCount !== void 0 || n.activeTriggerId !== void 0 || n.activeTriggerElement !== void 0) && e.update(n), l && i && queueMicrotask(() => {
|
|
111
|
-
if (e.select("open") && e.select("activeTriggerId") === l && !e.context.triggerElements.getById(l)) {
|
|
112
|
-
const c = S(P);
|
|
113
|
-
e.setOpen(!1, c), c.isCanceled || e.update({
|
|
114
|
-
activeTriggerId: null,
|
|
115
|
-
activeTriggerElement: null
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}, [r, e, u, i]);
|
|
120
|
-
}
|
|
121
|
-
function J(e, t, i) {
|
|
122
|
-
const {
|
|
123
|
-
mounted: r,
|
|
124
|
-
setMounted: u,
|
|
125
|
-
transitionStatus: o
|
|
126
|
-
} = I(e), n = t.useState("preventUnmountingOnClose"), g = e ? !1 : n;
|
|
127
|
-
t.useSyncedValues({
|
|
128
|
-
mounted: r,
|
|
129
|
-
transitionStatus: o,
|
|
130
|
-
preventUnmountingOnClose: g
|
|
131
|
-
});
|
|
132
|
-
const l = p(() => {
|
|
133
|
-
u(!1), t.update({
|
|
134
|
-
activeTriggerId: null,
|
|
135
|
-
activeTriggerElement: null,
|
|
136
|
-
mounted: !1,
|
|
137
|
-
preventUnmountingOnClose: !1
|
|
138
|
-
}), t.context.onOpenChangeComplete?.(!1);
|
|
139
|
-
});
|
|
140
|
-
return O({
|
|
141
|
-
enabled: r && !e && !g,
|
|
142
|
-
open: e,
|
|
143
|
-
ref: t.context.popupRef,
|
|
144
|
-
onComplete() {
|
|
145
|
-
e || l();
|
|
146
|
-
}
|
|
147
|
-
}), {
|
|
148
|
-
forceUnmount: l,
|
|
149
|
-
transitionStatus: o
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
function N(e, t) {
|
|
153
|
-
e.useSyncedValues(t), s(() => () => {
|
|
154
|
-
e.update({
|
|
155
|
-
activeTriggerProps: f,
|
|
156
|
-
inactiveTriggerProps: f,
|
|
157
|
-
popupProps: f
|
|
158
|
-
});
|
|
159
|
-
}, [e]);
|
|
160
|
-
}
|
|
161
|
-
function Y(e, t) {
|
|
162
|
-
s(() => {
|
|
163
|
-
!t && e.state.openMethod !== null && e.set("openMethod", null);
|
|
164
|
-
}, [t, e]), s(() => () => {
|
|
165
|
-
e.state.openMethod !== null && e.set("openMethod", null);
|
|
166
|
-
}, [e]);
|
|
23
|
+
function f() {
|
|
24
|
+
if (process.env.NODE_ENV !== "production")
|
|
25
|
+
throw (
|
|
26
|
+
/* minify-error-disabled */
|
|
27
|
+
new Error("Base UI: Cannot call an event handler while rendering.")
|
|
28
|
+
);
|
|
167
29
|
}
|
|
168
30
|
export {
|
|
169
|
-
|
|
170
|
-
z as createDefaultInitialFocus,
|
|
171
|
-
j as setPopupOpenState,
|
|
172
|
-
w as useImplicitActiveTrigger,
|
|
173
|
-
J as useOpenStateTransitions,
|
|
174
|
-
N as usePopupInteractionProps,
|
|
175
|
-
Y as usePopupRootSync,
|
|
176
|
-
V as usePopupStore,
|
|
177
|
-
q as useTriggerDataForwarding,
|
|
178
|
-
R as useTriggerRegistration
|
|
31
|
+
i as useStableCallback
|
|
179
32
|
};
|
|
180
33
|
//# sourceMappingURL=index264.js.map
|
package/dist/index264.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index264.js","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 { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';\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}\nexport function usePopupStore(externalStore, createStore, treatPopupAsFloatingElement = false) {\n const floatingId = useId();\n const nested = useFloatingParentNodeId() != null;\n const internalStoreRef = React.useRef(null);\n if (externalStore === undefined && internalStoreRef.current === null) {\n internalStoreRef.current = createStore(floatingId, nested);\n }\n const store = externalStore ?? internalStoreRef.current;\n useSyncedFloatingRootContext({\n popupStore: store,\n treatPopupAsFloatingElement,\n floatingRootContext: store.state.floatingRootContext,\n floatingId,\n nested,\n onOpenChange: store.setOpen\n });\n return {\n store,\n internalStore: internalStoreRef.current\n };\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}\nexport function useInitialOpenSync(store, openProp, defaultOpen, defaultTriggerId) {\n useOnFirstRender(() => {\n if (openProp === undefined && store.state.open === false && defaultOpen) {\n // Avoid notifying detached trigger subscribers while the Root is rendering.\n store.state = {\n ...store.state,\n open: true,\n activeTriggerId: defaultTriggerId,\n preventUnmountingOnClose: false\n };\n }\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 const registerTrigger = useStableCallback(element => {\n baseRegisterTrigger(element);\n if (!element) {\n return;\n }\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 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 unregisters, the\n * default path preserves existing ownership so non-closing popup families do not silently claim a\n * different trigger while staying open.\n *\n * If `closeOnActiveTriggerUnmount` is enabled, unregistering the active trigger requests a close\n * after a microtask so a same-tick replacement trigger with the same id can register first.\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 const open = store.useState('open');\n const reactiveTriggerCount = store.useState('triggerCount');\n useIsoLayoutEffect(() => {\n if (!open) {\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 activeTriggerId = store.select('activeTriggerId');\n let lostActiveTriggerId = null;\n if (activeTriggerId) {\n const activeTriggerElement = store.context.triggerElements.getById(activeTriggerId);\n if (!activeTriggerElement) {\n lostActiveTriggerId = activeTriggerId;\n } else if (activeTriggerElement !== store.state.activeTriggerElement) {\n stateUpdates.activeTriggerElement = activeTriggerElement;\n }\n }\n if (!lostActiveTriggerId && !activeTriggerId && 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 }\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, 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}"],"names":["FOCUSABLE_POPUP_PROPS","FOCUSABLE_ATTRIBUTE","createDefaultInitialFocus","popupRef","interactionType","usePopupStore","externalStore","createStore","treatPopupAsFloatingElement","floatingId","useId","nested","useFloatingParentNodeId","internalStoreRef","React","store","useSyncedFloatingRootContext","useTriggerRegistration","id","registeredElementIdRef","registeredElementRef","element","shouldSyncTriggerCount","registeredId","registeredElement","currentElement","triggerCount","setPopupOpenState","state","open","trigger","preventUnmountOnClose","triggerId","useTriggerDataForwarding","triggerElementRef","stateUpdates","isMountedByThisTrigger","baseRegisterTrigger","registerTrigger","useStableCallback","activeTriggerId","useIsoLayoutEffect","useImplicitActiveTrigger","options","closeOnActiveTriggerUnmount","reactiveTriggerCount","lostActiveTriggerId","activeTriggerElement","iteratorResult","implicitTriggerId","implicitTriggerElement","eventDetails","createChangeEventDetails","REASONS.none","useOpenStateTransitions","onUnmount","mounted","setMounted","transitionStatus","useTransitionStatus","preventUnmountingOnClose","syncedPreventUnmountingOnClose","forceUnmount","useOpenChangeComplete","usePopupInteractionProps","statePart","EMPTY_OBJECT","usePopupRootSync"],"mappings":";;;;;;;;;;;;;AAgBY,MAACA,IAAwB;AAAA,EACnC,UAAU;AAAA,EACV,CAACC,CAAmB,GAAG;AACzB;AAOO,SAASC,EAA0BC,GAAU;AAClD,SAAO,CAAAC,MAAmBA,MAAoB,UAAUD,EAAS,UAAU;AAC7E;AACO,SAASE,EAAcC,GAAeC,GAAaC,IAA8B,IAAO;AAC7F,QAAMC,IAAaC,EAAK,GAClBC,IAASC,EAAuB,KAAM,MACtCC,IAAmBC,EAAM,OAAO,IAAI;AAC1C,EAAIR,MAAkB,UAAaO,EAAiB,YAAY,SAC9DA,EAAiB,UAAUN,EAAYE,GAAYE,CAAM;AAE3D,QAAMI,IAAQT,KAAiBO,EAAiB;AAChD,SAAAG,EAA6B;AAAA,IAC3B,YAAYD;AAAA,IACZ,6BAAAP;AAAA,IACA,qBAAqBO,EAAM,MAAM;AAAA,IACjC,YAAAN;AAAA,IACA,QAAAE;AAAA,IACA,cAAcI,EAAM;AAAA,EACxB,CAAG,GACM;AAAA,IACL,OAAAA;AAAA,IACA,eAAeF,EAAiB;AAAA,EACpC;AACA;AAOO,SAASI,EAAuBC,GAAIH,GAAO;AAEhD,QAAMI,IAAyBL,EAAM,OAAO,IAAI,GAC1CM,IAAuBN,EAAM,OAAO,IAAI;AAC9C,SAAOA,EAAM,YAAY,CAAAO,MAAW;AAClC,QAAIH,MAAO;AACT;AAEF,QAAII,IAAyB;AAC7B,QAAIH,EAAuB,YAAY,MAAM;AAC3C,YAAMI,IAAeJ,EAAuB,SACtCK,IAAoBJ,EAAqB,SACzCK,IAAiBV,EAAM,QAAQ,gBAAgB,QAAQQ,CAAY;AACzE,MAAIC,KAAqBC,MAAmBD,MAC1CT,EAAM,QAAQ,gBAAgB,OAAOQ,CAAY,GACjDD,IAAyB,KAE3BH,EAAuB,U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,EACJ,CAAG,GACM;AAAA,IACL,cAAAA;AAAA,IACA,kBAAAJ;AAAA,EACJ;AACA;AACO,SAASM,EAAyBjD,GAAOkD,GAAW;AACzD,EAAAlD,EAAM,gBAAgBkD,CAAS,GAC/BxB,EAAmB,MAAM,MAAM;AAC7B,IAAA1B,EAAM,OAAO;AAAA,MACX,oBAAoBmD;AAAA,MACpB,sBAAsBA;AAAA,MACtB,YAAYA;AAAA,IAClB,CAAK;AAAA,EACH,GAAG,CAACnD,CAAK,CAAC;AACZ;AACO,SAASoD,EAAiBpD,GAAOc,GAAM;AAC5C,EAAAY,EAAmB,MAAM;AACvB,IAAI,CAACZ,KAAQd,EAAM,MAAM,eAAe,QACtCA,EAAM,IAAI,cAAc,IAAI;AAAA,EAEhC,GAAG,CAACc,GAAMd,CAAK,CAAC,GAChB0B,EAAmB,MAAM,MAAM;AAC7B,IAAI1B,EAAM,MAAM,eAAe,QAC7BA,EAAM,IAAI,cAAc,IAAI;AAAA,EAEhC,GAAG,CAACA,CAAK,CAAC;AACZ;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index264.js","sources":["../../../node_modules/@base-ui/utils/useStableCallback.mjs"],"sourcesContent":["'use client';\n\nimport { SafeReact } from \"./safeReact.mjs\";\nimport { useRefWithInit } from \"./useRefWithInit.mjs\";\nconst useInsertionEffect = SafeReact.useInsertionEffect;\nconst useSafeInsertionEffect =\n// React 17 doesn't have useInsertionEffect.\nuseInsertionEffect &&\n// Preact replaces useInsertionEffect with useLayoutEffect and fires too late.\nuseInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : fn => fn();\n/**\n * Stabilizes the function passed so it's always the same between renders.\n *\n * The function becomes non-reactive to any values it captures.\n * It can safely be passed as a dependency of `React.useMemo` and `React.useEffect` without re-triggering them if its captured values change.\n *\n * The function must only be called inside effects and event handlers, never during render (which throws an error).\n *\n * This hook is a more permissive version of React 19.2's `React.useEffectEvent` in that it can be passed through contexts and called in event handler props, not just effects.\n */\nexport function useStableCallback(callback) {\n const stable = useRefWithInit(createStableCallback).current;\n stable.next = callback;\n useSafeInsertionEffect(stable.effect);\n return stable.trampoline;\n}\nfunction createStableCallback() {\n const stable = {\n next: undefined,\n callback: assertNotCalled,\n trampoline: (...args) => stable.callback?.(...args),\n effect: () => {\n stable.callback = stable.next;\n }\n };\n return stable;\n}\nfunction assertNotCalled() {\n if (process.env.NODE_ENV !== 'production') {\n // TODO: fix mui/no-guarded-throw\n // eslint-disable-next-line mui/no-guarded-throw\n throw /* minify-error-disabled */new Error('Base UI: Cannot call an event handler while rendering.');\n }\n}"],"names":["useInsertionEffect","SafeReact","useSafeInsertionEffect","fn","useStableCallback","callback","stable","useRefWithInit","createStableCallback","assertNotCalled","args"],"mappings":";;AAIA,MAAMA,IAAqBC,EAAU,oBAC/BC;AAAA;AAAA,EAENF;AAAA,EAEAA,MAAuBC,EAAU,kBAAkBD,IAAqB,CAAAG,MAAMA,EAAE;AAAA;AAWzE,SAASC,EAAkBC,GAAU;AAC1C,QAAMC,IAASC,EAAeC,CAAoB,EAAE;AACpD,SAAAF,EAAO,OAAOD,GACdH,EAAuBI,EAAO,MAAM,GAC7BA,EAAO;AAChB;AACA,SAASE,IAAuB;AAC9B,QAAMF,IAAS;AAAA,IACb,MAAM;AAAA,IACN,UAAUG;AAAA,IACV,YAAY,IAAIC,MAASJ,EAAO,WAAW,GAAGI,CAAI;AAAA,IAClD,QAAQ,MAAM;AACZ,MAAAJ,EAAO,WAAWA,EAAO;AAAA,IAC3B;AAAA,EACJ;AACE,SAAOA;AACT;AACA,SAASG,IAAkB;AACzB,MAAI,QAAQ,IAAI,aAAa;AAG3B;AAAA;AAAA,MAAiC,IAAI,MAAM,wDAAwD;AAAA;AAEvG;","x_google_ignoreList":[0]}
|
package/dist/index265.js
CHANGED
|
@@ -1,87 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
constructor(t) {
|
|
13
|
-
this.state = t, this.listeners = /* @__PURE__ */ new Set(), this.updateTick = 0;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Registers a listener that will be called whenever the store's state changes.
|
|
17
|
-
*
|
|
18
|
-
* @param fn The listener function to be called on state changes.
|
|
19
|
-
* @returns A function to unsubscribe the listener.
|
|
20
|
-
*/
|
|
21
|
-
subscribe = (t) => (this.listeners.add(t), () => {
|
|
22
|
-
this.listeners.delete(t);
|
|
23
|
-
});
|
|
24
|
-
/**
|
|
25
|
-
* Returns the current state of the store.
|
|
26
|
-
*/
|
|
27
|
-
getSnapshot = () => this.state;
|
|
28
|
-
/**
|
|
29
|
-
* Updates the entire store's state and notifies all registered listeners.
|
|
30
|
-
*
|
|
31
|
-
* @param newState The new state to set for the store.
|
|
32
|
-
*/
|
|
33
|
-
setState(t) {
|
|
34
|
-
if (this.state === t)
|
|
1
|
+
import * as l from "react-dom";
|
|
2
|
+
import { useAnimationFrame as b } from "./index323.js";
|
|
3
|
+
import { useStableCallback as A } from "./index264.js";
|
|
4
|
+
import { resolveRef as d } from "./index374.js";
|
|
5
|
+
import { TransitionStatusDataAttributes as h } from "./index152.js";
|
|
6
|
+
function y(c, f = !1, m = !0) {
|
|
7
|
+
const o = b();
|
|
8
|
+
return A((s, n = null) => {
|
|
9
|
+
o.cancel();
|
|
10
|
+
const a = d(c);
|
|
11
|
+
if (a == null)
|
|
35
12
|
return;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
13
|
+
const e = a, u = () => {
|
|
14
|
+
l.flushSync(s);
|
|
15
|
+
};
|
|
16
|
+
if (typeof e.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
|
|
17
|
+
s();
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
function i() {
|
|
21
|
+
Promise.all(e.getAnimations().map((t) => t.finished)).then(() => {
|
|
22
|
+
n?.aborted || u();
|
|
23
|
+
}).catch(() => {
|
|
24
|
+
if (m) {
|
|
25
|
+
n?.aborted || u();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const t = e.getAnimations();
|
|
29
|
+
!n?.aborted && t.length > 0 && t.some((r) => r.pending || r.playState !== "finished") && i();
|
|
30
|
+
});
|
|
42
31
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* @param changes An object containing the changes to apply to the current state.
|
|
48
|
-
*/
|
|
49
|
-
update(t) {
|
|
50
|
-
for (const s in t)
|
|
51
|
-
if (!Object.is(this.state[s], t[s])) {
|
|
52
|
-
this.setState({
|
|
53
|
-
...this.state,
|
|
54
|
-
...t
|
|
55
|
-
});
|
|
32
|
+
if (f) {
|
|
33
|
+
const t = h.startingStyle;
|
|
34
|
+
if (!e.hasAttribute(t)) {
|
|
35
|
+
o.request(i);
|
|
56
36
|
return;
|
|
57
37
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Gives the state a new reference and updates all registered listeners.
|
|
73
|
-
*/
|
|
74
|
-
notifyAll() {
|
|
75
|
-
const t = {
|
|
76
|
-
...this.state
|
|
77
|
-
};
|
|
78
|
-
this.setState(t);
|
|
79
|
-
}
|
|
80
|
-
use(t, s, e, i) {
|
|
81
|
-
return r(this, t, s, e, i);
|
|
82
|
-
}
|
|
38
|
+
const r = new MutationObserver(() => {
|
|
39
|
+
e.hasAttribute(t) || (r.disconnect(), i());
|
|
40
|
+
});
|
|
41
|
+
r.observe(e, {
|
|
42
|
+
attributes: !0,
|
|
43
|
+
attributeFilter: [t]
|
|
44
|
+
}), n?.addEventListener("abort", () => r.disconnect(), {
|
|
45
|
+
once: !0
|
|
46
|
+
});
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
o.request(i);
|
|
50
|
+
});
|
|
83
51
|
}
|
|
84
52
|
export {
|
|
85
|
-
|
|
53
|
+
y as useAnimationsFinished
|
|
86
54
|
};
|
|
87
55
|
//# sourceMappingURL=index265.js.map
|
package/dist/index265.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index265.js","sources":["../../../node_modules/@base-ui/
|
|
1
|
+
{"version":3,"file":"index265.js","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 { TransitionStatusDataAttributes } from \"./stateAttributesMapping.mjs\";\n\n/**\n * Executes a function once all animations have finished on the provided element.\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 treatAbortedAsFinished - Whether to treat aborted animations as finished. If `false`, and there are aborted animations,\n * the function will check again if any new animations have started and wait for them to finish.\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, treatAbortedAsFinished = true) {\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 // Synchronously flush the unmounting of the component so that the browser doesn't\n // paint: https://github.com/mui/base-ui/issues/979\n ReactDOM.flushSync(fnToExecute);\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 }).catch(() => {\n if (treatAbortedAsFinished) {\n if (!signal?.aborted) {\n done();\n }\n return;\n }\n const currentAnimations = resolvedElement.getAnimations();\n if (!signal?.aborted && currentAnimations.length > 0 && 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 }\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}"],"names":["useAnimationsFinished","elementOrRef","waitForStartingStyleRemoved","treatAbortedAsFinished","frame","useAnimationFrame","useStableCallback","fnToExecute","signal","element","resolveRef","resolvedElement","done","ReactDOM","exec","animation","currentAnimations","startingStyleAttribute","TransitionStatusDataAttributes","attributeObserver"],"mappings":";;;;;AAgBO,SAASA,EAAsBC,GAAcC,IAA8B,IAAOC,IAAyB,IAAM;AACtH,QAAMC,IAAQC,EAAiB;AAC/B,SAAOC,EAAkB,CAACC,GAM1BC,IAAS,SAAS;AAChB,IAAAJ,EAAM,OAAM;AACZ,UAAMK,IAAUC,EAA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1,16 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
const e = parseInt(t.version, 10);
|
|
3
|
+
function o(r) {
|
|
4
|
+
return e >= r;
|
|
5
|
+
}
|
|
2
6
|
export {
|
|
3
|
-
|
|
4
|
-
c as closePress,
|
|
5
|
-
r as escapeKey,
|
|
6
|
-
i as focusOut,
|
|
7
|
-
g as imperativeAction,
|
|
8
|
-
n as itemPress,
|
|
9
|
-
a as listNavigation,
|
|
10
|
-
e as none,
|
|
11
|
-
t as outsidePress,
|
|
12
|
-
o as triggerHover,
|
|
13
|
-
s as triggerPress,
|
|
14
|
-
l as windowResize
|
|
7
|
+
o as isReactVersionAtLeast
|
|
15
8
|
};
|
|
16
9
|
//# sourceMappingURL=index266.js.map
|
package/dist/index266.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index266.js","sources":["../../../node_modules/@base-ui/
|
|
1
|
+
{"version":3,"file":"index266.js","sources":["../../../node_modules/@base-ui/utils/reactVersion.mjs"],"sourcesContent":["import * as React from 'react';\nconst majorVersion = parseInt(React.version, 10);\nexport function isReactVersionAtLeast(reactVersionToCheck) {\n return majorVersion >= reactVersionToCheck;\n}"],"names":["majorVersion","React","isReactVersionAtLeast","reactVersionToCheck"],"mappings":";AACA,MAAMA,IAAe,SAASC,EAAM,SAAS,EAAE;AACxC,SAASC,EAAsBC,GAAqB;AACzD,SAAOH,KAAgBG;AACzB;","x_google_ignoreList":[0]}
|
package/dist/index267.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
function n(r) {
|
|
3
|
+
const e = t.useRef(!0);
|
|
4
|
+
e.current && (e.current = !1, r());
|
|
3
5
|
}
|
|
4
6
|
export {
|
|
5
|
-
|
|
7
|
+
n as useOnFirstRender
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=index267.js.map
|
package/dist/index267.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index267.js","sources":["../../../node_modules/@base-ui/utils/
|
|
1
|
+
{"version":3,"file":"index267.js","sources":["../../../node_modules/@base-ui/utils/useOnFirstRender.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nexport function useOnFirstRender(fn) {\n const ref = React.useRef(true);\n if (ref.current) {\n ref.current = false;\n fn();\n }\n}"],"names":["useOnFirstRender","fn","ref","React"],"mappings":";AAGO,SAASA,EAAiBC,GAAI;AACnC,QAAMC,IAAMC,EAAM,OAAO,EAAI;AAC7B,EAAID,EAAI,YACNA,EAAI,UAAU,IACdD,EAAE;AAEN;","x_google_ignoreList":[0]}
|
package/dist/index268.js
CHANGED
|
@@ -1,33 +1,65 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { useScrollLock as P } from "./index381.js";
|
|
3
|
+
import { EMPTY_OBJECT as f } from "./index258.js";
|
|
4
|
+
import { createChangeEventDetails as C } from "./index153.js";
|
|
5
|
+
import { usePopupRootSync as S, useImplicitActiveTrigger as k, useOpenStateTransitions as E, usePopupInteractionProps as T } from "./index162.js";
|
|
6
|
+
import { useDismiss as h } from "./index302.js";
|
|
7
|
+
import { getTarget as w, contains as x } from "./index313.js";
|
|
8
|
+
import { imperativeAction as I } from "./index155.js";
|
|
9
|
+
function L(e) {
|
|
10
|
+
const {
|
|
11
|
+
store: t,
|
|
12
|
+
actionsRef: a
|
|
13
|
+
} = e, o = t.useState("open");
|
|
14
|
+
S(t, o), k(t);
|
|
15
|
+
const {
|
|
16
|
+
forceUnmount: c
|
|
17
|
+
} = E(o, t), s = r.useCallback(() => {
|
|
18
|
+
t.setOpen(!1, C(I));
|
|
19
|
+
}, [t]);
|
|
20
|
+
r.useImperativeHandle(a, () => ({
|
|
21
|
+
unmount: c,
|
|
22
|
+
close: s
|
|
23
|
+
}), [c, s]);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
function M({
|
|
26
|
+
store: e,
|
|
27
|
+
parentContext: t,
|
|
28
|
+
isDrawer: a
|
|
29
|
+
}) {
|
|
30
|
+
const o = e.useState("open"), c = e.useState("disablePointerDismissal"), s = e.useState("modal"), d = e.useState("popupElement"), O = e.useState("floatingRootContext"), [u, m] = r.useState(0), [l, g] = r.useState(0), D = u === 0, p = h(O, {
|
|
31
|
+
outsidePressEvent() {
|
|
32
|
+
return e.context.internalBackdropRef.current || e.context.backdropRef.current ? "intentional" : {
|
|
33
|
+
mouse: s === "trap-focus" ? "sloppy" : "intentional",
|
|
34
|
+
touch: "sloppy"
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
outsidePress(n) {
|
|
38
|
+
if (!e.context.outsidePressEnabledRef.current || "button" in n && n.button !== 0 || "touches" in n && n.touches.length !== 1)
|
|
39
|
+
return !1;
|
|
40
|
+
const i = w(n);
|
|
41
|
+
return D && !c ? s && (e.context.internalBackdropRef.current || e.context.backdropRef.current) ? e.context.internalBackdropRef.current === i || e.context.backdropRef.current === i || x(i, d) && !i?.hasAttribute("data-base-ui-portal") : !0 : !1;
|
|
42
|
+
},
|
|
43
|
+
escapeKey: D
|
|
44
|
+
});
|
|
45
|
+
P(o && s === !0, d), e.useContextCallback("onNestedDialogOpen", (n, i) => {
|
|
46
|
+
m(n), g(i);
|
|
47
|
+
}), e.useContextCallback("onNestedDialogClose", () => {
|
|
48
|
+
m(0), g(0);
|
|
49
|
+
}), r.useEffect(() => (t?.onNestedDialogOpen && o && t.onNestedDialogOpen(u + 1, l + (a ? 1 : 0)), t?.onNestedDialogClose && !o && t.onNestedDialogClose(), () => {
|
|
50
|
+
t?.onNestedDialogClose && o && t.onNestedDialogClose();
|
|
51
|
+
}), [a, o, u, l, t]);
|
|
52
|
+
const b = p.reference ?? f, R = p.trigger ?? f, N = p.floating ?? f;
|
|
53
|
+
return T(e, {
|
|
54
|
+
activeTriggerProps: b,
|
|
55
|
+
inactiveTriggerProps: R,
|
|
56
|
+
popupProps: N,
|
|
57
|
+
nestedOpenDialogCount: u,
|
|
58
|
+
nestedOpenDrawerCount: l
|
|
59
|
+
}), null;
|
|
28
60
|
}
|
|
29
61
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
62
|
+
M as DialogInteractions,
|
|
63
|
+
L as useDialogRoot
|
|
32
64
|
};
|
|
33
65
|
//# sourceMappingURL=index268.js.map
|