@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.
Files changed (105) hide show
  1. package/CHANGELOG.md +272 -6
  2. package/THIRD-PARTY-NOTICES.md +6 -1349
  3. package/dist/analyticsCatalog.js +1 -2
  4. package/dist/apiConnectivity.js +1 -2
  5. package/dist/apiRoleTransports.js +1 -2
  6. package/dist/apiRuntime.js +1 -2
  7. package/dist/apiSocketTracker.js +1 -2
  8. package/dist/apiSupervisor.js +1 -2
  9. package/dist/authRefresh.js +1 -2
  10. package/dist/awaitResolvedApi.js +1 -2
  11. package/dist/cellMerger.js +1 -2
  12. package/dist/clientDiagnostics.js +1 -2
  13. package/dist/clientErrorBus.js +1 -2
  14. package/dist/clientScheduler.js +1 -2
  15. package/dist/connectionPrerequisite.js +1 -2
  16. package/dist/connectionScope.js +1 -2
  17. package/dist/connectionSetupController.js +1 -2
  18. package/dist/createHooks.js +1 -2
  19. package/dist/deepLink.js +1 -2
  20. package/dist/filters.js +1 -2
  21. package/dist/formBinding.js +1 -2
  22. package/dist/formData.js +1 -2
  23. package/dist/formFlashId.js +1 -2
  24. package/dist/formRejection.js +1 -2
  25. package/dist/formSource.js +1 -2
  26. package/dist/frameworkRuntimesContext.js +1 -2
  27. package/dist/globalContext.js +1 -2
  28. package/dist/index.js +1 -2
  29. package/dist/liveRowSort.js +1 -2
  30. package/dist/mutationConnectionSetup.js +1 -2
  31. package/dist/mutationIdentity.js +1 -2
  32. package/dist/mutationSerialExecution.js +1 -2
  33. package/dist/mutationsBus.js +1 -2
  34. package/dist/onlineSource.js +1 -2
  35. package/dist/outbox.js +1 -2
  36. package/dist/outboxHttp.js +1 -2
  37. package/dist/outboxState.js +1 -2
  38. package/dist/permissions.js +1 -2
  39. package/dist/platform.js +1 -2
  40. package/dist/preloadSeed.js +1 -2
  41. package/dist/provider.js +1 -2
  42. package/dist/query.js +1 -2
  43. package/dist/recoveryCoordinator.js +1 -2
  44. package/dist/recoveryRetry.js +1 -2
  45. package/dist/richText.js +1 -2
  46. package/dist/rpcErrorBus.js +1 -2
  47. package/dist/rpcErrorKind.js +1 -2
  48. package/dist/runRpc.js +1 -2
  49. package/dist/runtimeCapabilities.js +1 -2
  50. package/dist/runtimeContext.js +1 -2
  51. package/dist/schemaFields.js +1 -2
  52. package/dist/scopeMembership.js +1 -2
  53. package/dist/seedResolvers.js +1 -2
  54. package/dist/sequence.js +1 -2
  55. package/dist/serverRequest.js +1 -2
  56. package/dist/serviceClient.js +1 -2
  57. package/dist/squashRpcCause.js +1 -2
  58. package/dist/stableKey.js +1 -2
  59. package/dist/store.js +1 -2
  60. package/dist/storeStorage.js +1 -2
  61. package/dist/subscriptionCache.js +1 -2
  62. package/dist/tagWalk.js +1 -2
  63. package/dist/traceBus.js +1 -2
  64. package/dist/tracking.js +1 -2
  65. package/dist/uploadProgress.js +1 -2
  66. package/dist/useAction.js +1 -2
  67. package/dist/useAgent.js +1 -2
  68. package/dist/useAgentChat.js +1 -2
  69. package/dist/useAgentStream.js +1 -2
  70. package/dist/useApiOnline.js +1 -2
  71. package/dist/useCapabilityManifest.js +1 -2
  72. package/dist/useConnectionSetup.js +1 -2
  73. package/dist/useConnectionStatus.js +1 -2
  74. package/dist/useConnections.js +1 -2
  75. package/dist/useDataCopilot.js +1 -2
  76. package/dist/useDataTable.js +1 -2
  77. package/dist/useDerived.js +1 -2
  78. package/dist/useEvent.js +1 -2
  79. package/dist/useFormBinding.js +2 -3
  80. package/dist/useLocalQuery.js +1 -2
  81. package/dist/useMutation.js +1 -2
  82. package/dist/useOnRpcError.js +1 -2
  83. package/dist/usePreloadedSubscription.js +1 -2
  84. package/dist/usePreview.js +1 -2
  85. package/dist/useProvenance.js +1 -2
  86. package/dist/useQueryField.js +1 -2
  87. package/dist/useRecord.js +1 -2
  88. package/dist/useRefreshSubscriptions.js +1 -2
  89. package/dist/useResourceCan.js +1 -2
  90. package/dist/useResumableAgentStream.js +1 -2
  91. package/dist/useRpcCaller.js +1 -2
  92. package/dist/useSequence.js +1 -2
  93. package/dist/useSkeleton.js +1 -2
  94. package/dist/useSubscription.js +1 -2
  95. package/dist/useSubscriptionHealth.js +1 -2
  96. package/dist/useTranscription.js +1 -2
  97. package/dist/useUndo.js +1 -2
  98. package/dist/useUndoLog.js +1 -2
  99. package/dist/useUpload.js +1 -2
  100. package/dist/useWindowedSubscription.js +1 -2
  101. package/dist/useWorkflow.js +1 -2
  102. package/dist/useWorkflowRunState.js +1 -2
  103. package/dist/validation.js +1 -2
  104. package/dist/validationMessages.js +1 -2
  105. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import { Schema as e, SchemaIssue as t } from "effect";
2
- //#region src/analyticsCatalog.ts
2
+ // src/analyticsCatalog.ts
3
3
  var n = (e, t) => ({
4
4
  name: e,
5
5
  payload: t
@@ -43,5 +43,4 @@ var n = (e, t) => ({
43
43
  catalog: n
44
44
  };
45
45
  };
46
- //#endregion
47
46
  export { a as createAnalytics, n as defineEvent, i as eventCatalog, r as validateEventPayload };
@@ -1,4 +1,4 @@
1
- //#region src/apiConnectivity.ts
1
+ // src/apiConnectivity.ts
2
2
  var e = Symbol.for("voltro.client.connectivity"), t = () => {
3
3
  let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), n = () => {
4
4
  for (let e of t) try {
@@ -29,5 +29,4 @@ var e = Symbol.for("voltro.client.connectivity"), t = () => {
29
29
  }, r = (e, t) => n().register(e, { connected: t }), i = () => {
30
30
  n().notify();
31
31
  }, a = () => n();
32
- //#endregion
33
32
  export { a as apiConnectivity, i as notifyApiTransportChanged, r as registerApiTransport };
@@ -2,7 +2,7 @@ import { resolveByTag as e } from "./tagWalk.js";
2
2
  import { Context as t, Option as n } from "effect";
3
3
  import { RpcGroup as r, RpcSchema as i } from "effect/rpc";
4
4
  import { EventRpcWorkload as a, apiRoleEndpointUrl as o, captureApiRoleEndpoints as s, selectApiRoleEndpoint as c } from "@voltro/protocol";
5
- //#region src/apiRoleTransports.ts
5
+ // src/apiRoleTransports.ts
6
6
  var l = (e, l, u) => {
7
7
  let d = e;
8
8
  if (u === void 0) return [{
@@ -44,5 +44,4 @@ var l = (e, l, u) => {
44
44
  }
45
45
  return n;
46
46
  };
47
- //#endregion
48
47
  export { u as combineApiRoleClients, l as planApiRoleTransports };
@@ -13,7 +13,7 @@ import * as x from "effect/http/Headers";
13
13
  import { RpcClient as S, RpcSerialization as C } from "effect/rpc";
14
14
  import { compareSurfaces as w, groupShapeDigests as T } from "@voltro/protocol";
15
15
  import * as E from "effect/socket/Socket";
16
- //#region src/apiRuntime.ts
16
+ // src/apiRuntime.ts
17
17
  var D = async (t, n, r, i) => {
18
18
  if (r !== void 0) try {
19
19
  let a = await r({
@@ -141,5 +141,4 @@ var D = async (t, n, r, i) => {
141
141
  }), await $.dispose(), U.close(), t;
142
142
  }
143
143
  };
144
- //#endregion
145
144
  export { j as buildApiRuntime, O as makeProtocolOpenRecovery };
@@ -1,5 +1,5 @@
1
1
  import { planApiRoleTransports as e } from "./apiRoleTransports.js";
2
- //#region src/apiSocketTracker.ts
2
+ // src/apiSocketTracker.ts
3
3
  var t = (e, t, n) => {
4
4
  let r = new Map(e.map((e) => [e, { open: !1 }])), i = !1;
5
5
  return { begin: (e) => {
@@ -17,5 +17,4 @@ var t = (e, t, n) => {
17
17
  };
18
18
  } };
19
19
  }, n = (n, r, i, a, o) => t(e(n, r, i).map((e) => e.url), a, o);
20
- //#endregion
21
20
  export { n as makeApiRoleSocketTracker, t as makeApiSocketTracker };
@@ -2,7 +2,7 @@ import { recordClientDiagnostic as e } from "./clientDiagnostics.js";
2
2
  import { RpcErrorBus as t } from "./rpcErrorBus.js";
3
3
  import { recoveryRetryDelay as n } from "./recoveryRetry.js";
4
4
  import { RecoveryCoordinator as r } from "./recoveryCoordinator.js";
5
- //#region src/apiSupervisor.ts
5
+ // src/apiSupervisor.ts
6
6
  var i = (e, t, n) => ({
7
7
  resolved: null,
8
8
  retryToken: 0,
@@ -132,5 +132,4 @@ var i = (e, t, n) => ({
132
132
  }
133
133
  });
134
134
  };
135
- //#endregion
136
135
  export { s as startApiSupervisor };
@@ -1,4 +1,4 @@
1
- //#region src/authRefresh.ts
1
+ // src/authRefresh.ts
2
2
  var e = (e) => e?._tag === "Unauthenticated", t = (t, n, r = {}) => {
3
3
  let i = r.cooldownMs ?? 15e3, a = r.maxConsecutive ?? 3, o = r.now ?? (() => Date.now()), s = -Infinity, c = 0, l = t.on((t) => {
4
4
  if (!e(t.error) || c >= a) return;
@@ -16,5 +16,4 @@ var e = (e) => e?._tag === "Unauthenticated", t = (t, n, r = {}) => {
16
16
  }
17
17
  };
18
18
  };
19
- //#endregion
20
19
  export { e as isUnauthenticated, t as wireAuthRefresh };
@@ -1,6 +1,6 @@
1
1
  import { isUnresolvedApi as e } from "./frameworkRuntimesContext.js";
2
2
  import { ConnectionPrerequisiteInvalidated as t } from "./connectionPrerequisite.js";
3
- //#region src/awaitResolvedApi.ts
3
+ // src/awaitResolvedApi.ts
4
4
  var n = 15e3, r = async (t, r, i, a) => {
5
5
  if (a?.throwIfAborted(), !e(t.current)) return t.current;
6
6
  let o = Date.now() + n;
@@ -19,5 +19,4 @@ var n = 15e3, r = async (t, r, i, a) => {
19
19
  if (l.getSnapshot().rawTransport === "connected") return c;
20
20
  }
21
21
  };
22
- //#endregion
23
22
  export { n as RESOLVE_TIMEOUT_MS, i as awaitReadyApi, r as awaitResolvedApi };
@@ -1,6 +1,5 @@
1
- //#region src/cellMerger.ts
1
+ // src/cellMerger.ts
2
2
  var e = Symbol.for("voltro.client.cellMerger"), t = (t) => {
3
3
  globalThis[e] = t;
4
4
  }, n = () => globalThis[e];
5
- //#endregion
6
5
  export { t as registerCellMerger, n as registeredCellMerger };
@@ -1,4 +1,4 @@
1
- //#region src/clientDiagnostics.ts
1
+ // src/clientDiagnostics.ts
2
2
  var e = "voltro.client-diagnostics.v1", t = Symbol.for("@voltro/client/diagnostics"), n = globalThis, r = () => typeof performance < "u" && typeof performance.now == "function" ? performance.now() : Date.now(), i = n[t] ?? (n[t] = {
3
3
  sessionStartedAt: Date.now(),
4
4
  monotonicStartedAt: r(),
@@ -90,5 +90,4 @@ var e = "voltro.client-diagnostics.v1", t = Symbol.for("@voltro/client/diagnosti
90
90
  }, h = (e) => (i.listeners.add(e), () => {
91
91
  i.listeners.delete(e);
92
92
  });
93
- //#endregion
94
93
  export { m as clearClientDiagnostics, p as clientDiagnosticsSnapshot, d as disableClientDiagnosticsPersistence, u as enableClientDiagnosticsPersistence, f as recordClientDiagnostic, h as subscribeClientDiagnostics };
@@ -1,4 +1,4 @@
1
- //#region src/clientErrorBus.ts
1
+ // src/clientErrorBus.ts
2
2
  var e = /* @__PURE__ */ new Set(), t = (t) => {
3
3
  for (let n of e) try {
4
4
  n(t);
@@ -12,5 +12,4 @@ var e = /* @__PURE__ */ new Set(), t = (t) => {
12
12
  ...n ? { context: n } : {}
13
13
  });
14
14
  };
15
- //#endregion
16
15
  export { t as publishClientError, r as reportClientError, n as subscribeClientErrors };
@@ -1,5 +1,5 @@
1
1
  import { MutableList as e, Scheduler as t } from "effect";
2
- //#region src/clientScheduler.ts
2
+ // src/clientScheduler.ts
3
3
  var n = {
4
4
  channel: "timer",
5
5
  yield: (e) => {
@@ -27,5 +27,4 @@ var n = {
27
27
  });
28
28
  return Object.assign(n, { yieldChannel: e.channel });
29
29
  };
30
- //#endregion
31
30
  export { i as hostMacrotaskYield, a as makeClientScheduler, r as messageChannelYield, n as timerYield };
@@ -2,7 +2,7 @@ import { rememberRpcErrorKind as e } from "./rpcErrorKind.js";
2
2
  import { connectionScopeForRuntime as t } from "./connectionScope.js";
3
3
  import { runRpcPromise as n } from "./runRpc.js";
4
4
  import { Effect as r } from "effect";
5
- //#region src/connectionPrerequisite.ts
5
+ // src/connectionPrerequisite.ts
6
6
  var i = "voltro:connection-setup-superseded", a = (e) => e.reason === "voltro:connection-setup-superseded" ? "superseded" : "inactive", o = class extends Error {
7
7
  reason;
8
8
  _tag = "ConnectionPrerequisiteInvalidated";
@@ -66,5 +66,4 @@ var i = "voltro:connection-setup-superseded", a = (e) => e.reason === "voltro:co
66
66
  return i.pipe(r.andThen(n), r.tap(() => i), r.raceFirst(s));
67
67
  }
68
68
  };
69
- //#endregion
70
69
  export { s as ConnectionPrerequisite, o as ConnectionPrerequisiteInvalidated, i as SUPERSEDED_BY_LATER_ACTIVATION, a as activationEndReason };
@@ -1,4 +1,4 @@
1
- //#region src/connectionScope.ts
1
+ // src/connectionScope.ts
2
2
  var e = class {
3
3
  #e;
4
4
  #t;
@@ -43,5 +43,4 @@ var e = class {
43
43
  }
44
44
  };
45
45
  };
46
- //#endregion
47
46
  export { e as ConnectionScope, i as combineConnectionScopes, r as connectionScopeForRuntime, n as registerConnectionScope };
@@ -9,7 +9,7 @@ import { settleMutation as u, startMutation as d } from "./mutationsBus.js";
9
9
  import { createConnectionSetupHandle as f } from "./mutationConnectionSetup.js";
10
10
  import { freshIdempotencyKey as p, withIdempotencyKey as m } from "./mutationIdentity.js";
11
11
  import { Cause as h, Effect as g, Exit as _ } from "effect";
12
- //#region src/connectionSetupController.ts
12
+ // src/connectionSetupController.ts
13
13
  var v = class {
14
14
  #e;
15
15
  #t;
@@ -202,5 +202,4 @@ var v = class {
202
202
  }
203
203
  }
204
204
  };
205
- //#endregion
206
205
  export { v as ConnectionSetupController };
@@ -3,7 +3,7 @@ import { useMutation as t } from "./useMutation.js";
3
3
  import { useAction as n } from "./useAction.js";
4
4
  import { useFormBinding as r } from "./useFormBinding.js";
5
5
  import { useConnectionSetup as i } from "./useConnectionSetup.js";
6
- //#region src/createHooks.ts
6
+ // src/createHooks.ts
7
7
  var a = e, o = (e) => ({
8
8
  useSubscription: (t, n, r) => a(e, t, n, r),
9
9
  useMutation: (n) => t(e, n),
@@ -11,5 +11,4 @@ var a = e, o = (e) => ({
11
11
  useAction: (t) => n(e, t),
12
12
  useFormBinding: (t, n) => r(e, t, n ?? {})
13
13
  });
14
- //#endregion
15
14
  export { o as createHooks };
package/dist/deepLink.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/deepLink.ts
1
+ // src/deepLink.ts
2
2
  var e = (e) => {
3
3
  let t = e.pattern;
4
4
  if (t.length === 0 || t[0] !== "/") throw Error(`defineDeepLink: pattern must start with "/" (got "${t}")`);
@@ -65,5 +65,4 @@ var e = (e) => {
65
65
  let r = n.descriptor.handler;
66
66
  return r(n.params), n.params;
67
67
  };
68
- //#endregion
69
68
  export { i as deepLinkHref, e as defineDeepLink, o as dispatchDeepLink, n as matchDeepLink, a as matchFirstDeepLink, r as runDeepLink };
package/dist/filters.js CHANGED
@@ -2,7 +2,7 @@ import { useFrameworkApi as e } from "./runtimeContext.js";
2
2
  import { useSubscription as t } from "./useSubscription.js";
3
3
  import { schemaToFields as n } from "./schemaFields.js";
4
4
  import { useCallback as r, useMemo as i, useState as a } from "react";
5
- //#region src/filters.ts
5
+ // src/filters.ts
6
6
  var o = (e) => {
7
7
  switch (e) {
8
8
  case "select":
@@ -54,5 +54,4 @@ var o = (e) => {
54
54
  error: _.error
55
55
  };
56
56
  };
57
- //#endregion
58
57
  export { s as filtersFromSchema, l as useQueryFilters };
@@ -1,6 +1,6 @@
1
1
  import { Schema as e, SchemaIssue as t } from "effect";
2
2
  import * as n from "effect/SchemaAST";
3
- //#region src/formBinding.ts
3
+ // src/formBinding.ts
4
4
  var r = {
5
5
  en: {
6
6
  "validation.required": "Required",
@@ -321,5 +321,4 @@ var r = {
321
321
  issues: c
322
322
  };
323
323
  };
324
- //#endregion
325
324
  export { h as decodeFieldIssues, a as documentLocale, o as resolveValidationMessage, _ as restrictToSchema, v as validateFields };
package/dist/formData.js CHANGED
@@ -2,7 +2,7 @@ import { schemaToFields as e } from "./schemaFields.js";
2
2
  import { parseRichText as t } from "./richText.js";
3
3
  import { FORM_FLASH_SCRIPT_ID as n } from "./formFlashId.js";
4
4
  import { FORM_CAPTURE_FIELD as r, FORM_CAPTURE_META_NAME as i, FORM_KEY_FIELD as a, FORM_PATH_PREFIX as o, FORM_REDIRECT_FIELD as s, FORM_SOURCE_FIELD as c, encodeNativeFormCapture as l, formActionPath as u, formCaptureSource as d, formSourcePath as f, readFormCaptureSource as p } from "./formSource.js";
5
- //#region src/formData.ts
5
+ // src/formData.ts
6
6
  var m = (e) => {
7
7
  let t = Number(e);
8
8
  return Number.isFinite(t) ? t === 0 ? 0 : t : e;
@@ -123,5 +123,4 @@ var m = (e) => {
123
123
  }
124
124
  return h;
125
125
  };
126
- //#endregion
127
126
  export { r as FORM_CAPTURE_FIELD, i as FORM_CAPTURE_META_NAME, n as FORM_FLASH_SCRIPT_ID, a as FORM_KEY_FIELD, o as FORM_PATH_PREFIX, s as FORM_REDIRECT_FIELD, c as FORM_SOURCE_FIELD, l as encodeNativeFormCapture, u as formActionPath, d as formCaptureSource, _ as formDataToInput, f as formSourcePath, p as readFormCaptureSource, v as recoverNativeFormValues };
@@ -1,4 +1,3 @@
1
- //#region src/formFlashId.ts
1
+ // src/formFlashId.ts
2
2
  var e = "__voltro_form_flash__";
3
- //#endregion
4
3
  export { e as FORM_FLASH_SCRIPT_ID };
@@ -1,6 +1,6 @@
1
1
  import { Schema as e } from "effect";
2
2
  import { errorMemberSchema as t, errorTag as n } from "@voltro/protocol";
3
- //#region src/formRejection.ts
3
+ // src/formRejection.ts
4
4
  var r = 65536, i = (i, a) => {
5
5
  if (i !== void 0) try {
6
6
  let o = n(a);
@@ -19,5 +19,4 @@ var r = 65536, i = (i, a) => {
19
19
  return;
20
20
  }
21
21
  };
22
- //#endregion
23
22
  export { i as encodeFormRejection };
@@ -1,6 +1,6 @@
1
1
  import { FORM_FLASH_SCRIPT_ID as e } from "./formFlashId.js";
2
2
  import { FORM_CAPTURE_FIELD as t, FORM_CAPTURE_META_NAME as n, encodeNativeFormCapture as r, formCaptureSource as i, readFormCaptureSource as a } from "@voltro/protocol";
3
- //#region src/formSource.ts
3
+ // src/formSource.ts
4
4
  var o = "/form/", s = "__voltro_form", c = "__voltro_redirect", l = "__voltro_source", u = (e) => `${o}${encodeURIComponent(e)}`, d = (e) => {
5
5
  if (!(typeof e != "string" || e.length === 0 || e.length > 8192 || !e.startsWith("/") || e.startsWith("//") || /[\\\x00-\x1f\x7f]/.test(e))) try {
6
6
  let t = new URL(e, "https://form.invalid");
@@ -9,5 +9,4 @@ var o = "/form/", s = "__voltro_form", c = "__voltro_redirect", l = "__voltro_so
9
9
  return;
10
10
  }
11
11
  };
12
- //#endregion
13
12
  export { t as FORM_CAPTURE_FIELD, n as FORM_CAPTURE_META_NAME, e as FORM_FLASH_SCRIPT_ID, s as FORM_KEY_FIELD, o as FORM_PATH_PREFIX, c as FORM_REDIRECT_FIELD, l as FORM_SOURCE_FIELD, r as encodeNativeFormCapture, u as formActionPath, i as formCaptureSource, d as formSourcePath, a as readFormCaptureSource };
@@ -1,8 +1,7 @@
1
1
  import { globalContext as e } from "./globalContext.js";
2
- //#region src/frameworkRuntimesContext.ts
2
+ // src/frameworkRuntimesContext.ts
3
3
  var t = (e, t) => {
4
4
  let n = Array.from(t).join(", ") || "(none mounted)";
5
5
  return /* @__PURE__ */ Error(`@voltro/client: no api named ${JSON.stringify(e)}. Known apis: ${n}`);
6
6
  }, n = e("frameworkRuntimes", null), r = (e) => typeof e.runtime?.runFork != "function";
7
- //#endregion
8
7
  export { n as FrameworkRuntimesContext, r as isUnresolvedApi, t as unknownApiError };
@@ -1,10 +1,9 @@
1
1
  import { createContext as e } from "react";
2
- //#region src/globalContext.ts
2
+ // src/globalContext.ts
3
3
  var t = (t, n) => {
4
4
  let r = globalThis, i = Symbol.for(`@voltro/web/context:${t}`), a = r[i];
5
5
  if (a) return a;
6
6
  let o = e(n);
7
7
  return r[i] = o, o;
8
8
  };
9
- //#endregion
10
9
  export { t as globalContext };
package/dist/index.js CHANGED
@@ -82,7 +82,6 @@ import { runLocalQuery as Or, useLocalQuery as kr } from "./useLocalQuery.js";
82
82
  import { CONNECTIONS_LIST_TAG as Ar, CONNECTION_DISCONNECT_TAG as jr, CONNECTION_START_TAG as Mr, CONNECTION_SUBMIT_TOKEN_TAG as Nr, useConnection as Pr, useConnections as Fr } from "./useConnections.js";
83
83
  import { makeApiRoleSocketTracker as Ir, makeApiSocketTracker as Lr } from "./apiSocketTracker.js";
84
84
  import { DEV_ACTIVITY_EVENT as Rr, PAIRING_HOST as zr, PAIRING_SCHEME as Br, PAIRING_STORAGE_KEY as Vr, applyPairing as Hr, clearPairing as Ur, errorMessage as Wr, errorTag as Gr, jsonSchemaDocumentOf as Kr, jsonSchemaOf as qr, pairingLink as Jr, parsePairingLink as Yr, readPairing as Xr } from "@voltro/protocol";
85
- //#region src/index.ts
85
+ // src/index.ts
86
86
  var Zr = "framework-client";
87
- //#endregion
88
87
  export { bn as ADMIN_SCOPE, Zr as CLIENT_NAME, Ar as CONNECTIONS_LIST_TAG, jr as CONNECTION_DISCONNECT_TAG, Mr as CONNECTION_START_TAG, Nr as CONNECTION_SUBMIT_TOKEN_TAG, Rr as DEV_ACTIVITY_EVENT, tt as FORM_CAPTURE_FIELD, nt as FORM_CAPTURE_META_NAME, et as FORM_FLASH_SCRIPT_ID, rt as FORM_KEY_FIELD, it as FORM_PATH_PREFIX, at as FORM_REDIRECT_FIELD, ot as FORM_SOURCE_FIELD, yt as FormBindingProvider, w as FrameworkRuntimesContext, z as FrameworkRuntimesProvider, y as INITIAL_RECOVERY_SNAPSHOT, d as LoadingSubscriptionCache, ke as MutationSerialExecutionError, yr as OUTBOX_DB_NAME, br as OUTBOX_SYNC_TAG, zr as PAIRING_HOST, Br as PAIRING_SCHEME, Vr as PAIRING_STORAGE_KEY, xn as PermissionProvider, Ge as RICH_TEXT_MARKS, Ke as RICH_TEXT_MAX_NODES, b as RecoveryCoordinator, qe as RichTextDocument, _ as RpcErrorBus, mt as ServerRequestContext, ht as ServerRequestProvider, f as SubscriptionCache, Fn as UNDO_APPLY_TAG, In as UNDO_LOG_TAG, Ln as UNDO_REDO_TAG, Ue as ValidationMessagesProvider, D as _resetFrameworkRuntimesWarning, O as _resetSsrDescriptors, v as apiConnectivity, Hr as applyPairing, Et as applyPreloadSeeds, W as applyStoreSeeds, ne as browserOnlineSource, re as browserPlatform, B as browserStoreStorage, I as buildApiRuntime, Sn as canCall, Cn as canCallAny, ie as capabilitiesOf, i as clearClientDiagnostics, Se as clearMutations, Ur as clearPairing, ur as clearSent, G as clearStoreHistory, a as clientDiagnosticsSnapshot, Tr as computeWindow, nr as createAnalytics, Tt as createHooks, ae as currentPlatform, Dn as decideAccess, Re as decodeFieldIssues, he as deepLinkHref, dr as defaultOutboxRetryDelay, ge as defineDeepLink, rr as defineEvent, oe as definePlatform, K as defineStore, zn as defineTracking, q as definedStores, On as deriveEntityAdmins, o as disableClientDiagnosticsPersistence, _e as dispatchDeepLink, ze as documentLocale, xr as drainOutboxInWorker, Sr as drainOutboxOverHttp, Je as emptyRichTextDocument, s as enableClientDiagnosticsPersistence, mn as encodeFormRejection, st as encodeNativeFormCapture, fr as enqueueEntry, Wr as errorMessage, Gr as errorTag, ir as eventCatalog, Xn as filtersFromSchema, ct as formActionPath, lt as formCaptureSource, ft as formDataToInput, Pe as formField, Fe as formSections, ut as formSourcePath, De as freshIdempotencyKey, Ae as getMutationNotifier, Ce as getMutations, C as globalContext, Cr as indexedDbOutboxPersistence, se as installPlatform, ce as isPlatformInstalled, Ye as isRichTextDocument, Xe as isSafeHref, le as isStandaloneDisplay, ln as isUnauthenticated, T as isUnresolvedApi, Kr as jsonSchemaDocumentOf, qr as jsonSchemaOf, Ir as makeApiRoleSocketTracker, Lr as makeApiSocketTracker, Dt as makePreloadSeedBag, L as makeProtocolOpenRecovery, J as makeStoreSeedBag, kn as manifestUrl, pr as markConflict, mr as markFailed, hr as markSent, ve as matchDeepLink, ye as matchFirstDeepLink, ue as memoryTokenStore, An as openAccessReason, Jr as pairingLink, Yr as parsePairingLink, Ze as parseRichText, vn as provenanceUrl, m as publishClientError, n as publishClientTrace, cn as queryOnce, sr as readApiOnline, dt as readFormCaptureSource, Xr as readPairing, Ot as readPreloadedSeedOutcome, kt as readPreloadedSnapshot, c as recordClientDiagnostic, pt as recoverNativeFormValues, x as recoveryCoordinatorFor, de as refusingTokenStore, e as registerCellMerger, k as registerSsrDescriptors, t as registeredCellMerger, gr as replayable, h as reportClientError, jn as requiredScopes, fe as resetPlatformForTest, At as resetPreloadSeeds, Y as resetStoreRegistryForTests, V as resetStoreStorageForTest, F as resolveByTag, _r as resolveConflictEntry, S as resolveRecoveryOptions, H as resolveStoreStorage, Bn as resolveTrackingEvent, Be as resolveValidationMessage, Ve as restrictToSchema, en as resumableConsumeProgram, Qe as richTextToPlainText, hn as rowsToOptions, wr as rpcHttpOutcome, be as runDeepLink, Or as runLocalQuery, It as runSequence, Ie as schemaToColumns, Le as schemaToFields, jt as seedPreloadedSubscription, Mt as seedPreloadedSubscriptionFailure, X as seedStore, Lt as sequence, $e as serializeRichText, je as setMutationNotifier, Nt as setPreloadSeedResolver, Z as setStoreSeedResolver, U as setStoreStorage, we as settleMutation, Q as shallow, Gn as shallowArrayEqual, Kn as sourceValues, A as ssrClientProxy, j as ssrDescriptorsFor, M as ssrStubHandle, u as stableKey, R as startApiSupervisor, Te as startMutation, $ as storeHistory, cr as subscribeApiOnline, l as subscribeClientDiagnostics, g as subscribeClientErrors, r as subscribeClientTraces, Ee as subscribeMutations, ee as subscribeStoreHistory, p as supersedesConfirmedPatches, te as travelToStoreState, E as unknownApiError, Mn as useAccessDecision, Ne as useAction, rn as useAgent, nn as useAgentChat, $t as useAgentStream, lr as useApiOnline, $n as useAsyncValidation, wn as useCan, Tn as useCanAny, Nn as useCapabilityManifest, Pr as useConnection, wt as useConnectionSetup, Dr as useConnectionStatus, Fr as useConnections, an as useDataCopilot, _n as useDataTable, er as useDebounced, qn as useDerived, Ft as useEvent, bt as useFormBinding, xt as useFormBindingContext, gt as useFormCapture, St as useFormField, _t as useFormFlash, Un as useFormSkeleton, N as useFrameworkApi, P as useFrameworkRuntimes, kr as useLocalQuery, Me as useMutation, dn as useOnRawRpcError, fn as useOnRpcError, vr as useOutbox, En as usePermissions, pe as usePlatform, Pt as usePreloadedSubscription, or as usePreview, yn as useProvenance, gn as useQueryField, Zn as useQueryFilters, Qn as useRecord, on as useRefreshSubscription, sn as useRefreshSubscriptions, Jn as useResourceCan, Yn as useResourceCans, tn as useResumableAgentStream, zt as useRpcCaller, Ct as useSchemaFormBinding, Rt as useSequence, vt as useServerRequest, me as useShellExtension, xe as useSubscription, pn as useSubscriptionHealth, Wn as useTableSkeleton, Vn as useTracking, Vt as useTranscription, Pn as useUndo, Rn as useUndoLog, Bt as useUpload, We as useValidationMessages, Er as useWindowedSubscription, Ht as useWorkflow, Ut as useWorkflowDomainEvents, Wt as useWorkflowEventDeliveries, Gt as useWorkflowEvents, Kt as useWorkflowRun, qt as useWorkflowRunEvents, Qt as useWorkflowRunState, Jt as useWorkflowRunSteps, Yt as useWorkflowRuns, Xt as useWorkflowSignal, Zt as useWorkflowUpdate, ar as validateEventPayload, He as validateFields, tr as validationStatus, un as wireAuthRefresh, Oe as withIdempotencyKey, Hn as wrapTrackedCallbacks };
@@ -1,4 +1,4 @@
1
- //#region src/liveRowSort.ts
1
+ // src/liveRowSort.ts
2
2
  var e = (e, t) => e === t ? 0 : e == null ? 1 : t == null || e < t ? -1 : 1, t = (t, n) => [...t].sort((t, r) => e(t[n.column], r[n.column]) * (n.direction === "asc" ? 1 : -1)), n = () => {
3
3
  let n;
4
4
  return (r, i) => {
@@ -62,5 +62,4 @@ var e = (e, t) => e === t ? 0 : e == null ? 1 : t == null || e < t ? -1 : 1, t =
62
62
  }, p;
63
63
  };
64
64
  };
65
- //#endregion
66
65
  export { n as createLiveRowSorter };
@@ -1,4 +1,4 @@
1
- //#region src/mutationConnectionSetup.ts
1
+ // src/mutationConnectionSetup.ts
2
2
  var e = /* @__PURE__ */ new WeakMap(), t = (t, n) => {
3
3
  let r = Object.freeze({
4
4
  apiName: t,
@@ -12,5 +12,4 @@ var e = /* @__PURE__ */ new WeakMap(), t = (t, n) => {
12
12
  }, r = /* @__PURE__ */ new WeakMap(), i = (e, t) => {
13
13
  r.set(e, t);
14
14
  }, a = (e) => r.get(e)?.capture();
15
- //#endregion
16
15
  export { i as bindMutationConnectionSetup, a as captureMutationConnectionSetup, n as connectionSetupOwner, t as createConnectionSetupHandle };
@@ -1,10 +1,9 @@
1
1
  import { Effect as e } from "effect";
2
2
  import * as t from "effect/http/Headers";
3
3
  import { RpcClient as n } from "effect/rpc";
4
- //#region src/mutationIdentity.ts
4
+ // src/mutationIdentity.ts
5
5
  var r = 0, i = () => {
6
6
  let e = typeof crypto < "u" ? crypto : void 0;
7
7
  return e && typeof e.randomUUID == "function" ? e.randomUUID() : `idem_${Date.now().toString(36)}_${r += 1}`;
8
8
  }, a = (r, i) => r.pipe(e.updateService(n.CurrentHeaders, (e) => t.set(e, "idempotency-key", i)));
9
- //#endregion
10
9
  export { i as freshIdempotencyKey, a as withIdempotencyKey };
@@ -1,5 +1,5 @@
1
1
  import { Effect as e, Semaphore as t } from "effect";
2
- //#region src/mutationSerialExecution.ts
2
+ // src/mutationSerialExecution.ts
3
3
  var n = class extends Error {
4
4
  reason;
5
5
  _tag = "MutationSerialExecutionError";
@@ -49,5 +49,4 @@ var n = class extends Error {
49
49
  };
50
50
  } };
51
51
  };
52
- //#endregion
53
52
  export { n as MutationSerialExecutionError, r as makeMutationSerialExecution };
@@ -1,4 +1,4 @@
1
- //#region src/mutationsBus.ts
1
+ // src/mutationsBus.ts
2
2
  var e = [], t = /* @__PURE__ */ new Set(), n = [], r = () => {
3
3
  n = e.slice();
4
4
  }, i = () => {
@@ -36,5 +36,4 @@ var e = [], t = /* @__PURE__ */ new Set(), n = [], r = () => {
36
36
  }), l = () => {
37
37
  e.length !== 0 && (e.length = 0, i());
38
38
  };
39
- //#endregion
40
39
  export { l as clearMutations, s as getMutations, o as settleMutation, a as startMutation, c as subscribeMutations };
@@ -1,4 +1,4 @@
1
- //#region src/onlineSource.ts
1
+ // src/onlineSource.ts
2
2
  var e = {
3
3
  read: () => typeof navigator > "u" || navigator.onLine,
4
4
  subscribe: (e) => {
@@ -9,5 +9,4 @@ var e = {
9
9
  };
10
10
  }
11
11
  };
12
- //#endregion
13
12
  export { e as browserOnlineSource };
package/dist/outbox.js CHANGED
@@ -7,7 +7,7 @@ import { withIdempotencyKey as o } from "./mutationIdentity.js";
7
7
  import { useApiOnline as s } from "./useApiOnline.js";
8
8
  import { OutboxState as c } from "./outboxState.js";
9
9
  import { useCallback as l, useContext as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
10
- //#region src/outbox.ts
10
+ // src/outbox.ts
11
11
  var h = (e, t, n, r, i) => [...e, {
12
12
  id: t,
13
13
  tag: n,
@@ -209,5 +209,4 @@ var h = (e, t, n, r, i) => [...e, {
209
209
  resolveConflict: ne
210
210
  };
211
211
  };
212
- //#endregion
213
212
  export { x as clearSent, C as defaultOutboxRetryDelay, h as enqueueEntry, y as markConflict, v as markFailed, _ as markSent, S as replayable, b as resolveConflictEntry, w as useOutbox };
@@ -1,5 +1,5 @@
1
1
  import { markConflict as e, markFailed as t, markSent as n, replayable as r } from "./outbox.js";
2
- //#region src/outboxHttp.ts
2
+ // src/outboxHttp.ts
3
3
  var i = (e) => {
4
4
  let t = e;
5
5
  return t?.conflict === !0 || t?._tag === "UndoBoundaryError" && t?.boundary === "conflict";
@@ -100,5 +100,4 @@ var i = (e) => {
100
100
  });
101
101
  return r.sent + r.failed + r.conflicts > 0 && await t.save(r.queue), r;
102
102
  };
103
- //#endregion
104
103
  export { s as OUTBOX_DB_NAME, p as OUTBOX_SYNC_TAG, m as drainOutboxInWorker, o as drainOutboxOverHttp, f as indexedDbOutboxPersistence, a as rpcHttpOutcome };
@@ -1,4 +1,4 @@
1
- //#region src/outboxState.ts
1
+ // src/outboxState.ts
2
2
  var e = class {
3
3
  entries = [];
4
4
  positions = /* @__PURE__ */ new Map();
@@ -39,5 +39,4 @@ var e = class {
39
39
  }
40
40
  }
41
41
  };
42
- //#endregion
43
42
  export { e as OutboxState };
@@ -1,6 +1,6 @@
1
1
  import { scopeMembership as e } from "./scopeMembership.js";
2
2
  import { createContext as t, createElement as n, useContext as r } from "react";
3
- //#region src/permissions.tsx
3
+ // src/permissions.tsx
4
4
  var i = "admin:full", a = (e, t) => e.includes("admin:full") ? !0 : typeof t == "string" ? e.includes(t) : t.every((t) => e.includes(t)), o = (e, t) => t.length === 0 || e.includes("admin:full") ? !0 : t.some((t) => e.includes(t)), s = t({ scopes: [] });
5
5
  function c(t) {
6
6
  let r = e(t.scopes), i = r === void 0 ? { scopes: t.scopes } : {
@@ -16,5 +16,4 @@ var l = () => r(s), u = (e) => {
16
16
  let t = r(s);
17
17
  return t.membership === void 0 ? o(t.scopes, e) : e.length === 0 || t.membership.has("admin:full") || e.some((e) => t.membership.has(e));
18
18
  };
19
- //#endregion
20
19
  export { i as ADMIN_SCOPE, c as PermissionProvider, a as canCall, o as canCallAny, u as useCan, d as useCanAny, l as usePermissions };
package/dist/platform.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { browserStoreStorage as e, setStoreStorage as t } from "./storeStorage.js";
2
2
  import { browserOnlineSource as n } from "./onlineSource.js";
3
3
  import { useSyncExternalStore as r } from "react";
4
- //#region src/platform.ts
4
+ // src/platform.ts
5
5
  var i = (e, t = {}) => {
6
6
  let n = e.platform.shell !== "browser" && e.platform.shell !== "node" && e.platform.shell !== "test";
7
7
  return {
@@ -117,5 +117,4 @@ var i = (e, t = {}) => {
117
117
  t.listeners.delete(e);
118
118
  };
119
119
  }, x = () => r(b, _, _), S = (e) => x().extensions?.[e] ?? null;
120
- //#endregion
121
120
  export { p as browserPlatform, i as capabilitiesOf, _ as currentPlatform, a as definePlatform, g as installPlatform, v as isPlatformInstalled, d as isStandaloneDisplay, s as memoryTokenStore, o as refusingTokenStore, y as resetPlatformForTest, x as usePlatform, S as useShellExtension };
@@ -1,6 +1,6 @@
1
1
  import { stableKey as e } from "./stableKey.js";
2
2
  import { seedResolvers as t } from "./seedResolvers.js";
3
- //#region src/preloadSeed.ts
3
+ // src/preloadSeed.ts
4
4
  var n = () => ({ seeds: [] }), r = (e) => {
5
5
  t.preload = e;
6
6
  }, i = /* @__PURE__ */ new Map(), a = (e, t) => `${e}\u0000${t}`, o = (n, r, i, a) => {
@@ -43,5 +43,4 @@ var n = () => ({ seeds: [] }), r = (e) => {
43
43
  }, d = () => {
44
44
  i.clear();
45
45
  };
46
- //#endregion
47
46
  export { c as applyPreloadSeeds, n as makePreloadSeedBag, u as readPreloadedSeedOutcome, l as readPreloadedSnapshot, d as resetPreloadSeeds, o as seedPreloadedSubscription, s as seedPreloadedSubscriptionFailure, r as setPreloadSeedResolver };
package/dist/provider.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { FrameworkRuntimesContext as e, unknownApiError as t } from "./frameworkRuntimesContext.js";
2
2
  import { useMemo as n } from "react";
3
3
  import { jsx as r } from "react/jsx-runtime";
4
- //#region src/provider.tsx
4
+ // src/provider.tsx
5
5
  var i = ({ apis: i, children: a, demand: o, queryOnce: s }) => {
6
6
  let c = n(() => ({
7
7
  get: (e) => {
@@ -18,5 +18,4 @@ var i = ({ apis: i, children: a, demand: o, queryOnce: s }) => {
18
18
  children: a
19
19
  });
20
20
  };
21
- //#endregion
22
21
  export { i as FrameworkRuntimesProvider };
package/dist/query.js CHANGED
@@ -3,10 +3,9 @@ import { runRpcPromise as t } from "./runRpc.js";
3
3
  import { awaitResolvedApi as n } from "./awaitResolvedApi.js";
4
4
  import { Effect as r, Option as i, Stream as a } from "effect";
5
5
  import { firstEventValue as o } from "@voltro/protocol";
6
- //#region src/queryOnce.ts
6
+ // src/queryOnce.ts
7
7
  var s = async (s, c, l, u, d) => {
8
8
  let { runtime: f, client: p } = await n(s, c, l), m = e(p, l)(u ?? {}), h = r.isEffect(m) ? m : a.runHead(m).pipe(r.map(i.getOrUndefined)), g = await t(f, h, { signal: d });
9
9
  return o(l, g, "[loader.query]");
10
10
  };
11
- //#endregion
12
11
  export { s as queryOnce };
@@ -1,7 +1,7 @@
1
1
  import { recordClientDiagnostic as e } from "./clientDiagnostics.js";
2
2
  import { notifyApiTransportChanged as t, registerApiTransport as n } from "./apiConnectivity.js";
3
3
  import { resolveRecoveryRetry as r } from "./recoveryRetry.js";
4
- //#region src/recoveryCoordinator.ts
4
+ // src/recoveryCoordinator.ts
5
5
  var i = (e, t, n, r) => e === void 0 || !Number.isFinite(e) ? t : Math.min(r, Math.max(n, Math.trunc(e))), a = (e) => ({
6
6
  graceMs: i(e?.graceMs, 1500, 0, 3e4),
7
7
  retry: r(e?.retry),
@@ -191,5 +191,4 @@ var i = (e, t, n, r) => e === void 0 || !Number.isFinite(e) ? t : Math.min(r, Ma
191
191
  let i = new s(t, n);
192
192
  return e.on((e) => i.observeError(e)), typeof e.onSuccess == "function" && e.onSuccess((e) => i.observeSuccess(e)), c.set(e, i), i;
193
193
  };
194
- //#endregion
195
194
  export { o as INITIAL_RECOVERY_SNAPSHOT, s as RecoveryCoordinator, l as recoveryCoordinatorFor, a as resolveRecoveryOptions };
@@ -1,5 +1,5 @@
1
1
  import { Effect as e, Schedule as t } from "effect";
2
- //#region src/recoveryRetry.ts
2
+ // src/recoveryRetry.ts
3
3
  var n = (e, t, n, r) => Math.min(r, Math.max(n, e === void 0 || !Number.isFinite(e) ? t : e)), r = (e) => {
4
4
  let t = Math.trunc(n(e?.maxMs, 5e3, 50, 6e4));
5
5
  return {
@@ -20,5 +20,4 @@ var n = (e, t, n, r) => Math.min(r, Math.max(n, e === void 0 || !Number.isFinite
20
20
  })))
21
21
  };
22
22
  };
23
- //#endregion
24
23
  export { a as makeRecoveryRetry, i as recoveryRetryDelay, r as resolveRecoveryRetry };
package/dist/richText.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { formField as e } from "./schemaFields.js";
2
2
  import { Schema as t } from "effect";
3
- //#region src/richText.ts
3
+ // src/richText.ts
4
4
  var n = [
5
5
  "bold",
6
6
  "italic",
@@ -172,5 +172,4 @@ var n = [
172
172
  }
173
173
  }).join("\n\n");
174
174
  };
175
- //#endregion
176
175
  export { n as RICH_TEXT_MARKS, r as RICH_TEXT_MAX_NODES, p as RichTextDocument, m as emptyRichTextDocument, h as isRichTextDocument, a as isSafeHref, x as parseRichText, w as richTextToPlainText, C as serializeRichText };
@@ -1,5 +1,5 @@
1
1
  import { publishClientError as e } from "./clientErrorBus.js";
2
- //#region src/rpcErrorBus.ts
2
+ // src/rpcErrorBus.ts
3
3
  var t = class {
4
4
  #e = /* @__PURE__ */ new Set();
5
5
  #t = /* @__PURE__ */ new Set();
@@ -35,5 +35,4 @@ var t = class {
35
35
  } catch {}
36
36
  }
37
37
  };
38
- //#endregion
39
38
  export { t as RpcErrorBus };
@@ -1,4 +1,4 @@
1
- //#region src/rpcErrorKind.ts
1
+ // src/rpcErrorKind.ts
2
2
  var e = /* @__PURE__ */ new WeakMap(), t = (t, n) => ((typeof t == "object" && t || typeof t == "function") && e.set(t, n), t), n = (t, n) => {
3
3
  if ((typeof t != "object" || !t) && typeof t != "function") return n;
4
4
  let r = e.get(t);
@@ -9,5 +9,4 @@ var e = /* @__PURE__ */ new WeakMap(), t = (t, n) => ((typeof t == "object" && t
9
9
  return n;
10
10
  }
11
11
  };
12
- //#endregion
13
12
  export { t as rememberRpcErrorKind, n as rpcErrorKind };