@nuxt/schema-nightly 4.4.0-29534185.873c77bb → 4.4.0-29535694.d52a4fdd
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/index.d.mts +15 -4
- package/dist/index.mjs +14 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -7,6 +7,7 @@ import { Options as Options$1 } from "@vitejs/plugin-vue-jsx";
|
|
|
7
7
|
import { InputObject, Schema, SchemaDefinition, SchemaDefinition as SchemaDefinition$1 } from "untyped";
|
|
8
8
|
import { SnakeCase } from "scule";
|
|
9
9
|
import { DotenvOptions, ResolvedConfig, SourceOptions } from "c12";
|
|
10
|
+
import { RouteLocationNormalizedGeneric, RouteLocationRaw, RouteRecordRaw, RouterHistory, RouterOptions as RouterOptions$1 } from "vue-router";
|
|
10
11
|
import { IncomingMessage, Server, ServerResponse } from "node:http";
|
|
11
12
|
import { AssetURLTagConfig } from "@vue/compiler-sfc";
|
|
12
13
|
import { CompilerOptions } from "@vue/compiler-core";
|
|
@@ -34,7 +35,6 @@ import { Options as Options$6 } from "webpack-dev-middleware";
|
|
|
34
35
|
import { ClientOptions, MiddlewareOptions } from "webpack-hot-middleware";
|
|
35
36
|
import { TransformOptions } from "oxc-transform";
|
|
36
37
|
import { TransformOptions as TransformOptions$1 } from "esbuild";
|
|
37
|
-
import { RouteLocationRaw, RouteRecordRaw, RouterHistory, RouterOptions as RouterOptions$1 } from "vue-router";
|
|
38
38
|
import { Server as Server$1 } from "node:https";
|
|
39
39
|
import { Manifest } from "vue-bundle-renderer";
|
|
40
40
|
import { Import, InlinePreset, Unimport, UnimportOptions } from "unimport";
|
|
@@ -1971,7 +1971,7 @@ interface ConfigSchema {
|
|
|
1971
1971
|
* @default false
|
|
1972
1972
|
* @see [View Transitions API](https://developer.chrome.com/docs/web-platform/view-transitions)
|
|
1973
1973
|
*/
|
|
1974
|
-
viewTransition:
|
|
1974
|
+
viewTransition: ViewTransitionOptions | ViewTransitionOptions["enabled"];
|
|
1975
1975
|
/**
|
|
1976
1976
|
* Write early hints when using node server.
|
|
1977
1977
|
*
|
|
@@ -2911,14 +2911,25 @@ interface NuxtAppConfig {
|
|
|
2911
2911
|
head: Serializable<AppHeadMetaObject>;
|
|
2912
2912
|
layoutTransition: boolean | Serializable<TransitionProps>;
|
|
2913
2913
|
pageTransition: boolean | Serializable<TransitionProps>;
|
|
2914
|
-
viewTransition?:
|
|
2914
|
+
viewTransition?: ViewTransitionOptions["enabled"] | ViewTransitionOptions;
|
|
2915
2915
|
keepalive: boolean | Serializable<KeepAliveProps>;
|
|
2916
2916
|
}
|
|
2917
2917
|
interface AppConfig {
|
|
2918
2918
|
[key: string]: unknown;
|
|
2919
2919
|
}
|
|
2920
|
+
interface ViewTransitionOptions {
|
|
2921
|
+
enabled: boolean | "always";
|
|
2922
|
+
types?: string[];
|
|
2923
|
+
}
|
|
2924
|
+
type ViewTransitionTypesFn = (to: RouteLocationNormalizedGeneric, from: RouteLocationNormalizedGeneric) => string[];
|
|
2925
|
+
interface ViewTransitionPageOptions {
|
|
2926
|
+
enabled?: boolean | "always";
|
|
2927
|
+
types?: string[] | ViewTransitionTypesFn;
|
|
2928
|
+
toTypes?: string[] | ViewTransitionTypesFn;
|
|
2929
|
+
fromTypes?: string[] | ViewTransitionTypesFn;
|
|
2930
|
+
}
|
|
2920
2931
|
//#endregion
|
|
2921
2932
|
//#region src/config/index.d.ts
|
|
2922
2933
|
declare const _default: InputObject;
|
|
2923
2934
|
//#endregion
|
|
2924
|
-
export { type AppConfig, type AppConfigInput, type AppHeadMetaObject, type Component, type ComponentMeta, type ComponentsDir, type ComponentsOptions, type ConfigSchema, type CustomAppConfig, type GenerateAppOptions, type HookResult, type ImportPresetWithDeprecation, type ImportsOptions, type KeyedFunction, type MetaObject, type MetaObjectRaw, type ModuleDefinition, type ModuleDependencies, type ModuleDependencyMeta, type ModuleMeta, type ModuleOptions, type ModuleSetupInstallResult, type ModuleSetupReturn, type Nuxt, type NuxtAnalyzeMeta, type NuxtApp, type NuxtAppConfig, type NuxtBuilder, type NuxtCompatibility, type NuxtCompatibilityIssue, type NuxtCompatibilityIssues, type NuxtConfig, type NuxtConfigLayer, _default as NuxtConfigSchema, type NuxtDebugContext, type NuxtDebugModuleMutationRecord, type NuxtDebugOptions, type NuxtHookName, type NuxtHooks, type NuxtLayout, type NuxtMiddleware, type NuxtModule, type NuxtOptions, type NuxtPage, type NuxtPlugin, type NuxtPluginTemplate, type NuxtServerTemplate, type NuxtTemplate, type NuxtTypeTemplate, type PublicRuntimeConfig, type ResolvedModuleOptions, type ResolvedNuxtTemplate, type RouterConfig, type RouterConfigSerializable, type RouterOptions, type RuntimeConfig, type RuntimeValue, type ScanDir, type SchemaDefinition, type TSReference, type UpperSnakeCase, type ViteConfig, type ViteOptions, type VueTSConfig, type WatchEvent };
|
|
2935
|
+
export { type AppConfig, type AppConfigInput, type AppHeadMetaObject, type Component, type ComponentMeta, type ComponentsDir, type ComponentsOptions, type ConfigSchema, type CustomAppConfig, type GenerateAppOptions, type HookResult, type ImportPresetWithDeprecation, type ImportsOptions, type KeyedFunction, type MetaObject, type MetaObjectRaw, type ModuleDefinition, type ModuleDependencies, type ModuleDependencyMeta, type ModuleMeta, type ModuleOptions, type ModuleSetupInstallResult, type ModuleSetupReturn, type Nuxt, type NuxtAnalyzeMeta, type NuxtApp, type NuxtAppConfig, type NuxtBuilder, type NuxtCompatibility, type NuxtCompatibilityIssue, type NuxtCompatibilityIssues, type NuxtConfig, type NuxtConfigLayer, _default as NuxtConfigSchema, type NuxtDebugContext, type NuxtDebugModuleMutationRecord, type NuxtDebugOptions, type NuxtHookName, type NuxtHooks, type NuxtLayout, type NuxtMiddleware, type NuxtModule, type NuxtOptions, type NuxtPage, type NuxtPlugin, type NuxtPluginTemplate, type NuxtServerTemplate, type NuxtTemplate, type NuxtTypeTemplate, type PublicRuntimeConfig, type ResolvedModuleOptions, type ResolvedNuxtTemplate, type RouterConfig, type RouterConfigSerializable, type RouterOptions, type RuntimeConfig, type RuntimeValue, type ScanDir, type SchemaDefinition, type TSReference, type UpperSnakeCase, type ViewTransitionOptions, type ViewTransitionPageOptions, type ViteConfig, type ViteOptions, type VueTSConfig, type WatchEvent };
|
package/dist/index.mjs
CHANGED
|
@@ -83,8 +83,20 @@ var app_default = defineResolvers({
|
|
|
83
83
|
layoutTransition: false,
|
|
84
84
|
pageTransition: false,
|
|
85
85
|
viewTransition: { $resolve: async (val, get) => {
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
const isEnabled = val === "always" || typeof val === "boolean";
|
|
87
|
+
const hasEnabled = val && typeof val === "object" && "enabled" in val;
|
|
88
|
+
const hasTypes = val && typeof val === "object" && "types" in val;
|
|
89
|
+
const appOptions = {
|
|
90
|
+
enabled: isEnabled ? val : hasEnabled ? val.enabled : void 0,
|
|
91
|
+
types: hasTypes ? val.types : void 0
|
|
92
|
+
};
|
|
93
|
+
if (appOptions.enabled !== void 0 && appOptions.types !== void 0) return appOptions;
|
|
94
|
+
const _configOptions = await get("experimental").then((e) => e.viewTransition) ?? { enabled: false };
|
|
95
|
+
const configOptions = typeof _configOptions === "object" ? _configOptions : { enabled: _configOptions };
|
|
96
|
+
return {
|
|
97
|
+
enabled: appOptions.enabled ?? configOptions.enabled,
|
|
98
|
+
types: appOptions.types ?? configOptions.types
|
|
99
|
+
};
|
|
88
100
|
} },
|
|
89
101
|
keepalive: false,
|
|
90
102
|
rootId: { $resolve: (val) => val === false ? false : val && typeof val === "string" ? val : "__nuxt" },
|