@sentry/react-native 6.9.1 → 6.11.0-beta.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 (144) hide show
  1. package/RNSentry.podspec +1 -1
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +43 -21
  4. package/android/src/main/java/io/sentry/react/RNSentryOnDrawReporterManager.java +82 -51
  5. package/android/src/main/java/io/sentry/react/RNSentryTimeToDisplay.java +37 -0
  6. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  7. package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +10 -0
  8. package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +5 -0
  9. package/dist/js/NativeRNSentry.d.ts +2 -0
  10. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  11. package/dist/js/NativeRNSentry.js.map +1 -1
  12. package/dist/js/feedback/FeedbackWidget.js +3 -3
  13. package/dist/js/feedback/FeedbackWidget.js.map +1 -1
  14. package/dist/js/index.d.ts +2 -1
  15. package/dist/js/index.d.ts.map +1 -1
  16. package/dist/js/index.js +2 -1
  17. package/dist/js/index.js.map +1 -1
  18. package/dist/js/integrations/appRegistry.d.ts +8 -0
  19. package/dist/js/integrations/appRegistry.d.ts.map +1 -0
  20. package/dist/js/integrations/appRegistry.js +43 -0
  21. package/dist/js/integrations/appRegistry.js.map +1 -0
  22. package/dist/js/integrations/default.d.ts.map +1 -1
  23. package/dist/js/integrations/default.js +5 -1
  24. package/dist/js/integrations/default.js.map +1 -1
  25. package/dist/js/integrations/exports.d.ts +2 -0
  26. package/dist/js/integrations/exports.d.ts.map +1 -1
  27. package/dist/js/integrations/exports.js +2 -0
  28. package/dist/js/integrations/exports.js.map +1 -1
  29. package/dist/js/replay/CustomMask.d.ts.map +1 -1
  30. package/dist/js/replay/CustomMask.js +3 -2
  31. package/dist/js/replay/CustomMask.js.map +1 -1
  32. package/dist/js/replay/mobilereplay.d.ts +23 -0
  33. package/dist/js/replay/mobilereplay.d.ts.map +1 -1
  34. package/dist/js/replay/mobilereplay.js +2 -0
  35. package/dist/js/replay/mobilereplay.js.map +1 -1
  36. package/dist/js/tracing/integrations/appStart.d.ts.map +1 -1
  37. package/dist/js/tracing/integrations/appStart.js +41 -9
  38. package/dist/js/tracing/integrations/appStart.js.map +1 -1
  39. package/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts +4 -0
  40. package/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts.map +1 -0
  41. package/dist/js/tracing/integrations/timeToDisplayIntegration.js +193 -0
  42. package/dist/js/tracing/integrations/timeToDisplayIntegration.js.map +1 -0
  43. package/dist/js/tracing/ops.d.ts +2 -0
  44. package/dist/js/tracing/ops.d.ts.map +1 -1
  45. package/dist/js/tracing/ops.js +2 -0
  46. package/dist/js/tracing/ops.js.map +1 -1
  47. package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
  48. package/dist/js/tracing/reactnativeprofiler.js +5 -0
  49. package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
  50. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  51. package/dist/js/tracing/reactnativetracing.js +2 -1
  52. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  53. package/dist/js/tracing/reactnavigation.d.ts +20 -2
  54. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  55. package/dist/js/tracing/reactnavigation.js +69 -41
  56. package/dist/js/tracing/reactnavigation.js.map +1 -1
  57. package/dist/js/tracing/semanticAttributes.d.ts +2 -0
  58. package/dist/js/tracing/semanticAttributes.d.ts.map +1 -1
  59. package/dist/js/tracing/semanticAttributes.js +2 -0
  60. package/dist/js/tracing/semanticAttributes.js.map +1 -1
  61. package/dist/js/tracing/span.d.ts +13 -1
  62. package/dist/js/tracing/span.d.ts.map +1 -1
  63. package/dist/js/tracing/span.js +23 -0
  64. package/dist/js/tracing/span.js.map +1 -1
  65. package/dist/js/tracing/timeToDisplayFallback.d.ts +3 -0
  66. package/dist/js/tracing/timeToDisplayFallback.d.ts.map +1 -0
  67. package/dist/js/tracing/timeToDisplayFallback.js +21 -0
  68. package/dist/js/tracing/timeToDisplayFallback.js.map +1 -0
  69. package/dist/js/tracing/timetodisplay.d.ts +29 -0
  70. package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
  71. package/dist/js/tracing/timetodisplay.js +43 -20
  72. package/dist/js/tracing/timetodisplay.js.map +1 -1
  73. package/dist/js/tracing/timetodisplaynative.d.ts.map +1 -1
  74. package/dist/js/tracing/timetodisplaynative.js +2 -1
  75. package/dist/js/tracing/timetodisplaynative.js.map +1 -1
  76. package/dist/js/tracing/timetodisplaynative.types.d.ts +1 -3
  77. package/dist/js/tracing/timetodisplaynative.types.d.ts.map +1 -1
  78. package/dist/js/tracing/timetodisplaynative.types.js.map +1 -1
  79. package/dist/js/utils/rnlibraries.d.ts +1 -1
  80. package/dist/js/utils/rnlibraries.d.ts.map +1 -1
  81. package/dist/js/utils/rnlibraries.js +5 -3
  82. package/dist/js/utils/rnlibraries.js.map +1 -1
  83. package/dist/js/utils/rnlibrariesinterface.d.ts +1 -0
  84. package/dist/js/utils/rnlibrariesinterface.d.ts.map +1 -1
  85. package/dist/js/utils/rnlibrariesinterface.js.map +1 -1
  86. package/dist/js/vendor/react-native/index.d.ts +3 -0
  87. package/dist/js/vendor/react-native/index.d.ts.map +1 -1
  88. package/dist/js/vendor/react-native/index.js.map +1 -1
  89. package/dist/js/vendor/react-navigation/types.d.ts +27 -0
  90. package/dist/js/vendor/react-navigation/types.d.ts.map +1 -0
  91. package/dist/js/vendor/react-navigation/types.js +3 -0
  92. package/dist/js/vendor/react-navigation/types.js.map +1 -0
  93. package/dist/js/version.d.ts +1 -1
  94. package/dist/js/version.d.ts.map +1 -1
  95. package/dist/js/version.js +1 -1
  96. package/dist/js/version.js.map +1 -1
  97. package/dist/js/wrapper.d.ts +8 -0
  98. package/dist/js/wrapper.d.ts.map +1 -1
  99. package/dist/js/wrapper.js +34 -0
  100. package/dist/js/wrapper.js.map +1 -1
  101. package/ios/RNSentry.mm +15 -6
  102. package/ios/RNSentryBreadcrumb.m +2 -1
  103. package/ios/RNSentryFramesTrackerListener.h +7 -3
  104. package/ios/RNSentryOnDrawReporter.h +6 -2
  105. package/ios/RNSentryOnDrawReporter.m +47 -20
  106. package/ios/RNSentryReplay.mm +3 -0
  107. package/ios/RNSentryTimeToDisplay.h +7 -0
  108. package/ios/RNSentryTimeToDisplay.m +69 -2
  109. package/ios/RNSentryVersion.m +1 -1
  110. package/package.json +4 -4
  111. package/plugin/build/withSentryAndroidGradlePlugin.js +4 -4
  112. package/scripts/sentry-xcode-debug-files.sh +1 -4
  113. package/scripts/sentry-xcode.sh +1 -4
  114. package/sentry.gradle +4 -2
  115. package/src/js/NativeRNSentry.ts +2 -0
  116. package/ts3.8/dist/js/NativeRNSentry.d.ts +2 -0
  117. package/ts3.8/dist/js/index.d.ts +2 -1
  118. package/ts3.8/dist/js/integrations/appRegistry.d.ts +8 -0
  119. package/ts3.8/dist/js/integrations/exports.d.ts +2 -0
  120. package/ts3.8/dist/js/replay/mobilereplay.d.ts +23 -0
  121. package/ts3.8/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts +4 -0
  122. package/ts3.8/dist/js/tracing/ops.d.ts +2 -0
  123. package/ts3.8/dist/js/tracing/reactnavigation.d.ts +20 -2
  124. package/ts3.8/dist/js/tracing/semanticAttributes.d.ts +2 -0
  125. package/ts3.8/dist/js/tracing/span.d.ts +13 -1
  126. package/ts3.8/dist/js/tracing/timeToDisplayFallback.d.ts +3 -0
  127. package/ts3.8/dist/js/tracing/timetodisplay.d.ts +29 -0
  128. package/ts3.8/dist/js/tracing/timetodisplaynative.types.d.ts +1 -3
  129. package/ts3.8/dist/js/utils/rnlibraries.d.ts +1 -1
  130. package/ts3.8/dist/js/utils/rnlibrariesinterface.d.ts +1 -0
  131. package/ts3.8/dist/js/vendor/react-native/index.d.ts +3 -0
  132. package/ts3.8/dist/js/vendor/react-navigation/types.d.ts +27 -0
  133. package/ts3.8/dist/js/version.d.ts +1 -1
  134. package/ts3.8/dist/js/wrapper.d.ts +8 -0
  135. package/dist/js/utils/sentryeventemitter.d.ts +0 -24
  136. package/dist/js/utils/sentryeventemitter.d.ts.map +0 -1
  137. package/dist/js/utils/sentryeventemitter.js +0 -82
  138. package/dist/js/utils/sentryeventemitter.js.map +0 -1
  139. package/dist/js/utils/sentryeventemitterfallback.d.ts +0 -19
  140. package/dist/js/utils/sentryeventemitterfallback.d.ts.map +0 -1
  141. package/dist/js/utils/sentryeventemitterfallback.js +0 -78
  142. package/dist/js/utils/sentryeventemitterfallback.js.map +0 -1
  143. package/ts3.8/dist/js/utils/sentryeventemitter.d.ts +0 -24
  144. package/ts3.8/dist/js/utils/sentryeventemitterfallback.d.ts +0 -19
@@ -1,9 +1,10 @@
1
1
  import { fill, getActiveSpan, getSpanDescendants, logger, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_STATUS_ERROR, SPAN_STATUS_OK, spanToJSON, startInactiveSpan } from '@sentry/core';
2
2
  import * as React from 'react';
3
+ import { useState } from 'react';
3
4
  import { isTurboModuleEnabled } from '../utils/environment';
4
5
  import { SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY, SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY } from './origin';
5
6
  import { getRNSentryOnDrawReporter, nativeComponentExists } from './timetodisplaynative';
6
- import { setSpanDurationAsMeasurement } from './utils';
7
+ import { setSpanDurationAsMeasurement, setSpanDurationAsMeasurementOnSpan } from './utils';
7
8
  let nativeComponentMissingLogged = false;
8
9
  /**
9
10
  * Flags of active spans with manual initial display.
@@ -24,9 +25,9 @@ export function TimeToInitialDisplay(props) {
24
25
  const activeSpan = getActiveSpan();
25
26
  if (activeSpan) {
26
27
  manualInitialDisplaySpans.set(activeSpan, true);
27
- startTimeToInitialDisplaySpan();
28
28
  }
29
- return React.createElement(TimeToDisplay, { initialDisplay: props.record }, props.children);
29
+ const parentSpanId = activeSpan && spanToJSON(activeSpan).span_id;
30
+ return React.createElement(TimeToDisplay, { initialDisplay: props.record, parentSpanId: parentSpanId }, props.children);
30
31
  }
31
32
  /**
32
33
  * Component to measure time to full display.
@@ -36,8 +37,9 @@ export function TimeToInitialDisplay(props) {
36
37
  * <TimeToInitialDisplay record />
37
38
  */
38
39
  export function TimeToFullDisplay(props) {
39
- startTimeToFullDisplaySpan();
40
- return React.createElement(TimeToDisplay, { fullDisplay: props.record }, props.children);
40
+ const activeSpan = getActiveSpan();
41
+ const parentSpanId = activeSpan && spanToJSON(activeSpan).span_id;
42
+ return React.createElement(TimeToDisplay, { fullDisplay: props.record, parentSpanId: parentSpanId }, props.children);
41
43
  }
42
44
  function TimeToDisplay(props) {
43
45
  const RNSentryOnDrawReporter = getRNSentryOnDrawReporter();
@@ -49,15 +51,16 @@ function TimeToDisplay(props) {
49
51
  logger.warn('TimeToInitialDisplay and TimeToFullDisplay are not supported on the web, Expo Go and New Architecture. Run native build or report an issue at https://github.com/getsentry/sentry-react-native');
50
52
  }, 0);
51
53
  }
52
- const onDraw = (event) => onDrawNextFrame(event);
53
54
  return (React.createElement(React.Fragment, null,
54
- React.createElement(RNSentryOnDrawReporter, { onDrawNextFrame: onDraw, initialDisplay: props.initialDisplay, fullDisplay: props.fullDisplay }),
55
+ React.createElement(RNSentryOnDrawReporter, { initialDisplay: props.initialDisplay, fullDisplay: props.fullDisplay, parentSpanId: props.parentSpanId }),
55
56
  props.children));
56
57
  }
57
58
  /**
58
59
  * Starts a new span for the initial display.
59
60
  *
60
61
  * Returns current span if already exists in the currently active span.
62
+ *
63
+ * @deprecated Use `<TimeToInitialDisplay record={boolean}/>` component instead.
61
64
  */
62
65
  export function startTimeToInitialDisplaySpan(options) {
63
66
  const activeSpan = getActiveSpan();
@@ -87,6 +90,8 @@ export function startTimeToInitialDisplaySpan(options) {
87
90
  * Starts a new span for the full display.
88
91
  *
89
92
  * Returns current span if already exists in the currently active span.
93
+ *
94
+ * @deprecated Use `<TimeToFullDisplay record={boolean}/>` component instead.
90
95
  */
91
96
  export function startTimeToFullDisplaySpan(options = {
92
97
  timeoutMs: 30000,
@@ -132,22 +137,14 @@ export function startTimeToFullDisplaySpan(options = {
132
137
  }
133
138
  return fullDisplaySpan;
134
139
  }
135
- function onDrawNextFrame(event) {
136
- logger.debug(`[TimeToDisplay] onDrawNextFrame: ${JSON.stringify(event.nativeEvent)}`);
137
- if (event.nativeEvent.type === 'fullDisplay') {
138
- return updateFullDisplaySpan(event.nativeEvent.newFrameTimestampInSeconds);
139
- }
140
- if (event.nativeEvent.type === 'initialDisplay') {
141
- return updateInitialDisplaySpan(event.nativeEvent.newFrameTimestampInSeconds);
142
- }
143
- }
144
- function updateInitialDisplaySpan(frameTimestampSeconds) {
145
- const span = startTimeToInitialDisplaySpan();
140
+ /**
141
+ *
142
+ */
143
+ export function updateInitialDisplaySpan(frameTimestampSeconds, { activeSpan = getActiveSpan(), span = startTimeToInitialDisplaySpan(), } = {}) {
146
144
  if (!span) {
147
145
  logger.warn(`[TimeToDisplay] No span found or created, possibly performance is disabled.`);
148
146
  return;
149
147
  }
150
- const activeSpan = getActiveSpan();
151
148
  if (!activeSpan) {
152
149
  logger.warn(`[TimeToDisplay] No active span found to attach ui.load.initial_display to.`);
153
150
  return;
@@ -168,7 +165,7 @@ function updateInitialDisplaySpan(frameTimestampSeconds) {
168
165
  logger.debug(`[TimeToDisplay] Updating full display with initial display (${span.spanContext().spanId}) end.`);
169
166
  updateFullDisplaySpan(frameTimestampSeconds, span);
170
167
  }
171
- setSpanDurationAsMeasurement('time_to_initial_display', span);
168
+ setSpanDurationAsMeasurementOnSpan('time_to_initial_display', span, activeSpan);
172
169
  }
173
170
  function updateFullDisplaySpan(frameTimestampSeconds, passedInitialDisplaySpan) {
174
171
  const activeSpan = getActiveSpan();
@@ -207,4 +204,30 @@ function updateFullDisplaySpan(frameTimestampSeconds, passedInitialDisplaySpan)
207
204
  logger.debug(`[TimeToDisplay] ${spanJSON.description} (${spanJSON.span_id}) span updated with end timestamp.`);
208
205
  setSpanDurationAsMeasurement('time_to_full_display', span);
209
206
  }
207
+ /**
208
+ * Creates a new TimeToFullDisplay component which triggers the full display recording every time the component is focused.
209
+ */
210
+ export function createTimeToFullDisplay({ useFocusEffect, }) {
211
+ return createTimeToDisplay({ useFocusEffect, Component: TimeToFullDisplay });
212
+ }
213
+ /**
214
+ * Creates a new TimeToInitialDisplay component which triggers the initial display recording every time the component is focused.
215
+ */
216
+ export function createTimeToInitialDisplay({ useFocusEffect, }) {
217
+ return createTimeToDisplay({ useFocusEffect, Component: TimeToInitialDisplay });
218
+ }
219
+ function createTimeToDisplay({ useFocusEffect, Component, }) {
220
+ const TimeToDisplayWrapper = (props) => {
221
+ const [focused, setFocused] = useState(false);
222
+ useFocusEffect(() => {
223
+ setFocused(true);
224
+ return () => {
225
+ setFocused(false);
226
+ };
227
+ });
228
+ return React.createElement(Component, Object.assign({}, props, { record: focused && props.record }));
229
+ };
230
+ TimeToDisplayWrapper.displayName = `TimeToDisplayWrapper`;
231
+ return TimeToDisplayWrapper;
232
+ }
210
233
  //# sourceMappingURL=timetodisplay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timetodisplay.js","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplay.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,EAAE,gCAAgC,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACnL,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,mCAAmC,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAC;AACtG,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEzF,OAAO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,OAAO,oCAAoC,CAAC,CAAC;IAE/G,4BAA4B,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["import type { Span,StartSpanOptions } from '@sentry/core';\nimport { fill, getActiveSpan, getSpanDescendants, logger, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_STATUS_ERROR, SPAN_STATUS_OK, spanToJSON, startInactiveSpan } from '@sentry/core';\nimport * as React from 'react';\n\nimport { isTurboModuleEnabled } from '../utils/environment';\nimport { SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY, SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY } from './origin';\nimport { getRNSentryOnDrawReporter, nativeComponentExists } from './timetodisplaynative';\nimport type {RNSentryOnDrawNextFrameEvent } from './timetodisplaynative.types';\nimport { setSpanDurationAsMeasurement } from './utils';\n\nlet nativeComponentMissingLogged = false;\n\n/**\n * Flags of active spans with manual initial display.\n */\nexport const manualInitialDisplaySpans = new WeakMap<Span, true>();\n\n/**\n * Flag full display called before initial display for an active span.\n */\nconst fullDisplayBeforeInitialDisplay = new WeakMap<Span, true>();\n\nexport type TimeToDisplayProps = {\n children?: React.ReactNode;\n record?: boolean;\n};\n\n/**\n * Component to measure time to initial display.\n *\n * The initial display is recorded when the component prop `record` is true.\n *\n * <TimeToInitialDisplay record />\n */\nexport function TimeToInitialDisplay(props: TimeToDisplayProps): React.ReactElement {\n const activeSpan = getActiveSpan();\n if (activeSpan) {\n manualInitialDisplaySpans.set(activeSpan, true);\n startTimeToInitialDisplaySpan();\n }\n\n return <TimeToDisplay initialDisplay={props.record}>{props.children}</TimeToDisplay>;\n}\n\n/**\n * Component to measure time to full display.\n *\n * The initial display is recorded when the component prop `record` is true.\n *\n * <TimeToInitialDisplay record />\n */\nexport function TimeToFullDisplay(props: TimeToDisplayProps): React.ReactElement {\n startTimeToFullDisplaySpan();\n return <TimeToDisplay fullDisplay={props.record}>{props.children}</TimeToDisplay>;\n}\n\nfunction TimeToDisplay(props: {\n children?: React.ReactNode;\n initialDisplay?: boolean;\n fullDisplay?: boolean;\n}): React.ReactElement {\n const RNSentryOnDrawReporter = getRNSentryOnDrawReporter();\n const isNewArchitecture = isTurboModuleEnabled();\n\n if (__DEV__ && (isNewArchitecture || (!nativeComponentExists && !nativeComponentMissingLogged))){\n nativeComponentMissingLogged = true;\n // Using setTimeout with a delay of 0 milliseconds to defer execution and avoid printing the React stack trace.\n setTimeout(() => {\n logger.warn(\n 'TimeToInitialDisplay and TimeToFullDisplay are not supported on the web, Expo Go and New Architecture. Run native build or report an issue at https://github.com/getsentry/sentry-react-native');\n }, 0);\n }\n\n const onDraw = (event: { nativeEvent: RNSentryOnDrawNextFrameEvent }): void => onDrawNextFrame(event);\n\n return (\n <>\n <RNSentryOnDrawReporter\n onDrawNextFrame={onDraw}\n initialDisplay={props.initialDisplay}\n fullDisplay={props.fullDisplay} />\n {props.children}\n </>\n );\n}\n\n/**\n * Starts a new span for the initial display.\n *\n * Returns current span if already exists in the currently active span.\n */\nexport function startTimeToInitialDisplaySpan(\n options?: Omit<StartSpanOptions, 'op' | 'name'> & {\n name?: string;\n isAutoInstrumented?: boolean\n },\n): Span | undefined {\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n logger.warn(`[TimeToDisplay] No active span found to attach ui.load.initial_display to.`);\n return undefined;\n }\n\n const existingSpan = getSpanDescendants(activeSpan).find((span) => spanToJSON(span).op === 'ui.load.initial_display');\n if (existingSpan) {\n logger.debug(`[TimeToDisplay] Found existing ui.load.initial_display span.`);\n return existingSpan\n }\n\n const initialDisplaySpan = startInactiveSpan({\n op: 'ui.load.initial_display',\n name: 'Time To Initial Display',\n startTime: spanToJSON(activeSpan).start_timestamp,\n ...options,\n });\n\n if (!initialDisplaySpan) {\n return undefined;\n }\n\n if (options?.isAutoInstrumented) {\n initialDisplaySpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY);\n } else {\n manualInitialDisplaySpans.set(activeSpan, true);\n initialDisplaySpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY);\n }\n\n return initialDisplaySpan;\n}\n\n/**\n * Starts a new span for the full display.\n *\n * Returns current span if already exists in the currently active span.\n */\nexport function startTimeToFullDisplaySpan(\n options: Omit<StartSpanOptions, 'op' | 'name'> & {\n name?: string,\n timeoutMs?: number,\n isAutoInstrumented?: boolean\n } = {\n timeoutMs: 30_000,\n },\n): Span | undefined {\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n logger.warn(`[TimeToDisplay] No active span found to attach ui.load.full_display to.`);\n return undefined;\n }\n\n const descendantSpans = getSpanDescendants(activeSpan);\n\n const initialDisplaySpan = descendantSpans.find((span) => spanToJSON(span).op === 'ui.load.initial_display');\n if (!initialDisplaySpan) {\n logger.warn(`[TimeToDisplay] No initial display span found to attach ui.load.full_display to.`);\n return undefined;\n }\n\n const existingSpan = descendantSpans.find((span) => spanToJSON(span).op === 'ui.load.full_display');\n if (existingSpan) {\n logger.debug(`[TimeToDisplay] Found existing ui.load.full_display span.`);\n return existingSpan;\n }\n\n const fullDisplaySpan = startInactiveSpan({\n op: 'ui.load.full_display',\n name: 'Time To Full Display',\n startTime: spanToJSON(initialDisplaySpan).start_timestamp,\n ...options,\n });\n if (!fullDisplaySpan) {\n return undefined;\n }\n\n const timeout = setTimeout(() => {\n if (spanToJSON(fullDisplaySpan).timestamp) {\n return;\n }\n fullDisplaySpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' });\n fullDisplaySpan.end(spanToJSON(initialDisplaySpan).timestamp);\n setSpanDurationAsMeasurement('time_to_full_display', fullDisplaySpan);\n logger.warn(`[TimeToDisplay] Full display span deadline_exceeded.`);\n }, options.timeoutMs);\n\n fill(fullDisplaySpan, 'end', (originalEnd: Span['end']) => (endTimestamp?: Parameters<Span['end']>[0]) => {\n clearTimeout(timeout);\n originalEnd.call(fullDisplaySpan, endTimestamp);\n });\n\n if (options?.isAutoInstrumented) {\n fullDisplaySpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY);\n } else {\n fullDisplaySpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY);\n }\n\n return fullDisplaySpan;\n}\n\nfunction onDrawNextFrame(event: { nativeEvent: RNSentryOnDrawNextFrameEvent }): void {\n logger.debug(`[TimeToDisplay] onDrawNextFrame: ${JSON.stringify(event.nativeEvent)}`);\n if (event.nativeEvent.type === 'fullDisplay') {\n return updateFullDisplaySpan(event.nativeEvent.newFrameTimestampInSeconds);\n }\n if (event.nativeEvent.type === 'initialDisplay') {\n return updateInitialDisplaySpan(event.nativeEvent.newFrameTimestampInSeconds);\n }\n}\n\nfunction updateInitialDisplaySpan(frameTimestampSeconds: number): void {\n const span = startTimeToInitialDisplaySpan();\n if (!span) {\n logger.warn(`[TimeToDisplay] No span found or created, possibly performance is disabled.`);\n return;\n }\n\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n logger.warn(`[TimeToDisplay] No active span found to attach ui.load.initial_display to.`);\n return;\n }\n\n if (spanToJSON(span).parent_span_id !== spanToJSON(activeSpan).span_id) {\n logger.warn(`[TimeToDisplay] Initial display span is not a child of current active span.`);\n return;\n }\n\n if (spanToJSON(span).timestamp) {\n logger.warn(`[TimeToDisplay] ${spanToJSON(span).description} span already ended.`);\n return;\n }\n\n span.end(frameTimestampSeconds);\n span.setStatus({ code: SPAN_STATUS_OK });\n logger.debug(`[TimeToDisplay] ${spanToJSON(span).description} span updated with end timestamp.`);\n\n if (fullDisplayBeforeInitialDisplay.has(activeSpan)) {\n fullDisplayBeforeInitialDisplay.delete(activeSpan);\n logger.debug(`[TimeToDisplay] Updating full display with initial display (${span.spanContext().spanId}) end.`);\n updateFullDisplaySpan(frameTimestampSeconds, span);\n }\n\n setSpanDurationAsMeasurement('time_to_initial_display', span);\n}\n\nfunction updateFullDisplaySpan(frameTimestampSeconds: number, passedInitialDisplaySpan?: Span): void {\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n logger.warn(`[TimeToDisplay] No active span found to update ui.load.full_display in.`);\n return;\n }\n\n const existingInitialDisplaySpan = passedInitialDisplaySpan\n || getSpanDescendants(activeSpan).find((span) => spanToJSON(span).op === 'ui.load.initial_display');\n const initialDisplayEndTimestamp = existingInitialDisplaySpan && spanToJSON(existingInitialDisplaySpan).timestamp;\n if (!initialDisplayEndTimestamp) {\n fullDisplayBeforeInitialDisplay.set(activeSpan, true);\n logger.warn(`[TimeToDisplay] Full display called before initial display for active span (${activeSpan.spanContext().spanId}).`);\n return;\n }\n\n const span = startTimeToFullDisplaySpan({\n isAutoInstrumented: true,\n });\n if (!span) {\n logger.warn(`[TimeToDisplay] No TimeToFullDisplay span found or created, possibly performance is disabled.`);\n return;\n }\n\n const spanJSON = spanToJSON(span);\n if (spanJSON.timestamp) {\n logger.warn(`[TimeToDisplay] ${spanJSON.description} (${spanJSON.span_id}) span already ended.`);\n return;\n }\n\n if (initialDisplayEndTimestamp > frameTimestampSeconds) {\n logger.warn(`[TimeToDisplay] Using initial display end. Full display end frame timestamp is before initial display end.`);\n span.end(initialDisplayEndTimestamp);\n } else {\n span.end(frameTimestampSeconds);\n }\n\n span.setStatus({ code: SPAN_STATUS_OK });\n logger.debug(`[TimeToDisplay] ${spanJSON.description} (${spanJSON.span_id}) span updated with end timestamp.`);\n\n setSpanDurationAsMeasurement('time_to_full_display', span);\n}\n"]}
1
+ {"version":3,"file":"timetodisplay.js","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplay.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,EAAE,gCAAgC,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,EA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AC,KAAK,CAAC,mBAAmB,QAAQ,CAAC,WAAW,KAAK,QAAQ,CAAC,OAAO,oCAAoC,CAAC,CAAC;IAE/G,4BAA4B,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;AAC7D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,EACtC,cAAc,GAMf;IACC,OAAO,mBAAmB,CAAC,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,EACzC,cAAc,GAGf;IACC,OAAO,mBAAmB,CAAC,EAAE,cAAc,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC,CAAC;AAClF,CAAC;AAED,SAAS,mBAAmB,CAAC,EAC3B,cAAc,EACd,SAAS,GAOV;IACC,MAAM,oBAAoB,GAAG,CAAC,KAAyB,EAAsB,EAAE;QAC7E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE9C,cAAc,CAAC,GAAG,EAAE;YAChB,UAAU,CAAC,IAAI,CAAC,CAAC;YACjB,OAAO,GAAG,EAAE;gBACV,UAAU,CAAC,KAAK,CAAC,CAAC;YACpB,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;QAEH,OAAO,oBAAC,SAAS,oBAAK,KAAK,IAAE,MAAM,EAAE,OAAO,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;IACnE,CAAC,CAAC;IAEF,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;IAC1D,OAAO,oBAAoB,CAAC;AAC9B,CAAC","sourcesContent":["import type { Span,StartSpanOptions } from '@sentry/core';\nimport { fill, getActiveSpan, getSpanDescendants, logger, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_STATUS_ERROR, SPAN_STATUS_OK, spanToJSON, startInactiveSpan } from '@sentry/core';\nimport * as React from 'react';\nimport { useState } from 'react';\n\nimport { isTurboModuleEnabled } from '../utils/environment';\nimport { SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY, SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY } from './origin';\nimport { getRNSentryOnDrawReporter, nativeComponentExists } from './timetodisplaynative';\nimport { setSpanDurationAsMeasurement, setSpanDurationAsMeasurementOnSpan } from './utils';\n\nlet nativeComponentMissingLogged = false;\n\n/**\n * Flags of active spans with manual initial display.\n */\nexport const manualInitialDisplaySpans = new WeakMap<Span, true>();\n\n/**\n * Flag full display called before initial display for an active span.\n */\nconst fullDisplayBeforeInitialDisplay = new WeakMap<Span, true>();\n\nexport type TimeToDisplayProps = {\n children?: React.ReactNode;\n record?: boolean;\n};\n\n/**\n * Component to measure time to initial display.\n *\n * The initial display is recorded when the component prop `record` is true.\n *\n * <TimeToInitialDisplay record />\n */\nexport function TimeToInitialDisplay(props: TimeToDisplayProps): React.ReactElement {\n const activeSpan = getActiveSpan();\n if (activeSpan) {\n manualInitialDisplaySpans.set(activeSpan, true);\n }\n\n const parentSpanId = activeSpan && spanToJSON(activeSpan).span_id;\n return <TimeToDisplay initialDisplay={props.record} parentSpanId={parentSpanId}>{props.children}</TimeToDisplay>;\n}\n\n/**\n * Component to measure time to full display.\n *\n * The initial display is recorded when the component prop `record` is true.\n *\n * <TimeToInitialDisplay record />\n */\nexport function TimeToFullDisplay(props: TimeToDisplayProps): React.ReactElement {\n const activeSpan = getActiveSpan();\n const parentSpanId = activeSpan && spanToJSON(activeSpan).span_id;\n return <TimeToDisplay fullDisplay={props.record} parentSpanId={parentSpanId}>{props.children}</TimeToDisplay>;\n}\n\nfunction TimeToDisplay(props: {\n children?: React.ReactNode;\n initialDisplay?: boolean;\n fullDisplay?: boolean;\n parentSpanId?: string;\n}): React.ReactElement {\n const RNSentryOnDrawReporter = getRNSentryOnDrawReporter();\n const isNewArchitecture = isTurboModuleEnabled();\n\n if (__DEV__ && (isNewArchitecture || (!nativeComponentExists && !nativeComponentMissingLogged))){\n nativeComponentMissingLogged = true;\n // Using setTimeout with a delay of 0 milliseconds to defer execution and avoid printing the React stack trace.\n setTimeout(() => {\n logger.warn(\n 'TimeToInitialDisplay and TimeToFullDisplay are not supported on the web, Expo Go and New Architecture. Run native build or report an issue at https://github.com/getsentry/sentry-react-native');\n }, 0);\n }\n\n return (\n <>\n <RNSentryOnDrawReporter\n initialDisplay={props.initialDisplay}\n fullDisplay={props.fullDisplay}\n parentSpanId={props.parentSpanId} />\n {props.children}\n </>\n );\n}\n\n/**\n * Starts a new span for the initial display.\n *\n * Returns current span if already exists in the currently active span.\n *\n * @deprecated Use `<TimeToInitialDisplay record={boolean}/>` component instead.\n */\nexport function startTimeToInitialDisplaySpan(\n options?: Omit<StartSpanOptions, 'op' | 'name'> & {\n name?: string;\n isAutoInstrumented?: boolean\n },\n): Span | undefined {\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n logger.warn(`[TimeToDisplay] No active span found to attach ui.load.initial_display to.`);\n return undefined;\n }\n\n const existingSpan = getSpanDescendants(activeSpan).find((span) => spanToJSON(span).op === 'ui.load.initial_display');\n if (existingSpan) {\n logger.debug(`[TimeToDisplay] Found existing ui.load.initial_display span.`);\n return existingSpan\n }\n\n const initialDisplaySpan = startInactiveSpan({\n op: 'ui.load.initial_display',\n name: 'Time To Initial Display',\n startTime: spanToJSON(activeSpan).start_timestamp,\n ...options,\n });\n\n if (!initialDisplaySpan) {\n return undefined;\n }\n\n if (options?.isAutoInstrumented) {\n initialDisplaySpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY);\n } else {\n manualInitialDisplaySpans.set(activeSpan, true);\n initialDisplaySpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY);\n }\n\n return initialDisplaySpan;\n}\n\n/**\n * Starts a new span for the full display.\n *\n * Returns current span if already exists in the currently active span.\n *\n * @deprecated Use `<TimeToFullDisplay record={boolean}/>` component instead.\n */\nexport function startTimeToFullDisplaySpan(\n options: Omit<StartSpanOptions, 'op' | 'name'> & {\n name?: string,\n timeoutMs?: number,\n isAutoInstrumented?: boolean\n } = {\n timeoutMs: 30_000,\n },\n): Span | undefined {\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n logger.warn(`[TimeToDisplay] No active span found to attach ui.load.full_display to.`);\n return undefined;\n }\n\n const descendantSpans = getSpanDescendants(activeSpan);\n\n const initialDisplaySpan = descendantSpans.find((span) => spanToJSON(span).op === 'ui.load.initial_display');\n if (!initialDisplaySpan) {\n logger.warn(`[TimeToDisplay] No initial display span found to attach ui.load.full_display to.`);\n return undefined;\n }\n\n const existingSpan = descendantSpans.find((span) => spanToJSON(span).op === 'ui.load.full_display');\n if (existingSpan) {\n logger.debug(`[TimeToDisplay] Found existing ui.load.full_display span.`);\n return existingSpan;\n }\n\n const fullDisplaySpan = startInactiveSpan({\n op: 'ui.load.full_display',\n name: 'Time To Full Display',\n startTime: spanToJSON(initialDisplaySpan).start_timestamp,\n ...options,\n });\n if (!fullDisplaySpan) {\n return undefined;\n }\n\n const timeout = setTimeout(() => {\n if (spanToJSON(fullDisplaySpan).timestamp) {\n return;\n }\n fullDisplaySpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' });\n fullDisplaySpan.end(spanToJSON(initialDisplaySpan).timestamp);\n setSpanDurationAsMeasurement('time_to_full_display', fullDisplaySpan);\n logger.warn(`[TimeToDisplay] Full display span deadline_exceeded.`);\n }, options.timeoutMs);\n\n fill(fullDisplaySpan, 'end', (originalEnd: Span['end']) => (endTimestamp?: Parameters<Span['end']>[0]) => {\n clearTimeout(timeout);\n originalEnd.call(fullDisplaySpan, endTimestamp);\n });\n\n if (options?.isAutoInstrumented) {\n fullDisplaySpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY);\n } else {\n fullDisplaySpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY);\n }\n\n return fullDisplaySpan;\n}\n\n/**\n *\n */\nexport function updateInitialDisplaySpan(\n frameTimestampSeconds: number,\n {\n activeSpan = getActiveSpan(),\n span = startTimeToInitialDisplaySpan(),\n }: {\n activeSpan?: Span;\n /**\n * Time to initial display span to update.\n */\n span?: Span;\n } = {}): void {\n if (!span) {\n logger.warn(`[TimeToDisplay] No span found or created, possibly performance is disabled.`);\n return;\n }\n\n if (!activeSpan) {\n logger.warn(`[TimeToDisplay] No active span found to attach ui.load.initial_display to.`);\n return;\n }\n\n if (spanToJSON(span).parent_span_id !== spanToJSON(activeSpan).span_id) {\n logger.warn(`[TimeToDisplay] Initial display span is not a child of current active span.`);\n return;\n }\n\n if (spanToJSON(span).timestamp) {\n logger.warn(`[TimeToDisplay] ${spanToJSON(span).description} span already ended.`);\n return;\n }\n\n span.end(frameTimestampSeconds);\n span.setStatus({ code: SPAN_STATUS_OK });\n logger.debug(`[TimeToDisplay] ${spanToJSON(span).description} span updated with end timestamp.`);\n\n if (fullDisplayBeforeInitialDisplay.has(activeSpan)) {\n fullDisplayBeforeInitialDisplay.delete(activeSpan);\n logger.debug(`[TimeToDisplay] Updating full display with initial display (${span.spanContext().spanId}) end.`);\n updateFullDisplaySpan(frameTimestampSeconds, span);\n }\n\n setSpanDurationAsMeasurementOnSpan('time_to_initial_display', span, activeSpan);\n}\n\nfunction updateFullDisplaySpan(frameTimestampSeconds: number, passedInitialDisplaySpan?: Span): void {\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n logger.warn(`[TimeToDisplay] No active span found to update ui.load.full_display in.`);\n return;\n }\n\n const existingInitialDisplaySpan = passedInitialDisplaySpan\n || getSpanDescendants(activeSpan).find((span) => spanToJSON(span).op === 'ui.load.initial_display');\n const initialDisplayEndTimestamp = existingInitialDisplaySpan && spanToJSON(existingInitialDisplaySpan).timestamp;\n if (!initialDisplayEndTimestamp) {\n fullDisplayBeforeInitialDisplay.set(activeSpan, true);\n logger.warn(`[TimeToDisplay] Full display called before initial display for active span (${activeSpan.spanContext().spanId}).`);\n return;\n }\n\n const span = startTimeToFullDisplaySpan({\n isAutoInstrumented: true,\n });\n if (!span) {\n logger.warn(`[TimeToDisplay] No TimeToFullDisplay span found or created, possibly performance is disabled.`);\n return;\n }\n\n const spanJSON = spanToJSON(span);\n if (spanJSON.timestamp) {\n logger.warn(`[TimeToDisplay] ${spanJSON.description} (${spanJSON.span_id}) span already ended.`);\n return;\n }\n\n if (initialDisplayEndTimestamp > frameTimestampSeconds) {\n logger.warn(`[TimeToDisplay] Using initial display end. Full display end frame timestamp is before initial display end.`);\n span.end(initialDisplayEndTimestamp);\n } else {\n span.end(frameTimestampSeconds);\n }\n\n span.setStatus({ code: SPAN_STATUS_OK });\n logger.debug(`[TimeToDisplay] ${spanJSON.description} (${spanJSON.span_id}) span updated with end timestamp.`);\n\n setSpanDurationAsMeasurement('time_to_full_display', span);\n}\n\n/**\n * Creates a new TimeToFullDisplay component which triggers the full display recording every time the component is focused.\n */\nexport function createTimeToFullDisplay({\n useFocusEffect,\n}: {\n /**\n * `@react-navigation/native` useFocusEffect hook.\n */\n useFocusEffect: (callback: () => void) => void\n}): React.ComponentType<TimeToDisplayProps> {\n return createTimeToDisplay({ useFocusEffect, Component: TimeToFullDisplay });\n}\n\n/**\n * Creates a new TimeToInitialDisplay component which triggers the initial display recording every time the component is focused.\n */\nexport function createTimeToInitialDisplay({\n useFocusEffect,\n}: {\n useFocusEffect: (callback: () => void) => void\n}): React.ComponentType<TimeToDisplayProps> {\n return createTimeToDisplay({ useFocusEffect, Component: TimeToInitialDisplay });\n}\n\nfunction createTimeToDisplay({\n useFocusEffect,\n Component,\n}: {\n /**\n * `@react-navigation/native` useFocusEffect hook.\n */\n useFocusEffect: (callback: () => void) => void;\n Component: typeof TimeToFullDisplay | typeof TimeToInitialDisplay;\n}): React.ComponentType<TimeToDisplayProps> {\n const TimeToDisplayWrapper = (props: TimeToDisplayProps): React.ReactElement => {\n const [focused, setFocused] = useState(false);\n\n useFocusEffect(() => {\n setFocused(true);\n return () => {\n setFocused(false);\n };\n });\n\n return <Component {...props} record={focused && props.record} />;\n };\n\n TimeToDisplayWrapper.displayName = `TimeToDisplayWrapper`;\n return TimeToDisplayWrapper;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"timetodisplaynative.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplaynative.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIlD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAI/E,eAAO,MAAM,qBAAqB,SAEzB,CAAC;AAEV;;GAEG;AACH,cAAM,0BAA2B,SAAQ,KAAK,CAAC,SAAS,CAAC,2BAA2B,CAAC;IAC5E,MAAM,IAAI,KAAK,CAAC,SAAS;CAKjC;AAED,QAAA,IAAI,sBAAsB,EAAE,aAAa,CAAC,2BAA2B,CAAC,GAAG,OAAO,0BAA0B,CAAC;AAE3G;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAO,6BAO5C,CAAA"}
1
+ {"version":3,"file":"timetodisplaynative.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplaynative.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAKlD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAI/E,eAAO,MAAM,qBAAqB,SAEzB,CAAC;AAEV;;GAEG;AACH,cAAM,0BAA2B,SAAQ,KAAK,CAAC,SAAS,CAAC,2BAA2B,CAAC;IAC5E,MAAM,IAAI,KAAK,CAAC,SAAS;CAKjC;AAED,QAAA,IAAI,sBAAsB,EAAE,aAAa,CAAC,2BAA2B,CAAC,GAAG,OAAO,0BAA0B,CAAC;AAE3G;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAO,6BAO5C,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { UIManager, View } from 'react-native';
3
+ import { isExpoGo } from '../utils/environment';
3
4
  import { ReactNativeLibraries } from '../utils/rnlibraries';
4
5
  const RNSentryOnDrawReporterClass = 'RNSentryOnDrawReporter';
5
6
  export const nativeComponentExists = UIManager.hasViewManagerConfig
@@ -20,7 +21,7 @@ let RNSentryOnDrawReporter;
20
21
  export const getRNSentryOnDrawReporter = () => {
21
22
  var _a;
22
23
  if (!RNSentryOnDrawReporter) {
23
- RNSentryOnDrawReporter = nativeComponentExists && ((_a = ReactNativeLibraries.ReactNative) === null || _a === void 0 ? void 0 : _a.requireNativeComponent)
24
+ RNSentryOnDrawReporter = !isExpoGo() && nativeComponentExists && ((_a = ReactNativeLibraries.ReactNative) === null || _a === void 0 ? void 0 : _a.requireNativeComponent)
24
25
  ? ReactNativeLibraries.ReactNative.requireNativeComponent(RNSentryOnDrawReporterClass)
25
26
  : RNSentryOnDrawReporterNoop;
26
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"timetodisplaynative.js","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplaynative.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AAE7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,CAAC,oBAAoB;IACjE,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,2BAA2B,CAAC;IAC7D,CAAC,CAAC,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,0BAA2B,SAAQ,KAAK,CAAC,SAAsC;IAC5E,MAAM;QACX,OAAO,CACL,oBAAC,IAAI,oBAAK,IAAI,CAAC,KAAK,EAAI,CACzB,CAAC;IACJ,CAAC;CACF;AAED,IAAI,sBAAsG,CAAC;AAE3G;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAkC,EAAE;;IAC3E,IAAI,CAAC,sBAAsB,EAAE;QAC3B,sBAAsB,GAAG,qBAAqB,KAAI,MAAA,oBAAoB,CAAC,WAAW,0CAAE,sBAAsB,CAAA;YACxG,CAAC,CAAC,oBAAoB,CAAC,WAAW,CAAC,sBAAsB,CAAC,2BAA2B,CAAC;YACtF,CAAC,CAAC,0BAA0B,CAAC;KAChC;IACD,OAAO,sBAAsB,CAAC;AAChC,CAAC,CAAA","sourcesContent":["import * as React from 'react';\nimport type { HostComponent } from 'react-native';\nimport { UIManager, View } from 'react-native';\n\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\nimport type { RNSentryOnDrawReporterProps } from './timetodisplaynative.types';\n\nconst RNSentryOnDrawReporterClass = 'RNSentryOnDrawReporter';\n\nexport const nativeComponentExists = UIManager.hasViewManagerConfig\n ? UIManager.hasViewManagerConfig(RNSentryOnDrawReporterClass)\n : false;\n\n/**\n * This is a fallback component for environments where the native component is not available.\n */\nclass RNSentryOnDrawReporterNoop extends React.Component<RNSentryOnDrawReporterProps> {\n public render(): React.ReactNode {\n return (\n <View {...this.props} />\n );\n }\n}\n\nlet RNSentryOnDrawReporter: HostComponent<RNSentryOnDrawReporterProps> | typeof RNSentryOnDrawReporterNoop;\n\n/**\n * Native component that reports the on draw timestamp.\n */\nexport const getRNSentryOnDrawReporter = (): typeof RNSentryOnDrawReporter => {\n if (!RNSentryOnDrawReporter) {\n RNSentryOnDrawReporter = nativeComponentExists && ReactNativeLibraries.ReactNative?.requireNativeComponent\n ? ReactNativeLibraries.ReactNative.requireNativeComponent(RNSentryOnDrawReporterClass)\n : RNSentryOnDrawReporterNoop;\n }\n return RNSentryOnDrawReporter;\n}\n"]}
1
+ {"version":3,"file":"timetodisplaynative.js","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplaynative.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AAE7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,CAAC,oBAAoB;IACjE,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,2BAA2B,CAAC;IAC7D,CAAC,CAAC,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,0BAA2B,SAAQ,KAAK,CAAC,SAAsC;IAC5E,MAAM;QACX,OAAO,CACL,oBAAC,IAAI,oBAAK,IAAI,CAAC,KAAK,EAAI,CACzB,CAAC;IACJ,CAAC;CACF;AAED,IAAI,sBAAsG,CAAC;AAE3G;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAkC,EAAE;;IAC3E,IAAI,CAAC,sBAAsB,EAAE;QAC3B,sBAAsB,GAAG,CAAC,QAAQ,EAAE,IAAI,qBAAqB,KAAI,MAAA,oBAAoB,CAAC,WAAW,0CAAE,sBAAsB,CAAA;YACvH,CAAC,CAAC,oBAAoB,CAAC,WAAW,CAAC,sBAAsB,CAAC,2BAA2B,CAAC;YACtF,CAAC,CAAC,0BAA0B,CAAC;KAChC;IACD,OAAO,sBAAsB,CAAC;AAChC,CAAC,CAAA","sourcesContent":["import * as React from 'react';\nimport type { HostComponent } from 'react-native';\nimport { UIManager, View } from 'react-native';\n\nimport { isExpoGo } from '../utils/environment';\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\nimport type { RNSentryOnDrawReporterProps } from './timetodisplaynative.types';\n\nconst RNSentryOnDrawReporterClass = 'RNSentryOnDrawReporter';\n\nexport const nativeComponentExists = UIManager.hasViewManagerConfig\n ? UIManager.hasViewManagerConfig(RNSentryOnDrawReporterClass)\n : false;\n\n/**\n * This is a fallback component for environments where the native component is not available.\n */\nclass RNSentryOnDrawReporterNoop extends React.Component<RNSentryOnDrawReporterProps> {\n public render(): React.ReactNode {\n return (\n <View {...this.props} />\n );\n }\n}\n\nlet RNSentryOnDrawReporter: HostComponent<RNSentryOnDrawReporterProps> | typeof RNSentryOnDrawReporterNoop;\n\n/**\n * Native component that reports the on draw timestamp.\n */\nexport const getRNSentryOnDrawReporter = (): typeof RNSentryOnDrawReporter => {\n if (!RNSentryOnDrawReporter) {\n RNSentryOnDrawReporter = !isExpoGo() && nativeComponentExists && ReactNativeLibraries.ReactNative?.requireNativeComponent\n ? ReactNativeLibraries.ReactNative.requireNativeComponent(RNSentryOnDrawReporterClass)\n : RNSentryOnDrawReporterNoop;\n }\n return RNSentryOnDrawReporter;\n}\n"]}
@@ -5,10 +5,8 @@ export interface RNSentryOnDrawNextFrameEvent {
5
5
  }
6
6
  export interface RNSentryOnDrawReporterProps {
7
7
  children?: React.ReactNode;
8
- onDrawNextFrame: (event: {
9
- nativeEvent: RNSentryOnDrawNextFrameEvent;
10
- }) => void;
11
8
  initialDisplay?: boolean;
12
9
  fullDisplay?: boolean;
10
+ parentSpanId?: string;
13
11
  }
14
12
  //# sourceMappingURL=timetodisplaynative.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"timetodisplaynative.types.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplaynative.types.ts"],"names":[],"mappings":";AAAA,MAAM,WAAW,4BAA4B;IAC3C,0BAA0B,EAAE,MAAM,CAAC;IACnC,IAAI,EAAE,gBAAgB,GAAG,aAAa,CAAC;CACxC;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,eAAe,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,4BAA4B,CAAA;KAAE,KAAK,IAAI,CAAC;IAChF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
1
+ {"version":3,"file":"timetodisplaynative.types.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplaynative.types.ts"],"names":[],"mappings":";AAAA,MAAM,WAAW,4BAA4B;IAC3C,0BAA0B,EAAE,MAAM,CAAC;IACnC,IAAI,EAAE,gBAAgB,GAAG,aAAa,CAAC;CACxC;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"timetodisplaynative.types.js","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplaynative.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface RNSentryOnDrawNextFrameEvent {\n newFrameTimestampInSeconds: number;\n type: 'initialDisplay' | 'fullDisplay';\n}\n\nexport interface RNSentryOnDrawReporterProps {\n children?: React.ReactNode;\n onDrawNextFrame: (event: { nativeEvent: RNSentryOnDrawNextFrameEvent }) => void;\n initialDisplay?: boolean;\n fullDisplay?: boolean;\n}\n"]}
1
+ {"version":3,"file":"timetodisplaynative.types.js","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplaynative.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface RNSentryOnDrawNextFrameEvent {\n newFrameTimestampInSeconds: number;\n type: 'initialDisplay' | 'fullDisplay';\n}\n\nexport interface RNSentryOnDrawReporterProps {\n children?: React.ReactNode;\n initialDisplay?: boolean;\n fullDisplay?: boolean;\n parentSpanId?: string;\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  import type { ReactNativeLibrariesInterface } from './rnlibrariesinterface';
2
- export declare const ReactNativeLibraries: Required<ReactNativeLibrariesInterface>;
2
+ export declare const ReactNativeLibraries: ReactNativeLibrariesInterface;
3
3
  //# sourceMappingURL=rnlibraries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rnlibraries.d.ts","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAE5E,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,6BAA6B,CAmCxE,CAAC"}
1
+ {"version":3,"file":"rnlibraries.d.ts","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAwC5E,eAAO,MAAM,oBAAoB,EAAE,6BAAqE,CAAC"}
@@ -1,7 +1,7 @@
1
- /* eslint-disable @typescript-eslint/no-var-requires */
2
1
  var _a;
3
- import { Platform, TurboModuleRegistry } from 'react-native';
4
- export const ReactNativeLibraries = {
2
+ /* eslint-disable @typescript-eslint/no-var-requires */
3
+ import { AppRegistry, Platform, TurboModuleRegistry } from 'react-native';
4
+ const InternalReactNativeLibrariesInterface = {
5
5
  Devtools: {
6
6
  parseErrorStack: (errorStack) => {
7
7
  const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');
@@ -27,6 +27,7 @@ export const ReactNativeLibraries = {
27
27
  version: (_a = Platform.constants) === null || _a === void 0 ? void 0 : _a.reactNativeVersion,
28
28
  },
29
29
  TurboModuleRegistry,
30
+ AppRegistry,
30
31
  ReactNative: {
31
32
  requireNativeComponent: (viewName) => {
32
33
  const { requireNativeComponent } = require('react-native');
@@ -34,4 +35,5 @@ export const ReactNativeLibraries = {
34
35
  },
35
36
  },
36
37
  };
38
+ export const ReactNativeLibraries = InternalReactNativeLibrariesInterface;
37
39
  //# sourceMappingURL=rnlibraries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rnlibraries.js","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.ts"],"names":[],"mappings":"AAAA,uDAAuD;;AAEvD,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,oBAAoB,GAA4C;IAC3E,QAAQ,EAAE;QACR,eAAe,EAAE,CAAC,UAAkB,EAAiC,EAAE;YACrE,MAAM,eAAe,GAAG,OAAO,CAAC,sDAAsD,CAAC,CAAC;YACxF,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,qBAAqB,EAAE,CACrB,KAAoC,EACpC,SAAmC,EACU,EAAE;YAC/C,MAAM,qBAAqB,GAAG,OAAO,CAAC,4DAA4D,CAAC,CAAC;YACpG,OAAO,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACjD,CAAC;QACD,YAAY,EAAE,GAA8B,EAAE;YAC5C,MAAM,YAAY,GAAG,OAAO,CAAC,mDAAmD,CAAC,CAAC;YAClF,OAAO,YAAY,EAAE,CAAC;QACxB,CAAC;KACF;IACD,OAAO,EAAE,OAAO,CAAC,gCAAgC,CAAC;IAClD,SAAS,EAAE;QACT,cAAc,EAAE,CAAI,IAAY,EAAE,QAAiB,EAAQ,EAAE;YAC3D,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,oDAAoD,CAAC,CAAC;YACzF,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjC,CAAC;KACF;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,MAAA,QAAQ,CAAC,SAAS,0CAAE,kBAAkB;KAChD;IACD,mBAAmB;IACnB,WAAW,EAAE;QACX,sBAAsB,EAAE,CAAI,QAAgB,EAAgC,EAAE;YAC5E,MAAM,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;YAC3D,OAAO,sBAAsB,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;KACF;CACF,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\n\nimport { Platform, TurboModuleRegistry } from 'react-native';\n\nimport type * as ReactNative from '../vendor/react-native';\nimport type { ReactNativeLibrariesInterface } from './rnlibrariesinterface';\n\nexport const ReactNativeLibraries: Required<ReactNativeLibrariesInterface> = {\n Devtools: {\n parseErrorStack: (errorStack: string): Array<ReactNative.StackFrame> => {\n const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');\n return parseErrorStack(errorStack);\n },\n symbolicateStackTrace: (\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n ): Promise<ReactNative.SymbolicatedStackTrace> => {\n const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');\n return symbolicateStackTrace(stack, extraData);\n },\n getDevServer: (): ReactNative.DevServerInfo => {\n const getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');\n return getDevServer();\n },\n },\n Promise: require('react-native/Libraries/Promise'),\n Utilities: {\n polyfillGlobal: <T>(name: string, getValue: () => T): void => {\n const { polyfillGlobal } = require('react-native/Libraries/Utilities/PolyfillFunctions');\n polyfillGlobal(name, getValue);\n },\n },\n ReactNativeVersion: {\n version: Platform.constants?.reactNativeVersion,\n },\n TurboModuleRegistry,\n ReactNative: {\n requireNativeComponent: <T>(viewName: string): ReactNative.HostComponent<T> => {\n const { requireNativeComponent } = require('react-native');\n return requireNativeComponent(viewName);\n },\n },\n};\n"]}
1
+ {"version":3,"file":"rnlibraries.js","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.ts"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAK1E,MAAM,qCAAqC,GAA4C;IACrF,QAAQ,EAAE;QACR,eAAe,EAAE,CAAC,UAAkB,EAAiC,EAAE;YACrE,MAAM,eAAe,GAAG,OAAO,CAAC,sDAAsD,CAAC,CAAC;YACxF,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,qBAAqB,EAAE,CACrB,KAAoC,EACpC,SAAmC,EACU,EAAE;YAC/C,MAAM,qBAAqB,GAAG,OAAO,CAAC,4DAA4D,CAAC,CAAC;YACpG,OAAO,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACjD,CAAC;QACD,YAAY,EAAE,GAA8B,EAAE;YAC5C,MAAM,YAAY,GAAG,OAAO,CAAC,mDAAmD,CAAC,CAAC;YAClF,OAAO,YAAY,EAAE,CAAC;QACxB,CAAC;KACF;IACD,OAAO,EAAE,OAAO,CAAC,gCAAgC,CAAC;IAClD,SAAS,EAAE;QACT,cAAc,EAAE,CAAI,IAAY,EAAE,QAAiB,EAAQ,EAAE;YAC3D,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,oDAAoD,CAAC,CAAC;YACzF,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjC,CAAC;KACF;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,MAAA,QAAQ,CAAC,SAAS,0CAAE,kBAAkB;KAChD;IACD,mBAAmB;IACnB,WAAW;IACX,WAAW,EAAE;QACX,sBAAsB,EAAE,CAAI,QAAgB,EAAgC,EAAE;YAC5E,MAAM,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;YAC3D,OAAO,sBAAsB,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAkC,qCAAqC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\nimport { AppRegistry, Platform, TurboModuleRegistry } from 'react-native';\n\nimport type * as ReactNative from '../vendor/react-native';\nimport type { ReactNativeLibrariesInterface } from './rnlibrariesinterface';\n\nconst InternalReactNativeLibrariesInterface: Required<ReactNativeLibrariesInterface> = {\n Devtools: {\n parseErrorStack: (errorStack: string): Array<ReactNative.StackFrame> => {\n const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');\n return parseErrorStack(errorStack);\n },\n symbolicateStackTrace: (\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n ): Promise<ReactNative.SymbolicatedStackTrace> => {\n const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');\n return symbolicateStackTrace(stack, extraData);\n },\n getDevServer: (): ReactNative.DevServerInfo => {\n const getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');\n return getDevServer();\n },\n },\n Promise: require('react-native/Libraries/Promise'),\n Utilities: {\n polyfillGlobal: <T>(name: string, getValue: () => T): void => {\n const { polyfillGlobal } = require('react-native/Libraries/Utilities/PolyfillFunctions');\n polyfillGlobal(name, getValue);\n },\n },\n ReactNativeVersion: {\n version: Platform.constants?.reactNativeVersion,\n },\n TurboModuleRegistry,\n AppRegistry,\n ReactNative: {\n requireNativeComponent: <T>(viewName: string): ReactNative.HostComponent<T> => {\n const { requireNativeComponent } = require('react-native');\n return requireNativeComponent(viewName);\n },\n },\n};\n\nexport const ReactNativeLibraries: ReactNativeLibrariesInterface = InternalReactNativeLibrariesInterface;\n"]}
@@ -13,6 +13,7 @@ export interface ReactNativeLibrariesInterface {
13
13
  Promise?: typeof Promise;
14
14
  ReactNativeVersion?: ReactNative.ReactNativeVersion;
15
15
  TurboModuleRegistry?: ReactNative.TurboModuleRegistry;
16
+ AppRegistry?: ReactNative.AppRegistry;
16
17
  ReactNative?: {
17
18
  requireNativeComponent?: <T>(viewName: string) => ReactNative.HostComponent<T>;
18
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rnlibrariesinterface.d.ts","sourceRoot":"","sources":["../../../src/js/utils/rnlibrariesinterface.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,WAAW,MAAM,wB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C,QAAQ,CAAC,EAAE;QACT,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACvE,qBAAqB,EAAE,CACrB,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAChC,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;QACjD,YAAY,EAAE,MAAM,WAAW,CAAC,aAAa,CAAC;KAC/C,CAAC;IACF,SAAS,CAAC,EAAE;QACV,cAAc,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;KAC9D,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC;IACpD,mBAAmB,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC;IACtD,WAAW,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC;IACtC,WAAW,CAAC,EAAE;QACZ,sBAAsB,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;KAChF,CAAC;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"rnlibrariesinterface.js","sourceRoot":"","sources":["../../../src/js/utils/rnlibrariesinterface.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,yFAAyF;AACzF,EAAE;AACF,uEAAuE;AACvE,6EAA6E;AAC7E,EAAE","sourcesContent":["//\n// This interface contains all of react-native internals Libraries used in Sentry RN SDK.\n//\n// Containing the internals in one place enables us to handle platforms\n// that don't have all the internals available. For example react-native-web.\n//\n\nimport type * as ReactNative from '../vendor/react-native';\n\nexport type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';\nexport type { EmitterSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';\n\nexport interface ReactNativeLibrariesInterface {\n Devtools?: {\n parseErrorStack: (errorStack: string) => Array<ReactNative.StackFrame>;\n symbolicateStackTrace: (\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n ) => Promise<ReactNative.SymbolicatedStackTrace>;\n getDevServer: () => ReactNative.DevServerInfo;\n };\n Utilities?: {\n polyfillGlobal: <T>(name: string, getValue: () => T) => void;\n };\n Promise?: typeof Promise;\n ReactNativeVersion?: ReactNative.ReactNativeVersion;\n TurboModuleRegistry?: ReactNative.TurboModuleRegistry;\n ReactNative?: {\n requireNativeComponent?: <T>(viewName: string) => ReactNative.HostComponent<T>;\n };\n}\n"]}
1
+ {"version":3,"file":"rnlibrariesinterface.js","sourceRoot":"","sources":["../../../src/js/utils/rnlibrariesinterface.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,yFAAyF;AACzF,EAAE;AACF,uEAAuE;AACvE,6EAA6E;AAC7E,EAAE","sourcesContent":["//\n// This interface contains all of react-native internals Libraries used in Sentry RN SDK.\n//\n// Containing the internals in one place enables us to handle platforms\n// that don't have all the internals available. For example react-native-web.\n//\n\nimport type * as ReactNative from '../vendor/react-native';\n\nexport type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';\nexport type { EmitterSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';\n\nexport interface ReactNativeLibrariesInterface {\n Devtools?: {\n parseErrorStack: (errorStack: string) => Array<ReactNative.StackFrame>;\n symbolicateStackTrace: (\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n ) => Promise<ReactNative.SymbolicatedStackTrace>;\n getDevServer: () => ReactNative.DevServerInfo;\n };\n Utilities?: {\n polyfillGlobal: <T>(name: string, getValue: () => T) => void;\n };\n Promise?: typeof Promise;\n ReactNativeVersion?: ReactNative.ReactNativeVersion;\n TurboModuleRegistry?: ReactNative.TurboModuleRegistry;\n AppRegistry?: ReactNative.AppRegistry;\n ReactNative?: {\n requireNativeComponent?: <T>(viewName: string) => ReactNative.HostComponent<T>;\n };\n}\n"]}
@@ -43,5 +43,8 @@ export type ReactNativeVersion = {
43
43
  prerelease?: string | null | undefined;
44
44
  };
45
45
  };
46
+ export type AppRegistry = {
47
+ runApplication: (appKey: string, appParameters: any) => void;
48
+ };
46
49
  export {};
47
50
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/js/vendor/react-native/index.ts"],"names":[],"mappings":";AAuBA,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAGF,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE;QACT,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QACvB,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAGH,MAAM,MAAM,sBAAsB,GAC9B,QAAQ,CAAC;IACP,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC,GACF,KAAK,CAAC,UAAU,CAAC,CAAC;AAGtB,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,OAAO,CAAC;CACjC,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,YAAY,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AK,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;KACxC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,IAAI,CAAC;CAC9D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/js/vendor/react-native/index.ts"],"names":[],"mappings":"AAAA,cAAc","sourcesContent":["// MIT License\n\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/NativeExceptionsManager.js#L17\nexport type StackFrame = {\n column?: number;\n file?: string;\n lineNumber?: number;\n methodName: string;\n collapse?: boolean;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/symbolicateStackTrace.js#L17\nexport type CodeFrame = Readonly<{\n content: string;\n location?: {\n [key: string]: unknown;\n row: number;\n column: number;\n };\n fileName: string;\n}>;\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/symbolicateStackTrace.js#L27\nexport type SymbolicatedStackTrace =\n | Readonly<{\n stack: Array<StackFrame>;\n codeFrame?: CodeFrame;\n }>\n | Array<StackFrame>;\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/getDevServer.js#L17\nexport type DevServerInfo = {\n [key: string]: unknown;\n url: string;\n fullBundleUrl?: string;\n bundleLoadedFromServer: boolean;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/TurboModule/RCTExport.d.ts#L10\ntype TurboModule = {\n getConstants?(): object;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/TurboModule/TurboModuleRegistry.d.ts#L12\nexport type TurboModuleRegistry = {\n get<T extends TurboModule>(name: string): T | null;\n getEnforcing<T extends TurboModule>(name: string): T;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/3f8340975b35767b192e3118f05d2b039676052e/packages/react-native/types/public/ReactNativeTypes.d.ts#L137\nexport interface HostComponent<P> extends Pick<React.ComponentClass<P>, Exclude<keyof React.ComponentClass<P>, 'new'>> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (props: P, context?: any): React.Component<P> & Readonly<unknown>;\n}\n\n// Adapted from https://github.com/facebook/react-native/blob/575ab7862553d7ad7bc753951ed19dcd50d59b95/packages/react-native/Libraries/Utilities/Platform.d.ts#L23-L28\nexport type ReactNativeVersion = {\n version: {\n major: number;\n minor: number;\n patch: number;\n prerelease?: string | null | undefined;\n };\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/js/vendor/react-native/index.ts"],"names":[],"mappings":"AAAA,cAAc","sourcesContent":["// MIT License\n\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/NativeExceptionsManager.js#L17\nexport type StackFrame = {\n column?: number;\n file?: string;\n lineNumber?: number;\n methodName: string;\n collapse?: boolean;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/symbolicateStackTrace.js#L17\nexport type CodeFrame = Readonly<{\n content: string;\n location?: {\n [key: string]: unknown;\n row: number;\n column: number;\n };\n fileName: string;\n}>;\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/symbolicateStackTrace.js#L27\nexport type SymbolicatedStackTrace =\n | Readonly<{\n stack: Array<StackFrame>;\n codeFrame?: CodeFrame;\n }>\n | Array<StackFrame>;\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/getDevServer.js#L17\nexport type DevServerInfo = {\n [key: string]: unknown;\n url: string;\n fullBundleUrl?: string;\n bundleLoadedFromServer: boolean;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/TurboModule/RCTExport.d.ts#L10\ntype TurboModule = {\n getConstants?(): object;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/TurboModule/TurboModuleRegistry.d.ts#L12\nexport type TurboModuleRegistry = {\n get<T extends TurboModule>(name: string): T | null;\n getEnforcing<T extends TurboModule>(name: string): T;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/3f8340975b35767b192e3118f05d2b039676052e/packages/react-native/types/public/ReactNativeTypes.d.ts#L137\nexport interface HostComponent<P> extends Pick<React.ComponentClass<P>, Exclude<keyof React.ComponentClass<P>, 'new'>> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (props: P, context?: any): React.Component<P> & Readonly<unknown>;\n}\n\n// Adapted from https://github.com/facebook/react-native/blob/575ab7862553d7ad7bc753951ed19dcd50d59b95/packages/react-native/Libraries/Utilities/Platform.d.ts#L23-L28\nexport type ReactNativeVersion = {\n version: {\n major: number;\n minor: number;\n patch: number;\n prerelease?: string | null | undefined;\n };\n};\n\nexport type AppRegistry = {\n runApplication: (appKey: string, appParameters: any) => void;\n};\n"]}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Event which fires when an action is dispatched.
3
+ * Only intended for debugging purposes, don't use it for app logic.
4
+ * This event will be emitted before state changes have been applied.
5
+ */
6
+ export type UnsafeAction = {
7
+ data: {
8
+ /**
9
+ * The action object which was dispatched.
10
+ */
11
+ action: {
12
+ readonly type: string;
13
+ readonly payload?: object | undefined;
14
+ readonly source?: string | undefined;
15
+ readonly target?: string | undefined;
16
+ };
17
+ /**
18
+ * Whether the action was a no-op, i.e. resulted any state changes.
19
+ */
20
+ noop: boolean;
21
+ /**
22
+ * Stack trace of the action, this will only be available during development.
23
+ */
24
+ stack: string | undefined;
25
+ };
26
+ };
27
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/js/vendor/react-navigation/types.ts"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE;QACJ;;WAEG;QACH,MAAM,EAAE;YACN,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;YACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACtC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SACtC,CAAC;QACF;;WAEG;QACH,IAAI,EAAE,OAAO,CAAC;QACd;;WAEG;QACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;KAC3B,CAAC;CACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ // MIT License
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/js/vendor/react-navigation/types.ts"],"names":[],"mappings":"AAAA,cAAc","sourcesContent":["// MIT License\n\n// Copyright (c) 2017 React Navigation Contributors\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n// https://github.com/react-navigation/react-navigation/blob/a656331009fcb534e0bef535e6df65ae07a228a4/packages/core/src/types.tsx#L777\n\n/**\n * Event which fires when an action is dispatched.\n * Only intended for debugging purposes, don't use it for app logic.\n * This event will be emitted before state changes have been applied.\n */\nexport type UnsafeAction = {\n data: {\n /**\n * The action object which was dispatched.\n */\n action: {\n readonly type: string;\n readonly payload?: object | undefined;\n readonly source?: string | undefined;\n readonly target?: string | undefined;\n };\n /**\n * Whether the action was a no-op, i.e. resulted any state changes.\n */\n noop: boolean;\n /**\n * Stack trace of the action, this will only be available during development.\n */\n stack: string | undefined;\n };\n};\n"]}
@@ -1,4 +1,4 @@
1
1
  export declare const SDK_PACKAGE_NAME = "npm:@sentry/react-native";
2
2
  export declare const SDK_NAME = "sentry.javascript.react-native";
3
- export declare const SDK_VERSION = "6.9.1";
3
+ export declare const SDK_VERSION = "6.11.0-beta.0";
4
4
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6BAA6B,CAAC;AAC3D,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AACzD,eAAO,MAAM,WAAW,UAAU,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6BAA6B,CAAC;AAC3D,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AACzD,eAAO,MAAM,WAAW,kBAAkB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';
2
2
  export const SDK_NAME = 'sentry.javascript.react-native';
3
- export const SDK_VERSION = '6.9.1';
3
+ export const SDK_VERSION = '6.11.0-beta.0';
4
4
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '6.9.1';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '6.11.0-beta.0';\n"]}
@@ -75,10 +75,18 @@ interface SentryNativeWrapper {
75
75
  crashedLastRun(): Promise<boolean | null>;
76
76
  getNewScreenTimeToDisplay(): Promise<number | null | undefined>;
77
77
  getDataFromUri(uri: string): Promise<Uint8Array | null>;
78
+ popTimeToDisplayFor(key: string): Promise<number | undefined | null>;
79
+ setActiveSpanId(spanId: string): void;
78
80
  }
79
81
  /**
80
82
  * Our internal interface for calling native functions
81
83
  */
82
84
  export declare const NATIVE: SentryNativeWrapper;
85
+ /**
86
+ * Fethces the data from the given uri in Uint8Array format.
87
+ * @param uri string
88
+ * @returns Uint8Array | null
89
+ */
90
+ export declare function getDataFromUri(uri: string): Promise<Uint8Array | null>;
83
91
  export {};
84
92
  //# sourceMappingURL=wrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../src/js/wrapper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,OAAO,EACP,aAAa,EACb,IAAI,EACL,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAiB,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGvD,OAAO,KAAK,EACV,sBAAsB,EACtB,4BAA4B,EAC5B,oBAAoB,EACpB,qBAAqB,EAErB,iBAAiB,EACjB,IAAI,EACL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAOjE;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,GAAG,SAAS,CAIpD;AAID,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,wBAAwB,CAAC,GAAG;IACjE,YAAY,EAAE,MAAM,GA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AC;IAC/E,yCAAyC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3D,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC5D,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAAC;IAEpC,cAAc,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAC1C,yBAAyB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAEhE,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACxD,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC;IAErE,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAID;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,mBA4rBpB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAE5E"}
@@ -567,6 +567,30 @@ export const NATIVE = {
567
567
  }
568
568
  });
569
569
  },
570
+ popTimeToDisplayFor(key) {
571
+ if (!this.enableNative || !this._isModuleLoaded(RNSentry)) {
572
+ return Promise.resolve(null);
573
+ }
574
+ try {
575
+ return RNSentry.popTimeToDisplayFor(key);
576
+ }
577
+ catch (error) {
578
+ logger.error('Error:', error);
579
+ return null;
580
+ }
581
+ },
582
+ setActiveSpanId(spanId) {
583
+ if (!this.enableNative || !this._isModuleLoaded(RNSentry)) {
584
+ return undefined;
585
+ }
586
+ try {
587
+ RNSentry.setActiveSpanId(spanId);
588
+ }
589
+ catch (error) {
590
+ logger.error('Error:', error);
591
+ return undefined;
592
+ }
593
+ },
570
594
  /**
571
595
  * Gets the event from envelopeItem and applies the level filter to the selected event.
572
596
  * @param data An envelope item containing the event.
@@ -632,4 +656,14 @@ export const NATIVE = {
632
656
  nativeIsReady: false,
633
657
  platform: Platform.OS,
634
658
  };
659
+ /**
660
+ * Fethces the data from the given uri in Uint8Array format.
661
+ * @param uri string
662
+ * @returns Uint8Array | null
663
+ */
664
+ export function getDataFromUri(uri) {
665
+ return __awaiter(this, void 0, void 0, function* () {
666
+ return NATIVE.getDataFromUri(uri);
667
+ });
668
+ }
635
669
  //# sourceMappingURL=wrapper.js.map