@libo11y/rum-react-native 0.0.0-bootstrap.0 → 0.6.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.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * RumTouchBoundary: the one view at the root of an app whose touch events taps() records. It is a
3
+ * plain View that fills its parent and listens to touchstart, touchend and touchcancel as they
4
+ * bubble. It never asks to become the responder, so it changes no gesture, press or scroll. The
5
+ * only module that renders React Native components, so node tests never load it (boundary.test.ts
6
+ * enforces that).
7
+ */
8
+ import { type ReactElement, type ReactNode } from "react";
9
+ import { type StyleProp, type ViewStyle } from "react-native";
10
+ /** Props of RumTouchBoundary. */
11
+ export interface RumTouchBoundaryProps {
12
+ /** The app. */
13
+ readonly children?: ReactNode;
14
+ /** Style after the boundary's own flex: 1. */
15
+ readonly style?: StyleProp<ViewStyle>;
16
+ }
17
+ /**
18
+ * Wraps the app so taps() sees its touches: render it once, around everything the user can touch,
19
+ * inside any provider that must stay outermost. Without it taps() records nothing. Touches reach
20
+ * it only while taps() runs, that is while consent is granted.
21
+ */
22
+ export declare function RumTouchBoundary(props: RumTouchBoundaryProps): ReactElement;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * RumTouchBoundary: the one view at the root of an app whose touch events taps() records. It is a
3
+ * plain View that fills its parent and listens to touchstart, touchend and touchcancel as they
4
+ * bubble. It never asks to become the responder, so it changes no gesture, press or scroll. The
5
+ * only module that renders React Native components, so node tests never load it (boundary.test.ts
6
+ * enforces that).
7
+ */
8
+ import { createElement } from "react";
9
+ import { View } from "react-native";
10
+ import { dispatchTouch } from "./taps.js";
11
+ const FILL = { flex: 1 };
12
+ const onTouchStart = (e) => dispatchTouch("start", e);
13
+ const onTouchEnd = (e) => dispatchTouch("end", e);
14
+ const onTouchCancel = (e) => dispatchTouch("cancel", e);
15
+ /**
16
+ * Wraps the app so taps() sees its touches: render it once, around everything the user can touch,
17
+ * inside any provider that must stay outermost. Without it taps() records nothing. Touches reach
18
+ * it only while taps() runs, that is while consent is granted.
19
+ */
20
+ export function RumTouchBoundary(props) {
21
+ return createElement(View, {
22
+ style: props.style === undefined ? FILL : [FILL, props.style],
23
+ collapsable: false,
24
+ onTouchStart,
25
+ onTouchEnd,
26
+ onTouchCancel,
27
+ }, props.children);
28
+ }
@@ -0,0 +1,2 @@
1
+ /** The `@libo11y/rum-react-native` package version. scripts/release.ts keeps it equal to package.json. */
2
+ export declare const VERSION = "0.6.0";
@@ -0,0 +1,2 @@
1
+ /** The `@libo11y/rum-react-native` package version. scripts/release.ts keeps it equal to package.json. */
2
+ export const VERSION = "0.6.0";
package/package.json CHANGED
@@ -1,12 +1,58 @@
1
1
  {
2
2
  "name": "@libo11y/rum-react-native",
3
- "version": "0.0.0-bootstrap.0",
4
- "description": "Bootstrap placeholder for @libo11y/rum-react-native; first real release ships in the next ts/v* release.",
3
+ "version": "0.6.0",
4
+ "description": "libo11y RUM for React Native apps on Hermes: sessions that survive a relaunch, consent, session sampling with a retention buffer on device storage, screens, the app_load span and per-screen summaries over @libo11y/react-native. The handle works with @libo11y/rum-react and @libo11y/rum-connect.",
5
5
  "license": "Apache-2.0",
6
+ "type": "module",
7
+ "sideEffects": false,
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "./expo": {
14
+ "types": "./dist/expo.d.ts",
15
+ "default": "./dist/expo.js"
16
+ },
17
+ "./internal": {
18
+ "types": "./dist/internal.d.ts",
19
+ "default": "./dist/internal.js"
20
+ }
21
+ },
6
22
  "repository": {
7
23
  "type": "git",
8
- "url": "git+https://github.com/jamesainslie/libo11y.git",
24
+ "url": "git+https://github.com/libo11y/libo11y.git",
9
25
  "directory": "ts/packages/rum-react-native"
10
26
  },
11
- "homepage": "https://o11y.ing"
27
+ "dependencies": {
28
+ "@libo11y/core": "0.6.0",
29
+ "@libo11y/react-native": "0.6.0",
30
+ "@libo11y/rum": "0.6.0",
31
+ "@libo11y/spec": "0.6.0",
32
+ "@libo11y/web": "0.6.0"
33
+ },
34
+ "peerDependencies": {
35
+ "@opentelemetry/api": ">=1.10.0 <1.11.0",
36
+ "react": "^19.0.0",
37
+ "react-native": ">=0.88.0"
38
+ },
39
+ "devDependencies": {
40
+ "@libo11y/rum-connect": "0.6.0",
41
+ "@libo11y/rum-react": "0.6.0",
42
+ "@libo11y/test": "0.6.0",
43
+ "@opentelemetry/api": "1.10.0",
44
+ "@opentelemetry/sdk-trace": "3.1.1",
45
+ "@types/react": "19.3.0",
46
+ "react": "19.3.1",
47
+ "react-native": "0.88.1"
48
+ },
49
+ "files": [
50
+ "dist",
51
+ "README.md",
52
+ "LICENSE"
53
+ ],
54
+ "publishConfig": {
55
+ "access": "public",
56
+ "provenance": true
57
+ }
12
58
  }