@nuxt/scripts 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -8
- package/dist/client/200.html +65 -51
- package/dist/client/404.html +65 -51
- package/dist/client/_nuxt/{CDJL3WWm.js → B3g-KkBK.js} +1 -1
- package/dist/client/_nuxt/{Di3qjVs2.js → B4ACM-c0.js} +1 -1
- package/dist/client/_nuxt/B7rNE5kf.js +1 -0
- package/dist/client/_nuxt/BBSnVM_c.js +31 -0
- package/dist/client/_nuxt/BEjL32p1.js +5754 -0
- package/dist/client/_nuxt/{CCsrmkFc.js → BJEDUQYt.js} +1 -1
- package/dist/client/_nuxt/BcF9sHHc.js +6 -0
- package/dist/client/_nuxt/{BGq4KZyx.js → Br6ll-O0.js} +1 -1
- package/dist/client/_nuxt/BwXNTs7T.js +1 -0
- package/dist/client/_nuxt/Bx89rGXK.js +1 -0
- package/dist/client/_nuxt/{V_y36BGi.js → Bxkoe-BC.js} +1 -1
- package/dist/client/_nuxt/{CX2EUjC8.js → C3qUB5O8.js} +7 -7
- package/dist/client/_nuxt/CGmujMTu.js +1 -0
- package/dist/client/_nuxt/CO5hpdkB.js +1 -0
- package/dist/client/_nuxt/CiRxTSAc.js +1 -0
- package/dist/client/_nuxt/CpAANOdC.js +1 -0
- package/dist/client/_nuxt/DAfrLhwG.js +1 -0
- package/dist/client/_nuxt/DGMFlOLs.js +1 -0
- package/dist/client/_nuxt/DKb4lQY2.js +1 -0
- package/dist/client/_nuxt/{DIr-ordK.js → DKlGn9uv.js} +1 -1
- package/dist/client/_nuxt/Dit6kIrv.js +11 -0
- package/dist/client/_nuxt/FJDVp-XM.js +1 -0
- package/dist/client/_nuxt/KPqz0Sb3.js +1 -0
- package/dist/client/_nuxt/MS3qTAOR.js +1 -0
- package/dist/client/_nuxt/P5f3PASf.js +40 -0
- package/dist/client/_nuxt/{CFYSkdJN.js → PGJIGHGk.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/f37c599d-d78f-4a74-8eda-256234cbc028.json +1 -0
- package/dist/client/_nuxt/{C7Ygk604.js → iP9mcxdl.js} +1 -1
- package/dist/client/index.html +65 -51
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/registry.d.mts +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.mjs +1 -1
- package/dist/runtime/components/ScriptGoogleMaps.vue +2 -2
- package/dist/runtime/components/ScriptLemonSqueezyButton.vue +2 -3
- package/dist/runtime/components/ScriptStripePricingTable.vue +1 -1
- package/dist/runtime/components/ScriptVimeoPlayer.vue +45 -37
- package/dist/runtime/components/ScriptYouTubePlayer.vue +1 -1
- package/dist/runtime/composables/useAnalyticsPageEvent.d.ts +4 -1
- package/dist/runtime/composables/useElementScriptTrigger.d.ts +1 -1
- package/dist/runtime/registry/cloudflare-web-analytics.d.ts +19 -2
- package/dist/runtime/registry/fathom-analytics.d.ts +31 -2
- package/dist/runtime/registry/google-analytics.d.ts +11 -2
- package/dist/runtime/registry/google-analytics.mjs +1 -1
- package/dist/runtime/registry/google-maps.d.ts +21 -9
- package/dist/runtime/registry/google-tag-manager.d.ts +8 -2
- package/dist/runtime/registry/hotjar.d.ts +10 -2
- package/dist/runtime/registry/intercom.d.ts +23 -3
- package/dist/runtime/registry/lemon-squeezy.d.ts +3 -1
- package/dist/runtime/registry/matomo-analytics.d.ts +14 -2
- package/dist/runtime/registry/meta-pixel.d.ts +8 -2
- package/dist/runtime/registry/npm.d.ts +14 -2
- package/dist/runtime/registry/plausible-analytics.d.ts +10 -2
- package/dist/runtime/registry/segment.d.ts +10 -2
- package/dist/runtime/registry/stripe.d.ts +8 -2
- package/dist/runtime/registry/vimeo-player.d.ts +6 -3
- package/dist/runtime/registry/x-pixel.d.ts +10 -2
- package/dist/runtime/registry/youtube-player.d.ts +6 -2
- package/dist/runtime/types.d.ts +4 -2
- package/dist/runtime/utils.d.ts +4 -2
- package/package.json +12 -11
- package/dist/client/_nuxt/CudBhkk3.js +0 -1
- package/dist/client/_nuxt/DbUJKcwL.js +0 -31
- package/dist/client/_nuxt/Dszwcx0o.js +0 -1
- package/dist/client/_nuxt/DtT2Dbx_.js +0 -6
- package/dist/client/_nuxt/builds/meta/2a8bbe8d-00a2-43ea-ae62-2d603f7034d4.json +0 -1
package/dist/runtime/utils.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ type OptionsFn<O extends ObjectSchema<any>> = (options: Input<O>) => ({
|
|
|
7
7
|
schema?: O;
|
|
8
8
|
clientInit?: () => void;
|
|
9
9
|
});
|
|
10
|
-
export declare function scriptRuntimeConfig<T extends keyof ScriptRegistry>(key: T): ScriptRegistry;
|
|
11
|
-
export declare function useRegistryScript<T extends Record<string | symbol, any>, O extends ObjectSchema<any> = EmptyOptionsSchema>(key: keyof ScriptRegistry | string, optionsFn: OptionsFn<O>, _userOptions?: RegistryScriptInput<O>):
|
|
10
|
+
export declare function scriptRuntimeConfig<T extends keyof ScriptRegistry>(key: T): ScriptRegistry[T];
|
|
11
|
+
export declare function useRegistryScript<T extends Record<string | symbol, any>, O extends ObjectSchema<any> = EmptyOptionsSchema>(key: keyof ScriptRegistry | string, optionsFn: OptionsFn<O>, _userOptions?: RegistryScriptInput<O>): T & {
|
|
12
|
+
$script: Promise<T> & import("@unhead/vue").VueScriptInstance<T>;
|
|
13
|
+
};
|
|
12
14
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/scripts",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.2",
|
|
5
5
|
"description": "Load third-party scripts with better performance, privacy and DX in Nuxt Apps.",
|
|
6
6
|
"author": {
|
|
7
7
|
"website": "https://harlanzw.com",
|
|
@@ -36,14 +36,15 @@
|
|
|
36
36
|
"externals": [
|
|
37
37
|
"@unhead/vue",
|
|
38
38
|
"@unhead/schema",
|
|
39
|
-
"#nuxt-scripts"
|
|
39
|
+
"#nuxt-scripts",
|
|
40
|
+
"#nuxt-scripts-validator"
|
|
40
41
|
]
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@nuxt/devtools-kit": "^1.
|
|
44
|
-
"@nuxt/devtools-ui-kit": "^1.
|
|
44
|
+
"@nuxt/devtools-kit": "^1.3.1",
|
|
45
|
+
"@nuxt/devtools-ui-kit": "^1.3.1",
|
|
45
46
|
"@nuxt/kit": "^3.11.2",
|
|
46
|
-
"@types/google.maps": "^3.55.
|
|
47
|
+
"@types/google.maps": "^3.55.9",
|
|
47
48
|
"@types/stripe-v3": "^3.1.33",
|
|
48
49
|
"@types/vimeo__player": "^2.18.3",
|
|
49
50
|
"@types/youtube": "^0.0.50",
|
|
@@ -58,9 +59,9 @@
|
|
|
58
59
|
"ofetch": "^1.3.4",
|
|
59
60
|
"ohash": "^1.1.3",
|
|
60
61
|
"pathe": "^1.1.2",
|
|
61
|
-
"pkg-types": "^1.1.
|
|
62
|
-
"semver": "^7.6.
|
|
63
|
-
"shiki": "^1.
|
|
62
|
+
"pkg-types": "^1.1.1",
|
|
63
|
+
"semver": "^7.6.2",
|
|
64
|
+
"shiki": "^1.5.2",
|
|
64
65
|
"sirv": "^2.0.4",
|
|
65
66
|
"std-env": "^3.7.0",
|
|
66
67
|
"third-party-capital": "^1.0.28",
|
|
@@ -71,8 +72,8 @@
|
|
|
71
72
|
"valibot": "^0.30.0"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
|
-
"@antfu/eslint-config": "2.
|
|
75
|
-
"@nuxt/devtools-ui-kit": "^1.
|
|
75
|
+
"@antfu/eslint-config": "2.17.0",
|
|
76
|
+
"@nuxt/devtools-ui-kit": "^1.3.1",
|
|
76
77
|
"@nuxt/module-builder": "^0.6.0",
|
|
77
78
|
"@nuxt/test-utils": "3.12.1",
|
|
78
79
|
"@unhead/schema": "^1.9.10",
|
|
@@ -105,6 +106,6 @@
|
|
|
105
106
|
"lint": "eslint .",
|
|
106
107
|
"lint:fix": "eslint . --fix",
|
|
107
108
|
"test": "vitest",
|
|
108
|
-
"test:types": "
|
|
109
|
+
"test:types": "npx nuxi typecheck"
|
|
109
110
|
}
|
|
110
111
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=Object.freeze({displayName:"HashiCorp HCL",fileTypes:["hcl"],name:"hcl",patterns:[{include:"#comments"},{include:"#attribute_definition"},{include:"#block"},{include:"#expressions"}],repository:{attribute_access:{begin:"\\.(?!\\*)",beginCaptures:{0:{name:"keyword.operator.accessor.hcl"}},comment:"Matches traversal attribute access such as .attr",end:"[[:alpha:]][\\w-]*|\\d*",endCaptures:{0:{patterns:[{comment:"Attribute name",match:"(?!null|false|true)[[:alpha:]][\\w-]*",name:"variable.other.member.hcl"},{comment:"Optional attribute index",match:"\\d+",name:"constant.numeric.integer.hcl"}]}}},attribute_definition:{captures:{1:{name:"punctuation.section.parens.begin.hcl"},2:{name:"variable.other.readwrite.hcl"},3:{name:"punctuation.section.parens.end.hcl"},4:{name:"keyword.operator.assignment.hcl"}},comment:'Identifier "=" with optional parens',match:"(\\()?(\\b(?!null\\b|false\\b|true\\b)[[:alpha:]][[:alnum:]_-]*)(\\))?\\s*(\\=(?!\\=|\\>))\\s*",name:"variable.declaration.hcl"},attribute_splat:{begin:"\\.",beginCaptures:{0:{name:"keyword.operator.accessor.hcl"}},comment:"Legacy attribute-only splat",end:"\\*",endCaptures:{0:{name:"keyword.operator.splat.hcl"}}},block:{begin:"([\\w][\\-\\w]*)([^?{\\r\\n]*)(\\{)",beginCaptures:{1:{patterns:[{comment:"Block type",match:"\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",name:"entity.name.type.hcl"}]},2:{patterns:[{comment:"Block label (String Literal)",match:'\\"[^\\"\\r\\n]*\\"',name:"variable.other.enummember.hcl"},{comment:"Block label (Indentifier)",match:"[[:alpha:]][[:alnum:]_-]*",name:"variable.other.enummember.hcl"}]},3:{name:"punctuation.section.block.begin.hcl"}},comment:'This will match HCL blocks like `thing1 "one" "two" {` or `thing2 {`',end:"\\}",endCaptures:{0:{name:"punctuation.section.block.end.hcl"}},name:"meta.block.hcl",patterns:[{include:"#comments"},{include:"#attribute_definition"},{include:"#expressions"},{include:"#block"}]},block_inline_comments:{begin:"/\\*",captures:{0:{name:"punctuation.definition.comment.hcl"}},comment:"Inline comments start with the /* sequence and end with the */ sequence, and may have any characters within except the ending sequence. An inline comment is considered equivalent to a whitespace sequence",end:"\\*/",name:"comment.block.hcl"},brackets:{begin:"\\[",beginCaptures:{0:{name:"punctuation.section.brackets.begin.hcl"}},end:"\\]",endCaptures:{0:{name:"punctuation.section.brackets.end.hcl"}},patterns:[{comment:"Splat operator",match:"\\*",name:"keyword.operator.splat.hcl"},{include:"#comma"},{include:"#comments"},{include:"#inline_for_expression"},{include:"#inline_if_expression"},{include:"#expressions"},{include:"#local_identifiers"}]},char_escapes:{comment:"Character Escapes",match:'\\\\[nrt"\\\\]|\\\\u(\\h{8}|\\h{4})',name:"constant.character.escape.hcl"},comma:{comment:"Commas - used in certain expressions",match:"\\,",name:"punctuation.separator.hcl"},comments:{patterns:[{include:"#hash_line_comments"},{include:"#double_slash_line_comments"},{include:"#block_inline_comments"}]},double_slash_line_comments:{begin:"//",captures:{0:{name:"punctuation.definition.comment.hcl"}},comment:"Line comments start with // sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",end:"$\\n?",name:"comment.line.double-slash.hcl"},expressions:{patterns:[{include:"#literal_values"},{include:"#operators"},{include:"#tuple_for_expression"},{include:"#object_for_expression"},{include:"#brackets"},{include:"#objects"},{include:"#attribute_access"},{include:"#attribute_splat"},{include:"#functions"},{include:"#parens"}]},for_expression_body:{patterns:[{comment:"in keyword",match:"\\bin\\b",name:"keyword.operator.word.hcl"},{comment:"if keyword",match:"\\bif\\b",name:"keyword.control.conditional.hcl"},{match:"\\:",name:"keyword.operator.hcl"},{include:"#expressions"},{include:"#comments"},{include:"#comma"},{include:"#local_identifiers"}]},functions:{begin:"([:\\-\\w]+)(\\()",beginCaptures:{1:{patterns:[{match:"\\b[[:alpha:]][\\w_-]*::([[:alpha:]][\\w_-]*::)?[[:alpha:]][\\w_-]*\\b",name:"support.function.namespaced.hcl"},{match:"\\b[[:alpha:]][\\w_-]*\\b",name:"support.function.builtin.hcl"}]},2:{name:"punctuation.section.parens.begin.hcl"}},comment:"Built-in function calls",end:"\\)",endCaptures:{0:{name:"punctuation.section.parens.end.hcl"}},name:"meta.function-call.hcl",patterns:[{include:"#comments"},{include:"#expressions"},{include:"#comma"}]},hash_line_comments:{begin:"#",captures:{0:{name:"punctuation.definition.comment.hcl"}},comment:"Line comments start with # sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",end:"$\\n?",name:"comment.line.number-sign.hcl"},hcl_type_keywords:{comment:"Type keywords known to HCL.",match:"\\b(any|string|number|bool|list|set|map|tuple|object)\\b",name:"storage.type.hcl"},heredoc:{begin:"(\\<\\<\\-?)\\s*(\\w+)\\s*$",beginCaptures:{1:{name:"keyword.operator.heredoc.hcl"},2:{name:"keyword.control.heredoc.hcl"}},comment:"String Heredoc",end:"^\\s*\\2\\s*$",endCaptures:{0:{name:"keyword.control.heredoc.hcl"}},name:"string.unquoted.heredoc.hcl",patterns:[{include:"#string_interpolation"}]},inline_for_expression:{captures:{1:{name:"keyword.control.hcl"},2:{patterns:[{match:"\\=\\>",name:"storage.type.function.hcl"},{include:"#for_expression_body"}]}},match:"(for)\\b(.*)\\n"},inline_if_expression:{begin:"(if)\\b",beginCaptures:{1:{name:"keyword.control.conditional.hcl"}},end:"\\n",patterns:[{include:"#expressions"},{include:"#comments"},{include:"#comma"},{include:"#local_identifiers"}]},language_constants:{comment:"Language Constants",match:"\\b(true|false|null)\\b",name:"constant.language.hcl"},literal_values:{patterns:[{include:"#numeric_literals"},{include:"#language_constants"},{include:"#string_literals"},{include:"#heredoc"},{include:"#hcl_type_keywords"}]},local_identifiers:{comment:"Local Identifiers",match:"\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",name:"variable.other.readwrite.hcl"},numeric_literals:{patterns:[{captures:{1:{name:"punctuation.separator.exponent.hcl"}},comment:"Integer, no fraction, optional exponent",match:"\\b\\d+([Ee][+-]?)\\d+\\b",name:"constant.numeric.float.hcl"},{captures:{1:{name:"punctuation.separator.decimal.hcl"},2:{name:"punctuation.separator.exponent.hcl"}},comment:"Integer, fraction, optional exponent",match:"\\b\\d+(\\.)\\d+(?:([Ee][+-]?)\\d+)?\\b",name:"constant.numeric.float.hcl"},{comment:"Integers",match:"\\b\\d+\\b",name:"constant.numeric.integer.hcl"}]},object_for_expression:{begin:"(\\{)\\s?(for)\\b",beginCaptures:{1:{name:"punctuation.section.braces.begin.hcl"},2:{name:"keyword.control.hcl"}},end:"\\}",endCaptures:{0:{name:"punctuation.section.braces.end.hcl"}},patterns:[{match:"\\=\\>",name:"storage.type.function.hcl"},{include:"#for_expression_body"}]},object_key_values:{patterns:[{include:"#comments"},{include:"#literal_values"},{include:"#operators"},{include:"#tuple_for_expression"},{include:"#object_for_expression"},{include:"#heredoc"},{include:"#functions"}]},objects:{begin:"\\{",beginCaptures:{0:{name:"punctuation.section.braces.begin.hcl"}},end:"\\}",endCaptures:{0:{name:"punctuation.section.braces.end.hcl"}},name:"meta.braces.hcl",patterns:[{include:"#comments"},{include:"#objects"},{include:"#inline_for_expression"},{include:"#inline_if_expression"},{captures:{1:{name:"meta.mapping.key.hcl variable.other.readwrite.hcl"},2:{name:"keyword.operator.assignment.hcl"}},comment:"Literal, named object key",match:"\\b((?!null|false|true)[[:alpha:]][[:alnum:]_-]*)\\s*(\\=(?!=))\\s*"},{captures:{1:{name:"meta.mapping.key.hcl string.quoted.double.hcl"},2:{name:"punctuation.definition.string.begin.hcl"},3:{name:"punctuation.definition.string.end.hcl"},4:{name:"keyword.operator.hcl"}},comment:"String object key",match:'^\\s*((").*("))\\s*(\\=)\\s*'},{begin:"^\\s*\\(",beginCaptures:{0:{name:"punctuation.section.parens.begin.hcl"}},comment:"Computed object key (any expression between parens)",end:"(\\))\\s*(=|:)\\s*",endCaptures:{1:{name:"punctuation.section.parens.end.hcl"},2:{name:"keyword.operator.hcl"}},name:"meta.mapping.key.hcl",patterns:[{include:"#attribute_access"},{include:"#attribute_splat"}]},{include:"#object_key_values"}]},operators:{patterns:[{match:"\\>\\=",name:"keyword.operator.hcl"},{match:"\\<\\=",name:"keyword.operator.hcl"},{match:"\\=\\=",name:"keyword.operator.hcl"},{match:"\\!\\=",name:"keyword.operator.hcl"},{match:"\\+",name:"keyword.operator.arithmetic.hcl"},{match:"\\-",name:"keyword.operator.arithmetic.hcl"},{match:"\\*",name:"keyword.operator.arithmetic.hcl"},{match:"\\/",name:"keyword.operator.arithmetic.hcl"},{match:"\\%",name:"keyword.operator.arithmetic.hcl"},{match:"\\&\\&",name:"keyword.operator.logical.hcl"},{match:"\\|\\|",name:"keyword.operator.logical.hcl"},{match:"\\!",name:"keyword.operator.logical.hcl"},{match:"\\>",name:"keyword.operator.hcl"},{match:"\\<",name:"keyword.operator.hcl"},{match:"\\?",name:"keyword.operator.hcl"},{match:"\\.\\.\\.",name:"keyword.operator.hcl"},{match:"\\:",name:"keyword.operator.hcl"},{match:"\\=\\>",name:"keyword.operator.hcl"}]},parens:{begin:"\\(",beginCaptures:{0:{name:"punctuation.section.parens.begin.hcl"}},comment:"Parens - matched *after* function syntax",end:"\\)",endCaptures:{0:{name:"punctuation.section.parens.end.hcl"}},patterns:[{include:"#comments"},{include:"#expressions"}]},string_interpolation:{begin:"(?<![%$])([%$]{)",beginCaptures:{1:{name:"keyword.other.interpolation.begin.hcl"}},comment:"String interpolation",end:"\\}",endCaptures:{0:{name:"keyword.other.interpolation.end.hcl"}},name:"meta.interpolation.hcl",patterns:[{comment:"Trim left whitespace",match:"\\~\\s",name:"keyword.operator.template.left.trim.hcl"},{comment:"Trim right whitespace",match:"\\s\\~",name:"keyword.operator.template.right.trim.hcl"},{comment:"if/else/endif and for/in/endfor directives",match:"\\b(if|else|endif|for|in|endfor)\\b",name:"keyword.control.hcl"},{include:"#expressions"},{include:"#local_identifiers"}]},string_literals:{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.hcl"}},comment:"Strings",end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.hcl"}},name:"string.quoted.double.hcl",patterns:[{include:"#string_interpolation"},{include:"#char_escapes"}]},tuple_for_expression:{begin:"(\\[)\\s?(for)\\b",beginCaptures:{1:{name:"punctuation.section.brackets.begin.hcl"},2:{name:"keyword.control.hcl"}},end:"\\]",endCaptures:{0:{name:"punctuation.section.brackets.end.hcl"}},patterns:[{include:"#for_expression_body"}]}},scopeName:"source.hcl"});var n=[e];export{n as default};
|