@bereasoftware/nexa 1.6.0 → 1.7.0

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/nexa.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Nexa v1.6.0 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/Nexa */
1
+ /*! Nexa v1.7.0 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/Nexa */
2
2
  //#region src/types/index.ts
3
3
  var e = (e) => ({
4
4
  ok: !0,
@@ -2256,7 +2256,7 @@ var we = class {
2256
2256
  </div>
2257
2257
  `, document.body.appendChild(this.panel), this.config.theme === "light" ? this.panel.classList.add("nexa-theme-light") : this.panel.classList.remove("nexa-theme-light"), this.bindEvents(), this.removeTrackerListener = this.tracker.onChange(() => this.render());
2258
2258
  let o = !this.config.devOnly || X();
2259
- this.config.enabled && o && this.createFloatingIcon(), this.hide(), this.globalKeyboardHandler = (e) => {
2259
+ this.config.enabled && o && this.createFloatingIcon(), this.updateHeaderActionsVisibility(), this.hide(), this.globalKeyboardHandler = (e) => {
2260
2260
  if (e.key === "Escape" && this.visible) {
2261
2261
  this.hide();
2262
2262
  return;
@@ -2303,7 +2303,11 @@ var we = class {
2303
2303
  }
2304
2304
  renderMetricsBar() {
2305
2305
  let e = this.tracker.getMetrics(), t = this.panel;
2306
- t && (t.querySelector("[data-metric=\"total\"]").textContent = String(e.totalRequests), t.querySelector("[data-metric=\"avg\"]").textContent = `${e.avgDuration.toFixed(0)}ms`, t.querySelector("[data-metric=\"rate\"]").textContent = `${e.requestsPerSecond.toFixed(1)}`, t.querySelector("[data-metric=\"success\"]").textContent = String(e.successfulRequests), t.querySelector("[data-metric=\"fail\"]").textContent = String(e.failedRequests), t.querySelector("[data-count=\"requests\"]").textContent = String(e.totalRequests));
2306
+ t && (t.querySelector("[data-metric=\"total\"]").textContent = String(e.totalRequests), t.querySelector("[data-metric=\"avg\"]").textContent = `${e.avgDuration.toFixed(0)}ms`, t.querySelector("[data-metric=\"rate\"]").textContent = `${e.requestsPerSecond.toFixed(1)}`, t.querySelector("[data-metric=\"success\"]").textContent = String(e.successfulRequests), t.querySelector("[data-metric=\"fail\"]").textContent = String(e.failedRequests), t.querySelector("[data-count=\"requests\"]").textContent = String(e.totalRequests), this.updateHeaderActionsVisibility());
2307
+ }
2308
+ updateHeaderActionsVisibility() {
2309
+ let e = this.tracker.getHistory().length > 0, t = this.panel?.querySelector(".nexa-btn-export"), n = this.panel?.querySelector(".nexa-btn-clear");
2310
+ t && (t.style.display = e ? "flex" : "none"), n && (n.style.display = e ? "flex" : "none");
2307
2311
  }
2308
2312
  renderRequestList() {
2309
2313
  let e = this.panel?.querySelector(".nexa-request-list");