Bloxwap / HIG0.1.1
GuidelinesFeedback

Semantic feedback

Issues #21, #25. Types in @bloxwap/hig/contracts/feedback and @bloxwap/hig/feedback import without DOM, RN, React, audio, Expo or hardware APIs. Base renderers accept an optional FeedbackSink; no provider or feedback backend is required to perform an action.

IntentTimingSoundHapticCooldown
press/releasegesture phases; visual responsesilentnonenone
canceldiscarded gesture/action; clears pending worksilentcancel where possiblenone
activateaccepted button click/keyboard/native press, after host handlertickselection80ms
selection/toggleaccepted state commit, never a render/repeated/rejected valuetick/toggleselection80ms
disclosureaccepted open/closesilentnone120ms
successhost operation completion with stable operation idsuccessnotification success400ms
warninghost outcomesilentnotification warning400ms
errorhost operation failure with visual recovery texterrornotification error400ms
notificationnonessential transient acknowledgementsilentnone800ms

The exported presets table is authoritative. Each event has id, source, intent and origin. An async outcome uses the host operation id, not the button's interaction id; an accepted click does not imply order success. Optional native impact overrides map light/medium/heavy; browser physical-tap intensity cannot be programmed. Live price ticks and general navigation are silent.

Do emit a success event after the host request resolves, alongside visible success text. Don't play a success sound on press-in, for a rejected controlled value, or on every market render. Busy/disabled/suppressed/cancelled events are rejected. Buttons compose the host handler before activation, honor default prevention, preserve refs and block nested activation propagation. Choice controls emit on committed changes only. Sliders use semantic steps and controller cooldown; no effect queue accumulates. A host cancellation before activation suppresses the request; a physical cue already delivered by the OS cannot be recalled.

Preference precedence: host policy may forbid a channel; persisted user choices enable sound/haptics independently; component suppression can disable its request; OS/browser/backend capability decides whether output is attempted. Volume is clamped 0–1. Motion is a separate setting and OS reduced motion remains respected. Defaults are both channels off. No-feedback, sound-only, haptics-only, both, and host-injected adapter configurations use the same actions. Root/local FeedbackProviders hold independent preference/controller state; a nested button emits one request.

Deduplication uses source/id/intent; host stable outcome ids suppress repeated notifications. Cooldowns drop excess requests, never delay primary actions or queue a backlog. Seen/cadence maps are bounded. Exceptions thrown/rejected by backends and storage are caught. Disposal is idempotent and late startup/preload completions cannot revive disposed players. Capability available is API routing, while observed records actual physical evidence and remains false in this candidate.