bitboss-ui 2.1.35 → 2.1.37

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.
Files changed (171) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index106.js +9 -9
  3. package/dist/index111.js +1 -1
  4. package/dist/index113.js +1 -1
  5. package/dist/index119.js +17 -17
  6. package/dist/index121.js +11 -11
  7. package/dist/index129.js +1 -1
  8. package/dist/index13.js +1 -1
  9. package/dist/index131.js +6 -6
  10. package/dist/index133.js +1 -1
  11. package/dist/index135.js +2 -2
  12. package/dist/index142.js +2 -2
  13. package/dist/index15.js +5 -5
  14. package/dist/index17.js +3 -3
  15. package/dist/index19.js +8 -8
  16. package/dist/index21.js +16 -16
  17. package/dist/index215.js +10 -5
  18. package/dist/index216.js +3 -5
  19. package/dist/index217.js +13 -5
  20. package/dist/index218.js +3 -5
  21. package/dist/index219.js +4 -5
  22. package/dist/index220.js +20 -5
  23. package/dist/index221.js +197 -5
  24. package/dist/index223.js +121 -2
  25. package/dist/index225.js +5 -250
  26. package/dist/index226.js +5 -52
  27. package/dist/index227.js +5 -44
  28. package/dist/index228.js +4 -4
  29. package/dist/index229.js +5 -60
  30. package/dist/index23.js +12 -12
  31. package/dist/index230.js +5 -13
  32. package/dist/index231.js +2 -86
  33. package/dist/index232.js +4 -0
  34. package/dist/index233.js +2 -29
  35. package/dist/index234.js +34 -17
  36. package/dist/index235.js +2 -51
  37. package/dist/index236.js +4 -15
  38. package/dist/index237.js +2 -12
  39. package/dist/index238.js +2 -16
  40. package/dist/index239.js +2 -34
  41. package/dist/index240.js +7 -4
  42. package/dist/index241.js +7 -20
  43. package/dist/index242.js +49 -195
  44. package/dist/index243.js +19 -0
  45. package/dist/index244.js +101 -116
  46. package/dist/index246.js +100 -2
  47. package/dist/index248.js +12 -182
  48. package/dist/index249.js +12 -12
  49. package/dist/index25.js +3 -3
  50. package/dist/index250.js +8 -12
  51. package/dist/index251.js +23 -2
  52. package/dist/index252.js +4 -2
  53. package/dist/index253.js +22 -6
  54. package/dist/index254.js +5 -7
  55. package/dist/index255.js +5 -7
  56. package/dist/index256.js +3 -106
  57. package/dist/index258.js +245 -95
  58. package/dist/index259.js +54 -0
  59. package/dist/index260.js +44 -2
  60. package/dist/index261.js +5 -3
  61. package/dist/index262.js +60 -2
  62. package/dist/index263.js +183 -2
  63. package/dist/index264.js +7 -5
  64. package/dist/index265.js +85 -17
  65. package/dist/index267.js +28 -228
  66. package/dist/index268.js +14 -9
  67. package/dist/index269.js +11 -2
  68. package/dist/index27.js +1 -1
  69. package/dist/index270.js +15 -8
  70. package/dist/index271.js +9 -23
  71. package/dist/index272.js +10 -3
  72. package/dist/index273.js +17 -22
  73. package/dist/index274.js +12 -6
  74. package/dist/index275.js +228 -15
  75. package/dist/index276.js +6 -3
  76. package/dist/index277.js +16 -9
  77. package/dist/index278.js +3 -9
  78. package/dist/index279.js +2 -8
  79. package/dist/index280.js +9 -2
  80. package/dist/index281.js +5 -67
  81. package/dist/index282.js +33 -5
  82. package/dist/index283.js +28 -33
  83. package/dist/index285.js +10 -0
  84. package/dist/index286.js +67 -5
  85. package/dist/index287.js +4 -7
  86. package/dist/index288.js +7 -279
  87. package/dist/index289.js +7 -2
  88. package/dist/index29.js +2 -2
  89. package/dist/index290.js +5 -16
  90. package/dist/index291.js +3 -2
  91. package/dist/index292.js +3 -16
  92. package/dist/index293.js +4 -2
  93. package/dist/index294.js +278 -17
  94. package/dist/index295.js +2 -2
  95. package/dist/index296.js +123 -13
  96. package/dist/index297.js +2 -2
  97. package/dist/index298.js +11 -15
  98. package/dist/index300.js +12 -23
  99. package/dist/index302.js +16 -2
  100. package/dist/index303.js +2 -2
  101. package/dist/index304.js +19 -2
  102. package/dist/index305.js +2 -2
  103. package/dist/index306.js +2 -28
  104. package/dist/index307.js +4 -22
  105. package/dist/index308.js +8 -0
  106. package/dist/index309.js +28 -7
  107. package/dist/index31.js +2 -2
  108. package/dist/index310.js +3 -11
  109. package/dist/index311.js +1 -1
  110. package/dist/index312.js +1 -1
  111. package/dist/index313.js +19 -2
  112. package/dist/index314.js +2 -4
  113. package/dist/index315.js +26 -5
  114. package/dist/index316.js +2 -3
  115. package/dist/index317.js +2 -3
  116. package/dist/index318.js +2 -4
  117. package/dist/index319.js +2 -3
  118. package/dist/index320.js +2 -3
  119. package/dist/index321.js +22 -5
  120. package/dist/index323.js +3 -2
  121. package/dist/index324.js +1 -1
  122. package/dist/index328.js +1 -1
  123. package/dist/index33.js +8 -8
  124. package/dist/index330.js +5 -0
  125. package/dist/index331.js +2 -3
  126. package/dist/index332.js +34 -6
  127. package/dist/index333.js +6 -19
  128. package/dist/index334.js +128 -6
  129. package/dist/index335.js +364 -30
  130. package/dist/index336.js +228 -6
  131. package/dist/index337.js +6 -128
  132. package/dist/index338.js +7 -368
  133. package/dist/index339.js +5 -46
  134. package/dist/index340.js +8 -8
  135. package/dist/index341.js +58 -6
  136. package/dist/index342.js +57 -7
  137. package/dist/index343.js +46 -227
  138. package/dist/index344.js +7 -58
  139. package/dist/index345.js +18 -57
  140. package/dist/index346.js +1 -1
  141. package/dist/index348.js +421 -473
  142. package/dist/index349.js +113 -422
  143. package/dist/index35.js +4 -4
  144. package/dist/index350.js +484 -123
  145. package/dist/index37.js +18 -18
  146. package/dist/index39.js +6 -6
  147. package/dist/index41.js +2 -2
  148. package/dist/index43.js +8 -8
  149. package/dist/index45.js +6 -6
  150. package/dist/index49.js +1 -1
  151. package/dist/index53.js +1 -1
  152. package/dist/index55.js +1 -1
  153. package/dist/index57.js +2 -2
  154. package/dist/index61.js +3 -3
  155. package/dist/index67.js +1 -1
  156. package/dist/index79.js +6 -6
  157. package/dist/index81.js +1 -1
  158. package/dist/index83.js +2 -2
  159. package/dist/index85.js +46 -29
  160. package/dist/index87.js +1 -1
  161. package/dist/index90.js +3 -3
  162. package/dist/index92.js +2 -2
  163. package/dist/index94.js +5 -5
  164. package/package.json +1 -1
  165. package/dist/index222.js +0 -5
  166. package/dist/index247.js +0 -6
  167. package/dist/index266.js +0 -14
  168. package/dist/index284.js +0 -30
  169. package/dist/index322.js +0 -127
  170. package/dist/index329.js +0 -4
  171. /package/dist/{index224.js → index257.js} +0 -0
package/dist/index350.js CHANGED
@@ -1,129 +1,490 @@
1
- const P = ["top", "right", "bottom", "left"], l = Math.min, m = Math.max, M = Math.round, O = Math.floor, S = (t) => ({
2
- x: t,
3
- y: t
4
- }), p = {
5
- left: "right",
6
- right: "left",
7
- bottom: "top",
8
- top: "bottom"
9
- }, a = {
10
- start: "end",
11
- end: "start"
12
- };
13
- function w(t, n, e) {
14
- return m(t, l(n, e));
15
- }
16
- function j(t, n) {
17
- return typeof t == "function" ? t(n) : t;
18
- }
19
- function u(t) {
20
- return t.split("-")[0];
21
- }
22
- function g(t) {
23
- return t.split("-")[1];
24
- }
25
- function h(t) {
26
- return t === "x" ? "y" : "x";
27
- }
28
- function b(t) {
29
- return t === "y" ? "height" : "width";
30
- }
31
- function x(t) {
32
- return ["top", "bottom"].includes(u(t)) ? "y" : "x";
33
- }
34
- function d(t) {
35
- return h(x(t));
36
- }
37
- function C(t, n, e) {
38
- e === void 0 && (e = !1);
39
- const r = g(t), o = d(t), i = b(o);
40
- let c = o === "x" ? r === (e ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
41
- return n.reference[i] > n.floating[i] && (c = f(c)), [c, f(c)];
42
- }
43
- function L(t) {
44
- const n = f(t);
45
- return [s(t), n, s(n)];
46
- }
47
- function s(t) {
48
- return t.replace(/start|end/g, (n) => a[n]);
49
- }
50
- function A(t, n, e) {
51
- const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], c = ["bottom", "top"];
52
- switch (t) {
53
- case "top":
54
- case "bottom":
55
- return e ? n ? o : r : n ? r : o;
56
- case "left":
57
- case "right":
58
- return n ? i : c;
59
- default:
60
- return [];
61
- }
62
- }
63
- function E(t, n, e, r) {
64
- const o = g(t);
65
- let i = A(u(t), e === "start", r);
66
- return o && (i = i.map((c) => c + "-" + o), n && (i = i.concat(i.map(s)))), i;
67
- }
68
- function f(t) {
69
- return t.replace(/left|right|bottom|top/g, (n) => p[n]);
70
- }
71
- function y(t) {
72
- return {
73
- top: 0,
74
- right: 0,
75
- bottom: 0,
76
- left: 0,
77
- ...t
1
+ import { debounce as M, memo as d, notUndefined as m, approxEqual as y } from "./index351.js";
2
+ const b = (r) => {
3
+ const { offsetWidth: h, offsetHeight: t } = r;
4
+ return { width: h, height: t };
5
+ }, z = (r) => r, w = (r) => {
6
+ const h = Math.max(r.startIndex - r.overscan, 0), t = Math.min(r.endIndex + r.overscan, r.count - 1), s = [];
7
+ for (let e = h; e <= t; e++)
8
+ s.push(e);
9
+ return s;
10
+ }, _ = (r, h) => {
11
+ const t = r.scrollElement;
12
+ if (!t)
13
+ return;
14
+ const s = r.targetWindow;
15
+ if (!s)
16
+ return;
17
+ const e = (n) => {
18
+ const { width: o, height: a } = n;
19
+ h({ width: Math.round(o), height: Math.round(a) });
78
20
  };
79
- }
80
- function R(t) {
81
- return typeof t != "number" ? y(t) : {
82
- top: t,
83
- right: t,
84
- bottom: t,
85
- left: t
21
+ if (e(b(t)), !s.ResizeObserver)
22
+ return () => {
23
+ };
24
+ const i = new s.ResizeObserver((n) => {
25
+ const o = () => {
26
+ const a = n[0];
27
+ if (a != null && a.borderBoxSize) {
28
+ const c = a.borderBoxSize[0];
29
+ if (c) {
30
+ e({ width: c.inlineSize, height: c.blockSize });
31
+ return;
32
+ }
33
+ }
34
+ e(b(t));
35
+ };
36
+ r.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(o) : o();
37
+ });
38
+ return i.observe(t, { box: "border-box" }), () => {
39
+ i.unobserve(t);
86
40
  };
87
- }
88
- function T(t) {
89
- const {
90
- x: n,
91
- y: e,
92
- width: r,
93
- height: o
94
- } = t;
95
- return {
96
- width: r,
97
- height: o,
98
- top: e,
99
- left: n,
100
- right: n + r,
101
- bottom: e + o,
102
- x: n,
103
- y: e
41
+ }, x = {
42
+ passive: !0
43
+ }, E = typeof window > "u" ? !0 : "onscrollend" in window, A = (r, h) => {
44
+ const t = r.scrollElement;
45
+ if (!t)
46
+ return;
47
+ const s = r.targetWindow;
48
+ if (!s)
49
+ return;
50
+ let e = 0;
51
+ const i = r.options.useScrollendEvent && E ? () => {
52
+ } : M(
53
+ s,
54
+ () => {
55
+ h(e, !1);
56
+ },
57
+ r.options.isScrollingResetDelay
58
+ ), n = (l) => () => {
59
+ const { horizontal: f, isRtl: u } = r.options;
60
+ e = f ? t.scrollLeft * (u && -1 || 1) : t.scrollTop, i(), h(e, l);
61
+ }, o = n(!0), a = n(!1);
62
+ a(), t.addEventListener("scroll", o, x);
63
+ const c = r.options.useScrollendEvent && E;
64
+ return c && t.addEventListener("scrollend", a, x), () => {
65
+ t.removeEventListener("scroll", o), c && t.removeEventListener("scrollend", a);
104
66
  };
67
+ }, C = (r, h, t) => {
68
+ if (h != null && h.borderBoxSize) {
69
+ const s = h.borderBoxSize[0];
70
+ if (s)
71
+ return Math.round(
72
+ s[t.options.horizontal ? "inlineSize" : "blockSize"]
73
+ );
74
+ }
75
+ return r[t.options.horizontal ? "offsetWidth" : "offsetHeight"];
76
+ }, D = (r, {
77
+ adjustments: h = 0,
78
+ behavior: t
79
+ }, s) => {
80
+ var e, i;
81
+ const n = r + h;
82
+ (i = (e = s.scrollElement) == null ? void 0 : e.scrollTo) == null || i.call(e, {
83
+ [s.options.horizontal ? "left" : "top"]: n,
84
+ behavior: t
85
+ });
86
+ };
87
+ class N {
88
+ constructor(h) {
89
+ this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
90
+ let t = null;
91
+ const s = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((e) => {
92
+ e.forEach((i) => {
93
+ const n = () => {
94
+ this._measureElement(i.target, i);
95
+ };
96
+ this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(n) : n();
97
+ });
98
+ }));
99
+ return {
100
+ disconnect: () => {
101
+ var e;
102
+ (e = s()) == null || e.disconnect(), t = null;
103
+ },
104
+ observe: (e) => {
105
+ var i;
106
+ return (i = s()) == null ? void 0 : i.observe(e, { box: "border-box" });
107
+ },
108
+ unobserve: (e) => {
109
+ var i;
110
+ return (i = s()) == null ? void 0 : i.unobserve(e);
111
+ }
112
+ };
113
+ })(), this.range = null, this.setOptions = (t) => {
114
+ Object.entries(t).forEach(([s, e]) => {
115
+ typeof e > "u" && delete t[s];
116
+ }), this.options = {
117
+ debug: !1,
118
+ initialOffset: 0,
119
+ overscan: 1,
120
+ paddingStart: 0,
121
+ paddingEnd: 0,
122
+ scrollPaddingStart: 0,
123
+ scrollPaddingEnd: 0,
124
+ horizontal: !1,
125
+ getItemKey: z,
126
+ rangeExtractor: w,
127
+ onChange: () => {
128
+ },
129
+ measureElement: C,
130
+ initialRect: { width: 0, height: 0 },
131
+ scrollMargin: 0,
132
+ gap: 0,
133
+ indexAttribute: "data-index",
134
+ initialMeasurementsCache: [],
135
+ lanes: 1,
136
+ isScrollingResetDelay: 150,
137
+ enabled: !0,
138
+ isRtl: !1,
139
+ useScrollendEvent: !1,
140
+ useAnimationFrameWithResizeObserver: !1,
141
+ ...t
142
+ };
143
+ }, this.notify = (t) => {
144
+ var s, e;
145
+ (e = (s = this.options).onChange) == null || e.call(s, this, t);
146
+ }, this.maybeNotify = d(
147
+ () => (this.calculateRange(), [
148
+ this.isScrolling,
149
+ this.range ? this.range.startIndex : null,
150
+ this.range ? this.range.endIndex : null
151
+ ]),
152
+ (t) => {
153
+ this.notify(t);
154
+ },
155
+ {
156
+ key: process.env.NODE_ENV !== "production" && "maybeNotify",
157
+ debug: () => this.options.debug,
158
+ initialDeps: [
159
+ this.isScrolling,
160
+ this.range ? this.range.startIndex : null,
161
+ this.range ? this.range.endIndex : null
162
+ ]
163
+ }
164
+ ), this.cleanup = () => {
165
+ this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.observer.disconnect(), this.scrollElement = null, this.targetWindow = null;
166
+ }, this._didMount = () => () => {
167
+ this.cleanup();
168
+ }, this._willUpdate = () => {
169
+ var t;
170
+ const s = this.options.enabled ? this.options.getScrollElement() : null;
171
+ if (this.scrollElement !== s) {
172
+ if (this.cleanup(), !s) {
173
+ this.maybeNotify();
174
+ return;
175
+ }
176
+ this.scrollElement = s, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((e) => {
177
+ this.observer.observe(e);
178
+ }), this._scrollToOffset(this.getScrollOffset(), {
179
+ adjustments: void 0,
180
+ behavior: void 0
181
+ }), this.unsubs.push(
182
+ this.options.observeElementRect(this, (e) => {
183
+ this.scrollRect = e, this.maybeNotify();
184
+ })
185
+ ), this.unsubs.push(
186
+ this.options.observeElementOffset(this, (e, i) => {
187
+ this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() < e ? "forward" : "backward" : null, this.scrollOffset = e, this.isScrolling = i, this.maybeNotify();
188
+ })
189
+ );
190
+ }
191
+ }, 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 = (t, s) => {
192
+ const e = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
193
+ for (let n = s - 1; n >= 0; n--) {
194
+ const o = t[n];
195
+ if (e.has(o.lane))
196
+ continue;
197
+ const a = i.get(
198
+ o.lane
199
+ );
200
+ if (a == null || o.end > a.end ? i.set(o.lane, o) : o.end < a.end && e.set(o.lane, !0), e.size === this.options.lanes)
201
+ break;
202
+ }
203
+ return i.size === this.options.lanes ? Array.from(i.values()).sort((n, o) => n.end === o.end ? n.index - o.index : n.end - o.end)[0] : void 0;
204
+ }, this.getMeasurementOptions = d(
205
+ () => [
206
+ this.options.count,
207
+ this.options.paddingStart,
208
+ this.options.scrollMargin,
209
+ this.options.getItemKey,
210
+ this.options.enabled
211
+ ],
212
+ (t, s, e, i, n) => (this.pendingMeasuredCacheIndexes = [], {
213
+ count: t,
214
+ paddingStart: s,
215
+ scrollMargin: e,
216
+ getItemKey: i,
217
+ enabled: n
218
+ }),
219
+ {
220
+ key: !1
221
+ }
222
+ ), this.getMeasurements = d(
223
+ () => [this.getMeasurementOptions(), this.itemSizeCache],
224
+ ({ count: t, paddingStart: s, scrollMargin: e, getItemKey: i, enabled: n }, o) => {
225
+ if (!n)
226
+ return this.measurementsCache = [], this.itemSizeCache.clear(), [];
227
+ this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((l) => {
228
+ this.itemSizeCache.set(l.key, l.size);
229
+ }));
230
+ const a = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
231
+ this.pendingMeasuredCacheIndexes = [];
232
+ const c = this.measurementsCache.slice(0, a);
233
+ for (let l = a; l < t; l++) {
234
+ const f = i(l), u = this.options.lanes === 1 ? c[l - 1] : this.getFurthestMeasurement(c, l), g = u ? u.end + this.options.gap : s + e, p = o.get(f), v = typeof p == "number" ? p : this.options.estimateSize(l), O = g + v, I = u ? u.lane : l % this.options.lanes;
235
+ c[l] = {
236
+ index: l,
237
+ start: g,
238
+ size: v,
239
+ end: O,
240
+ key: f,
241
+ lane: I
242
+ };
243
+ }
244
+ return this.measurementsCache = c, c;
245
+ },
246
+ {
247
+ key: process.env.NODE_ENV !== "production" && "getMeasurements",
248
+ debug: () => this.options.debug
249
+ }
250
+ ), this.calculateRange = d(
251
+ () => [
252
+ this.getMeasurements(),
253
+ this.getSize(),
254
+ this.getScrollOffset(),
255
+ this.options.lanes
256
+ ],
257
+ (t, s, e, i) => this.range = t.length > 0 && s > 0 ? T({
258
+ measurements: t,
259
+ outerSize: s,
260
+ scrollOffset: e,
261
+ lanes: i
262
+ }) : null,
263
+ {
264
+ key: process.env.NODE_ENV !== "production" && "calculateRange",
265
+ debug: () => this.options.debug
266
+ }
267
+ ), this.getVirtualIndexes = d(
268
+ () => {
269
+ let t = null, s = null;
270
+ const e = this.calculateRange();
271
+ return e && (t = e.startIndex, s = e.endIndex), this.maybeNotify.updateDeps([this.isScrolling, t, s]), [
272
+ this.options.rangeExtractor,
273
+ this.options.overscan,
274
+ this.options.count,
275
+ t,
276
+ s
277
+ ];
278
+ },
279
+ (t, s, e, i, n) => i === null || n === null ? [] : t({
280
+ startIndex: i,
281
+ endIndex: n,
282
+ overscan: s,
283
+ count: e
284
+ }),
285
+ {
286
+ key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
287
+ debug: () => this.options.debug
288
+ }
289
+ ), this.indexFromElement = (t) => {
290
+ const s = this.options.indexAttribute, e = t.getAttribute(s);
291
+ return e ? parseInt(e, 10) : (console.warn(
292
+ `Missing attribute name '${s}={index}' on measured element.`
293
+ ), -1);
294
+ }, this._measureElement = (t, s) => {
295
+ const e = this.indexFromElement(t), i = this.measurementsCache[e];
296
+ if (!i)
297
+ return;
298
+ const n = i.key, o = this.elementsCache.get(n);
299
+ o !== t && (o && this.observer.unobserve(o), this.observer.observe(t), this.elementsCache.set(n, t)), t.isConnected && this.resizeItem(e, this.options.measureElement(t, s, this));
300
+ }, this.resizeItem = (t, s) => {
301
+ const e = this.measurementsCache[t];
302
+ if (!e)
303
+ return;
304
+ const i = this.itemSizeCache.get(e.key) ?? e.size, n = s - i;
305
+ n !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(e, n, this) : e.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", n), this._scrollToOffset(this.getScrollOffset(), {
306
+ adjustments: this.scrollAdjustments += n,
307
+ behavior: void 0
308
+ })), this.pendingMeasuredCacheIndexes.push(e.index), this.itemSizeCache = new Map(this.itemSizeCache.set(e.key, s)), this.notify(!1));
309
+ }, this.measureElement = (t) => {
310
+ if (!t) {
311
+ this.elementsCache.forEach((s, e) => {
312
+ s.isConnected || (this.observer.unobserve(s), this.elementsCache.delete(e));
313
+ });
314
+ return;
315
+ }
316
+ this._measureElement(t, void 0);
317
+ }, this.getVirtualItems = d(
318
+ () => [this.getVirtualIndexes(), this.getMeasurements()],
319
+ (t, s) => {
320
+ const e = [];
321
+ for (let i = 0, n = t.length; i < n; i++) {
322
+ const o = t[i], a = s[o];
323
+ e.push(a);
324
+ }
325
+ return e;
326
+ },
327
+ {
328
+ key: process.env.NODE_ENV !== "production" && "getVirtualItems",
329
+ debug: () => this.options.debug
330
+ }
331
+ ), this.getVirtualItemForOffset = (t) => {
332
+ const s = this.getMeasurements();
333
+ if (s.length !== 0)
334
+ return m(
335
+ s[S(
336
+ 0,
337
+ s.length - 1,
338
+ (e) => m(s[e]).start,
339
+ t
340
+ )]
341
+ );
342
+ }, this.getOffsetForAlignment = (t, s, e = 0) => {
343
+ const i = this.getSize(), n = this.getScrollOffset();
344
+ s === "auto" && (s = t >= n + i ? "end" : "start"), s === "center" ? t += (e - i) / 2 : s === "end" && (t -= i);
345
+ const o = this.getTotalSize() - i;
346
+ return Math.max(Math.min(o, t), 0);
347
+ }, this.getOffsetForIndex = (t, s = "auto") => {
348
+ t = Math.max(0, Math.min(t, this.options.count - 1));
349
+ const e = this.measurementsCache[t];
350
+ if (!e)
351
+ return;
352
+ const i = this.getSize(), n = this.getScrollOffset();
353
+ if (s === "auto")
354
+ if (e.end >= n + i - this.options.scrollPaddingEnd)
355
+ s = "end";
356
+ else if (e.start <= n + this.options.scrollPaddingStart)
357
+ s = "start";
358
+ else
359
+ return [n, s];
360
+ const o = s === "end" ? e.end + this.options.scrollPaddingEnd : e.start - this.options.scrollPaddingStart;
361
+ return [
362
+ this.getOffsetForAlignment(o, s, e.size),
363
+ s
364
+ ];
365
+ }, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
366
+ this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
367
+ }, this.scrollToOffset = (t, { align: s = "start", behavior: e } = {}) => {
368
+ this.cancelScrollToIndex(), e === "smooth" && this.isDynamicMode() && console.warn(
369
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
370
+ ), this._scrollToOffset(this.getOffsetForAlignment(t, s), {
371
+ adjustments: void 0,
372
+ behavior: e
373
+ });
374
+ }, this.scrollToIndex = (t, { align: s = "auto", behavior: e } = {}) => {
375
+ t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), e === "smooth" && this.isDynamicMode() && console.warn(
376
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
377
+ );
378
+ const i = this.getOffsetForIndex(t, s);
379
+ if (!i) return;
380
+ const [n, o] = i;
381
+ this._scrollToOffset(n, { adjustments: void 0, behavior: e }), e !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
382
+ if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
383
+ this.options.getItemKey(t)
384
+ )) {
385
+ const [c] = m(
386
+ this.getOffsetForIndex(t, o)
387
+ ), l = this.getScrollOffset();
388
+ y(c, l) || this.scrollToIndex(t, { align: o, behavior: e });
389
+ } else
390
+ this.scrollToIndex(t, { align: o, behavior: e });
391
+ }));
392
+ }, this.scrollBy = (t, { behavior: s } = {}) => {
393
+ this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
394
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
395
+ ), this._scrollToOffset(this.getScrollOffset() + t, {
396
+ adjustments: void 0,
397
+ behavior: s
398
+ });
399
+ }, this.getTotalSize = () => {
400
+ var t;
401
+ const s = this.getMeasurements();
402
+ let e;
403
+ if (s.length === 0)
404
+ e = this.options.paddingStart;
405
+ else if (this.options.lanes === 1)
406
+ e = ((t = s[s.length - 1]) == null ? void 0 : t.end) ?? 0;
407
+ else {
408
+ const i = Array(this.options.lanes).fill(null);
409
+ let n = s.length - 1;
410
+ for (; n >= 0 && i.some((o) => o === null); ) {
411
+ const o = s[n];
412
+ i[o.lane] === null && (i[o.lane] = o.end), n--;
413
+ }
414
+ e = Math.max(...i.filter((o) => o !== null));
415
+ }
416
+ return Math.max(
417
+ e - this.options.scrollMargin + this.options.paddingEnd,
418
+ 0
419
+ );
420
+ }, this._scrollToOffset = (t, {
421
+ adjustments: s,
422
+ behavior: e
423
+ }) => {
424
+ this.options.scrollToFn(t, { behavior: e, adjustments: s }, this);
425
+ }, this.measure = () => {
426
+ this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(!1);
427
+ }, this.setOptions(h);
428
+ }
429
+ }
430
+ const S = (r, h, t, s) => {
431
+ for (; r <= h; ) {
432
+ const e = (r + h) / 2 | 0, i = t(e);
433
+ if (i < s)
434
+ r = e + 1;
435
+ else if (i > s)
436
+ h = e - 1;
437
+ else
438
+ return e;
439
+ }
440
+ return r > 0 ? r - 1 : 0;
441
+ };
442
+ function T({
443
+ measurements: r,
444
+ outerSize: h,
445
+ scrollOffset: t,
446
+ lanes: s
447
+ }) {
448
+ const e = r.length - 1, i = (a) => r[a].start;
449
+ if (r.length <= s)
450
+ return {
451
+ startIndex: 0,
452
+ endIndex: e
453
+ };
454
+ let n = S(
455
+ 0,
456
+ e,
457
+ i,
458
+ t
459
+ ), o = n;
460
+ if (s === 1)
461
+ for (; o < e && r[o].end < t + h; )
462
+ o++;
463
+ else if (s > 1) {
464
+ const a = Array(s).fill(0);
465
+ for (; o < e && a.some((l) => l < t + h); ) {
466
+ const l = r[o];
467
+ a[l.lane] = l.end, o++;
468
+ }
469
+ const c = Array(s).fill(t + h);
470
+ for (; n >= 0 && c.some((l) => l >= t); ) {
471
+ const l = r[n];
472
+ c[l.lane] = l.start, n--;
473
+ }
474
+ n = Math.max(0, n - n % s), o = Math.min(e, o + (s - 1 - o % s));
475
+ }
476
+ return { startIndex: n, endIndex: o };
105
477
  }
106
478
  export {
107
- w as clamp,
108
- S as createCoords,
109
- j as evaluate,
110
- y as expandPaddingObject,
111
- O as floor,
112
- g as getAlignment,
113
- d as getAlignmentAxis,
114
- C as getAlignmentSides,
115
- b as getAxisLength,
116
- L as getExpandedPlacements,
117
- s as getOppositeAlignmentPlacement,
118
- h as getOppositeAxis,
119
- E as getOppositeAxisPlacements,
120
- f as getOppositePlacement,
121
- R as getPaddingObject,
122
- u as getSide,
123
- x as getSideAxis,
124
- m as max,
125
- l as min,
126
- T as rectToClientRect,
127
- M as round,
128
- P as sides
479
+ N as Virtualizer,
480
+ y as approxEqual,
481
+ M as debounce,
482
+ z as defaultKeyExtractor,
483
+ w as defaultRangeExtractor,
484
+ D as elementScroll,
485
+ C as measureElement,
486
+ d as memo,
487
+ m as notUndefined,
488
+ A as observeElementOffset,
489
+ _ as observeElementRect
129
490
  };
package/dist/index37.js CHANGED
@@ -1,34 +1,34 @@
1
1
  import { defineComponent as Xe, ref as v, computed as h, toRef as L, createBlock as U, openBlock as y, normalizeClass as ee, withCtx as s, createElementVNode as T, createVNode as E, createElementBlock as O, unref as g, renderSlot as p, createCommentVNode as te, withDirectives as Ye, Fragment as ae, toDisplayString as Ze, withKeys as w, withModifiers as m, normalizeStyle as le, vModelDynamic as et, mergeProps as oe, renderList as tt, nextTick as j } from "vue";
2
2
  import at from "./index111.js";
3
3
  /* empty css */
4
- import { hash as lt } from "./index222.js";
5
- import { isEmpty as ot } from "./index260.js";
6
- import { last as nt } from "./index223.js";
7
- import { matchAnyKey as ne } from "./index265.js";
8
- import { useArray as ut } from "./index266.js";
9
- import { useBaseOptions as st } from "./index235.js";
10
- import { useCoherence as it } from "./index236.js";
11
- import { useHashedWatcher as ue } from "./index237.js";
4
+ import { hash as lt } from "./index256.js";
5
+ import { isEmpty as ot } from "./index232.js";
6
+ import { last as nt } from "./index233.js";
7
+ import { matchAnyKey as ne } from "./index273.js";
8
+ import { useArray as ut } from "./index274.js";
9
+ import { useBaseOptions as st } from "./index242.js";
10
+ import { useCoherence as it } from "./index268.js";
11
+ import { useHashedWatcher as ue } from "./index269.js";
12
12
  import { useId as rt } from "./index8.js";
13
- import { useIndexById as se } from "./index234.js";
13
+ import { useIndexById as se } from "./index243.js";
14
14
  import { useMounted as dt, useElementSize as ct, useIntersectionObserver as pt } from "./index140.js";
15
- import { useItemsGetter as mt } from "./index233.js";
16
- import { useLocale as ft } from "./index230.js";
15
+ import { useItemsGetter as mt } from "./index267.js";
16
+ import { useLocale as ft } from "./index217.js";
17
17
  import { useMobile as vt } from "./index9.js";
18
- import { usePrefill as ht } from "./index238.js";
18
+ import { usePrefill as ht } from "./index270.js";
19
19
  import { wait as F } from "./index138.js";
20
- import { when as yt } from "./index247.js";
21
- import bt from "./index256.js";
20
+ import { when as yt } from "./index236.js";
21
+ import bt from "./index244.js";
22
22
  /* empty css */
23
- import gt from "./index258.js";
23
+ import gt from "./index246.js";
24
24
  /* empty css */
25
25
  import wt from "./index135.js";
26
26
  /* empty css */
27
27
  import Bt from "./index137.js";
28
- import Vt from "./index244.js";
28
+ import Vt from "./index223.js";
29
29
  /* empty css */
30
- import St from "./index267.js";
31
- import { useUntil as kt } from "./index250.js";
30
+ import St from "./index275.js";
31
+ import { useUntil as kt } from "./index249.js";
32
32
  const Ct = { class: "bb-base-select__input-container" }, It = {
33
33
  key: 1,
34
34
  class: "bb-base-select__max-reached"
package/dist/index39.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as re, ref as d, computed as p, onMounted as te, watch as le, createElementBlock as y, openBlock as g, mergeProps as N, renderSlot as v, createElementVNode as m, createCommentVNode as H, Fragment as oe, renderList as ne, normalizeProps as se, guardReactiveProps as ie, unref as c, normalizeStyle as G, normalizeClass as O } from "vue";
2
- import { head as ue } from "./index251.js";
3
- import { isCssColor as Y } from "./index246.js";
4
- import { isNil as S } from "./index252.js";
2
+ import { head as ue } from "./index238.js";
3
+ import { isCssColor as Y } from "./index235.js";
4
+ import { isNil as S } from "./index239.js";
5
5
  import { getAsPercentageBetween as x, getAsPercentage as de, getValueFromPercentageInInterval as T } from "./index139.js";
6
- import { snapToStep as me } from "./index253.js";
7
- import { last as ce } from "./index223.js";
8
- import { transpose as j } from "./index254.js";
6
+ import { snapToStep as me } from "./index240.js";
7
+ import { last as ce } from "./index233.js";
8
+ import { transpose as j } from "./index241.js";
9
9
  import { clamp as f } from "./index214.js";
10
10
  const be = { class: "bb-base-slider__slider-container" }, ve = {
11
11
  key: 0,