@voltro/client 0.87.0 → 0.89.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 +272 -6
- package/THIRD-PARTY-NOTICES.md +6 -1349
- package/dist/analyticsCatalog.js +1 -2
- package/dist/apiConnectivity.js +1 -2
- package/dist/apiRoleTransports.js +1 -2
- package/dist/apiRuntime.js +1 -2
- package/dist/apiSocketTracker.js +1 -2
- package/dist/apiSupervisor.js +1 -2
- package/dist/authRefresh.js +1 -2
- package/dist/awaitResolvedApi.js +1 -2
- 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 +1 -2
- 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/formBinding.js +1 -2
- package/dist/formData.js +1 -2
- package/dist/formFlashId.js +1 -2
- package/dist/formRejection.js +1 -2
- package/dist/formSource.js +1 -2
- package/dist/frameworkRuntimesContext.js +1 -2
- package/dist/globalContext.js +1 -2
- package/dist/index.js +1 -2
- 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/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 +1 -2
- package/dist/serviceClient.js +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- package/dist/useFormBinding.js +2 -3
- 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 +1 -2
- package/dist/useSequence.js +1 -2
- package/dist/useSkeleton.js +1 -2
- package/dist/useSubscription.js +1 -2
- 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/runRpc.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { squashRpcCause as e } from "./squashRpcCause.js";
|
|
2
2
|
import { rememberRpcErrorKind as t, rpcErrorKind as n } from "./rpcErrorKind.js";
|
|
3
3
|
import { Cause as r, Exit as i, Option as a } from "effect";
|
|
4
|
-
|
|
4
|
+
// src/runRpc.ts
|
|
5
5
|
var o = async (o, s, c) => {
|
|
6
6
|
let l = await o.runPromiseExit(s, c?.signal === void 0 ? void 0 : { signal: c.signal });
|
|
7
7
|
if (i.isSuccess(l)) return l.value;
|
|
8
8
|
let u = e(l.cause), d = r.findErrorOption(l.cause), f = a.isSome(d) ? n(d.value, "handler") : "unknown";
|
|
9
9
|
throw t(u, f);
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { o as runRpcPromise };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtimeCapabilities.ts
|
|
2
2
|
var e = (e, t, n) => {
|
|
3
3
|
try {
|
|
4
4
|
let r = globalThis.location, i = typeof r == "object" && r ? r.href : void 0, a = new URL(e, i);
|
|
@@ -40,5 +40,4 @@ var e = (e, t, n) => {
|
|
|
40
40
|
clearTimeout(c), s.abort();
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
//#endregion
|
|
44
43
|
export { t as readRuntimeCapabilities, e as runtimeCapabilitiesUrl };
|
package/dist/runtimeContext.js
CHANGED
|
@@ -4,7 +4,7 @@ import { RecoveryCoordinator as n } from "./recoveryCoordinator.js";
|
|
|
4
4
|
import { FrameworkRuntimesContext as r, isUnresolvedApi as i, unknownApiError as a } from "./frameworkRuntimesContext.js";
|
|
5
5
|
import { useContext as o, useEffect as s } from "react";
|
|
6
6
|
import { Exit as c } from "effect";
|
|
7
|
-
|
|
7
|
+
// src/runtimeContext.ts
|
|
8
8
|
var l = () => {
|
|
9
9
|
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");
|
|
10
10
|
}, u = /* @__PURE__ */ new Proxy(() => l(), {
|
|
@@ -45,5 +45,4 @@ var l = () => {
|
|
|
45
45
|
n?.(e);
|
|
46
46
|
}, [n, e]), t.get(e);
|
|
47
47
|
};
|
|
48
|
-
//#endregion
|
|
49
48
|
export { r as FrameworkRuntimesContext, S as _resetFrameworkRuntimesWarning, g as _resetSsrDescriptors, i as isUnresolvedApi, m as registerSsrDescriptors, u as ssrClientProxy, h as ssrDescriptorsFor, _ as ssrStubHandle, a as unknownApiError, w as useFrameworkApi, C as useFrameworkRuntimes };
|
package/dist/schemaFields.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Schema as e } from "effect";
|
|
|
2
2
|
import { finiteNumberView as t } from "@voltro/protocol";
|
|
3
3
|
import * as n from "effect/SchemaAST";
|
|
4
4
|
import * as r from "effect/SchemaRepresentation";
|
|
5
|
-
|
|
5
|
+
// src/schemaFields.ts
|
|
6
6
|
var i = (e) => ({ voltroField: e }), a = "x-voltro", o = (t) => e.makeFilter(() => !0, { toJsonSchema: () => ({ [a]: t }) }), s = {
|
|
7
7
|
"effect/schema/Date": "date",
|
|
8
8
|
"effect/schema/DateTimeUtc": "date-time"
|
|
@@ -215,5 +215,4 @@ var i = (e) => ({ voltroField: e }), a = "x-voltro", o = (t) => e.makeFilter(()
|
|
|
215
215
|
}
|
|
216
216
|
return t;
|
|
217
217
|
};
|
|
218
|
-
//#endregion
|
|
219
218
|
export { i as formField, O as formSections, D as schemaToColumns, E as schemaToFields };
|
package/dist/scopeMembership.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/scopeMembership.ts
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
if (!(e.length < 32 || Object.getPrototypeOf(e) !== Array.prototype || e.includes !== Array.prototype.includes || e[Symbol.iterator] !== Array.prototype[Symbol.iterator])) {
|
|
4
4
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -8,5 +8,4 @@ var e = (e) => {
|
|
|
8
8
|
return new Set(e);
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
|
-
//#endregion
|
|
12
11
|
export { e as scopeMembership };
|
package/dist/seedResolvers.js
CHANGED
package/dist/sequence.js
CHANGED
package/dist/serverRequest.js
CHANGED
|
@@ -3,7 +3,7 @@ import { FORM_FLASH_SCRIPT_ID as t } from "./formFlashId.js";
|
|
|
3
3
|
import { formCaptureSource as n, readFormCaptureSource as r } from "./formSource.js";
|
|
4
4
|
import { useContext as i, useMemo as a } from "react";
|
|
5
5
|
import { jsx as o } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/serverRequest.tsx
|
|
7
7
|
var s = e("serverRequest", null), c = () => i(s), l = ({ value: e, children: t }) => /* @__PURE__ */ o(s.Provider, {
|
|
8
8
|
value: e,
|
|
9
9
|
children: t
|
|
@@ -24,5 +24,4 @@ var s = e("serverRequest", null), c = () => i(s), l = ({ value: e, children: t }
|
|
|
24
24
|
let e = c();
|
|
25
25
|
return e === null ? r() : n(e.formSource);
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
export { s as ServerRequestContext, l as ServerRequestProvider, d as useFormCapture, u as useFormFlash, c as useServerRequest };
|
package/dist/serviceClient.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Duration as a, Effect as o, Exit as s, Option as c, Schedule as l, Stre
|
|
|
6
6
|
import * as d from "effect/http/Headers";
|
|
7
7
|
import { RpcClient as f } from "effect/rpc";
|
|
8
8
|
import { ApiUnavailable as p, MUTATION_IN_FLIGHT_RETRY_AFTER_MS as m, captureApiRoleEndpoints as h } from "@voltro/protocol";
|
|
9
|
-
|
|
9
|
+
// src/serviceClient.ts
|
|
10
10
|
var g = (e) => e?._tag === "MutationInFlight", _ = 1e4, v = (e, t) => {
|
|
11
11
|
let n = e.descriptors[t]?.kind;
|
|
12
12
|
return n === "query" || n === "mutation" || n === "action" ? n : void 0;
|
|
@@ -125,5 +125,4 @@ var g = (e) => e?._tag === "MutationInFlight", _ = 1e4, v = (e, t) => {
|
|
|
125
125
|
};
|
|
126
126
|
return new Proxy({}, { get: (e, n) => typeof n == "string" && n !== "then" ? t([n]) : void 0 });
|
|
127
127
|
};
|
|
128
|
-
//#endregion
|
|
129
128
|
export { _ as DEFAULT_SERVICE_CALL_TIMEOUT_MS, y as makeServiceClient, b as serviceApi };
|
package/dist/squashRpcCause.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Cause as e, Option as t, Schema as n } from "effect";
|
|
2
|
-
|
|
2
|
+
// src/squashRpcCause.ts
|
|
3
3
|
var r = (r) => {
|
|
4
4
|
let i = e.squash(r);
|
|
5
5
|
return t.isNone(e.findErrorOption(r)) && n.isSchemaError(i) && console.error("[voltro] a value failed its schema in the client — if it is the request payload, the request never reached the server, so no server log has it:\n" + i.message), i;
|
|
6
6
|
};
|
|
7
|
-
//#endregion
|
|
8
7
|
export { r as squashRpcCause };
|
package/dist/stableKey.js
CHANGED
package/dist/store.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { seedResolvers as e } from "./seedResolvers.js";
|
|
2
2
|
import { resolveStoreStorage as t } from "./storeStorage.js";
|
|
3
3
|
import { useCallback as n, useDebugValue as r, useRef as i, useSyncExternalStore as a } from "react";
|
|
4
|
-
|
|
4
|
+
// src/store.ts
|
|
5
5
|
var o = (e, t) => {
|
|
6
6
|
if (Object.is(e, t)) return !0;
|
|
7
7
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null || Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
@@ -284,5 +284,4 @@ var M = () => {
|
|
|
284
284
|
e !== void 0 && e.set(t.value, t.key);
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
|
-
//#endregion
|
|
288
287
|
export { z as applyStoreSeeds, y as clearStoreHistory, P as defineStore, N as definedStores, I as makeStoreSeedBag, F as resetStoreRegistryForTests, R as seedStore, L as setStoreSeedResolver, o as shallow, _ as storeHistory, v as subscribeStoreHistory, b as travelToStoreState };
|
package/dist/storeStorage.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/storeStorage.ts
|
|
2
2
|
var e = Symbol.for("@voltro/client/storeStorageProvider"), t = () => {
|
|
3
3
|
let t = globalThis, n = t[e];
|
|
4
4
|
if (n !== void 0) return n;
|
|
@@ -24,5 +24,4 @@ var e = Symbol.for("@voltro/client/storeStorageProvider"), t = () => {
|
|
|
24
24
|
let e = t();
|
|
25
25
|
e.provider = void 0, e.used = !1;
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
export { n as browserStoreStorage, a as resetStoreStorageForTest, i as resolveStoreStorage, r as setStoreStorage };
|
|
@@ -8,7 +8,7 @@ import { Cause as o, Effect as s, Exit as c, Fiber as l, Option as u, Stream as
|
|
|
8
8
|
import * as f from "effect/http/Headers";
|
|
9
9
|
import { RpcClient as p } from "effect/rpc";
|
|
10
10
|
import { createRowPatchApplier as m } from "@voltro/protocol";
|
|
11
|
-
|
|
11
|
+
// src/subscriptionCache.ts
|
|
12
12
|
var h = (e) => e === void 0 ? /* @__PURE__ */ Error("[voltro] the subscription failed without an error value") : e, g = Object.freeze({
|
|
13
13
|
data: void 0,
|
|
14
14
|
revision: -1,
|
|
@@ -720,5 +720,4 @@ var h = (e) => e === void 0 ? /* @__PURE__ */ Error("[voltro] the subscription f
|
|
|
720
720
|
};
|
|
721
721
|
}
|
|
722
722
|
};
|
|
723
|
-
//#endregion
|
|
724
723
|
export { L as LoadingSubscriptionCache, I as SubscriptionCache, a as stableKey, v as supersedesConfirmedPatches };
|
package/dist/tagWalk.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/tagWalk.ts
|
|
2
2
|
var e = (e, t) => {
|
|
3
3
|
let n = t.split("."), r = e, i = 0;
|
|
4
4
|
for (let e = 0; e < n.length; e++) {
|
|
@@ -19,5 +19,4 @@ var e = (e, t) => {
|
|
|
19
19
|
if (typeof r != "function") throw Error(`@voltro/client: rpc tag ${JSON.stringify(t)} did not resolve to a callable method.`);
|
|
20
20
|
return r;
|
|
21
21
|
};
|
|
22
|
-
//#endregion
|
|
23
22
|
export { e as resolveByTag };
|
package/dist/traceBus.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/traceBus.ts
|
|
2
2
|
var e = /* @__PURE__ */ new Set(), t = (t) => {
|
|
3
3
|
for (let n of e) try {
|
|
4
4
|
n(t);
|
|
@@ -6,5 +6,4 @@ var e = /* @__PURE__ */ new Set(), t = (t) => {
|
|
|
6
6
|
}, n = (t) => (e.add(t), () => {
|
|
7
7
|
e.delete(t);
|
|
8
8
|
});
|
|
9
|
-
//#endregion
|
|
10
9
|
export { t as publishClientTrace, n as subscribeClientTraces };
|
package/dist/tracking.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect as e, useMemo as t, useRef as n } from "react";
|
|
2
|
-
|
|
2
|
+
// src/tracking.ts
|
|
3
3
|
var r = (e, t) => ({
|
|
4
4
|
name: e,
|
|
5
5
|
map: t
|
|
@@ -36,5 +36,4 @@ var r = (e, t) => ({
|
|
|
36
36
|
s
|
|
37
37
|
]);
|
|
38
38
|
};
|
|
39
|
-
//#endregion
|
|
40
39
|
export { r as defineTracking, i as resolveTrackingEvent, s as useTracking, o as wrapTrackedCallbacks };
|
package/dist/uploadProgress.js
CHANGED
package/dist/useAction.js
CHANGED
|
@@ -9,7 +9,7 @@ import { freshIdempotencyKey as c, withIdempotencyKey as l } from "./mutationIde
|
|
|
9
9
|
import { getMutationNotifier as u } from "./useMutation.js";
|
|
10
10
|
import { useCallback as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
11
11
|
import { Effect as h } from "effect";
|
|
12
|
-
|
|
12
|
+
// src/useAction.ts
|
|
13
13
|
var g = (e, t) => {
|
|
14
14
|
if (t === void 0 || typeof e != "object" || !e) return e;
|
|
15
15
|
try {
|
|
@@ -97,5 +97,4 @@ var g = (e, t) => {
|
|
|
97
97
|
O
|
|
98
98
|
]);
|
|
99
99
|
};
|
|
100
|
-
//#endregion
|
|
101
100
|
export { b as useAction };
|
package/dist/useAgent.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAgentStream as e } from "./useAgentStream.js";
|
|
2
2
|
import { useCallback as t, useEffect as n, useMemo as r, useRef as i, useState as a } from "react";
|
|
3
|
-
|
|
3
|
+
// src/useAgent.ts
|
|
4
4
|
var o = (o, s) => {
|
|
5
5
|
let { events: c, status: l, error: u, start: d, cancel: f } = e(o, s), [p, m] = a([]), h = i(null), g = i({
|
|
6
6
|
events: [],
|
|
@@ -49,5 +49,4 @@ var o = (o, s) => {
|
|
|
49
49
|
cancel: f
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
-
//#endregion
|
|
53
52
|
export { o as useAgent };
|
package/dist/useAgentChat.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSubscription as e } from "./useSubscription.js";
|
|
2
2
|
import { useAction as t } from "./useAction.js";
|
|
3
3
|
import { useCallback as n, useMemo as r } from "react";
|
|
4
|
-
|
|
4
|
+
// src/useAgentChat.ts
|
|
5
5
|
var i = (e, t) => e.order - t.order || (e.stepOrder ?? 0) - (t.stepOrder ?? 0), a = (e) => {
|
|
6
6
|
for (let t = e.length - 1; t >= 0; --t) {
|
|
7
7
|
let n = e[t];
|
|
@@ -39,5 +39,4 @@ var i = (e, t) => e.order - t.order || (e.stepOrder ?? 0) - (t.stepOrder ?? 0),
|
|
|
39
39
|
h
|
|
40
40
|
]);
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { o as useAgentChat };
|
package/dist/useAgentStream.js
CHANGED
|
@@ -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, useEffect as i, useRef as a, useState as o } from "react";
|
|
5
5
|
import { Cause as s, Effect as c, Fiber as l, Stream as u } from "effect";
|
|
6
|
-
|
|
6
|
+
// src/useAgentStream.ts
|
|
7
7
|
var d = (d, f) => {
|
|
8
8
|
let { runtime: p, client: m } = t(d), [h, g] = o([]), [_, v] = o("idle"), [y, b] = o(void 0), x = a(null), S = a(null);
|
|
9
9
|
i(() => () => {
|
|
@@ -60,5 +60,4 @@ var d = (d, f) => {
|
|
|
60
60
|
cancel: C
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
-
//#endregion
|
|
64
63
|
export { d as useAgentStream };
|
package/dist/useApiOnline.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { apiConnectivity as e } from "./apiConnectivity.js";
|
|
2
2
|
import { useCallback as t, useSyncExternalStore as n } from "react";
|
|
3
|
-
|
|
3
|
+
// src/useApiOnline.ts
|
|
4
4
|
var r = () => globalThis.navigator?.onLine !== !1, i = (t) => r() && (e().online(t) ?? !0), a = (t) => {
|
|
5
5
|
let n = e().subscribe(t);
|
|
6
6
|
return typeof window > "u" ? n : (window.addEventListener("online", t), window.addEventListener("offline", t), () => {
|
|
@@ -10,5 +10,4 @@ var r = () => globalThis.navigator?.onLine !== !1, i = (t) => r() && (e().online
|
|
|
10
10
|
let r = t(() => i(e), [e]);
|
|
11
11
|
return n(a, r, () => !0);
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
export { i as readApiOnline, a as subscribeApiOnline, o as useApiOnline };
|
|
@@ -2,7 +2,7 @@ import { useFrameworkApi as e } from "./runtimeContext.js";
|
|
|
2
2
|
import { scopeMembership as t } from "./scopeMembership.js";
|
|
3
3
|
import { ADMIN_SCOPE as n, usePermissions as r } from "./permissions.js";
|
|
4
4
|
import { useEffect as i, useState as a } from "react";
|
|
5
|
-
|
|
5
|
+
// src/useCapabilityManifest.ts
|
|
6
6
|
var o = (e) => `${e.replace(/\/$/, "")}/_voltro/inspect/manifest`, s = (t) => {
|
|
7
7
|
let { inspectBaseUrl: n } = e(t), [r, s] = a({
|
|
8
8
|
manifest: void 0,
|
|
@@ -101,5 +101,4 @@ var o = (e) => `${e.replace(/\/$/, "")}/_voltro/inspect/manifest`, s = (t) => {
|
|
|
101
101
|
};
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
-
//#endregion
|
|
105
104
|
export { u as decideAccess, h as deriveEntityAdmins, o as manifestUrl, f as openAccessReason, d as requiredScopes, p as useAccessDecision, s as useCapabilityManifest };
|
|
@@ -2,7 +2,7 @@ import { useFrameworkApi as e } from "./runtimeContext.js";
|
|
|
2
2
|
import { awaitResolvedApi as t } from "./awaitResolvedApi.js";
|
|
3
3
|
import { ConnectionSetupController as n } from "./connectionSetupController.js";
|
|
4
4
|
import { useCallback as r, useEffect as i, useMemo as a, useRef as o, useSyncExternalStore as s } from "react";
|
|
5
|
-
|
|
5
|
+
// src/useConnectionSetup.ts
|
|
6
6
|
var c = (c, l) => {
|
|
7
7
|
let u = e(c), d = o(u);
|
|
8
8
|
d.current = u;
|
|
@@ -24,5 +24,4 @@ var c = (c, l) => {
|
|
|
24
24
|
ready: m.status === "ready"
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
export { c as useConnectionSetup };
|
|
@@ -2,7 +2,7 @@ import { recordClientDiagnostic as e } from "./clientDiagnostics.js";
|
|
|
2
2
|
import { INITIAL_RECOVERY_SNAPSHOT as t, recoveryCoordinatorFor as n } from "./recoveryCoordinator.js";
|
|
3
3
|
import { useFrameworkApi as r } from "./runtimeContext.js";
|
|
4
4
|
import { useCallback as i, useEffect as a, useSyncExternalStore as o } from "react";
|
|
5
|
-
|
|
5
|
+
// src/useConnectionStatus.ts
|
|
6
6
|
var s = () => typeof navigator > "u" || navigator.onLine, c = () => !0, l = (e) => typeof window > "u" ? () => {} : (window.addEventListener("online", e), window.addEventListener("offline", e), () => {
|
|
7
7
|
window.removeEventListener("online", e), window.removeEventListener("offline", e);
|
|
8
8
|
}), u = (u) => {
|
|
@@ -34,5 +34,4 @@ var s = () => typeof navigator > "u" || navigator.onLine, c = () => !0, l = (e)
|
|
|
34
34
|
reportSuccess: h
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
-
//#endregion
|
|
38
37
|
export { u as useConnectionStatus };
|
package/dist/useConnections.js
CHANGED
|
@@ -2,7 +2,7 @@ import { useSubscription as e } from "./useSubscription.js";
|
|
|
2
2
|
import { useMutation as t } from "./useMutation.js";
|
|
3
3
|
import { useAction as n } from "./useAction.js";
|
|
4
4
|
import { useCallback as r, useMemo as i } from "react";
|
|
5
|
-
|
|
5
|
+
// src/useConnections.ts
|
|
6
6
|
var a = "__voltro.connections.list", o = "__voltro.connections.start", s = "__voltro.connections.submitToken", c = "__voltro.connections.disconnect", l = {
|
|
7
7
|
connectionId: "",
|
|
8
8
|
kind: "oauth2",
|
|
@@ -103,5 +103,4 @@ var a = "__voltro.connections.list", o = "__voltro.connections.start", s = "__vo
|
|
|
103
103
|
n.pending
|
|
104
104
|
]);
|
|
105
105
|
};
|
|
106
|
-
//#endregion
|
|
107
106
|
export { a as CONNECTIONS_LIST_TAG, c as CONNECTION_DISCONNECT_TAG, o as CONNECTION_START_TAG, s as CONNECTION_SUBMIT_TOKEN_TAG, p as useConnection, f as useConnections };
|
package/dist/useDataCopilot.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAction as e } from "./useAction.js";
|
|
2
2
|
import { useCallback as t, useMemo as n, useState as r } from "react";
|
|
3
|
-
|
|
3
|
+
// src/useDataCopilot.ts
|
|
4
4
|
var i = (i, a) => {
|
|
5
5
|
let o = e(i, a), [s, c] = r(void 0), l = t(async (e) => {
|
|
6
6
|
let t = await o.run({ question: e });
|
|
@@ -20,5 +20,4 @@ var i = (i, a) => {
|
|
|
20
20
|
u
|
|
21
21
|
]);
|
|
22
22
|
};
|
|
23
|
-
//#endregion
|
|
24
23
|
export { i as useDataCopilot };
|
package/dist/useDataTable.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useSubscription as t } from "./useSubscription.js";
|
|
|
3
3
|
import { schemaToColumns as n } from "./schemaFields.js";
|
|
4
4
|
import { createLiveRowSorter as r } from "./liveRowSort.js";
|
|
5
5
|
import { useCallback as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
6
|
-
|
|
6
|
+
// src/useDataTable.ts
|
|
7
7
|
var c = (c, l, u = {}) => {
|
|
8
8
|
let d = e(c), [f, p] = s(u.pageSize), m = a(() => f === void 0 ? u.input ?? {} : {
|
|
9
9
|
...u.input,
|
|
@@ -30,5 +30,4 @@ var c = (c, l, u = {}) => {
|
|
|
30
30
|
hasMore: f !== void 0 && (h.data?.length ?? 0) >= f
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
//#endregion
|
|
34
33
|
export { c as useDataTable };
|
package/dist/useDerived.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef as e } from "react";
|
|
2
|
-
|
|
2
|
+
// src/useDerived.ts
|
|
3
3
|
var t = (e, t) => {
|
|
4
4
|
if (e === t) return !0;
|
|
5
5
|
if (e.length !== t.length) return !1;
|
|
@@ -18,5 +18,4 @@ var t = (e, t) => {
|
|
|
18
18
|
names: s
|
|
19
19
|
}), i.current.value;
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { t as shallowArrayEqual, n as sourceValues, r as useDerived };
|
package/dist/useEvent.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useFrameworkApi as n } from "./runtimeContext.js";
|
|
|
4
4
|
import { resolveByTag as r } from "./tagWalk.js";
|
|
5
5
|
import { useEffect as i, useLayoutEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
6
6
|
import { Effect as l, Fiber as u, Schedule as d, Stream as f } from "effect";
|
|
7
|
-
|
|
7
|
+
// src/useEvent.ts
|
|
8
8
|
var p = {
|
|
9
9
|
status: "idle",
|
|
10
10
|
missed: 0,
|
|
@@ -94,5 +94,4 @@ function h(h, g, _, v = {}) {
|
|
|
94
94
|
status: "connecting"
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
//#endregion
|
|
98
97
|
export { h as useEvent };
|
package/dist/useFormBinding.js
CHANGED
|
@@ -11,7 +11,7 @@ import { Schema as _ } from "effect";
|
|
|
11
11
|
import { fieldIssuesOf as re } from "@voltro/protocol";
|
|
12
12
|
import { FormApi as ie } from "@tanstack/form-core";
|
|
13
13
|
import { useStore as ae } from "@tanstack/react-store";
|
|
14
|
-
|
|
14
|
+
// src/useFormBinding.ts
|
|
15
15
|
var v = Symbol.for("voltro.client.formEngine"), y = e("formFields", void 0), b = (e, t) => Object.is(e.value, t.value) && e.error === t.error && e.serverError === t.serverError && e.touched === t.touched && e.blurred === t.blurred && e.dirty === t.dirty && e.required === t.required && e.label === t.label && e.widget === t.widget && e.options === t.options && e.description === t.description && e.asyncStatus === t.asyncStatus && e.a11y.id === t.a11y.id && e.a11y["aria-invalid"] === t.a11y["aria-invalid"] && e.a11y["aria-required"] === t.a11y["aria-required"] && e.a11y["aria-describedby"] === t.a11y["aria-describedby"], oe = (e, t) => {
|
|
16
16
|
let n = t, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a, o = (e) => {
|
|
17
17
|
let t = n(e), i = r.get(e);
|
|
@@ -127,7 +127,7 @@ var v = Symbol.for("voltro.client.formEngine"), y = e("formFields", void 0), b =
|
|
|
127
127
|
});
|
|
128
128
|
}, []), I = d((e) => {
|
|
129
129
|
let t = { ...e ?? {} }, n = O.current;
|
|
130
|
-
if (n !== void 0) for (let e of r(n))
|
|
130
|
+
if (n !== void 0) for (let e of r(n)) e.widget !== "checkbox" && e.widget !== "switch" || e.name in t || (t[e.name] = !1);
|
|
131
131
|
return t;
|
|
132
132
|
}, []), me = h(() => Promise.resolve());
|
|
133
133
|
if (f.current === void 0) {
|
|
@@ -474,5 +474,4 @@ function D(e, t) {
|
|
|
474
474
|
if (o === void 0) throw Error(r === void 0 ? "useFormField(path) found no form binding — mount <FormBindingProvider binding={form}> above this field, or call useFormField(form, path)." : "useFormField: not a useFormBinding result");
|
|
475
475
|
return ne(d((e) => o.subscribe(i, e), [o, i]), d(() => o.snapshot(i), [o, i]), d(() => o.snapshot(i), [o, i]));
|
|
476
476
|
}
|
|
477
|
-
//#endregion
|
|
478
477
|
export { T as FormBindingProvider, S as useFormBinding, E as useFormBindingContext, D as useFormField, C as useSchemaFormBinding };
|
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 };
|