Skip to content

Commit cf4c0cb

Browse files
committed
fix: liturgical period
1 parent 4c31ac7 commit cf4c0cb

6 files changed

Lines changed: 14 additions & 10 deletions

File tree

app/liturgical-calendar/app.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/**
2-
* app.js — Bridge JS pour liturgical-calendar-wasm v5.
2+
* app.js — Bridge JS pour liturgical-calendar-wasm v6.
33
* * Invariant de routage et d'accès mémoire (AOT alignment) :
44
* Suppression du tag global <base> au profit d'une résolution explicite.
55
*/
66

77
const APP_ROOT = '/app/liturgical-calendar/'
88

9-
const WASM_URL = `${APP_ROOT}liturgical_calendar_wasm.wasm?v=20260519`
10-
const KALD_URL = `${APP_ROOT}romanus_universale.kald?v=20260519`
11-
const LITS_URL = `${APP_ROOT}romanus_universale_la.lits?v=20260519`
9+
const WASM_URL = `${APP_ROOT}liturgical_calendar_wasm.wasm?v=12`
10+
const KALD_URL = `${APP_ROOT}romanus_universale.kald?v=12`
11+
const LITS_URL = `${APP_ROOT}romanus_universale_la.lits?v=12`
1212

1313
const KAL_ENGINE_OK = 0
1414
const KAL_ERR_BUILD_ID_MISMATCH = -22
@@ -123,7 +123,6 @@ function decodeFeastFlags(flags) {
123123
return {
124124
precedence: flags & 0x000f,
125125
color: (flags >> 4) & 0x000f,
126-
period: (flags >> 8) & 0x0007,
127126
nature: (flags >> 11) & 0x0007,
128127
hasVigil: !!(flags & (1 << 14)),
129128
}
@@ -256,15 +255,17 @@ function renderDay(year, month, day, exports, memory) {
256255
feastFlags = fv.getUint16(2, true)
257256
}
258257

259-
const { precedence, color, period, nature, hasVigil } = decodeFeastFlags(feastFlags)
258+
const { precedence, color, nature, hasVigil } = decodeFeastFlags(feastFlags)
259+
// v6 : LiturgicalPeriod dans TimelineEntry.occurrenceFlags[4:2], plus dans FeastEntry.flags[10:8].
260+
const period = exports.kal_wasm_entry_liturgical_period()
260261
const { hasVesperaeI, hasVigilia } = decodeOccurrenceFlags(occFlags)
261262

262263
// Alignement structurel : Résolution sécurisée via l'ID de la célébration principale
263264
const res = resolveById(exports, memory, feastId, year)
264265
const label = res ? res.label : `Fête inconnue (0x${feastId.toString(16).toUpperCase()})`
265266
const annotation = res ? res.annotation : null
266267

267-
html = `<div class="grid4 gap">`
268+
html = `<div class="column-fix gap">`
268269
html += `<article class="card feast primary color-${COLOR_CSS[color] ?? ''}" style="text-align: left;">
269270
<h2>${label}</h2>`
270271
if (annotation) html += `<p class="annotation">${renderMarkdown(annotation)}</p>`
@@ -281,7 +282,10 @@ function renderDay(year, month, day, exports, memory) {
281282

282283
if (secCount > 0 && exports.kal_wasm_read_secondary(secOffset, secCount) === KAL_ENGINE_OK) {
283284
const sv = new DataView(memory.buffer, exports.kal_wasm_secondary_ptr(), secCount * 2)
284-
html += `</div><hr><div class="grid4 gap">`
285+
html += `</div>`
286+
html += `<hr>`
287+
html += `<h2>Fêtes secondaires du jour :</h2>`
288+
html += `<div class="column-fix gap gap-top">`
285289
for (let i = 0; i < secCount; i++) {
286290
const ridx = sv.getUint16(i * 2, true)
287291
if (ridx === 0) continue

app/liturgical-calendar/en_EN.lits

0 Bytes
Binary file not shown.

app/liturgical-calendar/fr_FR.lits

0 Bytes
Binary file not shown.

app/liturgical-calendar/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png" />
1414
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#5bbad5" />
1515
<link rel="stylesheet" href="../../styles/main.css" media="screen" />
16-
<link rel="stylesheet" href="liturgical-calendar.css?v=6" media="screen" />
16+
<link rel="stylesheet" href="liturgical-calendar.css?v=12" media="screen" />
1717
<link rel="stylesheet" href="/styles/main.css" media="screen" />
1818
<link rel="stylesheet" href="/styles/print.css" media="print" />
1919
<link rel="preload" href="/fonts/notoSans-Regular.woff2" as="font" type="font/woff2" crossorigin />
@@ -66,6 +66,6 @@ <h1 class="main-heading" id="h1">Calendarium Romanum Generale</h1>
6666
</div>
6767
</noscript>
6868
</div>
69-
<script type="module" src="/app/liturgical-calendar/app.js?v=6"></script>
69+
<script type="module" src="/app/liturgical-calendar/app.js?v=12"></script>
7070
</body>
7171
</html>
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)