ploxion-ui/app.blade.php

158 lines
10 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{-- PL0XI0N ui — LA CARTE DES NOMBRES, l'ontologie arithmétique des types
XERB0XI0N (vision RS-7, raffinée 2026-06-20): chaque entier EST un type
selon sa NATURE GÉNÉRATIVE — la suite qui le produit.
1 -> BION (l'unité)
premier -> PLOXION (brique autonome, indivisible : 2,3,5,7,11…)
carré n² -> CUBION (carrés dans des carrés / portion : 4,9,16,25…)
n ≈ k^π -> WORMION (ronds dans des ronds : 32,78,278…)
dans π -> SPHERION (le cercle/sphère — sa suite apparaît dans π)
le reste -> KION (l'entre-deux brut)
Priorité bion>ploxion>cubion>wormion>spherion>kion. RS-7 2026-06-20 : cubion=n²,
wormion=n^π (les ronds imbriqués), spherion/cercle=dans π. ⚠ Manquent encore au
map : koin, kion-haut, boxion, xerboxion, tsoin (l'algèbre de doublement
ploxion+ploxion=cubion → koin → kion) — en attente de la loi entière (RS-7).
Base de la « formule de la certitude ». 100% client-side. window.jOSApps['ui']. --}}
<style>
.uin { display:flex; flex-direction:column; height:100%; background:#06090d;
color:rgba(220,232,240,.92); font-family:ui-sans-serif,system-ui,sans-serif; font-size:.82rem; }
.uin__bar { flex:0 0 auto; display:flex; align-items:center; gap:9px; flex-wrap:wrap; padding:8px 11px;
border-bottom:1px solid rgba(120,160,230,.18); }
.uin__t { font-weight:700; letter-spacing:.04em; color:rgba(160,195,255,.95); }
.uin__leg { display:flex; gap:8px; flex-wrap:wrap; }
.uin__lg { display:flex; align-items:center; gap:5px; cursor:pointer; font-size:.7rem; padding:2px 7px; border-radius:20px;
border:1px solid transparent; }
.uin__lg.off { opacity:.4; }
.uin__sw { width:11px; height:11px; border-radius:3px; }
.uin__sp { flex:1; }
.uin__rng { display:flex; align-items:center; gap:6px; font-size:.7rem; color:rgba(150,180,220,.7); }
.uin__grid { flex:1; min-height:0; overflow-y:auto; padding:10px; display:grid;
grid-template-columns:repeat(auto-fill,minmax(40px,1fr)); gap:5px; align-content:start; }
.uin__cell { aspect-ratio:1; border-radius:7px; display:flex; align-items:center; justify-content:center;
font-family:'Share Tech Mono',ui-monospace,monospace; font-size:.78rem; cursor:pointer; position:relative;
border:1px solid rgba(255,255,255,.06); transition:transform .08s; }
.uin__cell:hover { transform:scale(1.12); z-index:2; outline:1px solid rgba(255,255,255,.5); }
.uin__cell.seed::after { content:'✦'; position:absolute; top:1px; right:3px; font-size:.5rem; opacity:.8; }
.uin__det { flex:0 0 auto; border-top:1px solid rgba(120,160,230,.18); padding:9px 12px; min-height:54px;
display:flex; flex-direction:column; gap:3px; }
.uin__dn { font-weight:700; color:#fff; font-size:1rem; }
.uin__dn b { font-family:'Share Tech Mono',monospace; }
.uin__dty { font-size:.72rem; }
.uin__dwhy { font-size:.74rem; color:rgba(190,212,228,.82); line-height:1.4; }
.uin__hint { color:rgba(190,212,228,.5); font-size:.74rem; }
</style>
<script>
(function () {
// π — décimales (test « dans π » du cercle/spherion ; RS-7 : « les cercles c'est dans π »).
var PI = '14159265358979323846264338327950288419716939937510'
+ '58209749445923078164062862089986280348253421170679'
+ '82148086513282306647093844609550582231725359408128'
+ '48111745028410270193852110555964462294895493038196'
+ '44288109756659334461284756482337867831652712019091';
// L'unité de TAILLE (RS-7, via coord #126) : la taille détermine le type.
// 1 bion = 16 mm ; un entier n = une taille de n bions = n×16 mm. « Des axes
// géométriques pour calculer la taille d'un bion » = l'adressage par nombres.
var BION_MM = 16;
function sizeLabel(n) {
var mm = n * BION_MM;
if (mm < 1000) return mm + ' mm';
if (mm < 1e6) return (mm / 1000).toFixed(mm % 1000 ? 2 : 0) + ' m';
return (mm / 1e6).toFixed(2) + ' km';
}
var TYPES = {
ploxion: { label:'ploxion', color:'rgba(90,220,140,.85)', desc:'brique autonome, indivisible — un nombre premier.' },
cubion: { label:'cubion', color:'rgba(90,170,255,.85)', desc:'un carré parfait n² — des carrés dans des carrés (portion).' },
wormion: { label:'wormion', color:'rgba(120,90,235,.9)', desc:'une puissance n^π — des ronds dans des ronds (l’imbrication des cercles).' },
spherion: { label:'spherion', color:'rgba(200,130,255,.85)', desc:'le cercle/la sphère — sa suite résonne dans les décimales de π.' },
kion: { label:'kion', color:'rgba(150,165,185,.55)', desc:'le cube quelconque, l’entre-deux brut (le reste).' },
bion: { label:'bion', color:'rgba(255,210,120,.9)', desc:'l’unité élémentaire — 1.' }
};
function sievePrimes(n) {
var s = new Uint8Array(n + 1); s[0] = s[1] = 1;
for (var i = 2; i * i <= n; i++) if (!s[i]) for (var j = i * i; j <= n; j += i) s[j] = 1;
return s; // s[k]===0 => premier
}
function isSquare(n) { var r = Math.round(Math.sqrt(n)); return r >= 2 && r * r === n; } // 4,9,16,25…
// wormion = la suite des puissances de π : n ≈ k^π (RS-7 : « le wormion est dans n^π »).
// ronds-dans-ronds → l'exposant π, parallèle des carrés-dans-carrés → n² (cubion).
function piPowers(max) {
var s = {};
for (var k = 2; ; k++) { var v = Math.round(Math.pow(k, Math.PI)); if (v > max) break; s[v] = k; }
return s;
}
function classify(n, sieve, worm) {
if (n === 1) return 'bion';
if (sieve[n] === 0) return 'ploxion'; // premier (2 inclus = la graine)
if (isSquare(n)) return 'cubion'; // carré parfait n²
if (worm[n]) return 'wormion'; // n ≈ k^π (rare → avant spherion)
if (PI.indexOf('' + n) !== -1) return 'spherion'; // sa suite apparaît dans π (le cercle)
return 'kion';
}
function why(n, t, worm) {
if (t === 'bion') return 'L’unité. Le point de départ de tout.';
if (t === 'ploxion') return n === 2 ? '2 — le premier nombre premier, la graine de tout.' : n + ' est premier → indivisible, autonome.';
if (t === 'cubion') { var r = Math.round(Math.sqrt(n)); return n + ' = ' + r + '² → un carré parfait (des carrés dans des carrés).'; }
if (t === 'wormion') return n + ' ≈ ' + worm[n] + '^π (' + Math.pow(worm[n], Math.PI).toFixed(2) + ') → une puissance de π (des ronds dans des ronds).';
if (t === 'spherion') return n + ' n’est ni premier, ni carré, ni n^π — mais sa suite apparaît dans π (pos ' + (PI.indexOf('' + n) + 1) + ') → le cercle.';
return n + ' n’est ni premier (ploxion), ni carré (cubion), ni n^π (wormion), ni dans π (spherion) → un kion brut.';
}
function mount(container, ctx) {
var N = 240, sieve = sievePrimes(4096), worm = piPowers(4096), off = {};
container.innerHTML =
'<div class="uin">'
+ ' <div class="uin__bar"><span class="uin__t">🔢 Carte des nombres</span>'
+ ' <div class="uin__leg"></div><span class="uin__sp"></span>'
+ ' <label class="uin__rng">N <input type="range" min="60" max="960" step="60" value="' + N + '"><b data-n>' + N + '</b></label></div>'
+ ' <div class="uin__grid"></div>'
+ ' <div class="uin__det"><span class="uin__hint">La TAILLE détermine le type · 1 bion = 16 mm · chaque entier n = n bions. Survole, clique pour le sens. ✦ = la graine (2).</span></div>'
+ '</div>';
var elLeg = container.querySelector('.uin__leg'), elGrid = container.querySelector('.uin__grid');
var elDet = container.querySelector('.uin__det'), elN = container.querySelector('[data-n]');
var rng = container.querySelector('input[type=range]');
function renderLeg() {
elLeg.innerHTML = Object.keys(TYPES).map(function (k) {
return '<span class="uin__lg' + (off[k] ? ' off' : '') + '" data-ty="' + k + '">'
+ '<span class="uin__sw" style="background:' + TYPES[k].color + '"></span>' + TYPES[k].label + '</span>';
}).join('');
}
function render() {
var html = '';
for (var n = 1; n <= N; n++) {
var t = classify(n, sieve, worm);
var hidden = off[t] ? 'opacity:.08;' : '';
html += '<div class="uin__cell' + (n === 2 ? ' seed' : '') + '" data-n="' + n + '" title="' + n + ' · ' + t + '"'
+ ' style="background:' + TYPES[t].color + ';' + hidden + 'color:' + (t === 'kion' ? 'rgba(255,255,255,.7)' : '#05080c') + '">' + n + '</div>';
}
elGrid.innerHTML = html;
}
function showDetail(n) {
var t = classify(n, sieve, worm);
elDet.innerHTML = '<div class="uin__dn"><b>' + n + '</b> — <span style="color:' + TYPES[t].color + '">' + TYPES[t].label + '</span>'
+ ' <span style="font-size:.72rem;color:rgba(150,180,220,.6);font-weight:400">· ' + n + ' bion' + (n > 1 ? 's' : '') + ' = ' + sizeLabel(n) + '</span></div>'
+ '<div class="uin__dwhy">' + why(n, t, worm) + '</div>'
+ '<div class="uin__dty" style="color:rgba(160,190,225,.7)">' + TYPES[t].desc + '</div>';
// OUT type : le type/glyphe déduit pour n part sur le bus (→ dictionnaire.query : le lexique ionique affiche sa définition).
try {
if (window.jOSPorts && window.jOSPorts.emit)
window.jOSPorts.emit('ui', 'type', { n: n, type: t, label: TYPES[t].label, size: sizeLabel(n) });
} catch (e) {}
}
elGrid.addEventListener('click', function (e) { var c = e.target.closest('[data-n]'); if (c) showDetail(+c.getAttribute('data-n')); });
elLeg.addEventListener('click', function (e) { var l = e.target.closest('[data-ty]'); if (!l) return; var k = l.getAttribute('data-ty'); off[k] = !off[k]; renderLeg(); render(); });
rng.addEventListener('input', function () { N = +rng.value; elN.textContent = N; render(); });
renderLeg(); render();
return { unmount: function () { container.innerHTML = ''; } };
}
window.jOSApps = window.jOSApps || {};
window.jOSApps['ui'] = { manifest: { id: 'ui', name: 'UI · Nombres', icon: '🔢' }, mount: mount };
})();
</script>