@nuxt/scripts 0.4.1 → 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/dist/client/200.html +14 -14
- package/dist/client/404.html +14 -14
- 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/{yPaGq8vJ.js → BBSnVM_c.js} +3 -3
- package/dist/client/_nuxt/{C3OXR31I.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/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/{DIr-ordK.js → DKlGn9uv.js} +1 -1
- package/dist/client/_nuxt/{BE5dUAj2.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/{CnGjBSoe.js → iP9mcxdl.js} +1 -1
- package/dist/client/index.html +14 -14
- package/dist/module.json +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-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 +1 -0
- package/dist/runtime/utils.d.ts +4 -2
- package/package.json +7 -6
- package/dist/client/_nuxt/Dszwcx0o.js +0 -1
- package/dist/client/_nuxt/DtT2Dbx_.js +0 -6
- package/dist/client/_nuxt/builds/meta/d030288c-d564-4054-b340-ad07c9c6d534.json +0 -1
- package/dist/client/_nuxt/zkPAHE4u.js +0 -1
package/dist/client/index.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
3
|
<link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.D91GVkD7.css">
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BBSnVM_c.js">
|
|
5
5
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DXFkqnOI.js">
|
|
6
6
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/D6NljDpC.js">
|
|
7
7
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CowR2XfX.js">
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/Cgl53LJQ.js">
|
|
76
76
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CGmujMTu.js">
|
|
77
77
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BOpLLL-w.js">
|
|
78
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
78
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/C3qUB5O8.js">
|
|
79
79
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/B6bHXiXE.js">
|
|
80
80
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/C6Aznpr-.js">
|
|
81
81
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/ByMv4Xf1.js">
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BUpeXbsf.js">
|
|
126
126
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/C9d3aiqh.js">
|
|
127
127
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/Dble9ECP.js">
|
|
128
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
128
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DKlGn9uv.js">
|
|
129
129
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/o5b8QYQO.js">
|
|
130
130
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/Db2-y2xY.js">
|
|
131
131
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/Dg0DGYq4.js">
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DBxHOdLe.js">
|
|
143
143
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DR5YgmI2.js">
|
|
144
144
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/YdT6Gj0u.js">
|
|
145
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
145
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/B7rNE5kf.js">
|
|
146
146
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CrgTADc5.js">
|
|
147
147
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BWKJ1FCf.js">
|
|
148
148
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/B6ZnTe72.js">
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DBeuZS66.js">
|
|
188
188
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DnLUQrgA.js">
|
|
189
189
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BacI6-DX.js">
|
|
190
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
190
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/Bx89rGXK.js">
|
|
191
191
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/I4qd5QHW.js">
|
|
192
192
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/C2TBxDwV.js">
|
|
193
193
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CO5hpdkB.js">
|
|
@@ -195,8 +195,8 @@
|
|
|
195
195
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/DVfdqzEq.js">
|
|
196
196
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/QZ3jNtnE.js">
|
|
197
197
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BLluXI4E.js">
|
|
198
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
199
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
198
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BcF9sHHc.js">
|
|
199
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/B4ACM-c0.js">
|
|
200
200
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/o-cPXEvd.js">
|
|
201
201
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/Cicx_DS6.js">
|
|
202
202
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/D3VXSfF0.js">
|
|
@@ -249,14 +249,14 @@
|
|
|
249
249
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BBDuFDsq.js">
|
|
250
250
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/eJfcURhx.js">
|
|
251
251
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BSB_bK09.js">
|
|
252
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
253
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
254
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
252
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/B3g-KkBK.js">
|
|
253
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/Bxkoe-BC.js">
|
|
254
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/Br6ll-O0.js">
|
|
255
255
|
<link rel="prefetch" as="style" href="/__nuxt-scripts/_nuxt/error-404.BRldFSII.css">
|
|
256
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
257
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
256
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/PGJIGHGk.js">
|
|
257
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/BJEDUQYt.js">
|
|
258
258
|
<link rel="prefetch" as="style" href="/__nuxt-scripts/_nuxt/error-500.D8yw_IbC.css">
|
|
259
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/
|
|
260
|
-
<script type="module" src="/__nuxt-scripts/_nuxt/
|
|
259
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-scripts/_nuxt/iP9mcxdl.js">
|
|
260
|
+
<script type="module" src="/__nuxt-scripts/_nuxt/BBSnVM_c.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,c=window.localStorage,d=["dark","light"],n=c&&c.getItem&&c.getItem("nuxt-color-mode")||"system";let l=n==="system"?f():n;const i=e.getAttribute("data-color-mode-forced");i&&(l=i),r(l),a["__NUXT_COLOR_MODE__"]={preference:n,value:l,getColorScheme:f,addColorScheme:r,removeColorScheme:u};function r(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function u(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function m(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&m("").media!=="not all"){for(const o of d)if(m(":"+o).matches)return o}return"light"}})();
|
|
261
261
|
</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4,"once":5},{},false,{},{},["Set"]]</script>
|
|
262
262
|
<script>window.__NUXT__={};window.__NUXT__.config={public:{"nuxt-scripts":{defaultScriptOptions:{trigger:"onNuxtReady"}}},app:{baseURL:"/__nuxt-scripts",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from 'vue'
|
|
14
14
|
import { type QueryObject, withQuery } from 'ufo'
|
|
15
15
|
import { defu } from 'defu'
|
|
16
|
-
import type { ElementScriptTrigger } from '../
|
|
16
|
+
import type { ElementScriptTrigger } from '../types'
|
|
17
17
|
import { scriptRuntimeConfig } from '../utils'
|
|
18
18
|
import { resolveComponent, useElementScriptTrigger, useHead, useScriptGoogleMaps } from '#imports'
|
|
19
19
|
|
|
@@ -144,7 +144,7 @@ onMounted(() => {
|
|
|
144
144
|
})
|
|
145
145
|
// create the map
|
|
146
146
|
$script.then(async (instance) => {
|
|
147
|
-
const maps = await instance.maps
|
|
147
|
+
const maps = await instance.maps
|
|
148
148
|
const _map = new maps.Map(mapEl.value!, options.value)
|
|
149
149
|
const placesService = new maps.places.PlacesService(_map)
|
|
150
150
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import {
|
|
2
|
+
import type { ElementScriptTrigger } from '../types'
|
|
3
|
+
import { onMounted, ref, useElementScriptTrigger, useScriptLemonSqueezy } from '#imports'
|
|
3
4
|
|
|
4
5
|
const props = withDefaults(defineProps<{
|
|
5
6
|
trigger?: ElementScriptTrigger
|
|
@@ -19,10 +20,8 @@ const { $script } = useScriptLemonSqueezy({
|
|
|
19
20
|
},
|
|
20
21
|
})
|
|
21
22
|
onMounted(() => {
|
|
22
|
-
// @ts-expect-error untyped
|
|
23
23
|
$script.then(({ Setup }) => {
|
|
24
24
|
Setup({
|
|
25
|
-
// @ts-expect-error untyped
|
|
26
25
|
eventHandler(event) {
|
|
27
26
|
emits('event', event)
|
|
28
27
|
},
|
|
@@ -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
|
+
};
|