Reference
Client entry point
Exports from @akshatowo/radical/client and the shared Effect service contract.
@akshatowo/radical/client contains browser-safe runtime APIs. Capability Effects require Bridge; capability-specific browser services remain dependencies even when a call runs natively. The *Live(effect) helpers supply the default browser service. BridgeLive supplies the actual bridge.
Bridge exports
| Export | Contract |
|---|---|
detectRuntime() | Synchronous "browser", "android", or "ios". Server rendering reports browser. |
RuntimeSchema, Runtime | Runtime validation and type. |
Bridge | Effect service with runtime, call, observe, and optional listen. |
BridgeLive | Lazy service that reads Capacitor and shell events. |
bridgeLayer(read, readEvents?) | Layer from injected bridge and event readers. |
bridgeTestLayer(runtime, call, observe?) | In-memory layer for a selected runtime. |
callBridge(plugin, method, schema, options?) | Validates a native result with the supplied schema. Requires Bridge. |
InjectedBridge | Capacitor bridge subset accepted by bridgeLayer. |
BridgeError is BridgeUnavailable | BridgeCallFailed | BridgeDecodeError.
| Error | Fields | Meaning |
|---|---|---|
BridgeUnavailable | plugin, method | Bridge or native listener support unavailable. |
BridgeCallFailed | plugin, method, cause | Native call rejects or throws. |
BridgeDecodeError | plugin, method, cause | Arguments or returned values fail schema validation. |
Common capability errors are PermissionDenied, Cancelled, and Unavailable. Unavailable carries reason.
Offline exports
| Registration API | Contract |
|---|---|
registerOfflineEffect({ production, mode?, base? }) | Effect registering ${base}radical-sw.js at scope base; base defaults to / |
| Required conditions | Browser, production, service-worker support, and mode other than "bundled" |
registerOffline(options) | Promise facade |
ServiceWorkerRegistrationError | Carries cause |
shouldRegister({ production, browser }) | Conjunction of the two flags |
Bundled request exports
| Export | Contract |
|---|---|
createRadicalFetch(config) | Returns a fetch-compatible function. Rewrites eligible bundled-shell requests to config.origin, includes credentials, and attaches validated native context. Other runtimes retain fetch semantics. |
localNativeContext(read?) | Effect returning browser context until the mount handoff, then validated injected context. |
mountNativeContext(read?) | Effect marking the mount handoff and applying native safe-area CSS variables. |
browserContext() | Browser platform, zero insets, and null shell version. |
RequestFailed | Typed fetch or Request-construction failure with cause. |
Capability exports
The following reference pages list operations, schemas, types, errors, injectable services, and live helpers exported through this entry:
- Camera
- Data protection
- Device info
- Files and intents
- Google sign-in
- Haptics
- Network
- Notifications
- Safe area
- Transitions
- Video stream
Source: client exports.