Aplicar pendientes tras la integración

- render.js: botones y cards con urlBloqueada se pintan inertes.
- interactivity.js: sinFormato con la misma regla de marcadores que render.js; cita de documento con icono y nombre.
- Zoom manual (Ajustar / 100 % / 125 %) en #barra-movil, persistido en localStorage.
- Contador «Paso N/M» con estilo en iphone.css en lugar de estilos en línea.
- store/editor: campos opcionales tamano y headerTamano; editar la URL retira urlBloqueada;
  urlValida acepta URLs con forma de dominio; importar avisa de lo recortado.
- README y SPEC actualizados.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
urieljareth
2026-09-27 21:39:09 -06:00
co-authored by Claude Opus 5.5
parent a645056c00
commit 4fe8f73959
11 changed files with 136 additions and 28 deletions
+26 -4
View File
@@ -292,12 +292,23 @@ window.WAM = window.WAM || {};
return String(s == null ? "" : s)
.replace(/```([\s\S]*?)```/g, "$1")
.replace(/`([^`\n]+)`/g, "$1")
.replace(/\*([^*\n]+)\*/g, "$1")
.replace(/(^|[^\w])_([^_\n]+)_(?=[^\w]|$)/g, "$1$2")
.replace(/(^|[^\w])~([^~\n]+)~(?=[^\w]|$)/g, "$1$2")
.replace(reMarca("\*"), "$1$2")
.replace(reMarca("_"), "$1$2")
.replace(reMarca("~"), "$1$2")
.trim();
}
/* Misma regla que render.js: marca pegada a un carácter no blanco por dentro
y sin letra, número ni _ por fuera («2 * 3 * 4» queda literal). */
function reMarca(e) {
try {
return new RegExp("(^|[^\p{L}\p{N}_" + e + "])" + e + "(?=\S)([^" + e + "\n]*?\S)" + e +
"(?=[^\p{L}\p{N}_" + e + "]|$)", "gu");
} catch (err) {
return new RegExp("(^|[^\w" + e + "])" + e + "(?=\S)([^" + e + "\n]*?\S)" + e + "(?=[^\w" + e + "]|$)", "g");
}
}
function miniaturaSegura(u) {
if (vacio(u)) return "";
var s = String(u);
@@ -340,6 +351,9 @@ window.WAM = window.WAM || {};
cita.foto = true;
} else if (msg.headerTipo === "video") {
cita.foto = true;
} else if (msg.headerTipo === "documento") {
cita.titulo = vacio(msg.headerTexto) ? "documento.pdf" : String(msg.headerTexto);
cita.doc = true;
}
}
cita.extracto = partes.filter(function (p) { return !vacio(p); }).map(sinFormato).join("\n");
@@ -350,6 +364,9 @@ window.WAM = window.WAM || {};
var SVG_CAMARA = '<svg class="wa-cita-cam" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true">' +
'<path fill="currentColor" d="M5.6 2.5h4.8l1 1.5H13a1.5 1.5 0 0 1 1.5 1.5v6A1.5 1.5 0 0 1 13 12.5H3A1.5 1.5 0 0 1 1.5 11V5.5A1.5 1.5 0 0 1 3 4h1.6l1-1.5Zm2.4 3a2.75 2.75 0 1 0 0 5.5 2.75 2.75 0 0 0 0-5.5Z"/></svg>';
var SVG_DOC = '<svg class="wa-cita-doc" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true">' +
'<path fill="currentColor" d="M4 1.5h5.3L13 5.2V13a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 3 13V3a1.5 1.5 0 0 1 1-1.5Zm5 .9V5.5h3.1L9 2.4ZM5 8h6v1H5V8Zm0 2.2h6v1H5v-1Z"/></svg>';
/* Bloque de cita dentro de la burbuja OUT; todo por textContent (sin XSS). */
function pintarCita(fila, cita) {
var burbuja = fila.querySelector(".bubble");
@@ -365,7 +382,12 @@ window.WAM = window.WAM || {};
if (cita.titulo) {
var tit = document.createElement("div");
tit.className = "wa-cita-titulo";
tit.textContent = cita.titulo;
if (cita.doc) {
var doc = document.createElement("span");
doc.innerHTML = SVG_DOC; /* constante propia, sin datos del usuario */
if (doc.firstChild) tit.appendChild(doc.firstChild);
}
tit.appendChild(document.createTextNode(cita.titulo));
txt.appendChild(tit);
}
if (cita.extracto) {