You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte-kit-vice/src/uix/sema/components/time-field.ts

22 lines
768 B

import { semaSelector } from '$uix/morfo'
import { timeFieldMorfo } from '$uix/morfo/components/time-field'
import { soundTuning } from '../sounds'
import type { Sema } from '../sema-map'
// Mirror of date-field's pack (checkpoint S3b, 2026-07-07 — closes the field
// trio asymmetry: date ✓ / time ✗ / color ✗). `commit-set` targets the `input`
// part (the field box), matching where the engine stamps `data-event-*`.
const onInput = (matchers?: Parameters<typeof semaSelector<typeof timeFieldMorfo>>[2]) =>
semaSelector(timeFieldMorfo, 'input', matchers)
export const timeFieldSema: Sema = {
name: 'time-field',
cascade: [
{
selector: onInput({ eventName: 'commit-set' }),
sound: soundTuning('commit.soft'),
haptic: { kind: 'tap' }
}
]
}

Powered by TurnKey Linux.