@nuxt/hints 1.0.0-alpha.7 → 1.0.0-alpha.8
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/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/{BR7nweas.js → 8JEyW-wR.js} +1 -1
- package/dist/client/_nuxt/B6uQK5FY.js +1 -0
- package/dist/client/_nuxt/{CGrEsiZq.js → BC7GvhRc.js} +1 -1
- package/dist/client/_nuxt/{CC58r8DQ.js → BDzmeJ6w.js} +1 -1
- package/dist/client/_nuxt/{uOY9vQtj.js → BFYIK0lc.js} +1 -1
- package/dist/client/_nuxt/{De9_lo2O.js → BgS17fQP.js} +1 -1
- package/dist/client/_nuxt/{DCmwhz07.js → BpvkYYYf.js} +1 -1
- package/dist/client/_nuxt/{DGBsmNPI.js → C-EnH0Lt.js} +1 -1
- package/dist/client/_nuxt/{CO-t741Y.js → CFvV-NJL.js} +1 -1
- package/dist/client/_nuxt/{BDdCTdUI.js → CHixySwz.js} +1 -1
- package/dist/client/_nuxt/{B1nHQOfq.js → CKsR24bi.js} +1 -1
- package/dist/client/_nuxt/{GGTyZ2re.js → CsWGzJ2d.js} +1 -1
- package/dist/client/_nuxt/CxJIMPBb.js +6 -0
- package/dist/client/_nuxt/{CPCqepq_.js → D0lHLEVW.js} +1 -1
- package/dist/client/_nuxt/{CTimJaOZ.js → DJusdO6H.js} +1 -1
- package/dist/client/_nuxt/Dw-rzC63.js +4 -0
- package/dist/client/_nuxt/{C7hBqjlR.js → Dzw9Ycsi.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/c9d33be6-f2ad-4bd9-8dd1-70c2dc337718.json +1 -0
- package/dist/client/_nuxt/entry.bXb283Sw.css +1 -0
- package/dist/client/_nuxt/error-404.CCf1PrmA.css +1 -0
- package/dist/client/_nuxt/error-500.CZ0xe9I8.css +1 -0
- package/dist/client/component-lazy-load/index.html +1 -1
- 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 +19 -10
- package/dist/runtime/hydration/composables.js +6 -2
- package/dist/runtime/lazy-load/composables.d.ts +8 -4
- package/dist/runtime/lazy-load/composables.js +18 -21
- package/package.json +4 -3
- package/dist/client/_nuxt/-coei5WE.js +0 -4
- package/dist/client/_nuxt/DeEbof0M.js +0 -6
- package/dist/client/_nuxt/DsF60Hh0.js +0 -1
- package/dist/client/_nuxt/builds/meta/fbd27eb3-33d2-4da5-874f-0d93f7752a53.json +0 -1
- package/dist/client/_nuxt/entry.DKSlCyYS.css +0 -1
- package/dist/client/_nuxt/error-404.CR9CpgUf.css +0 -1
- package/dist/client/_nuxt/error-500.CaOly-jC.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as n,c,y as o}from"
|
|
1
|
+
import{o as n,c,y as o}from"./Dw-rzC63.js";const t={__name:"NIcon",props:{icon:{type:String,required:!1}},setup(e){return(r,s)=>(n(),c("div",{class:o(["n-icon",e.icon])},null,2))}};export{t as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"c9d33be6-f2ad-4bd9-8dd1-70c2dc337718","timestamp":1771872804664}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"c9d33be6-f2ad-4bd9-8dd1-70c2dc337718","timestamp":1771872804664,"prerendered":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--nui-c-context:125,125,125}html{background-color:#fff}html.dark{background-color:#151515;color:#fff;color-scheme:dark}::-moz-selection{background:#8884}::selection{background:#8884}.shiki .line{display:inline-block;position:relative;width:100%}.shiki.diff .line>span{filter:saturate(.75);opacity:.75}.shiki.diff .line-added,.shiki.diff .line-removed{scroll-margin:5em}.shiki.diff .line-added>span,.shiki.diff .line-removed>span{opacity:1!important;position:inherit;scroll-margin:20px;z-index:100}.shiki.diff .line-added>span{color:#218c3b!important}.shiki.diff .line-removed>span{color:#d15547!important}.shiki .line-added:after{background-color:#43885420}.shiki .line-added:after,.shiki .line-removed:after{content:"";display:block;inset:0;position:absolute}.shiki .line-removed:after{background-color:#8f4c3926}::view-transition-new(root),::view-transition-old(root){animation:none;mix-blend-mode:normal}::view-transition-old(root){z-index:1}::view-transition-new(root){z-index:2147483646}.dark::view-transition-old(root){z-index:2147483646}.dark::view-transition-new(root){z-index:1}*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}@font-face{font-display:swap;font-family:DM Mono;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmmono/v16/aFTU7PB1QTsUX8KYthSQBK6PYK3EXw.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:DM Mono;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmmono/v16/aFTU7PB1QTsUX8KYthqQBK6PYK0.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-display:swap;font-family:DM Sans;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmsans/v17/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRR232RmYJp8I5zzw.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:DM Sans;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmsans/v17/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRSW32RmYJp8I5.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.carbon\:chevron-right{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 16L12 26l-1.4-1.4l8.6-8.6l-8.6-8.6L12 6z'/%3E%3C/svg%3E")}.carbon\:chevron-right,.i-carbon-circle-dash{background-color:currentColor;color:inherit;display:inline-block;height:1.2em;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle;width:1.2em}.i-carbon-circle-dash{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M7.7 4.7a14.7 14.7 0 0 0-3 3.1L6.3 9a13.3 13.3 0 0 1 2.6-2.7Zm-3.1 7.6l-1.9-.6A12.5 12.5 0 0 0 2 16h2a11.5 11.5 0 0 1 .6-3.7m-1.9 8.1a14.4 14.4 0 0 0 2 3.9l1.6-1.2a12.9 12.9 0 0 1-1.7-3.3Zm5.1 6.9a14.4 14.4 0 0 0 3.9 2l.6-1.9A12.9 12.9 0 0 1 9 25.7Zm3.9-24.6l.6 1.9A11.5 11.5 0 0 1 16 4V2a12.5 12.5 0 0 0-4.3.7m12.5 24.6a15.2 15.2 0 0 0 3.1-3.1L25.7 23a11.5 11.5 0 0 1-2.7 2.7Zm3.2-7.6l1.9.6A15.5 15.5 0 0 0 30 16h-2a11.5 11.5 0 0 1-.6 3.7m1.8-8.1a14.4 14.4 0 0 0-2-3.9l-1.6 1.2a12.9 12.9 0 0 1 1.7 3.3Zm-5.1-7a14.4 14.4 0 0 0-3.9-2l-.6 1.9a12.9 12.9 0 0 1 3.3 1.7Zm-3.8 24.7l-.6-1.9a11.5 11.5 0 0 1-3.7.6v2a21.4 21.4 0 0 0 4.3-.7'/%3E%3C/svg%3E")}.n-badge{background-color:rgba(var(--nui-c-context),.1);border-radius:.25rem;font-size:.75rem;line-height:1rem;margin-left:.125rem;margin-right:.125rem;padding:.125rem .375rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity))}.n-button-icon{font-size:1.1em;margin-left:-.2em;margin-right:.2em}.n-icon-button{align-items:center;aspect-ratio:1/1;border-radius:.25rem;display:flex;height:1.6em;justify-content:center;opacity:.5;width:1.6em}.n-loading{width:100%}.n-loading,.n-panel-grids-center{align-items:center;display:flex;height:100%;justify-content:center}.n-panel-grids-center{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' transform='scale(3)'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cpath fill='none' stroke='hsla(0, 0%25, 98%25, 1)' stroke-width='.2' d='M10 0v20ZM0 10h20Z'/%3E%3C/svg%3E");background-size:40px 40px;flex-direction:column;gap:.5rem}.n-tip-base{align-items:center;background-color:rgba(var(--nui-c-context),.04);border-radius:.25rem;display:flex;gap:.5rem;padding:.4em 1em;--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity))}.n-button-base{align-items:center;border-color:#9ca3af33;border-radius:.25rem;border-width:1px;display:inline-flex;gap:.25rem;opacity:.8;padding:.25em 1em;touch-action:manipulation;--un-shadow:var(--un-shadow-inset) 0 1px 2px 0 var(--un-shadow-color,rgba(0,0,0,.05));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);outline:2px solid transparent!important;outline-offset:2px!important}.n-icon{flex:none}.n-card-base{border-color:#9ca3af33;border-radius:.25rem;border-width:1px;--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset) 0 1px 2px 0 var(--un-shadow-color,rgba(0,0,0,.05));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.n-border-base,[n-border-base=""]{border-color:#9ca3af33}.hover\:n-button-hover:hover{--un-border-opacity:1!important;border-color:rgba(var(--nui-c-context),var(--un-border-opacity))!important;--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));opacity:1}.dark .n-card-base{--un-bg-opacity:1;background-color:rgb(21 21 21/var(--un-bg-opacity))}.dark .n-tip-base{background-color:rgba(var(--nui-c-context),.12)}.n-icon-button:hover{background-color:#9ca3af0d;opacity:1}.active\:n-button-active:active{background-color:rgba(var(--nui-c-context),.05);--un-ring-width:3px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);--un-ring-color:rgba(var(--nui-c-context),.1)}.focus-visible\:n-focus-base:focus-visible{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);--un-ring-color:rgba(var(--nui-c-context),.5)}.n-transition{transition-duration:.15s;transition-duration:.2s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dark .n-panel-grids-center{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' transform='scale(3)'%3E%3Crect width='100%25' height='100%25' fill='hsl(0, 0%25, 8.5%25)'/%3E%3Cpath fill='none' stroke='hsl(0, 0%25, 11.0%25)' stroke-width='.2' d='M10 0v20ZM0 10h20Z'/%3E%3C/svg%3E");background-size:40px 40px}.relative,[relative=""]{position:relative}.grid,[grid=""]{display:grid}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2,[grid-cols-2=""]{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3,[grid-cols-3=""]{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.mb-1,[mb-1=""]{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-1,[ml-1=""]{margin-left:.25rem}.ms{margin-inline-start:1rem}.mt-1,[mt-1=""]{margin-top:.25rem}.mt-2,[mt-2=""]{margin-top:.5rem}.mt-3{margin-top:.75rem}.block{display:block}.h-49px,[h-49px=""]{height:49px}.max-w-48{max-width:12rem}.max-w-520px{max-width:520px}.max-w-full{max-width:100%}.min-h-screen{min-height:100vh}.min-w-0{min-width:0}.w-full,[w-full=""]{width:100%}.flex,[flex=""]{display:flex}.shrink-0{flex-shrink:0}.flex-col,[flex-col=""]{flex-direction:column}.flex-wrap{flex-wrap:wrap}.table{display:table}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-center,[items-center=""]{align-items:center}.justify-center{justify-content:center}.justify-between,[justify-between=""]{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1,[gap-1=""]{gap:.25rem}.gap-2,[gap-2=""]{gap:.5rem}.gap-3,[gap-3=""]{gap:.75rem}.gap-4,[gap-4=""]{gap:1rem}.space-y-4>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-bottom:calc(1rem*var(--un-space-y-reverse));margin-top:calc(1rem*(1 - var(--un-space-y-reverse)))}.overflow-auto,[overflow-auto=""]{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all,[break-all=""]{word-break:break-all}.b,.border,[border=""]{border-width:1px}.border-b,[border~=b]{border-bottom-width:1px}.last\:border-b-0:last-child{border-bottom-width:0}.border-blue-200{--un-border-opacity:1;border-color:rgb(191 219 254/var(--un-border-opacity))}.border-neutral-100{--un-border-opacity:1;border-color:rgb(245 245 245/var(--un-border-opacity))}.border-neutral-200,[border-neutral-200=""]{--un-border-opacity:1;border-color:rgb(229 229 229/var(--un-border-opacity))}.border-neutral-500{--un-border-opacity:1;border-color:rgb(115 115 115/var(--un-border-opacity))}.border-orange-200,[border-orange-200=""]{--un-border-opacity:1;border-color:rgb(254 215 170/var(--un-border-opacity))}.dark .dark\:border-blue-800{--un-border-opacity:1;border-color:rgb(30 64 175/var(--un-border-opacity))}.dark .dark\:border-neutral-400{--un-border-opacity:1;border-color:rgb(163 163 163/var(--un-border-opacity))}.dark .dark\:border-neutral-700,.dark [dark\:border-neutral-700=""]{--un-border-opacity:1;border-color:rgb(64 64 64/var(--un-border-opacity))}.dark .dark\:border-neutral-800,.dark [dark\:border-neutral-800=""]{--un-border-opacity:1;border-color:rgb(38 38 38/var(--un-border-opacity))}.dark .dark\:hover\:border-neutral-500:hover{--un-border-opacity:1;border-color:rgb(115 115 115/var(--un-border-opacity))}.hover\:border-neutral-400:hover{--un-border-opacity:1;border-color:rgb(163 163 163/var(--un-border-opacity))}.rounded,[rounded=""]{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.bg-blue-50{--un-bg-opacity:1;background-color:rgb(239 246 255/var(--un-bg-opacity))}.bg-neutral-100{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.bg-neutral-50,[bg-neutral-50=""]{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.bg-orange-50,[bg-orange-50=""]{--un-bg-opacity:1;background-color:rgb(255 247 237/var(--un-bg-opacity))}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.dark .dark\:bg-\[\#020420\]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark .dark\:bg-blue-800\/10{background-color:#1e40af1a}.dark .dark\:bg-neutral-800,.dark [dark\:bg-neutral-800=""]{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.dark .dark\:hover\:bg-neutral-700:hover{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.hover\:bg-neutral-100:hover{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.p-2,[p-2=""]{padding:.5rem}.p-3,[p-3=""]{padding:.75rem}.p-4,.p4,[p-4=""]{padding:1rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4,[px-4=""]{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-8,[py-8=""]{padding-bottom:2rem;padding-top:2rem}.pb-2{padding-bottom:.5rem}.text-center,[text-center=""]{text-align:center}.text-left{text-align:left}.text-\[11px\]{font-size:11px}.text-\[80px\]{font-size:80px}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg,[text-lg=""]{font-size:1.125rem;line-height:1.75rem}.text-sm,[text-sm=""]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""]{font-size:1.25rem;line-height:1.75rem}.text-xs,[text-xs=""]{font-size:.75rem;line-height:1rem}.dark .dark\:text-blue-400,.dark [dark\:text-blue-400=""]{--un-text-opacity:1;color:rgb(96 165 250/var(--un-text-opacity))}.dark .dark\:text-neutral-300{--un-text-opacity:1;color:rgb(212 212 212/var(--un-text-opacity))}.dark .dark\:text-neutral-400,.dark [dark\:text-neutral-400=""],.text-neutral-400,[text-neutral-400=""]{--un-text-opacity:1;color:rgb(163 163 163/var(--un-text-opacity))}.dark .dark\:text-white,.dark [dark\:text-white=""]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}.text-\[\#020420\]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.text-amber-500{--un-text-opacity:1;color:rgb(245 158 11/var(--un-text-opacity))}.text-blue-500{--un-text-opacity:1;color:rgb(59 130 246/var(--un-text-opacity))}.text-blue-600,[text-blue-600=""]{--un-text-opacity:1;color:rgb(37 99 235/var(--un-text-opacity))}.text-blue-700,[text-blue-700=""]{--un-text-opacity:1;color:rgb(29 78 216/var(--un-text-opacity))}.text-cyan-500{--un-text-opacity:1;color:rgb(6 182 212/var(--un-text-opacity))}.text-green-500{--un-text-opacity:1;color:rgb(34 197 94/var(--un-text-opacity))}.text-neutral-500,[text-neutral-500=""]{--un-text-opacity:1;color:rgb(115 115 115/var(--un-text-opacity))}.text-neutral-600,[text-neutral-600=""]{--un-text-opacity:1;color:rgb(82 82 82/var(--un-text-opacity))}.text-neutral-700{--un-text-opacity:1;color:rgb(64 64 64/var(--un-text-opacity))}.text-neutral-800,[text-neutral-800=""]{--un-text-opacity:1;color:rgb(38 38 38/var(--un-text-opacity))}.text-orange-600{--un-text-opacity:1;color:rgb(234 88 12/var(--un-text-opacity))}.text-orange-700,[text-orange-700=""]{--un-text-opacity:1;color:rgb(194 65 12/var(--un-text-opacity))}.text-purple-600,[text-purple-600=""]{--un-text-opacity:1;color:rgb(147 51 234/var(--un-text-opacity))}.text-red-500{--un-text-opacity:1;color:rgb(239 68 68/var(--un-text-opacity))}.text-red-600{--un-text-opacity:1;color:rgb(220 38 38/var(--un-text-opacity))}.text-violet-500{--un-text-opacity:1;color:rgb(139 92 246/var(--un-text-opacity))}.text-yellow-500{--un-text-opacity:1;color:rgb(234 179 8/var(--un-text-opacity))}.text-yellow-600{--un-text-opacity:1;color:rgb(202 138 4/var(--un-text-opacity))}.dark .dark\:hover\:text-neutral-200:hover{--un-text-opacity:1;color:rgb(229 229 229/var(--un-text-opacity))}.hover\:text-\[\#00DC82\]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.hover\:text-neutral-800:hover{--un-text-opacity:1;color:rgb(38 38 38/var(--un-text-opacity))}.font-bold,[font-bold=""]{font-weight:700}.font-medium{font-weight:500}.font-semibold,[font-semibold=""]{font-weight:600}.leading-none{line-height:1}.tracking-wide{letter-spacing:.025em}.font-mono,[font-mono=""]{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:DM Sans,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.uppercase,[uppercase=""]{text-transform:uppercase}.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline{text-decoration-line:underline}.underline-offset-3{text-underline-offset:3px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.op50{opacity:.5}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}[n~=yellow6]{--nui-c-context:202,138,4}.n-disabled\:n-disabled[disabled],[disabled] .n-disabled\:n-disabled{filter:saturate(0);opacity:.6;pointer-events:none}@media(min-width:640px){.sm\:text-\[110px\]{font-size:110px}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media(min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.grid[data-v-c0d89f22]{display:grid}.mb-2[data-v-c0d89f22]{margin-bottom:.5rem}.mb-4[data-v-c0d89f22]{margin-bottom:1rem}.max-w-520px[data-v-c0d89f22]{max-width:520px}.min-h-screen[data-v-c0d89f22]{min-height:100vh}.w-full[data-v-c0d89f22]{width:100%}.flex[data-v-c0d89f22]{display:flex}.place-content-center[data-v-c0d89f22]{place-content:center}.items-center[data-v-c0d89f22]{align-items:center}.justify-center[data-v-c0d89f22]{justify-content:center}.overflow-hidden[data-v-c0d89f22]{overflow:hidden}.bg-white[data-v-c0d89f22]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-c0d89f22]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-c0d89f22]{text-align:center}.text-\[80px\][data-v-c0d89f22]{font-size:80px}.text-2xl[data-v-c0d89f22]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-c0d89f22]{font-size:.875rem;line-height:1.25rem}.text-\[\#020420\][data-v-c0d89f22]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-c0d89f22]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\:text-\[\#00DC82\][data-v-c0d89f22]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-c0d89f22]{font-weight:500}.font-semibold[data-v-c0d89f22]{font-weight:600}.leading-none[data-v-c0d89f22]{line-height:1}.tracking-wide[data-v-c0d89f22]{letter-spacing:.025em}.font-sans[data-v-c0d89f22]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-c0d89f22]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline[data-v-c0d89f22]{text-decoration-line:underline}.underline-offset-3[data-v-c0d89f22]{text-underline-offset:3px}.antialiased[data-v-c0d89f22]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-c0d89f22]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-c0d89f22]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-c0d89f22]{font-size:110px}.sm\:text-3xl[data-v-c0d89f22]{font-size:1.875rem;line-height:2.25rem}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.grid[data-v-6183034a]{display:grid}.mb-2[data-v-6183034a]{margin-bottom:.5rem}.mb-4[data-v-6183034a]{margin-bottom:1rem}.max-w-520px[data-v-6183034a]{max-width:520px}.min-h-screen[data-v-6183034a]{min-height:100vh}.place-content-center[data-v-6183034a]{place-content:center}.overflow-hidden[data-v-6183034a]{overflow:hidden}.bg-white[data-v-6183034a]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-6183034a]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-6183034a]{text-align:center}.text-\[80px\][data-v-6183034a]{font-size:80px}.text-2xl[data-v-6183034a]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-6183034a]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-6183034a]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-6183034a]{font-weight:600}.leading-none[data-v-6183034a]{line-height:1}.tracking-wide[data-v-6183034a]{letter-spacing:.025em}.font-sans[data-v-6183034a]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-6183034a]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-6183034a]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-6183034a]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-6183034a]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-6183034a]{font-size:110px}.sm\:text-3xl[data-v-6183034a]{font-size:1.875rem;line-height:2.25rem}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.bXb283Sw.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-hints/_nuxt/Dw-rzC63.js"><script type="module" src="/__nuxt-hints/_nuxt/Dw-rzC63.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-hints",buildId:"c9d33be6-f2ad-4bd9-8dd1-70c2dc337718",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-hints-iframe" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1771872811303,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.bXb283Sw.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-hints/_nuxt/Dw-rzC63.js"><script type="module" src="/__nuxt-hints/_nuxt/Dw-rzC63.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-hints",buildId:"c9d33be6-f2ad-4bd9-8dd1-70c2dc337718",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-hints-iframe" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1771872811303,false]</script></body></html>
|
package/dist/client/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.bXb283Sw.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-hints/_nuxt/Dw-rzC63.js"><script type="module" src="/__nuxt-hints/_nuxt/Dw-rzC63.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-hints",buildId:"c9d33be6-f2ad-4bd9-8dd1-70c2dc337718",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-hints-iframe" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1771872811304,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.bXb283Sw.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-hints/_nuxt/Dw-rzC63.js"><script type="module" src="/__nuxt-hints/_nuxt/Dw-rzC63.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-hints",buildId:"c9d33be6-f2ad-4bd9-8dd1-70c2dc337718",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-hints-iframe" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1771872811303,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.bXb283Sw.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-hints/_nuxt/Dw-rzC63.js"><script type="module" src="/__nuxt-hints/_nuxt/Dw-rzC63.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-hints",buildId:"c9d33be6-f2ad-4bd9-8dd1-70c2dc337718",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-hints-iframe" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1771872811303,false]</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { addDevServerHandler, defineNuxtModule, createResolver, addComponent, addPlugin, addServerHandler, addBuildPlugin, addServerPlugin } from '@nuxt/kit';
|
|
1
|
+
import { addDevServerHandler, useNuxt, defineNuxtModule, createResolver, addComponent, addPlugin, addServerHandler, addBuildPlugin, addServerPlugin } from '@nuxt/kit';
|
|
2
2
|
import { HINTS_SSE_ROUTE } from '../dist/runtime/core/server/types.js';
|
|
3
3
|
import { existsSync } from 'node:fs';
|
|
4
4
|
import { eventHandler, proxyRequest } from 'h3';
|
|
5
5
|
import { genImport } from 'knitwork';
|
|
6
6
|
import MagicString from 'magic-string';
|
|
7
|
-
import { dirname, resolve,
|
|
7
|
+
import { dirname, resolve, parse } from 'node:path';
|
|
8
8
|
import { parseSync, Visitor } from 'oxc-parser';
|
|
9
9
|
import { createUnplugin } from 'unplugin';
|
|
10
10
|
import { fileURLToPath } from 'node:url';
|
|
@@ -211,6 +211,11 @@ const INCLUDE_FILES = /\.(vue|tsx?|jsx?)$/;
|
|
|
211
211
|
const EXCLUDE_NODE_MODULES = /node_modules/;
|
|
212
212
|
const skipPath = normalizePath(resolve(distDir, "runtime/lazy-load"));
|
|
213
213
|
const LazyLoadHintPlugin = createUnplugin(() => {
|
|
214
|
+
const nuxt = useNuxt();
|
|
215
|
+
let nuxtComponents = nuxt.apps.default.components;
|
|
216
|
+
nuxt.hook("components:extend", (extendedComponents) => {
|
|
217
|
+
nuxtComponents = extendedComponents;
|
|
218
|
+
});
|
|
214
219
|
return {
|
|
215
220
|
name: "@nuxt/hints:lazy-load-plugin",
|
|
216
221
|
enforce: "post",
|
|
@@ -257,7 +262,8 @@ const LazyLoadHintPlugin = createUnplugin(() => {
|
|
|
257
262
|
) + "\n");
|
|
258
263
|
const wrapperStatements = directComponentImports.map((imp) => {
|
|
259
264
|
const originalName = `__original_${imp.name}`;
|
|
260
|
-
|
|
265
|
+
const resolvedName = resolveComponentName(imp, nuxtComponents);
|
|
266
|
+
return `const ${imp.name} = __wrapImportedComponent(${originalName}, '${resolvedName}', '${imp.source}', '${normalizePath(id)}')`;
|
|
261
267
|
}).join("\n");
|
|
262
268
|
for (const imp of directComponentImports) {
|
|
263
269
|
const specifier = imp.specifier;
|
|
@@ -285,10 +291,8 @@ const LazyLoadHintPlugin = createUnplugin(() => {
|
|
|
285
291
|
}
|
|
286
292
|
if (code.includes("_sfc_main")) {
|
|
287
293
|
const wrappedComponents = directComponentImports.map((imp) => {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
return `{ componentName: '${imp.name}', importSource: '${imp.source}', importedBy: '${normalizePath(id)}', rendered: false }`;
|
|
294
|
+
const componentName = resolveComponentName(imp, nuxtComponents);
|
|
295
|
+
return `{ componentName: '${componentName}', importSource: '${imp.source}', importedBy: '${normalizePath(id)}', rendered: false }`;
|
|
292
296
|
}).join(", ");
|
|
293
297
|
m.replace("export default _sfc_main", `const _sfc_main_wrapped = __wrapMainComponent(_sfc_main, [${wrappedComponents}]);
|
|
294
298
|
export default _sfc_main_wrapped`);
|
|
@@ -296,7 +300,7 @@ export default _sfc_main_wrapped`);
|
|
|
296
300
|
const components = findDefineComponentCalls(program);
|
|
297
301
|
if (components && components.length > 0) {
|
|
298
302
|
for (const comp of components) {
|
|
299
|
-
injectUseLazyComponentTrackingInComponentSetup(comp, m, directComponentImports, id);
|
|
303
|
+
injectUseLazyComponentTrackingInComponentSetup(comp, m, directComponentImports, id, nuxtComponents);
|
|
300
304
|
}
|
|
301
305
|
}
|
|
302
306
|
m.prepend(wrapperStatements + "\n");
|
|
@@ -313,7 +317,12 @@ export default _sfc_main_wrapped`);
|
|
|
313
317
|
function normalizePath(path) {
|
|
314
318
|
return path.replace(/\\/g, "/");
|
|
315
319
|
}
|
|
316
|
-
function
|
|
320
|
+
function resolveComponentName(imp, nuxtComponents) {
|
|
321
|
+
const component = nuxtComponents.find((c) => c.filePath === imp.source);
|
|
322
|
+
if (component) return component.pascalName;
|
|
323
|
+
return imp.name.startsWith("__nuxt") ? parse(imp.source).name : imp.name;
|
|
324
|
+
}
|
|
325
|
+
function injectUseLazyComponentTrackingInComponentSetup(node, magicString, directComponentImports, id, nuxtComponents) {
|
|
317
326
|
if (node.arguments.length === 1) {
|
|
318
327
|
const arg = node.arguments[0];
|
|
319
328
|
if (arg?.type === "ObjectExpression") {
|
|
@@ -326,7 +335,7 @@ function injectUseLazyComponentTrackingInComponentSetup(node, magicString, direc
|
|
|
326
335
|
if (setupFunc.type === "FunctionExpression" || setupFunc.type === "ArrowFunctionExpression") {
|
|
327
336
|
const insertPos = (setupFunc.body?.start ?? 0) + 1;
|
|
328
337
|
const componentsArray = directComponentImports.map((imp) => {
|
|
329
|
-
const componentName = imp
|
|
338
|
+
const componentName = resolveComponentName(imp, nuxtComponents);
|
|
330
339
|
return `{ componentName: '${componentName}', importSource: '${imp.source}', importedBy: '${normalizePath(id)}', rendered: false }`;
|
|
331
340
|
}).join(", ");
|
|
332
341
|
const injectionCode = `
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { getCurrentInstance, onMounted } from "vue";
|
|
1
|
+
import { getCurrentInstance, inject, onMounted } from "vue";
|
|
2
2
|
import { useNuxtApp } from "#imports";
|
|
3
3
|
import { HYDRATION_ROUTE, formatHTML } from "./utils.js";
|
|
4
4
|
import { logger } from "../logger.js";
|
|
5
|
+
import { clientOnlySymbol } from "#app/components/client-only";
|
|
5
6
|
export function useHydrationCheck() {
|
|
6
|
-
|
|
7
|
+
const isClientOnly = inject(clientOnlySymbol, false);
|
|
8
|
+
if (import.meta.server || isClientOnly) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
7
11
|
const nuxtApp = useNuxtApp();
|
|
8
12
|
if (!nuxtApp.isHydrating || !nuxtApp.payload.serverRendered) {
|
|
9
13
|
return;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DefineComponent } from 'vue';
|
|
2
2
|
import type { DirectImportInfo } from './schema.js';
|
|
3
3
|
export declare function useLazyComponentTracking(components?: DirectImportInfo[]): any;
|
|
4
|
+
/**
|
|
5
|
+
* Wrap components definition like with defineComponent or defineNuxtComponent or just sfc exports
|
|
6
|
+
*/
|
|
4
7
|
export declare function __wrapMainComponent(component: DefineComponent, imports?: DirectImportInfo[]): DefineComponent;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Wrap imported components to track their usage.
|
|
10
|
+
*/
|
|
11
|
+
export declare function __wrapImportedComponent(component: DefineComponent, componentName: string, importSource: string, importedBy: string): DefineComponent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { defineComponent, h } from "vue";
|
|
2
1
|
import { useNuxtApp } from "#imports";
|
|
3
2
|
export function useLazyComponentTracking(components = []) {
|
|
4
3
|
const nuxtApp = useNuxtApp();
|
|
@@ -27,26 +26,24 @@ export function __wrapImportedComponent(component, componentName, importSource,
|
|
|
27
26
|
if (component && component.name === "AsyncComponentWrapper") {
|
|
28
27
|
return component;
|
|
29
28
|
}
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (state) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
info.rendered = true;
|
|
46
|
-
}
|
|
29
|
+
const originalSetup = component.setup;
|
|
30
|
+
component.setup = (props, ctx) => {
|
|
31
|
+
const state = useLazyComponentTracking();
|
|
32
|
+
if (state) {
|
|
33
|
+
if (!state.directImports.has(componentName)) {
|
|
34
|
+
state.directImports.set(componentName, {
|
|
35
|
+
componentName,
|
|
36
|
+
importSource,
|
|
37
|
+
importedBy,
|
|
38
|
+
rendered: false
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const info = state.directImports.get(componentName);
|
|
42
|
+
if (info) {
|
|
43
|
+
info.rendered = true;
|
|
47
44
|
}
|
|
48
|
-
return () => h(component, attrs, slots);
|
|
49
45
|
}
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
return originalSetup ? originalSetup(props, ctx) : void 0;
|
|
47
|
+
};
|
|
48
|
+
return component;
|
|
52
49
|
}
|
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.8",
|
|
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",
|
|
@@ -43,13 +43,14 @@
|
|
|
43
43
|
"@nuxt/icon": "^2.2.1",
|
|
44
44
|
"@nuxt/module-builder": "^1.0.2",
|
|
45
45
|
"@nuxt/schema": "^4.3.1",
|
|
46
|
-
"@nuxt/test-utils": "^
|
|
46
|
+
"@nuxt/test-utils": "^4.0.0",
|
|
47
47
|
"@shikijs/transformers": "^3.22.0",
|
|
48
48
|
"@types/node": "^24.10.13",
|
|
49
49
|
"@vue/test-utils": "^2.4.6",
|
|
50
50
|
"changelogen": "^0.6.2",
|
|
51
51
|
"diff": "^8.0.3",
|
|
52
52
|
"eslint": "^10.0.0",
|
|
53
|
+
"get-port-please": "^3.2.0",
|
|
53
54
|
"happy-dom": "^20.6.1",
|
|
54
55
|
"pkg-pr-new": "0.0.63",
|
|
55
56
|
"rimraf": "^6.1.3",
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
"shiki": "^3.22.0",
|
|
58
59
|
"shiki-transformer-fold": "^0.2.0",
|
|
59
60
|
"vitest": "^4.0.18",
|
|
60
|
-
"@nuxt/hints": "^1.0.0-alpha.
|
|
61
|
+
"@nuxt/hints": "^1.0.0-alpha.8"
|
|
61
62
|
},
|
|
62
63
|
"scripts": {
|
|
63
64
|
"client:build": "nuxi generate client",
|