@nuxt/scripts 1.0.0-beta.3 → 1.0.0-beta.31

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.
Files changed (217) hide show
  1. package/README.md +3 -3
  2. package/dist/client/200.html +1 -1
  3. package/dist/client/404.html +1 -1
  4. package/dist/client/_nuxt/{DdVDSbUA.js → 6CwTUC2b.js} +1 -1
  5. package/dist/client/_nuxt/{CD5B-xvT.js → B71AlSZ1.js} +1 -1
  6. package/dist/client/_nuxt/{Ds2G8aQM.js → BYGJV5dd.js} +1 -1
  7. package/dist/client/_nuxt/V4W-T8W6.js +162 -0
  8. package/dist/client/_nuxt/builds/latest.json +1 -1
  9. package/dist/client/_nuxt/builds/meta/70b59a3e-a025-4a77-a25a-dfadf5b1749d.json +1 -0
  10. package/dist/client/_nuxt/entry.C5SUNdim.css +1 -0
  11. package/dist/client/_nuxt/error-404.1K8v8Su2.css +1 -0
  12. package/dist/client/_nuxt/error-500.B9qvKpQm.css +1 -0
  13. package/dist/client/index.html +1 -1
  14. package/dist/module.d.mts +6 -18
  15. package/dist/module.d.ts +164 -0
  16. package/dist/module.json +1 -1
  17. package/dist/module.mjs +908 -645
  18. package/dist/registry.d.ts +6 -0
  19. package/dist/registry.mjs +244 -78
  20. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +16 -9
  21. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +57 -30
  22. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +16 -9
  23. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.d.vue.ts +22 -39
  24. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue +69 -72
  25. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsAdvancedMarkerElement.vue.d.ts +22 -39
  26. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.d.vue.ts +5 -1
  27. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.vue +25 -38
  28. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsCircle.vue.d.ts +5 -1
  29. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsGeoJson.d.vue.ts +43 -0
  30. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsGeoJson.vue +61 -0
  31. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsGeoJson.vue.d.ts +43 -0
  32. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.d.vue.ts +4 -0
  33. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.vue +22 -26
  34. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsHeatmapLayer.vue.d.ts +4 -0
  35. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.d.vue.ts +9 -5
  36. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue +62 -53
  37. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsInfoWindow.vue.d.ts +9 -5
  38. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.d.vue.ts +26 -11
  39. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue +48 -45
  40. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarker.vue.d.ts +26 -11
  41. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.d.vue.ts +15 -4
  42. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue +47 -37
  43. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue.d.ts +15 -4
  44. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.d.vue.ts +77 -0
  45. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue +209 -0
  46. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue.d.ts +77 -0
  47. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.d.vue.ts +4 -0
  48. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue +23 -32
  49. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue.d.ts +4 -0
  50. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.d.vue.ts +7 -3
  51. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.vue +24 -38
  52. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolygon.vue.d.ts +7 -3
  53. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.d.vue.ts +7 -3
  54. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.vue +24 -38
  55. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsPolyline.vue.d.ts +7 -3
  56. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.d.vue.ts +7 -3
  57. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.vue +25 -38
  58. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsRectangle.vue.d.ts +7 -3
  59. package/dist/runtime/components/GoogleMaps/bindGoogleMapsEvents.d.ts +13 -0
  60. package/dist/runtime/components/GoogleMaps/bindGoogleMapsEvents.js +8 -0
  61. package/dist/runtime/components/GoogleMaps/injectionKeys.d.ts +13 -0
  62. package/dist/runtime/components/GoogleMaps/injectionKeys.js +3 -0
  63. package/dist/runtime/components/GoogleMaps/useGoogleMapsResource.d.ts +26 -0
  64. package/dist/runtime/components/GoogleMaps/useGoogleMapsResource.js +42 -0
  65. package/dist/runtime/components/ScriptBlueskyEmbed.d.vue.ts +87 -0
  66. package/dist/runtime/components/ScriptBlueskyEmbed.vue +85 -0
  67. package/dist/runtime/components/ScriptBlueskyEmbed.vue.d.ts +87 -0
  68. package/dist/runtime/components/ScriptCrisp.vue +1 -1
  69. package/dist/runtime/components/ScriptGoogleAdsense.vue +1 -1
  70. package/dist/runtime/components/ScriptGravatar.d.vue.ts +22 -0
  71. package/dist/runtime/components/ScriptGravatar.vue +46 -0
  72. package/dist/runtime/components/ScriptGravatar.vue.d.ts +22 -0
  73. package/dist/runtime/components/ScriptInstagramEmbed.d.vue.ts +2 -2
  74. package/dist/runtime/components/ScriptInstagramEmbed.vue +5 -2
  75. package/dist/runtime/components/ScriptInstagramEmbed.vue.d.ts +2 -2
  76. package/dist/runtime/components/ScriptIntercom.vue +4 -3
  77. package/dist/runtime/components/ScriptPayPalButtons.d.vue.ts +43 -32
  78. package/dist/runtime/components/ScriptPayPalButtons.vue +48 -79
  79. package/dist/runtime/components/ScriptPayPalButtons.vue.d.ts +43 -32
  80. package/dist/runtime/components/ScriptPayPalMessages.d.vue.ts +37 -23
  81. package/dist/runtime/components/ScriptPayPalMessages.vue +46 -50
  82. package/dist/runtime/components/ScriptPayPalMessages.vue.d.ts +37 -23
  83. package/dist/runtime/components/ScriptStripePricingTable.vue +2 -2
  84. package/dist/runtime/components/ScriptVimeoPlayer.d.vue.ts +9 -0
  85. package/dist/runtime/components/ScriptVimeoPlayer.vue +13 -10
  86. package/dist/runtime/components/ScriptVimeoPlayer.vue.d.ts +9 -0
  87. package/dist/runtime/components/ScriptXEmbed.d.vue.ts +2 -2
  88. package/dist/runtime/components/ScriptXEmbed.vue +6 -3
  89. package/dist/runtime/components/ScriptXEmbed.vue.d.ts +2 -2
  90. package/dist/runtime/components/ScriptYouTubePlayer.d.vue.ts +2 -2
  91. package/dist/runtime/components/ScriptYouTubePlayer.vue +11 -5
  92. package/dist/runtime/components/ScriptYouTubePlayer.vue.d.ts +2 -2
  93. package/dist/runtime/composables/useScript.js +13 -6
  94. package/dist/runtime/composables/useScriptEventPage.js +2 -2
  95. package/dist/runtime/composables/useScriptTriggerConsent.d.ts +10 -0
  96. package/dist/runtime/composables/useScriptTriggerConsent.js +33 -20
  97. package/dist/runtime/composables/useScriptTriggerElement.js +1 -1
  98. package/dist/runtime/composables/useScriptTriggerIdleTimeout.js +1 -1
  99. package/dist/runtime/registry/bing-uet.d.ts +20 -0
  100. package/dist/runtime/registry/bing-uet.js +29 -0
  101. package/dist/runtime/registry/bluesky-embed.d.ts +116 -0
  102. package/dist/runtime/registry/bluesky-embed.js +72 -0
  103. package/dist/runtime/registry/clarity.d.ts +10 -15
  104. package/dist/runtime/registry/clarity.js +22 -31
  105. package/dist/runtime/registry/cloudflare-web-analytics.d.ts +2 -13
  106. package/dist/runtime/registry/cloudflare-web-analytics.js +2 -14
  107. package/dist/runtime/registry/crisp.d.ts +10 -40
  108. package/dist/runtime/registry/crisp.js +2 -33
  109. package/dist/runtime/registry/databuddy-analytics.d.ts +2 -35
  110. package/dist/runtime/registry/databuddy-analytics.js +20 -45
  111. package/dist/runtime/registry/fathom-analytics.d.ts +7 -26
  112. package/dist/runtime/registry/fathom-analytics.js +2 -24
  113. package/dist/runtime/registry/google-adsense.d.ts +3 -11
  114. package/dist/runtime/registry/google-adsense.js +2 -11
  115. package/dist/runtime/registry/google-analytics.d.ts +3 -5
  116. package/dist/runtime/registry/google-analytics.js +3 -8
  117. package/dist/runtime/registry/google-maps.d.ts +3 -9
  118. package/dist/runtime/registry/google-maps.js +2 -8
  119. package/dist/runtime/registry/google-recaptcha.d.ts +2 -6
  120. package/dist/runtime/registry/google-recaptcha.js +4 -12
  121. package/dist/runtime/registry/google-sign-in.d.ts +2 -13
  122. package/dist/runtime/registry/google-sign-in.js +2 -22
  123. package/dist/runtime/registry/google-tag-manager.d.ts +3 -28
  124. package/dist/runtime/registry/google-tag-manager.js +4 -27
  125. package/dist/runtime/registry/gravatar.d.ts +26 -0
  126. package/dist/runtime/registry/gravatar.js +33 -0
  127. package/dist/runtime/registry/hotjar.d.ts +4 -6
  128. package/dist/runtime/registry/hotjar.js +2 -5
  129. package/dist/runtime/registry/instagram-embed.d.ts +3 -18
  130. package/dist/runtime/registry/instagram-embed.js +4 -19
  131. package/dist/runtime/registry/intercom.d.ts +4 -12
  132. package/dist/runtime/registry/intercom.js +2 -12
  133. package/dist/runtime/registry/matomo-analytics.d.ts +3 -12
  134. package/dist/runtime/registry/matomo-analytics.js +3 -12
  135. package/dist/runtime/registry/meta-pixel.d.ts +4 -6
  136. package/dist/runtime/registry/meta-pixel.js +2 -4
  137. package/dist/runtime/registry/mixpanel-analytics.d.ts +22 -0
  138. package/dist/runtime/registry/mixpanel-analytics.js +46 -0
  139. package/dist/runtime/registry/npm.d.ts +3 -7
  140. package/dist/runtime/registry/npm.js +2 -9
  141. package/dist/runtime/registry/paypal.d.ts +4 -25
  142. package/dist/runtime/registry/paypal.js +3 -66
  143. package/dist/runtime/registry/plausible-analytics.js +18 -13
  144. package/dist/runtime/registry/posthog.d.ts +10 -12
  145. package/dist/runtime/registry/posthog.js +7 -14
  146. package/dist/runtime/registry/reddit-pixel.d.ts +5 -6
  147. package/dist/runtime/registry/reddit-pixel.js +2 -4
  148. package/dist/runtime/registry/rybbit-analytics.d.ts +2 -14
  149. package/dist/runtime/registry/rybbit-analytics.js +10 -20
  150. package/dist/runtime/registry/schemas.d.ts +982 -0
  151. package/dist/runtime/registry/schemas.js +937 -0
  152. package/dist/runtime/registry/segment.d.ts +2 -5
  153. package/dist/runtime/registry/segment.js +2 -5
  154. package/dist/runtime/registry/snapchat-pixel.d.ts +4 -33
  155. package/dist/runtime/registry/snapchat-pixel.js +2 -20
  156. package/dist/runtime/registry/stripe.d.ts +3 -4
  157. package/dist/runtime/registry/stripe.js +2 -4
  158. package/dist/runtime/registry/tiktok-pixel.d.ts +4 -7
  159. package/dist/runtime/registry/tiktok-pixel.js +2 -6
  160. package/dist/runtime/registry/umami-analytics.d.ts +2 -31
  161. package/dist/runtime/registry/umami-analytics.js +2 -36
  162. package/dist/runtime/registry/vercel-analytics.d.ts +29 -0
  163. package/dist/runtime/registry/vercel-analytics.js +84 -0
  164. package/dist/runtime/registry/vimeo-player.d.ts +2 -2
  165. package/dist/runtime/registry/vimeo-player.js +1 -1
  166. package/dist/runtime/registry/x-embed.d.ts +3 -17
  167. package/dist/runtime/registry/x-embed.js +3 -18
  168. package/dist/runtime/registry/x-pixel.d.ts +4 -7
  169. package/dist/runtime/registry/x-pixel.js +2 -5
  170. package/dist/runtime/registry/youtube-player.d.ts +7 -7
  171. package/dist/runtime/registry/youtube-player.js +1 -1
  172. package/dist/runtime/server/{sw-handler.d.ts → bluesky-embed-image.d.ts} +1 -1
  173. package/dist/runtime/server/bluesky-embed-image.js +7 -0
  174. package/dist/runtime/server/bluesky-embed.d.ts +16 -0
  175. package/dist/runtime/server/bluesky-embed.js +59 -0
  176. package/dist/runtime/server/google-maps-geocode-proxy.d.ts +2 -0
  177. package/dist/runtime/server/google-maps-geocode-proxy.js +34 -0
  178. package/dist/runtime/server/google-static-maps-proxy.js +2 -13
  179. package/dist/runtime/server/gravatar-proxy.d.ts +2 -0
  180. package/dist/runtime/server/gravatar-proxy.js +46 -0
  181. package/dist/runtime/server/instagram-embed-asset.js +8 -41
  182. package/dist/runtime/server/instagram-embed-image.js +6 -53
  183. package/dist/runtime/server/instagram-embed.d.ts +16 -0
  184. package/dist/runtime/server/instagram-embed.js +173 -35
  185. package/dist/runtime/server/proxy-handler.js +144 -113
  186. package/dist/runtime/server/utils/image-proxy.d.ts +12 -0
  187. package/dist/runtime/server/utils/image-proxy.js +70 -0
  188. package/dist/runtime/server/utils/privacy.d.ts +1 -2
  189. package/dist/runtime/server/utils/privacy.js +54 -34
  190. package/dist/runtime/server/x-embed-image.js +5 -49
  191. package/dist/runtime/server/x-embed.js +3 -2
  192. package/dist/runtime/types.d.ts +74 -40
  193. package/dist/runtime/utils/pure.d.ts +1 -5
  194. package/dist/runtime/utils/pure.js +0 -67
  195. package/dist/runtime/utils.d.ts +4 -3
  196. package/dist/runtime/utils.js +24 -10
  197. package/dist/shared/scripts.D7e2ENu6.mjs +211 -0
  198. package/dist/stats.d.mts +202 -0
  199. package/dist/stats.d.ts +202 -0
  200. package/dist/stats.mjs +3860 -0
  201. package/dist/types-source.d.mts +17 -0
  202. package/dist/types-source.d.ts +17 -0
  203. package/dist/types-source.mjs +3614 -0
  204. package/package.json +52 -38
  205. package/dist/client/_nuxt/D-kOnTuH.js +0 -162
  206. package/dist/client/_nuxt/builds/meta/f1474569-6922-450d-bc3f-4fd5f3e1391a.json +0 -1
  207. package/dist/client/_nuxt/entry.D45OuV0w.css +0 -1
  208. package/dist/client/_nuxt/error-404.B57D-jUQ.css +0 -1
  209. package/dist/client/_nuxt/error-500.DTHUW7BI.css +0 -1
  210. package/dist/runtime/components/ScriptPayPalMarks.d.vue.ts +0 -52
  211. package/dist/runtime/components/ScriptPayPalMarks.vue +0 -69
  212. package/dist/runtime/components/ScriptPayPalMarks.vue.d.ts +0 -52
  213. package/dist/runtime/plugins/sw-register.client.d.ts +0 -2
  214. package/dist/runtime/plugins/sw-register.client.js +0 -12
  215. package/dist/runtime/server/sw-handler.js +0 -25
  216. package/dist/runtime/sw/proxy-sw.template.d.ts +0 -1
  217. package/dist/runtime/sw/proxy-sw.template.js +0 -54
@@ -0,0 +1,937 @@
1
+ import { any, array, boolean, custom, literal, minLength, number, object, optional, pipe, record, string, union } from "#nuxt-scripts-validator";
2
+ export const BlueskyEmbedOptions = object({
3
+ /**
4
+ * The Bluesky post URL to embed.
5
+ * @example 'https://bsky.app/profile/bsky.app/post/3mgnwwvj3u22a'
6
+ */
7
+ postUrl: string(),
8
+ /**
9
+ * Custom API endpoint for fetching post data.
10
+ * @default '/_scripts/embed/bluesky'
11
+ */
12
+ apiEndpoint: optional(string()),
13
+ /**
14
+ * Custom image proxy endpoint.
15
+ * @default '/_scripts/embed/bluesky-image'
16
+ */
17
+ imageProxyEndpoint: optional(string())
18
+ });
19
+ export const ClarityOptions = object({
20
+ /**
21
+ * The Clarity token.
22
+ * @see https://learn.microsoft.com/en-us/clarity/setup-clarity
23
+ */
24
+ id: pipe(string(), minLength(10))
25
+ });
26
+ export const CloudflareWebAnalyticsOptions = object({
27
+ /**
28
+ * The Cloudflare Web Analytics token.
29
+ * @see https://developers.cloudflare.com/analytics/web-analytics/get-started/
30
+ */
31
+ token: pipe(string(), minLength(32)),
32
+ /**
33
+ * Cloudflare Web Analytics enables measuring SPAs automatically by overriding the History API's pushState function
34
+ * and listening to the onpopstate. Hash-based router is not supported.
35
+ *
36
+ * @default true
37
+ * @see https://developers.cloudflare.com/analytics/web-analytics/get-started/#spa-tracking
38
+ */
39
+ spa: optional(boolean())
40
+ });
41
+ export const CrispOptions = object({
42
+ /**
43
+ * The Crisp ID.
44
+ */
45
+ id: string(),
46
+ /**
47
+ * Extra configuration options. Used to configure the locale.
48
+ * Same as CRISP_RUNTIME_CONFIG.
49
+ * @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/language-customization/
50
+ */
51
+ runtimeConfig: optional(object({
52
+ locale: optional(string())
53
+ })),
54
+ /**
55
+ * Associated a session, equivalent to using CRISP_TOKEN_ID variable.
56
+ * Same as CRISP_TOKEN_ID.
57
+ * @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/session-continuity/
58
+ */
59
+ tokenId: optional(string()),
60
+ /**
61
+ * Restrict the domain that the Crisp cookie is set on.
62
+ * Same as CRISP_COOKIE_DOMAIN.
63
+ * @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/cookie-policies/
64
+ */
65
+ cookieDomain: optional(string()),
66
+ /**
67
+ * The cookie expiry in seconds.
68
+ * Same as CRISP_COOKIE_EXPIRATION.
69
+ * @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/cookie-policies/#change-cookie-expiration-date
70
+ */
71
+ cookieExpiry: optional(number())
72
+ });
73
+ export const DatabuddyAnalyticsOptions = object({
74
+ /**
75
+ * Your Databuddy client ID.
76
+ */
77
+ clientId: string(),
78
+ /**
79
+ * Custom script URL for the Databuddy SDK.
80
+ * @default 'https://cdn.databuddy.cc/databuddy.js'
81
+ */
82
+ scriptUrl: optional(string()),
83
+ /**
84
+ * Custom API URL for sending analytics data.
85
+ * @default 'https://basket.databuddy.cc'
86
+ */
87
+ apiUrl: optional(string()),
88
+ /**
89
+ * Disable all tracking when set to `true`.
90
+ */
91
+ disabled: optional(boolean()),
92
+ /**
93
+ * Track screen/page views automatically.
94
+ * @default true
95
+ * @see https://www.databuddy.cc/docs/sdk#track-screen-views
96
+ */
97
+ trackScreenViews: optional(boolean()),
98
+ /**
99
+ * Track page performance metrics.
100
+ * @default true
101
+ * @see https://www.databuddy.cc/docs/sdk#track-performance
102
+ */
103
+ trackPerformance: optional(boolean()),
104
+ /**
105
+ * Track user sessions.
106
+ * @default true
107
+ * @see https://www.databuddy.cc/docs/sdk#track-sessions
108
+ */
109
+ trackSessions: optional(boolean()),
110
+ /**
111
+ * Track Web Vitals (LCP, FID, CLS, etc.).
112
+ */
113
+ trackWebVitals: optional(boolean()),
114
+ /**
115
+ * Track JavaScript errors.
116
+ */
117
+ trackErrors: optional(boolean()),
118
+ /**
119
+ * Track outgoing link clicks.
120
+ */
121
+ trackOutgoingLinks: optional(boolean()),
122
+ /**
123
+ * Track scroll depth.
124
+ */
125
+ trackScrollDepth: optional(boolean()),
126
+ /**
127
+ * Track user engagement time.
128
+ */
129
+ trackEngagement: optional(boolean()),
130
+ /**
131
+ * Track user interactions (clicks, form submissions, etc.).
132
+ */
133
+ trackInteractions: optional(boolean()),
134
+ /**
135
+ * Track element attributes for detailed interaction context.
136
+ */
137
+ trackAttributes: optional(boolean()),
138
+ /**
139
+ * Track hash changes in the URL.
140
+ */
141
+ trackHashChanges: optional(boolean()),
142
+ /**
143
+ * Track exit intent behavior.
144
+ */
145
+ trackExitIntent: optional(boolean()),
146
+ /**
147
+ * Track bounce rate metrics.
148
+ */
149
+ trackBounceRate: optional(boolean()),
150
+ /**
151
+ * Enable event batching for better performance.
152
+ */
153
+ enableBatching: optional(boolean()),
154
+ /**
155
+ * Maximum number of events per batch.
156
+ */
157
+ batchSize: optional(number()),
158
+ /**
159
+ * Timeout (in ms) before flushing a batch.
160
+ */
161
+ batchTimeout: optional(number()),
162
+ /**
163
+ * Enable automatic retries for failed requests.
164
+ */
165
+ enableRetries: optional(boolean()),
166
+ /**
167
+ * Maximum number of retry attempts.
168
+ */
169
+ maxRetries: optional(number()),
170
+ /**
171
+ * Initial delay (in ms) before the first retry.
172
+ */
173
+ initialRetryDelay: optional(number()),
174
+ /**
175
+ * Sampling rate (0 to 1). Set to `0.5` to track ~50% of sessions.
176
+ */
177
+ samplingRate: optional(number()),
178
+ /**
179
+ * Custom SDK identifier.
180
+ */
181
+ sdk: optional(string()),
182
+ /**
183
+ * Custom SDK version string.
184
+ */
185
+ sdkVersion: optional(string()),
186
+ /**
187
+ * Enable observability/monitoring features.
188
+ */
189
+ enableObservability: optional(boolean()),
190
+ /**
191
+ * The service name for observability reporting.
192
+ */
193
+ observabilityService: optional(string()),
194
+ /**
195
+ * The environment name for observability (e.g., `'production'`, `'staging'`).
196
+ */
197
+ observabilityEnvironment: optional(string()),
198
+ /**
199
+ * The version string for observability reporting.
200
+ */
201
+ observabilityVersion: optional(string()),
202
+ /**
203
+ * Enable console logging for debugging.
204
+ */
205
+ enableLogging: optional(boolean()),
206
+ /**
207
+ * Enable request tracing.
208
+ */
209
+ enableTracing: optional(boolean()),
210
+ /**
211
+ * Enable error tracking via observability.
212
+ */
213
+ enableErrorTracking: optional(boolean())
214
+ });
215
+ export const FathomAnalyticsOptions = object({
216
+ /**
217
+ * The Fathom Analytics site ID.
218
+ * @see https://usefathom.com/docs/script/script-settings
219
+ */
220
+ site: string(),
221
+ /**
222
+ * The Fathom Analytics tracking mode.
223
+ * @default 'auto'
224
+ */
225
+ spa: optional(union([literal("auto"), literal("history"), literal("hash")])),
226
+ /**
227
+ * Automatically track page views.
228
+ * @default true
229
+ */
230
+ auto: optional(boolean()),
231
+ /**
232
+ * Enable canonical URL tracking.
233
+ * @default true
234
+ */
235
+ canonical: optional(boolean()),
236
+ /**
237
+ * Honor Do Not Track requests.
238
+ * @default false
239
+ */
240
+ honorDnt: optional(boolean())
241
+ });
242
+ export const GoogleAdsenseOptions = object({
243
+ /**
244
+ * The Google Adsense ID.
245
+ * @example 'ca-pub-XXXXXXXXXXXXXXXX'
246
+ */
247
+ client: optional(string()),
248
+ /**
249
+ * Enable or disable Auto Ads.
250
+ * @default false
251
+ * @see https://support.google.com/adsense/answer/9261805
252
+ */
253
+ autoAds: optional(boolean())
254
+ });
255
+ export const GoogleAnalyticsOptions = object({
256
+ /**
257
+ * The GA4 measurement ID.
258
+ * @example 'G-XXXXXXXX'
259
+ * @see https://developers.google.com/analytics/devguides/collection/gtagjs
260
+ */
261
+ id: optional(string()),
262
+ /**
263
+ * Global name for the dataLayer variable.
264
+ * @default 'dataLayer'
265
+ * @see https://developers.google.com/analytics/devguides/collection/gtagjs/setting-up-gtag#rename_the_data_layer
266
+ */
267
+ l: optional(string())
268
+ });
269
+ export const GoogleMapsOptions = object({
270
+ /**
271
+ * Your Google Maps API key.
272
+ */
273
+ apiKey: string(),
274
+ /**
275
+ * The Google Maps libraries to load.
276
+ * @default ['places']
277
+ * @see https://developers.google.com/maps/documentation/javascript/libraries
278
+ */
279
+ libraries: optional(array(string())),
280
+ /**
281
+ * The language code for the map UI and geocoding results.
282
+ * @see https://developers.google.com/maps/faq#languagesupport
283
+ */
284
+ language: optional(string()),
285
+ /**
286
+ * The region code to bias geocoding results.
287
+ * @see https://developers.google.com/maps/documentation/javascript/localization#Region
288
+ */
289
+ region: optional(string()),
290
+ /**
291
+ * The Google Maps JS API version to load.
292
+ * @default 'weekly'
293
+ * @see https://developers.google.com/maps/documentation/javascript/versions
294
+ */
295
+ v: optional(union([literal("weekly"), literal("quarterly"), literal("beta"), literal("alpha"), string()]))
296
+ });
297
+ export const GoogleRecaptchaOptions = object({
298
+ /**
299
+ * Your reCAPTCHA site key.
300
+ * @see https://developers.google.com/recaptcha/docs/display#render_param
301
+ */
302
+ siteKey: string(),
303
+ /**
304
+ * Use the Enterprise version of reCAPTCHA (enterprise.js instead of api.js).
305
+ * @see https://cloud.google.com/recaptcha-enterprise/docs/introduction
306
+ */
307
+ enterprise: optional(boolean()),
308
+ /**
309
+ * Use recaptcha.net instead of google.com domain. Useful for regions where google.com is blocked.
310
+ */
311
+ recaptchaNet: optional(boolean()),
312
+ /**
313
+ * Language code for the reCAPTCHA widget.
314
+ * @see https://developers.google.com/recaptcha/docs/language
315
+ */
316
+ hl: optional(string())
317
+ });
318
+ export const GoogleSignInOptions = object({
319
+ /**
320
+ * Your Google API client ID.
321
+ * @example 'XXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.apps.googleusercontent.com'
322
+ * @see https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid
323
+ */
324
+ clientId: string(),
325
+ /**
326
+ * Auto-select credentials when only one Google account is available.
327
+ * @see https://developers.google.com/identity/gsi/web/reference/js-reference#auto_select
328
+ */
329
+ autoSelect: optional(boolean()),
330
+ /**
331
+ * The context text for the One Tap prompt.
332
+ * @see https://developers.google.com/identity/gsi/web/reference/js-reference#context
333
+ */
334
+ context: optional(union([literal("signin"), literal("signup"), literal("use")])),
335
+ /**
336
+ * Enable FedCM (Federated Credential Management) API support. Mandatory from August 2025.
337
+ * @see https://developers.google.com/identity/gsi/web/guides/fedcm-migration
338
+ */
339
+ useFedcmForPrompt: optional(boolean()),
340
+ /**
341
+ * Cancel the One Tap prompt if the user clicks outside.
342
+ * @default true
343
+ * @see https://developers.google.com/identity/gsi/web/reference/js-reference#cancel_on_tap_outside
344
+ */
345
+ cancelOnTapOutside: optional(boolean()),
346
+ /**
347
+ * The UX mode for the sign-in flow.
348
+ * @see https://developers.google.com/identity/gsi/web/reference/js-reference#ux_mode
349
+ */
350
+ uxMode: optional(union([literal("popup"), literal("redirect")])),
351
+ /**
352
+ * The URI to redirect to after sign-in when using redirect UX mode.
353
+ * @see https://developers.google.com/identity/gsi/web/reference/js-reference#login_uri
354
+ */
355
+ loginUri: optional(string()),
356
+ /**
357
+ * Enable Intelligent Tracking Prevention (ITP) support for Safari.
358
+ * @see https://developers.google.com/identity/gsi/web/reference/js-reference#itp_support
359
+ */
360
+ itpSupport: optional(boolean()),
361
+ /**
362
+ * Allowed parent origin(s) for iframe embedding.
363
+ * @see https://developers.google.com/identity/gsi/web/reference/js-reference#allowed_parent_origin
364
+ */
365
+ allowedParentOrigin: optional(union([string(), array(string())])),
366
+ /**
367
+ * Restrict sign-in to a specific Google Workspace hosted domain.
368
+ * @example 'example.com'
369
+ * @see https://developers.google.com/identity/gsi/web/reference/js-reference#hd
370
+ */
371
+ hd: optional(string())
372
+ });
373
+ export const GoogleTagManagerOptions = object({
374
+ /**
375
+ * GTM container ID (format: GTM-XXXXXX)
376
+ * @see https://developers.google.com/tag-platform/tag-manager/web#install-the-container
377
+ */
378
+ id: string(),
379
+ /**
380
+ * Optional dataLayer variable name
381
+ * @default 'dataLayer'
382
+ * @see https://developers.google.com/tag-platform/tag-manager/web/datalayer#rename_the_data_layer
383
+ */
384
+ l: optional(string()),
385
+ /**
386
+ * Authentication token for environment-specific container versions
387
+ * @see https://support.google.com/tagmanager/answer/6328337
388
+ */
389
+ auth: optional(string()),
390
+ /**
391
+ * Preview environment name
392
+ * @see https://support.google.com/tagmanager/answer/6328337
393
+ */
394
+ preview: optional(string()),
395
+ /** Forces GTM cookies to take precedence when true */
396
+ cookiesWin: optional(union([boolean(), literal("x")])),
397
+ /**
398
+ * Enables debug mode when true
399
+ * @see https://support.google.com/tagmanager/answer/6107056
400
+ */
401
+ debug: optional(union([boolean(), literal("x")])),
402
+ /**
403
+ * No Personal Advertising - disables advertising features when true
404
+ * @see https://developers.google.com/tag-platform/tag-manager/templates/consent-apis
405
+ */
406
+ npa: optional(union([boolean(), literal("1")])),
407
+ /** Custom dataLayer name (alternative to "l" property) */
408
+ dataLayer: optional(string()),
409
+ /**
410
+ * Environment name for environment-specific container
411
+ * @see https://support.google.com/tagmanager/answer/6328337
412
+ */
413
+ envName: optional(string()),
414
+ /** Referrer policy for analytics requests */
415
+ authReferrerPolicy: optional(string()),
416
+ /**
417
+ * Default consent settings for GTM
418
+ * @see https://developers.google.com/tag-platform/tag-manager/templates/consent-apis
419
+ */
420
+ defaultConsent: optional(record(string(), union([string(), number()])))
421
+ });
422
+ export const HotjarOptions = object({
423
+ /**
424
+ * Your Hotjar Site ID.
425
+ * @see https://help.hotjar.com/hc/en-us/articles/115012039247-Hotjar-Tracking-Code
426
+ */
427
+ id: number(),
428
+ /**
429
+ * The Hotjar snippet version.
430
+ * @default 6
431
+ */
432
+ sv: optional(number())
433
+ });
434
+ export const InstagramEmbedOptions = object({
435
+ /**
436
+ * The Instagram post URL to embed.
437
+ * @example 'https://www.instagram.com/p/C_XXXXXXXXX/'
438
+ * @see https://developers.facebook.com/docs/instagram/oembed/
439
+ */
440
+ postUrl: string(),
441
+ /**
442
+ * Whether to include captions in the embed.
443
+ * @default true
444
+ */
445
+ captions: optional(boolean()),
446
+ /**
447
+ * Custom API endpoint for fetching embed HTML.
448
+ * @default '/_scripts/embed/instagram'
449
+ */
450
+ apiEndpoint: optional(string())
451
+ });
452
+ export const IntercomOptions = object({
453
+ /**
454
+ * Your Intercom app ID.
455
+ * @see https://developers.intercom.com/installing-intercom/docs/javascript-api-attributes-objects
456
+ */
457
+ app_id: string(),
458
+ /**
459
+ * The regional API base URL. Choose based on your Intercom data hosting region.
460
+ */
461
+ api_base: optional(union([literal("https://api-iam.intercom.io"), literal("https://api-iam.eu.intercom.io"), literal("https://api-iam.au.intercom.io")])),
462
+ /**
463
+ * The name of the logged-in user.
464
+ */
465
+ name: optional(string()),
466
+ /**
467
+ * The email address of the logged-in user.
468
+ */
469
+ email: optional(string()),
470
+ /**
471
+ * A unique identifier for the logged-in user.
472
+ */
473
+ user_id: optional(string()),
474
+ /**
475
+ * The horizontal alignment of the Intercom messenger launcher.
476
+ * @default 'right'
477
+ */
478
+ alignment: optional(union([literal("left"), literal("right")])),
479
+ /**
480
+ * The horizontal padding (in px) of the messenger launcher from the edge of the page.
481
+ * @default 20
482
+ */
483
+ horizontal_padding: optional(number()),
484
+ /**
485
+ * The vertical padding (in px) of the messenger launcher from the bottom of the page.
486
+ * @default 20
487
+ */
488
+ vertical_padding: optional(number())
489
+ });
490
+ export const MatomoAnalyticsOptions = object({
491
+ /**
492
+ * The URL of your self-hosted Matomo instance.
493
+ * Either `matomoUrl` or `cloudId` is required.
494
+ * @example 'https://matomo.example.com'
495
+ * @see https://developer.matomo.org/guides/tracking-javascript-guide
496
+ */
497
+ matomoUrl: optional(string()),
498
+ /**
499
+ * Your Matomo site ID.
500
+ * @default '1'
501
+ */
502
+ siteId: optional(union([string(), number()])),
503
+ /**
504
+ * Your Matomo Cloud ID (the subdomain portion of your `*.matomo.cloud` URL).
505
+ * Either `matomoUrl` or `cloudId` is required.
506
+ * @example 'mysite.matomo.cloud'
507
+ */
508
+ cloudId: optional(string()),
509
+ /**
510
+ * A custom tracker URL. Overrides the default tracker endpoint derived from `matomoUrl` or `cloudId`.
511
+ */
512
+ trackerUrl: optional(string()),
513
+ /**
514
+ * Whether to track the initial page view on load.
515
+ * @deprecated Use `watch: true` (default) for automatic page view tracking.
516
+ */
517
+ trackPageView: optional(boolean()),
518
+ /**
519
+ * Enable download and outlink tracking.
520
+ */
521
+ enableLinkTracking: optional(boolean()),
522
+ /**
523
+ * Disable all tracking cookies for cookieless analytics.
524
+ */
525
+ disableCookies: optional(boolean()),
526
+ /**
527
+ * Automatically track page views on route change.
528
+ * @default true
529
+ */
530
+ watch: optional(boolean())
531
+ });
532
+ export const MetaPixelOptions = object({
533
+ /**
534
+ * Your Meta (Facebook) Pixel ID.
535
+ * @see https://developers.facebook.com/docs/meta-pixel/get-started
536
+ */
537
+ id: union([string(), number()])
538
+ });
539
+ export const NpmOptions = object({
540
+ /**
541
+ * The npm package name to load.
542
+ * @example 'lodash'
543
+ */
544
+ packageName: string(),
545
+ /**
546
+ * The specific file path within the package to load.
547
+ * @example '/dist/lodash.min.js'
548
+ */
549
+ file: optional(string()),
550
+ /**
551
+ * The package version to load.
552
+ * @default 'latest'
553
+ */
554
+ version: optional(string()),
555
+ /**
556
+ * The CDN provider to use for loading the package.
557
+ * @default 'unpkg'
558
+ * @see https://unpkg.com
559
+ * @see https://www.jsdelivr.com
560
+ * @see https://cdnjs.com
561
+ */
562
+ provider: optional(union([literal("jsdelivr"), literal("cdnjs"), literal("unpkg")]))
563
+ });
564
+ export const PayPalOptions = union([
565
+ object({
566
+ /**
567
+ * Your PayPal client ID.
568
+ * @see https://developer.paypal.com/sdk/js/reference/
569
+ */
570
+ clientId: string(),
571
+ clientToken: optional(string()),
572
+ /**
573
+ * Use the PayPal sandbox environment. Defaults to `true` in development.
574
+ */
575
+ sandbox: optional(boolean())
576
+ }),
577
+ object({
578
+ clientId: optional(string()),
579
+ /**
580
+ * A server-generated client token for authentication.
581
+ * @see https://docs.paypal.ai/payments/methods/paypal/sdk/js/v6/paypal-checkout
582
+ */
583
+ clientToken: string(),
584
+ /**
585
+ * Use the PayPal sandbox environment. Defaults to `true` in development.
586
+ */
587
+ sandbox: optional(boolean())
588
+ })
589
+ ]);
590
+ export const PostHogOptions = object({
591
+ /**
592
+ * Your PostHog project API key.
593
+ * @see https://posthog.com/docs/libraries/js#usage
594
+ */
595
+ apiKey: string(),
596
+ /**
597
+ * Your PostHog data region.
598
+ * @default 'us'
599
+ * @see https://posthog.com/docs/libraries/js#config
600
+ */
601
+ region: optional(union([literal("us"), literal("eu")])),
602
+ /**
603
+ * Custom API host URL. Overrides the default derived from `region`.
604
+ * Useful for self-hosted instances or reverse proxies.
605
+ */
606
+ apiHost: optional(string()),
607
+ /**
608
+ * Enable autocapture of clicks, form submissions, and page views.
609
+ * @default true
610
+ */
611
+ autocapture: optional(boolean()),
612
+ /**
613
+ * Capture page views automatically. Set to `'history_change'` to only capture on history changes.
614
+ * @default true
615
+ */
616
+ capturePageview: optional(union([boolean(), literal("history_change")])),
617
+ /**
618
+ * Capture page leave events automatically.
619
+ * @default true
620
+ */
621
+ capturePageleave: optional(boolean()),
622
+ /**
623
+ * Disable session recording.
624
+ */
625
+ disableSessionRecording: optional(boolean()),
626
+ /**
627
+ * Additional PostHog configuration options passed directly to `posthog.init()`.
628
+ * @see https://posthog.com/docs/libraries/js#config
629
+ */
630
+ config: optional(record(string(), any()))
631
+ });
632
+ export const RedditPixelOptions = object({
633
+ /**
634
+ * Your Reddit Pixel advertiser ID.
635
+ * @see https://reddithelp.com/en/categories/advertising/managing-ads/installing-reddit-pixel
636
+ */
637
+ id: string()
638
+ });
639
+ export const RybbitAnalyticsOptions = object({
640
+ /**
641
+ * Your Rybbit site ID.
642
+ * @see https://rybbit.io/docs
643
+ */
644
+ siteId: union([string(), number()]),
645
+ /**
646
+ * Automatically track page views.
647
+ * @default true
648
+ */
649
+ autoTrackPageview: optional(boolean()),
650
+ /**
651
+ * Enable SPA (single-page app) route tracking.
652
+ * @default true
653
+ */
654
+ trackSpa: optional(boolean()),
655
+ /**
656
+ * Include query parameters in tracked URLs.
657
+ */
658
+ trackQuery: optional(boolean()),
659
+ /**
660
+ * Track outbound link clicks.
661
+ */
662
+ trackOutbound: optional(boolean()),
663
+ /**
664
+ * Track JavaScript errors.
665
+ */
666
+ trackErrors: optional(boolean()),
667
+ /**
668
+ * Enable session replay recording.
669
+ */
670
+ sessionReplay: optional(boolean()),
671
+ /**
672
+ * Enable Web Vitals tracking (LCP, FID, CLS, etc.).
673
+ */
674
+ webVitals: optional(boolean()),
675
+ /**
676
+ * URL patterns to skip from tracking (glob syntax).
677
+ */
678
+ skipPatterns: optional(array(string())),
679
+ /**
680
+ * URL patterns to mask in tracked data (glob syntax).
681
+ */
682
+ maskPatterns: optional(array(string())),
683
+ /**
684
+ * Debounce interval (in ms) for page view tracking.
685
+ */
686
+ debounce: optional(number()),
687
+ /**
688
+ * API key for authenticated tracking.
689
+ */
690
+ apiKey: optional(string()),
691
+ /**
692
+ * Override the analytics host URL. When first-party mode is enabled, this is
693
+ * auto-injected to route through the proxy. The SDK derives its API endpoint
694
+ * from the script src, so this changes the script src to `${analyticsHost}/script.js`.
695
+ */
696
+ analyticsHost: optional(string())
697
+ });
698
+ export const MixpanelAnalyticsOptions = object({
699
+ /**
700
+ * Your Mixpanel project token.
701
+ * @see https://docs.mixpanel.com/docs/tracking-methods/sdks/javascript#1-initialize-the-library
702
+ */
703
+ token: string()
704
+ });
705
+ export const BingUetOptions = object({
706
+ /**
707
+ * Your Bing UET tag ID.
708
+ * @see https://help.ads.microsoft.com/#apex/ads/en/56682/2-500
709
+ */
710
+ id: string(),
711
+ /**
712
+ * Enable automatic SPA page tracking.
713
+ * @default true
714
+ */
715
+ enableAutoSpaTracking: optional(boolean())
716
+ });
717
+ export const SegmentOptions = object({
718
+ /**
719
+ * Your Segment write key.
720
+ * @see https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/
721
+ */
722
+ writeKey: string(),
723
+ /**
724
+ * The global variable name for the analytics instance.
725
+ * @default 'analytics'
726
+ */
727
+ analyticsKey: optional(string())
728
+ });
729
+ export const InitObjectPropertiesSchema = object({
730
+ /**
731
+ * The user's email address (for matching).
732
+ */
733
+ user_email: optional(string()),
734
+ /**
735
+ * The user's IP address.
736
+ */
737
+ ip_address: optional(string()),
738
+ /**
739
+ * The user's phone number (for matching).
740
+ */
741
+ user_phone_number: optional(string()),
742
+ /**
743
+ * SHA-256 hashed email address.
744
+ */
745
+ user_hashed_email: optional(string()),
746
+ /**
747
+ * SHA-256 hashed phone number.
748
+ */
749
+ user_hashed_phone_number: optional(string()),
750
+ /**
751
+ * The user's first name.
752
+ */
753
+ firstname: optional(string()),
754
+ /**
755
+ * The user's last name.
756
+ */
757
+ lastname: optional(string()),
758
+ /**
759
+ * The user's city.
760
+ */
761
+ geo_city: optional(string()),
762
+ /**
763
+ * The user's region/state.
764
+ */
765
+ geo_region: optional(string()),
766
+ /**
767
+ * The user's postal/zip code.
768
+ */
769
+ geo_postal_code: optional(string()),
770
+ /**
771
+ * The user's country code.
772
+ */
773
+ geo_country: optional(string()),
774
+ /**
775
+ * The user's age.
776
+ */
777
+ age: optional(string())
778
+ });
779
+ export const SnapTrPixelOptions = object({
780
+ /**
781
+ * Your Snapchat Pixel ID.
782
+ * @see https://businesshelp.snapchat.com/s/article/pixel-website-install
783
+ */
784
+ id: string(),
785
+ /**
786
+ * Whether to automatically track a `PAGE_VIEW` event on initialization.
787
+ */
788
+ trackPageView: optional(boolean()),
789
+ ...InitObjectPropertiesSchema?.entries || {}
790
+ });
791
+ export const StripeOptions = object({
792
+ /**
793
+ * Whether to load Stripe's advanced fraud detection signals.
794
+ * Set to `false` to opt out.
795
+ * @default true
796
+ * @see https://docs.stripe.com/disputes/prevention/advanced-fraud-detection
797
+ */
798
+ advancedFraudSignals: optional(boolean())
799
+ });
800
+ export const TikTokPixelOptions = object({
801
+ /**
802
+ * Your TikTok Pixel ID.
803
+ * @see https://ads.tiktok.com/help/article/get-started-pixel
804
+ */
805
+ id: string(),
806
+ /**
807
+ * Whether to automatically track a page view on initialization.
808
+ * @default true
809
+ */
810
+ trackPageView: optional(boolean())
811
+ });
812
+ export const UmamiAnalyticsOptions = object({
813
+ /**
814
+ * Your Umami website ID.
815
+ * @see https://umami.is/docs/tracker-config
816
+ */
817
+ websiteId: string(),
818
+ // required
819
+ /**
820
+ * By default, Umami will send data to wherever the script is located.
821
+ * You can override this to send data to another location.
822
+ * @see https://umami.is/docs/tracker-config#data-host-url
823
+ */
824
+ hostUrl: optional(string()),
825
+ /**
826
+ * By default, Umami tracks all pageviews and events for you automatically.
827
+ * You can disable this behavior and track events yourself using the tracker functions.
828
+ * @default true
829
+ * @see https://umami.is/docs/tracker-functions
830
+ */
831
+ autoTrack: optional(boolean()),
832
+ /**
833
+ * If you want the tracker to only run on specific domains, you can add them to your tracker script.
834
+ * This is a comma delimited list of domain names.
835
+ * Helps if you are working in a staging/development environment.
836
+ * @see https://umami.is/docs/tracker-config#data-domains
837
+ */
838
+ domains: optional(array(string())),
839
+ /**
840
+ * If you want the tracker to collect events under a specific tag.
841
+ * Events can be filtered in the dashboard by a specific tag.
842
+ * @see https://umami.is/docs/tracker-config#data-tag
843
+ */
844
+ tag: optional(string()),
845
+ /**
846
+ * Function that will be called before data is sent to Umami.
847
+ * The function takes two parameters: type and payload.
848
+ * Return the payload to continue sending, or return a falsy value to cancel.
849
+ * @see https://umami.is/docs/tracker-config#data-before-send
850
+ */
851
+ beforeSend: optional(union([
852
+ custom((input) => typeof input === "function"),
853
+ string()
854
+ ]))
855
+ });
856
+ export const XEmbedOptions = object({
857
+ /**
858
+ * The tweet ID to embed.
859
+ * @example '1754336034228171055'
860
+ * @see https://developer.x.com/en/docs/twitter-for-websites/embedded-tweets/overview
861
+ */
862
+ tweetId: string(),
863
+ /**
864
+ * Optional: Custom API endpoint for fetching tweet data.
865
+ * @default '/_scripts/embed/x'
866
+ */
867
+ apiEndpoint: optional(string()),
868
+ /**
869
+ * Optional: Custom image proxy endpoint.
870
+ * @default '/_scripts/embed/x-image'
871
+ */
872
+ imageProxyEndpoint: optional(string())
873
+ });
874
+ export const VercelAnalyticsOptions = object({
875
+ /**
876
+ * The DSN of the project to send events to.
877
+ * Only required when self-hosting or deploying outside of Vercel.
878
+ */
879
+ dsn: optional(string()),
880
+ /**
881
+ * Whether to disable automatic page view tracking on route changes.
882
+ * Set to true if you want to manually call pageview().
883
+ */
884
+ disableAutoTrack: optional(boolean()),
885
+ /**
886
+ * The mode to use for the analytics script.
887
+ * - `auto` - Automatically detect the environment (default)
888
+ * - `production` - Always use production script
889
+ * - `development` - Always use development script (logs to console)
890
+ */
891
+ mode: optional(union([literal("auto"), literal("development"), literal("production")])),
892
+ /**
893
+ * Whether to enable debug logging.
894
+ * Automatically enabled in development/test environments.
895
+ */
896
+ debug: optional(boolean()),
897
+ /**
898
+ * Custom endpoint for data collection.
899
+ * Useful for self-hosted or proxied setups.
900
+ */
901
+ endpoint: optional(string())
902
+ });
903
+ export const XPixelOptions = object({
904
+ /**
905
+ * Your X (Twitter) Pixel ID.
906
+ * @see https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html
907
+ */
908
+ id: string(),
909
+ /**
910
+ * The X Pixel script version.
911
+ * @default '1.1'
912
+ */
913
+ version: optional(string())
914
+ });
915
+ export const GravatarOptions = object({
916
+ /**
917
+ * Cache duration for proxied avatar images in seconds.
918
+ * @default 3600
919
+ */
920
+ cacheMaxAge: optional(number()),
921
+ /**
922
+ * Default image to show when no Gravatar exists.
923
+ * @see https://docs.gravatar.com/general/images/#default-image
924
+ * @default 'mp'
925
+ */
926
+ default: optional(string()),
927
+ /**
928
+ * Avatar size in pixels (1-2048).
929
+ * @default 80
930
+ */
931
+ size: optional(number()),
932
+ /**
933
+ * Content rating filter.
934
+ * @default 'g'
935
+ */
936
+ rating: optional(string())
937
+ });