@behindthemusictree/app-kit-ui 31.0.0 → 32.0.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/dist/{chunk-AQASG5KT.js → chunk-QGGVPIXY.js} +82 -102
- package/dist/chunk-QGGVPIXY.js.map +1 -0
- package/dist/genre-tree/index.cjs +36 -56
- package/dist/genre-tree/index.cjs.map +1 -1
- package/dist/genre-tree/index.d.ts +2 -2
- package/dist/genre-tree/index.js +1 -1
- package/dist/index.cjs +36 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-AQASG5KT.js.map +0 -1
|
@@ -1303,9 +1303,8 @@ function GenrePlaylistTracks({
|
|
|
1303
1303
|
getNextPageParam: (lastPage) => lastPage.nextPage ?? void 0,
|
|
1304
1304
|
enabled: scope !== "me" || sessionRestored && !!session?.accessToken
|
|
1305
1305
|
});
|
|
1306
|
-
const
|
|
1306
|
+
const [sentinel, setSentinel] = (0, import_react11.useState)(null);
|
|
1307
1307
|
(0, import_react11.useEffect)(() => {
|
|
1308
|
-
const sentinel = sentinelRef.current;
|
|
1309
1308
|
if (!hasNextPage || isFetchingNextPage || !sentinel) return;
|
|
1310
1309
|
const observer = new IntersectionObserver((entries) => {
|
|
1311
1310
|
if (entries.some((entry) => entry.isIntersecting)) {
|
|
@@ -1314,7 +1313,7 @@ function GenrePlaylistTracks({
|
|
|
1314
1313
|
});
|
|
1315
1314
|
observer.observe(sentinel);
|
|
1316
1315
|
return () => observer.disconnect();
|
|
1317
|
-
}, [hasNextPage, isFetchingNextPage, fetchNextPage]);
|
|
1316
|
+
}, [hasNextPage, isFetchingNextPage, fetchNextPage, sentinel]);
|
|
1318
1317
|
const pages = data?.pages ?? [];
|
|
1319
1318
|
const tracks = pages.flatMap((page) => page.tracks);
|
|
1320
1319
|
const total = pages[0]?.total ?? void 0;
|
|
@@ -1325,11 +1324,7 @@ function GenrePlaylistTracks({
|
|
|
1325
1324
|
showPopup(/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(InternalErrorPopup, { errorCode: import_transport6.ErrorCode.CLIENT_UNKNOWN }));
|
|
1326
1325
|
});
|
|
1327
1326
|
};
|
|
1328
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.
|
|
1329
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "gtv-info-panel-children-title", children: [
|
|
1330
|
-
(0, import_track_noun.capitalize)(trackNoun.plural),
|
|
1331
|
-
total !== void 0 && ` (${total})`
|
|
1332
|
-
] }),
|
|
1327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui4.PanelSection, { title: `${(0, import_track_noun.capitalize)(trackNoun.plural)}${total !== void 0 ? ` (${total})` : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
1333
1328
|
renderTracksToolbar?.(),
|
|
1334
1329
|
isPending ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui4.Skeleton, { className: "h-4 w-3/4", "aria-busy": "true" }) : isError && tracks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { role: "alert", children: [
|
|
1335
1330
|
"Couldn't load ",
|
|
@@ -1392,9 +1387,9 @@ function GenrePlaylistTracks({
|
|
|
1392
1387
|
track.uuid
|
|
1393
1388
|
);
|
|
1394
1389
|
}),
|
|
1395
|
-
hasNextPage && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { ref:
|
|
1390
|
+
hasNextPage && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("li", { ref: setSentinel, "aria-hidden": "true", className: "h-4" })
|
|
1396
1391
|
] })
|
|
1397
|
-
] });
|
|
1392
|
+
] }) });
|
|
1398
1393
|
}
|
|
1399
1394
|
|
|
1400
1395
|
// src/genre-tree/GenreDetailExtras.tsx
|
|
@@ -1425,10 +1420,7 @@ function GenreDetailExtras({
|
|
|
1425
1420
|
);
|
|
1426
1421
|
if (isPending) {
|
|
1427
1422
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
1428
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.
|
|
1429
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "gtv-info-panel-children-title", children: "Summary" }),
|
|
1430
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui5.Skeleton, { className: "h-4 w-3/4" })
|
|
1431
|
-
] }),
|
|
1423
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui5.PanelSection, { title: "Summary", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { "aria-busy": "true", "data-testid": "genre-detail-extras-skeleton", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui5.Skeleton, { className: "h-4 w-3/4" }) }) }),
|
|
1432
1424
|
family
|
|
1433
1425
|
] });
|
|
1434
1426
|
}
|
|
@@ -1436,50 +1428,38 @@ function GenreDetailExtras({
|
|
|
1436
1428
|
const { summary, summarySourceUrl, essentialSongs } = overview;
|
|
1437
1429
|
const wikidataUrl = wikidataId ? `https://www.wikidata.org/wiki/${encodeURIComponent(wikidataId)}` : null;
|
|
1438
1430
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
1439
|
-
(summarySourceUrl || wikidataUrl) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "
|
|
1440
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
] })
|
|
1469
|
-
] }),
|
|
1470
|
-
renderSummary ? renderSummary(overview) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "gtv-info-panel-children text-[0.8125rem] leading-[1.45] text-[var(--color-text)]", children: [
|
|
1471
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "gtv-info-panel-children-title", children: "Summary" }),
|
|
1472
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ClampedText, { className: "mt-1", children: summary ?? "\u2014" }, genreUuid)
|
|
1473
|
-
] }),
|
|
1431
|
+
(summarySourceUrl || wikidataUrl) && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui5.PanelSection, { title: "Links", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-wrap gap-x-3 gap-y-1 text-xs text-[var(--color-text)]", children: [
|
|
1432
|
+
summarySourceUrl && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1433
|
+
"a",
|
|
1434
|
+
{
|
|
1435
|
+
href: summarySourceUrl,
|
|
1436
|
+
target: "_blank",
|
|
1437
|
+
rel: "noopener noreferrer",
|
|
1438
|
+
className: "inline-flex items-center gap-1.5 text-[var(--color-text-muted)] hover:text-[var(--color-text)]",
|
|
1439
|
+
children: [
|
|
1440
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_si2.SiWikipedia, { "aria-hidden": "true", className: "h-3.5 w-3.5" }),
|
|
1441
|
+
"Wikipedia"
|
|
1442
|
+
]
|
|
1443
|
+
}
|
|
1444
|
+
),
|
|
1445
|
+
wikidataUrl && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1446
|
+
"a",
|
|
1447
|
+
{
|
|
1448
|
+
href: wikidataUrl,
|
|
1449
|
+
target: "_blank",
|
|
1450
|
+
rel: "noopener noreferrer",
|
|
1451
|
+
className: "inline-flex items-center gap-1.5 text-[var(--color-text-muted)] hover:text-[var(--color-text)]",
|
|
1452
|
+
children: [
|
|
1453
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_si2.SiWikidata, { "aria-hidden": "true", className: "h-3.5 w-3.5" }),
|
|
1454
|
+
"Wikidata"
|
|
1455
|
+
]
|
|
1456
|
+
}
|
|
1457
|
+
)
|
|
1458
|
+
] }) }),
|
|
1459
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui5.PanelSection, { title: "Summary", children: renderSummary ? renderSummary(overview) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ClampedText, { className: "text-[0.8125rem] leading-[1.45] text-[var(--color-text)]", children: summary ?? "\u2014" }, genreUuid) }),
|
|
1474
1460
|
family,
|
|
1475
1461
|
renderGenreDetailExtras?.(overview),
|
|
1476
|
-
renderEssentialTracks ? renderEssentialTracks(overview) : essentialSongs && /* @__PURE__ */ (0, import_jsx_runtime19.
|
|
1477
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "gtv-info-panel-children-title", children: [
|
|
1478
|
-
"Essential ",
|
|
1479
|
-
trackNoun.plural
|
|
1480
|
-
] }),
|
|
1481
|
-
essentialSongs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ul", { className: "mt-1 divide-y divide-[var(--color-border)]", children: essentialSongs.map((track) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { className: "py-1", children: track.title }, track.uuid)) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mt-1", children: "\u2014" })
|
|
1482
|
-
] }),
|
|
1462
|
+
(renderEssentialTracks || essentialSongs) && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui5.PanelSection, { title: `Essential ${trackNoun.plural}`, children: renderEssentialTracks ? renderEssentialTracks(overview) : essentialSongs && essentialSongs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ul", { className: "text-[0.8125rem] leading-[1.45] text-[var(--color-text)]", children: essentialSongs.map((track) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { className: "py-1", children: track.title }, track.uuid)) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-[0.8125rem] leading-[1.45] text-[var(--color-text)]", children: "\u2014" }) }),
|
|
1483
1463
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1484
1464
|
GenrePlaylistTracks,
|
|
1485
1465
|
{
|