@smilodon/core 1.2.0 → 1.2.1

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.
@@ -26,6 +26,25 @@ export declare class NativeSelectElement extends HTMLElement {
26
26
  get selectedItems(): unknown[];
27
27
  set optionTemplate(template: OptionTemplate | undefined);
28
28
  set optionRenderer(renderer: OptionRenderer | undefined);
29
+ /**
30
+ * Public API: setItems() method for compatibility with EnhancedSelect
31
+ * Accepts an array of items which can be:
32
+ * - Simple primitives (string, number)
33
+ * - Objects with {label, value} structure
34
+ * - Objects with {label, value, optionComponent} for custom rendering (v1.2.0+)
35
+ */
36
+ setItems(items: unknown[]): void;
37
+ /**
38
+ * Public API: setValue() method to programmatically select an item
39
+ * For single select: clears selection and selects the item matching the value
40
+ * For multi-select: adds to selection if not already selected
41
+ */
42
+ setValue(value: unknown): void;
43
+ /**
44
+ * Public API: getValue() method to get currently selected value(s)
45
+ * Returns single value for single-select, array for multi-select
46
+ */
47
+ getValue(): unknown | unknown[];
29
48
  render(): void;
30
49
  private _applyOptionAttrs;
31
50
  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.1",
4
4
  "description": "High-performance native select component with extreme-scale virtualization",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",