@smilodon/core 1.4.10 → 1.4.12

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.
@@ -4,7 +4,7 @@
4
4
  * server-side selection, and full customization
5
5
  */
6
6
  import type { GlobalSelectConfig } from '../config/global-config';
7
- import type { GroupedItem, ClassMap } from '../types';
7
+ import type { GroupedItem, ClassMap, SelectCapabilitiesReport, LimitationState, LimitationPolicyMap, TrackingSnapshot } from '../types';
8
8
  import type { OptionRenderer as OptionRendererFn } from '../renderers/contracts';
9
9
  export declare class EnhancedSelect extends HTMLElement {
10
10
  /** live set of all connected instances; used to auto-close siblings */
@@ -45,6 +45,7 @@ export declare class EnhancedSelect extends HTMLElement {
45
45
  private _mirrorGlobalStylesForCustomOptions;
46
46
  private _globalStylesObserver;
47
47
  private _globalStylesContainer;
48
+ private _tracking;
48
49
  get classMap(): ClassMap | undefined;
49
50
  set classMap(map: ClassMap | undefined);
50
51
  /**
@@ -103,6 +104,14 @@ export declare class EnhancedSelect extends HTMLElement {
103
104
  private _setBusy;
104
105
  private _handleError;
105
106
  private _emit;
107
+ private _track;
108
+ private _getKnownLimitationDefinitions;
109
+ private _evaluateLimitationStatus;
110
+ getKnownLimitations(): LimitationState[];
111
+ setLimitationPolicies(policies: LimitationPolicyMap): void;
112
+ getTrackingSnapshot(): TrackingSnapshot;
113
+ clearTracking(source?: 'event' | 'style' | 'limitation' | 'all'): void;
114
+ getCapabilities(): SelectCapabilitiesReport;
106
115
  private _emitChange;
107
116
  get optionRenderer(): OptionRendererFn | undefined;
108
117
  set optionRenderer(renderer: OptionRendererFn | undefined);
@@ -154,6 +163,7 @@ export declare class EnhancedSelect extends HTMLElement {
154
163
  * Update component configuration
155
164
  */
156
165
  updateConfig(config: Partial<GlobalSelectConfig>): void;
166
+ private _mergeConfig;
157
167
  private _handleClearControlClick;
158
168
  private _syncClearControlState;
159
169
  /**
@@ -2,6 +2,7 @@
2
2
  * Global Configuration System for Select Components
3
3
  * Allows users to define default behaviors that can be overridden at component level
4
4
  */
5
+ import type { KnownLimitationId, LimitationPolicy } from '../types';
5
6
  export interface ScrollToSelectedConfig {
6
7
  /** Whether to scroll to selected item when dropdown opens/closes */
7
8
  enabled: boolean;
@@ -156,6 +157,26 @@ export interface CallbackConfig {
156
157
  /** Called on error */
157
158
  onError?: (error: Error) => void;
158
159
  }
160
+ export interface TrackingConfig {
161
+ /** Master switch for runtime tracking */
162
+ enabled: boolean;
163
+ /** Track emitted events */
164
+ events: boolean;
165
+ /** Track styling-related changes */
166
+ styling: boolean;
167
+ /** Track limitations and policy changes */
168
+ limitations: boolean;
169
+ /** Emit `diagnostic` events for tracking entries */
170
+ emitDiagnostics: boolean;
171
+ /** Maximum retained entries per tracking channel */
172
+ maxEntries: number;
173
+ }
174
+ export interface LimitationsConfig {
175
+ /** Policy map for known limitations */
176
+ policies: Partial<Record<KnownLimitationId, LimitationPolicy>>;
177
+ /** Auto-reset selection state when mode changes single <-> multi */
178
+ autoMitigateRuntimeModeSwitch: boolean;
179
+ }
159
180
  export interface GlobalSelectConfig {
160
181
  /** Selection behavior */
161
182
  selection: SelectionConfig;
@@ -177,6 +198,10 @@ export interface GlobalSelectConfig {
177
198
  clearControl: ClearControlConfig;
178
199
  /** Callbacks */
179
200
  callbacks: CallbackConfig;
201
+ /** Runtime tracking controls */
202
+ tracking: TrackingConfig;
203
+ /** Known limitations controls */
204
+ limitations: LimitationsConfig;
180
205
  /** Enable/disable entire component */
181
206
  enabled: boolean;
182
207
  /** Enable search/filter */
@@ -64,6 +64,63 @@ export interface ClearEventDetail {
64
64
  clearedSelection: boolean;
65
65
  clearedSearch: boolean;
66
66
  }
67
+ export type KnownLimitationId = 'variableItemHeight' | 'builtInFetchPaginationApi' | 'virtualizationOverheadSmallLists' | 'runtimeModeSwitching' | 'legacyBrowserSupport' | 'webkitArchLinux';
68
+ export type LimitationControlMode = 'default' | 'suppress' | 'strict';
69
+ export interface LimitationPolicy {
70
+ mode: LimitationControlMode;
71
+ note?: string;
72
+ }
73
+ export type LimitationPolicyMap = Partial<Record<KnownLimitationId, LimitationPolicy>>;
74
+ export interface LimitationState {
75
+ id: KnownLimitationId;
76
+ title: string;
77
+ description: string;
78
+ mode: LimitationControlMode;
79
+ status: 'active' | 'mitigated' | 'suppressed';
80
+ workaround?: string;
81
+ }
82
+ export interface TrackingEntry {
83
+ timestamp: number;
84
+ source: 'event' | 'style' | 'limitation';
85
+ name: string;
86
+ detail?: unknown;
87
+ }
88
+ export interface TrackingSnapshot {
89
+ events: TrackingEntry[];
90
+ styles: TrackingEntry[];
91
+ limitations: TrackingEntry[];
92
+ }
93
+ export interface SelectCapabilitiesReport {
94
+ styling: {
95
+ classMap: boolean;
96
+ optionRenderer: boolean;
97
+ groupHeaderRenderer: boolean;
98
+ cssCustomProperties: boolean;
99
+ shadowParts: boolean;
100
+ globalStyleMirroring: boolean;
101
+ };
102
+ events: {
103
+ emitted: SelectEventName[];
104
+ diagnosticEvent: boolean;
105
+ };
106
+ functionality: {
107
+ multiSelect: boolean;
108
+ searchable: boolean;
109
+ infiniteScroll: boolean;
110
+ loadMore: boolean;
111
+ clearControl: boolean;
112
+ groupedItems: boolean;
113
+ serverSideSelection: boolean;
114
+ runtimeModeSwitchMitigation: boolean;
115
+ };
116
+ limitations: LimitationState[];
117
+ }
118
+ export interface DiagnosticEventDetail {
119
+ timestamp: number;
120
+ source: 'event' | 'style' | 'limitation';
121
+ name: string;
122
+ detail?: unknown;
123
+ }
67
124
  export interface SelectEventsDetailMap {
68
125
  select: SelectEventDetail;
69
126
  open: OpenEventDetail;
@@ -75,6 +132,7 @@ export interface SelectEventsDetailMap {
75
132
  loadMore: LoadMoreEventDetail;
76
133
  remove: RemoveEventDetail;
77
134
  clear: ClearEventDetail;
135
+ diagnostic: DiagnosticEventDetail;
78
136
  }
79
137
  export type SelectEventName = keyof SelectEventsDetailMap;
80
138
  export interface RendererHelpers {
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smilodon/core",
3
- "version": "1.4.10",
3
+ "version": "1.4.12",
4
4
  "description": "High-performance native select component with extreme-scale virtualization - React, Vue, Svelte, Vanilla JS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",