import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';export interface SequenceStripItem{readonly id:string;readonly categoryId:string; /** A small marker rendered at the bottom of this cell — a secondary boolean annotation * independent of the primary category color (e.g. a subagent-dispatched turn). */ readonly marker?:boolean; /** Per-item text shown in the hover/focus tooltip and exposed as the item's accessible name * (falls back to the category's own `label`, or the localized unnamed-category label). */ readonly label?:string; /** * Marks this item non-actionable: `aria-disabled="true"` replaces the selected/active * affordances of the cell that represents it, activating it (click, or Enter/Space while * roving-focused) emits nothing, and roving keyboard navigation (arrow keys, Home/End) steps * past it instead of landing on it. Above `MAX_RENDERED_CELLS`, one cell paints a whole RANGE of * items and activating it always resolves to that range's first item (`cell.start`, see * `activateCell()`), so a range cell's disabled state follows that same first item. Omitted or * `false` renders the item exactly as before this field existed. */ readonly disabled?:boolean;}export interface SequenceStripCategory{readonly id:string; /** A CSS color. Invalid values and `url()` paint servers render transparently. */ readonly color:string; /** Human-readable name used in the auto-generated `aria-label` summary and as the hover-tooltip * fallback text for items with no `label` of their own. An omitted or blank label uses the * localized unnamed-category label rather than exposing an internal id. */ readonly label?:string;} /** Detail of `lr-item-activate`: which strip item the user picked. */ export interface LyraSequenceStripActivateDetail{readonly index:number;readonly id:string;readonly item:SequenceStripItem;}export interface LyraSequenceStripEventMap{'lr-item-activate':CustomEvent;} /** * `` — a compact, one-thin-cell-per-item strip visualizing a sequence of * categorical states, with an optional secondary per-cell marker. Pure CSS/flex, no chart.js/SVG/ * canvas — sized/named consistently with the sparkline/heatmap family, but a glanceable aggregate * visualization. The strip is a labeled `role="list"` and each cell is a named list item. * Exactly one cell is tabbable; Left/Right and Home/End rove through the cells and show the same * detail tooltip as pointer hover. Clicking a cell, or pressing Enter/Space on the roving cell, * emits the controlled `lr-item-activate` event without moving selection. A host `aria-label` * names the host itself without being duplicated on the internal list; `accessible-label` names * that list, otherwise its category summary does. * A category whose label is omitted or blank uses the localized unnamed-category label for * affected list-item names and tooltips, its summary clause, and its legend row. * Controlled item refreshes preserve the focused * item by id, clamp to the nearest survivor, and focus the stable list when the strip becomes empty. * A queued arrow/Home/End focus is generation- and identity-bound: replacing `items`, disconnecting, * or reconnecting before that update settles cannot focus the same numeric index in a new model. * At most 200 cells are rendered. Past that cap the strip becomes a span-preserving OVERVIEW rather * than a window: the retained items are distributed over exactly 200 contiguous ranges, each cell * painted by its range's dominant category and marked when any item in it is, so the strip still * represents the whole sequence at full width. Roving focus, `aria-posinset`/`aria-setsize`, * `aria-current` and activation all address those cells; activating a range emits its FIRST item. * Assignment * retains at most the first 10,000 items and categories as detached frozen snapshots; reassign a * collection after changing it. * * An item may also set `disabled`, marking it non-actionable: `aria-disabled="true"` replaces the * selected/active affordances of the cell that represents it, activating it (click or Enter/Space) * emits nothing, and roving Left/Right/Home/End navigation -- including the default resting tab * stop -- steps past it instead of landing on it. Above the cell cap, a range cell's disabled state * follows its own activated item, the range's first (see `lr-item-activate` above). Omitted or * `false` renders the item exactly as before this field existed. * * @customElement lr-sequence-strip * @event lr-item-activate - Fired when a cell is clicked, or activated with Enter/Space on the * roving-tabindex focus. `detail: { index, id, item }` identifies the picked item — the range's * FIRST item once the strip is past its cell cap. Not * cancelable, and it does not move `selectedIndex` on its own -- the selection is controlled, * so the consumer stays the single source of truth for a playback index this strip does not own. * @csspart base - The root strip wrapper (`role="list"`). * @csspart cell - Each named, roving-focus cell, background-colored by its category — one item * below the render cap, one dominant-coloured item range above it. Carries `aria-disabled="true"` * while the item it activates sets `disabled`. * @csspart marker - The small bottom marker on a cell any of whose items sets `marker: true`. * @csspart tooltip - The hover/focus tooltip showing the active cell's label, positioned from that * active cell. * @csspart legend - The static category key rendered below the strip when `showLegend` is set * (`aria-hidden` — it repeats the strip's own `aria-label` visually). * @csspart legend-item - One swatch + label pair in the legend, one per `categories` entry (plus one * trailing marker row when `markerLabel` is set). * @csspart legend-swatch - The color chip of a legend item, matching that category's cell color. * @csspart legend-marker-swatch - The chip of the `markerLabel` legend row: a neutral chip carrying * the same bottom bar a `marker: true` cell paints, in the same `--lr-sequence-strip-marker-color`. * @csspart legend-label - The text of a legend item (the category's `label`, or the localized * unnamed-category label). * @csspart bucket-summary - Visible item-total/range-count disclosure, rendered only while the * strip is past its cell cap and therefore showing ranges rather than individual items. It replaces * 15.x's `window-range`, which disclosed a projection window this component no longer has. * @csspart legend-limit - Visible rendered/total category count when the legend is bounded. * @cssprop [--lr-sequence-strip-height=var(--lr-size-1-5rem)] - Block size of the strip. * @cssprop [--lr-sequence-strip-marker-color=var(--lr-color-text)] - Color of the bottom marker on a `marker: true` cell, and of the marker legend row's bar. * @cssprop [--lr-sequence-strip-legend-swatch-size=var(--lr-size-0-625rem)] - Inline and block size of a legend swatch (category and marker rows alike). * @cssprop [--lr-sequence-strip-legend-marker-bg=var(--lr-color-surface-raised)] - Neutral chip background behind the marker legend row's bar; it stands in for "any cell", so it deliberately matches no category color. * @cssprop [--lr-sequence-strip-disabled-opacity=var(--lr-opacity-disabled)] - Opacity of a cell whose activated item sets `disabled`. * @status stable * @since 4.0.0 */ export declare class LyraSequenceStrip extends LyraElement{static styles:import("lit").CSSResultGroup[];private _items;private _categories; /** Frozen snapshot of at most the first 10,000 items. Empty/blank ids are omitted and duplicate * ids use the first entry. Reassign to update. */ get items():readonly SequenceStripItem[];set items(value:readonly SequenceStripItem[]); /** Frozen snapshot of at most the first 10,000 categories. Empty/blank ids are omitted and * duplicate ids use the first entry. Reassign to update. */ get categories():readonly SequenceStripCategory[];set categories(value:readonly SequenceStripCategory[]); /** Overrides the auto-generated `aria-label` (a per-category "label: count" summary). Unset * computes the summary from `items`/`categories`; an explicitly empty string renders as an * empty label rather than falling back to the auto-generated summary. */ accessibleLabel?:string; /** * Index of the currently selected item, or `-1` (the default) for none — the controlled selection * this strip's natural companion, `lr-sequence-playback`, scrubs through. Mirrors the shape * `lr-lite-chart`'s `selectedIndices` and `lr-heatmap`'s `selectedCell` already establish. * * Controlled, not self-managing: activating a cell emits `lr-item-activate` and does **not** * move the selection on its own, so the consumer stays the single source of truth and the * component cannot drift from a playback index it does not own. Before focus enters, a valid * selection anchors the strip's sole keyboard entry stop; keyboard roving remains authoritative * after focus. Past the 200-cell cap it is the whole range containing the index that reads as * selected, since that range is the only thing the strip draws for it. An out-of-range or * non-integer value selects nothing rather than throwing. */ selectedIndex:number; /** Index of the cell that owns `itemIndex`, or `-1` for an unusable index. Below the cell cap * this is the identity mapping; past it, the bucket whose range contains the item. */ private cellIndexForItem; /** The cell carrying the controlled selection, or `null` when `selectedIndex` is not an in-range * integer. Past the cell cap the selected item's whole RANGE reads as selected, since that range * is the only thing the strip still draws for it. */ private selectedCellIndex; /** * Emits `lr-item-activate` for `index`. * * Not cancelable: nothing in this component branches on `defaultPrevented`, and the library's * contract reserves cancelable events for real veto points. */ private activateItem; /** Activates the item a cell stands for — itself below the cap, its range's first item above it. * Reporting the first item keeps a playback consumer's `selectedIndex` on a real sequence * position it can scrub from, which a synthesized range midpoint would not be. */ private activateCell; /** A cell's disabled state follows the item it activates -- itself below the cap, its range's * first item above it (see `activateCell()`). */ private cellDisabled; /** Returns the nearest enabled cell, preferring forward then backward; `-1` means none exists. */ private nearestEnabledCellIndex; /** Steps by one cell in `direction`, skipping disabled cells without wrapping. */ private stepEnabledCellIndex; /** Renders a static `[part="legend"]` key of every `categories` entry below the strip, so the * color-to-category mapping is readable without hovering each cell. Deliberately * non-interactive: unlike `` this toggles nothing and emits nothing — the * strip is a presentational aggregate, and the key describes the scheme, not the current data * (a category with no matching item still gets a row). */ showLegend:boolean; /** Names what a cell's `marker` means (e.g. `"Subagent"`). Set it to key the marker in the legend * — with `showLegend` on it adds one trailing `[part="legend-item"]` whose swatch reproduces the * cell's own marker treatment — and to have the marker counted in the auto-generated summary, * which is otherwise per-category only. Unset (the default) nothing changes: no extra legend row * and no extra summary clause. */ markerLabel?:string; /** The CELL index currently under the pointer (`null` when not hovering any cell). */ private hoverIndex; /** The roving keyboard-focus CELL index (`null` while focus is outside the strip). */ private keyboardIndex; /** Identity-keyed projection cache. Hover and focus re-render on every pointer move, so the * O(items) bucket pass must not run again while the same frozen `items` snapshot is installed. */ private cellCacheSource;private cellCache;private pendingFocusTarget;private restoringOwnedFocus;private focusRestoreGeneration;protected willUpdate(changed:PropertyValues):void;protected updated(changed:PropertyValues):void;disconnectedCallback():void; /** The current cell projection, rebuilt only when a new `items` snapshot is installed. */ private cells;private categoryMap;private categoryColor;private categoryLabel;private autoSummary; /** The localized "N items in M ranges" disclosure, or `undefined` while every item has its own * cell and there is nothing to disclose. */ private bucketSummary; /** A cell's accessible name and tooltip text: the item's own label for a one-item cell, and a * "dominant category, items X to Y" range name once the cell stands for several. */ private cellLabel;private itemLabel;private onCellEnter;private onCellLeave;private onCellFocus;private onStripFocusOut;private onCellKeyDown; /** The legend repeats, in visible form, the category names already exposed by the named * `role="list"` summary and its individually named `role="listitem"` cells. Exposing the key to * assistive technology as well would read the same scheme twice, so the whole subtree is * `aria-hidden` — it is a decorative duplicate rendered outside the list, and hiding it removes * nothing from the inspectable sequence. */ private renderLegend;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-sequence-strip':LyraSequenceStrip;}}