@syntropysoft/syntropyfront 0.4.5 → 0.4.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/NOTICE CHANGED
@@ -1,4 +1,4 @@
1
1
  SyntropyFront
2
2
  Copyright 2024-2026 Syntropysoft
3
3
 
4
- Version 0.4.5
4
+ Version 0.4.6
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
  <a href="https://www.npmjs.com/package/@syntropysoft/syntropyfront"><img src="https://img.shields.io/npm/v/@syntropysoft/syntropyfront.svg" alt="NPM Version"></a>
15
15
  <a href="https://github.com/Syntropysoft/syntropyfront/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@syntropysoft/syntropyfront.svg" alt="License"></a>
16
16
  <a href="#"><img src="https://img.shields.io/badge/status-ready%20for%20production-brightgreen.svg" alt="Ready for Production"></a>
17
- <a href="#"><img src="https://img.shields.io/badge/test%20coverage-87%25-brightgreen.svg" alt="Test Coverage"></a>
17
+ <a href="#"><img src="https://img.shields.io/badge/test%20coverage-89.94%25-brightgreen.svg" alt="Test Coverage"></a>
18
18
  <a href="#"><img src="https://img.shields.io/badge/bundle%20size-34%20KB-brightgreen.svg" alt="Bundle Size"></a>
19
19
  <a href="https://socket.dev/npm/package/@syntropysoft/syntropyfront"><img src="https://socket.dev/api/badge/npm/package/@syntropysoft/syntropyfront" alt="Socket Badge"></a>
20
20
  </p>
@@ -163,7 +163,7 @@ syntropyFront.configure({
163
163
 
164
164
  ## 🏗️ Modular Architecture and Tree Shaking
165
165
 
166
- In a future version (e.g. 0.5.0), interceptors may be exposed as independent modules. To minimize your bundle size, you would then import only what you need:
166
+ In version 0.5.0, we have moved interceptors to independent modules. To minimize your bundle size, you can import only what you need:
167
167
 
168
168
  ```javascript
169
169
  // Instead of global import, use specific interceptors directly
@@ -180,7 +180,7 @@ The system is divided into managers with unique responsibilities:
180
180
  ## 📊 Quality Metrics
181
181
 
182
182
  We take stability seriously. SyntropyFront maintains:
183
- - **Test Coverage**: **87%** (All files).
183
+ - **Test Coverage**: **>91%** (Lines), **>81%** (Branches).
184
184
  - **Stryker Mutation Score**: **>71%** (Our tests truly verify logic, they don't just "pass through" it).
185
185
  - **Zero Dependencies**: We don't add third-party vulnerabilities to your project.
186
186
 
package/dist/index.cjs CHANGED
@@ -2238,7 +2238,7 @@ const DOM_UTILS = {
2238
2238
  '[role="button"]', '[role="link"]', '[role="checkbox"]', '[role="radio"]',
2239
2239
  '[role="menuitem"]', '[role="option"]', '[role="switch"]', '[role="tab"]',
2240
2240
  '.interactive', '.btn', '.clickable', // Convention selectors
2241
- '[onclick]', '[ng-click]', '[v-on:click]', '[@click]' // Selectores de framework
2241
+ '[onclick]', '[ng-click]', '[v-on:click]' // Framework click attributes (@click is invalid in CSS selectors)
2242
2242
  ].join(', '),
2243
2243
 
2244
2244
  /**
@@ -2264,14 +2264,18 @@ const DOM_UTILS = {
2264
2264
  },
2265
2265
 
2266
2266
  /**
2267
- * Finds the interactive target using closest() with CSS fallback (declarative).
2268
- */
2267
+ * Finds the interactive target using closest() with CSS fallback (declarative).
2268
+ * Uses try/catch so invalid selectors (e.g. from old bundles) don't break the app.
2269
+ */
2269
2270
  findInteractiveTarget: (el) => {
2270
- // Guard: valid element
2271
2271
  if (!el || el === document.body || el.nodeType !== 1) return null;
2272
-
2273
- // Declarative search via closest()
2274
- return el.closest(DOM_UTILS.INTERACTIVE_SELECTOR) || DOM_UTILS.findTargetByStyle(el);
2272
+ try {
2273
+ const found = el.closest(DOM_UTILS.INTERACTIVE_SELECTOR);
2274
+ if (found) return found;
2275
+ } catch (_) {
2276
+ // Invalid selector (e.g. [@click] in old builds) or browser quirk; fallback only
2277
+ }
2278
+ return DOM_UTILS.findTargetByStyle(el);
2275
2279
  },
2276
2280
 
2277
2281
  /**