@voltro/react-native 0.86.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,11 +1,11 @@
1
1
  # Third-Party Notices — @voltro/react-native
2
2
 
3
- This package uses the open-source software listed below. Each is the
3
+ This package uses the third-party software listed below. Each is the
4
4
  property of its respective copyright holders and is used under the terms of
5
5
  its license. This file is provided for attribution; it grants no rights in
6
6
  @voltro/react-native itself, which is proprietary (see LICENSE).
7
7
 
8
- Generated from the resolved runtime dependency closure (14 packages).
8
+ Generated from the resolved runtime dependency closure (12 packages).
9
9
 
10
10
  ---
11
11
 
@@ -93,7 +93,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
93
93
  SOFTWARE.
94
94
  ```
95
95
 
96
- ## @tanstack/react-store@0.11.1
96
+ ## @tanstack/react-store@0.11.2
97
97
 
98
98
  License: MIT
99
99
 
@@ -121,7 +121,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
121
121
  SOFTWARE.
122
122
  ```
123
123
 
124
- ## @tanstack/store@0.11.1
124
+ ## @tanstack/store@0.11.2
125
125
 
126
126
  License: MIT
127
127
 
@@ -177,7 +177,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
177
177
  SOFTWARE.
178
178
  ```
179
179
 
180
- ## jose@6.2.12
180
+ ## jose@6.2.13
181
181
 
182
182
  License: MIT
183
183
 
@@ -205,7 +205,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
205
205
  SOFTWARE.
206
206
  ```
207
207
 
208
- ## lib0@0.2.117
208
+ ## lib0@0.2.119
209
209
 
210
210
  License: MIT
211
211
 
@@ -233,214 +233,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
233
233
  SOFTWARE.
234
234
  ```
235
235
 
236
- ## typeid-js@1.2.0
237
-
238
- License: Apache-2.0
239
-
240
- ```
241
- Apache License
242
- Version 2.0, January 2004
243
- http://www.apache.org/licenses/
244
-
245
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
246
-
247
- 1. Definitions.
248
-
249
- "License" shall mean the terms and conditions for use, reproduction,
250
- and distribution as defined by Sections 1 through 9 of this document.
251
-
252
- "Licensor" shall mean the copyright owner or entity authorized by
253
- the copyright owner that is granting the License.
254
-
255
- "Legal Entity" shall mean the union of the acting entity and all
256
- other entities that control, are controlled by, or are under common
257
- control with that entity. For the purposes of this definition,
258
- "control" means (i) the power, direct or indirect, to cause the
259
- direction or management of such entity, whether by contract or
260
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
261
- outstanding shares, or (iii) beneficial ownership of such entity.
262
-
263
- "You" (or "Your") shall mean an individual or Legal Entity
264
- exercising permissions granted by this License.
265
-
266
- "Source" form shall mean the preferred form for making modifications,
267
- including but not limited to software source code, documentation
268
- source, and configuration files.
269
-
270
- "Object" form shall mean any form resulting from mechanical
271
- transformation or translation of a Source form, including but
272
- not limited to compiled object code, generated documentation,
273
- and conversions to other media types.
274
-
275
- "Work" shall mean the work of authorship, whether in Source or
276
- Object form, made available under the License, as indicated by a
277
- copyright notice that is included in or attached to the work
278
- (an example is provided in the Appendix below).
279
-
280
- "Derivative Works" shall mean any work, whether in Source or Object
281
- form, that is based on (or derived from) the Work and for which the
282
- editorial revisions, annotations, elaborations, or other modifications
283
- represent, as a whole, an original work of authorship. For the purposes
284
- of this License, Derivative Works shall not include works that remain
285
- separable from, or merely link (or bind by name) to the interfaces of,
286
- the Work and Derivative Works thereof.
287
-
288
- "Contribution" shall mean any work of authorship, including
289
- the original version of the Work and any modifications or additions
290
- to that Work or Derivative Works thereof, that is intentionally
291
- submitted to Licensor for inclusion in the Work by the copyright owner
292
- or by an individual or Legal Entity authorized to submit on behalf of
293
- the copyright owner. For the purposes of this definition, "submitted"
294
- means any form of electronic, verbal, or written communication sent
295
- to the Licensor or its representatives, including but not limited to
296
- communication on electronic mailing lists, source code control systems,
297
- and issue tracking systems that are managed by, or on behalf of, the
298
- Licensor for the purpose of discussing and improving the Work, but
299
- excluding communication that is conspicuously marked or otherwise
300
- designated in writing by the copyright owner as "Not a Contribution."
301
-
302
- "Contributor" shall mean Licensor and any individual or Legal Entity
303
- on behalf of whom a Contribution has been received by Licensor and
304
- subsequently incorporated within the Work.
305
-
306
- 2. Grant of Copyright License. Subject to the terms and conditions of
307
- this License, each Contributor hereby grants to You a perpetual,
308
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
309
- copyright license to reproduce, prepare Derivative Works of,
310
- publicly display, publicly perform, sublicense, and distribute the
311
- Work and such Derivative Works in Source or Object form.
312
-
313
- 3. Grant of Patent License. Subject to the terms and conditions of
314
- this License, each Contributor hereby grants to You a perpetual,
315
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
316
- (except as stated in this section) patent license to make, have made,
317
- use, offer to sell, sell, import, and otherwise transfer the Work,
318
- where such license applies only to those patent claims licensable
319
- by such Contributor that are necessarily infringed by their
320
- Contribution(s) alone or by combination of their Contribution(s)
321
- with the Work to which such Contribution(s) was submitted. If You
322
- institute patent litigation against any entity (including a
323
- cross-claim or counterclaim in a lawsuit) alleging that the Work
324
- or a Contribution incorporated within the Work constitutes direct
325
- or contributory patent infringement, then any patent licenses
326
- granted to You under this License for that Work shall terminate
327
- as of the date such litigation is filed.
328
-
329
- 4. Redistribution. You may reproduce and distribute copies of the
330
- Work or Derivative Works thereof in any medium, with or without
331
- modifications, and in Source or Object form, provided that You
332
- meet the following conditions:
333
-
334
- (a) You must give any other recipients of the Work or
335
- Derivative Works a copy of this License; and
336
-
337
- (b) You must cause any modified files to carry prominent notices
338
- stating that You changed the files; and
339
-
340
- (c) You must retain, in the Source form of any Derivative Works
341
- that You distribute, all copyright, patent, trademark, and
342
- attribution notices from the Source form of the Work,
343
- excluding those notices that do not pertain to any part of
344
- the Derivative Works; and
345
-
346
- (d) If the Work includes a "NOTICE" text file as part of its
347
- distribution, then any Derivative Works that You distribute must
348
- include a readable copy of the attribution notices contained
349
- within such NOTICE file, excluding those notices that do not
350
- pertain to any part of the Derivative Works, in at least one
351
- of the following places: within a NOTICE text file distributed
352
- as part of the Derivative Works; within the Source form or
353
- documentation, if provided along with the Derivative Works; or,
354
- within a display generated by the Derivative Works, if and
355
- wherever such third-party notices normally appear. The contents
356
- of the NOTICE file are for informational purposes only and
357
- do not modify the License. You may add Your own attribution
358
- notices within Derivative Works that You distribute, alongside
359
- or as an addendum to the NOTICE text from the Work, provided
360
- that such additional attribution notices cannot be construed
361
- as modifying the License.
362
-
363
- You may add Your own copyright statement to Your modifications and
364
- may provide additional or different license terms and conditions
365
- for use, reproduction, or distribution of Your modifications, or
366
- for any such Derivative Works as a whole, provided Your use,
367
- reproduction, and distribution of the Work otherwise complies with
368
- the conditions stated in this License.
369
-
370
- 5. Submission of Contributions. Unless You explicitly state otherwise,
371
- any Contribution intentionally submitted for inclusion in the Work
372
- by You to the Licensor shall be under the terms and conditions of
373
- this License, without any additional terms or conditions.
374
- Notwithstanding the above, nothing herein shall supersede or modify
375
- the terms of any separate license agreement you may have executed
376
- with Licensor regarding such Contributions.
377
-
378
- 6. Trademarks. This License does not grant permission to use the trade
379
- names, trademarks, service marks, or product names of the Licensor,
380
- except as required for reasonable and customary use in describing the
381
- origin of the Work and reproducing the content of the NOTICE file.
382
-
383
- 7. Disclaimer of Warranty. Unless required by applicable law or
384
- agreed to in writing, Licensor provides the Work (and each
385
- Contributor provides its Contributions) on an "AS IS" BASIS,
386
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
387
- implied, including, without limitation, any warranties or conditions
388
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
389
- PARTICULAR PURPOSE. You are solely responsible for determining the
390
- appropriateness of using or redistributing the Work and assume any
391
- risks associated with Your exercise of permissions under this License.
392
-
393
- 8. Limitation of Liability. In no event and under no legal theory,
394
- whether in tort (including negligence), contract, or otherwise,
395
- unless required by applicable law (such as deliberate and grossly
396
- negligent acts) or agreed to in writing, shall any Contributor be
397
- liable to You for damages, including any direct, indirect, special,
398
- incidental, or consequential damages of any character arising as a
399
- result of this License or out of the use or inability to use the
400
- Work (including but not limited to damages for loss of goodwill,
401
- work stoppage, computer failure or malfunction, or any and all
402
- other commercial damages or losses), even if such Contributor
403
- has been advised of the possibility of such damages.
404
-
405
- 9. Accepting Warranty or Additional Liability. While redistributing
406
- the Work or Derivative Works thereof, You may choose to offer,
407
- and charge a fee for, acceptance of support, warranty, indemnity,
408
- or other liability obligations and/or rights consistent with this
409
- License. However, in accepting such obligations, You may act only
410
- on Your own behalf and on Your sole responsibility, not on behalf
411
- of any other Contributor, and only if You agree to indemnify,
412
- defend, and hold each Contributor harmless for any liability
413
- incurred by, or claims asserted against, such Contributor by reason
414
- of your accepting any such warranty or additional liability.
415
-
416
- END OF TERMS AND CONDITIONS
417
-
418
- APPENDIX: How to apply the Apache License to your work.
419
-
420
- To apply the Apache License to your work, attach the following
421
- boilerplate notice, with the fields enclosed by brackets "[]"
422
- replaced with your own identifying information. (Don't include
423
- the brackets!) The text should be enclosed in the appropriate
424
- comment syntax for the file format. We also recommend that a
425
- file or class name and description of purpose be included on the
426
- same "printed page" as the copyright notice for easier
427
- identification within third-party archives.
428
-
429
- Copyright [yyyy] [name of copyright owner]
430
-
431
- Licensed under the Apache License, Version 2.0 (the "License");
432
- you may not use this file except in compliance with the License.
433
- You may obtain a copy of the License at
434
-
435
- http://www.apache.org/licenses/LICENSE-2.0
436
-
437
- Unless required by applicable law or agreed to in writing, software
438
- distributed under the License is distributed on an "AS IS" BASIS,
439
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
440
- See the License for the specific language governing permissions and
441
- limitations under the License.
442
- ```
443
-
444
236
  ## ulid@3.0.2
445
237
 
446
238
  License: MIT
@@ -469,7 +261,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
469
261
  SOFTWARE.
470
262
  ```
471
263
 
472
- ## use-sync-external-store@1.6.0
264
+ ## use-sync-external-store@1.7.0
473
265
 
474
266
  License: MIT
475
267
 
@@ -497,22 +289,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
497
289
  SOFTWARE.
498
290
  ```
499
291
 
500
- ## uuid@11.1.1
501
-
502
- License: MIT
503
-
504
- ```
505
- The MIT License (MIT)
506
-
507
- Copyright (c) 2010-2020 Robert Kieffer and other contributors
508
-
509
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
510
-
511
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
512
-
513
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
514
- ```
515
-
516
292
  ## y-protocols@1.0.7
517
293
 
518
294
  License: MIT
@@ -541,7 +317,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
541
317
  SOFTWARE.
542
318
  ```
543
319
 
544
- ## yjs@13.6.32
320
+ ## yjs@13.6.33
545
321
 
546
322
  License: MIT
547
323
 
@@ -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,9 +1,9 @@
1
- //#region src/devices.ts
1
+ // src/devices.ts
2
2
  var e = [
3
3
  "ios",
4
4
  "android",
5
5
  "web"
6
- ], t = (t) => typeof t == "string" && e.includes(t), n = "_voltro_devices", r = "en", i = "UTC", a = () => {
6
+ ], t = (t) => typeof t == "string" && e.includes(t), n = "_voltro_push_devices", r = "en", i = "UTC", a = () => {
7
7
  if (typeof navigator < "u" && typeof navigator.language == "string") return navigator.language;
8
8
  }, o = () => {
9
9
  try {
@@ -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 };
package/dist/index.d.ts CHANGED
@@ -253,7 +253,7 @@ export declare const DEVICE_PLATFORMS: ReadonlyArray<DevicePlatform>;
253
253
  export declare type DevicePlatform = 'ios' | 'android' | 'web';
254
254
 
255
255
  /**
256
- * The normalised row, ready to upsert into `_voltro_devices`. `locale` and
256
+ * The normalised row, ready to upsert into `_voltro_push_devices`. `locale` and
257
257
  * `timezone` are resolved (never `undefined`); `registeredAt` is the moment we
258
258
  * built this. `userId` / `tenantId` are NOT here on purpose — they are the
259
259
  * server's to stamp from the authenticated request, never trusted from the
@@ -297,7 +297,7 @@ export declare interface DeviceRegistrationInput {
297
297
  }
298
298
 
299
299
  /** The framework table name devices are stored in — shared with `./schema`. */
300
- export declare const DEVICES_TABLE = "_voltro_devices";
300
+ export declare const DEVICES_TABLE = "_voltro_push_devices";
301
301
 
302
302
  /**
303
303
  * The transport that actually persists a device. The app supplies it — usually
@@ -415,6 +415,7 @@ export declare interface MobileApiBinding {
415
415
  /** `ws(s)://host:port/ws`. On a device this is NOT localhost — see
416
416
  * {@link resolveDevWsUrl}. */
417
417
  readonly wsUrl: string;
418
+ readonly roleEndpoints?: unknown;
418
419
  readonly headers?: ResolvableHeaders | undefined;
419
420
  readonly recovery?: MountedApi['recovery'];
420
421
  /** Durable local mirror of this api's subscriptions, resolved per
@@ -532,7 +533,7 @@ export { OnlineSource }
532
533
  * )
533
534
  * ```
534
535
  *
535
- * Idempotent by construction: the `_voltro_devices` unique key is
536
+ * Idempotent by construction: the `_voltro_push_devices` unique key is
536
537
  * `(platform, token)`, so calling this again with the same token updates the
537
538
  * existing row (locale/timezone/lastSeen) instead of inserting a duplicate. A
538
539
  * ROTATED token is a new registration; reaping the stale one is the sender
@@ -617,8 +618,10 @@ export declare interface SqliteDatabaseLike {
617
618
  *
618
619
  * `reconnect()` on the returned handle forces a fresh socket for every api —
619
620
  * call it after a sign-in or a tenant switch so the connection re-resolves who
620
- * it is. The supervisor blanks caches across that swap on purpose: the next
621
- * subject may be entitled to less than the previous one.
621
+ * it is. Its promise resolves once every api runs on the rebuilt socket; await
622
+ * it before calling as the new subject. The supervisor blanks caches across
623
+ * that swap on purpose: the next subject may be entitled to less than the
624
+ * previous one.
622
625
  */
623
626
  export declare const startMobileApis: (options: StartMobileApisOptions) => SupervisorHandle;
624
627
 
@@ -1,57 +1,69 @@
1
- import { buildApiRuntime as e, recoveryCoordinatorFor as t, startApiSupervisor as n } from "@voltro/client";
2
- //#region src/mobileRuntime.ts
3
- var r = (e, t) => {
1
+ import { buildApiRuntime as e, makeApiRoleSocketTracker as t, recoveryCoordinatorFor as n, startApiSupervisor as r } from "@voltro/client";
2
+ // src/mobileRuntime.ts
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`.");
6
6
  return n === void 0 ? new r(e) : new r(e, n);
7
- }, i = (e, t, n) => (r, i) => {
7
+ }, a = (e, t, n) => (r, i) => {
8
8
  let a = e(r, i);
9
9
  return a.addEventListener("open", () => t()), a.addEventListener("close", () => n("close")), a.addEventListener("error", () => n("error")), a;
10
- }, a = (t) => {
11
- let a = t.webSocketConstructor ?? r;
12
- return n({
13
- apis: t.apis.map((e) => ({
10
+ }, o = (n) => {
11
+ let o = n.webSocketConstructor ?? i;
12
+ return r({
13
+ apis: n.apis.map((e) => ({
14
14
  name: e.name,
15
15
  group: e.group,
16
16
  descriptors: e.descriptors,
17
17
  wsUrl: e.wsUrl,
18
+ roleEndpoints: e.roleEndpoints,
18
19
  ...e.headers === void 0 ? {} : { headers: e.headers },
19
20
  ...e.recovery === void 0 ? {} : { recovery: e.recovery },
20
21
  ...e.mirror === void 0 ? {} : { mirror: e.mirror }
21
22
  })),
22
- ...t.retryDelayMs === void 0 ? {} : { retryDelayMs: t.retryDelayMs },
23
- onChange: t.onChange,
24
- buildClient: async (t, n, r, o, s, c) => await e({
25
- name: t.name,
26
- generation: n,
27
- wsUrl: t.wsUrl,
28
- group: t.group,
29
- ...t.headers === void 0 ? {} : { headers: t.headers },
30
- ...t.mirror === void 0 ? {} : { mirror: t.mirror },
31
- descriptors: t.descriptors,
32
- ...s === void 0 ? {} : { errorBus: s },
33
- ...c === void 0 ? {} : { recovery: c },
34
- webSocketConstructor: i(a, r, o)
35
- })
23
+ ...n.retryDelayMs === void 0 ? {} : { retryDelayMs: n.retryDelayMs },
24
+ onChange: n.onChange,
25
+ buildClient: async (n, r, i, s, c, l) => {
26
+ let u = t(n.group, n.wsUrl, n.roleEndpoints, i, s);
27
+ return await e({
28
+ name: n.name,
29
+ generation: r,
30
+ wsUrl: n.wsUrl,
31
+ roleEndpoints: n.roleEndpoints,
32
+ group: n.group,
33
+ ...n.headers === void 0 ? {} : { headers: n.headers },
34
+ ...n.mirror === void 0 ? {} : { mirror: n.mirror },
35
+ descriptors: n.descriptors,
36
+ ...c === void 0 ? {} : { errorBus: c },
37
+ ...l === void 0 ? {} : { recovery: l },
38
+ webSocketConstructor: (e, t) => {
39
+ let n = u.begin(e);
40
+ try {
41
+ return a(o, n.open, n.issue)(e, t);
42
+ } catch (e) {
43
+ throw n.issue("error"), e;
44
+ }
45
+ }
46
+ });
47
+ }
36
48
  });
37
- }, o = (e, t, n = "/ws") => {
49
+ }, s = (e, t, n = "/ws") => {
38
50
  let r = (e ?? "").split(":")[0];
39
51
  return r === void 0 || r === "" || r === "localhost" || r === "127.0.0.1" ? `ws://localhost:${t}${n}` : `ws://${r}:${t}${n}`;
40
- }, s = (e, n) => {
52
+ }, c = (e, t) => {
41
53
  let r = /* @__PURE__ */ new Map();
42
54
  for (let i of e) {
43
- let e = n.get(i.name);
55
+ let e = t.get(i.name);
44
56
  e !== void 0 && r.set(i.name, {
45
57
  runtime: e.runtime,
46
58
  cache: e.cache,
47
59
  client: e.client,
60
+ ...e.subjectSignal === void 0 ? {} : { subjectSignal: e.subjectSignal },
48
61
  descriptors: i.descriptors,
49
62
  inspectBaseUrl: i.wsUrl.replace(/^ws/, "http").replace(/\/ws$/, ""),
50
63
  errorBus: e.errorBus,
51
- recovery: e.recovery ?? t(e.errorBus, i.name, i.recovery)
64
+ recovery: e.recovery ?? n(e.errorBus, i.name, i.recovery)
52
65
  });
53
66
  }
54
67
  return r;
55
68
  };
56
- //#endregion
57
- export { r as defaultWebSocketConstructor, o as resolveDevWsUrl, a as startMobileApis, s as toApiHandles, i as wireSocket };
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.d.ts CHANGED
@@ -10,9 +10,9 @@ export declare const deviceLocaleFor: (store: DataStore) => (subjectId: string)
10
10
  declare type DevicePlatform = 'ios' | 'android' | 'web';
11
11
 
12
12
  /** The framework table name devices are stored in — shared with `./schema`. */
13
- export declare const DEVICES_TABLE = "_voltro_devices";
13
+ export declare const DEVICES_TABLE = "_voltro_push_devices";
14
14
 
15
- export declare const devicesTable: Table<"_voltro_devices", FieldDefinitions<{
15
+ export declare const devicesTable: Table<"_voltro_push_devices", FieldDefinitions<{
16
16
  readonly id: ColumnBuilder<string, "id", boolean>;
17
17
  readonly tenantId: ColumnBuilder<string | null, "text", boolean>;
18
18
  readonly userId: ColumnBuilder<string, "text", boolean>;
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.86.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.86.0",
42
- "@voltro/database": "0.86.0",
43
- "@voltro/local-first": "0.86.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"