@hadoku/watchparty-ui 0.44.7 → 0.44.9
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/chunks/{AdminPanel-qTuUmikH.js → AdminPanel-CfOBoGAb.js} +6 -6
- package/dist/chunks/{AdminPanel-qTuUmikH.js.map → AdminPanel-CfOBoGAb.js.map} +1 -1
- package/dist/chunks/{CharacterModal-CVRsPyBj.js → CharacterModal-B6cG2NmX.js} +4 -4
- package/dist/chunks/{CharacterModal-CVRsPyBj.js.map → CharacterModal-B6cG2NmX.js.map} +1 -1
- package/dist/chunks/{GameModule-DblyKpY-.js → GameModule-CrRHc04o.js} +4 -4
- package/dist/chunks/{GameModule-DblyKpY-.js.map → GameModule-CrRHc04o.js.map} +1 -1
- package/dist/chunks/{MapEditor-D7snRTNa.js → MapEditor-Bvr-tvKQ.js} +2 -2
- package/dist/chunks/{MapEditor-D7snRTNa.js.map → MapEditor-Bvr-tvKQ.js.map} +1 -1
- package/dist/chunks/{MediaDrawer-J06JYmWp.js → MediaDrawer-CY__KXu5.js} +24 -24
- package/dist/chunks/{MediaDrawer-J06JYmWp.js.map → MediaDrawer-CY__KXu5.js.map} +1 -1
- package/dist/chunks/{PlaylistPanel-BuynCwSB.js → PlaylistPanel-hV9B8oQl.js} +16 -16
- package/dist/chunks/{PlaylistPanel-BuynCwSB.js.map → PlaylistPanel-hV9B8oQl.js.map} +1 -1
- package/dist/chunks/{Room-CsUbXKFq.js → Room-B6ODdfkE.js} +1695 -1649
- package/dist/chunks/Room-B6ODdfkE.js.map +1 -0
- package/dist/chunks/{index-Cr81q-86.js → index-CFH_9amZ.js} +438 -434
- package/dist/chunks/index-CFH_9amZ.js.map +1 -0
- package/dist/chunks/{submissionsApi-DgAuxW7y.js → submissionsApi-BsiozhpM.js} +9 -9
- package/dist/chunks/{submissionsApi-DgAuxW7y.js.map → submissionsApi-BsiozhpM.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/room-chrome.js +317 -313
- package/dist/room-chrome.js.map +1 -1
- package/dist/watchparty-ui.css +1 -1
- package/package.json +2 -2
- package/dist/chunks/Room-CsUbXKFq.js.map +0 -1
- package/dist/chunks/index-Cr81q-86.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as u, jsx as a, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import { useState as x, useEffect as D, useRef as ce, useMemo as ke, useCallback as Se } from "react";
|
|
3
|
-
import { g as K,
|
|
4
|
-
import { D as $e, a as ae, u as Ge, s as je, b as qe } from "./Room-
|
|
5
|
-
import { s as Ee, a as W, g as ue, f as He, b as pe, h as Ve, u as We, c as ze, e as Ye, d as Je, i as Ke, j as Qe, k as Xe } from "./submissionsApi-
|
|
3
|
+
import { g as K, at as Y, d as A, aj as Fe, w as q, U as Q, au as Be, av as De, h as se, v as Oe, G as Ce, aw as Pe } from "./index-CFH_9amZ.js";
|
|
4
|
+
import { D as $e, a as ae, u as Ge, s as je, b as qe } from "./Room-B6ODdfkE.js";
|
|
5
|
+
import { s as Ee, a as W, g as ue, f as He, b as pe, h as Ve, u as We, c as ze, e as Ye, d as Je, i as Ke, j as Qe, k as Xe } from "./submissionsApi-BsiozhpM.js";
|
|
6
6
|
import { Icon as re } from "@wolffm/themes";
|
|
7
7
|
import { b as Ze } from "./cover-AUIrlUMF.js";
|
|
8
8
|
const ne = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map(), et = 6e4;
|
|
@@ -192,7 +192,7 @@ function ft({ query: e, onSubmitted: r }) {
|
|
|
192
192
|
const m = await mt(d.source, d.id);
|
|
193
193
|
v((S) => ({ ...S, [N]: m.ok || m.code === "exists" ? "added" : `error ${m.status}` }));
|
|
194
194
|
}
|
|
195
|
-
async function
|
|
195
|
+
async function R(d) {
|
|
196
196
|
const N = `yt:${d.id}`;
|
|
197
197
|
v((S) => ({ ...S, [N]: "adding" }));
|
|
198
198
|
const m = await Ee(d.url, d.title);
|
|
@@ -233,7 +233,7 @@ function ft({ query: e, onSubmitted: r }) {
|
|
|
233
233
|
canAdd: !0,
|
|
234
234
|
addLabel: `Request ${d.title}`,
|
|
235
235
|
onAdd: () => {
|
|
236
|
-
|
|
236
|
+
R(d);
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
239
|
d.id
|
|
@@ -301,7 +301,7 @@ function xt({ item: e }) {
|
|
|
301
301
|
);
|
|
302
302
|
}
|
|
303
303
|
function yt({ open: e, onClose: r }) {
|
|
304
|
-
const [t, l] = x(""), [o, i] = x(""), [p, c] = x(""), [y, v] = x(!1), [f, $] = x([]), [M,
|
|
304
|
+
const [t, l] = x(""), [o, i] = x(""), [p, c] = x(""), [y, v] = x(!1), [f, $] = x([]), [M, R] = x(!1), [_, d] = x(null), [N, m] = x(null), [S, H] = x(null), [L, V] = x(null), [T, O] = x(null), [U, n] = x(!1), [h, g] = x(null), [b, k] = x(null), E = ce(null), P = ce(!1), F = ke(() => ue(t), [t]) === "magnet" && t.trim().length > 0, ie = Ae(t), B = Se(async () => {
|
|
305
305
|
const s = await He();
|
|
306
306
|
P.current && (s.ok ? (m(s.value), H(null)) : H(s.failure));
|
|
307
307
|
}, []);
|
|
@@ -332,31 +332,31 @@ function yt({ open: e, onClose: r }) {
|
|
|
332
332
|
s = !1;
|
|
333
333
|
};
|
|
334
334
|
}, [e]);
|
|
335
|
-
function
|
|
335
|
+
function Le(s) {
|
|
336
336
|
if (l(s), ue(s) === "magnet" && s.trim().length > 0 && !y) {
|
|
337
337
|
const C = Ye(s);
|
|
338
338
|
C && c(C);
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Re() {
|
|
342
342
|
l(""), i(""), c(""), v(!1);
|
|
343
343
|
}
|
|
344
344
|
const le = !F || o.trim().length > 0 && Ve(p);
|
|
345
345
|
async function oe() {
|
|
346
346
|
const s = t.trim();
|
|
347
347
|
if (!s || M || ie || F && !le) return;
|
|
348
|
-
|
|
348
|
+
R(!0), d(null);
|
|
349
349
|
const w = F ? await Je(s, { title: p.trim() || void 0, series: o.trim() }) : await Ee(s);
|
|
350
|
-
if (
|
|
350
|
+
if (R(!1), !w.ok) {
|
|
351
351
|
d(w.failure);
|
|
352
352
|
return;
|
|
353
353
|
}
|
|
354
|
-
A("submissions", "Submit accepted", { id: w.value.id, state: w.value.state }),
|
|
354
|
+
A("submissions", "Submit accepted", { id: w.value.id, state: w.value.state }), Re(), m((C) => [w.value, ...(C ?? []).filter((I) => I.id !== w.value.id)]), B();
|
|
355
355
|
}
|
|
356
356
|
function Te(s) {
|
|
357
357
|
const w = s.target.files?.[0] ?? null;
|
|
358
|
-
if (k(null), w &&
|
|
359
|
-
O(null), k({ code: "too_large", maxBytes:
|
|
358
|
+
if (k(null), w && L && w.size > L.maxBytes) {
|
|
359
|
+
O(null), k({ code: "too_large", maxBytes: L.maxBytes }), E.current && (E.current.value = "");
|
|
360
360
|
return;
|
|
361
361
|
}
|
|
362
362
|
O(w);
|
|
@@ -364,7 +364,7 @@ function yt({ open: e, onClose: r }) {
|
|
|
364
364
|
async function _e() {
|
|
365
365
|
if (!T || U) return;
|
|
366
366
|
n(!0), k(null);
|
|
367
|
-
let s =
|
|
367
|
+
let s = L;
|
|
368
368
|
if (!s) {
|
|
369
369
|
const I = await pe();
|
|
370
370
|
if (!I.ok) {
|
|
@@ -417,7 +417,7 @@ function yt({ open: e, onClose: r }) {
|
|
|
417
417
|
"input",
|
|
418
418
|
{
|
|
419
419
|
value: t,
|
|
420
|
-
onChange: (s) =>
|
|
420
|
+
onChange: (s) => Le(s.target.value),
|
|
421
421
|
onKeyDown: (s) => {
|
|
422
422
|
s.key === "Enter" && !F && oe();
|
|
423
423
|
},
|
|
@@ -500,7 +500,7 @@ function yt({ open: e, onClose: r }) {
|
|
|
500
500
|
}
|
|
501
501
|
)
|
|
502
502
|
] }),
|
|
503
|
-
/* @__PURE__ */ a("span", { className: "text-[10px] text-text-muted", "data-testid": "upload-cap", children:
|
|
503
|
+
/* @__PURE__ */ a("span", { className: "text-[10px] text-text-muted", "data-testid": "upload-cap", children: L ? `cap ${ze(L.maxBytes)}` : "" }),
|
|
504
504
|
de && /* @__PURE__ */ a("span", { "data-testid": "upload-failure", className: "text-[11px] bg-danger-bg text-on-danger-bg px-1.5 py-0.5 rounded", children: de })
|
|
505
505
|
] }),
|
|
506
506
|
/* @__PURE__ */ u("div", { className: "flex-1 overflow-auto", "data-testid": "my-submissions", children: [
|
|
@@ -554,8 +554,8 @@ function Nt({ onDone: e }) {
|
|
|
554
554
|
}, className: "drawer-btn drawer-btn-danger ml-auto", children: "Stop game" }) : null;
|
|
555
555
|
}
|
|
556
556
|
const G = (e) => e.type === "category" ? e.series : [], te = (e, r) => e.type === "category" ? { ...e, series: r } : e;
|
|
557
|
-
function
|
|
558
|
-
const [t, l] = x(!1), [o, i] = x(null), [p, c] = x([]), [y, v] = x(""), [f, $] = x(!1), [M,
|
|
557
|
+
function Lt({ open: e, onClose: r }) {
|
|
558
|
+
const [t, l] = x(!1), [o, i] = x(null), [p, c] = x([]), [y, v] = x(""), [f, $] = x(!1), [M, R] = x("watch"), _ = se((n) => n.snapshot.mediaId), d = Xe(), N = Se(async () => {
|
|
559
559
|
l(!0), i(null);
|
|
560
560
|
try {
|
|
561
561
|
const n = await ye(J);
|
|
@@ -578,7 +578,7 @@ function Rt({ open: e, onClose: r }) {
|
|
|
578
578
|
n = !1;
|
|
579
579
|
};
|
|
580
580
|
}, [m]), D(() => {
|
|
581
|
-
e && (
|
|
581
|
+
e && (R("watch"), c((n) => ot(n, G, te)), N());
|
|
582
582
|
}, [e, N]);
|
|
583
583
|
function S(n) {
|
|
584
584
|
je(n), A("catalog", "control_load", { mediaId: n }), r();
|
|
@@ -586,7 +586,7 @@ function Rt({ open: e, onClose: r }) {
|
|
|
586
586
|
function H(n) {
|
|
587
587
|
Pe(n), A("catalog", "playlist_load", { playlistId: n }), r();
|
|
588
588
|
}
|
|
589
|
-
function
|
|
589
|
+
function L() {
|
|
590
590
|
qe(), A("controls", "Unload media clicked (media drawer)"), r();
|
|
591
591
|
}
|
|
592
592
|
function V(n, h) {
|
|
@@ -626,7 +626,7 @@ function Rt({ open: e, onClose: r }) {
|
|
|
626
626
|
{
|
|
627
627
|
role: "tab",
|
|
628
628
|
"aria-selected": M === n,
|
|
629
|
-
onClick: () =>
|
|
629
|
+
onClick: () => R(n),
|
|
630
630
|
className: "tl-tab",
|
|
631
631
|
children: n === "watch" ? "Watch" : "Play"
|
|
632
632
|
},
|
|
@@ -646,7 +646,7 @@ function Rt({ open: e, onClose: r }) {
|
|
|
646
646
|
_ && /* @__PURE__ */ a(
|
|
647
647
|
"button",
|
|
648
648
|
{
|
|
649
|
-
onClick:
|
|
649
|
+
onClick: L,
|
|
650
650
|
title: "Unload the current media for everyone in the room",
|
|
651
651
|
className: "drawer-btn drawer-btn-primary",
|
|
652
652
|
children: "Unload"
|
|
@@ -710,6 +710,6 @@ function Rt({ open: e, onClose: r }) {
|
|
|
710
710
|
] });
|
|
711
711
|
}
|
|
712
712
|
export {
|
|
713
|
-
|
|
713
|
+
Lt as default
|
|
714
714
|
};
|
|
715
|
-
//# sourceMappingURL=MediaDrawer-
|
|
715
|
+
//# sourceMappingURL=MediaDrawer-CY__KXu5.js.map
|