@nivaro/react 0.3.94 → 0.3.95

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.
@@ -1,23 +1,28 @@
1
1
  import { formatReplayTail as a, getReplayTail as i } from "../../lib/replay-tail.js";
2
- function r(t, l = /* @__PURE__ */ new Date()) {
3
- const e = l.toISOString().slice(0, 19).replace(/:/g, "-");
4
- return new File([t], `what-they-saw-${e}.txt`, { type: "text/plain" });
2
+ function u(t) {
3
+ const e = String(t.filename_download ?? "");
4
+ return /^(what-they-saw|technical-details)-\d{4}-/.test(e) || t.title === "What they saw" || t.title === "Technical details";
5
5
  }
6
- async function u(t) {
7
- const l = t.clip ? await t.clip.commit().catch(() => null) : null, e = a(t.tail ?? i(), {
6
+ function c(t, e = /* @__PURE__ */ new Date()) {
7
+ const l = e.toISOString().slice(0, 19).replace(/:/g, "-");
8
+ return new File([t], `technical-details-${l}.txt`, { type: "text/plain" });
9
+ }
10
+ async function o(t) {
11
+ const e = t.clip ? await t.clip.commit().catch(() => null) : null, l = a(t.tail ?? i(), {
8
12
  route: t.route,
9
13
  when: t.when,
10
14
  userAgent: t.userAgent ?? null
11
15
  });
12
16
  let n = null;
13
17
  try {
14
- n = String((await t.upload(r(e, t.when))).id);
18
+ n = String((await t.upload(c(l, t.when))).id);
15
19
  } catch {
16
20
  n = null;
17
21
  }
18
- return { fileId: n, replay: l, text: e };
22
+ return { fileId: n, replay: e, text: l };
19
23
  }
20
24
  export {
21
- u as collectSupportContext,
22
- r as supportContextFile
25
+ o as collectSupportContext,
26
+ u as isSupportContextFile,
27
+ c as supportContextFile
23
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nivaro/react",
3
- "version": "0.3.94",
3
+ "version": "0.3.95",
4
4
  "description": "React hooks and components for Nivaro CMS forms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",