Detail trigger shows its view's name as the core does; F7 cites the current Catégorie labels; review record and TODO updated.
594 lines
63 KiB
HTML
594 lines
63 KiB
HTML
<!doctype html>
|
||
<html lang="fr">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>Faunosteo V1-2.6 annotations et constats (proposition)</title>
|
||
<!--
|
||
V1-2.6 complement « navigation bidirectionnelle entre annotations et constats » (owner brief 2026-11-06,
|
||
contract .claude/tasks/contracts/2026-11-06-v1-2-6-findings-nav-design.md): static functional mockups, never
|
||
shipped, NOT validated. Styles, icons, shell and drawing helpers are copied from the validated
|
||
docs/design/v1-2-6/maquettes.html so the language stays the same. Every name and count comes from
|
||
data.js, generated by gen-data.cjs from the equine draft document.json. Rendered to PNG by render.cjs.
|
||
-->
|
||
<style>
|
||
:root {
|
||
--color-bg: #fbf9f5; --color-surface: #ffffff; --color-surface-strong: #f4efe6;
|
||
--color-ink: #1f1b16; --color-ink-muted: #6b6359; --color-border: #e7e0d2;
|
||
--color-accent: #b85a3f; --color-accent-strong: #9c4831;
|
||
--color-danger: #c0392b; --color-danger-strong: #962c21;
|
||
--severity-mild: #6b8e6b; --severity-moderate: #b88a3f; --severity-severe: #c0392b;
|
||
--font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
|
||
--font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
|
||
}
|
||
* { box-sizing: border-box; }
|
||
body { margin: 0; background: #ece6da; font-family: var(--font-sans); color: var(--color-ink); -webkit-font-smoothing: antialiased; }
|
||
.sheet-title { font: 600 15px var(--font-sans); margin: 0 0 10px; }
|
||
.row { display: flex; gap: 28px; align-items: flex-start; padding: 24px 28px; flex-wrap: wrap; }
|
||
[data-board] { background: #ece6da; padding: 16px; }
|
||
.frame { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(31,27,22,.06); position: relative; }
|
||
.desk { width: 1280px; height: 800px; display: flex; }
|
||
.tab-frame { width: 1180px; height: 820px; display: flex; flex-direction: column; border-radius: 22px; border: 10px solid #2a2520; }
|
||
.phone { width: 375px; height: 780px; display: flex; flex-direction: column; border-radius: 28px; border: 8px solid #2a2520; position: relative; }
|
||
.side { width: 216px; flex: none; background: var(--color-surface); border-right: 1px solid var(--color-border); display: flex; flex-direction: column; }
|
||
.side .logo { padding: 20px; } .side .logo img { height: 32px; }
|
||
.nav { padding: 0 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
|
||
.nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--color-ink-muted); }
|
||
.nav a.on { background: var(--color-surface-strong); color: var(--color-ink); font-weight: 500; }
|
||
.nav a.on::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--color-accent); }
|
||
.nav hr { border: 0; border-top: 1px solid var(--color-border); margin: 8px 4px; width: 100%; }
|
||
.side .foot { border-top: 1px solid var(--color-border); padding: 16px; font-size: 14px; }
|
||
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
|
||
.top { height: 52px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--color-border); background: rgba(255,255,255,.95); }
|
||
.top .crumb { font-size: 13px; color: var(--color-ink-muted); white-space: nowrap; overflow: hidden; }
|
||
.top .crumb b { color: var(--color-ink); font-weight: 500; }
|
||
.top .me { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
|
||
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--color-accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
|
||
.ehead { padding: 12px 24px 0; display: flex; align-items: center; gap: 10px; }
|
||
h1.page { font: 400 22px/1.2 var(--font-serif); margin: 0; white-space: nowrap; }
|
||
h2.sec { font: 400 18px/1.3 var(--font-serif); margin: 0 0 10px; }
|
||
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: 0 1px 2px rgba(31,27,22,.05); }
|
||
.muted { color: var(--color-ink-muted); }
|
||
.small { font-size: 12px; } .s13 { font-size: 13px; } .s14 { font-size: 14px; }
|
||
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--color-surface-strong); white-space: nowrap; }
|
||
.badge.warn { background: #fffbeb; color: #b45309; }
|
||
.badge.danger { background: #fef2f2; color: #b91c1c; }
|
||
.badge.ok { background: color-mix(in srgb, var(--severity-mild) 14%, white); color: #3f5e3f; }
|
||
.badge.accent { background: rgba(184,90,63,.1); color: var(--color-accent-strong); }
|
||
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 500; border: 1px solid transparent; white-space: nowrap; }
|
||
.btn.sm { height: 34px; padding: 0 11px; border-radius: 6px; font-size: 13px; }
|
||
.btn.lg { height: 46px; padding: 0 16px; font-size: 15px; }
|
||
.btn.primary { background: var(--color-accent); color: #fff; }
|
||
.btn.secondary { background: var(--color-surface); border-color: var(--color-border); }
|
||
.btn.ghost { background: transparent; }
|
||
.btn.dangertxt { background: transparent; color: var(--color-danger-strong); }
|
||
.btn.on { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }
|
||
.btn[disabled] { opacity: .45; }
|
||
.notice { display: flex; gap: 8px; align-items: flex-start; border: 1px solid; border-radius: 8px; padding: 9px 12px; font-size: 13px; line-height: 1.4; }
|
||
.notice.info { border-color: var(--color-border); background: var(--color-surface-strong); }
|
||
.notice.error { border-color: rgba(192,57,43,.4); background: color-mix(in srgb, var(--color-danger) 8%, white); color: var(--color-danger-strong); }
|
||
.notice.success { border-color: rgba(107,142,107,.4); background: color-mix(in srgb, var(--severity-mild) 10%, white); }
|
||
.notice.warn { border-color: rgba(184,138,63,.45); background: color-mix(in srgb, var(--severity-moderate) 10%, white); }
|
||
.notice svg { flex: none; margin-top: 1px; }
|
||
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; min-width: 0; }
|
||
.field label { font-weight: 500; }
|
||
.inp { height: 36px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); padding: 0 10px; display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; }
|
||
.inp.area { height: auto; min-height: 72px; align-items: flex-start; padding: 8px 10px; white-space: normal; line-height: 1.45; font-size: 13px; }
|
||
.inp.focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(184,90,63,.18); }
|
||
.inp .caret { margin-left: auto; }
|
||
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
||
.chip { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
|
||
.chip.on { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-bg); }
|
||
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--color-border); padding: 0 16px; margin-top: 8px; }
|
||
.tabs a { padding: 10px 14px; font-size: 14px; color: var(--color-ink-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
|
||
.tabs a.on { color: var(--color-accent-strong); border-color: var(--color-accent); font-weight: 500; }
|
||
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
|
||
.icon.sm { width: 15px; height: 15px; } .icon.lg { width: 22px; height: 22px; }
|
||
.mono { font-family: ui-monospace, 'DejaVu Sans Mono', monospace; font-size: 12px; }
|
||
.annot { background: #fff8e6; border: 1px dashed #c9a35a; color: #6b5323; border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.45; }
|
||
.annot b { color: #4a3916; }
|
||
/* editor */
|
||
.work { flex: 1; display: flex; gap: 12px; padding: 10px 16px 12px; min-height: 0; }
|
||
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
|
||
.toolbar { display: flex; align-items: center; gap: 6px; }
|
||
.toolbar .sep { width: 1px; height: 24px; background: var(--color-border); margin: 0 4px; }
|
||
.tbtn { height: 36px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-surface); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
|
||
.tbtn.on { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }
|
||
.tbtn.ico { width: 36px; padding: 0; justify-content: center; }
|
||
.tbtn[disabled] { opacity: .4; }
|
||
.canvas { position: relative; flex: 1; min-height: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
|
||
.canvas svg.drawing { display: block; }
|
||
.hint { position: absolute; left: 12px; top: 12px; background: rgba(31,27,22,.88); color: #fbf9f5; border-radius: 8px; padding: 7px 11px; font-size: 13px; line-height: 1.35; max-width: 70%; }
|
||
.hint kbd, .kbd { font: 500 11px var(--font-sans); border: 1px solid rgba(255,255,255,.35); border-radius: 4px; padding: 0 4px; }
|
||
.zoombox { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 4px; align-items: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 3px; font-size: 12px; }
|
||
.zoombox span.z { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; }
|
||
.toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; background: var(--color-ink); color: var(--color-bg); border-radius: 10px; padding: 9px 12px; font-size: 13px; display: flex; gap: 12px; align-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.18); white-space: nowrap; }
|
||
.toast a { color: #f2c1ae; font-weight: 600; }
|
||
.toast.err { background: #7a2318; }
|
||
.panel { width: 320px; flex: none; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
|
||
.pcard { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
|
||
.phead { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
|
||
.phead .r { margin-left: auto; font-weight: 400; }
|
||
.lrow { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 30px; }
|
||
.lrow .r { margin-left: auto; }
|
||
.sw { width: 18px; height: 18px; border-radius: 5px; flex: none; border: 1px solid rgba(0,0,0,.12); background-image: linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%),linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%); background-size: 8px 8px; background-position: 0 0,4px 4px; position: relative; overflow: hidden; }
|
||
.sw i { position: absolute; inset: 0; }
|
||
.sw.lg { width: 26px; height: 26px; border-radius: 7px; }
|
||
.slider { position: relative; height: 22px; display: flex; align-items: center; }
|
||
.slider .track { height: 6px; border-radius: 3px; background: var(--color-surface-strong); border: 1px solid var(--color-border); width: 100%; position: relative; }
|
||
.slider .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--color-accent); }
|
||
.slider .knob { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--color-accent); transform: translate(-50%,-50%); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
|
||
.slider .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--color-danger); }
|
||
.seg { display: flex; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; font-size: 12px; }
|
||
.seg span { flex: 1; text-align: center; padding: 7px 4px; border-left: 1px solid var(--color-border); white-space: nowrap; }
|
||
.seg span:first-child { border-left: 0; }
|
||
.seg span.on { background: var(--color-ink); color: var(--color-bg); }
|
||
.thumb { width: 54px; height: 40px; border-radius: 6px; border: 1px solid var(--color-border); overflow: hidden; flex: none; background: #fff; }
|
||
.menu { position: absolute; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 10px 28px rgba(31,27,22,.16); padding: 6px; font-size: 13px; z-index: 5; }
|
||
.menu div { padding: 8px 10px; border-radius: 6px; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
|
||
.menu div.on { background: var(--color-surface-strong); }
|
||
.menu hr { border: 0; border-top: 1px solid var(--color-border); margin: 4px 0; }
|
||
.pop { position: absolute; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: 0 14px 34px rgba(31,27,22,.2); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; z-index: 6; }
|
||
.dialog-wrap { position: absolute; inset: 0; background: rgba(31,27,22,.42); display: grid; place-items: center; z-index: 8; }
|
||
.dialog { background: var(--color-surface); border-radius: 16px; padding: 20px 22px; box-shadow: 0 10px 30px rgba(0,0,0,.2); display: flex; flex-direction: column; gap: 12px; }
|
||
table.t { border-collapse: collapse; width: 100%; font-size: 13px; }
|
||
table.t th, table.t td { border-bottom: 1px solid var(--color-border); padding: 6px 6px; text-align: left; vertical-align: middle; }
|
||
table.t th { font-size: 12px; font-weight: 600; color: var(--color-ink-muted); }
|
||
table.t .inp { height: 32px; font-size: 13px; }
|
||
.palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
|
||
.palette span { height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); }
|
||
.palette span.on { outline: 2px solid var(--color-ink); outline-offset: 2px; }
|
||
.ph-top { height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--color-border); background: var(--color-surface); flex: none; font-size: 14px; }
|
||
.ph-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
|
||
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--color-surface); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 24px rgba(31,27,22,.14); padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 10px; z-index: 4; }
|
||
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--color-border); align-self: center; }
|
||
.ptools { display: flex; justify-content: space-around; border-top: 1px solid var(--color-border); background: var(--color-surface); padding: 6px 4px 10px; flex: none; }
|
||
.ptools span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; min-width: 80px; padding: 0 6px; white-space: nowrap; min-height: 48px; justify-content: center; border-radius: 10px; color: var(--color-ink-muted); }
|
||
.ptools span.on { background: var(--color-ink); color: var(--color-bg); }
|
||
.callout { position: absolute; z-index: 7; }
|
||
.lead { position: absolute; border-top: 1.5px dashed #c9a35a; transform-origin: 0 0; z-index: 7; }
|
||
.vign { display: flex; flex-direction: column; gap: 8px; }
|
||
.vign > .lbl { font-size: 13px; font-weight: 600; }
|
||
/* complement */
|
||
mark { background: #fde7c7; color: inherit; border-radius: 3px; padding: 0 1px; }
|
||
.cb { width: 16px; height: 16px; border: 1.5px solid var(--color-ink-muted); border-radius: 4px; display: inline-grid; place-items: center; flex: none; background: #fff; }
|
||
.cb.on { background: var(--color-accent); border-color: var(--color-accent); }
|
||
.cb.on::after { content: ''; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
|
||
.ring { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 6px; }
|
||
.tree .lrow { min-height: 26px; }
|
||
.count { font-size: 13px; color: var(--color-ink-muted); white-space: nowrap; }
|
||
.sbar { display: flex; align-items: center; gap: 8px; }
|
||
.fpanel { position: absolute; right: 0; top: 0; bottom: 0; background: var(--color-surface); border-left: 1px solid var(--color-border); box-shadow: -10px 0 30px rgba(31,27,22,.12); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
|
||
a.lnk { color: var(--color-accent-strong); text-decoration: underline; }
|
||
.tree .lrow { padding: 2px 0; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<svg width="0" height="0" style="position:absolute">
|
||
<symbol id="i-dashboard" viewBox="0 0 24 24"><path d="M4 4h7v7H4zM13 4h7v4h-7zM13 11h7v9h-7zM4 14h7v6H4z"/></symbol>
|
||
<symbol id="i-users" viewBox="0 0 24 24"><path d="M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM2 21a7 7 0 0 1 14 0M16 3.5a4 4 0 0 1 0 7M22 21a7 7 0 0 0-4.5-6.5"/></symbol>
|
||
<symbol id="i-paw" viewBox="0 0 24 24"><path d="M5.5 12a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6zM9 8.4a1.9 1.9 0 1 0 0-3.8 1.9 1.9 0 0 0 0 3.8zM15 8.4a1.9 1.9 0 1 0 0-3.8 1.9 1.9 0 0 0 0 3.8zM18.5 12a1.8 1.8 0 1 0 0-3.6 1.8 1.8 0 0 0 0 3.6zM12 11c-3 0-5.5 4.5-5.5 6.5 0 2 2 2.5 3 2.2 1-.3 1.6-.7 2.5-.7s1.5.4 2.5.7c1 .3 3-.2 3-2.2 0-2-2.5-6.5-5.5-6.5z"/></symbol>
|
||
<symbol id="i-user" viewBox="0 0 24 24"><path d="M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21a8 8 0 0 1 16 0"/></symbol>
|
||
<symbol id="i-tool" viewBox="0 0 24 24"><path d="M14 3l7 7-4 4-7-7zM10 10l-6 6 4 4 6-6M3 21l3-3"/></symbol>
|
||
<symbol id="i-check" viewBox="0 0 24 24"><path d="M5 12l5 5L20 7"/></symbol>
|
||
<symbol id="i-alert" viewBox="0 0 24 24"><path d="M12 9v4M12 17h.01M10.3 3.9L2.8 17a2 2 0 0 0 1.7 3h15a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z"/></symbol>
|
||
<symbol id="i-info" viewBox="0 0 24 24"><path d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 11v5M12 8h.01"/></symbol>
|
||
<symbol id="i-menu" viewBox="0 0 24 24"><path d="M4 7h16M4 12h16M4 17h16"/></symbol>
|
||
<symbol id="i-close" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18"/></symbol>
|
||
<symbol id="i-book" viewBox="0 0 24 24"><path d="M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2zM4 21V5M8 7h7M8 11h5"/></symbol>
|
||
<symbol id="i-shield" viewBox="0 0 24 24"><path d="M12 3l8 3v6c0 4.5-3.4 8-8 9-4.6-1-8-4.5-8-9V6zM9 12l2 2 4-4"/></symbol>
|
||
<symbol id="i-search" viewBox="0 0 24 24"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM20 20l-4-4"/></symbol>
|
||
<symbol id="i-cursor" viewBox="0 0 24 24"><path d="M5 3l14 7-6 2-2 6z"/></symbol>
|
||
<symbol id="i-point" viewBox="0 0 24 24"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM12 2v3M12 19v3M2 12h3M19 12h3"/></symbol>
|
||
<symbol id="i-zone" viewBox="0 0 24 24"><path d="M5 7l7-4 7 5-2 10-9 2-3-6z"/></symbol>
|
||
<symbol id="i-crop" viewBox="0 0 24 24"><path d="M6 2v14a2 2 0 0 0 2 2h14M2 6h14a2 2 0 0 1 2 2v14"/></symbol>
|
||
<symbol id="i-hand" viewBox="0 0 24 24"><path d="M8 13V5.5a1.5 1.5 0 0 1 3 0V12M11 11V4a1.5 1.5 0 0 1 3 0v7M14 11V5.5a1.5 1.5 0 0 1 3 0V13M17 9.5a1.5 1.5 0 0 1 3 0V15a7 7 0 0 1-7 7h-1a7 7 0 0 1-5.5-2.7L3.6 15.5a1.6 1.6 0 0 1 2.5-2L8 15.5"/></symbol>
|
||
<symbol id="i-undo" viewBox="0 0 24 24"><path d="M9 14L4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3"/></symbol>
|
||
<symbol id="i-redo" viewBox="0 0 24 24"><path d="M15 14l5-5-5-5M20 9H10a6 6 0 0 0 0 12h3"/></symbol>
|
||
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol>
|
||
<symbol id="i-minus" viewBox="0 0 24 24"><path d="M5 12h14"/></symbol>
|
||
<symbol id="i-trash" viewBox="0 0 24 24"><path d="M4 7h16M10 11v6M14 11v6M5 7l1 13h12l1-13M9 7V4h6v3"/></symbol>
|
||
<symbol id="i-lock" viewBox="0 0 24 24"><path d="M6 11h12v10H6zM8 11V7a4 4 0 0 1 8 0v4"/></symbol>
|
||
<symbol id="i-eye" viewBox="0 0 24 24"><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></symbol>
|
||
<symbol id="i-chevron" viewBox="0 0 24 24"><path d="M9 6l6 6-6 6"/></symbol>
|
||
<symbol id="i-down" viewBox="0 0 24 24"><path d="M6 9l6 6 6-6"/></symbol>
|
||
<symbol id="i-up" viewBox="0 0 24 24"><path d="M6 15l6-6 6 6"/></symbol>
|
||
<symbol id="i-move" viewBox="0 0 24 24"><path d="M12 2v20M2 12h20M12 2l-3 3M12 2l3 3M12 22l-3-3M12 22l3-3M2 12l3-3M2 12l3 3M22 12l-3-3M22 12l-3 3"/></symbol>
|
||
<symbol id="i-pen" viewBox="0 0 24 24"><path d="M4 20l4-1 11-11-3-3L5 16zM14 6l3 3"/></symbol>
|
||
<symbol id="i-image" viewBox="0 0 24 24"><path d="M4 4h16v16H4zM4 16l5-5 4 4 3-3 4 4M15 9h.01"/></symbol>
|
||
<symbol id="i-gear" viewBox="0 0 24 24"><path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-2.9 1.2V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-2.9-1.2l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1A1.7 1.7 0 0 0 3 15H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.2-2.9l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1A1.7 1.7 0 0 0 9 4.6V4a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 2.9 1.2l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1A1.7 1.7 0 0 0 20.9 11H21a2 2 0 1 1 0 4z"/></symbol>
|
||
<symbol id="i-dots" viewBox="0 0 24 24"><path d="M12 6h.01M12 12h.01M12 18h.01"/></symbol>
|
||
<symbol id="i-grip" viewBox="0 0 24 24"><path d="M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01"/></symbol>
|
||
<symbol id="i-clock" viewBox="0 0 24 24"><path d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2"/></symbol>
|
||
<symbol id="i-spin" viewBox="0 0 24 24"><path d="M12 3a9 9 0 1 0 9 9"/></symbol>
|
||
<symbol id="i-cloud-off" viewBox="0 0 24 24"><path d="M3 3l18 18M8 8a5 5 0 0 0-3 9h11M18 17a4 4 0 0 0-1.5-7.7A6 6 0 0 0 10.6 5"/></symbol>
|
||
<symbol id="i-layers" viewBox="0 0 24 24"><path d="M12 3l9 5-9 5-9-5zM3 13l9 5 9-5"/></symbol>
|
||
<symbol id="i-fit" viewBox="0 0 24 24"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></symbol>
|
||
<symbol id="i-spine" viewBox="0 0 24 24"><path d="M6 5h12M7 9h10M6 13h12M7 17h10M12 3v18"/></symbol>
|
||
<symbol id="i-file" viewBox="0 0 24 24"><path d="M6 3h8l4 4v14H6zM14 3v4h4"/></symbol>
|
||
<symbol id="i-copy" viewBox="0 0 24 24"><path d="M9 9h11v11H9zM5 15H4V4h11v1"/></symbol>
|
||
</svg>
|
||
|
||
<script src="data.js"></script>
|
||
<script>
|
||
/* ---------- data: window.DOC (data.js, generated by gen-data.cjs from the equine draft document.json) ---------- */
|
||
const HORSE = '../../../supabase/seed/anatomical-sheets/equine/draft/assets/horse.svg'
|
||
const LOGO = '../../../apps/app/public/logo-horizontal.svg'
|
||
const W = 2073.4, H = 1629.4
|
||
// Categories as the validated v1-2-6 boards draw them (U6 model); colours from the draft.
|
||
const CATS = {
|
||
os: { fr: 'Os', en: 'Bones', c: '#a41e65', o: .35, fixed: true },
|
||
art: { fr: 'Articulations', en: 'Joints', c: '#ff9500', o: .35, fixed: true },
|
||
vert: { fr: 'Vertèbres', en: 'Vertebrae', c: '#e100ff', o: .30, fixed: true },
|
||
charn: { fr: 'Charnières vertébrales', en: 'Vertebral junctions', c: '#ff0000', o: .35 },
|
||
crane: { fr: 'Os du crâne', en: 'Cranial bones', c: '#1baa08', o: .35 },
|
||
}
|
||
const CAT_KEY = { articulations: 'art', os: 'os', 'charnieres-vertebrales': 'charn', 'zone-colonne': 'vert', 'cadrans-du-crane': 'crane' }
|
||
const DOC = window.DOC
|
||
const viewName = (id) => DOC.views.find((v) => v.id === id).fr
|
||
const DETAIL = DOC.views.find((v) => v.parent).id
|
||
const ANN = DOC.annotations
|
||
// A trigger without a name shows its view's name, as the core does (index_data.rs:39).
|
||
const nameOf = (a) => a.fr || viewName(DETAIL)
|
||
const A = ANN.map((a) => [a.view, a.kind === 'detail_trigger' ? 'link' : CAT_KEY[a.cat], nameOf(a), a.g])
|
||
const catOf = (a) => a[1] === 'link' ? 'art' : a[1]
|
||
const pts = (p) => p.map((q) => q.join(',')).join(' ')
|
||
const annById = Object.fromEntries(ANN.map((a) => [a.id, a]))
|
||
const zoneById = Object.fromEntries(DOC.zones.map((z) => [z.id, z]))
|
||
const annOfZone = (zid) => ANN.filter((a) => a.zone === zid)
|
||
const walk = (ns, acc = []) => { for (const n of ns) { acc.push(n); walk(n.children, acc) } return acc }
|
||
const famCount = (f) => walk(f.children).length
|
||
const zoneCount = (z) => z.families.reduce((s, f) => s + famCount(f), 0)
|
||
const ALL_FINDINGS = DOC.zones.reduce((s, z) => s + zoneCount(z), 0)
|
||
const fold = (s) => s.normalize('NFD').replace(/\p{Diacritic}/gu, '').toLowerCase()
|
||
// French plural as the editor's mechanism (C36): 0 and 1 take the singular.
|
||
const pl = (n, one, many) => `${n.toLocaleString('fr-FR')} ${n <= 1 ? one : many}`
|
||
const ST = { to_confirm: ['warn', 'À confirmer'], reviewed: ['ok', 'Relu'], inherited: ['', 'Hérité, non relu'] }
|
||
const status = (s) => `<span class="badge ${ST[s][0]}">${ST[s][1]}</span>`
|
||
const hl = (text, q) => {
|
||
if (!q) return text
|
||
const i = fold(text).indexOf(fold(q))
|
||
return i < 0 ? text : `<span>${text.slice(0, i)}<mark>${text.slice(i, i + q.length)}</mark>${text.slice(i + q.length)}</span>`
|
||
}
|
||
// Findings whose name contains q (folded), restricted to zoneIds when given; each with its ancestors.
|
||
function matches(q, zoneIds) {
|
||
const out = []
|
||
for (const z of DOC.zones) {
|
||
if (zoneIds && !zoneIds.includes(z.id)) continue
|
||
for (const f of z.families) {
|
||
const rec = (ns, path) => { for (const n of ns) { if (!q || fold(n.fr).includes(fold(q))) out.push({ z, f, path, n }); rec(n.children, [...path, n]) } }
|
||
rec(f.children, [])
|
||
}
|
||
}
|
||
return out
|
||
}
|
||
const zonesOf = (ms) => [...new Set(ms.map((m) => m.z.id))]
|
||
const STIFLE = annById.stifle, HOCK = annById.hock
|
||
const Z_STIFLE = zoneById[STIFLE.zone]
|
||
const short = (s) => s.replace(/\s*\(.*\)$/, '')
|
||
</script>
|
||
<script>
|
||
|
||
/* ---------- drawing ---------- */
|
||
// opts: vb [x,y,w,h], w px, view, sel (name), hide [names], extra(u) markup, cats override, dim
|
||
function drawing(o) {
|
||
const vb = o.vb || [0, 0, W, H]
|
||
const w = o.w, h = o.h || Math.round(w * vb[3] / vb[2])
|
||
const u = vb[2] / w * (o.fitH ? (w * vb[3] / vb[2]) / h : 1)
|
||
const uu = Math.max(vb[2] / w, vb[3] / h)
|
||
const cats = o.cats || CATS
|
||
let s = `<svg class="drawing" width="${w}" height="${h}" viewBox="${vb.join(' ')}" preserveAspectRatio="xMidYMid meet"><image href="${HORSE}" x="0" y="0" width="${W}" height="${H}"${o.dim ? ' opacity=".45"' : ''}/>`
|
||
if (!o.noAnn) for (const [view, cat, name, g] of A) {
|
||
if (view !== (o.view || 'main') || (o.hide || []).includes(name)) continue
|
||
if (cat === 'link') {
|
||
if (o.links === false) continue
|
||
s += `<polygon points="${pts(g[1])}" fill="rgba(31,27,22,.05)" stroke="#1f1b16" stroke-width="${2 * uu}" stroke-dasharray="${8 * uu} ${5 * uu}"/>`
|
||
continue
|
||
}
|
||
const k = cats[cat], fo = o.faint ? k.o * .45 : k.o, so = o.faint ? .5 : 1
|
||
const st = `fill="${k.c}" fill-opacity="${fo}" stroke="${k.c}" stroke-opacity="${so}" stroke-width="${2 * uu}"`
|
||
s += g[0] === 'c' ? `<circle cx="${g[1]}" cy="${g[2]}" r="${g[3]}" ${st}/>` : `<polygon points="${pts(g[1])}" ${st}/>`
|
||
}
|
||
if (o.extra) s += o.extra(uu)
|
||
return s + '</svg>'
|
||
}
|
||
// vertex handle, midpoint plus, minus bubble, selection outline; u = user units per screen px
|
||
const V = (x, y, u, on, big) => `<circle cx="${x}" cy="${y}" r="${(big ? 9 : 6) * u}" fill="${on ? '#b85a3f' : '#fff'}" stroke="#1f1b16" stroke-width="${2 * u}"/>`
|
||
const HIT = (x, y, u) => `<circle cx="${x}" cy="${y}" r="${22 * u}" fill="rgba(184,90,63,.10)" stroke="#b85a3f" stroke-width="${1 * u}" stroke-dasharray="${3 * u} ${3 * u}"/>`
|
||
const PLUS = (x, y, u, big) => { const r = (big ? 12 : 8) * u, l = r * .55; return `<g><circle cx="${x}" cy="${y}" r="${r}" fill="#fff" stroke="#b85a3f" stroke-width="${1.6 * u}"/><path d="M${x - l} ${y}h${2 * l}M${x} ${y - l}v${2 * l}" stroke="#b85a3f" stroke-width="${2 * u}" stroke-linecap="round"/></g>` }
|
||
const MINUS = (x, y, u, big, off) => { const bw = (big ? 44 : 30) * u, bh = (big ? 36 : 26) * u, yy = y - (big ? 30 : 22) * u - bh; const c = off ? '#b9b0a3' : '#c0392b'; return `<g><rect x="${x - bw / 2}" y="${yy}" width="${bw}" height="${bh}" rx="${8 * u}" fill="${c}"/><path d="M${x - 5 * u} ${yy + bh}l${5 * u} ${6 * u}l${5 * u} ${-6 * u}z" fill="${c}"/><path d="M${x - bw * .22} ${yy + bh / 2}h${bw * .44}" stroke="#fff" stroke-width="${2.6 * u}" stroke-linecap="round"/></g>` }
|
||
const SEL = (p, u) => `<polygon points="${pts(p)}" fill="none" stroke="#1f1b16" stroke-width="${2 * u}"/>`
|
||
const mids = (p) => p.map((q, i) => { const n = p[(i + 1) % p.length]; return [(q[0] + n[0]) / 2, (q[1] + n[1]) / 2] })
|
||
function polyEdit(p, u, o = {}) {
|
||
let s = SEL(p, u)
|
||
if (!o.noPlus) s += mids(p).filter((m, i) => { const n = p[(i + 1) % p.length]; return !o.minSeg || Math.hypot(n[0] - p[i][0], n[1] - p[i][1]) / u >= o.minSeg }).map(m => PLUS(m[0], m[1], u, o.big)).join('')
|
||
s += p.map((q, i) => V(q[0], q[1], u, i === o.on, o.big)).join('')
|
||
if (o.on != null && o.minus !== false) s += MINUS(p[o.on][0], p[o.on][1], u, o.big, o.minusOff)
|
||
return s
|
||
}
|
||
|
||
/* ---------- shell ---------- */
|
||
const NAV = [['dashboard','Tableau de bord'],['users','Clients'],['paw','Animaux'],['book','Fiches anatomiques'],['HR'],['shield','Administration','on'],['HR'],['user','Mon compte'],['tool','Outil de bilan']]
|
||
const ico = (n, c = '') => `<svg class="icon ${c}"><use href="#i-${n}"/></svg>`
|
||
const side = () => `<aside class="side"><div class="logo"><img src="${LOGO}" alt="Faunosteo"></div><nav class="nav">${NAV.map(([i, l, on]) => i === 'HR' ? '<hr>' : `<a class="${on || ''}">${ico(i)}${l}</a>`).join('')}</nav><div class="foot muted">Se déconnecter</div></aside>`
|
||
const TABS = ['Général', 'Annotations', 'Constats', 'Vérification']
|
||
// Undo / redo: global commands of the editor header, at the right of the tab bar, the same on every tab.
|
||
const hist = (o = {}) => { const h = o.big ? 'height:44px;' : ''; const c = o.big ? 'btn secondary' : 'btn secondary sm'
|
||
return `<span style="margin-left:auto;align-self:center;display:flex;gap:6px;padding-bottom:4px"><span class="${c}" style="${h}" title="Annuler (Ctrl+Z)">${ico('undo', 'sm')}Annuler</span><span class="${c}" style="${h}" title="Rétablir (Ctrl+Maj+Z)"${o.redo ? '' : ' disabled'}>${ico('redo', 'sm')}Rétablir</span></span>` }
|
||
function tabs(on, errs = '2 erreurs', o = {}) {
|
||
return '<div class="tabs">' + TABS.map(t => `<a class="${t === on ? 'on' : ''}">${t}${t === 'Vérification' && errs ? ` <span class="badge danger">${errs}</span>` : ''}</a>`).join('') + hist(o) + '</div>'
|
||
}
|
||
function save(state) {
|
||
return ({
|
||
dirty: `<span class="s13 muted" style="white-space:nowrap">3 modifications non enregistrées</span><span class="btn primary sm">Enregistrer</span>`,
|
||
saving: `<span class="s13 muted" style="display:flex;gap:6px;align-items:center">${ico('spin', 'sm')}Enregistrement…</span><span class="btn primary sm" disabled>Enregistrer</span>`,
|
||
saved: `<span class="s13" style="display:flex;gap:6px;align-items:center;color:#3f5e3f">${ico('check', 'sm')}Enregistré à 14:32 · révision 11</span><span class="btn primary sm" disabled>Enregistrer</span>`,
|
||
})[state]
|
||
}
|
||
function header(o = {}) {
|
||
return `<div class="ehead" style="flex-wrap:wrap"><h1 class="page">${o.title || 'Brouillon, version 4'}</h1><span class="badge">Brouillon</span><span class="badge">Copie de travail</span>${o.badges || ''}
|
||
<span style="margin-left:auto;display:flex;gap:8px;align-items:center"><span class="btn secondary sm">${ico('book', 'sm')}Références</span><span class="btn secondary sm">${ico('eye', 'sm')}Prévisualiser</span><span style="width:1px;height:24px;background:var(--color-border)"></span>${o.right || save(o.save || 'dirty')}</span></div>`
|
||
}
|
||
function editor(o) {
|
||
return `<div class="frame desk">${side()}<div class="main">
|
||
<div class="top"><span class="crumb">Administration › Fiches officielles › Cheval, squelette et rachis › <b>Brouillon, version 4</b></span><span class="me"><span class="avatar">BC</span>Bastien Chanot</span></div>
|
||
${header(o)}${tabs(o.tab || 'Annotations', o.errs)}
|
||
<div class="work">${o.body}</div>${o.overlay || ''}</div></div>`
|
||
}
|
||
function toolbar(on, o = {}) {
|
||
const t = (k, i, l, key) => `<span class="tbtn ${on === k ? 'on' : ''}" title="${key}">${ico(i, 'sm')}${l}</span>`
|
||
return `<div class="toolbar">${t('sel', 'cursor', 'Sélectionner', 'V')}${t('point', 'point', 'Ajouter un point', 'P')}${t('zone', 'zone', 'Ajouter une zone', 'Z')}${t('crop', 'crop', 'Créer une vue détaillée', 'D')}
|
||
</div>`
|
||
}
|
||
const bigPills = (z) => `${vchip()}<div class="zoombox" style="padding:4px"><span class="z" style="width:44px;height:44px">${ico('minus')}</span><span style="min-width:48px;text-align:center">${z}</span><span class="z" style="width:44px;height:44px">${ico('plus')}</span><span class="z" style="width:44px;height:44px">${ico('fit')}</span></div>`
|
||
const vchip = (v = DOC.views[0].fr) => `<span class="chip" style="position:absolute;right:10px;top:10px;background:rgba(255,255,255,.95)">${ico('layers', 'sm')}${v}</span>`
|
||
const zoom = (z = '100 %') => `${vchip()}<div class="zoombox"><span class="z">${ico('minus', 'sm')}</span><span style="min-width:42px;text-align:center">${z}</span><span class="z">${ico('plus', 'sm')}</span><span class="z" title="Ajuster">${ico('fit', 'sm')}</span></div>`
|
||
const sw = (c, o, cls = '') => `<span class="sw ${cls}"><i style="background:${c};opacity:${o}"></i></span>`
|
||
const catSel = (k) => `<span class="inp">${sw(CATS[k].c, CATS[k].o)}${CATS[k].fr}<span class="caret">${ico('down', 'sm')}</span></span>`
|
||
function slider(pct, o = {}) {
|
||
return `<div class="slider"><div class="track"><div class="fill" style="width:${pct}%"></div>${o.mark != null ? `<div class="mark" style="left:${o.mark}%" title="minimum"></div>` : ''}<div class="knob" style="left:${pct}%"></div></div></div>`
|
||
}
|
||
const keys = `<div class="s13 muted">Clavier : Tab = sommet ou poignée suivante · flèches = déplacer (Maj : par 10) · Inser = sommet après · Suppr = retirer · Entrée = valider · Échap = annuler · Ctrl+Z / Ctrl+Maj+Z</div>`
|
||
function catList(o = {}) {
|
||
return Object.entries(CATS).map(([k, c]) => `<div class="lrow">${sw(c.c, c.o)}<span>${c.fr}</span>${c.fixed ? `<span class="badge" title="Catégorie fixe">${ico('lock', 'sm')}Fixe</span>` : ''}<span class="r muted">${countCat(k)}</span></div>`).join('')
|
||
}
|
||
|
||
/* ---------- complement helpers ---------- */
|
||
// U1 save line: « Abandonner les modifications » beside « Enregistrer » in edit mode (U1 contract clarification).
|
||
function save() {
|
||
return `<span class="s13 muted" style="white-space:nowrap">3 modifications non enregistrées</span><span class="btn secondary sm">Abandonner les modifications</span><span class="btn primary sm">Enregistrer</span>`
|
||
}
|
||
// U1 header (plan 2026-11-06): no « Prévisualiser » (V1-2.7), « Abandonner les modifications » beside the save line.
|
||
function header(o = {}) {
|
||
return `<div class="ehead"><h1 class="page">${o.title || 'Brouillon, version 4'}</h1><span class="badge">Brouillon</span><span class="badge">Copie de travail</span>${o.badges || ''}
|
||
<span style="margin-left:auto;display:flex;gap:8px;align-items:center"><span class="btn secondary sm">${ico('book', 'sm')}Références</span><span style="width:1px;height:24px;background:var(--color-border)"></span>${o.right || save(o.save || 'dirty')}</span></div>`
|
||
}
|
||
// Selection outline (drawing selection) and filter mark (accent outline + check disc).
|
||
function ring(a, u, o = {}) {
|
||
const g = a.g, c = o.color || '#1f1b16', sw = (o.w || 2) * u, d = o.dash ? ` stroke-dasharray="${6 * u} ${4 * u}"` : ''
|
||
return g[0] === 'c'
|
||
? `<circle cx="${g[1]}" cy="${g[2]}" r="${g[3] + 6 * u}" fill="none" stroke="${c}" stroke-width="${sw}"${d}/>`
|
||
: `<polygon points="${pts(g[1])}" fill="none" stroke="${c}" stroke-width="${sw}"${d}/>`
|
||
}
|
||
function topRight(a) {
|
||
if (a.g[0] === 'c') return [a.g[1] + a.g[3] * .75, a.g[2] - a.g[3] * .75]
|
||
const p = a.g[1]
|
||
return [Math.max(...p.map((q) => q[0])), Math.min(...p.map((q) => q[1]))]
|
||
}
|
||
function check(a, u) {
|
||
const [x, y] = topRight(a)
|
||
return `<g><circle cx="${x}" cy="${y}" r="${11 * u}" fill="#b85a3f" stroke="#fff" stroke-width="${2 * u}"/><path d="M${x - 5 * u} ${y}l${3.5 * u} ${3.5 * u}l${6 * u} ${-7 * u}" stroke="#fff" stroke-width="${2.4 * u}" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g>`
|
||
}
|
||
const picked = (list, u) => list.map((a) => ring(a, u, { color: '#b85a3f', w: 3 }) + check(a, u)).join('')
|
||
// One family of a zone: header with its count, first-level findings, the first one opened.
|
||
function familyRows(f, o = {}) {
|
||
const head = `<div class="lrow" style="font-weight:600">${ico(o.open ? 'down' : 'chevron', 'sm')}${f.fr}<span class="r muted" style="font-weight:400">${famCount(f)}</span></div>`
|
||
if (!o.open) return head
|
||
return head + f.children.map((n, i) => {
|
||
const top = `<div class="lrow" style="padding-left:22px${o.sel === n.id ? ';background:var(--color-surface-strong);border-radius:8px' : ''}">${n.children.length ? ico(i === 0 && o.deep ? 'down' : 'chevron', 'sm') : '<span style="width:15px"></span>'}${n.fr}<span class="r muted">${n.children.length || ''}</span></div>`
|
||
if (!(i === 0 && o.deep)) return top
|
||
return top + n.children.slice(0, o.deep).map((c) => `<div class="lrow" style="padding-left:46px">${c.fr}<span class="r">${status(c.status)}</span></div>`).join('')
|
||
+ (n.children.length > o.deep ? `<div class="lrow small muted" style="padding-left:46px;min-height:20px">${pl(n.children.length - o.deep, 'autre constat', 'autres constats')}</div>` : '')
|
||
}).join('')
|
||
}
|
||
function zoneLine(a, o = {}) {
|
||
const z = zoneById[a.zone]
|
||
const others = annOfZone(a.zone).filter((x) => x.id !== a.id)
|
||
const also = o.also || (others.length ? `Aussi sur le schéma : ${others.map(nameOf).join(', ')}` : 'Seule annotation du schéma reliée à cette zone.')
|
||
return `<div class="field"><label>Zone de constats</label><div class="lrow" style="align-items:flex-start;gap:6px"><b style="font-weight:500">${z.fr}</b>${o.ro ? '' : '<span class="r"><a class="lnk">Changer</a></span>'}</div><div class="small muted">${also}</div></div>`
|
||
}
|
||
function selHead(a, o = {}) {
|
||
const z = zoneById[a.zone]
|
||
return `<div class="phead">${ico(a.kind === 'zone' ? 'zone' : 'point', 'sm')}${a.kind === 'zone' ? 'Zone' : 'Point'} · ${short(nameOf(a))}${o.badge || ''}</div>
|
||
<div class="seg"><span>Propriétés</span><span class="on">Constats · ${zoneCount(z)}</span></div>`
|
||
}
|
||
// Side column « Constats » of a selected annotation.
|
||
function constatsPanel(a, o = {}) {
|
||
const z = zoneById[a.zone]
|
||
const actions = o.ro
|
||
? `<span class="btn secondary sm">Ouvrir dans Constats</span>`
|
||
: `<span class="btn secondary sm">${ico('plus', 'sm')}Ajouter un constat</span><span class="btn secondary sm">Ouvrir dans Constats</span>`
|
||
return `<div class="panel" style="width:${o.w || 340}px">
|
||
<div class="pcard">${selHead(a, o)}${zoneLine(a, o)}</div>
|
||
<div class="pcard tree" style="flex:1;min-height:0;overflow:hidden">
|
||
${z.families.map((f, i) => familyRows(f, { open: i === 0 && !o.closed, deep: o.deep || 2, sel: o.sel })).join('')}</div>
|
||
<div class="pcard" style="flex-direction:row;gap:8px;flex-wrap:wrap">${actions}</div></div>`
|
||
}
|
||
const stage = (extra, o = {}) => `<div class="stage">${toolbar('sel')}
|
||
<div class="canvas">${drawing({ w: o.w || 660, h: o.h || 540, extra })}${zoom('Ajusté')}</div></div>`
|
||
const note = (html, style = '') => `<div class="annot" style="${style}">${html}</div>`
|
||
const vframe = (w, h, inner) => `<div class="frame" style="width:${w}px;height:${h}px;display:flex;flex-direction:column;gap:8px;padding:12px">${inner}</div>`
|
||
</script>
|
||
|
||
<!-- ================================================================== 17 drawing → findings -->
|
||
<div class="row"><div data-board="17-dessin-constats-selection">
|
||
<p class="sheet-title">17. Depuis le dessin : le point sélectionné montre les constats de sa zone, par famille (onglet Annotations, 1 280 px)</p>
|
||
<div id="b17"></div></div></div>
|
||
<script>
|
||
document.getElementById('b17').innerHTML = editor({ body: stage((u) => ring(STIFLE, u)) + constatsPanel(STIFLE) })
|
||
+ `<div style="display:flex;gap:12px;margin-top:10px;width:1280px">${note(`<b>Règle :</b> les constats appartiennent à la zone de constats « ${short(Z_STIFLE.fr)} » ; le point y renvoie par son champ « Zone de constats » (déjà dans la fiche). Le volet ne crée aucune association nouvelle. Les ${Z_STIFLE.families.length} familles du modèle (${Z_STIFLE.families.map((f) => f.fr).join(', ')}) gardent leur ordre. Le compteur « Constats · ${zoneCount(Z_STIFLE)} » compte chaque constat une fois, à toute profondeur ; les ${Z_STIFLE.families.length} familles ne comptent pas, les groupes oui (« ${Z_STIFLE.families[0].fr} ${famCount(Z_STIFLE.families[0])} » = ${Z_STIFLE.families[0].children.length} groupes + ${famCount(Z_STIFLE.families[0]) - Z_STIFLE.families[0].children.length} constats ; décision F2 de l'étude).`, 'flex:1')}${note(`<b>Latéralité :</b> le point est « bilatéral » ; le côté se choisit dans le bilan, pas dans la fiche : les constats ne portent pas de côté.<br><b>Propriétés</b> reste le volet de la planche 03 ; « Constats » s'ajoute à côté.`, 'flex:1')}</div>`
|
||
</script>
|
||
|
||
<!-- ================================================================== 18 add and edit from the selection -->
|
||
<div class="row"><div data-board="18-dessin-ajouter-modifier">
|
||
<p class="sheet-title">18. Depuis la sélection : ajouter un constat dans la zone, modifier un constat existant (mêmes champs que l'onglet Constats)</p>
|
||
<div id="b18" style="display:flex;gap:20px"></div></div></div>
|
||
<script>
|
||
{
|
||
const dys = Z_STIFLE.families[0], first = dys.children[0], leaf = first.children[0]
|
||
const add = `<div class="vign"><div class="lbl">A. Ajouter un constat</div>${vframe(420, 740, `<div class="pcard">${selHead(STIFLE)}</div>
|
||
<div class="pcard"><div class="phead">${ico('plus', 'sm')}Nouveau constat · ${short(Z_STIFLE.fr)}</div>
|
||
<div class="field"><label>Famille</label><span class="inp">${dys.fr}<span class="caret">${ico('down', 'sm')}</span></span></div>
|
||
<div class="field"><label>Placer sous</label><span class="inp">${first.fr}<span class="caret">${ico('down', 'sm')}</span></span><span class="small muted">Première option de la liste : « Directement dans la famille »</span></div>
|
||
<div class="grid2"><div class="field"><label>Nom (FR)</label><span class="inp focus">Restriction en abduction</span></div><div class="field"><label>Nom (EN)</label><span class="inp">Abduction restriction</span></div></div>
|
||
<div style="display:flex;gap:8px"><span class="btn primary sm">Ajouter</span><span class="btn secondary sm">Abandonner</span></div></div>
|
||
${note('Zone : celle du point, sans choix possible ici. Famille : une des familles de la zone. « Ajouter » crée le constat en une modification ; « Annuler la dernière modification » la retire. « Abandonner » referme le formulaire sans rien créer (T15). Le nom saisi ici est un exemple de saisie.')}`)}</div>`
|
||
const edit = `<div class="vign"><div class="lbl">B. Modifier un constat existant</div>${vframe(420, 740, `<div class="pcard">${selHead(STIFLE)}</div>
|
||
<div class="pcard"><div class="lrow small"><a class="lnk"><span style="display:inline-block;transform:rotate(180deg)">${ico('chevron', 'sm')}</span>Retour aux constats du ${short(Z_STIFLE.fr).toLowerCase()}</a></div>
|
||
<div class="small muted">${dys.fr} › ${first.fr}</div>
|
||
<div class="phead" style="font-size:15px">${leaf.fr}<span class="r">${status(leaf.status)}</span></div>
|
||
<div class="grid2"><div class="field"><label>Nom (FR)</label><span class="inp">${leaf.fr}</span></div><div class="field"><label>Nom (EN)</label><span class="inp">${leaf.en}</span></div></div>
|
||
<div class="field"><label>Description (FR)</label><span class="inp area muted">Aucune description</span></div>
|
||
<div class="field"><label>Orientation vétérinaire</label><div class="seg" style="width:160px"><span class="on">Non</span><span>Oui</span></div></div>
|
||
<div class="field"><label>Références citées</label><div class="lrow"><span class="muted">${pl(leaf.refs, 'référence', 'références')}</span><span class="r"><a class="lnk">Ajouter une référence</a></span></div></div>
|
||
<div style="display:flex;gap:8px;flex-wrap:wrap"><span class="btn secondary sm">Marquer comme relu</span><span class="btn secondary sm">Ouvrir dans Constats</span><span class="btn dangertxt sm">${ico('trash', 'sm')}Supprimer</span></div></div>
|
||
${note('Mêmes champs, mêmes contrôles et même enregistrement que le détail de l\'onglet Constats (C9) : un composant partagé, pas une seconde règle. « Ouvrir dans Constats » montre le constat dans son arbre.')}`)}</div>`
|
||
document.getElementById('b18').innerHTML = add + edit
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 19 association -->
|
||
<div class="row"><div data-board="19-association-anatomique">
|
||
<p class="sheet-title">19. Gérer l'association anatomique : changer de zone, annotation sans zone, accès à une vue détaillée, zone montrée par deux annotations</p>
|
||
<div id="b19" style="display:grid;grid-template-columns:repeat(2,560px);gap:20px"></div></div></div>
|
||
<script>
|
||
{
|
||
const options = [Z_STIFLE, ...DOC.zones.filter((z) => z.id !== STIFLE.zone).slice(0, 5)].map((z) => `<div class="${z.id === STIFLE.zone ? 'on' : ''}">${z.id === STIFLE.zone ? ico('check', 'sm') : '<span style="width:15px"></span>'}<span>${z.fr}${z.id === STIFLE.zone ? '<br><span class="badge">zone actuelle</span>' : ''}</span><span class="r muted" style="margin-left:auto;padding-left:10px">${pl(annOfZone(z.id).length, 'annotation', 'annotations')}</span></div>`).join('')
|
||
const change = `<div class="vign"><div class="lbl">A. Changer la zone de constats</div>${vframe(560, 560, `<div class="pcard" style="position:relative">${selHead(STIFLE)}
|
||
<div class="field"><label>Zone de constats</label><span class="inp focus">${ico('search', 'sm')}<span class="muted">Rechercher une zone (${DOC.zones.length})</span></span></div>
|
||
<div class="menu" style="position:static;box-shadow:none">${options}<hr><div class="muted">${pl(DOC.zones.length - 6, 'autre zone', 'autres zones')}…</div></div></div>
|
||
<div class="notice info">${ico('info', 'sm')}<div>Changer la zone ne déplace aucun constat : le point montre ensuite ceux de la nouvelle zone. Une modification, annulable. Si la zone choisie est déjà montrée par une autre annotation, le volet le dit avant de valider.</div></div>`)}</div>`
|
||
const none = `<div class="vign"><div class="lbl">B. Annotation sans zone de constats (zone retirée du point)</div>${vframe(560, 560, `<div class="pcard"><div class="phead">${ico('point', 'sm')}Point · ${short(nameOf(HOCK))}</div><div class="seg"><span>Propriétés</span><span class="on">Constats</span></div>
|
||
<div class="notice info">${ico('info', 'sm')}<div>Ce point n'est relié à aucune zone de constats (champ vidé) : il n'en montre aucun. La vérification le signale par un avertissement.</div></div>
|
||
<div class="field"><label>Relier à une zone existante</label><span class="inp">${ico('search', 'sm')}<span class="muted">Rechercher une zone</span><span class="caret">${ico('down', 'sm')}</span></span></div>
|
||
<div class="lrow"><span class="btn secondary sm">${ico('plus', 'sm')}Créer une zone pour ce point</span></div></div>
|
||
${note('Le cœur l\'autorise : le champ est facultatif, la vérification affiche l\'avertissement « annotation.no_findings » (validate.rs:367-386). Le brouillon équin n\'en a aucune. « Créer une zone pour ce point » crée la zone (nom du point proposé, modifiable) et la relie au point en un seul lot : une entrée d\'historique, tout ou rien (décision F8 de l\'étude).')}`)}</div>`
|
||
const trig = ANN.find((a) => a.kind === 'detail_trigger')
|
||
const access = `<div class="vign"><div class="lbl">C. Accès à une vue détaillée</div>${vframe(560, 300, `<div class="pcard"><div class="phead">${ico('crop', 'sm')}${nameOf(trig)}</div><div class="seg"><span class="on">Propriétés</span><span style="opacity:.45">Constats</span></div>
|
||
<div class="small muted">Un accès ouvre la vue « ${viewName(DETAIL)} » : il ne représente pas une région, il n'a pas de zone de constats (champ vide dans la fiche). L'onglet « Constats » du volet est grisé avec cette raison.</div></div>`)}</div>`
|
||
const dup = `<div class="vign"><div class="lbl">D. Zone montrée par deux annotations (cas illustratif)</div>${vframe(560, 360, `<div class="pcard">${selHead(STIFLE)}${zoneLine(STIFLE, { also: `Aussi sur le schéma : ${short(nameOf(STIFLE))}, vue « Membre postérieur » (<a class="lnk">la sélectionner</a>)` })}</div>
|
||
<div class="lrow s13" style="gap:14px"><svg width="70" height="34" viewBox="0 0 70 34"><circle cx="17" cy="17" r="11" fill="none" stroke="#b85a3f" stroke-width="3"/><circle cx="27" cy="7" r="6" fill="#b85a3f"/><circle cx="55" cy="17" r="11" fill="none" stroke="#b85a3f" stroke-width="2" stroke-dasharray="4 3"/></svg><span>Dans « Filtrer sur le schéma » : l'annotation cliquée est cochée, l'autre annotation de la même zone est cernée en pointillé ; la zone compte une fois.</span></div>
|
||
${note(`Le brouillon équin n'a aucune zone montrée par deux annotations (${DOC.zones.filter((z) => annOfZone(z.id).length > 1).length} sur ${DOC.zones.length}) ; la vue « Membre postérieur » est inventée pour l'exemple. Règle : les constats sont ceux de la zone, comptés et listés une fois (dédoublonnage par zone ; le bilan, lui, sépare aussi par côté) ; dans « Filtrer sur le schéma », sélectionner l'une des deux annotations retient la zone une fois et marque l'autre en pointillé.`)}`)}</div>`
|
||
document.getElementById('b19').innerHTML = change + none + access + dup
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 20 findings tab: search -->
|
||
<div class="row"><div data-board="20-constats-recherche">
|
||
<p class="sheet-title">20. Onglet Constats : recherche instantanée, compteur de résultats, « Filtrer sur le schéma », réinitialisation ; chaque zone renvoie au dessin</p>
|
||
<div id="b20"></div></div></div>
|
||
<script>
|
||
{
|
||
const Q = 'restriction'
|
||
const ms = matches(Q), zs = zonesOf(ms)
|
||
const sel = Z_STIFLE.families[0].children[0].children[0]
|
||
function zoneTree(z, q) {
|
||
const own = matches(q, [z.id])
|
||
const keep = new Set(), hit = new Set(own.map((m) => m.n.id))
|
||
own.forEach((m) => { m.path.forEach((p) => keep.add(p.id)); keep.add(m.n.id) })
|
||
let s = ''
|
||
for (const f of z.families) {
|
||
const inF = own.filter((m) => m.f === f)
|
||
if (!inF.length) continue
|
||
s += `<div class="lrow" style="padding-left:22px;font-weight:600">${ico('down', 'sm')}${f.fr}<span class="r muted" style="font-weight:400">${inF.length}</span></div>`
|
||
const rec = (ns, d) => { for (const n of ns) { if (!keep.has(n.id)) continue; s += `<div class="lrow" style="padding-left:${22 + d * 22}px${n.id === sel.id ? ';background:var(--color-surface-strong);border-radius:8px' : ''}">${n.children.some((c) => keep.has(c.id)) ? ico('down', 'sm') : '<span style="width:15px"></span>'}<span class="${hit.has(n.id) ? '' : 'muted'}">${hit.has(n.id) ? hl(n.fr, q) : n.fr}</span></div>`; rec(n.children, d + 1) } }
|
||
rec(f.children, 1)
|
||
}
|
||
return s
|
||
}
|
||
const at = Math.max(0, zs.indexOf(STIFLE.zone) - 2), shown = zs.slice(at, at + 5)
|
||
const rows = `<div class="lrow small muted">⋮</div>` + shown.map((id) => {
|
||
const z = zoneById[id], n = matches(Q, [id]).length, open = id === STIFLE.zone
|
||
return `<div class="lrow" style="font-weight:600">${ico(open ? 'down' : 'chevron', 'sm')}${z.fr}<span class="muted" style="font-weight:400">${pl(n, 'résultat', 'résultats')}</span><span class="r small" style="font-weight:400"><a class="lnk">${ico('layers', 'sm')}Sur le schéma</a></span></div>${open ? zoneTree(z, Q) : ''}`
|
||
}).join('') + `<div class="lrow small muted">⋮</div>`
|
||
const bar = `<div class="sbar"><span class="inp focus" style="width:320px">${ico('search', 'sm')}${Q}<span style="margin-left:auto">${ico('close', 'sm')}</span></span>
|
||
<span class="count">${pl(ms.length, 'constat', 'constats')} sur ${ALL_FINDINGS.toLocaleString('fr-FR')}, dans ${pl(zs.length, 'zone', 'zones')}</span>
|
||
<span style="margin-left:auto;display:flex;gap:8px"><span class="btn secondary sm">${ico('layers', 'sm')}Filtrer sur le schéma</span><span class="btn ghost sm">${ico('undo', 'sm')}Réinitialiser les filtres</span><span class="btn secondary sm">${ico('plus', 'sm')}Ajouter…${ico('down', 'sm')}</span></span></div>`
|
||
const detail = `<div class="pcard" style="width:360px;flex:none"><div class="small muted">${Z_STIFLE.families[0].fr} › ${Z_STIFLE.families[0].children[0].fr}</div>
|
||
<div class="phead" style="font-size:15px">${hl(sel.fr, Q)}<span class="r">${status(sel.status)}</span></div>
|
||
<div class="grid2"><div class="field"><label>Nom (FR)</label><span class="inp">${sel.fr}</span></div><div class="field"><label>Nom (EN)</label><span class="inp">${sel.en}</span></div></div>
|
||
<div class="field"><label>Description (FR)</label><span class="inp area muted">Aucune description</span></div>
|
||
</div>`
|
||
document.getElementById('b20').innerHTML = editor({ tab: 'Constats', body: `<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:10px">${bar}
|
||
<div style="display:flex;gap:12px;flex:1;min-height:0"><div class="pcard tree" style="flex:1;min-width:0;overflow:hidden">${rows}</div>${detail}</div></div>` })
|
||
+ `<div style="display:flex;gap:12px;margin-top:10px;width:1280px">${note(`<b>Recherche :</b> sur le nom des constats en français et en anglais, sans tenir compte des accents ni de la casse, dès la frappe. Les branches sans résultat se replient ; les ancêtres d'un résultat restent visibles en gris. La liste est montrée défilée jusqu'à « ${short(nameOf(STIFLE))} » (${pl(Math.max(0, zonesOf(matches('restriction')).indexOf(STIFLE.zone) - 2), 'zone', 'zones')} au-dessus). « Ajouter… » ouvre le choix zone, famille ou constat, comme aujourd'hui. Le compteur est annoncé poliment aux lecteurs d'écran après une courte pause de frappe.`, 'flex:1')}${note(`<b>« Sur le schéma » :</b> passe à l'onglet Annotations, sélectionne l'annotation de la zone et ouvre son volet « Constats » (navigation inverse de la planche 17). Plusieurs annotations : la première, les autres listées dans le volet.<br><b>Filtres :</b> états d'interface, gardés en changeant d'onglet, jamais enregistrés ni écrits dans la fiche.`, 'flex:1')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 21 filter on the drawing -->
|
||
<div class="row"><div data-board="21-constats-filtre-schema">
|
||
<p class="sheet-title">21. « Filtrer sur le schéma » : choix des vues, sélection de points et de zones sur le dessin, combinée à la recherche</p>
|
||
<div id="b21"></div></div></div>
|
||
<script>
|
||
{
|
||
const Q = 'restriction', pick = [STIFLE, HOCK, annById.lumbar], ids = pick.map((a) => a.zone)
|
||
const ms = matches(Q, ids), zs = zonesOf(ms)
|
||
const rows = zs.map((id) => {
|
||
const z = zoneById[id], own = matches(Q, [id])
|
||
return `<div class="lrow" style="font-weight:600">${ico('down', 'sm')}${short(z.fr)}<span class="muted" style="font-weight:400">${pl(own.length, 'résultat', 'résultats')}</span></div>`
|
||
+ own.slice(0, 6).map((m) => `<div class="lrow" style="padding-left:22px"><span class="small muted" style="min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px">${m.f.fr.split(' ')[0]} ›</span>${hl(m.n.fr, Q)}</div>`).join('')
|
||
+ (own.length > 6 ? `<div class="lrow small muted" style="padding-left:22px;min-height:20px">${pl(own.length - 6, 'autre', 'autres')}</div>` : '')
|
||
}).join('')
|
||
const left = `<div style="width:420px;flex:none;display:flex;flex-direction:column;gap:8px">
|
||
<span class="inp" style="width:100%">${ico('search', 'sm')}${Q}<span style="margin-left:auto">${ico('close', 'sm')}</span></span>
|
||
<div style="display:flex;gap:6px;flex-wrap:wrap"><span class="chip">Texte : ${Q} ${ico('close', 'sm')}</span><span class="chip on">${ico('layers', 'sm')}Schéma : ${pl(ids.length, 'zone', 'zones')} ${ico('close', 'sm')}</span></div>
|
||
<div class="lrow"><span class="count">${pl(ms.length, 'constat', 'constats')} dans ${pl(zs.length, 'zone', 'zones')}</span><span class="r"><span class="btn ghost sm">${ico('undo', 'sm')}Réinitialiser les filtres</span></span></div>
|
||
<div class="pcard tree" style="flex:1;min-height:0;overflow:hidden">${rows}</div></div>`
|
||
const views = DOC.views.map((v) => `<span class="chip on">${ico('check', 'sm')}${v.fr}</span>`).join('')
|
||
const panel = `<div class="fpanel" style="top:162px;width:600px">
|
||
<div class="phead" style="font:400 19px var(--font-serif)">${ico('layers')}Filtrer sur le schéma<span class="r">${ico('close')}</span></div>
|
||
<div class="field"><label>Vues</label><div style="display:flex;gap:6px;flex-wrap:wrap">${views}</div><span class="small muted">Plusieurs vues possibles. Tant que rien n'est coché, le filtre retient toutes les zones des vues choisies.</span></div>
|
||
<div class="lrow"><span class="s13 muted">Dessin affiché :</span>${DOC.views.map((v, i) => `<span class="btn ${i === 0 ? 'on' : 'secondary'} sm">${v.fr} · ${pl(pick.filter((a) => a.view === v.id).length, 'choisie', 'choisies')}</span>`).join('')}</div>
|
||
<div class="canvas" style="flex:none;height:350px">${drawing({ w: 566, h: 348, faint: true, extra: (u) => picked(pick, u) })}<div class="hint">Clic : ajouter au filtre ou en retirer</div>${zoom('Ajusté')}</div>
|
||
<div class="lrow"><b class="s13">Sélection</b><span class="muted s13">${pl(pick.length, 'annotation', 'annotations')} · ${pl(ids.length, 'zone', 'zones')}</span><span class="r" style="display:flex;gap:8px"><a class="lnk small">Choisir dans une liste</a><a class="lnk small">Effacer la sélection</a></span></div>
|
||
<div style="display:flex;gap:6px;flex-wrap:wrap">${pick.map((a) => `<span class="chip">${short(nameOf(a))} ${ico('close', 'sm')}</span>`).join('')}</div></div>`
|
||
document.getElementById('b21').innerHTML = editor({ tab: 'Constats', body: left, overlay: panel })
|
||
+ `<div style="display:flex;gap:12px;margin-top:10px;width:1280px">${note(`<b>Combinaison :</b> un constat reste affiché s'il appartient à une zone retenue par le schéma ET contient le texte cherché. Dès qu'une annotation est cochée, seules les zones cochées comptent ; les vues choisies donnent les dessins où cocher, et toutes leurs zones tant que rien n'est coché. Ici « ${Q} » seul donne ${pl(matches(Q).length, 'constat', 'constats')} ; avec ${pick.map((a) => short(nameOf(a))).join(' et ')}, ${ms.length}. Le filtre s'applique à chaque clic, sans bouton « Appliquer ».`, 'flex:1')}${note(`<b>Volet :</b> non modal, sans voile : l'arbre à gauche se met à jour pendant la sélection ; le détail du constat se masque tant que le volet est ouvert. Un seul volet secondaire à la fois : ouvrir « Références » ferme celui-ci, le filtre reste actif (puce « Schéma »). Le dessin du volet est en consultation : aucun outil d'édition.`, 'flex:1')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 22 states -->
|
||
<div class="row"><div data-board="22-etats">
|
||
<p class="sheet-title">22. États : aucun résultat, choix au clavier, lecture seule, écran étroit (lecture seule sous 1 024 px)</p>
|
||
<div id="b22" style="display:grid;grid-template-columns:repeat(2,600px);gap:20px"></div></div></div>
|
||
<script>
|
||
{
|
||
const pick = [STIFLE, HOCK], ids = pick.map((a) => a.zone), Q = 'abduction'
|
||
const none = `<div class="vign"><div class="lbl">A. Aucun résultat</div>${vframe(600, 330, `<span class="inp">${ico('search', 'sm')}${Q}<span style="margin-left:auto">${ico('close', 'sm')}</span></span>
|
||
<div style="display:flex;gap:6px"><span class="chip">Texte : ${Q} ${ico('close', 'sm')}</span><span class="chip on">${ico('layers', 'sm')}Schéma : ${pl(ids.length, 'zone', 'zones')} ${ico('close', 'sm')}</span></div>
|
||
<div class="count">${pl(matches(Q, ids).length, 'constat', 'constats')}</div>
|
||
<div class="notice info">${ico('info', 'sm')}<div><b>Aucun constat ne contient « ${Q} » dans ${pick.map((a) => short(nameOf(a))).join(' et ')}.</b><br>${pl(matches(Q).length, 'constat le contient', 'constats le contiennent')} hors du filtre du schéma.<div style="display:flex;gap:8px;margin-top:8px"><span class="btn secondary sm">Retirer le filtre du schéma</span><span class="btn ghost sm">Réinitialiser les filtres</span></div></div></div>`)}</div>`
|
||
const groups = ['art', 'charn', 'vert', 'os'].map((k) => {
|
||
const list = ANN.filter((a) => a.view === 'main' && a.kind !== 'detail_trigger' && CAT_KEY[a.cat] === k)
|
||
return `<div class="lrow" style="font-weight:600">${sw(CATS[k].c, CATS[k].o)}${DOC.categories.find((c) => CAT_KEY[c.id] === k).fr}<span class="r muted" style="font-weight:400">${list.length}</span></div>`
|
||
+ list.slice(0, k === 'art' ? 5 : 2).map((a) => `<div class="lrow ${a.id === STIFLE.id ? 'ring' : ''}" style="padding-left:26px"><span class="cb ${ids.includes(a.zone) ? 'on' : ''}"></span>${short(nameOf(a))}</div>`).join('')
|
||
+ (list.length > (k === 'art' ? 5 : 2) ? `<div class="lrow small muted" style="padding-left:26px;min-height:20px">${pl(list.length - (k === 'art' ? 5 : 2), 'autre', 'autres')}</div>` : '')
|
||
}).join('')
|
||
const kb = `<div class="vign"><div class="lbl">B. Choisir dans une liste (clavier, lecteur d'écran)</div>${vframe(600, 560, `<div class="phead">${ico('layers', 'sm')}Filtrer sur le schéma · ${viewName('main')}<span class="r"><a class="lnk small">Revenir au dessin</a></span></div>
|
||
<div class="small muted">Par catégorie d'annotation (couleur), pas par famille de constats</div><div class="tree">${groups}</div>
|
||
<div class="small muted">Cases à cocher natives : Tab passe d'une case à l'autre, Espace coche ou décoche. Chaque case porte le nom de l'annotation et sa zone ; la liste et le dessin montrent la même sélection.</div>`)}</div>`
|
||
const ro = `<div class="vign"><div class="lbl">C. Lecture seule (droits, brouillon en revue, version historique)</div>${vframe(600, 560, `<div style="display:flex;gap:12px;flex:1;min-height:0">${constatsPanel(STIFLE, { ro: true, w: 300, closed: true, badge: `<span class="r badge">${ico('lock', 'sm')}Lecture seule</span>` })}
|
||
<div style="flex:1;display:flex;flex-direction:column;gap:8px">${note('Les constats se consultent, se cherchent et se filtrent ; aucun ajout, aucune modification, aucun changement de zone. Les filtres restent disponibles : ils ne modifient pas la fiche.')}</div></div>`)}</div>`
|
||
const phone = `<div class="vign"><div class="lbl">D. Moins de 1 024 px : consultation, filtre par liste</div><div style="display:flex;gap:16px">
|
||
<div class="frame phone" style="height:780px"><div class="ph-top">${ico('menu')}<b style="font-weight:600">Brouillon, version 4</b><span class="badge" style="margin-left:auto">${ico('lock', 'sm')}Lecture seule</span></div>
|
||
<div class="ph-body" style="padding:12px;gap:8px"><div class="tabs" style="padding:0;margin:0"><a>Annotations</a><a>Vérification</a><a class="on">Plus ▾</a><span class="small muted" style="align-self:center">Constats</span></div>
|
||
<div class="notice info" style="font-size:12px">${ico('info', 'sm')}<div>L'édition demande un écran d'au moins 1 024 px de large.</div></div><span class="inp" style="height:44px">${ico('search', 'sm')}<span class="muted">Rechercher un constat</span></span><div class="lrow"><span class="count">${pl(ALL_FINDINGS, 'constat', 'constats')}</span><span class="r"><span class="btn secondary" style="height:44px">${ico('layers', 'sm')}Filtrer</span></span></div>
|
||
<div class="sheet" style="height:360px"><div class="grab"></div><div class="phead">Filtrer sur le schéma<span class="r" style="display:flex;gap:4px;align-items:center"><span class="btn ghost sm" style="height:44px">Réinitialiser</span><span style="width:44px;height:44px;display:grid;place-items:center">${ico('close')}</span></span></div>
|
||
<div style="display:flex;gap:6px;flex-wrap:wrap">${DOC.views.map((v, i) => `<span class="chip ${i === 0 ? 'on' : ''}" style="height:44px">${v.fr}</span>`).join('')}</div>
|
||
<div class="tree">${ANN.filter((a) => a.view === 'main' && a.kind !== 'detail_trigger').slice(0, 4).map((a) => `<div class="lrow" style="min-height:44px"><span class="cb ${ids.includes(a.zone) ? 'on' : ''}"></span>${short(nameOf(a))}</div>`).join('')}</div></div></div></div>
|
||
<div style="width:180px">${note('Sous 1 024 px (O14 A), l\'éditeur est en consultation : recherche et filtre disponibles, choix des zones dans une liste à cibles de 44 px, sans sélection sur le dessin. Le dessin reste consultable dans l\'onglet Annotations.')}</div></div></div>`
|
||
document.getElementById('b22').innerHTML = none + kb + ro + phone
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|