update commit message

This commit is contained in:
2026-05-29 00:27:03 -07:00
parent ed1107a0c0
commit 254f488eca
21 changed files with 565 additions and 210 deletions
+47 -33
View File
@@ -1,6 +1,10 @@
(function () {
"use strict";
function hasTarotAccess() {
return window.TarotAppConfig?.hasTarotAccess?.() === true;
}
function getCalendarMonthLinksForNumber(context, value) {
const { getReferenceData, normalizeNumberValue, computeDigitalRoot } = context;
const referenceData = getReferenceData();
@@ -406,6 +410,10 @@
}
function getTarotCardsForDigitalRoot(context, targetRoot, numberEntry = null) {
if (!hasTarotAccess()) {
return [];
}
const { getReferenceData, getMagickDataset, ensureTarotSection, computeDigitalRoot } = context;
const referenceData = getReferenceData();
const magickDataset = getMagickDataset();
@@ -558,38 +566,6 @@
alphabetCardEl.append(alphabetHeadingEl, alphabetLinksWrapEl);
const tarotCardEl = document.createElement("div");
tarotCardEl.className = "numbers-detail-card";
const tarotHeadingEl = document.createElement("strong");
tarotHeadingEl.textContent = "Tarot Links";
const tarotLinksWrapEl = document.createElement("div");
tarotLinksWrapEl.className = "numbers-links-wrap";
const tarotCards = getTarotCardsForDigitalRoot(context, rootTarget, entry);
if (!tarotCards.length) {
const emptyEl = document.createElement("div");
emptyEl.className = "numbers-detail-text numbers-detail-text--muted";
emptyEl.textContent = "No tarot numeric entries found yet for this root. Add card numbers to map them.";
tarotLinksWrapEl.appendChild(emptyEl);
} else {
tarotCards.forEach((card) => {
const button = document.createElement("button");
button.type = "button";
button.className = "numbers-nav-btn";
button.textContent = `${card.name}`;
button.addEventListener("click", () => {
document.dispatchEvent(new CustomEvent("nav:tarot-trump", {
detail: { cardName: card.name }
}));
});
tarotLinksWrapEl.appendChild(button);
});
}
tarotCardEl.append(tarotHeadingEl, tarotLinksWrapEl);
const calendarCardEl = document.createElement("div");
calendarCardEl.className = "numbers-detail-card";
@@ -625,7 +601,45 @@
calendarCardEl.append(calendarHeadingEl, calendarLinksWrapEl);
detailBodyEl.append(pairCardEl, kabbalahCardEl, alphabetCardEl, tarotCardEl, calendarCardEl);
const detailCards = [pairCardEl, kabbalahCardEl, alphabetCardEl];
if (hasTarotAccess()) {
const tarotCardEl = document.createElement("div");
tarotCardEl.className = "numbers-detail-card";
const tarotHeadingEl = document.createElement("strong");
tarotHeadingEl.textContent = "Tarot Links";
const tarotLinksWrapEl = document.createElement("div");
tarotLinksWrapEl.className = "numbers-links-wrap";
const tarotCards = getTarotCardsForDigitalRoot(context, rootTarget, entry);
if (!tarotCards.length) {
const emptyEl = document.createElement("div");
emptyEl.className = "numbers-detail-text numbers-detail-text--muted";
emptyEl.textContent = "No tarot numeric entries found yet for this root. Add card numbers to map them.";
tarotLinksWrapEl.appendChild(emptyEl);
} else {
tarotCards.forEach((card) => {
const button = document.createElement("button");
button.type = "button";
button.className = "numbers-nav-btn";
button.textContent = `${card.name}`;
button.addEventListener("click", () => {
document.dispatchEvent(new CustomEvent("nav:tarot-trump", {
detail: { cardName: card.name }
}));
});
tarotLinksWrapEl.appendChild(button);
});
}
tarotCardEl.append(tarotHeadingEl, tarotLinksWrapEl);
detailCards.push(tarotCardEl);
}
detailCards.push(calendarCardEl);
detailBodyEl.append(...detailCards);
}
window.NumbersDetailUi = {