nuxt-nightly 4.1.4-29331135.2311b272 → 4.2.0-29331188.9ad35781
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.
|
@@ -96,6 +96,6 @@ type NuxtLinkDefaultSlotProps<CustomProp extends boolean = false> = CustomProp e
|
|
|
96
96
|
type NuxtLinkSlots<CustomProp extends boolean = false> = {
|
|
97
97
|
default?: (props: NuxtLinkDefaultSlotProps<CustomProp>) => VNode[];
|
|
98
98
|
};
|
|
99
|
-
export declare function defineNuxtLink(options: NuxtLinkOptions): (new <CustomProp extends boolean = false>(props: NuxtLinkProps<CustomProp> & VNodeProps & AllowedComponentProps & AnchorHTMLAttributes) => InstanceType<DefineSetupFnComponent<NuxtLinkProps<CustomProp> & VNodeProps & AllowedComponentProps & AnchorHTMLAttributes, [], SlotsType<NuxtLinkSlots<CustomProp>>>>) & Record<string, any>;
|
|
100
|
-
declare const _default: (new <CustomProp extends boolean = false>(props: NuxtLinkProps<CustomProp> & VNodeProps & AllowedComponentProps & AnchorHTMLAttributes) => InstanceType<DefineSetupFnComponent<NuxtLinkProps<CustomProp> & VNodeProps & AllowedComponentProps & AnchorHTMLAttributes, [], SlotsType<NuxtLinkSlots<CustomProp>>>>) & Record<string, any>;
|
|
99
|
+
export declare function defineNuxtLink(options: NuxtLinkOptions): (new <CustomProp extends boolean = false>(props: NuxtLinkProps<CustomProp> & VNodeProps & AllowedComponentProps & AnchorHTMLAttributes) => InstanceType<DefineSetupFnComponent<NuxtLinkProps<CustomProp> & VNodeProps & AllowedComponentProps & Omit<AnchorHTMLAttributes, "href">, [], SlotsType<NuxtLinkSlots<CustomProp>>>>) & Record<string, any>;
|
|
100
|
+
declare const _default: (new <CustomProp extends boolean = false>(props: NuxtLinkProps<CustomProp> & VNodeProps & AllowedComponentProps & AnchorHTMLAttributes) => InstanceType<DefineSetupFnComponent<NuxtLinkProps<CustomProp> & VNodeProps & AllowedComponentProps & Omit<AnchorHTMLAttributes, "href">, [], SlotsType<NuxtLinkSlots<CustomProp>>>>) & Record<string, any>;
|
|
101
101
|
export default _default;
|
|
@@ -7,10 +7,11 @@ export default defineNuxtRouteMiddleware(async (to) => {
|
|
|
7
7
|
}
|
|
8
8
|
const rules = await getRouteRules({ path: to.path });
|
|
9
9
|
if (rules.redirect) {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const path = rules.redirect.includes("#") ? rules.redirect : rules.redirect + to.hash;
|
|
11
|
+
if (hasProtocol(path, { acceptRelative: true })) {
|
|
12
|
+
window.location.href = path;
|
|
12
13
|
return false;
|
|
13
14
|
}
|
|
14
|
-
return
|
|
15
|
+
return path;
|
|
15
16
|
}
|
|
16
17
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -2049,7 +2049,6 @@ const vuePreset = defineUnimportPreset({
|
|
|
2049
2049
|
"hasInjectionContext",
|
|
2050
2050
|
"nextTick",
|
|
2051
2051
|
"provide",
|
|
2052
|
-
"mergeModels",
|
|
2053
2052
|
"toValue",
|
|
2054
2053
|
"useModel",
|
|
2055
2054
|
"useAttrs",
|
|
@@ -2206,7 +2205,8 @@ function resolveComponentTypes(app, baseDir) {
|
|
|
2206
2205
|
if (c.island) {
|
|
2207
2206
|
continue;
|
|
2208
2207
|
}
|
|
2209
|
-
|
|
2208
|
+
const filePath = c.declarationPath || c.filePath;
|
|
2209
|
+
let type = `typeof ${genDynamicImport(isAbsolute(filePath) ? relative(baseDir, filePath).replace(NON_VUE_RE, "") : filePath.replace(NON_VUE_RE, ""), { wrapper: false })}['${c.export}']`;
|
|
2210
2210
|
if (c.mode === "server") {
|
|
2211
2211
|
if (app.components.some((other) => other.pascalName === c.pascalName && other.mode === "client")) {
|
|
2212
2212
|
if (c.filePath.startsWith(serverPlaceholderPath)) {
|
|
@@ -2348,6 +2348,8 @@ async function scanComponents(dirs, srcDir) {
|
|
|
2348
2348
|
preload: Boolean(dir.preload),
|
|
2349
2349
|
// specific to the file
|
|
2350
2350
|
filePath,
|
|
2351
|
+
// Use declarationPath from directory config if available, otherwise default to filePath
|
|
2352
|
+
declarationPath: dir.declarationPath || filePath,
|
|
2351
2353
|
pascalName,
|
|
2352
2354
|
kebabName,
|
|
2353
2355
|
chunkName,
|
|
@@ -3830,7 +3832,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
3830
3832
|
});
|
|
3831
3833
|
}
|
|
3832
3834
|
|
|
3833
|
-
const version = "4.
|
|
3835
|
+
const version = "4.2.0-29331188.9ad35781";
|
|
3834
3836
|
|
|
3835
3837
|
const createImportProtectionPatterns = (nuxt, options) => {
|
|
3836
3838
|
const patterns = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-nightly",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0-29331188.9ad35781",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"@nuxt/cli": "npm:@nuxt/cli-nightly@latest",
|
|
68
68
|
"@nuxt/devalue": "^2.0.2",
|
|
69
69
|
"@nuxt/devtools": "^2.6.5",
|
|
70
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.
|
|
71
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.
|
|
70
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.0-29331188.9ad35781",
|
|
71
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.0-29331188.9ad35781",
|
|
72
72
|
"@nuxt/telemetry": "^2.6.6",
|
|
73
|
-
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.
|
|
73
|
+
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.2.0-29331188.9ad35781",
|
|
74
74
|
"@unhead/vue": "^2.0.14",
|
|
75
75
|
"@vue/shared": "^3.5.22",
|
|
76
76
|
"c12": "^3.3.0",
|