@tanstack/react-router 1.81.10 → 1.81.14

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.
@@ -1365,6 +1365,12 @@ class Router {
1365
1365
  };
1366
1366
  this.injectedHtml.push(cb);
1367
1367
  };
1368
+ this.injectScript = (script, opts) => {
1369
+ this.injectHtml(
1370
+ `<script class='tsr-once'>${script}${process.env.NODE_ENV === "development" && ((opts == null ? void 0 : opts.logScript) ?? true) ? `; console.info(\`Injected From Server:
1371
+ ${script}\`)` : ""}; __TSR__.cleanScripts()<\/script>`
1372
+ );
1373
+ };
1368
1374
  this.streamedKeys = /* @__PURE__ */ new Set();
1369
1375
  this.getStreamedValue = (key) => {
1370
1376
  var _a;
@@ -1387,10 +1393,8 @@ class Router {
1387
1393
  "Key has already been streamed: " + key
1388
1394
  );
1389
1395
  this.streamedKeys.add(key);
1390
- const children = `__TSR__.streamedValues['${key}'] = { value: ${(_a = this.serializer) == null ? void 0 : _a.call(this, this.options.transformer.stringify(value))}}`;
1391
- this.injectHtml(
1392
- `<script class='tsr-once'>${children}${process.env.NODE_ENV === "development" ? `; console.info(\`Injected From Server:
1393
- ${children}\`)` : ""}; __TSR__.cleanScripts()<\/script>`
1396
+ this.injectScript(
1397
+ `__TSR__.streamedValues['${key}'] = { value: ${(_a = this.serializer) == null ? void 0 : _a.call(this, this.options.transformer.stringify(value))}}`
1394
1398
  );
1395
1399
  };
1396
1400
  this._handleNotFound = (matches, err, {