/** @jsxImportSource nativewind */ /** * Source code copied and adapted from: * https://github.com/roninoss/rn-primitives * License: MIT (c) 2024 RoninOSS */ import * as React from "react"; import { type LayoutRectangle, Text, View } from "react-native"; import { type LayoutPosition } from "@/native/hooks"; import type { PortalProps, RootProps, TriggerRef } from "./types"; interface IRootContext extends RootProps { open: boolean; onOpenChange: (open: boolean) => void; pressPosition: LayoutPosition | null; setPressPosition: (pressPosition: LayoutPosition | null) => void; contentLayout: LayoutRectangle | null; setContentLayout: (contentLayout: LayoutRectangle | null) => void; nativeID: string; } declare const Root: React.ForwardRefExoticComponent void; relativeTo?: "longPress" | "trigger"; } & React.RefAttributes>; declare function useRootContext(): IRootContext; declare const Trigger: React.ForwardRefExoticComponent, "ref"> & { asChild?: boolean; } & { onKeyDown?: (ev: React.KeyboardEvent) => void; onKeyUp?: (ev: React.KeyboardEvent) => void; } & React.RefAttributes>; /** * @warning when using a custom ``, you will have to adjust the Content's sideOffset to account for nav elements like headers. */ declare function Portal({ forceMount, hostName, children }: PortalProps): import("react/jsx-runtime").JSX.Element | null; declare const Overlay: React.ForwardRefExoticComponent, "ref"> & { asChild?: boolean; } & { onKeyDown?: (ev: React.KeyboardEvent) => void; onKeyUp?: (ev: React.KeyboardEvent) => void; } & { closeOnPress?: boolean; } & React.RefAttributes>; declare const Content: React.ForwardRefExoticComponent>; declare const Item: React.ForwardRefExoticComponent, "ref"> & { asChild?: boolean; } & { onKeyDown?: (ev: React.KeyboardEvent) => void; onKeyUp?: (ev: React.KeyboardEvent) => void; } & { textValue?: string; closeOnPress?: boolean; } & React.RefAttributes>; declare const Group: React.ForwardRefExoticComponent>; declare const Label: React.ForwardRefExoticComponent>; declare const CheckboxItem: React.ForwardRefExoticComponent, "ref"> & { asChild?: boolean; } & { onKeyDown?: (ev: React.KeyboardEvent) => void; onKeyUp?: (ev: React.KeyboardEvent) => void; } & { checked: boolean; onCheckedChange: (checked: boolean) => void; closeOnPress?: boolean; textValue?: string; } & React.RefAttributes>; declare const RadioGroup: React.ForwardRefExoticComponent void; } & React.RefAttributes>; declare const RadioItem: React.ForwardRefExoticComponent, "ref"> & { asChild?: boolean; } & { onKeyDown?: (ev: React.KeyboardEvent) => void; onKeyUp?: (ev: React.KeyboardEvent) => void; } & { value: string; textValue?: string; closeOnPress?: boolean; } & React.RefAttributes>; declare const ItemIndicator: React.ForwardRefExoticComponent>; declare const Separator: React.ForwardRefExoticComponent>; declare const Sub: React.ForwardRefExoticComponent void; } & React.RefAttributes>; declare function useSubContext(): { nativeID: string; open: boolean; onOpenChange: (value: boolean) => void; }; declare const SubTrigger: React.ForwardRefExoticComponent, "ref"> & { asChild?: boolean; } & { onKeyDown?: (ev: React.KeyboardEvent) => void; onKeyUp?: (ev: React.KeyboardEvent) => void; } & { textValue?: string; } & React.RefAttributes>; declare const SubContent: React.ForwardRefExoticComponent, "ref"> & { asChild?: boolean; } & { onKeyDown?: (ev: React.KeyboardEvent) => void; onKeyUp?: (ev: React.KeyboardEvent) => void; } & import("..").ForceMountable & React.RefAttributes>; export { CheckboxItem, Content, Group, Item, ItemIndicator, Label, Overlay, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, Trigger, useRootContext, useSubContext, }; //# sourceMappingURL=context-menu.d.ts.map