import * as React from 'react'; declare function composeEventHandlers(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: { checkForDefaultPrevented?: boolean | undefined; }): (event: E) => void; declare const NODES: readonly ["a", "button", "div", "h2", "h3", "img", "label", "li", "nav", "ol", "p", "span", "svg", "ul"]; type PropsWithoutRef

= P extends any ? ('ref' extends keyof P ? Pick> : P) : P; type ComponentPropsWithoutRef = PropsWithoutRef>; type Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent; }; type PrimitivePropsWithRef = React.ComponentPropsWithRef & { asChild?: boolean; }; type PrimitiveForwardRefComponent = React.ForwardRefExoticComponent>; type Overwrite = Omit & U; type PropsWithHTMLElement = Overwrite, OmitAdditionalProps>, P>; declare const Primitive: Primitives; /** * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch. * This utility should be used when dispatching a custom event from within another `discrete` event, this utility * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event. * For example: * * dispatching a known click 👎 * target.dispatchEvent(new Event(‘click’)) * * dispatching a custom type within a non-discrete event 👎 * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))} * * dispatching a custom type within a `discrete` event 👍 * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))} * * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use * this utility with them. This is because it's possible for those handlers to be called implicitly during render * e.g. when focus is within a component as it is unmounted, or when managing focus on mount. */ declare function dispatchDiscreteCustomEvent(target: E['target'], event: E): void; declare const Root: Primitives; export { dispatchDiscreteCustomEvent, Primitive, Root, }; export { composeEventHandlers }; export type { ComponentPropsWithoutRef, PrimitivePropsWithRef, PropsWithHTMLElement }; //# sourceMappingURL=primitive.d.ts.map