@nuxt/scripts 0.3.9 → 0.4.1
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 +4 -8
- package/dist/client/200.html +57 -43
- package/dist/client/404.html +57 -43
- package/dist/client/_nuxt/{Dmsejhs1.js → BE5dUAj2.js} +1 -1
- package/dist/client/_nuxt/BEjL32p1.js +5754 -0
- package/dist/client/_nuxt/BwXNTs7T.js +1 -0
- package/dist/client/_nuxt/{Df--iwTR.js → C3OXR31I.js} +1 -1
- package/dist/client/_nuxt/CGmujMTu.js +1 -0
- package/dist/client/_nuxt/CO5hpdkB.js +1 -0
- package/dist/client/_nuxt/CiRxTSAc.js +1 -0
- package/dist/client/_nuxt/{BRKoJ6lw.js → CnGjBSoe.js} +1 -1
- package/dist/client/_nuxt/CpAANOdC.js +1 -0
- package/dist/client/_nuxt/DAfrLhwG.js +1 -0
- package/dist/client/_nuxt/DGMFlOLs.js +1 -0
- package/dist/client/_nuxt/DKb4lQY2.js +1 -0
- package/dist/client/_nuxt/Dit6kIrv.js +11 -0
- package/dist/client/_nuxt/FJDVp-XM.js +1 -0
- package/dist/client/_nuxt/KPqz0Sb3.js +1 -0
- package/dist/client/_nuxt/MS3qTAOR.js +1 -0
- package/dist/client/_nuxt/P5f3PASf.js +40 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/d030288c-d564-4054-b340-ad07c9c6d534.json +1 -0
- package/dist/client/_nuxt/yPaGq8vJ.js +31 -0
- package/dist/client/_nuxt/zkPAHE4u.js +1 -0
- package/dist/client/index.html +57 -43
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/registry.d.mts +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.mjs +1 -1
- package/dist/runtime/composables/useAnalyticsPageEvent.d.ts +1 -4
- package/dist/runtime/registry/cloudflare-web-analytics.d.ts +2 -19
- package/dist/runtime/registry/fathom-analytics.d.ts +2 -31
- package/dist/runtime/registry/google-analytics.d.ts +2 -11
- package/dist/runtime/registry/google-analytics.mjs +1 -1
- package/dist/runtime/registry/google-maps.d.ts +2 -12
- package/dist/runtime/registry/google-tag-manager.d.ts +2 -8
- package/dist/runtime/registry/hotjar.d.ts +2 -10
- package/dist/runtime/registry/intercom.d.ts +2 -22
- package/dist/runtime/registry/lemon-squeezy.d.ts +1 -3
- package/dist/runtime/registry/matomo-analytics.d.ts +2 -14
- package/dist/runtime/registry/meta-pixel.d.ts +2 -8
- package/dist/runtime/registry/npm.d.ts +2 -14
- package/dist/runtime/registry/plausible-analytics.d.ts +2 -10
- package/dist/runtime/registry/segment.d.ts +2 -10
- package/dist/runtime/registry/stripe.d.ts +2 -8
- package/dist/runtime/registry/vimeo-player.d.ts +1 -3
- package/dist/runtime/registry/x-pixel.d.ts +2 -10
- package/dist/runtime/registry/x-pixel.mjs +1 -1
- package/dist/runtime/registry/youtube-player.d.ts +1 -3
- package/dist/runtime/types.d.ts +3 -2
- package/dist/runtime/utils.d.ts +2 -4
- package/package.json +9 -9
- package/dist/client/_nuxt/BwVNWVdS.js +0 -31
- package/dist/client/_nuxt/CudBhkk3.js +0 -1
- package/dist/client/_nuxt/builds/meta/42eedd27-01ea-43c5-acca-daf3456cac3d.json +0 -1
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
2
|
-
export declare const MatomoAnalyticsOptions:
|
|
3
|
-
matomoUrl: import("valibot").StringSchema<string>;
|
|
4
|
-
siteId: import("valibot").StringSchema<string>;
|
|
5
|
-
trackPageView: import("valibot").OptionalSchema<import("valibot").BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
6
|
-
enableLinkTracking: import("valibot").OptionalSchema<import("valibot").BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
7
|
-
}, undefined, {
|
|
8
|
-
matomoUrl: string;
|
|
9
|
-
siteId: string;
|
|
10
|
-
trackPageView?: boolean | undefined;
|
|
11
|
-
enableLinkTracking?: boolean | undefined;
|
|
12
|
-
}>;
|
|
2
|
+
export declare const MatomoAnalyticsOptions: any;
|
|
13
3
|
export type MatomoAnalyticsInput = RegistryScriptInput<typeof MatomoAnalyticsOptions, false>;
|
|
14
4
|
interface MatomoAnalyticsApi {
|
|
15
5
|
_paq: unknown[];
|
|
@@ -18,7 +8,5 @@ declare global {
|
|
|
18
8
|
interface Window extends MatomoAnalyticsApi {
|
|
19
9
|
}
|
|
20
10
|
}
|
|
21
|
-
export declare function useScriptMatomoAnalytics<T extends MatomoAnalyticsApi>(_options?: MatomoAnalyticsInput):
|
|
22
|
-
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
23
|
-
};
|
|
11
|
+
export declare function useScriptMatomoAnalytics<T extends MatomoAnalyticsApi>(_options?: MatomoAnalyticsInput): any;
|
|
24
12
|
export {};
|
|
@@ -32,13 +32,7 @@ declare global {
|
|
|
32
32
|
interface Window extends MetaPixelApi {
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
export declare const MetaPixelOptions:
|
|
36
|
-
id: import("valibot").UnionSchema<(import("valibot").StringSchema<string> | import("valibot").NumberSchema<number>)[], string | number>;
|
|
37
|
-
}, undefined, {
|
|
38
|
-
id: string | number;
|
|
39
|
-
}>;
|
|
35
|
+
export declare const MetaPixelOptions: any;
|
|
40
36
|
export type MetaPixelInput = RegistryScriptInput<typeof MetaPixelOptions>;
|
|
41
|
-
export declare function useScriptMetaPixel<T extends MetaPixelApi>(_options?: MetaPixelInput):
|
|
42
|
-
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
43
|
-
};
|
|
37
|
+
export declare function useScriptMetaPixel<T extends MetaPixelApi>(_options?: MetaPixelInput): any;
|
|
44
38
|
export {};
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
2
|
-
export declare const NpmOptions:
|
|
3
|
-
packageName: import("valibot").StringSchema<string>;
|
|
4
|
-
file: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
5
|
-
version: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
6
|
-
type: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
7
|
-
}, undefined, {
|
|
8
|
-
packageName: string;
|
|
9
|
-
type?: string | undefined;
|
|
10
|
-
file?: string | undefined;
|
|
11
|
-
version?: string | undefined;
|
|
12
|
-
}>;
|
|
2
|
+
export declare const NpmOptions: any;
|
|
13
3
|
export type NpmInput = RegistryScriptInput<typeof NpmOptions>;
|
|
14
|
-
export declare function useScriptNpm<T extends Record<string | symbol, any>>(_options: NpmInput):
|
|
15
|
-
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
16
|
-
};
|
|
4
|
+
export declare function useScriptNpm<T extends Record<string | symbol, any>>(_options: NpmInput): any;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
2
|
-
export declare const PlausibleAnalyticsOptions:
|
|
3
|
-
domain: import("valibot").StringSchema<string>;
|
|
4
|
-
extension: import("valibot").OptionalSchema<import("valibot").UnionSchema<(import("valibot").UnionSchema<(import("valibot").LiteralSchema<"hash", "hash"> | import("valibot").LiteralSchema<"outbound-links", "outbound-links"> | import("valibot").LiteralSchema<"file-downloads", "file-downloads"> | import("valibot").LiteralSchema<"tagged-events", "tagged-events"> | import("valibot").LiteralSchema<"revenue", "revenue"> | import("valibot").LiteralSchema<"pageview-props", "pageview-props"> | import("valibot").LiteralSchema<"compat", "compat"> | import("valibot").LiteralSchema<"local", "local"> | import("valibot").LiteralSchema<"manual", "manual">)[], "manual" | "hash" | "outbound-links" | "file-downloads" | "tagged-events" | "revenue" | "pageview-props" | "compat" | "local"> | import("valibot").ArraySchema<import("valibot").UnionSchema<(import("valibot").LiteralSchema<"hash", "hash"> | import("valibot").LiteralSchema<"outbound-links", "outbound-links"> | import("valibot").LiteralSchema<"file-downloads", "file-downloads"> | import("valibot").LiteralSchema<"tagged-events", "tagged-events"> | import("valibot").LiteralSchema<"revenue", "revenue"> | import("valibot").LiteralSchema<"pageview-props", "pageview-props"> | import("valibot").LiteralSchema<"compat", "compat"> | import("valibot").LiteralSchema<"local", "local"> | import("valibot").LiteralSchema<"manual", "manual">)[], "manual" | "hash" | "outbound-links" | "file-downloads" | "tagged-events" | "revenue" | "pageview-props" | "compat" | "local">, ("manual" | "hash" | "outbound-links" | "file-downloads" | "tagged-events" | "revenue" | "pageview-props" | "compat" | "local")[]>)[], "manual" | "hash" | "outbound-links" | "file-downloads" | "tagged-events" | "revenue" | "pageview-props" | "compat" | "local" | ("manual" | "hash" | "outbound-links" | "file-downloads" | "tagged-events" | "revenue" | "pageview-props" | "compat" | "local")[]>, undefined, "manual" | "hash" | "outbound-links" | "file-downloads" | "tagged-events" | "revenue" | "pageview-props" | "compat" | "local" | ("manual" | "hash" | "outbound-links" | "file-downloads" | "tagged-events" | "revenue" | "pageview-props" | "compat" | "local")[] | undefined>;
|
|
5
|
-
}, undefined, {
|
|
6
|
-
domain: string;
|
|
7
|
-
extension?: "manual" | "hash" | "outbound-links" | "file-downloads" | "tagged-events" | "revenue" | "pageview-props" | "compat" | "local" | ("manual" | "hash" | "outbound-links" | "file-downloads" | "tagged-events" | "revenue" | "pageview-props" | "compat" | "local")[] | undefined;
|
|
8
|
-
}>;
|
|
2
|
+
export declare const PlausibleAnalyticsOptions: any;
|
|
9
3
|
export type PlausibleAnalyticsInput = RegistryScriptInput<typeof PlausibleAnalyticsOptions, false>;
|
|
10
4
|
export interface PlausibleAnalyticsApi {
|
|
11
5
|
plausible: ((event: '404', options: Record<string, any>) => void) & ((event: 'event', options: Record<string, any>) => void) & ((...params: any[]) => void) & {
|
|
@@ -17,6 +11,4 @@ declare global {
|
|
|
17
11
|
plausible: PlausibleAnalyticsApi;
|
|
18
12
|
}
|
|
19
13
|
}
|
|
20
|
-
export declare function useScriptPlausibleAnalytics<T extends PlausibleAnalyticsApi>(_options?: PlausibleAnalyticsInput):
|
|
21
|
-
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
22
|
-
};
|
|
14
|
+
export declare function useScriptPlausibleAnalytics<T extends PlausibleAnalyticsApi>(_options?: PlausibleAnalyticsInput): any;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
2
|
-
export declare const SegmentOptions:
|
|
3
|
-
writeKey: import("valibot").StringSchema<string>;
|
|
4
|
-
analyticsKey: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
5
|
-
}, undefined, {
|
|
6
|
-
writeKey: string;
|
|
7
|
-
analyticsKey?: string | undefined;
|
|
8
|
-
}>;
|
|
2
|
+
export declare const SegmentOptions: any;
|
|
9
3
|
export type SegmentInput = RegistryScriptInput<typeof SegmentOptions>;
|
|
10
4
|
interface AnalyticsApi {
|
|
11
5
|
track: (event: string, properties?: Record<string, any>) => void;
|
|
@@ -33,7 +27,5 @@ declare global {
|
|
|
33
27
|
interface Window extends SegmentApi {
|
|
34
28
|
}
|
|
35
29
|
}
|
|
36
|
-
export declare function useScriptSegment<T extends SegmentApi>(_options?: SegmentInput):
|
|
37
|
-
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
38
|
-
};
|
|
30
|
+
export declare function useScriptSegment<T extends SegmentApi>(_options?: SegmentInput): any;
|
|
39
31
|
export {};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/// <reference types="stripe-v3" />
|
|
2
2
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
3
|
-
export declare const StripeOptions:
|
|
4
|
-
advancedFraudSignals: import("valibot").OptionalSchema<import("valibot").BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
5
|
-
}, undefined, {
|
|
6
|
-
advancedFraudSignals?: boolean | undefined;
|
|
7
|
-
}>;
|
|
3
|
+
export declare const StripeOptions: any;
|
|
8
4
|
export type StripeInput = RegistryScriptInput<typeof StripeOptions, false>;
|
|
9
5
|
export interface StripeApi {
|
|
10
6
|
Stripe: stripe.StripeStatic;
|
|
@@ -13,6 +9,4 @@ declare global {
|
|
|
13
9
|
interface Window extends StripeApi {
|
|
14
10
|
}
|
|
15
11
|
}
|
|
16
|
-
export declare function useScriptStripe<T extends StripeApi>(_options?: StripeInput):
|
|
17
|
-
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
18
|
-
};
|
|
12
|
+
export declare function useScriptStripe<T extends StripeApi>(_options?: StripeInput): any;
|
|
@@ -10,6 +10,4 @@ declare global {
|
|
|
10
10
|
interface Window extends VimeoPlayerApi {
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
export declare function useScriptVimeoPlayer<T extends VimeoPlayerApi>(_options?: VimeoPlayerInput):
|
|
14
|
-
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
15
|
-
};
|
|
13
|
+
export declare function useScriptVimeoPlayer<T extends VimeoPlayerApi>(_options?: VimeoPlayerInput): any;
|
|
@@ -27,15 +27,7 @@ declare global {
|
|
|
27
27
|
interface Window extends XPixelApi {
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
export declare const XPixelOptions:
|
|
31
|
-
id: import("valibot").StringSchema<string>;
|
|
32
|
-
version: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
33
|
-
}, undefined, {
|
|
34
|
-
id: string;
|
|
35
|
-
version?: string | undefined;
|
|
36
|
-
}>;
|
|
30
|
+
export declare const XPixelOptions: any;
|
|
37
31
|
export type XPixelInput = RegistryScriptInput<typeof XPixelOptions>;
|
|
38
|
-
export declare function useScriptXPixel<T extends XPixelApi>(_options?: XPixelInput):
|
|
39
|
-
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
40
|
-
};
|
|
32
|
+
export declare function useScriptXPixel<T extends XPixelApi>(_options?: XPixelInput): any;
|
|
41
33
|
export {};
|
|
@@ -7,9 +7,9 @@ export const XPixelOptions = object({
|
|
|
7
7
|
export function useScriptXPixel(_options) {
|
|
8
8
|
return useRegistryScript("xPixel", (options) => {
|
|
9
9
|
return {
|
|
10
|
+
// @ts-expect-error TODO fix upstream
|
|
10
11
|
scriptInput: {
|
|
11
12
|
src: "https://static.ads-twitter.com/uwt.js",
|
|
12
|
-
// @ts-expect-error TODO fix upstream
|
|
13
13
|
crossorigin: false
|
|
14
14
|
},
|
|
15
15
|
clientInit: import.meta.server ? void 0 : () => {
|
|
@@ -9,6 +9,4 @@ declare global {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
export type YouTubePlayerInput = RegistryScriptInput;
|
|
12
|
-
export declare function useScriptYouTubePlayer<T extends YouTubePlayerApi>(_options: YouTubePlayerInput):
|
|
13
|
-
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
14
|
-
};
|
|
12
|
+
export declare function useScriptYouTubePlayer<T extends YouTubePlayerApi>(_options: YouTubePlayerInput): any;
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -100,7 +100,7 @@ export type RegistryScriptInput<T extends ObjectSchema<any> = EmptyOptionsSchema
|
|
|
100
100
|
scriptInput?: UseScriptInput;
|
|
101
101
|
scriptOptions?: Bundelable extends true ? Omit<NuxtUseScriptOptions, 'use'> : Omit<NuxtUseScriptOptions, 'bundle' | 'use'>;
|
|
102
102
|
};
|
|
103
|
-
export
|
|
103
|
+
export interface RegistryScript {
|
|
104
104
|
import: Import;
|
|
105
105
|
scriptBundling?: false | ((options?: any) => string);
|
|
106
106
|
label?: string;
|
|
@@ -110,5 +110,6 @@ export type RegistryScripts = {
|
|
|
110
110
|
light: string;
|
|
111
111
|
dark: string;
|
|
112
112
|
};
|
|
113
|
-
}
|
|
113
|
+
}
|
|
114
|
+
export type RegistryScripts = RegistryScript[];
|
|
114
115
|
export {};
|
package/dist/runtime/utils.d.ts
CHANGED
|
@@ -7,8 +7,6 @@ type OptionsFn<O extends ObjectSchema<any>> = (options: Input<O>) => ({
|
|
|
7
7
|
schema?: O;
|
|
8
8
|
clientInit?: () => void;
|
|
9
9
|
});
|
|
10
|
-
export declare function scriptRuntimeConfig<T extends keyof ScriptRegistry>(key: T): ScriptRegistry
|
|
11
|
-
export declare function useRegistryScript<T extends Record<string | symbol, any>, O extends ObjectSchema<any> = EmptyOptionsSchema>(key: keyof ScriptRegistry | string, optionsFn: OptionsFn<O>, _userOptions?: RegistryScriptInput<O>):
|
|
12
|
-
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
13
|
-
};
|
|
10
|
+
export declare function scriptRuntimeConfig<T extends keyof ScriptRegistry>(key: T): ScriptRegistry;
|
|
11
|
+
export declare function useRegistryScript<T extends Record<string | symbol, any>, O extends ObjectSchema<any> = EmptyOptionsSchema>(key: keyof ScriptRegistry | string, optionsFn: OptionsFn<O>, _userOptions?: RegistryScriptInput<O>): any;
|
|
14
12
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/scripts",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"description": "Load third-party scripts with better performance, privacy and DX in Nuxt Apps.",
|
|
6
6
|
"author": {
|
|
7
7
|
"website": "https://harlanzw.com",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@nuxt/devtools-kit": "^1.
|
|
44
|
-
"@nuxt/devtools-ui-kit": "^1.
|
|
43
|
+
"@nuxt/devtools-kit": "^1.3.1",
|
|
44
|
+
"@nuxt/devtools-ui-kit": "^1.3.1",
|
|
45
45
|
"@nuxt/kit": "^3.11.2",
|
|
46
46
|
"@types/google.maps": "^3.55.8",
|
|
47
47
|
"@types/stripe-v3": "^3.1.33",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"ofetch": "^1.3.4",
|
|
59
59
|
"ohash": "^1.1.3",
|
|
60
60
|
"pathe": "^1.1.2",
|
|
61
|
-
"pkg-types": "^1.1.
|
|
62
|
-
"semver": "^7.6.
|
|
63
|
-
"shiki": "^1.
|
|
61
|
+
"pkg-types": "^1.1.1",
|
|
62
|
+
"semver": "^7.6.2",
|
|
63
|
+
"shiki": "^1.5.1",
|
|
64
64
|
"sirv": "^2.0.4",
|
|
65
65
|
"std-env": "^3.7.0",
|
|
66
66
|
"third-party-capital": "^1.0.28",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@antfu/eslint-config": "2.16.1",
|
|
75
|
-
"@nuxt/devtools-ui-kit": "^1.
|
|
75
|
+
"@nuxt/devtools-ui-kit": "^1.3.1",
|
|
76
76
|
"@nuxt/module-builder": "^0.6.0",
|
|
77
77
|
"@nuxt/test-utils": "3.12.1",
|
|
78
78
|
"@unhead/schema": "^1.9.10",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"release": "pnpm build && bumpp && pnpm publish --no-git-checks",
|
|
105
105
|
"lint": "eslint .",
|
|
106
106
|
"lint:fix": "eslint . --fix",
|
|
107
|
-
"test": "
|
|
108
|
-
"test:types": "
|
|
107
|
+
"test": "vitest",
|
|
108
|
+
"test:types": "tsc --noEmit"
|
|
109
109
|
}
|
|
110
110
|
}
|