@cloudlet/toast 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +2 -2
- package/dist/react/gestures.d.ts +6 -0
- package/dist/react/gestures.d.ts.map +1 -1
- package/dist/react/gestures.js +28 -15
- package/dist/react/gestures.js.map +1 -1
- package/dist/react/host.d.ts.map +1 -1
- package/dist/react/host.js +217 -208
- package/dist/react/host.js.map +1 -1
- package/dist/react.d.ts +2 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/react/gestures.ts +45 -8
- package/src/react/host.tsx +22 -9
- package/src/react.ts +2 -1
package/dist/react/host.js
CHANGED
|
@@ -16,7 +16,7 @@ function T(e) {
|
|
|
16
16
|
return t;
|
|
17
17
|
}
|
|
18
18
|
var E = ".cloudlet-exit,.cloudlet-slide-out,.cloudlet-chrome-out,.cloudlet-heading-out,.cloudlet-body-out,.cloudlet-badge-out,.cloudlet-page-out", D = class extends y {
|
|
19
|
-
#e =
|
|
19
|
+
#e = A(this);
|
|
20
20
|
componentDidMount = this.#e.componentDidMount;
|
|
21
21
|
getSnapshotBeforeUpdate = this.#e.getSnapshotBeforeUpdate;
|
|
22
22
|
componentDidUpdate = this.#e.componentDidUpdate;
|
|
@@ -47,23 +47,23 @@ var E = ".cloudlet-exit,.cloudlet-slide-out,.cloudlet-chrome-out,.cloudlet-headi
|
|
|
47
47
|
exitBg: " .cloudlet-stack > .cloudlet-exit > .cloudlet-shell > .cloudlet-bg",
|
|
48
48
|
exitBadge: " .cloudlet-stack > .cloudlet-exit > .cloudlet-shell > .cloudlet-badge"
|
|
49
49
|
}, ne = 3e3, O = (e) => Math.max(0, Math.min(1, e)), re = (e) => e?.setAttribute("inert", ""), k = (e) => `${Math.round(e * 100) / 100}px`, ie = (e, t) => t || e <= .01 ? "none" : `blur(${k(e)})`;
|
|
50
|
-
function
|
|
50
|
+
function ae(e, t, n) {
|
|
51
51
|
let r = parseFloat(e?.getPropertyValue(t) ?? "");
|
|
52
52
|
return Number.isFinite(r) ? r : n;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
let { bridge: x, lease: S, document: E } = y.props, D = E.defaultView,
|
|
54
|
+
function A(y) {
|
|
55
|
+
let { bridge: x, lease: S, document: E } = y.props, D = E.defaultView, A = b(), se = b(), ce = b(), M = b(), N = b(), le = b(), ue = b(), P = b(), de = b(), fe = b(), pe = s(x, S, E, () => y.props.options.announcements), F = null, I = null, me = null, he = !1, ge = null, L = {}, _e = !1, R = null, ve = !1, z = null, ye = y.props.options.motion?.overrides, B = u(ye), be = () => {
|
|
56
56
|
let e = y.props.options.motion?.overrides;
|
|
57
|
-
e !==
|
|
58
|
-
},
|
|
57
|
+
e !== ye && (ye = e, B = u(e), z?.setConstants(B));
|
|
58
|
+
}, V = !1, xe = !1, H = null, U = {
|
|
59
59
|
width: 0,
|
|
60
60
|
height: 0,
|
|
61
61
|
bodyTop: 0
|
|
62
|
-
},
|
|
62
|
+
}, Se = 0, Ce = -Infinity, W = {
|
|
63
63
|
tailOffset: 4,
|
|
64
64
|
tailScale: .9,
|
|
65
65
|
pillHeight: 44
|
|
66
|
-
},
|
|
66
|
+
}, G = !1, we = "instant", Te = /* @__PURE__ */ new Set(), K = 0, Ee = 2, De = null, Oe = null, ke = !1, Ae = null, q = null, je = !1, J = null, Me = null, Y = null, X = !1, Ne, Pe = /* @__PURE__ */ new WeakSet(), Fe = [];
|
|
67
67
|
function Ie(e, t, ...n) {
|
|
68
68
|
try {
|
|
69
69
|
let t = e(...n);
|
|
@@ -86,15 +86,15 @@ function j(y) {
|
|
|
86
86
|
reason: e,
|
|
87
87
|
active: t
|
|
88
88
|
}), Re = (e) => {
|
|
89
|
-
|
|
89
|
+
xe !== e && (xe = e, Z("hover", e), z?.setHover(e));
|
|
90
90
|
}, ze = (e) => {
|
|
91
|
-
if (Be(e), !(D && e instanceof D.HTMLElement && !e.closest(".cloudlet-slot") && Q(e)) && !Q(
|
|
91
|
+
if (Be(e), !(D && e instanceof D.HTMLElement && !e.closest(".cloudlet-slot") && Q(e)) && !Q(F)) {
|
|
92
92
|
let e = E.activeElement;
|
|
93
|
-
D && e instanceof D.HTMLElement && e.blur(),
|
|
93
|
+
D && e instanceof D.HTMLElement && e.blur(), A.current?.focus({ preventScroll: !0 });
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
function Be(e) {
|
|
97
|
-
D && e instanceof D.HTMLElement && e !== E.body && !
|
|
97
|
+
D && e instanceof D.HTMLElement && e !== E.body && !A.current?.contains(e) && (F = e);
|
|
98
98
|
}
|
|
99
99
|
function Q(e) {
|
|
100
100
|
if (!e?.isConnected || e.closest("[hidden],[inert],[aria-hidden=\"true\"]") || e.matches(":disabled")) return !1;
|
|
@@ -105,7 +105,7 @@ function j(y) {
|
|
|
105
105
|
return e.focus({ preventScroll: !0 }), E.activeElement === e;
|
|
106
106
|
}
|
|
107
107
|
function Ve() {
|
|
108
|
-
if (Q(
|
|
108
|
+
if (Q(F)) return !0;
|
|
109
109
|
for (let e of E.querySelectorAll("button,a[href],input,select,textarea,summary,[tabindex]")) if (e.tabIndex >= 0 && !e.closest(".cloudlet-host") && Q(e)) return !0;
|
|
110
110
|
let e = E.body.getAttribute("tabindex");
|
|
111
111
|
E.body.setAttribute("tabindex", "-1");
|
|
@@ -113,11 +113,11 @@ function j(y) {
|
|
|
113
113
|
return e === null ? E.body.removeAttribute("tabindex") : E.body.setAttribute("tabindex", e), t;
|
|
114
114
|
}
|
|
115
115
|
let He = (e) => {
|
|
116
|
-
let t = !!e && !!
|
|
116
|
+
let t = !!e && !!A.current?.contains(e);
|
|
117
117
|
Z("focus", t), x.setFocused(S, t ? x.getSnapshot().presentation?.handle ?? null : null);
|
|
118
118
|
};
|
|
119
119
|
function Ue() {
|
|
120
|
-
if (!
|
|
120
|
+
if (!_e || !D) return;
|
|
121
121
|
let e = E.documentElement.clientWidth || D.innerWidth, t = E.documentElement.clientHeight || D.innerHeight, n = v(e, t, D.visualViewport);
|
|
122
122
|
for (let e of [
|
|
123
123
|
"top",
|
|
@@ -126,27 +126,30 @@ function j(y) {
|
|
|
126
126
|
"left",
|
|
127
127
|
"width",
|
|
128
128
|
"height"
|
|
129
|
-
])
|
|
129
|
+
]) L.viewport?.setProperty(`--cloudlet-viewport-${e}`, `${n[e]}px`);
|
|
130
130
|
}
|
|
131
|
-
let We = () =>
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
let We = () => A.current?.dataset.edge === "bottom", Ge = () => We() ? 1 : -1, Ke = () => {
|
|
132
|
+
let e = A.current?.dataset.align;
|
|
133
|
+
return e === "left" ? 0 : e === "right" ? 1 : .5;
|
|
134
|
+
};
|
|
135
|
+
function qe(e) {
|
|
136
|
+
let t = L, { reduced: n } = e, r = Math.max(0, e.width), i = Math.max(0, e.height), a = Math.min(Math.max(0, e.radius), r / 2, i / 2), o = We(), s = o ? U.height - i : 0, c = Ke(), l = `translateX(${-c * 100}%)`, u = (U.width - r) * c;
|
|
134
137
|
t.shell && (t.shell.opacity = String(O(e.opacity)), t.shell.transform = n ? "none" : `translate(${k(e.dragX)}, ${k(e.y + e.dragY)}) scale(${e.scale})`);
|
|
135
|
-
let
|
|
136
|
-
if (
|
|
137
|
-
let i = n ? 1 :
|
|
138
|
+
let d = le.current;
|
|
139
|
+
if (d && (d.setAttribute("width", String(r)), d.setAttribute("height", String(i)), ue.current?.setAttribute("d", m(r, i, a))), t.bg && (t.bg.borderRadius = k(a), t.bg.top = "0px", t.bg.bottom = "auto", t.bg.transform = `${l} translateY(${k(s)})`), t.clip && (t.clip.clipPath = `path("${m(r, i, a, u, s)}")`), t.badge) {
|
|
140
|
+
let i = n ? 1 : B.badge.scale + (1 - B.badge.scale) * e.badge, a = (je ? u + 10 : u + r - 10) - U.width / 2;
|
|
138
141
|
t.badge.opacity = String(O(e.badge)), t.badge.transform = `translate(calc(${k(a)} - 50%), ${o ? "6px" : "-6px"}) scale(${i})`;
|
|
139
142
|
}
|
|
140
|
-
let
|
|
143
|
+
let f = o ? -1 : 1;
|
|
141
144
|
for (let n of [1, 2]) {
|
|
142
145
|
let a = t[`tail${n}`];
|
|
143
146
|
if (!a) continue;
|
|
144
147
|
let o = e[`tail${n}`];
|
|
145
|
-
a.width = k(r), a.height = k(Math.min(i,
|
|
148
|
+
a.width = k(r), a.height = k(Math.min(i, W.pillHeight)), a.opacity = String(O(e[`tail${n}Opacity`])), a.transform = `${l} translateY(${k(f * o * (W.tailOffset + B.hoverLift * e.lift))}) scale(${W.tailScale ** +o})`;
|
|
146
149
|
}
|
|
147
|
-
t.slideOut && (t.slideOut.transform = n ? "none" : `translateX(${k(e.slide - e.slideDirection * e.slideWidth)})`, t.slideOut.opacity = String(O(e.slideOut))), t.peek && (t.peek.width = k(
|
|
148
|
-
let
|
|
149
|
-
t.headerIn && (t.headerIn.transform =
|
|
150
|
+
t.slideOut && (t.slideOut.transform = n ? "none" : `translateX(${k(e.slide - e.slideDirection * e.slideWidth)})`, t.slideOut.opacity = String(O(e.slideOut))), t.peek && (t.peek.width = k(U.width), t.peek.top = k(U.bodyTop), t.peek.transform = `translateX(${k(e.slide + (J?.side ?? 0) * U.width)})`);
|
|
151
|
+
let p = n ? "none" : `translate(${k(e.headX)}, ${k(e.headY)})`;
|
|
152
|
+
t.headerIn && (t.headerIn.transform = p), t.headerOut && (t.headerOut.transform = p);
|
|
150
153
|
for (let [r, i] of [
|
|
151
154
|
[t.headerIn, e.headerIn],
|
|
152
155
|
[t.headerOut, e.headerOut],
|
|
@@ -154,38 +157,38 @@ function j(y) {
|
|
|
154
157
|
[t.badgeOut, e.badgeOut],
|
|
155
158
|
[t.pageIn, e.pageIn],
|
|
156
159
|
[t.pageOut, e.pageOut]
|
|
157
|
-
]) r && (r.opacity = String(O(i)), r.filter = ie((1 - O(i)) *
|
|
158
|
-
t.chrome && (t.chrome.opacity = String(O(e.chrome)), t.chrome.transform = n ? "none" : `translateY(${k((1 - O(e.chrome)) *
|
|
160
|
+
]) r && (r.opacity = String(O(i)), r.filter = ie((1 - O(i)) * B.blur, n));
|
|
161
|
+
t.chrome && (t.chrome.opacity = String(O(e.chrome)), t.chrome.transform = n ? "none" : `translateY(${k((1 - O(e.chrome)) * B.chromeOffset)})`), t.chromeOut && (t.chromeOut.opacity = String(O(e.chromeOut))), t.body && (t.body.opacity = String(O(e.chrome) * O(e.bodyIn) * O(e.slideIn)), t.body.transform = n ? "none" : `translateX(${k(e.slide)}) translateY(${k((1 - O(e.chrome)) * B.chromeOffset + (1 - O(e.bodyIn)) * B.bodyOffset)})`), t.bodyOut && (t.bodyOut.opacity = String(O(e.bodyOut))), t.exit && (t.exit.opacity = String(O(e.exitOpacity)), t.exit.transform = n ? l : `${l} translate(${k(e.exitX)}, ${k(e.exitY)}) scale(${e.exitScale})`), ke && De?.isConnected && De.setAttribute("stroke-dasharray", `${Math.round(e.progress * 1e4) / 100} 100`);
|
|
159
162
|
}
|
|
160
|
-
function
|
|
163
|
+
function Je() {
|
|
161
164
|
let e = ce.current, t = N.current, n = _(y.props.snapshot).presented;
|
|
162
|
-
if (!e || !t || !D || !
|
|
163
|
-
|
|
165
|
+
if (!e || !t || !D || !z || !n) {
|
|
166
|
+
G = !1;
|
|
164
167
|
return;
|
|
165
168
|
}
|
|
166
169
|
let r = e.getBoundingClientRect();
|
|
167
|
-
if (
|
|
168
|
-
let i = D.getComputedStyle(
|
|
169
|
-
|
|
170
|
-
tailOffset:
|
|
171
|
-
tailScale:
|
|
172
|
-
pillHeight:
|
|
170
|
+
if (G = r.width > 0 && r.height > 0, Xe(n), !G) return;
|
|
171
|
+
let i = D.getComputedStyle(A.current);
|
|
172
|
+
W = {
|
|
173
|
+
tailOffset: ae(i, "--cloudlet-tail-offset", 4),
|
|
174
|
+
tailScale: ae(i, "--cloudlet-tail-scale", .9),
|
|
175
|
+
pillHeight: ae(i, "--cloudlet-pill-height", 44)
|
|
173
176
|
};
|
|
174
177
|
let a = y.props.snapshot.island.open, o = parseFloat(D.getComputedStyle(t).borderTopLeftRadius), s = Math.min(Number.isFinite(o) ? o : a ? 24 : r.height / 2, r.height / 2, r.width / 2);
|
|
175
|
-
|
|
178
|
+
U = {
|
|
176
179
|
width: r.width,
|
|
177
180
|
height: r.height,
|
|
178
181
|
bodyTop: $()?.offsetTop ?? 0
|
|
179
|
-
},
|
|
182
|
+
}, z.setShape({
|
|
180
183
|
width: r.width,
|
|
181
184
|
height: r.height,
|
|
182
185
|
radius: s
|
|
183
|
-
},
|
|
186
|
+
}, we), we = "close", Ye();
|
|
184
187
|
}
|
|
185
|
-
function
|
|
188
|
+
function Ye() {
|
|
186
189
|
let e = $();
|
|
187
190
|
if (!e) return;
|
|
188
|
-
let t =
|
|
191
|
+
let t = rt()?.querySelector("[data-cloudlet-title]")?.id;
|
|
189
192
|
if (e.scrollHeight - e.clientHeight > 1 && t) e.tabIndex = 0, e.setAttribute("role", "group"), e.setAttribute("aria-labelledby", t);
|
|
190
193
|
else for (let t of [
|
|
191
194
|
"tabindex",
|
|
@@ -193,8 +196,8 @@ function j(y) {
|
|
|
193
196
|
"aria-labelledby"
|
|
194
197
|
]) e.removeAttribute(t);
|
|
195
198
|
}
|
|
196
|
-
function
|
|
197
|
-
let t = e && !
|
|
199
|
+
function Xe(e) {
|
|
200
|
+
let t = e && !G && x.getSnapshot().presentation?.readable ? e.handle : null;
|
|
198
201
|
t !== Ae && (Ae && x.setPause(S, {
|
|
199
202
|
scope: "notification",
|
|
200
203
|
handle: Ae,
|
|
@@ -207,107 +210,107 @@ function j(y) {
|
|
|
207
210
|
active: !0
|
|
208
211
|
}));
|
|
209
212
|
}
|
|
210
|
-
function
|
|
213
|
+
function Ze() {
|
|
211
214
|
let e = x.getSnapshot().presentation;
|
|
212
|
-
if (!e?.token || e.readable ||
|
|
215
|
+
if (!e?.token || e.readable || Te.size) return;
|
|
213
216
|
let t = M.current?.querySelector(`[data-cloudlet-presented="${e.handle.generation}"]`), n = t?.getBoundingClientRect();
|
|
214
|
-
t &&
|
|
217
|
+
t && G && n?.width && n.height && D?.getComputedStyle(t).visibility !== "hidden" && x.acknowledgePresentation(S, e.handle, e.token);
|
|
215
218
|
}
|
|
216
|
-
let
|
|
217
|
-
|
|
218
|
-
}),
|
|
219
|
-
Ue(),
|
|
219
|
+
let Qe = (e) => (Te.add(e), () => {
|
|
220
|
+
Te.delete(e), Ze();
|
|
221
|
+
}), $e = () => {
|
|
222
|
+
Ue(), Je(), Ze();
|
|
220
223
|
};
|
|
221
|
-
function
|
|
222
|
-
let e =
|
|
224
|
+
function et() {
|
|
225
|
+
let e = A.current;
|
|
223
226
|
return (y.props.snapshot.island.open ? e?.querySelector(".cloudlet-slide [data-cloudlet-title]") : null) ?? e?.querySelector("[data-cloudlet-pill]") ?? null;
|
|
224
227
|
}
|
|
225
|
-
function
|
|
228
|
+
function tt() {
|
|
226
229
|
let e = y.props.snapshot.focusRequest;
|
|
227
230
|
if (!e || x.getSnapshot().focusRequest?.token !== e.token) return;
|
|
228
|
-
let t =
|
|
229
|
-
n.kind === "anchor" ? r = t : n.kind === "overflow" ? r = t?.querySelector("[data-cloudlet-overflow]") ?? t?.querySelector("[data-cloudlet-pill]") ?? null : n.kind === "notification" && (r = M.current?.querySelector(`[data-cloudlet-presented="${n.handle.generation}"]`) ? n.control ? M.current.querySelector(`[data-cloudlet-control="${n.control}"]`) :
|
|
231
|
+
let t = A.current, n = e.target, r = null;
|
|
232
|
+
n.kind === "anchor" ? r = t : n.kind === "overflow" ? r = t?.querySelector("[data-cloudlet-overflow]") ?? t?.querySelector("[data-cloudlet-pill]") ?? null : n.kind === "notification" && (r = M.current?.querySelector(`[data-cloudlet-presented="${n.handle.generation}"]`) ? n.control ? M.current.querySelector(`[data-cloudlet-control="${n.control}"]`) : et() : null), Be(E.activeElement);
|
|
230
233
|
let i = Q(r);
|
|
231
234
|
x.acknowledgeFocus(S, e.token, i ? "focused" : "unavailable");
|
|
232
235
|
}
|
|
233
|
-
function
|
|
236
|
+
function nt(e) {
|
|
234
237
|
e?.replaceChildren();
|
|
235
238
|
}
|
|
236
|
-
function
|
|
239
|
+
function rt() {
|
|
237
240
|
return M.current?.querySelector(":scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-header > .cloudlet-heading") ?? null;
|
|
238
241
|
}
|
|
239
242
|
function $() {
|
|
240
243
|
return M.current?.querySelector(":scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-body") ?? null;
|
|
241
244
|
}
|
|
242
|
-
function
|
|
245
|
+
function it(e) {
|
|
243
246
|
let t = M.current, n = N.current;
|
|
244
|
-
if (!t || !n || !
|
|
247
|
+
if (!t || !n || !G) return {};
|
|
245
248
|
let r = {};
|
|
246
|
-
(e.presence === "exit" || e.presence === "rise" || e.presence === "replace") && (r.exit = T(t),
|
|
249
|
+
(e.presence === "exit" || e.presence === "rise" || e.presence === "replace") && (r.exit = T(t), L.exitClip && (L.exitClip.clipPath = L.clip?.clipPath ?? ""), L.exitBg && (L.exitBg.borderRadius = L.bg?.borderRadius ?? ""), L.exitBadge && (L.exitBadge.opacity = L.badge?.opacity ?? "", L.exitBadge.transform = L.badge?.transform ?? ""), L.exit && (L.exit.width = k(U.width)));
|
|
247
250
|
let i = $();
|
|
248
|
-
if (e.slide && i && (r.slide = T(i),
|
|
251
|
+
if (e.slide && i && (r.slide = T(i), Se = i.offsetTop, L.slideOut && (L.slideOut.width = k(U.width))), e.morph === "close") {
|
|
249
252
|
let e = T(n);
|
|
250
|
-
e.querySelector(".cloudlet-header")?.classList.add("cloudlet-ghost"), r.chrome = e,
|
|
253
|
+
e.querySelector(".cloudlet-header")?.classList.add("cloudlet-ghost"), r.chrome = e, L.chromeOut && (L.chromeOut.width = k(U.width));
|
|
251
254
|
}
|
|
252
|
-
let a =
|
|
255
|
+
let a = rt();
|
|
253
256
|
e.header && a && (r.header = T(a));
|
|
254
|
-
let o = $(), s =
|
|
255
|
-
e.body && (
|
|
257
|
+
let o = $(), s = z?.now() ?? 0, c = e.body && s - Ce < (z?.constants.bodyQuiet ?? 0);
|
|
258
|
+
e.body && (Ce = s), e.body && !e.slide && o && !c && !z?.swapping("body") && (r.body = T(o), L.bodyOut && (L.bodyOut.top = k(o.offsetTop)));
|
|
256
259
|
let l = t.querySelector(":scope > .cloudlet-badge > .cloudlet-badge-value");
|
|
257
260
|
e.badge && l && (r.badge = T(l));
|
|
258
261
|
let u = n.querySelector(":scope > .cloudlet-indicator > .cloudlet-page > .cloudlet-page-value");
|
|
259
262
|
return e.page && u && (r.page = T(u)), r;
|
|
260
263
|
}
|
|
261
|
-
function
|
|
264
|
+
function at(e, t) {
|
|
262
265
|
let n = M.current, r = e === "exit" ? P.current : e === "slide" ? de.current : e === "chrome" ? fe.current : e === "header" ? n?.querySelector(":scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-header > .cloudlet-heading-out") : e === "body" ? n?.querySelector(":scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-body-out") : e === "badge" ? n?.querySelector(":scope > .cloudlet-badge > .cloudlet-badge-out") : n?.querySelector(":scope > .cloudlet-clip > .cloudlet-indicator > .cloudlet-page > .cloudlet-page-out");
|
|
263
266
|
return r ? (r.setAttribute("inert", ""), r.replaceChildren(t), r) : null;
|
|
264
267
|
}
|
|
265
|
-
function
|
|
266
|
-
if (!
|
|
268
|
+
function ot(e, t, n) {
|
|
269
|
+
if (!z) return;
|
|
267
270
|
let r = n?.plan ?? g(e, t);
|
|
268
|
-
|
|
271
|
+
st(t);
|
|
269
272
|
let i = {};
|
|
270
|
-
for (let [e, t] of Object.entries(n?.clones ?? {})) i[e] =
|
|
271
|
-
let a = (e) => () =>
|
|
272
|
-
|
|
273
|
-
}, s = () =>
|
|
274
|
-
r.presence === "enter" ?
|
|
275
|
-
let c = n?.heading, l = c && r.morph !== "none" ?
|
|
276
|
-
c && l &&
|
|
273
|
+
for (let [e, t] of Object.entries(n?.clones ?? {})) i[e] = at(e, t);
|
|
274
|
+
let a = (e) => () => nt(i[e]), o = () => {
|
|
275
|
+
K && (K = 0, y.forceUpdate());
|
|
276
|
+
}, s = () => nt(P.current);
|
|
277
|
+
r.presence === "enter" ? we = "instant" : r.morph === "open" && (we = "open"), Je();
|
|
278
|
+
let c = n?.heading, l = c && r.morph !== "none" ? rt()?.getBoundingClientRect() : null;
|
|
279
|
+
c && l && z.shiftHeading(c.left - l.left, c.top - l.top, r.morph === "open" ? "open" : "close");
|
|
277
280
|
let u = Ge(), d = Y && e.presented?.handle === Y.handle && !t.stack.includes(Y.handle) ? Y : void 0;
|
|
278
|
-
Y && !t.stack.includes(Y.handle) && (Y = null), (r.presence === "exit" || r.presence === "rise" || r.presence === "replace") && (i.exit ?
|
|
281
|
+
Y && !t.stack.includes(Y.handle) && (Y = null), (r.presence === "exit" || r.presence === "rise" || r.presence === "replace") && (i.exit ? z.exit(u, s, d) : d && z.release("dragX", 0), r.presence === "exit" && z.hide()), (r.presence === "enter" || r.presence === "replace") && (z.enter(u, Qe("presence")), r.presence === "enter" && (z.setTails(t.depth, "settle", 0, o), t.open ? z.open() : z.setBadge(t.badge))), r.presence === "rise" && (z.rise(-u * W.tailOffset, W.tailScale, Qe("presence")), z.swap("header", Qe("header"), !0)), (r.tails === "arrival" || r.tails === "rise" || r.tails === "settle") && (t.depth < e.depth && (K = Math.max(K, e.depth)), z.setTails(t.depth, r.tails, e.depth, o)), r.morph === "open" ? (K = Math.max(K, e.depth), z.open(o)) : r.morph === "close" && z.collapse(t.depth, t.badge, {
|
|
279
282
|
chrome: a("chrome"),
|
|
280
283
|
tails: o
|
|
281
284
|
});
|
|
282
|
-
let f = We() && n ?
|
|
283
|
-
if (
|
|
284
|
-
let e =
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
let f = We() && n ? U.height - n.height : 0;
|
|
286
|
+
if (L.slideOut && (L.slideOut.top = k(f + Se)), L.chromeOut && i.chrome && (L.chromeOut.top = k(f)), r.slide) {
|
|
287
|
+
let e = Qe("slide");
|
|
288
|
+
z.slide(je ? -r.slide : r.slide, U.width, () => {
|
|
289
|
+
nt(i.slide), e();
|
|
287
290
|
});
|
|
288
291
|
}
|
|
289
292
|
if (i.header) {
|
|
290
|
-
let e =
|
|
291
|
-
|
|
292
|
-
|
|
293
|
+
let e = Qe("header");
|
|
294
|
+
z.swap("header", () => {
|
|
295
|
+
nt(i.header), e();
|
|
293
296
|
});
|
|
294
297
|
}
|
|
295
|
-
i.body &&
|
|
298
|
+
i.body && z.swap("body", a("body")), i.badge && z.swap("badge", a("badge")), i.page && z.swap("page", a("page")), !t.open && e.presented && t.presented && r.morph === "none" && z.setBadge(t.badge);
|
|
296
299
|
let p = x.getSnapshot().presentation;
|
|
297
300
|
r.begin && r.header && t.presented && p?.token && p.readable && p.handle === t.presented.handle && x.beginPresentation(S, t.presented.handle, p.token);
|
|
298
301
|
}
|
|
299
|
-
function ot(e) {
|
|
300
|
-
let t = e.presented, n = t?.content.progress, r = nt()?.querySelector(":scope > .cloudlet-icon > .cloudlet-ring > .cloudlet-progress-fill") ?? null, i = n?.kind === "determinate", a = r !== K || t?.handle !== Oe || !ke;
|
|
301
|
-
K = r, Oe = t?.handle ?? null, ke = i && !!r, R?.setProgress(i ? n.value : null, a);
|
|
302
|
-
}
|
|
303
302
|
function st(e) {
|
|
304
|
-
|
|
303
|
+
let t = e.presented, n = t?.content.progress, r = rt()?.querySelector(":scope > .cloudlet-icon > .cloudlet-ring > .cloudlet-progress-fill") ?? null, i = n?.kind === "determinate", a = r !== De || t?.handle !== Oe || !ke;
|
|
304
|
+
De = r, Oe = t?.handle ?? null, ke = i && !!r, z?.setProgress(i ? n.value : null, a);
|
|
305
305
|
}
|
|
306
306
|
function ct(e) {
|
|
307
|
+
(J?.handle !== e?.handle || J?.side !== e?.side) && (J = e, y.forceUpdate());
|
|
308
|
+
}
|
|
309
|
+
function lt(e) {
|
|
307
310
|
return {
|
|
308
|
-
move: (e) =>
|
|
311
|
+
move: (e) => z?.drag("dragX", e),
|
|
309
312
|
end: (t, n) => {
|
|
310
|
-
let r = f(t, n,
|
|
313
|
+
let r = f(t, n, U.width, {
|
|
311
314
|
negative: !0,
|
|
312
315
|
positive: !0
|
|
313
316
|
});
|
|
@@ -315,38 +318,38 @@ function j(y) {
|
|
|
315
318
|
if (Y = {
|
|
316
319
|
handle: e,
|
|
317
320
|
direction: r,
|
|
318
|
-
distance:
|
|
321
|
+
distance: U.width,
|
|
319
322
|
velocity: n * 1e3
|
|
320
323
|
}, x.dismiss(S, e, "swipe").status === "applied") return;
|
|
321
324
|
Y = null;
|
|
322
325
|
}
|
|
323
|
-
|
|
326
|
+
z?.release("dragX", n * 1e3);
|
|
324
327
|
},
|
|
325
|
-
cancel: () =>
|
|
328
|
+
cancel: () => z?.release("dragX", 0)
|
|
326
329
|
};
|
|
327
330
|
}
|
|
328
|
-
function
|
|
331
|
+
function ut(e, t) {
|
|
329
332
|
let n = y.props.snapshot.stack, r = n.indexOf(e);
|
|
330
333
|
return r < 0 ? null : n[r + t * (je ? -1 : 1)] ?? null;
|
|
331
334
|
}
|
|
332
|
-
function
|
|
335
|
+
function dt(e) {
|
|
333
336
|
let t = (t) => {
|
|
334
|
-
let n = t < 0 ? 1 : -1, r = t ?
|
|
335
|
-
return
|
|
337
|
+
let n = t < 0 ? 1 : -1, r = t ? ut(e, n) : null;
|
|
338
|
+
return ct(r ? {
|
|
336
339
|
handle: r,
|
|
337
340
|
side: n
|
|
338
|
-
} : null), r ? Math.max(-
|
|
339
|
-
}, n = (e) =>
|
|
341
|
+
} : null), r ? Math.max(-U.width, Math.min(U.width, t)) : p(t, U.width);
|
|
342
|
+
}, n = (e) => z?.release("slide", e, () => ct(null));
|
|
340
343
|
return {
|
|
341
|
-
move: (e) =>
|
|
344
|
+
move: (e) => z?.drag("slide", t(e)),
|
|
342
345
|
end: (t, r) => {
|
|
343
|
-
let i = f(t, r,
|
|
344
|
-
negative: !!
|
|
345
|
-
positive: !!
|
|
346
|
-
}), a = i ?
|
|
346
|
+
let i = f(t, r, U.width, {
|
|
347
|
+
negative: !!ut(e, 1),
|
|
348
|
+
positive: !!ut(e, -1)
|
|
349
|
+
}), a = i ? ut(e, i < 0 ? 1 : -1) : null;
|
|
347
350
|
if (a) {
|
|
348
351
|
let e = J;
|
|
349
|
-
if (J = null,
|
|
352
|
+
if (J = null, z?.fling("slide", r * 1e3), x.navigate(S, a).status === "applied") return;
|
|
350
353
|
J = e;
|
|
351
354
|
}
|
|
352
355
|
n(J ? r * 1e3 : 0);
|
|
@@ -354,24 +357,24 @@ function j(y) {
|
|
|
354
357
|
cancel: () => n(0)
|
|
355
358
|
};
|
|
356
359
|
}
|
|
357
|
-
function
|
|
358
|
-
let e = We() ? 1 : -1, t = (t) => p(t, t * e > 0 ?
|
|
360
|
+
function ft() {
|
|
361
|
+
let e = We() ? 1 : -1, t = (t) => p(t, t * e > 0 ? U.height : c.swipe.minDistance);
|
|
359
362
|
return {
|
|
360
|
-
move: (e) =>
|
|
363
|
+
move: (e) => z?.drag("dragY", t(e)),
|
|
361
364
|
end: (t, n) => {
|
|
362
|
-
|
|
363
|
-
let r = Math.min(
|
|
365
|
+
z?.release("dragY", 0);
|
|
366
|
+
let r = Math.min(U.height, c.swipe.edge / c.swipe.distance);
|
|
364
367
|
f(t, n, r, {
|
|
365
368
|
negative: e < 0,
|
|
366
369
|
positive: e > 0
|
|
367
370
|
}) && x.collapseIsland(S);
|
|
368
371
|
},
|
|
369
|
-
cancel: () =>
|
|
372
|
+
cancel: () => z?.release("dragY", 0)
|
|
370
373
|
};
|
|
371
374
|
}
|
|
372
|
-
function
|
|
375
|
+
function pt(e, t) {
|
|
373
376
|
let n = M.current, r = N.current, { presented: i, open: a } = _(y.props.snapshot);
|
|
374
|
-
if (
|
|
377
|
+
if (V || !z || !G || !n || !r || !i || !n.contains(e)) return null;
|
|
375
378
|
let o, s = !1;
|
|
376
379
|
if (a ? (o = r.contains(e), s = o && t === "pointer" && !!e.closest(".cloudlet-clip > .cloudlet-slide > .cloudlet-header")) : o = t === "pointer" && !!e.closest("[data-cloudlet-pill]"), !o && !s) return null;
|
|
377
380
|
let { handle: c } = i;
|
|
@@ -389,7 +392,7 @@ function j(y) {
|
|
|
389
392
|
return {
|
|
390
393
|
x: o,
|
|
391
394
|
y: s,
|
|
392
|
-
start: (e) => a ? e === "x" ?
|
|
395
|
+
start: (e) => a ? e === "x" ? dt(c) : ft() : lt(c),
|
|
393
396
|
release() {
|
|
394
397
|
l || (l = !0, Me = null, x.setPause(S, {
|
|
395
398
|
scope: "notification",
|
|
@@ -400,36 +403,41 @@ function j(y) {
|
|
|
400
403
|
}
|
|
401
404
|
};
|
|
402
405
|
}
|
|
403
|
-
function
|
|
404
|
-
let
|
|
406
|
+
function mt(e) {
|
|
407
|
+
let t = M.current;
|
|
408
|
+
return !!t && _(y.props.snapshot).open && t.contains(e);
|
|
409
|
+
}
|
|
410
|
+
function ht() {
|
|
411
|
+
let e = A.current, t = M.current;
|
|
405
412
|
if (!e || !D || !t) return;
|
|
406
|
-
|
|
413
|
+
_e = !0;
|
|
407
414
|
let n = se.current?.sheet, r = `[data-cloudlet-instance="${y.props.snapshot.controller}"]`;
|
|
408
415
|
if (n) for (let [e, t] of Object.entries(te)) {
|
|
409
416
|
let i = n.insertRule(`${r}${t} {}`, n.cssRules.length);
|
|
410
|
-
|
|
417
|
+
L[e] = n.cssRules[i].style;
|
|
411
418
|
}
|
|
412
419
|
for (let e of [
|
|
413
420
|
P.current,
|
|
414
421
|
de.current,
|
|
415
422
|
fe.current
|
|
416
423
|
]) e?.setAttribute("inert", "");
|
|
417
|
-
|
|
418
|
-
begin:
|
|
424
|
+
pe.mount(e), q = d(e, {
|
|
425
|
+
begin: pt,
|
|
426
|
+
claimsWheel: mt,
|
|
419
427
|
now: () => D.performance.now()
|
|
420
428
|
});
|
|
421
429
|
let i = D.matchMedia?.("(prefers-reduced-motion: reduce)");
|
|
422
|
-
|
|
430
|
+
V = i?.matches ?? !1, e.dataset.reducedMotion = String(V), z = l({
|
|
423
431
|
now: () => D.performance.now(),
|
|
424
432
|
requestFrame: (e) => D.requestAnimationFrame(e),
|
|
425
433
|
cancelFrame: (e) => D.cancelAnimationFrame(e),
|
|
426
|
-
write:
|
|
427
|
-
reducedMotion:
|
|
434
|
+
write: qe,
|
|
435
|
+
reducedMotion: V,
|
|
428
436
|
timeScale: y.props.options.motion?.timeScale,
|
|
429
|
-
constants:
|
|
437
|
+
constants: B
|
|
430
438
|
});
|
|
431
439
|
let a = () => {
|
|
432
|
-
|
|
440
|
+
V = i?.matches ?? !1, e.dataset.reducedMotion = String(V), V && q?.cancel(), z?.setReducedMotion(V);
|
|
433
441
|
}, o = D.matchMedia?.("(min-width: 48rem)"), s = D.matchMedia?.("(prefers-color-scheme: dark)"), c = () => {
|
|
434
442
|
(y.props.options.theme ?? "system") === "system" && y.forceUpdate();
|
|
435
443
|
}, u = () => {
|
|
@@ -453,7 +461,7 @@ function j(y) {
|
|
|
453
461
|
E,
|
|
454
462
|
"pointerover",
|
|
455
463
|
(t) => {
|
|
456
|
-
|
|
464
|
+
xe && !(t.target instanceof D.Node && e.contains(t.target)) && Re(!1);
|
|
457
465
|
},
|
|
458
466
|
!0
|
|
459
467
|
],
|
|
@@ -470,7 +478,7 @@ function j(y) {
|
|
|
470
478
|
[
|
|
471
479
|
D,
|
|
472
480
|
"resize",
|
|
473
|
-
|
|
481
|
+
$e
|
|
474
482
|
]
|
|
475
483
|
];
|
|
476
484
|
i && p.push([
|
|
@@ -488,63 +496,63 @@ function j(y) {
|
|
|
488
496
|
]), D.visualViewport && p.push([
|
|
489
497
|
D.visualViewport,
|
|
490
498
|
"resize",
|
|
491
|
-
|
|
499
|
+
$e
|
|
492
500
|
], [
|
|
493
501
|
D.visualViewport,
|
|
494
502
|
"scroll",
|
|
495
503
|
Ue
|
|
496
504
|
]);
|
|
497
505
|
for (let [e, t, n, r] of p) e.addEventListener(t, n, r);
|
|
498
|
-
|
|
506
|
+
ge = () => {
|
|
499
507
|
for (let [e, t, n, r] of p) e.removeEventListener(t, n, r);
|
|
500
|
-
},
|
|
501
|
-
|
|
502
|
-
}) : null, N.current &&
|
|
508
|
+
}, H = D.ResizeObserver ? new D.ResizeObserver(() => {
|
|
509
|
+
Je(), Ze();
|
|
510
|
+
}) : null, N.current && H?.observe(N.current), H?.observe(e), f(), Z("window-blur", !E.hasFocus()), He(E.activeElement), Ue(), Le(), ot(h, _(y.props.snapshot), null), Ze(), tt();
|
|
503
511
|
}
|
|
504
|
-
function
|
|
512
|
+
function gt(e) {
|
|
505
513
|
let t = _(e.snapshot), n = _(y.props.snapshot), r = g(t, n), i = {
|
|
506
514
|
plan: r,
|
|
507
|
-
clones:
|
|
508
|
-
heading: r.morph !== "none" &&
|
|
509
|
-
height:
|
|
510
|
-
}, a =
|
|
511
|
-
if (
|
|
512
|
-
let o =
|
|
513
|
-
if (!o || !D || !(s instanceof D.HTMLElement) || s === o || !o.contains(s) ||
|
|
514
|
-
|
|
515
|
+
clones: it(r),
|
|
516
|
+
heading: r.morph !== "none" && G ? rt()?.getBoundingClientRect() ?? null : null,
|
|
517
|
+
height: U.height
|
|
518
|
+
}, a = I;
|
|
519
|
+
if (I = null, me = null, a && e.snapshot.notifications.some((e) => e.handle === a) && !y.props.snapshot.notifications.some((e) => e.handle === a)) return i;
|
|
520
|
+
let o = A.current, s = E.activeElement;
|
|
521
|
+
if (!o || !D || !(s instanceof D.HTMLElement) || s === o || !o.contains(s) || j(e.snapshot) === j(y.props.snapshot) && xt(e) === xt(y.props)) return i;
|
|
522
|
+
me = s;
|
|
515
523
|
let c = y.props.snapshot;
|
|
516
|
-
return
|
|
524
|
+
return he = !c.notifications.length && !c.overflow.pending, (!he || !Ve()) && o.focus({ preventScroll: !0 }), i;
|
|
517
525
|
}
|
|
518
|
-
function
|
|
519
|
-
let r =
|
|
520
|
-
|
|
526
|
+
function _t(e, t, n) {
|
|
527
|
+
let r = me;
|
|
528
|
+
me = null, he ? (he = !1, Ve()) : r && !Q(r) && (Q(et() ?? A.current?.querySelector("[data-cloudlet-overflow]") ?? null) || A.current?.focus({ preventScroll: !0 })), X && !xt(y.props) && yt(!1), z?.setTimeScale(y.props.options.motion?.timeScale), be();
|
|
521
529
|
let i = _(y.props.snapshot);
|
|
522
|
-
Me && (Me.handle !== i.presented?.handle || Me.open !== i.open) && q?.cancel(), J && (!i.open || !i.stack.includes(J.handle)) && (q?.cancel(),
|
|
530
|
+
Me && (Me.handle !== i.presented?.handle || Me.open !== i.open) && q?.cancel(), J && (!i.open || !i.stack.includes(J.handle)) && (q?.cancel(), ct(null)), e.snapshot === y.props.snapshot ? Je() : ot(_(e.snapshot), i, n), Le(), Ze(), tt(), He(E.activeElement);
|
|
523
531
|
}
|
|
524
|
-
function
|
|
525
|
-
q?.dispose(), q = null, J = null, Y = null,
|
|
532
|
+
function vt() {
|
|
533
|
+
q?.dispose(), q = null, J = null, Y = null, yt(!1), pe.dispose(), _e = !1, ge?.(), ge = null, H?.disconnect(), H = null, z?.dispose(), z = null, Te.clear();
|
|
526
534
|
let e = se.current?.sheet;
|
|
527
535
|
if (e) for (; e.cssRules.length;) e.deleteRule(0);
|
|
528
|
-
|
|
536
|
+
L = {};
|
|
529
537
|
for (let e of [
|
|
530
538
|
P.current,
|
|
531
539
|
de.current,
|
|
532
540
|
fe.current
|
|
533
|
-
])
|
|
534
|
-
|
|
541
|
+
]) nt(e);
|
|
542
|
+
De = null;
|
|
535
543
|
let t = E.activeElement;
|
|
536
|
-
|
|
544
|
+
A.current?.contains(t) && !Ve() && t?.blur();
|
|
537
545
|
}
|
|
538
|
-
function
|
|
539
|
-
D?.clearTimeout(Ne), Ne = void 0, X && (X = !1, e &&
|
|
546
|
+
function yt(e = !0) {
|
|
547
|
+
D?.clearTimeout(Ne), Ne = void 0, X && (X = !1, e && _e && y.forceUpdate());
|
|
540
548
|
}
|
|
541
|
-
function
|
|
542
|
-
X ? (
|
|
549
|
+
function bt() {
|
|
550
|
+
X ? (yt(), x.clearAll(S)) : (X = !0, Ne = D?.setTimeout(yt, ne), y.forceUpdate());
|
|
543
551
|
}
|
|
544
|
-
let
|
|
545
|
-
|
|
552
|
+
let xt = (e) => e.options.clearAll !== !1 && _(e.snapshot).open && e.snapshot.stack.length > 1, St = (e) => {
|
|
553
|
+
I = e, x.dismiss(S, e, "navigation").status !== "applied" && (I = null);
|
|
546
554
|
};
|
|
547
|
-
function
|
|
555
|
+
function Ct(e, t, n, r) {
|
|
548
556
|
if (e.defaultPrevented) return;
|
|
549
557
|
let i = null;
|
|
550
558
|
if (e.nativeEvent.isComposing) return;
|
|
@@ -557,22 +565,22 @@ function j(y) {
|
|
|
557
565
|
let a = i === null ? void 0 : t[i];
|
|
558
566
|
a && (e.preventDefault(), x.navigate(S, a));
|
|
559
567
|
}
|
|
560
|
-
function
|
|
568
|
+
function wt() {
|
|
561
569
|
let { snapshot: s, options: c } = y.props, l = {
|
|
562
570
|
...i,
|
|
563
571
|
...c.labels
|
|
564
572
|
}, u = s.controller ?? "cloudlet", d = c.dir ?? (E.documentElement.dir === "rtl" ? "rtl" : "ltr"), f = c.theme ?? "system";
|
|
565
573
|
je = d === "rtl";
|
|
566
574
|
let p = `${u}-island`, m = _(s), { presented: h, open: g, total: v, index: b, missed: T } = m;
|
|
567
|
-
m.badge && (
|
|
568
|
-
let te = g && J ? s.notifications.find((e) => e.handle === J.handle) : void 0, ne = c.position ?? "auto", O = ne
|
|
575
|
+
m.badge && (Ee = m.count);
|
|
576
|
+
let te = g && J ? s.notifications.find((e) => e.handle === J.handle) : void 0, ne = c.position ?? "auto", O = String(ne), k = O.startsWith("bottom-") || ne === "auto" && D?.matchMedia?.("(min-width: 48rem)").matches === !1, ie = O.endsWith("-left") ? "left" : O.endsWith("-right") ? "right" : "center", ae = Math.min(2, Math.max(m.depth, K)), j = h ? o(x, S, h.handle, ze) : null, pe = Ie(l.page, i.page, b + 1, v), F = Ie(l.clearAllConfirm, i.clearAllConfirm, v), I = a(c.classNames);
|
|
569
577
|
return /* @__PURE__ */ w(ee, { children: [c.offsets && /* @__PURE__ */ C(oe, {
|
|
570
578
|
instance: u,
|
|
571
579
|
offsets: c.offsets,
|
|
572
580
|
nonce: c.nonce
|
|
573
581
|
}, c.nonce ?? ""), /* @__PURE__ */ w("div", {
|
|
574
|
-
ref:
|
|
575
|
-
className:
|
|
582
|
+
ref: A,
|
|
583
|
+
className: I("host", "cloudlet-host"),
|
|
576
584
|
role: "region",
|
|
577
585
|
"aria-label": l.region,
|
|
578
586
|
tabIndex: -1,
|
|
@@ -581,26 +589,27 @@ function j(y) {
|
|
|
581
589
|
"data-theme": f,
|
|
582
590
|
"data-resolved-theme": f === "system" ? D?.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light" : f,
|
|
583
591
|
"data-position": ne,
|
|
584
|
-
"data-edge":
|
|
592
|
+
"data-edge": k ? "bottom" : "top",
|
|
593
|
+
"data-align": ie,
|
|
585
594
|
"data-state": g ? "island" : "stack",
|
|
586
595
|
"data-island-reason": s.island.reason ?? void 0,
|
|
587
596
|
"data-overflow": s.overflow.pending,
|
|
588
597
|
dir: d,
|
|
589
598
|
onPointerDownCapture: (e) => {
|
|
590
|
-
|
|
599
|
+
R = e.target.closest("button");
|
|
591
600
|
},
|
|
592
601
|
onPointerCancelCapture: () => {
|
|
593
|
-
|
|
602
|
+
R = null;
|
|
594
603
|
},
|
|
595
604
|
onKeyDownCapture: (e) => {
|
|
596
|
-
(e.key === "Enter" || e.key === " ") && e.target.closest("button") && (
|
|
605
|
+
(e.key === "Enter" || e.key === " ") && e.target.closest("button") && (ve = e.repeat, e.repeat ? e.preventDefault() : R = e.target.closest("button"));
|
|
597
606
|
},
|
|
598
607
|
onKeyUpCapture: () => {
|
|
599
|
-
|
|
608
|
+
ve = !1;
|
|
600
609
|
},
|
|
601
610
|
onClickCapture: (e) => {
|
|
602
611
|
let t = e.target.closest("button"), n = !!t?.matches("[data-cloudlet-control=\"action\"], [data-cloudlet-control=\"retry\"], [data-cloudlet-control=\"cancel\"], [data-cloudlet-control=\"clear\"]");
|
|
603
|
-
t && (
|
|
612
|
+
t && (ve || n && e.detail > 1 || R && R !== t) && (e.preventDefault(), e.stopPropagation()), R = null;
|
|
604
613
|
},
|
|
605
614
|
onFocus: (e) => {
|
|
606
615
|
Be(e.relatedTarget), He(E.activeElement);
|
|
@@ -614,18 +623,18 @@ function j(y) {
|
|
|
614
623
|
"data-cloudlet-motion": ""
|
|
615
624
|
}), /* @__PURE__ */ w("div", {
|
|
616
625
|
ref: ce,
|
|
617
|
-
className:
|
|
626
|
+
className: I("stack", "cloudlet-stack"),
|
|
618
627
|
"data-empty": !h,
|
|
619
628
|
children: [
|
|
620
|
-
[1, 2].filter((e) => e <=
|
|
621
|
-
className:
|
|
629
|
+
[1, 2].filter((e) => e <= ae).map((e) => /* @__PURE__ */ C("div", {
|
|
630
|
+
className: I("tail", "cloudlet-tail"),
|
|
622
631
|
"data-cloudlet-tail": e,
|
|
623
632
|
"aria-hidden": "true"
|
|
624
633
|
}, e)),
|
|
625
634
|
/* @__PURE__ */ w("div", {
|
|
626
635
|
ref: M,
|
|
627
636
|
id: p,
|
|
628
|
-
className:
|
|
637
|
+
className: I("island", "cloudlet-shell"),
|
|
629
638
|
hidden: !h,
|
|
630
639
|
"data-state": g ? "island" : "stack",
|
|
631
640
|
"data-kind": h?.kind,
|
|
@@ -635,7 +644,7 @@ function j(y) {
|
|
|
635
644
|
"aria-label": l.island,
|
|
636
645
|
"aria-describedby": `${p}-hint`
|
|
637
646
|
} : {},
|
|
638
|
-
onKeyDown: g ? (e) =>
|
|
647
|
+
onKeyDown: g ? (e) => Ct(e, s.stack, b, d === "rtl") : void 0,
|
|
639
648
|
children: [
|
|
640
649
|
/* @__PURE__ */ C("svg", {
|
|
641
650
|
ref: le,
|
|
@@ -653,7 +662,7 @@ function j(y) {
|
|
|
653
662
|
className: "cloudlet-slide-out",
|
|
654
663
|
"aria-hidden": "true"
|
|
655
664
|
}),
|
|
656
|
-
h &&
|
|
665
|
+
h && j && /* @__PURE__ */ w("div", {
|
|
657
666
|
className: "cloudlet-slide",
|
|
658
667
|
"data-cloudlet-presented": h.handle.generation,
|
|
659
668
|
"data-kind": h.kind,
|
|
@@ -661,16 +670,16 @@ function j(y) {
|
|
|
661
670
|
...g ? {
|
|
662
671
|
role: "group",
|
|
663
672
|
"aria-roledescription": l.slide,
|
|
664
|
-
"aria-label":
|
|
673
|
+
"aria-label": pe
|
|
665
674
|
} : {},
|
|
666
675
|
children: [
|
|
667
676
|
/* @__PURE__ */ w("div", {
|
|
668
|
-
className:
|
|
677
|
+
className: I("header", "cloudlet-header"),
|
|
669
678
|
"aria-hidden": g ? void 0 : "true",
|
|
670
679
|
children: [/* @__PURE__ */ C(t, {
|
|
671
680
|
notification: h,
|
|
672
|
-
slot:
|
|
673
|
-
part:
|
|
681
|
+
slot: j,
|
|
682
|
+
part: I,
|
|
674
683
|
titleId: `${p}-title`
|
|
675
684
|
}), /* @__PURE__ */ C("div", {
|
|
676
685
|
className: "cloudlet-heading-out",
|
|
@@ -683,9 +692,9 @@ function j(y) {
|
|
|
683
692
|
bridge: x,
|
|
684
693
|
lease: S,
|
|
685
694
|
labels: l,
|
|
686
|
-
navigate:
|
|
687
|
-
slot:
|
|
688
|
-
part:
|
|
695
|
+
navigate: St,
|
|
696
|
+
slot: j,
|
|
697
|
+
part: I,
|
|
689
698
|
titleId: `${p}-title`
|
|
690
699
|
}),
|
|
691
700
|
/* @__PURE__ */ C("div", {
|
|
@@ -701,19 +710,19 @@ function j(y) {
|
|
|
701
710
|
children: /* @__PURE__ */ C(n, {
|
|
702
711
|
notification: te,
|
|
703
712
|
labels: l,
|
|
704
|
-
part:
|
|
713
|
+
part: I
|
|
705
714
|
})
|
|
706
715
|
}),
|
|
707
|
-
h && g && r(l,
|
|
716
|
+
h && g && r(l, I, () => x.dismiss(S, h.handle, "close-button")),
|
|
708
717
|
g && (v > 1 || T > 0) && /* @__PURE__ */ w("div", {
|
|
709
|
-
className:
|
|
718
|
+
className: I("indicator", "cloudlet-indicator"),
|
|
710
719
|
children: [
|
|
711
720
|
v > 5 ? /* @__PURE__ */ w("p", {
|
|
712
721
|
className: "cloudlet-page",
|
|
713
722
|
"aria-hidden": "true",
|
|
714
723
|
children: [/* @__PURE__ */ C("span", {
|
|
715
724
|
className: "cloudlet-page-value",
|
|
716
|
-
children:
|
|
725
|
+
children: pe
|
|
717
726
|
}), /* @__PURE__ */ C("span", { className: "cloudlet-page-out" })]
|
|
718
727
|
}) : v > 1 && /* @__PURE__ */ C("div", {
|
|
719
728
|
className: "cloudlet-dots",
|
|
@@ -729,27 +738,27 @@ function j(y) {
|
|
|
729
738
|
})
|
|
730
739
|
}, e.generation))
|
|
731
740
|
}),
|
|
732
|
-
|
|
741
|
+
xt(y.props) && /* @__PURE__ */ w(ee, { children: [/* @__PURE__ */ w("button", {
|
|
733
742
|
type: "button",
|
|
734
|
-
className:
|
|
743
|
+
className: I("clear", "cloudlet-clear"),
|
|
735
744
|
"data-cloudlet-control": "clear",
|
|
736
745
|
"data-armed": X,
|
|
737
|
-
onClick:
|
|
738
|
-
onBlur: () =>
|
|
746
|
+
onClick: bt,
|
|
747
|
+
onBlur: () => yt(),
|
|
739
748
|
children: [/* @__PURE__ */ C("span", {
|
|
740
749
|
"aria-hidden": X || void 0,
|
|
741
750
|
children: l.clearAll
|
|
742
751
|
}), /* @__PURE__ */ C("span", {
|
|
743
752
|
"aria-hidden": !X || void 0,
|
|
744
|
-
children:
|
|
753
|
+
children: F
|
|
745
754
|
})]
|
|
746
755
|
}), /* @__PURE__ */ C("span", {
|
|
747
756
|
role: "status",
|
|
748
757
|
className: "cloudlet-live",
|
|
749
|
-
children: X ?
|
|
758
|
+
children: X ? F : ""
|
|
750
759
|
})] }),
|
|
751
760
|
T > 0 && /* @__PURE__ */ w("div", {
|
|
752
|
-
className:
|
|
761
|
+
className: I("overflow", "cloudlet-overflow"),
|
|
753
762
|
children: [/* @__PURE__ */ C("p", { children: Ie(l.overflowCount, i.overflowCount, T) }), /* @__PURE__ */ C("button", {
|
|
754
763
|
type: "button",
|
|
755
764
|
"data-cloudlet-overflow": "",
|
|
@@ -773,7 +782,7 @@ function j(y) {
|
|
|
773
782
|
}),
|
|
774
783
|
h && !g && /* @__PURE__ */ C("button", {
|
|
775
784
|
type: "button",
|
|
776
|
-
className:
|
|
785
|
+
className: I("pill", "cloudlet-pill"),
|
|
777
786
|
"data-cloudlet-pill": "",
|
|
778
787
|
"aria-expanded": "false",
|
|
779
788
|
"aria-controls": p,
|
|
@@ -781,11 +790,11 @@ function j(y) {
|
|
|
781
790
|
"aria-label": [Ie(l.stackSummary, i.stackSummary, h.content.title, v, T), ...h.draft ? [l.draft] : []].join(", ")
|
|
782
791
|
}),
|
|
783
792
|
/* @__PURE__ */ w("span", {
|
|
784
|
-
className:
|
|
793
|
+
className: I("badge", "cloudlet-badge"),
|
|
785
794
|
"aria-hidden": "true",
|
|
786
795
|
children: [/* @__PURE__ */ C("span", {
|
|
787
796
|
className: "cloudlet-badge-value",
|
|
788
|
-
children:
|
|
797
|
+
children: Ee
|
|
789
798
|
}), /* @__PURE__ */ C("span", { className: "cloudlet-badge-out" })]
|
|
790
799
|
})
|
|
791
800
|
]
|
|
@@ -800,14 +809,14 @@ function j(y) {
|
|
|
800
809
|
})] });
|
|
801
810
|
}
|
|
802
811
|
return {
|
|
803
|
-
componentDidMount:
|
|
804
|
-
getSnapshotBeforeUpdate:
|
|
805
|
-
componentDidUpdate:
|
|
806
|
-
componentWillUnmount:
|
|
807
|
-
render:
|
|
812
|
+
componentDidMount: ht,
|
|
813
|
+
getSnapshotBeforeUpdate: gt,
|
|
814
|
+
componentDidUpdate: _t,
|
|
815
|
+
componentWillUnmount: vt,
|
|
816
|
+
render: wt
|
|
808
817
|
};
|
|
809
818
|
}
|
|
810
|
-
function
|
|
819
|
+
function j(e) {
|
|
811
820
|
let t = e.notifications.find((e) => e.location === "current");
|
|
812
821
|
return [
|
|
813
822
|
e.island.open,
|