Merge branch 'unstable' into fix-npm-ci-lockfile-13099291000237224520

This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-27 15:42:32 -05:00
commit 4f2f26dd39
6 files changed
+43 -9

No files matched your search

+1 -1
View File
@@ -108,7 +108,7 @@ export const COMMUNITY_URL = "https://groups.nip29.com/?relay=wss://relay.groups
* string) to hide the link entirely.
*/
export const NOSTR_URL =
"https://primal.net/p/npub13yarr7j6vjqjjkahd63dmr27curypehx45ucue286ac7sft27y0srnpmpe";
"https://nostrudel.ninja/u/npub13yarr7j6vjqjjkahd63dmr27curypehx45ucue286ac7sft27y0srnpmpe";
/**
* Optional external destination for the GitHub menu link.
+22 -4
View File
@@ -105,21 +105,35 @@ function buildLink(item) {
return link;
}
function getChevronIcon(expanded) {
if (expanded) {
// Chevron Down
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-4 h-4">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>`;
}
// Chevron Right
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-4 h-4">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
</svg>`;
}
function buildToggleButton(item, controlsId, expanded, groupList) {
const button = document.createElement("button");
button.type = "button";
button.className = "btn-ghost btn-xs";
button.className = "btn-ghost btn-xs btn-square text-muted hover:text-text-primary";
button.setAttribute("aria-expanded", expanded ? "true" : "false");
button.setAttribute("aria-controls", controlsId);
button.setAttribute("aria-label", `Toggle ${item.title || item.slug} section`);
button.textContent = expanded ? "Hide" : "Show";
button.innerHTML = getChevronIcon(expanded);
button.addEventListener("click", () => {
const isExpanded = button.getAttribute("aria-expanded") === "true";
const nextExpanded = !isExpanded;
button.setAttribute("aria-expanded", nextExpanded ? "true" : "false");
button.textContent = nextExpanded ? "Hide" : "Show";
button.innerHTML = getChevronIcon(nextExpanded);
if (groupList) {
groupList.hidden = !nextExpanded;
groupList.classList.toggle("hidden", !nextExpanded);
}
});
return button;
@@ -152,6 +166,9 @@ function renderTocItems(items, container, level = 0, groupPrefix = "docs-toc") {
childList.id = groupId;
childList.classList.add("ml-md", "border-l", "border-border", "pl-md");
childList.hidden = !expanded;
if (!expanded) {
childList.classList.add("hidden");
}
const toggle = buildToggleButton(item, groupId, expanded, childList);
row.appendChild(toggle);
@@ -220,8 +237,9 @@ function updateActiveToc(slug) {
groups.forEach((group) => {
if (group?.button && group?.list) {
group.button.setAttribute("aria-expanded", "true");
group.button.textContent = "Hide";
group.button.innerHTML = getChevronIcon(true);
group.list.hidden = false;
group.list.classList.remove("hidden");
}
});
}
+1
View File
@@ -10,6 +10,7 @@
"license": "GPL-3.0-or-later",
"dependencies": {
"@floating-ui/dom": "^1.7.4",
"@noble/hashes": "^2.0.1",
"highlight.js": "^11.11.1",
"jsdom": "^27.4.0",
"marked": "^17.0.1",
+1
View File
@@ -55,6 +55,7 @@
"license": "GPL-3.0-or-later",
"dependencies": {
"@floating-ui/dom": "^1.7.4",
"@noble/hashes": "^2.0.1",
"highlight.js": "^11.11.1",
"jsdom": "^27.4.0",
"marked": "^17.0.1",
@@ -76,7 +76,7 @@ test("VideoListView renders sorted popular tag pills", () => {
assert.equal(buttons.length, 3);
assert.deepEqual(
Array.from(buttons, (button) => button.dataset.tag),
["Nostr", "Video", "Learning"],
["#Nostr", "#Video", "#Learning"],
);
});
@@ -90,7 +90,7 @@ test("VideoListView applies tag preference variants to popular tags", () => {
view.mount(listRoot);
view.setPopularTagsContainer(tagsRoot);
view.setTagPreferenceStateResolver((tag) =>
tag === "Nostr" ? "interest" : tag === "Video" ? "disinterest" : "neutral",
tag === "#Nostr" ? "interest" : tag === "#Video" ? "disinterest" : "neutral",
);
const videos = [
+16 -2
View File
@@ -19,12 +19,26 @@
</h2>
<button
type="button"
class="btn-ghost lg:hidden"
class="btn-ghost lg:hidden flex items-center gap-2"
aria-controls="docsTocDrawer"
aria-expanded="false"
data-docs-toc-toggle
>
Contents
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 6h16M4 12h16M4 18h16"
/>
</svg>
<span>Contents</span>
</button>
</header>
<div id="markdown-container" class="markdown-prose">