@nexushub/client 0.3.2 → 0.3.3

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 CHANGED
@@ -1364,10 +1364,13 @@ var VitalsCollector = class {
1364
1364
  if (resourceEntries.length > 0) {
1365
1365
  this.metrics.resources = resourceEntries.filter((r) => !r.name.includes("/api/collect")).sort((a, b) => b.duration - a.duration).slice(0, 20).map((r) => ({
1366
1366
  name: r.name,
1367
- initiator_type: r.initiatorType,
1367
+ initiatorType: r.initiatorType,
1368
1368
  duration: Math.round(r.duration),
1369
- transfer_size: r.transferSize > 0 ? r.transferSize : void 0,
1370
- encoded_body_size: r.encodedBodySize > 0 ? r.encodedBodySize : void 0
1369
+ transferSize: r.transferSize > 0 ? r.transferSize : void 0,
1370
+ encodedBodySize: r.encodedBodySize > 0 ? r.encodedBodySize : void 0,
1371
+ decodedBodySize: r.decodedBodySize > 0 ? r.decodedBodySize : void 0,
1372
+ startTime: Math.round(r.startTime),
1373
+ responseEnd: Math.round(r.responseEnd)
1371
1374
  }));
1372
1375
  this.hasUpdates = true;
1373
1376
  }
@@ -1809,7 +1812,7 @@ var AnalyticsEngine = class {
1809
1812
  for (const threshold of THRESHOLDS) {
1810
1813
  if (this.maxScrollDepth >= threshold && !this.scrollThresholdsFired.has(threshold)) {
1811
1814
  this.scrollThresholdsFired.add(threshold);
1812
- this.tracker.send("scroll_depth", {
1815
+ this.tracker.send("scroll", {
1813
1816
  depth: threshold / 100,
1814
1817
  depth_percent: threshold,
1815
1818
  path: window.location.pathname
package/dist/index.js CHANGED
@@ -1364,10 +1364,13 @@ var VitalsCollector = class {
1364
1364
  if (resourceEntries.length > 0) {
1365
1365
  this.metrics.resources = resourceEntries.filter((r) => !r.name.includes("/api/collect")).sort((a, b) => b.duration - a.duration).slice(0, 20).map((r) => ({
1366
1366
  name: r.name,
1367
- initiator_type: r.initiatorType,
1367
+ initiatorType: r.initiatorType,
1368
1368
  duration: Math.round(r.duration),
1369
- transfer_size: r.transferSize > 0 ? r.transferSize : void 0,
1370
- encoded_body_size: r.encodedBodySize > 0 ? r.encodedBodySize : void 0
1369
+ transferSize: r.transferSize > 0 ? r.transferSize : void 0,
1370
+ encodedBodySize: r.encodedBodySize > 0 ? r.encodedBodySize : void 0,
1371
+ decodedBodySize: r.decodedBodySize > 0 ? r.decodedBodySize : void 0,
1372
+ startTime: Math.round(r.startTime),
1373
+ responseEnd: Math.round(r.responseEnd)
1371
1374
  }));
1372
1375
  this.hasUpdates = true;
1373
1376
  }
@@ -1809,7 +1812,7 @@ var AnalyticsEngine = class {
1809
1812
  for (const threshold of THRESHOLDS) {
1810
1813
  if (this.maxScrollDepth >= threshold && !this.scrollThresholdsFired.has(threshold)) {
1811
1814
  this.scrollThresholdsFired.add(threshold);
1812
- this.tracker.send("scroll_depth", {
1815
+ this.tracker.send("scroll", {
1813
1816
  depth: threshold / 100,
1814
1817
  depth_percent: threshold,
1815
1818
  path: window.location.pathname
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nexushub/client",
3
3
  "private": false,
4
- "version": "0.3.2",
4
+ "version": "0.3.3",
5
5
  "description": "The God-Tier NexusHub SDK",
6
6
  "type": "module",
7
7
  "main": "./dist/index.cjs",