@voltro/client 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.
- package/CHANGELOG.md +5484 -0
- package/THIRD-PARTY-NOTICES.md +6 -230
- package/dist/analyticsCatalog.js +1 -2
- package/dist/apiConnectivity.js +1 -2
- package/dist/apiRoleTransports.js +47 -0
- package/dist/apiRuntime.js +76 -67
- package/dist/apiSocketTracker.js +20 -0
- package/dist/apiSupervisor.js +17 -7
- package/dist/authRefresh.js +1 -2
- package/dist/awaitResolvedApi.js +5 -6
- package/dist/bootstrap.d.ts +9 -0
- package/dist/bootstrap.js +3 -3
- package/dist/cellMerger.js +1 -2
- package/dist/clientDiagnostics.js +1 -2
- package/dist/clientErrorBus.js +1 -2
- package/dist/clientScheduler.js +1 -2
- package/dist/connectionPrerequisite.js +1 -2
- package/dist/connectionScope.js +15 -4
- package/dist/connectionSetupController.js +1 -2
- package/dist/createHooks.js +1 -2
- package/dist/deepLink.js +1 -2
- package/dist/filters.js +1 -2
- package/dist/form.d.ts +37 -4
- package/dist/form.js +4 -2
- package/dist/formBinding.js +1 -2
- package/dist/formData.js +73 -12
- package/dist/formFlashId.js +1 -2
- package/dist/formRejection.js +22 -0
- package/dist/formSource.js +12 -0
- package/dist/frameworkRuntimesContext.js +1 -2
- package/dist/globalContext.js +1 -2
- package/dist/index.d.ts +99 -20
- package/dist/index.js +57 -54
- package/dist/liveRowSort.js +1 -2
- package/dist/mutationConnectionSetup.js +1 -2
- package/dist/mutationIdentity.js +1 -2
- package/dist/mutationSerialExecution.js +1 -2
- package/dist/mutationsBus.js +1 -2
- package/dist/onlineSource.js +1 -2
- package/dist/outbox.js +1 -2
- package/dist/outboxHttp.js +1 -2
- package/dist/outboxState.js +1 -2
- package/dist/permissions.js +1 -2
- package/dist/platform.js +1 -2
- package/dist/preloadSeed.js +1 -2
- package/dist/provider.js +1 -2
- package/dist/query.js +1 -2
- package/dist/recoveryCoordinator.js +1 -2
- package/dist/recoveryRetry.js +1 -2
- package/dist/richText.js +1 -2
- package/dist/rpcErrorBus.js +1 -2
- package/dist/rpcErrorKind.js +1 -2
- package/dist/runRpc.js +1 -2
- package/dist/runtime.d.ts +17 -2
- package/dist/runtimeCapabilities.js +1 -2
- package/dist/runtimeContext.js +1 -2
- package/dist/schemaFields.js +1 -2
- package/dist/scopeMembership.js +1 -2
- package/dist/seedResolvers.js +1 -2
- package/dist/sequence.js +1 -2
- package/dist/serverRequest.js +12 -9
- package/dist/serviceClient.js +50 -50
- package/dist/squashRpcCause.js +1 -2
- package/dist/stableKey.js +1 -2
- package/dist/store.js +1 -2
- package/dist/storeStorage.js +1 -2
- package/dist/subscriptionCache.js +5 -6
- package/dist/tagWalk.js +1 -2
- package/dist/traceBus.js +1 -2
- package/dist/tracking.js +1 -2
- package/dist/uploadProgress.js +1 -2
- package/dist/useAction.js +1 -2
- package/dist/useAgent.js +1 -2
- package/dist/useAgentChat.js +1 -2
- package/dist/useAgentStream.js +1 -2
- package/dist/useApiOnline.js +1 -2
- package/dist/useCapabilityManifest.js +28 -25
- package/dist/useConnectionSetup.js +1 -2
- package/dist/useConnectionStatus.js +1 -2
- package/dist/useConnections.js +1 -2
- package/dist/useDataCopilot.js +1 -2
- package/dist/useDataTable.js +1 -2
- package/dist/useDerived.js +1 -2
- package/dist/useEvent.js +78 -69
- package/dist/useFormBinding.js +227 -226
- package/dist/useLocalQuery.js +1 -2
- package/dist/useMutation.js +1 -2
- package/dist/useOnRpcError.js +1 -2
- package/dist/usePreloadedSubscription.js +1 -2
- package/dist/usePreview.js +1 -2
- package/dist/useProvenance.js +1 -2
- package/dist/useQueryField.js +1 -2
- package/dist/useRecord.js +1 -2
- package/dist/useRefreshSubscriptions.js +1 -2
- package/dist/useResourceCan.js +1 -2
- package/dist/useResumableAgentStream.js +1 -2
- package/dist/useRpcCaller.js +16 -0
- package/dist/useSequence.js +1 -2
- package/dist/useSkeleton.js +1 -2
- package/dist/useSubscription.js +56 -48
- package/dist/useSubscriptionHealth.js +1 -2
- package/dist/useTranscription.js +1 -2
- package/dist/useUndo.js +1 -2
- package/dist/useUndoLog.js +1 -2
- package/dist/useUpload.js +1 -2
- package/dist/useWindowedSubscription.js +1 -2
- package/dist/useWorkflow.js +1 -2
- package/dist/useWorkflowRunState.js +1 -2
- package/dist/validation.js +1 -2
- package/dist/validationMessages.js +1 -2
- package/package.json +4 -4
package/dist/useLocalQuery.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useFrameworkApi as e } from "./runtimeContext.js";
|
|
2
2
|
import { useCallback as t, useMemo as n, useRef as r, useSyncExternalStore as i } from "react";
|
|
3
|
-
|
|
3
|
+
// src/useLocalQuery.ts
|
|
4
4
|
var a = (e, t) => e === t ? 0 : e == null ? 1 : t == null ? -1 : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t)), o = (e, t = {}) => {
|
|
5
5
|
let n = t.limit === void 0 ? void 0 : Math.max(0, Math.trunc(t.limit));
|
|
6
6
|
if (n === 0 || Number.isNaN(n)) return [];
|
|
@@ -55,5 +55,4 @@ var a = (e, t) => e === t ? 0 : e == null ? 1 : t == null ? -1 : e instanceof Da
|
|
|
55
55
|
h
|
|
56
56
|
]);
|
|
57
57
|
}, c = [];
|
|
58
|
-
//#endregion
|
|
59
58
|
export { o as runLocalQuery, s as useLocalQuery };
|
package/dist/useMutation.js
CHANGED
|
@@ -12,7 +12,7 @@ import { freshIdempotencyKey as p, withIdempotencyKey as m } from "./mutationIde
|
|
|
12
12
|
import { MutationSerialExecutionError as h, makeMutationSerialExecution as g } from "./mutationSerialExecution.js";
|
|
13
13
|
import { useCallback as _, useMemo as v, useRef as y, useState as b } from "react";
|
|
14
14
|
import { Effect as x } from "effect";
|
|
15
|
-
|
|
15
|
+
// src/useMutation.ts
|
|
16
16
|
var S = /* @__PURE__ */ new WeakMap(), C = (e, t, n) => {
|
|
17
17
|
let r = S.get(e);
|
|
18
18
|
r === void 0 && (r = /* @__PURE__ */ new Map(), S.set(e, r));
|
|
@@ -210,5 +210,4 @@ var S = /* @__PURE__ */ new WeakMap(), C = (e, t, n) => {
|
|
|
210
210
|
h
|
|
211
211
|
]);
|
|
212
212
|
};
|
|
213
|
-
//#endregion
|
|
214
213
|
export { h as MutationSerialExecutionError, p as freshIdempotencyKey, D as getMutationNotifier, E as setMutationNotifier, M as useMutation, m as withIdempotencyKey };
|
package/dist/useOnRpcError.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { recoveryCoordinatorFor as e } from "./recoveryCoordinator.js";
|
|
2
2
|
import { useFrameworkApi as t } from "./runtimeContext.js";
|
|
3
3
|
import { useEffect as n, useRef as r } from "react";
|
|
4
|
-
|
|
4
|
+
// src/useOnRpcError.ts
|
|
5
5
|
var i = (i, a) => {
|
|
6
6
|
let o = t(i), s = o.recovery ?? e(o.errorBus, i), c = r(a);
|
|
7
7
|
c.current = a, n(() => s.onVisibleError((e) => c.current(e)), [s]);
|
|
@@ -9,5 +9,4 @@ var i = (i, a) => {
|
|
|
9
9
|
let { errorBus: a } = t(e), o = r(i);
|
|
10
10
|
o.current = i, n(() => a.on((e) => o.current(e)), [a]);
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { a as useOnRawRpcError, i as useOnRpcError };
|
|
@@ -2,7 +2,7 @@ import { useFrameworkApi as e } from "./runtimeContext.js";
|
|
|
2
2
|
import { useSubscription as t } from "./useSubscription.js";
|
|
3
3
|
import { readPreloadedSeedOutcome as n, readPreloadedSnapshot as r } from "./preloadSeed.js";
|
|
4
4
|
import { useSyncExternalStore as i } from "react";
|
|
5
|
-
|
|
5
|
+
// src/usePreloadedSubscription.ts
|
|
6
6
|
var a = () => !0, o = (e) => () => {};
|
|
7
7
|
function s(s, c, l = {}, u = {}) {
|
|
8
8
|
let { recovery: d } = e(s), f = i(d?.subscribe ?? o, d?.getPreloadSeedPermission ?? a, a), p = f ? r(s, c, l) : void 0, m = p === void 0 ? u : {
|
|
@@ -14,5 +14,4 @@ function s(s, c, l = {}, u = {}) {
|
|
|
14
14
|
preloadFailed: !0
|
|
15
15
|
} : h;
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
17
|
export { s as usePreloadedSubscription };
|
package/dist/usePreview.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAction as e } from "./useAction.js";
|
|
2
2
|
import { useCallback as t } from "react";
|
|
3
|
-
|
|
3
|
+
// src/usePreview.ts
|
|
4
4
|
var n = (n, r) => {
|
|
5
5
|
let i = e(n, r);
|
|
6
6
|
return {
|
|
@@ -10,5 +10,4 @@ var n = (n, r) => {
|
|
|
10
10
|
error: i.error
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
export { n as usePreview };
|
package/dist/useProvenance.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useFrameworkApi as e } from "./runtimeContext.js";
|
|
2
2
|
import { useEffect as t, useState as n } from "react";
|
|
3
|
-
|
|
3
|
+
// src/useProvenance.ts
|
|
4
4
|
var r = (e, t, n, r) => {
|
|
5
5
|
let i = e.replace(/\/$/, ""), a = new URLSearchParams({
|
|
6
6
|
table: t,
|
|
@@ -47,5 +47,4 @@ var r = (e, t, n, r) => {
|
|
|
47
47
|
s
|
|
48
48
|
]), l;
|
|
49
49
|
};
|
|
50
|
-
//#endregion
|
|
51
50
|
export { i as provenanceUrl, a as useProvenance };
|
package/dist/useQueryField.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useSubscription as e } from "./useSubscription.js";
|
|
2
2
|
import { useCallback as t, useEffect as n, useMemo as r, useState as i } from "react";
|
|
3
|
-
|
|
3
|
+
// src/useQueryField.ts
|
|
4
4
|
var a = (e, t, n) => e.map((e) => {
|
|
5
5
|
let r = String(e[n] ?? ""), i = e[t];
|
|
6
6
|
return {
|
|
@@ -30,5 +30,4 @@ var a = (e, t, n) => e.map((e) => {
|
|
|
30
30
|
search: S
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
//#endregion
|
|
34
33
|
export { a as rowsToOptions, s as useQueryField };
|
package/dist/useRecord.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useSubscription as e } from "./useSubscription.js";
|
|
2
|
-
|
|
2
|
+
// src/useRecord.ts
|
|
3
3
|
var t = (t, n, r = {}) => {
|
|
4
4
|
let i = e(t, n, r), a = i.data;
|
|
5
5
|
return {
|
|
@@ -8,5 +8,4 @@ var t = (t, n, r = {}) => {
|
|
|
8
8
|
error: i.error
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { t as useRecord };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { stableKey as e } from "./stableKey.js";
|
|
2
2
|
import { useFrameworkApi as t } from "./runtimeContext.js";
|
|
3
3
|
import { useCallback as n, useMemo as r, useRef as i } from "react";
|
|
4
|
-
|
|
4
|
+
// src/useRefreshSubscriptions.ts
|
|
5
5
|
var a = (e) => {
|
|
6
6
|
let { cache: r, runtime: i, recovery: a } = t(e);
|
|
7
7
|
return n(() => {
|
|
@@ -18,5 +18,4 @@ var a = (e) => {
|
|
|
18
18
|
return () => s.refresh(e);
|
|
19
19
|
}, [s, c]);
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { o as useRefreshSubscription, a as useRefreshSubscriptions };
|
package/dist/useResourceCan.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useSubscription as e } from "./useSubscription.js";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
|
-
|
|
3
|
+
// src/useResourceCan.ts
|
|
4
4
|
var n = (n, r, i, a = {}) => {
|
|
5
5
|
let o = e(n, r, { ...i }, a);
|
|
6
6
|
return t(() => ({
|
|
@@ -14,5 +14,4 @@ var n = (n, r, i, a = {}) => {
|
|
|
14
14
|
pending: o.data === void 0
|
|
15
15
|
}), [o.data]);
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { n as useResourceCan, r as useResourceCans };
|
|
@@ -3,7 +3,7 @@ import { useFrameworkApi as t } from "./runtimeContext.js";
|
|
|
3
3
|
import { resolveByTag as n } from "./tagWalk.js";
|
|
4
4
|
import { useCallback as r, useRef as i, useState as a } from "react";
|
|
5
5
|
import { Cause as o, Duration as s, Effect as c, Fiber as l, Stream as u } from "effect";
|
|
6
|
-
|
|
6
|
+
// src/useResumableAgentStream.ts
|
|
7
7
|
var d = (t, n, r, i) => {
|
|
8
8
|
let a = 0, l = !1, d = (e) => c.sync(() => {
|
|
9
9
|
e.seq <= a || (a = e.seq, r.onEvent(e.event), i.isTerminal(e.event) && (l = !0));
|
|
@@ -71,5 +71,4 @@ var d = (t, n, r, i) => {
|
|
|
71
71
|
cancel: C
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
|
-
//#endregion
|
|
75
74
|
export { d as resumableConsumeProgram, p as useResumableAgentStream };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useFrameworkApi as e } from "./runtimeContext.js";
|
|
2
|
+
import { resolveByTag as t } from "./tagWalk.js";
|
|
3
|
+
import { runRpcPromise as n } from "./runRpc.js";
|
|
4
|
+
import { awaitResolvedApi as r } from "./awaitResolvedApi.js";
|
|
5
|
+
import { useMemo as i, useRef as a } from "react";
|
|
6
|
+
// src/useRpcCaller.ts
|
|
7
|
+
var o = (o) => {
|
|
8
|
+
let s = e(o), c = a(s);
|
|
9
|
+
return c.current = s, i(() => Object.freeze({ call: async (e, i, a) => {
|
|
10
|
+
let { runtime: s, client: l } = await r(c, o, e, a?.signal);
|
|
11
|
+
a?.signal?.throwIfAborted();
|
|
12
|
+
let u = t(l, e);
|
|
13
|
+
return n(s, u(i), { signal: a?.signal });
|
|
14
|
+
} }), [o]);
|
|
15
|
+
};
|
|
16
|
+
export { o as useRpcCaller };
|
package/dist/useSequence.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { runSequence as e } from "./sequence.js";
|
|
2
2
|
import { useCallback as t, useRef as n, useState as r } from "react";
|
|
3
|
-
|
|
3
|
+
// src/useSequence.ts
|
|
4
4
|
var i = (i = {}) => {
|
|
5
5
|
let [a, o] = r(!1), [s, c] = r(void 0), [l, u] = r(void 0), d = n(i);
|
|
6
6
|
return d.current = i, {
|
|
@@ -21,5 +21,4 @@ var i = (i = {}) => {
|
|
|
21
21
|
failedStep: l
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { i as useSequence };
|
package/dist/useSkeleton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFrameworkApi as e } from "./runtimeContext.js";
|
|
2
2
|
import { schemaToColumns as t, schemaToFields as n } from "./schemaFields.js";
|
|
3
3
|
import { useMemo as r } from "react";
|
|
4
|
-
|
|
4
|
+
// src/useSkeleton.ts
|
|
5
5
|
var i = (t, i) => {
|
|
6
6
|
let a = e(t).descriptors[i]?.input;
|
|
7
7
|
return r(() => a === void 0 ? [] : n(a), [a]);
|
|
@@ -9,5 +9,4 @@ var i = (t, i) => {
|
|
|
9
9
|
let a = e(n).descriptors[i]?.output;
|
|
10
10
|
return r(() => a === void 0 ? [] : t(a), [a]);
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { i as useFormSkeleton, a as useTableSkeleton };
|
package/dist/useSubscription.js
CHANGED
|
@@ -1,89 +1,97 @@
|
|
|
1
1
|
import { useFrameworkApi as e } from "./runtimeContext.js";
|
|
2
2
|
import { resolveByTag as t } from "./tagWalk.js";
|
|
3
3
|
import { useCallback as n, useMemo as r, useRef as i, useSyncExternalStore as a } from "react";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { Stream as o } from "effect";
|
|
5
|
+
// src/useSubscription.ts
|
|
6
|
+
var s = Object.freeze({
|
|
6
7
|
data: void 0,
|
|
7
8
|
revision: -1,
|
|
8
9
|
emittedAt: void 0,
|
|
9
10
|
error: void 0,
|
|
10
11
|
pendingPatches: 0
|
|
11
|
-
}),
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
let
|
|
18
|
-
let e =
|
|
12
|
+
}), c = () => s;
|
|
13
|
+
function l(l, u, d = {}, f = {}) {
|
|
14
|
+
let p = f.skip === !0, { runtime: m, cache: h, client: g, descriptors: _ } = e(l), v = _[u]?.source, y = i(d);
|
|
15
|
+
y.current = d;
|
|
16
|
+
let b = i(g);
|
|
17
|
+
b.current = g;
|
|
18
|
+
let x = r(() => JSON.stringify(Object.entries(d).sort(([e], [t]) => e.localeCompare(t))), [d]), S = r(() => {
|
|
19
|
+
let e = y.current;
|
|
19
20
|
return {
|
|
20
|
-
queryKey: [
|
|
21
|
-
fetch: () =>
|
|
21
|
+
queryKey: [u, e],
|
|
22
|
+
fetch: () => {
|
|
23
|
+
let n;
|
|
24
|
+
try {
|
|
25
|
+
n = t(b.current, u);
|
|
26
|
+
} catch (e) {
|
|
27
|
+
return o.fail(e);
|
|
28
|
+
}
|
|
29
|
+
return n(e);
|
|
30
|
+
}
|
|
22
31
|
};
|
|
23
|
-
}, [
|
|
32
|
+
}, [u, x]), C = S.queryKey, w = n((e) => p ? () => {} : h.subscribe(S.queryKey, S.fetch, m, e, v === void 0 ? {} : { source: v }).unsubscribe, [
|
|
33
|
+
h,
|
|
24
34
|
m,
|
|
35
|
+
v,
|
|
25
36
|
p,
|
|
26
|
-
_,
|
|
27
|
-
f,
|
|
28
|
-
x
|
|
29
|
-
]), w = n(() => f ? o : m.peek(S), [
|
|
30
|
-
m,
|
|
31
|
-
f,
|
|
32
37
|
S
|
|
33
|
-
]), T =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
]), T = n(() => p ? s : h.peek(C), [
|
|
39
|
+
h,
|
|
40
|
+
p,
|
|
41
|
+
C
|
|
42
|
+
]), E = a(w, T, c), D = E.data !== void 0, O = D && (Array.isArray(E.data) ? E.data.length === 0 : E.data === null), k = {
|
|
43
|
+
revision: E.revision,
|
|
44
|
+
emittedAt: E.emittedAt,
|
|
45
|
+
error: E.error,
|
|
46
|
+
pendingPatches: E.pendingPatches
|
|
38
47
|
};
|
|
39
|
-
if (
|
|
40
|
-
let e = Array.isArray(
|
|
48
|
+
if (f.initialSnapshot !== void 0) {
|
|
49
|
+
let e = Array.isArray(f.initialSnapshot) ? f.initialSnapshot.length === 0 : f.initialSnapshot === null;
|
|
41
50
|
return {
|
|
42
|
-
...
|
|
43
|
-
data:
|
|
51
|
+
...k,
|
|
52
|
+
data: D ? E.data : f.initialSnapshot,
|
|
44
53
|
loading: !1,
|
|
45
|
-
idle:
|
|
46
|
-
isEmpty:
|
|
54
|
+
idle: p,
|
|
55
|
+
isEmpty: D ? O : e,
|
|
47
56
|
failed: !1
|
|
48
57
|
};
|
|
49
58
|
}
|
|
50
|
-
return
|
|
51
|
-
...
|
|
59
|
+
return f.fallback === void 0 ? p ? {
|
|
60
|
+
...k,
|
|
52
61
|
data: void 0,
|
|
53
62
|
loading: !1,
|
|
54
63
|
isEmpty: !1,
|
|
55
64
|
idle: !0,
|
|
56
65
|
failed: !1
|
|
57
|
-
} :
|
|
58
|
-
...
|
|
59
|
-
data:
|
|
66
|
+
} : D ? {
|
|
67
|
+
...k,
|
|
68
|
+
data: E.data,
|
|
60
69
|
loading: !1,
|
|
61
|
-
isEmpty:
|
|
70
|
+
isEmpty: O,
|
|
62
71
|
idle: !1,
|
|
63
72
|
failed: !1
|
|
64
|
-
} :
|
|
65
|
-
...
|
|
73
|
+
} : k.error === void 0 ? {
|
|
74
|
+
...k,
|
|
66
75
|
data: void 0,
|
|
67
76
|
loading: !0,
|
|
68
77
|
isEmpty: !1,
|
|
69
78
|
idle: !1,
|
|
70
79
|
failed: !1
|
|
71
80
|
} : {
|
|
72
|
-
...
|
|
81
|
+
...k,
|
|
73
82
|
data: void 0,
|
|
74
83
|
loading: !1,
|
|
75
84
|
isEmpty: !1,
|
|
76
85
|
idle: !1,
|
|
77
86
|
failed: !0,
|
|
78
|
-
error:
|
|
87
|
+
error: k.error
|
|
79
88
|
} : {
|
|
80
|
-
...
|
|
81
|
-
data:
|
|
82
|
-
loading: !
|
|
83
|
-
idle:
|
|
84
|
-
isEmpty:
|
|
85
|
-
failed: !
|
|
89
|
+
...k,
|
|
90
|
+
data: D ? E.data : f.fallback,
|
|
91
|
+
loading: !D && !p,
|
|
92
|
+
idle: p,
|
|
93
|
+
isEmpty: O,
|
|
94
|
+
failed: !D && k.error !== void 0
|
|
86
95
|
};
|
|
87
96
|
}
|
|
88
|
-
|
|
89
|
-
export { c as useSubscription };
|
|
97
|
+
export { l as useSubscription };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useFrameworkApi as e } from "./runtimeContext.js";
|
|
2
2
|
import { useEffect as t, useState as n } from "react";
|
|
3
|
-
|
|
3
|
+
// src/useSubscriptionHealth.ts
|
|
4
4
|
var r = {
|
|
5
5
|
failed: [],
|
|
6
6
|
healthy: !0
|
|
@@ -28,5 +28,4 @@ var r = {
|
|
|
28
28
|
};
|
|
29
29
|
}, [a]), o;
|
|
30
30
|
};
|
|
31
|
-
//#endregion
|
|
32
31
|
export { i as useSubscriptionHealth };
|
package/dist/useTranscription.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAction as e } from "./useAction.js";
|
|
2
2
|
import { useUpload as t } from "./useUpload.js";
|
|
3
3
|
import { useCallback as n, useMemo as r, useRef as i, useState as a } from "react";
|
|
4
|
-
|
|
4
|
+
// src/useTranscription.ts
|
|
5
5
|
var o = (o, s) => {
|
|
6
6
|
let c = t(o), l = e(o, s.action), [u, d] = a("idle"), [f, p] = a(void 0), [m, h] = a(void 0), g = i(s.extra);
|
|
7
7
|
g.current = s.extra;
|
|
@@ -47,5 +47,4 @@ var o = (o, s) => {
|
|
|
47
47
|
y
|
|
48
48
|
]);
|
|
49
49
|
};
|
|
50
|
-
//#endregion
|
|
51
50
|
export { o as useTranscription };
|
package/dist/useUndo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback as e, useMemo as t, useState as n } from "react";
|
|
2
|
-
|
|
2
|
+
// src/useUndo.ts
|
|
3
3
|
var r = (r) => {
|
|
4
4
|
let [i, a] = n([]), [o, s] = n([]), c = e((e) => {
|
|
5
5
|
a((t) => [...t, e]), s([]);
|
|
@@ -29,5 +29,4 @@ var r = (r) => {
|
|
|
29
29
|
u
|
|
30
30
|
]);
|
|
31
31
|
};
|
|
32
|
-
//#endregion
|
|
33
32
|
export { r as useUndo };
|
package/dist/useUndoLog.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSubscription as e } from "./useSubscription.js";
|
|
2
2
|
import { useMutation as t } from "./useMutation.js";
|
|
3
3
|
import { useCallback as n, useMemo as r } from "react";
|
|
4
|
-
|
|
4
|
+
// src/useUndoLog.ts
|
|
5
5
|
var i = "__voltro.undo.log", a = "__voltro.undo.apply", o = "__voltro.undo.redo", s = (e) => {
|
|
6
6
|
if (e.length < 32 || Object.getPrototypeOf(e) !== Array.prototype || Object.hasOwn(e, "find")) return;
|
|
7
7
|
let t, n;
|
|
@@ -40,5 +40,4 @@ var i = "__voltro.undo.log", a = "__voltro.undo.apply", o = "__voltro.undo.redo"
|
|
|
40
40
|
redoLast: x
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
//#endregion
|
|
44
43
|
export { a as UNDO_APPLY_TAG, i as UNDO_LOG_TAG, o as UNDO_REDO_TAG, c as useUndoLog };
|
package/dist/useUpload.js
CHANGED
|
@@ -6,7 +6,7 @@ import { awaitResolvedApi as a } from "./awaitResolvedApi.js";
|
|
|
6
6
|
import { createUploadProgress as o } from "./uploadProgress.js";
|
|
7
7
|
import { useCallback as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
8
8
|
import { pluginTag as d } from "@voltro/protocol";
|
|
9
|
-
|
|
9
|
+
// src/useUpload.ts
|
|
10
10
|
var f = "@voltro/plugin-storage", p = (e) => d(f, e), m = (e, t, n, r) => new Promise((i, a) => {
|
|
11
11
|
let o = new XMLHttpRequest();
|
|
12
12
|
o.open("PUT", e), o.upload.onprogress = (e) => {
|
|
@@ -292,5 +292,4 @@ var f = "@voltro/plugin-storage", p = (e) => d(f, e), m = (e, t, n, r) => new Pr
|
|
|
292
292
|
I
|
|
293
293
|
]);
|
|
294
294
|
};
|
|
295
|
-
//#endregion
|
|
296
295
|
export { v as useUpload };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useSubscription as e } from "./useSubscription.js";
|
|
2
2
|
import { useCallback as t, useMemo as n, useRef as r, useState as i } from "react";
|
|
3
|
-
|
|
3
|
+
// src/useWindowedSubscription.ts
|
|
4
4
|
var a = (e) => {
|
|
5
5
|
let { scrollTop: t, viewportHeight: n, rowHeight: r, overscan: i = 5, total: a } = e, o = r > 0 ? r : 1, s = Math.max(0, Math.floor(t / o)), c = Math.ceil(n / o), l = Math.max(0, s - i), u = s + c + i, d = a === void 0 ? u : Math.min(u, a);
|
|
6
6
|
return {
|
|
@@ -61,5 +61,4 @@ var a = (e) => {
|
|
|
61
61
|
error: y.error
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
|
-
//#endregion
|
|
65
64
|
export { a as computeWindow, o as useWindowedSubscription };
|
package/dist/useWorkflow.js
CHANGED
|
@@ -6,7 +6,7 @@ import { runRpcPromise as i } from "./runRpc.js";
|
|
|
6
6
|
import { awaitResolvedApi as a } from "./awaitResolvedApi.js";
|
|
7
7
|
import { useCallback as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
8
8
|
import { Effect as u, Option as d, Stream as f } from "effect";
|
|
9
|
-
|
|
9
|
+
// src/useWorkflow.ts
|
|
10
10
|
var p = async (t) => {
|
|
11
11
|
let r = n(t.client, t.tag), a = u.currentSpan.pipe(u.tap((n) => u.sync(() => {
|
|
12
12
|
e({
|
|
@@ -280,5 +280,4 @@ var p = async (t) => {
|
|
|
280
280
|
deliveries: n.data
|
|
281
281
|
};
|
|
282
282
|
};
|
|
283
|
-
//#endregion
|
|
284
283
|
export { m as useWorkflow, S as useWorkflowDomainEvents, C as useWorkflowEventDeliveries, x as useWorkflowEvents, _ as useWorkflowRun, b as useWorkflowRunEvents, y as useWorkflowRunSteps, v as useWorkflowRuns, h as useWorkflowSignal, g as useWorkflowUpdate };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useWorkflow as e, useWorkflowRun as t, useWorkflowRunEvents as n, useWorkflowRunSteps as r } from "./useWorkflow.js";
|
|
2
2
|
import { useCallback as i, useMemo as a } from "react";
|
|
3
|
-
|
|
3
|
+
// src/useWorkflowRunState.ts
|
|
4
4
|
var o = (e, t) => {
|
|
5
5
|
let n = e.payload;
|
|
6
6
|
if (!n || typeof n != "object") return;
|
|
@@ -89,5 +89,4 @@ var o = (e, t) => {
|
|
|
89
89
|
x
|
|
90
90
|
]);
|
|
91
91
|
};
|
|
92
|
-
//#endregion
|
|
93
92
|
export { d as useWorkflowRunState };
|
package/dist/validation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useSubscription as e } from "./useSubscription.js";
|
|
2
2
|
import { useEffect as t, useMemo as n, useState as r } from "react";
|
|
3
|
-
|
|
3
|
+
// src/validation.ts
|
|
4
4
|
var i = (e, n = 300) => {
|
|
5
5
|
let [i, a] = r(e);
|
|
6
6
|
return t(() => {
|
|
@@ -35,5 +35,4 @@ var i = (e, n = 300) => {
|
|
|
35
35
|
skipEmpty: d
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
//#endregion
|
|
39
38
|
export { o as useAsyncValidation, i as useDebounced, a as validationStatus };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createContext as e, createElement as t, useContext as n } from "react";
|
|
2
|
-
|
|
2
|
+
// src/validationMessages.tsx
|
|
3
3
|
var r = e(void 0), i = (e) => t(r.Provider, { value: e.messages }, e.children), a = () => n(r);
|
|
4
|
-
//#endregion
|
|
5
4
|
export { i as ValidationMessagesProvider, a as useValidationMessages };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"description": "Framework-agnostic client bindings — the typed RpcClient, subscription cache, and reactive data layer the web hooks build on.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@tanstack/form-core": "^1.33.5",
|
|
57
|
-
"@tanstack/react-store": "^0.11.
|
|
58
|
-
"@voltro/protocol": "0.
|
|
57
|
+
"@tanstack/react-store": "^0.11.2",
|
|
58
|
+
"@voltro/protocol": "0.88.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"effect": "4.0
|
|
61
|
+
"effect": "4.1.0",
|
|
62
62
|
"react": "^19.0.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependenciesMeta": {
|