@smilodon/core 1.2.0 → 1.2.2

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.
@@ -7,6 +7,7 @@ export declare class NativeSelectElement extends HTMLElement {
7
7
  private _items;
8
8
  private _helpers;
9
9
  private _virtualizer?;
10
+ private _unifiedRenderer?;
10
11
  private _selectedSet;
11
12
  private _selectedItems;
12
13
  private _activeIndex;
@@ -17,6 +18,7 @@ export declare class NativeSelectElement extends HTMLElement {
17
18
  constructor();
18
19
  connectedCallback(): void;
19
20
  disconnectedCallback(): void;
21
+ private _initializeOptionRenderer;
20
22
  attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
21
23
  set items(items: unknown[]);
22
24
  get items(): unknown[];
@@ -26,6 +28,25 @@ export declare class NativeSelectElement extends HTMLElement {
26
28
  get selectedItems(): unknown[];
27
29
  set optionTemplate(template: OptionTemplate | undefined);
28
30
  set optionRenderer(renderer: OptionRenderer | undefined);
31
+ /**
32
+ * Public API: setItems() method for compatibility with EnhancedSelect
33
+ * Accepts an array of items which can be:
34
+ * - Simple primitives (string, number)
35
+ * - Objects with {label, value} structure
36
+ * - Objects with {label, value, optionComponent} for custom rendering (v1.2.0+)
37
+ */
38
+ setItems(items: unknown[]): void;
39
+ /**
40
+ * Public API: setValue() method to programmatically select an item
41
+ * For single select: clears selection and selects the item matching the value
42
+ * For multi-select: adds to selection if not already selected
43
+ */
44
+ setValue(value: unknown): void;
45
+ /**
46
+ * Public API: getValue() method to get currently selected value(s)
47
+ * Returns single value for single-select, array for multi-select
48
+ */
49
+ getValue(): unknown | unknown[];
29
50
  render(): void;
30
51
  private _applyOptionAttrs;
31
52
  private _applyAriaToAll;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smilodon/core",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "High-performance native select component with extreme-scale virtualization",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",