@smilodon/core 1.0.4 → 1.0.6

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.
package/dist/index.umd.js CHANGED
@@ -1485,7 +1485,6 @@
1485
1485
  this._input.addEventListener('input', (e) => {
1486
1486
  if (!this._config.searchable)
1487
1487
  return;
1488
- console.log('[EnhancedSelect] Input event fired', e.target.value);
1489
1488
  const query = e.target.value;
1490
1489
  this._handleSearch(query);
1491
1490
  });
@@ -1511,7 +1510,6 @@
1511
1510
  this._intersectionObserver = new IntersectionObserver((entries) => {
1512
1511
  entries.forEach((entry) => {
1513
1512
  if (entry.isIntersecting) {
1514
- console.log('[InfiniteScroll] Sentinel intersected. isBusy:', this._state.isBusy);
1515
1513
  if (!this._state.isBusy) {
1516
1514
  this._loadMoreItems();
1517
1515
  }
@@ -1603,7 +1601,6 @@
1603
1601
  }
1604
1602
  }
1605
1603
  _handleSearch(query) {
1606
- console.log('[EnhancedSelect] _handleSearch called with:', JSON.stringify(query));
1607
1604
  this._state.searchQuery = query;
1608
1605
  // Clear previous search timeout
1609
1606
  if (this._searchTimeout) {
@@ -1614,12 +1611,10 @@
1614
1611
  this._state.isSearching = false;
1615
1612
  // Ensure dropdown is open when searching
1616
1613
  if (!this._state.isOpen) {
1617
- console.log('[EnhancedSelect] Opening dropdown for search');
1618
1614
  this._handleOpen();
1619
1615
  }
1620
1616
  else {
1621
1617
  // Filter and render options immediately
1622
- console.log('[EnhancedSelect] Dropdown already open, re-rendering options');
1623
1618
  this._renderOptions();
1624
1619
  }
1625
1620
  // Get filtered items based on search query - searches ENTIRE phrase
@@ -1639,7 +1634,6 @@
1639
1634
  })
1640
1635
  : this._state.loadedItems;
1641
1636
  const count = filteredItems.length;
1642
- console.log(`[EnhancedSelect] Search results: ${count} items found for query "${searchQuery}"`);
1643
1637
  // Announce search results for accessibility
1644
1638
  if (searchQuery) {
1645
1639
  this._announce(`${count} result${count !== 1 ? 's' : ''} found for "${query}"`);
@@ -1945,7 +1939,6 @@
1945
1939
  async _loadMoreItems() {
1946
1940
  if (this._state.isBusy)
1947
1941
  return;
1948
- console.log('[InfiniteScroll] _loadMoreItems triggered');
1949
1942
  this._setBusy(true);
1950
1943
  // Save scroll position before loading
1951
1944
  if (this._dropdown) {
@@ -1959,7 +1952,6 @@
1959
1952
  try {
1960
1953
  // Emit event for parent to handle
1961
1954
  this._state.currentPage++;
1962
- console.log(`[InfiniteScroll] Emitting loadMore event for page ${this._state.currentPage}`);
1963
1955
  this._emit('loadMore', { page: this._state.currentPage, items: [] });
1964
1956
  this._config.callbacks.onLoadMore?.(this._state.currentPage);
1965
1957
  // NOTE: We do NOT set isBusy = false here.
@@ -2014,14 +2006,6 @@
2014
2006
  // we need to maintain scroll position during the update
2015
2007
  if (this._state.preserveScrollPosition && this._dropdown) {
2016
2008
  const targetScrollTop = this._state.lastScrollPosition;
2017
- console.log('[InfiniteScroll] setItems: before render', {
2018
- previousLength,
2019
- newLength,
2020
- lastScrollPosition: this._state.lastScrollPosition,
2021
- scrollTop: this._dropdown.scrollTop,
2022
- scrollHeight: this._dropdown.scrollHeight,
2023
- clientHeight: this._dropdown.clientHeight
2024
- });
2025
2009
  // Only clear loading if we actually got more items
2026
2010
  if (newLength > previousLength) {
2027
2011
  this._state.isBusy = false;
@@ -2035,13 +2019,6 @@
2035
2019
  requestAnimationFrame(() => {
2036
2020
  if (this._dropdown) {
2037
2021
  this._dropdown.scrollTop = targetScrollTop;
2038
- console.log('[InfiniteScroll] setItems: after render', {
2039
- newLength,
2040
- lastScrollPosition: this._state.lastScrollPosition,
2041
- scrollTop: this._dropdown.scrollTop,
2042
- scrollHeight: this._dropdown.scrollHeight,
2043
- clientHeight: this._dropdown.clientHeight
2044
- });
2045
2022
  }
2046
2023
  });
2047
2024
  // Only clear preserveScrollPosition if we got new items
@@ -2217,7 +2194,6 @@
2217
2194
  * Render options based on current state
2218
2195
  */
2219
2196
  _renderOptions() {
2220
- console.log('[EnhancedSelect] _renderOptions called');
2221
2197
  // Cleanup observer
2222
2198
  if (this._loadMoreTrigger && this._intersectionObserver) {
2223
2199
  this._intersectionObserver.unobserve(this._loadMoreTrigger);
@@ -2373,7 +2349,6 @@
2373
2349
  this._optionsContainer.appendChild(container);
2374
2350
  // Setup intersection observer for auto-load
2375
2351
  if (this._intersectionObserver && this._loadMoreTrigger) {
2376
- console.log('[InfiniteScroll] Observing sentinel');
2377
2352
  this._intersectionObserver.observe(this._loadMoreTrigger);
2378
2353
  }
2379
2354
  }