{"version":3,"names":["flip","offset","shift","size","dynamic","createEffect","createMemo","createSignal","omit","Show","untrack","composeRefs","userRef","CompositeList","FloatingNode","useFloatingNodeId","useFloating","arrow","mergeRootProps","InternalBackdrop","resolveClassStyle","useSelectRootContext","SelectPositionerContext","composePlacement","side","align","physicalSide","parsePlacement","placement","rawSide","rawAlign","split","SelectPositioner","props","root","nodeId","sideOffset","alignOffset","arrowPadding","collisionPadding","strategy","positionMethod","arrowRef","current","floating","rootContext","floatingRootContext","middleware","mainAxis","alignmentAxis","padding","apply","rects","availableWidth","availableHeight","elements","els","s","style","setProperty","reference","width","height","element","offsetParent","positionerNode","setPositionerElement","el","opacity","refs","setFloating","scrollUpArrowRef","scrollDownArrowRef","controlledAlignItemWithTrigger","setControlledAlignItemWithTrigger","alignItemWithTrigger","ownedWrite","mountedNow","mounted","prop","alignItemWithTriggerActive","openMethod","transform","Math","round","x","y","positioned","isPositioned","open","data","computedSideAlign","computedAlign","anchorHidden","computedSide","arrowStyles","middlewareData","position","styles","left","top","arrowUncentered","centerOffset","positionerContext","state","openNow","trigger","triggerElement","setReference","update","positionerStyle","base","visibility","undefined","internal","hidden","data-open","data-closed","data-anchor-hidden","internalStyle","userClassStyle","userProps","merged","Tag","as","listRef","labelsRef","modal"],"sources":["select-positioner.tsx"],"sourcesContent":["import type { JSX, ValidComponent } from \"@solidjs/web\";\n/**\n * `<Select.Positioner>` — anchors the popup to the trigger via floating-ui.\n * Mirrors `packages/react/src/select/positioner/SelectPositioner.tsx`.\n *\n * ### Port deviations\n *\n * - `alignItemWithTrigger` uses `position: fixed` on the positioner (no\n *   floating-ui transform) while Select.Popup writes viewport coordinates.\n *   Standard anchor placement uses the thin `useFloating` transform path.\n * - Uses low-level `useFloating` + `flip` / `shift` / `size` / `arrow`\n *   middleware directly, matching `<Popover.Positioner>`. The full\n *   `useAnchorPositioning` helper is available but not needed for this\n *   thin port.\n * - `InternalBackdrop` is rendered when `modal && open` to block outside\n *   pointer interaction.\n */\n\nimport { flip, offset, type Placement, shift, size } from \"@floating-ui/dom\";\nimport { dynamic } from \"@solidjs/web\";\nimport {\n\tcreateEffect,\n\tcreateMemo,\n\tcreateSignal,\n\tomit,\n\tShow,\n\tuntrack,\n} from \"solid-js\";\nimport { composeRefs, userRef } from \"../../internals/compose-refs\";\nimport { CompositeList } from \"../../internals/composite/composite-list\";\nimport {\n\tFloatingNode,\n\tuseFloatingNodeId,\n} from \"../../internals/floating-ui/components/floating-tree\";\nimport { useFloating } from \"../../internals/floating-ui/hooks/use-floating\";\nimport { arrow } from \"../../internals/floating-ui/middleware/arrow\";\nimport type { MutableRef } from \"../../internals/floating-ui/types\";\nimport { mergeRootProps } from \"../../internals/merge-root-props\";\nimport { InternalBackdrop } from \"../../internals/popups/internal-backdrop\";\nimport { resolveClassStyle } from \"../../internals/resolve-class-style\";\nimport type { BaseUIComponentProps } from \"../../internals/types\";\nimport { useSelectRootContext } from \"../select-root-context\";\nimport {\n\ttype SelectAlign,\n\tSelectPositionerContext,\n\ttype SelectPositionerContextValue,\n\ttype SelectSide,\n} from \"./select-positioner-context\";\n\nexport interface SelectPositionerState {\n\topen: boolean;\n\tside: SelectSide;\n\talign: SelectAlign;\n\tanchorHidden: boolean;\n}\n\nexport interface SelectPositionerProps\n\textends BaseUIComponentProps<\"div\", SelectPositionerState> {\n\tas?: ValidComponent;\n\t/** Which side of the trigger to place the popup on. @default \"bottom\" */\n\tside?: Exclude<SelectSide, \"none\"> | undefined;\n\t/** Alignment along the chosen side. @default \"start\" */\n\talign?: SelectAlign | undefined;\n\t/** Px gap between the trigger and the popup. @default 0 */\n\tsideOffset?: number | undefined;\n\t/** Px shift along the side. @default 0 */\n\talignOffset?: number | undefined;\n\t/** Padding between the arrow and the positioner edges. @default 5 */\n\tarrowPadding?: number | undefined;\n\t/** Padding between the positioner and collision boundary. @default 5 */\n\tcollisionPadding?: number | undefined;\n\t/** CSS positioning strategy. @default \"absolute\" */\n\tpositionMethod?: \"absolute\" | \"fixed\" | undefined;\n\t/**\n\t * When true (default), the popup overlaps the trigger so the selected\n\t * item's text aligns with the trigger value. Uses fixed positioning\n\t * and viewport coordinates instead of floating-ui transform placement.\n\t * @default true\n\t */\n\talignItemWithTrigger?: boolean | undefined;\n}\n\nfunction composePlacement(\n\tside: Exclude<SelectSide, \"none\">,\n\talign: SelectAlign,\n): Placement {\n\tconst physicalSide: \"top\" | \"right\" | \"bottom\" | \"left\" =\n\t\tside === \"inline-start\" ? \"left\" : side === \"inline-end\" ? \"right\" : side;\n\tif (align === \"center\") return physicalSide as Placement;\n\treturn `${physicalSide}-${align}` as Placement;\n}\n\nfunction parsePlacement(placement: Placement): {\n\tside: SelectSide;\n\talign: SelectAlign;\n} {\n\tconst [rawSide, rawAlign] = placement.split(\"-\") as [\n\t\t\"top\" | \"right\" | \"bottom\" | \"left\",\n\t\t\"start\" | \"end\" | undefined,\n\t];\n\treturn {\n\t\tside: rawSide,\n\t\talign: rawAlign ?? \"center\",\n\t};\n}\n\nexport function SelectPositioner(props: SelectPositionerProps): JSX.Element {\n\tconst root = useSelectRootContext();\n\tconst nodeId = useFloatingNodeId();\n\n\tconst side = (): Exclude<SelectSide, \"none\"> => props.side ?? \"bottom\";\n\tconst align = (): SelectAlign => props.align ?? \"start\";\n\tconst sideOffset = (): number => props.sideOffset ?? 0;\n\tconst alignOffset = (): number => props.alignOffset ?? 0;\n\tconst arrowPadding = (): number => props.arrowPadding ?? 5;\n\tconst collisionPadding = (): number => props.collisionPadding ?? 5;\n\tconst strategy = (): \"absolute\" | \"fixed\" =>\n\t\tprops.positionMethod ?? \"absolute\";\n\n\tconst arrowRef: MutableRef<HTMLElement | null> = { current: null };\n\n\tconst floating = useFloating({\n\t\trootContext: root.floatingRootContext,\n\t\tnodeId,\n\t\tget placement() {\n\t\t\treturn composePlacement(side(), align());\n\t\t},\n\t\tget strategy() {\n\t\t\treturn strategy();\n\t\t},\n\t\tget middleware() {\n\t\t\treturn [\n\t\t\t\toffset({\n\t\t\t\t\tmainAxis: sideOffset(),\n\t\t\t\t\talignmentAxis: alignOffset(),\n\t\t\t\t}),\n\t\t\t\tflip({ padding: collisionPadding() }),\n\t\t\t\tshift({ padding: collisionPadding() }),\n\t\t\t\tsize({\n\t\t\t\t\tpadding: collisionPadding(),\n\t\t\t\t\tapply({ rects, availableWidth, availableHeight, elements: els }) {\n\t\t\t\t\t\tconst s = els.floating.style;\n\t\t\t\t\t\ts.setProperty(\"--anchor-width\", `${rects.reference.width}px`);\n\t\t\t\t\t\ts.setProperty(\"--anchor-height\", `${rects.reference.height}px`);\n\t\t\t\t\t\ts.setProperty(\"--available-width\", `${availableWidth}px`);\n\t\t\t\t\t\ts.setProperty(\"--available-height\", `${availableHeight}px`);\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tarrow({\n\t\t\t\t\telement: arrowRef.current,\n\t\t\t\t\tpadding: arrowPadding(),\n\t\t\t\t\toffsetParent: \"real\",\n\t\t\t\t}),\n\t\t\t];\n\t\t},\n\t});\n\n\tlet positionerNode: HTMLElement | null = null;\n\tconst setPositionerElement = (el: HTMLElement | null): void => {\n\t\tpositionerNode = el;\n\t\t// opacity:0 before first paint (ref runs during DOM construction); the\n\t\t// reveal effect can run after the first paint in Solid 2. See\n\t\t// popover-positioner.\n\t\tif (el) el.style.opacity = \"0\";\n\t\tfloating.refs.setFloating(el);\n\t};\n\n\tconst scrollUpArrowRef: MutableRef<HTMLElement | null> = { current: null };\n\tconst scrollDownArrowRef: MutableRef<HTMLElement | null> = { current: null };\n\n\t// Trigger-aligned popup placement state. The controlled flag mirrors\n\t// React's `useState(alignItemWithTrigger)` — it lets the popup\n\t// auto-fallback to standard anchor placement when space is tight. When\n\t// `mounted` flips to false we resync with the prop for the next open.\n\tconst [controlledAlignItemWithTrigger, setControlledAlignItemWithTrigger] =\n\t\tcreateSignal<boolean>(props.alignItemWithTrigger ?? true, {\n\t\t\townedWrite: true,\n\t\t});\n\n\tcreateEffect(\n\t\t() => ({\n\t\t\tmountedNow: root.mounted(),\n\t\t\tprop: props.alignItemWithTrigger ?? true,\n\t\t}),\n\t\t({ mountedNow, prop }) =>\n\t\t\tuntrack(() => {\n\t\t\t\tif (!mountedNow && controlledAlignItemWithTrigger() !== prop) {\n\t\t\t\t\tsetControlledAlignItemWithTrigger(prop);\n\t\t\t\t}\n\t\t\t}),\n\t);\n\n\tconst alignItemWithTriggerActive = createMemo<boolean>(() => {\n\t\treturn (\n\t\t\troot.mounted() &&\n\t\t\tcontrolledAlignItemWithTrigger() &&\n\t\t\troot.openMethod() !== \"touch\"\n\t\t);\n\t});\n\n\t// Solid 2 DOM spread misses the first `floating.x`/`y` frame —\n\t// imperatively mirror the transform so the popup doesn't flash at (0, 0).\n\t// Skip when trigger-aligned: popup geometry writes viewport coords and\n\t// React uses `position: fixed` only (no transform) in that mode.\n\t// Transform + reveal in ONE imperative write so the popup is never visible\n\t// at the stale (0,0) transform (the teleport). `opacity:0` until\n\t// `isPositioned`, matching Base UI's `useAnchorPositioning`. No transform in\n\t// trigger-aligned mode (popup writes viewport coords). See popover-positioner\n\t// for the full rationale.\n\tcreateEffect(\n\t\t() => {\n\t\t\tif (!root.mounted()) return null;\n\t\t\treturn {\n\t\t\t\ttransform: alignItemWithTriggerActive()\n\t\t\t\t\t? null\n\t\t\t\t\t: `translate(${Math.round(floating.x)}px, ${Math.round(floating.y)}px)`,\n\t\t\t\tpositioned: floating.isPositioned || !root.open(),\n\t\t\t};\n\t\t},\n\t\t(data) => {\n\t\t\tif (!data || !positionerNode) return;\n\t\t\tpositionerNode.style.transform = data.transform ?? \"\";\n\t\t\tpositionerNode.style.opacity = data.positioned ? \"\" : \"0\";\n\t\t},\n\t);\n\n\tconst computedSideAlign = createMemo<{\n\t\tside: SelectSide;\n\t\talign: SelectAlign;\n\t}>(() => parsePlacement(floating.placement));\n\n\tconst computedAlign = (): SelectAlign => computedSideAlign().align;\n\n\tconst [anchorHidden] = createSignal<boolean>(false);\n\n\t// Reported `side` flips to 'none' when the popup is trigger-aligned —\n\t// the popup isn't anchored to one edge; it overlaps the trigger.\n\tconst computedSide = (): SelectSide =>\n\t\talignItemWithTriggerActive() ? \"none\" : computedSideAlign().side;\n\n\t// `isPositioned` gates trigger-aligned geometry in Select.Popup — wait for\n\t// floating-ui's first successful compute while open, not the initial x/y of 0.\n\tconst isPositioned = createMemo<boolean>(() => {\n\t\treturn root.mounted() && root.open() && floating.isPositioned;\n\t});\n\n\tconst arrowStyles = createMemo<JSX.CSSProperties>(() => {\n\t\tconst data = floating.middlewareData.arrow as\n\t\t\t| { x?: number; y?: number; centerOffset?: number }\n\t\t\t| undefined;\n\t\tif (!data) return { position: \"absolute\" };\n\t\tconst styles: JSX.CSSProperties = { position: \"absolute\" };\n\t\tif (data.x != null) styles.left = `${data.x}px`;\n\t\tif (data.y != null) styles.top = `${data.y}px`;\n\t\treturn styles;\n\t});\n\n\tconst arrowUncentered = createMemo<boolean>(() => {\n\t\tconst data = floating.middlewareData.arrow as\n\t\t\t| { centerOffset?: number }\n\t\t\t| undefined;\n\t\treturn (data?.centerOffset ?? 0) !== 0;\n\t});\n\n\tconst positionerContext: SelectPositionerContextValue = {\n\t\tside: computedSide,\n\t\talign: computedAlign,\n\t\tanchorHidden,\n\t\tarrowRef,\n\t\tarrowStyles,\n\t\tarrowUncentered,\n\t\talignItemWithTriggerActive,\n\t\tsetControlledAlignItemWithTrigger,\n\t\tisPositioned,\n\t\tscrollUpArrowRef,\n\t\tscrollDownArrowRef,\n\t};\n\n\tconst state = createMemo<SelectPositionerState>(() => ({\n\t\topen: root.open(),\n\t\tside: computedSide(),\n\t\talign: computedAlign(),\n\t\tanchorHidden: anchorHidden(),\n\t}));\n\n\tcreateEffect(\n\t\t() => ({\n\t\t\tmountedNow: root.mounted(),\n\t\t\topenNow: root.open(),\n\t\t\ttrigger: root.triggerElement(),\n\t\t}),\n\t\t({ trigger }) => {\n\t\t\tif (trigger) {\n\t\t\t\tfloating.refs.setReference(trigger);\n\t\t\t}\n\t\t\tfloating.update();\n\t\t},\n\t);\n\n\t// `transform` is written imperatively in the `createEffect` above\n\t// because Solid 2's DOM spread subscribes `get style()` late and misses\n\t// the first `floating.x` / `floating.y` frame.\n\tconst positionerStyle = createMemo<JSX.CSSProperties>(() => {\n\t\tconst openNow = root.open();\n\t\tconst mountedNow = root.mounted();\n\t\tconst base: JSX.CSSProperties = {\n\t\t\tvisibility: mountedNow ? undefined : \"hidden\",\n\t\t\t\"pointer-events\": openNow ? undefined : \"none\",\n\t\t};\n\t\tif (alignItemWithTriggerActive()) {\n\t\t\treturn { ...base, position: \"fixed\" };\n\t\t}\n\t\treturn {\n\t\t\t...base,\n\t\t\tposition: strategy(),\n\t\t\ttop: \"0\",\n\t\t\tleft: \"0\",\n\t\t};\n\t});\n\n\tconst internal = {\n\t\tget hidden() {\n\t\t\treturn !root.open();\n\t\t},\n\t\t// popupStateMapping projection.\n\t\tget \"data-open\"() {\n\t\t\treturn state().open ? \"\" : undefined;\n\t\t},\n\t\tget \"data-closed\"() {\n\t\t\treturn state().open ? undefined : \"\";\n\t\t},\n\t\tget \"data-anchor-hidden\"() {\n\t\t\treturn state().anchorHidden ? \"\" : undefined;\n\t\t},\n\t};\n\n\tconst internalStyle = {\n\t\tget style() {\n\t\t\treturn positionerStyle();\n\t\t},\n\t};\n\n\tconst userClassStyle = resolveClassStyle(props, () => state());\n\tconst userProps = omit(\n\t\tprops,\n\t\t\"as\",\n\t\t\"class\",\n\t\t\"style\",\n\t\t\"attrs\",\n\n\t\t\"side\",\n\t\t\"align\",\n\t\t\"sideOffset\",\n\t\t\"alignOffset\",\n\t\t\"arrowPadding\",\n\t\t\"collisionPadding\",\n\t\t\"positionMethod\",\n\t\t\"alignItemWithTrigger\",\n\t);\n\n\tlet merged: Record<string, unknown> = mergeRootProps(internalStyle, internal);\n\tmerged = mergeRootProps(merged, userClassStyle);\n\tmerged = mergeRootProps(merged, userProps);\n\n\tconst Tag = dynamic(() => props.as ?? \"div\");\n\treturn (\n\t\t<FloatingNode id={nodeId}>\n\t\t\t<CompositeList\n\t\t\t\telementsRef={root.listRef.current}\n\t\t\t\tlabelsRef={root.labelsRef.current}\n\t\t\t>\n\t\t\t\t<SelectPositionerContext value={positionerContext}>\n\t\t\t\t\t<Show when={root.mounted()}>\n\t\t\t\t\t\t<Show when={root.modal() && root.open()}>\n\t\t\t\t\t\t\t<InternalBackdrop\n\t\t\t\t\t\t\t\tinert={!root.open()}\n\t\t\t\t\t\t\t\tcutout={root.triggerElement() ?? undefined}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Show>\n\t\t\t\t\t\t<Tag\n\t\t\t\t\t\t\t{...merged}\n\t\t\t\t\t\t\tref={composeRefs(setPositionerElement, userRef(props))}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Show>\n\t\t\t\t</SelectPositionerContext>\n\t\t\t</CompositeList>\n\t\t</FloatingNode>\n\t);\n}\n"],"mappings":"AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,MAAM,EAAkBC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB;AAC5E,SAASC,OAAO,QAAQ,cAAc;AACtC,SACCC,YAAY,EACZC,UAAU,EACVC,YAAY,EACZC,IAAI,EACJC,IAAI,EACJC,OAAO,QACD,UAAU;AACjB,SAASC,WAAW,EAAEC,OAAO,QAAQ,8BAA8B;AACnE,SAASC,aAAa,QAAQ,0CAA0C;AACxE,SACCC,YAAY,EACZC,iBAAiB,QACX,sDAAsD;AAC7D,SAASC,WAAW,QAAQ,gDAAgD;AAC5E,SAASC,KAAK,QAAQ,8CAA8C;AAEpE,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,gBAAgB,QAAQ,0CAA0C;AAC3E,SAASC,iBAAiB,QAAQ,qCAAqC;AAEvE,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAECC,uBAAuB,QAGjB,6BAA6B;AAmCpC,SAASC,gBAAgB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