import type { JSX, ValidComponent } from "@solidjs/web"; import { dynamic, isServer } from "@solidjs/web"; import { omit, onCleanup, untrack } from "solid-js"; import { useCspDisableStyleElements, useCspNonce, } from "../../csp-provider/csp-context.ts"; import { composeRefs, userRef } from "../../internals/compose-refs"; import { mergeRootProps } from "../../internals/merge-root-props"; import { resolveClassStyle } from "../../internals/resolve-class-style"; import { registerDisableScrollbarStyle } from "../../internals/scroll-area-utils/register-disable-scrollbar-style.ts"; import type { BaseUIComponentProps } from "../../internals/types"; import { createScrollArea, type OverflowEdgeThresholdInput, } from "./create-scroll-area.tsx"; import type { Coords, HiddenState, OverflowEdges, OverflowEdgeThreshold, ScrollAreaRootState, Size, } from "./scroll-area-root-context.ts"; import { ScrollAreaRootContext } from "./scroll-area-root-context.ts"; export type { Coords, HiddenState, OverflowEdges, OverflowEdgeThreshold, ScrollAreaRootState, Size, }; export interface ScrollAreaRootProps extends BaseUIComponentProps<"div", ScrollAreaRootState> { /** Tag/component to render. Defaults to `"div"`. */ as?: ValidComponent; /** * Threshold in pixels that must be exceeded before the overflow-edge * attributes are applied. Accepts a number (applied to all four edges) * or a partial per-edge object. * @default 0 */ overflowEdgeThreshold?: OverflowEdgeThresholdInput; } /** * Groups all parts of the scroll area. Renders a `