@nuxt/scripts 0.4.0 → 0.4.2
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 +65 -51
- package/dist/client/404.html +65 -51
- package/dist/client/_nuxt/{CDJL3WWm.js → B3g-KkBK.js} +1 -1
- package/dist/client/_nuxt/{Di3qjVs2.js → B4ACM-c0.js} +1 -1
- package/dist/client/_nuxt/B7rNE5kf.js +1 -0
- package/dist/client/_nuxt/BBSnVM_c.js +31 -0
- package/dist/client/_nuxt/BEjL32p1.js +5754 -0
- package/dist/client/_nuxt/{CCsrmkFc.js → BJEDUQYt.js} +1 -1
- package/dist/client/_nuxt/BcF9sHHc.js +6 -0
- package/dist/client/_nuxt/{BGq4KZyx.js → Br6ll-O0.js} +1 -1
- package/dist/client/_nuxt/BwXNTs7T.js +1 -0
- package/dist/client/_nuxt/Bx89rGXK.js +1 -0
- package/dist/client/_nuxt/{V_y36BGi.js → Bxkoe-BC.js} +1 -1
- package/dist/client/_nuxt/{CX2EUjC8.js → C3qUB5O8.js} +7 -7
- 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/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/{DIr-ordK.js → DKlGn9uv.js} +1 -1
- 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/{CFYSkdJN.js → PGJIGHGk.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/f37c599d-d78f-4a74-8eda-256234cbc028.json +1 -0
- package/dist/client/_nuxt/{C7Ygk604.js → iP9mcxdl.js} +1 -1
- package/dist/client/index.html +65 -51
- 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/components/ScriptGoogleMaps.vue +2 -2
- package/dist/runtime/components/ScriptLemonSqueezyButton.vue +2 -3
- package/dist/runtime/components/ScriptStripePricingTable.vue +1 -1
- package/dist/runtime/components/ScriptVimeoPlayer.vue +45 -37
- package/dist/runtime/components/ScriptYouTubePlayer.vue +1 -1
- package/dist/runtime/composables/useAnalyticsPageEvent.d.ts +4 -1
- package/dist/runtime/composables/useElementScriptTrigger.d.ts +1 -1
- package/dist/runtime/registry/cloudflare-web-analytics.d.ts +19 -2
- package/dist/runtime/registry/fathom-analytics.d.ts +31 -2
- package/dist/runtime/registry/google-analytics.d.ts +11 -2
- package/dist/runtime/registry/google-analytics.mjs +1 -1
- package/dist/runtime/registry/google-maps.d.ts +21 -9
- package/dist/runtime/registry/google-tag-manager.d.ts +8 -2
- package/dist/runtime/registry/hotjar.d.ts +10 -2
- package/dist/runtime/registry/intercom.d.ts +23 -3
- package/dist/runtime/registry/lemon-squeezy.d.ts +3 -1
- package/dist/runtime/registry/matomo-analytics.d.ts +14 -2
- package/dist/runtime/registry/meta-pixel.d.ts +8 -2
- package/dist/runtime/registry/npm.d.ts +14 -2
- package/dist/runtime/registry/plausible-analytics.d.ts +10 -2
- package/dist/runtime/registry/segment.d.ts +10 -2
- package/dist/runtime/registry/stripe.d.ts +8 -2
- package/dist/runtime/registry/vimeo-player.d.ts +6 -3
- package/dist/runtime/registry/x-pixel.d.ts +10 -2
- package/dist/runtime/registry/youtube-player.d.ts +6 -2
- package/dist/runtime/types.d.ts +4 -2
- package/dist/runtime/utils.d.ts +4 -2
- package/package.json +12 -11
- package/dist/client/_nuxt/CudBhkk3.js +0 -1
- package/dist/client/_nuxt/DbUJKcwL.js +0 -31
- package/dist/client/_nuxt/Dszwcx0o.js +0 -1
- package/dist/client/_nuxt/DtT2Dbx_.js +0 -6
- package/dist/client/_nuxt/builds/meta/2a8bbe8d-00a2-43ea-ae62-2d603f7034d4.json +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { ref } from 'vue'
|
|
3
|
-
import type { ElementScriptTrigger } from '../
|
|
3
|
+
import type { ElementScriptTrigger } from '../types'
|
|
4
4
|
import { onBeforeUnmount, useElementScriptTrigger, useScript } from '#imports'
|
|
5
5
|
|
|
6
6
|
const props = withDefaults(defineProps<{
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/// <reference types="vimeo__player" />
|
|
2
3
|
import { type HTMLAttributes, type ImgHTMLAttributes, computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
|
3
|
-
import type Player from 'vimeo__player'
|
|
4
|
-
import type { EventMap, VimeoVideoQuality } from 'vimeo__player'
|
|
5
4
|
import { defu } from 'defu'
|
|
6
|
-
import type { ElementScriptTrigger } from '../
|
|
5
|
+
import type { ElementScriptTrigger } from '../types'
|
|
7
6
|
import { useAsyncData, useElementScriptTrigger, useHead, useScriptVimeoPlayer } from '#imports'
|
|
8
7
|
|
|
9
8
|
const props = withDefaults(defineProps<{
|
|
@@ -13,7 +12,7 @@ const props = withDefaults(defineProps<{
|
|
|
13
12
|
rootAttrs?: HTMLAttributes
|
|
14
13
|
aboveTheFold?: boolean
|
|
15
14
|
// copied from @types/vimeo__player
|
|
16
|
-
id:
|
|
15
|
+
id: number | undefined
|
|
17
16
|
url?: string | undefined
|
|
18
17
|
autopause?: boolean | undefined
|
|
19
18
|
autoplay?: boolean | undefined
|
|
@@ -35,7 +34,7 @@ const props = withDefaults(defineProps<{
|
|
|
35
34
|
portrait?: boolean | undefined
|
|
36
35
|
responsive?: boolean | undefined
|
|
37
36
|
speed?: boolean | undefined
|
|
38
|
-
quality?: VimeoVideoQuality | undefined
|
|
37
|
+
quality?: Vimeo.VimeoVideoQuality | undefined
|
|
39
38
|
texttrack?: string | undefined
|
|
40
39
|
title?: boolean | undefined
|
|
41
40
|
transparent?: boolean | undefined
|
|
@@ -48,35 +47,40 @@ const props = withDefaults(defineProps<{
|
|
|
48
47
|
controls: true,
|
|
49
48
|
})
|
|
50
49
|
|
|
51
|
-
const emits = defineEmits<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
50
|
+
const emits = defineEmits<TEmits>()
|
|
51
|
+
|
|
52
|
+
type EventMap<E extends keyof Vimeo.EventMap> = [event: Vimeo.EventMap[E], player: Vimeo]
|
|
53
|
+
|
|
54
|
+
// eslint-disable-next-line ts/consistent-type-definitions
|
|
55
|
+
type TEmits = {
|
|
56
|
+
play: EventMap<'play'>
|
|
57
|
+
playing: EventMap<'playing'>
|
|
58
|
+
pause: EventMap<'pause'>
|
|
59
|
+
ended: EventMap<'ended'>
|
|
60
|
+
timeupdate: EventMap<'timeupdate'>
|
|
61
|
+
progress: EventMap<'progress'>
|
|
62
|
+
seeking: EventMap<'seeking'>
|
|
63
|
+
seeked: EventMap<'seeked'>
|
|
64
|
+
texttrackchange: EventMap<'texttrackchange'>
|
|
65
|
+
chapterchange: EventMap<'chapterchange'>
|
|
66
|
+
cuechange: EventMap<'cuechange'>
|
|
67
|
+
cuepoint: EventMap<'cuepoint'>
|
|
68
|
+
volumechange: EventMap<'volumechange'>
|
|
69
|
+
playbackratechange: EventMap<'playbackratechange'>
|
|
70
|
+
bufferstart: EventMap<'bufferstart'>
|
|
71
|
+
bufferend: EventMap<'bufferend'>
|
|
72
|
+
error: EventMap<'error'>
|
|
73
|
+
loaded: EventMap<'loaded'>
|
|
74
|
+
durationchange: EventMap<'durationchange'>
|
|
75
|
+
fullscreenchange: EventMap<'fullscreenchange'>
|
|
76
|
+
qualitychange: EventMap<'qualitychange'>
|
|
77
|
+
camerachange: EventMap<'camerachange'>
|
|
78
|
+
resize: EventMap<'resize'>
|
|
79
|
+
enterpictureinpicture: EventMap<'enterpictureinpicture'>
|
|
80
|
+
leavepictureinpicture: EventMap<'leavepictureinpicture'>
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const events: (keyof TEmits)[] = [
|
|
80
84
|
'play',
|
|
81
85
|
'playing',
|
|
82
86
|
'pause',
|
|
@@ -100,6 +104,8 @@ const events = [
|
|
|
100
104
|
'qualitychange',
|
|
101
105
|
'camerachange',
|
|
102
106
|
'resize',
|
|
107
|
+
'enterpictureinpicture',
|
|
108
|
+
'leavepictureinpicture',
|
|
103
109
|
]
|
|
104
110
|
|
|
105
111
|
const elVimeo = ref()
|
|
@@ -134,7 +140,7 @@ if (import.meta.server) {
|
|
|
134
140
|
const { data: payload } = useAsyncData(
|
|
135
141
|
`vimeo-embed:${props.id}`,
|
|
136
142
|
// TODO ideally we cache this
|
|
137
|
-
() => $fetch(`https://vimeo.com/api/v2/video/${props.id}.json`).then(res => res[0]),
|
|
143
|
+
() => $fetch(`https://vimeo.com/api/v2/video/${props.id}.json`).then(res => (res as any)[0]),
|
|
138
144
|
{
|
|
139
145
|
watch: [() => props.id],
|
|
140
146
|
},
|
|
@@ -142,7 +148,7 @@ const { data: payload } = useAsyncData(
|
|
|
142
148
|
|
|
143
149
|
const placeholder = computed(() => payload.value?.thumbnail_large)
|
|
144
150
|
|
|
145
|
-
let player:
|
|
151
|
+
let player: Vimeo | undefined
|
|
146
152
|
// we can't directly expose the player as vue will break the proxy
|
|
147
153
|
defineExpose({
|
|
148
154
|
play: () => player?.play(),
|
|
@@ -159,6 +165,7 @@ defineExpose({
|
|
|
159
165
|
getPlaybackRate: () => player?.getPlaybackRate(),
|
|
160
166
|
setPlaybackRate: (rate: number) => player?.setPlaybackRate(rate),
|
|
161
167
|
})
|
|
168
|
+
|
|
162
169
|
onMounted(() => {
|
|
163
170
|
$script.then(async ({ Vimeo }) => {
|
|
164
171
|
// filter props for false values
|
|
@@ -171,7 +178,8 @@ onMounted(() => {
|
|
|
171
178
|
clickTriggered = false
|
|
172
179
|
}
|
|
173
180
|
for (const event of events) {
|
|
174
|
-
player!.on(event, (e) => {
|
|
181
|
+
player!.on(event, (e: EventMap<typeof event>) => {
|
|
182
|
+
// @ts-expect-error ts isn't able to infer the correct event type
|
|
175
183
|
emits(event, e, player)
|
|
176
184
|
if (event === 'loaded')
|
|
177
185
|
ready.value = true
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="youtube" />
|
|
3
3
|
import { type HTMLAttributes, type ImgHTMLAttributes, type Ref, computed, onMounted, ref, watch } from 'vue'
|
|
4
4
|
import { defu } from 'defu'
|
|
5
|
-
import type { ElementScriptTrigger } from '../
|
|
5
|
+
import type { ElementScriptTrigger } from '../types'
|
|
6
6
|
import { useElementScriptTrigger, useHead, useScriptYouTubePlayer } from '#imports'
|
|
7
7
|
|
|
8
8
|
const props = withDefaults(defineProps<{
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import type { TrackedPage } from '#nuxt-scripts';
|
|
2
|
-
export declare function useAnalyticsPageEvent(onChange?: (payload: TrackedPage) => void): import("#imports").Ref<
|
|
2
|
+
export declare function useAnalyticsPageEvent(onChange?: (payload: TrackedPage) => void): import("#imports").Ref<{
|
|
3
|
+
title?: string | undefined;
|
|
4
|
+
path: string;
|
|
5
|
+
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MaybeComputedElementRef, MaybeElement } from '@vueuse/core';
|
|
2
|
-
|
|
2
|
+
import type { ElementScriptTrigger } from '../types';
|
|
3
3
|
export interface ElementScriptTriggerOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The event to trigger the script load.
|
|
@@ -16,6 +16,23 @@ declare global {
|
|
|
16
16
|
interface Window extends CloudflareWebAnalyticsApi {
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
export declare const CloudflareWebAnalyticsOptions:
|
|
19
|
+
export declare const CloudflareWebAnalyticsOptions: import("valibot").ObjectSchema<{
|
|
20
|
+
/**
|
|
21
|
+
* The Cloudflare Web Analytics token.
|
|
22
|
+
*/
|
|
23
|
+
token: import("valibot").StringSchema<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Cloudflare Web Analytics enables measuring SPAs automatically by overriding the History API’s pushState function
|
|
26
|
+
* and listening to the onpopstate. Hash-based router is not supported.
|
|
27
|
+
*
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
spa: import("valibot").OptionalSchema<import("valibot").BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
31
|
+
}, undefined, {
|
|
32
|
+
token: string;
|
|
33
|
+
spa?: boolean | undefined;
|
|
34
|
+
}>;
|
|
20
35
|
export type CloudflareWebAnalyticsInput = RegistryScriptInput<typeof CloudflareWebAnalyticsOptions>;
|
|
21
|
-
export declare function useScriptCloudflareWebAnalytics<T extends CloudflareWebAnalyticsApi>(_options?: CloudflareWebAnalyticsInput):
|
|
36
|
+
export declare function useScriptCloudflareWebAnalytics<T extends CloudflareWebAnalyticsApi>(_options?: CloudflareWebAnalyticsInput): T & {
|
|
37
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
38
|
+
};
|
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
2
|
-
export declare const FathomAnalyticsOptions:
|
|
2
|
+
export declare const FathomAnalyticsOptions: import("valibot").ObjectSchema<{
|
|
3
|
+
/**
|
|
4
|
+
* The Fathom Analytics site ID.
|
|
5
|
+
*/
|
|
6
|
+
site: import("valibot").StringSchema<string>;
|
|
7
|
+
/**
|
|
8
|
+
* The Fathom Analytics tracking mode.
|
|
9
|
+
*/
|
|
10
|
+
spa: import("valibot").OptionalSchema<import("valibot").UnionSchema<(import("valibot").LiteralSchema<"auto", "auto"> | import("valibot").LiteralSchema<"history", "history"> | import("valibot").LiteralSchema<"hash", "hash">)[], "auto" | "history" | "hash">, undefined, "auto" | "history" | "hash" | undefined>;
|
|
11
|
+
/**
|
|
12
|
+
* Automatically track page views.
|
|
13
|
+
*/
|
|
14
|
+
auto: import("valibot").OptionalSchema<import("valibot").BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Enable canonical URL tracking.
|
|
17
|
+
*/
|
|
18
|
+
canonical: import("valibot").OptionalSchema<import("valibot").BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* Honor Do Not Track requests.
|
|
21
|
+
*/
|
|
22
|
+
honorDnt: import("valibot").OptionalSchema<import("valibot").BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
23
|
+
}, undefined, {
|
|
24
|
+
site: string;
|
|
25
|
+
auto?: boolean | undefined;
|
|
26
|
+
spa?: "auto" | "history" | "hash" | undefined;
|
|
27
|
+
canonical?: boolean | undefined;
|
|
28
|
+
honorDnt?: boolean | undefined;
|
|
29
|
+
}>;
|
|
3
30
|
export type FathomAnalyticsInput = RegistryScriptInput<typeof FathomAnalyticsOptions, false>;
|
|
4
31
|
export interface FathomAnalyticsApi {
|
|
5
32
|
beacon: (ctx: {
|
|
@@ -26,4 +53,6 @@ declare global {
|
|
|
26
53
|
fathom: FathomAnalyticsApi;
|
|
27
54
|
}
|
|
28
55
|
}
|
|
29
|
-
export declare function useScriptFathomAnalytics<T extends FathomAnalyticsApi>(_options?: FathomAnalyticsInput):
|
|
56
|
+
export declare function useScriptFathomAnalytics<T extends FathomAnalyticsApi>(_options?: FathomAnalyticsInput): T & {
|
|
57
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
58
|
+
};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { GoogleAnalyticsApi } from 'third-party-capital';
|
|
2
2
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
3
|
-
export declare const GoogleAnalyticsOptions:
|
|
3
|
+
export declare const GoogleAnalyticsOptions: import("valibot").ObjectSchema<{
|
|
4
|
+
/**
|
|
5
|
+
* The Google Analytics ID.
|
|
6
|
+
*/
|
|
7
|
+
id: import("valibot").StringSchema<string>;
|
|
8
|
+
}, undefined, {
|
|
9
|
+
id: string;
|
|
10
|
+
}>;
|
|
4
11
|
export type GoogleAnalyticsInput = RegistryScriptInput<typeof GoogleAnalyticsOptions>;
|
|
5
12
|
declare global {
|
|
6
13
|
interface Window extends GoogleAnalyticsApi {
|
|
@@ -11,4 +18,6 @@ declare global {
|
|
|
11
18
|
*
|
|
12
19
|
* A 3P wrapper for Google Analytics that takes an options input to feed into third-party-capital({@link https://github.com/GoogleChromeLabs/third-party-capital}), which returns instructions for nuxt-scripts.
|
|
13
20
|
*/
|
|
14
|
-
export declare function useScriptGoogleAnalytics<T extends GoogleAnalyticsApi>(_options?: GoogleAnalyticsInput):
|
|
21
|
+
export declare function useScriptGoogleAnalytics<T extends GoogleAnalyticsApi>(_options?: GoogleAnalyticsInput): T & {
|
|
22
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
23
|
+
};
|
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
declare namespace google {
|
|
3
|
+
namespace maps {
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
function __ib__(): void;
|
|
8
|
+
}
|
|
9
9
|
}
|
|
10
|
+
export declare const GoogleMapsOptions: import("valibot").ObjectSchema<{
|
|
11
|
+
apiKey: import("valibot").StringSchema<string>;
|
|
12
|
+
libraries: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<string>, string[]>, undefined, string[] | undefined>;
|
|
13
|
+
v: import("valibot").OptionalSchema<import("valibot").UnionSchema<(import("valibot").LiteralSchema<"weekly", "weekly"> | import("valibot").LiteralSchema<"beta", "beta"> | import("valibot").LiteralSchema<"alpha", "alpha">)[], "weekly" | "beta" | "alpha">, undefined, "weekly" | "beta" | "alpha" | undefined>;
|
|
14
|
+
}, undefined, {
|
|
15
|
+
apiKey: string;
|
|
16
|
+
libraries?: string[] | undefined;
|
|
17
|
+
v?: "weekly" | "beta" | "alpha" | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export type GoogleMapsInput = RegistryScriptInput<typeof GoogleMapsOptions>;
|
|
10
20
|
export interface GoogleMapsApi {
|
|
11
|
-
maps: typeof google.maps;
|
|
21
|
+
maps: typeof window.google.maps;
|
|
12
22
|
}
|
|
13
23
|
declare global {
|
|
14
24
|
interface Window {
|
|
15
25
|
google: typeof google;
|
|
16
26
|
}
|
|
17
27
|
}
|
|
18
|
-
export declare function useScriptGoogleMaps<T extends GoogleMapsApi>(_options?: GoogleMapsInput):
|
|
28
|
+
export declare function useScriptGoogleMaps<T extends GoogleMapsApi>(_options?: GoogleMapsInput): T & {
|
|
29
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
30
|
+
};
|
|
19
31
|
export {};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { GoogleTagManagerApi } from 'third-party-capital';
|
|
2
2
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
3
|
-
declare const GoogleTagManagerOptions:
|
|
3
|
+
declare const GoogleTagManagerOptions: import("valibot").ObjectSchema<{
|
|
4
|
+
id: import("valibot").StringSchema<string>;
|
|
5
|
+
}, undefined, {
|
|
6
|
+
id: string;
|
|
7
|
+
}>;
|
|
4
8
|
export type GoogleTagManagerInput = RegistryScriptInput<typeof GoogleTagManagerOptions>;
|
|
5
9
|
declare global {
|
|
6
10
|
interface Window extends GoogleTagManagerApi {
|
|
@@ -11,5 +15,7 @@ declare global {
|
|
|
11
15
|
*
|
|
12
16
|
* A 3P wrapper for Google Tag Manager that takes an options input to feed into third-party-capital({@link https://github.com/GoogleChromeLabs/third-party-capital}), which returns instructions for nuxt-scripts.
|
|
13
17
|
*/
|
|
14
|
-
export declare function useScriptGoogleTagManager<T extends GoogleTagManagerApi>(options?: GoogleTagManagerInput):
|
|
18
|
+
export declare function useScriptGoogleTagManager<T extends GoogleTagManagerApi>(options?: GoogleTagManagerInput): T & {
|
|
19
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
20
|
+
};
|
|
15
21
|
export {};
|
|
@@ -12,6 +12,14 @@ declare global {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
export declare const HotjarOptions:
|
|
15
|
+
export declare const HotjarOptions: import("valibot").ObjectSchema<{
|
|
16
|
+
id: import("valibot").NumberSchema<number>;
|
|
17
|
+
sv: import("valibot").OptionalSchema<import("valibot").NumberSchema<number>, undefined, number | undefined>;
|
|
18
|
+
}, undefined, {
|
|
19
|
+
id: number;
|
|
20
|
+
sv?: number | undefined;
|
|
21
|
+
}>;
|
|
16
22
|
export type HotjarInput = RegistryScriptInput<typeof HotjarOptions>;
|
|
17
|
-
export declare function useScriptHotjar<T extends HotjarApi>(_options?: HotjarInput):
|
|
23
|
+
export declare function useScriptHotjar<T extends HotjarApi>(_options?: HotjarInput): T & {
|
|
24
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
25
|
+
};
|
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
import { type Input } from '#nuxt-scripts-validator';
|
|
2
2
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
3
|
-
export declare const IntercomOptions:
|
|
3
|
+
export declare const IntercomOptions: import("valibot").ObjectSchema<{
|
|
4
|
+
app_id: import("valibot").StringSchema<string>;
|
|
5
|
+
api_base: import("valibot").OptionalSchema<import("valibot").UnionSchema<(import("valibot").LiteralSchema<"https://api-iam.intercom.io", "https://api-iam.intercom.io"> | import("valibot").LiteralSchema<"https://api-iam.eu.intercom.io", "https://api-iam.eu.intercom.io"> | import("valibot").LiteralSchema<"https://api-iam.au.intercom.io", "https://api-iam.au.intercom.io">)[], "https://api-iam.intercom.io" | "https://api-iam.eu.intercom.io" | "https://api-iam.au.intercom.io">, undefined, "https://api-iam.intercom.io" | "https://api-iam.eu.intercom.io" | "https://api-iam.au.intercom.io" | undefined>;
|
|
6
|
+
name: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
7
|
+
email: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
8
|
+
user_id: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
9
|
+
alignment: import("valibot").OptionalSchema<import("valibot").UnionSchema<(import("valibot").LiteralSchema<"left", "left"> | import("valibot").LiteralSchema<"right", "right">)[], "left" | "right">, undefined, "left" | "right" | undefined>;
|
|
10
|
+
horizontal_padding: import("valibot").OptionalSchema<import("valibot").NumberSchema<number>, undefined, number | undefined>;
|
|
11
|
+
vertical_padding: import("valibot").OptionalSchema<import("valibot").NumberSchema<number>, undefined, number | undefined>;
|
|
12
|
+
}, undefined, {
|
|
13
|
+
app_id: string;
|
|
14
|
+
name?: string | undefined;
|
|
15
|
+
api_base?: "https://api-iam.intercom.io" | "https://api-iam.eu.intercom.io" | "https://api-iam.au.intercom.io" | undefined;
|
|
16
|
+
email?: string | undefined;
|
|
17
|
+
user_id?: string | undefined;
|
|
18
|
+
alignment?: "left" | "right" | undefined;
|
|
19
|
+
horizontal_padding?: number | undefined;
|
|
20
|
+
vertical_padding?: number | undefined;
|
|
21
|
+
}>;
|
|
4
22
|
export type IntercomInput = RegistryScriptInput<typeof IntercomOptions>;
|
|
5
23
|
export interface IntercomApi {
|
|
6
24
|
Intercom: ((event: 'boot', data?: Input<typeof IntercomOptions>) => void) & ((event: 'shutdown') => void) & ((event: 'update', options?: Input<typeof IntercomOptions>) => void) & ((event: 'hide') => void) & ((event: 'show') => void) & ((event: 'showSpace', spaceName: 'home' | 'messages' | 'help' | 'news' | 'tasks' | 'tickets' | string) => void) & ((event: 'showMessages') => void) & ((event: 'showNewMessage', content?: string) => void) & ((event: 'onHide', fn: () => void) => void) & ((event: 'onShow', fn: () => void) => void) & ((event: 'onUnreadCountChange', fn: () => void) => void) & ((event: 'trackEvent', eventName: string, metadata?: Record<string, any>) => void) & ((event: 'getVisitorId') => Promise<string>) & ((event: 'startTour', tourId: string | number) => void) & ((event: 'showArticle', articleId: string | number) => void) & ((event: 'showNews', newsItemId: string | number) => void) & ((event: 'startSurvey', surveyId: string | number) => void) & ((event: 'startChecklist', checklistId: string | number) => void) & ((event: 'showTicket', ticketId: string | number) => void) & ((event: 'showConversation', conversationId: string | number) => void) & ((event: 'onUserEmailSupplied', fn: () => void) => void) & ((event: string, ...params: any[]) => void);
|
|
7
25
|
}
|
|
8
26
|
declare global {
|
|
9
27
|
interface Window extends IntercomApi {
|
|
10
|
-
intercomSettings?:
|
|
28
|
+
intercomSettings?: any;
|
|
11
29
|
}
|
|
12
30
|
}
|
|
13
|
-
export declare function useScriptIntercom<T extends IntercomApi>(_options?: IntercomInput):
|
|
31
|
+
export declare function useScriptIntercom<T extends IntercomApi>(_options?: IntercomInput): T & {
|
|
32
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
33
|
+
};
|
|
@@ -62,4 +62,6 @@ declare global {
|
|
|
62
62
|
LemonSqueezy: LemonSqueezyApi;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
export declare function useScriptLemonSqueezy<T extends LemonSqueezyApi>(_options?: LemonSqueezyInput):
|
|
65
|
+
export declare function useScriptLemonSqueezy<T extends LemonSqueezyApi>(_options?: LemonSqueezyInput): T & {
|
|
66
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
67
|
+
};
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
2
|
-
export declare const MatomoAnalyticsOptions:
|
|
2
|
+
export declare const MatomoAnalyticsOptions: import("valibot").ObjectSchema<{
|
|
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
|
+
}>;
|
|
3
13
|
export type MatomoAnalyticsInput = RegistryScriptInput<typeof MatomoAnalyticsOptions, false>;
|
|
4
14
|
interface MatomoAnalyticsApi {
|
|
5
15
|
_paq: unknown[];
|
|
@@ -8,5 +18,7 @@ declare global {
|
|
|
8
18
|
interface Window extends MatomoAnalyticsApi {
|
|
9
19
|
}
|
|
10
20
|
}
|
|
11
|
-
export declare function useScriptMatomoAnalytics<T extends MatomoAnalyticsApi>(_options?: MatomoAnalyticsInput):
|
|
21
|
+
export declare function useScriptMatomoAnalytics<T extends MatomoAnalyticsApi>(_options?: MatomoAnalyticsInput): T & {
|
|
22
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
23
|
+
};
|
|
12
24
|
export {};
|
|
@@ -32,7 +32,13 @@ declare global {
|
|
|
32
32
|
interface Window extends MetaPixelApi {
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
export declare const MetaPixelOptions:
|
|
35
|
+
export declare const MetaPixelOptions: import("valibot").ObjectSchema<{
|
|
36
|
+
id: import("valibot").UnionSchema<(import("valibot").StringSchema<string> | import("valibot").NumberSchema<number>)[], string | number>;
|
|
37
|
+
}, undefined, {
|
|
38
|
+
id: string | number;
|
|
39
|
+
}>;
|
|
36
40
|
export type MetaPixelInput = RegistryScriptInput<typeof MetaPixelOptions>;
|
|
37
|
-
export declare function useScriptMetaPixel<T extends MetaPixelApi>(_options?: MetaPixelInput):
|
|
41
|
+
export declare function useScriptMetaPixel<T extends MetaPixelApi>(_options?: MetaPixelInput): T & {
|
|
42
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
43
|
+
};
|
|
38
44
|
export {};
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
2
|
-
export declare const NpmOptions:
|
|
2
|
+
export declare const NpmOptions: import("valibot").ObjectSchema<{
|
|
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
|
+
}>;
|
|
3
13
|
export type NpmInput = RegistryScriptInput<typeof NpmOptions>;
|
|
4
|
-
export declare function useScriptNpm<T extends Record<string | symbol, any>>(_options: NpmInput):
|
|
14
|
+
export declare function useScriptNpm<T extends Record<string | symbol, any>>(_options: NpmInput): T & {
|
|
15
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
16
|
+
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
2
|
-
export declare const PlausibleAnalyticsOptions:
|
|
2
|
+
export declare const PlausibleAnalyticsOptions: import("valibot").ObjectSchema<{
|
|
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
|
+
}>;
|
|
3
9
|
export type PlausibleAnalyticsInput = RegistryScriptInput<typeof PlausibleAnalyticsOptions, false>;
|
|
4
10
|
export interface PlausibleAnalyticsApi {
|
|
5
11
|
plausible: ((event: '404', options: Record<string, any>) => void) & ((event: 'event', options: Record<string, any>) => void) & ((...params: any[]) => void) & {
|
|
@@ -11,4 +17,6 @@ declare global {
|
|
|
11
17
|
plausible: PlausibleAnalyticsApi;
|
|
12
18
|
}
|
|
13
19
|
}
|
|
14
|
-
export declare function useScriptPlausibleAnalytics<T extends PlausibleAnalyticsApi>(_options?: PlausibleAnalyticsInput):
|
|
20
|
+
export declare function useScriptPlausibleAnalytics<T extends PlausibleAnalyticsApi>(_options?: PlausibleAnalyticsInput): T & {
|
|
21
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
22
|
+
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
2
|
-
export declare const SegmentOptions:
|
|
2
|
+
export declare const SegmentOptions: import("valibot").ObjectSchema<{
|
|
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
|
+
}>;
|
|
3
9
|
export type SegmentInput = RegistryScriptInput<typeof SegmentOptions>;
|
|
4
10
|
interface AnalyticsApi {
|
|
5
11
|
track: (event: string, properties?: Record<string, any>) => void;
|
|
@@ -27,5 +33,7 @@ declare global {
|
|
|
27
33
|
interface Window extends SegmentApi {
|
|
28
34
|
}
|
|
29
35
|
}
|
|
30
|
-
export declare function useScriptSegment<T extends SegmentApi>(_options?: SegmentInput):
|
|
36
|
+
export declare function useScriptSegment<T extends SegmentApi>(_options?: SegmentInput): T & {
|
|
37
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
38
|
+
};
|
|
31
39
|
export {};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/// <reference types="stripe-v3" />
|
|
2
2
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
3
|
-
export declare const StripeOptions:
|
|
3
|
+
export declare const StripeOptions: import("valibot").ObjectSchema<{
|
|
4
|
+
advancedFraudSignals: import("valibot").OptionalSchema<import("valibot").BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
5
|
+
}, undefined, {
|
|
6
|
+
advancedFraudSignals?: boolean | undefined;
|
|
7
|
+
}>;
|
|
4
8
|
export type StripeInput = RegistryScriptInput<typeof StripeOptions, false>;
|
|
5
9
|
export interface StripeApi {
|
|
6
10
|
Stripe: stripe.StripeStatic;
|
|
@@ -9,4 +13,6 @@ declare global {
|
|
|
9
13
|
interface Window extends StripeApi {
|
|
10
14
|
}
|
|
11
15
|
}
|
|
12
|
-
export declare function useScriptStripe<T extends StripeApi>(_options?: StripeInput):
|
|
16
|
+
export declare function useScriptStripe<T extends StripeApi>(_options?: StripeInput): T & {
|
|
17
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
18
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type ScriptVimeoPlayer from 'vimeo__player';
|
|
2
1
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
2
|
+
type Constructor<T extends new (...args: any) => any> = T extends new (...args: infer A) => infer R ? new (...args: A) => R : never;
|
|
3
3
|
export interface VimeoPlayerApi {
|
|
4
4
|
Vimeo: {
|
|
5
|
-
Player:
|
|
5
|
+
Player: Constructor<typeof window.Vimeo>;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
8
|
export type VimeoPlayerInput = RegistryScriptInput;
|
|
@@ -10,4 +10,7 @@ declare global {
|
|
|
10
10
|
interface Window extends VimeoPlayerApi {
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
export declare function useScriptVimeoPlayer<T extends VimeoPlayerApi>(_options?: VimeoPlayerInput):
|
|
13
|
+
export declare function useScriptVimeoPlayer<T extends VimeoPlayerApi>(_options?: VimeoPlayerInput): T & {
|
|
14
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -27,7 +27,15 @@ declare global {
|
|
|
27
27
|
interface Window extends XPixelApi {
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
export declare const XPixelOptions:
|
|
30
|
+
export declare const XPixelOptions: import("valibot").ObjectSchema<{
|
|
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
|
+
}>;
|
|
31
37
|
export type XPixelInput = RegistryScriptInput<typeof XPixelOptions>;
|
|
32
|
-
export declare function useScriptXPixel<T extends XPixelApi>(_options?: XPixelInput):
|
|
38
|
+
export declare function useScriptXPixel<T extends XPixelApi>(_options?: XPixelInput): T & {
|
|
39
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
40
|
+
};
|
|
33
41
|
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="youtube" />
|
|
2
2
|
import type { RegistryScriptInput } from '#nuxt-scripts';
|
|
3
3
|
export interface YouTubePlayerApi {
|
|
4
|
-
YT: typeof YT
|
|
4
|
+
YT: typeof YT & {
|
|
5
|
+
ready: (fn: () => void) => void;
|
|
6
|
+
};
|
|
5
7
|
}
|
|
6
8
|
declare global {
|
|
7
9
|
interface Window extends YouTubePlayerApi {
|
|
@@ -9,4 +11,6 @@ declare global {
|
|
|
9
11
|
}
|
|
10
12
|
}
|
|
11
13
|
export type YouTubePlayerInput = RegistryScriptInput;
|
|
12
|
-
export declare function useScriptYouTubePlayer<T extends YouTubePlayerApi>(_options: YouTubePlayerInput):
|
|
14
|
+
export declare function useScriptYouTubePlayer<T extends YouTubePlayerApi>(_options: YouTubePlayerInput): T & {
|
|
15
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
16
|
+
};
|
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,7 @@ export type RegistryScripts = {
|
|
|
110
110
|
light: string;
|
|
111
111
|
dark: string;
|
|
112
112
|
};
|
|
113
|
-
}
|
|
113
|
+
}
|
|
114
|
+
export type ElementScriptTrigger = 'immediate' | 'visible' | keyof GlobalEventHandlersEventMap | (keyof GlobalEventHandlersEventMap)[] | false;
|
|
115
|
+
export type RegistryScripts = RegistryScript[];
|
|
114
116
|
export {};
|