@nuxt/hints 1.0.0-alpha.6 → 1.0.0-alpha.7
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/README.md +13 -0
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/-coei5WE.js +4 -0
- package/dist/client/_nuxt/{DxoRA_Jg.js → B1nHQOfq.js} +1 -1
- package/dist/client/_nuxt/{BOswn9ZA.js → BDdCTdUI.js} +1 -1
- package/dist/client/_nuxt/BR7nweas.js +1 -0
- package/dist/client/_nuxt/BUw7H-hv.js +1 -0
- package/dist/client/_nuxt/C3Wv6jpd.js +1 -0
- package/dist/client/_nuxt/C47S-Tmv.js +1 -0
- package/dist/client/_nuxt/{C-Jbm3Hp.js → C4gqWexZ.js} +1 -1
- package/dist/client/_nuxt/{DCjNVr8X.js → C7hBqjlR.js} +1 -1
- package/dist/client/_nuxt/CC58r8DQ.js +1 -0
- package/dist/client/_nuxt/{B5aFfd-r.js → CGrEsiZq.js} +1 -1
- package/dist/client/_nuxt/CMTm3GFP.js +1 -0
- package/dist/client/_nuxt/CMjwMIkn.js +1 -0
- package/dist/client/_nuxt/{DSNF90uQ.js → CO-t741Y.js} +1 -1
- package/dist/client/_nuxt/{DJRd5JwX.js → CPCqepq_.js} +1 -1
- package/dist/client/_nuxt/{B4xF9mB8.js → CTimJaOZ.js} +1 -1
- package/dist/client/_nuxt/CjoLj4QM.js +1 -0
- package/dist/client/_nuxt/{CPJ7wMZ4.js → DCmwhz07.js} +1 -1
- package/dist/client/_nuxt/DGBsmNPI.js +1 -0
- package/dist/client/_nuxt/DJjDtW9f.js +1 -0
- package/dist/client/_nuxt/De9_lo2O.js +1 -0
- package/dist/client/_nuxt/DeEbof0M.js +6 -0
- package/dist/client/_nuxt/{CmeNmt1M.js → DsF60Hh0.js} +1 -1
- package/dist/client/_nuxt/{C7PG24o2.js → GGTyZ2re.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/fbd27eb3-33d2-4da5-874f-0d93f7752a53.json +1 -0
- package/dist/client/_nuxt/entry.DKSlCyYS.css +1 -0
- package/dist/client/_nuxt/error-404.CR9CpgUf.css +1 -0
- package/dist/client/_nuxt/error-500.CaOly-jC.css +1 -0
- package/dist/client/_nuxt/{CmBIQlQV.js → uOY9vQtj.js} +10 -10
- package/dist/client/component-lazy-load/index.html +1 -0
- package/dist/client/hydration/index.html +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/third-party-scripts/index.html +1 -1
- package/dist/client/web-vitals/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +185 -15
- package/dist/runtime/core/server/sse.js +16 -0
- package/dist/runtime/core/server/types.d.ts +12 -0
- package/dist/runtime/core/server/types.js +2 -0
- package/dist/runtime/hydration/composables.js +13 -11
- package/dist/runtime/hydration/nitro.plugin.d.ts +2 -0
- package/dist/runtime/hydration/nitro.plugin.js +65 -0
- package/dist/runtime/hydration/utils.d.ts +2 -2
- package/dist/runtime/hydration/utils.js +3 -2
- package/dist/runtime/lazy-load/composables.d.ts +7 -0
- package/dist/runtime/lazy-load/composables.js +52 -0
- package/dist/runtime/lazy-load/nitro.plugin.d.ts +2 -0
- package/dist/runtime/lazy-load/nitro.plugin.js +59 -0
- package/dist/runtime/lazy-load/plugin.client.d.ts +2 -0
- package/dist/runtime/lazy-load/plugin.client.js +73 -0
- package/dist/runtime/lazy-load/schema.d.ts +28 -0
- package/dist/runtime/lazy-load/schema.js +16 -0
- package/dist/runtime/lazy-load/utils.d.ts +1 -0
- package/dist/runtime/lazy-load/utils.js +2 -0
- package/dist/runtime/types.d.ts +14 -0
- package/package.json +29 -27
- package/dist/client/_nuxt/CGh86NWx.js +0 -4
- package/dist/client/_nuxt/COqnpOrt.js +0 -1
- package/dist/client/_nuxt/CgPyyo4O.js +0 -1
- package/dist/client/_nuxt/CmMr59Fi.js +0 -1
- package/dist/client/_nuxt/DIAcCAND.js +0 -6
- package/dist/client/_nuxt/PoHY5YXO.js +0 -1
- package/dist/client/_nuxt/Xqf5ue2O.js +0 -1
- package/dist/client/_nuxt/biRC-D3g.js +0 -1
- package/dist/client/_nuxt/builds/meta/320be0c4-177a-4724-8735-6b1a31ee8c22.json +0 -1
- package/dist/client/_nuxt/entry.I8MQ9pCy.css +0 -1
- package/dist/client/_nuxt/error-404.CTzDoZ55.css +0 -1
- package/dist/client/_nuxt/error-500.AUw9fuc1.css +0 -1
- package/dist/runtime/hydration/handler.nitro.d.ts +0 -5
- package/dist/runtime/hydration/handler.nitro.js +0 -52
- package/dist/runtime/hydration/sse.nitro.js +0 -22
- /package/dist/runtime/{hydration/sse.nitro.d.ts → core/server/sse.d.ts} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { InferOutput } from 'valibot';
|
|
2
|
+
export declare const ComponentLazyLoadImportSchema: import("valibot").ObjectSchema<{
|
|
3
|
+
readonly componentName: import("valibot").StringSchema<undefined>;
|
|
4
|
+
readonly importSource: import("valibot").StringSchema<undefined>;
|
|
5
|
+
readonly importedBy: import("valibot").StringSchema<undefined>;
|
|
6
|
+
readonly rendered: import("valibot").BooleanSchema<undefined>;
|
|
7
|
+
}, undefined>;
|
|
8
|
+
export type DirectImportInfo = InferOutput<typeof ComponentLazyLoadImportSchema>;
|
|
9
|
+
export declare const ComponentLazyLoadDataSchema: import("valibot").ObjectSchema<{
|
|
10
|
+
readonly id: import("valibot").StringSchema<undefined>;
|
|
11
|
+
readonly route: import("valibot").StringSchema<undefined>;
|
|
12
|
+
readonly state: import("valibot").ObjectSchema<{
|
|
13
|
+
readonly pageLoaded: import("valibot").BooleanSchema<undefined>;
|
|
14
|
+
readonly hasReported: import("valibot").BooleanSchema<undefined>;
|
|
15
|
+
readonly directImports: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
16
|
+
readonly componentName: import("valibot").StringSchema<undefined>;
|
|
17
|
+
readonly importSource: import("valibot").StringSchema<undefined>;
|
|
18
|
+
readonly importedBy: import("valibot").StringSchema<undefined>;
|
|
19
|
+
readonly rendered: import("valibot").BooleanSchema<undefined>;
|
|
20
|
+
}, undefined>, undefined>;
|
|
21
|
+
}, undefined>;
|
|
22
|
+
}, undefined>;
|
|
23
|
+
export type ComponentLazyLoadData = InferOutput<typeof ComponentLazyLoadDataSchema>;
|
|
24
|
+
export type ComponentLazyLoadState = {
|
|
25
|
+
directImports: Map<string, DirectImportInfo>;
|
|
26
|
+
hasReported: boolean;
|
|
27
|
+
pageLoaded: boolean;
|
|
28
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { array, boolean, object, string } from "valibot";
|
|
2
|
+
export const ComponentLazyLoadImportSchema = object({
|
|
3
|
+
componentName: string(),
|
|
4
|
+
importSource: string(),
|
|
5
|
+
importedBy: string(),
|
|
6
|
+
rendered: boolean()
|
|
7
|
+
});
|
|
8
|
+
export const ComponentLazyLoadDataSchema = object({
|
|
9
|
+
id: string(),
|
|
10
|
+
route: string(),
|
|
11
|
+
state: object({
|
|
12
|
+
pageLoaded: boolean(),
|
|
13
|
+
hasReported: boolean(),
|
|
14
|
+
directImports: array(ComponentLazyLoadImportSchema)
|
|
15
|
+
})
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LAZY_LOAD_ROUTE = "/__nuxt_hints/lazy-load";
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { VNode, Ref } from 'vue'
|
|
2
2
|
import type { LCPMetricWithAttribution, INPMetricWithAttribution, CLSMetricWithAttribution } from 'web-vitals/attribution'
|
|
3
3
|
import type { HydrationMismatchPayload, LocalHydrationMismatch } from './hydration/types'
|
|
4
|
+
import type { DirectImportInfo, LazyHydrationState } from './lazy-load/composables'
|
|
4
5
|
|
|
5
6
|
declare global {
|
|
6
7
|
interface Window {
|
|
@@ -36,6 +37,7 @@ declare module '#app' {
|
|
|
36
37
|
__hints_tpc: Ref<{ element: HTMLScriptElement, loaded: boolean }[]>
|
|
37
38
|
__hints: {
|
|
38
39
|
hydration: LocalHydrationMismatch[]
|
|
40
|
+
lazyComponents: DirectImportInfo[]
|
|
39
41
|
webvitals: {
|
|
40
42
|
lcp: Ref<LCPMetricWithAttribution[]>
|
|
41
43
|
inp: Ref<INPMetricWithAttribution[]>
|
|
@@ -45,12 +47,24 @@ declare module '#app' {
|
|
|
45
47
|
__tracerOverlay: typeof import('vite-plugin-vue-tracer/client/overlay')
|
|
46
48
|
__tracerRecord: typeof import('vite-plugin-vue-tracer/client/record')
|
|
47
49
|
}
|
|
50
|
+
|
|
51
|
+
interface NuxtPayload {
|
|
52
|
+
_lazyHydrationState?: LazyHydrationState
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
declare module 'nitropack' {
|
|
51
57
|
interface NitroRuntimeHooks {
|
|
58
|
+
// Core hints hooks
|
|
59
|
+
'hints:sse:setup': (context: import('./core/server/types').HintsSseContext) => void
|
|
60
|
+
|
|
61
|
+
// Hydration hooks
|
|
52
62
|
'hints:hydration:mismatch': (payload: HydrationMismatchPayload) => void
|
|
53
63
|
'hints:hydration:cleared': (payload: { id: string[] }) => void
|
|
64
|
+
|
|
65
|
+
// Lazy-load hooks
|
|
66
|
+
'hints:lazy-load:report': (payload: import('./lazy-load/schema').ComponentLazyLoadData) => void
|
|
67
|
+
'hints:lazy-load:cleared': (payload: { id: string }) => void
|
|
54
68
|
}
|
|
55
69
|
}
|
|
56
70
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/hints",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.7",
|
|
4
4
|
"description": "Nuxt module that shows hints for aspects of your application such as Performance, Security, and more!",
|
|
5
5
|
"repository": "https://github.com/nuxt/hints",
|
|
6
6
|
"homepage": "https://github.com/nuxt/hints",
|
|
@@ -21,41 +21,43 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@nuxt/devtools-kit": "^3.
|
|
25
|
-
"@nuxt/kit": "^4.1
|
|
24
|
+
"@nuxt/devtools-kit": "^3.2.1",
|
|
25
|
+
"@nuxt/kit": "^4.3.1",
|
|
26
26
|
"consola": "^3.4.2",
|
|
27
|
-
"h3": "^1.15.
|
|
27
|
+
"h3": "^1.15.5",
|
|
28
28
|
"knitwork": "^1.3.0",
|
|
29
|
-
"magic-string": "^0.30.
|
|
30
|
-
"nitropack": "^2.
|
|
31
|
-
"oxc-parser": "^0.
|
|
29
|
+
"magic-string": "^0.30.21",
|
|
30
|
+
"nitropack": "^2.13.1",
|
|
31
|
+
"oxc-parser": "^0.114.0",
|
|
32
32
|
"sirv": "^3.0.2",
|
|
33
33
|
"unplugin": "^3.0.0",
|
|
34
|
-
"
|
|
34
|
+
"unstorage": "^1.17.4",
|
|
35
|
+
"valibot": "^1.2.0",
|
|
36
|
+
"vite-plugin-vue-tracer": "^1.2.0",
|
|
35
37
|
"web-vitals": "^5.1.0"
|
|
36
38
|
},
|
|
37
39
|
"devDependencies": {
|
|
38
|
-
"@nuxt/devtools": "^3.
|
|
39
|
-
"@nuxt/devtools-ui-kit": "^3.
|
|
40
|
-
"@nuxt/eslint": "^1.
|
|
41
|
-
"@nuxt/icon": "^2.
|
|
42
|
-
"@nuxt/module-builder": "^1.0.
|
|
43
|
-
"@nuxt/schema": "^4.1
|
|
44
|
-
"@nuxt/test-utils": "^3.
|
|
45
|
-
"@shikijs/transformers": "^3.
|
|
46
|
-
"@types/node": "^24.
|
|
40
|
+
"@nuxt/devtools": "^3.2.1",
|
|
41
|
+
"@nuxt/devtools-ui-kit": "^3.2.1",
|
|
42
|
+
"@nuxt/eslint": "^1.15.1",
|
|
43
|
+
"@nuxt/icon": "^2.2.1",
|
|
44
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
45
|
+
"@nuxt/schema": "^4.3.1",
|
|
46
|
+
"@nuxt/test-utils": "^3.23.0",
|
|
47
|
+
"@shikijs/transformers": "^3.22.0",
|
|
48
|
+
"@types/node": "^24.10.13",
|
|
47
49
|
"@vue/test-utils": "^2.4.6",
|
|
48
|
-
"changelogen": "^0.6.
|
|
49
|
-
"diff": "^8.0.
|
|
50
|
-
"eslint": "^
|
|
51
|
-
"happy-dom": "^20.
|
|
52
|
-
"pkg-pr-new": "0.0.
|
|
53
|
-
"rimraf": "^6.
|
|
54
|
-
"sass-embedded": "^1.
|
|
55
|
-
"shiki": "^3.
|
|
50
|
+
"changelogen": "^0.6.2",
|
|
51
|
+
"diff": "^8.0.3",
|
|
52
|
+
"eslint": "^10.0.0",
|
|
53
|
+
"happy-dom": "^20.6.1",
|
|
54
|
+
"pkg-pr-new": "0.0.63",
|
|
55
|
+
"rimraf": "^6.1.3",
|
|
56
|
+
"sass-embedded": "^1.97.3",
|
|
57
|
+
"shiki": "^3.22.0",
|
|
56
58
|
"shiki-transformer-fold": "^0.2.0",
|
|
57
|
-
"vitest": "^4.0.
|
|
58
|
-
"@nuxt/hints": "^1.0.0-alpha.
|
|
59
|
+
"vitest": "^4.0.18",
|
|
60
|
+
"@nuxt/hints": "^1.0.0-alpha.7"
|
|
59
61
|
},
|
|
60
62
|
"scripts": {
|
|
61
63
|
"client:build": "nuxi generate client",
|