@rpcbase/ui 0.280.0 → 0.281.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/components/AddressAutocompleteInput/index.d.ts +1 -1
- package/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -1
- package/dist/components/ApplePayButton/index.d.ts +1 -1
- package/dist/components/ApplePayButton/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/DayPickerField/index.d.ts +2 -2
- package/dist/components/DayPickerField/index.d.ts.map +1 -1
- package/dist/components/Dialog/index.d.ts +9 -9
- package/dist/components/Dialog/index.d.ts.map +1 -1
- package/dist/components/FilesUploadField/index.d.ts +1 -1
- package/dist/components/FilesUploadField/index.d.ts.map +1 -1
- package/dist/components/HourPickerField/index.d.ts +2 -2
- package/dist/components/HourPickerField/index.d.ts.map +1 -1
- package/dist/components/I18nField/index.d.ts +1 -1
- package/dist/components/I18nField/index.d.ts.map +1 -1
- package/dist/components/Image/index.d.ts +1 -1
- package/dist/components/Image/index.d.ts.map +1 -1
- package/dist/components/ImagesField/index.d.ts +1 -1
- package/dist/components/ImagesField/index.d.ts.map +1 -1
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsButton.d.ts +1 -1
- package/dist/components/Notifications/NotificationsButton.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsDrawer.d.ts +1 -1
- package/dist/components/Notifications/NotificationsDrawer.d.ts.map +1 -1
- package/dist/components/Notifications/NotificationsSettings.d.ts +1 -1
- package/dist/components/Notifications/NotificationsSettings.d.ts.map +1 -1
- package/dist/components/PhoneNumberInput/suggestions.d.ts +3 -3
- package/dist/components/PhoneNumberInput/suggestions.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/header/MenuPopover/index.d.ts +1 -1
- package/dist/components/header/MenuPopover/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index10.js +6 -4
- package/dist/index10.js.map +1 -1
- package/dist/index12.js.map +1 -1
- package/dist/index13.js.map +1 -1
- package/dist/index14.js.map +1 -1
- package/dist/index15.js.map +1 -1
- package/dist/index154.js +19 -7
- package/dist/index154.js.map +1 -1
- package/dist/index16.js +36 -45
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +3 -3
- package/dist/index160.js.map +1 -1
- package/dist/index166.js +5 -5
- package/dist/index166.js.map +1 -1
- package/dist/index172.js +27 -25
- package/dist/index172.js.map +1 -1
- package/dist/index181.js +1 -1
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +145 -162
- package/dist/index182.js.map +1 -1
- package/dist/index184.js +6 -8
- package/dist/index184.js.map +1 -1
- package/dist/index186.js +2 -8
- package/dist/index186.js.map +1 -1
- package/dist/index19.js +1 -1
- package/dist/index19.js.map +1 -1
- package/dist/index195.js +1 -1
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +2 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +1 -1
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +16 -15
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +13 -17
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +3 -2
- package/dist/index200.js.map +1 -1
- package/dist/index207.js +5 -90
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +15 -3
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +102 -22
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +3 -28
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +23 -19
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +27 -6
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +19 -14
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +5 -6
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +14 -26
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +7 -22
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +27 -6
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +23 -5
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +6 -4
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +5 -4
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +4 -24
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +4 -3
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +21 -21
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +3 -23
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +23 -6
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +22 -9
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +5 -17
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +8 -49
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +18 -5
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +50 -19
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +20 -28
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +27 -104
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +98 -33
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +28 -113
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +117 -11
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +12 -4
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +4 -15
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +13 -62
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +64 -9
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +10 -106
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +107 -13
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +16 -13
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +13 -5
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +4 -316
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +315 -58
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +58 -223
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +215 -318
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +250 -306
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +308 -173
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +178 -7
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +8 -15
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +41 -5
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +46 -38
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +7 -50
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +49 -6
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +48 -46
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +6 -51
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +10 -9
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +60 -8
- package/dist/index259.js.map +1 -1
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +41 -60
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +88 -34
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +47 -94
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +36 -49
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +45 -32
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +47 -46
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +18 -48
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +174 -15
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +47 -169
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +17 -34
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +59 -10
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +10 -66
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +4 -4
- package/dist/index273.js +71 -69
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +158 -152
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +7 -13
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +12 -5
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +12 -6
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +11 -12
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +65 -9
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +6 -74
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +25 -6
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +24 -24
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +125 -24
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +52 -115
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +59 -55
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +48 -61
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +5 -48
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +14 -8
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +18 -14
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +10 -17
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +23 -11
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +52 -25
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +6 -52
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +137 -5
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +59 -149
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +90 -49
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +11 -117
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +863 -11
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +21 -865
- package/dist/index299.js.map +1 -1
- package/dist/index3.js.map +1 -1
- package/dist/index300.js +417 -27
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +774 -483
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +7436 -803
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +7 -7429
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +12 -6
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +5 -12
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +3 -3
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +469 -5
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +32 -464
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +18 -36
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +28 -17
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +4 -30
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +59 -4
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +11 -59
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +5 -9
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +9 -5
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +12 -9
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +3 -13
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +17 -3
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +23 -14
- package/dist/index319.js.map +1 -1
- package/dist/index320.js +39 -23
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +5 -41
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +25 -5
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +18 -24
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +32 -17
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +5 -34
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +9 -5
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +7 -8
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +9 -8
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +10 -9
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +7 -10
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +75 -7
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +153 -66
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +99 -147
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +13 -113
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +78 -12
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +23 -57
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +12 -45
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +16 -13
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +100 -15
- package/dist/index339.js.map +1 -1
- package/dist/index340.js +50 -95
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +57 -5
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +41 -78
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +100 -58
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +46 -104
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +39 -51
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +143 -42
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +122 -123
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +224 -108
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +158 -174
- package/dist/index349.js.map +1 -1
- package/dist/index350.js +213 -144
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +5 -309
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +6 -5
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +7 -6
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +4 -5
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +4 -4
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +21 -6
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +10 -21
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +128 -10
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +36 -122
- package/dist/index359.js.map +1 -1
- package/dist/index360.js +64 -38
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +115 -66
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +485 -112
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +7 -490
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +1 -1
- package/dist/index364.js.map +1 -1
- package/dist/index367.js +2 -9
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +26 -5
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +43 -27
- package/dist/index369.js.map +1 -1
- package/dist/index370.js +35 -46
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +16 -27
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +41 -16
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +11 -42
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +10 -14
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +51 -9
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +40 -53
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +17 -43
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +4 -15
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +4 -4
- package/dist/index379.js.map +1 -1
- package/dist/index380.js +9 -4
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +304 -9
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +4 -339
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +21 -5
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +106 -16
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +19 -109
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +18 -18
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +14 -19
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +12 -4
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +113 -20
- package/dist/index389.js.map +1 -1
- package/dist/index390.js +5 -11
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +28 -85
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +9 -9
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +6 -29
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +254 -10
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +12 -6
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +11 -252
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +6 -11
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +22 -10
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +22 -6
- package/dist/index399.js.map +1 -1
- package/dist/index4.js.map +1 -1
- package/dist/index400.js +103 -21
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +15 -23
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +11 -108
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +10 -15
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +237 -10
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +27 -9
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +33 -238
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +11 -30
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +118 -48
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +39 -11
- package/dist/index409.js.map +1 -1
- package/dist/index410.js +18 -121
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +11 -39
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +21 -24
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +17 -11
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +10 -20
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +4 -17
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +300 -14
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +61 -323
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +4 -63
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +28 -4
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +468 -25
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +250 -452
- package/dist/index421.js.map +1 -1
- package/dist/index6.js.map +1 -1
- package/dist/index7.js +91 -133
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +2 -2
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +11 -4
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +1 -3
- package/dist/index72.js.map +1 -1
- package/dist/index8.js.map +1 -1
- package/dist/index9.js +16 -19
- package/dist/index9.js.map +1 -1
- package/dist/test-only/TestCoverageTestBadge/index.d.ts +1 -1
- package/dist/test-only/TestCoverageTestBadge/index.d.ts.map +1 -1
- package/package.json +15 -15
- package/dist/index422.js +0 -272
- package/dist/index422.js.map +0 -1
package/dist/index268.js
CHANGED
|
@@ -1,174 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
[o]: ""
|
|
19
|
-
};
|
|
20
|
-
function p(e) {
|
|
21
|
-
return (t) => t !== "touch" || e.current;
|
|
22
|
-
}
|
|
23
|
-
function m(e, t, n = !1) {
|
|
24
|
-
let r = a(), i = s() != null, o = d.useRef(null);
|
|
25
|
-
e === void 0 && o.current === null && (o.current = t(r, i));
|
|
26
|
-
let l = e ?? o.current;
|
|
27
|
-
return c({
|
|
28
|
-
popupStore: l,
|
|
29
|
-
treatPopupAsFloatingElement: n,
|
|
30
|
-
floatingRootContext: l.state.floatingRootContext,
|
|
31
|
-
floatingId: r,
|
|
32
|
-
nested: i,
|
|
33
|
-
onOpenChange: l.setOpen
|
|
34
|
-
}), {
|
|
35
|
-
store: l,
|
|
36
|
-
internalStore: o.current
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function h(e, t) {
|
|
40
|
-
let n = d.useRef(null), r = d.useRef(null);
|
|
41
|
-
return d.useCallback((i) => {
|
|
42
|
-
if (e === void 0) return;
|
|
43
|
-
let a = !1;
|
|
44
|
-
if (n.current !== null) {
|
|
45
|
-
let e = n.current, i = r.current, o = t.context.triggerElements.getById(e);
|
|
46
|
-
i && o === i && (t.context.triggerElements.delete(e), a = !0), n.current = null, r.current = null;
|
|
47
|
-
}
|
|
48
|
-
if (i !== null && (n.current = e, r.current = i, t.context.triggerElements.add(e, i), a = !0), a) {
|
|
49
|
-
let e = t.context.triggerElements.size;
|
|
50
|
-
t.select("open") && t.state.triggerCount !== e && t.set("triggerCount", e);
|
|
51
|
-
}
|
|
52
|
-
}, [t, e]);
|
|
53
|
-
}
|
|
54
|
-
function g(e, t, n, r = !1) {
|
|
55
|
-
t ? e.preventUnmountingOnClose = !1 : r && (e.preventUnmountingOnClose = !0);
|
|
56
|
-
let i = n?.id ?? null;
|
|
57
|
-
(i || t) && (e.activeTriggerId = i, e.activeTriggerElement = n ?? null);
|
|
58
|
-
}
|
|
59
|
-
function _(e, r, i, a) {
|
|
60
|
-
let o = i.useState("isMountedByTrigger", e), s = h(e, i), c = t((t) => {
|
|
61
|
-
if (s(t), !t) return;
|
|
62
|
-
let n = i.select("open"), r = i.select("activeTriggerId");
|
|
63
|
-
if (r === e) {
|
|
64
|
-
i.update({
|
|
65
|
-
activeTriggerElement: t,
|
|
66
|
-
...n ? a : null
|
|
67
|
-
});
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
r == null && n && i.update({
|
|
71
|
-
activeTriggerId: e,
|
|
72
|
-
activeTriggerElement: t,
|
|
73
|
-
...a
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
return n(() => {
|
|
77
|
-
o && i.update({
|
|
78
|
-
activeTriggerElement: r.current,
|
|
79
|
-
...a
|
|
80
|
-
});
|
|
81
|
-
}, [
|
|
82
|
-
o,
|
|
83
|
-
i,
|
|
84
|
-
r,
|
|
85
|
-
...Object.values(a)
|
|
86
|
-
]), {
|
|
87
|
-
registerTrigger: c,
|
|
88
|
-
isMountedByThisTrigger: o
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
function v(e, t = {}) {
|
|
92
|
-
let { closeOnActiveTriggerUnmount: a = !1 } = t, o = e.useState("open");
|
|
93
|
-
n(() => {
|
|
94
|
-
if (!o) {
|
|
95
|
-
e.state.triggerCount !== 0 && e.set("triggerCount", 0);
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
let t = e.context.triggerElements.size, n = {};
|
|
99
|
-
e.state.triggerCount !== t && (n.triggerCount = t);
|
|
100
|
-
let s = e.select("activeTriggerId"), c = null;
|
|
101
|
-
if (s) {
|
|
102
|
-
let t = e.context.triggerElements.getById(s);
|
|
103
|
-
t ? t !== e.state.activeTriggerElement && (n.activeTriggerElement = t) : c = s;
|
|
1
|
+
//#region ../../node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
|
|
2
|
+
var e;
|
|
3
|
+
function t(t) {
|
|
4
|
+
e ??= /* @__PURE__ */ new WeakMap();
|
|
5
|
+
let n = e.get(t);
|
|
6
|
+
return n || (n = /* @__PURE__ */ new WeakMap(), e.set(t, n)), n;
|
|
7
|
+
}
|
|
8
|
+
var n = class {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.idMap = /* @__PURE__ */ new Map();
|
|
11
|
+
}
|
|
12
|
+
add(e, n) {
|
|
13
|
+
if (process.env.NODE_ENV !== "production") {
|
|
14
|
+
let r = t(this), i = r.get(n);
|
|
15
|
+
if (i !== void 0 && i !== e) throw Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
|
|
16
|
+
let a = this.idMap.get(e);
|
|
17
|
+
a !== void 0 && a !== n && r.delete(a), r.set(n, e);
|
|
104
18
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
(n.triggerCount !== void 0 || n.activeTriggerId !== void 0 || n.activeTriggerElement !== void 0) && e.update(n), c && a && queueMicrotask(() => {
|
|
113
|
-
if (e.select("open") && e.select("activeTriggerId") === c && !e.context.triggerElements.getById(c)) {
|
|
114
|
-
let t = i(r);
|
|
115
|
-
e.setOpen(!1, t), t.isCanceled || e.update({
|
|
116
|
-
activeTriggerId: null,
|
|
117
|
-
activeTriggerElement: null
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}, [
|
|
122
|
-
o,
|
|
123
|
-
e,
|
|
124
|
-
e.useState("triggerCount"),
|
|
125
|
-
a
|
|
126
|
-
]);
|
|
127
|
-
}
|
|
128
|
-
function y(e, n, r) {
|
|
129
|
-
let { mounted: i, setMounted: a, transitionStatus: o } = l(e), s = n.useState("preventUnmountingOnClose"), c = !e && s;
|
|
130
|
-
n.useSyncedValues({
|
|
131
|
-
mounted: i,
|
|
132
|
-
transitionStatus: o,
|
|
133
|
-
preventUnmountingOnClose: c
|
|
134
|
-
});
|
|
135
|
-
let d = t(() => {
|
|
136
|
-
a(!1), n.update({
|
|
137
|
-
activeTriggerId: null,
|
|
138
|
-
activeTriggerElement: null,
|
|
139
|
-
mounted: !1,
|
|
140
|
-
preventUnmountingOnClose: !1
|
|
141
|
-
}), r?.(), n.context.onOpenChangeComplete?.(!1);
|
|
142
|
-
});
|
|
143
|
-
return u({
|
|
144
|
-
enabled: i && !e && !c,
|
|
145
|
-
open: e,
|
|
146
|
-
ref: n.context.popupRef,
|
|
147
|
-
onComplete() {
|
|
148
|
-
e || d();
|
|
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);
|
|
149
25
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
t.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
26
|
+
this.idMap.delete(t);
|
|
27
|
+
}
|
|
28
|
+
hasElement(e) {
|
|
29
|
+
for (let t of this.idMap.values()) if (t === e) return !0;
|
|
30
|
+
return !1;
|
|
31
|
+
}
|
|
32
|
+
hasMatchingElement(e) {
|
|
33
|
+
for (let t of this.idMap.values()) if (e(t)) return !0;
|
|
34
|
+
return !1;
|
|
35
|
+
}
|
|
36
|
+
getById(e) {
|
|
37
|
+
return this.idMap.get(e);
|
|
38
|
+
}
|
|
39
|
+
entries() {
|
|
40
|
+
return this.idMap.entries();
|
|
41
|
+
}
|
|
42
|
+
elements() {
|
|
43
|
+
return this.idMap.values();
|
|
44
|
+
}
|
|
45
|
+
get size() {
|
|
46
|
+
return this.idMap.size;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
171
49
|
//#endregion
|
|
172
|
-
export {
|
|
50
|
+
export { n as PopupTriggerMap };
|
|
173
51
|
|
|
174
52
|
//# sourceMappingURL=index268.js.map
|
package/dist/index268.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index268.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 { 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}"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index268.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs"],"sourcesContent":["/**\n * Development-only reverse index of element to registered id, keyed by the owning map.\n *\n * Registration would otherwise have to scan every entry to detect an element claimed by two ids,\n * making the mount of many triggers sharing one handle quadratic. Kept module-scoped, lazily\n * initialized, and read only from `process.env.NODE_ENV` guards so production builds drop it along\n * with the checks.\n */\nlet devElementIdsByMap;\nfunction getDevElementIds(map) {\n devElementIdsByMap ??= new WeakMap();\n let elementIds = devElementIdsByMap.get(map);\n if (!elementIds) {\n elementIds = new WeakMap();\n devElementIdsByMap.set(map, elementIds);\n }\n return elementIds;\n}\n\n/**\n * Data structure to keep track of popup trigger elements by their IDs.\n *\n * Element lookups iterate the id map rather than maintaining a parallel Set. Registration is O(1),\n * while `hasElement` and `hasMatchingElement` are linear in the number of triggers.\n */\nexport class PopupTriggerMap {\n constructor() {\n this.idMap = new Map();\n }\n\n /**\n * Adds a trigger element with the given ID.\n *\n * Note: The provided element is assumed to not be registered under multiple IDs.\n */\n add(id, element) {\n if (process.env.NODE_ENV !== 'production') {\n const elementIds = getDevElementIds(this);\n const existingId = elementIds.get(element);\n if (existingId !== undefined && existingId !== id) {\n // TODO: fix mui/no-guarded-throw\n // eslint-disable-next-line mui/no-guarded-throw\n throw new Error('Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.');\n }\n\n // Reusing an id for a different element evicts the previous one, so it must lose its claim\n // on the id or a later registration under a different id would be reported as a duplicate.\n const previousElement = this.idMap.get(id);\n if (previousElement !== undefined && previousElement !== element) {\n elementIds.delete(previousElement);\n }\n elementIds.set(element, id);\n }\n this.idMap.set(id, element);\n }\n\n /**\n * Removes the trigger element with the given ID.\n */\n delete(id) {\n if (process.env.NODE_ENV !== 'production') {\n const element = this.idMap.get(id);\n if (element !== undefined) {\n devElementIdsByMap?.get(this)?.delete(element);\n }\n }\n this.idMap.delete(id);\n }\n\n /**\n * Whether the given element is registered as a trigger.\n */\n hasElement(element) {\n for (const registered of this.idMap.values()) {\n if (registered === element) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Whether there is a registered trigger element matching the given predicate.\n */\n hasMatchingElement(predicate) {\n for (const element of this.idMap.values()) {\n if (predicate(element)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Returns the trigger element associated with the given ID, or undefined if no such element exists.\n */\n getById(id) {\n return this.idMap.get(id);\n }\n\n /**\n * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].\n */\n entries() {\n return this.idMap.entries();\n }\n\n /**\n * Returns an iterable of all registered trigger elements.\n */\n elements() {\n return this.idMap.values();\n }\n\n /**\n * Returns the number of registered trigger elements.\n */\n get size() {\n return this.idMap.size;\n }\n}"],"x_google_ignoreList":[0],"mappings":";AAQA,IAAI;AACJ,SAAS,EAAiB,GAAK;CAC7B,sBAAuB,IAAI,QAAQ;CACnC,IAAI,IAAa,EAAmB,IAAI,CAAG;CAK3C,OAJK,MACH,oBAAa,IAAI,QAAQ,GACzB,EAAmB,IAAI,GAAK,CAAU,IAEjC;AACT;AAQA,IAAa,IAAb,MAA6B;CAC3B,cAAc;EACZ,KAAK,wBAAQ,IAAI,IAAI;CACvB;CAOA,IAAI,GAAI,GAAS;EACf,IAAA,QAAA,IAAA,aAA6B,cAAc;GACzC,IAAM,IAAa,EAAiB,IAAI,GAClC,IAAa,EAAW,IAAI,CAAO;GACzC,IAAI,MAAe,KAAA,KAAa,MAAe,GAG7C,MAAU,MAAM,wFAAwF;GAK1G,IAAM,IAAkB,KAAK,MAAM,IAAI,CAAE;GAIzC,AAHI,MAAoB,KAAA,KAAa,MAAoB,KACvD,EAAW,OAAO,CAAe,GAEnC,EAAW,IAAI,GAAS,CAAE;EAC5B;EACA,KAAK,MAAM,IAAI,GAAI,CAAO;CAC5B;CAKA,OAAO,GAAI;EACT,IAAA,QAAA,IAAA,aAA6B,cAAc;GACzC,IAAM,IAAU,KAAK,MAAM,IAAI,CAAE;GACjC,AAAI,MAAY,KAAA,KACd,GAAoB,IAAI,IAAI,CAAC,EAAE,OAAO,CAAO;EAEjD;EACA,KAAK,MAAM,OAAO,CAAE;CACtB;CAKA,WAAW,GAAS;EAClB,KAAK,IAAM,KAAc,KAAK,MAAM,OAAO,GACzC,IAAI,MAAe,GACjB,OAAO;EAGX,OAAO;CACT;CAKA,mBAAmB,GAAW;EAC5B,KAAK,IAAM,KAAW,KAAK,MAAM,OAAO,GACtC,IAAI,EAAU,CAAO,GACnB,OAAO;EAGX,OAAO;CACT;CAKA,QAAQ,GAAI;EACV,OAAO,KAAK,MAAM,IAAI,CAAE;CAC1B;CAKA,UAAU;EACR,OAAO,KAAK,MAAM,QAAQ;CAC5B;CAKA,WAAW;EACT,OAAO,KAAK,MAAM,OAAO;CAC3B;CAKA,IAAI,OAAO;EACT,OAAO,KAAK,MAAM;CACpB;AACF"}
|
package/dist/index269.js
CHANGED
|
@@ -1,37 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
hasMatchingElement(e) {
|
|
18
|
-
for (let t of this.elementsSet) if (e(t)) return !0;
|
|
19
|
-
return !1;
|
|
20
|
-
}
|
|
21
|
-
getById(e) {
|
|
22
|
-
return this.idMap.get(e);
|
|
23
|
-
}
|
|
24
|
-
entries() {
|
|
25
|
-
return this.idMap.entries();
|
|
26
|
-
}
|
|
27
|
-
elements() {
|
|
28
|
-
return this.elementsSet.values();
|
|
29
|
-
}
|
|
30
|
-
get size() {
|
|
31
|
-
return this.idMap.size;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
1
|
+
import { FloatingRootStore as e } from "./index262.js";
|
|
2
|
+
import { PopupTriggerMap as t } from "./index268.js";
|
|
3
|
+
//#region ../../node_modules/@base-ui/react/floating-ui-react/utils/getEmptyRootContext.mjs
|
|
4
|
+
function n() {
|
|
5
|
+
return new e({
|
|
6
|
+
open: !1,
|
|
7
|
+
transitionStatus: void 0,
|
|
8
|
+
floatingElement: null,
|
|
9
|
+
referenceElement: null,
|
|
10
|
+
triggerElements: new t(),
|
|
11
|
+
floatingId: void 0,
|
|
12
|
+
syncOnly: !1,
|
|
13
|
+
nested: !1,
|
|
14
|
+
onOpenChange: void 0
|
|
15
|
+
});
|
|
16
|
+
}
|
|
34
17
|
//#endregion
|
|
35
|
-
export {
|
|
18
|
+
export { n as getEmptyRootContext };
|
|
36
19
|
|
|
37
20
|
//# 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/utils/
|
|
1
|
+
{"version":3,"file":"index269.js","names":[],"sources":["../../../node_modules/@base-ui/react/floating-ui-react/utils/getEmptyRootContext.mjs"],"sourcesContent":["import { PopupTriggerMap } from \"../../utils/popups/index.mjs\";\nimport { FloatingRootStore } from \"../components/FloatingRootStore.mjs\";\nexport function getEmptyRootContext() {\n return new FloatingRootStore({\n open: false,\n transitionStatus: undefined,\n floatingElement: null,\n referenceElement: null,\n triggerElements: new PopupTriggerMap(),\n floatingId: undefined,\n syncOnly: false,\n nested: false,\n onOpenChange: undefined\n });\n}"],"x_google_ignoreList":[0],"mappings":";;;AAEA,SAAgB,IAAsB;CACpC,OAAO,IAAI,EAAkB;EAC3B,MAAM;EACN,kBAAkB,KAAA;EAClB,iBAAiB;EACjB,kBAAkB;EAClB,iBAAiB,IAAI,EAAgB;EACrC,YAAY,KAAA;EACZ,UAAU;EACV,QAAQ;EACR,cAAc,KAAA;CAChB,CAAC;AACH"}
|
package/dist/index270.js
CHANGED
|
@@ -1,20 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { EMPTY_OBJECT as e } from "./index191.js";
|
|
2
|
+
import { FloatingRootStore as t } from "./index262.js";
|
|
3
|
+
import { getEmptyRootContext as n } from "./index269.js";
|
|
4
|
+
//#region ../../node_modules/@base-ui/react/utils/popups/store.mjs
|
|
5
|
+
function r() {
|
|
6
|
+
return {
|
|
7
|
+
open: !1,
|
|
8
|
+
openProp: void 0,
|
|
9
|
+
mounted: !1,
|
|
10
|
+
transitionStatus: void 0,
|
|
11
|
+
floatingRootContext: n(),
|
|
12
|
+
floatingId: void 0,
|
|
13
|
+
triggerCount: 0,
|
|
14
|
+
preventUnmountingOnClose: !1,
|
|
15
|
+
payload: void 0,
|
|
16
|
+
activeTriggerId: null,
|
|
17
|
+
activeTriggerElement: null,
|
|
18
|
+
triggerIdProp: void 0,
|
|
19
|
+
popupElement: null,
|
|
20
|
+
positionerElement: null,
|
|
21
|
+
activeTriggerProps: e,
|
|
22
|
+
inactiveTriggerProps: e,
|
|
23
|
+
popupProps: e
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function i(e, n, r = !1) {
|
|
27
|
+
return new t({
|
|
6
28
|
open: !1,
|
|
7
29
|
transitionStatus: void 0,
|
|
8
30
|
floatingElement: null,
|
|
9
31
|
referenceElement: null,
|
|
10
|
-
triggerElements:
|
|
11
|
-
floatingId:
|
|
12
|
-
syncOnly: !
|
|
13
|
-
nested:
|
|
32
|
+
triggerElements: e,
|
|
33
|
+
floatingId: n,
|
|
34
|
+
syncOnly: !0,
|
|
35
|
+
nested: r,
|
|
14
36
|
onOpenChange: void 0
|
|
15
37
|
});
|
|
16
38
|
}
|
|
39
|
+
var a = (e) => e.triggerIdProp ?? e.activeTriggerId, o = (e) => e.openProp ?? e.open, s = (e) => (e.popupElement?.id ?? e.floatingId) || void 0;
|
|
40
|
+
function c(e, t) {
|
|
41
|
+
return t !== void 0 && o(e) && a(e) === t;
|
|
42
|
+
}
|
|
43
|
+
function l(e, t) {
|
|
44
|
+
return c(e, t) ? !0 : t !== void 0 && o(e) && a(e) == null && e.triggerCount === 1;
|
|
45
|
+
}
|
|
46
|
+
var u = {
|
|
47
|
+
open: o,
|
|
48
|
+
mounted: (e) => e.mounted,
|
|
49
|
+
transitionStatus: (e) => e.transitionStatus,
|
|
50
|
+
floatingRootContext: (e) => e.floatingRootContext,
|
|
51
|
+
triggerCount: (e) => e.triggerCount,
|
|
52
|
+
preventUnmountingOnClose: (e) => e.preventUnmountingOnClose,
|
|
53
|
+
payload: (e) => e.payload,
|
|
54
|
+
activeTriggerId: a,
|
|
55
|
+
activeTriggerElement: (e) => e.mounted ? e.activeTriggerElement : null,
|
|
56
|
+
popupId: s,
|
|
57
|
+
isTriggerActive: (e, t) => t !== void 0 && a(e) === t,
|
|
58
|
+
isOpenedByTrigger: (e, t) => c(e, t),
|
|
59
|
+
isMountedByTrigger: (e, t) => t !== void 0 && a(e) === t && e.mounted,
|
|
60
|
+
triggerProps: (e, t) => t ? e.activeTriggerProps : e.inactiveTriggerProps,
|
|
61
|
+
triggerPopupId: (e, t) => l(e, t) ? s(e) : void 0,
|
|
62
|
+
popupProps: (e) => e.popupProps,
|
|
63
|
+
popupElement: (e) => e.popupElement,
|
|
64
|
+
positionerElement: (e) => e.positionerElement
|
|
65
|
+
};
|
|
17
66
|
//#endregion
|
|
18
|
-
export {
|
|
67
|
+
export { r as createInitialPopupStoreState, i as createPopupFloatingRootContext, u as popupStoreSelectors };
|
|
19
68
|
|
|
20
69
|
//# sourceMappingURL=index270.js.map
|
package/dist/index270.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index270.js","names":[],"sources":["../../../node_modules/@base-ui/react/
|
|
1
|
+
{"version":3,"file":"index270.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/popups/store.mjs"],"sourcesContent":["import { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { FloatingRootStore } from \"../../floating-ui-react/components/FloatingRootStore.mjs\";\nimport { getEmptyRootContext } from \"../../floating-ui-react/utils/getEmptyRootContext.mjs\";\n\n/**\n * State common to all popup stores.\n */\n\nexport function createInitialPopupStoreState() {\n return {\n open: false,\n openProp: undefined,\n mounted: false,\n transitionStatus: undefined,\n floatingRootContext: getEmptyRootContext(),\n floatingId: undefined,\n triggerCount: 0,\n preventUnmountingOnClose: false,\n payload: undefined,\n activeTriggerId: null,\n activeTriggerElement: null,\n triggerIdProp: undefined,\n popupElement: null,\n positionerElement: null,\n activeTriggerProps: EMPTY_OBJECT,\n inactiveTriggerProps: EMPTY_OBJECT,\n popupProps: EMPTY_OBJECT\n };\n}\nexport function createPopupFloatingRootContext(triggerElements, floatingId, nested = false) {\n return new FloatingRootStore({\n open: false,\n transitionStatus: undefined,\n floatingElement: null,\n referenceElement: null,\n triggerElements,\n floatingId,\n syncOnly: true,\n nested,\n onOpenChange: undefined\n });\n}\nconst activeTriggerIdSelector = state => state.triggerIdProp ?? state.activeTriggerId;\nconst openSelector = state => state.openProp ?? state.open;\nconst popupIdSelector = state => {\n const popupId = state.popupElement?.id ?? state.floatingId;\n return popupId || undefined;\n};\nfunction triggerOwnsOpenPopup(state, triggerId) {\n return triggerId !== undefined && openSelector(state) && activeTriggerIdSelector(state) === triggerId;\n}\nfunction triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {\n if (triggerOwnsOpenPopup(state, triggerId)) {\n return true;\n }\n return triggerId !== undefined && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;\n}\nexport const popupStoreSelectors = {\n open: openSelector,\n mounted: state => state.mounted,\n transitionStatus: state => state.transitionStatus,\n floatingRootContext: state => state.floatingRootContext,\n triggerCount: state => state.triggerCount,\n preventUnmountingOnClose: state => state.preventUnmountingOnClose,\n payload: state => state.payload,\n activeTriggerId: activeTriggerIdSelector,\n activeTriggerElement: state => state.mounted ? state.activeTriggerElement : null,\n popupId: popupIdSelector,\n /**\n * Whether the trigger with the given ID was used to open the popup.\n */\n isTriggerActive: (state, triggerId) => triggerId !== undefined && activeTriggerIdSelector(state) === triggerId,\n /**\n * Whether the popup is open and was activated by a trigger with the given ID.\n */\n isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),\n /**\n * Whether the popup is mounted and was activated by a trigger with the given ID.\n */\n isMountedByTrigger: (state, triggerId) => triggerId !== undefined && activeTriggerIdSelector(state) === triggerId && state.mounted,\n triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,\n /**\n * Popup id for the trigger that currently owns the open popup.\n */\n triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : undefined,\n popupProps: state => state.popupProps,\n popupElement: state => state.popupElement,\n positionerElement: state => state.positionerElement\n};\n\n/**\n * Store members a detached handle-backed trigger reads or invokes for trigger registration and data\n * forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a\n * detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to\n * be durable. Component handle-store views Pick these from their concrete store (preserving its\n * context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.\n */\n\n/**\n * The subset of a popup store that trigger registration and data forwarding rely on. Narrow enough\n * that an inert store can be passed while detached.\n */"],"x_google_ignoreList":[0],"mappings":";;;;AAQA,SAAgB,IAA+B;CAC7C,OAAO;EACL,MAAM;EACN,UAAU,KAAA;EACV,SAAS;EACT,kBAAkB,KAAA;EAClB,qBAAqB,EAAoB;EACzC,YAAY,KAAA;EACZ,cAAc;EACd,0BAA0B;EAC1B,SAAS,KAAA;EACT,iBAAiB;EACjB,sBAAsB;EACtB,eAAe,KAAA;EACf,cAAc;EACd,mBAAmB;EACnB,oBAAoB;EACpB,sBAAsB;EACtB,YAAY;CACd;AACF;AACA,SAAgB,EAA+B,GAAiB,GAAY,IAAS,IAAO;CAC1F,OAAO,IAAI,EAAkB;EAC3B,MAAM;EACN,kBAAkB,KAAA;EAClB,iBAAiB;EACjB,kBAAkB;EAClB;EACA;EACA,UAAU;EACV;EACA,cAAc,KAAA;CAChB,CAAC;AACH;AACA,IAAM,KAA0B,MAAS,EAAM,iBAAiB,EAAM,iBAChE,KAAe,MAAS,EAAM,YAAY,EAAM,MAChD,KAAkB,OACN,EAAM,cAAc,MAAM,EAAM,eAC9B,KAAA;AAEpB,SAAS,EAAqB,GAAO,GAAW;CAC9C,OAAO,MAAc,KAAA,KAAa,EAAa,CAAK,KAAK,EAAwB,CAAK,MAAM;AAC9F;AACA,SAAS,EAAoC,GAAO,GAAW;CAI7D,OAHI,EAAqB,GAAO,CAAS,IAChC,KAEF,MAAc,KAAA,KAAa,EAAa,CAAK,KAAK,EAAwB,CAAK,KAAK,QAAQ,EAAM,iBAAiB;AAC5H;AACA,IAAa,IAAsB;CACjC,MAAM;CACN,UAAS,MAAS,EAAM;CACxB,mBAAkB,MAAS,EAAM;CACjC,sBAAqB,MAAS,EAAM;CACpC,eAAc,MAAS,EAAM;CAC7B,2BAA0B,MAAS,EAAM;CACzC,UAAS,MAAS,EAAM;CACxB,iBAAiB;CACjB,uBAAsB,MAAS,EAAM,UAAU,EAAM,uBAAuB;CAC5E,SAAS;CAIT,kBAAkB,GAAO,MAAc,MAAc,KAAA,KAAa,EAAwB,CAAK,MAAM;CAIrG,oBAAoB,GAAO,MAAc,EAAqB,GAAO,CAAS;CAI9E,qBAAqB,GAAO,MAAc,MAAc,KAAA,KAAa,EAAwB,CAAK,MAAM,KAAa,EAAM;CAC3H,eAAe,GAAO,MAAa,IAAW,EAAM,qBAAqB,EAAM;CAI/E,iBAAiB,GAAO,MAAc,EAAoC,GAAO,CAAS,IAAI,EAAgB,CAAK,IAAI,KAAA;CACvH,aAAY,MAAS,EAAM;CAC3B,eAAc,MAAS,EAAM;CAC7B,oBAAmB,MAAS,EAAM;AACpC"}
|
package/dist/index271.js
CHANGED
|
@@ -1,70 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
//#region ../../node_modules/@base-ui/react/utils/popups/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
mounted: !1,
|
|
11
|
-
transitionStatus: void 0,
|
|
12
|
-
floatingRootContext: r(),
|
|
13
|
-
floatingId: void 0,
|
|
14
|
-
triggerCount: 0,
|
|
15
|
-
preventUnmountingOnClose: !1,
|
|
16
|
-
payload: void 0,
|
|
17
|
-
activeTriggerId: null,
|
|
18
|
-
activeTriggerElement: null,
|
|
19
|
-
triggerIdProp: void 0,
|
|
20
|
-
popupElement: null,
|
|
21
|
-
positionerElement: null,
|
|
22
|
-
activeTriggerProps: e,
|
|
23
|
-
inactiveTriggerProps: e,
|
|
24
|
-
popupProps: e
|
|
25
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
import { NOOP as e } from "./index191.js";
|
|
3
|
+
import { require_shim as t } from "./index254.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
//#region ../../node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs
|
|
6
|
+
var r = t();
|
|
7
|
+
function i(t) {
|
|
8
|
+
let i = n.useCallback((n) => t === void 0 ? e : t.subscribeStore(n), [t]), a = n.useCallback(() => t === void 0 ? void 0 : t.store, [t]);
|
|
9
|
+
return (0, r.useSyncExternalStore)(i, a, () => t?.serverStore);
|
|
26
10
|
}
|
|
27
|
-
function a(e, t, r = !1) {
|
|
28
|
-
return new n({
|
|
29
|
-
open: !1,
|
|
30
|
-
transitionStatus: void 0,
|
|
31
|
-
floatingElement: null,
|
|
32
|
-
referenceElement: null,
|
|
33
|
-
triggerElements: e,
|
|
34
|
-
floatingId: t,
|
|
35
|
-
syncOnly: !0,
|
|
36
|
-
nested: r,
|
|
37
|
-
onOpenChange: void 0
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
var o = t((e) => e.triggerIdProp ?? e.activeTriggerId), s = t((e) => e.openProp ?? e.open), c = t((e) => (e.popupElement?.id ?? e.floatingId) || void 0);
|
|
41
|
-
function l(e, t) {
|
|
42
|
-
return t !== void 0 && s(e) && o(e) === t;
|
|
43
|
-
}
|
|
44
|
-
function u(e, t) {
|
|
45
|
-
return l(e, t) ? !0 : t !== void 0 && s(e) && o(e) == null && e.triggerCount === 1;
|
|
46
|
-
}
|
|
47
|
-
var d = {
|
|
48
|
-
open: s,
|
|
49
|
-
mounted: t((e) => e.mounted),
|
|
50
|
-
transitionStatus: t((e) => e.transitionStatus),
|
|
51
|
-
floatingRootContext: t((e) => e.floatingRootContext),
|
|
52
|
-
triggerCount: t((e) => e.triggerCount),
|
|
53
|
-
preventUnmountingOnClose: t((e) => e.preventUnmountingOnClose),
|
|
54
|
-
payload: t((e) => e.payload),
|
|
55
|
-
activeTriggerId: o,
|
|
56
|
-
activeTriggerElement: t((e) => e.mounted ? e.activeTriggerElement : null),
|
|
57
|
-
popupId: c,
|
|
58
|
-
isTriggerActive: t((e, t) => t !== void 0 && o(e) === t),
|
|
59
|
-
isOpenedByTrigger: t((e, t) => l(e, t)),
|
|
60
|
-
isMountedByTrigger: t((e, t) => t !== void 0 && o(e) === t && e.mounted),
|
|
61
|
-
triggerProps: t((e, t) => t ? e.activeTriggerProps : e.inactiveTriggerProps),
|
|
62
|
-
triggerPopupId: t((e, t) => u(e, t) ? c(e) : void 0),
|
|
63
|
-
popupProps: t((e) => e.popupProps),
|
|
64
|
-
popupElement: t((e) => e.popupElement),
|
|
65
|
-
positionerElement: t((e) => e.positionerElement)
|
|
66
|
-
};
|
|
67
11
|
//#endregion
|
|
68
|
-
export { i as
|
|
12
|
+
export { i as usePopupHandleStore };
|
|
69
13
|
|
|
70
14
|
//# sourceMappingURL=index271.js.map
|
package/dist/index271.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index271.js","names":[],"sources":["../../../node_modules/@base-ui/react/utils/popups/
|
|
1
|
+
{"version":3,"file":"index271.js","names":["React","useSyncExternalStore"],"sources":["../../../node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { NOOP } from '@base-ui/utils/empty';\n/**\n * Reads the store currently exposed by a popup handle and subscribes to store-pointer changes.\n * Detached triggers use this to follow a handle as a root attaches or detaches: while no root is\n * attached, the handle exposes its fallback store; once a root attaches, subscribers re-render and\n * read from the live root store.\n *\n * Returns `undefined` when no handle is provided so callers can fall back to their root context.\n *\n * @param handle The popup handle to read from, or `undefined` when the trigger is not handle-bound.\n */\nexport function usePopupHandleStore(handle) {\n const subscribe = React.useCallback(listener => {\n if (handle === undefined) {\n return NOOP;\n }\n return handle.subscribeStore(listener);\n }, [handle]);\n const getSnapshot = React.useCallback(() => {\n return handle === undefined ? undefined : handle.store;\n }, [handle]);\n return useSyncExternalStore(subscribe, getSnapshot, () => handle?.serverStore);\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;AAeA,SAAgB,EAAoB,GAAQ;CAC1C,IAAM,IAAYA,EAAM,aAAY,MAC9B,MAAW,KAAA,IACN,IAEF,EAAO,eAAe,CAAQ,GACpC,CAAC,CAAM,CAAC,GACL,IAAcA,EAAM,kBACjB,MAAW,KAAA,IAAY,KAAA,IAAY,EAAO,OAChD,CAAC,CAAM,CAAC;CACX,QAAA,GAAOC,EAAAA,qBAAAA,CAAqB,GAAW,SAAmB,GAAQ,WAAW;AAC/E"}
|
package/dist/index272.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { useRefWithInit as e } from "./index185.js";
|
|
3
3
|
import { isElement as t } from "./index200.js";
|
|
4
4
|
import { useIsoLayoutEffect as n } from "./index204.js";
|
|
5
|
-
import { useId as r } from "./
|
|
6
|
-
import { useFloatingParentNodeId as i } from "./
|
|
7
|
-
import { FloatingRootStore as a } from "./
|
|
8
|
-
import { PopupTriggerMap as o } from "./
|
|
5
|
+
import { useId as r } from "./index213.js";
|
|
6
|
+
import { useFloatingParentNodeId as i } from "./index243.js";
|
|
7
|
+
import { FloatingRootStore as a } from "./index262.js";
|
|
8
|
+
import { PopupTriggerMap as o } from "./index268.js";
|
|
9
9
|
//#region ../../node_modules/@base-ui/react/floating-ui-react/hooks/useFloatingRootContext.mjs
|
|
10
10
|
function s(s) {
|
|
11
11
|
let { open: c = !1, onOpenChange: l, elements: u = {} } = s, d = r(), f = i() != null;
|