@keel-ai/constants
v0.1.0
Published
Runtime constants (status bar height, platform, isDevice) for Keel.
Maintainers
Readme
@keel-ai/constants
Runtime constants — status bar height, platform identity, simulator detection. Counterpart of
expo-constants.
Install
keel install @keel-ai/constantsUsage
import { getConstants } from '@keel-ai/constants';
const c = await getConstants();
console.log(c.statusBarHeight); // 47 (pixel-density-aware DP)
console.log(c.platform); // "ios" | "android"
console.log(c.isDevice); // true on physical device, false in simulatorPlatform mapping
| Field | iOS | Android |
|---|---|---|
| statusBarHeight | top safe-area inset of the key window | R.dimen.status_bar_height from system resources |
| platform | "ios" (or "ipados") | "android" |
| isDevice | TARGET_OS_SIMULATOR != 1 | Build.PRODUCT not in the emulator-fingerprint list |
