txlemetry-react-native 4.55.1 → 5.0.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 (110) hide show
  1. package/LICENSE +353 -353
  2. package/dist/TxlemetryContext.d.ts +5 -0
  3. package/dist/TxlemetryContext.js +1 -0
  4. package/dist/TxlemetryErrorBoundary.d.ts +27 -0
  5. package/dist/TxlemetryErrorBoundary.js +1 -0
  6. package/dist/{PostHogMaskView.d.ts → TxlemetryMaskView.d.ts} +39 -39
  7. package/dist/TxlemetryMaskView.js +1 -0
  8. package/dist/TxlemetryProvider.d.ts +100 -0
  9. package/dist/TxlemetryProvider.js +1 -0
  10. package/dist/autocapture.d.ts +4 -4
  11. package/dist/autocapture.js +1 -1
  12. package/dist/error-tracking/index.d.ts +98 -98
  13. package/dist/error-tracking/index.js +1 -1
  14. package/dist/error-tracking/utils.d.ts +5 -5
  15. package/dist/frameworks/wix-navigation.d.ts +3 -3
  16. package/dist/frameworks/wix-navigation.js +1 -1
  17. package/dist/hooks/useFeatureFlag.d.ts +5 -5
  18. package/dist/hooks/useFeatureFlag.js +1 -1
  19. package/dist/hooks/useFeatureFlagResult.d.ts +3 -3
  20. package/dist/hooks/useFeatureFlagResult.js +1 -1
  21. package/dist/hooks/useFeatureFlags.d.ts +3 -3
  22. package/dist/hooks/useFeatureFlags.js +1 -1
  23. package/dist/hooks/useNavigationTracker.d.ts +6 -6
  24. package/dist/hooks/useNavigationTracker.js +1 -1
  25. package/dist/hooks/useTxlemetry.d.ts +2 -0
  26. package/dist/hooks/useTxlemetry.js +1 -0
  27. package/dist/hooks/utils.d.ts +14 -14
  28. package/dist/hooks/utils.js +1 -1
  29. package/dist/index.d.ts +14 -14
  30. package/dist/index.js +1 -1
  31. package/dist/index.txlemetry.d.ts +36 -36
  32. package/dist/index.txlemetry.js +21 -21
  33. package/dist/logs-defaults.d.ts +9 -9
  34. package/dist/native-deps.d.ts +4 -4
  35. package/dist/native-deps.js +1 -1
  36. package/dist/optional/OptionalAsyncStorage.d.ts +2 -2
  37. package/dist/optional/OptionalExpoApplication.d.ts +2 -2
  38. package/dist/optional/OptionalExpoDevice.d.ts +2 -2
  39. package/dist/optional/OptionalExpoFileSystem.d.ts +2 -2
  40. package/dist/optional/OptionalExpoFileSystemLegacy.d.ts +2 -2
  41. package/dist/optional/OptionalExpoLocalization.d.ts +2 -2
  42. package/dist/optional/OptionalPlugin.d.ts +20 -20
  43. package/dist/optional/OptionalReactNativeDeviceInfo.d.ts +2 -2
  44. package/dist/optional/OptionalReactNativeLocalize.d.ts +13 -13
  45. package/dist/optional/OptionalReactNativeNavigation.d.ts +2 -2
  46. package/dist/optional/OptionalReactNativeNavigationWix.d.ts +2 -2
  47. package/dist/optional/OptionalReactNativeSafeArea.d.ts +2 -2
  48. package/dist/optional/OptionalReactNativeSvg.d.ts +2 -2
  49. package/dist/storage.d.ts +41 -41
  50. package/dist/storage.js +1 -1
  51. package/dist/surveys/{PostHogSurveyProvider.d.ts → TxlemetrySurveyProvider.d.ts} +23 -23
  52. package/dist/surveys/TxlemetrySurveyProvider.js +1 -0
  53. package/dist/surveys/components/BottomSection.d.ts +9 -9
  54. package/dist/surveys/components/BottomSection.js +1 -1
  55. package/dist/surveys/components/Cancel.d.ts +5 -5
  56. package/dist/surveys/components/Cancel.js +1 -1
  57. package/dist/surveys/components/ConfirmationMessage.d.ts +12 -12
  58. package/dist/surveys/components/ConfirmationMessage.js +1 -1
  59. package/dist/surveys/components/QuestionHeader.d.ts +8 -8
  60. package/dist/surveys/components/QuestionHeader.js +1 -1
  61. package/dist/surveys/components/QuestionTypes.d.ts +26 -26
  62. package/dist/surveys/components/QuestionTypes.js +1 -1
  63. package/dist/surveys/components/SurveyModal.d.ts +11 -11
  64. package/dist/surveys/components/SurveyModal.js +1 -1
  65. package/dist/surveys/components/Surveys.d.ts +16 -16
  66. package/dist/surveys/components/Surveys.js +1 -1
  67. package/dist/surveys/getActiveMatchingSurveys.d.ts +2 -2
  68. package/dist/surveys/icons.d.ts +11 -11
  69. package/dist/surveys/icons.js +1 -1
  70. package/dist/surveys/index.d.ts +6 -6
  71. package/dist/surveys/index.js +1 -1
  72. package/dist/surveys/safeStyleSheet.d.ts +8 -8
  73. package/dist/surveys/survey-translations.d.ts +7 -7
  74. package/dist/surveys/survey-translations.js +1 -1
  75. package/dist/surveys/surveys-utils.d.ts +54 -54
  76. package/dist/surveys/surveys-utils.js +1 -1
  77. package/dist/surveys/useActivatedSurveys.d.ts +3 -3
  78. package/dist/surveys/useActivatedSurveys.js +1 -1
  79. package/dist/surveys/useSurveyStorage.d.ts +8 -8
  80. package/dist/surveys/useSurveyStorage.js +1 -1
  81. package/dist/tooling/expoconfig.d.ts +64 -64
  82. package/dist/tooling/expoconfig.js +1 -1
  83. package/dist/tooling/metroconfig.d.ts +21 -21
  84. package/dist/tooling/metroconfig.js +1 -1
  85. package/dist/tooling/{posthogMetroSerializer.d.ts → txlemetryMetroSerializer.d.ts} +17 -17
  86. package/dist/tooling/txlemetryMetroSerializer.js +1 -0
  87. package/dist/tooling/utils.d.ts +58 -58
  88. package/dist/tooling/vendor/expo/expoconfig.d.ts +23 -23
  89. package/dist/tooling/vendor/metro/countLines.d.ts +2 -2
  90. package/dist/tooling/vendor/metro/utils.d.ts +22 -22
  91. package/dist/{posthog-rn.d.ts → txlemetry-rn.d.ts} +1096 -1096
  92. package/dist/txlemetry-rn.js +1 -0
  93. package/dist/types.d.ts +205 -205
  94. package/dist/utils.d.ts +25 -25
  95. package/dist/version.d.ts +1 -1
  96. package/dist/version.js +1 -1
  97. package/package.json +149 -149
  98. package/tooling/txlemetry-xcode.sh +2 -2
  99. package/dist/PostHogContext.d.ts +0 -5
  100. package/dist/PostHogContext.js +0 -1
  101. package/dist/PostHogErrorBoundary.d.ts +0 -27
  102. package/dist/PostHogErrorBoundary.js +0 -1
  103. package/dist/PostHogMaskView.js +0 -1
  104. package/dist/PostHogProvider.d.ts +0 -100
  105. package/dist/PostHogProvider.js +0 -1
  106. package/dist/hooks/usePostHog.d.ts +0 -2
  107. package/dist/hooks/usePostHog.js +0 -1
  108. package/dist/posthog-rn.js +0 -1
  109. package/dist/surveys/PostHogSurveyProvider.js +0 -1
  110. package/dist/tooling/posthogMetroSerializer.js +0 -1
@@ -1,58 +1,58 @@
1
- import type { MixedOutput, Module, ReadOnlyGraph, SerializerOptions } from 'metro';
2
- import type CountingSet from 'metro/src/lib/CountingSet';
3
- export type VirtualJSOutput = {
4
- type: 'js/script/virtual';
5
- data: {
6
- code: string;
7
- lineCount: number;
8
- map: [];
9
- };
10
- };
11
- export type Bundle = {
12
- modules: Array<[id: number, code: string]>;
13
- post: string;
14
- pre: string;
15
- };
16
- export type SerializedBundle = {
17
- code: string;
18
- map: string;
19
- };
20
- export type MetroSerializerOutput = string | SerializedBundle | Promise<string | SerializedBundle>;
21
- export type MetroSerializer = (entryPoint: string, premodules: ReadonlyArray<Module>, graph: ReadOnlyGraph, options: SerializerOptions) => MetroSerializerOutput;
22
- /**
23
- * Returns minified Chunk ID code snippet.
24
- */
25
- export declare function createDebugIdSnippet(debugId: string): string;
26
- /**
27
- * Deterministically hashes a string and turns the hash into a uuid.
28
- *
29
- * https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/58271f1af2ade6b3e64d393d70376ae53bc5bd2f/packages/bundler-plugin-core/src/utils.ts#L174
30
- */
31
- export declare function stringToUUID(str: string): string;
32
- /**
33
- * Looks for an injected `_posthogChunkIds[n] = "debugId"` pattern
34
- * in the bundle source and extracts the `debugId` value from it.
35
- *
36
- * Matches both string and numeric keys for `n`, e.g.:
37
- * _posthogChunkIds["abc"] = "1234"
38
- * _posthogChunkIds[42] = "1234"
39
- */
40
- export declare function determineDebugIdFromBundleSource(code: string): string | undefined;
41
- export declare const createSet: () => CountingSet<string>;
42
- /**
43
- * Prepends the module after default required prelude modules.
44
- */
45
- export declare function prependModule(modules: readonly Module<MixedOutput>[], module: Module<VirtualJSOutput>): Module<MixedOutput>[];
46
- /**
47
- * Creates a virtual JS module with the given path and code.
48
- */
49
- export declare function createVirtualJSModule(modulePath: string, moduleCode: string): Module<VirtualJSOutput> & {
50
- setSource: (code: string) => void;
51
- };
52
- /**
53
- * Tries to load Expo config using `@expo/config` package.
54
- */
55
- export declare function getExpoConfig(projectRoot: string): Partial<{
56
- name: string;
57
- version: string;
58
- }>;
1
+ import type { MixedOutput, Module, ReadOnlyGraph, SerializerOptions } from 'metro';
2
+ import type CountingSet from 'metro/src/lib/CountingSet';
3
+ export type VirtualJSOutput = {
4
+ type: 'js/script/virtual';
5
+ data: {
6
+ code: string;
7
+ lineCount: number;
8
+ map: [];
9
+ };
10
+ };
11
+ export type Bundle = {
12
+ modules: Array<[id: number, code: string]>;
13
+ post: string;
14
+ pre: string;
15
+ };
16
+ export type SerializedBundle = {
17
+ code: string;
18
+ map: string;
19
+ };
20
+ export type MetroSerializerOutput = string | SerializedBundle | Promise<string | SerializedBundle>;
21
+ export type MetroSerializer = (entryPoint: string, premodules: ReadonlyArray<Module>, graph: ReadOnlyGraph, options: SerializerOptions) => MetroSerializerOutput;
22
+ /**
23
+ * Returns minified Chunk ID code snippet.
24
+ */
25
+ export declare function createDebugIdSnippet(debugId: string): string;
26
+ /**
27
+ * Deterministically hashes a string and turns the hash into a uuid.
28
+ *
29
+ * https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/58271f1af2ade6b3e64d393d70376ae53bc5bd2f/packages/bundler-plugin-core/src/utils.ts#L174
30
+ */
31
+ export declare function stringToUUID(str: string): string;
32
+ /**
33
+ * Looks for an injected `_posthogChunkIds[n] = "debugId"` pattern
34
+ * in the bundle source and extracts the `debugId` value from it.
35
+ *
36
+ * Matches both string and numeric keys for `n`, e.g.:
37
+ * _posthogChunkIds["abc"] = "1234"
38
+ * _posthogChunkIds[42] = "1234"
39
+ */
40
+ export declare function determineDebugIdFromBundleSource(code: string): string | undefined;
41
+ export declare const createSet: () => CountingSet<string>;
42
+ /**
43
+ * Prepends the module after default required prelude modules.
44
+ */
45
+ export declare function prependModule(modules: readonly Module<MixedOutput>[], module: Module<VirtualJSOutput>): Module<MixedOutput>[];
46
+ /**
47
+ * Creates a virtual JS module with the given path and code.
48
+ */
49
+ export declare function createVirtualJSModule(modulePath: string, moduleCode: string): Module<VirtualJSOutput> & {
50
+ setSource: (code: string) => void;
51
+ };
52
+ /**
53
+ * Tries to load Expo config using `@expo/config` package.
54
+ */
55
+ export declare function getExpoConfig(projectRoot: string): Partial<{
56
+ name: string;
57
+ version: string;
58
+ }>;
@@ -1,23 +1,23 @@
1
- import type { MixedOutput, Module, ReadOnlyGraph } from 'metro';
2
- export interface DefaultConfigOptions {
3
- /** @deprecated */
4
- mode?: 'exotic';
5
- /**
6
- * **Experimental:** Enable CSS support for Metro web, and shim on native.
7
- *
8
- * This is an experimental feature and may change in the future. The underlying implementation
9
- * is subject to change, and native support for CSS Modules may be added in the future during a non-major SDK release.
10
- */
11
- isCSSEnabled?: boolean;
12
- /**
13
- * **Experimental:** Modify premodules before a code asset is serialized
14
- *
15
- * This is an experimental feature and may change in the future. The underlying implementation
16
- * is subject to change.
17
- */
18
- unstable_beforeAssetSerializationPlugins?: ((serializationInput: {
19
- graph: ReadOnlyGraph<MixedOutput>;
20
- premodules: Module[];
21
- debugId?: string;
22
- }) => Module[])[];
23
- }
1
+ import type { MixedOutput, Module, ReadOnlyGraph } from 'metro';
2
+ export interface DefaultConfigOptions {
3
+ /** @deprecated */
4
+ mode?: 'exotic';
5
+ /**
6
+ * **Experimental:** Enable CSS support for Metro web, and shim on native.
7
+ *
8
+ * This is an experimental feature and may change in the future. The underlying implementation
9
+ * is subject to change, and native support for CSS Modules may be added in the future during a non-major SDK release.
10
+ */
11
+ isCSSEnabled?: boolean;
12
+ /**
13
+ * **Experimental:** Modify premodules before a code asset is serialized
14
+ *
15
+ * This is an experimental feature and may change in the future. The underlying implementation
16
+ * is subject to change.
17
+ */
18
+ unstable_beforeAssetSerializationPlugins?: ((serializationInput: {
19
+ graph: ReadOnlyGraph<MixedOutput>;
20
+ premodules: Module[];
21
+ debugId?: string;
22
+ }) => Module[])[];
23
+ }
@@ -1,2 +1,2 @@
1
- declare const _default: (string: string) => number;
2
- export default _default;
1
+ declare const _default: (string: string) => number;
2
+ export default _default;
@@ -1,22 +1,22 @@
1
- import type { Module, ReadOnlyGraph } from 'metro';
2
- import type { MetroSerializer } from '../../utils';
3
- /**
4
- * This function ensures that modules in source maps are sorted in the same
5
- * order as in a plain JS bundle.
6
- *
7
- * https://github.com/facebook/metro/blob/9b85f83c9cc837d8cd897aa7723be7da5b296067/packages/metro/src/Server.js#L984
8
- */
9
- export declare const getSortedModules: (graph: ReadOnlyGraph, { createModuleId, }: {
10
- createModuleId: (file: string) => number;
11
- }) => readonly Module[];
12
- /**
13
- * Creates the default Metro plain bundle serializer.
14
- * Because Metro exports only the intermediate serializer functions, we need to
15
- * assemble the final serializer ourselves. We have to work with the modules the same as Metro does
16
- * to avoid unexpected changes in the final bundle.
17
- *
18
- * This is used when the user does not provide a custom serializer.
19
- *
20
- * https://github.com/facebook/metro/blob/9b85f83c9cc837d8cd897aa7723be7da5b296067/packages/metro/src/Server.js#L244-L277
21
- */
22
- export declare const createDefaultMetroSerializer: () => MetroSerializer;
1
+ import type { Module, ReadOnlyGraph } from 'metro';
2
+ import type { MetroSerializer } from '../../utils';
3
+ /**
4
+ * This function ensures that modules in source maps are sorted in the same
5
+ * order as in a plain JS bundle.
6
+ *
7
+ * https://github.com/facebook/metro/blob/9b85f83c9cc837d8cd897aa7723be7da5b296067/packages/metro/src/Server.js#L984
8
+ */
9
+ export declare const getSortedModules: (graph: ReadOnlyGraph, { createModuleId, }: {
10
+ createModuleId: (file: string) => number;
11
+ }) => readonly Module[];
12
+ /**
13
+ * Creates the default Metro plain bundle serializer.
14
+ * Because Metro exports only the intermediate serializer functions, we need to
15
+ * assemble the final serializer ourselves. We have to work with the modules the same as Metro does
16
+ * to avoid unexpected changes in the final bundle.
17
+ *
18
+ * This is used when the user does not provide a custom serializer.
19
+ *
20
+ * https://github.com/facebook/metro/blob/9b85f83c9cc837d8cd897aa7723be7da5b296067/packages/metro/src/Server.js#L244-L277
21
+ */
22
+ export declare const createDefaultMetroSerializer: () => MetroSerializer;