Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

780 B
Raw Blame
import {
  triggerEdgeBump,
  triggerError,
  triggerMediumImpact,
  triggerSelection,
  triggerSuccess
} from '../platform/haptics'
import type { BridgeHapticsKind } from './bridge/bridge-haptics-notify'

// Reuse native functions so platform styles stay identical. The typed table covers every bridge kind; the platform-seams haptics census checks new native functions also get a kind.
const HAPTIC_BY_KIND: Readonly<Record<BridgeHapticsKind, () => void>> = {
  mediumImpact: triggerMediumImpact,
  selection: triggerSelection,
  success: triggerSuccess,
  error: triggerError,
  edgeBump: triggerEdgeBump
}

// No acknowledgement needed: native functions already catch device refusals.
export function playPageHaptic(kind: BridgeHapticsKind): void {
  HAPTIC_BY_KIND[kind]()
}