@ai-matrx/records-ui 0.116.57 → 0.116.58

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 CHANGED
@@ -39,11 +39,23 @@
39
39
  - Tests: `vitest.setup.ts` gives jsdom a no-op `performance.mark` / `measure`.
40
40
  - **New subpath `@ai-matrx/records-ui/data-source`:** `recordsDataSource`, `personActor` and the who-changed words (`whenWords`, `actorWords`, `actorBadge`, `lastChangeSentence`, `SOMEBODY`, `THE_SYSTEM`) alone. `/helpers` also carries the field-type words, the colour resolver and the table builders, which read `@ai-matrx/records/core`; this entry reaches `@ai-matrx/kit` only, and shares the one data-source cache with `/helpers` and the root. Additive. Consumer action: a shell-reachable service that only binds its supabase client or says when imports from `/data-source`.
41
41
 
42
- ## 0.116.57
42
+ ## 0.116.58
43
43
 
44
44
  UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
45
45
  Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/records-ui/src`.
46
46
 
47
+ ## 0.116.56
48
+
49
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
50
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
51
+ Diff: `git diff 44f2cc191e c0ff612efe -- apps/shared/records-ui/src`
52
+
53
+ Changed shipped source files (4):
54
+ - `apps/shared/records-ui/src/CaptureRun.tsx`
55
+ - `apps/shared/records-ui/src/ExportMenu.tsx`
56
+ - `apps/shared/records-ui/src/TablePage.tsx`
57
+ - `apps/shared/records-ui/src/viewExport.ts`
58
+
47
59
  ## 0.116.55
48
60
 
49
61
  SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
package/dist/index.cjs CHANGED
@@ -52836,6 +52836,24 @@ function FormRunner(props) {
52836
52836
  }
52837
52837
  return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(ConnectedFormRunner, { ...props });
52838
52838
  }
52839
+ var SEND_CEILING_MS = 6e4;
52840
+ async function sendWithin(send, values, ceilingMs) {
52841
+ const notLanded = (why) => ({
52842
+ ok: false,
52843
+ message: `This answer did not land: ${why} Your answers are still here; pressing send again is safe.`
52844
+ });
52845
+ let timer;
52846
+ const ceiling = new Promise((resolve) => {
52847
+ timer = setTimeout(() => resolve(notLanded("it took too long to get an answer.")), ceilingMs);
52848
+ });
52849
+ try {
52850
+ return await Promise.race([send(values), ceiling]);
52851
+ } catch {
52852
+ return notLanded("the send failed before it was answered.");
52853
+ } finally {
52854
+ if (timer) clearTimeout(timer);
52855
+ }
52856
+ }
52839
52857
  function ConnectedFormRunner(props) {
52840
52858
  const client = (0, import_react302.useOptionalRecordsClient)();
52841
52859
  const fields = (0, import_react302.useFields)(props.form.subject);
@@ -53063,7 +53081,7 @@ function FormStage({
53063
53081
  live.map((q) => [q.key, answers2[q.key] ?? null])
53064
53082
  );
53065
53083
  if (honeypotKey) values[honeypotKey] = decoy.current;
53066
- const outcome = await onSubmit(values);
53084
+ const outcome = await sendWithin(onSubmit, values, SEND_CEILING_MS);
53067
53085
  setWriting(false);
53068
53086
  if (!outcome.ok) {
53069
53087
  const inWords = (text) => questions.reduce(