From bd85830f1c07c87f19cceef48db8222a213262e1 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Fri, 2 Oct 2026 22:13:32 +0000 Subject: [PATCH] check:packet-render measures the prayer-points page against its sheet, and counts the points by their headings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The points page fits ONE sheet only because its sizes are tuned to the longest language (studio's ask): pointsOver fails a page whose content outgrows its box (two-sided: 26px text fails; all 11 languages PASS at 18.5px). Each point's heading carries class pt-h, and the gate counts those: counting every line that starts 'N. ' read German's '1. Petrus 5:6–11' (its name for 1 Peter, point 11's reference) as a thirteenth point. --- internal/check-packet-render.mjs | 9 +++++++++ library/packet/packet-render.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/internal/check-packet-render.mjs b/internal/check-packet-render.mjs index 10d272281..d9f0bcd34 100644 --- a/internal/check-packet-render.mjs +++ b/internal/check-packet-render.mjs @@ -277,6 +277,10 @@ const r = await page.evaluate(() => { prayBoxes: document.querySelectorAll('.pray-box').length, fdTopOver: (() => { const b = document.querySelector('.fd-top'); if (!b) return 0; const top = b.getBoundingClientRect().top return Math.round(Math.max(0, ...[...b.children].map((k) => k.getBoundingClientRect().bottom + parseFloat(getComputedStyle(k).marginBottom))) - top - b.clientHeight) })(), + // The points page is ONE sheet by design and fits only because its sizes were tuned to the longest locale; + // measure its content against its box (studio's ask), as fdTopOver does for the list's first page. + pointsOver: (() => { const b = document.querySelector('.points-body'); if (!b) return null; const top = b.getBoundingClientRect().top + return Math.round(Math.max(b.scrollHeight - b.clientHeight, ...[...b.children].map((k) => k.getBoundingClientRect().bottom - top - b.clientHeight))) })(), funnelTip: document.querySelectorAll('.funnel-tip').length, lifeShaded: (() => { const g = document.querySelector('.sheet-christian .lc-svg'); return g ? window.__lcBoxes(g).shaded.length : null })(), // ★ FILLED FROM THE TOP, in reading order (the packet's design), measured on the DOM order of the cells: @@ -450,6 +454,10 @@ const r = await page.evaluate(() => { if (!title) return -1 const host = title.parentElement?.parentElement if (!host) return -1 + // Each point's heading carries class="pt-h": a numbered LINE is not a point. German cites "1. Petrus 5:6–11" + // (its own name for 1 Peter), and that reference line was counted as a thirteenth point. + const heads = host.querySelectorAll('.pt-h') + if (heads.length) return heads.length return (host.innerText || '').split('\n').filter((l) => /^\s*\d{1,2}\.\s/.test(l)).length })(), metacamp: (body.match(/metacamp\.org/g) || []).length, @@ -770,6 +778,7 @@ const fdPages = (n) => (n <= 0 ? 0 : 1 + Math.ceil(Math.max(0, n - RR.FD_FIRST) const listSheets = r.cards ? fdPages(r.cards) : wsPages(r.wsRows) // The Full detail's first page reserves a block for the explanation and CLIPS what outgrows it (rather than // let it overlap the rows): only a measurement sees a clipped line, so measure it. +if (r.pointsOver !== null && r.pointsOver > 0) fails.push(`the prayer-points page outgrows its sheet by ${r.pointsOver}px — the twelve points and the themes must fit ONE page in every language`) if (r.fdTopOver > 0) fails.push(`the Full detail's explanation block outgrows its reserved height by ${r.fdTopOver}px — text is clipped (raise FD_TOP_H)`) if (r.wsRows && r.wsSheets !== wsPages(r.wsRows)) fails.push(`${r.wsRows} worksheet rows should take ${wsPages(r.wsRows)} page(s) but the packet has ${r.wsSheets}`) // + 2 again (2026-09-30, the second revision): point 4's Mark 5:18-20 and the Father's-heart list are back ON the diff --git a/library/packet/packet-render.js b/library/packet/packet-render.js index 29095f444..8188ae75d 100644 --- a/library/packet/packet-render.js +++ b/library/packet/packet-render.js @@ -1393,7 +1393,7 @@ export function createPacketRenderer({ strings, lang = 'en', fontData = null, de const refs = (p.refs || []).map(refSpan).join(' · '); const sub = p.sub ? ` — ${esc(p.sub)}` : ''; return `
-
+
${p.n}. ${esc(tr(p.rhythm))}${sub}
${esc(p.text)}
${refs}