@tanstack/react-router 1.81.10 → 1.81.13
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/dist/cjs/router.cjs +8 -4
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +1 -0
- package/dist/esm/router.d.ts +1 -0
- package/dist/esm/router.js +8 -4
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +12 -9
package/dist/cjs/router.cjs
CHANGED
|
@@ -1365,6 +1365,12 @@ class Router {
|
|
|
1365
1365
|
};
|
|
1366
1366
|
this.injectedHtml.push(cb);
|
|
1367
1367
|
};
|
|
1368
|
+
this.injectScript = (script) => {
|
|
1369
|
+
this.injectHtml(
|
|
1370
|
+
`<script class='tsr-once'>${script}${process.env.NODE_ENV === "development" ? `; 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
|
-
|
|
1391
|
-
|
|
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, {
|