@anoki/fse-ui 1.10.1-RC2.7 → 1.10.1-RC2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/VideoPlayer/VideoPlayer.css +1 -1
- package/dist/index.cjs298.js +1 -1
- package/dist/index.cjs32.js +1 -1
- package/dist/index.cjs33.js +1 -1
- package/dist/index.cjs371.js +1 -1
- package/dist/index.cjs377.js +1 -1
- package/dist/index.cjs405.js +1 -1
- package/dist/index.cjs414.js +1 -1
- package/dist/index.cjs443.js +1 -1
- package/dist/index.cjs466.js +1 -1
- package/dist/index.cjs467.js +1 -1
- package/dist/index.cjs478.js +1 -1
- package/dist/index.cjs478.js.map +1 -1
- package/dist/index.cjs479.js +1 -1
- package/dist/index.cjs479.js.map +1 -1
- package/dist/index.cjs480.js +1 -1
- package/dist/index.cjs480.js.map +1 -1
- package/dist/index.cjs481.js +1 -1
- package/dist/index.cjs481.js.map +1 -1
- package/dist/index.cjs482.js +2 -0
- package/dist/index.cjs482.js.map +1 -0
- package/dist/index.cjs483.js +2 -0
- package/dist/index.cjs483.js.map +1 -0
- package/dist/index.cjs484.js +2 -0
- package/dist/index.cjs484.js.map +1 -0
- package/dist/index.cjs501.js +2 -0
- package/dist/index.cjs501.js.map +1 -0
- package/dist/index.cjs502.js +1 -1
- package/dist/index.cjs502.js.map +1 -1
- package/dist/index.cjs503.js +1 -1
- package/dist/index.cjs509.js +1 -1
- package/dist/index.cjs509.js.map +1 -1
- package/dist/index.cjs510.js +1 -1
- package/dist/index.cjs510.js.map +1 -1
- package/dist/index.cjs511.js +1 -1
- package/dist/index.cjs511.js.map +1 -1
- package/dist/index.cjs512.js +1 -1
- package/dist/index.cjs512.js.map +1 -1
- package/dist/index.cjs513.js +1 -1
- package/dist/index.cjs513.js.map +1 -1
- package/dist/index.cjs514.js +1 -1
- package/dist/index.cjs514.js.map +1 -1
- package/dist/index.cjs515.js +1 -1
- package/dist/index.cjs515.js.map +1 -1
- package/dist/index.cjs521.js +1 -1
- package/dist/index.cjs528.js +1 -1
- package/dist/index.cjs582.js +1 -1
- package/dist/index.cjs618.js +1 -1
- package/dist/index.cjs619.js +1 -1
- package/dist/index.cjs624.js +1 -1
- package/dist/index.cjs628.js +1 -1
- package/dist/index.cjs629.js +1 -1
- package/dist/index.cjs641.js +1 -1
- package/dist/index.cjs645.js +1 -1
- package/dist/index.cjs647.js +1 -1
- package/dist/index.cjs665.js +38 -1
- package/dist/index.cjs665.js.map +1 -1
- package/dist/index.cjs666.js +1 -38
- package/dist/index.cjs666.js.map +1 -1
- package/dist/index.cjs667.js +1 -1
- package/dist/index.cjs667.js.map +1 -1
- package/dist/index.cjs668.js +1 -1
- package/dist/index.cjs668.js.map +1 -1
- package/dist/index.cjs669.js +1 -1
- package/dist/index.cjs669.js.map +1 -1
- package/dist/index.es298.js +7 -7
- package/dist/index.es32.js +1 -1
- package/dist/index.es33.js +1 -1
- package/dist/index.es371.js +1 -1
- package/dist/index.es377.js +1 -1
- package/dist/index.es405.js +3 -3
- package/dist/index.es414.js +1 -1
- package/dist/index.es443.js +1 -1
- package/dist/index.es466.js +1 -1
- package/dist/index.es467.js +7 -7
- package/dist/index.es478.js +122 -12
- package/dist/index.es478.js.map +1 -1
- package/dist/index.es479.js +134 -8
- package/dist/index.es479.js.map +1 -1
- package/dist/index.es480.js +14 -50
- package/dist/index.es480.js.map +1 -1
- package/dist/index.es481.js +13 -54
- package/dist/index.es481.js.map +1 -1
- package/dist/index.es482.js +12 -0
- package/dist/index.es482.js.map +1 -0
- package/dist/index.es483.js +53 -0
- package/dist/index.es483.js.map +1 -0
- package/dist/index.es484.js +59 -0
- package/dist/index.es484.js.map +1 -0
- package/dist/index.es501.js +77 -0
- package/dist/index.es501.js.map +1 -0
- package/dist/index.es502.js +5 -73
- package/dist/index.es502.js.map +1 -1
- package/dist/index.es503.js +2 -6
- package/dist/index.es503.js.map +1 -1
- package/dist/index.es509.js +19 -2030
- package/dist/index.es509.js.map +1 -1
- package/dist/index.es510.js +2 -60
- package/dist/index.es510.js.map +1 -1
- package/dist/index.es511.js +53 -188
- package/dist/index.es511.js.map +1 -1
- package/dist/index.es512.js +201 -19
- package/dist/index.es512.js.map +1 -1
- package/dist/index.es513.js +2032 -2
- package/dist/index.es513.js.map +1 -1
- package/dist/index.es514.js +59 -53
- package/dist/index.es514.js.map +1 -1
- package/dist/index.es515.js +188 -202
- package/dist/index.es515.js.map +1 -1
- package/dist/index.es521.js +1 -1
- package/dist/index.es528.js +1 -1
- package/dist/index.es582.js +1 -1
- package/dist/index.es618.js +1 -1
- package/dist/index.es619.js +1 -1
- package/dist/index.es624.js +1 -1
- package/dist/index.es628.js +1 -1
- package/dist/index.es629.js +7 -7
- package/dist/index.es641.js +2 -2
- package/dist/index.es645.js +1 -1
- package/dist/index.es647.js +4 -4
- package/dist/index.es665.js +69 -65
- package/dist/index.es665.js.map +1 -1
- package/dist/index.es666.js +8 -68
- package/dist/index.es666.js.map +1 -1
- package/dist/index.es667.js +14 -9
- package/dist/index.es667.js.map +1 -1
- package/dist/index.es668.js +62 -14
- package/dist/index.es668.js.map +1 -1
- package/dist/index.es669.js +64 -61
- package/dist/index.es669.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.cjs475.js +0 -2
- package/dist/index.cjs475.js.map +0 -1
- package/dist/index.cjs476.js +0 -2
- package/dist/index.cjs476.js.map +0 -1
- package/dist/index.cjs477.js +0 -2
- package/dist/index.cjs477.js.map +0 -1
- package/dist/index.cjs504.js +0 -2
- package/dist/index.cjs504.js.map +0 -1
- package/dist/index.es475.js +0 -128
- package/dist/index.es475.js.map +0 -1
- package/dist/index.es476.js +0 -138
- package/dist/index.es476.js.map +0 -1
- package/dist/index.es477.js +0 -17
- package/dist/index.es477.js.map +0 -1
- package/dist/index.es504.js +0 -5
- package/dist/index.es504.js.map +0 -1
- /package/dist/components/ui/{CardMapDoctor/CardMapDoctor.css → CardMapDoctorV2/CardMapDoctorV2.css} +0 -0
package/dist/index.es668.js
CHANGED
@@ -1,17 +1,65 @@
|
|
1
|
-
var
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
var p = function(e) {
|
2
|
+
return e.tagName === "TEXTAREA";
|
3
|
+
}, w = function(e, r) {
|
4
|
+
if (!(e instanceof Element))
|
5
|
+
return !1;
|
6
|
+
var o = window.getComputedStyle(e);
|
7
|
+
return (
|
8
|
+
// not-not-scrollable
|
9
|
+
o[r] !== "hidden" && // contains scroll inside self
|
10
|
+
!(o.overflowY === o.overflowX && !p(e) && o[r] === "visible")
|
11
|
+
);
|
12
|
+
}, y = function(e) {
|
13
|
+
return w(e, "overflowY");
|
14
|
+
}, H = function(e) {
|
15
|
+
return w(e, "overflowX");
|
16
|
+
}, R = function(e, r) {
|
17
|
+
var o = r.ownerDocument, t = r;
|
18
|
+
do {
|
19
|
+
typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
|
20
|
+
var v = g(e, t);
|
21
|
+
if (v) {
|
22
|
+
var n = b(e, t), a = n[1], l = n[2];
|
23
|
+
if (a > l)
|
24
|
+
return !0;
|
25
|
+
}
|
26
|
+
t = t.parentNode;
|
27
|
+
} while (t && t !== o.body);
|
28
|
+
return !1;
|
29
|
+
}, B = function(e) {
|
30
|
+
var r = e.scrollTop, o = e.scrollHeight, t = e.clientHeight;
|
31
|
+
return [
|
32
|
+
r,
|
33
|
+
o,
|
34
|
+
t
|
35
|
+
];
|
36
|
+
}, V = function(e) {
|
37
|
+
var r = e.scrollLeft, o = e.scrollWidth, t = e.clientWidth;
|
38
|
+
return [
|
39
|
+
r,
|
40
|
+
o,
|
41
|
+
t
|
42
|
+
];
|
43
|
+
}, g = function(e, r) {
|
44
|
+
return e === "v" ? y(r) : H(r);
|
45
|
+
}, b = function(e, r) {
|
46
|
+
return e === "v" ? B(r) : V(r);
|
47
|
+
}, D = function(e, r) {
|
48
|
+
return e === "h" && r === "rtl" ? -1 : 1;
|
49
|
+
}, W = function(e, r, o, t, v) {
|
50
|
+
var n = D(e, window.getComputedStyle(r).direction), a = n * t, l = o.target, f = r.contains(l), i = !1, s = a > 0, d = 0, h = 0;
|
51
|
+
do {
|
52
|
+
var c = b(e, l), u = c[0], m = c[1], C = c[2], S = m - C - n * u;
|
53
|
+
(u || S) && g(e, l) && (d += S, h += u), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
|
54
|
+
} while (
|
55
|
+
// portaled content
|
56
|
+
!f && l !== document.body || // self content
|
57
|
+
f && (r.contains(l) || r === l)
|
58
|
+
);
|
59
|
+
return (s && Math.abs(d) < 1 || !s && Math.abs(h) < 1) && (i = !0), i;
|
60
|
+
};
|
14
61
|
export {
|
15
|
-
|
62
|
+
W as handleScroll,
|
63
|
+
R as locationCouldBeScrolled
|
16
64
|
};
|
17
65
|
//# sourceMappingURL=index.es668.js.map
|
package/dist/index.es668.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es668.js","sources":["../node_modules/react-remove-scroll/dist/es2015/
|
1
|
+
{"version":3,"file":"index.es668.js","sources":["../node_modules/react-remove-scroll/dist/es2015/handleScroll.js"],"sourcesContent":["var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n if (!(node instanceof Element)) {\n return false;\n }\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];\n if (scrollHeight > clientHeight) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n if (target instanceof ShadowRoot) {\n target = target.host;\n }\n else {\n target = target.parentNode;\n }\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n"],"names":["alwaysContainsScroll","node","elementCanBeScrolled","overflow","styles","elementCouldBeVScrolled","elementCouldBeHScrolled","locationCouldBeScrolled","axis","ownerDocument","current","isScrollable","elementCouldBeScrolled","_a","getScrollVariables","scrollHeight","clientHeight","getVScrollVariables","scrollTop","getHScrollVariables","scrollLeft","scrollWidth","clientWidth","getDirectionFactor","direction","handleScroll","endTarget","event","sourceDelta","noOverscroll","directionFactor","delta","target","targetInLock","shouldCancelScroll","isDeltaPositive","availableScroll","availableScrollTop","position","scroll_1","capacity","elementScroll"],"mappings":"AAAA,IAAIA,IAAuB,SAAUC,GAAM;AAEvC,SAAOA,EAAK,YAAY;AAC5B,GACIC,IAAuB,SAAUD,GAAME,GAAU;AACjD,MAAI,EAAEF,aAAgB;AAClB,WAAO;AAEX,MAAIG,IAAS,OAAO,iBAAiBH,CAAI;AACzC;AAAA;AAAA,IAEAG,EAAOD,CAAQ,MAAM;AAAA,IAEjB,EAAEC,EAAO,cAAcA,EAAO,aAAa,CAACJ,EAAqBC,CAAI,KAAKG,EAAOD,CAAQ,MAAM;AAAA;AACvG,GACIE,IAA0B,SAAUJ,GAAM;AAAE,SAAOC,EAAqBD,GAAM,WAAW;AAAI,GAC7FK,IAA0B,SAAUL,GAAM;AAAE,SAAOC,EAAqBD,GAAM,WA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ASL,EAAM,QACfM,IAAeP,EAAU,SAASM,CAAM,GACxCE,IAAqB,IACrBC,IAAkBJ,IAAQ,GAC1BK,IAAkB,GAClBC,IAAqB;AACzB,KAAG;AACC,QAAIxB,IAAKC,EAAmBN,GAAMwB,CAAM,GAAGM,IAAWzB,EAAG,CAAC,GAAG0B,IAAW1B,EAAG,CAAC,GAAG2B,IAAW3B,EAAG,CAAC,GAC1F4B,IAAgBF,IAAWC,IAAWV,IAAkBQ;AAC5D,KAAIA,KAAYG,MACR7B,EAAuBJ,GAAMwB,CAAM,MACnCI,KAAmBK,GACnBJ,KAAsBC,IAG1BN,aAAkB,aAClBA,IAASA,EAAO,OAGhBA,IAASA,EAAO;AAAA,EAEvB;AAAA;AAAA,IAEA,CAACC,KAAgBD,MAAW,SAAS;AAAA,IAEjCC,MAAiBP,EAAU,SAASM,CAAM,KAAKN,MAAcM;AAAA;AAElE,UAAIG,KACkB,KAAK,IAAIC,CAAe,IAAI,KAGzC,CAACD,KACY,KAAK,IAAIE,CAAkB,IAAI,OACjDH,IAAqB,KAElBA;AACX;","x_google_ignoreList":[0]}
|
package/dist/index.es669.js
CHANGED
@@ -1,65 +1,68 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
},
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
1
|
+
import { __assign as d } from "./index.es579.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
|
+
});
|
19
|
+
};
|
20
|
+
},
|
21
|
+
assignSyncMedium: function(u) {
|
22
|
+
for (o = !0; e.length; ) {
|
23
|
+
var n = e;
|
24
|
+
e = [], n.forEach(u);
|
25
|
+
}
|
26
|
+
e = {
|
27
|
+
push: function(i) {
|
28
|
+
return u(i);
|
29
|
+
},
|
30
|
+
filter: function() {
|
31
|
+
return e;
|
32
|
+
}
|
33
|
+
};
|
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;
|
41
|
+
}
|
42
|
+
var s = function() {
|
43
|
+
var f = n;
|
44
|
+
n = [], f.forEach(u);
|
45
|
+
}, a = function() {
|
46
|
+
return Promise.resolve().then(s);
|
47
|
+
};
|
48
|
+
a(), e = {
|
49
|
+
push: function(f) {
|
50
|
+
n.push(f), a();
|
51
|
+
},
|
52
|
+
filter: function(f) {
|
53
|
+
return n = n.filter(f), e;
|
54
|
+
}
|
55
|
+
};
|
25
56
|
}
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
t
|
35
|
-
];
|
36
|
-
}, V = function(e) {
|
37
|
-
var r = e.scrollLeft, o = e.scrollWidth, t = e.clientWidth;
|
38
|
-
return [
|
39
|
-
r,
|
40
|
-
o,
|
41
|
-
t
|
42
|
-
];
|
43
|
-
}, g = function(e, r) {
|
44
|
-
return e === "v" ? y(r) : H(r);
|
45
|
-
}, b = function(e, r) {
|
46
|
-
return e === "v" ? B(r) : V(r);
|
47
|
-
}, D = function(e, r) {
|
48
|
-
return e === "h" && r === "rtl" ? -1 : 1;
|
49
|
-
}, W = function(e, r, o, t, v) {
|
50
|
-
var n = D(e, window.getComputedStyle(r).direction), a = n * t, l = o.target, f = r.contains(l), i = !1, s = a > 0, d = 0, h = 0;
|
51
|
-
do {
|
52
|
-
var c = b(e, l), u = c[0], m = c[1], C = c[2], S = m - C - n * u;
|
53
|
-
(u || S) && g(e, l) && (d += S, h += u), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
|
54
|
-
} while (
|
55
|
-
// portaled content
|
56
|
-
!f && l !== document.body || // self content
|
57
|
-
f && (r.contains(l) || r === l)
|
58
|
-
);
|
59
|
-
return (s && Math.abs(d) < 1 || !s && Math.abs(h) < 1) && (i = !0), i;
|
60
|
-
};
|
57
|
+
};
|
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
|
+
}
|
61
65
|
export {
|
62
|
-
|
63
|
-
R as locationCouldBeScrolled
|
66
|
+
v as createSidecarMedium
|
64
67
|
};
|
65
68
|
//# sourceMappingURL=index.es669.js.map
|
package/dist/index.es669.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es669.js","sources":["../node_modules/
|
1
|
+
{"version":3,"file":"index.es669.js","sources":["../node_modules/use-sidecar/dist/es2015/medium.js"],"sourcesContent":["import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n"],"names":["ItoI","a","innerCreateMedium","defaults","middleware","buffer","assigned","medium","data","item","x","cb","cbs","pendingQueue","executeQueue","cycle","filter","createSidecarMedium","options","__assign"],"mappings":";AACA,SAASA,EAAKC,GAAG;AACb,SAAOA;AACX;AACA,SAASC,EAAkBC,GAAUC,GAAY;AAC7C,EAAIA,MAAe,WAAUA,IAAaJ;AAC1C,MAAIK,IAAS,CAAE,GACXC,IAAW,IACXC,IAAS;AAAA,IACT,MAAM,WAAY;AACd,UAAID;AACA,cAAM,IAAI,MAAM,kGAAkG;AAEtH,aAAID,EAAO,SACAA,EAAOA,EAAO,SAAS,CAAC,IAE5BF;AAAA,IACV;AAAA,IACD,WAAW,SAAUK,GAAM;AACvB,UAAIC,IAAOL,EAAWI,GAAMF,CAAQ;AACpC,aAAAD,EAAO,KAAKI,CAAI,GACT,WAAY;AACf,QAAAJ,IAASA,EAAO,OAAO,SAAUK,GAAG;AA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ED
package/dist/index.cjs475.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),y=require("./index.cjs462.js"),p=require("./index.cjs466.js"),R=require("./index.cjs463.js"),x=require("./index.cjs527.js"),H=require("./index.cjs533.js"),w=require("./index.cjs247.js");function U(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const o=U(q);var z="DismissableLayer",h="dismissableLayer.update",M="dismissableLayer.pointerDownOutside",$="dismissableLayer.focusOutside",L,T=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),S=o.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:l,onDismiss:d,...v}=e,c=o.useContext(T),[u,F]=o.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,N]=o.useState({}),W=R.useComposedRefs(t,i=>F(i)),m=Array.from(c.layers),[_]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),A=m.indexOf(_),P=u?m.indexOf(u):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,D=P>=A,I=Y(i=>{const E=i.target,C=[...c.branches].some(b=>b.contains(E));!D||C||(r==null||r(i),l==null||l(i),i.defaultPrevented||d==null||d())},f),O=G(i=>{const E=i.target;[...c.branches].some(b=>b.contains(E))||(a==null||a(i),l==null||l(i),i.defaultPrevented||d==null||d())},f);return H.useEscapeKeydown(i=>{P===c.layers.size-1&&(s==null||s(i),!i.defaultPrevented&&d&&(i.preventDefault(),d()))},f),o.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(L=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),g(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=L)}},[u,f,n,c]),o.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),g())},[u,c]),o.useEffect(()=>{const i=()=>N({});return document.addEventListener(h,i),()=>document.removeEventListener(h,i)},[]),w.jsxRuntimeExports.jsx(p.Primitive.div,{...v,ref:W,style:{pointerEvents:k?D?"auto":"none":void 0,...e.style},onFocusCapture:y.composeEventHandlers(e.onFocusCapture,O.onFocusCapture),onBlurCapture:y.composeEventHandlers(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:y.composeEventHandlers(e.onPointerDownCapture,I.onPointerDownCapture)})});S.displayName=z;var X="DismissableLayerBranch",B=o.forwardRef((e,t)=>{const n=o.useContext(T),s=o.useRef(null),r=R.useComposedRefs(t,s);return o.useEffect(()=>{const a=s.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),w.jsxRuntimeExports.jsx(p.Primitive.div,{...e,ref:r})});B.displayName=X;function Y(e,t=globalThis==null?void 0:globalThis.document){const n=x.useCallbackRef(e),s=o.useRef(!1),r=o.useRef(()=>{});return o.useEffect(()=>{const a=d=>{if(d.target&&!s.current){let v=function(){j(M,n,c,{discrete:!0})};const c={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=v,t.addEventListener("click",r.current,{once:!0})):v()}else t.removeEventListener("click",r.current);s.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function G(e,t=globalThis==null?void 0:globalThis.document){const n=x.useCallbackRef(e),s=o.useRef(!1);return o.useEffect(()=>{const r=a=>{a.target&&!s.current&&j($,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function g(){const e=new CustomEvent(h);document.dispatchEvent(e)}function j(e,t,n,{discrete:s}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),s?p.dispatchDiscreteCustomEvent(r,a):r.dispatchEvent(a)}exports.DismissableLayer=S;exports.DismissableLayerBranch=B;
|
2
|
-
//# sourceMappingURL=index.cjs475.js.map
|
package/dist/index.cjs475.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.cjs475.js","sources":["../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dismissable-layer/src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DISMISSABLE_LAYER_NAME","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","originalBodyPointerEvents","DismissableLayerContext","React","DismissableLayer","props","forwardedRef","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","context","node","setNode","ownerDocument","force","composedRefs","useComposedRefs","node2","layers","highestLayerWithOutsidePointerEventsDisabled","highestLayerWithOutsidePointerEventsDisabledIndex","index","isBodyPointerEventsDisabled","isPointerEventsEnabled","pointerDownOutside","usePointerDownOutside","event","target","isPointerDownOnBranch","branch","focusOutside","useFocusOutside","useEscapeKeydown","dispatchUpdate","handleUpdate","jsx","Primitive","composeEventHandlers","BRANCH_NAME","DismissableLayerBranch","ref","handlePointerDownOutside","useCallbackRef","isPointerInsideReactTreeRef","handleClickRef","handlePointerDown","handleAndDispatchPointerDownOutsideEvent2","handleAndDispatchCustomEvent","eventDetail","timerId","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","name","handler","detail","discrete","dispatchDiscreteCustomEvent"],"mappings":"6jBAUA,IAAIA,EAAyB,mBACzBC,EAAiB,0BACjBC,EAAuB,sCACvBC,EAAgB,gCAChBC,EACAC,EAA0BC,EAAM,cAAc,CAChD,OAAwB,IAAI,IAC5B,uCAAwD,IAAI,IAC5D,SAA0B,IAAI,GAChC,CAAC,EACGC,EAAmBD,EAAM,WAC3B,CAACE,EAAOC,IAAiB,CACvB,KAAM,CACJ,4BA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ty(exports,Symbol.toStringTag,{value:"Module"});const U=require("react"),x=require("./index.cjs463.js"),A=require("./index.cjs466.js"),O=require("./index.cjs527.js"),k=require("./index.cjs247.js");function w(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const f=w(U);var F="focusScope.autoFocusOnMount",y="focusScope.autoFocusOnUnmount",S={bubbles:!1,cancelable:!0},K="FocusScope",C=f.forwardRef((e,n)=>{const{loop:t=!1,trapped:o=!1,onMountAutoFocus:p,onUnmountAutoFocus:I,...L}=e,[s,P]=f.useState(null),E=O.useCallbackRef(p),v=O.useCallbackRef(I),b=f.useRef(null),_=x.useComposedRefs(n,u=>P(u)),a=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(o){let u=function(i){if(a.paused||!s)return;const c=i.target;s.contains(c)?b.current=c:d(b.current,{select:!0})},l=function(i){if(a.paused||!s)return;const c=i.relatedTarget;c!==null&&(s.contains(c)||d(b.current,{select:!0}))},r=function(i){if(document.activeElement===document.body)for(const T of i)T.removedNodes.length>0&&d(s)};document.addEventListener("focusin",u),document.addEventListener("focusout",l);const m=new MutationObserver(r);return s&&m.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",l),m.disconnect()}}},[o,s,a.paused]),f.useEffect(()=>{if(s){N.add(a);const u=document.activeElement;if(!s.contains(u)){const r=new CustomEvent(F,S);s.addEventListener(F,E),s.dispatchEvent(r),r.defaultPrevented||(j(W(R(s)),{select:!0}),document.activeElement===u&&d(s))}return()=>{s.removeEventListener(F,E),setTimeout(()=>{const r=new CustomEvent(y,S);s.addEventListener(y,v),s.dispatchEvent(r),r.defaultPrevented||d(u??document.body,{select:!0}),s.removeEventListener(y,v),N.remove(a)},0)}}},[s,E,v,a]);const M=f.useCallback(u=>{if(!t&&!o||a.paused)return;const l=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,r=document.activeElement;if(l&&r){const m=u.currentTarget,[i,c]=D(m);i&&c?!u.shiftKey&&r===c?(u.preventDefault(),t&&d(i,{select:!0})):u.shiftKey&&r===i&&(u.preventDefault(),t&&d(c,{select:!0})):r===m&&u.preventDefault()}},[t,o,a.paused]);return k.jsxRuntimeExports.jsx(A.Primitive.div,{tabIndex:-1,...L,ref:_,onKeyDown:M})});C.displayName=K;function j(e,{select:n=!1}={}){const t=document.activeElement;for(const o of e)if(d(o,{select:n}),document.activeElement!==t)return}function D(e){const n=R(e),t=h(n,e),o=h(n.reverse(),e);return[t,o]}function R(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const p=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||p?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function h(e,n){for(const t of e)if(!q(t,{upTo:n}))return t}function q(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function H(e){return e instanceof HTMLInputElement&&"select"in e}function d(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&H(e)&&n&&e.select()}}var N=V();function V(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=g(e,n),e.unshift(n)},remove(n){var t;e=g(e,n),(t=e[0])==null||t.resume()}}}function g(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function W(e){return e.filter(n=>n.tagName!=="A")}exports.FocusScope=C;
|
2
|
-
//# sourceMappingURL=index.cjs476.js.map
|
package/dist/index.cjs476.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.cjs476.js","sources":["../node_modules/@radix-ui/react-focus-scope/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-scope/src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["AUTOFOCUS_ON_MOUNT","AUTOFOCUS_ON_UNMOUNT","EVENT_OPTIONS","FOCUS_SCOPE_NAME","FocusScope","React","props","forwardedRef","loop","trapped","onMountAutoFocusProp","onUnmountAutoFocusProp","scopeProps","container","setContainer","onMountAutoFocus","useCallbackRef","onUnmountAutoFocus","lastFocusedElementRef","composedRefs","useComposedRefs","node","focusScope","handleFocusIn2","event","target","focus","handleFocusOut2","relatedTarget","handleMutations2","mutations","mutation","mutationObserver","focusScopesStack","previouslyFocusedElement","mountEvent","focusFirst","removeLinks","getTabbableCandidates","unmountEvent","handleKeyDown","isTabKey","focusedElement","container2","first","last","getTabbableEdges","jsx","Primitive","candidates","select","candidate","findVisible","nodes","walker","isHiddenInput","elements","element","isHidden","upTo","isSelectableInput","createFocusScopesStack","stack","activeFocusScope","arrayRemove","_a","array","item","updatedArray","index","items"],"mappings":"+fAQA,IAAIA,EAAqB,8BACrBC,EAAuB,gCACvBC,EAAgB,CAAE,QAAS,GAAO,WAAY,EAAM,EACpDC,EAA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AAC,GAAGF,CAAK,EACxBG,EAAQD,EAAa,QAAQD,CAAI,EACvC,OAAIE,IAAU,IACZD,EAAa,OAAOC,EAAO,CAAC,EAEvBD,CACT,CACA,SAAS/B,EAAYiC,EAAO,CAC1B,OAAOA,EAAM,OAAQH,GAASA,EAAK,UAAY,GAAG,CACpD","x_google_ignoreList":[0]}
|
package/dist/index.cjs477.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),d=require("react-dom"),f=require("./index.cjs466.js"),p=require("./index.cjs532.js"),m=require("./index.cjs247.js");function P(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const c=P(l);var b="Portal",i=c.forwardRef((e,r)=>{var a;const{container:t,...o}=e,[u,s]=c.useState(!1);p.useLayoutEffect(()=>s(!0),[]);const n=t||u&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return n?d.createPortal(m.jsxRuntimeExports.jsx(f.Primitive.div,{...o,ref:r}),n):null});i.displayName=b;exports.Portal=i;
|
2
|
-
//# sourceMappingURL=index.cjs477.js.map
|
package/dist/index.cjs477.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.cjs477.js","sources":["../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/portal/src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["PORTAL_NAME","Portal","React","props","forwardedRef","containerProp","portalProps","mounted","setMounted","useLayoutEffect","container","_a","ReactDOM","jsx","Primitive"],"mappings":"ufAQA,IAAIA,EAAc,SACdC,EAASC,EAAM,WAAW,CAACC,EAAOC,IAAiB,OACrD,KAAM,CAAE,UAAWC,EAAe,GAAGC,CAAa,EAAGH,EAC/C,CAACI,EAASC,CAAU,EAAIN,EAAM,SAAS,EAAK,EAClDO,EAAAA,gBAAgB,IAAMD,EAAW,EAAI,EAAG,CAAA,CAAE,EAC1C,MAAME,EAAYL,GAAiBE,KAAWI,EAAA,mCAAY,WAAZ,YAAAA,EAAsB,MACpE,OAAOD,EAAYE,EAAS,aAA6BC,EAAG,kBAAA,IAACC,EAAS,UAAC,IAAK,CAAE,GAAGR,EAAa,IAAKF,CAAc,CAAA,EAAGM,CAAS,EAAI,IACnI,CAAC,EACDT,EAAO,YAAcD","x_google_ignoreList":[0]}
|
package/dist/index.cjs504.js
DELETED
package/dist/index.cjs504.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.cjs504.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.es475.js
DELETED
@@ -1,128 +0,0 @@
|
|
1
|
-
import * as n from "react";
|
2
|
-
import { composeEventHandlers as m } from "./index.es462.js";
|
3
|
-
import { Primitive as R, dispatchDiscreteCustomEvent as k } from "./index.es466.js";
|
4
|
-
import { useComposedRefs as g } from "./index.es463.js";
|
5
|
-
import { useCallbackRef as w } from "./index.es527.js";
|
6
|
-
import { useEscapeKeydown as U } from "./index.es533.js";
|
7
|
-
import { j as x } from "./index.es247.js";
|
8
|
-
var j = "DismissableLayer", p = "dismissableLayer.update", z = "dismissableLayer.pointerDownOutside", H = "dismissableLayer.focusOutside", L, T = n.createContext({
|
9
|
-
layers: /* @__PURE__ */ new Set(),
|
10
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
11
|
-
branches: /* @__PURE__ */ new Set()
|
12
|
-
}), M = n.forwardRef(
|
13
|
-
(r, e) => {
|
14
|
-
const {
|
15
|
-
disableOutsidePointerEvents: i = !1,
|
16
|
-
onEscapeKeyDown: o,
|
17
|
-
onPointerDownOutside: t,
|
18
|
-
onFocusOutside: a,
|
19
|
-
onInteractOutside: l,
|
20
|
-
onDismiss: d,
|
21
|
-
...v
|
22
|
-
} = r, c = n.useContext(T), [u, S] = n.useState(null), f = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, F] = n.useState({}), W = g(e, (s) => S(s)), y = Array.from(c.layers), [A] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), N = y.indexOf(A), b = u ? y.indexOf(u) : -1, I = c.layersWithOutsidePointerEventsDisabled.size > 0, P = b >= N, _ = q((s) => {
|
23
|
-
const E = s.target, C = [...c.branches].some((h) => h.contains(E));
|
24
|
-
!P || C || (t == null || t(s), l == null || l(s), s.defaultPrevented || d == null || d());
|
25
|
-
}, f), D = G((s) => {
|
26
|
-
const E = s.target;
|
27
|
-
[...c.branches].some((h) => h.contains(E)) || (a == null || a(s), l == null || l(s), s.defaultPrevented || d == null || d());
|
28
|
-
}, f);
|
29
|
-
return U((s) => {
|
30
|
-
b === c.layers.size - 1 && (o == null || o(s), !s.defaultPrevented && d && (s.preventDefault(), d()));
|
31
|
-
}, f), n.useEffect(() => {
|
32
|
-
if (u)
|
33
|
-
return i && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (L = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), O(), () => {
|
34
|
-
i && c.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = L);
|
35
|
-
};
|
36
|
-
}, [u, f, i, c]), n.useEffect(() => () => {
|
37
|
-
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), O());
|
38
|
-
}, [u, c]), n.useEffect(() => {
|
39
|
-
const s = () => F({});
|
40
|
-
return document.addEventListener(p, s), () => document.removeEventListener(p, s);
|
41
|
-
}, []), /* @__PURE__ */ x.jsx(
|
42
|
-
R.div,
|
43
|
-
{
|
44
|
-
...v,
|
45
|
-
ref: W,
|
46
|
-
style: {
|
47
|
-
pointerEvents: I ? P ? "auto" : "none" : void 0,
|
48
|
-
...r.style
|
49
|
-
},
|
50
|
-
onFocusCapture: m(r.onFocusCapture, D.onFocusCapture),
|
51
|
-
onBlurCapture: m(r.onBlurCapture, D.onBlurCapture),
|
52
|
-
onPointerDownCapture: m(
|
53
|
-
r.onPointerDownCapture,
|
54
|
-
_.onPointerDownCapture
|
55
|
-
)
|
56
|
-
}
|
57
|
-
);
|
58
|
-
}
|
59
|
-
);
|
60
|
-
M.displayName = j;
|
61
|
-
var X = "DismissableLayerBranch", Y = n.forwardRef((r, e) => {
|
62
|
-
const i = n.useContext(T), o = n.useRef(null), t = g(e, o);
|
63
|
-
return n.useEffect(() => {
|
64
|
-
const a = o.current;
|
65
|
-
if (a)
|
66
|
-
return i.branches.add(a), () => {
|
67
|
-
i.branches.delete(a);
|
68
|
-
};
|
69
|
-
}, [i.branches]), /* @__PURE__ */ x.jsx(R.div, { ...r, ref: t });
|
70
|
-
});
|
71
|
-
Y.displayName = X;
|
72
|
-
function q(r, e = globalThis == null ? void 0 : globalThis.document) {
|
73
|
-
const i = w(r), o = n.useRef(!1), t = n.useRef(() => {
|
74
|
-
});
|
75
|
-
return n.useEffect(() => {
|
76
|
-
const a = (d) => {
|
77
|
-
if (d.target && !o.current) {
|
78
|
-
let v = function() {
|
79
|
-
B(
|
80
|
-
z,
|
81
|
-
i,
|
82
|
-
c,
|
83
|
-
{ discrete: !0 }
|
84
|
-
);
|
85
|
-
};
|
86
|
-
const c = { originalEvent: d };
|
87
|
-
d.pointerType === "touch" ? (e.removeEventListener("click", t.current), t.current = v, e.addEventListener("click", t.current, { once: !0 })) : v();
|
88
|
-
} else
|
89
|
-
e.removeEventListener("click", t.current);
|
90
|
-
o.current = !1;
|
91
|
-
}, l = window.setTimeout(() => {
|
92
|
-
e.addEventListener("pointerdown", a);
|
93
|
-
}, 0);
|
94
|
-
return () => {
|
95
|
-
window.clearTimeout(l), e.removeEventListener("pointerdown", a), e.removeEventListener("click", t.current);
|
96
|
-
};
|
97
|
-
}, [e, i]), {
|
98
|
-
// ensures we check React component tree (not just DOM tree)
|
99
|
-
onPointerDownCapture: () => o.current = !0
|
100
|
-
};
|
101
|
-
}
|
102
|
-
function G(r, e = globalThis == null ? void 0 : globalThis.document) {
|
103
|
-
const i = w(r), o = n.useRef(!1);
|
104
|
-
return n.useEffect(() => {
|
105
|
-
const t = (a) => {
|
106
|
-
a.target && !o.current && B(H, i, { originalEvent: a }, {
|
107
|
-
discrete: !1
|
108
|
-
});
|
109
|
-
};
|
110
|
-
return e.addEventListener("focusin", t), () => e.removeEventListener("focusin", t);
|
111
|
-
}, [e, i]), {
|
112
|
-
onFocusCapture: () => o.current = !0,
|
113
|
-
onBlurCapture: () => o.current = !1
|
114
|
-
};
|
115
|
-
}
|
116
|
-
function O() {
|
117
|
-
const r = new CustomEvent(p);
|
118
|
-
document.dispatchEvent(r);
|
119
|
-
}
|
120
|
-
function B(r, e, i, { discrete: o }) {
|
121
|
-
const t = i.originalEvent.target, a = new CustomEvent(r, { bubbles: !1, cancelable: !0, detail: i });
|
122
|
-
e && t.addEventListener(r, e, { once: !0 }), o ? k(t, a) : t.dispatchEvent(a);
|
123
|
-
}
|
124
|
-
export {
|
125
|
-
M as DismissableLayer,
|
126
|
-
Y as DismissableLayerBranch
|
127
|
-
};
|
128
|
-
//# sourceMappingURL=index.es475.js.map
|
package/dist/index.es475.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.es475.js","sources":["../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dismissable-layer/src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DISMISSABLE_LAYER_NAME","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","originalBodyPointerEvents","DismissableLayerContext","React","DismissableLayer","props","forwardedRef","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","context","node","setNode","ownerDocument","force","composedRefs","useComposedRefs","node2","layers","highestLayerWithOutsidePointerEventsDisabled","highestLayerWithOutsidePointerEventsDisabledIndex","index","isBodyPointerEventsDisabled","isPointerEventsEnabled","pointerDownOutside","usePointerDownOutside","event","target","isPointerDownOnBranch","branch","focusOutside","useFocusOutside","useEscapeKeydown","dispatchUpdate","handleUpdate","jsx","Primitive","composeEventHandlers","BRANCH_NAME","DismissableLayerBranch","ref","handlePointerDownOutside","useCallbackRef","isPointerInsideReactTreeRef","handleClickRef","handlePointerDown","handleAndDispatchPointerDownOutsideEvent2","handleAndDispatchCustomEvent","eventDetail","timerId","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","name","handler","detail","discrete","dispatchDiscreteCustomEvent"],"mappings":";;;;;;;AAUA,IAAIA,IAAyB,oBACzBC,IAAiB,2BACjBC,IAAuB,uCACvBC,IAAgB,iCAChBC,GACAC,IAA0BC,EAAM,cAAc;AAAA,EAChD,QAAwB,oBAAI,IAAK;AAAA,EACjC,wCAAwD,oBAAI,IAAK;AAAA,EACjE,UAA0B,oBAAI,IAAG;AACnC,CAAC,GACGC,IAAmBD,EAAM;AAAA,EAC3B,CAACE,GAAOC,MAAiB;AACvB,UAAM;AAAA,MACJ,6BAAAC,IAA8B;AAAA,MAC9B,iBAAAC;AAAA,MACA,sBAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,WAAAC;AAAA,MACA,GAAGC;AAAA,IACT,IAAQR,GACES,IAAUX,EAAM,WAAWD,CAAuB,GAClD,CAACa,GAAMC,CAAO,IAAIb,EAAM,SAAS,IAAI,GACrCc,KAAgBF,KAAA,gBAAAA,EAAM,mBAAiB,y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