@tanstack/react-router 1.141.2 → 1.141.4

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.
@@ -11,9 +11,8 @@ function ScriptOnce({ children }) {
11
11
  "script",
12
12
  {
13
13
  nonce: router.options.ssr?.nonce,
14
- className: "$tsr",
15
14
  dangerouslySetInnerHTML: {
16
- __html: children + ';typeof $_TSR !== "undefined" && $_TSR.c()'
15
+ __html: children + ";document.currentScript.remove()"
17
16
  }
18
17
  }
19
18
  );
@@ -1 +1 @@
1
- {"version":3,"file":"ScriptOnce.cjs","sources":["../../src/ScriptOnce.tsx"],"sourcesContent":["import { useRouter } from './useRouter'\n\n/**\n * Server-only helper to emit a script tag exactly once during SSR.\n */\nexport function ScriptOnce({ children }: { children: string }) {\n const router = useRouter()\n if (!router.isServer) {\n return null\n }\n\n return (\n <script\n nonce={router.options.ssr?.nonce}\n className=\"$tsr\"\n dangerouslySetInnerHTML={{\n __html: children + ';typeof $_TSR !== \"undefined\" && $_TSR.c()',\n }}\n />\n )\n}\n"],"names":["useRouter","jsx"],"mappings":";;;;AAKO,SAAS,WAAW,EAAE,YAAkC;AAC7D,QAAM,SAASA,UAAAA,UAAA;AACf,MAAI,CAAC,OAAO,UAAU;AACpB,WAAO;AAAA,EACT;AAEA,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO,OAAO,QAAQ,KAAK;AAAA,MAC3B,WAAU;AAAA,MACV,yBAAyB;AAAA,QACvB,QAAQ,WAAW;AAAA,MAAA;AAAA,IACrB;AAAA,EAAA;AAGN;;"}
1
+ {"version":3,"file":"ScriptOnce.cjs","sources":["../../src/ScriptOnce.tsx"],"sourcesContent":["import { useRouter } from './useRouter'\n\n/**\n * Server-only helper to emit a script tag exactly once during SSR.\n */\nexport function ScriptOnce({ children }: { children: string }) {\n const router = useRouter()\n if (!router.isServer) {\n return null\n }\n\n return (\n <script\n nonce={router.options.ssr?.nonce}\n dangerouslySetInnerHTML={{\n __html: children + ';document.currentScript.remove()',\n }}\n />\n )\n}\n"],"names":["useRouter","jsx"],"mappings":";;;;AAKO,SAAS,WAAW,EAAE,YAAkC;AAC7D,QAAM,SAASA,UAAAA,UAAA;AACf,MAAI,CAAC,OAAO,UAAU;AACpB,WAAO;AAAA,EACT;AAEA,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO,OAAO,QAAQ,KAAK;AAAA,MAC3B,yBAAyB;AAAA,QACvB,QAAQ,WAAW;AAAA,MAAA;AAAA,IACrB;AAAA,EAAA;AAGN;;"}
@@ -9,9 +9,8 @@ function ScriptOnce({ children }) {
9
9
  "script",
10
10
  {
11
11
  nonce: router.options.ssr?.nonce,
12
- className: "$tsr",
13
12
  dangerouslySetInnerHTML: {
14
- __html: children + ';typeof $_TSR !== "undefined" && $_TSR.c()'
13
+ __html: children + ";document.currentScript.remove()"
15
14
  }
16
15
  }
17
16
  );
@@ -1 +1 @@
1
- {"version":3,"file":"ScriptOnce.js","sources":["../../src/ScriptOnce.tsx"],"sourcesContent":["import { useRouter } from './useRouter'\n\n/**\n * Server-only helper to emit a script tag exactly once during SSR.\n */\nexport function ScriptOnce({ children }: { children: string }) {\n const router = useRouter()\n if (!router.isServer) {\n return null\n }\n\n return (\n <script\n nonce={router.options.ssr?.nonce}\n className=\"$tsr\"\n dangerouslySetInnerHTML={{\n __html: children + ';typeof $_TSR !== \"undefined\" && $_TSR.c()',\n }}\n />\n )\n}\n"],"names":[],"mappings":";;AAKO,SAAS,WAAW,EAAE,YAAkC;AAC7D,QAAM,SAAS,UAAA;AACf,MAAI,CAAC,OAAO,UAAU;AACpB,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO,OAAO,QAAQ,KAAK;AAAA,MAC3B,WAAU;AAAA,MACV,yBAAyB;AAAA,QACvB,QAAQ,WAAW;AAAA,MAAA;AAAA,IACrB;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"ScriptOnce.js","sources":["../../src/ScriptOnce.tsx"],"sourcesContent":["import { useRouter } from './useRouter'\n\n/**\n * Server-only helper to emit a script tag exactly once during SSR.\n */\nexport function ScriptOnce({ children }: { children: string }) {\n const router = useRouter()\n if (!router.isServer) {\n return null\n }\n\n return (\n <script\n nonce={router.options.ssr?.nonce}\n dangerouslySetInnerHTML={{\n __html: children + ';document.currentScript.remove()',\n }}\n />\n )\n}\n"],"names":[],"mappings":";;AAKO,SAAS,WAAW,EAAE,YAAkC;AAC7D,QAAM,SAAS,UAAA;AACf,MAAI,CAAC,OAAO,UAAU;AACpB,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO,OAAO,QAAQ,KAAK;AAAA,MAC3B,yBAAyB;AAAA,QACvB,QAAQ,WAAW;AAAA,MAAA;AAAA,IACrB;AAAA,EAAA;AAGN;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-router",
3
- "version": "1.141.2",
3
+ "version": "1.141.4",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -80,7 +80,7 @@
80
80
  "tiny-invariant": "^1.3.3",
81
81
  "tiny-warning": "^1.0.3",
82
82
  "@tanstack/history": "1.141.0",
83
- "@tanstack/router-core": "1.141.2"
83
+ "@tanstack/router-core": "1.141.4"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@testing-library/jest-dom": "^6.6.3",
@@ -12,9 +12,8 @@ export function ScriptOnce({ children }: { children: string }) {
12
12
  return (
13
13
  <script
14
14
  nonce={router.options.ssr?.nonce}
15
- className="$tsr"
16
15
  dangerouslySetInnerHTML={{
17
- __html: children + ';typeof $_TSR !== "undefined" && $_TSR.c()',
16
+ __html: children + ';document.currentScript.remove()',
18
17
  }}
19
18
  />
20
19
  )