@tanstack/vue-start-client 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.
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { AnyRouter } from '@tanstack/router-core';
|
|
2
2
|
import * as Vue from 'vue';
|
|
3
|
-
declare global {
|
|
4
|
-
interface Window {
|
|
5
|
-
$_TSR?: {
|
|
6
|
-
cleanup?: () => void;
|
|
7
|
-
[key: string]: unknown;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
3
|
export declare const StartClient: Vue.DefineComponent<Vue.ExtractPropTypes<{
|
|
12
4
|
router: {
|
|
13
5
|
type: () => AnyRouter;
|
package/dist/esm/StartClient.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StartClient.js","sources":["../../src/StartClient.tsx"],"sourcesContent":["import * as Vue from 'vue'\nimport { RouterProvider } from '@tanstack/vue-router'\nimport type { AnyRouter } from '@tanstack/router-core'\n\
|
|
1
|
+
{"version":3,"file":"StartClient.js","sources":["../../src/StartClient.tsx"],"sourcesContent":["import * as Vue from 'vue'\nimport { RouterProvider } from '@tanstack/vue-router'\nimport type { AnyRouter } from '@tanstack/router-core'\n\nexport const StartClient = Vue.defineComponent({\n name: 'StartClient',\n props: {\n router: {\n type: Object as () => AnyRouter,\n required: true,\n },\n },\n setup(props) {\n // After Vue hydration is complete, signal that router hydration is complete so cleanup can happen if stream has ended\n // Use nextTick to ensure all child component onMounted hooks have completed\n // This prevents the cleanup to happen before components have finished transitioning\n Vue.onMounted(() => {\n Vue.nextTick(() => {\n window.$_TSR?.h()\n })\n })\n\n return () => <RouterProvider router={props.router} />\n },\n})\n"],"names":["StartClient","Vue","defineComponent","name","props","router","type","Object","required","setup","onMounted","nextTick","window","$_TSR","h","_createVNode","RouterProvider"],"mappings":";;;MAIaA,cAAcC,IAAIC,gBAAgB;AAAA,EAC7CC,MAAM;AAAA,EACNC,OAAO;AAAA,IACLC,QAAQ;AAAA,MACNC,MAAMC;AAAAA,MACNC,UAAU;AAAA,IACZ;AAAA;EAEFC,MAAML,OAAO;AAIXH,QAAIS,UAAU,MAAM;AAClBT,UAAIU,SAAS,MAAM;AACjBC,eAAOC,OAAOC,EAAC;AAAA,MACjB,CAAC;AAAA,IACH,CAAC;AAED,WAAO,MAAAC,YAAAC,gBAAA;AAAA,MAAA,UAA8BZ,MAAMC;AAAAA,OAAM,IAAA;AAAA,EACnD;AACF,CAAC;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/vue-start-client",
|
|
3
|
-
"version": "1.141.
|
|
3
|
+
"version": "1.141.4",
|
|
4
4
|
"description": "Modern and scalable routing for Vue applications",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"tiny-invariant": "^1.3.3",
|
|
47
47
|
"tiny-warning": "^1.0.3",
|
|
48
|
-
"@tanstack/router
|
|
49
|
-
"@tanstack/
|
|
50
|
-
"@tanstack/
|
|
48
|
+
"@tanstack/vue-router": "1.141.4",
|
|
49
|
+
"@tanstack/router-core": "1.141.4",
|
|
50
|
+
"@tanstack/start-client-core": "1.141.4"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@testing-library/vue": "^8.1.0",
|
package/src/StartClient.tsx
CHANGED
|
@@ -2,15 +2,6 @@ import * as Vue from 'vue'
|
|
|
2
2
|
import { RouterProvider } from '@tanstack/vue-router'
|
|
3
3
|
import type { AnyRouter } from '@tanstack/router-core'
|
|
4
4
|
|
|
5
|
-
declare global {
|
|
6
|
-
interface Window {
|
|
7
|
-
$_TSR?: {
|
|
8
|
-
cleanup?: () => void
|
|
9
|
-
[key: string]: unknown
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
5
|
export const StartClient = Vue.defineComponent({
|
|
15
6
|
name: 'StartClient',
|
|
16
7
|
props: {
|
|
@@ -20,12 +11,12 @@ export const StartClient = Vue.defineComponent({
|
|
|
20
11
|
},
|
|
21
12
|
},
|
|
22
13
|
setup(props) {
|
|
23
|
-
// After Vue hydration is complete,
|
|
14
|
+
// After Vue hydration is complete, signal that router hydration is complete so cleanup can happen if stream has ended
|
|
24
15
|
// Use nextTick to ensure all child component onMounted hooks have completed
|
|
25
|
-
// This prevents
|
|
16
|
+
// This prevents the cleanup to happen before components have finished transitioning
|
|
26
17
|
Vue.onMounted(() => {
|
|
27
18
|
Vue.nextTick(() => {
|
|
28
|
-
window.$_TSR?.
|
|
19
|
+
window.$_TSR?.h()
|
|
29
20
|
})
|
|
30
21
|
})
|
|
31
22
|
|