@voltro/react-native 0.87.0 → 0.88.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.
@@ -1,4 +1,4 @@
1
- //#region src/backgroundSync.ts
1
+ // src/backgroundSync.ts
2
2
  var e = {
3
3
  status: "idle",
4
4
  isForeground: !0,
@@ -43,5 +43,4 @@ var e = {
43
43
  };
44
44
  }
45
45
  }, n = (e, t, n, r = !1) => !(!n.enabled || e.status === "syncing" || !r && !e.isForeground || !r && n.intervalMs > 0 && e.lastAttemptAt !== void 0 && t - e.lastAttemptAt < n.intervalMs);
46
- //#endregion
47
46
  export { t as backgroundSyncReducer, e as initialBackgroundSyncState, n as shouldSync };
@@ -1,4 +1,4 @@
1
- //#region src/backgroundSyncTask.ts
1
+ // src/backgroundSyncTask.ts
2
2
  var e = "voltro-background-sync", t = (e) => {
3
3
  let t = e.name ?? "voltro-background-sync", n = e.backgroundFetch.BackgroundFetchResult, r = async () => {
4
4
  try {
@@ -27,5 +27,4 @@ var e = "voltro-background-sync", t = (e) => {
27
27
  runNow: r
28
28
  };
29
29
  };
30
- //#endregion
31
30
  export { e as DEFAULT_BACKGROUND_SYNC_TASK, t as defineBackgroundSyncTask };
@@ -1,6 +1,6 @@
1
1
  import { browserOnlineSource as e, browserOnlineSource as t } from "@voltro/client";
2
2
  import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
3
- //#region src/connection.tsx
3
+ // src/connection.tsx
4
4
  var o = {
5
5
  localFirst: !0,
6
6
  optimistic: !0,
@@ -47,5 +47,4 @@ var o = {
47
47
  reportSuccess: g
48
48
  };
49
49
  };
50
- //#endregion
51
50
  export { t as browserOnlineSource, s as deriveConnectionStatus, c as netInfoOnlineSource, o as offlineFirstDefaults, l as useMobileConnectionStatus };
package/dist/devices.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/devices.ts
1
+ // src/devices.ts
2
2
  var e = [
3
3
  "ios",
4
4
  "android",
@@ -24,5 +24,4 @@ var e = [
24
24
  registeredAt: n()
25
25
  };
26
26
  }, c = (e, t, n) => e(s(t, n));
27
- //#endregion
28
27
  export { n as DEVICES_TABLE, e as DEVICE_PLATFORMS, t as isDevicePlatform, c as registerDevice, s as resolveDeviceRegistration };
@@ -1,5 +1,5 @@
1
1
  import { buildApiRuntime as e, makeApiRoleSocketTracker as t, recoveryCoordinatorFor as n, startApiSupervisor as r } from "@voltro/client";
2
- //#region src/mobileRuntime.ts
2
+ // src/mobileRuntime.ts
3
3
  var i = (e, t) => {
4
4
  let n = typeof t == "object" && !Array.isArray(t) ? void 0 : t, r = globalThis.WebSocket;
5
5
  if (r === void 0) throw Error("startMobileApis: no global WebSocket. React Native provides one; if you are running these bindings somewhere else, pass `webSocketConstructor`.");
@@ -66,5 +66,4 @@ var i = (e, t) => {
66
66
  }
67
67
  return r;
68
68
  };
69
- //#endregion
70
69
  export { i as defaultWebSocketConstructor, s as resolveDevWsUrl, o as startMobileApis, c as toApiHandles, a as wireSocket };
@@ -1,4 +1,4 @@
1
- //#region src/persistence.ts
1
+ // src/persistence.ts
2
2
  var e = (e) => {
3
3
  let { storage: t, keys: n } = e, r = e.onError ?? ((e, t) => {
4
4
  console.warn(`[voltro] persisting '${e}' failed`, t);
@@ -59,5 +59,4 @@ var e = (e) => {
59
59
  keys: () => [...i.keys()]
60
60
  };
61
61
  };
62
- //#endregion
63
62
  export { e as createAsyncStoragePersistence };
package/dist/platform.js CHANGED
@@ -2,7 +2,7 @@ import { netInfoOnlineSource as e } from "./connection.js";
2
2
  import { createAsyncStoragePersistence as t } from "./persistence.js";
3
3
  import { defaultWebSocketConstructor as n } from "./mobileRuntime.js";
4
4
  import { definePlatform as r } from "@voltro/client";
5
- //#region src/platform.ts
5
+ // src/platform.ts
6
6
  var i = (e) => e === "ios" ? "ios" : e === "android" ? "android" : e === "web" ? "web" : "unknown", a = (e) => e === "active" ? "active" : e === "background" ? "background" : "inactive", o = (e) => e === "granted" ? "granted" : e === "denied" ? "denied" : "prompt", s = (e) => ({
7
7
  kind: "keychain",
8
8
  get: (t) => e.getItemAsync(t),
@@ -75,5 +75,4 @@ var i = (e) => e === "ios" ? "ios" : e === "android" ? "android" : e === "web" ?
75
75
  persistence: o
76
76
  };
77
77
  };
78
- //#endregion
79
78
  export { c as appStateLifecycle, p as createExpoPlatform, f as expoBiometrics, u as expoNotifications, s as expoSecureTokenStore, d as expoUpdates, l as linkingDeepLinks };
package/dist/schema.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { DEVICES_TABLE as e } from "./devices.js";
2
2
  import { eq as t, id as n, queryFor as r, table as i, text as a, timestamp as o } from "@voltro/database";
3
- //#region src/schema.ts
3
+ // src/schema.ts
4
4
  var s = i(e, {
5
5
  id: n({ prefix: "device" }),
6
6
  tenantId: a().nullable(),
@@ -17,5 +17,4 @@ var s = i(e, {
17
17
  let a = await n.query(r(s).where(t("token", i)).descriptor);
18
18
  for (let t of a) await n.delete(e, t.id);
19
19
  }, u = (e) => async (n) => [...await e.query(r(s).where(t("userId", n)).descriptor)].sort((e, t) => t.lastSeenAt.getTime() - e.lastSeenAt.getTime())[0]?.locale ?? null;
20
- //#endregion
21
20
  export { e as DEVICES_TABLE, u as deviceLocaleFor, c as deviceTokensFor, s as devicesTable, l as pruneDeviceToken };
package/dist/sqlite.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/sqlite.ts
1
+ // src/sqlite.ts
2
2
  var e = (e, t) => `${e}\u0001${t}`, t = (e) => {
3
3
  if (e instanceof Uint8Array) return new Uint8Array(e);
4
4
  if (ArrayBuffer.isView(e)) return new Uint8Array(e.buffer, e.byteOffset, e.byteLength).slice();
@@ -56,5 +56,4 @@ var e = (e, t) => `${e}\u0001${t}`, t = (e) => {
56
56
  migrate: i
57
57
  };
58
58
  };
59
- //#endregion
60
59
  export { r as createExpoSqliteLocalFirst };
@@ -1,6 +1,6 @@
1
1
  import { backgroundSyncReducer as e, initialBackgroundSyncState as t, shouldSync as n } from "./backgroundSync.js";
2
2
  import { useCallback as r, useEffect as i, useReducer as a, useRef as o } from "react";
3
- //#region src/useBackgroundSync.tsx
3
+ // src/useBackgroundSync.tsx
4
4
  var s = (e, t) => {
5
5
  if (typeof document > "u" || typeof window > "u") return () => {};
6
6
  let n = () => {
@@ -61,5 +61,4 @@ var s = (e, t) => {
61
61
  sync: S
62
62
  };
63
63
  };
64
- //#endregion
65
64
  export { l as useBackgroundSync };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/react-native",
3
- "version": "0.87.0",
3
+ "version": "0.88.0",
4
4
  "description": "React Native bindings for the framework: device-registration primitive, background-sync state machine, offline-first client defaults + connection-status surface, and the deep-link declaration shape — the credential-free mobile plumbing on top of the RN-safe React client.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -38,9 +38,9 @@
38
38
  "node": ">=24.0.0"
39
39
  },
40
40
  "dependencies": {
41
- "@voltro/client": "0.87.0",
42
- "@voltro/database": "0.87.0",
43
- "@voltro/local-first": "0.87.0"
41
+ "@voltro/client": "0.88.0",
42
+ "@voltro/database": "0.88.0",
43
+ "@voltro/local-first": "0.88.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": "^19.0.0"