boosterarena-mcp 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nucleo.mjs +27 -3
- package/package.json +1 -1
package/dist/nucleo.mjs
CHANGED
|
@@ -1703,6 +1703,12 @@ function conLoDelMcp(lista2, fn) {
|
|
|
1703
1703
|
fondo.url = str("Una imagen ya SUBIDA (con `subir_imagen`), https://. Usa esto, `busca` o `color`: uno solo.");
|
|
1704
1704
|
fondo.capa = str("El `ref` o el nombre de una CAPA para ponerle el fondo a ella en vez de al slide. Cada capa puede llevar el suyo.");
|
|
1705
1705
|
props("nueva_capa").fondo = str("Fondo propio de la capa: la URL https:// de una imagen ya subida o un color en hex. Sin esto, la capa deja ver el slide de debajo.");
|
|
1706
|
+
for (const t of lista2) {
|
|
1707
|
+
const p = t.function.parameters.properties;
|
|
1708
|
+
if (!t.function.name.startsWith("poner_") || !p.x || t.function.name === "poner_texto_plantilla") continue;
|
|
1709
|
+
p.x = num("Borde IZQUIERDO, en % del ancho del slide. Puede ser NEGATIVO o pasar de 100 para que nazca FUERA del slide y entre con una trayectoria.");
|
|
1710
|
+
p.y = num("Borde SUPERIOR, en % del alto del slide. Tambi\xE9n puede quedar fuera, como `x`.");
|
|
1711
|
+
}
|
|
1706
1712
|
const recolocar = props("recolocar");
|
|
1707
1713
|
recolocar.x = num("Nuevo borde izquierdo en %. Puede ser NEGATIVO o pasar de 100 para dejar el objeto FUERA del slide y que entre con una trayectoria (el monstruo que entra solo: x = -50).");
|
|
1708
1714
|
recolocar.y = num("Nuevo borde superior en %. Tambi\xE9n puede quedar fuera del slide, como `x`.");
|
|
@@ -3111,6 +3117,25 @@ function armarAccion(b, a, el) {
|
|
|
3111
3117
|
}
|
|
3112
3118
|
}
|
|
3113
3119
|
function ejecutar(b, nombre, args, fab) {
|
|
3120
|
+
const antes = b.creados.length;
|
|
3121
|
+
const dijo = ejecutarUna(b, nombre, args, fab);
|
|
3122
|
+
return b.estricto && !b.fallo ? dijo + dejarFuera(b, nombre, args, antes) : dijo;
|
|
3123
|
+
}
|
|
3124
|
+
var enElAreaDeTrabajo = (v, lado) => Math.max(-lado - 30, Math.min(130, v));
|
|
3125
|
+
function dejarFuera(b, nombre, args, antes) {
|
|
3126
|
+
if (!nombre.startsWith("poner_") || ["poner_fondo", "poner_arena", "poner_audio", "poner_texto_plantilla"].includes(nombre)) return "";
|
|
3127
|
+
if (b.creados.length !== antes + 1) return "";
|
|
3128
|
+
const el = buscarEl(b, b.creados[antes]);
|
|
3129
|
+
if (!el) return "";
|
|
3130
|
+
const x = typeof args.x === "number" && Number.isFinite(args.x) ? args.x : null;
|
|
3131
|
+
const y = typeof args.y === "number" && Number.isFinite(args.y) ? args.y : null;
|
|
3132
|
+
const sale = (v, lado) => v !== null && (v < 0 || v + lado > 100);
|
|
3133
|
+
if (!sale(x, el.w) && !sale(y, el.h)) return "";
|
|
3134
|
+
if (sale(x, el.w)) el.x = +enElAreaDeTrabajo(x, el.w).toFixed(2);
|
|
3135
|
+
if (sale(y, el.h)) el.y = +enElAreaDeTrabajo(y, el.h).toFixed(2);
|
|
3136
|
+
return " Qued\xF3 FUERA del slide (o asomando): no se ve entero hasta que una trayectoria lo meta.";
|
|
3137
|
+
}
|
|
3138
|
+
function ejecutarUna(b, nombre, args, fab) {
|
|
3114
3139
|
switch (nombre) {
|
|
3115
3140
|
// ── Poner cosas ──────────────────────────────────────────────────────────
|
|
3116
3141
|
case "poner_texto": {
|
|
@@ -3640,9 +3665,8 @@ Pide \`describir("${el.widget}")\` para ver la forma exacta y vuelve a intentarl
|
|
|
3640
3665
|
el.w = w;
|
|
3641
3666
|
}
|
|
3642
3667
|
if (num3(args.alto, 0) > 0) el.h = pct(args.alto, el.h);
|
|
3643
|
-
|
|
3644
|
-
if (typeof args.
|
|
3645
|
-
if (typeof args.y === "number") el.y = b.estricto ? +fuera(args.y, el.h).toFixed(2) : pct(args.y, el.y);
|
|
3668
|
+
if (typeof args.x === "number") el.x = b.estricto ? +enElAreaDeTrabajo(args.x, el.w).toFixed(2) : pct(args.x, el.x);
|
|
3669
|
+
if (typeof args.y === "number") el.y = b.estricto ? +enElAreaDeTrabajo(args.y, el.h).toFixed(2) : pct(args.y, el.y);
|
|
3646
3670
|
const afuera = b.estricto && (el.x < 0 || el.y < 0 || el.x + el.w > 100 || el.y + el.h > 100);
|
|
3647
3671
|
if (!afuera) encajar(el);
|
|
3648
3672
|
b.tocados.push(el.id);
|