@pollar/core 0.8.2 → 0.9.0-rc.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.
- package/dist/adapters/react-native-appstate.d.mts +1 -1
- package/dist/adapters/react-native-appstate.d.ts +1 -1
- package/dist/index.d.mts +947 -100
- package/dist/index.d.ts +947 -100
- package/dist/index.js +469 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +469 -58
- package/dist/index.mjs.map +1 -1
- package/dist/index.rn.d.mts +2 -2
- package/dist/index.rn.d.ts +2 -2
- package/dist/index.rn.js +615 -207
- package/dist/index.rn.js.map +1 -1
- package/dist/index.rn.mjs +615 -208
- package/dist/index.rn.mjs.map +1 -1
- package/dist/{types-84G_htcn.d.mts → types-Dyky8g0p.d.mts} +5 -12
- package/dist/{types-84G_htcn.d.ts → types-Dyky8g0p.d.ts} +5 -12
- package/package.json +1 -1
|
@@ -11,19 +11,12 @@
|
|
|
11
11
|
* the cases where `visibilitychange` lags). Default for non-browser
|
|
12
12
|
* environments is a noop that always reports "visible".
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* one inline:
|
|
14
|
+
* React Native: import the shipped `AppState`-backed provider and pass it via
|
|
15
|
+
* `PollarClientConfig.visibilityProvider`:
|
|
17
16
|
*
|
|
18
|
-
* import {
|
|
19
|
-
* const
|
|
20
|
-
*
|
|
21
|
-
* onChange: (cb) => {
|
|
22
|
-
* const sub = AppState.addEventListener('change', (s) => cb(s === 'active'));
|
|
23
|
-
* return () => sub.remove();
|
|
24
|
-
* },
|
|
25
|
-
* };
|
|
26
|
-
* new PollarClient({ apiKey, visibilityProvider: rnVisibility });
|
|
17
|
+
* import { createAppStateVisibilityProvider } from '@pollar/core/adapters/react-native-appstate';
|
|
18
|
+
* const visibilityProvider = await createAppStateVisibilityProvider();
|
|
19
|
+
* new PollarClient({ apiKey, visibilityProvider });
|
|
27
20
|
*/
|
|
28
21
|
interface VisibilityProvider {
|
|
29
22
|
isVisible(): boolean;
|
|
@@ -11,19 +11,12 @@
|
|
|
11
11
|
* the cases where `visibilitychange` lags). Default for non-browser
|
|
12
12
|
* environments is a noop that always reports "visible".
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* one inline:
|
|
14
|
+
* React Native: import the shipped `AppState`-backed provider and pass it via
|
|
15
|
+
* `PollarClientConfig.visibilityProvider`:
|
|
17
16
|
*
|
|
18
|
-
* import {
|
|
19
|
-
* const
|
|
20
|
-
*
|
|
21
|
-
* onChange: (cb) => {
|
|
22
|
-
* const sub = AppState.addEventListener('change', (s) => cb(s === 'active'));
|
|
23
|
-
* return () => sub.remove();
|
|
24
|
-
* },
|
|
25
|
-
* };
|
|
26
|
-
* new PollarClient({ apiKey, visibilityProvider: rnVisibility });
|
|
17
|
+
* import { createAppStateVisibilityProvider } from '@pollar/core/adapters/react-native-appstate';
|
|
18
|
+
* const visibilityProvider = await createAppStateVisibilityProvider();
|
|
19
|
+
* new PollarClient({ apiKey, visibilityProvider });
|
|
27
20
|
*/
|
|
28
21
|
interface VisibilityProvider {
|
|
29
22
|
isVisible(): boolean;
|