@shware/analytics 2.3.10 → 2.3.11

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.
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/hooks/use-previous.ts
21
+ var use_previous_exports = {};
22
+ __export(use_previous_exports, {
23
+ usePrevious: () => usePrevious
24
+ });
25
+ module.exports = __toCommonJS(use_previous_exports);
26
+ var import_react = require("react");
27
+ function usePrevious(value) {
28
+ const ref = (0, import_react.useRef)(void 0);
29
+ (0, import_react.useEffect)(() => {
30
+ ref.current = value;
31
+ });
32
+ return ref.current;
33
+ }
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ usePrevious
37
+ });
38
+ //# sourceMappingURL=use-previous.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/use-previous.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = useRef<T | undefined>(undefined);\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkC;AAE3B,SAAS,YAAe,OAAyB;AACtD,QAAM,UAAM,qBAAsB,MAAS;AAC3C,8BAAU,MAAM;AACd,QAAI,UAAU;AAAA,EAChB,CAAC;AACD,SAAO,IAAI;AACb;","names":[]}
@@ -0,0 +1,3 @@
1
+ declare function usePrevious<T>(value: T): T | undefined;
2
+
3
+ export { usePrevious };
@@ -0,0 +1,3 @@
1
+ declare function usePrevious<T>(value: T): T | undefined;
2
+
3
+ export { usePrevious };
@@ -0,0 +1,13 @@
1
+ // src/hooks/use-previous.ts
2
+ import { useEffect, useRef } from "react";
3
+ function usePrevious(value) {
4
+ const ref = useRef(void 0);
5
+ useEffect(() => {
6
+ ref.current = value;
7
+ });
8
+ return ref.current;
9
+ }
10
+ export {
11
+ usePrevious
12
+ };
13
+ //# sourceMappingURL=use-previous.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/use-previous.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = useRef<T | undefined>(undefined);\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n"],"mappings":";AAAA,SAAS,WAAW,cAAc;AAE3B,SAAS,YAAe,OAAyB;AACtD,QAAM,MAAM,OAAsB,MAAS;AAC3C,YAAU,MAAM;AACd,QAAI,UAAU;AAAA,EAChB,CAAC;AACD,SAAO,IAAI;AACb;","names":[]}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/native/analytics.ts
21
+ var analytics_exports = {};
22
+ __export(analytics_exports, {
23
+ useScreenViewAnalytics: () => useScreenViewAnalytics
24
+ });
25
+ module.exports = __toCommonJS(analytics_exports);
26
+ var import_expo_router = require("expo-router");
27
+ var import_react = require("react");
28
+ var import_react_native = require("react-native");
29
+ var import_use_previous = require("../hooks/use-previous.cjs");
30
+ var import_track = require("../track/index.cjs");
31
+ function useScreenViewAnalytics() {
32
+ const pathname = (0, import_expo_router.usePathname)();
33
+ const prevPathname = (0, import_use_previous.usePrevious)(pathname);
34
+ const session = (0, import_react.useRef)({ start: performance.now(), total: 0, isActive: true });
35
+ (0, import_react.useEffect)(() => {
36
+ const subscription = import_react_native.AppState.addEventListener("change", (state) => {
37
+ if (state === "active" && !session.current.isActive) {
38
+ session.current.start = performance.now();
39
+ session.current.isActive = true;
40
+ } else if (state !== "active" && session.current.isActive) {
41
+ session.current.total += (performance.now() - session.current.start) / 1e3;
42
+ session.current.isActive = false;
43
+ }
44
+ });
45
+ return () => subscription.remove();
46
+ }, []);
47
+ (0, import_react.useEffect)(() => {
48
+ if (!prevPathname) {
49
+ session.current = { start: performance.now(), total: 0, isActive: true };
50
+ }
51
+ let duration = session.current.total;
52
+ if (session.current.isActive) {
53
+ duration += (performance.now() - session.current.start) / 1e3;
54
+ }
55
+ (0, import_track.track)("screen_view", {
56
+ screen_name: pathname,
57
+ screen_class: pathname,
58
+ previous_screen: prevPathname ?? void 0,
59
+ previous_screen_duration: prevPathname ? Number(duration.toFixed(2)) : void 0
60
+ });
61
+ session.current = { start: performance.now(), total: 0, isActive: true };
62
+ }, [pathname]);
63
+ }
64
+ // Annotate the CommonJS export names for ESM import in node:
65
+ 0 && (module.exports = {
66
+ useScreenViewAnalytics
67
+ });
68
+ //# sourceMappingURL=analytics.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/native/analytics.ts"],"sourcesContent":["import { usePathname } from 'expo-router';\nimport { useEffect, useRef } from 'react';\nimport { AppState } from 'react-native';\nimport { usePrevious } from '../hooks/use-previous';\nimport { track } from '../track/index';\n\nexport function useScreenViewAnalytics() {\n const pathname = usePathname();\n const prevPathname = usePrevious(pathname);\n const session = useRef({ start: performance.now(), total: 0, isActive: true });\n\n useEffect(() => {\n const subscription = AppState.addEventListener('change', (state) => {\n // when returning to the foreground from the background\n if (state === 'active' && !session.current.isActive) {\n session.current.start = performance.now();\n session.current.isActive = true;\n }\n // when entering the background\n else if (state !== 'active' && session.current.isActive) {\n session.current.total += (performance.now() - session.current.start) / 1000;\n session.current.isActive = false;\n }\n });\n\n return () => subscription.remove();\n }, []);\n\n // when the screen is switched, the duration of the previous screen is recorded\n useEffect(() => {\n if (!prevPathname) {\n session.current = { start: performance.now(), total: 0, isActive: true };\n }\n\n let duration = session.current.total;\n if (session.current.isActive) {\n duration += (performance.now() - session.current.start) / 1000;\n }\n\n track('screen_view', {\n screen_name: pathname,\n screen_class: pathname,\n previous_screen: prevPathname ?? undefined,\n previous_screen_duration: prevPathname ? Number(duration.toFixed(2)) : undefined,\n });\n\n // reset session\n session.current = { start: performance.now(), total: 0, isActive: true };\n }, [pathname]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAC5B,mBAAkC;AAClC,0BAAyB;AACzB,0BAA4B;AAC5B,mBAAsB;AAEf,SAAS,yBAAyB;AACvC,QAAM,eAAW,gCAAY;AAC7B,QAAM,mBAAe,iCAAY,QAAQ;AACzC,QAAM,cAAU,qBAAO,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK,CAAC;AAE7E,8BAAU,MAAM;AACd,UAAM,eAAe,6BAAS,iBAAiB,UAAU,CAAC,UAAU;AAElE,UAAI,UAAU,YAAY,CAAC,QAAQ,QAAQ,UAAU;AACnD,gBAAQ,QAAQ,QAAQ,YAAY,IAAI;AACxC,gBAAQ,QAAQ,WAAW;AAAA,MAC7B,WAES,UAAU,YAAY,QAAQ,QAAQ,UAAU;AACvD,gBAAQ,QAAQ,UAAU,YAAY,IAAI,IAAI,QAAQ,QAAQ,SAAS;AACvE,gBAAQ,QAAQ,WAAW;AAAA,MAC7B;AAAA,IACF,CAAC;AAED,WAAO,MAAM,aAAa,OAAO;AAAA,EACnC,GAAG,CAAC,CAAC;AAGL,8BAAU,MAAM;AACd,QAAI,CAAC,cAAc;AACjB,cAAQ,UAAU,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK;AAAA,IACzE;AAEA,QAAI,WAAW,QAAQ,QAAQ;AAC/B,QAAI,QAAQ,QAAQ,UAAU;AAC5B,mBAAa,YAAY,IAAI,IAAI,QAAQ,QAAQ,SAAS;AAAA,IAC5D;AAEA,4BAAM,eAAe;AAAA,MACnB,aAAa;AAAA,MACb,cAAc;AAAA,MACd,iBAAiB,gBAAgB;AAAA,MACjC,0BAA0B,eAAe,OAAO,SAAS,QAAQ,CAAC,CAAC,IAAI;AAAA,IACzE,CAAC;AAGD,YAAQ,UAAU,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK;AAAA,EACzE,GAAG,CAAC,QAAQ,CAAC;AACf;","names":[]}
@@ -0,0 +1,3 @@
1
+ declare function useScreenViewAnalytics(): void;
2
+
3
+ export { useScreenViewAnalytics };
@@ -0,0 +1,3 @@
1
+ declare function useScreenViewAnalytics(): void;
2
+
3
+ export { useScreenViewAnalytics };
@@ -0,0 +1,43 @@
1
+ // src/native/analytics.ts
2
+ import { usePathname } from "expo-router";
3
+ import { useEffect, useRef } from "react";
4
+ import { AppState } from "react-native";
5
+ import { usePrevious } from "../hooks/use-previous.mjs";
6
+ import { track } from "../track/index.mjs";
7
+ function useScreenViewAnalytics() {
8
+ const pathname = usePathname();
9
+ const prevPathname = usePrevious(pathname);
10
+ const session = useRef({ start: performance.now(), total: 0, isActive: true });
11
+ useEffect(() => {
12
+ const subscription = AppState.addEventListener("change", (state) => {
13
+ if (state === "active" && !session.current.isActive) {
14
+ session.current.start = performance.now();
15
+ session.current.isActive = true;
16
+ } else if (state !== "active" && session.current.isActive) {
17
+ session.current.total += (performance.now() - session.current.start) / 1e3;
18
+ session.current.isActive = false;
19
+ }
20
+ });
21
+ return () => subscription.remove();
22
+ }, []);
23
+ useEffect(() => {
24
+ if (!prevPathname) {
25
+ session.current = { start: performance.now(), total: 0, isActive: true };
26
+ }
27
+ let duration = session.current.total;
28
+ if (session.current.isActive) {
29
+ duration += (performance.now() - session.current.start) / 1e3;
30
+ }
31
+ track("screen_view", {
32
+ screen_name: pathname,
33
+ screen_class: pathname,
34
+ previous_screen: prevPathname ?? void 0,
35
+ previous_screen_duration: prevPathname ? Number(duration.toFixed(2)) : void 0
36
+ });
37
+ session.current = { start: performance.now(), total: 0, isActive: true };
38
+ }, [pathname]);
39
+ }
40
+ export {
41
+ useScreenViewAnalytics
42
+ };
43
+ //# sourceMappingURL=analytics.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/native/analytics.ts"],"sourcesContent":["import { usePathname } from 'expo-router';\nimport { useEffect, useRef } from 'react';\nimport { AppState } from 'react-native';\nimport { usePrevious } from '../hooks/use-previous';\nimport { track } from '../track/index';\n\nexport function useScreenViewAnalytics() {\n const pathname = usePathname();\n const prevPathname = usePrevious(pathname);\n const session = useRef({ start: performance.now(), total: 0, isActive: true });\n\n useEffect(() => {\n const subscription = AppState.addEventListener('change', (state) => {\n // when returning to the foreground from the background\n if (state === 'active' && !session.current.isActive) {\n session.current.start = performance.now();\n session.current.isActive = true;\n }\n // when entering the background\n else if (state !== 'active' && session.current.isActive) {\n session.current.total += (performance.now() - session.current.start) / 1000;\n session.current.isActive = false;\n }\n });\n\n return () => subscription.remove();\n }, []);\n\n // when the screen is switched, the duration of the previous screen is recorded\n useEffect(() => {\n if (!prevPathname) {\n session.current = { start: performance.now(), total: 0, isActive: true };\n }\n\n let duration = session.current.total;\n if (session.current.isActive) {\n duration += (performance.now() - session.current.start) / 1000;\n }\n\n track('screen_view', {\n screen_name: pathname,\n screen_class: pathname,\n previous_screen: prevPathname ?? undefined,\n previous_screen_duration: prevPathname ? Number(duration.toFixed(2)) : undefined,\n });\n\n // reset session\n session.current = { start: performance.now(), total: 0, isActive: true };\n }, [pathname]);\n}\n"],"mappings":";AAAA,SAAS,mBAAmB;AAC5B,SAAS,WAAW,cAAc;AAClC,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,aAAa;AAEf,SAAS,yBAAyB;AACvC,QAAM,WAAW,YAAY;AAC7B,QAAM,eAAe,YAAY,QAAQ;AACzC,QAAM,UAAU,OAAO,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK,CAAC;AAE7E,YAAU,MAAM;AACd,UAAM,eAAe,SAAS,iBAAiB,UAAU,CAAC,UAAU;AAElE,UAAI,UAAU,YAAY,CAAC,QAAQ,QAAQ,UAAU;AACnD,gBAAQ,QAAQ,QAAQ,YAAY,IAAI;AACxC,gBAAQ,QAAQ,WAAW;AAAA,MAC7B,WAES,UAAU,YAAY,QAAQ,QAAQ,UAAU;AACvD,gBAAQ,QAAQ,UAAU,YAAY,IAAI,IAAI,QAAQ,QAAQ,SAAS;AACvE,gBAAQ,QAAQ,WAAW;AAAA,MAC7B;AAAA,IACF,CAAC;AAED,WAAO,MAAM,aAAa,OAAO;AAAA,EACnC,GAAG,CAAC,CAAC;AAGL,YAAU,MAAM;AACd,QAAI,CAAC,cAAc;AACjB,cAAQ,UAAU,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK;AAAA,IACzE;AAEA,QAAI,WAAW,QAAQ,QAAQ;AAC/B,QAAI,QAAQ,QAAQ,UAAU;AAC5B,mBAAa,YAAY,IAAI,IAAI,QAAQ,QAAQ,SAAS;AAAA,IAC5D;AAEA,UAAM,eAAe;AAAA,MACnB,aAAa;AAAA,MACb,cAAc;AAAA,MACd,iBAAiB,gBAAgB;AAAA,MACjC,0BAA0B,eAAe,OAAO,SAAS,QAAQ,CAAC,CAAC,IAAI;AAAA,IACzE,CAAC;AAGD,YAAQ,UAAU,EAAE,OAAO,YAAY,IAAI,GAAG,OAAO,GAAG,UAAU,KAAK;AAAA,EACzE,GAAG,CAAC,QAAQ,CAAC;AACf;","names":[]}
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,113 +15,26 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/native/index.ts
31
21
  var native_exports = {};
32
22
  __export(native_exports, {
33
- getDeviceId: () => getDeviceId,
34
- getDeviceType: () => getDeviceType,
35
- getTags: () => getTags,
36
- storage: () => storage
23
+ getDeviceId: () => import_setup.getDeviceId,
24
+ getDeviceType: () => import_setup.getDeviceType,
25
+ getTags: () => import_setup.getTags,
26
+ storage: () => import_setup.storage,
27
+ useScreenViewAnalytics: () => import_analytics.useScreenViewAnalytics
37
28
  });
38
29
  module.exports = __toCommonJS(native_exports);
39
- var import_async_storage = __toESM(require("@react-native-async-storage/async-storage"), 1);
40
- var import_expo_application = require("expo-application");
41
- var import_expo_crypto = require("expo-crypto");
42
- var import_expo_device = require("expo-device");
43
- var import_expo_localization = require("expo-localization");
44
- var import_expo_tracking_transparency = require("expo-tracking-transparency");
45
- var import_react_native = require("react-native");
46
- var import_react_native_url_polyfill = require("react-native-url-polyfill");
47
- var storage = {
48
- getItem: (key) => import_async_storage.default.getItem(key),
49
- setItem: (key, value) => import_async_storage.default.setItem(key, value)
50
- };
51
- async function getDeviceId() {
52
- let deviceId = null;
53
- if (import_react_native.Platform.OS === "ios") {
54
- deviceId = await (0, import_expo_application.getIosIdForVendorAsync)();
55
- } else if (import_react_native.Platform.OS === "android") {
56
- deviceId = (0, import_expo_application.getAndroidId)();
57
- }
58
- if (!deviceId) {
59
- deviceId = await import_async_storage.default.getItem("device_id");
60
- if (!deviceId) {
61
- deviceId = (0, import_expo_crypto.randomUUID)();
62
- await import_async_storage.default.setItem("device_id", deviceId);
63
- }
64
- }
65
- return deviceId;
66
- }
67
- function getDeviceType() {
68
- switch (import_expo_device.deviceType) {
69
- case import_expo_device.DeviceType.PHONE:
70
- return "mobile";
71
- case import_expo_device.DeviceType.TABLET:
72
- return "tablet";
73
- case import_expo_device.DeviceType.DESKTOP:
74
- return "desktop";
75
- case import_expo_device.DeviceType.TV:
76
- return "smarttv";
77
- default:
78
- return void 0;
79
- }
80
- }
81
- async function getTags(release) {
82
- var _a, _b, _c, _d;
83
- const screen = import_react_native.Dimensions.get("screen");
84
- const screen_width = Math.floor(screen.width);
85
- const screen_height = Math.floor(screen.height);
86
- const install_referrer = import_react_native.Platform.OS === "android" ? await (0, import_expo_application.getInstallReferrerAsync)() : void 0;
87
- const params = new import_react_native_url_polyfill.URLSearchParams(install_referrer);
88
- return {
89
- os: `${import_expo_device.osName} ${import_expo_device.osVersion}`,
90
- os_name: import_expo_device.osName ?? void 0,
91
- os_version: import_expo_device.osVersion ?? void 0,
92
- platform: import_react_native.Platform.OS,
93
- device: import_expo_device.modelName ?? void 0,
94
- device_id: await getDeviceId(),
95
- device_type: getDeviceType(),
96
- device_vendor: import_expo_device.manufacturer ?? void 0,
97
- device_model_id: import_expo_device.modelId ?? void 0,
98
- device_pixel_ratio: `${import_react_native.PixelRatio.get()}`,
99
- screen_width,
100
- screen_height,
101
- screen_resolution: `${screen_width}x${screen_height}`,
102
- release,
103
- language: ((_b = (_a = (0, import_expo_localization.getLocales)()) == null ? void 0 : _a[0]) == null ? void 0 : _b.languageTag) ?? "en",
104
- time_zone: ((_d = (_c = (0, import_expo_localization.getCalendars)()) == null ? void 0 : _c[0]) == null ? void 0 : _d.timeZone) ?? "UTC",
105
- environment: __DEV__ ? "development" : "production",
106
- source: "app",
107
- // ads
108
- advertising_id: (0, import_expo_tracking_transparency.getAdvertisingId)() ?? void 0,
109
- install_referrer,
110
- // utm params
111
- utm_source: params.get("utm_source") ?? void 0,
112
- utm_medium: params.get("utm_medium") ?? void 0,
113
- utm_campaign: params.get("utm_campaign") ?? void 0,
114
- utm_term: params.get("utm_term") ?? void 0,
115
- utm_content: params.get("utm_content") ?? void 0,
116
- utm_id: params.get("utm_id") ?? void 0,
117
- utm_source_platform: params.get("utm_source_platform") ?? void 0,
118
- utm_creative_format: params.get("utm_creative_format") ?? void 0,
119
- utm_marketing_tactic: params.get("utm_marketing_tactic") ?? void 0
120
- };
121
- }
30
+ var import_setup = require("./setup.cjs");
31
+ var import_analytics = require("./analytics.cjs");
122
32
  // Annotate the CommonJS export names for ESM import in node:
123
33
  0 && (module.exports = {
124
34
  getDeviceId,
125
35
  getDeviceType,
126
36
  getTags,
127
- storage
37
+ storage,
38
+ useScreenViewAnalytics
128
39
  });
129
40
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/native/index.ts"],"sourcesContent":["import AsyncStorage from '@react-native-async-storage/async-storage';\nimport { getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync } from 'expo-application';\nimport { randomUUID } from 'expo-crypto';\nimport {\n DeviceType,\n deviceType,\n manufacturer,\n modelId,\n modelName,\n osName,\n osVersion,\n} from 'expo-device';\nimport { getCalendars, getLocales } from 'expo-localization';\nimport { getAdvertisingId } from 'expo-tracking-transparency';\nimport { Dimensions, PixelRatio, Platform } from 'react-native';\nimport { URLSearchParams } from 'react-native-url-polyfill';\nimport type { Storage } from '../setup/index';\nimport type { TrackTags } from '../track/types';\n\nexport const storage: Storage = {\n getItem: (key) => AsyncStorage.getItem(key),\n setItem: (key, value) => AsyncStorage.setItem(key, value),\n};\n\nexport async function getDeviceId(): Promise<string> {\n let deviceId: string | null = null;\n if (Platform.OS === 'ios') {\n deviceId = await getIosIdForVendorAsync();\n } else if (Platform.OS === 'android') {\n deviceId = getAndroidId();\n }\n if (!deviceId) {\n deviceId = await AsyncStorage.getItem('device_id');\n if (!deviceId) {\n deviceId = randomUUID();\n await AsyncStorage.setItem('device_id', deviceId);\n }\n }\n return deviceId;\n}\n\nexport function getDeviceType(): string | undefined {\n switch (deviceType) {\n case DeviceType.PHONE:\n return 'mobile';\n case DeviceType.TABLET:\n return 'tablet';\n case DeviceType.DESKTOP:\n return 'desktop';\n case DeviceType.TV:\n return 'smarttv';\n default:\n return undefined;\n }\n}\n\nexport async function getTags(release: string): Promise<TrackTags> {\n const screen = Dimensions.get('screen');\n const screen_width = Math.floor(screen.width);\n const screen_height = Math.floor(screen.height);\n\n const install_referrer = Platform.OS === 'android' ? await getInstallReferrerAsync() : undefined;\n const params = new URLSearchParams(install_referrer);\n\n return {\n os: `${osName} ${osVersion}`,\n os_name: osName ?? undefined,\n os_version: osVersion ?? undefined,\n platform: Platform.OS,\n device: modelName ?? undefined,\n device_id: await getDeviceId(),\n device_type: getDeviceType(),\n device_vendor: manufacturer ?? undefined,\n device_model_id: modelId ?? undefined,\n device_pixel_ratio: `${PixelRatio.get()}`,\n screen_width,\n screen_height,\n screen_resolution: `${screen_width}x${screen_height}`,\n release: release,\n language: getLocales()?.[0]?.languageTag ?? 'en',\n time_zone: getCalendars()?.[0]?.timeZone ?? 'UTC',\n environment: __DEV__ ? 'development' : 'production',\n source: 'app',\n // ads\n advertising_id: getAdvertisingId() ?? undefined,\n install_referrer,\n // utm params\n utm_source: params.get('utm_source') ?? undefined,\n utm_medium: params.get('utm_medium') ?? undefined,\n utm_campaign: params.get('utm_campaign') ?? undefined,\n utm_term: params.get('utm_term') ?? undefined,\n utm_content: params.get('utm_content') ?? undefined,\n utm_id: params.get('utm_id') ?? undefined,\n utm_source_platform: params.get('utm_source_platform') ?? undefined,\n utm_creative_format: params.get('utm_creative_format') ?? undefined,\n utm_marketing_tactic: params.get('utm_marketing_tactic') ?? undefined,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAyB;AACzB,8BAA8E;AAC9E,yBAA2B;AAC3B,yBAQO;AACP,+BAAyC;AACzC,wCAAiC;AACjC,0BAAiD;AACjD,uCAAgC;AAIzB,IAAM,UAAmB;AAAA,EAC9B,SAAS,CAAC,QAAQ,qBAAAA,QAAa,QAAQ,GAAG;AAAA,EAC1C,SAAS,CAAC,KAAK,UAAU,qBAAAA,QAAa,QAAQ,KAAK,KAAK;AAC1D;AAEA,eAAsB,cAA+B;AACnD,MAAI,WAA0B;AAC9B,MAAI,6BAAS,OAAO,OAAO;AACzB,eAAW,UAAM,gDAAuB;AAAA,EAC1C,WAAW,6BAAS,OAAO,WAAW;AACpC,mBAAW,sCAAa;AAAA,EAC1B;AACA,MAAI,CAAC,UAAU;AACb,eAAW,MAAM,qBAAAA,QAAa,QAAQ,WAAW;AACjD,QAAI,CAAC,UAAU;AACb,qBAAW,+BAAW;AACtB,YAAM,qBA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IACxC,YAAY,OAAO,IAAI,YAAY,KAAK;AAAA,IACxC,cAAc,OAAO,IAAI,cAAc,KAAK;AAAA,IAC5C,UAAU,OAAO,IAAI,UAAU,KAAK;AAAA,IACpC,aAAa,OAAO,IAAI,aAAa,KAAK;AAAA,IAC1C,QAAQ,OAAO,IAAI,QAAQ,KAAK;AAAA,IAChC,qBAAqB,OAAO,IAAI,qBAAqB,KAAK;AAAA,IAC1D,qBAAqB,OAAO,IAAI,qBAAqB,KAAK;AAAA,IAC1D,sBAAsB,OAAO,IAAI,sBAAsB,KAAK;AAAA,EAC9D;AACF;","names":["AsyncStorage"]}
1
+ {"version":3,"sources":["../../src/native/index.ts"],"sourcesContent":["export { getDeviceId, getDeviceType, getTags, storage } from './setup';\nexport { useScreenViewAnalytics } from './analytics';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6D;AAC7D,uBAAuC;","names":[]}
@@ -1,12 +1,7 @@
1
- import { Storage } from '../setup/index.cjs';
2
- import { TrackTags } from '../track/types.cjs';
1
+ export { getDeviceId, getDeviceType, getTags, storage } from './setup.cjs';
2
+ export { useScreenViewAnalytics } from './analytics.cjs';
3
+ import '../setup/index.cjs';
3
4
  import 'axios';
4
- import '../visitor/types.cjs';
5
+ import '../track/types.cjs';
5
6
  import '../track/gtag.cjs';
6
-
7
- declare const storage: Storage;
8
- declare function getDeviceId(): Promise<string>;
9
- declare function getDeviceType(): string | undefined;
10
- declare function getTags(release: string): Promise<TrackTags>;
11
-
12
- export { getDeviceId, getDeviceType, getTags, storage };
7
+ import '../visitor/types.cjs';
@@ -1,12 +1,7 @@
1
- import { Storage } from '../setup/index.js';
2
- import { TrackTags } from '../track/types.js';
1
+ export { getDeviceId, getDeviceType, getTags, storage } from './setup.js';
2
+ export { useScreenViewAnalytics } from './analytics.js';
3
+ import '../setup/index.js';
3
4
  import 'axios';
4
- import '../visitor/types.js';
5
+ import '../track/types.js';
5
6
  import '../track/gtag.js';
6
-
7
- declare const storage: Storage;
8
- declare function getDeviceId(): Promise<string>;
9
- declare function getDeviceType(): string | undefined;
10
- declare function getTags(release: string): Promise<TrackTags>;
11
-
12
- export { getDeviceId, getDeviceType, getTags, storage };
7
+ import '../visitor/types.js';
@@ -1,99 +1,11 @@
1
1
  // src/native/index.ts
2
- import AsyncStorage from "@react-native-async-storage/async-storage";
3
- import { getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync } from "expo-application";
4
- import { randomUUID } from "expo-crypto";
5
- import {
6
- DeviceType,
7
- deviceType,
8
- manufacturer,
9
- modelId,
10
- modelName,
11
- osName,
12
- osVersion
13
- } from "expo-device";
14
- import { getCalendars, getLocales } from "expo-localization";
15
- import { getAdvertisingId } from "expo-tracking-transparency";
16
- import { Dimensions, PixelRatio, Platform } from "react-native";
17
- import { URLSearchParams } from "react-native-url-polyfill";
18
- var storage = {
19
- getItem: (key) => AsyncStorage.getItem(key),
20
- setItem: (key, value) => AsyncStorage.setItem(key, value)
21
- };
22
- async function getDeviceId() {
23
- let deviceId = null;
24
- if (Platform.OS === "ios") {
25
- deviceId = await getIosIdForVendorAsync();
26
- } else if (Platform.OS === "android") {
27
- deviceId = getAndroidId();
28
- }
29
- if (!deviceId) {
30
- deviceId = await AsyncStorage.getItem("device_id");
31
- if (!deviceId) {
32
- deviceId = randomUUID();
33
- await AsyncStorage.setItem("device_id", deviceId);
34
- }
35
- }
36
- return deviceId;
37
- }
38
- function getDeviceType() {
39
- switch (deviceType) {
40
- case DeviceType.PHONE:
41
- return "mobile";
42
- case DeviceType.TABLET:
43
- return "tablet";
44
- case DeviceType.DESKTOP:
45
- return "desktop";
46
- case DeviceType.TV:
47
- return "smarttv";
48
- default:
49
- return void 0;
50
- }
51
- }
52
- async function getTags(release) {
53
- var _a, _b, _c, _d;
54
- const screen = Dimensions.get("screen");
55
- const screen_width = Math.floor(screen.width);
56
- const screen_height = Math.floor(screen.height);
57
- const install_referrer = Platform.OS === "android" ? await getInstallReferrerAsync() : void 0;
58
- const params = new URLSearchParams(install_referrer);
59
- return {
60
- os: `${osName} ${osVersion}`,
61
- os_name: osName ?? void 0,
62
- os_version: osVersion ?? void 0,
63
- platform: Platform.OS,
64
- device: modelName ?? void 0,
65
- device_id: await getDeviceId(),
66
- device_type: getDeviceType(),
67
- device_vendor: manufacturer ?? void 0,
68
- device_model_id: modelId ?? void 0,
69
- device_pixel_ratio: `${PixelRatio.get()}`,
70
- screen_width,
71
- screen_height,
72
- screen_resolution: `${screen_width}x${screen_height}`,
73
- release,
74
- language: ((_b = (_a = getLocales()) == null ? void 0 : _a[0]) == null ? void 0 : _b.languageTag) ?? "en",
75
- time_zone: ((_d = (_c = getCalendars()) == null ? void 0 : _c[0]) == null ? void 0 : _d.timeZone) ?? "UTC",
76
- environment: __DEV__ ? "development" : "production",
77
- source: "app",
78
- // ads
79
- advertising_id: getAdvertisingId() ?? void 0,
80
- install_referrer,
81
- // utm params
82
- utm_source: params.get("utm_source") ?? void 0,
83
- utm_medium: params.get("utm_medium") ?? void 0,
84
- utm_campaign: params.get("utm_campaign") ?? void 0,
85
- utm_term: params.get("utm_term") ?? void 0,
86
- utm_content: params.get("utm_content") ?? void 0,
87
- utm_id: params.get("utm_id") ?? void 0,
88
- utm_source_platform: params.get("utm_source_platform") ?? void 0,
89
- utm_creative_format: params.get("utm_creative_format") ?? void 0,
90
- utm_marketing_tactic: params.get("utm_marketing_tactic") ?? void 0
91
- };
92
- }
2
+ import { getDeviceId, getDeviceType, getTags, storage } from "./setup.mjs";
3
+ import { useScreenViewAnalytics } from "./analytics.mjs";
93
4
  export {
94
5
  getDeviceId,
95
6
  getDeviceType,
96
7
  getTags,
97
- storage
8
+ storage,
9
+ useScreenViewAnalytics
98
10
  };
99
11
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/native/index.ts"],"sourcesContent":["import AsyncStorage from '@react-native-async-storage/async-storage';\nimport { getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync } from 'expo-application';\nimport { randomUUID } from 'expo-crypto';\nimport {\n DeviceType,\n deviceType,\n manufacturer,\n modelId,\n modelName,\n osName,\n osVersion,\n} from 'expo-device';\nimport { getCalendars, getLocales } from 'expo-localization';\nimport { getAdvertisingId } from 'expo-tracking-transparency';\nimport { Dimensions, PixelRatio, Platform } from 'react-native';\nimport { URLSearchParams } from 'react-native-url-polyfill';\nimport type { Storage } from '../setup/index';\nimport type { TrackTags } from '../track/types';\n\nexport const storage: Storage = {\n getItem: (key) => AsyncStorage.getItem(key),\n setItem: (key, value) => AsyncStorage.setItem(key, value),\n};\n\nexport async function getDeviceId(): Promise<string> {\n let deviceId: string | null = null;\n if (Platform.OS === 'ios') {\n deviceId = await getIosIdForVendorAsync();\n } else if (Platform.OS === 'android') {\n deviceId = getAndroidId();\n }\n if (!deviceId) {\n deviceId = await AsyncStorage.getItem('device_id');\n if (!deviceId) {\n deviceId = randomUUID();\n await AsyncStorage.setItem('device_id', deviceId);\n }\n }\n return deviceId;\n}\n\nexport function getDeviceType(): string | undefined {\n switch (deviceType) {\n case DeviceType.PHONE:\n return 'mobile';\n case DeviceType.TABLET:\n return 'tablet';\n case DeviceType.DESKTOP:\n return 'desktop';\n case DeviceType.TV:\n return 'smarttv';\n default:\n return undefined;\n }\n}\n\nexport async function getTags(release: string): Promise<TrackTags> {\n const screen = Dimensions.get('screen');\n const screen_width = Math.floor(screen.width);\n const screen_height = Math.floor(screen.height);\n\n const install_referrer = Platform.OS === 'android' ? await getInstallReferrerAsync() : undefined;\n const params = new URLSearchParams(install_referrer);\n\n return {\n os: `${osName} ${osVersion}`,\n os_name: osName ?? undefined,\n os_version: osVersion ?? undefined,\n platform: Platform.OS,\n device: modelName ?? undefined,\n device_id: await getDeviceId(),\n device_type: getDeviceType(),\n device_vendor: manufacturer ?? undefined,\n device_model_id: modelId ?? undefined,\n device_pixel_ratio: `${PixelRatio.get()}`,\n screen_width,\n screen_height,\n screen_resolution: `${screen_width}x${screen_height}`,\n release: release,\n language: getLocales()?.[0]?.languageTag ?? 'en',\n time_zone: getCalendars()?.[0]?.timeZone ?? 'UTC',\n environment: __DEV__ ? 'development' : 'production',\n source: 'app',\n // ads\n advertising_id: getAdvertisingId() ?? undefined,\n install_referrer,\n // utm params\n utm_source: params.get('utm_source') ?? undefined,\n utm_medium: params.get('utm_medium') ?? undefined,\n utm_campaign: params.get('utm_campaign') ?? undefined,\n utm_term: params.get('utm_term') ?? undefined,\n utm_content: params.get('utm_content') ?? undefined,\n utm_id: params.get('utm_id') ?? undefined,\n utm_source_platform: params.get('utm_source_platform') ?? undefined,\n utm_creative_format: params.get('utm_creative_format') ?? undefined,\n utm_marketing_tactic: params.get('utm_marketing_tactic') ?? undefined,\n };\n}\n"],"mappings":";AAAA,OAAO,kBAAkB;AACzB,SAAS,cAAc,yBAAyB,8BAA8B;AAC9E,SAAS,kBAAkB;AAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc,kBAAkB;AACzC,SAAS,wBAAwB;AACjC,SAAS,YAAY,YAAY,gBAAgB;AACjD,SAAS,uBAAuB;AAIzB,IAAM,UAAmB;AAAA,EAC9B,SAAS,CAAC,QAAQ,aAAa,QAAQ,GAAG;AAAA,EAC1C,SAAS,CAAC,KAAK,UAAU,aAAa,QAAQ,KAAK,KAAK;AAC1D;AAEA,eAAsB,cAA+B;AACnD,MAAI,WAA0B;AAC9B,MAAI,SAAS,OAAO,OAAO;AACzB,eAAW,MAAM,uBAAuB;AAAA,EAC1C,WAAW,SAAS,OAAO,WAAW;AACpC,eAAW,aAAa;AAAA,EAC1B;AACA,MAAI,CAAC,UAAU;AACb,eAAW,MAAM,aAAa,QAAQ,WAAW;AACjD,QAAI,CAAC,UAAU;AACb,iBAAW,WAAW;AACtB,YAAM,aAAa,QAAQ,aAAa,QAAQ;AAAA,IAClD;AA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I,cAAc,KAAK;AAAA,IAC5C,UAAU,OAAO,IAAI,UAAU,KAAK;AAAA,IACpC,aAAa,OAAO,IAAI,aAAa,KAAK;AAAA,IAC1C,QAAQ,OAAO,IAAI,QAAQ,KAAK;AAAA,IAChC,qBAAqB,OAAO,IAAI,qBAAqB,KAAK;AAAA,IAC1D,qBAAqB,OAAO,IAAI,qBAAqB,KAAK;AAAA,IAC1D,sBAAsB,OAAO,IAAI,sBAAsB,KAAK;AAAA,EAC9D;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/native/index.ts"],"sourcesContent":["export { getDeviceId, getDeviceType, getTags, storage } from './setup';\nexport { useScreenViewAnalytics } from './analytics';\n"],"mappings":";AAAA,SAAS,aAAa,eAAe,SAAS,eAAe;AAC7D,SAAS,8BAA8B;","names":[]}
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/native/setup.ts
31
+ var setup_exports = {};
32
+ __export(setup_exports, {
33
+ getDeviceId: () => getDeviceId,
34
+ getDeviceType: () => getDeviceType,
35
+ getTags: () => getTags,
36
+ storage: () => storage
37
+ });
38
+ module.exports = __toCommonJS(setup_exports);
39
+ var import_async_storage = __toESM(require("@react-native-async-storage/async-storage"), 1);
40
+ var import_expo_application = require("expo-application");
41
+ var import_expo_crypto = require("expo-crypto");
42
+ var import_expo_device = require("expo-device");
43
+ var import_expo_localization = require("expo-localization");
44
+ var import_expo_tracking_transparency = require("expo-tracking-transparency");
45
+ var import_react_native = require("react-native");
46
+ var import_react_native_url_polyfill = require("react-native-url-polyfill");
47
+ var storage = {
48
+ getItem: (key) => import_async_storage.default.getItem(key),
49
+ setItem: (key, value) => import_async_storage.default.setItem(key, value)
50
+ };
51
+ async function getDeviceId() {
52
+ let deviceId = null;
53
+ if (import_react_native.Platform.OS === "ios") {
54
+ deviceId = await (0, import_expo_application.getIosIdForVendorAsync)();
55
+ } else if (import_react_native.Platform.OS === "android") {
56
+ deviceId = (0, import_expo_application.getAndroidId)();
57
+ }
58
+ if (!deviceId) {
59
+ deviceId = await import_async_storage.default.getItem("device_id");
60
+ if (!deviceId) {
61
+ deviceId = (0, import_expo_crypto.randomUUID)();
62
+ await import_async_storage.default.setItem("device_id", deviceId);
63
+ }
64
+ }
65
+ return deviceId;
66
+ }
67
+ function getDeviceType() {
68
+ switch (import_expo_device.deviceType) {
69
+ case import_expo_device.DeviceType.PHONE:
70
+ return "mobile";
71
+ case import_expo_device.DeviceType.TABLET:
72
+ return "tablet";
73
+ case import_expo_device.DeviceType.DESKTOP:
74
+ return "desktop";
75
+ case import_expo_device.DeviceType.TV:
76
+ return "smarttv";
77
+ default:
78
+ return void 0;
79
+ }
80
+ }
81
+ async function getTags(release) {
82
+ var _a, _b, _c, _d;
83
+ const screen = import_react_native.Dimensions.get("screen");
84
+ const screen_width = Math.floor(screen.width);
85
+ const screen_height = Math.floor(screen.height);
86
+ const install_referrer = import_react_native.Platform.OS === "android" ? await (0, import_expo_application.getInstallReferrerAsync)() : void 0;
87
+ const params = new import_react_native_url_polyfill.URLSearchParams(install_referrer);
88
+ return {
89
+ os: `${import_expo_device.osName} ${import_expo_device.osVersion}`,
90
+ os_name: import_expo_device.osName ?? void 0,
91
+ os_version: import_expo_device.osVersion ?? void 0,
92
+ platform: import_react_native.Platform.OS,
93
+ device: import_expo_device.modelName ?? void 0,
94
+ device_id: await getDeviceId(),
95
+ device_type: getDeviceType(),
96
+ device_vendor: import_expo_device.manufacturer ?? void 0,
97
+ device_model_id: import_expo_device.modelId ?? void 0,
98
+ device_pixel_ratio: `${import_react_native.PixelRatio.get()}`,
99
+ screen_width,
100
+ screen_height,
101
+ screen_resolution: `${screen_width}x${screen_height}`,
102
+ release,
103
+ language: ((_b = (_a = (0, import_expo_localization.getLocales)()) == null ? void 0 : _a[0]) == null ? void 0 : _b.languageTag) ?? "en",
104
+ time_zone: ((_d = (_c = (0, import_expo_localization.getCalendars)()) == null ? void 0 : _c[0]) == null ? void 0 : _d.timeZone) ?? "UTC",
105
+ environment: __DEV__ ? "development" : "production",
106
+ source: "app",
107
+ // ads
108
+ advertising_id: (0, import_expo_tracking_transparency.getAdvertisingId)() ?? void 0,
109
+ install_referrer,
110
+ // utm params
111
+ utm_source: params.get("utm_source") ?? void 0,
112
+ utm_medium: params.get("utm_medium") ?? void 0,
113
+ utm_campaign: params.get("utm_campaign") ?? void 0,
114
+ utm_term: params.get("utm_term") ?? void 0,
115
+ utm_content: params.get("utm_content") ?? void 0,
116
+ utm_id: params.get("utm_id") ?? void 0,
117
+ utm_source_platform: params.get("utm_source_platform") ?? void 0,
118
+ utm_creative_format: params.get("utm_creative_format") ?? void 0,
119
+ utm_marketing_tactic: params.get("utm_marketing_tactic") ?? void 0
120
+ };
121
+ }
122
+ // Annotate the CommonJS export names for ESM import in node:
123
+ 0 && (module.exports = {
124
+ getDeviceId,
125
+ getDeviceType,
126
+ getTags,
127
+ storage
128
+ });
129
+ //# sourceMappingURL=setup.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/native/setup.ts"],"sourcesContent":["import AsyncStorage from '@react-native-async-storage/async-storage';\nimport { getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync } from 'expo-application';\nimport { randomUUID } from 'expo-crypto';\nimport {\n DeviceType,\n deviceType,\n manufacturer,\n modelId,\n modelName,\n osName,\n osVersion,\n} from 'expo-device';\nimport { getCalendars, getLocales } from 'expo-localization';\nimport { getAdvertisingId } from 'expo-tracking-transparency';\nimport { Dimensions, PixelRatio, Platform } from 'react-native';\nimport { URLSearchParams } from 'react-native-url-polyfill';\nimport type { Storage } from '../setup/index';\nimport type { TrackTags } from '../track/types';\n\nexport const storage: Storage = {\n getItem: (key) => AsyncStorage.getItem(key),\n setItem: (key, value) => AsyncStorage.setItem(key, value),\n};\n\nexport async function getDeviceId(): Promise<string> {\n let deviceId: string | null = null;\n if (Platform.OS === 'ios') {\n deviceId = await getIosIdForVendorAsync();\n } else if (Platform.OS === 'android') {\n deviceId = getAndroidId();\n }\n if (!deviceId) {\n deviceId = await AsyncStorage.getItem('device_id');\n if (!deviceId) {\n deviceId = randomUUID();\n await AsyncStorage.setItem('device_id', deviceId);\n }\n }\n return deviceId;\n}\n\nexport function getDeviceType(): string | undefined {\n switch (deviceType) {\n case DeviceType.PHONE:\n return 'mobile';\n case DeviceType.TABLET:\n return 'tablet';\n case DeviceType.DESKTOP:\n return 'desktop';\n case DeviceType.TV:\n return 'smarttv';\n default:\n return undefined;\n }\n}\n\nexport async function getTags(release: string): Promise<TrackTags> {\n const screen = Dimensions.get('screen');\n const screen_width = Math.floor(screen.width);\n const screen_height = Math.floor(screen.height);\n\n const install_referrer = Platform.OS === 'android' ? await getInstallReferrerAsync() : undefined;\n const params = new URLSearchParams(install_referrer);\n\n return {\n os: `${osName} ${osVersion}`,\n os_name: osName ?? undefined,\n os_version: osVersion ?? undefined,\n platform: Platform.OS,\n device: modelName ?? undefined,\n device_id: await getDeviceId(),\n device_type: getDeviceType(),\n device_vendor: manufacturer ?? undefined,\n device_model_id: modelId ?? undefined,\n device_pixel_ratio: `${PixelRatio.get()}`,\n screen_width,\n screen_height,\n screen_resolution: `${screen_width}x${screen_height}`,\n release: release,\n language: getLocales()?.[0]?.languageTag ?? 'en',\n time_zone: getCalendars()?.[0]?.timeZone ?? 'UTC',\n environment: __DEV__ ? 'development' : 'production',\n source: 'app',\n // ads\n advertising_id: getAdvertisingId() ?? undefined,\n install_referrer,\n // utm params\n utm_source: params.get('utm_source') ?? undefined,\n utm_medium: params.get('utm_medium') ?? undefined,\n utm_campaign: params.get('utm_campaign') ?? undefined,\n utm_term: params.get('utm_term') ?? undefined,\n utm_content: params.get('utm_content') ?? undefined,\n utm_id: params.get('utm_id') ?? undefined,\n utm_source_platform: params.get('utm_source_platform') ?? undefined,\n utm_creative_format: params.get('utm_creative_format') ?? undefined,\n utm_marketing_tactic: params.get('utm_marketing_tactic') ?? undefined,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAyB;AACzB,8BAA8E;AAC9E,yBAA2B;AAC3B,yBAQO;AACP,+BAAyC;AACzC,wCAAiC;AACjC,0BAAiD;AACjD,uCAAgC;AAIzB,IAAM,UAAmB;AAAA,EAC9B,SAAS,CAAC,QAAQ,qBAAAA,QAAa,QAAQ,GAAG;AAAA,EAC1C,SAAS,CAAC,KAAK,UAAU,qBAAAA,QAAa,QAAQ,KAAK,KAAK;AAC1D;AAEA,eAAsB,cAA+B;AACnD,MAAI,WAA0B;AAC9B,MAAI,6BAAS,OAAO,OAAO;AACzB,eAAW,UAAM,gDAAuB;AAAA,EAC1C,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AiB,OAAjB,mBAAqB,aAAY;AAAA,IAC5C,aAAa,UAAU,gBAAgB;AAAA,IACvC,QAAQ;AAAA;AAAA,IAER,oBAAgB,oDAAiB,KAAK;AAAA,IACtC;AAAA;AAAA,IAEA,YAAY,OAAO,IAAI,YAAY,KAAK;AAAA,IACxC,YAAY,OAAO,IAAI,YAAY,KAAK;AAAA,IACxC,cAAc,OAAO,IAAI,cAAc,KAAK;AAAA,IAC5C,UAAU,OAAO,IAAI,UAAU,KAAK;AAAA,IACpC,aAAa,OAAO,IAAI,aAAa,KAAK;AAAA,IAC1C,QAAQ,OAAO,IAAI,QAAQ,KAAK;AAAA,IAChC,qBAAqB,OAAO,IAAI,qBAAqB,KAAK;AAAA,IAC1D,qBAAqB,OAAO,IAAI,qBAAqB,KAAK;AAAA,IAC1D,sBAAsB,OAAO,IAAI,sBAAsB,KAAK;AAAA,EAC9D;AACF;","names":["AsyncStorage"]}
@@ -0,0 +1,12 @@
1
+ import { Storage } from '../setup/index.cjs';
2
+ import { TrackTags } from '../track/types.cjs';
3
+ import 'axios';
4
+ import '../visitor/types.cjs';
5
+ import '../track/gtag.cjs';
6
+
7
+ declare const storage: Storage;
8
+ declare function getDeviceId(): Promise<string>;
9
+ declare function getDeviceType(): string | undefined;
10
+ declare function getTags(release: string): Promise<TrackTags>;
11
+
12
+ export { getDeviceId, getDeviceType, getTags, storage };
@@ -0,0 +1,12 @@
1
+ import { Storage } from '../setup/index.js';
2
+ import { TrackTags } from '../track/types.js';
3
+ import 'axios';
4
+ import '../visitor/types.js';
5
+ import '../track/gtag.js';
6
+
7
+ declare const storage: Storage;
8
+ declare function getDeviceId(): Promise<string>;
9
+ declare function getDeviceType(): string | undefined;
10
+ declare function getTags(release: string): Promise<TrackTags>;
11
+
12
+ export { getDeviceId, getDeviceType, getTags, storage };
@@ -0,0 +1,99 @@
1
+ // src/native/setup.ts
2
+ import AsyncStorage from "@react-native-async-storage/async-storage";
3
+ import { getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync } from "expo-application";
4
+ import { randomUUID } from "expo-crypto";
5
+ import {
6
+ DeviceType,
7
+ deviceType,
8
+ manufacturer,
9
+ modelId,
10
+ modelName,
11
+ osName,
12
+ osVersion
13
+ } from "expo-device";
14
+ import { getCalendars, getLocales } from "expo-localization";
15
+ import { getAdvertisingId } from "expo-tracking-transparency";
16
+ import { Dimensions, PixelRatio, Platform } from "react-native";
17
+ import { URLSearchParams } from "react-native-url-polyfill";
18
+ var storage = {
19
+ getItem: (key) => AsyncStorage.getItem(key),
20
+ setItem: (key, value) => AsyncStorage.setItem(key, value)
21
+ };
22
+ async function getDeviceId() {
23
+ let deviceId = null;
24
+ if (Platform.OS === "ios") {
25
+ deviceId = await getIosIdForVendorAsync();
26
+ } else if (Platform.OS === "android") {
27
+ deviceId = getAndroidId();
28
+ }
29
+ if (!deviceId) {
30
+ deviceId = await AsyncStorage.getItem("device_id");
31
+ if (!deviceId) {
32
+ deviceId = randomUUID();
33
+ await AsyncStorage.setItem("device_id", deviceId);
34
+ }
35
+ }
36
+ return deviceId;
37
+ }
38
+ function getDeviceType() {
39
+ switch (deviceType) {
40
+ case DeviceType.PHONE:
41
+ return "mobile";
42
+ case DeviceType.TABLET:
43
+ return "tablet";
44
+ case DeviceType.DESKTOP:
45
+ return "desktop";
46
+ case DeviceType.TV:
47
+ return "smarttv";
48
+ default:
49
+ return void 0;
50
+ }
51
+ }
52
+ async function getTags(release) {
53
+ var _a, _b, _c, _d;
54
+ const screen = Dimensions.get("screen");
55
+ const screen_width = Math.floor(screen.width);
56
+ const screen_height = Math.floor(screen.height);
57
+ const install_referrer = Platform.OS === "android" ? await getInstallReferrerAsync() : void 0;
58
+ const params = new URLSearchParams(install_referrer);
59
+ return {
60
+ os: `${osName} ${osVersion}`,
61
+ os_name: osName ?? void 0,
62
+ os_version: osVersion ?? void 0,
63
+ platform: Platform.OS,
64
+ device: modelName ?? void 0,
65
+ device_id: await getDeviceId(),
66
+ device_type: getDeviceType(),
67
+ device_vendor: manufacturer ?? void 0,
68
+ device_model_id: modelId ?? void 0,
69
+ device_pixel_ratio: `${PixelRatio.get()}`,
70
+ screen_width,
71
+ screen_height,
72
+ screen_resolution: `${screen_width}x${screen_height}`,
73
+ release,
74
+ language: ((_b = (_a = getLocales()) == null ? void 0 : _a[0]) == null ? void 0 : _b.languageTag) ?? "en",
75
+ time_zone: ((_d = (_c = getCalendars()) == null ? void 0 : _c[0]) == null ? void 0 : _d.timeZone) ?? "UTC",
76
+ environment: __DEV__ ? "development" : "production",
77
+ source: "app",
78
+ // ads
79
+ advertising_id: getAdvertisingId() ?? void 0,
80
+ install_referrer,
81
+ // utm params
82
+ utm_source: params.get("utm_source") ?? void 0,
83
+ utm_medium: params.get("utm_medium") ?? void 0,
84
+ utm_campaign: params.get("utm_campaign") ?? void 0,
85
+ utm_term: params.get("utm_term") ?? void 0,
86
+ utm_content: params.get("utm_content") ?? void 0,
87
+ utm_id: params.get("utm_id") ?? void 0,
88
+ utm_source_platform: params.get("utm_source_platform") ?? void 0,
89
+ utm_creative_format: params.get("utm_creative_format") ?? void 0,
90
+ utm_marketing_tactic: params.get("utm_marketing_tactic") ?? void 0
91
+ };
92
+ }
93
+ export {
94
+ getDeviceId,
95
+ getDeviceType,
96
+ getTags,
97
+ storage
98
+ };
99
+ //# sourceMappingURL=setup.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/native/setup.ts"],"sourcesContent":["import AsyncStorage from '@react-native-async-storage/async-storage';\nimport { getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync } from 'expo-application';\nimport { randomUUID } from 'expo-crypto';\nimport {\n DeviceType,\n deviceType,\n manufacturer,\n modelId,\n modelName,\n osName,\n osVersion,\n} from 'expo-device';\nimport { getCalendars, getLocales } from 'expo-localization';\nimport { getAdvertisingId } from 'expo-tracking-transparency';\nimport { Dimensions, PixelRatio, Platform } from 'react-native';\nimport { URLSearchParams } from 'react-native-url-polyfill';\nimport type { Storage } from '../setup/index';\nimport type { TrackTags } from '../track/types';\n\nexport const storage: Storage = {\n getItem: (key) => AsyncStorage.getItem(key),\n setItem: (key, value) => AsyncStorage.setItem(key, value),\n};\n\nexport async function getDeviceId(): Promise<string> {\n let deviceId: string | null = null;\n if (Platform.OS === 'ios') {\n deviceId = await getIosIdForVendorAsync();\n } else if (Platform.OS === 'android') {\n deviceId = getAndroidId();\n }\n if (!deviceId) {\n deviceId = await AsyncStorage.getItem('device_id');\n if (!deviceId) {\n deviceId = randomUUID();\n await AsyncStorage.setItem('device_id', deviceId);\n }\n }\n return deviceId;\n}\n\nexport function getDeviceType(): string | undefined {\n switch (deviceType) {\n case DeviceType.PHONE:\n return 'mobile';\n case DeviceType.TABLET:\n return 'tablet';\n case DeviceType.DESKTOP:\n return 'desktop';\n case DeviceType.TV:\n return 'smarttv';\n default:\n return undefined;\n }\n}\n\nexport async function getTags(release: string): Promise<TrackTags> {\n const screen = Dimensions.get('screen');\n const screen_width = Math.floor(screen.width);\n const screen_height = Math.floor(screen.height);\n\n const install_referrer = Platform.OS === 'android' ? await getInstallReferrerAsync() : undefined;\n const params = new URLSearchParams(install_referrer);\n\n return {\n os: `${osName} ${osVersion}`,\n os_name: osName ?? undefined,\n os_version: osVersion ?? undefined,\n platform: Platform.OS,\n device: modelName ?? undefined,\n device_id: await getDeviceId(),\n device_type: getDeviceType(),\n device_vendor: manufacturer ?? undefined,\n device_model_id: modelId ?? undefined,\n device_pixel_ratio: `${PixelRatio.get()}`,\n screen_width,\n screen_height,\n screen_resolution: `${screen_width}x${screen_height}`,\n release: release,\n language: getLocales()?.[0]?.languageTag ?? 'en',\n time_zone: getCalendars()?.[0]?.timeZone ?? 'UTC',\n environment: __DEV__ ? 'development' : 'production',\n source: 'app',\n // ads\n advertising_id: getAdvertisingId() ?? undefined,\n install_referrer,\n // utm params\n utm_source: params.get('utm_source') ?? undefined,\n utm_medium: params.get('utm_medium') ?? undefined,\n utm_campaign: params.get('utm_campaign') ?? undefined,\n utm_term: params.get('utm_term') ?? undefined,\n utm_content: params.get('utm_content') ?? undefined,\n utm_id: params.get('utm_id') ?? undefined,\n utm_source_platform: params.get('utm_source_platform') ?? undefined,\n utm_creative_format: params.get('utm_creative_format') ?? undefined,\n utm_marketing_tactic: params.get('utm_marketing_tactic') ?? undefined,\n };\n}\n"],"mappings":";AAAA,OAAO,kBAAkB;AACzB,SAAS,cAAc,yBAAyB,8BAA8B;AAC9E,SAAS,kBAAkB;AAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc,kBAAkB;AACzC,SAAS,wBAAwB;AACjC,SAAS,YAAY,YAAY,gBAAgB;AACjD,SAAS,uBAAuB;AAIzB,IAAM,UAAmB;AAAA,EAC9B,SAAS,CAAC,QAAQ,aAAa,QAAQ,GAAG;AAAA,EAC1C,SAAS,CAAC,KAAK,UAAU,aAAa,QAAQ,KAAK,KAAK;AAC1D;AAEA,eAAsB,cAA+B;AACnD,MAAI,WAA0B;AAC9B,MAAI,SAAS,OAAO,OAAO;AACzB,eAAW,MAAM,uBAAuB;AAAA,EAC1C,WAAW,SAAS,OAAO,WAAW;AACpC,eAAW,aAAa;AAAA,EAC1B;AACA,MAAI,CAAC,UAAU;AACb,eAAW,MAAM,aAAa,QAAQ,WAAW;AACjD,QAAI,CAAC,UAAU;AACb,iBAAW,WAAW;AACtB,YAAM,aAAa,QAAQ,aAAa,QAAQ;AAAA,IAClD;AAAA,EACF;AACA,SAAO;AACT;AAEO,SAAS,gBAAoC;AAClD,UAAQ,YAAY;AAAA,IAClB,KAAK,WAAW;AACd,aAAO;AAAA,IACT,KAAK,WAAW;AACd,aAAO;AAAA,IACT,KAAK,WAAW;AACd,aAAO;AAAA,IACT,KAAK,WAAW;AACd,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEA,eAAsB,QAAQ,SAAqC;AAxDnE;AAyDE,QAAM,SAAS,WAAW,IAAI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ACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shware/analytics",
3
- "version": "2.3.10",
3
+ "version": "2.3.11",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "repository": {
@@ -71,8 +71,8 @@
71
71
  "@types/node": "^24.3.3",
72
72
  "@types/react": "^19.1.13",
73
73
  "typescript": "^5.9.2",
74
- "@repo/eslint-config": "0.0.4",
75
- "@repo/typescript-config": "0.0.0"
74
+ "@repo/typescript-config": "0.0.0",
75
+ "@repo/eslint-config": "0.0.4"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@react-native-async-storage/async-storage": "^2.2.0",