Loksi 2026.10.0 (Android 3) : source correspondante

Export du dépôt interne d'Aleop, révision 5fbb921.
Cette révision appartient à :
Aleop a révisé 2026-10-09 22:14:30 +02:00
révision c3608b3938
91 fichiers modifiés
+7297

Aucun fichier ne correspond à votre recherche

+484
Voir le fichier
@@ -0,0 +1,484 @@
// Illustrations mobiles Loksi : une scène par illustration, rendue en clair et en sombre.
// node illustrations-mobiles/generate.mjs (depuis brand/)
//
// Sous-ensemble SVG volontairement étroit, pour que chaque maître passe tel quel en PDF
// vectoriel (iOS) et en VectorDrawable (Android) : path, g avec translate/rotate, dégradés
// linéaires en userSpaceOnUse, fill-opacity, trait à bouts ronds. Aucun filtre, aucun masque,
// aucun texte : les ombres de l'icône (feDropShadow) sont remplacées par des volumes pleins.
import { mkdirSync, writeFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
const HERE = dirname(fileURLToPath(import.meta.url));
const SIZE = 200;
// Palettes. Le clair reprend l'icône (face navy, porcelaine, cyan et leurs flancs).
// Le sombre éclaircit la face navy et assourdit la porcelaine pour tenir sur #121A27.
export const THEMES = {
clair: {
fond: '#E6F6FD', ombre: ['#003087', 0.10],
porc: ['#FFFFFF', '#F3F8FD', '#D9E6F4'], porcFlanc: '#A9C0DD', porcTrait: '#C8D8EA',
navy: ['#246CD0', '#06439E', '#001D59'], navyFlanc: '#001540', navyReflet: '#8EC2FF',
cyan: '#1FBFF5', cyanFlanc: '#1385B6', cyan2: '#009CDE', cyan2Flanc: '#006DAD',
encre: '#003087', ecran: ['#EAF7FE', '#BFE5F8'],
},
sombre: {
fond: '#172A45', ombre: ['#000000', 0.30],
porc: ['#EEF4FA', '#DCE6F2', '#B4C6DC'], porcFlanc: '#6F87A8', porcTrait: '#A3B7CF',
navy: ['#3B88EA', '#1458C2', '#0A3585'], navyFlanc: '#051A45', navyReflet: '#A9D2FF',
cyan: '#33C3FF', cyanFlanc: '#1385B6', cyan2: '#009CDE', cyan2Flanc: '#006DAD',
encre: '#0A3585', ecran: ['#DDF1FC', '#9FD3F0'],
},
};
// Géométrie
const f = (n) => +n.toFixed(2);
function rr(x, y, w, h, r) {
const [a, b, c, d] = Array.isArray(r) ? r : [r, r, r, r];
return `M${f(x + a)} ${f(y)}H${f(x + w - b)}A${b} ${b} 0 0 1 ${f(x + w)} ${f(y + b)}V${f(y + h - c)}` +
`A${c} ${c} 0 0 1 ${f(x + w - c)} ${f(y + h)}H${f(x + d)}A${d} ${d} 0 0 1 ${f(x)} ${f(y + h - d)}` +
`V${f(y + a)}A${a} ${a} 0 0 1 ${f(x + a)} ${f(y)}Z`;
}
const circle = (cx, cy, r) => `M${f(cx - r)} ${f(cy)}A${r} ${r} 0 1 0 ${f(cx + r)} ${f(cy)}A${r} ${r} 0 1 0 ${f(cx - r)} ${f(cy)}Z`;
const ellipse = (cx, cy, rx, ry) => `M${f(cx - rx)} ${f(cy)}A${rx} ${ry} 0 1 0 ${f(cx + rx)} ${f(cy)}A${rx} ${ry} 0 1 0 ${f(cx - rx)} ${f(cy)}Z`;
// Scène : liste d'éléments. Une forme = { d, fill } ou { d, stroke, width }. Un groupe = { g, items }.
class Scene {
constructor(t) { this.t = t; this.defs = []; this.items = []; this.n = 0; }
grad(stops, x1, y1, x2, y2) {
const id = `g${++this.n}`;
const s = stops.map((c, i) => `<stop offset="${f(i / (stops.length - 1))}" stop-color="${c}"/>`).join('');
this.defs.push(`<linearGradient id="${id}" gradientUnits="userSpaceOnUse" x1="${f(x1)}" y1="${f(y1)}" x2="${f(x2)}" y2="${f(y2)}">${s}</linearGradient>`);
return `url(#${id})`;
}
add(to, el) { (to || this.items).push(el); return el; }
// Volume : flanc plein décalé vers le bas, puis la face. C'est le relief de l'icône sans filtre.
bloc(to, d, dFlanc, face, flanc) { this.add(to, { d: dFlanc, fill: flanc }); this.add(to, { d, fill: face }); }
svg() {
const out = (els) => els.map((e) => {
if (e.g) return `<g transform="${e.g}">${out(e.items)}</g>`;
if (e.stroke) return `<path d="${e.d}" fill="none" stroke="${e.stroke}" stroke-width="${e.width}" stroke-linecap="round" stroke-linejoin="round"/>`;
return `<path d="${e.d}" fill="${e.fill}"${e.opacity != null ? ` fill-opacity="${e.opacity}"` : ''}/>`;
}).join('\n');
return `<svg xmlns="http://www.w3.org/2000/svg" width="${SIZE}" height="${SIZE}" viewBox="0 0 ${SIZE} ${SIZE}">\n` +
`<defs>${this.defs.join('')}</defs>\n${out(this.items)}\n</svg>\n`;
}
}
// Éléments partagés
function fond(s) {
s.add(null, { d: circle(100, 100, 86), fill: s.t.fond });
}
function ombreSol(s, cx, cy, rx, ry = 6) {
s.add(null, { d: ellipse(cx, cy, rx, ry), fill: s.t.ombre[0], opacity: s.t.ombre[1] });
}
function porcelaine(s, to, x, y, w, h, r, prof = 4) {
s.bloc(to, rr(x, y, w, h, r), rr(x, y + prof, w, h, r), s.grad(s.t.porc, x, y, x + w * 0.65, y + h), s.t.porcFlanc);
}
function navy(s, to, x, y, w, h, r, prof = 4) {
s.bloc(to, rr(x, y, w, h, r), rr(x, y + prof, w, h, r), s.grad(s.t.navy, x, y, x + w * 0.8, y + h), s.t.navyFlanc);
}
// Le glyphe de l'icône (anse porcelaine, L et petit bloc cyan), repris à l'identique, mis à l'échelle.
// Coordonnées d'origine : repère 64 de loksi-icon.svg, boîte x 12.3 à 49.9, y 9.95 à 55.
function glyphe(s, to, x, y, h) {
const k = h / 45.05, ox = x - 12.3 * k, oy = y - 9.95 * k;
const g = { g: `translate(${f(ox)} ${f(oy)}) scale(${f(k)})`, items: [] };
const anse = 'M19.6 27.3V24.2a10.95 10.95 0 0 1 21.9 0v3.1';
const L = 'M13.8 28.9H28.5a1.5 1.5 0 0 1 1.5 1.5V52.5a1.5 1.5 0 0 1-1.5 1.5H18.3a6 6 0 0 1-6-6V30.4a1.5 1.5 0 0 1 1.5-1.5Z';
const bloc = 'M34 41.1H44.9a5 5 0 0 1 5 5V48a7 7 0 0 1-7 7H34.5a1.5 1.5 0 0 1-1.5-1.5V42.1a1 1 0 0 1 1-1Z';
const flanc = { g: 'translate(0 1.6)', items: [
{ d: anse, stroke: s.t.porcFlanc, width: 6.6 }, { d: L, fill: s.t.cyanFlanc }, { d: bloc, fill: s.t.cyan2Flanc }] };
g.items.push(flanc,
{ d: anse, stroke: s.grad(s.t.porc, 19.6, 13, 41.5, 27.3), width: 6.6 },
{ d: L, fill: s.t.cyan }, { d: bloc, fill: s.t.cyan2 });
s.add(to, g);
}
// Tuile navy portant le glyphe : l'icône en miniature, pour les surfaces claires où l'anse disparaît.
function tuile(s, to, x, y, c) {
navy(s, to, x, y, c, c, c * 0.24, Math.max(2, c * 0.07));
const h = c * 0.6;
glyphe(s, to, x + (c - h * 37.6 / 45.05) / 2, y + (c - h) / 2, h);
}
const points = (s, to, x, y, n, r, pas, fill) => { for (let i = 0; i < n; i++) s.add(to, { d: circle(x + i * pas, y, r), fill }); };
const trait = (s, to, x, y, w, h, fill) => s.add(to, { d: rr(x, y, w, h, h / 2), fill });
function arc(cx, cy, r, a0, a1) {
const p = (a) => [cx + r * Math.cos(a * Math.PI / 180), cy + r * Math.sin(a * Math.PI / 180)];
const [x0, y0] = p(a0), [x1, y1] = p(a1);
return `M${f(x0)} ${f(y0)}A${r} ${r} 0 ${a1 - a0 > 180 ? 1 : 0} 1 ${f(x1)} ${f(y1)}`;
}
// Pastille d'état : disque cyan (ou navy pour une alerte) et un signe porcelaine.
// check, moins, excl, sortie, plus. Même relief que le reste : flanc plein 2,5 plus bas.
function pastille(s, cx, cy, r, signe, alerte = false) {
const t = s.t, w = f(r * 0.28), c = t.porc[0];
if (alerte) s.bloc(null, circle(cx, cy, r), circle(cx, cy + 2.5, r), s.grad(t.navy, cx - r, cy - r, cx + r, cy + r), t.navyFlanc);
else s.bloc(null, circle(cx, cy, r), circle(cx, cy + 2.5, r), t.cyan2, t.cyan2Flanc);
const P = (u, v) => `${f(cx + u * r)} ${f(cy + v * r)}`;
const d = {
check: `M${P(-0.4, 0.02)}L${P(-0.1, 0.32)}L${P(0.42, -0.28)}`,
moins: `M${P(-0.4, 0)}L${P(0.4, 0)}`,
plus: `M${P(-0.4, 0)}L${P(0.4, 0)}M${P(0, -0.4)}L${P(0, 0.4)}`,
excl: `M${P(0, -0.44)}L${P(0, 0.08)}`,
sortie: `M${P(-0.4, 0)}L${P(0.36, 0)}M${P(0.06, -0.3)}L${P(0.38, 0)}L${P(0.06, 0.3)}`,
}[signe];
s.add(null, { d, stroke: c, width: w });
if (signe === 'excl') s.add(null, { d: circle(cx, cy + r * 0.4, r * 0.15), fill: c });
}
// Cadenas simple, fermé : anse navy, corps cyan, serrure navy. Pour les scènes sans le glyphe.
function cadenas(s, x, y, w, ouvert = false) {
const t = s.t, r = w * 0.27, e = w * 0.15, cx = x + w / 2, haut = y + w * 0.62;
const dx = ouvert ? w * 0.2 : 0;
const anse = `M${f(cx - r + dx)} ${f(haut)}V${f(y + r + e / 2)}A${r} ${r} 0 0 1 ${f(cx + r + dx)} ${f(y + r + e / 2)}V${f(ouvert ? y + r + e : haut)}`;
s.add(null, { g: 'translate(0 2.5)', items: [{ d: anse, stroke: t.navyFlanc, width: e }] });
s.add(null, { d: anse, stroke: s.grad(t.navy, x, y, x + w, haut), width: e });
const h = w * 0.72;
s.bloc(null, rr(x, haut, w, h, w * 0.16), rr(x, haut + 4, w, h, w * 0.16), s.grad([t.cyan, t.cyan2], x, haut, x + w, haut + h), t.cyan2Flanc);
const kx = cx, ky = haut + h * 0.44;
s.add(null, { d: circle(kx, ky, w * 0.09), fill: t.encre });
s.add(null, { d: rr(kx - w * 0.04, ky, w * 0.08, h * 0.28, w * 0.04), fill: t.encre });
}
// Coffre-fort : caisse navy, porte porcelaine à molette cyan.
function coffreFort(s, x, y, w, h) {
const t = s.t;
navy(s, null, x, y, w, h, w * 0.14, 6);
const cx = x + w / 2, cy = y + h / 2, r = Math.min(w, h) * 0.26;
s.bloc(null, circle(cx, cy, r), circle(cx, cy + 3, r), s.grad(t.porc, cx - r, cy - r, cx + r, cy + r), t.porcFlanc);
s.add(null, { d: circle(cx, cy, r * 0.46), fill: t.cyan2 });
for (const a of [0, 90, 180, 270]) {
const u = Math.cos(a * Math.PI / 180), v = Math.sin(a * Math.PI / 180);
s.add(null, { d: `M${f(cx + u * r * 0.62)} ${f(cy + v * r * 0.62)}L${f(cx + u * r * 0.82)} ${f(cy + v * r * 0.82)}`, stroke: t.porcTrait, width: 3 });
}
trait(s, null, x + w * 0.82, y + h * 0.36, 5, h * 0.28, t.navyReflet); s.items.at(-1).opacity = 0.5;
}
// Téléphone porcelaine, écran navy par défaut (clair si ecran = true). Rend le rectangle d'écran.
function telephone(s, x, y, w, h, clair = false) {
const t = s.t;
porcelaine(s, null, x, y, w, h, w * 0.2, 5);
const e = { x: x + w * 0.1, y: y + w * 0.2, w: w * 0.8, h: h - w * 0.36 };
s.add(null, { d: rr(e.x, e.y, e.w, e.h, w * 0.1), fill: clair ? s.grad(t.ecran, e.x, e.y, e.x + e.w, e.y + e.h) : s.grad(t.navy, e.x, e.y, e.x + e.w, e.y + e.h) });
trait(s, null, x + w / 2 - w * 0.14, y + w * 0.08, w * 0.28, w * 0.05, t.porcTrait);
return e;
}
// Enveloppe : dos navy, lettre porcelaine qui dépasse, poche porcelaine devant.
function enveloppe(s, x, y, w, h, lettre = true) {
const t = s.t;
navy(s, null, x, y, w, h, 12, 5);
if (lettre) porcelaine(s, null, x + w * 0.12, y - h * 0.34, w * 0.76, h * 0.9, 8, 3);
const poche = `M${f(x)} ${f(y + h * 0.3)}L${f(x + w / 2)} ${f(y + h * 0.64)}L${f(x + w)} ${f(y + h * 0.3)}V${f(y + h - 12)}A12 12 0 0 1 ${f(x + w - 12)} ${f(y + h)}H${f(x + 12)}A12 12 0 0 1 ${f(x)} ${f(y + h - 12)}Z`;
s.add(null, { g: 'translate(0 5)', items: [{ d: poche, fill: t.porcFlanc }] });
s.add(null, { d: poche, fill: s.grad(t.porc, x, y + h * 0.3, x + w * 0.6, y + h) });
return { lx: x + w * 0.12, ly: y - h * 0.34, lw: w * 0.76 };
}
// 1. Coffre : trois éléments distincts par la silhouette. Une note cyan et une carte navy derrière,
// l'identifiant porcelaine devant avec un cadenas simple et le mot de passe masqué.
// Deuxième version (29/09) : la première empilait trop de détails, illisible à 100 pt.
function coffre(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 168, 60);
const note = s.add(null, { g: 'rotate(-12 70 78)', items: [] });
s.bloc(note.items, rr(28, 46, 84, 64, 12), rr(28, 51, 84, 64, 12), s.grad([t.cyan, t.cyan2], 28, 46, 100, 110), t.cyan2Flanc);
trait(s, note.items, 40, 60, 40, 6, '#FFFFFF'); note.items.at(-1).opacity = 0.7;
trait(s, note.items, 40, 73, 28, 6, '#FFFFFF'); note.items.at(-1).opacity = 0.7;
const carte = s.add(null, { g: 'rotate(10 132 76)', items: [] });
navy(s, carte.items, 88, 44, 88, 60, 12, 5);
s.bloc(carte.items, rr(102, 58, 20, 15, 4), rr(102, 60, 20, 15, 4), t.cyan, t.cyanFlanc);
porcelaine(s, null, 30, 98, 140, 58, 14, 6);
s.bloc(null, rr(42, 110, 34, 34, 10), rr(42, 113, 34, 34, 10), s.grad(t.navy, 42, 110, 76, 144), t.navyFlanc);
s.add(null, { d: 'M52.5 124V121.5a6.5 6.5 0 0 1 13 0V124', stroke: s.grad(t.porc, 52, 115, 66, 124), width: 3.6 });
s.add(null, { d: rr(49, 124, 20, 13, 3.5), fill: t.cyan });
points(s, null, 92, 127, 6, 4.6, 12.5, t.encre);
return s.svg();
}
// 2. Générateur : l'icône Loksi en arrière-plan, le champ du mot de passe neuf par-dessus,
// et une jauge de robustesse pleine pour dire « fort ». Les deux flèches de rotation de la
// première planche sont retirées à la demande de Romain (29/09).
function generateur(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 170, 64);
tuile(s, null, 50, 18, 100);
porcelaine(s, null, 22, 104, 156, 54, 14, 6);
points(s, null, 42, 122, 7, 5, 15.5, t.encre);
s.bloc(null, rr(151, 111, 6, 22, 3), rr(151, 113, 6, 22, 3), t.cyan2, t.cyan2Flanc);
for (let i = 0; i < 4; i++) s.add(null, { d: rr(36 + i * 32.5, 140, 29, 6, 3), fill: i < 2 ? t.cyan : t.cyan2 });
return s.svg();
}
// 3. Appareils : le même glyphe sur l'ordinateur et sur le téléphone, c'est le message
// « vos données partout ». Deuxième version (29/09) : écran du téléphone réduit au glyphe.
function appareils(t) {
const s = new Scene(t); fond(s); ombreSol(s, 104, 168, 74);
porcelaine(s, null, 36, 40, 138, 92, 12, 5);
s.add(null, { d: rr(44, 48, 122, 76, 6), fill: s.grad(t.navy, 44, 48, 140, 124) });
glyphe(s, null, 89, 61, 50);
s.bloc(null, rr(92, 136, 26, 16, 2), rr(92, 138, 26, 16, 2), s.grad(t.porc, 92, 136, 118, 152), t.porcFlanc);
porcelaine(s, null, 72, 150, 66, 10, 5, 4);
// Téléphone au premier plan, même écran navy et même glyphe.
porcelaine(s, null, 16, 84, 54, 88, 12, 5);
s.add(null, { d: rr(22, 94, 42, 70, 7), fill: s.grad(t.navy, 22, 94, 64, 164) });
trait(s, null, 36, 88.5, 14, 3, t.porcTrait);
glyphe(s, null, 29.7, 113, 32);
return s.svg();
}
// 4. Biométrie : téléphone, empreinte cyan sur l'écran navy, pastille validée.
// Remplace biometrics-phone, ill_welcome_2, ill_account_setup.
function biometrie(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 170, 46);
const e = telephone(s, 60, 24, 80, 142);
const cx = e.x + e.w / 2, cy = e.y + e.h / 2 - 2;
s.add(null, { d: arc(cx, cy, 24, 200, 340), stroke: t.cyan, width: 4.5 });
s.add(null, { d: arc(cx, cy + 2, 16, 180, 360) + `V${f(cy + 14)}`, stroke: t.cyan, width: 4.5 });
s.add(null, { d: `M${f(cx - 16)} ${f(cy + 2)}V${f(cy + 22)}`, stroke: t.cyan, width: 4.5 });
s.add(null, { d: arc(cx, cy + 4, 8, 180, 360) + `V${f(cy + 26)}`, stroke: t.cyan2, width: 4.5 });
s.add(null, { d: `M${f(cx - 8)} ${f(cy + 4)}V${f(cy + 16)}`, stroke: t.cyan2, width: 4.5 });
s.add(null, { d: `M${f(cx)} ${f(cy + 2)}V${f(cy + 28)}`, stroke: t.cyan, width: 4.5 });
pastille(s, 138, 138, 17, 'check');
return s.svg();
}
// 5. Dossier vide : un dossier ouvert sans rien dedans. Remplace no-items, ill_folder_question,
// ill_pin (contenu vide), NoFolders et SearchFolder.
function dossierVide(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 166, 64);
const dos = `M36 58a10 10 0 0 1 10-10H80l12 12H154a10 10 0 0 1 10 10V144a10 10 0 0 1-10 10H46a10 10 0 0 1-10-10Z`;
s.add(null, { g: 'translate(0 5)', items: [{ d: dos, fill: t.navyFlanc }] });
s.add(null, { d: dos, fill: s.grad(t.navy, 36, 48, 150, 154) });
const devant = `M30 88a8 8 0 0 1 8-8H162a8 8 0 0 1 8 8L164 146a10 10 0 0 1-10 9H46a10 10 0 0 1-10-9Z`;
s.add(null, { g: 'translate(0 5)', items: [{ d: devant, fill: t.porcFlanc }] });
s.add(null, { d: devant, fill: s.grad(t.porc, 30, 80, 120, 155) });
trait(s, null, 78, 112, 44, 6, t.porcTrait);
return s.svg();
}
// 6. Recherche vide : loupe cyan sur une liste porcelaine sans résultat. Remplace NoResults.
function rechercheVide(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 168, 60);
porcelaine(s, null, 34, 40, 104, 118, 14, 5);
for (let i = 0; i < 3; i++) { trait(s, null, 50, 62 + i * 26, 16, 16, t.porcTrait); trait(s, null, 74, 66 + i * 26, 44, 7, t.porcTrait); }
s.add(null, { d: `M146 136L164 154`, stroke: t.navyFlanc, width: 16 });
s.add(null, { d: `M146 133L164 151`, stroke: s.grad(t.navy, 140, 128, 170, 156), width: 16 });
s.add(null, { g: 'translate(0 4)', items: [{ d: circle(126, 110, 30), stroke: t.cyanFlanc, width: 11 }] });
s.add(null, { d: circle(126, 110, 24), fill: t.ecran[0], opacity: 0.55 });
s.add(null, { d: circle(126, 110, 30), stroke: t.cyan, width: 11 });
return s.svg();
}
// 7. Verrou : un cadenas fermé en héros sur un champ de mot de passe. Remplace lock, ill_lock,
// LockIcon (écran « Votre coffre est verrouillé ») et UserLockIcon.
function verrou(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 170, 56);
cadenas(s, 60, 16, 80);
porcelaine(s, null, 30, 128, 140, 32, 12, 5);
points(s, null, 50, 144, 6, 4.4, 13, t.encre);
s.bloc(null, rr(134, 134, 5, 20, 2.5), rr(134, 136, 5, 20, 2.5), t.cyan2, t.cyan2Flanc);
return s.svg();
}
// 8. Succès : l'icône Loksi et une pastille validée. Fin d'inscription et de configuration.
// Remplace ill_setup_complete et la fin de l'inscription iOS.
function succes(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 164, 50);
tuile(s, null, 46, 40, 108);
pastille(s, 148, 136, 22, 'check');
return s.svg();
}
// 9. Synchro navigateur : une fenêtre de navigateur et le cadenas de la serrure. Remplace keyhole
// et ill_sso_cookie_sync.
function synchroNavigateur(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 168, 70);
porcelaine(s, null, 22, 42, 156, 116, 14, 5);
s.add(null, { d: rr(22, 42, 156, 24, [14, 14, 0, 0]), fill: s.grad(t.navy, 22, 42, 178, 66) });
points(s, null, 36, 54, 3, 3.4, 11, t.porcTrait);
trait(s, null, 76, 50, 88, 8, t.navyReflet); s.items.at(-1).opacity = 0.35;
s.bloc(null, circle(100, 102, 18), circle(100, 105, 18), s.grad([t.cyan, t.cyan2], 82, 84, 118, 120), t.cyan2Flanc);
s.bloc(null, `M92 110L100 96L108 110L112 140H88Z`, `M92 113L100 99L108 113L112 143H88Z`, s.grad([t.cyan, t.cyan2], 88, 96, 112, 140), t.cyan2Flanc);
s.add(null, { d: circle(100, 100, 6), fill: t.encre });
s.add(null, { d: rr(97, 100, 6, 20, 3), fill: t.encre });
return s.svg();
}
// 10. Import : des feuilles d'identifiants qui descendent dans le coffre-fort. Remplace import,
// ill_import_logins.
function importer(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 170, 60);
coffreFort(s, 48, 90, 104, 76);
const feuille = s.add(null, { g: 'rotate(-8 80 50)', items: [] });
porcelaine(s, feuille.items, 50, 22, 56, 64, 8, 3);
trait(s, feuille.items, 60, 36, 32, 5, t.porcTrait); trait(s, feuille.items, 60, 48, 24, 5, t.porcTrait);
points(s, feuille.items, 63, 64, 4, 3, 8, t.encre);
s.add(null, { d: 'M134 26V66M122 56L134 70L146 56', stroke: t.cyanFlanc, width: 9 });
s.add(null, { d: 'M134 23V63M122 53L134 67L146 53', stroke: t.cyan, width: 9 });
return s.svg();
}
// 11. Send : un avion de papier porcelaine et sa traîne cyan. Remplace send, ill_send,
// NoSendsIcon et ActiveSendIcon.
function send(t) {
const s = new Scene(t); fond(s); ombreSol(s, 104, 166, 52);
const aile = 'M34 102L164 44L118 150L96 118Z';
const pli = 'M96 118L164 44L86 132Z';
s.add(null, { g: 'translate(0 5)', items: [{ d: aile, fill: t.porcFlanc }] });
s.add(null, { d: aile, fill: s.grad(t.porc, 40, 50, 150, 150) });
s.add(null, { d: pli, fill: s.grad(t.navy, 90, 60, 150, 130) });
s.add(null, { d: 'M96 118L164 44', stroke: t.porcTrait, width: 2 });
s.add(null, { d: 'M40 148Q58 136 74 142', stroke: t.cyan, width: 6 });
s.add(null, { d: 'M24 128Q34 122 44 124', stroke: t.cyan2, width: 6 });
return s.svg();
}
// 12. E-mail : enveloppe ouverte, lettre avec la pastille validée. Remplace email, ill_open_email,
// RegistrationCheckEmailIcon.
function email(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 168, 64);
const { lx, ly, lw } = enveloppe(s, 36, 82, 128, 80);
trait(s, null, lx + 14, ly + 16, lw - 44, 6, t.porcTrait);
trait(s, null, lx + 14, ly + 30, lw - 60, 6, t.porcTrait);
pastille(s, 148, 84, 18, 'check');
return s.svg();
}
// 13. Code par e-mail : même enveloppe, la lettre porte un code masqué. Remplace email-otp,
// ill_new_device_verification, TwoFactorAuthEmailIcon.
function emailCode(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 168, 64);
const { lx, ly, lw } = enveloppe(s, 36, 82, 128, 80);
s.add(null, { d: rr(lx + 10, ly + 12, lw - 20, 22, 7), fill: t.ecran[1], opacity: 0.6 });
points(s, null, lx + 22, ly + 23, 6, 3.6, (lw - 44) / 5, t.encre);
return s.svg();
}
// 14. Application d'authentification : téléphone, minuteur cyan et code. Remplace
// authenticator-app, ill_authenticator.
function authentificateur(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 170, 46);
const e = telephone(s, 60, 24, 80, 142);
const cx = e.x + e.w / 2;
s.add(null, { d: circle(cx, 72, 20), stroke: t.navyReflet, width: 6 }); s.items.at(-1).stroke = t.navyFlanc;
s.add(null, { d: arc(cx, 72, 20, -90, 160), stroke: t.cyan, width: 6 });
porcelaine(s, null, e.x + 4, 106, e.w - 8, 22, 7, 3);
points(s, null, e.x + 13, 117, 6, 3, (e.w - 26) / 5, t.encre);
return s.svg();
}
// 15. Clé de sécurité : une clé USB navy à bouton cyan. Remplace yubikey, ill_yubi_key.
function cleSecurite(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 168, 44);
const g = s.add(null, { g: 'rotate(-30 100 100)', items: [] });
s.bloc(g.items, rr(86, 20, 28, 30, 4), rr(86, 23, 28, 30, 4), s.grad(t.porc, 86, 20, 114, 50), t.porcFlanc);
trait(s, g.items, 92, 28, 6, 8, t.porcTrait); trait(s, g.items, 102, 28, 6, 8, t.porcTrait);
navy(s, g.items, 72, 46, 56, 118, 16, 6);
s.bloc(g.items, circle(100, 104, 15), circle(100, 107, 15), s.grad([t.cyan, t.cyan2], 85, 89, 115, 119), t.cyan2Flanc);
s.add(g.items, { d: circle(100, 146, 6), fill: t.fond });
return s.svg();
}
// 16. Remplissage automatique : un formulaire porcelaine rempli, pastille validée.
// Remplace autofill, ill_autofill.
function autofill(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 170, 64);
porcelaine(s, null, 36, 30, 128, 134, 16, 5);
trait(s, null, 52, 46, 40, 6, t.porcTrait);
s.add(null, { d: rr(52, 60, 96, 24, 7), fill: t.ecran[1], opacity: 0.6 });
trait(s, null, 62, 69, 52, 6, t.encre);
s.add(null, { d: rr(52, 94, 96, 24, 7), fill: t.ecran[1], opacity: 0.6 });
points(s, null, 64, 106, 6, 3.6, 10, t.encre);
s.bloc(null, rr(52, 130, 96, 20, 10), rr(52, 133, 96, 20, 10), s.grad([t.cyan, t.cyan2], 52, 130, 148, 150), t.cyan2Flanc);
pastille(s, 152, 58, 18, 'check');
return s.svg();
}
// 17. Adresse bloquée : un globe navy et une pastille d'interdiction. Remplace ill_blocked_uri
// et DomainIcon.
function uriBloquee(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 166, 54);
s.bloc(null, circle(96, 96, 56), circle(96, 102, 56), s.grad(t.navy, 40, 40, 150, 152), t.navyFlanc);
const l = t.navyReflet;
s.add(null, { d: ellipse(96, 96, 24, 56), stroke: l, width: 4 }); s.items.at(-1).opacity = 0.7;
s.add(null, { d: 'M40 96H152M48 68H144M48 124H144', stroke: l, width: 4 });
s.add(null, { d: 'M96 40V152', stroke: l, width: 4 });
pastille(s, 146, 138, 24, 'moins', true);
return s.svg();
}
// 18. Corbeille vide. Remplace EmptyTrash.
function corbeille(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 168, 50);
const cuve = 'M52 64H148L138 156A10 10 0 0 1 128 165H72A10 10 0 0 1 62 156Z';
s.add(null, { g: 'translate(0 5)', items: [{ d: cuve, fill: t.porcFlanc }] });
s.add(null, { d: cuve, fill: s.grad(t.porc, 52, 64, 130, 165) });
for (const x of [80, 100, 120]) s.add(null, { d: `M${x} 84V${x === 100 ? 146 : 144}`, stroke: t.porcTrait, width: 6 });
s.bloc(null, rr(84, 32, 32, 16, 6), rr(84, 34, 32, 16, 6), s.grad(t.navy, 84, 32, 116, 48), t.navyFlanc);
navy(s, null, 42, 42, 116, 18, 9, 4);
return s.svg();
}
// 19. Fichier en erreur : un document porcelaine et une pastille d'alerte. Remplace
// ill_file_error, ill_file_not_found.
function fichierErreur(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 168, 50);
const doc = 'M56 38A10 10 0 0 1 66 28H116L146 58V154A10 10 0 0 1 136 164H66A10 10 0 0 1 56 154Z';
s.add(null, { g: 'translate(0 5)', items: [{ d: doc, fill: t.porcFlanc }] });
s.add(null, { d: doc, fill: s.grad(t.porc, 56, 28, 130, 164) });
s.add(null, { d: 'M116 28V50A8 8 0 0 0 124 58H146Z', fill: s.grad([t.cyan, t.cyan2], 116, 28, 146, 58) });
for (let i = 0; i < 3; i++) trait(s, null, 72, 78 + i * 16, i === 2 ? 36 : 56, 6, t.porcTrait);
pastille(s, 140, 140, 22, 'excl', true);
return s.svg();
}
// 20. Organisation : un immeuble navy aux fenêtres porcelaine, pastille de sortie. Remplace
// item-transfer, ill_leave_organization, ill_migrate_to_my_items, DeactivatedOrg.
function organisation(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 168, 60);
navy(s, null, 56, 36, 88, 126, 12, 6);
for (let r = 0; r < 4; r++) for (let c = 0; c < 3; c++) s.add(null, { d: rr(68 + c * 24, 50 + r * 22, 16, 13, 3), fill: t.porc[r === 1 && c === 1 ? 2 : 0], opacity: 0.9 });
s.add(null, { d: rr(88, 138, 24, 24, [6, 6, 0, 0]), fill: t.cyan2 });
pastille(s, 146, 138, 22, 'sortie');
return s.svg();
}
// 21. Délai expiré : un réveil porcelaine, aiguilles navy, arc cyan du temps écoulé. Remplace
// TwoFactorTimeoutIcon (lien expiré, délai d'authentification).
function delaiExpire(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 168, 52);
s.bloc(null, circle(100, 100, 58), circle(100, 106, 58), s.grad(t.porc, 50, 44, 150, 158), t.porcFlanc);
s.add(null, { d: arc(100, 100, 46, -90, 200), stroke: t.cyan, width: 8 });
s.add(null, { d: 'M100 100V70M100 100L120 112', stroke: t.encre, width: 7 });
s.add(null, { d: circle(100, 100, 6), fill: t.cyan2 });
pastille(s, 148, 146, 20, 'excl', true);
return s.svg();
}
// 22. Sécurité : un bouclier navy et une coche cyan. Remplace Security (ressaisie du mot de
// passe, sécurité du compte).
function securite(t) {
const s = new Scene(t); fond(s); ombreSol(s, 100, 170, 48);
const b = 'M100 24L154 44V92C154 126 130 150 100 162C70 150 46 126 46 92V44Z';
s.add(null, { g: 'translate(0 6)', items: [{ d: b, fill: t.navyFlanc }] });
s.add(null, { d: b, fill: s.grad(t.navy, 46, 24, 150, 160) });
const b2 = 'M100 38L142 54V92C142 118 124 138 100 148Z';
s.add(null, { d: b2, fill: t.navyReflet, opacity: 0.18 });
s.add(null, { d: 'M78 94L94 110L124 78', stroke: t.cyanFlanc, width: 12 });
s.add(null, { d: 'M78 90L94 106L124 74', stroke: t.cyan, width: 12 });
return s.svg();
}
export const ILLUSTRATIONS = {
coffre, biometrie, generateur, appareils, 'dossier-vide': dossierVide, 'recherche-vide': rechercheVide,
verrou, succes, 'synchro-navigateur': synchroNavigateur, import: importer, send, email,
'email-code': emailCode, authentificateur, 'cle-securite': cleSecurite, autofill,
'uri-bloquee': uriBloquee, corbeille, 'fichier-erreur': fichierErreur, organisation,
'delai-expire': delaiExpire, securite,
};
if (process.argv[1] === fileURLToPath(import.meta.url)) {
const dir = join(HERE, 'sources');
mkdirSync(dir, { recursive: true });
for (const [nom, scene] of Object.entries(ILLUSTRATIONS)) {
for (const [theme, t] of Object.entries(THEMES)) {
writeFileSync(join(dir, `${nom}-${theme}.svg`), scene(t));
}
}
console.log(`${Object.keys(ILLUSTRATIONS).length * 2} maîtres SVG écrits dans ${dir}`);
}