/** * Hybrid worklet — combines a user worklet handler and a BG-side handler * into a single registration that fits Lynx's one-handler-per-slot rule. * * Registered ONCE at MT init under the stable id `__sigx_hybrid_dispatch__` * in upstream's `lynxWorkletImpl._workletMap`. When the slot machine sees a * slot with both a worklet and a BG sign, it asks `hybridCtx(worklet, sign)` * for the ctx to hand to `__AddEvent({ type: 'worklet', value })`. * * Lynx native dispatches via `runWorklet` → upstream's `transformWorklet` * walks the ctx and `_c`. It detects nested `_wkltId` (our `realCtx`) and * replaces it with the bound user-worklet callable. Our hybrid body then * just invokes it, then bridges to BG via the `Lynx.Sigx.PublishEvent` * channel that `bg-bridge.ts` listens on. */ import type { WorkletPlaceholder } from './worklet-events.js'; export declare const HYBRID_WORKLET_ID = "__sigx_hybrid_dispatch__"; /** * Install the hybrid worklet into upstream's worklet map. Must be called * AFTER the @lynx-js/react/worklet-runtime IIFE has populated * globalThis.lynxWorkletImpl. Idempotent — safe to call across hot reloads. */ export declare function installHybridWorklet(): void; /** Build the ctx for a hybrid registration. */ export declare function hybridCtx(realCtx: WorkletPlaceholder, bgSign: string): { _wkltId: string; _workletType: 'main-thread'; _c: { realCtx: WorkletPlaceholder; bgSign: string; }; };