elastic-input 0.3.6 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,6 @@ import { Token } from '../lexer/tokens';
2
2
  import { CursorContext } from '../parser/Parser';
3
3
  import { FieldConfig, SavedSearch, HistoryEntry } from '../types';
4
4
  import { Suggestion } from './suggestionTypes';
5
-
6
5
  export interface AutocompleteResult {
7
6
  suggestions: Suggestion[];
8
7
  showDatePicker: boolean;
@@ -1,5 +1,5 @@
1
1
  import { Suggestion } from '../autocomplete/suggestionTypes';
2
- import { ColorConfig, StyleConfig, HistoryEntry, SavedSearch } from '../types';
2
+ import { ColorConfig, StyleConfig, HistoryEntry, SavedSearch, SuggestionItem } from '../types';
3
3
  import { CursorContext } from '../parser/Parser';
4
4
  import * as React from 'react';
5
5
  interface AutocompleteDropdownProps {
@@ -21,6 +21,8 @@ interface AutocompleteDropdownProps {
21
21
  cursorContext?: CursorContext | null;
22
22
  /** Ref callback to expose the dropdown list element for page-size calculations. */
23
23
  listRefCallback?: (el: HTMLDivElement | null) => void;
24
+ /** Controls the type badge in dropdown items. false=hide, true=default, callback=custom. */
25
+ renderType?: boolean | ((type: string, suggestion: SuggestionItem) => React.ReactNode | null | undefined);
24
26
  /** Custom class names for dropdown elements. */
25
27
  classNames?: {
26
28
  dropdown?: string;
@@ -28,5 +30,5 @@ interface AutocompleteDropdownProps {
28
30
  dropdownItem?: string;
29
31
  };
30
32
  }
31
- export declare function AutocompleteDropdown({ suggestions, selectedIndex, onSelect, position, colors, styles, visible, fixedWidth, renderHistoryItem, renderSavedSearchItem, renderDropdownHeader, cursorContext, listRefCallback, classNames, }: AutocompleteDropdownProps): React.ReactPortal | null;
33
+ export declare function AutocompleteDropdown({ suggestions, selectedIndex, onSelect, position, colors, styles, visible, fixedWidth, renderHistoryItem, renderSavedSearchItem, renderDropdownHeader, cursorContext, listRefCallback, renderType, classNames, }: AutocompleteDropdownProps): React.ReactPortal | null;
32
34
  export {};
@@ -1,6 +1,5 @@
1
1
  import { Token } from '../lexer/tokens';
2
2
  import { ColorConfig, FieldType } from '../types';
3
-
4
3
  export interface HighlightOptions {
5
4
  cursorOffset?: number;
6
5
  /** Custom class name appended to every token span. */
@@ -1,5 +1,4 @@
1
1
  import { ColorConfig, StyleConfig } from './types';
2
-
3
2
  /** Default color palette for light backgrounds (GitHub-inspired). */
4
3
  export declare const DEFAULT_COLORS: Required<ColorConfig>;
5
4
  /** Dark mode color palette (GitHub Dark-inspired). */