@smilodon/core 1.0.14 → 1.0.16
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.cjs +13 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.js +13 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1003,10 +1003,11 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1003
1003
|
console.log('[EnhancedSelect] Options container created');
|
|
1004
1004
|
this._liveRegion = this._createLiveRegion();
|
|
1005
1005
|
console.log('[EnhancedSelect] Live region created');
|
|
1006
|
-
|
|
1007
|
-
console.log('[EnhancedSelect] DOM assembled');
|
|
1006
|
+
// Initialize styles BEFORE assembling DOM (order matters in shadow DOM)
|
|
1008
1007
|
this._initializeStyles();
|
|
1009
1008
|
console.log('[EnhancedSelect] Styles initialized');
|
|
1009
|
+
this._assembleDOM();
|
|
1010
|
+
console.log('[EnhancedSelect] DOM assembled');
|
|
1010
1011
|
this._attachEventListeners();
|
|
1011
1012
|
console.log('[EnhancedSelect] Event listeners attached');
|
|
1012
1013
|
this._initializeObservers();
|
|
@@ -1494,10 +1495,17 @@ class EnhancedSelect extends HTMLElement {
|
|
|
1494
1495
|
}
|
|
1495
1496
|
`;
|
|
1496
1497
|
console.log('[EnhancedSelect] _initializeStyles: Created style element, content length:', style.textContent?.length || 0);
|
|
1497
|
-
console.log('[EnhancedSelect] _initializeStyles:
|
|
1498
|
-
|
|
1499
|
-
|
|
1498
|
+
console.log('[EnhancedSelect] _initializeStyles: Shadow root children BEFORE:', this._shadow.children.length);
|
|
1499
|
+
// Insert as first child to ensure styles are processed first
|
|
1500
|
+
if (this._shadow.firstChild) {
|
|
1501
|
+
this._shadow.insertBefore(style, this._shadow.firstChild);
|
|
1502
|
+
}
|
|
1503
|
+
else {
|
|
1504
|
+
this._shadow.appendChild(style);
|
|
1505
|
+
}
|
|
1506
|
+
console.log('[EnhancedSelect] _initializeStyles: Style inserted, shadow root children AFTER:', this._shadow.children.length);
|
|
1500
1507
|
console.log('[EnhancedSelect] _initializeStyles: Shadow root has style element:', !!this._shadow.querySelector('style'));
|
|
1508
|
+
console.log('[EnhancedSelect] _initializeStyles: Style sheet rules:', style.sheet?.cssRules?.length || 'NOT PARSED');
|
|
1501
1509
|
}
|
|
1502
1510
|
_attachEventListeners() {
|
|
1503
1511
|
// Arrow click handler
|