{"version":3,"names":["createContext","useContext","SelectPositionerContext","useSelectPositionerContext","v","Error"],"sources":["select-positioner-context.ts"],"sourcesContent":["import type { JSX } from \"@solidjs/web\";\nimport { type Accessor, createContext, useContext } from \"solid-js\";\nimport type { MutableRef } from \"../../internals/floating-ui/types\";\n\nexport type SelectSide =\n\t| \"top\"\n\t| \"right\"\n\t| \"bottom\"\n\t| \"left\"\n\t| \"inline-start\"\n\t| \"inline-end\"\n\t| \"none\";\nexport type SelectAlign = \"start\" | \"center\" | \"end\";\n\nexport interface SelectPositionerContextValue {\n\tside: Accessor<SelectSide>;\n\talign: Accessor<SelectAlign>;\n\tanchorHidden: Accessor<boolean>;\n\tarrowRef: MutableRef<HTMLElement | null>;\n\tarrowStyles: Accessor<JSX.CSSProperties>;\n\tarrowUncentered: Accessor<boolean>;\n\t/**\n\t * Whether the popup should be trigger-aligned (the selected item's text\n\t * aligns with the trigger's value text). Mirrors React — true when the\n\t * positioner's `alignItemWithTrigger` prop is true, the popup is mounted,\n\t * and the open method isn't touch.\n\t */\n\talignItemWithTriggerActive: Accessor<boolean>;\n\t/**\n\t * Lets the popup disable trigger-aligned placement at runtime when space\n\t * is too tight (auto-fallback). Writes flip the positioner into standard\n\t * anchor-relative placement without causing a re-mount.\n\t */\n\tsetControlledAlignItemWithTrigger: (next: boolean) => void;\n\t/** Whether floating-ui has produced its first position for the current open. */\n\tisPositioned: Accessor<boolean>;\n\t/** Scroll-arrow element refs — written by `<Select.ScrollUpArrow>` / `<Select.ScrollDownArrow>`. */\n\tscrollUpArrowRef: MutableRef<HTMLElement | null>;\n\tscrollDownArrowRef: MutableRef<HTMLElement | null>;\n}\n\nexport const SelectPositionerContext =\n\tcreateContext<SelectPositionerContextValue | null>(null);\n\nexport function useSelectPositionerContext(): SelectPositionerContextValue {\n\tconst v = useContext(SelectPositionerContext);\n\tif (v == null) {\n\t\tthrow new Error(\n\t\t\t\"Base UI: SelectPositionerContext is missing. Positioner children must be placed within <Select.Positioner>.\",\n\t\t);\n\t}\n\treturn v;\n}\n"],"mappings":"AACA,SAAwBA,aAAa,EAAEC,UAAU,QAAQ,UAAU;AAwCnE,OAAO,MAAMC,uBAAuB,GACnCF,aAAa,CAAsC,IAAI,CAAC;AAEzD,OAAO,SAASG,0BAA0BA,CAAA,EAAiC;EAC1E,MAAMC,CAAC,GAAGH,UAAU,CAACC,uBAAuB,CAAC;EAC7C,IAAIE,CAAC,IAAI,IAAI,EAAE;IACd,MAAM,IAAIC,KAAK,CACd,6GACD,CAAC;EACF;EACA,OAAOD,CAAC;AACT","ignoreList":[]}