@voltro/client 0.85.0 → 0.87.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.
Files changed (116) hide show
  1. package/CHANGELOG.md +5987 -0
  2. package/THIRD-PARTY-NOTICES.md +1125 -34
  3. package/dist/analyticsCatalog.js +47 -0
  4. package/dist/apiConnectivity.js +33 -0
  5. package/dist/apiRoleTransports.js +48 -0
  6. package/dist/apiRuntime.js +145 -0
  7. package/dist/apiSocketTracker.js +21 -0
  8. package/dist/apiSupervisor.js +136 -0
  9. package/dist/authRefresh.js +20 -0
  10. package/dist/awaitResolvedApi.js +23 -0
  11. package/dist/bootstrap.d.ts +1153 -0
  12. package/dist/bootstrap.js +8 -0
  13. package/dist/cellMerger.js +6 -0
  14. package/dist/clientDiagnostics.js +94 -0
  15. package/dist/clientErrorBus.js +16 -0
  16. package/dist/clientScheduler.js +31 -0
  17. package/dist/connectionPrerequisite.js +70 -0
  18. package/dist/connectionScope.js +47 -0
  19. package/dist/connectionSetupController.js +206 -0
  20. package/dist/createHooks.js +15 -0
  21. package/dist/deepLink.js +69 -0
  22. package/dist/filters.js +58 -0
  23. package/dist/form.d.ts +37 -4
  24. package/dist/form.js +7 -2
  25. package/dist/formBinding.js +325 -0
  26. package/dist/formData.js +127 -0
  27. package/dist/formFlashId.js +4 -0
  28. package/dist/formRejection.js +23 -0
  29. package/dist/formSource.js +13 -0
  30. package/dist/frameworkRuntimesContext.js +8 -0
  31. package/dist/globalContext.js +10 -0
  32. package/dist/index.d.ts +152 -27
  33. package/dist/index.js +87 -4121
  34. package/dist/liveRowSort.js +66 -0
  35. package/dist/mutationConnectionSetup.js +16 -0
  36. package/dist/mutationIdentity.js +10 -0
  37. package/dist/mutationSerialExecution.js +53 -0
  38. package/dist/mutationsBus.js +40 -0
  39. package/dist/onlineSource.js +13 -0
  40. package/dist/outbox.js +213 -0
  41. package/dist/outboxHttp.js +104 -0
  42. package/dist/outboxState.js +43 -0
  43. package/dist/permissions.js +20 -0
  44. package/dist/platform.js +121 -0
  45. package/dist/preloadSeed.js +47 -0
  46. package/dist/provider.js +22 -0
  47. package/dist/query.js +12 -2
  48. package/dist/recoveryCoordinator.js +195 -0
  49. package/dist/recoveryRetry.js +24 -0
  50. package/dist/richText.js +176 -0
  51. package/dist/rpcErrorBus.js +39 -0
  52. package/dist/rpcErrorKind.js +13 -0
  53. package/dist/runRpc.js +12 -0
  54. package/dist/runtime.d.ts +49 -3
  55. package/dist/runtime.js +16 -126
  56. package/dist/runtimeCapabilities.js +44 -0
  57. package/dist/runtimeContext.js +49 -0
  58. package/dist/schemaFields.js +219 -0
  59. package/dist/scopeMembership.js +12 -0
  60. package/dist/seedResolvers.js +7 -0
  61. package/dist/sequence.js +65 -0
  62. package/dist/serverRequest.js +28 -0
  63. package/dist/serviceClient.js +129 -0
  64. package/dist/squashRpcCause.js +8 -0
  65. package/dist/stableKey.js +21 -0
  66. package/dist/store.js +288 -0
  67. package/dist/storeStorage.js +28 -0
  68. package/dist/subscriptionCache.js +724 -0
  69. package/dist/tagWalk.js +23 -0
  70. package/dist/traceBus.js +10 -0
  71. package/dist/tracking.js +40 -0
  72. package/dist/uploadProgress.js +21 -0
  73. package/dist/useAction.js +101 -0
  74. package/dist/useAgent.js +53 -0
  75. package/dist/useAgentChat.js +43 -0
  76. package/dist/useAgentStream.js +64 -0
  77. package/dist/useApiOnline.js +14 -0
  78. package/dist/useCapabilityManifest.js +105 -0
  79. package/dist/useConnectionSetup.js +28 -0
  80. package/dist/useConnectionStatus.js +38 -0
  81. package/dist/useConnections.js +107 -0
  82. package/dist/useDataCopilot.js +24 -0
  83. package/dist/useDataTable.js +34 -0
  84. package/dist/useDerived.js +22 -0
  85. package/dist/useEvent.js +98 -0
  86. package/dist/useFormBinding.js +478 -0
  87. package/dist/useLocalQuery.js +59 -0
  88. package/dist/useMutation.js +214 -0
  89. package/dist/useOnRpcError.js +13 -0
  90. package/dist/usePreloadedSubscription.js +18 -0
  91. package/dist/usePreview.js +14 -0
  92. package/dist/useProvenance.js +51 -0
  93. package/dist/useQueryField.js +34 -0
  94. package/dist/useRecord.js +12 -0
  95. package/dist/useRefreshSubscriptions.js +22 -0
  96. package/dist/useResourceCan.js +18 -0
  97. package/dist/useResumableAgentStream.js +75 -0
  98. package/dist/useRpcCaller.js +17 -0
  99. package/dist/useSequence.js +25 -0
  100. package/dist/useSkeleton.js +13 -0
  101. package/dist/useSubscription.js +98 -0
  102. package/dist/useSubscriptionHealth.js +32 -0
  103. package/dist/useTranscription.js +51 -0
  104. package/dist/useUndo.js +33 -0
  105. package/dist/useUndoLog.js +44 -0
  106. package/dist/useUpload.js +296 -0
  107. package/dist/useWindowedSubscription.js +65 -0
  108. package/dist/useWorkflow.js +284 -0
  109. package/dist/useWorkflowRunState.js +93 -0
  110. package/dist/validation.js +39 -0
  111. package/dist/validationMessages.js +5 -0
  112. package/package.json +7 -2
  113. package/dist/authRefresh-DmfSoCca.js +0 -360
  114. package/dist/formData-BfpBt7BQ.js +0 -769
  115. package/dist/queryOnce-D5Y4V1SB.js +0 -55
  116. package/dist/runRpc-Zfz3w709.js +0 -1172
@@ -1,55 +0,0 @@
1
- import { i as e, m as t, n, t as r, u as i } from "./runRpc-Zfz3w709.js";
2
- import { createContext as a, useContext as o, useEffect as s } from "react";
3
- import { Effect as c, Exit as l, Option as u, Stream as d } from "effect";
4
- import { firstEventValue as f } from "@voltro/protocol";
5
- //#region src/runtimeContext.ts
6
- var p = a(null), m = () => {
7
- throw Error("Voltro: rpc / cache calls are not invokable on a not-yet-resolved api — either during SSR, or in the client boot window before the api client resolves");
8
- }, h = new Proxy(() => m(), {
9
- get: (e, t) => h,
10
- has: () => !0,
11
- apply: () => m()
12
- }), g = Symbol.for("@voltro/client/ssrDescriptors"), _ = globalThis, v = _[g] ?? (_[g] = { byApi: /* @__PURE__ */ new Map() }), y = (e, t) => {
13
- v.byApi.set(e, t);
14
- }, b = (e) => v.byApi.get(e), x = () => {
15
- v.byApi.clear();
16
- }, S = {
17
- runtime: { runPromiseExit: () => Promise.resolve(l.die(/* @__PURE__ */ Error("Voltro: mutations are not invokable during SSR"))) },
18
- cache: new t(),
19
- client: h,
20
- descriptors: {},
21
- inspectBaseUrl: "",
22
- errorBus: new i(),
23
- recovery: new e("ssr")
24
- }, C = {
25
- get: (e) => {
26
- let t = b(e);
27
- return t === void 0 ? S : {
28
- ...S,
29
- descriptors: t
30
- };
31
- },
32
- names: []
33
- }, w = !1, T = !1, E = null, D = () => {
34
- w = !1, T = !1, E !== null && (clearTimeout(E), E = null);
35
- }, O = () => {
36
- let e = o(p);
37
- return e ? (T || (T = !0, E !== null && (clearTimeout(E), E = null)), e) : (globalThis.window !== void 0 && !w && !T && E === null && process.env.NODE_ENV !== "production" && (E = setTimeout(() => {
38
- E = null, !(w || T) && (w = !0, console.warn("useFrameworkRuntimes: no <FrameworkRuntimesProvider> in the tree — returning a loading baseline (subscriptions read `undefined`, mutations are no-ops). If this is not an intentional lazy/conditional mount, mount your app via @voltro/web mount() or wrap the subtree in <VoltroRuntimeProvider>."));
39
- }, 0)), C);
40
- }, k = (e) => {
41
- let t = O(), n = t.demand;
42
- return s(() => {
43
- n?.(e);
44
- }, [n, e]), t.get(e);
45
- }, A = (e) => typeof e.runtime?.runFork != "function", j = 15e3, M = async (e, t, n) => {
46
- if (!A(e.current)) return e.current;
47
- let r = Date.now() + j;
48
- for (; Date.now() < r;) if (await new Promise((e) => setTimeout(e, 16)), !A(e.current)) return e.current;
49
- throw Error(`Voltro: the api "${t}" did not resolve within ${j}ms, so ${n} was never sent. This is not the boot window — that is waited out. Check that "${t}" is a configured api name and that its client could connect.`);
50
- }, N = async (e, t, i, a, o) => {
51
- let { runtime: s, client: l } = await M(e, t, i), p = n(l, i)(a ?? {}), m = c.isEffect(p) ? p : d.runHead(p).pipe(c.map(u.getOrUndefined)), h = await r(s, m, { signal: o });
52
- return f(i, h, "[loader.query]");
53
- };
54
- //#endregion
55
- export { x as a, h as c, k as d, O as f, D as i, b as l, M as n, A as o, p as r, y as s, N as t, S as u };