/** * Merge multiple props objects — like Solid's `merge`, but with Base UI's * special cases: `class`, `style` and `on*` handlers are composed rather * than overwritten, and `undefined` values are **skipped** (so default props * from earlier sources win when a later override is absent, matching Base * UI React's `mergeProps` semantics, not Solid's `merge` which treats * `undefined` as a real value). * * The merge is lazy and reactive: every property access re-reads the source * array, and the returned object's own-keys set re-collects on each * enumeration. That means state-attr projections that introduce new `data-*` * keys over time are seen by consumers as those keys appear. * * Behaviour: * - `class`: concatenated string ("a b c"). Objects/arrays (clsx-style) are * flattened into a single string. * - `style`: merged shallowly, right-most wins per property. * - `on*`: chained. Each handler runs right-to-left; the right-most handler * can call `preventBaseUIHandler()` on the event to stop earlier handlers. * - everything else: right-most non-`undefined` wins. * * **Strict-read note:** The proxy's `ownKeys` and `getOwnPropertyDescriptor` * traps fire during body-time enumeration (Solid's `mergeProps` runs * `Object.getOwnPropertyNames` synchronously in the consumer component's * body, which is an intentionally-untracked scope). The reads inside those * traps are intentional snapshots — Solid stores the resulting descriptors * (which point back at our reactive getter via `getOwnPropertyDescriptor`) * so reactivity flows through later, when consumers read individual keys * inside their own tracked scopes. We wrap the enumeration-trap bodies in * `untrack` to silence the false-positive `[STRICT_READ_UNTRACKED]` warning * that the component-body label scope would otherwise raise on every * source-key probe. */ export type PropsLike = Record; export type PropsSource = PropsLike | undefined; /** * Merge an array of props sources into a reactive proxy. Every lookup re-reads * the sources, so getters (including state-projection getters added by * `renderElement`) stay live. * * **Solid 2 quirk**: attributes whose initial getter value is `undefined` are * absent from `ownKeys` at first spread and will NOT become reactive later — * the DOM binding never subscribes. Consumers that need a late-binding * attribute (e.g. `aria-labelledby`) must seed the key (`""`) so it stays * in `ownKeys`, or project it imperatively via `setAttribute` (see * ``'s `aria-invalid` handling). See * `test/internals/merge-props-undefined-attr.test.tsx` for the pinned * verdict. */ export declare function mergePropsN(sources: readonly PropsSource[]): PropsLike; //# sourceMappingURL=merge-props-n.d.ts.map