@cloudlet/toast 1.1.1 → 1.2.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 +34 -0
- package/README.md +7 -0
- package/dist/contracts/internal.d.ts +8 -0
- package/dist/contracts/internal.d.ts.map +1 -1
- package/dist/contracts/notifications.d.ts +1 -1
- package/dist/contracts/notifications.d.ts.map +1 -1
- package/dist/core/bridge.js +1 -0
- package/dist/core/bridge.js.map +1 -1
- package/dist/core/controller.d.ts +2 -1
- package/dist/core/controller.d.ts.map +1 -1
- package/dist/core/controller.js +45 -41
- package/dist/core/controller.js.map +1 -1
- package/dist/react/card.d.ts.map +1 -1
- package/dist/react/card.js +2 -0
- package/dist/react/card.js.map +1 -1
- package/dist/react/host.d.ts.map +1 -1
- package/dist/react/host.js +225 -194
- package/dist/react/host.js.map +1 -1
- package/dist/react.d.ts +7 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/contracts/internal.ts +4 -0
- package/src/contracts/notifications.ts +1 -0
- package/src/core/bridge.ts +2 -0
- package/src/core/controller.ts +23 -16
- package/src/react/card.tsx +2 -1
- package/src/react/host.tsx +41 -4
- package/src/react.ts +7 -1
package/dist/react/host.js
CHANGED
|
@@ -46,35 +46,35 @@ var E = ".cloudlet-exit,.cloudlet-slide-out,.cloudlet-chrome-out,.cloudlet-headi
|
|
|
46
46
|
exitClip: " .cloudlet-stack > .cloudlet-exit > .cloudlet-shell > .cloudlet-clip",
|
|
47
47
|
exitBg: " .cloudlet-stack > .cloudlet-exit > .cloudlet-shell > .cloudlet-bg",
|
|
48
48
|
exitBadge: " .cloudlet-stack > .cloudlet-exit > .cloudlet-shell > .cloudlet-badge"
|
|
49
|
-
}, O = (e) => Math.max(0, Math.min(1, e)),
|
|
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
50
|
function A(e, t, n) {
|
|
51
51
|
let r = parseFloat(e?.getPropertyValue(t) ?? "");
|
|
52
52
|
return Number.isFinite(r) ? r : n;
|
|
53
53
|
}
|
|
54
54
|
function j(y) {
|
|
55
|
-
let { bridge: x, lease: S, document: E } = y.props, D = E.defaultView, j = b(),
|
|
55
|
+
let { bridge: x, lease: S, document: E } = y.props, D = E.defaultView, j = b(), se = b(), ce = b(), M = b(), N = b(), le = b(), ue = b(), P = b(), de = b(), fe = b(), F = s(x, S, E, () => y.props.options.announcements), pe = null, me = null, he = null, ge = !1, _e = null, I = {}, ve = !1, L = null, ye = !1, R = null, be = y.props.options.motion?.overrides, z = u(be), xe = () => {
|
|
56
56
|
let e = y.props.options.motion?.overrides;
|
|
57
|
-
e !==
|
|
58
|
-
}, B = !1,
|
|
57
|
+
e !== be && (be = e, z = u(e), R?.setConstants(z));
|
|
58
|
+
}, B = !1, Se = !1, V = null, H = {
|
|
59
59
|
width: 0,
|
|
60
60
|
height: 0,
|
|
61
61
|
bodyTop: 0
|
|
62
|
-
},
|
|
62
|
+
}, Ce = 0, we = -Infinity, U = {
|
|
63
63
|
tailOffset: 4,
|
|
64
64
|
tailScale: .9,
|
|
65
65
|
pillHeight: 44
|
|
66
|
-
}, W = !1,
|
|
67
|
-
function
|
|
66
|
+
}, W = !1, Te = "instant", Ee = /* @__PURE__ */ new Set(), G = 0, De = 2, K = 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
|
+
function Ie(e, t, ...n) {
|
|
68
68
|
try {
|
|
69
69
|
let t = e(...n);
|
|
70
70
|
if (typeof t != "string") throw TypeError("Label formatter must return a string");
|
|
71
71
|
return t;
|
|
72
72
|
} catch (r) {
|
|
73
|
-
return
|
|
73
|
+
return Pe.has(e) || (Pe.add(e), Fe.push(r)), t(...n);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
for (let e of
|
|
76
|
+
function Le() {
|
|
77
|
+
for (let e of Fe.splice(0)) x.reportDiagnostic(S, {
|
|
78
78
|
code: "formatter-error",
|
|
79
79
|
source: "Toaster.labels",
|
|
80
80
|
message: "A label formatter failed",
|
|
@@ -85,16 +85,16 @@ function j(y) {
|
|
|
85
85
|
scope: "host",
|
|
86
86
|
reason: e,
|
|
87
87
|
active: t
|
|
88
|
-
}),
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
if (
|
|
88
|
+
}), Re = (e) => {
|
|
89
|
+
Se !== e && (Se = e, Z("hover", e), R?.setHover(e));
|
|
90
|
+
}, ze = (e) => {
|
|
91
|
+
if (Be(e), !(D && e instanceof D.HTMLElement && !e.closest(".cloudlet-slot") && Q(e)) && !Q(pe)) {
|
|
92
92
|
let e = E.activeElement;
|
|
93
93
|
D && e instanceof D.HTMLElement && e.blur(), j.current?.focus({ preventScroll: !0 });
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
function
|
|
97
|
-
D && e instanceof D.HTMLElement && e !== E.body && !j.current?.contains(e) && (
|
|
96
|
+
function Be(e) {
|
|
97
|
+
D && e instanceof D.HTMLElement && e !== E.body && !j.current?.contains(e) && (pe = 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;
|
|
@@ -104,20 +104,20 @@ function j(y) {
|
|
|
104
104
|
}
|
|
105
105
|
return e.focus({ preventScroll: !0 }), E.activeElement === e;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
if (Q(
|
|
107
|
+
function Ve() {
|
|
108
|
+
if (Q(pe)) 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");
|
|
112
112
|
let t = Q(E.body);
|
|
113
113
|
return e === null ? E.body.removeAttribute("tabindex") : E.body.setAttribute("tabindex", e), t;
|
|
114
114
|
}
|
|
115
|
-
let
|
|
115
|
+
let He = (e) => {
|
|
116
116
|
let t = !!e && !!j.current?.contains(e);
|
|
117
117
|
Z("focus", t), x.setFocused(S, t ? x.getSnapshot().presentation?.handle ?? null : null);
|
|
118
118
|
};
|
|
119
|
-
function
|
|
120
|
-
if (!
|
|
119
|
+
function Ue() {
|
|
120
|
+
if (!ve || !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",
|
|
@@ -128,13 +128,13 @@ function j(y) {
|
|
|
128
128
|
"height"
|
|
129
129
|
]) I.viewport?.setProperty(`--cloudlet-viewport-${e}`, `${n[e]}px`);
|
|
130
130
|
}
|
|
131
|
-
let
|
|
132
|
-
function
|
|
133
|
-
let t = I, { 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 =
|
|
131
|
+
let We = () => j.current?.dataset.edge === "bottom", Ge = () => We() ? 1 : -1;
|
|
132
|
+
function Ke(e) {
|
|
133
|
+
let t = I, { 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 ? H.height - i : 0;
|
|
134
134
|
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 c =
|
|
136
|
-
if (c && (c.setAttribute("width", String(r)), c.setAttribute("height", String(i)),
|
|
137
|
-
let i = n ? 1 : z.badge.scale + (1 - z.badge.scale) * e.badge, a = (r / 2 - 10) * (
|
|
135
|
+
let c = le.current;
|
|
136
|
+
if (c && (c.setAttribute("width", String(r)), c.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 = `translateX(-50%) translateY(${k(s)})`), t.clip && (t.clip.clipPath = `path("${m(r, i, a, (H.width - r) / 2, s)}")`), t.badge) {
|
|
137
|
+
let i = n ? 1 : z.badge.scale + (1 - z.badge.scale) * e.badge, a = (r / 2 - 10) * (je ? -1 : 1);
|
|
138
138
|
t.badge.opacity = String(O(e.badge)), t.badge.transform = `translate(calc(${k(a)} - 50%), ${o ? "6px" : "-6px"}) scale(${i})`;
|
|
139
139
|
}
|
|
140
140
|
let l = o ? -1 : 1;
|
|
@@ -154,17 +154,17 @@ function j(y) {
|
|
|
154
154
|
[t.badgeOut, e.badgeOut],
|
|
155
155
|
[t.pageIn, e.pageIn],
|
|
156
156
|
[t.pageOut, e.pageOut]
|
|
157
|
-
]) r && (r.opacity = String(O(i)), r.filter =
|
|
158
|
-
t.chrome && (t.chrome.opacity = String(O(e.chrome)), t.chrome.transform = n ? "none" : `translateY(${k((1 - O(e.chrome)) * z.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)) * z.chromeOffset + (1 - O(e.bodyIn)) * z.bodyOffset)})`), t.bodyOut && (t.bodyOut.opacity = String(O(e.bodyOut))), t.exit && (t.exit.opacity = String(O(e.exitOpacity)), t.exit.transform = n ? "translateX(-50%)" : `translateX(-50%) translate(${k(e.exitX)}, ${k(e.exitY)}) scale(${e.exitScale})`),
|
|
157
|
+
]) r && (r.opacity = String(O(i)), r.filter = ie((1 - O(i)) * z.blur, n));
|
|
158
|
+
t.chrome && (t.chrome.opacity = String(O(e.chrome)), t.chrome.transform = n ? "none" : `translateY(${k((1 - O(e.chrome)) * z.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)) * z.chromeOffset + (1 - O(e.bodyIn)) * z.bodyOffset)})`), t.bodyOut && (t.bodyOut.opacity = String(O(e.bodyOut))), t.exit && (t.exit.opacity = String(O(e.exitOpacity)), t.exit.transform = n ? "translateX(-50%)" : `translateX(-50%) translate(${k(e.exitX)}, ${k(e.exitY)}) scale(${e.exitScale})`), ke && K?.isConnected && K.setAttribute("stroke-dasharray", `${Math.round(e.progress * 1e4) / 100} 100`);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
161
|
-
let e =
|
|
160
|
+
function qe() {
|
|
161
|
+
let e = ce.current, t = N.current, n = _(y.props.snapshot).presented;
|
|
162
162
|
if (!e || !t || !D || !R || !n) {
|
|
163
163
|
W = !1;
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
166
|
let r = e.getBoundingClientRect();
|
|
167
|
-
if (W = r.width > 0 && r.height > 0,
|
|
167
|
+
if (W = r.width > 0 && r.height > 0, Ye(n), !W) return;
|
|
168
168
|
let i = D.getComputedStyle(j.current);
|
|
169
169
|
U = {
|
|
170
170
|
tailOffset: A(i, "--cloudlet-tail-offset", 4),
|
|
@@ -180,12 +180,12 @@ function j(y) {
|
|
|
180
180
|
width: r.width,
|
|
181
181
|
height: r.height,
|
|
182
182
|
radius: s
|
|
183
|
-
},
|
|
183
|
+
}, Te), Te = "close", Je();
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Je() {
|
|
186
186
|
let e = $();
|
|
187
187
|
if (!e) return;
|
|
188
|
-
let t =
|
|
188
|
+
let t = nt()?.querySelector("[data-cloudlet-title]")?.id;
|
|
189
189
|
if (e.scrollHeight - e.clientHeight > 1 && t) e.tabIndex = 0, e.setAttribute("role", "group"), e.setAttribute("aria-labelledby", t);
|
|
190
190
|
else for (let t of [
|
|
191
191
|
"tabindex",
|
|
@@ -193,117 +193,117 @@ function j(y) {
|
|
|
193
193
|
"aria-labelledby"
|
|
194
194
|
]) e.removeAttribute(t);
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function Ye(e) {
|
|
197
197
|
let t = e && !W && x.getSnapshot().presentation?.readable ? e.handle : null;
|
|
198
|
-
t !==
|
|
198
|
+
t !== Ae && (Ae && x.setPause(S, {
|
|
199
199
|
scope: "notification",
|
|
200
|
-
handle:
|
|
200
|
+
handle: Ae,
|
|
201
201
|
reason: "content-transition",
|
|
202
202
|
active: !1
|
|
203
|
-
}),
|
|
203
|
+
}), Ae = t, t && x.setPause(S, {
|
|
204
204
|
scope: "notification",
|
|
205
205
|
handle: t,
|
|
206
206
|
reason: "content-transition",
|
|
207
207
|
active: !0
|
|
208
208
|
}));
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Xe() {
|
|
211
211
|
let e = x.getSnapshot().presentation;
|
|
212
|
-
if (!e?.token || e.readable ||
|
|
212
|
+
if (!e?.token || e.readable || Ee.size) return;
|
|
213
213
|
let t = M.current?.querySelector(`[data-cloudlet-presented="${e.handle.generation}"]`), n = t?.getBoundingClientRect();
|
|
214
214
|
t && W && n?.width && n.height && D?.getComputedStyle(t).visibility !== "hidden" && x.acknowledgePresentation(S, e.handle, e.token);
|
|
215
215
|
}
|
|
216
|
-
let
|
|
217
|
-
|
|
218
|
-
}),
|
|
219
|
-
|
|
216
|
+
let Ze = (e) => (Ee.add(e), () => {
|
|
217
|
+
Ee.delete(e), Xe();
|
|
218
|
+
}), Qe = () => {
|
|
219
|
+
Ue(), qe(), Xe();
|
|
220
220
|
};
|
|
221
|
-
function
|
|
221
|
+
function $e() {
|
|
222
222
|
let e = j.current;
|
|
223
223
|
return (y.props.snapshot.island.open ? e?.querySelector(".cloudlet-slide [data-cloudlet-title]") : null) ?? e?.querySelector("[data-cloudlet-pill]") ?? null;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function et() {
|
|
226
226
|
let e = y.props.snapshot.focusRequest;
|
|
227
227
|
if (!e || x.getSnapshot().focusRequest?.token !== e.token) return;
|
|
228
228
|
let t = j.current, n = e.target, r = null;
|
|
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}"]`) :
|
|
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}"]`) : $e() : null), Be(E.activeElement);
|
|
230
230
|
let i = Q(r);
|
|
231
231
|
x.acknowledgeFocus(S, e.token, i ? "focused" : "unavailable");
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function tt(e) {
|
|
234
234
|
e?.replaceChildren();
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function nt() {
|
|
237
237
|
return M.current?.querySelector(":scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-header > .cloudlet-heading") ?? null;
|
|
238
238
|
}
|
|
239
239
|
function $() {
|
|
240
240
|
return M.current?.querySelector(":scope > .cloudlet-clip > .cloudlet-slide > .cloudlet-body") ?? null;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function rt(e) {
|
|
243
243
|
let t = M.current, n = N.current;
|
|
244
244
|
if (!t || !n || !W) return {};
|
|
245
245
|
let r = {};
|
|
246
246
|
(e.presence === "exit" || e.presence === "rise" || e.presence === "replace") && (r.exit = T(t), I.exitClip && (I.exitClip.clipPath = I.clip?.clipPath ?? ""), I.exitBg && (I.exitBg.borderRadius = I.bg?.borderRadius ?? ""), I.exitBadge && (I.exitBadge.opacity = I.badge?.opacity ?? "", I.exitBadge.transform = I.badge?.transform ?? ""), I.exit && (I.exit.width = k(H.width)));
|
|
247
247
|
let i = $();
|
|
248
|
-
if (e.slide && i && (r.slide = T(i),
|
|
248
|
+
if (e.slide && i && (r.slide = T(i), Ce = i.offsetTop, I.slideOut && (I.slideOut.width = k(H.width))), e.morph === "close") {
|
|
249
249
|
let e = T(n);
|
|
250
250
|
e.querySelector(".cloudlet-header")?.classList.add("cloudlet-ghost"), r.chrome = e, I.chromeOut && (I.chromeOut.width = k(H.width));
|
|
251
251
|
}
|
|
252
|
-
let a =
|
|
252
|
+
let a = nt();
|
|
253
253
|
e.header && a && (r.header = T(a));
|
|
254
|
-
let o = $(), s = R?.now() ?? 0, c = e.body && s -
|
|
255
|
-
e.body && (
|
|
254
|
+
let o = $(), s = R?.now() ?? 0, c = e.body && s - we < (R?.constants.bodyQuiet ?? 0);
|
|
255
|
+
e.body && (we = s), e.body && !e.slide && o && !c && !R?.swapping("body") && (r.body = T(o), I.bodyOut && (I.bodyOut.top = k(o.offsetTop)));
|
|
256
256
|
let l = t.querySelector(":scope > .cloudlet-badge > .cloudlet-badge-value");
|
|
257
257
|
e.badge && l && (r.badge = T(l));
|
|
258
258
|
let u = n.querySelector(":scope > .cloudlet-indicator > .cloudlet-page > .cloudlet-page-value");
|
|
259
259
|
return e.page && u && (r.page = T(u)), r;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
262
|
-
let n = M.current, r = e === "exit" ? P.current : e === "slide" ?
|
|
261
|
+
function it(e, t) {
|
|
262
|
+
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
263
|
return r ? (r.setAttribute("inert", ""), r.replaceChildren(t), r) : null;
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function at(e, t, n) {
|
|
266
266
|
if (!R) return;
|
|
267
267
|
let r = n?.plan ?? g(e, t);
|
|
268
|
-
|
|
268
|
+
ot(t);
|
|
269
269
|
let i = {};
|
|
270
|
-
for (let [e, t] of Object.entries(n?.clones ?? {})) i[e] =
|
|
271
|
-
let a = (e) => () =>
|
|
270
|
+
for (let [e, t] of Object.entries(n?.clones ?? {})) i[e] = it(e, t);
|
|
271
|
+
let a = (e) => () => tt(i[e]), o = () => {
|
|
272
272
|
G && (G = 0, y.forceUpdate());
|
|
273
|
-
}, s = () =>
|
|
274
|
-
r.presence === "enter" ?
|
|
275
|
-
let c = n?.heading, l = c && r.morph !== "none" ?
|
|
273
|
+
}, s = () => tt(P.current);
|
|
274
|
+
r.presence === "enter" ? Te = "instant" : r.morph === "open" && (Te = "open"), qe();
|
|
275
|
+
let c = n?.heading, l = c && r.morph !== "none" ? nt()?.getBoundingClientRect() : null;
|
|
276
276
|
c && l && R.shiftHeading(c.left - l.left, c.top - l.top, r.morph === "open" ? "open" : "close");
|
|
277
|
-
let u =
|
|
278
|
-
|
|
277
|
+
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 ? R.exit(u, s, d) : d && R.release("dragX", 0), r.presence === "exit" && R.hide()), (r.presence === "enter" || r.presence === "replace") && (R.enter(u, Ze("presence")), r.presence === "enter" && (R.setTails(t.depth, "settle", 0, o), t.open ? R.open() : R.setBadge(t.badge))), r.presence === "rise" && (R.rise(-u * U.tailOffset, U.tailScale, Ze("presence")), R.swap("header", Ze("header"), !0)), (r.tails === "arrival" || r.tails === "rise" || r.tails === "settle") && (t.depth < e.depth && (G = Math.max(G, e.depth)), R.setTails(t.depth, r.tails, e.depth, o)), r.morph === "open" ? (G = Math.max(G, e.depth), R.open(o)) : r.morph === "close" && R.collapse(t.depth, t.badge, {
|
|
279
279
|
chrome: a("chrome"),
|
|
280
280
|
tails: o
|
|
281
281
|
});
|
|
282
|
-
let f =
|
|
283
|
-
if (I.slideOut && (I.slideOut.top = k(f +
|
|
284
|
-
let e =
|
|
285
|
-
R.slide(
|
|
286
|
-
|
|
282
|
+
let f = We() && n ? H.height - n.height : 0;
|
|
283
|
+
if (I.slideOut && (I.slideOut.top = k(f + Ce)), I.chromeOut && i.chrome && (I.chromeOut.top = k(f)), r.slide) {
|
|
284
|
+
let e = Ze("slide");
|
|
285
|
+
R.slide(je ? -r.slide : r.slide, H.width, () => {
|
|
286
|
+
tt(i.slide), e();
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
if (i.header) {
|
|
290
|
-
let e =
|
|
290
|
+
let e = Ze("header");
|
|
291
291
|
R.swap("header", () => {
|
|
292
|
-
|
|
292
|
+
tt(i.header), e();
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
295
|
i.body && R.swap("body", a("body")), i.badge && R.swap("badge", a("badge")), i.page && R.swap("page", a("page")), !t.open && e.presented && t.presented && r.morph === "none" && R.setBadge(t.badge);
|
|
296
296
|
let p = x.getSnapshot().presentation;
|
|
297
297
|
r.begin && r.header && t.presented && p?.token && p.readable && p.handle === t.presented.handle && x.beginPresentation(S, t.presented.handle, p.token);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
300
|
-
let t = e.presented, n = t?.content.progress, r =
|
|
301
|
-
K = r,
|
|
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
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function st(e) {
|
|
304
304
|
(J?.handle !== e?.handle || J?.side !== e?.side) && (J = e, y.forceUpdate());
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function ct(e) {
|
|
307
307
|
return {
|
|
308
308
|
move: (e) => R?.drag("dragX", e),
|
|
309
309
|
end: (t, n) => {
|
|
@@ -312,38 +312,38 @@ function j(y) {
|
|
|
312
312
|
positive: !0
|
|
313
313
|
});
|
|
314
314
|
if (r) {
|
|
315
|
-
if (
|
|
315
|
+
if (Y = {
|
|
316
316
|
handle: e,
|
|
317
317
|
direction: r,
|
|
318
318
|
distance: H.width,
|
|
319
319
|
velocity: n * 1e3
|
|
320
320
|
}, x.dismiss(S, e, "swipe").status === "applied") return;
|
|
321
|
-
|
|
321
|
+
Y = null;
|
|
322
322
|
}
|
|
323
323
|
R?.release("dragX", n * 1e3);
|
|
324
324
|
},
|
|
325
325
|
cancel: () => R?.release("dragX", 0)
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function lt(e, t) {
|
|
329
329
|
let n = y.props.snapshot.stack, r = n.indexOf(e);
|
|
330
|
-
return r < 0 ? null : n[r + t * (
|
|
330
|
+
return r < 0 ? null : n[r + t * (je ? -1 : 1)] ?? null;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function ut(e) {
|
|
333
333
|
let t = (t) => {
|
|
334
|
-
let n = t < 0 ? 1 : -1, r = t ?
|
|
335
|
-
return
|
|
334
|
+
let n = t < 0 ? 1 : -1, r = t ? lt(e, n) : null;
|
|
335
|
+
return st(r ? {
|
|
336
336
|
handle: r,
|
|
337
337
|
side: n
|
|
338
338
|
} : null), r ? Math.max(-H.width, Math.min(H.width, t)) : p(t, H.width);
|
|
339
|
-
}, n = (e) => R?.release("slide", e, () =>
|
|
339
|
+
}, n = (e) => R?.release("slide", e, () => st(null));
|
|
340
340
|
return {
|
|
341
341
|
move: (e) => R?.drag("slide", t(e)),
|
|
342
342
|
end: (t, r) => {
|
|
343
343
|
let i = f(t, r, H.width, {
|
|
344
|
-
negative: !!
|
|
345
|
-
positive: !!
|
|
346
|
-
}), a = i ?
|
|
344
|
+
negative: !!lt(e, 1),
|
|
345
|
+
positive: !!lt(e, -1)
|
|
346
|
+
}), a = i ? lt(e, i < 0 ? 1 : -1) : null;
|
|
347
347
|
if (a) {
|
|
348
348
|
let e = J;
|
|
349
349
|
if (J = null, R?.fling("slide", r * 1e3), x.navigate(S, a).status === "applied") return;
|
|
@@ -354,8 +354,8 @@ function j(y) {
|
|
|
354
354
|
cancel: () => n(0)
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
function
|
|
358
|
-
let e =
|
|
357
|
+
function dt() {
|
|
358
|
+
let e = We() ? 1 : -1, t = (t) => p(t, t * e > 0 ? H.height : c.swipe.minDistance);
|
|
359
359
|
return {
|
|
360
360
|
move: (e) => R?.drag("dragY", t(e)),
|
|
361
361
|
end: (t, n) => {
|
|
@@ -369,7 +369,7 @@ function j(y) {
|
|
|
369
369
|
cancel: () => R?.release("dragY", 0)
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function ft(e, t) {
|
|
373
373
|
let n = M.current, r = N.current, { presented: i, open: a } = _(y.props.snapshot);
|
|
374
374
|
if (B || !R || !W || !n || !r || !i || !n.contains(e)) return null;
|
|
375
375
|
let o, s = !1;
|
|
@@ -381,7 +381,7 @@ function j(y) {
|
|
|
381
381
|
reason: "gesture",
|
|
382
382
|
active: !0
|
|
383
383
|
}).status === "rejected") return null;
|
|
384
|
-
|
|
384
|
+
Me = {
|
|
385
385
|
handle: c,
|
|
386
386
|
open: a
|
|
387
387
|
};
|
|
@@ -389,9 +389,9 @@ function j(y) {
|
|
|
389
389
|
return {
|
|
390
390
|
x: o,
|
|
391
391
|
y: s,
|
|
392
|
-
start: (e) => a ? e === "x" ?
|
|
392
|
+
start: (e) => a ? e === "x" ? ut(c) : dt() : ct(c),
|
|
393
393
|
release() {
|
|
394
|
-
l || (l = !0,
|
|
394
|
+
l || (l = !0, Me = null, x.setPause(S, {
|
|
395
395
|
scope: "notification",
|
|
396
396
|
handle: c,
|
|
397
397
|
reason: "gesture",
|
|
@@ -400,22 +400,22 @@ function j(y) {
|
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function pt() {
|
|
404
404
|
let e = j.current, t = M.current;
|
|
405
405
|
if (!e || !D || !t) return;
|
|
406
|
-
|
|
407
|
-
let n =
|
|
406
|
+
ve = !0;
|
|
407
|
+
let n = se.current?.sheet, r = `[data-cloudlet-instance="${y.props.snapshot.controller}"]`;
|
|
408
408
|
if (n) for (let [e, t] of Object.entries(te)) {
|
|
409
409
|
let i = n.insertRule(`${r}${t} {}`, n.cssRules.length);
|
|
410
410
|
I[e] = n.cssRules[i].style;
|
|
411
411
|
}
|
|
412
412
|
for (let e of [
|
|
413
413
|
P.current,
|
|
414
|
-
|
|
415
|
-
|
|
414
|
+
de.current,
|
|
415
|
+
fe.current
|
|
416
416
|
]) e?.setAttribute("inert", "");
|
|
417
417
|
F.mount(e), q = d(e, {
|
|
418
|
-
begin:
|
|
418
|
+
begin: ft,
|
|
419
419
|
now: () => D.performance.now()
|
|
420
420
|
});
|
|
421
421
|
let i = D.matchMedia?.("(prefers-reduced-motion: reduce)");
|
|
@@ -423,7 +423,7 @@ function j(y) {
|
|
|
423
423
|
now: () => D.performance.now(),
|
|
424
424
|
requestFrame: (e) => D.requestAnimationFrame(e),
|
|
425
425
|
cancelFrame: (e) => D.cancelAnimationFrame(e),
|
|
426
|
-
write:
|
|
426
|
+
write: Ke,
|
|
427
427
|
reducedMotion: B,
|
|
428
428
|
timeScale: y.props.options.motion?.timeScale,
|
|
429
429
|
constants: z
|
|
@@ -453,7 +453,7 @@ function j(y) {
|
|
|
453
453
|
E,
|
|
454
454
|
"pointerover",
|
|
455
455
|
(t) => {
|
|
456
|
-
|
|
456
|
+
Se && !(t.target instanceof D.Node && e.contains(t.target)) && Re(!1);
|
|
457
457
|
},
|
|
458
458
|
!0
|
|
459
459
|
],
|
|
@@ -470,7 +470,7 @@ function j(y) {
|
|
|
470
470
|
[
|
|
471
471
|
D,
|
|
472
472
|
"resize",
|
|
473
|
-
|
|
473
|
+
Qe
|
|
474
474
|
]
|
|
475
475
|
];
|
|
476
476
|
i && p.push([
|
|
@@ -488,57 +488,63 @@ function j(y) {
|
|
|
488
488
|
]), D.visualViewport && p.push([
|
|
489
489
|
D.visualViewport,
|
|
490
490
|
"resize",
|
|
491
|
-
|
|
491
|
+
Qe
|
|
492
492
|
], [
|
|
493
493
|
D.visualViewport,
|
|
494
494
|
"scroll",
|
|
495
|
-
|
|
495
|
+
Ue
|
|
496
496
|
]);
|
|
497
497
|
for (let [e, t, n, r] of p) e.addEventListener(t, n, r);
|
|
498
|
-
|
|
498
|
+
_e = () => {
|
|
499
499
|
for (let [e, t, n, r] of p) e.removeEventListener(t, n, r);
|
|
500
500
|
}, V = D.ResizeObserver ? new D.ResizeObserver(() => {
|
|
501
|
-
|
|
502
|
-
}) : null, N.current && V?.observe(N.current), V?.observe(e), f(), Z("window-blur", !E.hasFocus()),
|
|
501
|
+
qe(), Xe();
|
|
502
|
+
}) : null, N.current && V?.observe(N.current), V?.observe(e), f(), Z("window-blur", !E.hasFocus()), He(E.activeElement), Ue(), Le(), at(h, _(y.props.snapshot), null), Xe(), et();
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function mt(e) {
|
|
505
505
|
let t = _(e.snapshot), n = _(y.props.snapshot), r = g(t, n), i = {
|
|
506
506
|
plan: r,
|
|
507
|
-
clones:
|
|
508
|
-
heading: r.morph !== "none" && W ?
|
|
507
|
+
clones: rt(r),
|
|
508
|
+
heading: r.morph !== "none" && W ? nt()?.getBoundingClientRect() ?? null : null,
|
|
509
509
|
height: H.height
|
|
510
|
-
}, a =
|
|
511
|
-
if (
|
|
510
|
+
}, a = me;
|
|
511
|
+
if (me = null, he = null, a && e.snapshot.notifications.some((e) => e.handle === a) && !y.props.snapshot.notifications.some((e) => e.handle === a)) return i;
|
|
512
512
|
let o = j.current, s = E.activeElement;
|
|
513
|
-
if (!o || !D || !(s instanceof D.HTMLElement) || s === o || !o.contains(s) ||
|
|
514
|
-
|
|
513
|
+
if (!o || !D || !(s instanceof D.HTMLElement) || s === o || !o.contains(s) || ae(e.snapshot) === ae(y.props.snapshot) && yt(e) === yt(y.props)) return i;
|
|
514
|
+
he = s;
|
|
515
515
|
let c = y.props.snapshot;
|
|
516
|
-
return
|
|
516
|
+
return ge = !c.notifications.length && !c.overflow.pending, (!ge || !Ve()) && o.focus({ preventScroll: !0 }), i;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
let r =
|
|
520
|
-
|
|
518
|
+
function ht(e, t, n) {
|
|
519
|
+
let r = he;
|
|
520
|
+
he = null, ge ? (ge = !1, Ve()) : r && !Q(r) && (Q($e() ?? j.current?.querySelector("[data-cloudlet-overflow]") ?? null) || j.current?.focus({ preventScroll: !0 })), X && !yt(y.props) && _t(!1), R?.setTimeScale(y.props.options.motion?.timeScale), xe();
|
|
521
521
|
let i = _(y.props.snapshot);
|
|
522
|
-
|
|
522
|
+
Me && (Me.handle !== i.presented?.handle || Me.open !== i.open) && q?.cancel(), J && (!i.open || !i.stack.includes(J.handle)) && (q?.cancel(), st(null)), e.snapshot === y.props.snapshot ? qe() : at(_(e.snapshot), i, n), Le(), Xe(), et(), He(E.activeElement);
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
q?.dispose(), q = null, J = null,
|
|
526
|
-
let e =
|
|
524
|
+
function gt() {
|
|
525
|
+
q?.dispose(), q = null, J = null, Y = null, _t(!1), F.dispose(), ve = !1, _e?.(), _e = null, V?.disconnect(), V = null, R?.dispose(), R = null, Ee.clear();
|
|
526
|
+
let e = se.current?.sheet;
|
|
527
527
|
if (e) for (; e.cssRules.length;) e.deleteRule(0);
|
|
528
528
|
I = {};
|
|
529
529
|
for (let e of [
|
|
530
530
|
P.current,
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
])
|
|
531
|
+
de.current,
|
|
532
|
+
fe.current
|
|
533
|
+
]) tt(e);
|
|
534
534
|
K = null;
|
|
535
535
|
let t = E.activeElement;
|
|
536
|
-
j.current?.contains(t) && !
|
|
536
|
+
j.current?.contains(t) && !Ve() && t?.blur();
|
|
537
|
+
}
|
|
538
|
+
function _t(e = !0) {
|
|
539
|
+
D?.clearTimeout(Ne), Ne = void 0, X && (X = !1, e && ve && y.forceUpdate());
|
|
537
540
|
}
|
|
538
|
-
|
|
539
|
-
|
|
541
|
+
function vt() {
|
|
542
|
+
X ? (_t(), x.clearAll(S)) : (X = !0, Ne = D?.setTimeout(_t, ne), y.forceUpdate());
|
|
543
|
+
}
|
|
544
|
+
let yt = (e) => e.options.clearAll !== !1 && _(e.snapshot).open && e.snapshot.stack.length > 1, bt = (e) => {
|
|
545
|
+
me = e, x.dismiss(S, e, "navigation").status !== "applied" && (me = null);
|
|
540
546
|
};
|
|
541
|
-
function
|
|
547
|
+
function xt(e, t, n, r) {
|
|
542
548
|
if (e.defaultPrevented) return;
|
|
543
549
|
let i = null;
|
|
544
550
|
if (e.nativeEvent.isComposing) return;
|
|
@@ -551,16 +557,16 @@ function j(y) {
|
|
|
551
557
|
let a = i === null ? void 0 : t[i];
|
|
552
558
|
a && (e.preventDefault(), x.navigate(S, a));
|
|
553
559
|
}
|
|
554
|
-
function
|
|
560
|
+
function St() {
|
|
555
561
|
let { snapshot: s, options: c } = y.props, l = {
|
|
556
562
|
...i,
|
|
557
563
|
...c.labels
|
|
558
564
|
}, u = s.controller ?? "cloudlet", d = c.dir ?? (E.documentElement.dir === "rtl" ? "rtl" : "ltr"), f = c.theme ?? "system";
|
|
559
|
-
|
|
565
|
+
je = d === "rtl";
|
|
560
566
|
let p = `${u}-island`, m = _(s), { presented: h, open: g, total: v, index: b, missed: T } = m;
|
|
561
|
-
m.badge && (
|
|
562
|
-
let te = g && J ? s.notifications.find((e) => e.handle === J.handle) : void 0,
|
|
563
|
-
return /* @__PURE__ */ w(ee, { children: [c.offsets && /* @__PURE__ */ C(
|
|
567
|
+
m.badge && (De = m.count);
|
|
568
|
+
let te = g && J ? s.notifications.find((e) => e.handle === J.handle) : void 0, ne = c.position ?? "auto", O = ne === "bottom-center" || ne === "auto" && D?.matchMedia?.("(min-width: 48rem)").matches === !1, k = Math.min(2, Math.max(m.depth, G)), ie = h ? o(x, S, h.handle, ze) : null, A = Ie(l.page, i.page, b + 1, v), ae = Ie(l.clearAllConfirm, i.clearAllConfirm, v), F = a(c.classNames);
|
|
569
|
+
return /* @__PURE__ */ w(ee, { children: [c.offsets && /* @__PURE__ */ C(oe, {
|
|
564
570
|
instance: u,
|
|
565
571
|
offsets: c.offsets,
|
|
566
572
|
nonce: c.nonce
|
|
@@ -574,8 +580,8 @@ function j(y) {
|
|
|
574
580
|
"data-cloudlet-instance": u,
|
|
575
581
|
"data-theme": f,
|
|
576
582
|
"data-resolved-theme": f === "system" ? D?.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light" : f,
|
|
577
|
-
"data-position":
|
|
578
|
-
"data-edge":
|
|
583
|
+
"data-position": ne,
|
|
584
|
+
"data-edge": O ? "bottom" : "top",
|
|
579
585
|
"data-state": g ? "island" : "stack",
|
|
580
586
|
"data-island-reason": s.island.reason ?? void 0,
|
|
581
587
|
"data-overflow": s.overflow.pending,
|
|
@@ -587,31 +593,31 @@ function j(y) {
|
|
|
587
593
|
L = null;
|
|
588
594
|
},
|
|
589
595
|
onKeyDownCapture: (e) => {
|
|
590
|
-
(e.key === "Enter" || e.key === " ") && e.target.closest("button") && (
|
|
596
|
+
(e.key === "Enter" || e.key === " ") && e.target.closest("button") && (ye = e.repeat, e.repeat ? e.preventDefault() : L = e.target.closest("button"));
|
|
591
597
|
},
|
|
592
598
|
onKeyUpCapture: () => {
|
|
593
|
-
|
|
599
|
+
ye = !1;
|
|
594
600
|
},
|
|
595
601
|
onClickCapture: (e) => {
|
|
596
|
-
let t = e.target.closest("button"), n = !!t?.matches("[data-cloudlet-control=\"action\"], [data-cloudlet-control=\"retry\"], [data-cloudlet-control=\"cancel\"]");
|
|
597
|
-
t && (
|
|
602
|
+
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 && (ye || n && e.detail > 1 || L && L !== t) && (e.preventDefault(), e.stopPropagation()), L = null;
|
|
598
604
|
},
|
|
599
605
|
onFocus: (e) => {
|
|
600
|
-
|
|
606
|
+
Be(e.relatedTarget), He(E.activeElement);
|
|
601
607
|
},
|
|
602
|
-
onBlur: (e) =>
|
|
603
|
-
onMouseEnter: () =>
|
|
604
|
-
onMouseLeave: () =>
|
|
608
|
+
onBlur: (e) => He(D && e.relatedTarget instanceof D.Element ? e.relatedTarget : null),
|
|
609
|
+
onMouseEnter: () => Re(!0),
|
|
610
|
+
onMouseLeave: () => Re(!1),
|
|
605
611
|
children: [/* @__PURE__ */ C("style", {
|
|
606
|
-
ref:
|
|
612
|
+
ref: se,
|
|
607
613
|
nonce: c.nonce,
|
|
608
614
|
"data-cloudlet-motion": ""
|
|
609
615
|
}), /* @__PURE__ */ w("div", {
|
|
610
|
-
ref:
|
|
616
|
+
ref: ce,
|
|
611
617
|
className: F("stack", "cloudlet-stack"),
|
|
612
618
|
"data-empty": !h,
|
|
613
619
|
children: [
|
|
614
|
-
[1, 2].filter((e) => e <=
|
|
620
|
+
[1, 2].filter((e) => e <= k).map((e) => /* @__PURE__ */ C("div", {
|
|
615
621
|
className: F("tail", "cloudlet-tail"),
|
|
616
622
|
"data-cloudlet-tail": e,
|
|
617
623
|
"aria-hidden": "true"
|
|
@@ -629,25 +635,25 @@ function j(y) {
|
|
|
629
635
|
"aria-label": l.island,
|
|
630
636
|
"aria-describedby": `${p}-hint`
|
|
631
637
|
} : {},
|
|
632
|
-
onKeyDown: g ? (e) =>
|
|
638
|
+
onKeyDown: g ? (e) => xt(e, s.stack, b, d === "rtl") : void 0,
|
|
633
639
|
children: [
|
|
634
640
|
/* @__PURE__ */ C("svg", {
|
|
635
|
-
ref:
|
|
641
|
+
ref: le,
|
|
636
642
|
className: "cloudlet-bg",
|
|
637
643
|
"aria-hidden": "true",
|
|
638
644
|
focusable: "false",
|
|
639
|
-
children: /* @__PURE__ */ C("path", { ref:
|
|
645
|
+
children: /* @__PURE__ */ C("path", { ref: ue })
|
|
640
646
|
}),
|
|
641
647
|
/* @__PURE__ */ w("div", {
|
|
642
648
|
ref: N,
|
|
643
649
|
className: "cloudlet-clip",
|
|
644
650
|
children: [
|
|
645
651
|
/* @__PURE__ */ C("div", {
|
|
646
|
-
ref:
|
|
652
|
+
ref: de,
|
|
647
653
|
className: "cloudlet-slide-out",
|
|
648
654
|
"aria-hidden": "true"
|
|
649
655
|
}),
|
|
650
|
-
h &&
|
|
656
|
+
h && ie && /* @__PURE__ */ w("div", {
|
|
651
657
|
className: "cloudlet-slide",
|
|
652
658
|
"data-cloudlet-presented": h.handle.generation,
|
|
653
659
|
"data-kind": h.kind,
|
|
@@ -655,7 +661,7 @@ function j(y) {
|
|
|
655
661
|
...g ? {
|
|
656
662
|
role: "group",
|
|
657
663
|
"aria-roledescription": l.slide,
|
|
658
|
-
"aria-label":
|
|
664
|
+
"aria-label": A
|
|
659
665
|
} : {},
|
|
660
666
|
children: [
|
|
661
667
|
/* @__PURE__ */ w("div", {
|
|
@@ -663,7 +669,7 @@ function j(y) {
|
|
|
663
669
|
"aria-hidden": g ? void 0 : "true",
|
|
664
670
|
children: [/* @__PURE__ */ C(t, {
|
|
665
671
|
notification: h,
|
|
666
|
-
slot:
|
|
672
|
+
slot: ie,
|
|
667
673
|
part: F,
|
|
668
674
|
titleId: `${p}-title`
|
|
669
675
|
}), /* @__PURE__ */ C("div", {
|
|
@@ -677,8 +683,8 @@ function j(y) {
|
|
|
677
683
|
bridge: x,
|
|
678
684
|
lease: S,
|
|
679
685
|
labels: l,
|
|
680
|
-
navigate:
|
|
681
|
-
slot:
|
|
686
|
+
navigate: bt,
|
|
687
|
+
slot: ie,
|
|
682
688
|
part: F,
|
|
683
689
|
titleId: `${p}-title`
|
|
684
690
|
}),
|
|
@@ -689,7 +695,7 @@ function j(y) {
|
|
|
689
695
|
]
|
|
690
696
|
}),
|
|
691
697
|
te && /* @__PURE__ */ C("div", {
|
|
692
|
-
ref:
|
|
698
|
+
ref: re,
|
|
693
699
|
className: "cloudlet-peek",
|
|
694
700
|
"aria-hidden": "true",
|
|
695
701
|
children: /* @__PURE__ */ C(n, {
|
|
@@ -701,32 +707,57 @@ function j(y) {
|
|
|
701
707
|
h && g && r(l, F, () => x.dismiss(S, h.handle, "close-button")),
|
|
702
708
|
g && (v > 1 || T > 0) && /* @__PURE__ */ w("div", {
|
|
703
709
|
className: F("indicator", "cloudlet-indicator"),
|
|
704
|
-
children: [
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
710
|
+
children: [
|
|
711
|
+
v > 5 ? /* @__PURE__ */ w("p", {
|
|
712
|
+
className: "cloudlet-page",
|
|
713
|
+
"aria-hidden": "true",
|
|
714
|
+
children: [/* @__PURE__ */ C("span", {
|
|
715
|
+
className: "cloudlet-page-value",
|
|
716
|
+
children: A
|
|
717
|
+
}), /* @__PURE__ */ C("span", { className: "cloudlet-page-out" })]
|
|
718
|
+
}) : v > 1 && /* @__PURE__ */ C("div", {
|
|
719
|
+
className: "cloudlet-dots",
|
|
720
|
+
children: s.stack.map((e, t) => /* @__PURE__ */ C("button", {
|
|
721
|
+
type: "button",
|
|
722
|
+
className: "cloudlet-dot-button",
|
|
723
|
+
"aria-current": t === b ? "true" : void 0,
|
|
724
|
+
"aria-label": Ie(l.page, i.page, t + 1, v),
|
|
725
|
+
onClick: () => x.navigate(S, e),
|
|
726
|
+
children: /* @__PURE__ */ C("span", {
|
|
727
|
+
className: "cloudlet-dot",
|
|
728
|
+
"aria-hidden": "true"
|
|
729
|
+
})
|
|
730
|
+
}, e.generation))
|
|
731
|
+
}),
|
|
732
|
+
yt(y.props) && /* @__PURE__ */ w(ee, { children: [/* @__PURE__ */ w("button", {
|
|
724
733
|
type: "button",
|
|
725
|
-
"
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
734
|
+
className: F("clear", "cloudlet-clear"),
|
|
735
|
+
"data-cloudlet-control": "clear",
|
|
736
|
+
"data-armed": X,
|
|
737
|
+
onClick: vt,
|
|
738
|
+
onBlur: () => _t(),
|
|
739
|
+
children: [/* @__PURE__ */ C("span", {
|
|
740
|
+
"aria-hidden": X || void 0,
|
|
741
|
+
children: l.clearAll
|
|
742
|
+
}), /* @__PURE__ */ C("span", {
|
|
743
|
+
"aria-hidden": !X || void 0,
|
|
744
|
+
children: ae
|
|
745
|
+
})]
|
|
746
|
+
}), /* @__PURE__ */ C("span", {
|
|
747
|
+
role: "status",
|
|
748
|
+
className: "cloudlet-live",
|
|
749
|
+
children: X ? ae : ""
|
|
750
|
+
})] }),
|
|
751
|
+
T > 0 && /* @__PURE__ */ w("div", {
|
|
752
|
+
className: F("overflow", "cloudlet-overflow"),
|
|
753
|
+
children: [/* @__PURE__ */ C("p", { children: Ie(l.overflowCount, i.overflowCount, T) }), /* @__PURE__ */ C("button", {
|
|
754
|
+
type: "button",
|
|
755
|
+
"data-cloudlet-overflow": "",
|
|
756
|
+
onClick: () => x.acknowledgeOverflow(S),
|
|
757
|
+
children: l.acknowledgeOverflow
|
|
758
|
+
})]
|
|
759
|
+
})
|
|
760
|
+
]
|
|
730
761
|
}),
|
|
731
762
|
g && /* @__PURE__ */ C("span", {
|
|
732
763
|
id: `${p}-hint`,
|
|
@@ -734,7 +765,7 @@ function j(y) {
|
|
|
734
765
|
children: l.collapse
|
|
735
766
|
}),
|
|
736
767
|
/* @__PURE__ */ C("div", {
|
|
737
|
-
ref:
|
|
768
|
+
ref: fe,
|
|
738
769
|
className: "cloudlet-chrome-out",
|
|
739
770
|
"aria-hidden": "true"
|
|
740
771
|
})
|
|
@@ -747,14 +778,14 @@ function j(y) {
|
|
|
747
778
|
"aria-expanded": "false",
|
|
748
779
|
"aria-controls": p,
|
|
749
780
|
onClick: () => x.openIsland(S, "user"),
|
|
750
|
-
"aria-label": [
|
|
781
|
+
"aria-label": [Ie(l.stackSummary, i.stackSummary, h.content.title, v, T), ...h.draft ? [l.draft] : []].join(", ")
|
|
751
782
|
}),
|
|
752
783
|
/* @__PURE__ */ w("span", {
|
|
753
784
|
className: F("badge", "cloudlet-badge"),
|
|
754
785
|
"aria-hidden": "true",
|
|
755
786
|
children: [/* @__PURE__ */ C("span", {
|
|
756
787
|
className: "cloudlet-badge-value",
|
|
757
|
-
children:
|
|
788
|
+
children: De
|
|
758
789
|
}), /* @__PURE__ */ C("span", { className: "cloudlet-badge-out" })]
|
|
759
790
|
})
|
|
760
791
|
]
|
|
@@ -769,14 +800,14 @@ function j(y) {
|
|
|
769
800
|
})] });
|
|
770
801
|
}
|
|
771
802
|
return {
|
|
772
|
-
componentDidMount:
|
|
773
|
-
getSnapshotBeforeUpdate:
|
|
774
|
-
componentDidUpdate:
|
|
775
|
-
componentWillUnmount:
|
|
776
|
-
render:
|
|
803
|
+
componentDidMount: pt,
|
|
804
|
+
getSnapshotBeforeUpdate: mt,
|
|
805
|
+
componentDidUpdate: ht,
|
|
806
|
+
componentWillUnmount: gt,
|
|
807
|
+
render: St
|
|
777
808
|
};
|
|
778
809
|
}
|
|
779
|
-
function
|
|
810
|
+
function ae(e) {
|
|
780
811
|
let t = e.notifications.find((e) => e.location === "current");
|
|
781
812
|
return [
|
|
782
813
|
e.island.open,
|
|
@@ -790,7 +821,7 @@ function ie(e) {
|
|
|
790
821
|
t?.operation?.canCancel
|
|
791
822
|
].join("|");
|
|
792
823
|
}
|
|
793
|
-
function
|
|
824
|
+
function oe({ instance: e, offsets: t, nonce: n }) {
|
|
794
825
|
let r = S(null);
|
|
795
826
|
return x(() => {
|
|
796
827
|
let n = r.current?.sheet;
|