A table can carry a label of up to 60 characters, stored NFC and trimmed; an empty field removes it. The Tables screen edits it, the history names the change, and the panel, tooltip, accessible name and per-table sheets show it. From K_LISTES, the plan wraps it under the number inside the table top: between words, then between characters, never inside a surrogate pair, before a combining mark or around a zero-width joiner, ending with an ellipsis when it does not fit. The number moves up only once a label line is drawn. Engine fingerprints and demos are unchanged. Checked: node 6293, long 138, guards 207; browser fails only on the 56 walkthrough captures still to be regenerated. --- FR --- [ADD] tables : libellé par table, replié sous le numéro au plan Une table peut porter un libellé de 60 caractères au plus, rangé en NFC et sans blancs de bord ; un champ vidé le retire. L'écran Tables le saisit, l'historique nomme le changement, et le panneau, l'infobulle, le nom accessible et les feuilles par table l'affichent. Dès K_LISTES, le plan le replie sous le numéro dans le plateau : entre les mots, puis entre deux caractères, jamais dans une paire de substitution, devant une marque combinante ni autour d'un liant sans chasse, terminé par « … » s'il ne tient pas. Le numéro ne monte qu'une fois une ligne dessinée. Empreintes du moteur et démos inchangées. Vérifié : node 6293, longue 138, gardes 207 ; au navigateur, seules les 56 captures du parcours à refaire échouent. Assisted-by: Claude Opus 5.5
104 lines
4 KiB
Svelte
104 lines
4 KiB
Svelte
<!-- © 2026 TechnoLibre (http://www.technolibre.ca)
|
|
SPDX-License-Identifier: AGPL-3.0-or-later OR LiLiQ-Rplus-1.1 -->
|
|
|
|
<script>
|
|
// L'infobulle du plan (§ 7.1, § 7.3) : un seul élément [role=tooltip],
|
|
// toujours présent dans la surface du plan, hors du <svg data-plan>, caché
|
|
// tant qu'aucune table en conflit n'est désignée. Plan.svelte l'ouvre par
|
|
// trois déclencheurs — le survol, le focus du clavier, la pression longue —
|
|
// et lui passe le détail des conflits (detailConflits, modele.js) et sa
|
|
// position dans la surface, en px. Elle énonce la table, son libellé dans
|
|
// son propre nœud quand elle en porte un, et son nombre de violations,
|
|
// puis chaque ligne du détail et ses groupes : chaque nom
|
|
// occupe son propre nœud, relié à l'autre nom d'une paire par « et »,
|
|
// séparé du groupe suivant. Une ligne qui porte une organisation — séparer
|
|
// les organisations — la nomme dans son propre nœud, entre son libellé et
|
|
// finOrganisation.
|
|
//
|
|
// infobulle : null, ou {detail, x, y, xRepli} — x et y, le coin haut droit
|
|
// de l'emprise de la table, xRepli son bord gauche, en px de la surface ;
|
|
// zone : le cadre du <svg> dans la surface ; id : l'identifiant que la
|
|
// racine du plan désigne par aria-describedby quand l'infobulle s'ouvre
|
|
// par le focus. L'infobulle se pose par placerBulle : à droite de
|
|
// l'emprise quand elle y tient, sinon à sa gauche, et dans la zone — elle
|
|
// ne couvre pas le panneau voisin. Sa taille se lit par un observateur de
|
|
// taille (bind:offsetWidth), jamais dans un pointermove ; elle ne dépend
|
|
// pas de sa position, sa largeur étant celle de son contenu, bornée.
|
|
import { getContext } from 'svelte';
|
|
import { placerBulle } from './vue_plan.js';
|
|
|
|
let { infobulle, zone, id } = $props();
|
|
|
|
const t = getContext('t');
|
|
|
|
let largeur = $state(0);
|
|
let hauteur = $state(0);
|
|
const position = $derived(
|
|
infobulle === null ? null : placerBulle({ x: infobulle.x, y: infobulle.y, xRepli: infobulle.xRepli }, { largeur, hauteur }, zone),
|
|
);
|
|
</script>
|
|
|
|
<div
|
|
class="infobulle"
|
|
role="tooltip"
|
|
{id}
|
|
hidden={infobulle === null}
|
|
style:left={position === null ? null : `${position.x}px`}
|
|
style:top={position === null ? null : `${position.y}px`}
|
|
bind:offsetWidth={largeur}
|
|
bind:offsetHeight={hauteur}
|
|
>
|
|
{#if infobulle !== null}
|
|
{@const { numero, libelle, nombre } = infobulle.detail}
|
|
<p class="entete">
|
|
<span>{t('plan.infobulle.table', { numero })}</span>{#if libelle !== null}<span>{t('plan.table.avantLibelle')}</span><span
|
|
class="donnee">{libelle}</span
|
|
>{/if}<span>{t('plan.infobulle.nombre', { nombre })}</span>
|
|
</p>
|
|
{#each infobulle.detail.lignes as ligne, rang (rang)}
|
|
<p>
|
|
<span>{t(ligne.cle)}</span>{#if ligne.organisation !== null}<span class="donnee">{ligne.organisation}</span><span
|
|
>{t('plan.infobulle.finOrganisation')}</span
|
|
>{/if}{#each ligne.groupes as groupe, g (g)}{#if g > 0}<span
|
|
>{t('plan.infobulle.separateur')}</span
|
|
>{/if}{#each groupe as nom, n (n)}{#if n > 0}<span>{t('plan.infobulle.et')}</span>{/if}<span class="donnee"
|
|
>{nom}</span
|
|
>{/each}{/each}
|
|
</p>
|
|
{/each}
|
|
{/if}
|
|
</div>
|
|
|
|
<style>
|
|
/* Une carte flottante : fond et filet de la carte, ombre portée. Sa
|
|
largeur est celle de son contenu, bornée à 24rem et à la surface : elle
|
|
ne dépend pas de sa position, que placerBulle choisit sur sa taille. */
|
|
.infobulle {
|
|
position: absolute;
|
|
z-index: 2;
|
|
box-sizing: border-box;
|
|
width: max-content;
|
|
max-width: min(24rem, 100%);
|
|
padding: var(--espace-2) var(--espace-3);
|
|
border: 1px solid var(--couleur-carte-filet);
|
|
border-radius: var(--rayon-2);
|
|
background: var(--couleur-carte-fond);
|
|
color: var(--couleur-page-texte);
|
|
box-shadow: var(--ombre-2);
|
|
font-size: var(--taille-texte);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.infobulle[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
p {
|
|
margin: 0;
|
|
}
|
|
|
|
.entete {
|
|
margin-bottom: var(--espace-1);
|
|
font-weight: 700;
|
|
}
|
|
</style>
|