From 4324cb489dc4a9920171337b89305d31ec307c48 Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 22 May 2026 22:40:34 +0200 Subject: [PATCH] fix(splitter): register sema scope + cascade so handle-pick/drag actually sound MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two missing registrations meant the splitter sema cascade from the previous commit never reached the engine — handle-pick and handle-drag were silent, only commit-set sounded (because the `commit` family has a sound payload baked into its SEMA_MAP base, while `handle` only has haptic and depends on the cascade for sound). Fixes: 1. morfo scope: ['soma'] → ['soma', 'sema', 'eidos']. Without 'sema' the per-component cascade rules in src/uix/sema/components/splitter.ts are never honored. 2. web/routes/uix/+layout@.svelte: add splitterSema to the `components: [...]` array passed to defineEngineSemantic. The sema engine only loads cascade packs it's explicitly given, so forgetting this line silently drops all splitter cascade rules. Verified in browser at /uix/components/splitter via Live tab (real pointer interaction, AudioContext.createOscillator counter): handle-pick → 2 oscillators (handle.pickup.air, gain 0.10) handle-drag → 16 oscillators across 8 throttled emits — the dynamic resolveSplitterDragSound curve is playing per-frame as expected commit-set → 2 oscillators (handle.snap.chime, gain 0.14) Note: the Sema tab's static "▶ play" button still shows 0 oscillators for handle-drag — same as Slider's demo. By design: that button calls engine.emit() directly without the per-emit `signal.overrides` that soma injects during real drag. The dynamic curve IS the payload. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/uix/morfo/components/splitter.ts | 11 ++++++++++- web/routes/uix/+layout@.svelte | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/uix/morfo/components/splitter.ts b/src/uix/morfo/components/splitter.ts index edbf3f0eb..b35634b78 100644 --- a/src/uix/morfo/components/splitter.ts +++ b/src/uix/morfo/components/splitter.ts @@ -4,7 +4,16 @@ import { v } from '../types'; export const splitterMorfo = { name: 'Splitter', kebab: 'splitter', - scope: ['soma'], + // Sema is in scope: the splitter's three-event drag shape ships a + // per-component cascade in `src/uix/sema/components/splitter.ts` + // (pickup sound on `handle-pick`, dynamic per-emit overrides on + // `handle-drag`, snap chime on `commit-set`). Without `'sema'` + // here the cascade rules would never load and `handle-*` events + // would fall through to the family base — which for `handle` has + // no `sound` slice, so drag would be silent. Eidos is in scope too + // since the components/splitter eidos wrappers reference the morfo + // in their CSS recipe (`data-event='commit-set'` pulse). + scope: ['soma', 'sema', 'eidos'], texts: { label: '#?components.splitter.label|Splitter', resize: '#?components.splitter.resize|Resize panels' diff --git a/web/routes/uix/+layout@.svelte b/web/routes/uix/+layout@.svelte index 3722a50aa..eb1e4416f 100644 --- a/web/routes/uix/+layout@.svelte +++ b/web/routes/uix/+layout@.svelte @@ -18,6 +18,7 @@ import { searchFieldSema } from '$uix/sema/components/search-field'; import { selectSema } from '$uix/sema/components/select'; import { sliderSema } from '$uix/sema/components/slider'; + import { splitterSema } from '$uix/sema/components/splitter'; import { stepperSema } from '$uix/sema/components/stepper'; import { tabsSema } from '$uix/sema/components/tabs'; import { tagGroupSema } from '$uix/sema/components/tag-group'; @@ -78,6 +79,7 @@ searchFieldSema, selectSema, sliderSema, + splitterSema, stepperSema, tabsSema, tagGroupSema,