snice 2.1.4 → 2.1.5
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 +16 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.cjs.min.map +1 -1
- package/dist/index.esm.js +16 -20
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +3 -3
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +16 -20
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +3 -3
- package/dist/index.iife.min.js.map +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/transitions.esm.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* snice v2.1.
|
|
2
|
+
* snice v2.1.4
|
|
3
3
|
* Imperative TypeScript framework for building vanilla web components with decorators, routing, and controllers. No virtual DOM, no build complexity.
|
|
4
4
|
* (c) 2024
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -1454,14 +1454,6 @@ function applyElementFunctionality(constructor) {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
1456
|
}
|
|
1457
|
-
// NOW call the original user-defined connectedCallback after shadow DOM is set up
|
|
1458
|
-
if (originalConnectedCallback) {
|
|
1459
|
-
originalConnectedCallback.call(this);
|
|
1460
|
-
}
|
|
1461
|
-
const controllerName = this.getAttribute('controller');
|
|
1462
|
-
if (controllerName) {
|
|
1463
|
-
this.controller = controllerName;
|
|
1464
|
-
}
|
|
1465
1457
|
// Setup @on event handlers - use element for host events, shadow root for delegated events
|
|
1466
1458
|
setupEventHandlers(this, this);
|
|
1467
1459
|
// Setup @respond handlers for elements
|
|
@@ -1473,17 +1465,9 @@ function applyElementFunctionality(constructor) {
|
|
|
1473
1465
|
catch (error) {
|
|
1474
1466
|
console.error(`Error setting up observers for ${this.tagName}:`, error);
|
|
1475
1467
|
}
|
|
1476
|
-
//
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
for (const handler of readyHandlers) {
|
|
1480
|
-
try {
|
|
1481
|
-
await handler.method.call(this);
|
|
1482
|
-
}
|
|
1483
|
-
catch (error) {
|
|
1484
|
-
console.error(`Error in @ready handler ${handler.methodName}:`, error);
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1468
|
+
// NOW call the original user-defined connectedCallback after shadow DOM is set up
|
|
1469
|
+
if (originalConnectedCallback) {
|
|
1470
|
+
originalConnectedCallback.call(this);
|
|
1487
1471
|
}
|
|
1488
1472
|
}
|
|
1489
1473
|
finally {
|
|
@@ -1493,6 +1477,18 @@ function applyElementFunctionality(constructor) {
|
|
|
1493
1477
|
this[READY_RESOLVE] = null; // Clear the resolver
|
|
1494
1478
|
}
|
|
1495
1479
|
}
|
|
1480
|
+
// Call @ready handlers after everything is set up and ready promise is resolved
|
|
1481
|
+
const readyHandlers = constructor[READY_HANDLERS];
|
|
1482
|
+
if (readyHandlers) {
|
|
1483
|
+
for (const handler of readyHandlers) {
|
|
1484
|
+
try {
|
|
1485
|
+
await handler.method.call(this);
|
|
1486
|
+
}
|
|
1487
|
+
catch (error) {
|
|
1488
|
+
console.error(`Error in @ready handler ${handler.methodName}:`, error);
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1496
1492
|
};
|
|
1497
1493
|
constructor.prototype.disconnectedCallback = async function () {
|
|
1498
1494
|
// Call @dispose handlers
|