Radical
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

ExportContract
detectRuntime()Synchronous "browser", "android", or "ios". Server rendering reports browser.
RuntimeSchema, RuntimeRuntime validation and type.
BridgeEffect service with runtime, call, observe, and optional listen.
BridgeLiveLazy 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.
InjectedBridgeCapacitor bridge subset accepted by bridgeLayer.

BridgeError is BridgeUnavailable | BridgeCallFailed | BridgeDecodeError.

ErrorFieldsMeaning
BridgeUnavailableplugin, methodBridge or native listener support unavailable.
BridgeCallFailedplugin, method, causeNative call rejects or throws.
BridgeDecodeErrorplugin, method, causeArguments or returned values fail schema validation.

Common capability errors are PermissionDenied, Cancelled, and Unavailable. Unavailable carries reason.

Offline exports

Registration APIContract
registerOfflineEffect({ production, mode?, base? })Effect registering ${base}radical-sw.js at scope base; base defaults to /
Required conditionsBrowser, production, service-worker support, and mode other than "bundled"
registerOffline(options)Promise facade
ServiceWorkerRegistrationErrorCarries cause
shouldRegister({ production, browser })Conjunction of the two flags

Bundled request exports

ExportContract
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.
RequestFailedTyped 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:

Source: client exports.

On this page