@userflow-tech/react-native 0.4.2 → 0.4.3
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.
- package/README.md +59 -13
- package/lib/commonjs/version.js +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/version.ts +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Userflow React Native SDK
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
modals, and banners authored in the Userflow dashboard — without shipping a new
|
|
5
|
-
app release for every content change.
|
|
3
|
+
> ⚠️ This SDK is under active development and evolving quickly.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Release notes are tracked in the [Userflow React Native SDK Guide](https://app.notion.com/p/Userflow-React-Native-SDK-Guide-3fba9809ce89800682c3ea9078b0f210?source=copy_link).
|
|
6
|
+
|
|
7
|
+
`@userflow-tech/react-native` is the official Userflow SDK for React Native and
|
|
8
|
+
Expo. Deliver guided flows, tooltips, modals, and banners authored in the
|
|
9
|
+
Userflow dashboard — without shipping a new app release for every content
|
|
10
|
+
change.
|
|
11
|
+
|
|
12
|
+
The SDK connects to the Userflow backend using the same protocol as
|
|
13
|
+
userflow.js, so flows built in the Userflow dashboard work across web and
|
|
14
|
+
mobile from a single place.
|
|
8
15
|
|
|
9
16
|
## Requirements
|
|
10
17
|
|
|
@@ -399,6 +406,12 @@ To preview draft flows from the Userflow builder onto a device (QR / deep link):
|
|
|
399
406
|
}
|
|
400
407
|
```
|
|
401
408
|
|
|
409
|
+
`schemeId` is the env's `scheme_id` from the dashboard, copied exactly. It is
|
|
410
|
+
`userflow-` followed by an opaque id. Do not rely on its shape. Preview links
|
|
411
|
+
(`…://?token=…`) and pairing links (`…://?pairing_token=…`) both ride that one
|
|
412
|
+
scheme. Expo Router needs no extra host files for these root-form URLs, and
|
|
413
|
+
pairing works in every build, including release.
|
|
414
|
+
|
|
402
415
|
Deep-link / pairing helpers:
|
|
403
416
|
|
|
404
417
|
| Member | Description |
|
|
@@ -414,7 +427,20 @@ Full scheme registration, Linking ownership, and verify commands:
|
|
|
414
427
|
|
|
415
428
|
## Connection resilience
|
|
416
429
|
|
|
417
|
-
|
|
430
|
+
After `Userflow.init`, the SDK suspends the socket when the app leaves the
|
|
431
|
+
foreground (after a short grace window) and resumes on return:
|
|
432
|
+
|
|
433
|
+
| Away duration | Behavior |
|
|
434
|
+
| --------------------- | ---------------------------------------------------- |
|
|
435
|
+
| < 3 seconds | No suspend/resume (transient blur / quick switch) |
|
|
436
|
+
| 3 seconds – 5 minutes | Reconnect and **keep** the mid-flow session |
|
|
437
|
+
| ≥ 5 minutes | **Clear** the local mid-flow session, then reconnect |
|
|
438
|
+
|
|
439
|
+
Foreground idle for 5 minutes also suspends (skipped while any mid-flow session
|
|
440
|
+
is active).
|
|
441
|
+
|
|
442
|
+
Recovery from a dropped or silently-dead socket works out of the box, with no
|
|
443
|
+
extra dependencies or host setup:
|
|
418
444
|
|
|
419
445
|
1. Reconnect ladder on socket `close` / `error`
|
|
420
446
|
2. Adaptive heartbeat with a short reply deadline
|
|
@@ -516,16 +542,38 @@ These guides also ship in the package, under
|
|
|
516
542
|
| [docs/identity-verification.md](https://unpkg.com/@userflow-tech/react-native/docs/identity-verification.md) | HMAC signature on your backend |
|
|
517
543
|
| [docs/troubleshooting.md](https://unpkg.com/@userflow-tech/react-native/docs/troubleshooting.md) | Symptom → cause for common integration failures |
|
|
518
544
|
|
|
519
|
-
##
|
|
545
|
+
## Current status
|
|
546
|
+
|
|
547
|
+
### Shipped
|
|
548
|
+
|
|
549
|
+
- Flow rendering — tooltips and modals
|
|
550
|
+
- Manual element targeting (`userflowId` / `testID` / `nativeID`, or `useUserflowAnchor`)
|
|
551
|
+
- Screen tracking — Expo Router (`UserflowExpoRouterScreenTracker`) and React
|
|
552
|
+
Navigation (`WithUserflowReactNavigation`); must be mounted by the host
|
|
553
|
+
- User & group attributes (`identify`, `identifyAnonymous`, `group`) and custom events (`track`)
|
|
554
|
+
- Embed banners (overlay and inline `EmbedBannerPlaceholder`)
|
|
555
|
+
- Client conditions — `ELEMENT` PRESENT / NOT_PRESENT on manual anchors and
|
|
556
|
+
AUTO selectors (guarded: weak evidence stays unknown)
|
|
557
|
+
- Connection lifecycle — suspend/resume, reconnect, optional NetInfo
|
|
558
|
+
|
|
559
|
+
### Experimental
|
|
520
560
|
|
|
521
561
|
- AUTO / codeless element targeting (exact-id fast path + scored matcher;
|
|
522
562
|
scored path needs Babel full mode to populate the auto-anchor registry).
|
|
523
563
|
See [docs/anchoring.md](https://unpkg.com/@userflow-tech/react-native/docs/anchoring.md).
|
|
524
|
-
- Build-time stamping with `@userflow-tech/react-native/babel-plugin
|
|
564
|
+
- Build-time stamping with `@userflow-tech/react-native/babel-plugin`
|
|
565
|
+
(`stampOnly: true` stamps `nativeID` only; full mode is the default). Jest
|
|
525
566
|
runs the plugin too, which changes snapshots. Read
|
|
526
567
|
[Babel plugin and snapshot tests](#babel-plugin-and-snapshot-tests) before
|
|
527
568
|
enabling it.
|
|
528
569
|
|
|
570
|
+
### Not available yet
|
|
571
|
+
|
|
572
|
+
- `INPUT_VALUE` / `FILLED_IN_INPUT` client conditions
|
|
573
|
+
|
|
574
|
+
Flows gated on unsupported client conditions stay unknown and **never start**.
|
|
575
|
+
See [docs/troubleshooting.md](https://unpkg.com/@userflow-tech/react-native/docs/troubleshooting.md).
|
|
576
|
+
|
|
529
577
|
## Install diagnostics
|
|
530
578
|
|
|
531
579
|
In development, the first `Userflow.init` checks native module registration and
|
|
@@ -667,9 +715,7 @@ instead. Snapshots then gain only `nativeID` and `collapsable`, and stamped file
|
|
|
667
715
|
skip the SDK import. The plugin's `exclude` option does not help here: it skips
|
|
668
716
|
the files it lists, not the components a test renders.
|
|
669
717
|
|
|
670
|
-
##
|
|
718
|
+
## Related
|
|
671
719
|
|
|
672
|
-
-
|
|
673
|
-
|
|
674
|
-
Flows gated on unsupported client conditions stay unknown and **never start**.
|
|
675
|
-
See [docs/troubleshooting.md](https://unpkg.com/@userflow-tech/react-native/docs/troubleshooting.md).
|
|
720
|
+
- [Userflow](https://userflow.com)
|
|
721
|
+
- [userflow.js](https://github.com/userflow/userflow.js) — Web SDK
|
package/lib/commonjs/version.js
CHANGED
|
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SDK_VERSION = void 0;
|
|
7
7
|
/** Generated by scripts/write-version.mjs — do not edit. */
|
|
8
|
-
const SDK_VERSION = exports.SDK_VERSION = '0.4.
|
|
8
|
+
const SDK_VERSION = exports.SDK_VERSION = '0.4.3';
|
|
9
9
|
//# sourceMappingURL=version.js.map
|
package/lib/module/version.js
CHANGED
package/package.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Generated by scripts/write-version.mjs — do not edit. */
|
|
2
|
-
export const SDK_VERSION = '0.4.
|
|
2
|
+
export const SDK_VERSION = '0.4.3';
|
package/vendor/core/package.json
CHANGED