@cxpinsight/react-native 0.3.0 → 0.5.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/README.md +70 -0
  3. package/lib/CXPinsight.d.ts +33 -0
  4. package/lib/CXPinsight.d.ts.map +1 -1
  5. package/lib/CXPinsight.js +115 -3
  6. package/lib/CXPinsight.js.map +1 -1
  7. package/lib/CXPinsightProvider.d.ts.map +1 -1
  8. package/lib/CXPinsightProvider.js +40 -10
  9. package/lib/CXPinsightProvider.js.map +1 -1
  10. package/lib/core/attribution.d.ts +54 -0
  11. package/lib/core/attribution.d.ts.map +1 -0
  12. package/lib/core/attribution.js +112 -0
  13. package/lib/core/attribution.js.map +1 -0
  14. package/lib/core/autoTapCapture.d.ts +15 -0
  15. package/lib/core/autoTapCapture.d.ts.map +1 -0
  16. package/lib/core/autoTapCapture.js +242 -0
  17. package/lib/core/autoTapCapture.js.map +1 -0
  18. package/lib/core/experiments.d.ts +59 -0
  19. package/lib/core/experiments.d.ts.map +1 -0
  20. package/lib/core/experiments.js +201 -0
  21. package/lib/core/experiments.js.map +1 -0
  22. package/lib/core/networkCapture.d.ts +7 -1
  23. package/lib/core/networkCapture.d.ts.map +1 -1
  24. package/lib/core/networkCapture.js +13 -1
  25. package/lib/core/networkCapture.js.map +1 -1
  26. package/lib/core/triggerEngine.d.ts +5 -3
  27. package/lib/core/triggerEngine.d.ts.map +1 -1
  28. package/lib/core/triggerEngine.js +19 -5
  29. package/lib/core/triggerEngine.js.map +1 -1
  30. package/lib/instrumented/Pressable.js +4 -0
  31. package/lib/instrumented/Pressable.js.map +1 -1
  32. package/lib/instrumented/ScrollView.js +4 -0
  33. package/lib/instrumented/ScrollView.js.map +1 -1
  34. package/lib/instrumented/TextInput.js +4 -0
  35. package/lib/instrumented/TextInput.js.map +1 -1
  36. package/lib/instrumented/TouchableOpacity.js +4 -0
  37. package/lib/instrumented/TouchableOpacity.js.map +1 -1
  38. package/lib/setup/index.d.ts +0 -1
  39. package/lib/setup/index.d.ts.map +1 -1
  40. package/lib/setup/index.js +4 -6
  41. package/lib/setup/index.js.map +1 -1
  42. package/lib/survey/definitionCache.d.ts +15 -0
  43. package/lib/survey/definitionCache.d.ts.map +1 -0
  44. package/lib/survey/definitionCache.js +80 -0
  45. package/lib/survey/definitionCache.js.map +1 -0
  46. package/lib/survey/expressionEval.d.ts +13 -9
  47. package/lib/survey/expressionEval.d.ts.map +1 -1
  48. package/lib/survey/expressionEval.js +16 -289
  49. package/lib/survey/expressionEval.js.map +1 -1
  50. package/lib/survey/interpolate.d.ts.map +1 -1
  51. package/lib/survey/interpolate.js +9 -27
  52. package/lib/survey/interpolate.js.map +1 -1
  53. package/lib/survey/validate.js +10 -0
  54. package/lib/survey/validate.js.map +1 -1
  55. package/lib/types.d.ts +2 -1
  56. package/lib/types.d.ts.map +1 -1
  57. package/lib/types.js.map +1 -1
  58. package/package.json +5 -2
  59. package/lib/setup/TouchPatcher.d.ts +0 -28
  60. package/lib/setup/TouchPatcher.d.ts.map +0 -1
  61. package/lib/setup/TouchPatcher.js +0 -188
  62. package/lib/setup/TouchPatcher.js.map +0 -1
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const react_native_1 = require("react-native");
7
7
  const CXPinsight_1 = require("./CXPinsight");
8
8
  const network_1 = require("./core/network");
9
+ const definitionCache_1 = require("./survey/definitionCache");
9
10
  const session_1 = require("./core/session");
10
11
  const deviceInfo_1 = require("./core/deviceInfo");
11
12
  const mobileRecorder_1 = require("./core/mobileRecorder");
@@ -13,6 +14,9 @@ const frequencyCap_1 = require("./survey/frequencyCap");
13
14
  const triggerEngine_1 = require("./core/triggerEngine");
14
15
  const SurveyModal_1 = require("./survey/SurveyModal");
15
16
  const SetupOverlay_1 = require("./setup/SetupOverlay");
17
+ const network_2 = require("./core/network");
18
+ /** SDK chatter belongs in debug builds, not customers' production logs. */
19
+ function __cxpDebug() { return (0, network_2.getConfig)()?.debug === true; }
16
20
  const SetupCodeEntry_1 = require("./setup/SetupCodeEntry");
17
21
  const SetupController_1 = require("./setup/SetupController");
18
22
  const AccessibilityScanner_1 = require("./setup/AccessibilityScanner");
@@ -50,22 +54,40 @@ function CXPinsightProvider({ children, screenName = 'Unknown', navigationRef })
50
54
  const [scannedElements, setScannedElements] = (0, react_1.useState)([]);
51
55
  const [currentScreen, setCurrentScreen] = (0, react_1.useState)(screenName);
52
56
  // ── Survey presentation ──
57
+ // Returns whether the survey was actually presented. The trigger engine
58
+ // records a firing off this: it previously recorded unconditionally, so an
59
+ // invitation that failed to load still burned its frequency cap and, for a
60
+ // 'once' survey, was gone for good.
53
61
  const presentSurvey = (0, react_1.useCallback)(async (surveyId, options) => {
54
62
  try {
55
63
  if (surveyActiveRef.current)
56
- return;
64
+ return false;
57
65
  // Phase 4 — fetch via v1.1 public endpoint. Server-side
58
66
  // getSurveyV1 covers both the typed fast path (metadata.v1Definition)
59
67
  // AND the legacy translator fallback, so a single call works
60
68
  // regardless of when the survey was authored. The response is
61
69
  // wrapped `{success, data: v1survey}` so we unwrap once here.
62
70
  const result = await (0, network_1.sdkFetch)('GET', `/api/survey/v1/public/${surveyId}`);
63
- if (!result.success || !result.data) {
64
- CXPinsight_1.CXPinsight._getCallbacks().onError?.(new Error(`Failed to fetch survey: ${result.error}`));
65
- return;
71
+ let raw;
72
+ if (result.success && result.data) {
73
+ const envelope = result.data;
74
+ raw = envelope.data || envelope;
75
+ // Cache on the way past, so the next offline trigger has something to
76
+ // show. A successful fetch always wins over the cache, so an edit in
77
+ // the dashboard reaches respondents on their next online launch.
78
+ void (0, definitionCache_1.cacheDefinition)(surveyId, raw);
79
+ }
80
+ else {
81
+ // Offline, or the server is unreachable. A native app is offline
82
+ // routinely, and dropping the invitation here is what made a trigger
83
+ // that came due on a plane disappear permanently.
84
+ const cached = await (0, definitionCache_1.getCachedDefinition)(surveyId);
85
+ if (!cached) {
86
+ CXPinsight_1.CXPinsight._getCallbacks().onError?.(new Error(`Failed to fetch survey: ${result.error}`));
87
+ return false;
88
+ }
89
+ raw = cached;
66
90
  }
67
- const envelope = result.data;
68
- const raw = envelope.data || envelope;
69
91
  // v1.1 shape: flat questions[] + optional sections[] overlay.
70
92
  // pagesFromV1 normalizes question ids/names first, then splits
71
93
  // into pages via sections OR pageBreak type. The provider only
@@ -83,11 +105,12 @@ function CXPinsightProvider({ children, screenName = 'Unknown', navigationRef })
83
105
  // Diagnostic: shows exactly what the mobile fetched, so a "still typeform"
84
106
  // mismatch can be traced (survey id + the served presentationMode/display).
85
107
  // eslint-disable-next-line no-console
86
- console.log('[CXPinsight] survey fetched', raw.surveyId || surveyId, '| presentationMode=', presentationMode ?? '(absent)', '| display=', JSON.stringify(settings.display ?? null));
108
+ if (__cxpDebug())
109
+ console.log('[CXPinsight] survey fetched', raw.surveyId || surveyId, '| presentationMode=', presentationMode ?? '(absent)', '| display=', JSON.stringify(settings.display ?? null));
87
110
  const pages = (0, pagesFromV1_1.pagesFromV1)({ questions: rawQuestions, sections: rawSections }, undefined, presentationMode);
88
111
  if (pages.length === 0) {
89
112
  CXPinsight_1.CXPinsight._getCallbacks().onError?.(new Error('Survey has no renderable questions'));
90
- return;
113
+ return false;
91
114
  }
92
115
  // v1.1 branding pass-through. SDK sanitizer runs server-side
93
116
  // (translator.brandingToInternal), so anything we get here is
@@ -164,7 +187,12 @@ function CXPinsightProvider({ children, screenName = 'Unknown', navigationRef })
164
187
  const verdict = (envelope && envelope.data) || envelope;
165
188
  if (res?.success && verdict && verdict.eligible === false) {
166
189
  CXPinsight_1.CXPinsight._getCallbacks().onSurveySuppressed?.(surveyId, verdict.reason || 'targeting');
167
- return;
190
+ // Suppressed is not presented, so the trigger is not recorded as
191
+ // fired. It costs an eligibility check the next time the condition
192
+ // recurs, and buys the case that matters: a respondent who was not
193
+ // eligible today and is next week still gets the invitation, rather
194
+ // than having spent it while ineligible.
195
+ return false;
168
196
  }
169
197
  }
170
198
  catch {
@@ -174,7 +202,7 @@ function CXPinsightProvider({ children, screenName = 'Unknown', navigationRef })
174
202
  if (!options?.skipFrequencyCap) {
175
203
  const allowed = await (0, frequencyCap_1.canShowSurvey)(surveyId);
176
204
  if (!allowed)
177
- return;
205
+ return false;
178
206
  }
179
207
  // Impressions/dismissals go through the v1 survey surface (same
180
208
  // Job.metadata counters the legacy /widgets endpoints wrote, now
@@ -190,9 +218,11 @@ function CXPinsightProvider({ children, screenName = 'Unknown', navigationRef })
190
218
  setActiveSurveyId(surveyId);
191
219
  setActiveSurvey(surveyData);
192
220
  CXPinsight_1.CXPinsight._getCallbacks().onSurveyPresented?.(surveyId);
221
+ return true;
193
222
  }
194
223
  catch (err) {
195
224
  CXPinsight_1.CXPinsight._getCallbacks().onError?.(err instanceof Error ? err : new Error(String(err)));
225
+ return false;
196
226
  }
197
227
  }, []);
198
228
  // ── Presenter registration ──
@@ -1 +1 @@
1
- {"version":3,"file":"CXPinsightProvider.js","sourceRoot":"","sources":["../src/CXPinsightProvider.tsx"],"names":[],"mappings":";;;;AAAA,iCAAwF;AACxF,+CAAgE;AAChE,6CAA0C;AAC1C,4CAA0C;AAC1C,4CAA8C;AAC9C,kDAA0E;AAC1E,0DAAkD;AAClD,wDAA2G;AAC3G,wDAAsF;AACtF,sDAAmD;AACnD,uDAAoD;AACpD,2DAAwD;AACxD,6DAA2F;AAC3F,uEAA4F;AAG5F,sDAAmD;AACnD,kEAAmE;AAEnE,sEAAsE;AACtE,oEAAoE;AACpE,wEAAwE;AACxE,SAAS,iBAAiB,CAAC,GAA4B;IACrD,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,EAA8C,CAAC;IACjE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI;QAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC;IACnC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE;QAAE,CAAC,CAAC,IAAI,GAAG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,KAAK,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,EACtC,SAAS,EAAE,GAAG,EAAE;oBACd,gBAAgB,CAAC,KAAK,CAAC,CAAC;oBACxB,cAAc,CAAC,IAAI,CAAC,CAAC;gBACvB,CAAC,GACD,CACH,EAEA,WAAW,IAAI,CACd,uBAAC,2BAAY,IACX,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,aAAa,EACzB,QAAQ,EAAE,eAAe,EACzB,iBAAiB,EAAE,qBAAqB,GACxC,CACH,IACA,CACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Campaign attribution.
3
+ *
4
+ * The web SDK reads UTM parameters off the page URL and classifies the traffic
5
+ * channel from them and the referrer. Mobile captured neither, so a campaign
6
+ * that drove an app install or open was attributed as Direct — the traffic
7
+ * existed in the numbers, it just had no source.
8
+ *
9
+ * ## Where the parameters come from
10
+ *
11
+ * The deep link that opened the app. `parseDeepLink()` already extracts the
12
+ * query, so this only has to read it. There is no referrer in a native app, so
13
+ * the referrer half of web's classification has no analogue here — the deep
14
+ * link host is the closest thing and is recorded as `source_host` rather than
15
+ * pretending to be a referrer.
16
+ *
17
+ * Android's install referrer, which is how a Play Store campaign attributes a
18
+ * FIRST launch, needs a native module and is deliberately out of scope. Without
19
+ * it, an install driven by a campaign is attributed only if the campaign also
20
+ * deep-links into the app. Recorded so nobody assumes install attribution works.
21
+ *
22
+ * ## Ported, and tested against the original
23
+ *
24
+ * `classifyChannel` is web's UTM logic, rule for rule and in the same order —
25
+ * order matters, since a link with both `utm_medium=social` and `gclid` is Paid
26
+ * Search on web and has to be here too. The referrer rules are web-only and are
27
+ * not reproduced. A test runs web's own function against this one over a matrix
28
+ * of UTM inputs, because two channel classifiers that disagree quietly split one
29
+ * campaign's numbers across two rows in a report.
30
+ */
31
+ export type UtmParams = Record<string, string>;
32
+ /** Pull campaign parameters out of a deep link's query. Null when there are none. */
33
+ export declare function utmFromParams(params: Record<string, string> | undefined): UtmParams | null;
34
+ /**
35
+ * Traffic channel from campaign parameters.
36
+ *
37
+ * Mirrors the web SDK's UTM branch exactly, including the order — the first
38
+ * matching rule wins, so `utm_medium=social` with a `gclid` classifies as Paid
39
+ * Search on both channels rather than Social on one of them.
40
+ *
41
+ * Returns 'Direct' when there is nothing to go on. Web can do better there
42
+ * because it has a referrer; mobile genuinely cannot.
43
+ */
44
+ export declare function classifyChannel(utm: UtmParams | null): string;
45
+ export interface Attribution {
46
+ utm: UtmParams | null;
47
+ channel: string;
48
+ /** The deep link host, when there was one. Not a referrer; do not treat it as one. */
49
+ source_host?: string;
50
+ }
51
+ export declare function recordAttribution(params: Record<string, string> | undefined, host?: string): Attribution;
52
+ export declare function getFirstTouch(): Attribution | null;
53
+ export declare function clearAttribution(): void;
54
+ //# sourceMappingURL=attribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribution.d.ts","sourceRoot":"","sources":["../../src/core/attribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAMH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAM1F;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,GAAG,MAAM,CAc7D;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,SAAS,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAWD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC1C,IAAI,CAAC,EAAE,MAAM,GACZ,WAAW,CAQb;AAED,wBAAgB,aAAa,IAAI,WAAW,GAAG,IAAI,CAElD;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ /**
3
+ * Campaign attribution.
4
+ *
5
+ * The web SDK reads UTM parameters off the page URL and classifies the traffic
6
+ * channel from them and the referrer. Mobile captured neither, so a campaign
7
+ * that drove an app install or open was attributed as Direct — the traffic
8
+ * existed in the numbers, it just had no source.
9
+ *
10
+ * ## Where the parameters come from
11
+ *
12
+ * The deep link that opened the app. `parseDeepLink()` already extracts the
13
+ * query, so this only has to read it. There is no referrer in a native app, so
14
+ * the referrer half of web's classification has no analogue here — the deep
15
+ * link host is the closest thing and is recorded as `source_host` rather than
16
+ * pretending to be a referrer.
17
+ *
18
+ * Android's install referrer, which is how a Play Store campaign attributes a
19
+ * FIRST launch, needs a native module and is deliberately out of scope. Without
20
+ * it, an install driven by a campaign is attributed only if the campaign also
21
+ * deep-links into the app. Recorded so nobody assumes install attribution works.
22
+ *
23
+ * ## Ported, and tested against the original
24
+ *
25
+ * `classifyChannel` is web's UTM logic, rule for rule and in the same order —
26
+ * order matters, since a link with both `utm_medium=social` and `gclid` is Paid
27
+ * Search on web and has to be here too. The referrer rules are web-only and are
28
+ * not reproduced. A test runs web's own function against this one over a matrix
29
+ * of UTM inputs, because two channel classifiers that disagree quietly split one
30
+ * campaign's numbers across two rows in a report.
31
+ */
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.utmFromParams = utmFromParams;
34
+ exports.classifyChannel = classifyChannel;
35
+ exports.recordAttribution = recordAttribution;
36
+ exports.getFirstTouch = getFirstTouch;
37
+ exports.clearAttribution = clearAttribution;
38
+ /** The parameters web reads, in the order it reads them. */
39
+ const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content'];
40
+ const CLICK_IDS = ['gclid', 'fbclid', 'msclkid'];
41
+ /** Pull campaign parameters out of a deep link's query. Null when there are none. */
42
+ function utmFromParams(params) {
43
+ if (!params)
44
+ return null;
45
+ const utm = {};
46
+ for (const k of UTM_KEYS)
47
+ if (params[k])
48
+ utm[k] = params[k];
49
+ for (const k of CLICK_IDS)
50
+ if (params[k])
51
+ utm[k] = params[k];
52
+ return Object.keys(utm).length ? utm : null;
53
+ }
54
+ /**
55
+ * Traffic channel from campaign parameters.
56
+ *
57
+ * Mirrors the web SDK's UTM branch exactly, including the order — the first
58
+ * matching rule wins, so `utm_medium=social` with a `gclid` classifies as Paid
59
+ * Search on both channels rather than Social on one of them.
60
+ *
61
+ * Returns 'Direct' when there is nothing to go on. Web can do better there
62
+ * because it has a referrer; mobile genuinely cannot.
63
+ */
64
+ function classifyChannel(utm) {
65
+ if (utm) {
66
+ const medium = (utm.utm_medium || '').toLowerCase();
67
+ const source = (utm.utm_source || '').toLowerCase();
68
+ if (medium === 'cpc' || medium === 'ppc' || medium === 'paid' || utm.gclid || utm.msclkid)
69
+ return 'Paid Search';
70
+ if (medium === 'paid_social' || medium === 'paidsocial')
71
+ return 'Paid Social';
72
+ if (medium === 'display' || medium === 'banner' || medium === 'cpm')
73
+ return 'Display';
74
+ if (medium === 'email' || source === 'email' || source === 'newsletter')
75
+ return 'Email';
76
+ if (medium === 'social' || medium === 'social-media' || utm.fbclid)
77
+ return 'Social';
78
+ if (medium === 'affiliate')
79
+ return 'Affiliates';
80
+ if (medium === 'referral')
81
+ return 'Referral';
82
+ if (medium === 'organic')
83
+ return 'Organic Search';
84
+ }
85
+ return 'Direct';
86
+ }
87
+ /**
88
+ * First-touch attribution for the session.
89
+ *
90
+ * Held in memory only. Persisting a first-touch across installs would outlive
91
+ * the identity it describes, and the platform already has the events needed to
92
+ * reconstruct it server-side from the first attributed open.
93
+ */
94
+ let firstTouch = null;
95
+ function recordAttribution(params, host) {
96
+ const utm = utmFromParams(params);
97
+ const attribution = { utm, channel: classifyChannel(utm) };
98
+ if (host)
99
+ attribution.source_host = host;
100
+ // Only an ATTRIBUTED open replaces first-touch. Otherwise every subsequent
101
+ // plain launch would overwrite the campaign that actually brought the user in.
102
+ if (!firstTouch || (utm && !firstTouch.utm))
103
+ firstTouch = attribution;
104
+ return attribution;
105
+ }
106
+ function getFirstTouch() {
107
+ return firstTouch;
108
+ }
109
+ function clearAttribution() {
110
+ firstTouch = null;
111
+ }
112
+ //# sourceMappingURL=attribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribution.js","sourceRoot":"","sources":["../../src/core/attribution.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;;;;;;AAEH,4DAA4D;AAC5D,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,CAAU,CAAC;AAClG,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAI1D,qFAAqF;AACrF,uBAA8B,MAA0C;IACtE,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,MAAM,GAAG,GAAc,EAAE,CAAC;IAC1B,KAAK,MAAM,CAAC,IAAI,QAAQ;QAAE,IAAI,MAAM,CAAC,CAAC,CAAC;YAAE,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC5D,KAAK,MAAM,CAAC,IAAI,SAAS;QAAE,IAAI,MAAM,CAAC,CAAC,CAAC;YAAE,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7D,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9C,CAAC;AAED;;;;;;;;;GASG;AACH,yBAAgC,GAAqB;IACnD,IAAI,GAAG,EAAE,CAAC;QACR,MAAM,MAAM,GAAG,CAAC,GAAG,CAA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AAC,UAAU,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,UAAU,GAAG,WAAW,CAAC;IACtE,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;IACE,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;IACE,UAAU,GAAG,IAAI,CAAC;AACpB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /** Set by the instrumented components so this never wraps them a second time. */
2
+ export declare const CXP_INSTRUMENTED = "__cxpInstrumented";
3
+ /**
4
+ * Install the patch. Call once at init, before the tree mounts — components
5
+ * rendered before this point are picked up on their next render.
6
+ *
7
+ * Returns false when no factory could be patched, so the caller can say so
8
+ * rather than assume capture is running. The three RN-internals patches in this
9
+ * SDK all degrade to silence otherwise, and silence is how a broken upgrade goes
10
+ * unnoticed for weeks.
11
+ */
12
+ export declare function installAutoTapCapture(debug?: boolean): boolean;
13
+ export declare function uninstallAutoTapCapture(): void;
14
+ export declare function isAutoTapCaptureActive(): boolean;
15
+ //# sourceMappingURL=autoTapCapture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autoTapCapture.d.ts","sourceRoot":"","sources":["../../src/core/autoTapCapture.ts"],"names":[],"mappings":"AA8CA,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAgHpD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,UAAQ,GAAG,OAAO,CAiC5D;AAED,wBAAgB,uBAAuB,IAAI,IAAI,CAI9C;AAED,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD"}
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.CXP_INSTRUMENTED = void 0;
37
+ exports.installAutoTapCapture = installAutoTapCapture;
38
+ exports.uninstallAutoTapCapture = uninstallAutoTapCapture;
39
+ exports.isAutoTapCaptureActive = isAutoTapCaptureActive;
40
+ /**
41
+ * Automatic tap capture — click events without the app changing a single import.
42
+ *
43
+ * What already worked, and where it stopped
44
+ * ----------------------------------------
45
+ * The babel plugin rewrites `TouchableOpacity`, `Pressable`, `TextInput` and
46
+ * `ScrollView` imports in the app's OWN source to instrumented versions, and
47
+ * those report interactions. That covers the common case and is why a documented
48
+ * install is not silent.
49
+ *
50
+ * It stops at three edges, all of them ordinary:
51
+ * • TouchableHighlight, TouchableWithoutFeedback and Button are not rewritten
52
+ * • the plugin deliberately skips node_modules, so every tappable inside a UI
53
+ * library (Paper, NativeBase, gluestack, …) is invisible
54
+ * • an app that skips the babel step gets nothing
55
+ *
56
+ * This closes all three by patching the JSX factory itself, so a touch component
57
+ * is instrumented wherever it is rendered from.
58
+ *
59
+ * Why not TouchPatcher
60
+ * --------------------
61
+ * setup/TouchPatcher.ts was written for this and patches `React.createElement`.
62
+ * It is also never called from anywhere, and it would not have worked if it
63
+ * were: React Native has defaulted to the AUTOMATIC JSX runtime since 0.71, so
64
+ * JSX compiles to `jsx()`/`jsxs()` from 'react/jsx-runtime' and never touches
65
+ * createElement. This patches the automatic runtime first and the classic one as
66
+ * a fallback, which is why it works where that did not.
67
+ *
68
+ * Double-counting
69
+ * ---------------
70
+ * If the babel plugin IS installed, the app's TouchableOpacity is already the
71
+ * instrumented component — a different object from React Native's — so an
72
+ * identity check against RN's own components does not match it. The instrumented
73
+ * components also carry an explicit marker, checked here, so neither identity
74
+ * nor display-name matching can produce two events for one tap.
75
+ */
76
+ const React = __importStar(require("react"));
77
+ const react_native_1 = require("react-native");
78
+ const interactionObserver_1 = require("../instrumented/interactionObserver");
79
+ /** Set by the instrumented components so this never wraps them a second time. */
80
+ exports.CXP_INSTRUMENTED = '__cxpInstrumented';
81
+ let installed = false;
82
+ let debugMode = false;
83
+ let patched = [];
84
+ // Identity is the primary test — a Set lookup, because this runs for EVERY
85
+ // element the app renders and must cost effectively nothing on the miss path.
86
+ const TOUCHABLES = new Set([
87
+ react_native_1.TouchableOpacity,
88
+ react_native_1.TouchableHighlight,
89
+ react_native_1.TouchableWithoutFeedback,
90
+ react_native_1.Pressable,
91
+ react_native_1.Button,
92
+ ]);
93
+ // Fallback for components re-exported or wrapped such that identity is lost.
94
+ const TOUCH_NAMES = new Set([
95
+ 'TouchableOpacity',
96
+ 'TouchableHighlight',
97
+ 'TouchableWithoutFeedback',
98
+ 'Pressable',
99
+ 'Button',
100
+ 'ForwardRef(Pressable)',
101
+ ]);
102
+ function isTouchable(type) {
103
+ if (!type)
104
+ return false;
105
+ if (TOUCHABLES.has(type))
106
+ return true;
107
+ const t = type;
108
+ if (t[exports.CXP_INSTRUMENTED])
109
+ return false; // already reports for itself
110
+ return (TOUCH_NAMES.has(t.displayName ?? '') ||
111
+ TOUCH_NAMES.has(t.name ?? '') ||
112
+ TOUCH_NAMES.has(t.render?.displayName ?? '') ||
113
+ TOUCH_NAMES.has(t.render?.name ?? ''));
114
+ }
115
+ /** Best-effort visible label, without walking a deep tree. */
116
+ function labelOf(props) {
117
+ const direct = props.title ?? props.accessibilityLabel;
118
+ if (typeof direct === 'string' && direct)
119
+ return direct;
120
+ const kids = props.children;
121
+ if (typeof kids === 'string')
122
+ return kids;
123
+ if (Array.isArray(kids)) {
124
+ const first = kids.find((k) => typeof k === 'string');
125
+ if (typeof first === 'string')
126
+ return first;
127
+ }
128
+ const el = kids;
129
+ const nested = el?.props?.children;
130
+ if (typeof nested === 'string')
131
+ return nested;
132
+ return undefined;
133
+ }
134
+ function report(props, kind) {
135
+ try {
136
+ (0, interactionObserver_1.notifyInteraction)({
137
+ interactionType: kind,
138
+ elementType: 'button',
139
+ label: labelOf(props),
140
+ accessibilityLabel: props.accessibilityLabel,
141
+ testID: props.testID,
142
+ nativeID: props.nativeID,
143
+ accessibilityRole: props.accessibilityRole,
144
+ interactive: true,
145
+ // Marks the source so a double, if one ever appears, is attributable.
146
+ source: 'auto',
147
+ });
148
+ }
149
+ catch {
150
+ /* telemetry must never break a tap */
151
+ }
152
+ }
153
+ /**
154
+ * Wrap onPress/onLongPress. The original always runs, and runs even if reporting
155
+ * throws — a missed analytics event is acceptable, a dead button is not.
156
+ */
157
+ function wrapProps(props) {
158
+ if (!props)
159
+ return props;
160
+ if (!props.onPress && !props.onLongPress)
161
+ return props; // not interactive
162
+ const out = { ...props };
163
+ if (typeof props.onPress === 'function') {
164
+ const orig = props.onPress;
165
+ out.onPress = ((...args) => { report(props, 'tap'); return orig(...args); });
166
+ }
167
+ if (typeof props.onLongPress === 'function') {
168
+ const orig = props.onLongPress;
169
+ out.onLongPress = ((...args) => { report(props, 'long_press'); return orig(...args); });
170
+ }
171
+ return out;
172
+ }
173
+ /** Patch one JSX factory module in place, returning an undo. */
174
+ function patchFactory(mod, names) {
175
+ for (const name of names) {
176
+ const original = mod[name];
177
+ if (typeof original !== 'function')
178
+ continue;
179
+ const orig = original;
180
+ mod[name] = function patchedJsx(type, props, ...rest) {
181
+ // Miss path first and cheap: one Set lookup for the overwhelming majority
182
+ // of elements, which are not touchables.
183
+ if (isTouchable(type))
184
+ return orig(type, wrapProps(props), ...rest);
185
+ return orig(type, props, ...rest);
186
+ };
187
+ patched.push(() => { mod[name] = original; });
188
+ }
189
+ }
190
+ /**
191
+ * Install the patch. Call once at init, before the tree mounts — components
192
+ * rendered before this point are picked up on their next render.
193
+ *
194
+ * Returns false when no factory could be patched, so the caller can say so
195
+ * rather than assume capture is running. The three RN-internals patches in this
196
+ * SDK all degrade to silence otherwise, and silence is how a broken upgrade goes
197
+ * unnoticed for weeks.
198
+ */
199
+ function installAutoTapCapture(debug = false) {
200
+ if (installed)
201
+ return true;
202
+ debugMode = debug;
203
+ patched = [];
204
+ // Automatic runtime — the default since React Native 0.71 and what JSX in a
205
+ // modern app actually compiles to.
206
+ for (const id of ['react/jsx-runtime', 'react/jsx-dev-runtime']) {
207
+ try {
208
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
209
+ const mod = require(id);
210
+ patchFactory(mod, ['jsx', 'jsxs', 'jsxDEV']);
211
+ }
212
+ catch {
213
+ /* not present in this environment */
214
+ }
215
+ }
216
+ // Classic runtime — older toolchains, and anything calling createElement.
217
+ try {
218
+ patchFactory(React, ['createElement']);
219
+ }
220
+ catch {
221
+ /* frozen React namespace */
222
+ }
223
+ installed = patched.length > 0;
224
+ if (debugMode) {
225
+ console.log(installed
226
+ ? `[CXPinsight] Automatic tap capture active (${patched.length} factories patched)`
227
+ : '[CXPinsight] Automatic tap capture unavailable — no JSX factory could be patched');
228
+ }
229
+ return installed;
230
+ }
231
+ function uninstallAutoTapCapture() {
232
+ patched.forEach((undo) => { try {
233
+ undo();
234
+ }
235
+ catch { /* noop */ } });
236
+ patched = [];
237
+ installed = false;
238
+ }
239
+ function isAutoTapCaptureActive() {
240
+ return installed;
241
+ }
242
+ //# sourceMappingURL=autoTapCapture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autoTapCapture.js","sourceRoot":"","sources":["../../src/core/autoTapCapture.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAY,KAAK,kCAAc;AAC/B,+CAMsB;AACtB,6EAAwE;AAExE,iFAAiF;AACpE,QAAA,gBAAgB,GAAG,mBAAmB,CAAC;AAKpD,IAAI,SAAS,GAAG,KAAK,CAAC;AACtB,IAAI,SAAS,GAAG,KAAK,CAAC;AACtB,IAAI,OAAO,GAAsB,EAAE,CAAC;AAEpC,2EAA2E;AAC3E,8EAA8E;AAC9E,MAAM,UAAU,GAAG,IAAI,GAAG,CAAU;IAClC,+BAAgB;IAChB,iCAAkB;IAClB,uCAAwB;IACxB,wBAAS;IACT,qBAAM;CACP,CAAC,CAAC;AAEH,6EAA6E;AAC7E,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,kBAAkB;IAClB,oBAAoB;IACpB,0BAA0B;IAC1B,WAAW;IACX,QAAQ;IACR,uBAAuB;CACxB,CAAC,CAAC;AAEH,SAAS,WAAW,CAAC,IAAa;IAChC,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACxB,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,CAAC,GAAG,IAAuH,CAAC;IAClI,IAAI,CAAC,CAAC,QAAA,gBAAgB,CAAC;QAAE,OAAO,KAAK,CAAC,CAAS,6BAA6B;IAC5E,OAAO,CACL,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,IAAI,EAAE,CAAC;QACpC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;QAC7B,WAAW,CAAC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