@hexclave/tanstack-start 1.0.26 → 1.0.27

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 (28) hide show
  1. package/dist/components/api-key-dialogs.d.ts +1 -1
  2. package/dist/components/elements/ssr-layout-effect.d.ts.map +1 -1
  3. package/dist/components/elements/ssr-layout-effect.js +5 -3
  4. package/dist/components/elements/ssr-layout-effect.js.map +1 -1
  5. package/dist/esm/components/api-key-dialogs.d.ts +1 -1
  6. package/dist/esm/components/elements/ssr-layout-effect.d.ts.map +1 -1
  7. package/dist/esm/components/elements/ssr-layout-effect.js +5 -3
  8. package/dist/esm/components/elements/ssr-layout-effect.js.map +1 -1
  9. package/dist/esm/generated/quetzal-translations.d.ts +2 -2
  10. package/dist/esm/lib/hexclave-app/apps/implementations/common.js +1 -1
  11. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts +1 -0
  12. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
  13. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js +44 -19
  14. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
  15. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js +97 -8
  16. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -1
  17. package/dist/generated/quetzal-translations.d.ts +2 -2
  18. package/dist/lib/hexclave-app/apps/implementations/common.js +1 -1
  19. package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts +1 -0
  20. package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
  21. package/dist/lib/hexclave-app/apps/implementations/session-replay.js +43 -18
  22. package/dist/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
  23. package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js +97 -8
  24. package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -1
  25. package/package.json +3 -3
  26. package/src/components/elements/ssr-layout-effect.tsx +15 -3
  27. package/src/lib/hexclave-app/apps/implementations/session-replay.test.ts +123 -4
  28. package/src/lib/hexclave-app/apps/implementations/session-replay.ts +63 -29
@@ -4,7 +4,7 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
4
  //#region src/components/api-key-dialogs.d.ts
5
5
  declare const neverInMs: number;
6
6
  declare const expiresInOptions: {
7
- readonly [x: number]: "1 day" | "7 days" | "30 days" | "90 days" | "1 year" | "Never";
7
+ readonly [x: number]: "Never" | "1 day" | "7 days" | "30 days" | "90 days" | "1 year";
8
8
  };
9
9
  /**
10
10
  * Dialog for creating a new API key
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-layout-effect.d.ts","names":[],"sources":["../../../src/components/elements/ssr-layout-effect.tsx"],"mappings":";;;iBAQgB,SAAA,CAAU,KAAA;EAAS,MAAA;EAAgB,KAAA;AAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"ssr-layout-effect.d.ts","names":[],"sources":["../../../src/components/elements/ssr-layout-effect.tsx"],"mappings":";;;iBAYgB,SAAA,CAAU,KAAA;EAAS,MAAA;EAAgB,KAAA;AAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -6,14 +6,16 @@ let react = require("react");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
7
 
8
8
  //#region src/components/elements/ssr-layout-effect.tsx
9
+ function escapeHtmlAttr(str) {
10
+ return str.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
11
+ }
9
12
  function SsrScript(props) {
10
13
  (0, react.useLayoutEffect)(() => {
11
14
  (0, eval)(props.script);
12
15
  }, []);
13
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("script", {
16
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14
17
  suppressHydrationWarning: true,
15
- nonce: props.nonce,
16
- dangerouslySetInnerHTML: { __html: props.script }
18
+ dangerouslySetInnerHTML: { __html: `<script${props.nonce ? ` nonce="${escapeHtmlAttr(props.nonce)}"` : ""}>${props.script}<\/script>` }
17
19
  });
18
20
  }
19
21
 
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-layout-effect.js","names":[],"sources":["../../../src/components/elements/ssr-layout-effect.tsx"],"sourcesContent":["\"use client\";\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { useLayoutEffect } from \"react\";\n\nexport function SsrScript(props: { script: string, nonce?: string }) {\n useLayoutEffect(() => {\n // TODO fix workaround: React has a bug where it doesn't run the script on the first CSR render if SSR has been skipped due to suspense\n // As a workaround, we run the script in the <script> tag again after the first render\n // Note that we do an indirect eval as described here: https://esbuild.github.io/content-types/#direct-eval\n (0, eval)(props.script);\n }, []);\n\n return (\n <script\n suppressHydrationWarning // the transpiler is setup differently for client/server targets, so if `script` was generated with Function.toString they will differ\n nonce={props.nonce}\n dangerouslySetInnerHTML={{ __html: props.script }}\n />\n );\n}\n"],"mappings":";;;;;;;;AAQA,SAAgB,UAAU,OAA2C;AACnE,kCAAsB;AAIpB,GAAC,GAAG,MAAM,MAAM,OAAO;IACtB,EAAE,CAAC;AAEN,QACE,2CAAC;EACC;EACA,OAAO,MAAM;EACb,yBAAyB,EAAE,QAAQ,MAAM,QAAQ;GACjD"}
1
+ {"version":3,"file":"ssr-layout-effect.js","names":[],"sources":["../../../src/components/elements/ssr-layout-effect.tsx"],"sourcesContent":["\"use client\";\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { useLayoutEffect } from \"react\";\n\nfunction escapeHtmlAttr(str: string): string {\n return str.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n\nexport function SsrScript(props: { script: string, nonce?: string }) {\n useLayoutEffect(() => {\n // TODO fix workaround: React has a bug where it doesn't run the script on the first CSR render if SSR has been skipped due to suspense\n // As a workaround, we run the script in the <script> tag again after the first render\n // Note that we do an indirect eval as described here: https://esbuild.github.io/content-types/#direct-eval\n (0, eval)(props.script);\n }, []);\n\n // Embed the <script> in a span's innerHTML rather than as a React <script> JSX element to\n // avoid React 19's \"Scripts inside React components are never executed when rendering on the\n // client\" warning. The browser still executes the script during SSR HTML parsing, and on the\n // client React sets innerHTML but the browser won't re-execute the script (innerHTML scripts\n // don't run). Using the same HTML on both sides avoids hydration mismatches.\n const nonceAttr = props.nonce ? ` nonce=\"${escapeHtmlAttr(props.nonce)}\"` : '';\n\n return (\n <span\n suppressHydrationWarning // the transpiler is setup differently for client/server targets, so if `script` was generated with Function.toString they will differ\n dangerouslySetInnerHTML={{\n __html: `<script${nonceAttr}>${props.script}</script>`,\n }}\n />\n );\n}\n"],"mappings":";;;;;;;;AAQA,SAAS,eAAe,KAAqB;AAC3C,QAAO,IAAI,QAAQ,MAAM,QAAQ,CAAC,QAAQ,MAAM,SAAS,CAAC,QAAQ,MAAM,OAAO,CAAC,QAAQ,MAAM,OAAO;;AAGvG,SAAgB,UAAU,OAA2C;AACnE,kCAAsB;AAIpB,GAAC,GAAG,MAAM,MAAM,OAAO;IACtB,EAAE,CAAC;AASN,QACE,2CAAC;EACC;EACA,yBAAyB,EACvB,QAAQ,UANI,MAAM,QAAQ,WAAW,eAAe,MAAM,MAAM,CAAC,KAAK,GAM1C,GAAG,MAAM,OAAO,aAC7C;GACD"}
@@ -4,7 +4,7 @@ import { ApiKey, ApiKeyCreationOptions, ApiKeyType } from "../lib/hexclave-app/a
4
4
  //#region src/components/api-key-dialogs.d.ts
5
5
  declare const neverInMs: number;
6
6
  declare const expiresInOptions: {
7
- readonly [x: number]: "1 day" | "7 days" | "30 days" | "90 days" | "1 year" | "Never";
7
+ readonly [x: number]: "Never" | "1 day" | "7 days" | "30 days" | "90 days" | "1 year";
8
8
  };
9
9
  /**
10
10
  * Dialog for creating a new API key
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-layout-effect.d.ts","names":[],"sources":["../../../../src/components/elements/ssr-layout-effect.tsx"],"mappings":";;;iBAQgB,SAAA,CAAU,KAAA;EAAS,MAAA;EAAgB,KAAA;AAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"ssr-layout-effect.d.ts","names":[],"sources":["../../../../src/components/elements/ssr-layout-effect.tsx"],"mappings":";;;iBAYgB,SAAA,CAAU,KAAA;EAAS,MAAA;EAAgB,KAAA;AAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -4,14 +4,16 @@ import { useLayoutEffect } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/elements/ssr-layout-effect.tsx
7
+ function escapeHtmlAttr(str) {
8
+ return str.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
9
+ }
7
10
  function SsrScript(props) {
8
11
  useLayoutEffect(() => {
9
12
  (0, eval)(props.script);
10
13
  }, []);
11
- return /* @__PURE__ */ jsx("script", {
14
+ return /* @__PURE__ */ jsx("span", {
12
15
  suppressHydrationWarning: true,
13
- nonce: props.nonce,
14
- dangerouslySetInnerHTML: { __html: props.script }
16
+ dangerouslySetInnerHTML: { __html: `<script${props.nonce ? ` nonce="${escapeHtmlAttr(props.nonce)}"` : ""}>${props.script}<\/script>` }
15
17
  });
16
18
  }
17
19
 
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-layout-effect.js","names":[],"sources":["../../../../src/components/elements/ssr-layout-effect.tsx"],"sourcesContent":["\"use client\";\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { useLayoutEffect } from \"react\";\n\nexport function SsrScript(props: { script: string, nonce?: string }) {\n useLayoutEffect(() => {\n // TODO fix workaround: React has a bug where it doesn't run the script on the first CSR render if SSR has been skipped due to suspense\n // As a workaround, we run the script in the <script> tag again after the first render\n // Note that we do an indirect eval as described here: https://esbuild.github.io/content-types/#direct-eval\n (0, eval)(props.script);\n }, []);\n\n return (\n <script\n suppressHydrationWarning // the transpiler is setup differently for client/server targets, so if `script` was generated with Function.toString they will differ\n nonce={props.nonce}\n dangerouslySetInnerHTML={{ __html: props.script }}\n />\n );\n}\n"],"mappings":";;;;;;AAQA,SAAgB,UAAU,OAA2C;AACnE,uBAAsB;AAIpB,GAAC,GAAG,MAAM,MAAM,OAAO;IACtB,EAAE,CAAC;AAEN,QACE,oBAAC;EACC;EACA,OAAO,MAAM;EACb,yBAAyB,EAAE,QAAQ,MAAM,QAAQ;GACjD"}
1
+ {"version":3,"file":"ssr-layout-effect.js","names":[],"sources":["../../../../src/components/elements/ssr-layout-effect.tsx"],"sourcesContent":["\"use client\";\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { useLayoutEffect } from \"react\";\n\nfunction escapeHtmlAttr(str: string): string {\n return str.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n\nexport function SsrScript(props: { script: string, nonce?: string }) {\n useLayoutEffect(() => {\n // TODO fix workaround: React has a bug where it doesn't run the script on the first CSR render if SSR has been skipped due to suspense\n // As a workaround, we run the script in the <script> tag again after the first render\n // Note that we do an indirect eval as described here: https://esbuild.github.io/content-types/#direct-eval\n (0, eval)(props.script);\n }, []);\n\n // Embed the <script> in a span's innerHTML rather than as a React <script> JSX element to\n // avoid React 19's \"Scripts inside React components are never executed when rendering on the\n // client\" warning. The browser still executes the script during SSR HTML parsing, and on the\n // client React sets innerHTML but the browser won't re-execute the script (innerHTML scripts\n // don't run). Using the same HTML on both sides avoids hydration mismatches.\n const nonceAttr = props.nonce ? ` nonce=\"${escapeHtmlAttr(props.nonce)}\"` : '';\n\n return (\n <span\n suppressHydrationWarning // the transpiler is setup differently for client/server targets, so if `script` was generated with Function.toString they will differ\n dangerouslySetInnerHTML={{\n __html: `<script${nonceAttr}>${props.script}</script>`,\n }}\n />\n );\n}\n"],"mappings":";;;;;;AAQA,SAAS,eAAe,KAAqB;AAC3C,QAAO,IAAI,QAAQ,MAAM,QAAQ,CAAC,QAAQ,MAAM,SAAS,CAAC,QAAQ,MAAM,OAAO,CAAC,QAAQ,MAAM,OAAO;;AAGvG,SAAgB,UAAU,OAA2C;AACnE,uBAAsB;AAIpB,GAAC,GAAG,MAAM,MAAM,OAAO;IACtB,EAAE,CAAC;AASN,QACE,oBAAC;EACC;EACA,yBAAyB,EACvB,QAAQ,UANI,MAAM,QAAQ,WAAW,eAAe,MAAM,MAAM,CAAC,KAAK,GAM1C,GAAG,MAAM,OAAO,aAC7C;GACD"}