import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import type{LyraOrientation}from'../../../internal/shared-unions.js';import type{LyraCarouselItem}from'./carousel-item.class.js';export type LyraCarouselOrientation=LyraOrientation;export interface LyraCarouselEventMap{'lr-slide-change':CustomEvent<{index:number;slide:HTMLElement;}>;} /** * `` — a scroll-snap carousel for arbitrary slotted content. Its Web Awesome and * Shoelace-compatible surface supports optional navigation and pagination, multiple slides per * page, horizontal or vertical movement, autoplay, looping, and opt-in mouse dragging. * Manual active-page changes are announced through a pre-mounted light-DOM live region even while * autoplay is enabled. Only timer-driven advances stay silent, and neither initial connection nor * reconnection replays the current page. Changes made while the carousel or a composed ancestor is * accessibility-hidden stay silent. Subtree-pruned slide content is omitted; a visibility-hidden * wrapper may still expose a descendant that explicitly restores visibility. Forwarding slots * contribute their flattened assigned content; their fallback contributes only when the slot has * no direct assignment, even when an assignment is itself accessibility-hidden. The localized * `carouselSlideAnnouncement` and `carouselSlideAnnouncementSeparator` messages control the order, * punctuation, and separation of spoken position/content summaries. * Assigned slide semantics remain author-owned after connection: later `role`, `aria-label`, * `aria-roledescription`, `hidden`, `inert`, and `aria-hidden` changes persist through carousel * updates. Off-page slides are temporarily inert and aria-hidden, then regain their retained * author state when visible, unassigned, or disconnected. * Loop endcaps snapshot only side-effect-free plain HTML and stay synchronized with light-DOM * mutations. Slides containing custom elements, media/resources, form state, scripts, styles, or * non-HTML descendants use their original element for wrap alignment instead, so loop mode never * duplicates component lifecycles, network/playback owners, or stateful controls. * * @customElement lr-carousel * @slot - Slide elements. Each assigned element becomes one slide. * @slot next-icon - Optional decorative next-navigation icon. Its flattened subtree remains * visible but is inert and hidden from assistive technology; the native button is the action. * @slot previous-icon - Optional decorative previous-navigation icon, with the same inert visual * content contract as `next-icon`. * @event lr-slide-change - Active slide changed. `detail: { index, slide }`. * @attr {number} currentSlide - Web Awesome compatibility alias for `current-slide`; HTML * normalizes it to `currentslide` at runtime. When both are present initially, * `current-slide` wins. * @csspart base - Compatibility name for the carousel landmark; use `carousel`. * @csspart carousel - The carousel landmark. It is the same node as `base`. * @csspart scroll-container - The keyboard-focusable scroll-snap viewport. Arrow/Home/End * navigation leaves descendant editors and interactive controls in charge of their own keys. * @csspart track - Lyra extension wrapping the slotted slides and eligible inert loop snapshots. * @csspart controls - Lyra extension wrapping enabled navigation and pagination. * @csspart navigation - The previous/next navigation wrapper. * @csspart navigation-button - Shared navigation button part. * @csspart navigation-button-previous - Previous navigation button. * @csspart navigation-button-next - Next navigation button. * @csspart navigation-button--previous - Shoelace name for the previous navigation button. * @csspart navigation-button--next - Shoelace name for the next navigation button. * @csspart previous-glyph - Wrapper around the previous-icon slot. * @csspart next-glyph - Wrapper around the next-icon slot. * @csspart pagination - The pagination wrapper. * @csspart pagination-item - A pagination button. * @csspart pagination-item-active - The active pagination button. * @csspart pagination-item--active - Shoelace name for the active pagination button. * @csspart indicator-dot - Compact visible dot inside a pagination button. * @cssprop [--aspect-ratio=16/9] - Aspect ratio inherited by each slide. * @cssprop --scroll-hint - Logical padding that reveals the nearest adjacent slides. * @cssprop [--slide-gap=var(--lr-space-m)] - Gap between slides. * @cssprop [--lr-carousel-indicator-current-bg=var(--lr-color-brand-quiet)] - Active dot fill. * @cssprop [--lr-carousel-indicator-current-border-color=var(--lr-color-brand)] - Active dot border. * @cssprop [--lr-carousel-navigation-hover-bg=var(--lr-color-brand-quiet)] - Navigation hover background. * @cssprop [--lr-carousel-navigation-hover-border-color=var(--lr-color-brand)] - Navigation hover border. * @cssprop --lr-carousel-navigation-active-bg - Navigation pressed background; defaults to the * former brand-quiet active mix. * @cssprop [--lr-carousel-navigation-active-border-color=var(--lr-color-brand)] - Navigation pressed border. * @cssprop [--lr-carousel-pagination-hover-bg=var(--lr-color-brand-quiet)] - Pagination-dot hover background. * @cssprop [--lr-carousel-pagination-hover-border-color=var(--lr-color-brand)] - Pagination-dot hover border. * @cssprop --lr-carousel-pagination-active-bg - Pagination-dot pressed background; defaults to the * former brand-quiet active mix. * @cssprop [--lr-carousel-pagination-active-border-color=var(--lr-color-brand)] - Pagination-dot pressed border. * @cssprop --lr-carousel-slide-basis - Compatibility override for the computed per-page basis. * @cssprop [--lr-carousel-scroll-container-hover-outline-width=var(--lr-border-width-thin)] - * Outline width of the mouse-hover preview on `[part="scroll-container"]`. * @cssprop [--lr-carousel-scroll-container-hover-outline-style=solid] - Outline style of the * mouse-hover preview on `[part="scroll-container"]`. * @cssprop [--lr-carousel-scroll-container-hover-outline-color=var(--lr-color-border-strong)] - * Outline color of the mouse-hover preview on `[part="scroll-container"]`. Set to `transparent` * to opt out of the hover treatment entirely. * @cssprop [--lr-carousel-scroll-container-hover-outline-offset=var(--lr-focus-ring-offset)] - * Offset of the mouse-hover preview on `[part="scroll-container"]`. * @status stable * @since 4.0.0 */ export declare class LyraCarousel extends LyraElement{static styles:import("lit").CSSResultGroup[];static get observedAttributes():string[];private _currentSlide;private _pagination;private _slides; /** Zero-based start of the active slide page. * @default 0 */ get currentSlide():number;set currentSlide(value:number);loop:boolean;autoplay:boolean;autoplayInterval:number;navigation:boolean; /** Whether page indicators are rendered. * @default false */ get pagination():boolean;set pagination(value:boolean);orientation:LyraCarouselOrientation;mouseDragging:boolean;slidesPerPage:number;slidesPerMove:number; /** Live count of assigned slides. * @default 0 */ get slides():number; /** Accessible name used when the host has no `aria-label`; omitted falls back to the localized * `carouselLabel` default. An explicitly empty `accessible-label` is used as-is. */ accessibleLabel?:string;private hostAccessibleLabel;private slideSlot?;private viewport?;private scrollHintProbe?;private beforeClones?;private afterClones?;private timer?;private timerWindow?;private reduceMotion;private mediaQuery?;private visibilityDocument?;private readonly snapshots;private readonly appliedSnapshots; /** The scroll-settle debounce: every `scroll` event restarts it, and the slide the viewport came * to rest on is published once the stream goes quiet. Scheduled on -- and cancelled through -- * the realm this carousel lives in at the time, so one adopted into another document neither * leaves a task behind on the old realm nor loses the ability to cancel the new one. */ private readonly scrollSettle;private adoptingScrolledSlide;private hasAlignedOnce;private alignIndex?;private alignTarget?;private requestedBehavior?;private loopSide?;private loopClonesDirty;private pointerInteracting;private focusInteracting;private dragPointerId?;private dragStartCoordinate;private dragStartScroll;private dragMoved;private suppressClick;private clickTimer?;private clickTimerWindow?;private announcementSink?;private announcementsArmed;private changeOrigin;private manualPending;private observer?;private observerDocument?;private observerGeneration;private lastFocusedSlide?;constructor();attributeChangedCallback(name:string,oldValue:string|null,newValue:string|null):void;connectedCallback():void;disconnectedCallback():void;private armSlideContentObserver;private resetSlideContentObserver;protected willUpdate(changed:PropertyValues):void;protected firstUpdated(changed:PropertyValues):void;protected updated(changed:PropertyValues):void;private setCurrentSlideState;private setPaginationState;private onMotionPreferenceChange;private onVisibilityChange;private queueOwnerMicrotask;private effectiveOrientation;private slideElements;private pageSize;private moveSize;private maxStartIndex;private normalizedIndex;private pageTargets;private visibleIndices;private announceActivePage;private restoreAttribute;private snapshotSlide;private adoptChanges;private restoreSlide;private restoreSlides;private syncSlides; /** Moves focus while the outgoing slide is still operable. Setting `inert` first lets the * platform strand focus on the document body, outside this carousel's keyboard handler. The * remembered-slide branch covers direct light-DOM removal, where slotchange necessarily runs * only after the focused node has already disconnected. */ private repairFocusBeforeSlideExclusion;private handleSlidesChanged;private onSlotChange;private prepareClone;private syncLoopClones;private cloneFor;private changeTo; /** Moves forward by `slidesPerMove`. */ next(behavior?:ScrollBehavior):void; /** Moves backward by `slidesPerMove`. */ previous(behavior?:ScrollBehavior):void; /** Moves to the requested slide. */ goToSlide(index:number,behavior?:ScrollBehavior):void; /** Appends a carousel item. */ addSlide(slide:LyraCarouselItem):void; /** Removes the carousel item at `index`. */ removeSlide(index:number):void;private stopAutoplay;private restartAutoplay;private scrollPaddingStart;private axisOffsetOf;private scrollByAxis;private restingSlide;private alignToActiveSlide;private motionAwareScrollBehavior;private cancelScrollSettle;private onViewportScroll;private onViewportScrollEnd;private clearAlignment;private takeOverViewport;private settleScrolledSlide;private onViewportPointerEnter;private onViewportPointerLeave;private onViewportFocusIn;private onViewportFocusOut;private onViewportPointerDown;private targetsInteractiveContent;private onViewportPointerMove;private finishDrag;private cancelClickSuppression;private cancelDrag;private onViewportPointerUp;private onViewportPointerCancel;private onViewportLostPointerCapture;private onViewportClick;private onViewportKeyDown;private computedSlideBasis;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-carousel':LyraCarousel;}}