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
77const 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
1313const KAL_ENGINE_OK = 0
1414const 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
0 commit comments