import{type TemplateResult,type PropertyValues}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';export interface LyraPaletteItem{ /** The `FlowNode.type` a placement/drop creates. */ type:string; /** Nonblank text used as the option's visible and accessible name. */ label:string;description?:string; /** Items group under localized-by-host category headings, in first-appearance array order. */ category?:string;keywords?:string[]; /** Optional TemplateResult glyph (`TreeItem.icon` precedent). */ icon?:unknown; /** Visible but not draggable/placeable. */ disabled?:boolean;}export interface LyraNodePaletteEventMap{'lr-palette-place':CustomEvent<{type:string;}>;'lr-select':CustomEvent>; /** A keyboard reorder *request*, only while `reorderable`. `fromIndex`/`toIndex` index into the * host's own `items` array, so applying it is a plain splice; `category` names the group the * move stayed inside (`null` for the ungrouped bucket). This component never reorders `items` * itself, so nothing consults `defaultPrevented` and the event is deliberately not cancelable. */ 'lr-reorder':CustomEvent<{type:string;category:string|null;fromIndex:number;toIndex:number;}>;focus:FocusEvent;blur:FocusEvent;} /** * `` — the searchable, categorized node library for workflow editors: drag an * item onto a canvas, or place it by keyboard. Never creates nodes or touches a canvas's data * itself — the drop/place handshake ends at `lr-node-add`/`lr-palette-place`; the host mutates * `nodes`. Fully decoupled from `lr-flow-canvas` (no `for` resolution, unlike * `lr-flow-minimap`/`lr-flow-controls`/`lr-flow-run-status`) — it only needs to agree with a * `droppable` canvas on the `FLOW_PALETTE_MIME_TYPE` drag payload shape. * * Set `reorderable` to opt into keyboard reordering of the catalog itself: Ctrl/Cmd+ArrowUp/ * ArrowDown on the focused item emits `lr-reorder` — a *request*, exactly like every other event * here. `items` stays host-owned; nothing moves until the host applies the reported indices and * reassigns it. The move is scoped to the item's own category group, matching the group-first * rendering order, and mirrors ``'s already-shipped `reorderable`/`lr-reorder` contract. * * Public collection properties take bounded, clone-owned readonly snapshots. Create a new * collection and reassign it after changes; mutating the assigned array does not update the view. * Each rendered item is projected once from its own data descriptors. Accessor-backed or malformed * rows are omitted, while an admitted source object's identity remains available only for focus, * reorder, and `lr-select` contracts. * * @customElement lr-node-palette * @slot header - Content above the search field (e.g. a heading or tabs). * @slot footer - Content below the list. * @event lr-palette-place - An item was placed (pointer click or Enter/Space — the click/keyboard * alternative to dragging). `detail: { type }`. * @event lr-select - Emitted alongside `lr-palette-place` on both gestures, carrying the original * admitted item object. `detail: { item }`. * @event lr-reorder - `detail: { type, category, fromIndex, toIndex }` — Ctrl/Cmd+ArrowUp/ArrowDown * on the focused item requests moving it past its neighbour **inside its own category group**, so * a reorder can never turn into a recategorization. `fromIndex`/`toIndex` index into `items` * itself, so the host applies the move with a plain splice. Only fired while `reorderable`, never * at a group boundary, and never cancelable — this component does not mutate `items`. Success is * announced only once the re-rendered group order confirms the host applied it. * @event focus - A realm-correct native `FocusEvent`, relayed exactly once when the internal * search field gains focus; preserves `relatedTarget` and crosses the shadow boundary. * @event blur - A realm-correct native `FocusEvent`, relayed exactly once when the internal * search field loses focus; preserves `relatedTarget` and crosses the shadow boundary. * @csspart base - The root wrapper. * @csspart search - The search input. * @csspart search-clear - The button that clears the search field, rendered only while it has a * value -- the native `type="search"` cancel button is suppressed (its unthemed glyph does not * match the field's own border/background), so this replaces it rather than merely hiding it. * @csspart list - The listbox. * @csspart group-header - A category heading (`role="presentation"`). * @csspart item - A single option row. * @csspart item-icon - An item's icon wrapper. * @csspart item-label - An item's label text. * @csspart item-description - An item's description text. * @csspart search-field - The wrapper around the search input and its clear button. * @csspart empty - The no-results message. * @csspart live-region - The result-count announcement. * @cssprop [--lr-node-palette-search-min-height=var(--lr-icon-button-size)] - Minimum row height of * the search field, for matching it to a themed search field of a chosen density tier. Point it * at `--lr-form-control-height-l` (or any tier of that ladder) to line this field up with the * rest of an application's controls. It can only raise the height: the shared tappable-target * minimum stays underneath it, so no tier can shrink the field past the WCAG floor. * @cssprop [--lr-node-palette-search-font-size=inherit] - Text size of the search field. * @cssprop [--lr-node-palette-search-padding-inline=var(--lr-space-s)] - Leading gutter of the * search field. The trailing gutter is reserved for the overlaid clear button. * @cssprop [--lr-node-palette-search-padding-block=var(--lr-space-xs)] - Block gutter of the search * field. * @cssprop [--lr-node-palette-search-radius=var(--lr-radius)] - Corner radius of the search field. * @status stable * @since 4.0.0 */ export declare class LyraNodePalette extends LyraElement{protected static readonly ownedCollectionProperties:readonly string[]; /** Item identity is a load-bearing public contract, not an incidental detail: `willUpdate()` * matches a surviving item across a reorder/filter by `===` to keep roving focus on it (see * `occurrenceAt`/`indexOfOccurrence` below), `confirmPendingReorder()` locates the pending * request's own item/neighbor the same way, and `icon` may carry an opaque `TemplateResult` -- * a deep structural clone (the default for an owned collection) would silently corrupt its * internal `strings`/`.raw` template identity. Matches ``'s identical * `commands` exception for the same reasons. */ protected static readonly identityCollectionProperties:readonly string[];protected static readonly identityEventDetailProperties:Readonly<{'lr-select':readonly string[];}>;static styles:import("lit").CSSResultGroup[];protected static readonly immutableEventDetails:readonly string[]; /** Node templates available for filtering, activation, dragging, and optional reordering. * Accessor-backed or malformed rows are omitted; accepted fields are read once from own data * descriptors while the original item object stays available for documented identity contracts. */ items:readonly LyraPaletteItem[]; /** Accessible name for the actual listbox; omitted, empty, or whitespace-only values use the * localized default while the public property's raw readback remains unchanged. */ label?:string; /** * Opts into Ctrl/Cmd+ArrowUp/ArrowDown keyboard reordering (see the class doc). Defaults to * `false`: unset, no `lr-reorder` is ever emitted and Ctrl/Cmd+Arrow keeps behaving exactly like * a plain Arrow press. */ reorderable:boolean; /** JS-only accessible-name override for the listbox. Setting this property does not reflect a * host `aria-label`; an authored host attribute, including `aria-label=""`, names only the * component and leaves the listbox to `label` or its localized fallback. */ accessibleLabel:string|null;private queryText;private activeIndex;private liveText;private readonly listId;private readonly hintId;private announcementSink?;private readonly announcer; /** Gates the item-count announcement so a freshly-mounted palette (or one that receives its * initial `items` before/at connect) never announces its own starting count -- mirrors * ``/``'s identical `isMounting` gate. */ private isMounting;private canonicalItemsCache;private filteredCache;private categorizedCache;private rovingListCache;private get canonicalItems();private get filtered();private categorized;private rovingList; /** Enabled items in the order represented by the currently committed item elements. */ private lastRenderedRovingList;private pendingFocusIndex;private itemElements;private occurrenceAt;private indexOfOccurrence;connectedCallback():void;disconnectedCallback():void;adoptedCallback():void;protected willUpdate(changed:PropertyValues):void;protected updated(changed:PropertyValues):void;private onSearchInput; /** Replaces the suppressed native `type="search"` cancel button -- see `search-clear`'s doc. */ private onSearchClear;private onSearchFocus;private onSearchBlur;private onFieldKeyDown;private focusItem;private onItemKeyDown; /** The rendered items of one category group, disabled entries included: a reorder moves the * focused item past the neighbour a user can actually see, which is not the same list the * roving-tabindex order walks. */ private groupItemsFor;private pendingReorder?;private requestReorder; /** Announce a move only once the re-rendered group proves the host accepted the request -- the * same "confirm, don't assume" contract ``'s own reorder announcement follows. Relative * order is the test rather than an absolute index, so a host that applies the move *and* other * edits in the same reassignment still confirms. */ private confirmPendingReorder;private place;private onItemDragStart;private itemTemplate;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-node-palette':LyraNodePalette;}}