@uxbertlabs/reportly 1.0.3 → 1.0.4
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/core/config.d.ts.map +1 -1
- package/dist/core/init.d.ts.map +1 -1
- package/dist/features/device-info.d.ts.map +1 -1
- package/dist/reportly.cjs.js +29 -0
- package/dist/reportly.cjs.js.map +1 -1
- package/dist/reportly.esm.js +29 -0
- package/dist/reportly.esm.js.map +1 -1
- package/dist/reportly.js +29 -0
- package/dist/reportly.js.map +1 -1
- package/dist/reportly.min.js +2 -2
- package/dist/reportly.min.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAa/C,cAAM,MAAM;IACV,OAAO,CAAC,MAAM,CAAiB;gBAEnB,UAAU,GAAE,OAAO,CAAC,cAAc,CAAM;IAKpD,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,eAAe;
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAa/C,cAAM,MAAM;IACV,OAAO,CAAC,MAAM,CAAiB;gBAEnB,UAAU,GAAE,OAAO,CAAC,cAAc,CAAM;IAKpD,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,eAAe;IAiBvB,IAAI,IAAI,IAAI;IAaZ,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IAUrB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;CASnC;AAED,eAAe,MAAM,CAAC"}
|
package/dist/core/init.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"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R,gBAAgB;YA2BhB,gBAAgB;IAwB9B,OAAO,CAAC,iBAAiB;IA4BzB,OAAO,CAAC,gBAAgB;IAQxB,IAAI,IAAI,IAAI;IAIZ,KAAK,IAAI,IAAI;IAKb,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI;IAMtD,cAAc,IAAI,UAAU,EAAE;IAI9B,gBAAgB,IAAI,IAAI;IAIxB,eAAe,IAAI,IAAI;IAIvB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI;IAIhD,OAAO,IAAI,IAAI;CAOhB;AAGD,QAAA,MAAM,QAAQ,UAAiB,CAAC;AAGhC,eAAe,QAAQ,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"device-info.d.ts","sourceRoot":"","sources":["../../src/features/device-info.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,cAAM,UAAU;IACd,OAAO,CAAC,IAAI,CAAiB;;IAM7B,OAAO,CAAC,OAAO;
|
1
|
+
{"version":3,"file":"device-info.d.ts","sourceRoot":"","sources":["../../src/features/device-info.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,cAAM,UAAU;IACd,OAAO,CAAC,IAAI,CAAiB;;IAM7B,OAAO,CAAC,OAAO;IAiCf,OAAO,CAAC,cAAc;IAsBtB,OAAO,CAAC,SAAS;IAmBjB,OAAO,IAAI,cAAc;IAKzB,GAAG,IAAI,cAAc;CAGtB;AAED,eAAe,UAAU,CAAC"}
|
package/dist/reportly.cjs.js
CHANGED
@@ -22,6 +22,10 @@ class Config {
|
|
22
22
|
};
|
23
23
|
}
|
24
24
|
loadFromStorage() {
|
25
|
+
// Check if we're in a browser environment
|
26
|
+
if (typeof window === 'undefined' || typeof localStorage === 'undefined') {
|
27
|
+
return;
|
28
|
+
}
|
25
29
|
try {
|
26
30
|
const saved = localStorage.getItem('uxbert-config');
|
27
31
|
if (saved) {
|
@@ -34,6 +38,10 @@ class Config {
|
|
34
38
|
}
|
35
39
|
}
|
36
40
|
save() {
|
41
|
+
// Check if we're in a browser environment
|
42
|
+
if (typeof window === 'undefined' || typeof localStorage === 'undefined') {
|
43
|
+
return;
|
44
|
+
}
|
37
45
|
try {
|
38
46
|
localStorage.setItem('uxbert-config', JSON.stringify(this.config));
|
39
47
|
}
|
@@ -8825,6 +8833,22 @@ class DeviceInfo {
|
|
8825
8833
|
this.info = this.collect();
|
8826
8834
|
}
|
8827
8835
|
collect() {
|
8836
|
+
// Check if we're in a browser environment
|
8837
|
+
if (typeof window === 'undefined' || typeof navigator === 'undefined') {
|
8838
|
+
return {
|
8839
|
+
browser: 'SSR',
|
8840
|
+
os: 'SSR',
|
8841
|
+
screenResolution: '0x0',
|
8842
|
+
viewport: '0x0',
|
8843
|
+
url: '',
|
8844
|
+
timestamp: new Date().toISOString(),
|
8845
|
+
userAgent: 'SSR',
|
8846
|
+
language: 'en-US',
|
8847
|
+
platform: 'SSR',
|
8848
|
+
cookiesEnabled: false,
|
8849
|
+
onLine: false
|
8850
|
+
};
|
8851
|
+
}
|
8828
8852
|
return {
|
8829
8853
|
browser: this.getBrowserInfo(),
|
8830
8854
|
os: this.getOSInfo(),
|
@@ -9008,6 +9032,11 @@ class Reportly {
|
|
9008
9032
|
this.isInitialized = false;
|
9009
9033
|
}
|
9010
9034
|
init(userConfig = {}) {
|
9035
|
+
// Check if we're in a browser environment
|
9036
|
+
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
9037
|
+
console.warn("Uxbert Reportly can only be initialized in a browser environment");
|
9038
|
+
return;
|
9039
|
+
}
|
9011
9040
|
if (this.isInitialized) {
|
9012
9041
|
console.warn("Uxbert Reportly is already initialized");
|
9013
9042
|
return;
|