ploxion-xerploxions/app.blade.php

123 lines
10 KiB
PHP
Raw Permalink 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.

{{-- PL0XION xerploxions 📟 — LA GALERIE ET L'HÔTE DES CONSOLES (RS-7 16.08.2026 : « il faut faire
un XERPLOXION : genre des xerkions mais on peut voir le PREVIEW des ploxions … comme si
c'étaient les éléments du TABLEAU DE BORD D'UN VAISSEAU SPATIAL »).
Un xerkion pose des KOINS (des liens). Un XERPLOXION pose des PANNEAUX VIVANTS : chaque
emplacement rend le ploxion LUI-MÊME, à 3 niveaux (glyphe / cadran / vitre — chevron ‹ ›).
Le moteur est le bion window.jOSXerploxion (partials/_xerploxion_bion) ; la data est
injectée entre les marqueurs XP-DATA par bin/xerploxion-vonneumann.mjs (déterministe).
Même discipline que l'hôte xerkions : UN renderer + de la DATA, jamais N quasi-copies.
Deep-link : ctx.scope / ctx.xerploxion / ?xerploxion=<id> / sessionStorage
('xerploxions:deeplink', posé par les stubs xerploxion-*). ⭐ = les consoles perso. --}}
<style>
.xpg2{display:flex;flex-direction:column;height:100%;background:#04070d;color:#dfe;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.xpg2 *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
.xpg2__h{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid #16233c;font-weight:800;color:#3fe0d0;font-size:.86rem}
.xpg2__h small{margin-left:auto;color:#6a86ad;font-weight:400;font-size:.7rem}
.xpg2__tabs{flex:0 0 auto;display:flex;gap:5px;flex-wrap:wrap;padding:7px 12px;border-bottom:1px solid #101b30;max-height:104px;overflow:auto}
.xpg2__tab{cursor:pointer;font:inherit;font-size:.72rem;padding:5px 10px;border-radius:7px;border:1px solid #22344f;background:#0a1424;color:#bcd;min-height:28px}
.xpg2__tab.on{border-color:#3fe0d0;color:#04121a;background:#3fe0d0;font-weight:800}
.xpg2__tab:hover{border-color:#3fe0d0}
.xpg2__live{flex:1;min-height:0;position:relative}
.xpg2__none{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#5f7699;font-size:.8rem;text-align:center;padding:18px}
@media(pointer:coarse){.xpg2__tab{min-height:48px;font-size:.8rem;padding:6px 13px}.xpg2__tabs{flex-wrap:nowrap;overflow-x:auto;padding:8px 10px}}
</style>
<script>
(function () {
'use strict';
// LA DATA — injectée par bin/xerploxion-vonneumann.mjs (ne pas éditer entre les marqueurs)
var XPDATA = /*XP-DATA*/{"count":5,"items":[{"id":"xerploxion-pont","nom":"Le Pont","icone":"🛸","essence":"pont","pal":0,"xerkion":"xerkion-xerboxion","note":"Le vaisseau xerboxion vu du poste de pilotage : la machine a tsoins au centre, le cerveau (xerax), les quetes, le bus et le boxion en cadrans de bord.","panneaux":[{"ploxion":"tsoinmachine","label":"machine à tsoins","icon":"⧗","niveau":"cadran","focal":true},{"ploxion":"xerax","label":"xerax","icon":"🧠","niveau":"cadran"},{"ploxion":"quetes","label":"quêtes","icon":"🎯","niveau":"cadran"},{"ploxion":"blocs","label":"les blocs","icon":"🧱","niveau":"cadran"},{"ploxion":"xion","label":"le bus","icon":"🛸","niveau":"glyphe"},{"ploxion":"boxion","label":"le boxion","icon":"📦","niveau":"glyphe"}],"liens":["xerploxion-atelier","xerploxion-veille"]},{"id":"xerploxion-bouffe","nom":"Cambuse","icone":"🍽","essence":"bouffe","pal":2,"xerkion":"xerkion-bouffe","note":"La pipeline bouffe en tableau de bord : ce qu'on peut cuisiner MAINTENANT au centre, le stock/frigo/courses en cadrans satellites.","panneaux":[{"ploxion":"bouffe","label":"bouffe","icon":"🍽","niveau":"cadran","focal":true},{"ploxion":"cuisine","label":"cuisine","icon":"🍳","niveau":"cadran"},{"ploxion":"frigo","label":"frigo","icon":"❄️","niveau":"glyphe"},{"ploxion":"courses","label":"courses","icon":"🛒","niveau":"glyphe"},{"ploxion":"inventaire","label":"inventaire","icon":"🗄️","niveau":"glyphe"}],"liens":["xerploxion-ferme"]},{"id":"xerploxion-ferme","nom":"Serre","icone":"🚜","essence":"ferme","pal":3,"xerkion":"xerkion-ferme","note":"La ferme : xerfarm EN VITRE (le ploxion reellement monte en miniature — le cas lourd qui prouve le montage/demontage), meteo et carte en cadrans.","panneaux":[{"ploxion":"xerfarm","label":"xerfarm","icon":"🚜","niveau":"vitre","focal":true},{"ploxion":"meteo","label":"météo","icon":"🌤","niveau":"cadran"},{"ploxion":"carte","label":"la carte","icon":"🗺","niveau":"cadran"},{"ploxion":"makelab","label":"makelab","icon":"🔧","niveau":"glyphe"},{"ploxion":"calendar","label":"calendrier","icon":"📅","niveau":"glyphe"}],"liens":["xerploxion-bouffe","xerploxion-atelier"]},{"id":"xerploxion-atelier","nom":"Atelier dev","icone":"🛠","essence":"atelier","pal":1,"xerkion":"xerkion-dev","note":"Forger : l'atelier au centre, le terminal EN VITRE pilotable (verrou:false), les ploxions/APIs en cadrans.","panneaux":[{"ploxion":"atelier","label":"l'atelier","icon":"🛠","niveau":"cadran","focal":true},{"ploxion":"dev-ploxions","label":"ploxions","icon":"🔧","niveau":"cadran"},{"ploxion":"apis","label":"apis","icon":"🔌","niveau":"cadran"},{"ploxion":"xerminal","label":"terminal","icon":"⌨️","niveau":"vitre","verrou":false},{"ploxion":"forge","label":"la forge","icon":"⚒","niveau":"glyphe"},{"ploxion":"digestion","label":"digestion","icon":"🍽","niveau":"glyphe"}],"liens":["xerploxion-pont","xerploxion-veille"]},{"id":"xerploxion-veille","nom":"Veille / Nexus","icone":"🛰","essence":"veille","pal":4,"xerkion":"xerkion-repoverse","note":"La vigie : le nexus au centre, la recherche/les papiers/le chaoxion/la station Pourriture-4 (transmissions, habitat courant, dernier log) en cadrans, le repoverse et les issues en glyphes.","panneaux":[{"ploxion":"nexus","label":"nexus","icon":"🛰","niveau":"cadran","focal":true},{"ploxion":"recherches","label":"recherches","icon":"🔎","niveau":"cadran"},{"ploxion":"mdpi","label":"papiers","icon":"📚","niveau":"cadran"},{"ploxion":"chaoxion","label":"chaoxion","icon":"🌀","niveau":"cadran"},{"ploxion":"pourriture-4","label":"pourriture-4","icon":"🧟","niveau":"cadran"},{"ploxion":"repoverse","label":"repoverse","icon":"🪐","niveau":"glyphe"},{"ploxion":"rv-issues","label":"issues","icon":"🐛","niveau":"glyphe"}],"liens":["xerploxion-atelier","xerploxion-pont"]}]}/*/XP-DATA*/;
// le bion tire /px/xerploxions.json ; sur CETTE page la data est déjà là → on la lui donne
// (même contrat que jOSXerkionsForge pour l'hôte xerkions : zéro requête inutile).
window.jOSXerploxionsForge = { data: function () { return XPDATA; } };
function esc(s) { return window.jOSb.esc(s); }
function mount(container, ctx) {
ctx = ctx || {};
var inst = null;
container.innerHTML = '<div class="xpg2">'
+ '<div class="xpg2__h">📟 Xerploxions — les consoles<small></small></div>'
+ '<div class="xpg2__tabs"></div>'
+ '<div class="xpg2__live"></div></div>';
var tabsEl = container.querySelector('.xpg2__tabs'),
liveEl = container.querySelector('.xpg2__live'),
cc = container.querySelector('.xpg2__h small');
function stop() { if (inst && inst.destroy) { try { inst.destroy(); } catch (e) {} } inst = null; }
function all() {
var l = (XPDATA.items || []).slice();
try { if (window.jOSXerploxion && window.jOSXerploxion.persos) l = l.concat(window.jOSXerploxion.persos()); } catch (e) {}
return l;
}
var cur = null;
function show(id) {
stop(); liveEl.innerHTML = '';
cur = id;
if (!(window.jOSXerploxion && window.jOSXerploxion.render)) {
liveEl.innerHTML = '<div class="xpg2__none">📟 le bion jOSXerploxion n\'est pas chargé sur cette page<br>'
+ '<small>(partials/_xerploxion_bion — inclus par le layout cyberpunk et /px)</small></div>';
return;
}
inst = window.jOSXerploxion.render(liveEl, id, { ctx: ctx, onNavigate: function (nid) { paint(nid); return true; } });
paintTabs();
}
function paintTabs() {
var l = all(), h = '';
l.forEach(function (x) {
h += '<button type="button" class="xpg2__tab' + (x.id === cur ? ' on' : '') + '" data-x="' + esc(x.id) + '">'
+ esc(x.icone || '📟') + ' ' + esc((x.perso ? '⭐ ' : '') + (x.nom || x.id)) + '</button>';
});
h += '<button type="button" class="xpg2__tab" data-new="1">➕ ma console</button>';
tabsEl.innerHTML = h;
cc.textContent = l.length + ' consoles · ' + l.reduce(function (a, x) { return a + (x.panneaux || []).length; }, 0) + ' panneaux';
}
function paint(id) { show(id); }
tabsEl.addEventListener('click', function (ev) {
var b = ev.target.closest ? ev.target.closest('button') : null; if (!b) return;
if (b.hasAttribute('data-new')) {
stop(); liveEl.innerHTML = '';
if (window.jOSXerploxion && window.jOSXerploxion.editor) {
window.jOSXerploxion.editor(liveEl, null, function (nid) { paint(nid || (all()[0] || {}).id); });
liveEl.style.position = 'relative';
}
return;
}
paint(b.getAttribute('data-x'));
});
// deep-link : ctx.scope / ctx.xerploxion / ?xerploxion= / sessionStorage (posé par les stubs)
var want = null;
try { want = (ctx && (ctx.scope || ctx.xerploxion)) || new URLSearchParams(location.search).get('xerploxion'); } catch (e) {}
if (!want) { try { want = sessionStorage.getItem('xerploxions:deeplink'); } catch (e) {} }
try { sessionStorage.removeItem('xerploxions:deeplink'); } catch (e) {}
var l0 = all(), start = null, i;
for (i = 0; i < l0.length; i++) if (l0[i].id === String(want)) { start = l0[i].id; break; }
if (!start) start = (l0[0] && l0[0].id) || null;
cur = start; paintTabs();
if (start) show(start); else liveEl.innerHTML = '<div class="xpg2__none">📟 aucune console — ➕ pour faire la tienne</div>';
return { unmount: function () { stop(); try { container.innerHTML = ''; } catch (e) {} } };
}
window.jOSApps = window.jOSApps || {};
window.jOSApps['xerploxions'] = {
manifest: { id: 'xerploxions', name: 'Xerploxions', icon: '📟' },
mount: mount,
// la galerie se décrit (contrat XUI v0) — describe() PUR
describe: function () {
var its = XPDATA.items || [], n = 0, i;
for (i = 0; i < its.length; i++) n += (its[i].panneaux || []).length;
return { v: 1, id: 'xerploxions', title: 'Xerploxions', icon: '📟', items: [
{ p: 1, kind: 'stat', label: 'consoles', value: its.length },
{ p: 1, kind: 'stat', label: 'panneaux vivants', value: n },
{ p: 3, kind: 'text', label: 'HUD', value: '3 niveaux : glyphe / cadran / vitre — le tableau de bord du vaisseau' },
{ p: 3, kind: 'list', label: 'consoles', items: its.slice(0, 5).map(function (x) { return { label: x.nom, value: (x.panneaux || []).length + ' pan.' }; }) }
] };
}
};
})();
</script>