@nuxt/hints 1.0.0-alpha.8 → 1.0.0
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 +9 -3
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/2UxHyX5q.js +1 -0
- package/dist/client/_nuxt/32ctXXKs.js +1 -0
- package/dist/client/_nuxt/4A_iFExJ.js +1 -0
- package/dist/client/_nuxt/6cWOkjPb.js +1 -0
- package/dist/client/_nuxt/85-TOEBH.js +1 -0
- package/dist/client/_nuxt/B1yitclQ.js +1 -0
- package/dist/client/_nuxt/B7c-h3xW.js +1 -0
- package/dist/client/_nuxt/B7cfIAWS.js +1 -0
- package/dist/client/_nuxt/BA47KaF1.js +1 -0
- package/dist/client/_nuxt/BBf5iR-q.js +1 -0
- package/dist/client/_nuxt/BERRCDM3.js +1 -0
- package/dist/client/_nuxt/BETggiCN.js +1 -0
- package/dist/client/_nuxt/BEwlwnbL.js +1 -0
- package/dist/client/_nuxt/BFfxhgS-.js +1 -0
- package/dist/client/_nuxt/BGHnOYBU.js +1 -0
- package/dist/client/_nuxt/BH7IYjvW.js +1 -0
- package/dist/client/_nuxt/BJDFO7_C.js +1 -0
- package/dist/client/_nuxt/BM1_JUlF.js +1 -0
- package/dist/client/_nuxt/BMWR74SV.js +1 -0
- package/dist/client/_nuxt/BN7gUcg9.js +1 -0
- package/dist/client/_nuxt/BQ8w6xss.js +1 -0
- package/dist/client/_nuxt/BR5kRUq4.js +1 -0
- package/dist/client/_nuxt/BRHolxvo.js +1 -0
- package/dist/client/_nuxt/BRZ36xJF.js +1 -0
- package/dist/client/_nuxt/BTJTHyun.js +1 -0
- package/dist/client/_nuxt/BTifaqeh.js +1 -0
- package/dist/client/_nuxt/BV7otONQ.js +1 -0
- package/dist/client/_nuxt/BVQ-GDCI.js +1 -0
- package/dist/client/_nuxt/BWvSN4gD.js +1 -0
- package/dist/client/_nuxt/BYOhvh_g.js +24 -0
- package/dist/client/_nuxt/BYV0-3_D.js +1 -0
- package/dist/client/_nuxt/BYunw83y.js +1 -0
- package/dist/client/_nuxt/BZvkOJ9d.js +1 -0
- package/dist/client/_nuxt/B_m7g4N7.js +1 -0
- package/dist/client/_nuxt/BcOcwvcX.js +1 -0
- package/dist/client/_nuxt/BcVCzyr7.js +1 -0
- package/dist/client/_nuxt/BdImnpbu.js +1 -0
- package/dist/client/_nuxt/BdnUsdx6.js +1 -0
- package/dist/client/_nuxt/BeH2EWoN.js +1 -0
- package/dist/client/_nuxt/BhOHFoWU.js +1 -0
- package/dist/client/_nuxt/BkioyH1T.js +1 -0
- package/dist/client/_nuxt/BmXAJ9_W.js +1 -0
- package/dist/client/_nuxt/Bmn6On1c.js +1 -0
- package/dist/client/_nuxt/Bp6g37R7.js +1 -0
- package/dist/client/_nuxt/{CKsR24bi.js → Bq0PVoHc.js} +1 -1
- package/dist/client/_nuxt/BqTXFGrv.js +1 -0
- package/dist/client/_nuxt/BqYA7rlc.js +1 -0
- package/dist/client/_nuxt/BsS91CYL.js +1 -0
- package/dist/client/_nuxt/{Dzw9Ycsi.js → Bsg1wSyC.js} +1 -1
- package/dist/client/_nuxt/BspZqrRM.js +1 -0
- package/dist/client/_nuxt/BtCnVYZw.js +1 -0
- package/dist/client/_nuxt/BtOb2qkB.js +1 -0
- package/dist/client/_nuxt/BtqSS_iP.js +1 -0
- package/dist/client/_nuxt/Bv_4Rxtq.js +1 -0
- package/dist/client/_nuxt/BvzEVeQv.js +1 -0
- package/dist/client/_nuxt/BxgE0vQu.js +1 -0
- package/dist/client/_nuxt/{BpvkYYYf.js → ByYzPvag.js} +1 -1
- package/dist/client/_nuxt/BzTr9Aqm.js +1 -0
- package/dist/client/_nuxt/C-HG3fhB.js +1 -0
- package/dist/client/_nuxt/C-SQnVFl.js +1 -0
- package/dist/client/_nuxt/C0HS_06l.js +1 -0
- package/dist/client/_nuxt/C0hk2d4L.js +1 -0
- package/dist/client/_nuxt/C151Ov-r.js +1 -0
- package/dist/client/_nuxt/C2t-YnRu.js +1 -0
- package/dist/client/_nuxt/C3B-1QV4.js +1 -0
- package/dist/client/_nuxt/C4EeE6gA.js +1 -0
- package/dist/client/_nuxt/C4IJs8-o.js +1 -0
- package/dist/client/_nuxt/C5BYcBs_.js +1 -0
- package/dist/client/_nuxt/C5YyOfLZ.js +1 -0
- package/dist/client/_nuxt/C7zT0LnQ.js +1 -0
- package/dist/client/_nuxt/C8lEn-DE.js +1 -0
- package/dist/client/_nuxt/C98Dy4si.js +1 -0
- package/dist/client/_nuxt/C9XAeP06.js +1 -0
- package/dist/client/_nuxt/{D0lHLEVW.js → CDSHHE-A.js} +1 -1
- package/dist/client/_nuxt/CDx5xZoG.js +1 -0
- package/dist/client/_nuxt/CEL-wOlO.js +1 -0
- package/dist/client/_nuxt/CENFIVCM.js +1 -0
- package/dist/client/_nuxt/CEu0bR-o.js +1 -0
- package/dist/client/_nuxt/CF10PKvl.js +1 -0
- package/dist/client/_nuxt/CG8Ifv2g.js +1 -0
- package/dist/client/_nuxt/CHLpvVh8.js +1 -0
- package/dist/client/_nuxt/CHM0blh-.js +1 -0
- package/dist/client/_nuxt/CIcR1vcE.js +3 -0
- package/dist/client/_nuxt/CJc9bBzg.js +1 -0
- package/dist/client/_nuxt/CKIfxQSi.js +1 -0
- package/dist/client/_nuxt/{CFvV-NJL.js → CKOw9zgJ.js} +1 -1
- package/dist/client/_nuxt/CLZrNe3w.js +1 -0
- package/dist/client/_nuxt/CLxacb5B.js +1 -0
- package/dist/client/_nuxt/CO1LY3CK.js +1 -0
- package/dist/client/_nuxt/COcwbKMJ.js +1 -0
- package/dist/client/_nuxt/COkxafJQ.js +1 -0
- package/dist/client/_nuxt/CSXwinHm.js +1 -0
- package/dist/client/_nuxt/CYpkKp66.js +1 -0
- package/dist/client/_nuxt/CZhp0h8q.js +1 -0
- package/dist/client/_nuxt/CbFg5uaA.js +1 -0
- package/dist/client/_nuxt/{BgS17fQP.js → Ce7uSu6k.js} +1 -1
- package/dist/client/_nuxt/CeAyd5Ju.js +1 -0
- package/dist/client/_nuxt/CeZK1NFH.js +1 -0
- package/dist/client/_nuxt/CenWIFCC.js +1 -0
- package/dist/client/_nuxt/Cg-RD9OK.js +1 -0
- package/dist/client/_nuxt/CgK0fS9t.js +1 -0
- package/dist/client/_nuxt/ChMvpjG-.js +1 -0
- package/dist/client/_nuxt/{C-EnH0Lt.js → CjOJpp6w.js} +1 -1
- package/dist/client/_nuxt/{CsWGzJ2d.js → CjcdMMgg.js} +1 -1
- package/dist/client/_nuxt/CkByrt1z.js +1 -0
- package/dist/client/_nuxt/CklMAg4u.js +1 -0
- package/dist/client/_nuxt/Cn-bp-IR.js +1 -0
- package/dist/client/_nuxt/Cn7AkR1O.js +1 -0
- package/dist/client/_nuxt/CnnmHF94.js +1 -0
- package/dist/client/_nuxt/CnsnAmq5.js +1 -0
- package/dist/client/_nuxt/Co6uUVPk.js +1 -0
- package/dist/client/_nuxt/CoDkCxhg.js +1 -0
- package/dist/client/_nuxt/CpOuai2O.js +1 -0
- package/dist/client/_nuxt/Cq5zzVJU.js +1 -0
- package/dist/client/_nuxt/CquLrc37.js +1 -0
- package/dist/client/_nuxt/CsfeWuGM.js +1 -0
- package/dist/client/_nuxt/CuPHTKiy.js +1 -0
- package/dist/client/_nuxt/CuXryYYn.js +1 -0
- package/dist/client/_nuxt/CwoSXNpI.js +1 -0
- package/dist/client/_nuxt/CxGSJlkm.js +1 -0
- package/dist/client/_nuxt/CxLEBnE3.js +1 -0
- package/dist/client/_nuxt/Cz2AlsmD.js +1 -0
- package/dist/client/_nuxt/CzTSHFRz.js +1 -0
- package/dist/client/_nuxt/D0YGMca9.js +1 -0
- package/dist/client/_nuxt/D17OF-Vu.js +1 -0
- package/dist/client/_nuxt/D1j8_8rp.js +1 -0
- package/dist/client/_nuxt/D3lLCCz7.js +1 -0
- package/dist/client/_nuxt/D5-asLiD.js +1 -0
- package/dist/client/_nuxt/D53aC0YG.js +1 -0
- package/dist/client/_nuxt/D7o27uSR.js +1 -0
- package/dist/client/_nuxt/D82EKSYY.js +1 -0
- package/dist/client/_nuxt/D82vCrfD.js +1 -0
- package/dist/client/_nuxt/D8_7TLub.js +1 -0
- package/dist/client/_nuxt/D8l8udqQ.js +1 -0
- package/dist/client/_nuxt/D93ZcfNL.js +1 -0
- package/dist/client/_nuxt/D97Zzqfu.js +1 -0
- package/dist/client/_nuxt/DDvzSYfr.js +1 -0
- package/dist/client/_nuxt/DFQXde-d.js +1 -0
- package/dist/client/_nuxt/DFXneXwc.js +1 -0
- package/dist/client/_nuxt/DHCkPAjA.js +1 -0
- package/dist/client/_nuxt/DM8c43g1.js +1 -0
- package/dist/client/_nuxt/DMzUqQB5.js +1 -0
- package/dist/client/_nuxt/DPOp833l.js +1 -0
- package/dist/client/_nuxt/{BC7GvhRc.js → DPkFsPYM.js} +1 -1
- package/dist/client/_nuxt/DRJZaHtK.js +1 -0
- package/dist/client/_nuxt/DRg8JJMk.js +1 -0
- package/dist/client/_nuxt/DSP-MCDp.js +1 -0
- package/dist/client/_nuxt/{TsXTqZ29.js → DSeZwD4N.js} +1 -1
- package/dist/client/_nuxt/DV7GczEv.js +1 -0
- package/dist/client/_nuxt/DVFEvuxE.js +1 -0
- package/dist/client/_nuxt/DVxCFoDh.js +1 -0
- package/dist/client/_nuxt/DWrx1Km3.js +1 -0
- package/dist/client/_nuxt/DXmwc3jG.js +1 -0
- package/dist/client/_nuxt/DXvB9xmW.js +1 -0
- package/dist/client/_nuxt/DYE7WIF3.js +1 -0
- package/dist/client/_nuxt/DZf3V79B.js +1 -0
- package/dist/client/_nuxt/DZu-aV2c.js +1 -0
- package/dist/client/_nuxt/D_Q5rh1f.js +1 -0
- package/dist/client/_nuxt/Da5cRb03.js +1 -0
- package/dist/client/_nuxt/Dd19v3D-.js +1 -0
- package/dist/client/_nuxt/DdkO51Og.js +1 -0
- package/dist/client/_nuxt/Df6bDoY_.js +1 -0
- package/dist/client/_nuxt/DgsIRcX7.js +1 -0
- package/dist/client/_nuxt/DhmSosst.js +1 -0
- package/dist/client/_nuxt/DjAJT7YJ.js +1 -0
- package/dist/client/_nuxt/DkFqJrB1.js +1 -0
- package/dist/client/_nuxt/DkwncUOv.js +1 -0
- package/dist/client/_nuxt/Dpen1YoG.js +1 -0
- package/dist/client/_nuxt/Dph4kLrZ.js +1 -0
- package/dist/client/_nuxt/DsOJ9woJ.js +1 -0
- package/dist/client/_nuxt/DsumFeuD.js +1 -0
- package/dist/client/_nuxt/DyxjwDmM.js +1 -0
- package/dist/client/_nuxt/Dzze3sRP.js +1 -0
- package/dist/client/_nuxt/FtFNcQmh.js +1 -0
- package/dist/client/_nuxt/IF9eRakj.js +1 -0
- package/dist/client/_nuxt/IeuSbFQv.js +1 -0
- package/dist/client/_nuxt/P80f7IUj.js +1 -0
- package/dist/client/_nuxt/Pmp26Uib.js +1 -0
- package/dist/client/_nuxt/QIJgUcNo.js +1 -0
- package/dist/client/_nuxt/QtwWkSeY.js +1 -0
- package/dist/client/_nuxt/Tn7kwbR-.js +6 -0
- package/dist/client/_nuxt/VOosw3JB.js +1 -0
- package/dist/client/_nuxt/Ve4PFQV2.js +1 -0
- package/dist/client/_nuxt/YqXBG_HV.js +1 -0
- package/dist/client/_nuxt/_H4v1dQx.js +1 -0
- package/dist/client/_nuxt/_MZqPPay.js +4 -0
- package/dist/client/_nuxt/_ykCGR6B.js +1 -0
- package/dist/client/_nuxt/bCR0ucgS.js +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/173de33d-9c38-46d3-8eb9-89cb5fd9e2b0.json +1 -0
- package/dist/client/_nuxt/dwOrl1Do.js +1 -0
- package/dist/client/_nuxt/{entry.bXb283Sw.css → entry.D5OyC1nV.css} +1 -1
- package/dist/client/_nuxt/eo99z4R2.js +1 -0
- package/dist/client/_nuxt/error-404.CaTd0Pxo.css +1 -0
- package/dist/client/_nuxt/error-500.C00SGdyT.css +1 -0
- package/dist/client/_nuxt/fKv21gyL.js +1 -0
- package/dist/client/_nuxt/gcz8RCvz.js +1 -0
- package/dist/client/_nuxt/hydration.BczHrsb5.css +1 -0
- package/dist/client/_nuxt/k_qm7-4y.js +1 -0
- package/dist/client/_nuxt/lXgVvXCa.js +1 -0
- package/dist/client/_nuxt/mWjccvbQ.js +1 -0
- package/dist/client/_nuxt/mjskCLCv.js +1 -0
- package/dist/client/_nuxt/n2N0HUVH.js +1 -0
- package/dist/client/_nuxt/oH_c3LbQ.js +1 -0
- package/dist/client/_nuxt/pMCvBh8W.js +13 -0
- package/dist/client/_nuxt/{CHixySwz.js → pvvyrlNP.js} +1 -1
- package/dist/client/_nuxt/rGO070M0.js +1 -0
- package/dist/client/_nuxt/rZm6bMo-.js +1 -0
- package/dist/client/_nuxt/u5AG7uiY.js +1 -0
- package/dist/client/_nuxt/uYugtg8r.js +1 -0
- package/dist/client/_nuxt/vGWfd6FD.js +1 -0
- package/dist/client/_nuxt/yv6CvBhz.js +1 -0
- package/dist/client/component-lazy-load/index.html +1 -1
- package/dist/client/html-validate/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.d.mts +5 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +80 -33
- package/dist/runtime/core/components/nuxt-island.d.ts +136 -1
- package/dist/runtime/core/features.d.ts +6 -0
- package/dist/runtime/core/features.js +17 -0
- package/dist/runtime/core/plugins/features.client.d.ts +2 -0
- package/dist/runtime/core/plugins/features.client.js +16 -0
- package/dist/runtime/core/plugins/vue-tracer-state.client.d.ts +1 -1
- package/dist/runtime/core/types.d.ts +17 -0
- package/dist/runtime/core/types.js +0 -0
- package/dist/runtime/feature-options.d.ts +8 -0
- package/dist/runtime/feature-options.js +0 -0
- package/dist/runtime/html-validate/handlers/delete.d.ts +1 -0
- package/dist/runtime/html-validate/handlers/delete.js +17 -0
- package/dist/runtime/html-validate/handlers/get.d.ts +2 -0
- package/dist/runtime/html-validate/handlers/get.js +5 -0
- package/dist/runtime/html-validate/handlers/nitro-handlers.plugin.d.ts +3 -0
- package/dist/runtime/html-validate/handlers/nitro-handlers.plugin.js +36 -0
- package/dist/runtime/html-validate/nitro.plugin.d.ts +3 -0
- package/dist/runtime/html-validate/nitro.plugin.js +54 -0
- package/dist/runtime/html-validate/plugin.client.d.ts +2 -0
- package/dist/runtime/html-validate/plugin.client.js +28 -0
- package/dist/runtime/html-validate/storage.d.ts +1 -0
- package/dist/runtime/html-validate/storage.js +2 -0
- package/dist/runtime/html-validate/types.d.ts +8 -0
- package/dist/runtime/html-validate/types.js +0 -0
- package/dist/runtime/html-validate/utils.d.ts +3 -0
- package/dist/runtime/html-validate/utils.js +12 -0
- package/dist/runtime/hydration/composables.js +14 -12
- package/dist/runtime/hydration/plugin.client.d.ts +1 -1
- package/dist/runtime/hydration/plugin.client.js +1 -1
- package/dist/runtime/hydration/utils.d.ts +1 -0
- package/dist/runtime/hydration/utils.js +2 -0
- package/dist/runtime/lazy-load/composables.js +10 -7
- package/dist/runtime/lazy-load/plugin.client.d.ts +1 -1
- package/dist/runtime/lazy-load/plugin.client.js +5 -5
- package/dist/runtime/lazy-load/utils.d.ts +1 -0
- package/dist/runtime/lazy-load/utils.js +2 -0
- package/dist/runtime/logger.d.ts +2 -0
- package/dist/runtime/logger.js +6 -0
- package/dist/runtime/third-party-scripts/plugin.client.d.ts +1 -1
- package/dist/runtime/third-party-scripts/plugin.client.js +31 -7
- package/dist/runtime/third-party-scripts/types.d.ts +6 -0
- package/dist/runtime/third-party-scripts/types.js +0 -0
- package/dist/runtime/third-party-scripts/utils.d.ts +1 -0
- package/dist/runtime/third-party-scripts/utils.js +2 -0
- package/dist/runtime/types.d.ts +23 -8
- package/dist/runtime/web-vitals/plugin.client.d.ts +1 -1
- package/dist/runtime/web-vitals/plugin.client.js +124 -94
- package/dist/runtime/web-vitals/types.d.ts +4 -0
- package/dist/runtime/web-vitals/types.js +0 -0
- package/dist/runtime/web-vitals/utils.d.ts +1 -0
- package/dist/runtime/web-vitals/utils.js +2 -0
- package/package.json +19 -15
- package/dist/client/_nuxt/83L43bj1.js +0 -1
- package/dist/client/_nuxt/8JEyW-wR.js +0 -1
- package/dist/client/_nuxt/B6uQK5FY.js +0 -1
- package/dist/client/_nuxt/BDzmeJ6w.js +0 -1
- package/dist/client/_nuxt/BFYIK0lc.js +0 -36
- package/dist/client/_nuxt/C47S-Tmv.js +0 -1
- package/dist/client/_nuxt/CMjwMIkn.js +0 -1
- package/dist/client/_nuxt/CjoLj4QM.js +0 -1
- package/dist/client/_nuxt/CxJIMPBb.js +0 -6
- package/dist/client/_nuxt/DJusdO6H.js +0 -1
- package/dist/client/_nuxt/DYoxhk2S.js +0 -1
- package/dist/client/_nuxt/Dw-rzC63.js +0 -4
- package/dist/client/_nuxt/builds/meta/c9d33be6-f2ad-4bd9-8dd1-70c2dc337718.json +0 -1
- package/dist/client/_nuxt/error-404.CCf1PrmA.css +0 -1
- package/dist/client/_nuxt/error-500.CZ0xe9I8.css +0 -1
- package/dist/client/_nuxt/hydration.CLUG10u4.css +0 -1
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { defineNuxtPlugin, ref, useNuxtApp } from "#imports";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { defu } from "defu";
|
|
3
|
+
import { logger } from "./utils.js";
|
|
4
|
+
import { getFeatureOptions } from "../core/features.js";
|
|
5
|
+
const DEFAULT_EXTENSION_SCHEMES = ["chrome-extension", "moz-extension", "safari-extension", "ms-browser-extension"];
|
|
6
|
+
function escapeRegExp(s) {
|
|
7
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
8
|
+
}
|
|
9
|
+
function buildExtensionSchemesRegex(schemes) {
|
|
10
|
+
return new RegExp(`^(${schemes.map(escapeRegExp).join("|")}):`);
|
|
11
|
+
}
|
|
12
|
+
function isExtensionScript(src, schemesRegex) {
|
|
5
13
|
try {
|
|
6
14
|
const url = new URL(src, window.location.origin);
|
|
7
|
-
return
|
|
15
|
+
return schemesRegex.test(url.protocol);
|
|
8
16
|
} catch {
|
|
9
17
|
return false;
|
|
10
18
|
}
|
|
@@ -17,14 +25,30 @@ function isSameOriginScript(src) {
|
|
|
17
25
|
return false;
|
|
18
26
|
}
|
|
19
27
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
28
|
+
function isIgnoredDomain(src, ignoredDomains) {
|
|
29
|
+
if (ignoredDomains.length === 0) return false;
|
|
30
|
+
try {
|
|
31
|
+
const url = new URL(src, window.location.origin);
|
|
32
|
+
return ignoredDomains.some((domain) => url.hostname === domain || url.hostname.endsWith(`.${domain}`));
|
|
33
|
+
} catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
22
36
|
}
|
|
23
37
|
export default defineNuxtPlugin({
|
|
24
38
|
name: "nuxt-hints:third-party-scripts",
|
|
25
39
|
setup() {
|
|
26
40
|
const nuxtApp = useNuxtApp();
|
|
27
|
-
const
|
|
41
|
+
const opts = getFeatureOptions("thirdPartyScripts") ?? {};
|
|
42
|
+
const extensionSchemes = [...DEFAULT_EXTENSION_SCHEMES, ...opts.ignoredSchemes ?? []];
|
|
43
|
+
const schemesRegex = buildExtensionSchemesRegex(extensionSchemes);
|
|
44
|
+
const ignoredDomains = opts.ignoredDomains ?? [];
|
|
45
|
+
function isIgnoredScript(src) {
|
|
46
|
+
return isSameOriginScript(src) || isExtensionScript(src, schemesRegex) || isIgnoredDomain(src, ignoredDomains);
|
|
47
|
+
}
|
|
48
|
+
nuxtApp.payload.__hints = defu(nuxtApp.payload.__hints, {
|
|
49
|
+
thirdPartyScripts: ref([])
|
|
50
|
+
});
|
|
51
|
+
const scripts = nuxtApp.payload.__hints.thirdPartyScripts;
|
|
28
52
|
const isUsingNuxtScripts = !!nuxtApp.$scripts;
|
|
29
53
|
nuxtApp.hook("hints:scripts:added", (script) => {
|
|
30
54
|
scripts.value.push({ element: script, loaded: false });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface ThirdPartyScriptsFeatureOptions {
|
|
2
|
+
/** Additional domains to ignore when detecting third-party scripts */
|
|
3
|
+
ignoredDomains?: string[];
|
|
4
|
+
/** Additional URL scheme patterns to ignore (default includes browser extension schemes) */
|
|
5
|
+
ignoredSchemes?: string[];
|
|
6
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const logger: import("consola").ConsolaInstance;
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -2,11 +2,13 @@ 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
4
|
import type { DirectImportInfo, LazyHydrationState } from './lazy-load/composables'
|
|
5
|
+
import type { Features } from './core/types'
|
|
5
6
|
|
|
6
7
|
declare global {
|
|
7
8
|
interface Window {
|
|
8
9
|
__hints_TPC_start_time: number
|
|
9
10
|
__hints_TPC_saveTime: (script: HTMLScriptElement, startTime?: number) => void
|
|
11
|
+
__hints_html_validation?: import('./html-validate/types').HtmlValidateReport
|
|
10
12
|
}
|
|
11
13
|
interface HTMLScriptElement {
|
|
12
14
|
__hints_TPC_start_time?: number
|
|
@@ -27,15 +29,25 @@ declare module '#app' {
|
|
|
27
29
|
'hints:scripts:added': (script: HTMLScriptElement) => void
|
|
28
30
|
'hints:scripts:loaded': (script: HTMLScriptElement) => void
|
|
29
31
|
|
|
30
|
-
'hints:webvitals:sync': (webvitals:
|
|
32
|
+
'hints:webvitals:sync': (webvitals: NuxtPayload['__hints']['webvitals']) => void
|
|
31
33
|
'hints:webvitals:lcp': (metric: LCPMetricWithAttribution) => void
|
|
32
34
|
'hints:webvitals:inp': (metric: INPMetricWithAttribution) => void
|
|
33
35
|
'hints:webvitals:cls': (metric: CLSMetricWithAttribution) => void
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
interface NuxtApp {
|
|
37
|
-
|
|
39
|
+
__tracerOverlay: typeof import('vite-plugin-vue-tracer/client/overlay')
|
|
40
|
+
__tracerRecord: typeof import('vite-plugin-vue-tracer/client/record')
|
|
41
|
+
hints: {
|
|
42
|
+
config: {
|
|
43
|
+
features: Features
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface NuxtPayload {
|
|
38
49
|
__hints: {
|
|
50
|
+
lazyHydrationState?: LazyHydrationState
|
|
39
51
|
hydration: LocalHydrationMismatch[]
|
|
40
52
|
lazyComponents: DirectImportInfo[]
|
|
41
53
|
webvitals: {
|
|
@@ -43,13 +55,12 @@ declare module '#app' {
|
|
|
43
55
|
inp: Ref<INPMetricWithAttribution[]>
|
|
44
56
|
cls: Ref<CLSMetricWithAttribution[]>
|
|
45
57
|
}
|
|
58
|
+
thirdPartyScripts: Ref<{
|
|
59
|
+
element: HTMLScriptElement
|
|
60
|
+
loaded: boolean
|
|
61
|
+
}[]>
|
|
62
|
+
htmlValidateResult?: import('./html-validate/types').HtmlValidateReport
|
|
46
63
|
}
|
|
47
|
-
__tracerOverlay: typeof import('vite-plugin-vue-tracer/client/overlay')
|
|
48
|
-
__tracerRecord: typeof import('vite-plugin-vue-tracer/client/record')
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
interface NuxtPayload {
|
|
52
|
-
_lazyHydrationState?: LazyHydrationState
|
|
53
64
|
}
|
|
54
65
|
}
|
|
55
66
|
|
|
@@ -58,6 +69,10 @@ declare module 'nitropack' {
|
|
|
58
69
|
// Core hints hooks
|
|
59
70
|
'hints:sse:setup': (context: import('./core/server/types').HintsSseContext) => void
|
|
60
71
|
|
|
72
|
+
// html-validate hooks
|
|
73
|
+
'hints:html-validate:report': (report: import('./html-validate/types').HtmlValidateReport) => void
|
|
74
|
+
'hints:html-validate:deleted': (id: string) => void
|
|
75
|
+
|
|
61
76
|
// Hydration hooks
|
|
62
77
|
'hints:hydration:mismatch': (payload: HydrationMismatchPayload) => void
|
|
63
78
|
'hints:hydration:cleared': (payload: { id: string[] }) => void
|
|
@@ -2,15 +2,28 @@ import { defineNuxtPlugin, useNuxtApp } from "#imports";
|
|
|
2
2
|
import { onINP, onLCP, onCLS } from "web-vitals/attribution";
|
|
3
3
|
import { defu } from "defu";
|
|
4
4
|
import { ref } from "vue";
|
|
5
|
-
import { logger } from "
|
|
5
|
+
import { logger } from "./utils.js";
|
|
6
|
+
import { getFeatureOptions } from "../core/features.js";
|
|
6
7
|
function isImgElement(element) {
|
|
7
8
|
return element instanceof Element && element.tagName === "IMG";
|
|
8
9
|
}
|
|
10
|
+
function isIgnoredDomain(src, ignoreDomains) {
|
|
11
|
+
if (ignoreDomains.length === 0) return false;
|
|
12
|
+
try {
|
|
13
|
+
const url = new URL(src);
|
|
14
|
+
return ignoreDomains.some((domain) => url.hostname === domain || url.hostname.endsWith(`.${domain}`));
|
|
15
|
+
} catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
9
19
|
export default defineNuxtPlugin({
|
|
10
20
|
name: "nuxt-hints:performance",
|
|
11
21
|
setup() {
|
|
12
22
|
const nuxtApp = useNuxtApp();
|
|
13
|
-
|
|
23
|
+
const opts = getFeatureOptions("webVitals") ?? {};
|
|
24
|
+
const trackedMetrics = opts.trackedMetrics ?? ["LCP", "INP", "CLS"];
|
|
25
|
+
const ignoreDomains = opts.ignoreDomains ?? [];
|
|
26
|
+
nuxtApp.payload.__hints = defu(nuxtApp.payload.__hints, {
|
|
14
27
|
webvitals: {
|
|
15
28
|
lcp: ref([]),
|
|
16
29
|
inp: ref([]),
|
|
@@ -18,118 +31,135 @@ export default defineNuxtPlugin({
|
|
|
18
31
|
}
|
|
19
32
|
});
|
|
20
33
|
nuxtApp.hook("hints:webvitals:sync", (webvitals) => {
|
|
21
|
-
webvitals.lcp.value = [...nuxtApp.__hints.webvitals.lcp.value];
|
|
22
|
-
webvitals.inp.value = [...nuxtApp.__hints.webvitals.inp.value];
|
|
23
|
-
webvitals.cls.value = [...nuxtApp.__hints.webvitals.cls.value];
|
|
34
|
+
webvitals.lcp.value = [...nuxtApp.payload.__hints.webvitals.lcp.value];
|
|
35
|
+
webvitals.inp.value = [...nuxtApp.payload.__hints.webvitals.inp.value];
|
|
36
|
+
webvitals.cls.value = [...nuxtApp.payload.__hints.webvitals.cls.value];
|
|
24
37
|
});
|
|
25
38
|
nuxtApp.hook("app:mounted", () => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
logger.info(
|
|
31
|
-
"[web-vitals] INP Metric: ",
|
|
32
|
-
metric
|
|
33
|
-
);
|
|
34
|
-
nuxtApp.__hints.webvitals.inp.value.push(metric);
|
|
35
|
-
nuxtApp.callHook("hints:webvitals:inp", metric);
|
|
36
|
-
}, {
|
|
37
|
-
reportAllChanges: true
|
|
38
|
-
});
|
|
39
|
-
onLCP((metric) => {
|
|
40
|
-
if (metric.rating === "good") {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
logger.info(
|
|
44
|
-
`[web-vitals] LCP Metric: `,
|
|
45
|
-
metric
|
|
46
|
-
);
|
|
47
|
-
nuxtApp.__hints.webvitals.lcp.value.push(metric);
|
|
48
|
-
nuxtApp.callHook("hints:webvitals:lcp", metric);
|
|
49
|
-
for (const performanceEntry of metric.entries) {
|
|
50
|
-
if (!performanceEntry.element || !isImgElement(performanceEntry.element)) {
|
|
51
|
-
continue;
|
|
39
|
+
if (trackedMetrics.includes("INP")) {
|
|
40
|
+
onINP((metric) => {
|
|
41
|
+
if (metric.rating === "good") {
|
|
42
|
+
return;
|
|
52
43
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
logger.info(
|
|
45
|
+
"[web-vitals] INP Metric: ",
|
|
46
|
+
metric
|
|
47
|
+
);
|
|
48
|
+
nuxtApp.payload.__hints.webvitals.inp.value.push(metric);
|
|
49
|
+
nuxtApp.callHook("hints:webvitals:inp", metric);
|
|
50
|
+
}, {
|
|
51
|
+
reportAllChanges: true
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (trackedMetrics.includes("LCP")) {
|
|
55
|
+
onLCP((metric) => {
|
|
56
|
+
if (metric.rating === "good") {
|
|
57
|
+
return;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
logger.info(
|
|
60
|
+
`[web-vitals] LCP Metric: `,
|
|
61
|
+
metric
|
|
62
|
+
);
|
|
63
|
+
nuxtApp.payload.__hints.webvitals.lcp.value.push(metric);
|
|
64
|
+
nuxtApp.callHook("hints:webvitals:lcp", metric);
|
|
65
|
+
for (const performanceEntry of metric.entries) {
|
|
66
|
+
if (!performanceEntry.element || !isImgElement(performanceEntry.element)) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (isIgnoredDomain(performanceEntry.element.src, ignoreDomains)) {
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (performanceEntry.element.attributes?.getNamedItem("loading")?.value === "lazy") {
|
|
60
73
|
logger.warn(
|
|
61
|
-
|
|
74
|
+
'[performance] LCP Element should not have `loading="lazy"` \n\n Learn more: https://web.dev/optimize-lcp/#optimize-the-priority-the-resource-is-given'
|
|
62
75
|
);
|
|
63
76
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
if (hasImageFormat(performanceEntry.element.src)) {
|
|
78
|
+
if (!performanceEntry.element.src.includes("webp") && !performanceEntry.element.src.includes("avif")) {
|
|
79
|
+
logger.warn(
|
|
80
|
+
"[performance] LCP Element can be served in a next gen format like `webp` or `avif` \n\n Learn more: https://web.dev/choose-the-right-image-format/ \n\n Use: https://image.nuxt.com/usage/nuxt-img#format"
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (performanceEntry.element.fetchPriority !== "high") {
|
|
85
|
+
logger.warn(
|
|
86
|
+
'[performance] LCP Element can have `fetchPriority="high"` to load as soon as possible \n\n Learn more: https://web.dev/optimize-lcp/#optimize-the-priority-the-resource-is-given'
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
if (!performanceEntry.element.hasAttribute("width") || !performanceEntry.element.hasAttribute("height")) {
|
|
90
|
+
logger.warn(
|
|
91
|
+
"[performance] Images should have `width` and `height` sizes set \n\n Learn more: https://web.dev/optimize-cls/#images-without-dimensions \n\n Use: https://image.nuxt.com/usage/nuxt-img#width-height"
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
if (performanceEntry.startTime > 2500) {
|
|
95
|
+
logger.warn(
|
|
96
|
+
`[performance] LCP Element loaded in ${performanceEntry.startTime} miliseconds. Good result is below 2500 miliseconds
|
|
78
97
|
|
|
79
98
|
Learn more: https://web.dev/lcp/#what-is-a-good-lcp-score`
|
|
80
|
-
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
if (!isElementPreloaded(performanceEntry.element.src)) {
|
|
102
|
+
logger.warn(
|
|
103
|
+
"[performance] LCP Element can be preloaded in `head` to improve load time \n\n Learn more: https://web.dev/optimize-lcp/#optimize-when-the-resource-is-discovered \n\n Use: https://image.nuxt.com/usage/nuxt-img#preload"
|
|
104
|
+
);
|
|
105
|
+
}
|
|
81
106
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
107
|
+
}, {
|
|
108
|
+
reportAllChanges: true
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
if (trackedMetrics.includes("CLS")) {
|
|
112
|
+
onCLS((metric) => {
|
|
113
|
+
if (metric.rating === "good") {
|
|
114
|
+
return;
|
|
86
115
|
}
|
|
87
|
-
}
|
|
88
|
-
}, {
|
|
89
|
-
reportAllChanges: true
|
|
90
|
-
});
|
|
91
|
-
onCLS((metric) => {
|
|
92
|
-
if (metric.rating === "good") {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
logger.info(
|
|
96
|
-
"[web-vitals] CLS Metric: ",
|
|
97
|
-
metric
|
|
98
|
-
);
|
|
99
|
-
nuxtApp.callHook(
|
|
100
|
-
"hints:webvitals:cls",
|
|
101
|
-
metric
|
|
102
|
-
);
|
|
103
|
-
nuxtApp.__hints.webvitals.cls.value.push(metric);
|
|
104
|
-
for (const entry of metric.entries) {
|
|
105
|
-
const performanceEntry = entry;
|
|
106
|
-
if (!performanceEntry.sources?.[0]) return;
|
|
107
|
-
const sourceElement = performanceEntry.sources?.[0].node;
|
|
108
|
-
if (!sourceElement || sourceElement.parentElement?.className.includes("nuxt-devtools")) return;
|
|
109
116
|
logger.info(
|
|
110
|
-
"[
|
|
111
|
-
|
|
117
|
+
"[web-vitals] CLS Metric: ",
|
|
118
|
+
metric
|
|
112
119
|
);
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
120
|
+
nuxtApp.callHook(
|
|
121
|
+
"hints:webvitals:cls",
|
|
122
|
+
metric
|
|
123
|
+
);
|
|
124
|
+
nuxtApp.payload.__hints.webvitals.cls.value.push(metric);
|
|
125
|
+
for (const entry of metric.entries) {
|
|
126
|
+
const performanceEntry = entry;
|
|
127
|
+
if (!performanceEntry.sources?.[0]) continue;
|
|
128
|
+
const sourceElement = performanceEntry.sources?.[0].node;
|
|
129
|
+
if (!sourceElement || sourceElement.parentElement?.className.includes("nuxt-devtools")) continue;
|
|
130
|
+
logger.info(
|
|
131
|
+
"[performance] Potential CLS Element: ",
|
|
132
|
+
sourceElement
|
|
133
|
+
);
|
|
134
|
+
if ((performanceEntry.value ?? 0) > 0.1) {
|
|
135
|
+
logger.warn(
|
|
136
|
+
`[performance] CLS was ${performanceEntry.value}. Good result is below 0.1
|
|
116
137
|
|
|
117
138
|
Learn more: https://web.dev/articles/cls#what-is-a-good-cls-score`
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
if (isImgElement(sourceElement) && (!sourceElement.attributes.getNamedItem("height") || !sourceElement.attributes.getNamedItem("width"))) {
|
|
142
|
+
logger.warn(
|
|
143
|
+
"[performance] Images should have `width` and `height` sizes set \n\n Learn more: https://web.dev/optimize-cls/#images-without-dimensions \n\n Use: https://image.nuxt.com/usage/nuxt-img#width-height"
|
|
144
|
+
);
|
|
145
|
+
}
|
|
124
146
|
}
|
|
125
|
-
}
|
|
126
|
-
|
|
147
|
+
}, {
|
|
148
|
+
reportAllChanges: true
|
|
149
|
+
});
|
|
150
|
+
}
|
|
127
151
|
});
|
|
128
152
|
}
|
|
129
153
|
});
|
|
154
|
+
const IMAGE_FORMATS = ["avif", "jpg", "jpeg", "png", "webp"];
|
|
130
155
|
const hasImageFormat = (src) => {
|
|
131
|
-
|
|
132
|
-
|
|
156
|
+
let pathname;
|
|
157
|
+
try {
|
|
158
|
+
pathname = new URL(src, window.location.href).pathname;
|
|
159
|
+
} catch {
|
|
160
|
+
pathname = src;
|
|
161
|
+
}
|
|
162
|
+
return IMAGE_FORMATS.some((format) => pathname.includes(format));
|
|
133
163
|
};
|
|
134
164
|
const isElementPreloaded = (src) => {
|
|
135
165
|
return Array.from(document.head.childNodes).filter(
|
|
File without changes
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createHintsLogger } from "../logger.js";
|
|
2
|
+
export const logger = createHintsLogger("webVitals");
|
|
1
3
|
export var ImagePerformanceIssueType = /* @__PURE__ */ ((ImagePerformanceIssueType2) => {
|
|
2
4
|
ImagePerformanceIssueType2[ImagePerformanceIssueType2["LazyAttrOnLCPElement"] = 0] = "LazyAttrOnLCPElement";
|
|
3
5
|
ImagePerformanceIssueType2[ImagePerformanceIssueType2["ImgFormat"] = 1] = "ImgFormat";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/hints",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
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,14 +21,18 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@nuxt/devtools-kit": "^3.2.
|
|
24
|
+
"@nuxt/devtools-kit": "^3.2.3",
|
|
25
25
|
"@nuxt/kit": "^4.3.1",
|
|
26
26
|
"consola": "^3.4.2",
|
|
27
|
-
"
|
|
27
|
+
"defu": "^6.1.4",
|
|
28
|
+
"devalue": "^5.6.3",
|
|
29
|
+
"h3": "^1.15.6",
|
|
30
|
+
"html-validate": "^10.11.1",
|
|
28
31
|
"knitwork": "^1.3.0",
|
|
29
32
|
"magic-string": "^0.30.21",
|
|
30
33
|
"nitropack": "^2.13.1",
|
|
31
|
-
"oxc-parser": "^0.
|
|
34
|
+
"oxc-parser": "^0.117.0",
|
|
35
|
+
"prettier": "^3.8.1",
|
|
32
36
|
"sirv": "^3.0.2",
|
|
33
37
|
"unplugin": "^3.0.0",
|
|
34
38
|
"unstorage": "^1.17.4",
|
|
@@ -37,28 +41,28 @@
|
|
|
37
41
|
"web-vitals": "^5.1.0"
|
|
38
42
|
},
|
|
39
43
|
"devDependencies": {
|
|
40
|
-
"@nuxt/devtools": "^3.2.
|
|
41
|
-
"@nuxt/devtools-ui-kit": "^3.2.
|
|
42
|
-
"@nuxt/eslint": "^1.15.
|
|
44
|
+
"@nuxt/devtools": "^3.2.3",
|
|
45
|
+
"@nuxt/devtools-ui-kit": "^3.2.3",
|
|
46
|
+
"@nuxt/eslint": "^1.15.2",
|
|
43
47
|
"@nuxt/icon": "^2.2.1",
|
|
44
48
|
"@nuxt/module-builder": "^1.0.2",
|
|
45
49
|
"@nuxt/schema": "^4.3.1",
|
|
46
50
|
"@nuxt/test-utils": "^4.0.0",
|
|
47
|
-
"@shikijs/transformers": "^3.
|
|
48
|
-
"@types/node": "^24.
|
|
51
|
+
"@shikijs/transformers": "^3.23.0",
|
|
52
|
+
"@types/node": "^24.12.0",
|
|
49
53
|
"@vue/test-utils": "^2.4.6",
|
|
50
54
|
"changelogen": "^0.6.2",
|
|
51
55
|
"diff": "^8.0.3",
|
|
52
|
-
"eslint": "^10.0.
|
|
56
|
+
"eslint": "^10.0.3",
|
|
53
57
|
"get-port-please": "^3.2.0",
|
|
54
|
-
"happy-dom": "^20.
|
|
55
|
-
"pkg-pr-new": "0.0.
|
|
58
|
+
"happy-dom": "^20.8.3",
|
|
59
|
+
"pkg-pr-new": "0.0.65",
|
|
56
60
|
"rimraf": "^6.1.3",
|
|
57
|
-
"sass-embedded": "^1.
|
|
58
|
-
"shiki": "^3.
|
|
61
|
+
"sass-embedded": "^1.98.0",
|
|
62
|
+
"shiki": "^3.23.0",
|
|
59
63
|
"shiki-transformer-fold": "^0.2.0",
|
|
60
64
|
"vitest": "^4.0.18",
|
|
61
|
-
"@nuxt/hints": "^1.0.0
|
|
65
|
+
"@nuxt/hints": "^1.0.0"
|
|
62
66
|
},
|
|
63
67
|
"scripts": {
|
|
64
68
|
"client:build": "nuxi generate client",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"./DPfMkruS.js";import n from"./B1dDrJ26.js";import t from"./2EtD6e53.js";import a from"./BPQ3VLAy.js";const s=Object.freeze(JSON.parse('{"displayName":"Marko","fileTypes":["marko"],"name":"marko","patterns":[{"begin":"^\\\\s*(style)(\\\\b\\\\S*\\\\.css)?\\\\s+(\\\\{)","beginCaptures":{"1":{"name":"support.type.builtin.marko"},"2":{"name":"storage.modifier.marko.css"},"3":{"name":"punctuation.section.scope.begin.marko.css"}},"contentName":"source.css","end":"}","endCaptures":{"0":{"name":"punctuation.section.scope.end.marko.css"}},"name":"meta.embedded.css","patterns":[{"include":"source.css"}]},{"begin":"^\\\\s*(style)\\\\b(\\\\S*\\\\.less)\\\\s+(\\\\{)","beginCaptures":{"1":{"name":"support.type.builtin.marko"},"2":{"name":"storage.modifier.marko.css"},"3":{"name":"punctuation.section.scope.begin.marko.css"}},"contentName":"source.less","end":"}","endCaptures":{"0":{"name":"punctuation.section.scope.end.marko.css"}},"name":"meta.embedded.less","patterns":[{"include":"source.css.less"}]},{"begin":"^\\\\s*(style)\\\\b(\\\\S*\\\\.scss)\\\\s+(\\\\{)","beginCaptures":{"1":{"name":"support.type.builtin.marko"},"2":{"name":"storage.modifier.marko.css"},"3":{"name":"punctuation.section.scope.begin.marko.css"}},"contentName":"source.scss","end":"}","endCaptures":{"0":{"name":"punctuation.section.scope.end.marko.css"}},"name":"meta.embedded.scss","patterns":[{"include":"source.css.scss"}]},{"begin":"^\\\\s*(style)\\\\b(\\\\S*\\\\.[jt]s)\\\\s+(\\\\{)","beginCaptures":{"1":{"name":"support.type.builtin.marko"},"2":{"name":"storage.modifier.marko.css"},"3":{"name":"punctuation.section.scope.begin.marko.css"}},"contentName":"source.ts","end":"}","endCaptures":{"0":{"name":"punctuation.section.scope.end.marko.css"}},"name":"meta.embedded.ts","patterns":[{"include":"source.ts"}]},{"begin":"^\\\\s*(?:(static|server|client)\\\\b|(?=(?:class|import|export)\\\\b))","beginCaptures":{"1":{"name":"keyword.control.static.marko"}},"contentName":"source.ts","end":"(?=\\\\n|$)","name":"meta.embedded.ts","patterns":[{"include":"source.ts"}]},{"include":"#content-concise-mode"}],"repository":{"attr-value":{"begin":"\\\\s*(:?=)\\\\s*","beginCaptures":{"1":{"patterns":[{"include":"source.ts"}]}},"contentName":"source.ts","end":"(?=[],;]|/>|(?<=[^=>])>|(?<!^|[!%\\\\&*:?^|~]|[-!%\\\\&*+/<-?^|~]=|[=>]>|[^.]\\\\.|[^-]-|[^+]\\\\+|[]%).0-9<A-Za-z}]\\\\s/|[^$.\\\\w]await|[^$.\\\\w]async|[^$.\\\\w]class|[^$.\\\\w]function|[^$.\\\\w]keyof|[^$.\\\\w]new|[^$.\\\\w]readonly|[^$.\\\\w]infer|[^$.\\\\w]typeof|[^$.\\\\w]void)\\\\s+(?![\\\\n!%\\\\&(*+:?^{|~]|[-/<=>]=|[=>]>|\\\\.[^.]|-[^-]|/[^>]|(?:in|instanceof|satisfies|as|extends)\\\\s+[^,/:;=>]))","name":"meta.embedded.ts","patterns":[{"include":"#javascript-expression"}]},"attrs":{"patterns":[{"include":"#javascript-comments"},{"applyEndPatternLast":1,"begin":"(?:(key|on[-$0-9A-Z_a-z]+|[$0-9A-Z_a-z]+Change|no-update(?:-body)?(?:-if)?)|([$0-9A-Z_a-z][-$0-9A-Z_a-z]*)|(#[$0-9A-Z_a-z][-$0-9A-Z_a-z]*))(:[$0-9A-Z_a-z][-$0-9A-Z_a-z]*)?","beginCaptures":{"1":{"name":"support.type.attribute-name.marko"},"2":{"name":"entity.other.attribute-name.marko"},"3":{"name":"support.function.attribute-name.marko"},"4":{"name":"support.function.attribute-name.marko"}},"end":"(?=.|$)","name":"meta.marko-attribute","patterns":[{"include":"#html-args-or-method"},{"include":"#attr-value"}]},{"begin":"(\\\\.\\\\.\\\\.)","beginCaptures":{"1":{"name":"keyword.operator.spread.marko"}},"contentName":"source.ts","end":"(?=[],;]|/>|(?<=[^=>])>|(?<!^|[!%\\\\&*:?^|~]|[-!%\\\\&*+/<-?^|~]=|[=>]>|[^.]\\\\.|[^-]-|[^+]\\\\+|[]%).0-9<A-Za-z}]\\\\s/|[^$.\\\\w]await|[^$.\\\\w]async|[^$.\\\\w]class|[^$.\\\\w]function|[^$.\\\\w]keyof|[^$.\\\\w]new|[^$.\\\\w]readonly|[^$.\\\\w]infer|[^$.\\\\w]typeof|[^$.\\\\w]void)\\\\s+(?![\\\\n!%\\\\&(*+:?^{|~]|[-/<=>]=|[=>]>|\\\\.[^.]|-[^-]|/[^>]|(?:in|instanceof|satisfies|as|extends)\\\\s+[^,/:;=>]))","name":"meta.marko-spread-attribute","patterns":[{"include":"#javascript-expression"}]},{"begin":"\\\\s*(,(?!,))","captures":{"1":{"name":"punctuation.separator.comma.marko"}},"end":"(?=\\\\S)"},{"include":"#invalid"}]},"cdata":{"begin":"\\\\s*<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.tag.begin.marko"}},"contentName":"string.other.inline-data.marko","end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"name":"meta.tag.metadata.cdata.marko"},"concise-attr-group":{"begin":"\\\\s*(\\\\[)","beginCaptures":{"1":{"name":"punctuation.section.scope.begin.marko"}},"end":"]","endCaptures":{"0":{"name":"punctuation.section.scope.end.marko"}},"patterns":[{"include":"#concise-attr-group"},{"begin":"\\\\s+","end":"(?=\\\\S)"},{"include":"#attrs"},{"include":"#invalid"}]},"concise-comment-block":{"begin":"\\\\s*(--+)\\\\s*$","beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"name":"meta.section.marko-comment-block","patterns":[{"include":"#content-embedded-comment"}]},"concise-comment-line":{"applyEndPatternLast":1,"begin":"\\\\s*(--+)","beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"end":"$","endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"name":"meta.section.marko-comment-line","patterns":[{"include":"#content-embedded-comment"}]},"concise-html-block":{"begin":"\\\\s*(--+)\\\\s*$","beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"name":"meta.section.marko-html-block","patterns":[{"include":"#content-html-mode"}]},"concise-html-line":{"captures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"},"2":{"patterns":[{"include":"#cdata"},{"include":"#doctype"},{"include":"#declaration"},{"include":"#javascript-comments-after-whitespace"},{"include":"#html-comment"},{"include":"#tag-html"},{"match":"\\\\\\\\.","name":"text.marko"},{"include":"#placeholder"},{"match":".+?","name":"text.marko"}]},"3":{"name":"punctuation.section.embedded.scope.end.marko"}},"match":"\\\\s*(--+)(?=\\\\s+\\\\S)(.*)$()","name":"meta.section.marko-html-line"},"concise-open-tag-content":{"patterns":[{"include":"#invalid-close-tag"},{"include":"#tag-before-attrs"},{"include":"#concise-semi-eol"},{"begin":"(?!^)[\\\\t ,]","end":"(?=--)|(?=\\\\n)","patterns":[{"include":"#concise-semi-eol"},{"include":"#concise-attr-group"},{"begin":"[\\\\t ]+","end":"(?=[\\\\n\\\\S])"},{"include":"#attrs"},{"include":"#invalid"}]}]},"concise-script-block":{"begin":"\\\\s*(--+)\\\\s*$","beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"end":"\\\\1","endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"name":"meta.section.marko-script-block","patterns":[{"include":"#content-embedded-script"}]},"concise-script-line":{"applyEndPatternLast":1,"begin":"\\\\s*(--+)","beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"end":"$","endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"name":"meta.section.marko-script-line","patterns":[{"include":"#content-embedded-script"}]},"concise-semi-eol":{"begin":"\\\\s*(;)","beginCaptures":{"1":{"name":"punctuation.terminator.marko"}},"end":"$","patterns":[{"include":"#javascript-comments"},{"include":"#html-comment"},{"include":"#invalid"}]},"concise-style-block":{"begin":"\\\\s*(--+)\\\\s*$","beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"contentName":"source.css","end":"\\\\1","endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"name":"meta.section.marko-style-block","patterns":[{"include":"#content-embedded-style"}]},"concise-style-block-less":{"begin":"\\\\s*(--+)\\\\s*$","beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"contentName":"source.less","end":"\\\\1","endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"name":"meta.section.marko-style-block","patterns":[{"include":"#content-embedded-style-less"}]},"concise-style-block-scss":{"begin":"\\\\s*(--+)\\\\s*$","beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"contentName":"source.scss","end":"\\\\1","endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"name":"meta.section.marko-style-block","patterns":[{"include":"#content-embedded-style-scss"}]},"concise-style-line":{"applyEndPatternLast":1,"begin":"\\\\s*(--+)","beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"contentName":"source.css","end":"$","endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"name":"meta.section.marko-style-line","patterns":[{"include":"#content-embedded-style"}]},"concise-style-line-less":{"applyEndPatternLast":1,"begin":"\\\\s*(--+)","beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"contentName":"source.less","end":"$","endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"name":"meta.section.marko-style-line","patterns":[{"include":"#content-embedded-style-less"}]},"concise-style-line-scss":{"applyEndPatternLast":1,"begin":"\\\\s*(--+)","beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"contentName":"source.scss","end":"$","endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"name":"meta.section.marko-style-line","patterns":[{"include":"#content-embedded-style-scss"}]},"content-concise-mode":{"name":"meta.marko-concise-content","patterns":[{"include":"#scriptlet"},{"include":"#javascript-comments"},{"include":"#cdata"},{"include":"#doctype"},{"include":"#declaration"},{"include":"#html-comment"},{"include":"#concise-html-block"},{"include":"#concise-html-line"},{"include":"#invalid-close-tag"},{"include":"#tag-html"},{"patterns":[{"begin":"^(\\\\s*)(?=html-comment\\\\b)","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-comment-block"},{"include":"#concise-comment-line"}],"while":"(?=^(?:\\\\s*[])`}]|\\\\*/|\\\\s*$|\\\\1\\\\s+(\\\\S|$)))"},{"begin":"^(\\\\s*)(?=(?:html-)?style\\\\b\\\\S*\\\\.less\\\\b)","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-style-block-less"},{"include":"#concise-style-line-less"}],"while":"(?=^(?:\\\\s*[])`}]|\\\\*/|\\\\s*$|\\\\1\\\\s+(\\\\S|$)))"},{"begin":"^(\\\\s*)(?=(?:html-)?style\\\\b\\\\S*\\\\.scss\\\\b)","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-style-block-scss"},{"include":"#concise-style-line-scss"}],"while":"(?=^(?:\\\\s*[])`}]|\\\\*/|\\\\s*$|\\\\1\\\\s+(\\\\S|$)))"},{"begin":"^(\\\\s*)(?=(?:html-)?style\\\\b\\\\S*\\\\.[jt]s\\\\b)","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-script-block"},{"include":"#concise-script-line"}],"while":"(?=^(?:\\\\s*[])`}]|\\\\*/|\\\\s*$|\\\\1\\\\s+(\\\\S|$)))"},{"begin":"^(\\\\s*)(?=(?:html-)?style\\\\b)","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-style-block"},{"include":"#concise-style-line"}],"while":"(?=^(?:\\\\s*[])`}]|\\\\*/|\\\\s*$|\\\\1\\\\s+(\\\\S|$)))"},{"begin":"^(\\\\s*)(?=(?:html-)?script\\\\b)","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-script-block"},{"include":"#concise-script-line"}],"while":"(?=^(?:\\\\s*[])`}]|\\\\*/|\\\\s*$|\\\\1\\\\s+(\\\\S|$)))"},{"begin":"^([\\\\t ]*)(?=[#$.0-9@-Z_a-z])","patterns":[{"include":"#concise-open-tag-content"},{"include":"#content-concise-mode"}],"while":"(?=^(?:\\\\s*[])`}]|\\\\*/|\\\\s*$|\\\\1\\\\s+(\\\\S|$)))"}]}]},"content-embedded-comment":{"patterns":[{"include":"#placeholder"},{"match":".","name":"comment.block.marko"}]},"content-embedded-script":{"name":"meta.embedded.ts","patterns":[{"include":"#placeholder"},{"include":"source.ts"}]},"content-embedded-style":{"name":"meta.embedded.css","patterns":[{"include":"#placeholder"},{"include":"source.css"}]},"content-embedded-style-less":{"name":"meta.embedded.css.less","patterns":[{"include":"#placeholder"},{"include":"source.css.less"}]},"content-embedded-style-scss":{"name":"meta.embedded.css.scss","patterns":[{"include":"#placeholder"},{"include":"source.css.scss"}]},"content-html-mode":{"patterns":[{"include":"#scriptlet"},{"include":"#cdata"},{"include":"#doctype"},{"include":"#declaration"},{"include":"#javascript-comments-after-whitespace"},{"include":"#html-comment"},{"include":"#invalid-close-tag"},{"include":"#tag-html"},{"match":"\\\\\\\\.","name":"text.marko"},{"include":"#placeholder"},{"match":".+?","name":"text.marko"}]},"declaration":{"begin":"(<\\\\?)\\\\s*([-$0-9A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.marko"},"2":{"name":"entity.name.tag.marko"}},"end":"(\\\\??>)","name":"meta.tag.metadata.processing.xml.marko","patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.marko"},"2":{"name":"punctuation.separator.key-value.html"},"3":{"name":"string.quoted.double.marko"},"4":{"name":"string.quoted.single.marko"},"5":{"name":"string.unquoted.marko"}},"match":"((?:[^=>?\\\\s]|\\\\?(?!>))+)(=)(?:(\\"(?:[^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(\'(?:[^\'\\\\\\\\]|\\\\\\\\.)*\')|((?:[^>?\\\\s]|\\\\?(?!>))+))"}]},"doctype":{"begin":"\\\\s*<!(?=(?i:DOCTYPE\\\\s))","beginCaptures":{"0":{"name":"punctuation.definition.tag.begin.marko"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"name":"meta.tag.metadata.doctype.marko","patterns":[{"match":"\\\\G(?i:DOCTYPE)","name":"entity.name.tag.marko"},{"begin":"\\"","end":"\\"","name":"string.quoted.double.marko"},{"match":"[^>\\\\s]+","name":"entity.other.attribute-name.marko"}]},"html-args-or-method":{"patterns":[{"include":"#tag-type-params"},{"begin":"\\\\s*(?=\\\\()","contentName":"source.ts","end":"(?<=\\\\))","name":"meta.embedded.ts","patterns":[{"include":"source.ts#paren-expression"}]},{"begin":"(?<=\\\\))\\\\s*(?=\\\\{)","contentName":"source.ts","end":"(?<=})","name":"meta.embedded.ts","patterns":[{"include":"source.ts"}]}]},"html-comment":{"begin":"\\\\s*(<!(--)?)","beginCaptures":{"1":{"name":"punctuation.definition.comment.marko"}},"end":"\\\\2>","endCaptures":{"0":{"name":"punctuation.definition.comment.marko"}},"name":"comment.block.marko"},"invalid":{"match":"\\\\S","name":"invalid.illegal.character-not-allowed-here.marko"},"invalid-close-tag":{"begin":"\\\\s*</[^>]*","end":">","name":"invalid.illegal.character-not-allowed-here.marko"},"javascript-comments":{"patterns":[{"begin":"\\\\s*(?=/\\\\*)","contentName":"source.ts","end":"(?<=\\\\*/)","patterns":[{"include":"source.ts"}]},{"captures":{"0":{"patterns":[{"include":"source.ts"}]}},"contentName":"source.ts","match":"\\\\s*//.*$"}]},"javascript-comments-after-whitespace":{"patterns":[{"begin":"(?:^|\\\\s+)(?=/\\\\*)","contentName":"source.ts","end":"(?<=\\\\*/)","patterns":[{"include":"source.ts"}]},{"captures":{"0":{"patterns":[{"include":"source.ts"}]}},"contentName":"source.ts","match":"(?:^|\\\\s+)//.*$"}]},"javascript-expression":{"patterns":[{"include":"#javascript-comments"},{"captures":{"0":{"patterns":[{"include":"source.ts"}]}},"contentName":"source.ts","match":"(?:\\\\s*\\\\b(?:as|await|extends|in|instanceof|satisfies|keyof|new|typeof|void))+\\\\s+(?![,/:;=>])[#$0-9@-Z_a-z]*"},{"applyEndPatternLast":1,"captures":{"0":{"name":"string.regexp.ts","patterns":[{"include":"source.ts#regexp"},{"include":"source.ts"}]}},"contentName":"source.ts","match":"(?<![]%).0-9<A-Za-z}])\\\\s*/(?:[^/\\\\[\\\\\\\\]|\\\\\\\\.|\\\\[(?:[^]\\\\\\\\]|\\\\\\\\.)*])*/[A-Za-z]*"},{"include":"source.ts"}]},"javascript-placeholder":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"contentName":"source.ts","end":"}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}},"patterns":[{"include":"source.ts"}]},"open-tag-content":{"patterns":[{"include":"#invalid-close-tag"},{"include":"#tag-before-attrs"},{"begin":"(?!/?>)","end":"(?=/?>)","patterns":[{"include":"#attrs"}]}]},"placeholder":{"begin":"\\\\$!?\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"contentName":"source.ts","end":"}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}},"patterns":[{"include":"source.ts"}]},"scriptlet":{"begin":"^\\\\s*(\\\\$)\\\\s+","beginCaptures":{"1":{"name":"keyword.control.scriptlet.marko"}},"contentName":"source.ts","end":"$","name":"meta.embedded.ts","patterns":[{"include":"source.ts"}]},"tag-before-attrs":{"patterns":[{"include":"#tag-name"},{"include":"#tag-shorthand-class-or-id"},{"begin":"/(?![*/])","beginCaptures":{"0":{"name":"punctuation.separator.tag-variable.marko"}},"contentName":"source.ts","end":"(?=[(,/;<>|]|:?=|\\\\s+[^:]|$)","name":"meta.embedded.ts","patterns":[{"match":"[$A-Z_a-z][$0-9A-Z_a-z]*","name":"variable.other.constant.object.ts"},{"begin":"\\\\{","captures":{"0":{"name":"punctuation.definition.binding-pattern.object.ts"}},"end":"}","patterns":[{"include":"source.ts#object-binding-element"},{"include":"#javascript-expression"}]},{"begin":"\\\\[","captures":{"0":{"name":"punctuation.definition.binding-pattern.array.ts"}},"end":"]","patterns":[{"include":"source.ts#array-binding-element"},{"include":"#javascript-expression"}]},{"begin":"\\\\s*(:)(?!=)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?=[](,;]|/>|(?<=[^=>])>|(?<!^|[!%\\\\&*:?^|~]|[-!%\\\\&*+/<-?^|~]=|[=>]>|[^.]\\\\.|[^-]-|[^+]\\\\+|[]%).0-9<A-Za-z}]\\\\s/|[^$.\\\\w]await|[^$.\\\\w]async|[^$.\\\\w]class|[^$.\\\\w]function|[^$.\\\\w]keyof|[^$.\\\\w]new|[^$.\\\\w]readonly|[^$.\\\\w]infer|[^$.\\\\w]typeof|[^$.\\\\w]void)\\\\s+(?![\\\\n!%\\\\&*+:?^{|~]|[-/<=>]=|[=>]>|\\\\.[^.]|-[^-]|/[^>]|(?:in|instanceof|satisfies|as|extends)\\\\s+[^,/:;=>]))","patterns":[{"include":"source.ts#type"},{"include":"#javascript-expression"}]},{"include":"#javascript-expression"}]},{"begin":"\\\\s*\\\\|","beginCaptures":{"0":{"name":"punctuation.section.scope.begin.marko"}},"contentName":"source.ts","end":"\\\\|","endCaptures":{"0":{"name":"punctuation.section.scope.end.marko"}},"patterns":[{"include":"source.ts#comment"},{"include":"source.ts#string"},{"include":"source.ts#decorator"},{"include":"source.ts#destructuring-parameter"},{"include":"source.ts#parameter-name"},{"begin":"(:)","beginCaptures":{"1":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?=[,|])|(?==[^>])","name":"meta.type.annotation.ts","patterns":[{"include":"source.ts#type"}]},{"include":"source.ts#variable-initializer"},{"match":",","name":"punctuation.separator.parameter.ts"},{"include":"source.ts"}]},{"include":"#html-args-or-method"},{"include":"#attr-value"}]},"tag-html":{"patterns":[{"begin":"\\\\s*(<)(?=(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr|const|debug|id|let|lifecycle|log|return)\\\\b)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#open-tag-content"}]},{"begin":"\\\\s*(<)(?=html-comment\\\\b)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"end":"/>|(?<=</(?:>|html-comment>))","endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#open-tag-content"},{"begin":">","beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"end":"\\\\s*</(?:>|html-comment>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#content-embedded-comment"}]}]},{"begin":"\\\\s*(<)(?=((?:html-)?style)\\\\b\\\\S*\\\\.less\\\\b)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"end":"/>|(?<=</>)|(?<=</\\\\2>)","endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#open-tag-content"},{"begin":">","beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"contentName":"source.less","end":"\\\\s*(</)((?:html-)?style)?(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#content-embedded-style-less"}]}]},{"begin":"\\\\s*(<)(?=((?:html-)?style)\\\\b\\\\S*\\\\.scss\\\\b)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"end":"/>|(?<=</>)|(?<=</\\\\2>)","endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#open-tag-content"},{"begin":">","beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"contentName":"source.scss","end":"\\\\s*(</)((?:html-)?style)?(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#content-embedded-style-scss"}]}]},{"begin":"\\\\s*(<)(?=((?:html-)?style)\\\\b\\\\S*\\\\.[jt]s\\\\b)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"end":"/>|(?<=</>)|(?<=</\\\\2>)","endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#open-tag-content"},{"begin":">","beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"contentName":"source.ts","end":"\\\\s*(</)((?:html-)?style)?(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#content-embedded-script"}]}]},{"begin":"\\\\s*(<)(?=((?:html-)?style)\\\\b)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"end":"/>|(?<=</>)|(?<=</\\\\2>)","endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#open-tag-content"},{"begin":">","beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"contentName":"source.css","end":"\\\\s*(</)((?:html-)?style)?(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#content-embedded-style"}]}]},{"begin":"\\\\s*(<)(?=((?:html-)?script)\\\\b)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"end":"/>|(?<=</>)|(?<=</\\\\2>)","endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#open-tag-content"},{"begin":">","beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"contentName":"source.ts","end":"\\\\s*(</)((?:html-)?script)?(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#content-embedded-script"}]}]},{"begin":"\\\\s*(<)(?=[#$.]|([-$0-9@-Z_a-z]+))","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"end":"/>|(?<=</>)|(?<=</\\\\2>)","endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#open-tag-content"},{"begin":">","beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"end":"\\\\s*(</)([-#$.0-:@-Z_a-z]+)?([^>]*)(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"},{"include":"#tag-shorthand-class-or-id"}]},"3":{"patterns":[{"include":"#invalid"}]},"4":{"name":"punctuation.definition.tag.end.marko"}},"patterns":[{"include":"#content-html-mode"}]}]}]},"tag-name":{"patterns":[{"applyEndPatternLast":1,"begin":"\\\\G(style)\\\\b(\\\\.[-$0-9A-Z_a-z]+(?:\\\\.[-$0-9A-Z_a-z]+)*)|([0-9@-Z_a-z](?:[-0-9@-Z_a-z]|:(?!=))*)","beginCaptures":{"1":{"name":"support.type.builtin.marko"},"2":{"name":"storage.type.marko.css"},"3":{"patterns":[{"match":"(script|style|html-script|html-style|html-comment)(?=\\\\b)(?![-:@])","name":"support.type.builtin.marko"},{"match":"(for|if|while|else-if|else|try|await|return)(?=\\\\b)(?![-:@])","name":"keyword.control.flow.marko"},{"match":"(const|context|debug|define|id|let|log|lifecycle)(?=\\\\b)(?![-:@])","name":"support.function.marko"},{"match":"@.+","name":"entity.other.attribute-name.marko"},{"match":".+","name":"entity.name.tag.marko"}]}},"end":"(?=.)","patterns":[{"include":"#tag-type-args"}]},{"begin":"(?=[$0-9A-Z_a-z]|-[^-])","end":"(?=[^-$0-9A-Z_a-z]|$)","patterns":[{"include":"#javascript-placeholder"},{"match":"(?:[-0-9A-Z_a-z]|\\\\$(?!\\\\{))+","name":"entity.name.tag.marko"}]}]},"tag-shorthand-class-or-id":{"begin":"(?=[#.])","end":"$|(?=--|[^-#$.0-9A-Z_a-z])","patterns":[{"include":"#javascript-placeholder"},{"match":"(?:[-#.0-9A-Z_a-z]|\\\\$(?!\\\\{))+","name":"entity.other.attribute-name.marko"}]},"tag-type-args":{"applyEndPatternLast":1,"begin":"(?=<)","contentName":"source.ts","end":"(?<=>)","name":"meta.embedded.ts","patterns":[{"applyEndPatternLast":1,"begin":"(?<=>)(?=[\\\\t ]*<)","end":"(?=.)","patterns":[{"include":"#tag-type-params"}]},{"include":"source.ts#type-arguments"}]},"tag-type-params":{"applyEndPatternLast":1,"begin":"(?!^)[\\\\t ]*(?=<)","contentName":"source.ts","end":"(?<=>)","name":"meta.embedded.ts","patterns":[{"include":"source.ts#type-parameters"}]}},"scopeName":"text.marko","embeddedLangs":["css","less","scss","typescript"]}')),d=[...e,...n,...t,...a,s];export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as g}from"./CKsR24bi.js";import L from"./CxJIMPBb.js";import{_ as w}from"./D0lHLEVW.js";import{_ as z}from"./BC7GvhRc.js";import{g as N,e as v,o as n,c as a,b as c,w as i,k as _,F as p,x,d as u,a as t,l as $,t as r,n as C,L as B}from"./Dw-rzC63.js";import"./Dzw9Ycsi.js";import"./B6uQK5FY.js";const A={grid:"","gap-4":"","p-4":""},E={class:"flex items-center justify-between"},I={class:"text-sm font-semibold"},S={class:"w-full text-sm"},R={class:"py-2"},T={class:"text-xs bg-neutral-100 dark:bg-neutral-800 px-1.5 py-0.5 rounded"},D={class:"text-xs text-neutral-400 ml-1"},H={class:"py-2 text-xs text-neutral-500 dark:text-neutral-400 truncate max-w-48"},V={class:"py-2 text-xs text-neutral-500 dark:text-neutral-400 truncate max-w-48"},F={key:1,class:"text-neutral-500 dark:text-neutral-400"},K=N({__name:"component-lazy-load",setup(O){const d=v(),m=C(()=>d.$lazyLoadHints.value.filter(s=>s.state.directImports.some(e=>!e.rendered)));async function f(s){d.$lazyLoadHints.value=d.$lazyLoadHints.value.filter(e=>e.id!==s),$fetch(new URL(`${B}/${s}`,window.location.origin).href,{method:"DELETE"})}return(s,e)=>{const y=g,b=L,h=w,k=z;return n(),a("div",A,[c(y,{type:"info"},{default:i(()=>[...e[0]||(e[0]=[u(" These components are statically imported but were not rendered during SSR or initial hydration. Consider using the ",-1),t("code",null,"Lazy",-1),u(" prefix or ",-1),t("code",null,"defineAsyncComponent",-1),u(" to reduce the initial bundle size. ",-1)])]),_:1}),_(m).length>0?(n(!0),a(p,{key:0},x(_(m),l=>(n(),$(k,{key:l.id,class:"p4"},{default:i(()=>[t("header",E,[t("span",I,r(l.route),1),c(h,{title:"Remove",size:"small",quaternary:"",onClick:o=>f(l.id)},{default:i(()=>[c(b,{name:"material-symbols:delete-outline",class:"text-lg"})]),_:1},8,["onClick"])]),t("table",S,[e[1]||(e[1]=t("thead",null,[t("tr",{class:"border-b border-neutral-200 dark:border-neutral-700 text-left text-neutral-500 dark:text-neutral-400"},[t("th",{class:"pb-2 font-medium"}," Component "),t("th",{class:"pb-2 font-medium"}," Import Source "),t("th",{class:"pb-2 font-medium"}," Imported By ")])],-1)),t("tbody",null,[(n(!0),a(p,null,x(l.state.directImports.filter(o=>!o.rendered),o=>(n(),a("tr",{key:o.componentName,class:"border-b border-neutral-100 dark:border-neutral-800 last:border-b-0"},[t("td",R,[t("code",T,r(o.componentName),1),t("span",D,"→ Lazy"+r(o.componentName),1)]),t("td",H,r(o.importSource),1),t("td",V,r(o.importedBy),1)]))),128))])])]),_:2},1024))),128)):(n(),a("div",F," No lazy-load suggestions found. Navigate pages in your app to collect data. "))])}}});export{K as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as O,D as A,e as q,s as T,E,G as N,I as U,J as j,B as L,K as P,M as I,N as H,v as D,O as _,P as V,Q as F,n as y,R as M,S as W,T as B,U as z,V as G,W as Q,X as $}from"./Dw-rzC63.js";const J=(...t)=>t.find(o=>o!==void 0);function K(t){const o=t.componentName||"NuxtLink";function f(e){return typeof e=="string"&&e.startsWith("#")}function S(e,l,v){const a=v??t.trailingSlash;if(!e||a!=="append"&&a!=="remove")return e;if(typeof e=="string")return C(e,a);const u="path"in e&&e.path!==void 0?e.path:l(e).path;return{...e,name:void 0,path:C(u,a)}}function k(e){const l=A(),v=$(),a=y(()=>!!e.target&&e.target!=="_self"),u=y(()=>{const i=e.to||e.href||"";return typeof i=="string"&&B(i,{acceptRelative:!0})}),b=P("RouterLink"),h=b&&typeof b!="string"?b.useLink:void 0,c=y(()=>{if(e.external)return!0;const i=e.to||e.href||"";return typeof i=="object"?!1:i===""||u.value}),r=y(()=>{const i=e.to||e.href||"";return c.value?i:S(i,l.resolve,e.trailingSlash)}),g=c.value?void 0:h?.({...e,to:r}),m=y(()=>{const i=e.trailingSlash??t.trailingSlash;if(!r.value||u.value||f(r.value))return r.value;if(c.value){const x=typeof r.value=="object"&&"path"in r.value?_(r.value):r.value,R=typeof x=="object"?l.resolve(x).href:x;return C(R,i)}return typeof r.value=="object"?l.resolve(r.value)?.href??null:C(z(v.app.baseURL,r.value),i)});return{to:r,hasTarget:a,isAbsoluteUrl:u,isExternal:c,href:m,isActive:g?.isActive??y(()=>r.value===l.currentRoute.value.path),isExactActive:g?.isExactActive??y(()=>r.value===l.currentRoute.value.path),route:g?.route??y(()=>l.resolve(r.value)),async navigate(i){await F(m.value,{replace:e.replace,external:c.value||a.value})}}}return O({name:o,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:k,setup(e,{slots:l}){const v=A(),{to:a,href:u,navigate:b,isExternal:h,hasTarget:c,isAbsoluteUrl:r}=k(e),g=H(!1),m=D(null),i=s=>{m.value=e.custom?s?.$el?.nextElementSibling:s?.$el};function x(s){return!g.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===s:e.prefetchOn?.[s]??t.prefetchOn?.[s])&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!Z()}async function R(s=q()){if(g.value)return;g.value=!0;const d=typeof a.value=="string"?a.value:h.value?_(a.value):v.resolve(a.value).fullPath,n=h.value?new URL(d,window.location.href).href:d;await Promise.all([s.hooks.callHook("link:prefetch",n).catch(()=>{}),!h.value&&!c.value&&V(a.value,v).catch(()=>{})])}if(x("visibility")){const s=q();let d,n=null;T(()=>{const p=X();E(()=>{d=N(()=>{m?.value?.tagName&&(n=p.observe(m.value,async()=>{n?.(),n=null,await R(s)}))})})}),U(()=>{d&&j(d),n?.(),n=null})}return()=>{if(!h.value&&!c.value&&!f(a.value)){const n={ref:i,to:a.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(x("interaction")&&(n.onPointerenter=R.bind(null,void 0),n.onFocus=R.bind(null,void 0)),g.value&&(n.class=e.prefetchedClass||t.prefetchedClass),n.rel=e.rel||void 0),L(P("RouterLink"),n,l.default)}const s=e.target||null,d=J(e.noRel?"":e.rel,t.externalRelAttribute,r.value||c.value?"noopener noreferrer":"")||null;return e.custom?l.default?l.default({href:u.value,navigate:b,prefetch:R,get route(){if(!u.value)return;const n=new URL(u.value,window.location.href);return{path:n.pathname,fullPath:n.pathname,get query(){return I(n.search)},hash:n.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:u.value}},rel:d,target:s,isExternal:h.value||c.value,isActive:!1,isExactActive:!1}):null:L("a",{ref:m,href:u.value||null,rel:d,target:s,onClick:async n=>{if(!(h.value||c.value)){n.preventDefault();try{const p=M(u.value);return await(e.replace?v.replace(p):v.push(p))}finally{if(f(a.value)){const p=a.value.slice(1);let w=p;try{w=decodeURIComponent(p)}catch{}document.getElementById(w)?.focus()}}}}},l.default?.())}}})}const ae=K(W);function C(t,o){const f=o==="append"?G:Q;return B(t)&&!t.startsWith("http")?t:f(t,!0)}function X(){const t=q();if(t._observer)return t._observer;let o=null;const f=new Map,S=(e,l)=>(o||=new IntersectionObserver(v=>{for(const a of v){const u=f.get(a.target);(a.isIntersecting||a.intersectionRatio>0)&&u&&u()}}),f.set(e,l),o.observe(e),()=>{f.delete(e),o?.unobserve(e),f.size===0&&(o?.disconnect(),o=null)});return t._observer={observe:S}}const Y=/2g/;function Z(){const t=navigator.connection;return!!(t&&(t.saveData||Y.test(t.effectiveType)))}export{ae as _};
|