import React from 'react'; import type { ViewProps } from 'react-native'; import type { ThorBackend, ThorViewMethods, ThorViewProps } from './specs/ThorView.nitro'; /** * The raw native host component. It takes a `shapes` array prop directly (no * children), so most apps should just use `` instead. * * For the off-JS-thread fast path (high-frequency updates from a worklet — e.g. * a reanimated `useFrameCallback` or a camera frame processor), do NOT animate * the `shapes` prop with reanimated `useAnimatedProps`: Nitro views require * JSI-backed props and reanimated commits `folly::dynamic`, which aborts * natively in `RawValue::castValue`. Instead grab the view's HybridObject via * `hybridRef` and call its imperative {@link ThorViewMethods.drawShapes} method * from the worklet — it rasterizes on the calling thread, never touching JS. * See `apps/example/src/WorkletDemo.tsx`. */ export declare const ThorCanvasNative: import("react-native-nitro-modules").ReactNativeView; export interface CanvasProps extends ViewProps { children?: React.ReactNode; /** Rendering backend; defaults to 'cpu'. 'gpu' uses ThorVG's GL engine (Android). */ backend?: ThorBackend; } /** * The ThorVG-backed drawing surface. Render shape components as children: * ```tsx * * * * * ``` */ export declare function Canvas({ children, backend, ...viewProps }: CanvasProps): React.JSX.Element;