829 lines
94 KiB
HTML
829 lines
94 KiB
HTML
<!doctype html>
|
||
<html lang="fr">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>Faunosteo V1-2.6 R0 arbitrages du premier essai (proposition)</title>
|
||
<!--
|
||
V1-2.6 R0 boards (owner brief 2026-11-09 « Arbitrages du premier essai propriétaire », contract
|
||
.claude/tasks/contracts/2026-11-09-v1-2-6-trial-arbitrations.md): static functional mockups, never shipped,
|
||
NOT validated. Styles, icons, shell and drawing helpers are copied from docs/design/v1-2-6-constats/maquettes.html
|
||
(itself copied from the validated docs/design/v1-2-6/maquettes.html); the editor shell follows the U1 build
|
||
(apps/app/src/components/editor). Every reference, citation count, finding name and type comes from data.js,
|
||
generated by gen-data.cjs from the equine draft document.json. Staging text is listed in REVUE.md.
|
||
Rendered to PNG by ../v1-2-6/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; }
|
||
.annot.inline { padding: 4px 9px; font-size: 12px; align-self: flex-start; }
|
||
/* 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; }
|
||
/* ---------- R0 additions (same tokens, no new colour family) ---------- */
|
||
.hbtn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 9px; border-radius: 6px; font-size: 14px; color: var(--color-ink); white-space: nowrap; }
|
||
.hbtn[disabled] { opacity: .4; }
|
||
.focus { outline: 2px solid var(--color-accent); outline-offset: 2px; }
|
||
.tip { position: absolute; z-index: 9; background: var(--color-ink); color: var(--color-bg); font-size: 12px; line-height: 1.35; padding: 6px 9px; border-radius: 6px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
|
||
.clr { width: 28px; height: 28px; margin-left: auto; margin-right: -4px; display: grid; place-items: center; border-radius: 6px; color: var(--color-ink-muted); flex: none; }
|
||
.clr.big { width: 44px; height: 44px; margin-right: -10px; }
|
||
.sortsel { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
|
||
.sortsel .inp { min-width: 210px; }
|
||
.rlist { display: flex; flex-direction: column; gap: 8px; }
|
||
.rtile { border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); }
|
||
.rtile.open { border-color: var(--color-border); box-shadow: 0 2px 8px rgba(31,27,22,.06); }
|
||
.rhead { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; min-height: 44px; }
|
||
.rhead .chev { width: 24px; height: 24px; display: grid; place-items: center; flex: none; color: var(--color-ink-muted); margin-top: -1px; }
|
||
.rcit { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; }
|
||
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
||
.rmeta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; width: 168px; }
|
||
.rmeta .cnt { font-size: 12px; color: var(--color-ink-muted); white-space: nowrap; }
|
||
.rbody { border-top: 1px solid var(--color-border); padding: 12px 16px 14px 48px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
|
||
.rdl { display: grid; grid-template-columns: 76px 1fr; gap: 6px 10px; margin: 0; }
|
||
.rdl dt { color: var(--color-ink-muted); }
|
||
.rdl dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||
.rcited .lrow { min-height: 32px; border-top: 1px solid var(--color-surface-strong); }
|
||
.rcited .path { color: var(--color-ink-muted); }
|
||
.ractions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
||
.ractions .sep { width: 1px; height: 22px; background: var(--color-border); margin: 0 2px; }
|
||
.rtile.ph .rhead { flex-wrap: wrap; padding: 10px 12px; }
|
||
.rtile.ph .rmeta { width: auto; flex-direction: row; align-items: center; gap: 8px; padding-left: 34px; flex-basis: 100%; }
|
||
.rtile.ph .rbody { padding: 12px 12px 14px 12px; }
|
||
.rtile.ph .rdl { grid-template-columns: 52px 1fr; }
|
||
.ph-body > * { flex-shrink: 0; }
|
||
.scrollbar { position: absolute; right: 2px; width: 5px; border-radius: 3px; background: rgba(31,27,22,.25); }
|
||
.pbody { flex: 1; min-height: 0; padding: 26px 32px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
|
||
h1.big { font: 400 30px/1.2 var(--font-serif); margin: 0; }
|
||
.srow { display: flex; flex-direction: column; gap: 3px; padding: 11px 16px; border-top: 1px solid var(--color-border); }
|
||
.srow:first-child { border-top: 0; }
|
||
.srow .l1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
|
||
.srow .l1 b { font-weight: 500; }
|
||
.srow .l2 { font-size: 13px; color: var(--color-ink-muted); }
|
||
.srow .date { margin-left: auto; font-size: 13px; color: var(--color-ink-muted); white-space: nowrap; }
|
||
.mini { position: relative; width: 250px; height: 170px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg); overflow: hidden; }
|
||
.mini .blk { position: absolute; background: var(--color-surface-strong); border-radius: 4px; }
|
||
.mini .scr { position: absolute; left: 0; right: 0; bottom: 0; top: 46px; background: rgba(31,27,22,.25); }
|
||
.mini .pan { position: absolute; top: 46px; bottom: 0; right: 0; width: 140px; background: var(--color-surface); border-left: 1px solid var(--color-border); box-shadow: -8px 0 18px rgba(31,27,22,.12); }
|
||
.mini .pan i { display: block; height: 8px; margin: 10px 12px 0; border-radius: 3px; background: var(--color-surface-strong); }
|
||
.ccard { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; box-shadow: 0 1px 2px rgba(31,27,22,.05); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
|
||
.ccard h2 { font: 400 20px/1.25 var(--font-serif); margin: 0; }
|
||
table.esc { border-collapse: collapse; width: 100%; font-size: 13px; }
|
||
table.esc th, table.esc td { border-bottom: 1px solid var(--color-border); padding: 7px 8px; text-align: left; vertical-align: top; }
|
||
table.esc th { font-size: 12px; color: var(--color-ink-muted); font-weight: 600; }
|
||
table.esc td.n { font-weight: 700; color: var(--color-accent-strong); width: 22px; }
|
||
</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>
|
||
<symbol id="i-external" viewBox="0 0 24 24"><path d="M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/></symbol>
|
||
<symbol id="i-sort" viewBox="0 0 24 24"><path d="M7 4v16M7 20l-3-3M7 20l3-3M17 20V4M17 4l-3 3M17 4l3 3"/></symbol>
|
||
<symbol id="i-deselect" viewBox="0 0 24 24"><path d="M4 8V5a1 1 0 0 1 1-1h3M16 4h3a1 1 0 0 1 1 1v3M20 16v3a1 1 0 0 1-1 1h-3M8 20H5a1 1 0 0 1-1-1v-3M9 9l6 6M15 9l-6 6"/></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
|
||
}
|
||
|
||
/* ---------- editor stage helpers, copied unchanged ---------- */
|
||
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>`
|
||
|
||
/* ---------- R0 shell: U1 as built (DraftHeader, EditorTabs, HistoryButtons, SaveLine) + the R0 changes ---------- */
|
||
const NAV = [['dashboard','Tableau de bord'],['users','Clients'],['paw','Animaux'],['book','Fiches anatomiques'],['HR'],['shield','Administration'],['HR'],['user','Mon compte'],['tool','Outil de bilan']]
|
||
const ico = (n, c = '') => `<svg class="icon ${c}" aria-hidden="true"><use href="#i-${n}"/></svg>`
|
||
// noAdmin: an account without capability (board 01 v1-2-4) has no « Administration » entry.
|
||
const side = (on = 'Administration', noAdmin = false) => `<aside class="side"><div class="logo"><img src="${LOGO}" alt="Faunosteo"></div><nav class="nav">${NAV.filter(([, l], k) => !noAdmin || (l !== 'Administration' && k !== 4)).map(([i, l]) => i === 'HR' ? '<hr>' : `<a class="${l === on ? 'on' : ''}">${ico(i)}${l}</a>`).join('')}</nav><div class="foot muted">Se déconnecter</div></aside>`
|
||
const ME = `<span class="me"><span class="avatar">BC</span>Bastien Chanot</span>`
|
||
// R0: five tabs, Références between Constats and Vérification (owner brief §1).
|
||
const TABS = ['Général', 'Annotations', 'Constats', 'Références', 'Vérification']
|
||
// R0 §2: « Défaire » / « Refaire »; name = aria-label, title adds the real shortcut (useUndoShortcuts.ts: Ctrl+Z, Ctrl+Maj+Z, no Ctrl+Y).
|
||
const HIST = {
|
||
undo: ['undo', 'Défaire', 'Défaire la dernière modification', 'Ctrl+Z ou ⌘Z'],
|
||
redo: ['redo', 'Refaire', 'Refaire la dernière modification défaite', 'Ctrl+Maj+Z ou ⇧⌘Z'],
|
||
}
|
||
const hbtn = (k, o = {}) => { const [i, l, n, s] = HIST[k]; return `<span class="hbtn ${o.focus ? 'focus' : ''}" title="${n} (${s})"${o.off ? ' disabled' : ''}>${ico(i, 'sm')}${o.iconOnly ? '' : l}</span>` }
|
||
const hist = (o = {}) => `<span style="margin-left:auto;align-self:center;display:flex;gap:4px;padding-bottom:3px;position:relative">${hbtn('undo', { focus: o.focusUndo, off: o.ro })}${hbtn('redo', { off: true })}${o.tip ? `<span style="position:absolute;top:24px;left:58px;z-index:10">${ico('cursor', 'sm')}</span><span class="tip" style="top:44px;right:60px">${HIST.undo[2]} (${HIST.undo[3]})</span>` : ''}</span>`
|
||
function tabs(on, o = {}) {
|
||
return '<div class="tabs">' + TABS.map(t => `<a class="${t === on ? 'on' : ''}">${t}${t === 'Vérification' ? ' <span class="badge danger">2 erreurs</span>' : ''}</a>`).join('') + hist(o) + '</div>'
|
||
}
|
||
const UNSAVED = '3 modifications non enregistrées'
|
||
function saveLine(o = {}) {
|
||
if (o.ro) return `<span class="s13 muted" style="white-space:nowrap">Révision 11</span>`
|
||
return `<span class="s13 muted" style="white-space:nowrap">${o.unsaved || UNSAVED}</span><span class="btn secondary sm">Abandonner les modifications</span><span class="btn primary sm">Enregistrer</span>`
|
||
}
|
||
// R0: no « Références » button in the header any more (owner brief §1).
|
||
function header(o = {}) {
|
||
return `<div class="ehead"><h1 class="page">Brouillon, version 4</h1><span class="badge">Brouillon</span><span class="badge">Copie de travail</span>${o.ro ? `<span class="badge">${ico('lock', 'sm')}Lecture seule</span>` : ''}
|
||
<span style="margin-left:auto;display:flex;gap:8px;align-items:center">${saveLine(o)}</span></div>`
|
||
}
|
||
const CRUMB = 'Administration › Fiches officielles › Cheval, squelette et rachis › <b>Brouillon, version 4</b>'
|
||
function editor(o) {
|
||
return `<div class="frame desk" style="height:${o.h || 800}px">${side()}<div class="main">
|
||
<div class="top"><span class="crumb">${CRUMB}</span>${ME}</div>
|
||
${header(o)}${o.notice ? `<div style="padding:8px 24px 0">${o.notice}</div>` : ''}${tabs(o.tab, o)}
|
||
<div class="work">${o.body}</div>${o.overlay || ''}</div></div>`
|
||
}
|
||
function pageFrame(o) {
|
||
return `<div class="frame desk" style="height:${o.h || 800}px;${o.w ? `width:${o.w}px` : ''}">${o.noSide ? '' : side(o.nav, o.noAdmin)}<div class="main">
|
||
<div class="top"><span class="crumb" style="color:var(--color-ink)">${o.crumb}</span>${o.me || ME}</div>
|
||
<div class="pbody">${o.body}</div></div></div>`
|
||
}
|
||
const note = (html, style = '') => `<div class="annot" style="${style}">${html}</div>`
|
||
const vframe = (w, h, inner, style = '') => `<div class="frame" style="width:${w}px;height:${h}px;display:flex;flex-direction:column;gap:10px;padding:14px;${style}">${inner}</div>`
|
||
|
||
/* ---------- references (all from DOC.references, generated) ---------- */
|
||
const TYPE = { book: 'Livre', journal: 'Article de revue', standard: 'Norme', legal: 'Texte juridique', web: 'Site web', manual: 'Manuel' }
|
||
const REFS = DOC.references
|
||
const refById = Object.fromEntries(REFS.map((r) => [r.id, r]))
|
||
const coll = new Intl.Collator('fr', { sensitivity: 'base' })
|
||
const SORTS = {
|
||
doc: ['Ordre de la fiche', (a, b) => a.index - b.index],
|
||
az: ['Citation (A → Z)', (a, b) => coll.compare(a.citation, b.citation) || a.index - b.index],
|
||
count: ['Nombre de citations', (a, b) => b.cited - a.cited || a.index - b.index],
|
||
type: ['Type', (a, b) => coll.compare(TYPE[a.type], TYPE[b.type]) || a.index - b.index],
|
||
}
|
||
// Same match as editor/references/filter.ts: citation, DOI and URL, folded.
|
||
const refMatch = (r, q) => !q || [r.citation, r.doi || '', r.url || ''].some((f) => fold(f).includes(fold(q.trim())))
|
||
const shown = (q, sort) => REFS.filter((r) => refMatch(r, q)).sort(SORTS[sort][1])
|
||
// Existing wording editor.references.cited_* (« citée {count} fois »): the count includes families.
|
||
const citedTxt = (n) => n === 0 ? 'Non citée' : `Citée ${n} fois`
|
||
const UNCITED = REFS.filter((r) => r.cited === 0).length
|
||
const ellip = 'min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap'
|
||
function citedRows(r, o = {}) {
|
||
if (!r.cited) return `<div class="small muted">Aucun constat ni aucune famille ne cite cette référence.</div>`
|
||
const h = o.ph ? 'min-height:44px;' : ''
|
||
const cur = (c) => o.current && c.zone === o.current.zoneFr && c.fr === o.current.fr
|
||
return `<div class="rcited"><div style="font-weight:600;margin-bottom:2px">${citedTxt(r.cited)}, par :</div>${r.citedBy.map((c) =>
|
||
`<div class="lrow" style="${h}align-items:flex-start;padding:4px 0"><span style="min-width:0;flex:1"><span class="path">${[c.zone, ...c.trail].map(short).join(' › ')} › </span>${c.fr}${c.kind === 'category' ? ' <span class="badge">famille</span>' : ''}${cur(c) ? ' <span class="badge accent">ce constat</span>' : ''}</span><a class="lnk r" style="white-space:nowrap${o.ph ? ';min-height:44px;display:inline-flex;align-items:center' : ''}">Aller à</a></div>`).join('')}</div>`
|
||
}
|
||
// One reference tile. o: open, q (highlight), ro, move (show Monter / Descendre), panel, ph (phone), focus, edit.
|
||
function tile(r, o = {}) {
|
||
const cit = r.citation
|
||
const meta = `<div class="rmeta" style="${o.metaW ? `width:${o.metaW}px` : ''}"><span class="badge">${TYPE[r.type]}</span><span class="cnt">${citedTxt(r.cited)}</span></div>`
|
||
const head = `<div class="rhead ${o.focus ? 'focus' : ''}" style="${o.focus ? 'border-radius:11px' : ''}"><span class="chev">${ico(o.open ? 'down' : 'chevron', 'sm')}</span><div class="rcit ${o.open ? '' : 'clamp2'}">${cit}</div>${meta}</div>`
|
||
if (!o.open) return `<div class="rtile ${o.ph ? 'ph' : ''}">${head}</div>`
|
||
const ext = (t) => `<a class="lnk" style="display:inline-flex;gap:4px;align-items:center;max-width:100%"><span style="overflow:hidden;text-overflow:ellipsis">${t}</span>${ico('external', 'sm')}</a>`
|
||
const dl = `<dl class="rdl"><dt>Type</dt><dd>${TYPE[r.type]}</dd><dt>DOI</dt><dd>${r.doi ? ext(r.doi) : '<span class="muted">Aucun</span>'}</dd><dt>URL</dt><dd>${r.url ? ext(r.url) : '<span class="muted">Aucune</span>'}</dd></dl>`
|
||
let actions = ''
|
||
if (!o.ro) {
|
||
// The core refuses deleting a cited reference: no « Supprimer » while it is cited, a hint instead.
|
||
const del = o.panel ? `<span class="btn secondary sm">${ico('minus', 'sm')}Retirer de ce constat</span>`
|
||
: r.cited ? '' : `<span class="btn dangertxt sm">${ico('trash', 'sm')}Supprimer</span>`
|
||
actions = `<div class="ractions"><span class="btn secondary sm">${ico('pen', 'sm')}Modifier</span>${del}`
|
||
if (o.move) actions += `<span class="sep"></span><span class="btn secondary sm"${r.index === 0 ? ' disabled' : ''}>${ico('up', 'sm')}Monter</span><span class="btn secondary sm"${r.index === REFS.length - 1 ? ' disabled' : ''}>${ico('down', 'sm')}Descendre</span>`
|
||
actions += '</div>'
|
||
}
|
||
const delHint = !o.ro && !o.panel && r.cited ? DELETE_HINT : ''
|
||
return `<div class="rtile open ${o.ph ? 'ph' : ''}">${head}<div class="rbody">${dl}${citedRows(r, o)}${actions}${delHint}</div></div>`
|
||
}
|
||
const DELETE_HINT = `<div class="s13 muted" style="display:flex;gap:6px;align-items:flex-start">${ico('info', 'sm')}<span>Pour supprimer cette référence, retirez d'abord chacune de ses citations : « Aller à », puis « Retirer » dans le détail du constat ou de la famille.</span></div>`
|
||
function searchBox(o = {}) {
|
||
const h = o.ph ? 'height:44px;' : ''
|
||
const inner = o.q
|
||
? `${ico('search', 'sm')}<span>${o.q}</span><span class="clr ${o.ph ? 'big' : ''} ${o.focusClear ? 'focus' : ''}" title="Effacer la recherche">${ico('close', 'sm')}</span>`
|
||
: `${ico('search', 'sm')}<span class="muted">Rechercher une référence</span>`
|
||
return `<span class="inp ${o.focusField ? 'focus' : ''}" style="${h}width:${o.w || 340}px;padding-right:${o.q ? 4 : 10}px">${inner}</span>`
|
||
}
|
||
// A native <select> with its external label « Trier par », drawn closed (same control as the admin filters).
|
||
function sortBox(sort, o = {}) {
|
||
if (o.ph) return `<div class="field" style="width:100%"><label>Trier par</label><span class="inp ${o.focus ? 'focus' : ''}" style="height:44px">${SORTS[sort][0]}<span class="caret">${ico('down', 'sm')}</span></span></div>`
|
||
return `<span class="sortsel"><span>Trier par</span><span class="inp ${o.focus ? 'focus' : ''}">${SORTS[sort][0]}<span class="caret">${ico('down', 'sm')}</span></span></span>`
|
||
}
|
||
const countTxt = (n, q) => q ? `${pl(n, 'référence', 'références')} sur ${REFS.length}` : pl(n, 'référence', 'références')
|
||
function refBar(o = {}) {
|
||
const list = shown(o.q, o.sort || 'doc')
|
||
return `<div class="sbar" style="flex-wrap:wrap">${searchBox(o)}${sortBox(o.sort || 'doc', { focus: o.focusSort })}<span class="count">${countTxt(list.length, o.q)}</span>
|
||
${o.ro ? '' : `<span style="margin-left:auto"><span class="btn secondary sm">${ico('plus', 'sm')}Ajouter une référence</span></span>`}</div>`
|
||
}
|
||
const HINT = `<div class="s13 muted" style="display:flex;gap:6px;align-items:center">${ico('info', 'sm')}Pour réorganiser, affichez l'ordre de la fiche sans recherche.</div>`
|
||
// Staging line (not interface text): yellow annotation style.
|
||
const ROW_MORE = (txt) => `<div class="annot inline">${txt}</div>`
|
||
</script>
|
||
|
||
<!-- ================================================================== 23 references tab -->
|
||
<div class="row"><div data-board="23-references-onglet-desktop">
|
||
<p class="sheet-title">23. Onglet « Références » (cinquième onglet, entre Constats et Vérification) : tuiles repliables, recherche, tri, ordre de la fiche par défaut (1 280 px, mode édition)</p>
|
||
<div id="b23"></div></div></div>
|
||
<script>
|
||
{
|
||
const list = shown('', 'doc'), OPEN = refById['white-2022'], at = list.indexOf(OPEN)
|
||
const part = list.slice(at - 2, at + 3)
|
||
const body = `<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:10px;position:relative">
|
||
<div class="lrow" style="min-height:0"><h2 class="sec" style="margin:0">Références</h2></div>
|
||
${refBar({ focusSort: true })}
|
||
<div style="position:relative;flex:1;min-height:0;overflow:hidden;padding-right:12px">
|
||
<div class="scrollbar" style="top:${Math.round(at / list.length * 100)}%;height:14%"></div>
|
||
<div class="rlist">${ROW_MORE(`⋮ ${pl(at - 2, 'référence', 'références')} au-dessus (liste défilée)`)}${part.map((r) => tile(r, { open: r === OPEN || r.id === 'jakel-2011', move: true })).join('')}${ROW_MORE(`⋮ ${pl(list.length - at - 3, 'référence', 'références')} en dessous`)}</div></div></div>`
|
||
document.getElementById('b23').innerHTML = editor({ tab: 'Références', h: 1012, body })
|
||
+ `<div style="display:flex;gap:12px;margin-top:10px;width:1280px">${note(`<b>Tuiles :</b> fermée = citation sur deux lignes au plus (coupée), type, « Citée N fois » (libellé actuel, familles comprises) ou « Non citée ». Ouverte = citation entière, type, DOI et URL (liens externes, nouvel onglet), constats et familles qui la citent (une famille porte la marque « famille ») avec « Aller à », actions. L'en-tête de tuile est un bouton (aria-expanded) de 44 px ; plusieurs tuiles peuvent rester ouvertes. Comptes calculés comme <span class="mono">citations.ts</span> (familles et constats à toute profondeur) : ${DOC.citations} citations, ${UNCITED} références non citées sur ${REFS.length}. Ici deux tuiles ouvertes : « Jäkel… », citée par une famille seulement, et « ${short(OPEN.citation.split('.')[0])} », ${OPEN.index + 1}e de la fiche (liste défilée).`, 'flex:1')}
|
||
${note(`<b>Tri :</b> « Ordre de la fiche » par défaut, puis « Citation (A → Z) », « Nombre de citations » (décroissant), « Type » ; à égalité, l'ordre de la fiche. Liste native (select) avec son étiquette « Trier par », focus clavier montré. Le tri ne modifie jamais le document. « Monter » / « Descendre » n'existent qu'en ordre de la fiche sans recherche (une modification chacun, annulable). « Supprimer » n'apparaît pas sur une référence citée (le cœur refuserait) : une ligne d'aide explique comment retirer ses citations d'abord. <b>En-tête :</b> plus de bouton « Références » ; « Défaire » / « Refaire ». La recherche est vide : le bouton « Effacer la recherche » apparaît dès la saisie (planche 24). « Ajouter une référence » : en mode édition sur toute vue de l'onglet (planche 24 E). Les lignes jaunes « ⋮ … » sont des annotations de la planche, pas du texte d'interface.`, 'flex:1')}</div>
|
||
<!-- whole-pixel height, and the frame above 78 px shorter: board 23 keeps its approved height, so the boards below keep
|
||
their page offsets and the approved 25, 27, 30 render byte-identical -->
|
||
<div style="width:1280px;margin-top:12px;height:66px">${note('<b>Suppression :</b> les deux tuiles ouvertes sont citées (Jäkel par une famille, White SA par trois constats) : pas de « Supprimer », la ligne d\'aide le remplace. Une référence non citée (« Non citée ») garde « Supprimer » dans sa tuile ouverte, avec le dialogue de confirmation existant.')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 24 search, sort, states -->
|
||
<div class="row"><div data-board="24-references-recherche-tri">
|
||
<p class="sheet-title">24. Onglet « Références » : recherche et tri A → Z, aucun résultat, lecture seule, modification en cours gardée entre onglets</p>
|
||
<div id="b24" style="display:grid;grid-template-columns:repeat(2,640px);gap:20px"></div></div></div>
|
||
<script>
|
||
{
|
||
const Q = 'ostéopathie', res = shown(Q, 'az')
|
||
const a = `<div class="vign"><div class="lbl">A. Recherche « ${Q} », tri « Citation (A → Z) » : pas de réorganisation</div>${vframe(640, 700, `
|
||
<div class="sbar" style="flex-wrap:wrap">${searchBox({ q: Q, w: 300, focusClear: true })}${sortBox('az')}</div>
|
||
<div class="lrow"><span class="count">${countTxt(res.length, Q)}</span><span class="r"><span class="btn secondary sm">${ico('plus', 'sm')}Ajouter une référence</span></span></div>
|
||
${HINT}
|
||
<div class="rlist">${res.slice(0, 4).map((r, i) => tile(r, { q: Q, metaW: 150, open: i === 0 && !r.cited })).join('')}${ROW_MORE(`⋮ ${pl(res.length - 4, 'autre résultat', 'autres résultats')} en dessous (liste défilée)`)}</div>`)}${note('<b>Non citée :</b> la tuile ouverte garde « Supprimer » (dialogue de confirmation existant). Une référence citée n\'a pas de suppression directe : ligne d\'aide, planche 23.', 'width:640px')}</div>`
|
||
const NQ = 'radiographie'
|
||
const b = `<div class="vign"><div class="lbl">B. Aucun résultat</div>${vframe(640, 250, `
|
||
<div class="sbar">${searchBox({ q: NQ, w: 300 })}${sortBox('doc')}</div>
|
||
<div class="lrow"><span class="count">${countTxt(shown(NQ, 'doc').length, NQ)}</span><span class="r"><span class="btn secondary sm">${ico('plus', 'sm')}Ajouter une référence</span></span></div>
|
||
<div class="notice info">${ico('info', 'sm')}<div><b>Aucune référence ne contient « ${NQ} ».</b> La recherche porte sur la citation, le DOI et l'URL.<div style="margin-top:8px"><span class="btn secondary sm">${ico('close', 'sm')}Effacer la recherche</span></div></div></div>`)}</div>`
|
||
const RO = refById['haussler-2021']
|
||
const c = `<div class="vign"><div class="lbl">C. Lecture seule (habilitations, revue en cours, fiche historique, moins de 1 024 px)</div>${vframe(640, 520, `
|
||
<div class="notice info">${ico('info', 'sm')}<div><b>Vos habilitations ne permettent pas de modifier ce brouillon. Il reste consultable.</b></div></div>
|
||
<div class="sbar">${searchBox({ w: 300 })}${sortBox('doc')}<span class="count">${countTxt(REFS.length)}</span></div>
|
||
<div class="rlist">${tile(shown('', 'doc')[RO.index - 1], {})}${tile(RO, { open: true, ro: true })}</div>`)}</div>`
|
||
const ED = refById['carmalt-2013']
|
||
const form = `<div class="rtile open"><div class="rhead"><span class="chev">${ico('down', 'sm')}</span><div class="rcit"><b style="font-weight:600">Modifier la référence</b></div><div class="rmeta" style="width:150px"><span class="cnt">${citedTxt(ED.cited)}</span></div></div>
|
||
<div class="rbody" style="padding-left:16px">
|
||
<div class="grid2"><div class="field"><label>Type</label><span class="inp">${TYPE[ED.type]}<span class="caret">${ico('down', 'sm')}</span></span></div><div class="field"><label>DOI</label><span class="inp muted">Aucun</span></div></div>
|
||
<div class="field"><label>Citation</label><span class="inp area focus">${ED.citation}</span></div>
|
||
<div class="field"><label>Adresse web (URL)</label><span class="inp">${ED.url}</span></div>
|
||
${citedRows(ED)}
|
||
<div class="ractions"><span class="btn secondary sm">Terminer</span><span class="annot inline">Chaque champ s'applique au brouillon quand il perd le focus, comme aujourd'hui.</span></div></div></div>`
|
||
const d = `<div class="vign"><div class="lbl">D. Modification en cours : rien n'est perdu en changeant d'onglet (vue recadrée)</div>${vframe(640, 740, `
|
||
<div class="lrow" style="justify-content:flex-end;gap:8px">${saveLine({ unsaved: '2 modifications non enregistrées' })}</div>
|
||
<div class="tabs" style="padding:0;margin:0">${TABS.map((t) => `<a class="${t === 'Références' ? 'on' : ''}">${t}</a>`).join('')}</div>
|
||
${form}
|
||
${note(`Aller sur « Constats » puis revenir : la tuile est toujours ouverte en modification, au même endroit, avec la recherche et le tri choisis. Les champs déjà appliqués sont dans le brouillon (« 2 modifications non enregistrées ») ; rien n'est enregistré sur le serveur avant « Enregistrer ». « Défaire » retire la dernière modification, champ par champ. En modification, la tuile garde « Citée 2 fois, par » et ses « Aller à » ; « Supprimer », « Monter » et « Descendre » sont masqués jusqu'à « Terminer ». Vue recadrée : en-tête, « Défaire » / « Refaire » et « 2 erreurs » omis.`)}`)}</div>`
|
||
const last = shown('', 'doc')[REFS.length - 1]
|
||
const add = `<div class="rtile open"><div class="rhead"><span class="chev">${ico('down', 'sm')}</span><div class="rcit"><b style="font-weight:600">Nouvelle référence</b></div><div class="rmeta" style="width:150px"><span class="cnt">Non citée</span></div></div>
|
||
<div class="rbody" style="padding-left:16px">
|
||
<div class="grid2"><div class="field"><label>Type</label><span class="inp muted">Choisir…<span class="caret">${ico('down', 'sm')}</span></span></div><div class="field"><label>DOI</label><span class="inp"></span></div></div>
|
||
<div class="field"><label>Citation</label><span class="inp area focus"></span></div>
|
||
<div class="field"><label>Adresse web (URL)</label><span class="inp"></span></div>
|
||
<div class="ractions"><span class="btn primary sm">Ajouter la référence</span><span class="small muted">Type et citation obligatoires.</span></div></div></div>`
|
||
const e = `<div class="vign"><div class="lbl">E. « Ajouter une référence » : nouvelle tuile en fin de fiche</div>${vframe(640, 560, `
|
||
${refBar({ w: 230 })}
|
||
${ROW_MORE(`⋮ ${pl(REFS.length - 1, 'référence', 'références')} au-dessus (recherche et tri remis à zéro, liste défilée jusqu'à la fin)`)}
|
||
<div class="rlist">${tile(last, {})}${add}</div>`)}</div>`
|
||
document.getElementById('b24').innerHTML = a + `<div style="display:flex;flex-direction:column;gap:20px">${b}${c}</div>` + d
|
||
+ `<div style="display:flex;flex-direction:column;gap:20px">${e}<div class="vign" style="align-self:start">${note(`<b>A :</b> ${pl(res.length, 'référence contient', 'références contiennent')} « ${Q} » (citation, DOI ou URL, sans tenir compte des accents ni de la casse), dont ${pl(res.filter((r) => !r.cited).length, 'non citée', 'non citées')}. Tri A → Z selon l'ordre alphabétique français. Pas de « Monter » / « Descendre » : une ligne d'aide les remplace. Focus clavier sur « Effacer la recherche » : il vide le champ et rend le focus au champ.<br><b>B :</b> « Effacer la recherche » est aussi proposé dans le message. <b>C :</b> notice de mode existante (ModeNotice) ; DOI, URL et « Aller à » restent ; ni ajout, ni modification, ni suppression, ni réorganisation. <b>D :</b> « Terminer » (nouveau) referme le formulaire de la tuile ; les champs restent ceux d'aujourd'hui. <b>E :</b> le bouton vide la recherche, remet « Ordre de la fiche », ouvre une tuile vide à la fin de la liste (la place de la nouvelle référence dans la fiche), focus sur « Citation ». « Ajouter la référence » (libellé existant) la crée en une modification ; la tuile reste ouverte. Aucun surlignage des résultats : la recherche filtre seulement.`)}</div></div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 25 contextual panel from a finding -->
|
||
<div class="row"><div data-board="25-volet-references-constat">
|
||
<p class="sheet-title">25. Volet contextuel ouvert depuis un constat : ses seules citations, « Tout afficher dans l'onglet Références », largeur min(34 rem, place disponible), glissement 150 à 200 ms</p>
|
||
<div id="b25"></div></div></div>
|
||
<script>
|
||
{
|
||
const F = DOC.findings.slice().sort((a, b) => b.refs.length - a.refs.length)[0]
|
||
const zone = DOC.zones.find((z) => z.id === F.zone)
|
||
const refs = F.refs.map((id) => refById[id])
|
||
const OPEN = refs.find((r) => r.doi && !r.url) || refs[0]
|
||
// Background: the Constats tab as built (tree + detail), under the scrim.
|
||
const fam = zone.families.find((f) => f.fr === F.trail[0])
|
||
const tree = `<div class="pcard tree" style="flex:1;min-width:0;overflow:hidden">
|
||
<div class="lrow" style="font-weight:600">${ico('down', 'sm')}${zone.fr}</div>
|
||
<div class="lrow" style="padding-left:22px;font-weight:600">${ico('down', 'sm')}${fam.fr}</div>
|
||
${fam.children.map((n) => `<div class="lrow" style="padding-left:44px${n.fr === F.fr ? ';background:var(--color-surface-strong);border-radius:8px' : ''}">${ico('chevron', 'sm')}${n.fr}</div>`).join('')}
|
||
${zone.families.filter((f) => f !== fam).map((f) => `<div class="lrow" style="padding-left:22px;font-weight:600">${ico('chevron', 'sm')}${f.fr}</div>`).join('')}</div>`
|
||
const detail = `<div class="pcard" style="width:360px;flex:none"><div class="small muted">${zone.fr} › ${fam.fr}</div><div class="phead" style="font-size:15px">${F.fr}</div>
|
||
<div class="lrow"><b class="s13">Références citées</b><span class="r chip on">${ico('book', 'sm')}${pl(refs.length, 'référence', 'références')}</span></div>
|
||
${refs.slice(0, 4).map((r) => `<div class="small clamp2">${r.citation}</div>`).join('')}</div>`
|
||
const PW = 544
|
||
const panel = `<div class="fpanel" style="top:151px;width:${PW}px;gap:10px;overflow:hidden">
|
||
<div class="phead" style="font:400 19px var(--font-serif)">${ico('book')}Références citées<span class="r" style="width:44px;height:44px;display:grid;place-items:center;margin:-10px -8px -10px auto" title="Fermer les références">${ico('close')}</span></div>
|
||
<div class="s13"><span class="muted">${zone.fr} › ${F.trail.join(' › ')} › </span><b style="font-weight:600">${F.fr}</b></div>
|
||
<div class="lrow"><span class="count">${pl(refs.length, 'référence citée', 'références citées')} par ce constat</span><span class="r"><a class="lnk s13" style="display:inline-flex;gap:4px;align-items:center;min-height:44px">Tout afficher dans l'onglet Références${ico('chevron', 'sm')}</a></span></div>
|
||
<div class="rlist" style="position:relative;padding-right:10px"><div class="scrollbar" style="top:0;height:55%"></div>${refs.map((r) => tile(r, { open: r === OPEN, panel: true, metaW: 132, current: F })).join('')}</div></div>`
|
||
const scrim = `<div style="position:absolute;left:0;right:0;bottom:0;top:151px;background:rgba(31,27,22,.25)"></div>`
|
||
const main = editor({ tab: 'Constats', h: 940, body: `<div style="flex:1;display:flex;gap:12px;min-height:0">${tree}${detail}</div>`, overlay: scrim + panel })
|
||
// Motion strip.
|
||
const mini = (shift, scrim, label, o = {}) => `<div class="vign" style="width:250px"><div class="lbl" style="font-weight:500;min-height:36px">${label}</div><div class="mini">
|
||
<div class="blk" style="left:10px;top:10px;width:120px;height:12px"></div><div class="blk" style="left:10px;top:30px;width:200px;height:8px"></div>
|
||
<div class="blk" style="left:10px;top:58px;width:140px;height:100px"></div><div class="blk" style="left:160px;top:58px;width:80px;height:100px"></div>
|
||
<div class="scr" style="opacity:${scrim}"></div>
|
||
<div class="pan" style="transform:translateX(${shift}%);opacity:${o.op ?? 1}"><i style="width:60%"></i><i></i><i style="width:80%"></i><i></i><i style="width:70%"></i></div></div></div>`
|
||
const strip = `<div style="display:flex;gap:14px;align-items:flex-end">
|
||
${mini(100, 0, '0 ms : clic sur « 7 références »')}${mini(22, .7, '≈ 90 ms : le volet glisse depuis la droite')}${mini(0, 1, '180 ms : en place, focus sur son titre')}
|
||
<span style="width:1px;align-self:stretch;background:var(--color-border)"></span>${mini(0, 1, 'prefers-reduced-motion : apparition sans glissement', { op: 1 })}</div>`
|
||
const trigger = `<div class="vign"><div class="lbl">Déclencheur (détail du constat, sous le voile)</div><div class="pcard" style="width:360px">
|
||
<div class="lrow"><b class="s13">Références citées</b><span class="r"><span class="chip on focus" style="height:44px">${ico('book', 'sm')}${pl(refs.length, 'référence', 'références')}</span></span></div>
|
||
<div class="small muted">Bouton existant (« ${pl(refs.length, 'référence', 'références')} ») : aria-expanded vaut true tant que le volet est ouvert. À la fermeture (croix, Échap, voile), le focus y revient.</div></div></div>`
|
||
document.getElementById('b25').innerHTML = main
|
||
+ `<div style="display:flex;gap:20px;margin-top:14px;width:1580px;align-items:flex-start">${trigger}<div class="vign"><div class="lbl">Mouvement</div>${strip}
|
||
${note('<b>150 à 200 ms, sortie plus courte</b> (proposé : entrée 180 ms en décélération, sortie 140 ms en accélération), translation horizontale seule, voile en fondu sur la même durée. Avec prefers-reduced-motion : apparition sans glissement (volet et voile affichés d\'un coup), même chose à la fermeture.', 'width:1100px')}</div></div>`
|
||
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1280px">${note(`<b>Contenu :</b> les ${pl(refs.length, 'référence citée', 'références citées')} par « ${F.fr} » (${zone.fr}), le constat du brouillon qui en cite le plus. Mêmes tuiles que l'onglet ; actions « Modifier » et « Retirer de ce constat » (retire la citation du constat : une modification ordinaire, annulable ; la référence reste dans la fiche), constats cités avec « Aller à », le constat courant marqué « ce constat » ; pas de « Supprimer » (toujours refusé ici : chaque référence du volet est citée par le constat) ; ni « Monter » / « Descendre », ni ajout (on cite une référence depuis le détail du constat). « Tout afficher dans l'onglet Références » ferme le volet et ouvre l'onglet, recherche et tri remis à zéro, focus sur son titre. Volet défilant ; la page derrière est inerte.`, 'flex:1')}
|
||
${note(`<b>Largeur :</b> min(34 rem, place disponible) = ${PW} px ici (27 rem aujourd'hui). À 1 024 px de fenêtre, l'éditeur n'a pas de barre latérale (elle n'apparaît qu'à 1 280 px, ShellChrome.tsx) : la zone de contenu fait 960 px, le volet garde ses 544 px et le voile couvre les 416 px restants. Sous 640 px (téléphone), il prend toute la largeur.`, 'flex:1')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 26 history labels and deselect -->
|
||
<div class="row"><div data-board="26-historique-deselection">
|
||
<p class="sheet-title">26. Historique « Défaire » / « Refaire » et « Désélectionner » près de « Supprimer » ; touche Échap ; distinction avec le « Annuler » des dialogues</p>
|
||
<div id="b26"></div></div></div>
|
||
<script>
|
||
{
|
||
const STIFLE = ANN.find((a) => a.id === 'stifle')
|
||
const zone = DOC.zones.find((z) => z.id === STIFLE.zone)
|
||
const catName = DOC.categories.find((c) => c.id === STIFLE.cat).fr
|
||
const LAT = { bilateral: 'Bilatérale', left: 'Gauche', right: 'Droite', unpaired: 'Non latéralisée' }
|
||
const ST = { to_confirm: ['warn', 'À confirmer'], reviewed: ['ok', 'Relu'], inherited: ['', 'Hérité, non relu'] }
|
||
const ring = (a, u) => a.g[0] === 'c' ? `<circle cx="${a.g[1]}" cy="${a.g[2]}" r="${a.g[3] + 6 * u}" fill="none" stroke="#1f1b16" stroke-width="${2.5 * u}"/>` : ''
|
||
const props = (o = {}) => `<div class="pcard" style="gap:10px;${o.w ? `width:${o.w}px` : ''}">
|
||
<span class="btn secondary sm" style="align-self:flex-start">Toutes les annotations</span>
|
||
<div class="phead">${ico('point', 'sm')}Point<span class="r badge ${ST[STIFLE.status][0]}">${ST[STIFLE.status][1]}</span></div>
|
||
<div class="grid2"><div class="field"><label>Nom (FR)</label><span class="inp">${STIFLE.fr}</span></div><div class="field"><label>Nom (EN)</label><span class="inp">${STIFLE.en}</span></div></div>
|
||
<div class="grid2"><div class="field"><label>Catégorie</label><span class="inp">${sw(CATS.art.c, CATS.art.o)}${catName}${o.ro ? '' : `<span class="caret">${ico('down', 'sm')}</span>`}</span></div><div class="field"><label>Latéralité</label><span class="inp">${LAT[STIFLE.lat]}${o.ro ? '' : `<span class="caret">${ico('down', 'sm')}</span>`}</span></div></div>
|
||
<div class="field"><label>Zone de constats</label><span class="inp">${zone.fr}</span></div>
|
||
<div class="field"><label>Position et rayon</label><div style="display:grid;grid-template-columns:repeat(3,1fr);gap:8px">${[['Centre x', STIFLE.g[1]], ['Centre y', STIFLE.g[2]], ['Rayon', STIFLE.g[3]]].map(([l, v]) => `<div class="field"><span class="small muted">${l}</span><span class="inp">${v}</span></div>`).join('')}</div></div>
|
||
${o.ro ? '' : '<span class="btn secondary sm" style="align-self:flex-start">Marquer comme relu</span>'}
|
||
<div style="border-top:1px solid var(--color-border);padding-top:10px;display:flex;gap:8px;flex-wrap:wrap"><span class="btn secondary sm">${ico('deselect', 'sm')}Désélectionner</span>${o.ro ? '' : `<span class="btn dangertxt sm">${ico('trash', 'sm')}Supprimer</span>`}</div></div>`
|
||
// U1 as built (EditableAnnotations CanvasColumn, AnnotationCanvas, ToolColumn, EditorGlyph): view chips, tool hint,
|
||
// selection tag, the icon-only tool column (44 px, aria-label = title) beside the canvas, the keyboard add buttons.
|
||
const G = { select: 'M5 3l12 7-5 1-3 5z', point: 'M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM12 3v3M12 18v3M3 12h3M18 12h3', zone: 'M12 3l8 6-3 10H7L4 9z', link: 'M4 4h8v8H4zM12 12h8v8h-8z', out: 'M5 11h12M20 20l-4-4', in: 'M11 5v12M5 11h12M20 20l-4-4', fit: 'M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5' }
|
||
const glyph = (k) => `<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${G[k]}"/></svg>`
|
||
const tb = (k, label, on) => `<span title="${label}" style="width:44px;height:44px;display:grid;place-items:center;border-radius:8px;border:1px solid var(--color-border);${on ? 'background:var(--color-ink);color:#fff' : 'background:var(--color-surface);color:var(--color-ink)'}">${glyph(k)}</span>`
|
||
const toolCol = `<div role="toolbar" style="display:flex;flex-direction:column;gap:8px;flex:none">${tb('select', 'Sélectionner et déplacer', true)}${tb('point', 'Point')}${tb('zone', 'Zone')}${tb('link', 'Accès à une vue détaillée')}<hr style="border:0;border-top:1px solid var(--color-border);margin:0;width:44px">${tb('out', 'Zoom arrière')}${tb('in', 'Zoom avant')}${tb('fit', 'Ajuster')}</div>`
|
||
const chips = `<div style="display:flex;gap:8px;flex-wrap:wrap">${DOC.views.map((v, i) => `<span class="chip ${i === 0 ? 'on' : ''}" style="height:28px">${v.fr}</span>`).join('')}</div>`
|
||
const stage = `<div class="stage" style="gap:10px">${chips}<div class="s13 muted">Outil : sélectionner et déplacer · Échap annule un tracé</div>
|
||
<span style="align-self:flex-start;background:var(--color-surface-strong);border-radius:6px;padding:4px 8px;font-size:12px">Sélection : point « ${STIFLE.fr} »</span>
|
||
<div style="display:flex;gap:8px;flex:1;min-height:0">${toolCol}<div class="canvas" style="background:#fff">${drawing({ w: 580, h: 443, extra: (u) => ring(STIFLE, u) })}</div></div>
|
||
<div style="display:flex;gap:8px;flex-wrap:wrap"><span class="btn secondary sm">Ajouter un point</span><span class="btn secondary sm">Ajouter une zone</span><span class="btn secondary sm">Ajouter un accès</span></div></div>`
|
||
// h: 800 minus the 17.390625 px the longer « Désélectionner » note adds, so the boards below keep their page offsets
|
||
// (approved 27 and 30 render byte-identical); the drawing loses the same 17 px.
|
||
const main = editor({ h: 782.609375, tab: 'Annotations', tip: true, body: stage + `<div class="panel" style="width:360px">${props()}</div>` })
|
||
const dialog = `<div class="vign"><div class="lbl">A. Dialogue de confirmation : son « Annuler » ferme le dialogue sans rien faire</div>
|
||
<div class="frame" style="width:420px;height:240px;position:relative;background:rgba(31,27,22,.42);display:grid;place-items:center">
|
||
<div class="dialog" style="width:360px"><div style="font:400 19px var(--font-serif)">Supprimer « ${STIFLE.fr} » ?</div>
|
||
<div class="s14">Supprimer « ${STIFLE.fr} » du brouillon ?</div>
|
||
<div style="display:flex;gap:8px;justify-content:flex-end"><span class="btn secondary sm">Annuler</span><span class="btn sm" style="background:var(--color-danger);color:#fff">Supprimer</span></div></div></div>
|
||
<div class="small muted" style="width:420px">Libellés existants (editor.delete.*). « Défaire » agit sur le brouillon ; « Annuler » d'un dialogue n'agit que sur le dialogue : les deux mots ne se croisent plus.</div></div>`
|
||
const rows = [
|
||
['Dialogue ouvert', 'ferme le dialogue (comme « Annuler »)', 'Dialogue natif (D13)'],
|
||
['Menu ouvert', 'ferme le menu, focus sur son bouton', 'Menu « Plus » (moins de 640 px)'],
|
||
['Volet contextuel', 'ferme le volet, focus sur son déclencheur', 'Références d\'un constat, filtre du schéma'],
|
||
['Tracé en cours', 'abandonne le tracé (rien n\'est créé)', 'Ajouter une zone, redessiner'],
|
||
['Sélection', 'désélectionne', 'Annotation, sommet ou poignée choisie'],
|
||
]
|
||
const esc = `<div class="vign"><div class="lbl">B. Touche Échap : la première situation qui s'applique la consomme</div><div class="frame" style="width:560px;padding:12px 14px">
|
||
<table class="esc"><tr><th></th><th>Situation</th><th>Échap</th><th>Exemples</th></tr>${rows.map(([s, e, x], i) => `<tr><td class="n">${i + 1}</td><td><b style="font-weight:600">${s}</b></td><td>${e}</td><td class="muted">${x}</td></tr>`).join('')}</table>
|
||
<div class="small muted" style="margin-top:8px">Dans un champ de saisie, Échap reste au champ (ex. recherche non vide : l'effacer). Rien de tout cela ne consomme Échap : il ne fait rien. « Trier par » est une liste native : le navigateur gère Échap.</div></div></div>`
|
||
const ro = `<div class="vign"><div class="lbl">C. Lecture seule : « Désélectionner » reste, « Supprimer » disparaît</div><div style="display:flex;gap:10px">${props({ ro: true, w: 340 })}</div></div>`
|
||
document.getElementById('b26').innerHTML = main
|
||
+ `<div style="display:flex;gap:20px;margin-top:14px;width:1720px;align-items:flex-start">${dialog}${esc}${ro}</div>`
|
||
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1280px">${note(`<b>Historique :</b> « Défaire » / « Refaire » (EN « Undo » / « Redo » inchangés), à droite de la barre d'onglets, sur tous les onglets. Nom accessible « ${HIST.undo[2]} » / « ${HIST.redo[2]} » ; info-bulle native (attribut title, au survol de la souris seulement, montré ici) avec le raccourci réel (${HIST.undo[3]}, ${HIST.redo[3]} ; pas de Ctrl+Y). Au clavier et pour les lecteurs d'écran, le raccourci passe par aria-keyshortcuts (aujourd'hui Control+Z / Control+Shift+Z ; ajouter Meta+Z / Meta+Shift+Z pour ⌘).`, 'flex:1')}
|
||
${note(`<b>Désélectionner :</b> bouton secondaire à gauche de « Supprimer », qui garde son style de danger. La désélection est un état d'interface : aucune modification du document, aucune entrée d'historique, « 3 modifications non enregistrées » ne bouge pas. Focus ensuite sur la ligne de l'annotation dans la liste si elle existe encore (même chemin que « Toutes les annotations », focusRow), sinon sur le dessin ; rendre le focus ne crée jamais de sélection. Annonce accessible : « Aucune annotation sélectionnée. » <b>À noter :</b> « Toutes les annotations », en haut du volet, désélectionne déjà ; point soumis au propriétaire.`, 'flex:1')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 27 phone references -->
|
||
<div class="row"><div data-board="27-telephone-references">
|
||
<p class="sheet-title">27. Téléphone (375 px) : éditeur en lecture seule, « Références » dans le menu « Plus », onglet Références en consultation</p>
|
||
<div id="b27" style="display:flex;gap:24px;align-items:flex-start"></div></div></div>
|
||
<script>
|
||
{
|
||
const top = `<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>`
|
||
const notice = `<div class="notice info" style="font-size:12px">${ico('info', 'sm')}<div>L'édition nécessite une largeur d'écran d'au moins 1 024 px.</div></div>`
|
||
// EditorTabs as built below 640 px: Annotations, Vérification, « Plus »; history wraps to its own row; the disclosure row comes last.
|
||
const tabRow = (o) => `<div class="tabs" style="padding:0;margin:0;flex-wrap:wrap;gap:0">
|
||
<a class="${o.on === 'Annotations' ? 'on' : ''}" style="padding:12px 10px">Annotations</a><a style="padding:12px 10px">Vérification <span class="badge danger">2 erreurs</span></a><a class="${o.more ? 'on' : ''} ${o.focusMore ? 'focus' : ''}" style="padding:12px 10px">Plus</a>
|
||
<span style="margin-left:auto;display:flex">${hbtn('undo', { iconOnly: true, off: true }).replace('class="hbtn', 'style="width:44px;height:44px;justify-content:center" class="hbtn')}${hbtn('redo', { iconOnly: true, off: true }).replace('class="hbtn', 'style="width:44px;height:44px;justify-content:center" class="hbtn')}</span>
|
||
${o.open ? `<div style="flex-basis:100%;display:flex;gap:4px;border-top:1px solid var(--color-border);padding:4px 0">${['Général', 'Constats', 'Références'].map((t) => `<a style="border:0;margin:0;padding:12px 10px;border-radius:6px" class="${t === 'Références' ? 'focus' : ''}">${t}</a>`).join('')}</div>` : ''}</div>`
|
||
const f1 = `<div class="vign"><div class="lbl">A. « Plus » ouvert</div><div class="frame phone">${top}<div class="ph-body" style="padding:12px;gap:10px">${notice}${tabRow({ on: 'Annotations', open: true })}
|
||
<div class="canvas" style="flex:1">${drawing({ w: 330, h: 300 })}</div></div></div></div>`
|
||
const list = shown('', 'doc')
|
||
const f2 = `<div class="vign"><div class="lbl">B. Onglet Références</div><div class="frame phone">${top}<div class="ph-body" style="padding:12px;gap:10px">${notice}${tabRow({ more: true })}
|
||
${searchBox({ ph: true, w: 335 })}<div style="display:flex;gap:8px;align-items:center">${sortBox('doc', { ph: true })}</div><span class="count">${countTxt(REFS.length)}</span>
|
||
<div class="rlist">${list.slice(0, 5).map((r) => tile(r, { ph: true })).join('')}</div></div></div></div>`
|
||
const OPEN = refById['white-2022'], at = list.indexOf(OPEN)
|
||
const f3 = `<div class="vign"><div class="lbl">C. Une tuile ouverte (consultation)</div><div class="frame phone">${top}<div class="ph-body" style="padding:12px;gap:10px">
|
||
${ROW_MORE(`⋮ liste défilée jusqu'à la ${at + 1}e référence`)}
|
||
<div class="rlist">${tile(list[at - 1], { ph: true })}${tile(OPEN, { ph: true, open: true, ro: true })}${tile(list[at + 1], { ph: true })}</div></div></div></div>`
|
||
document.getElementById('b27').innerHTML = f1 + f2 + f3
|
||
+ `<div style="width:300px;display:flex;flex-direction:column;gap:10px">${note('<b>« Plus » :</b> sous 640 px, les onglets visibles restent Annotations et Vérification (tabs.ts, SHOWN.small) ; « Plus » contient Général, Constats et désormais Références. Il porte le style actif quand l\'onglet affiché est dans son menu (B).')}
|
||
${note('<b>Lecture seule :</b> sous 1 024 px l\'éditeur ne modifie rien (notice existante) ; « Défaire » / « Refaire » restent visibles et indisponibles, sur une seconde ligne faute de place, comme aujourd\'hui.')}
|
||
${note('<b>Tuiles :</b> type et nombre de citations passent sous la citation ; cibles de 44 px (en-tête de tuile, « Aller à », effacement de la recherche, tri). « Trier par » : la même liste native qu\'au bureau, étiquette au-dessus. Ni ajout, ni modification, ni suppression, ni réorganisation. DOI, URL et « Aller à » restent.')}</div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 28 admin sheet list -->
|
||
<script>
|
||
// STAGING (no document data exists for these): sheet rows, versions, rounds and dates. Species names come from the
|
||
// species rows of the migrations (Cheval in 20261008110000, the others in 20261026100000); every row other than
|
||
// « Cheval, squelette et rachis » (validated boards) and « Cheval (fiche historique) » (board 10 v1-2-4) is illustrative.
|
||
const SHEETS = [
|
||
['Cheval, squelette et rachis', 'Cheval', ['Copie de travail', ['accent', '1 à relire']], 'Active · version publiée 3 · brouillon version 4 · revue n° 2 : À relire', '9 nov. 2026, 12:06', 'Brouillon'],
|
||
['Chien, squelette et rachis', 'Chien', [], 'Active · aucune version publiée · brouillon version 1', '8 nov. 2026, 17:41', 'Brouillon'],
|
||
['Chat, squelette et rachis', 'Chat', [], 'Active · aucune version publiée · brouillon version 2 · revue n° 1 : Modifications demandées', '7 nov. 2026, 09:15', 'Brouillon'],
|
||
['Cheval, tête et crâne', 'Cheval', [['accent', '1 à relire']], 'Active · version publiée 1 · brouillon version 2 · revue n° 2 : À relire', '5 nov. 2026, 16:20', 'Brouillon'],
|
||
['Âne, squelette et rachis', 'Âne', [], 'Active · version publiée 1', '3 nov. 2026, 11:02', 'Publiée'],
|
||
['Bovin, squelette et rachis', 'Bovin', [], 'Active · aucune version publiée · brouillon version 1', '30 oct. 2026, 14:48', 'Brouillon'],
|
||
['Chien, tête et crâne', 'Chien', [], 'Active · aucune version publiée · brouillon version 1', '28 oct. 2026, 10:30', 'Brouillon'],
|
||
['Chèvre, squelette et rachis', 'Chèvre', [], 'Active · aucune version publiée · brouillon version 1', '27 oct. 2026, 15:12', 'Brouillon'],
|
||
['Mouton, squelette et rachis', 'Mouton', [], 'Active · aucune version publiée · brouillon version 1', '24 oct. 2026, 08:57', 'Brouillon'],
|
||
['Porc, squelette et rachis', 'Porc', [['warn', 'Archivée']], 'Archivée · version publiée 1', '21 oct. 2026, 18:05', 'Publiée'],
|
||
['Lapin, squelette et rachis', 'Lapin', [], 'Active · aucune version publiée · brouillon version 1', '20 oct. 2026, 13:40', 'Brouillon'],
|
||
['Cheval (fiche historique)', 'Cheval', ['Fiche historique'], 'Active · version publiée 2', '9 oct. 2026, 10:00', 'Publiée'],
|
||
]
|
||
const badges = (bs) => bs.map((b) => Array.isArray(b) ? `<span class="badge ${b[0]}">${b[1]}</span>` : `<span class="badge">${b}</span>`).join('')
|
||
const sheetMatch = (s, q) => !q || fold(s[0]).includes(fold(q))
|
||
const sheetCount = (n, q) => q ? `${pl(n, 'fiche', 'fiches')} sur ${SHEETS.length}` : pl(n, 'fiche', 'fiches')
|
||
function sheetRow(s, o = {}) {
|
||
const [name, sp, bs, line, date] = s
|
||
if (o.ph) return `<div class="srow" style="min-height:44px"><div class="l1"><b>${name}</b>${badges(bs)}</div><div class="l2">${sp} · ${line}</div><div class="l2">Modifiée le ${date}</div></div>`
|
||
return `<div class="srow"><div class="l1"><b>${name}</b>${badges(bs)}<span class="date">Modifiée le ${date}</span></div><div class="l2">${sp} · ${line}</div></div>`
|
||
}
|
||
const sel = (label, val, o = {}) => `<div class="field" style="${o.style || ''}"><label>${label}</label><span class="inp ${o.focus ? 'focus' : ''}" style="${o.ph ? 'height:44px' : ''}">${val}<span class="caret">${ico('down', 'sm')}</span></span></div>`
|
||
const FILTERS = ['Espèce', 'État de la fiche', 'Statut de version', 'État de la dernière revue']
|
||
function sheetSearch(q, o = {}) {
|
||
const h = o.ph ? 'height:44px;' : ''
|
||
return `<span class="inp ${o.focus ? 'focus' : ''}" style="${h}width:${o.w || 340}px;padding-right:${q ? 4 : 10}px">${ico('search', 'sm')}${q ? `<span>${q}</span><span class="clr ${o.ph ? 'big' : ''}" title="Effacer la recherche">${ico('close', 'sm')}</span>` : '<span class="muted">Rechercher une fiche par son nom</span>'}</span>`
|
||
}
|
||
</script>
|
||
<div class="row"><div data-board="28-liste-fiches-desktop">
|
||
<p class="sheet-title">28. Administration › Fiches officielles : recherche par nom, tri par dernière modification (défaut) ou nom, date visible ; mêmes filtres, liste générique pour toutes les espèces</p>
|
||
<div id="b28"></div></div></div>
|
||
<script>
|
||
{
|
||
const body = `<div style="display:flex;align-items:center;gap:12px"><h1 class="big">Fiches officielles</h1><span class="btn primary" style="margin-left:auto;height:44px">Nouvelle fiche</span></div>
|
||
<div class="sbar" style="gap:16px">${sheetSearch('', { focus: true })}<span class="sortsel"><span>Trier par</span><span class="inp" style="min-width:230px">Dernière modification<span class="caret">${ico('down', 'sm')}</span></span></span></div>
|
||
<div style="display:grid;grid-template-columns:repeat(4,1fr);gap:12px">${FILTERS.map((f) => sel(f, 'Tous')).join('')}</div>
|
||
<div class="count">${sheetCount(SHEETS.length)}</div>
|
||
<div class="card" style="overflow:hidden">${SHEETS.map((s) => sheetRow(s)).join('')}</div>`
|
||
const Q = 'cheval', hits = SHEETS.filter((s) => sheetMatch(s, Q))
|
||
const inset = `<div class="vign"><div class="lbl">Recherche « ${Q} » : le compteur dit « N fiches sur 12 »</div>${vframe(760, 300, `
|
||
<div class="sbar" style="gap:16px">${sheetSearch(Q)}<span class="sortsel"><span>Trier par</span><span class="inp" style="min-width:200px">Dernière modification<span class="caret">${ico('down', 'sm')}</span></span></span></div>
|
||
<div class="count">${sheetCount(hits.length, Q)}</div><div class="card" style="overflow:hidden">${hits.map((s) => sheetRow(s, { q: Q })).join('')}</div>`)}</div>`
|
||
const NQ = 'mulet'
|
||
const empty = `<div class="vign"><div class="lbl">Recherche sans résultat</div>${vframe(760, 230, `
|
||
<div class="sbar" style="gap:16px">${sheetSearch(NQ)}<span class="sortsel"><span>Trier par</span><span class="inp" style="min-width:200px">Dernière modification<span class="caret">${ico('down', 'sm')}</span></span></span></div>
|
||
<div class="count">${sheetCount(SHEETS.filter((s) => sheetMatch(s, NQ)).length, NQ)}</div>
|
||
<div class="notice info">${ico('info', 'sm')}<div><b>Aucune fiche ne contient « ${NQ} » dans son nom.</b><div style="margin-top:8px"><span class="btn secondary sm">${ico('close', 'sm')}Effacer la recherche</span></div></div></div>`)}</div>`
|
||
document.getElementById('b28').innerHTML = pageFrame({ crumb: 'Administration › Fiches officielles', h: 1110, body })
|
||
+ `<div style="display:flex;gap:20px;margin-top:14px;width:1280px;align-items:flex-start"><div style="display:flex;flex-direction:column;gap:20px">${inset}${empty}</div><div style="flex:1;display:flex;flex-direction:column;gap:10px">
|
||
${note('<b>Recherche :</b> instantanée, sur le nom de la fiche seulement, sans accents ni casse (comme le catalogue). « Effacer la recherche » vide le champ et y rend le focus. Elle se combine aux quatre filtres existants.')}
|
||
${note('<b>Tri :</b> « Dernière modification » (récente d\'abord, défaut) ou « Nom » (A → Z, ordre alphabétique français). <b>Date :</b> voir le point soumis sur sa source (la date actuelle de la liste ignore les enregistrements de brouillon).')}
|
||
${note('<b>Après le checkpoint SQL seulement</b> (docs/development/V1-2-6_R3_SQL_CHECKPOINT.md) : la date « Modifiée le … » et le tri « Dernière modification » montrent l\'état qui suit ce checkpoint. Avant lui, R3 propose la recherche et le tri par nom seuls, sans date.')}
|
||
${note('<b>Sans résultat :</b> la phrase nomme la recherche (« Aucune fiche ne contient « mulet » dans son nom. ») ; si des filtres sont aussi actifs, la phrase existante « Aucune fiche ne correspond à ces filtres. » reste. Aucun surlignage du texte trouvé.')}
|
||
${note('<b>Générique :</b> aucune section « fiches historiques », aucun filtre de test. « Fiche historique » et « Copie de travail » restent les badges actuels, venus des indicateurs du serveur ; ces fiches sont des lignes ordinaires. Lignes, versions et dates : mise en scène (REVUE.md).')}</div></div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 29 phone list and admin home -->
|
||
<div class="row"><div data-board="29-liste-fiches-telephone-accueil">
|
||
<p class="sheet-title">29. A : la liste des fiches à 375 px (recherche active) ; B : accueil Administration, carte « Fiches officielles » enrichie</p>
|
||
<div id="b29" style="display:flex;gap:24px;align-items:flex-start"></div></div></div>
|
||
<script>
|
||
{
|
||
const Q = 'cheval', hits = SHEETS.filter((s) => sheetMatch(s, Q))
|
||
const phone = `<div class="vign"><div class="lbl">A. Téléphone, page entière (défilement)</div><div class="frame phone" style="height:1020px">
|
||
<div class="ph-top">${ico('menu')}<span class="muted s13">Administration ›</span><b style="font-weight:600">Fiches officielles</b></div>
|
||
<div class="ph-body" style="padding:16px;gap:12px">
|
||
<h1 class="big" style="font-size:26px">Fiches officielles</h1><span class="btn primary" style="height:44px;align-self:flex-start">Nouvelle fiche</span>
|
||
${sheetSearch(Q, { ph: true, w: 327 })}
|
||
${sel('Trier par', 'Dernière modification', { ph: true })}
|
||
${FILTERS.map((f) => sel(f, 'Tous', { ph: true })).join('')}
|
||
<div class="count">${sheetCount(hits.length, Q)}</div>
|
||
<div class="card" style="overflow:hidden">${hits.map((s) => sheetRow(s, { ph: true, q: Q })).join('')}</div></div></div></div>`
|
||
const top5 = SHEETS.slice(0, 5)
|
||
const card = `<div class="ccard"><h2>Fiches officielles</h2><div class="s14 muted">Brouillons, revues, versions.</div>
|
||
<div class="small muted" style="font-weight:600;text-transform:uppercase;letter-spacing:.04em">Dernières modifications</div>
|
||
<div>${top5.map(([name, sp, bs, line, date]) => `<div class="srow" style="padding:9px 0"><div class="l1"><a class="lnk" style="color:var(--color-ink);text-decoration:none;font-weight:500">${name}</a>${badges(bs)}</div>
|
||
<div class="l2">${sp} · ${line}</div><div class="l2">Modifiée le ${date}</div></div>`).join('')}</div>
|
||
<a class="lnk s14" style="font-weight:500;min-height:44px;display:inline-flex;align-items:center">Voir les ${SHEETS.length} fiches</a></div>`
|
||
const entry = (t, b) => `<div class="ccard"><h2>${t}</h2><div class="s14 muted">${b}</div><span class="btn secondary sm" style="align-self:flex-start">Ouvrir</span></div>`
|
||
const home = pageFrame({ crumb: 'Administration', h: 860, body: `<h1 class="big">Administration</h1>
|
||
<div class="s14 muted">Vos habilitations : éditeur de fiches, responsable de publication · rôle propriétaire · session renforcée (double authentification) active.</div>
|
||
<div style="display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start">${card}<div style="display:flex;flex-direction:column;gap:16px">${entry('Espèces', 'Espèces du catalogue, actives ou non.')}${entry('Accès et habilitations', 'Accès au catalogue et habilitations : attribution, échéance, révocation.')}</div></div>` })
|
||
document.getElementById('b29').innerHTML = phone + `<div class="vign"><div class="lbl">B. Accueil Administration (1 280 px)</div>${home}
|
||
<div style="display:flex;gap:12px;width:1280px">${note('<b>Carte :</b> les cinq fiches modifiées le plus récemment (même tri et même date que la liste), avec les badges et la ligne de détail de la liste (espèce, état, versions, revue), sans nouveau badge, et la date ; lien « Voir les 12 fiches » vers la liste. Une fiche historique qui entre dans les cinq garde son action « Créer une copie de travail » sous sa ligne, comme aujourd\'hui.', 'flex:1')}
|
||
${note('<b>Téléphone :</b> filtres empilés comme aujourd\'hui (une colonne sous 640 px), cibles de 44 px, la date passe sur sa propre ligne. Données de mise en scène.', 'flex:1')}
|
||
${note('<b>Après le checkpoint SQL seulement</b> (docs/development/V1-2-6_R3_SQL_CHECKPOINT.md) : la date, le tri « Dernière modification » et les cinq fiches « les plus récentes » de la carte montrent l\'état qui suit ce checkpoint. Avant lui, la liste offre la recherche et le tri par nom sans date, et la carte liste les cinq premières fiches par nom, sans parler de « récent ».', 'flex:1')}</div></div>`
|
||
}
|
||
</script>
|
||
|
||
<!-- ================================================================== 30 catalogue integrity failure -->
|
||
<div class="row"><div data-board="30-catalogue-carte-integrite">
|
||
<p class="sheet-title">30. Catalogue : une carte dont la version publiée échoue au contrôle d'intégrité, avertie dès la liste ; la page de la fiche garde son message actuel</p>
|
||
<div id="b30"></div></div></div>
|
||
<script>
|
||
{
|
||
const views = DOC.views.length, zones = DOC.zones.length
|
||
const ok = `<div class="ccard"><div class="lrow" style="min-height:0"><span class="badge">Cheval</span><span class="r badge ok">${ico('check', 'sm')}Publiée</span></div>
|
||
<h2>Cheval, squelette et rachis</h2><div class="s13 muted">Version 3 · publiée le 28/10/2026 · ${pl(views, 'vue', 'vues')}, ${pl(zones, 'zone de constats', 'zones de constats')}</div>
|
||
<div style="border-radius:12px;background:var(--color-surface-strong);height:170px;display:grid;place-items:center;overflow:hidden">${drawing({ w: 230, h: 165 })}</div>
|
||
<span class="btn secondary" style="height:44px;align-self:flex-start">${ico('eye', 'sm')}Consulter</span></div>`
|
||
const failCard = (o = {}) => `<div class="ccard"><div class="lrow" style="min-height:0"><span class="badge">Chien</span><span class="r badge ok">${ico('check', 'sm')}Publiée</span></div>
|
||
<h2>Chien, squelette et rachis</h2><div class="s13 muted">Version 1</div>
|
||
${o.today ? '' : `<div class="notice error">${ico('alert', 'sm')}<div><b>Contrôle d'intégrité échoué : cette version ne peut pas être affichée.</b></div></div>`}
|
||
<span class="btn secondary ${o.focus ? 'focus' : ''}" style="height:44px;align-self:flex-start">${ico('eye', 'sm')}Consulter</span></div>`
|
||
const netCard = `<div class="ccard"><div class="lrow" style="min-height:0"><span class="badge">Chat</span><span class="r badge ok">${ico('check', 'sm')}Publiée</span></div>
|
||
<h2>Chat, squelette et rachis</h2><div class="s13 muted">Version 2</div>
|
||
<div class="notice warn">${ico('cloud-off', 'sm')}<div>Connexion au serveur impossible. Vérifiez votre réseau.</div></div>
|
||
<div style="display:flex;gap:8px;flex-wrap:wrap"><span class="btn secondary" style="height:44px">Réessayer</span><span class="btn secondary" style="height:44px">${ico('eye', 'sm')}Consulter</span></div></div>`
|
||
const body = `<div><h1 class="big">Fiches anatomiques</h1><div class="s14 muted" style="margin-top:4px">Les fiches officielles publiées, par espèce. Consultation seule : rien n'est modifié ici.</div></div>
|
||
<div class="sbar" style="gap:12px"><span class="inp" style="width:340px">${ico('search', 'sm')}<span class="muted">Rechercher une fiche</span></span><span class="chip on">Toutes les espèces</span><span class="chip">Cheval</span><span class="chip">Chien</span><span class="chip">Chat</span></div>
|
||
<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:16px;align-items:start">${ok}${failCard({ focus: true })}${netCard}</div>`
|
||
const cat = pageFrame({ nav: 'Fiches anatomiques', noAdmin: true, crumb: 'Fiches anatomiques', h: 640, body, me: `<span class="me"><span class="avatar">CL</span>Camille Laurent</span>` })
|
||
const today = `<div class="vign"><div class="lbl">Aujourd'hui : la même carte, sans rien dire</div><div style="width:330px">${failCard({ today: true })}</div><div class="small muted" style="width:330px">Les détails n'ont pas pu être lus : la carte perd ses comptes et sa vignette sans explication (useCardDetails).</div></div>`
|
||
const page = `<div class="vign"><div class="lbl">La page de la fiche, inchangée (CatalogueFailureNotice ; barre latérale omise)</div>${pageFrame({ noSide: true, crumb: 'Fiches anatomiques', h: 240, me: `<span class="me"><span class="avatar">CL</span>Camille Laurent</span>`, body: `<div class="notice error" style="max-width:640px">${ico('alert', 'sm')}<div>L'empreinte de cette version ne correspond pas à celle enregistrée à sa publication.</div></div><span class="btn secondary" style="height:44px;align-self:flex-start">Réessayer</span>`, w: 900 })}</div>`
|
||
document.getElementById('b30').innerHTML = cat
|
||
+ `<div style="display:flex;gap:20px;margin-top:14px;width:1280px;align-items:flex-start">${today}${page}</div>`
|
||
+ `<div style="display:flex;gap:12px;margin-top:12px;width:1280px">${note('<b>Carte :</b> notice d\'erreur existante (même composant, même couleur) dans la carte : « Contrôle d\'intégrité échoué : cette version ne peut pas être affichée. » (EN proposé : « Integrity check failed: this version cannot be displayed. »). La carte reste dans la liste et « Consulter » reste disponible (focus clavier montré) : la page de la fiche donne le détail technique et « Réessayer ». Rien n\'est masqué ni contourné : le contrôle reste celui du cœur. Le badge « Publiée » reste à côté : la version est bien publiée, seule sa lecture échoue.', 'flex:1')}
|
||
${note('<b>Portée :</b> le message n\'apparaît que pour un échec d\'intégrité (empreinte de la version, empreinte d\'une illustration, illustration manquante, document illisible) . Un échec d\'une autre nature (ici le réseau, texte existant catalogue.failure.network) a sa propre ligne, en ton d\'avertissement, avec « Réessayer » pour cette carte. Les échecs de taille (caps) et de vue (view) restent à classer. « Chien » et « Chat, squelette et rachis » sont des cas illustratifs ; « Cheval, squelette et rachis », sa version et sa date de publication reprennent la planche 01 v1-2-4 ; ses comptes de vues et de zones sont ceux du brouillon.', 'flex:1')}</div>`
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|