@anoki/fse-ui 1.0.466 → 1.0.467

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 (139) hide show
  1. package/dist/index.cjs218.js +1 -1
  2. package/dist/index.cjs284.js +1 -1
  3. package/dist/index.cjs29.js +1 -1
  4. package/dist/index.cjs29.js.map +1 -1
  5. package/dist/index.cjs300.js +1 -1
  6. package/dist/index.cjs310.js +1 -1
  7. package/dist/index.cjs311.js +1 -1
  8. package/dist/index.cjs316.js +1 -1
  9. package/dist/index.cjs317.js +1 -1
  10. package/dist/index.cjs329.js +1 -1
  11. package/dist/index.cjs329.js.map +1 -1
  12. package/dist/index.cjs330.js +1 -1
  13. package/dist/index.cjs330.js.map +1 -1
  14. package/dist/index.cjs331.js +1 -1
  15. package/dist/index.cjs331.js.map +1 -1
  16. package/dist/index.cjs332.js +1 -1
  17. package/dist/index.cjs332.js.map +1 -1
  18. package/dist/index.cjs333.js +2 -0
  19. package/dist/index.cjs333.js.map +1 -0
  20. package/dist/index.cjs334.js +2 -0
  21. package/dist/index.cjs334.js.map +1 -0
  22. package/dist/index.cjs335.js +2 -0
  23. package/dist/index.cjs335.js.map +1 -0
  24. package/dist/index.cjs350.js +27 -1
  25. package/dist/index.cjs350.js.map +1 -1
  26. package/dist/index.cjs351.js +1 -1
  27. package/dist/index.cjs352.js +1 -27
  28. package/dist/index.cjs352.js.map +1 -1
  29. package/dist/index.cjs353.js +1 -1
  30. package/dist/index.cjs354.js +1 -1
  31. package/dist/index.cjs356.js +1 -1
  32. package/dist/index.cjs364.js +1 -1
  33. package/dist/index.cjs368.js +1 -1
  34. package/dist/index.cjs375.js +1 -1
  35. package/dist/index.cjs377.js +1 -1
  36. package/dist/index.cjs379.js +1 -1
  37. package/dist/index.cjs389.js +1 -1
  38. package/dist/index.cjs389.js.map +1 -1
  39. package/dist/index.cjs390.js +1 -38
  40. package/dist/index.cjs390.js.map +1 -1
  41. package/dist/index.cjs391.js +1 -1
  42. package/dist/index.cjs391.js.map +1 -1
  43. package/dist/index.cjs392.js +1 -1
  44. package/dist/index.cjs392.js.map +1 -1
  45. package/dist/index.cjs393.js +38 -1
  46. package/dist/index.cjs393.js.map +1 -1
  47. package/dist/index.cjs394.js +1 -1
  48. package/dist/index.cjs394.js.map +1 -1
  49. package/dist/index.cjs395.js +1 -1
  50. package/dist/index.cjs395.js.map +1 -1
  51. package/dist/index.cjs396.js +1 -1
  52. package/dist/index.cjs396.js.map +1 -1
  53. package/dist/index.cjs397.js +1 -1
  54. package/dist/index.cjs397.js.map +1 -1
  55. package/dist/index.cjs400.js +1 -1
  56. package/dist/index.cjs400.js.map +1 -1
  57. package/dist/index.cjs401.js +1 -1
  58. package/dist/index.cjs401.js.map +1 -1
  59. package/dist/index.cjs402.js +1 -1
  60. package/dist/index.cjs402.js.map +1 -1
  61. package/dist/index.cjs403.js +1 -1
  62. package/dist/index.cjs403.js.map +1 -1
  63. package/dist/index.es218.js +7 -7
  64. package/dist/index.es284.js +1 -1
  65. package/dist/index.es29.js +17 -25
  66. package/dist/index.es29.js.map +1 -1
  67. package/dist/index.es300.js +1 -1
  68. package/dist/index.es310.js +1 -1
  69. package/dist/index.es311.js +1 -1
  70. package/dist/index.es316.js +1 -1
  71. package/dist/index.es317.js +7 -7
  72. package/dist/index.es329.js +122 -12
  73. package/dist/index.es329.js.map +1 -1
  74. package/dist/index.es330.js +134 -8
  75. package/dist/index.es330.js.map +1 -1
  76. package/dist/index.es331.js +14 -50
  77. package/dist/index.es331.js.map +1 -1
  78. package/dist/index.es332.js +13 -51
  79. package/dist/index.es332.js.map +1 -1
  80. package/dist/index.es333.js +12 -0
  81. package/dist/index.es333.js.map +1 -0
  82. package/dist/index.es334.js +53 -0
  83. package/dist/index.es334.js.map +1 -0
  84. package/dist/index.es335.js +56 -0
  85. package/dist/index.es335.js.map +1 -0
  86. package/dist/index.es350.js +3675 -2
  87. package/dist/index.es350.js.map +1 -1
  88. package/dist/index.es351.js +6 -2
  89. package/dist/index.es351.js.map +1 -1
  90. package/dist/index.es352.js +2 -3675
  91. package/dist/index.es352.js.map +1 -1
  92. package/dist/index.es353.js +2 -6
  93. package/dist/index.es353.js.map +1 -1
  94. package/dist/index.es354.js +2 -2
  95. package/dist/index.es356.js +1 -1
  96. package/dist/index.es364.js +3 -3
  97. package/dist/index.es368.js +1 -1
  98. package/dist/index.es375.js +1 -1
  99. package/dist/index.es377.js +1 -1
  100. package/dist/index.es379.js +4 -4
  101. package/dist/index.es389.js +512 -54
  102. package/dist/index.es389.js.map +1 -1
  103. package/dist/index.es390.js +126 -68
  104. package/dist/index.es390.js.map +1 -1
  105. package/dist/index.es391.js +128 -8
  106. package/dist/index.es391.js.map +1 -1
  107. package/dist/index.es392.js +64 -13
  108. package/dist/index.es392.js.map +1 -1
  109. package/dist/index.es393.js +68 -61
  110. package/dist/index.es393.js.map +1 -1
  111. package/dist/index.es394.js +9 -4
  112. package/dist/index.es394.js.map +1 -1
  113. package/dist/index.es395.js +11 -520
  114. package/dist/index.es395.js.map +1 -1
  115. package/dist/index.es396.js +61 -126
  116. package/dist/index.es396.js.map +1 -1
  117. package/dist/index.es397.js +3 -128
  118. package/dist/index.es397.js.map +1 -1
  119. package/dist/index.es400.js +11 -21
  120. package/dist/index.es400.js.map +1 -1
  121. package/dist/index.es401.js +26 -11
  122. package/dist/index.es401.js.map +1 -1
  123. package/dist/index.es402.js +4 -27
  124. package/dist/index.es402.js.map +1 -1
  125. package/dist/index.es403.js +22 -4
  126. package/dist/index.es403.js.map +1 -1
  127. package/package.json +1 -1
  128. package/dist/index.cjs326.js +0 -2
  129. package/dist/index.cjs326.js.map +0 -1
  130. package/dist/index.cjs327.js +0 -2
  131. package/dist/index.cjs327.js.map +0 -1
  132. package/dist/index.cjs328.js +0 -2
  133. package/dist/index.cjs328.js.map +0 -1
  134. package/dist/index.es326.js +0 -128
  135. package/dist/index.es326.js.map +0 -1
  136. package/dist/index.es327.js +0 -138
  137. package/dist/index.es327.js.map +0 -1
  138. package/dist/index.es328.js +0 -17
  139. package/dist/index.es328.js.map +0 -1
@@ -1,9 +1,5 @@
1
- var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- function l(e) {
3
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
- }
1
+ var r = {};
5
2
  export {
6
- o as commonjsGlobal,
7
- l as getDefaultExportFromCjs
3
+ r as __exports
8
4
  };
9
5
  //# sourceMappingURL=index.es353.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es353.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.es353.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +1,5 @@
1
- var o = { exports: {} };
1
+ var e = {};
2
2
  export {
3
- o as __module
3
+ e as __exports
4
4
  };
5
5
  //# sourceMappingURL=index.es354.js.map
@@ -1,7 +1,7 @@
1
1
  import r from "react";
2
2
  import { createContextScope as y } from "./index.es314.js";
3
3
  import { useComposedRefs as S } from "./index.es313.js";
4
- import { createSlot as M } from "./index.es332.js";
4
+ import { createSlot as M } from "./index.es335.js";
5
5
  import { j as d } from "./index.es177.js";
6
6
  function D(s) {
7
7
  const m = s + "CollectionProvider", [A, E] = y(m), [N, f] = A(
@@ -1,6 +1,6 @@
1
- import { offset as ot, shift as st, flip as rt, size as ct, hide as lt, limitShift as ft, computePosition as ut, arrow as ht } from "./index.es395.js";
2
- import { createCoords as m, round as A, max as E, min as V, rectToClientRect as J, floor as D } from "./index.es396.js";
3
- import { isElement as v, getDocumentElement as O, getOverflowAncestors as $, getComputedStyle as R, isHTMLElement as b, getWindow as L, isTopLayer as S, getParentNode as W, isLastTraversableNode as H, isTableElement as at, isContainingBlock as Q, getContainingBlock as dt, getNodeName as M, isOverflowElement as _, getNodeScroll as N, getFrameElement as K, isWebKit as Y } from "./index.es397.js";
1
+ import { offset as ot, shift as st, flip as rt, size as ct, hide as lt, limitShift as ft, computePosition as ut, arrow as ht } from "./index.es389.js";
2
+ import { createCoords as m, round as A, max as E, min as V, rectToClientRect as J, floor as D } from "./index.es390.js";
3
+ import { isElement as v, getDocumentElement as O, getOverflowAncestors as $, getComputedStyle as R, isHTMLElement as b, getWindow as L, isTopLayer as S, getParentNode as W, isLastTraversableNode as H, isTableElement as at, isContainingBlock as Q, getContainingBlock as dt, getNodeName as M, isOverflowElement as _, getNodeScroll as N, getFrameElement as K, isWebKit as Y } from "./index.es391.js";
4
4
  function Z(t) {
5
5
  const e = R(t);
6
6
  let i = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
@@ -1,4 +1,4 @@
1
- import { getDefaultExportFromCjs as r } from "./index.es353.js";
1
+ import { getDefaultExportFromCjs as r } from "./index.es351.js";
2
2
  import { __require as s } from "./index.es381.js";
3
3
  var e = s();
4
4
  const t = /* @__PURE__ */ r(e);
@@ -6,7 +6,7 @@ import { useComposedRefs as T } from "./index.es313.js";
6
6
  import { useCallbackRef as x } from "./index.es355.js";
7
7
  import { useDirection as ce } from "./index.es357.js";
8
8
  import { useLayoutEffect as se } from "./index.es360.js";
9
- import { clamp as ie } from "./index.es394.js";
9
+ import { clamp as ie } from "./index.es397.js";
10
10
  import { composeEventHandlers as C } from "./index.es312.js";
11
11
  import { j as b } from "./index.es177.js";
12
12
  function ae(e, t) {
@@ -1,4 +1,4 @@
1
- import { createSidecarMedium as e } from "./index.es389.js";
1
+ import { createSidecarMedium as e } from "./index.es392.js";
2
2
  var a = e();
3
3
  export {
4
4
  a as effectCar
@@ -1,9 +1,9 @@
1
1
  import { __spreadArray as x } from "./index.es365.js";
2
2
  import * as n from "react";
3
- import { RemoveScrollBar as A } from "./index.es390.js";
4
- import { styleSingleton as I } from "./index.es391.js";
5
- import { nonPassive as s } from "./index.es392.js";
6
- import { locationCouldBeScrolled as T, handleScroll as W } from "./index.es393.js";
3
+ import { RemoveScrollBar as A } from "./index.es393.js";
4
+ import { styleSingleton as I } from "./index.es394.js";
5
+ import { nonPassive as s } from "./index.es395.js";
6
+ import { locationCouldBeScrolled as T, handleScroll as W } from "./index.es396.js";
7
7
  var b = function(t) {
8
8
  return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
9
9
  }, Y = function(t) {
@@ -1,68 +1,526 @@
1
- import { __assign as d } from "./index.es365.js";
2
- function l(r) {
3
- return r;
4
- }
5
- function h(r, t) {
6
- t === void 0 && (t = l);
7
- var e = [], o = !1, c = {
8
- read: function() {
9
- if (o)
10
- throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
11
- return e.length ? e[e.length - 1] : r;
12
- },
13
- useMedium: function(u) {
14
- var n = t(u, o);
15
- return e.push(n), function() {
16
- e = e.filter(function(i) {
17
- return i !== n;
18
- });
1
+ import { evaluate as E, getSideAxis as V, getSide as B, clamp as X, getOppositePlacement as Z, getExpandedPlacements as ee, getOppositeAxisPlacements as te, getAlignmentSides as ne, getAlignment as z, min as $, max as W, getPaddingObject as J, rectToClientRect as _, getOppositeAxis as K, getAlignmentAxis as N, sides as ie, getAxisLength as Q } from "./index.es390.js";
2
+ function I(t, e, d) {
3
+ let {
4
+ reference: a,
5
+ floating: r
6
+ } = t;
7
+ const n = V(e), o = N(e), m = Q(o), g = B(e), h = n === "y", c = a.x + a.width / 2 - r.width / 2, s = a.y + a.height / 2 - r.height / 2, f = a[m] / 2 - r[m] / 2;
8
+ let i;
9
+ switch (g) {
10
+ case "top":
11
+ i = {
12
+ x: c,
13
+ y: a.y - r.height
14
+ };
15
+ break;
16
+ case "bottom":
17
+ i = {
18
+ x: c,
19
+ y: a.y + a.height
20
+ };
21
+ break;
22
+ case "right":
23
+ i = {
24
+ x: a.x + a.width,
25
+ y: s
19
26
  };
20
- },
21
- assignSyncMedium: function(u) {
22
- for (o = !0; e.length; ) {
23
- var n = e;
24
- e = [], n.forEach(u);
27
+ break;
28
+ case "left":
29
+ i = {
30
+ x: a.x - r.width,
31
+ y: s
32
+ };
33
+ break;
34
+ default:
35
+ i = {
36
+ x: a.x,
37
+ y: a.y
38
+ };
39
+ }
40
+ switch (z(e)) {
41
+ case "start":
42
+ i[o] -= f * (d && h ? -1 : 1);
43
+ break;
44
+ case "end":
45
+ i[o] += f * (d && h ? -1 : 1);
46
+ break;
47
+ }
48
+ return i;
49
+ }
50
+ const ae = async (t, e, d) => {
51
+ const {
52
+ placement: a = "bottom",
53
+ strategy: r = "absolute",
54
+ middleware: n = [],
55
+ platform: o
56
+ } = d, m = n.filter(Boolean), g = await (o.isRTL == null ? void 0 : o.isRTL(e));
57
+ let h = await o.getElementRects({
58
+ reference: t,
59
+ floating: e,
60
+ strategy: r
61
+ }), {
62
+ x: c,
63
+ y: s
64
+ } = I(h, a, g), f = a, i = {}, l = 0;
65
+ for (let u = 0; u < m.length; u++) {
66
+ const {
67
+ name: x,
68
+ fn: y
69
+ } = m[u], {
70
+ x: A,
71
+ y: p,
72
+ data: v,
73
+ reset: w
74
+ } = await y({
75
+ x: c,
76
+ y: s,
77
+ initialPlacement: a,
78
+ placement: f,
79
+ strategy: r,
80
+ middlewareData: i,
81
+ rects: h,
82
+ platform: o,
83
+ elements: {
84
+ reference: t,
85
+ floating: e
86
+ }
87
+ });
88
+ c = A ?? c, s = p ?? s, i = {
89
+ ...i,
90
+ [x]: {
91
+ ...i[x],
92
+ ...v
93
+ }
94
+ }, w && l <= 50 && (l++, typeof w == "object" && (w.placement && (f = w.placement), w.rects && (h = w.rects === !0 ? await o.getElementRects({
95
+ reference: t,
96
+ floating: e,
97
+ strategy: r
98
+ }) : w.rects), {
99
+ x: c,
100
+ y: s
101
+ } = I(h, f, g)), u = -1);
102
+ }
103
+ return {
104
+ x: c,
105
+ y: s,
106
+ placement: f,
107
+ strategy: r,
108
+ middlewareData: i
109
+ };
110
+ };
111
+ async function Y(t, e) {
112
+ var d;
113
+ e === void 0 && (e = {});
114
+ const {
115
+ x: a,
116
+ y: r,
117
+ platform: n,
118
+ rects: o,
119
+ elements: m,
120
+ strategy: g
121
+ } = t, {
122
+ boundary: h = "clippingAncestors",
123
+ rootBoundary: c = "viewport",
124
+ elementContext: s = "floating",
125
+ altBoundary: f = !1,
126
+ padding: i = 0
127
+ } = E(e, t), l = J(i), x = m[f ? s === "floating" ? "reference" : "floating" : s], y = _(await n.getClippingRect({
128
+ element: (d = await (n.isElement == null ? void 0 : n.isElement(x))) == null || d ? x : x.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(m.floating)),
129
+ boundary: h,
130
+ rootBoundary: c,
131
+ strategy: g
132
+ })), A = s === "floating" ? {
133
+ x: a,
134
+ y: r,
135
+ width: o.floating.width,
136
+ height: o.floating.height
137
+ } : o.reference, p = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(m.floating)), v = await (n.isElement == null ? void 0 : n.isElement(p)) ? await (n.getScale == null ? void 0 : n.getScale(p)) || {
138
+ x: 1,
139
+ y: 1
140
+ } : {
141
+ x: 1,
142
+ y: 1
143
+ }, w = _(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
144
+ elements: m,
145
+ rect: A,
146
+ offsetParent: p,
147
+ strategy: g
148
+ }) : A);
149
+ return {
150
+ top: (y.top - w.top + l.top) / v.y,
151
+ bottom: (w.bottom - y.bottom + l.bottom) / v.y,
152
+ left: (y.left - w.left + l.left) / v.x,
153
+ right: (w.right - y.right + l.right) / v.x
154
+ };
155
+ }
156
+ const ce = (t) => ({
157
+ name: "arrow",
158
+ options: t,
159
+ async fn(e) {
160
+ const {
161
+ x: d,
162
+ y: a,
163
+ placement: r,
164
+ rects: n,
165
+ platform: o,
166
+ elements: m,
167
+ middlewareData: g
168
+ } = e, {
169
+ element: h,
170
+ padding: c = 0
171
+ } = E(t, e) || {};
172
+ if (h == null)
173
+ return {};
174
+ const s = J(c), f = {
175
+ x: d,
176
+ y: a
177
+ }, i = N(r), l = Q(i), u = await o.getDimensions(h), x = i === "y", y = x ? "top" : "left", A = x ? "bottom" : "right", p = x ? "clientHeight" : "clientWidth", v = n.reference[l] + n.reference[i] - f[i] - n.floating[l], w = f[i] - n.reference[i], O = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
178
+ let P = O ? O[p] : 0;
179
+ (!P || !await (o.isElement == null ? void 0 : o.isElement(O))) && (P = m.floating[p] || n.floating[l]);
180
+ const D = v / 2 - w / 2, R = P / 2 - u[l] / 2 - 1, C = $(s[y], R), T = $(s[A], R), S = C, L = P - u[l] - T, b = P / 2 - u[l] / 2 + D, j = X(S, b, L), M = !g.arrow && z(r) != null && b !== j && n.reference[l] / 2 - (b < S ? C : T) - u[l] / 2 < 0, k = M ? b < S ? b - S : b - L : 0;
181
+ return {
182
+ [i]: f[i] + k,
183
+ data: {
184
+ [i]: j,
185
+ centerOffset: b - j - k,
186
+ ...M && {
187
+ alignmentOffset: k
188
+ }
189
+ },
190
+ reset: M
191
+ };
192
+ }
193
+ }), le = function(t) {
194
+ return t === void 0 && (t = {}), {
195
+ name: "flip",
196
+ options: t,
197
+ async fn(e) {
198
+ var d, a;
199
+ const {
200
+ placement: r,
201
+ middlewareData: n,
202
+ rects: o,
203
+ initialPlacement: m,
204
+ platform: g,
205
+ elements: h
206
+ } = e, {
207
+ mainAxis: c = !0,
208
+ crossAxis: s = !0,
209
+ fallbackPlacements: f,
210
+ fallbackStrategy: i = "bestFit",
211
+ fallbackAxisSideDirection: l = "none",
212
+ flipAlignment: u = !0,
213
+ ...x
214
+ } = E(t, e);
215
+ if ((d = n.arrow) != null && d.alignmentOffset)
216
+ return {};
217
+ const y = B(r), A = V(m), p = B(m) === m, v = await (g.isRTL == null ? void 0 : g.isRTL(h.floating)), w = f || (p || !u ? [Z(m)] : ee(m)), O = l !== "none";
218
+ !f && O && w.push(...te(m, u, l, v));
219
+ const P = [m, ...w], D = await Y(e, x), R = [];
220
+ let C = ((a = n.flip) == null ? void 0 : a.overflows) || [];
221
+ if (c && R.push(D[y]), s) {
222
+ const b = ne(r, o, v);
223
+ R.push(D[b[0]], D[b[1]]);
224
+ }
225
+ if (C = [...C, {
226
+ placement: r,
227
+ overflows: R
228
+ }], !R.every((b) => b <= 0)) {
229
+ var T, S;
230
+ const b = (((T = n.flip) == null ? void 0 : T.index) || 0) + 1, j = P[b];
231
+ if (j)
232
+ return {
233
+ data: {
234
+ index: b,
235
+ overflows: C
236
+ },
237
+ reset: {
238
+ placement: j
239
+ }
240
+ };
241
+ let M = (S = C.filter((k) => k.overflows[0] <= 0).sort((k, H) => k.overflows[1] - H.overflows[1])[0]) == null ? void 0 : S.placement;
242
+ if (!M)
243
+ switch (i) {
244
+ case "bestFit": {
245
+ var L;
246
+ const k = (L = C.filter((H) => {
247
+ if (O) {
248
+ const F = V(H.placement);
249
+ return F === A || // Create a bias to the `y` side axis due to horizontal
250
+ // reading directions favoring greater width.
251
+ F === "y";
252
+ }
253
+ return !0;
254
+ }).map((H) => [H.placement, H.overflows.filter((F) => F > 0).reduce((F, U) => F + U, 0)]).sort((H, F) => H[1] - F[1])[0]) == null ? void 0 : L[0];
255
+ k && (M = k);
256
+ break;
257
+ }
258
+ case "initialPlacement":
259
+ M = m;
260
+ break;
261
+ }
262
+ if (r !== M)
263
+ return {
264
+ reset: {
265
+ placement: M
266
+ }
267
+ };
268
+ }
269
+ return {};
270
+ }
271
+ };
272
+ };
273
+ function q(t, e) {
274
+ return {
275
+ top: t.top - e.height,
276
+ right: t.right - e.width,
277
+ bottom: t.bottom - e.height,
278
+ left: t.left - e.width
279
+ };
280
+ }
281
+ function G(t) {
282
+ return ie.some((e) => t[e] >= 0);
283
+ }
284
+ const re = function(t) {
285
+ return t === void 0 && (t = {}), {
286
+ name: "hide",
287
+ options: t,
288
+ async fn(e) {
289
+ const {
290
+ rects: d
291
+ } = e, {
292
+ strategy: a = "referenceHidden",
293
+ ...r
294
+ } = E(t, e);
295
+ switch (a) {
296
+ case "referenceHidden": {
297
+ const n = await Y(e, {
298
+ ...r,
299
+ elementContext: "reference"
300
+ }), o = q(n, d.reference);
301
+ return {
302
+ data: {
303
+ referenceHiddenOffsets: o,
304
+ referenceHidden: G(o)
305
+ }
306
+ };
307
+ }
308
+ case "escaped": {
309
+ const n = await Y(e, {
310
+ ...r,
311
+ altBoundary: !0
312
+ }), o = q(n, d.floating);
313
+ return {
314
+ data: {
315
+ escapedOffsets: o,
316
+ escaped: G(o)
317
+ }
318
+ };
319
+ }
320
+ default:
321
+ return {};
25
322
  }
26
- e = {
27
- push: function(i) {
28
- return u(i);
323
+ }
324
+ };
325
+ };
326
+ async function se(t, e) {
327
+ const {
328
+ placement: d,
329
+ platform: a,
330
+ elements: r
331
+ } = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = B(d), m = z(d), g = V(d) === "y", h = ["left", "top"].includes(o) ? -1 : 1, c = n && g ? -1 : 1, s = E(e, t);
332
+ let {
333
+ mainAxis: f,
334
+ crossAxis: i,
335
+ alignmentAxis: l
336
+ } = typeof s == "number" ? {
337
+ mainAxis: s,
338
+ crossAxis: 0,
339
+ alignmentAxis: null
340
+ } : {
341
+ mainAxis: s.mainAxis || 0,
342
+ crossAxis: s.crossAxis || 0,
343
+ alignmentAxis: s.alignmentAxis
344
+ };
345
+ return m && typeof l == "number" && (i = m === "end" ? l * -1 : l), g ? {
346
+ x: i * c,
347
+ y: f * h
348
+ } : {
349
+ x: f * h,
350
+ y: i * c
351
+ };
352
+ }
353
+ const fe = function(t) {
354
+ return t === void 0 && (t = 0), {
355
+ name: "offset",
356
+ options: t,
357
+ async fn(e) {
358
+ var d, a;
359
+ const {
360
+ x: r,
361
+ y: n,
362
+ placement: o,
363
+ middlewareData: m
364
+ } = e, g = await se(e, t);
365
+ return o === ((d = m.offset) == null ? void 0 : d.placement) && (a = m.arrow) != null && a.alignmentOffset ? {} : {
366
+ x: r + g.x,
367
+ y: n + g.y,
368
+ data: {
369
+ ...g,
370
+ placement: o
371
+ }
372
+ };
373
+ }
374
+ };
375
+ }, me = function(t) {
376
+ return t === void 0 && (t = {}), {
377
+ name: "shift",
378
+ options: t,
379
+ async fn(e) {
380
+ const {
381
+ x: d,
382
+ y: a,
383
+ placement: r
384
+ } = e, {
385
+ mainAxis: n = !0,
386
+ crossAxis: o = !1,
387
+ limiter: m = {
388
+ fn: (x) => {
389
+ let {
390
+ x: y,
391
+ y: A
392
+ } = x;
393
+ return {
394
+ x: y,
395
+ y: A
396
+ };
397
+ }
29
398
  },
30
- filter: function() {
31
- return e;
399
+ ...g
400
+ } = E(t, e), h = {
401
+ x: d,
402
+ y: a
403
+ }, c = await Y(e, g), s = V(B(r)), f = K(s);
404
+ let i = h[f], l = h[s];
405
+ if (n) {
406
+ const x = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", A = i + c[x], p = i - c[y];
407
+ i = X(A, i, p);
408
+ }
409
+ if (o) {
410
+ const x = s === "y" ? "top" : "left", y = s === "y" ? "bottom" : "right", A = l + c[x], p = l - c[y];
411
+ l = X(A, l, p);
412
+ }
413
+ const u = m.fn({
414
+ ...e,
415
+ [f]: i,
416
+ [s]: l
417
+ });
418
+ return {
419
+ ...u,
420
+ data: {
421
+ x: u.x - d,
422
+ y: u.y - a,
423
+ enabled: {
424
+ [f]: n,
425
+ [s]: o
426
+ }
32
427
  }
33
428
  };
34
- },
35
- assignMedium: function(u) {
36
- o = !0;
37
- var n = [];
38
- if (e.length) {
39
- var i = e;
40
- e = [], i.forEach(u), n = e;
429
+ }
430
+ };
431
+ }, de = function(t) {
432
+ return t === void 0 && (t = {}), {
433
+ options: t,
434
+ fn(e) {
435
+ const {
436
+ x: d,
437
+ y: a,
438
+ placement: r,
439
+ rects: n,
440
+ middlewareData: o
441
+ } = e, {
442
+ offset: m = 0,
443
+ mainAxis: g = !0,
444
+ crossAxis: h = !0
445
+ } = E(t, e), c = {
446
+ x: d,
447
+ y: a
448
+ }, s = V(r), f = K(s);
449
+ let i = c[f], l = c[s];
450
+ const u = E(m, e), x = typeof u == "number" ? {
451
+ mainAxis: u,
452
+ crossAxis: 0
453
+ } : {
454
+ mainAxis: 0,
455
+ crossAxis: 0,
456
+ ...u
457
+ };
458
+ if (g) {
459
+ const p = f === "y" ? "height" : "width", v = n.reference[f] - n.floating[p] + x.mainAxis, w = n.reference[f] + n.reference[p] - x.mainAxis;
460
+ i < v ? i = v : i > w && (i = w);
41
461
  }
42
- var s = function() {
43
- var f = n;
44
- n = [], f.forEach(u);
45
- }, a = function() {
46
- return Promise.resolve().then(s);
462
+ if (h) {
463
+ var y, A;
464
+ const p = f === "y" ? "width" : "height", v = ["top", "left"].includes(B(r)), w = n.reference[s] - n.floating[p] + (v && ((y = o.offset) == null ? void 0 : y[s]) || 0) + (v ? 0 : x.crossAxis), O = n.reference[s] + n.reference[p] + (v ? 0 : ((A = o.offset) == null ? void 0 : A[s]) || 0) - (v ? x.crossAxis : 0);
465
+ l < w ? l = w : l > O && (l = O);
466
+ }
467
+ return {
468
+ [f]: i,
469
+ [s]: l
47
470
  };
48
- a(), e = {
49
- push: function(f) {
50
- n.push(f), a();
471
+ }
472
+ };
473
+ }, xe = function(t) {
474
+ return t === void 0 && (t = {}), {
475
+ name: "size",
476
+ options: t,
477
+ async fn(e) {
478
+ var d, a;
479
+ const {
480
+ placement: r,
481
+ rects: n,
482
+ platform: o,
483
+ elements: m
484
+ } = e, {
485
+ apply: g = () => {
51
486
  },
52
- filter: function(f) {
53
- return n = n.filter(f), e;
487
+ ...h
488
+ } = E(t, e), c = await Y(e, h), s = B(r), f = z(r), i = V(r) === "y", {
489
+ width: l,
490
+ height: u
491
+ } = n.floating;
492
+ let x, y;
493
+ s === "top" || s === "bottom" ? (x = s, y = f === (await (o.isRTL == null ? void 0 : o.isRTL(m.floating)) ? "start" : "end") ? "left" : "right") : (y = s, x = f === "end" ? "top" : "bottom");
494
+ const A = u - c.top - c.bottom, p = l - c.left - c.right, v = $(u - c[x], A), w = $(l - c[y], p), O = !e.middlewareData.shift;
495
+ let P = v, D = w;
496
+ if ((d = e.middlewareData.shift) != null && d.enabled.x && (D = p), (a = e.middlewareData.shift) != null && a.enabled.y && (P = A), O && !f) {
497
+ const C = W(c.left, 0), T = W(c.right, 0), S = W(c.top, 0), L = W(c.bottom, 0);
498
+ i ? D = l - 2 * (C !== 0 || T !== 0 ? C + T : W(c.left, c.right)) : P = u - 2 * (S !== 0 || L !== 0 ? S + L : W(c.top, c.bottom));
499
+ }
500
+ await g({
501
+ ...e,
502
+ availableWidth: D,
503
+ availableHeight: P
504
+ });
505
+ const R = await o.getDimensions(m.floating);
506
+ return l !== R.width || u !== R.height ? {
507
+ reset: {
508
+ rects: !0
54
509
  }
55
- };
510
+ } : {};
56
511
  }
57
512
  };
58
- return c;
59
- }
60
- function v(r) {
61
- r === void 0 && (r = {});
62
- var t = h(null);
63
- return t.options = d({ async: !0, ssr: !1 }, r), t;
64
- }
513
+ };
65
514
  export {
66
- v as createSidecarMedium
515
+ ce as arrow,
516
+ ae as computePosition,
517
+ Y as detectOverflow,
518
+ le as flip,
519
+ re as hide,
520
+ de as limitShift,
521
+ fe as offset,
522
+ _ as rectToClientRect,
523
+ me as shift,
524
+ xe as size
67
525
  };
68
526
  //# sourceMappingURL=index.es389.js.map