@nuxt/scripts 1.0.0-beta.15 → 1.0.0-beta.18
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 +3 -3
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/{C4oLgKn5.js → BW6d1nfL.js} +1 -1
- package/dist/client/_nuxt/{C4LyqEA2.js → C8R4dwAP.js} +1 -1
- package/dist/client/_nuxt/{CSWa0Nc-.js → DI7VRsfF.js} +1 -1
- package/dist/client/_nuxt/{CAywURt7.js → NbccNBFl.js} +13 -13
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/e9af4ec4-4502-4171-9264-54123d0ae2ea.json +1 -0
- package/dist/client/_nuxt/error-404.Cqp3ffuH.css +1 -0
- package/dist/client/_nuxt/error-500.B9hH8BAi.css +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +75 -8
- package/dist/registry.mjs +22 -0
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +1 -1
- package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +1 -1
- package/dist/runtime/components/ScriptGravatar.d.vue.ts +22 -0
- package/dist/runtime/components/ScriptGravatar.vue +46 -0
- package/dist/runtime/components/ScriptGravatar.vue.d.ts +22 -0
- package/dist/runtime/components/ScriptLoadingIndicator.d.vue.ts +1 -1
- package/dist/runtime/components/ScriptLoadingIndicator.vue.d.ts +1 -1
- package/dist/runtime/components/ScriptPayPalButtons.d.vue.ts +42 -31
- package/dist/runtime/components/ScriptPayPalButtons.vue +43 -76
- package/dist/runtime/components/ScriptPayPalButtons.vue.d.ts +42 -31
- package/dist/runtime/components/ScriptPayPalMessages.d.vue.ts +36 -22
- package/dist/runtime/components/ScriptPayPalMessages.vue +41 -47
- package/dist/runtime/components/ScriptPayPalMessages.vue.d.ts +36 -22
- package/dist/runtime/components/ScriptXEmbed.d.vue.ts +1 -1
- package/dist/runtime/components/ScriptXEmbed.vue.d.ts +1 -1
- package/dist/runtime/registry/clarity.d.ts +2 -7
- package/dist/runtime/registry/clarity.js +2 -7
- package/dist/runtime/registry/cloudflare-web-analytics.d.ts +2 -13
- package/dist/runtime/registry/cloudflare-web-analytics.js +2 -14
- package/dist/runtime/registry/crisp.d.ts +2 -32
- package/dist/runtime/registry/crisp.js +2 -33
- package/dist/runtime/registry/databuddy-analytics.d.ts +2 -35
- package/dist/runtime/registry/databuddy-analytics.js +2 -45
- package/dist/runtime/registry/fathom-analytics.d.ts +2 -22
- package/dist/runtime/registry/fathom-analytics.js +2 -23
- package/dist/runtime/registry/google-adsense.d.ts +2 -10
- package/dist/runtime/registry/google-adsense.js +2 -11
- package/dist/runtime/registry/google-analytics.d.ts +2 -4
- package/dist/runtime/registry/google-analytics.js +2 -7
- package/dist/runtime/registry/google-maps.d.ts +2 -8
- package/dist/runtime/registry/google-maps.js +2 -8
- package/dist/runtime/registry/google-recaptcha.d.ts +2 -6
- package/dist/runtime/registry/google-recaptcha.js +2 -10
- package/dist/runtime/registry/google-sign-in.d.ts +2 -13
- package/dist/runtime/registry/google-sign-in.js +2 -22
- package/dist/runtime/registry/google-tag-manager.d.ts +2 -27
- package/dist/runtime/registry/google-tag-manager.js +2 -25
- package/dist/runtime/registry/gravatar.d.ts +25 -0
- package/dist/runtime/registry/gravatar.js +32 -0
- package/dist/runtime/registry/hotjar.d.ts +2 -4
- package/dist/runtime/registry/hotjar.js +2 -5
- package/dist/runtime/registry/instagram-embed.d.ts +2 -17
- package/dist/runtime/registry/instagram-embed.js +2 -18
- package/dist/runtime/registry/intercom.d.ts +2 -10
- package/dist/runtime/registry/intercom.js +2 -12
- package/dist/runtime/registry/matomo-analytics.d.ts +2 -11
- package/dist/runtime/registry/matomo-analytics.js +2 -11
- package/dist/runtime/registry/meta-pixel.d.ts +2 -4
- package/dist/runtime/registry/meta-pixel.js +2 -4
- package/dist/runtime/registry/npm.d.ts +2 -6
- package/dist/runtime/registry/npm.js +2 -7
- package/dist/runtime/registry/paypal.d.ts +4 -25
- package/dist/runtime/registry/paypal.js +3 -66
- package/dist/runtime/registry/plausible-analytics.js +5 -6
- package/dist/runtime/registry/posthog.d.ts +10 -12
- package/dist/runtime/registry/posthog.js +2 -11
- package/dist/runtime/registry/reddit-pixel.d.ts +2 -4
- package/dist/runtime/registry/reddit-pixel.js +2 -4
- package/dist/runtime/registry/rybbit-analytics.d.ts +2 -14
- package/dist/runtime/registry/rybbit-analytics.js +2 -16
- package/dist/runtime/registry/schemas.d.ts +940 -0
- package/dist/runtime/registry/schemas.js +895 -0
- package/dist/runtime/registry/segment.d.ts +2 -5
- package/dist/runtime/registry/segment.js +2 -5
- package/dist/runtime/registry/snapchat-pixel.d.ts +2 -31
- package/dist/runtime/registry/snapchat-pixel.js +2 -20
- package/dist/runtime/registry/stripe.d.ts +2 -3
- package/dist/runtime/registry/stripe.js +2 -4
- package/dist/runtime/registry/tiktok-pixel.d.ts +2 -5
- package/dist/runtime/registry/tiktok-pixel.js +2 -6
- package/dist/runtime/registry/umami-analytics.d.ts +2 -31
- package/dist/runtime/registry/umami-analytics.js +2 -36
- package/dist/runtime/registry/vercel-analytics.d.ts +29 -0
- package/dist/runtime/registry/vercel-analytics.js +84 -0
- package/dist/runtime/registry/x-embed.d.ts +2 -16
- package/dist/runtime/registry/x-embed.js +2 -17
- package/dist/runtime/registry/x-pixel.d.ts +2 -5
- package/dist/runtime/registry/x-pixel.js +2 -5
- package/dist/runtime/server/gravatar-proxy.d.ts +2 -0
- package/dist/runtime/server/gravatar-proxy.js +62 -0
- package/dist/runtime/types.d.ts +9 -3
- package/dist/runtime/utils.d.ts +2 -2
- package/dist/runtime/utils.js +3 -2
- package/dist/shared/{scripts.DLRgvHQg.mjs → scripts.Bg4pl9Yo.mjs} +22 -0
- package/dist/stats.mjs +152 -94
- package/dist/types-source.d.mts +11 -367
- package/dist/types-source.d.ts +11 -367
- package/dist/types-source.mjs +225 -460
- package/package.json +4 -4
- package/dist/client/_nuxt/builds/meta/0f5f1d62-f186-4aef-a618-dcef5ec637c1.json +0 -1
- package/dist/client/_nuxt/error-404.B57D-jUQ.css +0 -1
- package/dist/client/_nuxt/error-500.DTHUW7BI.css +0 -1
- package/dist/runtime/components/ScriptPayPalMarks.d.vue.ts +0 -52
- package/dist/runtime/components/ScriptPayPalMarks.vue +0 -71
- package/dist/runtime/components/ScriptPayPalMarks.vue.d.ts +0 -52
package/dist/types-source.mjs
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as schemas_js from '../dist/runtime/registry/schemas.js';
|
|
2
|
+
export * from '../dist/runtime/registry/schemas.js';
|
|
3
|
+
|
|
4
|
+
function _mergeNamespaces(n, m) {
|
|
5
|
+
for (var i = 0; i < m.length; i++) {
|
|
6
|
+
const e = m[i];
|
|
7
|
+
if (typeof e !== 'string' && !Array.isArray(e)) { for (const k in e) {
|
|
8
|
+
if (k !== 'default' && !(k in n)) {
|
|
9
|
+
n[k] = e[k];
|
|
10
|
+
}
|
|
11
|
+
} }
|
|
12
|
+
}
|
|
13
|
+
return n;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const schemas = /*#__PURE__*/_mergeNamespaces({
|
|
17
|
+
__proto__: null
|
|
18
|
+
}, [schemas_js]);
|
|
2
19
|
|
|
3
20
|
const clarity = [
|
|
21
|
+
{
|
|
22
|
+
name: "ClarityOptions",
|
|
23
|
+
kind: "const",
|
|
24
|
+
code: "export const ClarityOptions = object({\n /**\n * The Clarity token.\n * @see https://learn.microsoft.com/en-us/clarity/setup-clarity\n */\n id: pipe(string(), minLength(10)),\n})"
|
|
25
|
+
},
|
|
4
26
|
{
|
|
5
27
|
name: "ClarityFunctions",
|
|
6
28
|
kind: "type",
|
|
@@ -10,11 +32,6 @@ const clarity = [
|
|
|
10
32
|
name: "ClarityApi",
|
|
11
33
|
kind: "interface",
|
|
12
34
|
code: "export interface ClarityApi {\n clarity: ClarityFunctions & {\n q: any[]\n v: string\n }\n}"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: "ClarityOptions",
|
|
16
|
-
kind: "const",
|
|
17
|
-
code: "export const ClarityOptions = object({\n /**\n * The Clarity token.\n */\n id: pipe(string(), minLength(10)),\n})"
|
|
18
35
|
}
|
|
19
36
|
];
|
|
20
37
|
const crisp = [
|
|
@@ -39,23 +56,30 @@ const crisp = [
|
|
|
39
56
|
code: "const ScriptCrispDefaults = {\n \"trigger\": \"'click'\"\n}"
|
|
40
57
|
}
|
|
41
58
|
];
|
|
42
|
-
const
|
|
59
|
+
const gravatar = [
|
|
43
60
|
{
|
|
44
|
-
name: "
|
|
61
|
+
name: "GravatarApi",
|
|
45
62
|
kind: "interface",
|
|
46
|
-
code: "export interface
|
|
47
|
-
}
|
|
63
|
+
code: "export interface GravatarApi {\n /**\n * Get a proxied avatar URL for a given SHA256 email hash.\n * When firstParty mode is enabled, this routes through your server.\n */\n getAvatarUrl: (hash: string, options?: { size?: number, default?: string, rating?: string }) => string\n /**\n * Get a proxied avatar URL using the server-side hashing endpoint.\n * The email is sent to YOUR server (not Gravatar) for hashing.\n * Only available when the gravatar proxy is enabled.\n */\n getAvatarUrlFromEmail: (email: string, options?: { size?: number, default?: string, rating?: string }) => string\n}"
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
const hotjar = [
|
|
48
67
|
{
|
|
49
68
|
name: "HotjarOptions",
|
|
50
69
|
kind: "const",
|
|
51
|
-
code: "export const HotjarOptions = object({\n id: number(),\n sv: optional(number()),\n})"
|
|
70
|
+
code: "export const HotjarOptions = object({\n /**\n * Your Hotjar Site ID.\n * @see https://help.hotjar.com/hc/en-us/articles/115012039247-Hotjar-Tracking-Code\n */\n id: number(),\n /**\n * The Hotjar snippet version.\n * @default 6\n */\n sv: optional(number()),\n})"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "HotjarApi",
|
|
74
|
+
kind: "interface",
|
|
75
|
+
code: "export interface HotjarApi {\n hj: ((event: 'identify', userId: string, attributes?: Record<string, any>) => void) & ((event: 'stateChange', path: string) => void) & ((event: 'event', eventName: string) => void) & ((event: string, arg?: string) => void) & ((...params: any[]) => void) & {\n q: any[]\n }\n}"
|
|
52
76
|
}
|
|
53
77
|
];
|
|
54
78
|
const intercom = [
|
|
55
79
|
{
|
|
56
80
|
name: "IntercomOptions",
|
|
57
81
|
kind: "const",
|
|
58
|
-
code: "export const IntercomOptions = object({\n app_id: string(),\n api_base: optional(union([literal('https://api-iam.intercom.io'), literal('https://api-iam.eu.intercom.io'), literal('https://api-iam.au.intercom.io')])),\n name: optional(string()),\n email: optional(string()),\n user_id: optional(string()),\n
|
|
82
|
+
code: "export const IntercomOptions = object({\n /**\n * Your Intercom app ID.\n * @see https://developers.intercom.com/installing-intercom/docs/javascript-api-attributes-objects\n */\n app_id: string(),\n /**\n * The regional API base URL. Choose based on your Intercom data hosting region.\n */\n api_base: optional(union([literal('https://api-iam.intercom.io'), literal('https://api-iam.eu.intercom.io'), literal('https://api-iam.au.intercom.io')])),\n /**\n * The name of the logged-in user.\n */\n name: optional(string()),\n /**\n * The email address of the logged-in user.\n */\n email: optional(string()),\n /**\n * A unique identifier for the logged-in user.\n */\n user_id: optional(string()),\n /**\n * The horizontal alignment of the Intercom messenger launcher.\n * @default 'right'\n */\n alignment: optional(union([literal('left'), literal('right')])),\n /**\n * The horizontal padding (in px) of the messenger launcher from the edge of the page.\n * @default 20\n */\n horizontal_padding: optional(number()),\n /**\n * The vertical padding (in px) of the messenger launcher from the bottom of the page.\n * @default 20\n */\n vertical_padding: optional(number()),\n})"
|
|
59
83
|
},
|
|
60
84
|
{
|
|
61
85
|
name: "IntercomApi",
|
|
@@ -74,52 +98,42 @@ const intercom = [
|
|
|
74
98
|
}
|
|
75
99
|
];
|
|
76
100
|
const npm = [
|
|
101
|
+
{
|
|
102
|
+
name: "NpmOptions",
|
|
103
|
+
kind: "const",
|
|
104
|
+
code: "export const NpmOptions = object({\n /**\n * The npm package name to load.\n * @example 'lodash'\n */\n packageName: string(),\n /**\n * The specific file path within the package to load.\n * @example '/dist/lodash.min.js'\n */\n file: optional(string()),\n /**\n * The package version to load.\n * @default 'latest'\n */\n version: optional(string()),\n /**\n * The CDN provider to use for loading the package.\n * @default 'unpkg'\n * @see https://unpkg.com\n * @see https://www.jsdelivr.com\n * @see https://cdnjs.com\n */\n provider: optional(union([literal('jsdelivr'), literal('cdnjs'), literal('unpkg')])),\n})"
|
|
105
|
+
},
|
|
77
106
|
{
|
|
78
107
|
name: "Provider",
|
|
79
108
|
kind: "type",
|
|
80
109
|
code: "type Provider = 'jsdelivr' | 'cdnjs' | 'unpkg'"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name: "NpmOptions",
|
|
84
|
-
kind: "const",
|
|
85
|
-
code: "export const NpmOptions = object({\n packageName: string(),\n file: optional(string()),\n version: optional(string()),\n provider: optional(union([literal('jsdelivr'), literal('cdnjs'), literal('unpkg')])),\n})"
|
|
86
110
|
}
|
|
87
111
|
];
|
|
88
112
|
const paypal = [
|
|
89
|
-
{
|
|
90
|
-
name: "PayPalApi",
|
|
91
|
-
kind: "interface",
|
|
92
|
-
code: "export interface PayPalApi {\n paypal: PayPalNamespace\n}"
|
|
93
|
-
},
|
|
94
113
|
{
|
|
95
114
|
name: "PayPalOptions",
|
|
96
115
|
kind: "const",
|
|
97
|
-
code: "export const PayPalOptions =
|
|
116
|
+
code: "export const PayPalOptions = union([\n object({\n /**\n * Your PayPal client ID.\n * @see https://developer.paypal.com/sdk/js/reference/\n */\n clientId: string(),\n clientToken: optional(string()),\n /**\n * Use the PayPal sandbox environment. Defaults to `true` in development.\n */\n sandbox: optional(boolean()),\n }),\n object({\n clientId: optional(string()),\n /**\n * A server-generated client token for authentication.\n * @see https://docs.paypal.ai/payments/methods/paypal/sdk/js/v6/paypal-checkout\n */\n clientToken: string(),\n /**\n * Use the PayPal sandbox environment. Defaults to `true` in development.\n */\n sandbox: optional(boolean()),\n }),\n])"
|
|
98
117
|
},
|
|
99
118
|
{
|
|
100
|
-
name: "
|
|
119
|
+
name: "PayPalApi",
|
|
101
120
|
kind: "interface",
|
|
102
|
-
code: "interface
|
|
121
|
+
code: "export interface PayPalApi {\n paypal: PayPalV6Namespace\n}"
|
|
103
122
|
},
|
|
104
123
|
{
|
|
105
|
-
name: "
|
|
106
|
-
kind: "const",
|
|
107
|
-
code: "const ScriptPayPalButtonsDefaults = {\n \"trigger\": \"'visible'\",\n \"clientId\": \"'test'\",\n \"disabled\": \"false\",\n \"buttonOptions\": \"() => ({})\",\n \"paypalScriptOptions\": \"() => ({})\"\n}"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: "ScriptPayPalMarksProps",
|
|
124
|
+
name: "ScriptPayPalButtonsProps",
|
|
111
125
|
kind: "interface",
|
|
112
|
-
code: "interface
|
|
126
|
+
code: "interface ScriptPayPalButtonsProps {\n /**\n * Customize the root element attributes.\n */\n rootAttrs?: HTMLAttributes & ReservedProps & Record<string, unknown>\n /**\n * Defines the trigger event to load the script.\n */\n trigger?: ElementScriptTrigger\n /**\n * Client ID or client token for PayPal SDK v6 authentication.\n */\n clientId?: string\n /**\n * Server-generated client token for SDK v6.\n */\n clientToken?: string\n /**\n * The v6 SDK components to load.\n * @default ['paypal-payments']\n */\n components?: Components[]\n /**\n * The page type context hint.\n */\n pageType?: PageTypes\n /**\n * The locale for the SDK (BCP-47 code).\n */\n locale?: string\n /**\n * The merchant ID(s).\n */\n merchantId?: string | string[]\n /**\n * Partner attribution ID for revenue sharing.\n */\n partnerAttributionId?: string\n /**\n * The paypal script options.\n */\n paypalScriptOptions?: Partial<PayPalInput>\n}"
|
|
113
127
|
},
|
|
114
128
|
{
|
|
115
|
-
name: "
|
|
129
|
+
name: "ScriptPayPalButtonsDefaults",
|
|
116
130
|
kind: "const",
|
|
117
|
-
code: "const
|
|
131
|
+
code: "const ScriptPayPalButtonsDefaults = {\n \"trigger\": \"'visible'\",\n \"clientId\": \"'test'\",\n \"components\": \"() => ['paypal-payments'] as Components[]\",\n \"paypalScriptOptions\": \"() => ({})\"\n}"
|
|
118
132
|
},
|
|
119
133
|
{
|
|
120
134
|
name: "ScriptPayPalMessagesProps",
|
|
121
135
|
kind: "interface",
|
|
122
|
-
code: "interface ScriptPayPalMessagesProps {\n /**\n * Customize the root element attributes.\n */\n rootAttrs?: HTMLAttributes & ReservedProps & Record<string, unknown>\n /**\n * Defines the trigger event to load the script.\n */\n trigger?: ElementScriptTrigger\n /**\n *
|
|
136
|
+
code: "interface ScriptPayPalMessagesProps {\n /**\n * Customize the root element attributes.\n */\n rootAttrs?: HTMLAttributes & ReservedProps & Record<string, unknown>\n /**\n * Defines the trigger event to load the script.\n */\n trigger?: ElementScriptTrigger\n /**\n * Client ID or client token for PayPal SDK v6 authentication.\n */\n clientId?: string\n /**\n * Server-generated client token for SDK v6.\n */\n clientToken?: string\n /**\n * The merchant ID for the paypal script.\n */\n merchantId?: string | string[]\n /**\n * The partner attribution ID.\n */\n partnerAttributionId?: string\n /**\n * The page type context hint.\n */\n pageType?: PageTypes\n /**\n * The locale for the SDK (BCP-47 code).\n */\n locale?: string\n /**\n * Options for the PayPal Messages session.\n */\n messagesOptions?: PayPalMessagesOptions\n /**\n * The paypal script options.\n */\n paypalScriptOptions?: Partial<PayPalInput>\n}"
|
|
123
137
|
},
|
|
124
138
|
{
|
|
125
139
|
name: "ScriptPayPalMessagesDefaults",
|
|
@@ -131,7 +145,7 @@ const posthog = [
|
|
|
131
145
|
{
|
|
132
146
|
name: "PostHogOptions",
|
|
133
147
|
kind: "const",
|
|
134
|
-
code: "export const PostHogOptions = object({\n apiKey: string(),\n region: optional(union([literal('us'), literal('eu')])),\n apiHost: optional(string()),\n autocapture: optional(boolean()),\n capturePageview: optional(union([boolean(), literal('history_change')])),\n capturePageleave: optional(boolean()),\n disableSessionRecording: optional(boolean()),\n config: optional(record(string(), any())),\n})"
|
|
148
|
+
code: "export const PostHogOptions = object({\n /**\n * Your PostHog project API key.\n * @see https://posthog.com/docs/libraries/js#usage\n */\n apiKey: string(),\n /**\n * Your PostHog data region.\n * @default 'us'\n * @see https://posthog.com/docs/libraries/js#config\n */\n region: optional(union([literal('us'), literal('eu')])),\n /**\n * Custom API host URL. Overrides the default derived from `region`.\n * Useful for self-hosted instances or reverse proxies.\n */\n apiHost: optional(string()),\n /**\n * Enable autocapture of clicks, form submissions, and page views.\n * @default true\n */\n autocapture: optional(boolean()),\n /**\n * Capture page views automatically. Set to `'history_change'` to only capture on history changes.\n * @default true\n */\n capturePageview: optional(union([boolean(), literal('history_change')])),\n /**\n * Capture page leave events automatically.\n * @default true\n */\n capturePageleave: optional(boolean()),\n /**\n * Disable session recording.\n */\n disableSessionRecording: optional(boolean()),\n /**\n * Additional PostHog configuration options passed directly to `posthog.init()`.\n * @see https://posthog.com/docs/libraries/js#config\n */\n config: optional(record(string(), any())),\n})"
|
|
135
149
|
},
|
|
136
150
|
{
|
|
137
151
|
name: "PostHogApi",
|
|
@@ -143,7 +157,7 @@ const segment = [
|
|
|
143
157
|
{
|
|
144
158
|
name: "SegmentOptions",
|
|
145
159
|
kind: "const",
|
|
146
|
-
code: "export const SegmentOptions = object({\n writeKey: string(),\n analyticsKey: optional(string()),\n})"
|
|
160
|
+
code: "export const SegmentOptions = object({\n /**\n * Your Segment write key.\n * @see https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/\n */\n writeKey: string(),\n /**\n * The global variable name for the analytics instance.\n * @default 'analytics'\n */\n analyticsKey: optional(string()),\n})"
|
|
147
161
|
},
|
|
148
162
|
{
|
|
149
163
|
name: "AnalyticsApi",
|
|
@@ -160,7 +174,7 @@ const stripe = [
|
|
|
160
174
|
{
|
|
161
175
|
name: "StripeOptions",
|
|
162
176
|
kind: "const",
|
|
163
|
-
code: "export const StripeOptions = object({\n advancedFraudSignals: optional(boolean()),\n})"
|
|
177
|
+
code: "export const StripeOptions = object({\n /**\n * Whether to load Stripe's advanced fraud detection signals.\n * Set to `false` to opt out.\n * @default true\n * @see https://docs.stripe.com/disputes/prevention/advanced-fraud-detection\n */\n advancedFraudSignals: optional(boolean()),\n})"
|
|
164
178
|
},
|
|
165
179
|
{
|
|
166
180
|
name: "StripeApi",
|
|
@@ -181,15 +195,15 @@ const stripe = [
|
|
|
181
195
|
const registryTypes = {
|
|
182
196
|
clarity: clarity,
|
|
183
197
|
"cloudflare-web-analytics": [
|
|
198
|
+
{
|
|
199
|
+
name: "CloudflareWebAnalyticsOptions",
|
|
200
|
+
kind: "const",
|
|
201
|
+
code: "export const CloudflareWebAnalyticsOptions = object({\n /**\n * The Cloudflare Web Analytics token.\n * @see https://developers.cloudflare.com/analytics/web-analytics/get-started/\n */\n token: pipe(string(), minLength(32)),\n /**\n * Cloudflare Web Analytics enables measuring SPAs automatically by overriding the History API's pushState function\n * and listening to the onpopstate. Hash-based router is not supported.\n *\n * @default true\n * @see https://developers.cloudflare.com/analytics/web-analytics/get-started/#spa-tracking\n */\n spa: optional(boolean()),\n})"
|
|
202
|
+
},
|
|
184
203
|
{
|
|
185
204
|
name: "CloudflareWebAnalyticsApi",
|
|
186
205
|
kind: "interface",
|
|
187
206
|
code: "export interface CloudflareWebAnalyticsApi {\n __cfBeacon: {\n load: 'single'\n spa: boolean\n token: string\n }\n}"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
name: "CloudflareWebAnalyticsOptions",
|
|
191
|
-
kind: "const",
|
|
192
|
-
code: "export const CloudflareWebAnalyticsOptions = object({\n /**\n * The Cloudflare Web Analytics token.\n */\n token: pipe(string(), minLength(32)),\n /**\n * Cloudflare Web Analytics enables measuring SPAs automatically by overriding the History API’s pushState function\n * and listening to the onpopstate. Hash-based router is not supported.\n *\n * @default true\n */\n spa: optional(boolean()),\n})"
|
|
193
207
|
}
|
|
194
208
|
],
|
|
195
209
|
crisp: crisp,
|
|
@@ -197,7 +211,7 @@ const registryTypes = {
|
|
|
197
211
|
{
|
|
198
212
|
name: "DatabuddyAnalyticsOptions",
|
|
199
213
|
kind: "const",
|
|
200
|
-
code: "export const DatabuddyAnalyticsOptions = object({\n
|
|
214
|
+
code: "export const DatabuddyAnalyticsOptions = object({\n /**\n * Your Databuddy client ID.\n */\n clientId: string(),\n\n /**\n * Custom script URL for the Databuddy SDK.\n * @default 'https://cdn.databuddy.cc/databuddy.js'\n */\n scriptUrl: optional(string()),\n /**\n * Custom API URL for sending analytics data.\n * @default 'https://basket.databuddy.cc'\n */\n apiUrl: optional(string()),\n /**\n * Disable all tracking when set to `true`.\n */\n disabled: optional(boolean()),\n\n /**\n * Track screen/page views automatically.\n * @default true\n * @see https://www.databuddy.cc/docs/sdk#track-screen-views\n */\n trackScreenViews: optional(boolean()),\n /**\n * Track page performance metrics.\n * @default true\n * @see https://www.databuddy.cc/docs/sdk#track-performance\n */\n trackPerformance: optional(boolean()),\n /**\n * Track user sessions.\n * @default true\n * @see https://www.databuddy.cc/docs/sdk#track-sessions\n */\n trackSessions: optional(boolean()),\n\n /**\n * Track Web Vitals (LCP, FID, CLS, etc.).\n */\n trackWebVitals: optional(boolean()),\n /**\n * Track JavaScript errors.\n */\n trackErrors: optional(boolean()),\n /**\n * Track outgoing link clicks.\n */\n trackOutgoingLinks: optional(boolean()),\n /**\n * Track scroll depth.\n */\n trackScrollDepth: optional(boolean()),\n /**\n * Track user engagement time.\n */\n trackEngagement: optional(boolean()),\n /**\n * Track user interactions (clicks, form submissions, etc.).\n */\n trackInteractions: optional(boolean()),\n /**\n * Track element attributes for detailed interaction context.\n */\n trackAttributes: optional(boolean()),\n /**\n * Track hash changes in the URL.\n */\n trackHashChanges: optional(boolean()),\n /**\n * Track exit intent behavior.\n */\n trackExitIntent: optional(boolean()),\n /**\n * Track bounce rate metrics.\n */\n trackBounceRate: optional(boolean()),\n\n /**\n * Enable event batching for better performance.\n */\n enableBatching: optional(boolean()),\n /**\n * Maximum number of events per batch.\n */\n batchSize: optional(number()),\n /**\n * Timeout (in ms) before flushing a batch.\n */\n batchTimeout: optional(number()),\n /**\n * Enable automatic retries for failed requests.\n */\n enableRetries: optional(boolean()),\n /**\n * Maximum number of retry attempts.\n */\n maxRetries: optional(number()),\n /**\n * Initial delay (in ms) before the first retry.\n */\n initialRetryDelay: optional(number()),\n /**\n * Sampling rate (0 to 1). Set to `0.5` to track ~50% of sessions.\n */\n samplingRate: optional(number()),\n\n /**\n * Custom SDK identifier.\n */\n sdk: optional(string()),\n /**\n * Custom SDK version string.\n */\n sdkVersion: optional(string()),\n\n /**\n * Enable observability/monitoring features.\n */\n enableObservability: optional(boolean()),\n /**\n * The service name for observability reporting.\n */\n observabilityService: optional(string()),\n /**\n * The environment name for observability (e.g., `'production'`, `'staging'`).\n */\n observabilityEnvironment: optional(string()),\n /**\n * The version string for observability reporting.\n */\n observabilityVersion: optional(string()),\n /**\n * Enable console logging for debugging.\n */\n enableLogging: optional(boolean()),\n /**\n * Enable request tracing.\n */\n enableTracing: optional(boolean()),\n /**\n * Enable error tracking via observability.\n */\n enableErrorTracking: optional(boolean()),\n})"
|
|
201
215
|
},
|
|
202
216
|
{
|
|
203
217
|
name: "DatabuddyAnalyticsApi",
|
|
@@ -209,7 +223,7 @@ const registryTypes = {
|
|
|
209
223
|
{
|
|
210
224
|
name: "FathomAnalyticsOptions",
|
|
211
225
|
kind: "const",
|
|
212
|
-
code: "export const FathomAnalyticsOptions = object({\n /**\n * The Fathom Analytics site ID.\n */\n site: string(),\n /**\n * The Fathom Analytics tracking mode.\n */\n spa: optional(union([literal('auto'), literal('history'), literal('hash')])),\n /**\n * Automatically track page views.\n */\n auto: optional(boolean()),\n /**\n * Enable canonical URL tracking.\n */\n canonical: optional(boolean()),\n /**\n * Honor Do Not Track requests.\n */\n honorDnt: optional(boolean()),\n})"
|
|
226
|
+
code: "export const FathomAnalyticsOptions = object({\n /**\n * The Fathom Analytics site ID.\n * @see https://usefathom.com/docs/script/script-settings\n */\n site: string(),\n /**\n * The Fathom Analytics tracking mode.\n * @default 'auto'\n */\n spa: optional(union([literal('auto'), literal('history'), literal('hash')])),\n /**\n * Automatically track page views.\n * @default true\n */\n auto: optional(boolean()),\n /**\n * Enable canonical URL tracking.\n * @default true\n */\n canonical: optional(boolean()),\n /**\n * Honor Do Not Track requests.\n * @default false\n */\n honorDnt: optional(boolean()),\n})"
|
|
213
227
|
},
|
|
214
228
|
{
|
|
215
229
|
name: "FathomAnalyticsApi",
|
|
@@ -221,7 +235,7 @@ const registryTypes = {
|
|
|
221
235
|
{
|
|
222
236
|
name: "GoogleAdsenseOptions",
|
|
223
237
|
kind: "const",
|
|
224
|
-
code: "export const GoogleAdsenseOptions = object({\n /**\n * The Google Adsense ID.\n */\n client: optional(string()),\n /**\n * Enable or disable Auto Ads.\n */\n autoAds: optional(boolean()),\n})"
|
|
238
|
+
code: "export const GoogleAdsenseOptions = object({\n /**\n * The Google Adsense ID.\n * @example 'ca-pub-XXXXXXXXXXXXXXXX'\n */\n client: optional(string()),\n /**\n * Enable or disable Auto Ads.\n * @default false\n * @see https://support.google.com/adsense/answer/9261805\n */\n autoAds: optional(boolean()),\n})"
|
|
225
239
|
},
|
|
226
240
|
{
|
|
227
241
|
name: "GoogleAdsenseApi",
|
|
@@ -293,14 +307,14 @@ const registryTypes = {
|
|
|
293
307
|
{
|
|
294
308
|
name: "GoogleAnalyticsOptions",
|
|
295
309
|
kind: "const",
|
|
296
|
-
code: "export const GoogleAnalyticsOptions = object({\n
|
|
310
|
+
code: "export const GoogleAnalyticsOptions = object({\n /**\n * The GA4 measurement ID.\n * @example 'G-XXXXXXXX'\n * @see https://developers.google.com/analytics/devguides/collection/gtagjs\n */\n id: optional(string()),\n /**\n * Global name for the dataLayer variable.\n * @default 'dataLayer'\n * @see https://developers.google.com/analytics/devguides/collection/gtagjs/setting-up-gtag#rename_the_data_layer\n */\n l: optional(string()),\n})"
|
|
297
311
|
}
|
|
298
312
|
],
|
|
299
313
|
"google-maps": [
|
|
300
314
|
{
|
|
301
315
|
name: "GoogleMapsOptions",
|
|
302
316
|
kind: "const",
|
|
303
|
-
code: "export const GoogleMapsOptions = object({\n apiKey: string(),\n libraries: optional(array(string())),\n language: optional(string()),\n region: optional(string()),\n v: optional(union([literal('weekly'), literal('quarterly'), literal('beta'), literal('alpha'), string()])),\n})"
|
|
317
|
+
code: "export const GoogleMapsOptions = object({\n /**\n * Your Google Maps API key.\n */\n apiKey: string(),\n /**\n * The Google Maps libraries to load.\n * @default ['places']\n * @see https://developers.google.com/maps/documentation/javascript/libraries\n */\n libraries: optional(array(string())),\n /**\n * The language code for the map UI and geocoding results.\n * @see https://developers.google.com/maps/faq#languagesupport\n */\n language: optional(string()),\n /**\n * The region code to bias geocoding results.\n * @see https://developers.google.com/maps/documentation/javascript/localization#Region\n */\n region: optional(string()),\n /**\n * The Google Maps JS API version to load.\n * @default 'weekly'\n * @see https://developers.google.com/maps/documentation/javascript/versions\n */\n v: optional(union([literal('weekly'), literal('quarterly'), literal('beta'), literal('alpha'), string()])),\n})"
|
|
304
318
|
},
|
|
305
319
|
{
|
|
306
320
|
name: "MapsNamespace",
|
|
@@ -377,7 +391,7 @@ const registryTypes = {
|
|
|
377
391
|
{
|
|
378
392
|
name: "GoogleRecaptchaOptions",
|
|
379
393
|
kind: "const",
|
|
380
|
-
code: "export const GoogleRecaptchaOptions = object({\n siteKey: string(),\n
|
|
394
|
+
code: "export const GoogleRecaptchaOptions = object({\n /**\n * Your reCAPTCHA site key.\n * @see https://developers.google.com/recaptcha/docs/display#render_param\n */\n siteKey: string(),\n /**\n * Use the Enterprise version of reCAPTCHA (enterprise.js instead of api.js).\n * @see https://cloud.google.com/recaptcha-enterprise/docs/introduction\n */\n enterprise: optional(boolean()),\n /**\n * Use recaptcha.net instead of google.com domain. Useful for regions where google.com is blocked.\n */\n recaptchaNet: optional(boolean()),\n /**\n * Language code for the reCAPTCHA widget.\n * @see https://developers.google.com/recaptcha/docs/language\n */\n hl: optional(string()),\n})"
|
|
381
395
|
},
|
|
382
396
|
{
|
|
383
397
|
name: "GoogleRecaptchaApi",
|
|
@@ -429,7 +443,7 @@ const registryTypes = {
|
|
|
429
443
|
{
|
|
430
444
|
name: "GoogleSignInOptions",
|
|
431
445
|
kind: "const",
|
|
432
|
-
code: "export const GoogleSignInOptions = object({\n clientId: string(),\n
|
|
446
|
+
code: "export const GoogleSignInOptions = object({\n /**\n * Your Google API client ID.\n * @example 'XXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.apps.googleusercontent.com'\n * @see https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid\n */\n clientId: string(),\n /**\n * Auto-select credentials when only one Google account is available.\n * @see https://developers.google.com/identity/gsi/web/reference/js-reference#auto_select\n */\n autoSelect: optional(boolean()),\n /**\n * The context text for the One Tap prompt.\n * @see https://developers.google.com/identity/gsi/web/reference/js-reference#context\n */\n context: optional(union([literal('signin'), literal('signup'), literal('use')])),\n /**\n * Enable FedCM (Federated Credential Management) API support. Mandatory from August 2025.\n * @see https://developers.google.com/identity/gsi/web/guides/fedcm-migration\n */\n useFedcmForPrompt: optional(boolean()),\n /**\n * Cancel the One Tap prompt if the user clicks outside.\n * @default true\n * @see https://developers.google.com/identity/gsi/web/reference/js-reference#cancel_on_tap_outside\n */\n cancelOnTapOutside: optional(boolean()),\n /**\n * The UX mode for the sign-in flow.\n * @see https://developers.google.com/identity/gsi/web/reference/js-reference#ux_mode\n */\n uxMode: optional(union([literal('popup'), literal('redirect')])),\n /**\n * The URI to redirect to after sign-in when using redirect UX mode.\n * @see https://developers.google.com/identity/gsi/web/reference/js-reference#login_uri\n */\n loginUri: optional(string()),\n /**\n * Enable Intelligent Tracking Prevention (ITP) support for Safari.\n * @see https://developers.google.com/identity/gsi/web/reference/js-reference#itp_support\n */\n itpSupport: optional(boolean()),\n /**\n * Allowed parent origin(s) for iframe embedding.\n * @see https://developers.google.com/identity/gsi/web/reference/js-reference#allowed_parent_origin\n */\n allowedParentOrigin: optional(union([string(), array(string())])),\n /**\n * Restrict sign-in to a specific Google Workspace hosted domain.\n * @example 'example.com'\n * @see https://developers.google.com/identity/gsi/web/reference/js-reference#hd\n */\n hd: optional(string()),\n})"
|
|
433
447
|
}
|
|
434
448
|
],
|
|
435
449
|
"google-tag-manager": [
|
|
@@ -476,15 +490,16 @@ const registryTypes = {
|
|
|
476
490
|
{
|
|
477
491
|
name: "GoogleTagManagerOptions",
|
|
478
492
|
kind: "const",
|
|
479
|
-
code: "export const GoogleTagManagerOptions = object({\n
|
|
493
|
+
code: "export const GoogleTagManagerOptions = object({\n /**\n * GTM container ID (format: GTM-XXXXXX)\n * @see https://developers.google.com/tag-platform/tag-manager/web#install-the-container\n */\n id: string(),\n\n /**\n * Optional dataLayer variable name\n * @default 'dataLayer'\n * @see https://developers.google.com/tag-platform/tag-manager/web/datalayer#rename_the_data_layer\n */\n l: optional(string()),\n\n /**\n * Authentication token for environment-specific container versions\n * @see https://support.google.com/tagmanager/answer/6328337\n */\n auth: optional(string()),\n\n /**\n * Preview environment name\n * @see https://support.google.com/tagmanager/answer/6328337\n */\n preview: optional(string()),\n\n /** Forces GTM cookies to take precedence when true */\n cookiesWin: optional(union([boolean(), literal('x')])),\n\n /**\n * Enables debug mode when true\n * @see https://support.google.com/tagmanager/answer/6107056\n */\n debug: optional(union([boolean(), literal('x')])),\n\n /**\n * No Personal Advertising - disables advertising features when true\n * @see https://developers.google.com/tag-platform/tag-manager/templates/consent-apis\n */\n npa: optional(union([boolean(), literal('1')])),\n\n /** Custom dataLayer name (alternative to \"l\" property) */\n dataLayer: optional(string()),\n\n /**\n * Environment name for environment-specific container\n * @see https://support.google.com/tagmanager/answer/6328337\n */\n envName: optional(string()),\n\n /** Referrer policy for analytics requests */\n authReferrerPolicy: optional(string()),\n\n /**\n * Default consent settings for GTM\n * @see https://developers.google.com/tag-platform/tag-manager/templates/consent-apis\n */\n defaultConsent: optional(record(string(), union([string(), number()]))),\n})"
|
|
480
494
|
}
|
|
481
495
|
],
|
|
496
|
+
gravatar: gravatar,
|
|
482
497
|
hotjar: hotjar,
|
|
483
498
|
"instagram-embed": [
|
|
484
499
|
{
|
|
485
500
|
name: "InstagramEmbedOptions",
|
|
486
501
|
kind: "const",
|
|
487
|
-
code: "export const InstagramEmbedOptions = object({\n /**\n * The Instagram post URL to embed
|
|
502
|
+
code: "export const InstagramEmbedOptions = object({\n /**\n * The Instagram post URL to embed.\n * @example 'https://www.instagram.com/p/C_XXXXXXXXX/'\n * @see https://developers.facebook.com/docs/instagram/oembed/\n */\n postUrl: string(),\n /**\n * Whether to include captions in the embed.\n * @default true\n */\n captions: optional(boolean()),\n /**\n * Custom API endpoint for fetching embed HTML.\n * @default '/api/_scripts/instagram-embed'\n */\n apiEndpoint: optional(string()),\n})"
|
|
488
503
|
},
|
|
489
504
|
{
|
|
490
505
|
name: "ScriptInstagramEmbedProps",
|
|
@@ -524,7 +539,7 @@ const registryTypes = {
|
|
|
524
539
|
{
|
|
525
540
|
name: "MatomoAnalyticsOptions",
|
|
526
541
|
kind: "const",
|
|
527
|
-
code: "export const MatomoAnalyticsOptions = object({\n matomoUrl: optional(string()),\n siteId: optional(union([string(), number()])),\n cloudId: optional(string()),\n trackerUrl: optional(string()),\n trackPageView: optional(boolean()),\n enableLinkTracking: optional(boolean()),\n disableCookies: optional(boolean()),\n watch: optional(boolean()),\n})"
|
|
542
|
+
code: "export const MatomoAnalyticsOptions = object({\n /**\n * The URL of your self-hosted Matomo instance.\n * Either `matomoUrl` or `cloudId` is required.\n * @example 'https://matomo.example.com'\n * @see https://developer.matomo.org/guides/tracking-javascript-guide\n */\n matomoUrl: optional(string()),\n /**\n * Your Matomo site ID.\n * @default '1'\n */\n siteId: optional(union([string(), number()])),\n /**\n * Your Matomo Cloud ID (the subdomain portion of your `*.matomo.cloud` URL).\n * Either `matomoUrl` or `cloudId` is required.\n * @example 'mysite.matomo.cloud'\n */\n cloudId: optional(string()),\n /**\n * A custom tracker URL. Overrides the default tracker endpoint derived from `matomoUrl` or `cloudId`.\n */\n trackerUrl: optional(string()),\n /**\n * Whether to track the initial page view on load.\n * @deprecated Use `watch: true` (default) for automatic page view tracking.\n */\n trackPageView: optional(boolean()),\n /**\n * Enable download and outlink tracking.\n */\n enableLinkTracking: optional(boolean()),\n /**\n * Disable all tracking cookies for cookieless analytics.\n */\n disableCookies: optional(boolean()),\n /**\n * Automatically track page views on route change.\n * @default true\n */\n watch: optional(boolean()),\n})"
|
|
528
543
|
},
|
|
529
544
|
{
|
|
530
545
|
name: "MatomoAnalyticsApi",
|
|
@@ -566,7 +581,7 @@ const registryTypes = {
|
|
|
566
581
|
{
|
|
567
582
|
name: "MetaPixelOptions",
|
|
568
583
|
kind: "const",
|
|
569
|
-
code: "export const MetaPixelOptions = object({\n id: union([string(), number()]),\n})"
|
|
584
|
+
code: "export const MetaPixelOptions = object({\n /**\n * Your Meta (Facebook) Pixel ID.\n * @see https://developers.facebook.com/docs/meta-pixel/get-started\n */\n id: union([string(), number()]),\n})"
|
|
570
585
|
}
|
|
571
586
|
],
|
|
572
587
|
npm: npm,
|
|
@@ -608,14 +623,14 @@ const registryTypes = {
|
|
|
608
623
|
{
|
|
609
624
|
name: "RedditPixelOptions",
|
|
610
625
|
kind: "const",
|
|
611
|
-
code: "export const RedditPixelOptions = object({\n id: string(),\n})"
|
|
626
|
+
code: "export const RedditPixelOptions = object({\n /**\n * Your Reddit Pixel advertiser ID.\n * @see https://reddithelp.com/en/categories/advertising/managing-ads/installing-reddit-pixel\n */\n id: string(),\n})"
|
|
612
627
|
}
|
|
613
628
|
],
|
|
614
629
|
"rybbit-analytics": [
|
|
615
630
|
{
|
|
616
631
|
name: "RybbitAnalyticsOptions",
|
|
617
632
|
kind: "const",
|
|
618
|
-
code: "export const RybbitAnalyticsOptions = object({\n siteId: union([string(), number()])
|
|
633
|
+
code: "export const RybbitAnalyticsOptions = object({\n /**\n * Your Rybbit site ID.\n * @see https://rybbit.io/docs\n */\n siteId: union([string(), number()]),\n /**\n * Automatically track page views.\n * @default true\n */\n autoTrackPageview: optional(boolean()),\n /**\n * Enable SPA (single-page app) route tracking.\n * @default true\n */\n trackSpa: optional(boolean()),\n /**\n * Include query parameters in tracked URLs.\n */\n trackQuery: optional(boolean()),\n /**\n * Track outbound link clicks.\n */\n trackOutbound: optional(boolean()),\n /**\n * Track JavaScript errors.\n */\n trackErrors: optional(boolean()),\n /**\n * Enable session replay recording.\n */\n sessionReplay: optional(boolean()),\n /**\n * Enable Web Vitals tracking (LCP, FID, CLS, etc.).\n */\n webVitals: optional(boolean()),\n /**\n * URL patterns to skip from tracking (glob syntax).\n */\n skipPatterns: optional(array(string())),\n /**\n * URL patterns to mask in tracked data (glob syntax).\n */\n maskPatterns: optional(array(string())),\n /**\n * Debounce interval (in ms) for page view tracking.\n */\n debounce: optional(number()),\n /**\n * API key for authenticated tracking.\n */\n apiKey: optional(string()),\n})"
|
|
619
634
|
},
|
|
620
635
|
{
|
|
621
636
|
name: "RybbitAnalyticsApi",
|
|
@@ -630,6 +645,16 @@ const registryTypes = {
|
|
|
630
645
|
],
|
|
631
646
|
segment: segment,
|
|
632
647
|
"snapchat-pixel": [
|
|
648
|
+
{
|
|
649
|
+
name: "InitObjectPropertiesSchema",
|
|
650
|
+
kind: "const",
|
|
651
|
+
code: "export const InitObjectPropertiesSchema = object({\n /**\n * The user's email address (for matching).\n */\n user_email: optional(string()),\n /**\n * The user's IP address.\n */\n ip_address: optional(string()),\n /**\n * The user's phone number (for matching).\n */\n user_phone_number: optional(string()),\n /**\n * SHA-256 hashed email address.\n */\n user_hashed_email: optional(string()),\n /**\n * SHA-256 hashed phone number.\n */\n user_hashed_phone_number: optional(string()),\n /**\n * The user's first name.\n */\n firstname: optional(string()),\n /**\n * The user's last name.\n */\n lastname: optional(string()),\n /**\n * The user's city.\n */\n geo_city: optional(string()),\n /**\n * The user's region/state.\n */\n geo_region: optional(string()),\n /**\n * The user's postal/zip code.\n */\n geo_postal_code: optional(string()),\n /**\n * The user's country code.\n */\n geo_country: optional(string()),\n /**\n * The user's age.\n */\n age: optional(string()),\n})"
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
name: "SnapTrPixelOptions",
|
|
655
|
+
kind: "const",
|
|
656
|
+
code: "export const SnapTrPixelOptions = object({\n /**\n * Your Snapchat Pixel ID.\n * @see https://businesshelp.snapchat.com/s/article/pixel-website-install\n */\n id: string(),\n /**\n * Whether to automatically track a `PAGE_VIEW` event on initialization.\n */\n trackPageView: optional(boolean()),\n ...(InitObjectPropertiesSchema?.entries || {}),\n})"
|
|
657
|
+
},
|
|
633
658
|
{
|
|
634
659
|
name: "StandardEvents",
|
|
635
660
|
kind: "type",
|
|
@@ -640,11 +665,6 @@ const registryTypes = {
|
|
|
640
665
|
kind: "interface",
|
|
641
666
|
code: "interface EventObjectProperties {\n price?: number\n client_dedup_id?: string\n currency?: string\n transaction_id?: string\n item_ids?: string[]\n item_category?: string\n description?: string\n search_string?: string\n number_items?: number\n payment_info_available?: 0 | 1\n sign_up_method?: string\n success?: 0 | 1\n brands?: string[]\n delivery_method?: 'in_store' | 'curbside' | 'delivery'\n customer_status?: 'new' | 'returning' | 'reactivated'\n event_tag?: string\n [key: string]: any\n}"
|
|
642
667
|
},
|
|
643
|
-
{
|
|
644
|
-
name: "InitObjectPropertiesSchema",
|
|
645
|
-
kind: "const",
|
|
646
|
-
code: "export const InitObjectPropertiesSchema = object({\n user_email: optional(string()),\n ip_address: optional(string()),\n user_phone_number: optional(string()),\n user_hashed_email: optional(string()),\n user_hashed_phone_number: optional(string()),\n firstname: optional(string()),\n lastname: optional(string()),\n geo_city: optional(string()),\n geo_region: optional(string()),\n geo_postal_code: optional(string()),\n geo_country: optional(string()),\n age: optional(string()),\n})"
|
|
647
|
-
},
|
|
648
668
|
{
|
|
649
669
|
name: "InitObjectProperties",
|
|
650
670
|
kind: "type",
|
|
@@ -659,11 +679,6 @@ const registryTypes = {
|
|
|
659
679
|
name: "SnapPixelApi",
|
|
660
680
|
kind: "interface",
|
|
661
681
|
code: "export interface SnapPixelApi {\n snaptr: SnapTrFns & {\n push: SnapTrFns\n loaded: boolean\n version: string\n queue: any[]\n }\n _snaptr: SnapPixelApi['snaptr']\n handleRequest?: SnapTrFns\n}"
|
|
662
|
-
},
|
|
663
|
-
{
|
|
664
|
-
name: "SnapTrPixelOptions",
|
|
665
|
-
kind: "const",
|
|
666
|
-
code: "export const SnapTrPixelOptions = object({\n id: string(),\n trackPageView: optional(boolean()),\n ...(InitObjectPropertiesSchema?.entries || {}),\n})"
|
|
667
682
|
}
|
|
668
683
|
],
|
|
669
684
|
stripe: stripe,
|
|
@@ -696,20 +711,52 @@ const registryTypes = {
|
|
|
696
711
|
{
|
|
697
712
|
name: "TikTokPixelOptions",
|
|
698
713
|
kind: "const",
|
|
699
|
-
code: "export const TikTokPixelOptions = object({\n id: string(),\n trackPageView: optional(boolean())
|
|
714
|
+
code: "export const TikTokPixelOptions = object({\n /**\n * Your TikTok Pixel ID.\n * @see https://ads.tiktok.com/help/article/get-started-pixel\n */\n id: string(),\n /**\n * Whether to automatically track a page view on initialization.\n * @default true\n */\n trackPageView: optional(boolean()),\n})"
|
|
700
715
|
}
|
|
701
716
|
],
|
|
702
717
|
"umami-analytics": [
|
|
703
718
|
{
|
|
704
719
|
name: "UmamiAnalyticsOptions",
|
|
705
720
|
kind: "const",
|
|
706
|
-
code: "export const UmamiAnalyticsOptions = object({\n websiteId: string(), // required\n /**\n * By default, Umami will send data to wherever the script is located.\n * You can override this to send data to another location.\n */\n hostUrl: optional(string()),\n /**\n * By default, Umami tracks all pageviews and events for you automatically.\n * You can disable this behavior and track events yourself using the tracker functions.\n * https://umami.is/docs/tracker-functions\n */\n autoTrack: optional(boolean()),\n /**\n * If you want the tracker to only run on specific domains, you can add them to your tracker script.\n * This is a comma delimited list of domain names.\n * Helps if you are working in a staging/development environment.\n */\n domains: optional(array(string())),\n /**\n * If you want the tracker to collect events under a specific tag.\n * Events can be filtered in the dashboard by a specific tag.\n */\n tag: optional(string()),\n /**\n * Function that will be called before data is sent to Umami.\n * The function takes two parameters: type and payload.\n * Return the payload to continue sending, or return a falsy value to cancel.\n */\n beforeSend: optional(union([\n custom<(type: string, payload: Record<string, any>) => Record<string, any> | null | false>(input => typeof input === 'function'),\n string(),\n ])),\n})"
|
|
721
|
+
code: "export const UmamiAnalyticsOptions = object({\n /**\n * Your Umami website ID.\n * @see https://umami.is/docs/tracker-config\n */\n websiteId: string(), // required\n /**\n * By default, Umami will send data to wherever the script is located.\n * You can override this to send data to another location.\n * @see https://umami.is/docs/tracker-config#data-host-url\n */\n hostUrl: optional(string()),\n /**\n * By default, Umami tracks all pageviews and events for you automatically.\n * You can disable this behavior and track events yourself using the tracker functions.\n * @default true\n * @see https://umami.is/docs/tracker-functions\n */\n autoTrack: optional(boolean()),\n /**\n * If you want the tracker to only run on specific domains, you can add them to your tracker script.\n * This is a comma delimited list of domain names.\n * Helps if you are working in a staging/development environment.\n * @see https://umami.is/docs/tracker-config#data-domains\n */\n domains: optional(array(string())),\n /**\n * If you want the tracker to collect events under a specific tag.\n * Events can be filtered in the dashboard by a specific tag.\n * @see https://umami.is/docs/tracker-config#data-tag\n */\n tag: optional(string()),\n /**\n * Function that will be called before data is sent to Umami.\n * The function takes two parameters: type and payload.\n * Return the payload to continue sending, or return a falsy value to cancel.\n * @see https://umami.is/docs/tracker-config#data-before-send\n */\n beforeSend: optional(union([\n custom<(type: string, payload: Record<string, any>) => Record<string, any> | null | false>(input => typeof input === 'function'),\n string(),\n ])),\n})"
|
|
707
722
|
},
|
|
708
723
|
{
|
|
709
724
|
name: "UmamiAnalyticsApi",
|
|
710
725
|
kind: "interface",
|
|
711
726
|
code: "export interface UmamiAnalyticsApi {\n track: ((payload?: Record<string, any>) => void) & ((event_name: string, event_data: Record<string, any>) => void)\n identify: (session_data?: Record<string, any> | string) => void\n}"
|
|
712
727
|
}
|
|
728
|
+
],
|
|
729
|
+
"vercel-analytics": [
|
|
730
|
+
{
|
|
731
|
+
name: "VercelAnalyticsOptions",
|
|
732
|
+
kind: "const",
|
|
733
|
+
code: "export const VercelAnalyticsOptions = object({\n /**\n * The DSN of the project to send events to.\n * Only required when self-hosting or deploying outside of Vercel.\n */\n dsn: optional(string()),\n /**\n * Whether to disable automatic page view tracking on route changes.\n * Set to true if you want to manually call pageview().\n */\n disableAutoTrack: optional(boolean()),\n /**\n * The mode to use for the analytics script.\n * - `auto` - Automatically detect the environment (default)\n * - `production` - Always use production script\n * - `development` - Always use development script (logs to console)\n */\n mode: optional(union([literal('auto'), literal('development'), literal('production')])),\n /**\n * Whether to enable debug logging.\n * Automatically enabled in development/test environments.\n */\n debug: optional(boolean()),\n /**\n * Custom endpoint for data collection.\n * Useful for self-hosted or proxied setups.\n */\n endpoint: optional(string()),\n})"
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
name: "AllowedPropertyValues",
|
|
737
|
+
kind: "type",
|
|
738
|
+
code: "export type AllowedPropertyValues = string | number | boolean | null"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
name: "VercelAnalyticsMode",
|
|
742
|
+
kind: "type",
|
|
743
|
+
code: "export type VercelAnalyticsMode = 'auto' | 'development' | 'production'"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
name: "BeforeSendEvent",
|
|
747
|
+
kind: "interface",
|
|
748
|
+
code: "export interface BeforeSendEvent {\n type: 'pageview' | 'event'\n url: string\n}"
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
name: "BeforeSend",
|
|
752
|
+
kind: "type",
|
|
753
|
+
code: "export type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
name: "VercelAnalyticsApi",
|
|
757
|
+
kind: "interface",
|
|
758
|
+
code: "export interface VercelAnalyticsApi {\n va: (event: string, properties?: unknown) => void\n track: (name: string, properties?: Record<string, AllowedPropertyValues>) => void\n pageview: (options?: { route?: string | null, path?: string }) => void\n}"
|
|
759
|
+
}
|
|
713
760
|
],
|
|
714
761
|
"vimeo-player": [
|
|
715
762
|
{
|
|
@@ -734,20 +781,20 @@ const registryTypes = {
|
|
|
734
781
|
}
|
|
735
782
|
],
|
|
736
783
|
"x-embed": [
|
|
784
|
+
{
|
|
785
|
+
name: "XEmbedOptions",
|
|
786
|
+
kind: "const",
|
|
787
|
+
code: "export const XEmbedOptions = object({\n /**\n * The tweet ID to embed.\n * @example '1754336034228171055'\n * @see https://developer.x.com/en/docs/twitter-for-websites/embedded-tweets/overview\n */\n tweetId: string(),\n /**\n * Optional: Custom API endpoint for fetching tweet data.\n * @default '/api/_scripts/x-embed'\n */\n apiEndpoint: optional(string()),\n /**\n * Optional: Custom image proxy endpoint.\n * @default '/api/_scripts/x-embed-image'\n */\n imageProxyEndpoint: optional(string()),\n})"
|
|
788
|
+
},
|
|
737
789
|
{
|
|
738
790
|
name: "XEmbedTweetData",
|
|
739
791
|
kind: "interface",
|
|
740
792
|
code: "export interface XEmbedTweetData {\n id_str: string\n text: string\n created_at: string\n favorite_count: number\n conversation_count: number\n user: {\n name: string\n screen_name: string\n profile_image_url_https: string\n verified?: boolean\n is_blue_verified?: boolean\n }\n entities?: {\n media?: Array<{\n media_url_https: string\n type: string\n sizes: Record<string, { w: number, h: number }>\n }>\n urls?: Array<{\n url: string\n expanded_url: string\n display_url: string\n }>\n }\n photos?: Array<{\n url: string\n width: number\n height: number\n }>\n video?: {\n poster: string\n variants: Array<{ type: string, src: string }>\n }\n quoted_tweet?: XEmbedTweetData\n parent?: {\n user: {\n screen_name: string\n }\n }\n}"
|
|
741
793
|
},
|
|
742
|
-
{
|
|
743
|
-
name: "XEmbedOptions",
|
|
744
|
-
kind: "const",
|
|
745
|
-
code: "export const XEmbedOptions = object({\n /**\n * The tweet ID to embed\n */\n tweetId: string(),\n /**\n * Optional: Custom API endpoint for fetching tweet data\n * @default '/api/_scripts/x-embed'\n */\n apiEndpoint: optional(string()),\n /**\n * Optional: Custom image proxy endpoint\n * @default '/api/_scripts/x-embed-image'\n */\n imageProxyEndpoint: optional(string()),\n})"
|
|
746
|
-
},
|
|
747
794
|
{
|
|
748
795
|
name: "ScriptXEmbedProps",
|
|
749
796
|
kind: "interface",
|
|
750
|
-
code: "interface ScriptXEmbedProps {\n /**\n * The tweet ID to embed\n */\n tweetId: string\n /**\n * Custom API endpoint for fetching tweet data\n * @default '/_scripts/x-embed'\n */\n apiEndpoint?: string\n /**\n * Custom image proxy endpoint\n * @default '/_scripts/x-embed-image'\n */\n imageProxyEndpoint?: string\n /**\n * Root element attributes\n */\n rootAttrs?: HTMLAttributes\n}"
|
|
797
|
+
code: "interface ScriptXEmbedProps {\n /**\n * The tweet ID to embed\n */\n tweetId: string\n /**\n * Custom API endpoint for fetching tweet data\n * @default '/api/_scripts/x-embed'\n */\n apiEndpoint?: string\n /**\n * Custom image proxy endpoint\n * @default '/_scripts/x-embed-image'\n */\n imageProxyEndpoint?: string\n /**\n * Root element attributes\n */\n rootAttrs?: HTMLAttributes\n}"
|
|
751
798
|
},
|
|
752
799
|
{
|
|
753
800
|
name: "ScriptXEmbedDefaults",
|
|
@@ -779,7 +826,7 @@ const registryTypes = {
|
|
|
779
826
|
{
|
|
780
827
|
name: "XPixelOptions",
|
|
781
828
|
kind: "const",
|
|
782
|
-
code: "export const XPixelOptions = object({\n id: string(),\n version: optional(string()),\n})"
|
|
829
|
+
code: "export const XPixelOptions = object({\n /**\n * Your X (Twitter) Pixel ID.\n * @see https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html\n */\n id: string(),\n /**\n * The X Pixel script version.\n * @default '1.1'\n */\n version: optional(string()),\n})"
|
|
783
830
|
}
|
|
784
831
|
],
|
|
785
832
|
"youtube-player": [
|
|
@@ -808,392 +855,110 @@ const registryTypes = {
|
|
|
808
855
|
]
|
|
809
856
|
};
|
|
810
857
|
|
|
811
|
-
const ClarityOptions = object({
|
|
812
|
-
/**
|
|
813
|
-
* The Clarity token.
|
|
814
|
-
*/
|
|
815
|
-
id: pipe(string(), minLength(10))
|
|
816
|
-
});
|
|
817
|
-
const CloudflareWebAnalyticsOptions = object({
|
|
818
|
-
/**
|
|
819
|
-
* The Cloudflare Web Analytics token.
|
|
820
|
-
*/
|
|
821
|
-
token: pipe(string(), minLength(32)),
|
|
822
|
-
/**
|
|
823
|
-
* Cloudflare Web Analytics enables measuring SPAs automatically by overriding the History API’s pushState function
|
|
824
|
-
* and listening to the onpopstate. Hash-based router is not supported.
|
|
825
|
-
*
|
|
826
|
-
* @default true
|
|
827
|
-
*/
|
|
828
|
-
spa: optional(boolean())
|
|
829
|
-
});
|
|
830
|
-
const CrispOptions = object({
|
|
831
|
-
/**
|
|
832
|
-
* The Crisp ID.
|
|
833
|
-
*/
|
|
834
|
-
id: string(),
|
|
835
|
-
/**
|
|
836
|
-
* Extra configuration options. Used to configure the locale.
|
|
837
|
-
* Same as CRISP_RUNTIME_CONFIG.
|
|
838
|
-
* @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/language-customization/
|
|
839
|
-
*/
|
|
840
|
-
runtimeConfig: optional(object({
|
|
841
|
-
locale: optional(string())
|
|
842
|
-
})),
|
|
843
|
-
/**
|
|
844
|
-
* Associated a session, equivalent to using CRISP_TOKEN_ID variable.
|
|
845
|
-
* Same as CRISP_TOKEN_ID.
|
|
846
|
-
* @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/session-continuity/
|
|
847
|
-
*/
|
|
848
|
-
tokenId: optional(string()),
|
|
849
|
-
/**
|
|
850
|
-
* Restrict the domain that the Crisp cookie is set on.
|
|
851
|
-
* Same as CRISP_COOKIE_DOMAIN.
|
|
852
|
-
* @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/cookie-policies/
|
|
853
|
-
*/
|
|
854
|
-
cookieDomain: optional(string()),
|
|
855
|
-
/**
|
|
856
|
-
* The cookie expiry in seconds.
|
|
857
|
-
* Same as CRISP_COOKIE_EXPIRATION.
|
|
858
|
-
* @see https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/cookie-policies/#change-cookie-expiration-date
|
|
859
|
-
*/
|
|
860
|
-
cookieExpiry: optional(number())
|
|
861
|
-
});
|
|
862
|
-
const DatabuddyAnalyticsOptions = object({
|
|
863
|
-
// Required
|
|
864
|
-
clientId: string(),
|
|
865
|
-
// Advanced
|
|
866
|
-
scriptUrl: optional(string()),
|
|
867
|
-
// defaults to https://cdn.databuddy.cc/databuddy.js
|
|
868
|
-
apiUrl: optional(string()),
|
|
869
|
-
// defaults to https://basket.databuddy.cc
|
|
870
|
-
disabled: optional(boolean()),
|
|
871
|
-
// Core tracking (enabled by default by SDK)
|
|
872
|
-
trackScreenViews: optional(boolean()),
|
|
873
|
-
trackPerformance: optional(boolean()),
|
|
874
|
-
trackSessions: optional(boolean()),
|
|
875
|
-
// Optional tracking
|
|
876
|
-
trackWebVitals: optional(boolean()),
|
|
877
|
-
trackErrors: optional(boolean()),
|
|
878
|
-
trackOutgoingLinks: optional(boolean()),
|
|
879
|
-
trackScrollDepth: optional(boolean()),
|
|
880
|
-
trackEngagement: optional(boolean()),
|
|
881
|
-
trackInteractions: optional(boolean()),
|
|
882
|
-
trackAttributes: optional(boolean()),
|
|
883
|
-
trackHashChanges: optional(boolean()),
|
|
884
|
-
trackExitIntent: optional(boolean()),
|
|
885
|
-
trackBounceRate: optional(boolean()),
|
|
886
|
-
// Performance options
|
|
887
|
-
enableBatching: optional(boolean()),
|
|
888
|
-
batchSize: optional(number()),
|
|
889
|
-
batchTimeout: optional(number()),
|
|
890
|
-
enableRetries: optional(boolean()),
|
|
891
|
-
maxRetries: optional(number()),
|
|
892
|
-
initialRetryDelay: optional(number()),
|
|
893
|
-
samplingRate: optional(number()),
|
|
894
|
-
// SDK metadata
|
|
895
|
-
sdk: optional(string()),
|
|
896
|
-
sdkVersion: optional(string()),
|
|
897
|
-
// Observability & logging (accepted by SDK config)
|
|
898
|
-
enableObservability: optional(boolean()),
|
|
899
|
-
observabilityService: optional(string()),
|
|
900
|
-
observabilityEnvironment: optional(string()),
|
|
901
|
-
observabilityVersion: optional(string()),
|
|
902
|
-
enableLogging: optional(boolean()),
|
|
903
|
-
enableTracing: optional(boolean()),
|
|
904
|
-
enableErrorTracking: optional(boolean())
|
|
905
|
-
});
|
|
906
|
-
const FathomAnalyticsOptions = object({
|
|
907
|
-
/**
|
|
908
|
-
* The Fathom Analytics site ID.
|
|
909
|
-
*/
|
|
910
|
-
site: string(),
|
|
911
|
-
/**
|
|
912
|
-
* The Fathom Analytics tracking mode.
|
|
913
|
-
*/
|
|
914
|
-
spa: optional(union([literal("auto"), literal("history"), literal("hash")])),
|
|
915
|
-
/**
|
|
916
|
-
* Automatically track page views.
|
|
917
|
-
*/
|
|
918
|
-
auto: optional(boolean()),
|
|
919
|
-
/**
|
|
920
|
-
* Enable canonical URL tracking.
|
|
921
|
-
*/
|
|
922
|
-
canonical: optional(boolean()),
|
|
923
|
-
/**
|
|
924
|
-
* Honor Do Not Track requests.
|
|
925
|
-
*/
|
|
926
|
-
honorDnt: optional(boolean())
|
|
927
|
-
});
|
|
928
|
-
const GoogleAdsenseOptions = object({
|
|
929
|
-
/**
|
|
930
|
-
* The Google Adsense ID.
|
|
931
|
-
*/
|
|
932
|
-
client: optional(string()),
|
|
933
|
-
/**
|
|
934
|
-
* Enable or disable Auto Ads.
|
|
935
|
-
*/
|
|
936
|
-
autoAds: optional(boolean())
|
|
937
|
-
});
|
|
938
|
-
const GoogleAnalyticsOptions = object({
|
|
939
|
-
id: optional(string()),
|
|
940
|
-
// The GA4 measurement ID (format: G-XXXXXXXX)
|
|
941
|
-
l: optional(string())
|
|
942
|
-
// Optional global name for dataLayer (defaults to 'dataLayer')
|
|
943
|
-
});
|
|
944
|
-
const GoogleMapsOptions = object({
|
|
945
|
-
apiKey: string(),
|
|
946
|
-
libraries: optional(array(string())),
|
|
947
|
-
language: optional(string()),
|
|
948
|
-
region: optional(string()),
|
|
949
|
-
v: optional(union([literal("weekly"), literal("quarterly"), literal("beta"), literal("alpha"), string()]))
|
|
950
|
-
});
|
|
951
|
-
const GoogleRecaptchaOptions = object({
|
|
952
|
-
siteKey: string(),
|
|
953
|
-
// Use enterprise.js instead of api.js
|
|
954
|
-
enterprise: optional(boolean()),
|
|
955
|
-
// Use recaptcha.net (works in China)
|
|
956
|
-
recaptchaNet: optional(boolean()),
|
|
957
|
-
// Language code
|
|
958
|
-
hl: optional(string())
|
|
959
|
-
});
|
|
960
|
-
const GoogleSignInOptions = object({
|
|
961
|
-
clientId: string(),
|
|
962
|
-
// Auto-select credentials if only one is available
|
|
963
|
-
autoSelect: optional(boolean()),
|
|
964
|
-
// Context for One Tap (signin, signup, or use)
|
|
965
|
-
context: optional(union([literal("signin"), literal("signup"), literal("use")])),
|
|
966
|
-
// FedCM API support (Privacy Sandbox) - mandatory from August 2025
|
|
967
|
-
useFedcmForPrompt: optional(boolean()),
|
|
968
|
-
// Cancel One Tap if user clicks outside
|
|
969
|
-
cancelOnTapOutside: optional(boolean()),
|
|
970
|
-
// UX mode: popup or redirect
|
|
971
|
-
uxMode: optional(union([literal("popup"), literal("redirect")])),
|
|
972
|
-
// Login URI for redirect flow
|
|
973
|
-
loginUri: optional(string()),
|
|
974
|
-
// ITP (Intelligent Tracking Prevention) support
|
|
975
|
-
itpSupport: optional(boolean()),
|
|
976
|
-
// Allowed parent origins for iframe embedding
|
|
977
|
-
allowedParentOrigin: optional(union([string(), array(string())])),
|
|
978
|
-
// Hosted domain - restrict to specific Google Workspace domain
|
|
979
|
-
hd: optional(string())
|
|
980
|
-
});
|
|
981
|
-
const GoogleTagManagerOptions = object({
|
|
982
|
-
/** GTM container ID (format: GTM-XXXXXX) */
|
|
983
|
-
id: string(),
|
|
984
|
-
/** Optional dataLayer variable name */
|
|
985
|
-
l: optional(string()),
|
|
986
|
-
/** Authentication token for environment-specific container versions */
|
|
987
|
-
auth: optional(string()),
|
|
988
|
-
/** Preview environment name */
|
|
989
|
-
preview: optional(string()),
|
|
990
|
-
/** Forces GTM cookies to take precedence when true */
|
|
991
|
-
cookiesWin: optional(union([boolean(), literal("x")])),
|
|
992
|
-
/** Enables debug mode when true */
|
|
993
|
-
debug: optional(union([boolean(), literal("x")])),
|
|
994
|
-
/** No Personal Advertising - disables advertising features when true */
|
|
995
|
-
npa: optional(union([boolean(), literal("1")])),
|
|
996
|
-
/** Custom dataLayer name (alternative to "l" property) */
|
|
997
|
-
dataLayer: optional(string()),
|
|
998
|
-
/** Environment name for environment-specific container */
|
|
999
|
-
envName: optional(string()),
|
|
1000
|
-
/** Referrer policy for analytics requests */
|
|
1001
|
-
authReferrerPolicy: optional(string()),
|
|
1002
|
-
/** Default consent settings for GTM */
|
|
1003
|
-
defaultConsent: optional(record(string(), union([string(), number()])))
|
|
1004
|
-
});
|
|
1005
|
-
const HotjarOptions = object({
|
|
1006
|
-
id: number(),
|
|
1007
|
-
sv: optional(number())
|
|
1008
|
-
});
|
|
1009
|
-
const InstagramEmbedOptions = object({
|
|
1010
|
-
/**
|
|
1011
|
-
* The Instagram post URL to embed
|
|
1012
|
-
* e.g., https://www.instagram.com/p/ABC123/
|
|
1013
|
-
*/
|
|
1014
|
-
postUrl: string(),
|
|
1015
|
-
/**
|
|
1016
|
-
* Whether to include captions in the embed
|
|
1017
|
-
* @default true
|
|
1018
|
-
*/
|
|
1019
|
-
captions: optional(boolean()),
|
|
1020
|
-
/**
|
|
1021
|
-
* Custom API endpoint for fetching embed HTML
|
|
1022
|
-
* @default '/api/_scripts/instagram-embed'
|
|
1023
|
-
*/
|
|
1024
|
-
apiEndpoint: optional(string())
|
|
1025
|
-
});
|
|
1026
|
-
const IntercomOptions = object({
|
|
1027
|
-
app_id: string(),
|
|
1028
|
-
api_base: optional(union([literal("https://api-iam.intercom.io"), literal("https://api-iam.eu.intercom.io"), literal("https://api-iam.au.intercom.io")])),
|
|
1029
|
-
name: optional(string()),
|
|
1030
|
-
email: optional(string()),
|
|
1031
|
-
user_id: optional(string()),
|
|
1032
|
-
// customizing the messenger
|
|
1033
|
-
alignment: optional(union([literal("left"), literal("right")])),
|
|
1034
|
-
horizontal_padding: optional(number()),
|
|
1035
|
-
vertical_padding: optional(number())
|
|
1036
|
-
});
|
|
1037
|
-
const MatomoAnalyticsOptions = object({
|
|
1038
|
-
matomoUrl: optional(string()),
|
|
1039
|
-
siteId: optional(union([string(), number()])),
|
|
1040
|
-
cloudId: optional(string()),
|
|
1041
|
-
trackerUrl: optional(string()),
|
|
1042
|
-
trackPageView: optional(boolean()),
|
|
1043
|
-
enableLinkTracking: optional(boolean()),
|
|
1044
|
-
disableCookies: optional(boolean()),
|
|
1045
|
-
watch: optional(boolean())
|
|
1046
|
-
});
|
|
1047
|
-
const MetaPixelOptions = object({
|
|
1048
|
-
id: union([string(), number()])
|
|
1049
|
-
});
|
|
1050
|
-
const NpmOptions = object({
|
|
1051
|
-
packageName: string(),
|
|
1052
|
-
file: optional(string()),
|
|
1053
|
-
version: optional(string()),
|
|
1054
|
-
provider: optional(union([literal("jsdelivr"), literal("cdnjs"), literal("unpkg")]))
|
|
1055
|
-
});
|
|
1056
|
-
const PayPalOptions = object({
|
|
1057
|
-
clientId: string(),
|
|
1058
|
-
buyerCountry: optional(string()),
|
|
1059
|
-
commit: optional(string()),
|
|
1060
|
-
components: optional(union([string(), array(string())])),
|
|
1061
|
-
currency: optional(string()),
|
|
1062
|
-
debug: optional(union([string(), boolean()])),
|
|
1063
|
-
disableFunding: optional(union([string(), array(string())])),
|
|
1064
|
-
enableFunding: optional(union([string(), array(string())])),
|
|
1065
|
-
integrationDate: optional(string()),
|
|
1066
|
-
intent: optional(string()),
|
|
1067
|
-
locale: optional(string()),
|
|
1068
|
-
/**
|
|
1069
|
-
* loadScript() supports an array for merchantId, even though
|
|
1070
|
-
* merchant-id technically may not contain multiple values.
|
|
1071
|
-
* For an array with a length of > 1 it automatically sets
|
|
1072
|
-
* merchantId to "*" and moves the actual values to dataMerchantId
|
|
1073
|
-
*/
|
|
1074
|
-
merchantId: optional(union([string(), array(string())])),
|
|
1075
|
-
partnerAttributionId: optional(string()),
|
|
1076
|
-
vault: optional(union([string(), boolean()])),
|
|
1077
|
-
// own props
|
|
1078
|
-
sandbox: optional(boolean())
|
|
1079
|
-
});
|
|
1080
|
-
const PostHogOptions = object({
|
|
1081
|
-
apiKey: string(),
|
|
1082
|
-
region: optional(union([literal("us"), literal("eu")])),
|
|
1083
|
-
apiHost: optional(string()),
|
|
1084
|
-
autocapture: optional(boolean()),
|
|
1085
|
-
capturePageview: optional(union([boolean(), literal("history_change")])),
|
|
1086
|
-
capturePageleave: optional(boolean()),
|
|
1087
|
-
disableSessionRecording: optional(boolean()),
|
|
1088
|
-
config: optional(record(string(), any()))
|
|
1089
|
-
});
|
|
1090
|
-
const RedditPixelOptions = object({
|
|
1091
|
-
id: string()
|
|
1092
|
-
});
|
|
1093
|
-
const RybbitAnalyticsOptions = object({
|
|
1094
|
-
siteId: union([string(), number()]),
|
|
1095
|
-
// required
|
|
1096
|
-
autoTrackPageview: optional(boolean()),
|
|
1097
|
-
trackSpa: optional(boolean()),
|
|
1098
|
-
trackQuery: optional(boolean()),
|
|
1099
|
-
trackOutbound: optional(boolean()),
|
|
1100
|
-
trackErrors: optional(boolean()),
|
|
1101
|
-
sessionReplay: optional(boolean()),
|
|
1102
|
-
webVitals: optional(boolean()),
|
|
1103
|
-
skipPatterns: optional(array(string())),
|
|
1104
|
-
maskPatterns: optional(array(string())),
|
|
1105
|
-
debounce: optional(number()),
|
|
1106
|
-
apiKey: optional(string())
|
|
1107
|
-
});
|
|
1108
|
-
const SegmentOptions = object({
|
|
1109
|
-
writeKey: string(),
|
|
1110
|
-
analyticsKey: optional(string())
|
|
1111
|
-
});
|
|
1112
|
-
const InitObjectPropertiesSchema = object({
|
|
1113
|
-
user_email: optional(string()),
|
|
1114
|
-
ip_address: optional(string()),
|
|
1115
|
-
user_phone_number: optional(string()),
|
|
1116
|
-
user_hashed_email: optional(string()),
|
|
1117
|
-
user_hashed_phone_number: optional(string()),
|
|
1118
|
-
firstname: optional(string()),
|
|
1119
|
-
lastname: optional(string()),
|
|
1120
|
-
geo_city: optional(string()),
|
|
1121
|
-
geo_region: optional(string()),
|
|
1122
|
-
geo_postal_code: optional(string()),
|
|
1123
|
-
geo_country: optional(string()),
|
|
1124
|
-
age: optional(string())
|
|
1125
|
-
});
|
|
1126
|
-
const SnapTrPixelOptions = object({
|
|
1127
|
-
id: string(),
|
|
1128
|
-
trackPageView: optional(boolean()),
|
|
1129
|
-
...InitObjectPropertiesSchema?.entries || {}
|
|
1130
|
-
});
|
|
1131
|
-
const StripeOptions = object({
|
|
1132
|
-
advancedFraudSignals: optional(boolean())
|
|
1133
|
-
});
|
|
1134
|
-
const TikTokPixelOptions = object({
|
|
1135
|
-
id: string(),
|
|
1136
|
-
trackPageView: optional(boolean())
|
|
1137
|
-
// default true
|
|
1138
|
-
});
|
|
1139
|
-
const UmamiAnalyticsOptions = object({
|
|
1140
|
-
websiteId: string(),
|
|
1141
|
-
// required
|
|
1142
|
-
/**
|
|
1143
|
-
* By default, Umami will send data to wherever the script is located.
|
|
1144
|
-
* You can override this to send data to another location.
|
|
1145
|
-
*/
|
|
1146
|
-
hostUrl: optional(string()),
|
|
1147
|
-
/**
|
|
1148
|
-
* By default, Umami tracks all pageviews and events for you automatically.
|
|
1149
|
-
* You can disable this behavior and track events yourself using the tracker functions.
|
|
1150
|
-
* https://umami.is/docs/tracker-functions
|
|
1151
|
-
*/
|
|
1152
|
-
autoTrack: optional(boolean()),
|
|
1153
|
-
/**
|
|
1154
|
-
* If you want the tracker to only run on specific domains, you can add them to your tracker script.
|
|
1155
|
-
* This is a comma delimited list of domain names.
|
|
1156
|
-
* Helps if you are working in a staging/development environment.
|
|
1157
|
-
*/
|
|
1158
|
-
domains: optional(array(string())),
|
|
1159
|
-
/**
|
|
1160
|
-
* If you want the tracker to collect events under a specific tag.
|
|
1161
|
-
* Events can be filtered in the dashboard by a specific tag.
|
|
1162
|
-
*/
|
|
1163
|
-
tag: optional(string()),
|
|
1164
|
-
/**
|
|
1165
|
-
* Function that will be called before data is sent to Umami.
|
|
1166
|
-
* The function takes two parameters: type and payload.
|
|
1167
|
-
* Return the payload to continue sending, or return a falsy value to cancel.
|
|
1168
|
-
*/
|
|
1169
|
-
beforeSend: optional(union([
|
|
1170
|
-
custom((input) => typeof input === "function"),
|
|
1171
|
-
string()
|
|
1172
|
-
]))
|
|
1173
|
-
});
|
|
1174
|
-
const XEmbedOptions = object({
|
|
1175
|
-
/**
|
|
1176
|
-
* The tweet ID to embed
|
|
1177
|
-
*/
|
|
1178
|
-
tweetId: string(),
|
|
1179
|
-
/**
|
|
1180
|
-
* Optional: Custom API endpoint for fetching tweet data
|
|
1181
|
-
* @default '/api/_scripts/x-embed'
|
|
1182
|
-
*/
|
|
1183
|
-
apiEndpoint: optional(string()),
|
|
1184
|
-
/**
|
|
1185
|
-
* Optional: Custom image proxy endpoint
|
|
1186
|
-
* @default '/api/_scripts/x-embed-image'
|
|
1187
|
-
*/
|
|
1188
|
-
imageProxyEndpoint: optional(string())
|
|
1189
|
-
});
|
|
1190
|
-
const XPixelOptions = object({
|
|
1191
|
-
id: string(),
|
|
1192
|
-
version: optional(string())
|
|
1193
|
-
});
|
|
1194
|
-
|
|
1195
858
|
function getRegistryTypes() {
|
|
1196
859
|
return registryTypes;
|
|
1197
860
|
}
|
|
861
|
+
function resolveType(schema) {
|
|
862
|
+
if (!schema)
|
|
863
|
+
return "unknown";
|
|
864
|
+
switch (schema.type) {
|
|
865
|
+
case "string":
|
|
866
|
+
return "string";
|
|
867
|
+
case "number":
|
|
868
|
+
return "number";
|
|
869
|
+
case "boolean":
|
|
870
|
+
return "boolean";
|
|
871
|
+
case "array":
|
|
872
|
+
return `${resolveType(schema.item)}[]`;
|
|
873
|
+
case "object":
|
|
874
|
+
return "object";
|
|
875
|
+
case "union":
|
|
876
|
+
return schema.options?.map((o) => resolveType(o)).join(" | ") || "unknown";
|
|
877
|
+
case "literal":
|
|
878
|
+
return typeof schema.literal === "string" ? `'${schema.literal}'` : String(schema.literal);
|
|
879
|
+
case "record":
|
|
880
|
+
return `Record<${resolveType(schema.key)}, ${resolveType(schema.value)}>`;
|
|
881
|
+
case "custom":
|
|
882
|
+
return "Function";
|
|
883
|
+
case "any":
|
|
884
|
+
return "any";
|
|
885
|
+
default:
|
|
886
|
+
return schema.type || "unknown";
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
function parseComments(code) {
|
|
890
|
+
const result = {};
|
|
891
|
+
const lines = code.split("\n");
|
|
892
|
+
let desc = "";
|
|
893
|
+
let def = "";
|
|
894
|
+
for (const line of lines) {
|
|
895
|
+
if (/^\s*\/\*\*/.test(line)) {
|
|
896
|
+
desc = "";
|
|
897
|
+
def = "";
|
|
898
|
+
continue;
|
|
899
|
+
}
|
|
900
|
+
if (/^\s*\*\//.test(line))
|
|
901
|
+
continue;
|
|
902
|
+
const docLine = line.match(/^\s*\*\s?(.*)/);
|
|
903
|
+
if (docLine) {
|
|
904
|
+
const content = docLine[1].trim();
|
|
905
|
+
if (content.startsWith("@default"))
|
|
906
|
+
def = content.replace(/^@default\s*/, "");
|
|
907
|
+
else if (!content.startsWith("@") && content)
|
|
908
|
+
desc += (desc ? " " : "") + content;
|
|
909
|
+
continue;
|
|
910
|
+
}
|
|
911
|
+
const colonIdx = line.indexOf(":");
|
|
912
|
+
const commentIdx = colonIdx > 0 ? line.indexOf("//", colonIdx) : -1;
|
|
913
|
+
if (colonIdx > 0 && commentIdx > colonIdx) {
|
|
914
|
+
const nameMatch = line.match(/^\s*(\w+)/);
|
|
915
|
+
if (nameMatch) {
|
|
916
|
+
const comment = line.slice(commentIdx + 2).trim();
|
|
917
|
+
result[nameMatch[1]] = { description: desc || comment, defaultValue: def || void 0 };
|
|
918
|
+
desc = "";
|
|
919
|
+
def = "";
|
|
920
|
+
continue;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
const fieldMatch = line.match(/^\s*(\w+)\s*:/);
|
|
924
|
+
if (fieldMatch) {
|
|
925
|
+
if (desc || def)
|
|
926
|
+
result[fieldMatch[1]] = { description: desc || void 0, defaultValue: def || void 0 };
|
|
927
|
+
desc = "";
|
|
928
|
+
def = "";
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
return result;
|
|
932
|
+
}
|
|
933
|
+
function getRegistrySchemaFields() {
|
|
934
|
+
const types = registryTypes;
|
|
935
|
+
const result = {};
|
|
936
|
+
for (const declarations of Object.values(types)) {
|
|
937
|
+
for (const decl of declarations) {
|
|
938
|
+
if (decl.kind !== "const" || decl.name.endsWith("Defaults"))
|
|
939
|
+
continue;
|
|
940
|
+
const schema = schemas[decl.name];
|
|
941
|
+
if (!schema?.entries)
|
|
942
|
+
continue;
|
|
943
|
+
const comments = parseComments(decl.code);
|
|
944
|
+
const fields = [];
|
|
945
|
+
for (const [name, entry] of Object.entries(schema.entries)) {
|
|
946
|
+
const e = entry;
|
|
947
|
+
const isOptional = e.type === "optional";
|
|
948
|
+
const inner = isOptional ? e.wrapped : e;
|
|
949
|
+
fields.push({
|
|
950
|
+
name,
|
|
951
|
+
type: resolveType(inner),
|
|
952
|
+
required: !isOptional,
|
|
953
|
+
description: comments[name]?.description,
|
|
954
|
+
defaultValue: comments[name]?.defaultValue
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
if (fields.length)
|
|
958
|
+
result[decl.name] = fields;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
return result;
|
|
962
|
+
}
|
|
1198
963
|
|
|
1199
|
-
export {
|
|
964
|
+
export { getRegistrySchemaFields, getRegistryTypes };
|