bitboss-ui 2.1.119 → 2.1.121
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/ai/BaseButton.md +2 -1
- package/dist/ai/BbButton.md +2 -1
- package/dist/ai/BbPopover.md +15 -2
- package/dist/ai/BbTab.md +6 -3
- package/dist/ai/CommonPopover.md +35 -1
- package/dist/components/BaseButton/BaseButton.vue.d.ts +5 -10
- package/dist/components/BaseButton/RouterComponent.vue.d.ts +12 -15
- package/dist/components/BaseButton/types.d.ts +2 -1
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +10 -24
- package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +22 -17
- package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +6 -205
- package/dist/components/BaseColorInput/ColorPalette.vue.d.ts +3 -10
- package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +6 -11
- package/dist/components/BaseDatePicker/BaseDatePickerHeader.vue.d.ts +3 -2
- package/dist/components/BaseDatePicker/BaseDatePickerInputDaySelector.vue.d.ts +27 -35
- package/dist/components/BaseDatePicker/BaseDatePickerMonthSelector.vue.d.ts +3 -2
- package/dist/components/BaseDatePicker/BaseDatePickerYearSelector.vue.d.ts +3 -4
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +6 -345
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +8 -22
- package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +6 -15
- package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +6 -15
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +6 -11
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +22 -17
- package/dist/components/BaseRating/BaseRating.vue.d.ts +6 -15
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +20 -15
- package/dist/components/BaseSlider/BaseSlider.vue.d.ts +6 -21
- package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +6 -15
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +22 -17
- package/dist/components/BaseTag/BaseTag.vue.d.ts +6 -353
- package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +6 -15
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +6 -15
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +6 -11
- package/dist/components/BbAlert/BbAlert.vue.d.ts +5 -10
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +6 -15
- package/dist/components/BbBadge/BbBadge.vue.d.ts +5 -10
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +7 -34
- package/dist/components/BbButton/BbButton.vue.d.ts +7 -11
- package/dist/components/BbButton/types.d.ts +2 -1
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +6 -11
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +22 -17
- package/dist/components/BbChip/BbChip.vue.d.ts +6 -11
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +5 -10
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +7 -16
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +6 -77
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +2 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +14 -29
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +6 -11
- package/dist/components/BbDialog/BbDialog.vue.d.ts +8 -12
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +7 -216
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +7 -30
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +6 -15
- package/dist/components/BbIcon/BbIcon.vue.d.ts +3 -2
- package/dist/components/BbIntersection/BbIntersection.vue.d.ts +6 -15
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +7 -284
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +8 -22
- package/dist/components/BbPagination/BbPagination.vue.d.ts +8 -18
- package/dist/components/BbPopover/BbPopover.vue.d.ts +9 -201
- package/dist/components/BbPopover/types.d.ts +6 -0
- package/dist/components/BbProgress/BbProgress.vue.d.ts +3 -2
- package/dist/components/BbRadio/BbRadio.vue.d.ts +6 -11
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +22 -17
- package/dist/components/BbRating/BbRating.vue.d.ts +7 -16
- package/dist/components/BbRatio/BbRatio.vue.d.ts +5 -10
- package/dist/components/BbRows/BbRows.vue.d.ts +14 -49
- package/dist/components/BbSelect/BbSelect.vue.d.ts +20 -15
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +20 -15
- package/dist/components/BbSlider/BbSlider.vue.d.ts +7 -16
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +6 -17
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +3 -2
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +6 -11
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +22 -17
- package/dist/components/BbTab/BbTab.vue.d.ts +15 -18
- package/dist/components/BbTable/BbTable.vue.d.ts +25 -83
- package/dist/components/BbTag/BbTag.vue.d.ts +6 -11
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +7 -16
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +7 -16
- package/dist/components/BbToast/BbToast.vue.d.ts +3 -2
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +3 -2
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +8 -200
- package/dist/components/BbTree/BbTree.vue.d.ts +5 -10
- package/dist/components/ChipsBox/ChipsBox.vue.d.ts +2 -1
- package/dist/components/ClearableButton/ClearableButton.vue.d.ts +2 -1
- package/dist/components/CommaBox/CommaBox.vue.d.ts +2 -1
- package/dist/components/CommonInputInnerContainer/CommonInputInnerContainer.vue.d.ts +6 -15
- package/dist/components/CommonInputOuterContainer/CommonInputOuterContainer.vue.d.ts +5 -10
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +9 -18
- package/dist/components/CommonPopover/types.d.ts +7 -0
- package/dist/components/ErrorIcon/ErrorIcon.vue.d.ts +2 -1
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +16 -11
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +16 -11
- package/dist/components/ListBox/ListBox.vue.d.ts +16 -11
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +11 -6
- package/dist/components/Transitions/ScaleFade.vue.d.ts +7 -15
- package/dist/components/Transitions/Slide.vue.d.ts +7 -15
- package/dist/index.css +2 -1
- package/dist/index.js +78 -220
- package/dist/index10.js +4 -81
- package/dist/index100.js +6 -0
- package/dist/index101.js +300 -94
- package/dist/index102.js +16 -0
- package/dist/index103.js +16 -136
- package/dist/index104.js +27 -0
- package/dist/index105.js +4 -102
- package/dist/index106.js +7 -0
- package/dist/index107.js +9 -24
- package/dist/index108.js +4 -0
- package/dist/index109.js +19 -142
- package/dist/index11.js +41 -39
- package/dist/index110.js +12 -532
- package/dist/index111.js +19 -0
- package/dist/index112.js +24 -190
- package/dist/index114.js +7 -116
- package/dist/index115.js +241 -0
- package/dist/index116.js +5 -58
- package/dist/index117.js +42 -0
- package/dist/index118.js +5 -40
- package/dist/index119.js +53 -0
- package/dist/index12.js +10 -41
- package/dist/index120.js +5 -100
- package/dist/index121.js +32 -0
- package/dist/index122.js +5 -137
- package/dist/index123.js +8 -0
- package/dist/index124.js +51 -365
- package/dist/index125.js +5 -0
- package/dist/index126.js +222 -554
- package/dist/index128.js +6 -124
- package/dist/index129.js +162 -0
- package/dist/index13.js +92 -185
- package/dist/index130.js +25 -118
- package/dist/index131.js +51 -0
- package/dist/index132.js +5 -126
- package/dist/index133.js +607 -0
- package/dist/index135.js +6 -0
- package/dist/index136.js +13 -164
- package/dist/index137.js +153 -0
- package/dist/index139.js +6 -0
- package/dist/index14.js +306 -128
- package/dist/index140.js +224 -71
- package/dist/index141.js +5 -0
- package/dist/index142.js +4 -14
- package/dist/index143.js +128 -0
- package/dist/index145.js +6 -4
- package/dist/index146.js +7 -420
- package/dist/index147.js +182 -11
- package/dist/index149.js +6 -27
- package/dist/index15.js +10 -0
- package/dist/index150.js +5 -3
- package/dist/index151.js +4 -7
- package/dist/index152.js +95 -8
- package/dist/index154.js +6 -5
- package/dist/index155.js +168 -5
- package/dist/index157.js +6 -5
- package/dist/index158.js +145 -5
- package/dist/index16.js +58 -152
- package/dist/index160.js +6 -5
- package/dist/index161.js +53 -5
- package/dist/index163.js +6 -5
- package/dist/index164.js +15 -4
- package/dist/index165.js +18 -4
- package/dist/index166.js +35 -5
- package/dist/index168.js +6 -5
- package/dist/index169.js +89 -5
- package/dist/index17.js +11 -0
- package/dist/index171.js +6 -5
- package/dist/index172.js +82 -5
- package/dist/index174.js +6 -5
- package/dist/index175.js +37 -4
- package/dist/index176.js +460 -4
- package/dist/index177.js +28 -5
- package/dist/index178.js +66 -5
- package/dist/index179.js +17 -5
- package/dist/index18.js +34 -128
- package/dist/index180.js +162 -5
- package/dist/index181.js +5 -5
- package/dist/index182.js +217 -5
- package/dist/index183.js +5 -5
- package/dist/index184.js +112 -4
- package/dist/index185.js +5 -5
- package/dist/index186.js +457 -4
- package/dist/index188.js +6 -5
- package/dist/index189.js +4 -5
- package/dist/index19.js +4 -0
- package/dist/index190.js +7 -4
- package/dist/index191.js +7 -5
- package/dist/index192.js +268 -5
- package/dist/index194.js +6 -5
- package/dist/index195.js +124 -5
- package/dist/index197.js +6 -5
- package/dist/index198.js +174 -5
- package/dist/index2.js +20 -0
- package/dist/index20.js +8 -195
- package/dist/index200.js +5 -4
- package/dist/index201.js +224 -5
- package/dist/index203.js +6 -4
- package/dist/index204.js +135 -5
- package/dist/index206.js +5 -4
- package/dist/index207.js +5 -5
- package/dist/index208.js +170 -5
- package/dist/index21.js +35 -0
- package/dist/index210.js +5 -4
- package/dist/index211.js +37 -5
- package/dist/index213.js +5 -4
- package/dist/index214.js +63 -5
- package/dist/index216.js +5 -4
- package/dist/index217.js +74 -5
- package/dist/index219.js +5 -4
- package/dist/index22.js +6 -245
- package/dist/index220.js +65 -5
- package/dist/index222.js +6 -140
- package/dist/index223.js +67 -4
- package/dist/index225.js +6 -4
- package/dist/index226.js +41 -4
- package/dist/index228.js +6 -15
- package/dist/index229.js +9 -6
- package/dist/index23.js +7 -0
- package/dist/index230.js +22 -10
- package/dist/index231.js +23 -5
- package/dist/index232.js +285 -22
- package/dist/index234.js +6 -5
- package/dist/index235.js +47 -6
- package/dist/index236.js +165 -5
- package/dist/index238.js +6 -5
- package/dist/index239.js +10 -3
- package/dist/index24.js +9 -616
- package/dist/index240.js +159 -20
- package/dist/index242.js +6 -14
- package/dist/index243.js +134 -53
- package/dist/index245.js +6 -14
- package/dist/index246.js +167 -19
- package/dist/index248.js +6 -20
- package/dist/index249.js +147 -15
- package/dist/index25.js +24 -0
- package/dist/index251.js +6 -0
- package/dist/index252.js +35 -35
- package/dist/index254.js +6 -8
- package/dist/index255.js +65 -4
- package/dist/index257.js +6 -0
- package/dist/index258.js +18 -101
- package/dist/index259.js +5 -0
- package/dist/index26.js +4 -184
- package/dist/index260.js +160 -5
- package/dist/index262.js +6 -7
- package/dist/index263.js +60 -7
- package/dist/index265.js +6 -7
- package/dist/index266.js +134 -8
- package/dist/index268.js +6 -270
- package/dist/index269.js +12 -54
- package/dist/index27.js +4 -0
- package/dist/index270.js +205 -53
- package/dist/index272.js +6 -62
- package/dist/index273.js +85 -27
- package/dist/index274.js +5 -4
- package/dist/index275.js +55 -9
- package/dist/index276.js +5 -9
- package/dist/index277.js +164 -6
- package/dist/index279.js +6 -11
- package/dist/index28.js +8 -148
- package/dist/index280.js +145 -23
- package/dist/index282.js +6 -88
- package/dist/index283.js +11 -0
- package/dist/index284.js +200 -5
- package/dist/index286.js +6 -18
- package/dist/index287.js +240 -374
- package/dist/index289.js +6 -9
- package/dist/index29.js +7 -0
- package/dist/index290.js +21 -7
- package/dist/index292.js +6 -7
- package/dist/index293.js +125 -7
- package/dist/index295.js +6 -69
- package/dist/index296.js +161 -190
- package/dist/index298.js +6 -11
- package/dist/index299.js +127 -25
- package/dist/index30.js +117 -177
- package/dist/index301.js +6 -0
- package/dist/index302.js +20 -9
- package/dist/index304.js +5 -4
- package/dist/index305.js +116 -5
- package/dist/index306.js +5 -5
- package/dist/index307.js +507 -4
- package/dist/index309.js +6 -19
- package/dist/index31.js +10 -0
- package/dist/index310.js +196 -6
- package/dist/index312.js +6 -282
- package/dist/index313.js +142 -4
- package/dist/index315.js +6 -4
- package/dist/index316.js +134 -18
- package/dist/index318.js +6 -29
- package/dist/index319.js +162 -4
- package/dist/index32.js +27 -99
- package/dist/index321.js +6 -4
- package/dist/index322.js +319 -4
- package/dist/index324.js +6 -4
- package/dist/index325.js +42 -6
- package/dist/index326.js +450 -7
- package/dist/index328.js +6 -368
- package/dist/index329.js +155 -59
- package/dist/index33.js +5 -0
- package/dist/index331.js +6 -9
- package/dist/index332.js +142 -5
- package/dist/index334.js +6 -4
- package/dist/index335.js +155 -17
- package/dist/index337.js +6 -21
- package/dist/index338.js +58 -4
- package/dist/index339.js +5 -4
- package/dist/index34.js +111 -176
- package/dist/index340.js +20 -6
- package/dist/index342.js +6 -69
- package/dist/index343.js +141 -5
- package/dist/index345.js +5 -6
- package/dist/index346.js +4 -9
- package/dist/index347.js +109 -9
- package/dist/index349.js +6 -11
- package/dist/index350.js +838 -16
- package/dist/index351.js +473 -94
- package/dist/index352.js +51 -229
- package/dist/index353.js +7 -202
- package/dist/index36.js +6 -133
- package/dist/index37.js +6 -0
- package/dist/index38.js +62 -489
- package/dist/index39.js +63 -0
- package/dist/index40.js +8 -334
- package/dist/index41.js +9 -0
- package/dist/index42.js +8 -127
- package/dist/index43.js +179 -0
- package/dist/index44.js +20 -184
- package/dist/index45.js +6 -0
- package/dist/index46.js +384 -239
- package/dist/index48.js +6 -140
- package/dist/index49.js +33 -0
- package/dist/index5.js +34 -41
- package/dist/index50.js +11 -156
- package/dist/index51.js +8 -0
- package/dist/index52.js +105 -64
- package/dist/index53.js +330 -0
- package/dist/index54.js +97 -91
- package/dist/index55.js +328 -0
- package/dist/index56.js +27 -68
- package/dist/index57.js +102 -0
- package/dist/index58.js +145 -53
- package/dist/index6.js +37 -61
- package/dist/index60.js +5 -225
- package/dist/index61.js +131 -0
- package/dist/index62.js +5 -171
- package/dist/index64.js +7 -99
- package/dist/index65.js +35 -0
- package/dist/index66.js +25 -137
- package/dist/index68.js +6 -43
- package/dist/index69.js +54 -0
- package/dist/index7.js +58 -64
- package/dist/index71.js +6 -0
- package/dist/index72.js +13 -120
- package/dist/index74.js +6 -125
- package/dist/index75.js +158 -84
- package/dist/index77.js +6 -21
- package/dist/index78.js +4 -129
- package/dist/index79.js +4 -0
- package/dist/index8.js +4 -14
- package/dist/index80.js +54 -62
- package/dist/index81.js +5 -0
- package/dist/index82.js +5 -323
- package/dist/index83.js +131 -0
- package/dist/index85.js +6 -0
- package/dist/index86.js +64 -220
- package/dist/index88.js +6 -84
- package/dist/index89.js +30 -0
- package/dist/index9.js +10 -9
- package/dist/index90.js +18 -45
- package/dist/index91.js +17 -134
- package/dist/index92.js +9 -0
- package/dist/index93.js +33 -176
- package/dist/index94.js +4 -0
- package/dist/index95.js +15 -234
- package/dist/index96.js +10 -0
- package/dist/index97.js +17 -247
- package/dist/index98.js +189 -0
- package/package.json +1 -1
- package/dist/index134.js +0 -28
- package/dist/index138.js +0 -122
- package/dist/index144.js +0 -13
- package/dist/index148.js +0 -11
- package/dist/index153.js +0 -7
- package/dist/index156.js +0 -5
- package/dist/index159.js +0 -5
- package/dist/index162.js +0 -5
- package/dist/index167.js +0 -5
- package/dist/index170.js +0 -5
- package/dist/index173.js +0 -5
- package/dist/index187.js +0 -5
- package/dist/index193.js +0 -4
- package/dist/index196.js +0 -5
- package/dist/index199.js +0 -5
- package/dist/index202.js +0 -5
- package/dist/index205.js +0 -5
- package/dist/index209.js +0 -5
- package/dist/index212.js +0 -5
- package/dist/index215.js +0 -5
- package/dist/index218.js +0 -5
- package/dist/index221.js +0 -4
- package/dist/index224.js +0 -36
- package/dist/index227.js +0 -4
- package/dist/index233.js +0 -12
- package/dist/index237.js +0 -13
- package/dist/index241.js +0 -25
- package/dist/index244.js +0 -20
- package/dist/index247.js +0 -32
- package/dist/index250.js +0 -137
- package/dist/index253.js +0 -109
- package/dist/index256.js +0 -108
- package/dist/index261.js +0 -5
- package/dist/index264.js +0 -7
- package/dist/index267.js +0 -10
- package/dist/index271.js +0 -34
- package/dist/index278.js +0 -11
- package/dist/index281.js +0 -15
- package/dist/index285.js +0 -8
- package/dist/index291.js +0 -7
- package/dist/index294.js +0 -55
- package/dist/index297.js +0 -5
- package/dist/index300.js +0 -30
- package/dist/index303.js +0 -4
- package/dist/index308.js +0 -30
- package/dist/index311.js +0 -5
- package/dist/index314.js +0 -18
- package/dist/index317.js +0 -4
- package/dist/index320.js +0 -4
- package/dist/index323.js +0 -4
- package/dist/index327.js +0 -721
- package/dist/index333.js +0 -127
- package/dist/index336.js +0 -4
- package/dist/index341.js +0 -69
- package/dist/index344.js +0 -8
- package/dist/index348.js +0 -21
- package/dist/index354.js +0 -261
- package/dist/index355.js +0 -37
- package/dist/index356.js +0 -131
- package/dist/index357.js +0 -400
- package/dist/index358.js +0 -24
- package/dist/index360.js +0 -4
- package/dist/index361.js +0 -4
- package/dist/index362.js +0 -136
- package/dist/index363.js +0 -443
- package/dist/index364.js +0 -130
- package/dist/index365.js +0 -49
- package/dist/index366.js +0 -72
- package/dist/index367.js +0 -522
- package/dist/index368.js +0 -52
- package/dist/index4.js +0 -35
- package/dist/index70.js +0 -46
- package/dist/index84.js +0 -154
- package/dist/index99.js +0 -33
package/dist/index176.js
CHANGED
|
@@ -1,5 +1,461 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { approxEqual as e, debounce as t, memo as n, notUndefined as r } from "./index175.js";
|
|
2
|
+
//#region node_modules/@tanstack/virtual-core/dist/esm/index.js
|
|
3
|
+
var i = (e) => {
|
|
4
|
+
let { offsetWidth: t, offsetHeight: n } = e;
|
|
5
|
+
return {
|
|
6
|
+
width: t,
|
|
7
|
+
height: n
|
|
8
|
+
};
|
|
9
|
+
}, a = (e) => e, o = (e) => {
|
|
10
|
+
let t = Math.max(e.startIndex - e.overscan, 0), n = Math.min(e.endIndex + e.overscan, e.count - 1), r = [];
|
|
11
|
+
for (let e = t; e <= n; e++) r.push(e);
|
|
12
|
+
return r;
|
|
13
|
+
}, s = (e, t) => {
|
|
14
|
+
let n = e.scrollElement;
|
|
15
|
+
if (!n) return;
|
|
16
|
+
let r = e.targetWindow;
|
|
17
|
+
if (!r) return;
|
|
18
|
+
let a = (e) => {
|
|
19
|
+
let { width: n, height: r } = e;
|
|
20
|
+
t({
|
|
21
|
+
width: Math.round(n),
|
|
22
|
+
height: Math.round(r)
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
if (a(i(n)), !r.ResizeObserver) return () => {};
|
|
26
|
+
let o = new r.ResizeObserver((t) => {
|
|
27
|
+
let r = () => {
|
|
28
|
+
let e = t[0];
|
|
29
|
+
if (e?.borderBoxSize) {
|
|
30
|
+
let t = e.borderBoxSize[0];
|
|
31
|
+
if (t) {
|
|
32
|
+
a({
|
|
33
|
+
width: t.inlineSize,
|
|
34
|
+
height: t.blockSize
|
|
35
|
+
});
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
a(i(n));
|
|
40
|
+
};
|
|
41
|
+
e.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(r) : r();
|
|
42
|
+
});
|
|
43
|
+
return o.observe(n, { box: "border-box" }), () => {
|
|
44
|
+
o.unobserve(n);
|
|
45
|
+
};
|
|
46
|
+
}, c = { passive: !0 }, l = typeof window > "u" ? !0 : "onscrollend" in window, u = (e, n) => {
|
|
47
|
+
let r = e.scrollElement;
|
|
48
|
+
if (!r) return;
|
|
49
|
+
let i = e.targetWindow;
|
|
50
|
+
if (!i) return;
|
|
51
|
+
let a = 0, o = e.options.useScrollendEvent && l ? () => void 0 : t(i, () => {
|
|
52
|
+
n(a, !1);
|
|
53
|
+
}, e.options.isScrollingResetDelay), s = (t) => () => {
|
|
54
|
+
let { horizontal: i, isRtl: s } = e.options;
|
|
55
|
+
a = i ? r.scrollLeft * (s && -1 || 1) : r.scrollTop, o(), n(a, t);
|
|
56
|
+
}, u = s(!0), d = s(!1);
|
|
57
|
+
r.addEventListener("scroll", u, c);
|
|
58
|
+
let f = e.options.useScrollendEvent && l;
|
|
59
|
+
return f && r.addEventListener("scrollend", d, c), () => {
|
|
60
|
+
r.removeEventListener("scroll", u), f && r.removeEventListener("scrollend", d);
|
|
61
|
+
};
|
|
62
|
+
}, d = (e, t, n) => {
|
|
63
|
+
if (t?.borderBoxSize) {
|
|
64
|
+
let e = t.borderBoxSize[0];
|
|
65
|
+
if (e) return Math.round(e[n.options.horizontal ? "inlineSize" : "blockSize"]);
|
|
66
|
+
}
|
|
67
|
+
return e[n.options.horizontal ? "offsetWidth" : "offsetHeight"];
|
|
68
|
+
}, f = (e, { adjustments: t = 0, behavior: n }, r) => {
|
|
69
|
+
var i, a;
|
|
70
|
+
let o = e + t;
|
|
71
|
+
(a = (i = r.scrollElement)?.scrollTo) == null || a.call(i, {
|
|
72
|
+
[r.options.horizontal ? "left" : "top"]: o,
|
|
73
|
+
behavior: n
|
|
74
|
+
});
|
|
75
|
+
}, p = class {
|
|
76
|
+
constructor(e) {
|
|
77
|
+
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollState = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.prevLanes = void 0, this.lanesChangedFlag = !1, this.lanesSettling = !1, this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.now = () => {
|
|
78
|
+
var e;
|
|
79
|
+
return ((e = this.targetWindow?.performance)?.now)?.call(e) ?? Date.now();
|
|
80
|
+
}, this.observer = /* @__PURE__ */ (() => {
|
|
81
|
+
let e = null, t = () => e || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : e = new this.targetWindow.ResizeObserver((e) => {
|
|
82
|
+
e.forEach((e) => {
|
|
83
|
+
let t = () => {
|
|
84
|
+
let t = e.target, n = this.indexFromElement(t);
|
|
85
|
+
if (!t.isConnected) {
|
|
86
|
+
this.observer.unobserve(t);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
this.shouldMeasureDuringScroll(n) && this.resizeItem(n, this.options.measureElement(t, e, this));
|
|
90
|
+
};
|
|
91
|
+
this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(t) : t();
|
|
92
|
+
});
|
|
93
|
+
}));
|
|
94
|
+
return {
|
|
95
|
+
disconnect: () => {
|
|
96
|
+
var n;
|
|
97
|
+
(n = t()) == null || n.disconnect(), e = null;
|
|
98
|
+
},
|
|
99
|
+
observe: (e) => t()?.observe(e, { box: "border-box" }),
|
|
100
|
+
unobserve: (e) => t()?.unobserve(e)
|
|
101
|
+
};
|
|
102
|
+
})(), this.range = null, this.setOptions = (e) => {
|
|
103
|
+
Object.entries(e).forEach(([t, n]) => {
|
|
104
|
+
n === void 0 && delete e[t];
|
|
105
|
+
}), this.options = {
|
|
106
|
+
debug: !1,
|
|
107
|
+
initialOffset: 0,
|
|
108
|
+
overscan: 1,
|
|
109
|
+
paddingStart: 0,
|
|
110
|
+
paddingEnd: 0,
|
|
111
|
+
scrollPaddingStart: 0,
|
|
112
|
+
scrollPaddingEnd: 0,
|
|
113
|
+
horizontal: !1,
|
|
114
|
+
getItemKey: a,
|
|
115
|
+
rangeExtractor: o,
|
|
116
|
+
onChange: () => {},
|
|
117
|
+
measureElement: d,
|
|
118
|
+
initialRect: {
|
|
119
|
+
width: 0,
|
|
120
|
+
height: 0
|
|
121
|
+
},
|
|
122
|
+
scrollMargin: 0,
|
|
123
|
+
gap: 0,
|
|
124
|
+
indexAttribute: "data-index",
|
|
125
|
+
initialMeasurementsCache: [],
|
|
126
|
+
lanes: 1,
|
|
127
|
+
isScrollingResetDelay: 150,
|
|
128
|
+
enabled: !0,
|
|
129
|
+
isRtl: !1,
|
|
130
|
+
useScrollendEvent: !1,
|
|
131
|
+
useAnimationFrameWithResizeObserver: !1,
|
|
132
|
+
laneAssignmentMode: "estimate",
|
|
133
|
+
...e
|
|
134
|
+
};
|
|
135
|
+
}, this.notify = (e) => {
|
|
136
|
+
var t, n;
|
|
137
|
+
(n = (t = this.options).onChange) == null || n.call(t, this, e);
|
|
138
|
+
}, this.maybeNotify = n(() => (this.calculateRange(), [
|
|
139
|
+
this.isScrolling,
|
|
140
|
+
this.range ? this.range.startIndex : null,
|
|
141
|
+
this.range ? this.range.endIndex : null
|
|
142
|
+
]), (e) => {
|
|
143
|
+
this.notify(e);
|
|
144
|
+
}, {
|
|
145
|
+
key: process.env.NODE_ENV !== "production" && "maybeNotify",
|
|
146
|
+
debug: () => this.options.debug,
|
|
147
|
+
initialDeps: [
|
|
148
|
+
this.isScrolling,
|
|
149
|
+
this.range ? this.range.startIndex : null,
|
|
150
|
+
this.range ? this.range.endIndex : null
|
|
151
|
+
]
|
|
152
|
+
}), this.cleanup = () => {
|
|
153
|
+
this.unsubs.filter(Boolean).forEach((e) => e()), this.unsubs = [], this.observer.disconnect(), this.rafId != null && this.targetWindow && (this.targetWindow.cancelAnimationFrame(this.rafId), this.rafId = null), this.scrollState = null, this.scrollElement = null, this.targetWindow = null;
|
|
154
|
+
}, this._didMount = () => () => {
|
|
155
|
+
this.cleanup();
|
|
156
|
+
}, this._willUpdate = () => {
|
|
157
|
+
let e = this.options.enabled ? this.options.getScrollElement() : null;
|
|
158
|
+
if (this.scrollElement !== e) {
|
|
159
|
+
if (this.cleanup(), !e) {
|
|
160
|
+
this.maybeNotify();
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
this.scrollElement = e, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = this.scrollElement?.window ?? null, this.elementsCache.forEach((e) => {
|
|
164
|
+
this.observer.observe(e);
|
|
165
|
+
}), this.unsubs.push(this.options.observeElementRect(this, (e) => {
|
|
166
|
+
this.scrollRect = e, this.maybeNotify();
|
|
167
|
+
})), this.unsubs.push(this.options.observeElementOffset(this, (e, t) => {
|
|
168
|
+
this.scrollAdjustments = 0, this.scrollDirection = t ? this.getScrollOffset() < e ? "forward" : "backward" : null, this.scrollOffset = e, this.isScrolling = t, this.scrollState && this.scheduleScrollReconcile(), this.maybeNotify();
|
|
169
|
+
})), this._scrollToOffset(this.getScrollOffset(), {
|
|
170
|
+
adjustments: void 0,
|
|
171
|
+
behavior: void 0
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}, this.rafId = null, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (e, t) => {
|
|
175
|
+
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
176
|
+
for (let i = t - 1; i >= 0; i--) {
|
|
177
|
+
let t = e[i];
|
|
178
|
+
if (n.has(t.lane)) continue;
|
|
179
|
+
let a = r.get(t.lane);
|
|
180
|
+
if (a == null || t.end > a.end ? r.set(t.lane, t) : t.end < a.end && n.set(t.lane, !0), n.size === this.options.lanes) break;
|
|
181
|
+
}
|
|
182
|
+
return r.size === this.options.lanes ? Array.from(r.values()).sort((e, t) => e.end === t.end ? e.index - t.index : e.end - t.end)[0] : void 0;
|
|
183
|
+
}, this.getMeasurementOptions = n(() => [
|
|
184
|
+
this.options.count,
|
|
185
|
+
this.options.paddingStart,
|
|
186
|
+
this.options.scrollMargin,
|
|
187
|
+
this.options.getItemKey,
|
|
188
|
+
this.options.enabled,
|
|
189
|
+
this.options.lanes,
|
|
190
|
+
this.options.laneAssignmentMode
|
|
191
|
+
], (e, t, n, r, i, a, o) => (this.prevLanes !== void 0 && this.prevLanes !== a && (this.lanesChangedFlag = !0), this.prevLanes = a, this.pendingMeasuredCacheIndexes = [], {
|
|
192
|
+
count: e,
|
|
193
|
+
paddingStart: t,
|
|
194
|
+
scrollMargin: n,
|
|
195
|
+
getItemKey: r,
|
|
196
|
+
enabled: i,
|
|
197
|
+
lanes: a,
|
|
198
|
+
laneAssignmentMode: o
|
|
199
|
+
}), { key: !1 }), this.getMeasurements = n(() => [this.getMeasurementOptions(), this.itemSizeCache], ({ count: e, paddingStart: t, scrollMargin: n, getItemKey: r, enabled: i, lanes: a, laneAssignmentMode: o }, s) => {
|
|
200
|
+
if (!i) return this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), [];
|
|
201
|
+
if (this.laneAssignments.size > e) for (let t of this.laneAssignments.keys()) t >= e && this.laneAssignments.delete(t);
|
|
202
|
+
this.lanesChangedFlag && (this.lanesChangedFlag = !1, this.lanesSettling = !0, this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), this.pendingMeasuredCacheIndexes = []), this.measurementsCache.length === 0 && !this.lanesSettling && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((e) => {
|
|
203
|
+
this.itemSizeCache.set(e.key, e.size);
|
|
204
|
+
}));
|
|
205
|
+
let c = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
206
|
+
this.pendingMeasuredCacheIndexes = [], this.lanesSettling && this.measurementsCache.length === e && (this.lanesSettling = !1);
|
|
207
|
+
let l = this.measurementsCache.slice(0, c), u = Array(a).fill(void 0);
|
|
208
|
+
for (let e = 0; e < c; e++) {
|
|
209
|
+
let t = l[e];
|
|
210
|
+
t && (u[t.lane] = e);
|
|
211
|
+
}
|
|
212
|
+
for (let i = c; i < e; i++) {
|
|
213
|
+
let e = r(i), a = this.laneAssignments.get(i), c, d, f = o === "estimate" || s.has(e);
|
|
214
|
+
if (a !== void 0 && this.options.lanes > 1) {
|
|
215
|
+
c = a;
|
|
216
|
+
let e = u[c], r = e === void 0 ? void 0 : l[e];
|
|
217
|
+
d = r ? r.end + this.options.gap : t + n;
|
|
218
|
+
} else {
|
|
219
|
+
let e = this.options.lanes === 1 ? l[i - 1] : this.getFurthestMeasurement(l, i);
|
|
220
|
+
d = e ? e.end + this.options.gap : t + n, c = e ? e.lane : i % this.options.lanes, this.options.lanes > 1 && f && this.laneAssignments.set(i, c);
|
|
221
|
+
}
|
|
222
|
+
let p = s.get(e), m = typeof p == "number" ? p : this.options.estimateSize(i), h = d + m;
|
|
223
|
+
l[i] = {
|
|
224
|
+
index: i,
|
|
225
|
+
start: d,
|
|
226
|
+
size: m,
|
|
227
|
+
end: h,
|
|
228
|
+
key: e,
|
|
229
|
+
lane: c
|
|
230
|
+
}, u[c] = i;
|
|
231
|
+
}
|
|
232
|
+
return this.measurementsCache = l, l;
|
|
233
|
+
}, {
|
|
234
|
+
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
235
|
+
debug: () => this.options.debug
|
|
236
|
+
}), this.calculateRange = n(() => [
|
|
237
|
+
this.getMeasurements(),
|
|
238
|
+
this.getSize(),
|
|
239
|
+
this.getScrollOffset(),
|
|
240
|
+
this.options.lanes
|
|
241
|
+
], (e, t, n, r) => this.range = e.length > 0 && t > 0 ? h({
|
|
242
|
+
measurements: e,
|
|
243
|
+
outerSize: t,
|
|
244
|
+
scrollOffset: n,
|
|
245
|
+
lanes: r
|
|
246
|
+
}) : null, {
|
|
247
|
+
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
248
|
+
debug: () => this.options.debug
|
|
249
|
+
}), this.getVirtualIndexes = n(() => {
|
|
250
|
+
let e = null, t = null, n = this.calculateRange();
|
|
251
|
+
return n && (e = n.startIndex, t = n.endIndex), this.maybeNotify.updateDeps([
|
|
252
|
+
this.isScrolling,
|
|
253
|
+
e,
|
|
254
|
+
t
|
|
255
|
+
]), [
|
|
256
|
+
this.options.rangeExtractor,
|
|
257
|
+
this.options.overscan,
|
|
258
|
+
this.options.count,
|
|
259
|
+
e,
|
|
260
|
+
t
|
|
261
|
+
];
|
|
262
|
+
}, (e, t, n, r, i) => r === null || i === null ? [] : e({
|
|
263
|
+
startIndex: r,
|
|
264
|
+
endIndex: i,
|
|
265
|
+
overscan: t,
|
|
266
|
+
count: n
|
|
267
|
+
}), {
|
|
268
|
+
key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
|
|
269
|
+
debug: () => this.options.debug
|
|
270
|
+
}), this.indexFromElement = (e) => {
|
|
271
|
+
let t = this.options.indexAttribute, n = e.getAttribute(t);
|
|
272
|
+
return n ? parseInt(n, 10) : (console.warn(`Missing attribute name '${t}={index}' on measured element.`), -1);
|
|
273
|
+
}, this.shouldMeasureDuringScroll = (e) => {
|
|
274
|
+
if (!this.scrollState || this.scrollState.behavior !== "smooth") return !0;
|
|
275
|
+
let t = this.scrollState.index ?? this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;
|
|
276
|
+
if (t !== void 0 && this.range) {
|
|
277
|
+
let n = Math.max(this.options.overscan, Math.ceil((this.range.endIndex - this.range.startIndex) / 2)), r = Math.max(0, t - n), i = Math.min(this.options.count - 1, t + n);
|
|
278
|
+
return e >= r && e <= i;
|
|
279
|
+
}
|
|
280
|
+
return !0;
|
|
281
|
+
}, this.measureElement = (e) => {
|
|
282
|
+
if (!e) {
|
|
283
|
+
this.elementsCache.forEach((e, t) => {
|
|
284
|
+
e.isConnected || (this.observer.unobserve(e), this.elementsCache.delete(t));
|
|
285
|
+
});
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
let t = this.indexFromElement(e), n = this.options.getItemKey(t), r = this.elementsCache.get(n);
|
|
289
|
+
r !== e && (r && this.observer.unobserve(r), this.observer.observe(e), this.elementsCache.set(n, e)), (!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(t) && this.resizeItem(t, this.options.measureElement(e, void 0, this));
|
|
290
|
+
}, this.resizeItem = (e, t) => {
|
|
291
|
+
let n = this.measurementsCache[e];
|
|
292
|
+
if (!n) return;
|
|
293
|
+
let r = t - (this.itemSizeCache.get(n.key) ?? n.size);
|
|
294
|
+
r !== 0 && (this.scrollState?.behavior !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange === void 0 ? n.start < this.getScrollOffset() + this.scrollAdjustments : this.shouldAdjustScrollPositionOnItemSizeChange(n, r, this)) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", r), this._scrollToOffset(this.getScrollOffset(), {
|
|
295
|
+
adjustments: this.scrollAdjustments += r,
|
|
296
|
+
behavior: void 0
|
|
297
|
+
})), this.pendingMeasuredCacheIndexes.push(n.index), this.itemSizeCache = new Map(this.itemSizeCache.set(n.key, t)), this.notify(!1));
|
|
298
|
+
}, this.getVirtualItems = n(() => [this.getVirtualIndexes(), this.getMeasurements()], (e, t) => {
|
|
299
|
+
let n = [];
|
|
300
|
+
for (let r = 0, i = e.length; r < i; r++) {
|
|
301
|
+
let i = t[e[r]];
|
|
302
|
+
n.push(i);
|
|
303
|
+
}
|
|
304
|
+
return n;
|
|
305
|
+
}, {
|
|
306
|
+
key: process.env.NODE_ENV !== "production" && "getVirtualItems",
|
|
307
|
+
debug: () => this.options.debug
|
|
308
|
+
}), this.getVirtualItemForOffset = (e) => {
|
|
309
|
+
let t = this.getMeasurements();
|
|
310
|
+
if (t.length !== 0) return r(t[m(0, t.length - 1, (e) => r(t[e]).start, e)]);
|
|
311
|
+
}, this.getMaxScrollOffset = () => {
|
|
312
|
+
if (!this.scrollElement) return 0;
|
|
313
|
+
if ("scrollHeight" in this.scrollElement) return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight;
|
|
314
|
+
{
|
|
315
|
+
let e = this.scrollElement.document.documentElement;
|
|
316
|
+
return this.options.horizontal ? e.scrollWidth - this.scrollElement.innerWidth : e.scrollHeight - this.scrollElement.innerHeight;
|
|
317
|
+
}
|
|
318
|
+
}, this.getOffsetForAlignment = (e, t, n = 0) => {
|
|
319
|
+
if (!this.scrollElement) return 0;
|
|
320
|
+
let r = this.getSize(), i = this.getScrollOffset();
|
|
321
|
+
t === "auto" && (t = e >= i + r ? "end" : "start"), t === "center" ? e += (n - r) / 2 : t === "end" && (e -= r);
|
|
322
|
+
let a = this.getMaxScrollOffset();
|
|
323
|
+
return Math.max(Math.min(a, e), 0);
|
|
324
|
+
}, this.getOffsetForIndex = (e, t = "auto") => {
|
|
325
|
+
e = Math.max(0, Math.min(e, this.options.count - 1));
|
|
326
|
+
let n = this.getSize(), r = this.getScrollOffset(), i = this.measurementsCache[e];
|
|
327
|
+
if (!i) return;
|
|
328
|
+
if (t === "auto") if (i.end >= r + n - this.options.scrollPaddingEnd) t = "end";
|
|
329
|
+
else if (i.start <= r + this.options.scrollPaddingStart) t = "start";
|
|
330
|
+
else return [r, t];
|
|
331
|
+
if (t === "end" && e === this.options.count - 1) return [this.getMaxScrollOffset(), t];
|
|
332
|
+
let a = t === "end" ? i.end + this.options.scrollPaddingEnd : i.start - this.options.scrollPaddingStart;
|
|
333
|
+
return [this.getOffsetForAlignment(a, t, i.size), t];
|
|
334
|
+
}, this.scrollToOffset = (e, { align: t = "start", behavior: n = "auto" } = {}) => {
|
|
335
|
+
let r = this.getOffsetForAlignment(e, t), i = this.now();
|
|
336
|
+
this.scrollState = {
|
|
337
|
+
index: null,
|
|
338
|
+
align: t,
|
|
339
|
+
behavior: n,
|
|
340
|
+
startedAt: i,
|
|
341
|
+
lastTargetOffset: r,
|
|
342
|
+
stableFrames: 0
|
|
343
|
+
}, this._scrollToOffset(r, {
|
|
344
|
+
adjustments: void 0,
|
|
345
|
+
behavior: n
|
|
346
|
+
}), this.scheduleScrollReconcile();
|
|
347
|
+
}, this.scrollToIndex = (e, { align: t = "auto", behavior: n = "auto" } = {}) => {
|
|
348
|
+
e = Math.max(0, Math.min(e, this.options.count - 1));
|
|
349
|
+
let r = this.getOffsetForIndex(e, t);
|
|
350
|
+
if (!r) return;
|
|
351
|
+
let [i, a] = r, o = this.now();
|
|
352
|
+
this.scrollState = {
|
|
353
|
+
index: e,
|
|
354
|
+
align: a,
|
|
355
|
+
behavior: n,
|
|
356
|
+
startedAt: o,
|
|
357
|
+
lastTargetOffset: i,
|
|
358
|
+
stableFrames: 0
|
|
359
|
+
}, this._scrollToOffset(i, {
|
|
360
|
+
adjustments: void 0,
|
|
361
|
+
behavior: n
|
|
362
|
+
}), this.scheduleScrollReconcile();
|
|
363
|
+
}, this.scrollBy = (e, { behavior: t = "auto" } = {}) => {
|
|
364
|
+
let n = this.getScrollOffset() + e, r = this.now();
|
|
365
|
+
this.scrollState = {
|
|
366
|
+
index: null,
|
|
367
|
+
align: "start",
|
|
368
|
+
behavior: t,
|
|
369
|
+
startedAt: r,
|
|
370
|
+
lastTargetOffset: n,
|
|
371
|
+
stableFrames: 0
|
|
372
|
+
}, this._scrollToOffset(n, {
|
|
373
|
+
adjustments: void 0,
|
|
374
|
+
behavior: t
|
|
375
|
+
}), this.scheduleScrollReconcile();
|
|
376
|
+
}, this.getTotalSize = () => {
|
|
377
|
+
let e = this.getMeasurements(), t;
|
|
378
|
+
if (e.length === 0) t = this.options.paddingStart;
|
|
379
|
+
else if (this.options.lanes === 1) t = e[e.length - 1]?.end ?? 0;
|
|
380
|
+
else {
|
|
381
|
+
let n = Array(this.options.lanes).fill(null), r = e.length - 1;
|
|
382
|
+
for (; r >= 0 && n.some((e) => e === null);) {
|
|
383
|
+
let t = e[r];
|
|
384
|
+
n[t.lane] === null && (n[t.lane] = t.end), r--;
|
|
385
|
+
}
|
|
386
|
+
t = Math.max(...n.filter((e) => e !== null));
|
|
387
|
+
}
|
|
388
|
+
return Math.max(t - this.options.scrollMargin + this.options.paddingEnd, 0);
|
|
389
|
+
}, this._scrollToOffset = (e, { adjustments: t, behavior: n }) => {
|
|
390
|
+
this.options.scrollToFn(e, {
|
|
391
|
+
behavior: n,
|
|
392
|
+
adjustments: t
|
|
393
|
+
}, this);
|
|
394
|
+
}, this.measure = () => {
|
|
395
|
+
this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.notify(!1);
|
|
396
|
+
}, this.setOptions(e);
|
|
397
|
+
}
|
|
398
|
+
scheduleScrollReconcile() {
|
|
399
|
+
if (!this.targetWindow) {
|
|
400
|
+
this.scrollState = null;
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
this.rafId ??= this.targetWindow.requestAnimationFrame(() => {
|
|
404
|
+
this.rafId = null, this.reconcileScroll();
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
reconcileScroll() {
|
|
408
|
+
if (!this.scrollState || !this.scrollElement) return;
|
|
409
|
+
if (this.now() - this.scrollState.startedAt > 5e3) {
|
|
410
|
+
this.scrollState = null;
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
let t = this.scrollState.index == null ? void 0 : this.getOffsetForIndex(this.scrollState.index, this.scrollState.align), n = t ? t[0] : this.scrollState.lastTargetOffset, r = n !== this.scrollState.lastTargetOffset;
|
|
414
|
+
if (!r && e(n, this.getScrollOffset())) {
|
|
415
|
+
if (this.scrollState.stableFrames++, this.scrollState.stableFrames >= 1) {
|
|
416
|
+
this.scrollState = null;
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
} else this.scrollState.stableFrames = 0, r && (this.scrollState.lastTargetOffset = n, this.scrollState.behavior = "auto", this._scrollToOffset(n, {
|
|
420
|
+
adjustments: void 0,
|
|
421
|
+
behavior: "auto"
|
|
422
|
+
}));
|
|
423
|
+
this.scheduleScrollReconcile();
|
|
424
|
+
}
|
|
425
|
+
}, m = (e, t, n, r) => {
|
|
426
|
+
for (; e <= t;) {
|
|
427
|
+
let i = (e + t) / 2 | 0, a = n(i);
|
|
428
|
+
if (a < r) e = i + 1;
|
|
429
|
+
else if (a > r) t = i - 1;
|
|
430
|
+
else return i;
|
|
431
|
+
}
|
|
432
|
+
return e > 0 ? e - 1 : 0;
|
|
5
433
|
};
|
|
434
|
+
function h({ measurements: e, outerSize: t, scrollOffset: n, lanes: r }) {
|
|
435
|
+
let i = e.length - 1, a = (t) => e[t].start;
|
|
436
|
+
if (e.length <= r) return {
|
|
437
|
+
startIndex: 0,
|
|
438
|
+
endIndex: i
|
|
439
|
+
};
|
|
440
|
+
let o = m(0, i, a, n), s = o;
|
|
441
|
+
if (r === 1) for (; s < i && e[s].end < n + t;) s++;
|
|
442
|
+
else if (r > 1) {
|
|
443
|
+
let a = Array(r).fill(0);
|
|
444
|
+
for (; s < i && a.some((e) => e < n + t);) {
|
|
445
|
+
let t = e[s];
|
|
446
|
+
a[t.lane] = t.end, s++;
|
|
447
|
+
}
|
|
448
|
+
let c = Array(r).fill(n + t);
|
|
449
|
+
for (; o >= 0 && c.some((e) => e >= n);) {
|
|
450
|
+
let t = e[o];
|
|
451
|
+
c[t.lane] = t.start, o--;
|
|
452
|
+
}
|
|
453
|
+
o = Math.max(0, o - o % r), s = Math.min(i, s + (r - 1 - s % r));
|
|
454
|
+
}
|
|
455
|
+
return {
|
|
456
|
+
startIndex: o,
|
|
457
|
+
endIndex: s
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
//#endregion
|
|
461
|
+
export { p as Virtualizer, a as defaultKeyExtractor, o as defaultRangeExtractor, f as elementScroll, d as measureElement, u as observeElementOffset, s as observeElementRect };
|
package/dist/index177.js
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import "./index175.js";
|
|
2
|
+
import { Virtualizer as e, elementScroll as t, observeElementOffset as n, observeElementRect as r } from "./index176.js";
|
|
3
|
+
import { computed as i, onScopeDispose as a, shallowRef as o, triggerRef as s, unref as c, watch as l } from "vue";
|
|
4
|
+
//#region node_modules/@tanstack/vue-virtual/dist/esm/index.js
|
|
5
|
+
function u(t) {
|
|
6
|
+
let n = new e(c(t)), r = o(n), i = n._didMount();
|
|
7
|
+
return l(() => c(t).getScrollElement(), (e) => {
|
|
8
|
+
e && n._willUpdate();
|
|
9
|
+
}, { immediate: !0 }), l(() => c(t), (e) => {
|
|
10
|
+
n.setOptions({
|
|
11
|
+
...e,
|
|
12
|
+
onChange: (t, n) => {
|
|
13
|
+
var i;
|
|
14
|
+
s(r), (i = e.onChange) == null || i.call(e, t, n);
|
|
15
|
+
}
|
|
16
|
+
}), n._willUpdate(), s(r);
|
|
17
|
+
}, { immediate: !0 }), a(i), r;
|
|
18
|
+
}
|
|
19
|
+
function d(e) {
|
|
20
|
+
return u(i(() => ({
|
|
21
|
+
observeElementRect: r,
|
|
22
|
+
observeElementOffset: n,
|
|
23
|
+
scrollToFn: t,
|
|
24
|
+
...c(e)
|
|
25
|
+
})));
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { d as useVirtualizer };
|
package/dist/index178.js
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { isNil as e } from "./index94.js";
|
|
2
|
+
import { computed as t, ref as n, toValue as r } from "vue";
|
|
3
|
+
//#region src/composables/useListboxFocus.ts
|
|
4
|
+
function i(i, { disabled: a = !1 } = {}) {
|
|
5
|
+
let o = n(null), s = t(() => !r(a) && r(i).some((e) => !e.disabled)), c = () => {
|
|
6
|
+
let t = r(i), n = e(o.value) ? -1 : o.value;
|
|
7
|
+
for (let e = 1; e <= t.length; e++) {
|
|
8
|
+
let r = (n + e) % t.length;
|
|
9
|
+
if (!t[r].disabled) return r;
|
|
10
|
+
}
|
|
11
|
+
return e(o.value) ? 0 : o.value;
|
|
12
|
+
}, l = () => {
|
|
13
|
+
let t = r(i), n = e(o.value) ? 0 : o.value;
|
|
14
|
+
for (let e = 1; e <= t.length; e++) {
|
|
15
|
+
let r = (n - e + t.length) % t.length;
|
|
16
|
+
if (!t[r].disabled) return r;
|
|
17
|
+
}
|
|
18
|
+
return e(o.value) ? 0 : o.value;
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
focusedIndex: o,
|
|
22
|
+
canFocus: s,
|
|
23
|
+
focusNext: () => {
|
|
24
|
+
s.value && (o.value = c());
|
|
25
|
+
},
|
|
26
|
+
focusPrevious: () => {
|
|
27
|
+
s.value && (o.value = l());
|
|
28
|
+
},
|
|
29
|
+
focusFirst: () => {
|
|
30
|
+
if (!s.value) return;
|
|
31
|
+
let e = r(i), t = 0;
|
|
32
|
+
for (; t < e.length && e[t].disabled;) t++;
|
|
33
|
+
t < e.length && (o.value = t);
|
|
34
|
+
},
|
|
35
|
+
focusLast: () => {
|
|
36
|
+
if (!s.value) return;
|
|
37
|
+
let e = r(i), t = e.length - 1;
|
|
38
|
+
for (; t >= 0 && e[t].disabled;) t--;
|
|
39
|
+
t >= 0 && (o.value = t);
|
|
40
|
+
},
|
|
41
|
+
focusFirstSelected: () => {
|
|
42
|
+
if (!s.value) return;
|
|
43
|
+
let e = r(i).findIndex((e) => e.selected);
|
|
44
|
+
o.value = e >= 0 ? e : 0;
|
|
45
|
+
},
|
|
46
|
+
focusLastSelected: () => {
|
|
47
|
+
if (!s.value) return;
|
|
48
|
+
let e = r(i), t = e.length - 1;
|
|
49
|
+
for (; t > 0 && !e[t].selected;) t--;
|
|
50
|
+
o.value = t;
|
|
51
|
+
},
|
|
52
|
+
focusByHash: (e) => {
|
|
53
|
+
if (!s.value) return;
|
|
54
|
+
let t = r(i).findIndex((t) => t.valueHash === e);
|
|
55
|
+
t >= 0 && (o.value = t);
|
|
56
|
+
},
|
|
57
|
+
blur: () => {
|
|
58
|
+
o.value = null;
|
|
59
|
+
},
|
|
60
|
+
getHighlighted: () => {
|
|
61
|
+
if (!e(o.value)) return r(i)[o.value];
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { i as useListboxFocus };
|
package/dist/index179.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
//#region src/utilities/functions/indexBy.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
let n = {}, r = e.length;
|
|
4
|
+
for (let i = 0; i < r; i++) {
|
|
5
|
+
let r = e[i], a;
|
|
6
|
+
if (typeof t == "function") a = t(r, i, e);
|
|
7
|
+
else {
|
|
8
|
+
let e = r[t];
|
|
9
|
+
if (typeof e == "string" || typeof e == "number" || typeof e == "symbol") a = e;
|
|
10
|
+
else throw Error(`Property "${String(t)}" must be of type string, number, or symbol`);
|
|
11
|
+
}
|
|
12
|
+
n[a] = r;
|
|
13
|
+
}
|
|
14
|
+
return n;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { e as indexBy };
|