/** * Shared utility functions for CSS Anchor Positioning fallback chains * Used by both AnchorPop and AnchorArrow components */ /** * Generate unique identifier for a position config (for @position-try rule names) * Format: placement_position-area_align-self_justify-self * Note: Using underscores instead of colons to avoid CSS parsing issues * @param {string} placement * @param {{position_area: string, align_self: string, justify_self: string}} config */ export function get_fallback_id(placement: string, config: { position_area: string; align_self: string; justify_self: string; }): string; /** * Flip position-area value along specified axis * @param {string} area - position-area value * @param {'x' | 'y' | 'both'} axis - axis to flip * * Corner keywords: * - 'start' = top-left (block-start inline-start) * - 'end' = bottom-right (block-end inline-end) * - 'start end' = top-right (block-start inline-end) * - 'end start' = bottom-left (block-end inline-start) * * Overlay span keywords: * - 'span-start' = top-left L * - 'span-end' = bottom-right L * - 'span-start span-end' = top-right L * - 'span-end span-start' = bottom-left L */ export function flip_position_area(area: string, axis: "x" | "y" | "both"): string; /** * Flip alignment value (start ↔ end) * @param {string} value - align-self or justify-self value */ export function flip_alignment(value: string): string; /** * Get fallback chain based on placement and current CSS properties * Returns array of position configuration objects * @param {{ * placement: string, * position_area: string, * align_self: string, * justify_self: string, * flip_axis: 'none' | 'x' | 'y' | 'diagonal' | 'all' * }} config * @returns {Array<{position_area: string, align_self: string, justify_self: string}>} */ export function get_fallback_chain({ placement, position_area, align_self, justify_self, flip_axis }: { placement: string; position_area: string; align_self: string; justify_self: string; flip_axis: "none" | "x" | "y" | "diagonal" | "all"; }): Array<{ position_area: string; align_self: string; justify_self: string; }>;