fix(splitter): register sema scope + cascade so handle-pick/drag actually sound

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) <noreply@anthropic.com>
active-uix
dev 5 months ago
parent 59505e6da2
commit 4324cb489d

@ -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'

@ -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,

Loading…
Cancel
Save

Powered by TurnKey Linux.