@smilodon/core 1.9.2 → 1.9.3

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.
@@ -12,6 +12,8 @@ export declare class EnhancedSelect extends HTMLElement {
12
12
  /** live set of all connected instances; used to auto-close siblings */
13
13
  private static _instances;
14
14
  private static readonly _MIRRORED_STYLES_SCOPE_CLASS;
15
+ private static readonly _MIRRORED_STYLESHEET_CACHE_LIMIT;
16
+ private static readonly _mirroredStylesheetTextCache;
15
17
  private _config;
16
18
  private _shadow;
17
19
  private _container;
@@ -51,6 +53,10 @@ export declare class EnhancedSelect extends HTMLElement {
51
53
  private _globalStylesContainer;
52
54
  private _themeContextObserver;
53
55
  private _globalStylesSyncToken;
56
+ private _connectionController?;
57
+ private _asyncGeneration;
58
+ private _lifecycleTimers;
59
+ private _lifecycleRafs;
54
60
  private _tracking;
55
61
  private _suppressBlurClose;
56
62
  private _renderCycleId;
@@ -58,6 +64,7 @@ export declare class EnhancedSelect extends HTMLElement {
58
64
  private _resolvedDropdownPlacement;
59
65
  private _multiScrollDrag;
60
66
  private _liftedAncestors;
67
+ private _onDocumentPointerDown;
61
68
  get classMap(): ClassMap | undefined;
62
69
  set classMap(map: ClassMap | undefined);
63
70
  /**
@@ -71,12 +78,17 @@ export declare class EnhancedSelect extends HTMLElement {
71
78
  connectedCallback(): void;
72
79
  disconnectedCallback(): void;
73
80
  private _setGlobalStylesMirroring;
81
+ private _setLifecycleTimeout;
82
+ private _requestLifecycleFrame;
83
+ private _clearLifecycleTasks;
74
84
  private _setupGlobalStylesMirroring;
75
85
  private _teardownGlobalStylesMirroring;
76
86
  private _mirrorDocumentStylesIntoShadow;
77
87
  private _setupThemeContextMirroring;
78
88
  private _syncMirroredThemeContext;
79
89
  private _createScopedGlobalStyleNode;
90
+ private static _pruneMirroredStylesheetTextCache;
91
+ private _areClassMapsEqual;
80
92
  private _buildScopedStyleElement;
81
93
  private _scopeMirroredCssText;
82
94
  /**
@@ -1,4 +1,4 @@
1
- import { OptionRenderer, OptionTemplate } from '../renderers/contracts';
1
+ import { OptionRenderer, OptionTemplate } from "../renderers/contracts";
2
2
  export declare class NativeSelectElement extends HTMLElement {
3
3
  static get observedAttributes(): string[];
4
4
  private _options;
@@ -14,6 +14,7 @@ export declare class NativeSelectElement extends HTMLElement {
14
14
  private _multi;
15
15
  private _typeBuffer;
16
16
  private _typeTimeout?;
17
+ private _announceTimeout?;
17
18
  private _liveRegion?;
18
19
  constructor();
19
20
  connectedCallback(): void;
@@ -71,8 +71,7 @@ export declare class CustomOptionPool {
71
71
  * Find an available component in the pool
72
72
  */
73
73
  private _findAvailableComponent;
74
- /**
75
- * Generate a unique key for a factory function
76
- */
77
- private _getFactoryKey;
74
+ private _addToPool;
75
+ private _evictAvailableComponent;
76
+ private _getTotalPooled;
78
77
  }
@@ -12,10 +12,14 @@ export interface FetchResult<T> {
12
12
  }
13
13
  export declare class TTLCache<T> {
14
14
  private defaultTTL;
15
+ private maxEntries;
15
16
  private store;
16
- constructor(defaultTTL?: number);
17
+ constructor(defaultTTL?: number, maxEntries?: number);
17
18
  get(key: string): T[] | null;
18
19
  set(key: string, items: T[], ttl?: number): void;
20
+ clear(): void;
21
+ private pruneExpired;
22
+ private pruneToMaxEntries;
19
23
  }
20
24
  export declare class LocalSource<T = unknown> {
21
25
  private items;
@@ -32,6 +36,7 @@ export declare class RemoteSource<T = unknown> {
32
36
  private key;
33
37
  fetchPage(query: string, page: number): Promise<FetchResult<T>>;
34
38
  refresh(query: string, page: number): Promise<void>;
35
- getPage(page: number): T[] | null;
39
+ getPage(page: number, query?: string): T[] | null;
40
+ destroy(): void;
36
41
  }
37
42
  export declare function debounce<T extends (...args: any[]) => void>(fn: T, ms: number): (...args: Parameters<T>) => void;
@@ -43,6 +43,7 @@ export declare class DOMPool {
43
43
  * Complexity: O(n)
44
44
  */
45
45
  private evictLRU;
46
+ private removePoolNode;
46
47
  /**
47
48
  * Default reset: clear content, remove inline styles, remove attributes
48
49
  */
@@ -31,8 +31,8 @@ export declare class PerformanceTelemetry {
31
31
  private rafId;
32
32
  private measuring;
33
33
  private observer;
34
- private workTimes;
35
- constructor();
34
+ private workTotal;
35
+ private workCount;
36
36
  /**
37
37
  * Setup PerformanceObserver for long tasks
38
38
  */
@@ -16,6 +16,8 @@ export declare class Virtualizer {
16
16
  private itemGetter;
17
17
  private fenwick?;
18
18
  private activeNodes;
19
+ private destroyed;
20
+ private recycleRafId;
19
21
  constructor(container: HTMLElement, itemsLength: number, itemGetter: ItemGetter, options: VirtualizerOptions);
20
22
  computeWindow(scrollTop: number, viewportHeight: number): {
21
23
  startIndex: number;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smilodon/core",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
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",
@@ -58,10 +58,10 @@
58
58
  "@rollup/plugin-node-resolve": "^15.2.3",
59
59
  "@rollup/plugin-terser": "^0.4.4",
60
60
  "@rollup/plugin-typescript": "^11.1.6",
61
+ "jsdom": "^24.0.0",
61
62
  "rollup": "^4.9.0",
62
63
  "typescript": "^5.6.2",
63
- "vitest": "^1.6.0",
64
- "jsdom": "^24.0.0"
64
+ "vitest": "^1.6.0"
65
65
  },
66
66
  "sideEffects": [
67
67
  "./src/components/enhanced-select.ts",