fix(sema,soma): el textarea afina donde estampa, y el arbol suena desde el teclado

S-12: las dos reglas del pack seleccionaban provider mientras el morfo
declara ambos eventos en input y el runtime estampa alli — ningun nodo
cumplia las dos condiciones del selector compuesto, y el componente
llevaba desde su nacimiento sonando con las bases de familia crudas.
Medido tras apuntar al input: commit-submit 0.30 -> 0.05 y el aviso de
desbordamiento 0.40+risk -> 0.03. Los 6x y 13x que estimo la auditoria
eran exactos.

S-13: select(value, fromEl?) solo emitia si recibia elemento, y el
manejador de teclado llamaba this.select(value) teniendo activeEl en la
mano. Enter/Espacio sobre un item no producia NADA — ni sonido, ni
haptico, ni data-event-*, luego tampoco reaccionaba el CSS de eidos.
El elemento ahora viaja: teclado y puntero dicen lo mismo (0.03 + tap).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
alpha-0.1-dir-prefs
dev 2 months ago
parent f7a7564b39
commit 0c1d945bae

@ -9,21 +9,28 @@ import type { Sema } from '../sema-map';
* Typing is silent (every keystroke would be unbearable). Submission and
* overflow are discrete events worth a soft cue: submit gets the standard
* commit chime; overflow gets the threat-tinted variant.
*
* ⚠️ Both rules used to select `provider` (`[data-textarea]`) while the morfo
* declares both events on `input` and the provider stamps there — no node ever
* carried both conditions, so neither rule matched and the component ran on the
* raw family bases: `commit-submit` ~6× louder than the 0.05 written here, and
* the overflow warning ~13× louder. Selecting the part the morfo declares is
* what keeps the written firma and the audible one the same thing.
*/
const onProvider = (matchers?: Parameters<typeof semaSelector<typeof textareaMorfo>>[2]) =>
semaSelector(textareaMorfo, 'provider', matchers);
const onInput = (matchers?: Parameters<typeof semaSelector<typeof textareaMorfo>>[2]) =>
semaSelector(textareaMorfo, 'input', matchers);
export const textareaSema: Sema = {
name: 'textarea',
cascade: [
{
selector: onProvider({ eventName: 'commit-submit' }),
selector: onInput({ eventName: 'commit-submit' }),
sound: soundTuning('commit.soft'),
haptic: { kind: 'tap' }
},
{
selector: onProvider({ eventName: 'signal-warn-count-overflow' }),
selector: onInput({ eventName: 'signal-warn-count-overflow' }),
sound: soundTuning('commit.subtle'),
haptic: { kind: 'tap' }
}

@ -288,7 +288,12 @@ export class TreeViewProvider {
e.preventDefault();
if (!activeEl) break;
const value = activeEl.getAttribute('data-value');
if (value) this.select(value);
// `activeEl` travels: `select` only emits when it receives the
// element, and omitting it here made keyboard selection
// perceptually mute — no sound, no haptic, no `data-event-*`, so
// eidos never reacted either. Pointer and keyboard now say the
// same thing.
if (value) this.select(value, activeEl);
break;
}
default: {

Loading…
Cancel
Save

Powered by TurnKey Linux.